Class: RenderBuffer

zen3d.RenderBuffer()

new RenderBuffer()

Render Buffer can be attached to RenderTarget
Source:

Extends

Members

format :zen3d.WEBGL_PIXEL_FORMAT

Render buffer texel storage data format. DEPTH_COMPONENT16: for depth attachments. DEPTH_STENCIL: for depth stencil attachments. RGBA8:for multiple sampled color attachments. DEPTH_COMPONENT16: for multiple sampled depth attachments. DEPTH24_STENCIL8: for multiple sampled depth stencil attachments.
Type:
Default Value:
  • zen3d.WEBGL_PIXEL_FORMAT.RGBA8
Source:

height :number

The height of the render buffer.
Type:
  • number
Source:

multipleSampling :number

If bigger than zero, this renderBuffer will support multipleSampling. (Only usable in WebGL 2.0) A Render Target's attachments must have the same multipleSampling value. Texture can't be attached to the same render target with a multiple sampled render buffer. Max support 8.
Type:
  • number
Default Value:
  • 0
Source:

width :number

The width of the render buffer.
Type:
  • number
Source:

Methods

addEventListener(type, listener, thisObjectopt)

Adds a listener to an event type.
Parameters:
Name Type Attributes Default Description
type string The type of event to listen to.
listener function The function that gets called when the event is fired.
thisObject Object <optional>
this The Object of calling listener method.
Inherited From:
Source:

clone() → {zen3d.RenderBuffer}

Returns a clone of this render buffer.
Source:
Returns:
Type
zen3d.RenderBuffer

copy(source) → {zen3d.RenderBuffer}

Copy the given render buffer into this render buffer.
Parameters:
Name Type Description
source zen3d.RenderBuffer The render buffer to be copied.
Source:
Returns:
Type
zen3d.RenderBuffer

dispatchEvent(event)

Fire an event type.
Parameters:
Name Type Description
event Object The event that gets fired.
Inherited From:
Source:

dispose()

Dispatches a dispose event.
Source:

removeEventListener(type, listener, thisObjectopt)

Removes a listener from an event type.
Parameters:
Name Type Attributes Default Description
type string The type of the listener that gets removed.
listener function The listener function that gets removed.
thisObject Object <optional>
this thisObject - The Object of calling listener method.
Inherited From:
Source:

resize(width, height) → {boolean}

Resize the render buffer.
Parameters:
Name Type Description
width number The width of the render buffer.
height number The height of the render buffer.
Source:
Returns:
- If size changed.
Type
boolean