[Qt5-feedback] vertex buffer object usage in scene graph
Albertine Blum
albertine.blum at googlemail.com
Thu May 26 19:57:33 CEST 2011
Hi
I poked a little bit in the scene graph code and stumbled over:
glVertexAttribPointer(0, a->tupleSize, a->type, GL_FALSE,
geometry->stride(), geometry->vertexData());
ctx->functions()->glVertexAttribPointer(QT_VERTEX_COORDS_ATTR, 2, GL_FLOAT,
GL_FALSE, 0, m_vertexCoordinateArray);
ctx->functions()->glVertexAttribPointer(QT_TEXTURE_COORDS_ATTR, 2, GL_FLOAT,
GL_FALSE, 0, m_textureCoordinateArray);
You use no vertex buffer objects(VBOs), but client side vertex arrays which
are mostly slower and deprecated in OpenGL 3.0. (
http://www.opengl.org/wiki/Vertex_Buffer_Object) Is there a plan to change
it? You also use triangle strips and no indexed vertex triangles, which
could utilize the post vertex shader cache, as the default.
Also you use glDrawElements and not glDrawRangeElements which can be faster
because of the start and end values, so the driver can utilize some
optimizations(this happens also for rendering the whole array).
I have no knowledge about embedded opengl chips, but it would be nice to
know why you use "older" and "slower" opengl functions. Is this because the
driver are so bad?
Best regards,
Albertine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt5-feedback/attachments/20110526/1c28b425/attachment.html
More information about the Qt5-feedback
mailing list