PDA

View Full Version : getting blank screen



marysowdha
11-06-2001, 11:54 AM
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
11-06-2001, 06:07 PM
Again you need to swapbuffers appropriately for your target system even without glut. The alternative is to use single buffered rendering.

Joachim
11-07-2001, 12:12 AM
By the way .. a normal could be useful too http://www.opengl.org/discussion_boards/ubb/smile.gif

dorbie
11-07-2001, 12:39 PM
You assume lighting.
Perhaps a color would be a better investment.