Advertisement Jump to content
Sign in to follow this  

transparence box?

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

You must use a vertex format like this one:


typedef struct tagCUSTOMVERTEX{
DWORD Color;

you can put the color by calling the D3DCOLOR_ARGB(a, r, g, b) macro:

//Position | Normal | Color
{-1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, D3DCOLOR_ARGB(144, 255, 25, 5),},
by changing the value of the <<a>> param you change the transparency of the

set the D3DRS_ALPHABLENDENABLE render state to true
set the D3DRS_SRCBLEND render state to D3DBLEND_ something (look at the SDK).
set the D3DRS_DESTBLEND render state to D3DBLEND_something(like above).

i dont know if you got it but it's prety simple
look at the DirectX SDK.

by the way i'm not so sure that thats the way.
Give it a try.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!