CEGUI and OpenGL

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

SidRaven
Just popping in
Just popping in
Posts: 5
Joined: Sun Jun 25, 2006 07:54

CEGUI and OpenGL

Postby SidRaven » Mon Jul 10, 2006 09:02

Hi guys, i'm having some problems, after my attempt to try getting CEGUI working in a directx game (by injected a dll) i decided to try OpenGl with Quake 3.

My problem is though, when using:

Code: Select all

CEGUI::System::getSingleton().renderGUI()


It crashes the game, but, when commenting it out, it looks like the CEGUI stuff is being created sucessfully. Here is the log. When the "RenderGUI" is not commented out, it doesn't create a log.

10/07/2006 09:57:34 (InfL1) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10/07/2006 09:57:34 (InfL1) + Crazy Eddie's GUI System - Event log +
10/07/2006 09:57:34 (InfL1) + (http://www.cegui.org.uk/) +
10/07/2006 09:57:34 (InfL1) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

10/07/2006 09:57:34 (InfL1) CEGUI::Logger singleton created.
10/07/2006 09:57:34 (InfL1) ---- Begining CEGUI System initialisation ----
10/07/2006 09:57:34 (InfL1) CEGUI::ImagesetManager singleton created
10/07/2006 09:57:34 (InfL1) CEGUI::FontManager singleton created.
10/07/2006 09:57:34 (InfL1) CEGUI::WindowFactoryManager singleton created
10/07/2006 09:57:34 (InfL1) CEGUI::WindowManager singleton created
10/07/2006 09:57:34 (InfL1) CEGUI::SchemeManager singleton created.
10/07/2006 09:57:34 (InfL1) CEGUI::MouseCursor singleton created.
10/07/2006 09:57:34 (InfL1) CEGUI::GlobalEventSet singleton created.
10/07/2006 09:57:34 (InfL1) CEGUI::WidgetLookManager singleton created.
10/07/2006 09:57:34 (InfL1) WindowFactory for 'DefaultWindow' windows added.
10/07/2006 09:57:34 (InfL1) WindowFactory for 'DragContainer' windows added.
10/07/2006 09:57:34 (InfL1) WindowFactory for 'ScrolledContainer' windows added.
10/07/2006 09:57:34 (InfL1) Window type alias named 'DefaultGUISheet' added for window type 'DefaultWindow'.
10/07/2006 09:57:34 (InfL1) CEGUI::System singleton created.
10/07/2006 09:57:34 (InfL1) ---- CEGUI System initialisation completed ----
10/07/2006 09:57:34 (InfL1) ---- Version 0.4.1 ----
10/07/2006 09:57:34 (InfL1) ---- Renderer module is: CEGUI::OpenGLRenderer - Official OpenGL based renderer module for CEGUI ----
10/07/2006 09:57:34 (InfL1) ---- XML Parser module is: CEGUI::TinyXMLParser - Official tinyXML based parser module for CEGUI ----
10/07/2006 09:57:34 (InfL1) ---- Scripting module is: None ----


I've tried placing "RenderGUI" in glViewport and glEnable but both crash. I'm injecting a dll which hooks opengl rendering functions. If you could help it would be greatly appreciated.

Also, is it possible to use CEGUI without having to place "CEGUIBase.dll" and "OpenGLGUIRenderer.dll" in the game directory?

MacMan45
Just popping in
Just popping in
Posts: 19
Joined: Mon Apr 24, 2006 10:33

Re: CEGUI and OpenGL

Postby MacMan45 » Tue Jul 11, 2006 04:49

SidRaven wrote:I've tried placing "RenderGUI" in glViewport and glEnable but both crash. I'm injecting a dll which hooks opengl rendering functions. If you could help it would be greatly appreciated.


My OpenGL is a little rusty these days, but you arn't doing the rendergui between a glBegin & an glEnd are you?

Maybe you could hook glClear (and call the original clear & then renderGUI) or a glFlush (and call renderGUI before the real glFlush).

SidRaven wrote:Also, is it possible to use CEGUI without having to place "CEGUIBase.dll" and "OpenGLGUIRenderer.dll" in the game directory?


I'm sure there are ways, i can't think of any good ones right now though, if i solve the problem for my own hack, i'll try to get back to you :P

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Tue Jul 11, 2006 06:41

Hi,

about the DLLs: do you mean that you'd like to have them in a different location? Or would you like to link statically so that you don't have any DLLs? You can add the CEGUI's bin folder to your PATH, so each CEGUI application can find the most recent DLL's. You may link statically as of version 0.5, which is not released yet.

For the rendering you might also check this code from the layout editor, which uses OpenGl in a non-cegui application:
http://svn.sourceforge.net/viewcvs.cgi/ ... p&rev=1153

The method "void EditorCanvas::Render()" might give some insights. Althouth "glBegin()" and "glEnd()" are wrapped by the wxWidgets methods presumably.

Good luck!

MacMan45
Just popping in
Just popping in
Posts: 19
Joined: Mon Apr 24, 2006 10:33

Postby MacMan45 » Thu Jul 13, 2006 04:37

scriptkid wrote:Hi,

about the DLLs: do you mean that you'd like to have them in a different location? Or would you like to link statically so that you don't have any DLLs? You can add the CEGUI's bin folder to your PATH, so each CEGUI application can find the most recent DLL's. You may link statically as of version 0.5, which is not released yet.


Hey, now there is some good thinking!
The PATH hadn't even occured to me, although, static linking sounds like a good option as well.

When i finally figure out the slowdown i'm having, i'll implement one of the two (depending ofcourse on when 0.5 comes out ;) )


Return to “Help”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 8 guests