PDA

View Full Version : Transparency and 2d pixmaps overlayed



dodgyposse
09-12-2000, 02:53 AM
I am trying to overlay some bitmaps onto my
3d models, for the user interface in a game I am writing.

Basically, I have a bitmap representing a control panel, and it is non transparent.

I also have a mouse pointer bmp, and it is transparent.

I draw my shapes, then overlay the menu onto it and finally draw the mouse pointer over the whole thing.

I am getting a weird effect. The mouse pointer is transparent when over the 3d objects (fine), but when it passes over the menu I can see the 3d objects through the menu ( not fine ).

I suspect the depth buffer is meddling with my program????

I can email my bitmap class, if anyone would
care to assist.

Thanks!
dd

Don't Disturb
09-12-2000, 05:42 AM
disable the z buffer before you draw the interface
glDisable(GL_DEPTH_TEST);

then draw the control panel, and then the mouse pointer.