pcmi: add support for OpenGL ES 3.0#3094
Merged
j9ac9k merged 2 commits intopyqtgraph:masterfrom Jul 13, 2024
Merged
Conversation
Contributor
Author
|
It turns out that Raspberry Pi OS 32-bits does run on the RPI5 (It runs with a 64-bit kernel and 32-bit userland), so I was able to test out this PR to be working on an OpenGL ES >= 3.0 system and Qt libraries built against OpenGL ES. The import also needs to be fixed to import PyQt5's ES2 module, since on such systems, only that module is available to be imported. |
Contributor
Author
|
Also found out that on Raspberry Pi OS 32-bits (Bookworm), |
Member
|
Thanks @pijyoi for expanding capability! LGTM Merging. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On master, the OpenGL implementation of
PColorMeshItemuses GLSL 1.40 if the OpenGL version is detected to be >= 3.1, otherwise it falls back to shaders that are compatible with both OpenGL 2.0 and OpenGL ES 2.0.This would fail on a system with OpenGL ES >= 3.1, as the GLSL 1.40 shaders are not compatible.
This PR makes the flat shaders compatible with OpenGL ES >= 3.0.
However, I don't have a system with OpenGL ES 3.0 and a Qt compiled against OpenGL ES to actually test it out.
(A Raspberry Pi 4 running 32-bit Raspberry Pi OS would be such a candidate system)
A less ideal fix would be to unconditionally use the non-flat shaders if any version of OpenGL ES is being used.