#11371 Remove GLEW dependency and use Qt's QOpenGLFunctions#13631
Open
#11371 Remove GLEW dependency and use Qt's QOpenGLFunctions#13631
Conversation
Replace embedded GLEW library with Qt's native OpenGL function loading (QOpenGLFunctions/QOpenGLExtraFunctions) to resolve Qt 6 compatibility warnings about GLEW conflicts with qopenglfunctions.h. - Update CVF_CALLSITE_OPENGL macro to provide QOpenGLExtraFunctions pointer - Replace GLEW initialization with Qt OpenGL context validation - Keep direct calls for fixed-function GL (glBegin, glEnd, glMatrixMode, etc.) - Remove glew/ directory containing embedded GLEW source
Qt OpenGL headers conflict with Windows SDK glu.h causing APIENTRY redefinition errors. Remove glu.h includes and replace GLU calls: - gluBuild2DMipmaps -> glTexImage2D + glGenerateMipmap - gluOrtho2D -> glOrtho
0d99dc9 to
739d695
Compare
Collaborator
Author
|
Hi @sigurdp! @magnesj and I would like your input on this PR. Qt6 provides its own OpenGL function resolution infrastructure that replaces the need for GLEW.
Pros:
Cons:
|
Collaborator
Author
|
[1022/2965] Building CXX object Fwk/AppFwk/cafViewer/CMakeFiles/cafViewer.dir/cafViewer.cpp.o |
Member
|
Example from build using Qt 6.7 |
Member
|
Here are 4 relevant Qt documentation links for this PR:
|
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.
Replace embedded GLEW library with Qt's native OpenGL function loading (QOpenGLFunctions/QOpenGLExtraFunctions) to resolve Qt 6 compatibility warnings about GLEW conflicts with qopenglfunctions.h.