Archived

This topic is now archived and is closed to further replies.

Crazy colour!?!?

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

Hi! I have a problem which is driving me crazy at the moment. I initialize my DirectX device with D3DFMT_A8R8G8B8 pixel format. When I want to draw a pixel on the surface i use following macro: #define RGB32BIT(a,r,g,b) ((a<<24) | (r<<16) | (g<<8) | b) So when I set the colour of a pixel i got following problem: RGB32BIT(anyValue, 0,0,255) gives blue pixels (what seems correct:-)) RGB32BIT(anyValue, 0,255,0) gives green pixels (what seems correct:-)) RGB32BIT(anyValue, 255,0,0) gives BLACK!!!! pixels Am i crazy or just stupid? Thanky for your help? The Wild Wild West - Desperado!

Share this post


Link to post
Share on other sites
Nope, I just worked it out the other values would be different.

The only thing I can thing of is you are blitting over a black background with an alpha of 255 (or near), or there is something else wrong with your code.

Beats me.

,Jay

Share this post


Link to post
Share on other sites