Switch to new Qt 5.4+ OpenGL APIs (from QGLWidget)
Use QOpenGLFunctions to select a particular OpenGL version (3.3).
Qt 5.4 introduces new OpenGL classes for modern OpenGL. We should start using them.
QOpenGLWindowhas some substantial advantages:
- No need to reserve resources for partial window updates.
- Native window can be recreated without destroying the window instance (for changing surface format).
- A signal is emitted when the frame has been swapped (for simpler/timer-less frame updates).
See blog post: Completing the offering: QOpenGLWindow and QRasterWindow
Refactor|Canvas: Merged Canvas and CanvasWindow, added QtInputSource
CanvasWindow was removed, and Canvas now represents a complete native
window with an OpenGL drawing surface that covers the entire window.
The input event processing was moved into its own class to prepare
for input plugins.
Canvas is now derived from QOpenGLWindow, which removes all the
QWidget related baggage from window painting.
#13 Updated by skyjake over 4 years ago
- % Done changed from 20 to 40
I've been working on the use of
QOpenGLWindow. It is now mostly working with Qt 5.4, however at least on OS X it does have some slight bugs when compared to the QWidget approach (for example, mouse cursor hiding and fullscreen toggling do not work quite as well/reliably).
#22 Updated by skyjake about 3 years ago
- Status changed from Progressed to In Progress
- Target version changed from Rendering to 2.0 – Home UI & Packages
- % Done changed from 60 to 90
- Re-enable FSAA for player 3D view rendering (when configured).
- Check that the Windows and X11 builds are also working correctly. Hopefully now that all of OpenGL access happens via the Qt abstraction layer, things should be more robust.
It should be noted that for GUI builds, this makes Qt 5.4 the minimum requirement. Non-GUI builds should work with older Qt 5 versions as well (at least 5.3).