Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: CEGUI & openGL  (Read 2022 times)

0 Members and 1 Guest are viewing this topic.

poseidon

  • Newbie
  • *
  • Posts: 4
    • View Profile
CEGUI & openGL
« on: January 09, 2010, 02:45:01 am »
I want to be able to use sfml to handle the window and events, however, I want to use openGL to render 3d graphics and CEGUI to render a UI.  However, when I tried to use both at the same time I can't see anything being rendered by openGL.

What I simply used the code from the CEGUI tutorial.  I then created a boolean variable which decided whether CEGUI should render or not.

When I pressed the esc button a boolean variable would be changed and the following code
Code: [Select]

mWindow.Draw(mString);
mGUIManager.Draw();
mWindow.Display();

would not be called.  A method to which called all the openGL commands needed to draw a cube was called instead.

However, no cube ever shows up.

Can someone help me figure out how to get CEGUI and openGL to both take turns displaying (or maybe CEGUI overlaying over the openGL rendered scene).


Thank you for your time,


Joseph
Poseidon - The God of C

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
CEGUI & openGL
« Reply #1 on: January 09, 2010, 10:06:19 am »
So, you can see your OpenGL scene when you don't use CeGUI at all, right?

It must be a state problem, make sure that you restore all the states you need for your 3D scene after the CeGUI rendering.
Laurent Gomila - SFML developer

 

anything