This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Colorkey in DirectDraw mobile


Colorkey in DirectDraw mobile

Postby Cardinal » Jul 13, 2007 @ 10:28pm

So I'm having some problems that maybe one of you has seen.

Essentially, it seems that setting a source color key for a surface to anything other than black doesn't work! I have a surface with magenta as the color to be keyed out, if I called SetColorKey on the surface and set the low and high range to 0xff00ff and then when blitting use the DDBLT_KEYSRC flag... the magenta doesn't get keyed out... but if I set the magenta to black and the color key to black, it works no problem!

Even the sample donuts game that comes with the DirectX SDK uses black as a color key!

Anybody else have this problem!?
Cardinal
pm Member
 
Posts: 53
Joined: Feb 6, 2006 @ 5:39am
Location: Ottawa, Ontario


Postby Dan East » Jul 14, 2007 @ 12:12am

This is complete speculation on my part, but if the textures are converted to a different color depth when they are loaded, then they may not have the exact color values they had originally.

Same with the color key itself. Try querying the color key value after you set it and see what you get back.

Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby Cardinal » Jul 14, 2007 @ 5:12pm

HHmmm yes that is a possibility. The color is set with a 32-bit value though... I'll have to fidget with it a little...

Good thinking!
Cardinal
pm Member
 
Posts: 53
Joined: Feb 6, 2006 @ 5:39am
Location: Ottawa, Ontario


Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron