PDA

View Full Version : How can I enable culling for each of the viewport



diskhub
05-10-2011, 01:44 AM
I have mulitple viewport.
One is perspective view and the other is top view.

When i enable back face culling by doing
glEnable(GL_CULL_FACE);
glCullFace(GL_BACK);

my top view will become weird, with the top of a pillar gone (meaning i can see the portion of the floor which is supposed to be blocked by the top of the pillar.

How can I enable culling for each of the viewport?

Coconut
05-10-2011, 03:14 AM
If all viewports are in the same context, you should only need do it once. You may want to share a bitmap what you are seeing.