masking help
i have a cylinder with a rod sticking out of it. the cylinder has a texture on it with a logo and the logo is masked by drawing another cylinder with a mask behind it therefore making the cylinder transparent and the logo not.
the problem: i draw the rod first and then the texture mapped cylinder, but it always appears that the rod it behind the cylinder no matter how close i bring the rod on the z-axis. how do i make the rod look like its inside of the cylinder? thx in advance
-jc
Since nobody else has answered your question, I''ll give it a try...
Sounds like the depth test is turned off. If you don''t want to turn it on for the cylinder, try drawing the cylinder first, then turn on the depth test and finally draw the rod.
Another option is to use an RGBA image for the logo and the glAlphaTest() function, and have the depth test turned on while drawing both objects in any order.
Haven''t played around much with this myself, so anybody, correct me if I''m wrong.
Sounds like the depth test is turned off. If you don''t want to turn it on for the cylinder, try drawing the cylinder first, then turn on the depth test and finally draw the rod.
Another option is to use an RGBA image for the logo and the glAlphaTest() function, and have the depth test turned on while drawing both objects in any order.
Haven''t played around much with this myself, so anybody, correct me if I''m wrong.
Alpha testing would be the best way yes. And you don''t need masking anymore.
There seem to be a *lot* of masking/alpha testing questions on the forum lately. Maybe it''s time someone wrote a tutorial on alpha testing. Maybe I will if I have some spare time
- An eye for an eye will make the world go blind -
There seem to be a *lot* of masking/alpha testing questions on the forum lately. Maybe it''s time someone wrote a tutorial on alpha testing. Maybe I will if I have some spare time

- An eye for an eye will make the world go blind -
<hr />
Sander Marechal<small>[Lone Wolves][Hearts for GNOME][E-mail][Forum FAQ]</small>
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement