The best source for portal rendering I could find came from those flipcode articles. Now I want to know how to do portal rendering with OpenGL. I can use occlusion query and the stencil buffer to do the same thing but, I don't fully know how to implement it with OpenGL yet. I am not making teleporting portals. The portals are used to control what part of the map is rendered. Occlusion query for portal visibility and the stencil buffer renders only what is viewable inside the portal. I am searching for how to use occlusion query for portal rendering.
Can occlusion query be used with complex polygon shapes?
Is there a tutorial for using occlusion query and the stencil buffer to do portal rendering?