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 1017924 of WEBGL_color_buffer_float

  • Revision slug: Web/API/WEBGL_color_buffer_float
  • Revision title: WEBGL_color_buffer_float
  • Revision id: 1017924
  • Created:
  • Creator: fscholz
  • Is current revision? No
  • Comment new page - bug 843666

Revision Content

{{APIRef("WebGL")}}

The WEBGL_color_buffer_float extension is part of the WebGL API and adds the ability to render to 32-bit floating-point color buffers.

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 both, {{domxref("WebGLRenderingContext", "WebGL1", "", 1)}} and {{domxref("WebGL2RenderingContext", "WebGL2", "", 1)}} contexts.

The {{domxref("OES_texture_float")}} extension implicitly enables this extension.

Constants

ext.RGBA32F_EXT
RGBA 32-bit floating-point color-renderable format.
ext.RGB32F_EXT {{deprecated_inline}}
RGB 32-bit floating-point color-renderable format.
ext.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT
?
ext.UNSIGNED_NORMALIZED_EXT
?

Extended methods

This extension extends {{domxref("WebGLRenderingContext.renderbufferStorage()")}}:

  • The internalformat parameter now accepts ext.RGBA32F_EXT and ext.RGBA32F_EXT {{deprecated_inline}}.

Examples

var ext = gl.getExtension("WEBGL_color_buffer_float");

gl.renderbufferStorage(gl.RENDERBUFFER, ext.RBGA32F_EXT, 256, 256);

Specifications

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

Browser compatibility

{{CompatibilityTable}}
Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support {{CompatUnknown}} {{CompatGeckoDesktop("30.0")}} {{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.renderbufferStorage()")}}
  • {{domxref("OES_texture_float")}}

Revision Source

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

<p>The <code><strong>WEBGL_color_buffer_float</strong></code> extension is part of the <a href="/en-US/docs/Web/API/WebGL_API">WebGL API</a> and adds the ability to render to 32-bit floating-point color buffers.</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 both, {{domxref("WebGLRenderingContext", "WebGL1", "", 1)}} and {{domxref("WebGL2RenderingContext", "WebGL2", "", 1)}} contexts.</p>

<p>The {{domxref("OES_texture_float")}} extension implicitly enables this extension.</p>
</div>

<h2>Constants</h2>

<dl>
 <dt><code>ext.RGBA32F_EXT</code></dt>
 <dd>RGBA 32-bit floating-point&nbsp;color-renderable format.</dd>
 <dt><code>ext.RGB32F_EXT</code> {{deprecated_inline}}</dt>
 <dd>RGB 32-bit floating-point&nbsp;color-renderable format.</dd>
 <dt><code>ext.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT</code></dt>
 <dd>?</dd>
 <dt><code>ext.UNSIGNED_NORMALIZED_EXT</code></dt>
 <dd>?</dd>
</dl>

<h2 id="Extended_methods">Extended methods</h2>

<p>This extension extends {{domxref("WebGLRenderingContext.renderbufferStorage()")}}:</p>

<ul>
 <li>The <code>internalformat</code> parameter now accepts <code>ext.RGBA32F_EXT</code> and <code>ext.RGBA32F_EXT</code> {{deprecated_inline}}.</li>
</ul>

<h2>Examples</h2>

<pre class="brush:js">
var ext = gl.getExtension("WEBGL_color_buffer_float");

gl.renderbufferStorage(gl.RENDERBUFFER, ext.RBGA32F_EXT, 256, 256);
</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_color_buffer_float', "", "WEBGL_color_buffer_float")}}</td>
   <td>{{Spec2('WEBGL_color_buffer_float')}}</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("30.0")}}</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.renderbufferStorage()")}}</li>
 <li>{{domxref("OES_texture_float")}}</li>
</ul>
Revert to this revision