Class RenderTargetWrapper
Hierarchy
- RenderTargetWrapper
Index
Constructors
constructor
Initializes the render target wrapper
Parameters
isMulti: boolean
true if the wrapper is a multi render target
isCube: boolean
true if the wrapper should render to a cube texture
size: TextureSize
size of the render target (width/height/layers)
engine: ThinEngine
engine used to create the render target
Returns RenderTargetWrapper
Accessors
depth Stencil Texture
Gets the depth/stencil texture (if created by a createDepthStencilTexture() call)
Returns Nullable<InternalTexture>
depth Stencil Texture With Stencil
Indicates if the depth/stencil texture has a stencil aspect
Returns boolean
face Indices
Gets the face indices that correspond to the list of render textures. If we are not in a multi render target, the list will be null
Returns Nullable<number[]>
height
Gets the height of the render target wrapper
Returns number
is2DArray
Defines if the render target wrapper is for a single or an array of textures
Returns boolean
is Cube
Defines if the render target wrapper is for a cube texture or if false a 2d texture
Returns boolean
is Multi
Defines if the render target wrapper is for a single or multi target render wrapper
Returns boolean
layer Indices
Gets the layer indices that correspond to the list of render textures. If we are not in a multi render target, the list will be null
Returns Nullable<number[]>
layers
Gets the number of layers of the render target wrapper (only used if is2DArray is true and wrapper is not a multi render target)
Returns number
samples
Gets the sample count of the render target
Returns number
size
Gets the size of the render target wrapper (used for cubes, as width=height in this case)
Returns number
texture
Gets the render texture. If this is a multi render target, gets the first texture
Returns Nullable<InternalTexture>
textures
Gets the list of render textures. If we are not in a multi render target, the list will be null (use the texture getter instead)
Returns Nullable<InternalTexture[]>
width
Gets the width of the render target wrapper
Returns number
Methods
create Depth Stencil TextureSearch playground for createDepthStencilTexture
Creates the depth/stencil texture
Parameters
Optional comparisonFunction: number
Comparison function to use for the texture
Optional bilinearFiltering: boolean
true if bilinear filtering should be used when sampling the texture
Optional generateStencil: boolean
true if the stencil aspect should also be created
Optional samples: number
sample count to use when creating the texture
Optional format: number
format of the depth texture
Optional label: string
defines the label to use for the texture (for debugging purpose only)
Returns InternalTexture
the depth/stencil created texture
disposeSearch playground for dispose
Disposes the whole render target wrapper
Parameters
Optional disposeOnlyFramebuffers: boolean
true if only the frame buffers should be released (used for the WebGL engine). If false, all the textures will also be released
Returns void
release TexturesSearch playground for releaseTextures
Releases the internal render textures
Returns void
set Layer And Face IndexSearch playground for setLayerAndFaceIndex
Sets the layer and face indices of a texture in the textures array that should be bound to each color attachment
Parameters
Optional index: number
The index of the texture in the textures array to modify
Optional layer: number
The layer of the texture to be set
Optional face: number
The face of the texture to be set
Returns void
set Layer And Face IndicesSearch playground for setLayerAndFaceIndices
Sets the layer and face indices of every render target texture bound to each color attachment
Parameters
layers: number[]
The layers of each texture to be set
faces: number[]
The faces of each texture to be set
Returns void
set SamplesSearch playground for setSamples
Sets the sample count of the render target
Parameters
value: number
sample count
Optional initializeBuffers: boolean
If set to true, the engine will make an initializing call to drawBuffers (only used when isMulti=true).
Optional force: boolean
true to force calling the update sample count engine function even if the current sample count is equal to value
Returns number
the sample count that has been set
set TextureSearch playground for setTexture
Set a texture in the textures array
Parameters
texture: InternalTexture
The texture to set
Optional index: number
The index in the textures array to set
Optional disposePrevious: boolean
If this function should dispose the previous texture
Returns void
set TexturesSearch playground for setTextures
Sets the render target texture(s)
Parameters
textures: null | InternalTexture | InternalTexture[]
texture(s) to set
Returns void
Wrapper around a render target (either single or multi textures)