Images are distorted!
Posted: Wed Jun 29, 2005 3:31 pm
I just got the crosshair code working, but if I use a BMP with any other color than black and white, the crosshair comes out looking distorted in Irrlicht. It also does this with my logo BMP, but I took that out for now.
Anyway, I have this crosshair picture:
NOTE: I converted the image to GIF becuase Phpbb wouldn't let me post a bmp image. But the actual crosshair is a BMP in the game... if that makes any difference.
And this is what it looks like in the game:
This is the code I am using for the crosshair:
But it looks fine if I use a crosshair with black and white only. Any ideas?
Anyway, I have this crosshair picture:
NOTE: I converted the image to GIF becuase Phpbb wouldn't let me post a bmp image. But the actual crosshair is a BMP in the game... if that makes any difference.
And this is what it looks like in the game:
This is the code I am using for the crosshair:
Code: Select all
(AFTER "gui::IGUIEnvironment* env = device->getGUIEnvironment();")
video::ITexture* crosshair = driver->getTexture("crosshair.bmp");
driver->makeColorKeyTexture(crosshair, core::position2d<s32>(0,0));
(AFTER "env->drawAll();")
driver->draw2DImage(crosshair, core::position2d<s32>(640/2-23,480/2-23),core::rect<s32>(0,0,23,23), 0, video::SColor(255,255,255,255), true);