can't load imageset

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

User avatar
realtiger
Just popping in
Just popping in
Posts: 12
Joined: Thu Dec 14, 2006 05:10

can't load imageset

Postby realtiger » Thu Dec 14, 2006 07:12

hi all

I use this code to load a scheme.

Code: Select all

   CEGUI::OpenGLRenderer *renderer;
   CEGUI::System *system;
   CEGUI::Imageset *imgSet;

   try
   {
      renderer = new CEGUI::OpenGLRenderer(0, 800, 600);
      system = new CEGUI::System(renderer);

      CEGUI::SchemeManager::getSingleton().loadScheme("datafiles/schemes/TaharezLook.scheme");
      CEGUI::System::getSingleton().setDefaultMouseCursor("TaharezLook", "MouseArrow");

//      imgSet = CEGUI::ImagesetManager::getSingleton().createImageset("c:/CEGUI-SDK-0.5.0b/datafiles/schemes/TaharezLook.imageset");
   }
   catch (CEGUI::Exception &e)
   {
      MessageBoxA(0, e.getMessage().c_str(), "ERROR", MB_OK);
      return 1;
   }


But this error occured:

Code: Select all

14/12/2006 14:08:25 (Error)   Exception: DefaultResourceProvider::load - TaharezLook.imageset does not exist
14/12/2006 14:08:25 (Error)   Imageset::load - loading of Imageset from file 'TaharezLook.imageset' failed.


I have copied datafiles folder from SDK to project folder.

Anyone knows why?

User avatar
realtiger
Just popping in
Just popping in
Posts: 12
Joined: Thu Dec 14, 2006 05:10

Postby realtiger » Thu Dec 14, 2006 07:58

I have found the answer in wiki.
The Direct3D and OpenGL renderers do not, by default, use a specialised ResourceProvider; these systems default to loading all resources from the current working directory for the running application (usually the directory containing the executable). This fact is of major importance when specifying paths to files within other files; they are all relative to the same directory, they are not relative to each other.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 16 guests