Sign in to follow this  
acrilige

DirectDraw RGB Problem (Andre Lamoth sources)

Recommended Posts

acrilige    101
Hi all!


I have a problem with Andre Lamoth sources (based on directdraw, directx7):
wrong colors displayed.


.exe running at windows xp (virtualbox installed at windows 7, cause windows 7 doesn't support dx7), compiled in vs2008

videocard Radeon.


For example, i set triangle color like this

[code]poly1.color = _RGB16BIT565(0, 255, 0);[/code]


Looks like it must be green, but see attachement.


_RGB16BIT565 (tried two variants):

[code]#define _RGB16BIT565(r,g,b) ((b & 31) + ((g & 63) << 5) + ((r & 31) << 11))
#define _RGB16BIT565(r,g,b) (((b & 0xF8) >> 3) + ((g & 0xFC) << 3) + ((r & 0xF8) << 8)[/code]

In what may be a problem?

Thank you.

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