diff options
author | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-04-08 15:05:21 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-23 12:23:09 +0200 |
commit | e950557e1133e8aac65a453597ab35400a5b9a10 (patch) | |
tree | 835e04f12a584274cec65efaa6071001247417ee /src/quick/scenegraph/coreapi/qsgmaterial.cpp | |
parent | 8a28462c13907800caf44c16580e0b2a2ee99f69 (diff) |
Avoid direct GL calls in Quick
Change-Id: I9b8673fb3292c9d5ad2f9e8e63f56dc661699be6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/quick/scenegraph/coreapi/qsgmaterial.cpp')
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgmaterial.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgmaterial.cpp b/src/quick/scenegraph/coreapi/qsgmaterial.cpp index 22fe29959e..c4800a5cac 100644 --- a/src/quick/scenegraph/coreapi/qsgmaterial.cpp +++ b/src/quick/scenegraph/coreapi/qsgmaterial.cpp @@ -346,7 +346,8 @@ void QSGMaterialShader::compile() char const *const *attr = attributeNames(); #ifndef QT_NO_DEBUG int maxVertexAttribs = 0; - glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &maxVertexAttribs); + QOpenGLFunctions *funcs = QOpenGLContext::currentContext()->functions(); + funcs->glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &maxVertexAttribs); for (int i = 0; attr[i]; ++i) { if (i >= maxVertexAttribs) { qFatal("List of attribute names is either too long or not null-terminated.\n" |