Constructor
new RenderBuffer(width, height, formatopt, multipleSamplingopt)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
width | Number | The width of the render buffer. | ||
height | Number | The height of the render buffer. | ||
format | t3d. | <optional> | t3d.PIXEL_FORMAT.RGBA8 | The internal format of the render buffer. |
multipleSampling | Number | <optional> | 0 | If bigger than zero, this renderBuffer will support multipleSampling. (Only usable in WebGL 2.0) |
Extends
Members
format :t3d.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
- t3d.PIXEL_FORMAT.RGBA8
height :Number
The height of the render buffer.
Type:
- Number
(readonly) isRenderBuffer :Boolean
Type:
- Boolean
- Default Value
- true
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
width :Number
The width of the render buffer.
Type:
- Number
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. |
- Overrides
clone() → {t3d.RenderBuffer}
Returns a clone of this render buffer.
Returns:
- Type:
- t3d.
RenderBuffer
copy(source) → {t3d.RenderBuffer}
Copy the given render buffer into this render buffer.
Parameters:
Name | Type | Description |
---|---|---|
source | t3d. | The render buffer to be copied. |
Returns:
- Type:
- t3d.
RenderBuffer
dispatchEvent(event)
Fire an event.
Parameters:
Name | Type | Description |
---|---|---|
event | Object | The event that gets fired. |
- Overrides
dispose()
Dispatches a dispose event.
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. |
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. |
Returns:
- If size changed.
- Type:
- Boolean