Archived

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

Polygon culling

This topic is 6018 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anyone know if OpenGL will do automatic polygon culling, or is it up to the programmer to do it. WHat I mean by polygon culling is that I obviously do not want to draw polygons that are not in front of me. If I make a house object, and it is straight behind me, I obvioulsy don''t want OpenGL to draw a single pixel of it. I am assuming it is up to the programmer to deal with those issues, but you never know.

Share this post


Link to post
Share on other sites
yes, it can cull faces. you have to make sure all of your polygons are specified in counter clock wise order or all vise-a-versa for it to work. if your going counterclockwise, then call
glCullFace(GL_CCW), if you going clockwise, call glCullFace(GL_CW)
enable culling with glEnable(GL_CULLING)
then start culling with glCullFace(GL_BACK) other parameters include GL_FRONT and GL_FRONT_AND_BACK.

HHSDrum@yahoo.com
Polarisoft Home Page

Share this post


Link to post
Share on other sites