summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@digia.com>2014-09-08 11:46:21 +0200
committerSean Harmer <sean.harmer@kdab.com>2014-09-08 20:35:19 +0200
commit267eb25151ce8d1d4d9abf04b9204afa9977b723 (patch)
tree1279bb8fe98917383bc76243a68f68206d91a2fe
parentf3cee50216b066dc204ab4482d329f4ff988b1e2 (diff)
Enhance the VAO docs
Make it clear that the class is usable regardless of the OpenGL version the app is targeting. It may just do nothing. Change-Id: I50e68a46e36ef1f4694016311af93c6f8719ce4f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
-rw-r--r--src/gui/opengl/qopenglvertexarrayobject.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/opengl/qopenglvertexarrayobject.cpp b/src/gui/opengl/qopenglvertexarrayobject.cpp
index 3b106fecf5..c24254756b 100644
--- a/src/gui/opengl/qopenglvertexarrayobject.cpp
+++ b/src/gui/opengl/qopenglvertexarrayobject.cpp
@@ -386,6 +386,16 @@ QOpenGLVertexArrayObject::~QOpenGLVertexArrayObject()
that supports vertex array objects current for this function to succeed.
Returns \c true if the OpenGL vertex array object was successfully created.
+
+ When the return value is \c false, vertex array object support is not available. This
+ is not an error: on systems with OpenGL 2.x or OpenGL ES 2.0 vertex array objects may
+ not be supported. The application is free to continue execution in this case, but it
+ then has to be prepared to operate in a VAO-less manner too. This means that instead
+ of merely calling bind(), the value of isCreated() must be checked and the vertex
+ arrays has to be initialized in the traditional way when there is no vertex array
+ object present.
+
+ \sa isCreated()
*/
bool QOpenGLVertexArrayObject::create()
{