Session:"OpenGL doesn't work that way…" an informal look at how popular toolkits impair the use of OpenGL
|Description||OpenGL is old. The specification of the first version of the API has been published over 20 years ago. Yet the major toolkits still don't get the very basics right, making it unnecessarily hard to do advanced stuff.
In this session you'll learn how to do it right. If you're a GUI toolkit dev, you're warmly invited.
|Tags||opengl, toolkits, graphics, vulkan, X11, GLX, WGL, GDI|
|Language||en - English |
en - English
|Other sessions... ... further results|
|Starts at||2015/08/14 22:15|
|Ends at||2015/08/14 23:45|
OpenGL is old. The specification of the first version of the API has been published over 20 years ago.
OpenGL is new. The first specification for the thoroughly modernized core-profile API has been published only 5 years ago.
Despite that history it's surprising that even after years of being actively in use the major toolkits (GTK, Qt5) still don't get right some of the very fundamentals of the interaction between OpenGL and the supporting graphics infrastructure. This is even moreso surprising as the very same toolkits are now starting to use OpenGL for their own graphical output, which makes it even harder to work around their issues.
Skills and knowledge you should bring:
- Understanding of C or C++ (we'll focus on C) for the sake of not having to get a metric ton of bindings to work. - Know how to use OpenGL if you're given a working OpenGL context and window (not going to teach GLSL or the OpenGL API). - Some familiarity with concurrent programming. - A little bit of experience using the naked X11/Xlib and/or the Windows/GDI APIs.
Stuff you should bring:
- Computer with a reasonably new GPU that supports OpenGL-3 and has the proper drivers installed. - Linux with Mesa-devel and X11-devel packages as well as Wine and a MinGW cross compiler installed (the Wine support for WGL is reasonably conformant with the actual thing). - Optionally Windows on a Dual-Boot partition (no VM!) with some compiler toolchain (MinGW, Windows Plattform SDK) or some IDE (VisualStudio Express, QtCreator) installed. Important Notice: If you bring a Windows installation, update the graphics drivers to their latest version obtained through the GPU vendor's website!
"Write" a 100% robust, thread and concurrency safe and reusable library for creating OpenGL context and drawables for the Windows GDI that gives direct access to the supporting graphics system ("write" is in quotes, since I've already written that library, and we're going to recreate it). Then we'll port it over to GLX.
Having that done we're going to do a few "crazy" things with OpenGL using that library for our framework. Finally you get the exercise to port those "crazy" things to use Qt5 and/or GTK+ (and getting the experience of pulling your hair in the process).
Finally we're taking a look at AMD Mantle, which forms the base of the soon to be released Vulkan API, which is expected to replace OpenGL in the long term.