Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

oooaah

Alpha Blending?

This topic is 5859 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I think what I''m trying to do is called alpha blending. What I want is a background bitmap with a slightly transparent box over part of it. This semi-transparent box will serve as a background for text. This way the box will make the text stand out from the bitmap but won''t look too harsh against the bitmap if it was a pure colour. As I might want different sizes of transparent boxes throughout the program I want a method which will enable me to create these boxes to the required size at run time. Any ideas? The early bird may catch the worm but the second mouse gets the cheese.

Share this post


Link to post
Share on other sites
Advertisement
Using DirectX 7.0 and C++.

The early bird may catch the worm but the second mouse gets the cheese.

Share this post


Link to post
Share on other sites
Yes its called alpha blending, if your using directdraw, then your going to have to code it yoursef, by locking the area of the background where the box is, saving all the rgb information of the pixels that are in theat area and and then mix those colors with the pixels of the box, it may take some time to get it right. If your using D3D then you dont need to do it yourself.

PS- it may slow if down quite a bit, but if its for text boxes, which arnt displayed throughout the game I dont think it will slow down that much

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!