Page 1 of 1

Cannot load TGA files

Posted: Tue Dec 27, 2005 12:58
by Progs
Trying to insert your GUI system in my project. But cannot load imageset. Is seems that it could not load TGA. It is not problem with file path, cos font is loaded normaly (datafiles are from samples directory).

Here is part of loading code

Code: Select all

      CEGUI::FontManager::getSingleton().createFont("../datafiles/fonts/Commonwealth-10.font");
      gui_imageset = CEGUI::ImagesetManager::getSingleton().createImageset("../datafiles/imagesets/TaharezLook.imageset");
      CEGUI::System::getSingleton().setDefaultMouseCursor( &gui_imageset->getImage("MouseArrow") );


and here is log file

Code: Select all

27/12/2005 15:45:08 (InfL1)   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
27/12/2005 15:45:08 (InfL1)   +                     Crazy Eddie's GUI System - Event log                    +
27/12/2005 15:45:08 (InfL1)   +                          (http://www.cegui.org.uk/)                         +
27/12/2005 15:45:08 (InfL1)   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

27/12/2005 15:45:08 (InfL1)   CEGUI::Logger singleton created.
27/12/2005 15:45:08 (InfL1)   ---- Begining CEGUI System initialisation ----
27/12/2005 15:45:08 (InfL1)   CEGUI::ImagesetManager singleton created
27/12/2005 15:45:08 (InfL1)   CEGUI::FontManager singleton created.
27/12/2005 15:45:08 (InfL1)   CEGUI::WindowFactoryManager singleton created
27/12/2005 15:45:08 (InfL1)   CEGUI::WindowManager singleton created
27/12/2005 15:45:08 (InfL1)   CEGUI::SchemeManager singleton created.
27/12/2005 15:45:08 (InfL1)   CEGUI::MouseCursor singleton created.
27/12/2005 15:45:08 (InfL1)   CEGUI::GlobalEventSet singleton created.
27/12/2005 15:45:08 (InfL1)   CEGUI::WidgetLookManager singleton created.
27/12/2005 15:45:08 (InfL1)   WindowFactory for 'DefaultWindow' windows added.
27/12/2005 15:45:08 (InfL1)   WindowFactory for 'DragContainer' windows added.
27/12/2005 15:45:08 (InfL1)   WindowFactory for 'ScrolledContainer' windows added.
27/12/2005 15:45:08 (InfL1)   Window type alias named 'DefaultGUISheet' added for window type 'DefaultWindow'.
27/12/2005 15:45:08 (InfL1)   CEGUI::System singleton created.
27/12/2005 15:45:08 (InfL1)   ---- CEGUI System initialisation completed ----
27/12/2005 15:45:08 (InfL1)   ---- Version 0.4.1 ----
27/12/2005 15:45:08 (InfL1)   ---- Renderer module is: CEGUI::OpenGLRenderer - Official OpenGL based renderer module for CEGUI ----
27/12/2005 15:45:08 (InfL1)   ---- XML Parser module is: CEGUI::TinyXMLParser - Official tinyXML based parser module for CEGUI ----
27/12/2005 15:45:08 (InfL1)   ---- Scripting module is: None ----
27/12/2005 15:45:08 (InfL1)   Attempting to create Font from the information specified in file '../datafiles/fonts/Commonwealth-10.font'.
27/12/2005 15:45:08 (InfL1)   Attempting to create Imageset 'Commonwealth-10_auto_glyph_images' with texture only.
27/12/2005 15:45:08 (InfL1)   Attempting to create an Imageset from the information specified in file '../datafiles/imagesets/TaharezLook.imageset'.
27/12/2005 15:45:08 (Error)   Exception: Imageset::xmlHandler::startElement - An unexpected error occurred while creating a Texture object from file '../datafiles/imagesets/TaharezLook.tga'
27/12/2005 15:45:08 (Error)   Imageset::load - loading of Imageset from file '../datafiles/imagesets/TaharezLook.imageset' failed.


txs

Re: Cannot load TGA files

Posted: Tue Dec 27, 2005 14:05
by MandM
Why are you loading the TaharezLook.imageset manually anyways ? You should be loading the whole TaharezLook.scheme

Code: Select all

CEGUI::SchemeManager::getSingleton().loadScheme("../your/paths/here/TaharezLook.scheme");

That should load the imageset and you can use the mouse arrows and whatever else since its all loaded.

I'm not sure why you're having this problem though, it should load it properly, otherwise the image file wouldn't have been .tga.
Are you sure you specified the paths inside the .imageset file to your image properly ? you need to edit them to point to the image.

Re: Cannot load TGA files

Posted: Tue Dec 27, 2005 14:55
by Progs
Problem solved.
I forgot to put all debug DLLs in work folder.

thanks.