[Solved]Framewindow is in "background" -Ogre 2.1|CEGUI v-0.8

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

jserve
Just popping in
Just popping in
Posts: 5
Joined: Wed May 06, 2015 12:08

[Solved]Framewindow is in "background" -Ogre 2.1|CEGUI v-0.8

Postby jserve » Thu May 14, 2015 10:43

Hi everyone,

I have a problem with FrameWindows. I use the actual v-0.8 branch. When I add a Button or Editbox widget directly it works fine. But when I add a Framewindow with content, either via code or layout files I just see it the 1st time after frameRenderingQueued(...) and after that sometimes just a flicker.

Could someone give me a point into the direction what I miss in my code?

1st Time: http://i.imgur.com/MMa61qn.png
2nd to .... time: http://i.imgur.com/xJ91clV.png

frameRenderingQueue:

Code: Select all

bool FrameListener1::frameRenderingQueued(const Ogre::FrameEvent& args)
{
   float dt=args.timeSinceLastEvent;         
                                     
   CEGUI::System& gui_system = CEGUI::System::getSingleton();
   gui_system.injectTimePulse(dt);
   
   CEGUI::Renderer* gui_renderer(gui_system.getRenderer());               
      
   gui_renderer->beginRendering();
               
   gui_system.getDefaultGUIContext().injectTimePulse(1e-2f);
   gui_system.getDefaultGUIContext().draw();                  

   gui_renderer->endRendering();               
         
   CEGUI::WindowManager::getSingleton().cleanDeadPool();

   return true;
}


CEGUI Code:

Code: Select all

CEGUI::WindowManager &wmgr = CEGUI::WindowManager::getSingleton();
           
CEGUI::Window *sheet = wmgr.createWindow("DefaultWindow", "Root");
CEGUI::System::getSingleton().getDefaultGUIContext().setRootWindow(sheet);
         
           
CEGUI::Window *quit = wmgr.createWindow("TaharezLook/Button", "CEGUIDemo/QuitButton");
quit->setText("Quit");
quit->setSize(CEGUI::USize(CEGUI::UDim(0.15f, 0), CEGUI::UDim(0.05f, 0)));
quit->subscribeEvent(CEGUI::PushButton::EventMouseDoubleClick, CEGUI::Event::Subscriber(handleSampleEnterButtonClicked));
quit->subscribeEvent(CEGUI::PushButton::EventMouseClick, CEGUI::Event::Subscriber(handleSampleEnterButtonClicked));
sheet->addChild(quit);     
         
CEGUI::Window *tb = wmgr.createWindow("TaharezLook/Editbox", "Editbox");
tb->setPosition(CEGUI::UVector2(CEGUI::UDim(0.5f, 0), CEGUI::UDim(0, 0)));
sheet->addChild(tb);

CEGUI::Window *wndFile=wmgr.loadLayoutFromFile("TextDemo.layout");         
sheet->addChild(wndFile);
Last edited by jserve on Thu May 14, 2015 17:25, edited 1 time in total.

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Framewindow is in "background" - Ogre 2.1|CEGUI v-0.8

Postby Ident » Thu May 14, 2015 11:07

Go to your FrameWindow and set AutoRenderingSurface to false. You can do this in the looknfeel files if you want. Probably these are not implemented correctly in the OgreRenderer yet.
CrazyEddie: "I don't like GUIs"

jserve
Just popping in
Just popping in
Posts: 5
Joined: Wed May 06, 2015 12:08

Re: Framewindow is in "background" - Ogre 2.1|CEGUI v-0.8

Postby jserve » Thu May 14, 2015 17:25

Boah Ident!
You saved my life again! Thanks :)

*cheers*


Return to “Help”

Who is online

Users browsing this forum: No registered users and 19 guests