Advertisement

Please help me with tutorial 6

Started by December 03, 2001 07:45 AM
0 comments, last by register 23 years, 2 months ago
I have studied tutorial 6 and have modified it so, that it draws to cubes instead of one. I would like the cubes have different texture maps, but don''t know how to do it. If I set the texture map of the first cube the other cube will have the exactly same texture. I have written a class like below. If I load the textures in the texture[0], in different objects, the both cubes have still the same texture. Please help me... class CCube { double x; double y; double z; double size; ... public: GLuint texture[1]; ... }; Thanks.
Are you remebering to bind the texture before you draw the second cube.

CCube a...
CCube b..

glBindTexture(GL_TEXTURE_2D,a.texture[0]);




glBindTexture(GL_TEXTURE_2D,b.texture[0]);

This topic is closed to new replies.

Advertisement