Original Post
I use the following code and get nice red cubes on a white plane:
Then i remove the comments to apply the texturing and the cubes darken. Any idea whats happening?
How does texturing the ground darken these cubes?
glColor3f(1,1,1);
for(int z=0;z<100;z++){
for(int x=0;x<100;x++){
if(pathMap[x][z]==1){
glPushMatrix();
glColor3f(1,0,0);
glTranslatef(x,0,z);
glutSolidCube(1);
glColor3f(1,1,1);
glPopMatrix();
}//else{
//tm->BindTexture(TEX_GROUND);
glBegin(GL_QUADS);
glNormal3d(0,1,0);
//glTexCoord2f(0.0f, 0.0f);
glVertex3f(x, 0, z);
//glTexCoord2f(1.0f, 0.0f);
glVertex3f(x, 0, z+1);
//glTexCoord2f(1.0f, 1.0f);
glVertex3f(x+1, 0, z+1);
glTexCoord2f(0.0f, 1.0f);
glVertex3f(x+1, 0, z);
glEnd();
Then i remove the comments to apply the texturing and the cubes darken. Any idea whats happening?
How does texturing the ground darken these cubes?