Object constructor, requires a context and a valid identifier.
Valid context to create the object for.
Meaningful name for identification of this instance.
Access to all attached renderbuffer objects.
RGBA color, depth value, or stencil value used for clearing the associated buffer.
Queue of all draw buffers that are to be cleared on clear
.
Number of references to this object. If at least a single reference was counted, this object can neither be initialized (and thus created) nor uninitialized (and thus deleted). The reference count is controlled via ref() and unref() functions.
Access to all attached texture objects.
Asserts the objects initialization status to be true. Note that the implementation is cached and forwarded to either an empty function when initialized and to an acutal assert(false) otherwise.
Asserts the objects initialization status to be false. Note that the implementation is cached and forwarded to either an empty function when uninitialized and to an acutal assert(false) otherwise.
Depending on the webgl version and provided bitmask, clears attachments of the framebuffer. Note that this function is set/unset to es2Clear or es3Clear on initialization/uninitialization.
Default framebuffer, e.g., used for unbind.
Read-only access to the objects context, used to get context information and WebGL API access.
Used to remember which attachments are available as potential draw buffers.
Set one or multiple draw buffers.
Array of attachment identifier (e.g., gl.COLOR_ATTACHMENT0).
Readonly access to the framebuffer height in pixel. If the height of the attachments are not all identical, the minimal height as the renderable height of this framebuffer is returned.
Every GPU asset that allocates memory should provide a human readable identifier for GPU allocation tracking and debugging purposes. Please note that the identifier might changed on initialization due to the generation and assignment of a unique identifier.
Property getter for readonly access to the initialization status of an initializable instance.
Read-only access to the WebGL object handle.
Convenience getter for the 2-tuple containing the texture's width and height.
Cached object status used to derive validity when initialized.
Readonly access to the framebuffer width in pixel. If the width of the attachments are not all identical, the minimal width as the renderable width of this framebuffer is returned.
Binds the framebuffer object as framebuffer to the provided target.
Specifying the binding point (target).
Sets the clear color used for clearing a draw buffer. In order to have transparency working, the canvas needs
to have the alpha attribute enabled. This stage also supports premultiplied alpha, which is applied
automatically when the context's premultipliedAlpha
attribute is set.
RGBA clear color.
The draw buffer index. If no index is provided, the color will be applied to all buffers.
Create a framebuffer object on the GPU and attaches all given renderable objects (either renderbuffer or texture) to the framebuffer object.
tuples that associate an attachment to its actual render object, either a renderbuffer or
texture, e.g., [ gl.COLOR_ATTACHMENT0, someTexture ]
.
Delete the framebuffer object on the GPU. This should have the reverse effect of create
.
WebGL1 implementation for clearing framebuffer attachments.
A GLbitfield bitwise OR mask that indicates the buffers to be cleared.
Allows to skip binding the framebuffer (e.g., when binding is handled outside).
Allows to skip unbinding the framebuffer (e.g., when binding is handled outside).
WebGL2 implementation for clearing framebuffer attachments.
A GLbitfield bitwise OR mask that indicates the buffers to be cleared.
Allows to skip binding the framebuffer (e.g., when binding is handled outside).
Allows to skip unbinding the framebuffer (e.g., when binding is handled outside).
Allows to specify a specific queue of color attachments to be cleared. If no parameter is given, the webgl2 implementation clears all color attachments.
-
Increment the reference count of this object.
Forwards a resize to all attachments, renderbuffers and textures.
Targeted/new width for all attachments in px.
Targeted/new height for all attachments in px.
Allows to skip binding the specific attachment (e.g., when binding is handled outside).
Allows to skip unbinding the specific attachment (e.g., when binding is handled outside).
Access to attached textures, identified by a valid framebuffer attachment.
The attachment to request the texture object of.
Binds the default back buffer as framebuffer to the provided target.
Specifying the binding point (target).
Decrement the reference count of this object.
Method decorator for asserting the initialization status of an initializable to be true.
Method decorator for asserting the initialization status of an initializable to be false.
Method decorator for discarding of Initializable inheritors. This decorator asserts the initialization
status of the instance that is to be discarded, invokes its uninitialization, and falsifies the
initialization status. In order to encourage the use of assertInitialized
and assertUninitialized
they are
dynamically bound to a static, always-failing assert and an empty/undefined function respectively.
Method decorator for initialization of Initializable inheritors. This decorator asserts the initialization status
of the instance that is to be initialized, invokes its initialization with arbitrary number of parameters,
and sets the initialization status to the initialization success (either false or true).
In order to encourage the use of assertInitialized
and assertUninitialized
they are dynamically
bound to either a static, always-failing assert or an empty/undefined function.
Returns a string describing the given status of a framebuffer object.
Context for valid GLenums.
A framebuffer's status.
Method decorator for uninitialization of Initializable inheritors. This decorator asserts the initialization
status of the instance that is to be uninitialized, invokes its uninitialization, and falsifies the
initialization status. In order to encourage the use of assertInitialized
and assertUninitialized
they are
dynamically bound to a static, always-failing assert and an empty/undefined function respectively.
WebGL Framebuffer base implementation providing size accessors and requiring for bind, unbind, resize, validity, and initialization implementations.