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 925773 of WebGLBuffer

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

Revision Content

{{APIRef("WebGL")}}

The WebGLBuffer interface is part of the WebGL API and represents a buffer object storing data such as vertices or colors.

Examples

var canvas = document.getElementById("canvas");
var gl = canvas.getContext("webgl");
var buffer = gl.createBuffer();

Specifications

Specification Status Comment
{{SpecName('WebGL', "#5.4", "WebGLBuffer")}} {{Spec2('WebGL')}} Initial definition.

Browser compatibility

{{CompatibilityTable}}
Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support {{CompatChrome("9")}} {{CompatGeckoDesktop("2.0")}} {{CompatIE("11")}} {{CompatOpera("12")}} {{CompatSafari("5.1")}}
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support {{CompatUnknown}} 25 {{CompatVersionUnknown}} {{CompatUnknown}} 12 8.1

See also

  • {{domxref("WebGLRenderingContext.bindBuffer()")}}
  • {{domxref("WebGLRenderingContext.createBuffer()")}}
  • {{domxref("WebGLRenderingContext.deleteBuffer()")}}
  • {{domxref("WebGLRenderingContext.isBuffer()")}}

Revision Source

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

<p>The <strong>WebGLBuffer</strong> interface is part of the <a href="/en-US/docs/Web/API/WebGL_API">WebGL API</a> and represents a buffer object storing data such as vertices or colors.</p>

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

<pre class="brush: js">
var canvas = document.getElementById("canvas");
var gl = canvas.getContext("webgl");
var buffer = gl.createBuffer();
</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('WebGL', "#5.4", "WebGLBuffer")}}</td>
   <td>{{Spec2('WebGL')}}</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>{{CompatChrome("9")}}</td>
   <td>{{CompatGeckoDesktop("2.0")}}</td>
   <td>{{CompatIE("11")}}</td>
   <td>{{CompatOpera("12")}}</td>
   <td>{{CompatSafari("5.1")}}</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>25</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>12</td>
   <td>8.1</td>
  </tr>
 </tbody>
</table>
</div>

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

<ul>
 <li>{{domxref("WebGLRenderingContext.bindBuffer()")}}</li>
 <li>{{domxref("WebGLRenderingContext.createBuffer()")}}</li>
 <li>{{domxref("WebGLRenderingContext.deleteBuffer()")}}</li>
 <li>{{domxref("WebGLRenderingContext.isBuffer()")}}</li>
</ul>
Revert to this revision