PDA

View Full Version : Portals in OpenGL



zedus
01-18-2002, 01:40 PM
I would like to create "complex shaped" portals. I understand that I should use an image with alpha values which describes what parts of the image can be see through and use the stencil buffer to only draw the ones with the currect alpha value (1.f)
my question is - how do I do this in OpenGL?

Damon
01-18-2002, 01:51 PM
Originally posted by zedus:
I would like to create "complex shaped" portals. I understand that I should use an image with alpha values which describes what parts of the image can be see through and use the stencil buffer to only draw the ones with the currect alpha value (1.f)
my question is - how do I do this in OpenGL?

Do a search of this site for 'alpha' or 'transparency'. Or, as this is a frequently asked question...
http://www.opengl.org/developers/faqs/technical/transparency.htm

[This message has been edited by Damon (edited 01-18-2002).]

zedus
01-18-2002, 02:10 PM
I know how to do alpha testing, my question is how do I add it to the stencil buffer.
I clip the objects that are entirly not visible through the portal, I wanna use this alpha testing + stencil buffer to draw objects are partialy or totaly visible through the portal.
(So that my portal woudln't appear to be just a simple Triange or Quad, i want it to appear as a circle)