Page 1 of 1
CEGUI 0.7 and DDS images
Posted: Wed Dec 02, 2009 20:51
by jaguillard
Since moving to using CEGUI 0.7, CEGUI is throwing exceptions on DDS format images using SILLY. I could have the artist just change all of them to .tga, but I'd rather see if there is a way around doing an asset swap. Anyone having any suggestions as to how I can keep my DDS images working with CEGUI?
Re: CEGUI 0.7 and DDS images
Posted: Thu Dec 03, 2009 09:42
by CrazyEddie
SILLY can't load DDS format files - it only loads things like jpeg, tga and png. This means that previously you were not using SILLY, which means you're now not initialising the system correctly. If you're an Ogre or Irrlicht user you should investigate the appropriate boostrapSystem function(s) since these will use an ImageCodec that integrates with the target engine as opposed to the separate codecs (such as SILLY).
CE.
Re: CEGUI 0.7 and DDS images
Posted: Thu Dec 03, 2009 15:26
by jaguillard
This is the init I have:
Code: Select all
// Init CEGUI member variables
mRenderer = &CEGUI::OgreRenderer::create();
mSystem = &CEGUI::System::create(*mRenderer, 0, 0, 0, 0, "ceguiConfig.cfg");
if(!mRenderer || !mSystem)
return false;
// Create the scheme and layouts for CEGUI
CEGUI::SchemeManager::getSingletonPtr()->create("GUI.scheme");
CEGUI::ImagesetManager::getSingletonPtr()->createFromImageFile("GUITitle", "title.dds", "Textures");
And yes, I am using Ogre. So, with Ogre I have to use the bootstrap function to init CEGUI?
Re: CEGUI 0.7 and DDS images
Posted: Thu Dec 03, 2009 15:49
by jaguillard
Okay, switched to using the bootstrapSystem() function. I get an error from the OgreImageCodex now through CEGUI.
Code: Select all
mRenderer = &CEGUI::OgreRenderer::bootstrapSystem(*window);
mSystem = CEGUI::System::getSingletonPtr();
if(!mRenderer || !mSystem)
return false;
// Create the scheme and layouts for CEGUI
CEGUI::SchemeManager::getSingletonPtr()->create("GUI.scheme");
CEGUI::ImagesetManager::getSingletonPtr()->createFromImageFile("GUITitle", "title.dds");
03/12/2009 10:44:35 (Std) ********************************************************************************
03/12/2009 10:44:35 (Std) * -------- START OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM -------- *
03/12/2009 10:44:35 (Std) ********************************************************************************
03/12/2009 10:44:35 (Std) ---- Version 0.7.1 (Build: Dec 2 2009 Microsoft Windows MSVC++ 8.0 32 bit) ----
03/12/2009 10:44:35 (Std) ---- Renderer module is: CEGUI::OgreRenderer - Official OGRE based 2nd generation renderer module. ----
03/12/2009 10:44:35 (Std) ---- XML Parser module is: CEGUI::ExpatParser - Official expat based parser module for CEGUI ----
03/12/2009 10:44:35 (Std) ---- Image Codec module is: OgreImageCodec - Integrated ImageCodec using the Ogre engine. ----
03/12/2009 10:44:35 (Std) ---- Scripting module is: None ----
03/12/2009 10:44:35 (Std) ********************************************************************************
03/12/2009 10:44:35 (Std) * -------- END OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM -------- *
03/12/2009 10:44:35 (Std) ********************************************************************************
03/12/2009 10:44:36 (Std) Attempting to create Imageset 'GUITitle' using image file 'title.dds'.
03/12/2009 10:44:36 (Error) CEGUI::FileIOException in file ..\..\..\..\cegui\src\RendererModules\Ogre\CEGUIOgreImageCodec.cpp(72) : OgreImageCodec::load: File data was of an unsupported format.
EDIT: I looked at the source for CEGUIOgreImageCodex. It only accepts two file formats (PF_R8G8B8 and PF_A8R8G8B8), and my dds formats are dxt3, which isn't supported. Is there a reason for this? I was able to use dxt3 dds images before 0.7.
For the time being, I'm just switching the dds images to a ARGB format. It works like that.
Re: CEGUI 0.7 and DDS images
Posted: Fri Dec 04, 2009 11:32
by CrazyEddie
I'm not sure why the other format worked before. I guess it was really a bug that it did work. With regards to proper support for other formats, it's something that was mentioned quite recently here on the forum, and is something that I'll be looking to add for some future versions (there's a couple of ways of doing it, and I want to make sure I get that right!).
CE.
Re: CEGUI 0.7 and DDS images
Posted: Sat Dec 05, 2009 11:07
by ianstangoe
Yeah, I ran into this problem also, I could use DDS textures with 0.6.2 but with the latest release I get the CEGUI error, fortunately I only had a single texture to change and I now no longer use DDS textures for CEGUI stuff...
