Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 1028516 of WebGLVertexArrayObjectOES

  • Revision slug: Web/API/WebGLVertexArrayObjectOES
  • Revision title: WebGLVertexArrayObjectOES
  • Revision id: 1028516
  • Created:
  • Creator: fscholz
  • Is current revision? No
  • Comment new page

Revision Content

{{APIRef("WebGL")}}

The WebGLVertexArrayObjectOES interface is part of the WebGL {{domxref("OES_vertex_array_object")}} extension and represents vertex array objects (VAOs) pointing to vertex array data and providing names for different sets of vertex data.

WebGL extensions are available using the {{domxref("WebGLRenderingContext.getExtension()")}} method. For more information, see also Using Extensions in the WebGL tutorial.

Availability: This extension is only available to {{domxref("WebGLRenderingContext", "WebGL1", "", 1)}} contexts. In {{domxref("WebGL2RenderingContext", "WebGL2", "", 1)}}, the functionality of this extension is available on the WebGL2 context by default and this interface is named {{domxref("WebGLVertexArrayObject")}}.

When working with WebGLVertexArrayObjectOES objects, the following methods of the {{domxref("OES_vertex_array_object")}} extension are useful:

  • {{domxref("OES_vertex_array_object.createVertexArrayOES()", "ext.createVertexArrayOES()")}}
  • {{domxref("OES_vertex_array_object.deleteVertexArrayOES()", "ext.deleteVertexArrayOES()")}}
  • {{domxref("OES_vertex_array_object.isVertexArrayOES()", "ext.isVertexArrayOES()")}}
  • {{domxref("OES_vertex_array_object.bindVertexArrayOES()", "ext.bindVertexArrayOES()")}}

Examples

var ext = gl.getExtension("OES_vertex_array_object");
var vao = ext.createVertexArrayOES();
ext.bindVertexArrayOES(vao);

// ...
// calls to bindBuffer or vertexAttribPointer 
// which will be "recorded" in the VAO
// ...

Specifications

Specification Status Comment
{{SpecName('OES_vertex_array_object', '', 'OES_vertex_array_object')}} {{Spec2('OES_vertex_array_object')}} Initial definition.

Browser compatibility

{{CompatibilityTable}}
Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support {{CompatUnknown}} {{CompatGeckoDesktop(25)}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}

See also

  • {{domxref("WebGLRenderingContext.getExtension()")}}
  • {{domxref("WebGLRenderingContext.vertexAttribPointer()")}}
  • WebGL2 equivalents:
    • {{domxref("WebGLVertexArrayObject")}}
    • {{domxref("WebGL2RenderingContext.createVertexArray()")}}
    • {{domxref("WebGL2RenderingContext.deleteVertexArray()")}}
    • {{domxref("WebGL2RenderingContext.isVertexArray()")}}
    • {{domxref("WebGL2RenderingContext.bindVertexArray()")}}

Revision Source

<div>{{APIRef("WebGL")}}</div>

<p>The <strong><code>WebGLVertexArrayObjectOES</code></strong> interface is part of the <a href="/en-US/docs/Web/API/WebGL_API">WebGL</a> {{domxref("OES_vertex_array_object")}} extension and represents vertex array objects (VAOs) pointing to vertex array data and providing names for different sets of vertex data.</p>

<p>WebGL extensions are available using the {{domxref("WebGLRenderingContext.getExtension()")}} method. For more information, see also <a href="/en-US/docs/Web/API/WebGL_API/Using_Extensions">Using Extensions</a> in the <a href="/en-US/docs/Web/API/WebGL_API/Tutorial">WebGL tutorial</a>.</p>

<div class="note">
<p><strong>Availability:</strong> This extension is only available to {{domxref("WebGLRenderingContext", "WebGL1", "", 1)}} contexts. In {{domxref("WebGL2RenderingContext", "WebGL2", "", 1)}}, the functionality of this extension is available on the WebGL2 context by default and this interface is named {{domxref("WebGLVertexArrayObject")}}.</p>
</div>

<p>When working with <code>WebGLVertexArrayObjectOES</code> objects, the following methods of the {{domxref("OES_vertex_array_object")}} extension are useful:</p>

<ul>
 <li>{{domxref("OES_vertex_array_object.createVertexArrayOES()", "ext.createVertexArrayOES()")}}</li>
 <li>{{domxref("OES_vertex_array_object.deleteVertexArrayOES()", "ext.deleteVertexArrayOES()")}}</li>
 <li>{{domxref("OES_vertex_array_object.isVertexArrayOES()", "ext.isVertexArrayOES()")}}</li>
 <li>{{domxref("OES_vertex_array_object.bindVertexArrayOES()", "ext.bindVertexArrayOES()")}}</li>
</ul>

<h2 id="Examples">Examples</h2>

<pre class="brush: js">
var ext = gl.getExtension("OES_vertex_array_object");
var vao = ext.createVertexArrayOES();
ext.bindVertexArrayOES(vao);

// ...
// calls to bindBuffer or vertexAttribPointer 
// which will be "recorded" in the VAO
// ...</pre>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
  <tr>
   <td>{{SpecName('OES_vertex_array_object', '', 'OES_vertex_array_object')}}</td>
   <td>{{Spec2('OES_vertex_array_object')}}</td>
   <td>Initial definition.</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>

<div>{{CompatibilityTable}}</div>

<div id="compat-desktop">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Chrome</th>
   <th>Firefox (Gecko)</th>
   <th>Internet Explorer</th>
   <th>Opera</th>
   <th>Safari</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatGeckoDesktop(25)}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Android</th>
   <th>Chrome for Android</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>IE Mobile</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
 </tbody>
</table>
</div>

<h2 id="See_also">See also</h2>

<ul>
 <li>{{domxref("WebGLRenderingContext.getExtension()")}}</li>
 <li>{{domxref("WebGLRenderingContext.vertexAttribPointer()")}}</li>
 <li>WebGL2 equivalents:
  <ul>
   <li>{{domxref("WebGLVertexArrayObject")}}</li>
   <li>{{domxref("WebGL2RenderingContext.createVertexArray()")}}</li>
   <li>{{domxref("WebGL2RenderingContext.deleteVertexArray()")}}</li>
   <li>{{domxref("WebGL2RenderingContext.isVertexArray()")}}</li>
   <li>{{domxref("WebGL2RenderingContext.bindVertexArray()")}}</li>
  </ul>
 </li>
</ul>
Revert to this revision