diff options
author | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2015-02-09 08:33:28 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2015-02-11 16:27:31 +0000 |
commit | b8a3b410cf518dfce9e552d153849aeb142f89ff (patch) | |
tree | d9e3bdb398affae518c208455912046593d94bcf /src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp | |
parent | 05c9d6ecddce7bf9b5cc74a2ce6f57fbc9d748fc (diff) |
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 <sean.harmer@kdab.com>
Diffstat (limited to 'src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp')
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
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<QOpenGLFunctions_3_2_Core>(); - gl3funcs->initializeOpenGLFunctions(); - } else { + else gl1funcs = QOpenGLContext::currentContext()->versionFunctions<QOpenGLFunctions_1_0>(); - gl1funcs->initializeOpenGLFunctions(); - } Q_ASSERT(gl1funcs || gl3funcs); if (gl1funcs) gl1funcs->glPointSize(g->lineWidth()); |