aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/PySide6/QtOpenGLFunctions
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2021-03-11 15:31:17 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2021-03-11 17:24:46 +0100
commit091f488479227c58fd3944d68c48fc7efe223f9e (patch)
tree2de0a4efb5c2b3904b7b269e469e26e4d7e3bf39 /sources/pyside6/PySide6/QtOpenGLFunctions
parent146b3cb79c3f0927df3d7c5d9fdc9c67b976051d (diff)
PySide6: Add QOpenGLVersionFunctionsFactory
Make it possible to obtain versioned OpenGL functions. Task-number: PYSIDE-1482 Fixes: PYSIDE-955 Pick-to: 6.0 Change-Id: Ife315de0aa05ac83610e228389bcf55214e93e55 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/pyside6/PySide6/QtOpenGLFunctions')
-rw-r--r--sources/pyside6/PySide6/QtOpenGLFunctions/CMakeLists.txt3
-rw-r--r--sources/pyside6/PySide6/QtOpenGLFunctions/QtOpenGLFunctions_global.post.h.in1
-rw-r--r--sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions.xml8
3 files changed, 11 insertions, 1 deletions
diff --git a/sources/pyside6/PySide6/QtOpenGLFunctions/CMakeLists.txt b/sources/pyside6/PySide6/QtOpenGLFunctions/CMakeLists.txt
index 5ac197801..296c525cf 100644
--- a/sources/pyside6/PySide6/QtOpenGLFunctions/CMakeLists.txt
+++ b/sources/pyside6/PySide6/QtOpenGLFunctions/CMakeLists.txt
@@ -39,7 +39,8 @@ else()
${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_4_compatibility_wrapper.cpp
${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_4_core_wrapper.cpp
${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_5_compatibility_wrapper.cpp
- ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_5_core_wrapper.cpp)
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_4_5_core_wrapper.cpp
+ ${QtOpenGLFunctions_GEN_DIR}/qopenglversionfunctionsfactory_wrapper.cpp)
message(STATUS "Qt${QT_MAJOR_VERSION}OpenGLFunctions: Adding Desktop OpenGL classes")
endif()
diff --git a/sources/pyside6/PySide6/QtOpenGLFunctions/QtOpenGLFunctions_global.post.h.in b/sources/pyside6/PySide6/QtOpenGLFunctions/QtOpenGLFunctions_global.post.h.in
index c25343e05..0f0744ba5 100644
--- a/sources/pyside6/PySide6/QtOpenGLFunctions/QtOpenGLFunctions_global.post.h.in
+++ b/sources/pyside6/PySide6/QtOpenGLFunctions/QtOpenGLFunctions_global.post.h.in
@@ -55,6 +55,7 @@
# include <QtOpenGL/qopenglfunctions_4_4_core.h>
# include <QtOpenGL/qopenglfunctions_4_5_compatibility.h>
# include <QtOpenGL/qopenglfunctions_4_5_core.h>
+# include <QtOpenGL/qopenglversionfunctionsfactory.h>
#endif
#if QT_CONFIG(opengles2)
# include <QtOpenGL/qopenglfunctions_es2.h>
diff --git a/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions.xml b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions.xml
index 819adca6a..4f3c4487f 100644
--- a/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions.xml
+++ b/sources/pyside6/PySide6/QtOpenGLFunctions/typesystem_openglfunctions.xml
@@ -399,6 +399,14 @@
&openglfunctions_modifications1_0;
&openglfunctions_modifications1_1;
</object-type>
+
+ <object-type name="QOpenGLVersionFunctionsFactory">
+ <modify-function signature="get(const QOpenGLVersionProfile &amp;,QOpenGLContext *)">
+ <inject-code class="target" position="beginning" file="../glue/qtopenglfunctions.cpp"
+ snippet="qopenglversionfunctionsfactory-get"/>
+ </modify-function>
+ </object-type>
+
<suppress-warning text="^There's no user provided way.*QOpenGLFunctions_\d_\d.*::glIndex.*$"/>
</typesystem>