Code: Select all
ITexture* image_meter = driver->getTexture("media/2D/speedometer_base.png");
ITexture* image_needle = driver->getTexture("media/2D/speedometer_arrow.png");material.MaterialType = irr::video::EMT_TRANSPARENT_ALPHA_CHANNEL;
driver->setTransform(irr::video::ETS_VIEW,irr::core::matrix4());
driver->setTransform(irr::video::ETS_PROJECTION,irr::core::matrix4());
driver->setMaterial(material);
driver->draw2DImage(image_meter,vector2d<s32>(RX/1.15,RY/1.2),rect<s32>(0,0,image_meter->getSize().Width/2,image_meter->getSize().Height/2),0,SColor(255,255,255,255),true);
driver->draw2DImage(image_needle,vector2d<s32>(RX/1.15,RY/1.2),rect<s32>(0,0,image_needle->getSize().Width/2,image_needle->getSize().Height/2),0,SColor(255,255,255,255),true);