DerelictGL program draw nothing

cal callumenator at gmail.com
Mon Sep 3 09:57:31 PDT 2012


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)



More information about the Digitalmars-d-learn mailing list