summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h')
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
index 16a7aacf20..8f43a906c0 100644
--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
+++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
@@ -57,6 +57,7 @@
#include <private/qgl_p.h>
#include <qglshaderprogram.h>
#include <qglframebufferobject.h>
+#include <qopenglfunctions.h>
// #define QT_GL_TEXTURE_GLYPH_CACHE_DEBUG
@@ -73,7 +74,7 @@ struct QGLGlyphTexture : public QOpenGLSharedResource
, m_height(0)
{
if (ctx && QGLFramebufferObject::hasOpenGLFramebufferObjects() && !ctx->d_ptr->workaround_brokenFBOReadBack)
- glGenFramebuffers(1, &m_fbo);
+ ctx->contextHandle()->functions()->glGenFramebuffers(1, &m_fbo);
#ifdef QT_GL_TEXTURE_GLYPH_CACHE_DEBUG
qDebug(" -> QGLGlyphTexture() %p for context %p.", this, ctx);
@@ -88,8 +89,8 @@ struct QGLGlyphTexture : public QOpenGLSharedResource
#else
Q_UNUSED(ctx);
#endif
- if (m_fbo)
- glDeleteFramebuffers(1, &m_fbo);
+ if (ctx && m_fbo)
+ ctx->contextHandle()->functions()->glDeleteFramebuffers(1, &m_fbo);
if (m_width || m_height)
glDeleteTextures(1, &m_texture);
}