Hi I was trying to render objects with textures and without in the same scene and the code I wrote came something like
(imagine that I already initialized everything and read the textures,and named(glGentextures) then and defined then(glTexImage2D))
//first draw the textured triangle
//then draw the colored triangle
glBegin(GL_TRIANGLES); glColor3f(1,0,0);glVertex3f(...); glColor3f(0,1,0);glVertex3f(...); glColor3f(0,0,1);glVertex3f(...); glEnd();
I first enable texturing , set the actual texture , and draw the triangle with textures , then I disabled texturing and the use of textured objects and I draw the second triangle. But this doesnt work! When I do this ALL the scene is painted as the last color of the second triangle! Evererything turns blue! Please can anyone enlight-me of whats going on and how to solve this?