Re: Gtk::GLArea throws "Couldn't find current GLX or EGL context.\n"' on unrealizing

Gerlof Fokkema via gtkmm-list <[email protected]>
Newsgroups gmane.comp.gnome.gtkmm
Message-ID <CAAk3=uuL_3ksAJfJ-2dCV0maUaiAefMi6rYoneLnzXRGOTi+Eg@mail.gmail.com>
Dear list,

I've fixed the issue by changing Gtk::GLArea to a managed widget
instead of using it as a class member.
See https://gist.github.com/gfokkema/a0c73de5c9df476b5b31057ebb63394f/revisions
linked earlier.

This somehow fixes the call order of dispose and unrealize.
Thanks @Alexander for setting me on that path.

I can work with this solution, but I do suspect something in gtkmm /
gtkglarea is weird,
since the verbatim gtkglarea demo for gtkmm does not seem to function properly.

Kind regards,
Gerlof Fokkema

On Fri, Dec 6, 2019 at 10:01 PM Gerlof Fokkema <[email protected]> wrote:
>
> Hello Daniel,
>
> The call ordering seems to reverse when using gtkmm.
> Thus gtkmm seems to do something that causes that.
>
> Hacked up a quick demo without gtkmm here:
> https://gist.github.com/gfokkema/3aa94c1fc645efad6dba488d3c2fe8f2
>
> With the same breakpoints:
> gtkglarea.c:195: gtk_gl_area_dispose
> gtkglarea.c:575: gtk_gl_area_unrealize
>
> Now gtk_gl_area_unrealize is called first and then
> gtk_gl_area_dispose, which seems more logical indeed.
>
> Regards,
> Gerlof Fokkema
>
> On Fri, Dec 6, 2019 at 9:18 PM Daniel Boles via gtkmm-list
> <[email protected]> wrote:
> >
> > If so, that needs reported on the GTK bug tracker, not the gtkmm mailing list.
> > _______________________________________________
> > gtkmm-list mailing list
> > [email protected]
> > https://mail.gnome.org/mailman/listinfo/gtkmm-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.