Re: [GtkGLExt] Fwd: Re: GtkGlExt & GTK3



Carlos, I am not an OpenGL expert. I just wrote my first OpenGL code, based on the SigGraph video "An Introduction to OpenGL Progranmming". It uses a vertex and fragment shader to put put up an orientable cube on the screen. I ported this to Gtk2GlExtMM, and I don't see how GTK could be offering a better interface. From what I saw, GTK is offering a fully functional window, allowing for widgets, and an OpenGL region into which to write. I did not feel encumbered in any way, nor do I think the efficiency of the code was impeded. But, I have little experience in this field.

How would GTK need to be upgraded to do OpenGL better? How would it be better?
-- More efficient at run-time?
-- More flexibility for the programmer?
-- Allow a fuller OpenGL functionality?

I am asking out of curiosity, and am not presuming to be arguing against what you have said.

Thank you.





On 02/11/2014 12:23 PM, Carlos Pereira wrote:

gtk 3 does support OpenGL. With clutter and cogl you can integrate plain
OpenGL into your application. Maybe it's not as smooth as as Qt's OpenGl
widget, but it is better to use than this abandoned GtkGlExt.
I am sorry this is just not true. As far as I can see Gtk 3 does not support OpenGL. Like Gtk 2. Like Gtk 1.

This is so painfully obvious that it really hurts. Supporting OpenGL is not to build a new API, a new toolkit, a new software layer between user code and OpenGL (or even worse, to write a poor replacement for OpenGL).

I have been in the Gtk developers list since 1999, every 5 years we come again to this issue, to no avail. After almost 15 years watching Gtk developers telling nonsense about OpenGL, I came to the conclusion that Gtk developers don't even understand the issue. It is mildly offensive to ask OpenGL programmers to throw away their optimized OpenGL code and replace it by some clutter API that translates to... OpenGL code!

There are hundreds of books about OpenGL, please buy one and learn OpenGL before posting these ridiculous statements.

All that is needed to bridge Gtk 2 and OpenGL under X11 are about 250 lines of C code. I know because I distribute two versions of my package, one uses GtkGLExt, the other uses my own code. If you are really serious about this, I can point you to these packages and explain in detail the relevant C code. And I am not even an expert, I came to this code reading all I could about this...

We have been asking for 15 years to include something like these 250 lines of code, that is ALL that is needed to bridge GtK and OpenGL (some of this code is specific for the X Window System - for Wayland, Windows and Mac OS X you will need some slightly different code). Even these 250 lines, many are comments and space lines... This is so ridiculous...

Carlos



Attachment: smime.p7s
Description: S/MIME Cryptographic Signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]