Advertisement

Transparent windows on walls

Started by January 14, 2003 03:26 AM
0 comments, last by Victhebeginner 22 years, 1 month ago
How can I make parts of my wall (2 quads -> it has thickness) transparent. The problem is that I don''t know at coding time where to place and what size of window(s) on my wall. So the user gives the data to the program at runtime, so I think alpha channel can''t be used, I can''t store the place of the windows in the wall texture files. Another solution would be to subtract a prism (the window) from a bigger prism (wall) but I don''t know if this is supported by OpenGL. Please help me! If you can help, please write a short (at least) pseudo-code what the order of operations should be and what functions should I use or if you know a place on the Internet when should I get more info on the topic, tell me! Vic
From what i can understand from you description you want to place a transparent window somewhere on a quad.

use a stencil map.

draw the window(or rather the cliping polygons) to the stencil buffer.
Draw the window inside that area
and draw the wall outside that area

This topic is closed to new replies.

Advertisement