schragnasher
Topic Author
Posts: 33
Joined: 07 Mar 2015, 01:58

Lockup

07 Sep 2017, 15:04

Iv been able to incorporate and render Noesis in my game, but im running into a funny issue. Many of the controls work ok, such as buttons. But when i try to use things like the combobox or expander, after i click them my app will seize up. Any idea what might be happening here?
 
schragnasher
Topic Author
Posts: 33
Joined: 07 Mar 2015, 01:58

Re: Lockup

08 Sep 2017, 04:44

Ok its still rendering, and updating, just has gone black...im assuming its more GL state issues i need to reset.
 
User avatar
jsantos
Site Admin
Posts: 2904
Joined: 20 Jan 2012, 17:18
Contact:

Re: Lockup

08 Sep 2017, 04:50

I am almost sure that this is happening because you are not properly rendering the offscreen phase in your integration code. The offscreen phase is where we generate render textures, in that phase we change the active render target and also the viewport dimensions. It is very important that you restore at least those states before you start rendering to the screen.
void Render(void)
{
    view->Update(time);
    
    view->GetRenderer()->UpdateRenderTree();
    view->GetRenderer()->RenderOffscreen();
    
    // Restore state. This must be done per frame because NoesisGUI modifies the GPU state
    glBindFramebuffer(GL_FRAMEBUFFER, 0);
    glClearColor(0.0f, 0.0f, 0.25f, 0.0f);
    glClearStencil(0);
    glClear(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
    glViewport(0, 0, g_Width, g_Height);
    
    // Renders UI to active render target in the active viewport
    view->GetRenderer()->Render();
}
 
User avatar
jsantos
Site Admin
Posts: 2904
Joined: 20 Jan 2012, 17:18
Contact:

Re: Lockup

08 Sep 2017, 04:51

Sorry, but it is not your fault. If you followed the GL integration sample, we are not restoring the default framebuffer there. I am fixing that example right now...
 
schragnasher
Topic Author
Posts: 33
Joined: 07 Mar 2015, 01:58

Re: Lockup

08 Sep 2017, 04:56

I see it here http://www.noesisengine.com/docs/Gui.Co ... tml#opengl I just overlooked it.
 
User avatar
jsantos
Site Admin
Posts: 2904
Joined: 20 Jan 2012, 17:18
Contact:

Re: Lockup

08 Sep 2017, 05:02

Yes, talking about the example included inside the C++ SDK. That example you mention is part of the obsolete documentation that is still using the 1.2 API...

Who is online

Users browsing this forum: No registered users and 0 guests