   glDisable(GL_LIGHTING) problem
  I this function that draws a masked quad.void CPawn::DrawPawn(float zoomf){glPushMatrix();glTranslatef(position.x*zoomf,position.y*zoomf,0);glRotatef(-rotation,0.0f,0.0f,1.0f);// Draw the maskglDisable(GL_LIGHTING);glBindTexture(GL_TEXTURE_2D,textures->n_tex_m);glBlendFunc(GL_DST_COLOR,GL_ZERO);glBegin(GL_QUADS);    glColor3f(1.0f,1.0f,1.0f);glTexCoord2f(0.0f,0.0f);glVertex2f(-16.0f*zoomf,-16.0f*zoomf);glTexCoord2f(1.0f,0.0f);glVertex2f(16.0f*zoomf,-16.0f*zoomf);glTexCoord2f(1.0f,1.0f);glVertex2f(16.0f*zoomf,16.0f*zoomf);glTexCoord2f(0.0f,1.0f);glVertex2f(-16.0f*zoomf,16.0f*zoomf);glEnd();glBlendFunc(GL_ONE, GL_ONE);// Draw the bitmapglEnable(GL_LIGHTING);glBindTexture(GL_TEXTURE_2D,textures->n_tex);glBegin(GL_QUADS);    //glColor3f(1.0f,1.0f,1.0f);glTexCoord2f(0.0f,0.0f);glVertex2f(-16.0f*zoomf,-16.0f*zoomf);glTexCoord2f(1.0f,0.0f);glVertex2f(16.0f*zoomf,-16.0f*zoomf);glTexCoord2f(1.0f,1.0f);glVertex2f(16.0f*zoomf,16.0f*zoomf);glTexCoord2f(0.0f,1.0f);glVertex2f(-16.0f*zoomf,16.0f*zoomf);glEnd();glPopMatrix();}I want to disable lighting so the mask gets drawn correctly and then enable it to draw the actual image. The problem is that the glDisable(GL_LIGHTING) call doesn''t seem to work. What really baffles me is the fact that if I put glDisable(GL_LIGHTING) before the glRotatef, it works fine. Any ideas how this is possible? I''m starting to wonder if it''s hardware related(I have a Voodoo3)  
  so just put the glDisable(...) call before the glRotate call.  you seem to have already fixed the problem  [EDIT: just noticed the actaul question which was "how this works?"... oh well...]it definitely seems wierd but it could be an order of opertaions thing on the graphics card....either way, don't worry about it, just put it where it works-me   [edited by - Palidine on February 11, 2004 12:49:55 PM];  In the end I''ll go with whatever works. But I usually want to do things the right way. In a more complex program, moving around the glDisable calls might not be a solution. 