Skip to content

Substitute QGL classes with QOpenGL - #764

Merged
devernay merged 4 commits into
RB-2.5from
qopengl-instead-of-qgl
Feb 18, 2022
Merged

devernay merged 4 commits into
RB-2.5from
qopengl-instead-of-qgl

Conversation

@YakoYakoYokuYoku

@YakoYakoYokuYoku YakoYakoYokuYoku commented Jan 30, 2022 •

Copy link
Copy Markdown
Member

PR Description

What type of PR is this? (Check one of the boxes below)

  • Bug fix (non-breaking change which fixes an issue)

What does this pull request do?

Given that the Qt OpenGL module was deprecated in Qt 5.4.0, removed in Qt 6 and most importantly was not functioning under a Wayland session (e.g. alpha output in KDE KWin or corrupted images in Sway), I've replaced its usage with the newer OpenGL integration from Qt Gui and used both type definitions plus preprocessor conditionals for backwards compatibility with Qt 4.

Show a few screenshots (if this is a visual change)

2022-01-30_19-37

Have you tested your changes (if applicable)? If so, how?

By building Natron and using the viewer, the dope sheet editor, the curve editor and the histogram.

Futher details of this pull request

Will post support for Wayland offscreen (OSGLContext) soon.

YakoYakoYokuYoku added a commit that referenced this pull request Jan 30, 2022
YakoYakoYokuYoku added a commit that referenced this pull request Jan 30, 2022
YakoYakoYokuYoku added a commit that referenced this pull request Jan 31, 2022
YakoYakoYokuYoku added a commit that referenced this pull request Jan 31, 2022
@devernay

devernay commented Feb 1, 2022

Copy link
Copy Markdown
Member

Did you test the Qt4 build as well?

@YakoYakoYokuYoku

Copy link
Copy Markdown
Member Author

Yes, although it was only on a Linux box but I think it'll do fine on the other OSes.

@devernay devernay left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

asking for a few changes and explanations

Comment thread Gui/QGLWidgetCompat.h Outdated
Comment thread Gui/TextRenderer.cpp Outdated
Comment thread Gui/ViewerGL.cpp
Comment thread Gui/QGLExtrasCompat.h Outdated
@devernay

devernay commented Feb 6, 2022

Copy link
Copy Markdown
Member

I'll take some time to test on macOS (Qt4 and Qt5). Sorry if it causes some delay

@YakoYakoYokuYoku

Copy link
Copy Markdown
Member Author

I'll take some time to test on macOS (Qt4 and Qt5). Sorry if it causes some delay

No problem with it and thanks for taking the time to test it.

@YakoYakoYokuYoku

Copy link
Copy Markdown
Member Author

@devernay how's testing going? As this is a blocker for some local work, although no problem if testing should take even more time.

@devernay

Copy link
Copy Markdown
Member

good!

@devernay
devernay merged commit 4946c83 into RB-2.5 Feb 18, 2022
@YakoYakoYokuYoku YakoYakoYokuYoku mentioned this pull request Jun 8, 2022
@YakoYakoYokuYoku
YakoYakoYokuYoku deleted the qopengl-instead-of-qgl branch June 18, 2022 18:56
Niik-l pushed a commit to Niik-l/Natron that referenced this pull request Apr 8, 2026
* QOpenGL classes instead of QGL

* Fix build failure in NatronGitHub#764

* Document QGLCompat headers and ViewerGL update

* Fix build with KDE Qt5 git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants