WebGL
Khronos
 

WebGL OES_vertex_array_object Khronos Ratified Extension Specification

Name

OES_vertex_array_object

Contact

WebGL working group (public_webgl 'at' khronos.org)

Contributors

Members of the WebGL working group

Version

Last modified date: May 15, 2013
Revision: 10

Number

WebGL extension #5

Dependencies

Written against the WebGL API 1.0 specification.

Overview

This extension exposes the OES_vertex_array_object functionality to WebGL.

There are no WebGL-specific behavioral changes.

Consult the above extension for documentation, issues and new functions and enumerants.

IDL

interface WebGLVertexArrayObjectOES : WebGLObject {
};

interface OES_vertex_array_object {
    const GLenum VERTEX_ARRAY_BINDING_OES = 0x85B5;

    WebGLVertexArrayObjectOES? createVertexArrayOES();
    void deleteVertexArrayOES(WebGLVertexArrayObjectOES? arrayObject);
    [WebGLHandlesContextLoss] GLboolean isVertexArrayOES(WebGLVertexArrayObjectOES? arrayObject);
    void bindVertexArrayOES(WebGLVertexArrayObjectOES? arrayObject);
};
  

New Functions

WebGLVertexArrayObjectOES? createVertexArrayOES()
void deleteVertexArrayOES(WebGLVertexArrayObjectOES? arrayObject)
GLboolean isVertexArrayOES(WebGLVertexArrayObjectOES? arrayObject)
Returns false if the vertex array object's invalidated flag is set.
void bindVertexArrayOES(WebGLVertexArrayObjectOES? arrayObject)

Issues

The OES_vertex_array_object spec does not make it clear what happens to buffers that are deleted when they are referenced by vertex array objects. It is inferred that all buffers are reference counted.

Before OES_vertex_array_object there was no way to use a deleted buffer in a single context as the spec states it would be unbound from all bind points. After OES_vertex_array_object it is now possible to use deleted buffers.

Furthermore, the OpenGL ES 2.0 spec specifies that using a deleted buffer has undefined results including possibly corrupt rendering and generating GL errors. Undefined behavior is unacceptable for WebGL.

Revision History

Revision 1, 2011/01/27

Revision 2, 2011/11/12

Revision 3, 2011/12/06

Revision 4, 2011/12/07

Revision 5, 2012/01/03

Revision 6, 2012/09/24

Revision 7, 2012/10/16

Revision 8, 2013/05/08

Revision 9, 2013/05/14

Revision 10, 2013/05/15