Skip to main content
gamedev.net
🔒 Locked

clear background

Started by quadrafuzz Aug 17, 2001 at 3:36 PM 8 replies 350+ views
Original Post
quadrafuzz
quadrafuzz
I''m sorta new to directx programming but have successfully programmed pong and a few other lame games. However with my newest, I want to be able to display a bitmap on the desktop, with no colored background behind the bitmap. Essentially, I want the bitmap to be able to move around on the desktop. Can this be done, and if so, how using directx programming? Any help is appreciated. quad
fredjordans
fredjordans
What you''d probably want to do is create a Windowed application the size of your bitmap, and then fill the entire window with the bitmap you want to display. Sorry, no code, I''m also a newbie
Fred
-eat me!-but i''m not a cannibal!
Torn Space
Torn Space
What you want is an Overlay. Check the SDK example, I think it''s also called Overlay.

-M
Mman
Mman
I think what he means is transparency, If you are using DX 7 with Visual Basic then do this: Let "Tex1" represent your texture. Now type
Tex1.setdecaltransparency D_TRUE
Tex1.setdecaltransparencyColor 0 ''this sets every area of the picture with the color BLACK to be transparent.

Hope this helps.
quadrafuzz
quadrafuzz
Thanks guys, in response to that last post, I''m using Visual C++ 6.0, not basic. Do you have to code that will work to do that transparency with C++ 6?
fredjordans
fredjordans
I don''t know exactly waht you mean by a texture... If you mean a surface, then I didn''t know that you can make a primary surface transparent. If you just mean a bitmap or some other image, then making certain color transparent will just let you see the primary surface.
-eat me!-but i''m not a cannibal!
quadrafuzz
quadrafuzz
yeah, that''s what I mean, I want the primary surface to be transparent so that the desktop shows while the game is running. Any ideas?

quad
Jasun220
Jasun220
Just do it like most of the screen savers do it... take a screen shot of the desktop, and just render that under everything else.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.