On Monday, 3 September 2012 at 16:57:08 UTC, cal wrote:
On Monday, 3 September 2012 at 15:21:59 UTC, Zhenya wrote:
Why this simple program don't show white square?
void display()
{
        glClear(GL_COLOR_BUFFER_BIT);
        glBegin(GL_POLYGON);
                glVertex2d(0,0);
                glVertex2d(0,height);
                glVertex2d(width,height);
                glVertex2d(height,0);        <<<<<<<< glVertex2d(width, 0)
        glEnd();
}

If that doesn't work, maybe you need to wind the vertices the other way to avoid backface culling, ie:

glVertex2d(0, 0)
glVertex2d(width, 0)
glVertex2d(width, height)
glVertex2d(0, height)

that dosn't work

Reply via email to