Sign in to follow this  
LintfordPickle

Colorkeys ?

Recommended Posts

LintfordPickle    141
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
Rompa    307
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
LintfordPickle    141
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

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