Lets say I want to create the color blue. I declare it as such:
DWORD color = D3DCOLOR_XRGB( 0, 0, 255 );
But what if, later in the program, I want to change the color to red? Do I have to redeclare 'color', like this?
color = D3DCOLOR_XRGB( 255, 0, 0 );
What I'm asking is, are there ways of accessing the individual r, g, and b values of a Direct3D color? For example, is there any way to do something like this:
color.r = 255; color.b = 0;
Or would I have to manually set up 3 separate variables to hold the rgb values, like this:
short r = 0, g = 0, b = 255;
DWORD color = D3DCOLOR( r, g, b );