diff options
author | Mike Krus <mike.krus@kdab.com> | 2020-04-27 11:56:17 +0100 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2020-05-06 15:29:54 +0200 |
commit | 764924da8ab3255c1b8d1ad5b39f85675f4b855e (patch) | |
tree | c7b3e9d94318fd347ef2717feb5b539f5c18ff13 /src/plugins/renderers/opengl/textures | |
parent | 9838d91e2d433f13c57bdae48e31ba0b909988aa (diff) |
Fix build for Qt6
- updated dependencies, excluding qtgamepad for now
- fixed issues with Q_PROPERTY not supporting forward declarations
- fixed for changes in QtQuick private API
- fixed for changes in QtOpenGLVersionFunctions API
- fixed for removal of QT_OPENGL_ES* macros
- fixed for changes in QtConcurrent API
- fixed RHI based build
Change-Id: I42ccd2f101b7f0a78e2860c6d551722bf6710a11
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/plugins/renderers/opengl/textures')
-rw-r--r-- | src/plugins/renderers/opengl/textures/gltexture.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/plugins/renderers/opengl/textures/gltexture.cpp b/src/plugins/renderers/opengl/textures/gltexture.cpp index 30247a719..a44ef6877 100644 --- a/src/plugins/renderers/opengl/textures/gltexture.cpp +++ b/src/plugins/renderers/opengl/textures/gltexture.cpp @@ -45,6 +45,7 @@ #include <private/qopengltexturehelper_p.h> #include <QDebug> #include <QOpenGLFunctions> +#include <QtOpenGL/QOpenGLVersionFunctionsFactory> #include <QOpenGLTexture> #include <QOpenGLPixelTransferOptions> #include <Qt3DRender/qtexture.h> @@ -55,7 +56,7 @@ #include <Qt3DRender/private/qtextureimagedata_p.h> #include <renderbuffer_p.h> -#if !defined(QT_OPENGL_ES_2) +#if !QT_CONFIG(opengles2) #include <QOpenGLFunctions_3_1> #include <QOpenGLFunctions_4_5_Core> #endif @@ -660,7 +661,7 @@ void GLTexture::introspectPropertiesFromSharedTextureId() const QAbstractTexture::Target targets[] = { QAbstractTexture::Target2D, QAbstractTexture::TargetCubeMap, -#ifndef QT_OPENGL_ES_2 +#if !QT_CONFIG(opengles2) QAbstractTexture::Target1D, QAbstractTexture::Target1DArray, QAbstractTexture::Target3D, @@ -673,13 +674,13 @@ void GLTexture::introspectPropertiesFromSharedTextureId() #endif }; -#ifndef QT_OPENGL_ES_2 +#if !QT_CONFIG(opengles2) // Try to find texture target with GL 4.5 functions const QPair<int, int> ctxGLVersion = ctx->format().version(); if (ctxGLVersion.first > 4 || (ctxGLVersion.first == 4 && ctxGLVersion.second >= 5)) { // Only for GL 4.5+ #ifdef GL_TEXTURE_TARGET - QOpenGLFunctions_4_5_Core *gl5 = ctx->versionFunctions<QOpenGLFunctions_4_5_Core>(); + QOpenGLFunctions_4_5_Core *gl5 = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_4_5_Core>(); if (gl5 != nullptr) gl5->glGetTextureParameteriv(m_sharedTextureId, GL_TEXTURE_TARGET, reinterpret_cast<int *>(&m_properties.target)); #endif @@ -694,7 +695,7 @@ void GLTexture::introspectPropertiesFromSharedTextureId() const GLenum targetBindings[] = { GL_TEXTURE_BINDING_2D, GL_TEXTURE_BINDING_CUBE_MAP, -#ifndef QT_OPENGL_ES_2 +#if !QT_CONFIG(opengles2) GL_TEXTURE_BINDING_1D, GL_TEXTURE_BINDING_1D_ARRAY, GL_TEXTURE_BINDING_3D, @@ -748,10 +749,10 @@ void GLTexture::introspectPropertiesFromSharedTextureId() gl->glGetTexParameteriv(int(m_properties.target), GL_TEXTURE_WRAP_S, reinterpret_cast<int *>(&m_parameters.wrapModeY)); gl->glGetTexParameteriv(int(m_properties.target), GL_TEXTURE_WRAP_T, reinterpret_cast<int *>(&m_parameters.wrapModeZ)); -#ifndef QT_OPENGL_ES_2 +#if !QT_CONFIG(opengles2) // Try to retrieve dimensions (not available on ES 2.0) if (!ctx->isOpenGLES()) { - QOpenGLFunctions_3_1 *gl3 = ctx->versionFunctions<QOpenGLFunctions_3_1>(); + QOpenGLFunctions_3_1 *gl3 = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_3_1>(); if (!gl3) { qWarning() << "Failed to retrieve shared texture dimensions"; return; |