nochmal hi leute,
habe wieder ein problem. ich möchte ein bild in irrlicht einladen. sieht do aus:
wenn ich das bild aber geladen habe stellt mir irrlicht das so dar:
ich poste mal meinen offenbar fehlerhaften code mit hoch. ich finds im mom nicht vllt kann mir ja da jemand auf die sprümge helfen.
Das bild hat die auflösung von 80x80 pixel. und die koordinaten x und y sind jeweils vielfache von 80, sodass ich wie eine arte kachlung habe. Also wenn ich im interval(x, y) von 80 bis 160 klicke wird mir das bild auf den koordinaten 80, 80 abgebildet.
danke
Code:
static ITexture* tex = device->getVideoDriver()->getTexture("frame.bmp");
device->getVideoDriver()->makeColorKeyTexture(tex, position2d<s32>(32, 40));
static IGUIElement* image = device->getGUIEnvironment()->addImage(tex, position2d<s32>(x, y));
image->setRelativePosition(rect<s32>(x, y, x + 80, y + 80));
_________________

Irrlicht - From Noob To Pro A Guideline
--
Sonstige Projekte, Blog :
http://www.rpdev.net