summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopenglpaintengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/opengl/qopenglpaintengine.cpp')
-rw-r--r--src/gui/opengl/qopenglpaintengine.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/opengl/qopenglpaintengine.cpp b/src/gui/opengl/qopenglpaintengine.cpp
index 63127668a5..7fa80c5343 100644
--- a/src/gui/opengl/qopenglpaintengine.cpp
+++ b/src/gui/opengl/qopenglpaintengine.cpp
@@ -221,7 +221,7 @@ void QOpenGL2PaintEngineExPrivate::updateBrushTexture()
currentBrushPixmap = currentBrushPixmap.scaled(max_texture_size, max_texture_size, Qt::KeepAspectRatio);
GLuint wrapMode = GL_REPEAT;
- if (QOpenGLFunctions::isES()) {
+ if (QOpenGLContext::currentContext()->isES()) {
// OpenGL ES does not support GL_REPEAT wrap modes for NPOT textures. So instead,
// we emulate GL_REPEAT by only taking the fractional part of the texture coords
// in the qopenglslTextureBrushSrcFragmentShader program.
@@ -542,7 +542,7 @@ void QOpenGL2PaintEngineEx::beginNativePainting()
d->funcs.glDisableVertexAttribArray(i);
#ifndef QT_OPENGL_ES_2
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
Q_ASSERT(QOpenGLContext::currentContext());
const QOpenGLContext *ctx = d->ctx;
const QSurfaceFormat &fmt = d->device->context()->format();
@@ -600,7 +600,7 @@ void QOpenGL2PaintEngineExPrivate::resetGLState()
setVertexAttribArrayEnabled(QT_TEXTURE_COORDS_ATTR, false);
setVertexAttribArrayEnabled(QT_VERTEX_COORDS_ATTR, false);
setVertexAttribArrayEnabled(QT_OPACITY_ATTR, false);
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
// gl_Color, corresponding to vertex attribute 3, may have been changed
float color[] = { 1.0f, 1.0f, 1.0f, 1.0f };
funcs.glVertexAttrib4fv(3, color);
@@ -1335,7 +1335,7 @@ void QOpenGL2PaintEngineEx::renderHintsChanged()
state()->renderHintsChanged = true;
#ifndef QT_OPENGL_ES_2
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
if ((state()->renderHints & QPainter::Antialiasing)
|| (state()->renderHints & QPainter::HighQualityAntialiasing))
glEnable(GL_MULTISAMPLE);
@@ -2012,7 +2012,7 @@ bool QOpenGL2PaintEngineEx::begin(QPaintDevice *pdev)
d->glyphCacheFormat = QFontEngine::Format_A8;
#ifndef QT_OPENGL_ES_2
- if (!QOpenGLFunctions::isES()) {
+ if (!QOpenGLContext::currentContext()->isES()) {
glDisable(GL_MULTISAMPLE);
d->glyphCacheFormat = QFontEngine::Format_A32;
d->multisamplingAlwaysEnabled = false;