Jump to content
  • Advertisement
Sign in to follow this  

transparence box?

This topic is 4671 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 GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!