Is it possible to hack GTK to render OpenGL texture?

I am writing an OpenGL game and want the custom GUI elements to be similar. I was wondering if someone had successfully hacked GTK + using GtkOffscreenWindow and gtk_offscreen_window_get_pixbuf to render OpenGL texture, and whether it would have reasonable performance, considering re-loading the texture data every time the GUI is updated.

+4
source share
1 answer

While this is certainly possible, I would instead use the real toolkit of an OpenGL widget such as Clutter. If you want to display GTK + with OpenGL, I would start by creating a new GDK backend (X11 / OpenGL or something similar) that (re) implements all the GDK drawing functions using OpenGL. A good side effect would be that all GTK + windows would allow for normal OpenGL rendering, i.e. No longer needed for the GtkGLWidget class.

+1
source

All Articles