2d bmp color key issues

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Guest

2d bmp color key issues

Post by Guest »

Hey,
I'm working on a very basic 2d fighting game based off of a friends web comic. I'm using bitmaps and using Irrlicht's color key texture call to make one color transparent. But the problem is, Irrlicht is not only making that color transparent but all black colors transparent as well. Also the textures that I load are very pixelated as though they have been resized-- though they have not been. I think it has something to do with my bitmaps because I can load the 2ddemo.bmp from Irrlicht's media file just fine using my code. Appreciate any help on this, thanks.
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Try to resize the bitmaps to a power of two size. (e.g. 128,256,512,...) This should help.
Guest

Post by Guest »

Thanks.

I actually figured that out after a little playing around. As for the transparency problem I found out it was because I was loading and making a color key texture of the same image file twice. So basically I was turning the intended transparent color black then making black the transparent color. This meant that all the black in my image was transparent.

I'm writing a sprite manager for my game to prevent any image file being loaded twice.
Post Reply