C++/grphics via OpenGL
sir i have made a room using GlutWireCube();.it is looking fine.now i want to paint its walls using texture mapping using red color.give me a code to do this.and give a idea of walk through in a room.
waiting for response.
Hello naveed, thank you for the question.
Now that you have your room, you want to color its walls. This shouldn't be too hard.
I'm not too familiar with glut like I am with native OpenGL, but I'm sure if there is a function to create a cube there is a way to access each side of it. Once you access each side just call: glColor3f(1.0f, 0.0f, 0.0f). OpenGL color methods take parameters in the RGB form, with 0, 0, 0 being completely dark and 1, 1, 1 being completely white.
If there is no access method, you can do it the old fashioned way:
// set up the rest of the vertices
// set the color of each
// glColor3f(1.0f, 0.0f, 0.0f)
Let me know how this works out.
If you have any other questions, please do not hesistate to ask.