Page 2 of 2

Re: Using an existent device (OpenGL)

Posted: 08 Jan 2020, 19:18
by igorsegalla
glPushAttrib( GL_ALL_ATTRIB_BITS ) doesnt works?

Re: Using an existent device (OpenGL)

Posted: 08 Jan 2020, 19:23
by jsantos
I don't know, we are not using it. If you want to use it instead of restoring manually each state, then you need to figure it out why it is not working, that is a specific GL question. But, we don't recommend using those kind of functions for saving or restoring the state because they are slow or at least they are not fast or supported in all our platforms.

Re: Using an existent device (OpenGL)

Posted: 08 Jan 2020, 19:25
by igorsegalla
I see, ll try figured out why this is happening, thanks for your time. When I debug game with NoesisGUI render at RenderDoc, looks missing the "Colour Pass #1 (1 Targets + Depth), dno why.

Re: Using an existent device (OpenGL)

Posted: 08 Jan 2020, 23:46
by igorsegalla
Solved!! Thanks for your time.
I had to store render state and restore it.

Re: Using an existent device (OpenGL)

Posted: 09 Jan 2020, 00:02
by igorsegalla
There's any problem to call UpdateRenderTree and RenderOffscreen before view->Render()?
This way I just need to save render state once time.

Image

Re: Using an existent device (OpenGL)

Posted: 09 Jan 2020, 10:54
by jsantos
RenderOffscreen may change the active framebuffer and viewport, you should restore it after calling that function. This is the main reason it is recommended to call that function before binding your main framebuffer. Binding and unbinding the same render target several times in the same frame is not very efficient.