SamplePbs_Materials failure (no codec for tga)
-
- Halfling
- Posts: 48
- Joined: Wed Sep 05, 2018 3:18 pm
SamplePbs_Materials failure (no codec for tga)
I"m attempting to run SamplePbs_Materials and I'm seeing an exception occur because there is no .tga codec in msMapCodecs when it tries to process "Rocks_Diffuse.tga".
I don't see in the code what is responsible for setting up the codecs for such common graphics formats. Could i get some guidance on what is missing?
I don't see in the code what is responsible for setting up the codecs for such common graphics formats. Could i get some guidance on what is missing?
- dark_sylinc
- OGRE Team Member
- Posts: 5296
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1278
- Contact:
Re: SamplePbs_Materials failure (no codec for tga)
Hi!
It would seem that Ogre was built without FreeImage codec nor the STBI codec.
Check in CMake that OGRE_CONFIG_ENABLE_FREEIMAGE is enabled.
If it doesn't even appear, then probably CMake failed to find the CMake library (FreeImage_INCLUDE_DIR, FreeImage_LIBRARY_DBG, and/or FreeImage_LIBRARY_REL are not set).
See Setting Up Ogre to properly setup the Dependencies from Ogredeps.
Cheers.
It would seem that Ogre was built without FreeImage codec nor the STBI codec.
Check in CMake that OGRE_CONFIG_ENABLE_FREEIMAGE is enabled.
If it doesn't even appear, then probably CMake failed to find the CMake library (FreeImage_INCLUDE_DIR, FreeImage_LIBRARY_DBG, and/or FreeImage_LIBRARY_REL are not set).
See Setting Up Ogre to properly setup the Dependencies from Ogredeps.
Cheers.
-
- Halfling
- Posts: 48
- Joined: Wed Sep 05, 2018 3:18 pm
Re: SamplePbs_Materials failure (no codec for tga)
OGRE_CONFIG_ENABLE_FREEIMAGE does not appear in the cmake config window. in fact, nothing in the lists contains " FreeImage"
-
- Halfling
- Posts: 48
- Joined: Wed Sep 05, 2018 3:18 pm
Re: SamplePbs_Materials failure (no codec for tga)
I am seeing #define OGRE_NO_FREEIMAGE 1 in the header.
- dark_sylinc
- OGRE Team Member
- Posts: 5296
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1278
- Contact:
Re: SamplePbs_Materials failure (no codec for tga)
Then see how to setup the dependencies.
Important Note: The instructions indicate to clone ogredeps into OgreRoot/Dependencies. However this causes trouble in some machines! The online instructions need to be updated.
Clone ogredeps somewhere else (e.g C:\MyOgreDeps) and the result of its build (i.e. C:\MyOgreDeps\build) just copy it into OgreRoot\Dependencies.
If properly setup, after doing the procedure, the following files should exists:
Cheers
Matias
Important Note: The instructions indicate to clone ogredeps into OgreRoot/Dependencies. However this causes trouble in some machines! The online instructions need to be updated.
Clone ogredeps somewhere else (e.g C:\MyOgreDeps) and the result of its build (i.e. C:\MyOgreDeps\build) just copy it into OgreRoot\Dependencies.
If properly setup, after doing the procedure, the following files should exists:
- OgreRoot/Dependencies/include/FreeImage.h
- OgreRoot/Dependencies/lib/libFreeImage.a (Linux)
- OgreRoot/Dependencies/lib/Debug/FreeImage_d.lib (Windows)
- OgreRoot/Dependencies/lib/Release/FreeImage.lib (Windows)
Cheers
Matias
-
- Halfling
- Posts: 48
- Joined: Wed Sep 05, 2018 3:18 pm
Re: SamplePbs_Materials failure (no codec for tga)
thanks. I'll figure it out now that I have a clue what is happening