problems with glFrontFace() and glCullFace

I’m following the redBook and I have following problems:

I have following vertices defined as polygon:

	glVertex3f(50,50,0);
	glVertex3f(50,200,0);
	glVertex3f(250,200,0);
	glVertex3f(250,200,1.0);
	glVertex3f(150,180,1.0);
	glVertex3f(150,100,1.0);
	glVertex3f(250,50,1.0);
	glVertex3f(250,50,0.0);

Problem 1: I wanted to test the glFrontFace() with GL_CCW and GL_CW but in both cases I get this (the point is that I’m missing the functionality idea):

Problem 2a: I wanted to test the glCullFace(). When I entered glDisable(GL_CULL_FACE) (all polygons should be displayed) I got the same result as in attached image.

problem 2a: When I entered:
glCullFace(GL_FRONT) and enabled the GL_CULL_FACE I got this:

should’t be here displayed only the back sides? :stuck_out_tongue:

if glDisable(GL_CULL_FACE) fails then your vertices are simply wrong. the question is how do you render the data. GL_POLYGON?

To my knowledge, GL_POLYGON only works with convex polygons.
To draw non-convex polygons, I usually use a GLUtesselator based rendering.
Hope this helps.

yes,…I think that this is the problem…thanks

i personally hate GL_POLYGON. TRIANGLES are the way to go!