FreeImage_Save

Problems building or running the engine, queries about how to use features etc.
Post Reply
User avatar
ENGine
Goblin
Posts: 266
Joined: Fri Jan 27, 2006 9:13 pm
Location: Belarus
x 2
Contact:

FreeImage_Save

Post by ENGine »

Hi, all.

Try to use this fragment code to iOS platform:

Code: Select all

		renderTarget->writeContentsToFile(tempdir + fileNamePNG);

		//Load the render into the appropriate texture view
		texture = TextureManager::getSingleton().load(fileNamePNG, Ogre::ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME, TEX_TYPE_2D, MIP_UNLIMITED);
There are few errors and crash:

Code: Select all

FreeImage error: 'FreeImage_Save: failed to open file Impostor.IQCLEEIOPODAADCBVBPEBKJLVYBKWYTZ.128.png' when loading format PNG
libc++abi.dylib: terminating with uncaught exception of type Ogre::FileNotFoundException: OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resource Impostor.IQCLEEIOPODAADCBVBPEBKJLVYBKWYTZ.128.png in resource group Autodetect or any other group. in ResourceGroupManager::openResource at /Volumes/Soft/Soft/Ogre3d/1.9/SourceCodes/v1.9/OgreMain/src/OgreResourceGroupManager.cpp (line 756)
Is it possible to adapt for iOS? Thanks.
User avatar
ENGine
Goblin
Posts: 266
Joined: Fri Jan 27, 2006 9:13 pm
Location: Belarus
x 2
Contact:

Re: FreeImage_Save

Post by ENGine »

Sorry,

I forgot with tempdir... Fixed it: tempdir = Ogre::macBundlePath() + path. Now it works
Post Reply