Jump to content
  • Advertisement


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


colorkeys in ddraw

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

just wondering, I blitted a picture in ddraw on one computer where I sat the colorkey to RGB(255,0,255) and it worked fine the comp was running under win 98 then I tested to do the same thing on a computer running under win ME and now it didn''t skip all the pixels with RGB(255,0,255) how can that be? both computers had directx 8 and that should guarantee the result to be the same independantly of what videocard you have, shouldn''t it also the pictures was different, more blurred anyone can explain what''s going on thanks

Share this post

Link to post
Share on other sites
Guest Anonymous Poster
Either ME or your program sucks...

Share this post

Link to post
Share on other sites
Well i'm gonna assume you're using 16-bit color, you have an older video card in the computer with win98 and a newer one in the one with ME. if so, then depending on how old the videom card is, it either stores colors in 16 bit or 15 bit.

it all starts from not being able to divide 16 by three.

in 15 bit each channel(red, green, and blue) has 5 bits of accuracy. One bit isn''t used.

in 16 bit the green channel gets that un used bit.

to get the color for your transparency load the bitmap into memory and the lock the surface. Get the color of the top left pixel and you have the device independent transparency color.

After going back and reading your guestion i see that you don't even use the green channel so i really have no idea why its doing that but try the lock to see what happens and post back.

Edited by - KlePt0 on April 23, 2001 10:32:12 AM

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!