GtkRadiant
GtkRadiant copied to clipboard
[enhancement] Switch to GtkGLArea
With Gtk+3.16 there is a new GL render widget available, thus making the use of the old GtkGLExt library not needed.
Some preprocessor checks cloud be used determine what widget should be used. One great thing about this is that it works on any platform that GDK can provide a GL context to (Wayland, Mir and so on).
C: https://developer.gnome.org/gtk3/stable/GtkGLArea.html C++ (Gtkmm): https://developer.gnome.org/gtkmm/stable/classGtk_1_1GLArea.html
example: https://github.com/ebassi/glarea-example
GDK: https://developer.gnome.org/gdk3/unstable/GdkGLContext.html
Just a thought...
Yes, this has come up before. We are still using gtk2 at this time, @Pan7 has done some work towards upgrading us to gtk3, which would be a prerequisite as I understand.
There is GtkGLArea support in the gtk3 branch https://github.com/TTimo/GtkRadiant/blob/gtk3/radiant/glwidget.cpp#L40 But GtkGLArea didn't support opengl 1, does it now?
I don't see any indication that GtkGLArea would only support some newer OpenGL versions, and not the old fixed function paths that we are using.
Was not able to use it with OpenGL1 when i tested it.
https://developer.gnome.org/gdk3/stable/GdkGLContext.html#gdk-gl-context-is-legacy Can't force gtkglarea to use OpenGL 1 (via gtk_gl_area_set_required_version).
The doc states that GdkGLContext attempts to create a 3.2 core profile by default, but can fallback to legacy when that's not possible. If gtk_gl_area_set_required_version doesn't work that could be a bug or a problem in setup, but it sounds possible to setup as GL 1.2 fixed function
Can't, see http://stackoverflow.com/questions/37909072/gtkglarea-unable-to-create-opengl-2-1-context
"GDK creates GL contexts internally for drawing." - alright that's be why .. guess we could look at upgrading the rendering to VBOs and all .. fun project???
Sent from my iPhone
On Apr 15, 2017, at 15:27, Pan7 [email protected] wrote:
Can't, see http://stackoverflow.com/questions/37909072/gtkglarea-unable-to-create-opengl-2-1-context
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.