Sign in to follow this  
dxdotnet1

extracting color values from D3DCOLOR(DWORD)

Recommended Posts

D3DCOLOR format is ARGB, so you'd do something like this:

// assume color is a D3DCOLOR variable
BYTE a = color >> 24;
BYTE r = (color >> 16) & 0xFF;
BYTE g = (color >> 8 ) & 0xFF;
BYTE b = color & 0xFF;

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this