diff options
Diffstat (limited to 'src/gui/opengl/qopengltexture.cpp')
-rw-r--r-- | src/gui/opengl/qopengltexture.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/gui/opengl/qopengltexture.cpp b/src/gui/opengl/qopengltexture.cpp index 8bdbdba6f7..901c564a8b 100644 --- a/src/gui/opengl/qopengltexture.cpp +++ b/src/gui/opengl/qopengltexture.cpp @@ -2430,7 +2430,7 @@ bool QOpenGLTexture::hasFeature(Feature feature) bool supported = false; #if !defined(QT_OPENGL_ES_2) - if (!QOpenGLFunctions::isES()) { + if (!ctx->isES()) { switch (feature) { case ImmutableMultisampleStorage: case TextureBuffer: @@ -2487,7 +2487,7 @@ bool QOpenGLTexture::hasFeature(Feature feature) } } - if (QOpenGLFunctions::isES()) + if (ctx->isES()) #endif { switch (feature) { @@ -2522,7 +2522,7 @@ bool QOpenGLTexture::hasFeature(Feature feature) void QOpenGLTexture::setMipBaseLevel(int baseLevel) { #if !defined(QT_OPENGL_ES_2) - if (!QOpenGLFunctions::isES()) { + if (!QOpenGLContext::currentContext()->isES()) { Q_D(QOpenGLTexture); d->create(); Q_ASSERT(d->textureId); @@ -2559,7 +2559,7 @@ int QOpenGLTexture::mipBaseLevel() const void QOpenGLTexture::setMipMaxLevel(int maxLevel) { #if !defined(QT_OPENGL_ES_2) - if (!QOpenGLFunctions::isES()) { + if (!QOpenGLContext::currentContext()->isES()) { Q_D(QOpenGLTexture); d->create(); Q_ASSERT(d->textureId); @@ -2596,7 +2596,7 @@ int QOpenGLTexture::mipMaxLevel() const void QOpenGLTexture::setMipLevelRange(int baseLevel, int maxLevel) { #if !defined(QT_OPENGL_ES_2) - if (!QOpenGLFunctions::isES()) { + if (!QOpenGLContext::currentContext()->isES()) { Q_D(QOpenGLTexture); d->create(); Q_ASSERT(d->textureId); @@ -2706,7 +2706,7 @@ void QOpenGLTexture::generateMipMaps(int baseLevel, bool resetBaseLevel) void QOpenGLTexture::setSwizzleMask(SwizzleComponent component, SwizzleValue value) { #if !defined(Q_OS_MAC) && !defined(QT_OPENGL_ES_2) - if (!QOpenGLFunctions::isES()) { + if (!QOpenGLContext::currentContext()->isES()) { Q_D(QOpenGLTexture); d->create(); Q_ASSERT(d->texFuncs); @@ -2733,7 +2733,7 @@ void QOpenGLTexture::setSwizzleMask(SwizzleValue r, SwizzleValue g, SwizzleValue b, SwizzleValue a) { #if !defined(Q_OS_MAC) && !defined(QT_OPENGL_ES_2) - if (!QOpenGLFunctions::isES()) { + if (!QOpenGLContext::currentContext()->isES()) { Q_D(QOpenGLTexture); d->create(); Q_ASSERT(d->texFuncs); @@ -2782,7 +2782,7 @@ QOpenGLTexture::SwizzleValue QOpenGLTexture::swizzleMask(SwizzleComponent compon void QOpenGLTexture::setDepthStencilMode(QOpenGLTexture::DepthStencilMode mode) { #if !defined(Q_OS_MAC) && !defined(QT_OPENGL_ES_2) - if (!QOpenGLFunctions::isES()) { + if (!QOpenGLContext::currentContext()->isES()) { Q_D(QOpenGLTexture); d->create(); Q_ASSERT(d->texFuncs); @@ -2972,7 +2972,7 @@ QOpenGLTexture::WrapMode QOpenGLTexture::wrapMode(QOpenGLTexture::CoordinateDire void QOpenGLTexture::setBorderColor(QColor color) { #if !defined(QT_OPENGL_ES_2) - if (!QOpenGLFunctions::isES()) { + if (!QOpenGLContext::currentContext()->isES()) { Q_D(QOpenGLTexture); d->create(); Q_ASSERT(d->texFuncs); @@ -3000,7 +3000,7 @@ void QOpenGLTexture::setBorderColor(QColor color) void QOpenGLTexture::setBorderColor(float r, float g, float b, float a) { #if !defined(QT_OPENGL_ES_2) - if (!QOpenGLFunctions::isES()) { + if (!QOpenGLContext::currentContext()->isES()) { Q_D(QOpenGLTexture); d->create(); Q_ASSERT(d->texFuncs); @@ -3031,7 +3031,7 @@ void QOpenGLTexture::setBorderColor(float r, float g, float b, float a) void QOpenGLTexture::setBorderColor(int r, int g, int b, int a) { #if !defined(QT_OPENGL_ES_2) - if (!QOpenGLFunctions::isES()) { + if (!QOpenGLContext::currentContext()->isES()) { Q_D(QOpenGLTexture); d->create(); Q_ASSERT(d->texFuncs); @@ -3064,7 +3064,7 @@ void QOpenGLTexture::setBorderColor(int r, int g, int b, int a) void QOpenGLTexture::setBorderColor(uint r, uint g, uint b, uint a) { #if !defined(QT_OPENGL_ES_2) - if (!QOpenGLFunctions::isES()) { + if (!QOpenGLContext::currentContext()->isES()) { Q_D(QOpenGLTexture); d->create(); Q_ASSERT(d->texFuncs); @@ -3170,7 +3170,7 @@ void QOpenGLTexture::borderColor(unsigned int *border) const void QOpenGLTexture::setMinimumLevelOfDetail(float value) { #if !defined(QT_OPENGL_ES_2) - if (!QOpenGLFunctions::isES()) { + if (!QOpenGLContext::currentContext()->isES()) { Q_D(QOpenGLTexture); d->create(); Q_ASSERT(d->texFuncs); @@ -3207,7 +3207,7 @@ float QOpenGLTexture::minimumLevelOfDetail() const void QOpenGLTexture::setMaximumLevelOfDetail(float value) { #if !defined(QT_OPENGL_ES_2) - if (!QOpenGLFunctions::isES()) { + if (!QOpenGLContext::currentContext()->isES()) { Q_D(QOpenGLTexture); d->create(); Q_ASSERT(d->texFuncs); @@ -3243,7 +3243,7 @@ float QOpenGLTexture::maximumLevelOfDetail() const void QOpenGLTexture::setLevelOfDetailRange(float min, float max) { #if !defined(QT_OPENGL_ES_2) - if (!QOpenGLFunctions::isES()) { + if (!QOpenGLContext::currentContext()->isES()) { Q_D(QOpenGLTexture); d->create(); Q_ASSERT(d->texFuncs); @@ -3282,7 +3282,7 @@ QPair<float, float> QOpenGLTexture::levelOfDetailRange() const void QOpenGLTexture::setLevelofDetailBias(float bias) { #if !defined(QT_OPENGL_ES_2) - if (!QOpenGLFunctions::isES()) { + if (!QOpenGLContext::currentContext()->isES()) { Q_D(QOpenGLTexture); d->create(); Q_ASSERT(d->texFuncs); |