Advertisement

A question about DWORDs and WORDs...

Started by August 17, 2001 11:44 AM
10 comments, last by Moe 23 years, 6 months ago
You can even save yourself the trouble of figuring out the bitshifts on your own by using some handy macros that are supplied by DirectX 8.

D3DCOLOR_XRGB(r, g, b) will give you a DWORD with the correct red, green, and blue values and opaque alpha (0xff).

D3DCOLOR_ARGB(alpha, r, g, b) will do basically the same thing, but also set the alpha value that you specify. These macros can save you a lot of excess typing as well as compacting down all that color stuff to just one little line
Well I''ll be darned! Thanks for that! That should make my per particle blending much easier to do.

This topic is closed to new replies.

Advertisement