Rename existing _Used flag to EverBound.
The GL 4.3 and ES 3.0 specs say
These names are marked as used, for the purposes of GenVertexArrays
only, but they do not acquire array state until they are first bound.
This also affects Apple VAOs, which is fine since the
APPLE_vertex_array_object spec says
A vertex array object is created by binding an unused name. This
binding is accomplished by calling BindVertexArrayAPPLE with id set
to the name of the new vertex array object.
Fixes arb_vertex_array_object_isvertexarray.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
save_array_object(ctx, newObj);
}
- if (!newObj->_Used) {
+ if (!newObj->EverBound) {
/* The "Interactions with APPLE_vertex_array_object" section of the
* GL_ARB_vertex_array_object spec says:
*
* BindVertexArrayAPPLE, determines the semantic of the object."
*/
newObj->ARBsemantics = genRequired;
- newObj->_Used = GL_TRUE;
+ newObj->EverBound = GL_TRUE;
}
}
return GL_FALSE;
obj = lookup_arrayobj(ctx, id);
+ if (obj == NULL)
+ return GL_FALSE;
- return (obj != NULL) ? GL_TRUE : GL_FALSE;
+ return obj->EverBound;
}
/**
* Has this array object been bound?
*/
- GLboolean _Used;
+ GLboolean EverBound;
/** Vertex attribute arrays */
struct gl_client_array VertexAttrib[VERT_ATTRIB_MAX];