H3DU.FrameBuffer
H3DU.FrameBuffer(context, width, height)
Deprecated: This class is likely to become a private class. Use the FrameBufferInfo class instead, which is not coupled to WebGL contexts.
Represents an off-screen frame buffer.
When H3DU.FrameBuffer's constructor is called, it will create a texture buffer with the given width and height and a depth buffer with the same dimensions, and will bind both to the frame buffer. The frame buffer currently bound to the WebGL context will remain unchanged.
Parameters
context
(Type: WebGLRenderingContext | WebGL2RenderingContext | Object)
WebGL context to associate with this buffer, or an object, such as H3DU.Scene3D, that implements a no-argumentgetContext
method that returns a WebGL context.width
(Type: number)
Width, in pixels, of the frame buffer. Fractional values are rounded up.height
(Type: number)
Height, in pixels, of the frame buffer. Fractional values are rounded up.
Members
Methods
- bind
Has no effect. - dispose
Disposes all resources from this frame buffer object. - getContext
Gets the WebGL context associated with this frame buffer. - resize
Resizes the frame buffer to a new width and height, if either differs from the current width or height. - unbind
Has no effect.
H3DU.FrameBuffer#height
The frame buffer's height.
H3DU.FrameBuffer#width
The frame buffer's width.
H3DU.FrameBuffer#bind()
Has no effect. (Previously, bound this frame buffer to the WebGL context associated with it.)
Return Value
This object. (Type: H3DU.FrameBuffer)
H3DU.FrameBuffer#dispose()
Disposes all resources from this frame buffer object.
Return Value
This method doesn't return a value.* (Type: void)
H3DU.FrameBuffer#getContext()
Gets the WebGL context associated with this frame buffer.
Return Value
Return value. (Type: WebGLRenderingContext | WebGL2RenderingContext)
H3DU.FrameBuffer#resize(width, height)
Resizes the frame buffer to a new width and height, if either differs from the current width or height.
Parameters
width
(Type: number)
New width, in pixels, of the frame buffer. Fractional values are rounded up.height
(Type: number)
New height, in pixels, of the frame buffer. Fractional values are rounded up.
Return Value
This object. (Type: H3DU.FrameBuffer)
H3DU.FrameBuffer#unbind()
Has no effect. (Previously, unbound this frame buffer from its associated WebGL context.)
Return Value
This method doesn't return a value.* (Type: void)