Jump to content
  • Advertisement


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


Clearing a surface with alpha bit

This topic is 6095 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

Is there anyway to use the ->Clear command to specify the alpha bit for the clear? Normally the clear would be like (0,0,0,255) (completely black and opaque), but I have an instance where I want to make the black 50% transparent... Like (0,0,0,128)... The reason is I want to use a Rendering Target. I want to specify a texture as a rendering target, draw to that texture some text. Then draw that texture to the main viewport... I can do this easily enough, but texture''s background is not coming through transparent. It''s coming in completely black. I can''t really add in alpha material because that makes the text on the texture transparent too, but I want that text completely opaque with just the black background transparent. Do you see what I''m shooting for? I''m thinking the clear command doesn''t support alpha-bits that somewhere in DX8, the clear command is hard-coded to have the alpha bit 255 with the clear command. Is there anyway to bypass this problem?

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!