face culling problem in opengl

Started by
3 comments, last by Grain 18 years, 10 months ago
if i have doing back face culling in my engine,how to tell opengl to only draw front face of the polygon
Advertisement
glEnable(GL_CULL_FACE);
glCullFace(GL_BACK);
i don't mean ask ogl to do the culling, i mean i've known which face of the polygon should be drawn before sending it down to the rendering pipeline, but how to tell ogl this information
1. Unless you've got a really good reason, then let opengl do the culling for you, it'll be much faster.

2. If you know something isn't visible, don't draw it. :P

3. If you're really insistant, you could just turn off culling and opengl will draw everything you pass it.
Oh.

Well then simply don’t send the culled faces to OpenGL. It can't draw them if you don't send them.



How are you rendering? Immediate mode, Vertex arrays, VBO's ?

This topic is closed to new replies.

Advertisement