Problem getting CEGUI to work

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

Cribs
Just popping in
Just popping in
Posts: 1
Joined: Sun Aug 06, 2006 08:14
Contact:

Problem getting CEGUI to work

Postby Cribs » Sun Aug 06, 2006 08:36

Im not sure if its because im using GLFW, i dont know if it can work with glfw, or if im not including a file i should but i followed the tutorials to get it to work with OpenGL and it compiles fine but dosnt run.

Here is my code:

Code: Select all

#include "cbase.h"
#include "CWindow.h"

//-----------
//Crazy Eddies GUI includes
//------------
#include <CEGUI.h>
//#include <CEGUIGUILayout_xmlHandler.h>
//#include <CEGUIXMLHandler.h>
#include "Renderers/OpenGLGUIRenderer/openglrenderer.h"
#include <sstream>


int GLFWmain()
{
   bool bRunning = true;

   CWindow pWindow( "CEGUI Test", 640, 480, false, NULL, NULL );
   if( !pWindow.Start() ) return 0;


   glEnable(GL_CULL_FACE);
   glDisable(GL_FOG);
   glClearColor(0.0f,0.0f,0.0f,1.0f);
   glViewport(0,0, 800,600);

   glMatrixMode(GL_PROJECTION);
   glLoadIdentity();
   gluPerspective(45.0, 800.0/600.0, 0.1,100.0);
   glMatrixMode(GL_MODELVIEW);
   glLoadIdentity();


   CEGUI::OpenGLRenderer* myRenderer = new CEGUI::OpenGLRenderer(0, 640, 480);
   new CEGUI::System(myRenderer);

   CEGUI::SchemeManager::getSingleton().loadScheme("../datafiles/schemes/TaharezLook.scheme");
   CEGUI::FontManager::getSingleton().createFont("../datafiles/fonts/Commonwealth-10.font");
   CEGUI::System::getSingleton().setDefaultFont("Commonwealth-10");
   CEGUI::System::getSingleton().setDefaultMouseCursor("TaharezLook", "MouseArrow");

   while( bRunning )
   {
      // Render Here
      CEGUI::System::getSingleton().renderGUI();

      glfwSwapBuffers();
      if( glfwGetKey( GLFW_KEY_ESC ) ) bRunning = false;
      if( !glfwGetWindowParam( GLFW_OPENED ) ) bRunning = false;
   }
   
   return 1;
}


and here is my log:

Code: Select all

06/08/2006 01:34:55 (InfL1)   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
06/08/2006 01:34:55 (InfL1)   +                     Crazy Eddie's GUI System - Event log                    +
06/08/2006 01:34:55 (InfL1)   +                          (http://www.cegui.org.uk/)                         +
06/08/2006 01:34:55 (InfL1)   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

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


I have been trying to get this to work for a few hours now even though theres only like 4 or 5 lines for the gui. I just cannot get it to run. Also, id like to note that i am puting the exe into the bin folder for the GUI to run it so it uses the datafiles folder.

Thanks in advance!

EDIT:
Thanks to CE on mIRC i got this fixed. The problem was that i didnt have CEGUIBase.lib included in my Additional Dependencies.

Return to “Help”

Who is online

Users browsing this forum: No registered users and 20 guests