diff options
author | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2010-11-02 11:16:51 (GMT) |
---|---|---|
committer | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2010-11-02 12:09:02 (GMT) |
commit | 128d0c2d64abec366cec22dfca493e6f5e03aa9d (patch) | |
tree | 9f1b5988b374d2e8f8ed7dffc813395dba37b663 | |
parent | 27fcfeba19b5984795fdb427be625bb83257d225 (diff) | |
download | Qt-128d0c2d64abec366cec22dfca493e6f5e03aa9d.zip Qt-128d0c2d64abec366cec22dfca493e6f5e03aa9d.tar.gz Qt-128d0c2d64abec366cec22dfca493e6f5e03aa9d.tar.bz2 |
Fixed index type after reapplying commit 89cbb165.
Made the code added with commit 89cbb165 use ushort indices on
systems which don't support uint indices, like commit 207d9239
did with the rest of the GL paint engine.
Reviewed-by: Samuel
-rw-r--r-- | src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index d00723a..b90709f 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -890,7 +890,10 @@ void QGL2PaintEngineExPrivate::fill(const QVectorPath& path) prepareForDraw(currentBrush.isOpaque()); setVertexAttributePointer(QT_VERTEX_COORDS_ATTR, vertices.constData()); - glDrawElements(GL_TRIANGLES, polys.indices.size(), GL_UNSIGNED_INT, polys.indices.constData()); + if (QGLExtensions::glExtensions() & QGLExtensions::ElementIndexUint) + glDrawElements(GL_TRIANGLES, polys.indices.size(), GL_UNSIGNED_INT, polys.indices.data()); + else + glDrawElements(GL_TRIANGLES, polys.indices.size(), GL_UNSIGNED_SHORT, polys.indices.data()); } else { // We can't handle big, concave painter paths with OpenGL without stencil buffer. qWarning("Painter path exceeds +/-32767 pixels."); |