TextureSetManager maintains a set of named/indexed textures and optionally, a FrameBuffer for offscreen rendering.
Creates a new TextureSetManager
the rendering context in which the textures and buffers will be created
an instance of a copier program
if true, then a FrameBuffer is also created
initial number of textures
Adds the texture
name of the texture
Copies previous texture into current texture.
Destroys all texture and framebuffer
Returns the current texture.
TextureSetManager has this notion of current texture that it can cycle through the set of all textures.
Returns the texture at given index or with given nam,e
Removes a texture
name or index of the texture to be removed
Resizes all textures
Sets the current texture as the frame buffer attachment. If
hasFrameBuffer is true
then the FrameBuffer manager is bound and the texture is set as the frame buffer attachment.
name of the texture to set as target. If undefined then we cycle through to next texture
Sets the current texture and sets it as the current frame buffer attachment
name or index of the texture. If undefined then we cycle through to next texture
Restores the texture attachment or framebuffer that was set with a previous call to TextureSetManager.setAsRenderTarget