From b8a3b410cf518dfce9e552d153849aeb142f89ff Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 9 Feb 2015 08:33:28 +0100 Subject: Remove unnecessary calls to initializeOpenGLFunctions We now have a change in QtGui that guarantees that the returned versionfunctions object is initialized as long as the context is current. Change-Id: I2e76e91bb4265a95fae657f6cacd92a789d56782 Reviewed-by: Sean Harmer --- src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp') diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp index bd91841b1c..8da14a3893 100644 --- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp +++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp @@ -2414,13 +2414,10 @@ void Renderer::renderUnmergedBatch(const Batch *batch) else if (!QOpenGLContext::currentContext()->isOpenGLES() && g->drawingMode() == GL_POINTS) { QOpenGLFunctions_1_0 *gl1funcs = 0; QOpenGLFunctions_3_2_Core *gl3funcs = 0; - if (QOpenGLContext::currentContext()->format().profile() == QSurfaceFormat::CoreProfile) { + if (QOpenGLContext::currentContext()->format().profile() == QSurfaceFormat::CoreProfile) gl3funcs = QOpenGLContext::currentContext()->versionFunctions(); - gl3funcs->initializeOpenGLFunctions(); - } else { + else gl1funcs = QOpenGLContext::currentContext()->versionFunctions(); - gl1funcs->initializeOpenGLFunctions(); - } Q_ASSERT(gl1funcs || gl3funcs); if (gl1funcs) gl1funcs->glPointSize(g->lineWidth()); -- cgit v1.2.3