Archived

This topic is now archived and is closed to further replies.

Shadow1234567890

cullface not culling

Recommended Posts

Umm yes...
glCullFace(GL_CCW);
this doenst cull faces
but when i changed it to:
glEnable(GL_CULL_FACE);

it does work
and that is strange
oh well at least something works
what are the differences between the two?

Share this post


Link to post
Share on other sites
They are not the same thing. You are supposed to use both, like so:

glEnable(GL_CULL_FACE);
glCullFace(GL_CCW);

It is like enabling a lot of things in OGL. For example, to enable alpha testing, you first glEnable(GL_BLEND), then you specify the blend function with glBlendFunc(GL_ONE, GL_ONE).

Share this post


Link to post
Share on other sites
To expand...

glEnable(GL_CULL_FACE) enables directional face culling.
glCullFace(...) sets the direction of faces to cull. Face culling must be enabled before this has any effect.

Share this post


Link to post
Share on other sites