CEGUI 0.7 and DDS images
Moderators: CEGUI MVP, CEGUI Team
-
- Just popping in
- Posts: 12
- Joined: Wed Jun 04, 2008 21:24
CEGUI 0.7 and DDS images
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?
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: CEGUI 0.7 and DDS images
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.
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
-
- Just popping in
- Posts: 12
- Joined: Wed Jun 04, 2008 21:24
Re: CEGUI 0.7 and DDS images
This is the init I have:
And yes, I am using Ogre. So, with Ogre I have to use the bootstrap function to init CEGUI?
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?
-
- Just popping in
- Posts: 12
- Joined: Wed Jun 04, 2008 21:24
Re: CEGUI 0.7 and DDS images
Okay, switched to using the bootstrapSystem() function. I get an error from the OgreImageCodex now through CEGUI.
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.
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.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: CEGUI 0.7 and DDS images
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.
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
-
- Quite a regular
- Posts: 79
- Joined: Wed Jan 09, 2008 11:06
Re: CEGUI 0.7 and DDS images
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...
Who is online
Users browsing this forum: No registered users and 4 guests