3 <ratified href="OES_vertex_array_object/">
4 <name>OES_vertex_array_object</name>
6 <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL working group</a> (public_webgl 'at' khronos.org)
9 <contributor>Members of the WebGL working group</contributor>
16 <mirrors href="http://www.khronos.org/registry/gles/extensions/OES/OES_vertex_array_object.txt" name="OES_vertex_array_object" />
18 <idl xml:space="preserve">
20 interface WebGLVertexArrayObjectOES : WebGLObject {
24 interface OES_vertex_array_object {
25 const GLenum VERTEX_ARRAY_BINDING_OES = 0x85B5;
27 WebGLVertexArrayObjectOES? createVertexArrayOES();
28 void deleteVertexArrayOES(WebGLVertexArrayObjectOES? arrayObject);
29 [WebGLHandlesContextLoss] GLboolean isVertexArrayOES(WebGLVertexArrayObjectOES? arrayObject);
30 void bindVertexArrayOES(WebGLVertexArrayObjectOES? arrayObject);
35 <function name="createVertexArrayOES" type="WebGLVertexArrayObjectOES?">
40 <function name="deleteVertexArrayOES" type="void">
41 <param name="arrayObject" type="WebGLVertexArrayObjectOES?"/>
46 <function name="isVertexArrayOES" type="GLboolean">
47 <param name="arrayObject" type="WebGLVertexArrayObjectOES?"/>
48 Returns false if the vertex array object's <a
49 href="../../specs/1.0/#webgl-object-invalidated-flag">invalidated
55 <function name="bindVertexArrayOES" type="void">
56 <param name="arrayObject" type="WebGLVertexArrayObjectOES?"/>
61 <p>The OES_vertex_array_object spec does not make it clear
62 what happens to buffers that are deleted when they are referenced
63 by vertex array objects. It is inferred that all buffers are
66 <p>Before OES_vertex_array_object there was no way to use a deleted
67 buffer in a single context as the spec states it would be unbound
68 from all bind points. After OES_vertex_array_object it is now
69 possible to use deleted buffers.
71 <p>Furthermore, the OpenGL ES 2.0 spec specifies that using a
72 deleted buffer has undefined results including possibly
73 corrupt rendering and generating GL errors. Undefined behavior
74 is unacceptable for WebGL.
78 <p>RESOLVED: Buffers should be reference counted when attached to
79 a vertex array object. This is consistent with the OpenGL ES 3.0
80 spec's implementation of Vertex Array Objects and matches the
81 behavior of other WebGL objects, such as textures that are attached
84 <p>This will require that most implementations do not call
85 glDeleteBuffer when the user calls deleteBuffer on the WebGL context.
86 Instead the implementation must wait for all references to be released
87 before calling glDeleteBuffer to prevent undefined behavior.
89 <p>If a buffer object is deleted while it is attached to the currently
90 bound vertex array object, then it is as if BindBuffer had been called,
91 with a buffer of 0, for each target to which this buffer was attached
92 in the currently bound vertex array object. In other words, this buffer
93 is first detached from all attachment points in the currently bound
94 vertex array object. Note that the buffer is specifically not detached
95 from any other vertex array object. Detaching the buffer from any other
96 vertex array objects is the responsibility of the application.
102 <revision date="2011/01/27">
103 <change>Initial revision.</change>
105 <revision date="2011/11/12">
106 <change>Demotion to draft.</change>
108 <revision date="2011/12/06">
109 <change>Added vendor-specific name strings for draft extension per discussion on WebGL mailing list.</change>
111 <revision date="2011/12/07">
112 <change>Renamed "Name Strings" section to "Alias Name Strings".</change>
113 <change>Sorted Revision History in ascending order.</change>
115 <revision date="2012/01/03">
116 <change>Removed webgl module per changes to Web IDL spec.</change>
118 <revision date="2012/09/24">
119 <change>Added resolution to deleted buffer issue</change>
121 <revision date="2012/10/16">
122 <change>Based on feedback on public_webgl, moved from draft to community approved, and removed aliases.</change>
124 <revision date="2013/05/08">
125 <change>Made WebGLVertexArrayObjectOES return values and arguments nullable on feedback from Benoit Jacob.</change>
127 <revision date="2013/05/14">
128 <change>Based on pull request from J Kenneth King, added WebGLHandlesContextLoss extended attribute to isVertexArrayOES and added markup for new functions.</change>
130 <revision date="2013/05/15">
131 <change>Ratified by Khronos Board of Promoters.</change>
133 <revision date="2014/07/15">
134 <change>Added NoInterfaceObject extended attribute to extension and WebGLVertexArrayObjectOES interface.</change>