PDA

View Full Version : overlaying transparent and non transparent bitmaps



dodgyposse
09-12-2000, 05:05 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

DPalomo
09-13-2000, 01:35 AM
It really sounds as if you first render the scene, then your mouse pointer and as last the command menu.

Because the mouse-cursor (I suppose)uses blending, it is blended with the background as given (with only the scenery and not the menu).

So the solution would be to render the mouse pointer as last.


Hope this helps,

Daniel Palomo van Es