   problem drawing widgets in ortho mode
  I have the following code:[source language="C"]glMatrixMode(GL_PROJECTION);    glPushMatrix();    glLoadIdentity();/* Reset The Projection Matrix */   glOrtho(0.0f,640,480,0,-1.0f,1.0f);    glMatrixMode(GL_MODELVIEW);    glPushMatrix();    glLoadIdentity();glDisable(GL_DEPTH_TEST);   //draw dialog window    glBindTexture(GL_TEXTURE_2D, tex);    glBegin(GL_QUADS);    glVertex2i(x,y);    glTexCoord2f(0,0);    glVertex2i(x+w,y);    glTexCoord2f(1,0);    glVertex2i(x+w,y+h);    glTexCoord2f(1,1);    glVertex2i(x,y+h);    glTexCoord2f(0,1);    glEnd();  glMatrixMode(GL_MODELVIEW); glPopMatrix(); glMatrixMode(GL_PROJECTION); glPopMatrix(); glMatrixMode(GL_MODELVIEW); glEnable(GL_DEPTH_TEST); The app correctly switches from previous mode and restores it, so I can see my drawing. But The 2d part for some reason doesnt produces anything. Can somebody find what mistake Im making here?   
  This might not be it, but I think your quad is facing the wrong way. Try it with glOrtho(0.0f,640,0,480,-1.0f,1.0f);instead and see if that fixes it. (Alternatively, reverse the vertex/texcoord pairs' order)Edit: also, I would disable lighting before drawing in ortho mode.   ;  Hmm I can see the quad drawn here, I remove the texture though, but it draws allright.For example if I change this to:float x = 220.0f;float y = 220.0f;float w = 100.0f;float h = 100.0f;glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);// Clear The Screen And The Depth Buffer    glMatrixMode(GL_PROJECTION);    glPushMatrix();    glLoadIdentity();/* Reset The Projection Matrix */   glOrtho(0.0f,640,480,0,-1.0f,1.0f);    glMatrixMode(GL_MODELVIEW);    glPushMatrix();    glLoadIdentity();glDisable(GL_DEPTH_TEST);   //draw dialog window//    glBindTexture(GL_TEXTURE_2D, tex);    glBegin(GL_QUADS);    glVertex2i(x,y);    glTexCoord2f(0,0);    glVertex2i(x+w,y);    glTexCoord2f(1,0);    glVertex2i(x+w,y+h);    glTexCoord2f(1,1);    glVertex2i(x,y+h);    glTexCoord2f(0,1);    glEnd();glMatrixMode(GL_MODELVIEW);glPopMatrix();glMatrixMode(GL_PROJECTION);glPopMatrix();glMatrixMode(GL_MODELVIEW);glEnable(GL_DEPTH_TEST); I can clearly see the white bar at specified coordinates.   ;  Code looks ok at first glance. Your glVertex and glTexCoord calls are backwards, you should call all per-vertex attributes first, then consider that glVertex3f takes all of those previous calls and submits a vertex with them.  This probably isn't causing your problem though... When messing with ortho I've found it can be picky, what parameters you use for far and near plane with glOrtho().My Ortho call looks like this (Java code), and it's working well.GL11.glOrtho(0.0f, GLConfig.WINDOW_WIDTH, GLConfig.WINDOW_HEIGHT, 0.0f, 0, 1);;  It is a waeird problem. Changing parameters to floats solved the drawing. Now I get a blue bar, I just have to find the right order to make it look a window.;  There's really only two orders, clockwise and counterclockwise. As Optus stated, you need to call glTexCoord before glVertex. Also, did you try putting it all clockwise or putting the glOrtho origin in the lower left? (But don't try both at once -_-)   ;  My big mistake. First, no experience with derived classes (was calling th ebase class redraw process), second and most stupid, used the same name for constructor parameters as class members for x, y, etc. Everything fixed now, including vertex order.   