iDevGames Forums
CullFace for a particular set of drawing comands - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Graphics & Audio Programming (/forum-9.html)
+--- Thread: CullFace for a particular set of drawing comands (/thread-7073.html)



CullFace for a particular set of drawing comands - designdb - May 21, 2003 08:30 PM

Is there any way to turn off culling in OpenGL for the drawing of a particular set of drawing commands?

I'm working on a 3D terrain generation system and am ready to add some obstacles. So, I thought I'd start with some trees. I thought I'd go with a couple of intersecting triangles and see how it looked. The question is, if I make a tree out of (effectively) 2 triangles, do I actually need to draw 4 if Back face culling is enabled?

Thanks in advance

James Ramsey


CullFace for a particular set of drawing comands - OneSadCookie - May 21, 2003 08:35 PM

You can call glDisable(GL_CULL_FACE) draw your tree and then glEnable(GL_CULL_FACE), but really, you're probably better off drawing four triangles.


CullFace for a particular set of drawing comands - designdb - May 21, 2003 08:53 PM

Thanks, I figured as much. I've already got a rude version of the 4 triangles set up, but if the overhead wasn't too much, I was thinking about doing it with 2. My development machine "ain't all that", so I've been keeping close track of my polys.