Page 1 of 1

TreeView / ListView rendering hidden rows outside local viewport

Posted: 15 Sep 2021, 23:18
by RevalSoft
Hello!

I'm integration Noesis into a proprietary game engine (currently uses old OGL pipeline), all behavior looks smooth and clear, except 1 - in list-like containers I got rendering outside element frame last/first rows.

Image
Image

My integration code is primitive easier and looks like:
void NoesisRender() {
    static uint64_t startTime = Noesis::HighResTimer::Ticks();
    uint64_t time = Noesis::HighResTimer::Ticks();
    _view->Update(Noesis::HighResTimer::Seconds(time - startTime));

    _view->GetRenderer()->UpdateRenderTree();

    glPushAttrib(GL_ALL_ATTRIB_BITS);

    _view->GetRenderer()->RenderOffscreen();
    
    glBindFramebuffer(GL_FRAMEBUFFER, 0);
    glViewport(0, 0, WindowWidth, WindowHeight);

    _view->GetRenderer()->Render();
    glUseProgramObjectARB(0);

    glPopAttrib();
}
May someone have tips on where I can find a solution? And what can in theory invoke that?

Re: TreeView / ListView rendering hidden rows outside local viewport

Posted: 16 Sep 2021, 12:27
by sfernandez
This seems a problem with stencil, we rely on that for clipping on this kind of scenarios.
Are you setting up a stencil buffer when creating your main surface? Are you clearing it before rendering the UI to the screen?

Re: TreeView / ListView rendering hidden rows outside local viewport

Posted: 16 Sep 2021, 13:04
by RevalSoft
All right, thank you!
Was been fixed with activation Stencil buffer on window handle creation.

Re: TreeView / ListView rendering hidden rows outside local viewport

Posted: 16 Sep 2021, 13:07
by sfernandez
Great, thanks for the update.