summaryrefslogtreecommitdiffstats
path: root/src/datavisualization/utils/texturehelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/datavisualization/utils/texturehelper.cpp')
-rw-r--r--src/datavisualization/utils/texturehelper.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/datavisualization/utils/texturehelper.cpp b/src/datavisualization/utils/texturehelper.cpp
index 0e66459c..4ff56cb3 100644
--- a/src/datavisualization/utils/texturehelper.cpp
+++ b/src/datavisualization/utils/texturehelper.cpp
@@ -47,8 +47,7 @@ TextureHelper::TextureHelper()
// Discard warnings about deprecated functions
QtMessageHandler handler = qInstallMessageHandler(discardDebugMsgs);
- m_openGlFunctions_2_1 =
- QOpenGLContext::currentContext()->versionFunctions<QOpenGLFunctions_2_1>();
+ m_openGlFunctions_2_1 = new QOpenGLFunctions_2_1;
if (m_openGlFunctions_2_1)
m_openGlFunctions_2_1->initializeOpenGLFunctions();
@@ -63,6 +62,7 @@ TextureHelper::TextureHelper()
TextureHelper::~TextureHelper()
{
+ delete m_openGlFunctions_2_1;
}
GLuint TextureHelper::create2DTexture(const QImage &image, bool useTrilinearFiltering,
@@ -328,7 +328,7 @@ GLuint TextureHelper::createDepthTextureFrameBuffer(const QSize &size, GLuint &f
// Attach texture to depth attachment
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, depthtextureid, 0);
- m_openGlFunctions_2_1->glDrawBuffer(GL_NONE);
+ m_openGlFunctions_2_1->glDrawBuffers(0, GL_NONE);
m_openGlFunctions_2_1->glReadBuffer(GL_NONE);
// Verify that the frame buffer is complete