View Full Version : object moving aroung a masked bitmap

01-14-2003, 05:33 AM
I want to display a masked bitmap somewhere in 3D space and I have a 3D object moving around it (just like planets around the Sun). I tried the NeHe tutorial about masking, but it didn't help me with this problem.
My problem is when I use GL_DEPTH_TEST I get bad results. If I disable it, it works correctly with masking, but the 3D object isn't masked when it comes behind the bitmap.
Should I calculate the distance between the viewer and the masked bitmap and do the same with the object and display them according to the distance or can opengl do it for me with GL_DEPTH_TEST?

01-14-2003, 08:08 AM
You mean, you want your bitmap to have holes, so that planets can be seen through that?
If so use GL_ALPHA_TEST.

[This message has been edited by MickeyMouse (edited 01-14-2003).]