CullFace for a particular set of drawing comands

designdb
Unregistered
 
Post: #1
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
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
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.
Quote this message in a reply
designdb
Unregistered
 
Post: #3
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.
Quote this message in a reply
Post Reply