diff options
author | Samuel Rødal <sroedal@trolltech.com> | 2009-02-18 08:42:04 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar@trolltech.com> | 2009-04-01 14:32:50 (GMT) |
commit | 6513e4b9513dfc591c53744517f05aa3c522ace3 (patch) | |
tree | ee8c28657b0f1961d260b9ae22e24308e40200f7 /src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp | |
parent | a49ec03834b14063b4130c410d59df6e8c4db8ce (diff) | |
download | Qt-6513e4b9513dfc591c53744517f05aa3c522ace3.zip Qt-6513e4b9513dfc591c53744517f05aa3c522ace3.tar.gz Qt-6513e4b9513dfc591c53744517f05aa3c522ace3.tar.bz2 |
Fixes: GL 2 paint engine text rendering optimization.
RevBy: Tom
Details: Buffer vertex and texture coordinates so that we get away
with just a single glDrawArrays call per text item.
Also move drawCachedGlyphs() into the private class.
Diffstat (limited to 'src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp')
-rw-r--r-- | src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp b/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp index 0352d39..f237847 100644 --- a/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp +++ b/src/opengl/gl2paintengineex/qgl2pexvertexarray.cpp @@ -59,6 +59,12 @@ QGLRect QGL2PEXVertexArray::boundingRect() const return QGLRect(minX, minY, maxX, maxY); } +void QGL2PEXVertexArray::addRect(const QRectF &rect) +{ + vertexArray << rect.topLeft() << rect.topRight() << rect.bottomRight() + << rect.bottomRight() << rect.bottomLeft() << rect.topLeft(); +} + void QGL2PEXVertexArray::addPath(const QVectorPath &path, GLfloat curveInverseScale) { const QPointF* const points = reinterpret_cast<const QPointF*>(path.points()); |