Sign in to follow this  

Colorkeys ?

This topic is 3973 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 all, I'm hoping somebody can help me, I'm trying to load a texture to be displayed as a sprite. So far everything is working ok, and I have set 1 colour as the alpha colour (0xFF0099). Can anybody tell me, or give me a link, how to set more than 1 alpha colour per texture. I have read about colourkeys, but i think they were only in directdraw. the function i'm using at the minute works, and is texture = TextureLoader.FromFile(dev, fileName, width * 2, height, 0, Usage.None, Format.A8R8G8B8, Pool.Managed, Filter.None, Filter.None, (int)0xFF0099); As you can see, the alpha colour is the last parameter, which is an int32. Thanks in advance Lintford

Share this post


Link to post
Share on other sites
I'm not familiar with the managed stuff (which is looks like perhaps you're using) but I usually just load it from an image that supports per-pixel alpha, such as TGA or PNG, nothing really special there.

Share this post


Link to post
Share on other sites
Thanks rompa,

you're right, I totally forgot about using an alpha colour in the actual bitmap.
Thanks for your help.

oh, and it is managed DirectX that I am using - just an FYI :)


-Lintford

Share this post


Link to post
Share on other sites
Sign in to follow this