Creates a new RenderBuffer instance.
Collection of tags associated with this object
The unique identifier for the texture resource in the graphics API
The unique identifier for the texture view used as a render target
The unique identifier for the texture view resource
The height of the render buffer in pixels
The width of the render buffer in pixels
Static
Readonly
InvalidInvalid object UID constant
Static
currentCurrent maximum object count for UID generation
Sets the associated frame buffer object.
The frame buffer object to associate with this render buffer
Gets the associated frame buffer object.
The frame buffer object or undefined if not set
Gets the unique object identifier
The object's UID
Gets the MSAA sample count for this render buffer.
The number of samples used for multi-sample anti-aliasing
Gets the unique name of this object
The unique name string
Internal
Copies tag data from another RnObject instance to this object
The source RnObject to copy tags from
Creates and initializes the render buffer with the specified parameters. This method allocates GPU resources and sets up the render buffer for rendering operations.
The width of the render buffer in pixels
The height of the render buffer in pixels
The internal texture format for the render buffer
Optional configuration object
Whether to enable multi-sample anti-aliasing (default: false)
The number of MSAA samples (default: current sample count)
Creates a cube texture view as a render target for a specific face and mip level. This method is currently not implemented and serves as a placeholder for future functionality.
The index of the cube face (0-5)
The mip level to create the view for
Destroys all GPU resources associated with this render buffer. This method releases the allocated graphics API resources and resets the buffer state. Should be called when the render buffer is no longer needed to prevent memory leaks.
True if the resources were successfully destroyed
Checks if this object has all the specified tags with exactly matching values
Object containing tag names as keys and expected values
True if all specified tags exist with matching values, false otherwise
Checks if the object's combined tag string contains all the provided search strings. This allows for flexible searching within tag names and values.
Array of strings that must all be present in the combined tag string
True if all strings are found in the combined tag string, false otherwise
Resizes the render buffer to new dimensions. This method destroys the current GPU resources and recreates them with the new size, preserving the original format and MSAA settings.
The new width in pixels
The new height in pixels
Attempts to set a tag on this object. If the tag already exists, it will be replaced.
The tag object containing the name and value to set
True if the tag was successfully set, false if the tag name contains invalid characters
Attempts to set a unique name for this object
The desired unique name
If true, appends UID to make name unique when conflicts occur; if false, fails on conflict
True if the name was successfully set, false if there was a conflict and toAddNameIfConflict was false
Static
_resetStatic
getStatic
getStatic
searchSearches for the first object that has a specific tag with the given value
The tag name to search for
The tag value to match
WeakRef to the first matching object, or undefined if not found
A render buffer class that represents a renderable texture buffer used for off-screen rendering. This class manages GPU resources for render targets, depth buffers, and MSAA (Multi-Sample Anti-Aliasing) buffers. It implements the IRenderable interface and extends RnObject for resource management.