Documentation generator: JsDoc Toolkit 2.4.0
Template: Codeview 1.2
Generated on: 2012-11-19 0:05

Class SpiderGL.WebGL.Renderbuffer

The SpiderGL.WebGL.Renderbuffer is a wrapper for WebGLRenderbuffer.

Class Summary
Constructor Attributes Constructor Name and Description
 
Creates a SpiderGL.WebGL.Renderbuffer.
Field Summary
Field Attributes Field Name and Description
<readonly>  
Gets the WebGL internal format of the renderbuffer.
<readonly>  
Gets the height in pixels of the renderbuffer.
<readonly>  
Tests if the renderbuffer is ready to use.
<static>  
SpiderGL.WebGL.Renderbuffer.TARGET
WebGL target for renderbuffers.
<readonly>  
Gets the width in pixels of the renderbuffer.
Fields borrowed from class SpiderGL.WebGL.ObjectGL:
gl, handle, isValid, target
Fields borrowed from class SpiderGL.Core.ObjectBase:
uid

Method Summary

Method Attributes Method Name and Description
 
bind()
Binds the wrapped WebGLRenderbuffer to the WebGLRenderingContex.RENDERBUFFER target.
 
Destroys the WebGLRenderbuffer.
 
setStorage(internalFormat, width, height)
Setups the renderbuffer storage configuration.
 
Binds "null" to the WebGLRenderingContex.RENDERBUFFER target.
<static>  
SpiderGL.WebGL.Renderbuffer.unbind(gl)
WebGLRenderbuffer unbinding.

Class Detail

SpiderGL.WebGL.Renderbuffer(gl, options)
Creates a SpiderGL.WebGL.Renderbuffer. SpiderGL.WebGL.Renderbuffer is a wrapper for WebGLRenderbuffer.
var rb = new SpiderGL.WebGL.Renderbuffer(gl, {
	internalFormat : gl.RGBA,
	width  : 800,
	height : 600
});
Parameters:
{WebGLRenderingContext} gl
A WebGLRenderingContext hijacked with SpiderGL.WebGL.Context.hijack.
{object} options Optional
Optional parameters.
{WebGLRenderbuffer} options.handle Optional
A WebGLRenderbuffer. If present, this object will be used as the wrapped WebGLRenderbuffer. Otherwise a new one will be created.
{number} options.internalFormat Optional
The WebGL enumeration specifying the renderbuffer internal format.
{object} options.width Optional
The width of the renderbuffer.
{object} options.height Optional
The height of the renderbuffer.
See:
setStorage
SpiderGL.WebGL.Framebuffer
SpiderGL.WebGL.ObjectGL

Field Detail

<readonly> {number} format
Gets the WebGL internal format of the renderbuffer.
<readonly> {number} height
Gets the height in pixels of the renderbuffer.
<readonly> {bool} isReady
Tests if the renderbuffer is ready to use. A renderbuffer is considered ready if its width and height are greater than zero.
<static> {number} SpiderGL.WebGL.Renderbuffer.TARGET
WebGL target for renderbuffers.
Default Value:
WebGLRenderingContext.RENDERBUFFER
<readonly> {number} width
Gets the width in pixels of the renderbuffer.

Method Detail

  • bind()
    Binds the wrapped WebGLRenderbuffer to the WebGLRenderingContex.RENDERBUFFER target.
    See:
    unbind
  • destroy()
    Destroys the WebGLRenderbuffer. After destruction, the handle is set to null and this object should not be used anymore.
    See:
    SpiderGL.WebGL.ObjectGL#destroy
  • setStorage(internalFormat, width, height)
    Setups the renderbuffer storage configuration.
    Parameters:
    {number} internalFormat
    The WebGL enumeration for the internal pixel format.
    {number} width
    The width in pixels of the renderbuffer.
    {number} height
    The height in pixels of the renderbuffer.
  • unbind()
    Binds "null" to the WebGLRenderingContex.RENDERBUFFER target. This method is provided only for simmetry with bind and is not relative to the object state.
    See:
    bind
  • <static> SpiderGL.WebGL.Renderbuffer.unbind(gl)
    WebGLRenderbuffer unbinding. This function binds the null renderbuffer to the WebGLRenderingContext.RENDERBUFFER target.
    Parameters:
    {WebGLRenderingContext} gl
    A WebGLRenderingContext.