Commit 0096e9a8 authored by Laszlo Agocs's avatar Laszlo Agocs Committed by Pasi Keränen
Browse files

Avoid querying buffer params for invalid buffers


Apps are free to enable attribute arrays and then dump the state before
binding a buffer via vertexAttribPointer. The state dumping code should
recognize this and avoid calling glGetBufferParameter since passing 0
(an invalid buffer) is an error.

Change-Id: Id3434b914281e9bd9d7157554ab6ef59558e292f
Reviewed-by: default avatarPasi Keränen <pasi.keranen@digia.com>
Showing with 3 additions and 0 deletions
...@@ -97,6 +97,9 @@ CanvasGLStateDump::~CanvasGLStateDump() ...@@ -97,6 +97,9 @@ CanvasGLStateDump::~CanvasGLStateDump()
*/ */
QString CanvasGLStateDump::getGLArrayObjectDump(int target, int arrayObject, int type) QString CanvasGLStateDump::getGLArrayObjectDump(int target, int arrayObject, int type)
{ {
if (!arrayObject)
return "no buffer bound";
QString stateDumpStr; QString stateDumpStr;
glBindBuffer(target, arrayObject); glBindBuffer(target, arrayObject);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment