Archived

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

WildWest

Crazy colour!?!?

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
I have it!

My macro for converting the ARGB format is correct, i just copied a long to a short value!!!!!!

I am stupid!!!



The Wild Wild West - Desperado!

Share this post


Link to post
Share on other sites