You are here:

C++/graphics via OpenGL


sir i m going to make a project in is a type of house.sir i m going to make one room.i wanna place some oblects in it like bed,table,chair etc.
sir guide me how to make a room and place objects in it.sir give me some idea of texture mapping as well n how to use it.
waiting for  response.

Hello naveed, thank you for the question.

Mapping textures in OpenGL isn't too hard. You must first understand how texture coordinates work. The entire image can be thought of as 2 sets of points, 0, 0, and 1, 1. To visually illustrate

         (1, 1)
     |    |
     |    |
(0, 0)

Just in case all experts disables my formatting, (0, 0) is in the bottom left corner and (1, 1) is in the top right. You use the image like this to map it over your polygon using the function glTexCoord2f(). The functions glVertex3f() and glNormal3f() to specify your verticies and normals on your objects.

I would suggest that you take a look at the functions glPushMatrix() and glPopMatrix() when it comes to positioning your objects in relation to each other in 3d space. One caveat with that would be that the OpenGL matrix stack limit is 32, but I don't think that should be an issue.

I would like to reference for helpful tidbits of information.

If you have any other questions, please do not hesistate to ask.

I hope this information was helpful.

- Eddie


All Answers

Answers by Expert:

Ask Experts




I can answer questions about the C++ language, object oriented design and architecture. I am knowledgable in a lot of the math that goes into programming, and am certified by I also know a good deal about graphics via OpenGL, and GUIs.


I have completed numerous games and demos created with the C++ programming language. Currently employed as a software engineer in the modeling and simulation field. I have about 7 years experience.

©2016 All rights reserved.