CEGUI 0.7 and DDS images

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

jaguillard
Just popping in
Just popping in
Posts: 12
Joined: Wed Jun 04, 2008 21:24

CEGUI 0.7 and DDS images

Postby jaguillard » Wed Dec 02, 2009 20:51

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?

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: CEGUI 0.7 and DDS images

Postby CrazyEddie » Thu Dec 03, 2009 09:42

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.

jaguillard
Just popping in
Just popping in
Posts: 12
Joined: Wed Jun 04, 2008 21:24

Re: CEGUI 0.7 and DDS images

Postby jaguillard » Thu Dec 03, 2009 15:26

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?

jaguillard
Just popping in
Just popping in
Posts: 12
Joined: Wed Jun 04, 2008 21:24

Re: CEGUI 0.7 and DDS images

Postby jaguillard » Thu Dec 03, 2009 15:49

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.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: CEGUI 0.7 and DDS images

Postby CrazyEddie » Fri Dec 04, 2009 11:32

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.

ianstangoe
Quite a regular
Quite a regular
Posts: 79
Joined: Wed Jan 09, 2008 11:06

Re: CEGUI 0.7 and DDS images

Postby ianstangoe » Sat Dec 05, 2009 11:07

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... :(


Return to “Help”

Who is online

Users browsing this forum: No registered users and 5 guests