CEGUI & Ogre

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

Dipy
Just popping in
Just popping in
Posts: 4
Joined: Thu Oct 19, 2006 20:50
Contact:

CEGUI & Ogre

Postby Dipy » Thu Oct 19, 2006 21:25

Hi,
I'm getting trouble trying to use CEGUI with Ogre.
Here is my 'history':

* First, I was using Ogre 1.2.3 and CEGUI 0.4.1. But, when running, I got segmentation fault, and it seems to be because I'm using TinyXML in my app (see http://www.cegui.org.uk/phpBB2/viewtopic.php?t=1$

* So, considering this and the many improvements done for CEGUI 0.5, I decided to do the update.
Here is what I did:
- Downloading CEGUI 0.5-rc2.
- Compiling an installing it.
- Patching Ogre 1.2.3 with path found at http://www.ogre3d.org/phpBB2/viewtopic. ... egui+patch. Everything went fine (except for the Ocean demo where I need to manually apply the path.
- Then, I tried the samples in ogre, and it seems to work (at least the Gui sample seems to display some CEGUI things).
- After that, I recompiled CEGUI to get the samples working with Ogre.

Those samples runs good using opengl renderer, but hangs on a black screen when selecting ogre renderer.
Here is the Ogre log I get:
18:19:05: RenderSystem capabilities
18:19:05: -------------------------
18:19:05: * Hardware generation of mipmaps: yes
18:19:05: * Texture blending: yes
18:19:05: * Anisotropic texture filtering: yes
18:19:05: * Dot product texture operation: yes
18:19:05: * Cube mapping: yes
18:19:05: * Hardware stencil buffer: yes
18:19:05: - Stencil depth: 8
18:19:05: - Two sided stencil support: yes
18:19:05: - Wrap stencil values: yes
18:19:05: * Hardware vertex / index buffers: yes
18:19:05: * Vertex programs: yes
18:19:05: - Max vertex program version: arbvp1
18:19:05: * Fragment programs: yes
18:19:05: - Max fragment program version: arbfp1
18:19:05: * Texture Compression: yes
18:19:05: - DXT: yes
18:19:05: - VTC: no
18:19:05: * Scissor Rectangle: yes
18:19:05: * Hardware Occlusion Query: yes
18:19:05: * User clip planes: yes
18:19:05: * VET_UBYTE4 vertex element type: yes
18:19:05: * Infinite far plane projection: yes
18:19:05: * Hardware render-to-texture: yes
18:19:05: * Floating point textures: yes
18:19:05: * Non-power-of-two textures: no
18:19:05: * Volume textures: yes
18:19:05: * Multiple Render Targets: 4
18:19:05: * Point Sprites: yes
18:19:05: * Extended point parameters: yes
18:19:05: * Max Point Size: 1024
18:19:05: Registering ResourceManager for type Texture
18:19:05: ResourceBackgroundQueue - threading disabled
18:19:05: Particle Renderer Type 'billboard' registered


So, nothing semm to be wrong, but the screen is just all black and nothing happens (even the escape key doesn't work).

And so, since Ogre samplse are working fine, I tried to use it in my own application, but I got another problem:
Here is my code:

Code: Select all

a_renderer = new CEGUI::OgreCEGUIRenderer(&App::singleton().renderWindow(),
                                          Ogre::RENDER_QUEUE_OVERLAY,
                                          false,
                                          3000,
                                          &App::singleton().sceneManager());

With the above code, execution gave me
../include/CEGUISingleton.h:70: static T& CEGUI::Singleton<T>::getSingleton() [with T = CEGUI::System]: Assertion `ms_Singleton' failed.

wich is normal.

So, I added this:

Code: Select all

a_system = new CEGUI::System(a_renderer);

but then, I got an exception with the output '*** ERROR: Unknown', and my program exits.

Am I doing something wrong, and can anyone help me solving this issue?

Dipy
Just popping in
Just popping in
Posts: 4
Joined: Thu Oct 19, 2006 20:50
Contact:

Postby Dipy » Fri Oct 20, 2006 08:45

Ok, I finally found why it was segfaulting with my app:
my cegui libs were not installed in a normal dir, and my compilation, donc using CMake linked correctly those libs, usgin rpath.
So, at execution, libs were correctly found without needing to add the LD_LIBRARY_PATH.
But after some debugging in the libs, I found that it uses dlopen to open the libCEGUITInyXml.so lib, which was not found -> exception.

So it's now solved, but the samples from CEGUI still hangs at a black screen.

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

Postby CrazyEddie » Fri Oct 20, 2006 08:50

Hi,

The issue with Ogre not working in the CEGUI samples is known to me, and I'll be trying to address that before the final 0.5.0 release.

For the other issue, can you post the full CEGUI initialisation code (if what you posted was the full code, post some surrounding lines for context) and also post something showing the declarations of where you're storing the data fields etc (i.e. a_system and any others).

CE.

Dipy
Just popping in
Just popping in
Posts: 4
Joined: Thu Oct 19, 2006 20:50
Contact:

Postby Dipy » Fri Oct 20, 2006 09:08

CrazyEddie wrote:Hi,

The issue with Ogre not working in the CEGUI samples is known to me, and I'll be trying to address that before the final 0.5.0 release.

Ok, so this is not a personal problem :)
For the other issue, can you post the full CEGUI initialisation code (if what you posted was the full code, post some surrounding lines for context) and also post something showing the declarations of where you're storing the data fields etc (i.e. a_system and any others).
CE.

I just posted 5 minutes before your answer :)
This was because of the libCEGUITinyXmlParser was not found.
The exception I got was coming from file CEGUIDynamicModule.cpp, in the constructor:

Code: Select all

    // check for library load failure
    if (!d_handle)
        throw GenericException(
            "DynamicModule::DynamicModule - Failed to load module '" +
            d_moduleName + "': " + getFailureString());

But when running, the message was not displayed, I was simply having an "unknown error" displayed on my shell. Maybe adding an entry in the CEGUI.log should be good too.

Anyway, thanks for this quick reply.

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

Postby CrazyEddie » Fri Oct 20, 2006 10:11

Which goes to show how long I took to write that reply - at least 5 mins :lol:

Dipy
Just popping in
Just popping in
Posts: 4
Joined: Thu Oct 19, 2006 20:50
Contact:

Postby Dipy » Fri Oct 20, 2006 12:48

Well that says, I have a new question:
I guess answer is no, but is it possible to have it use tinyxml statically linked with cegui, or should I always need to have the library in a separate file (and also need to use the LD_LIBRARY_PATH before running my app) ?

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

Postby CrazyEddie » Sat Oct 21, 2006 08:30

I assume you mean you want to statically link to the TinyXML parser module, as opposed to TinyXML itself which is compiled into the module anyway.

You are correct that, at least for the moment, it is not possible to link statically to either CEGUI or the 'pluggable' modules (which is the xml parsers, GL image codecs, window renderer modules, etc).

If you are not doing 'make install' and 'ldconfig' or do not have the library install location in the /etc/ld.so.conf file then, since we do not currently have a means of telling CEGUI custom locations to look, use of LD_LIBRARY_PATH would be required for the system to find the module.

CE.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 25 guests