Hello Victor,

hmm, I can't really claim to have any understanding of how this works any
longer, but a quick look at
Source/System/Window/FrameBufferObjects/OSGFrameBufferObject.cpp:740
suggests that it always binds the default framebuffer (i.e.
glBindFramebuffer(0)) when deactivating an FBO - it doesn't look like there
is a customization point for this behaviour.
Can you perform all your OpenSG rendering into an FBO and when it has
completed manually blit to the GtkGLArea? It's a bit unnecessary work
performing that extra copy, but may be the quickest way to get it running.

Cheers,
Carsten

On Thu, Dec 10, 2020 at 3:24 PM Victor Haefner <victor.haef...@gmail.com>
wrote:

> Hello everyone,
>
> I just ported my application from Gtk2 to Gtk3.
> Until now I used gtkglext to render with OpenSG into a widget.
> There is a gtk3 port of gtkglext, but I had artifacts that I couldn't get
> rid of.
> So I tried GtkGLArea, it works, but I have a problem when using
> framebuffers (for example for texture rendering).
> GtkGLArea does not render directly to the window but instead to a
> framebuffer and later cairo drawns the framebuffer to the widget vie a
> shared GL context..
> When I use a framebuffer from OpenSG then once the rendering to it is
> done, OpenSG resets the buffer with glBindFramebuffer(0) if I recall
> correctly.
> Normally this would be fine, but with the GtkGLArea it results in a black
> window.
> Instead It would need to bind to the framebuffers from the gtkglarea.
> There is a convenience function to do this, how can I tell OpenSG to call
> it after using a framebuffer?
>
> best regards,
> Victor
> _______________________________________________
> Opensg-users mailing list
> Opensg-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/opensg-users
>
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to