Hi SL
I have changed my vertices to CCW as follows, then also It is not getting displayed
void display()
{
glClear(GL_COLOR_BUFFER_BIT);
glBegin(GL_POLYGON);
glVertex2f(-0.5,-0.5);
glVertex2f(0.5,-0.5);
glVertex2f(0.5,0.5);
glVertex2f(-0.5,0.5);
glEnd();
glFlush();
}
dorbie
2
Again you need to swapbuffers appropriately for your target system even without glut. The alternative is to use single buffered rendering.
Joachim
3
By the way … a normal could be useful too 
dorbie
4
You assume lighting.
Perhaps a color would be a better investment.