From 267eb25151ce8d1d4d9abf04b9204afa9977b723 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 8 Sep 2014 11:46:21 +0200 Subject: 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 --- src/gui/opengl/qopenglvertexarrayobject.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) 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() { -- cgit v1.2.3