Make IsVertexArray() return false before BindVertexArray()
authorMatt Turner <mattst88@gmail.com>
Thu, 20 Dec 2012 04:20:34 +0000 (20:20 -0800)
committerMatt Turner <mattst88@gmail.com>
Sat, 22 Dec 2012 04:03:30 +0000 (20:03 -0800)
commita585b8f3a6681d1138ed1a33ed4c3195a53c2a73
treedab74830d4dc8ae2943638debe1137c4e28a6ca0
parentfd93d55141f11069fb76a9b377ad1af88d0ecdd3
Make IsVertexArray() return false before BindVertexArray()

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>
src/mesa/main/arrayobj.c
src/mesa/main/mtypes.h