Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / 3D Theory & Graphics / opengl portal engine Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
GroovNinja/ANUBIS-tech

July 15, 1999, 12:26 PM

Hi!

Could someone give me advice on how to implement a portal engine using a high level api like
Opengl?
Specifically i don't know how to clip the polygons in each sector to the portal polygon when
rendering the sectors through a portal.
I have seen a lot of code that does it using span buffers but i'm sure it must be possible
using OpenGL (or even d3d *blergh*) only.

any help would be muchly appreaciated.

GroovNinja/ANUBIS-tech

 
Kurt Miller

July 15, 1999, 03:04 PM



GroovNinja/ANUBIS-tech wrote:
>>Could someone give me advice on how to implement a portal engine using a high level api like
>>Opengl? Specifically i don't know how to clip the polygons in each sector to the portal polygon when
>>rendering the sectors through a portal.
>>I have seen a lot of code that does it using span buffers but i'm sure it must be possible
>>using OpenGL (or even d3d *blergh*) only.

A common solution for hardware-rendering portal engines would be to build
a new clipping volume from the portal polygon's edges. Each edge would
become one plane in this new frustum (with the planes' normals pointing either
all in or all out). Once you have that collection of planes, you can clip the
polygons in the next sector using conventional 3d clipping techniques (such
as sutherland-hodgeman) to the planes. The result will be a set of
clipped polygons that you can send to the hardware (api doesn't matter).

Hope that helps...

Kurt Miller (Psykic)
http://www.flipcode.com



 
GroovNinja

July 16, 1999, 02:55 AM

ahh! thanx a lot man. That clears it up nicely =]




 
This thread contains 3 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.