glFrustum & Portal clipping?

Started by
2 comments, last by bobason456 18 years, 8 months ago
Probably getting a little ahead of my self here. Working up my portal engine at the moment and thought I would use glFrustum to clip portals. So how then can I tell if a polygon (portal) is clipped completely off the screen? I'm guessing if it is possible it's probably slow because you have to suck this info down the render pipe line, and that could be on the GPU. In that case I would have to create my own Frustum and clip all polygons in code (on CPU), and in doing so lose any GPU matrix hardware acceleration. Could some one please offer some thoughts on this. Thanks
Advertisement
Just thinking out loud, but ARB_occlusion_query might work.
I'm not really sure what you are asking.. you can test the portal against the frustum and if it is not in the frustum you can ignore it. If it is in the frustum you have to recurse into it. GPU doesn't understand that a portal is different than a face (and portals aren't usually visible right?).

How do you accelerate portals on a GPU? That is something new to me.


"It's such a useful tool for living in the city!"
Wow, "test the portal against the frustum" good idea.

My question my have been misinformed because I don’t know where GL does frustum culling. If it is able to do it on the GPU then it will surly be faster then culling with a soft frustum.

If then I could send portal polygons to the GPU to be culled and test it that polygon had been culled then I would surly not recurse into it. But I'm thinking from your response that this is not possible.

So my strategy would be then to use a soft frustum that is the same as the GLfrustum. Clip portals to the soft frustum, and send all other polygons direct to the card.

This topic is closed to new replies.

Advertisement