Why do all the textures I load for billboards appear upside down. Everything from the gun to trees, everything loads upside down.
why?
Upside Down
I'm currently loading a BMP/JPG texture and giving it to a billboard and its ending up upside-down as well. Any clue? (Been a while since I programmed Irr..)
EDIT: they seem not only to be upside-down, but rightside-left as well..
Code: Select all
bool restore1 = m_driver->getTextureCreationFlag(irr::video::ETCF_OPTIMIZED_FOR_QUALITY);
bool restore2 = m_driver->getTextureCreationFlag(irr::video::ETCF_CREATE_MIP_MAPS);
m_driver->setTextureCreationFlag(irr::video::ETCF_OPTIMIZED_FOR_QUALITY, true);
m_driver->setTextureCreationFlag(irr::video::ETCF_CREATE_MIP_MAPS, false);
txrSplashLogo = m_env->getVideoDriver()->getTexture("./data/greenlights_L.bmp");
m_driver->setTextureCreationFlag(irr::video::ETCF_OPTIMIZED_FOR_QUALITY, restore1); //make sure this game state doesnt change flag permanently
m_driver->setTextureCreationFlag(irr::video::ETCF_CREATE_MIP_MAPS, restore2); //make sure this game state doesnt change flag permanently
m_billboardBG = m_smgr->addBillboardSceneNode( m_smgr->getRootSceneNode() );
m_billboardBG->setMaterialTexture(0, txrSplashLogo);
m_billboardBG->setSize(IRRDim2Df( (float32)m_driver->getScreenSize().Width, (float32)m_driver->getScreenSize().Height ));
m_billboardBG->setPosition(IRRVector3Df(0, 0, 1000));
m_billboardBG->setMaterialFlag(irr::video::EMF_LIGHTING, false);
m_smgr->addCameraSceneNode(0);
a screen cap is worth 0x100000 DWORDS