Project

General

Profile

Feature #1675

Switch to new Qt 5.4+ OpenGL APIs (from QGLWidget)

Added by skyjake over 10 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Redesign
Start date:
2013-10-24
% Done:

100%


Description

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.

QOpenGLWindow has 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


Related issues

Related to Feature #1900: OpenGL 3.3 Core ProfileClosed2014-11-18

Related to Feature #1794: Mobile apps and shared client/server code (more modular code structure)Closed2014-05-02

Related to Feature #1991: Qt 5.5 as minimum requirement for GUI, Qt 5.x for non-GUI buildClosed2015-03-10

Follows Feature #1637: Switch to Qt 5Closed2013-10-23

Associated revisions

Revision ded41a1c (diff)
Added by skyjake about 9 years ago

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.

IssueID #1675

History

#1 Updated by skyjake over 9 years ago

  • Subject changed from Switch to QWindow from QGLWidget to Switch to QOpenGLWidget (from QGLWidget)
  • Description updated (diff)
  • Assignee set to skyjake
  • Target version set to 42

#2 Updated by skyjake over 9 years ago

#3 Updated by skyjake over 9 years ago

  • Subject changed from Switch to QOpenGLWidget (from QGLWidget) to Switch to QOpenGLWindow (from QGLWidget)

#4 Updated by skyjake over 9 years ago

  • Description updated (diff)
  • Priority changed from Normal to High

#5 Updated by skyjake over 9 years ago

  • Due date deleted (2013-10-24)

#6 Updated by skyjake about 9 years ago

  • Description updated (diff)

#7 Updated by skyjake about 9 years ago

  • Priority changed from High to Urgent

#8 Updated by skyjake about 9 years ago

  • Status changed from New to In Progress

#9 Updated by skyjake about 9 years ago

  • % Done changed from 0 to 10

#10 Updated by skyjake about 9 years ago

  • Related to Feature #1794: Mobile apps and shared client/server code (more modular code structure) added

#11 Updated by skyjake about 9 years ago

  • % Done changed from 10 to 20

Linked with #1794 as QOpenGLWindow is much more mobile-friendly (simpler) than QWidgets.

#12 Updated by skyjake almost 9 years ago

  • Target version changed from 42 to 2.0 – Home UI & Packages

#13 Updated by skyjake almost 9 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).

#14 Updated by skyjake almost 9 years ago

  • % Done changed from 40 to 60

#15 Updated by skyjake almost 9 years ago

I've checked that Windows and Unix/X11 builds are working with QOpenGLWindow, too. However, there are many small issues that need polishing regarding the behavior of the window (sizing during startup, mouse grabbing, etc.).

#16 Updated by skyjake almost 9 years ago

I'm postponing this work until Qt 5.5 is released (which should be very soon), so we can see if the platform-specific window behavior is improved. For instance, the OS X fullscreen / virtual desktop feature was not enabled on the QOpenGLWindow in Qt 5.4.

#17 Updated by skyjake over 8 years ago

  • Priority changed from Urgent to High

#18 Updated by skyjake about 8 years ago

  • Target version changed from 2.0 – Home UI & Packages to Rendering

#19 Updated by skyjake about 8 years ago

  • Subject changed from Switch to QOpenGLWindow (from QGLWidget) to Switch to new Qt OpenGL APIs (from QGLWidget)

#20 Updated by skyjake about 8 years ago

  • Description updated (diff)

#21 Updated by skyjake almost 8 years ago

  • Status changed from In Progress to Progressed

#22 Updated by skyjake over 7 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
I've been working on this recently. The remaining to-dos:
  • 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).

#23 Updated by skyjake over 7 years ago

  • Subject changed from Switch to new Qt OpenGL APIs (from QGLWidget) to Switch to new Qt 5.4+ OpenGL APIs (from QGLWidget)

#24 Updated by skyjake over 7 years ago

  • Related to Feature #1991: Qt 5.5 as minimum requirement for GUI, Qt 5.x for non-GUI build added

#25 Updated by skyjake over 7 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 90 to 100

#26 Updated by skyjake over 7 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF