Upside Down

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
skajake
Posts: 9
Joined: Sun Sep 12, 2004 6:26 pm

Upside Down

Post by skajake »

Why do all the textures I load for billboards appear upside down. Everything from the gun to trees, everything loads upside down.

why?
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

it's a bug in the tga loader

try converting your files to bmp or jpg and reloading them.

the tga loader is still a work in progress
Image
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

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..)

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);

EDIT: they seem not only to be upside-down, but rightside-left as well..
a screen cap is worth 0x100000 DWORDS
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

*bump*
a screen cap is worth 0x100000 DWORDS
Post Reply