Documentation / device / RenderStateSet
Interface: RenderStateSet
Defined in: libs/device/src/render_states.ts:299
Set of the render statements
Properties
colorState
readonlycolorState:ColorState
Defined in: libs/device/src/render_states.ts:305
Fragment output related render statements or null if the default values should be used
blendingState
readonlyblendingState:BlendingState
Defined in: libs/device/src/render_states.ts:307
Alpha blending related render statements or null if the default values should be used
rasterizerState
readonlyrasterizerState:RasterizerState
Defined in: libs/device/src/render_states.ts:309
Rasterization related render statements or null if the default values should be used
depthState
readonlydepthState:DepthState
Defined in: libs/device/src/render_states.ts:311
Depth buffer related render statements or null if the default values should be used
stencilState
readonlystencilState:StencilState
Defined in: libs/device/src/render_states.ts:313
Stencil buffer related render statements or null if the default values should be used
Methods
clone()
clone():
RenderStateSet
Defined in: libs/device/src/render_states.ts:301
Creates a new RenderStateSet object by deep copy from this object
Returns
RenderStateSet
copyFrom()
copyFrom(
stateSet):void
Defined in: libs/device/src/render_states.ts:303
Shallow copy existing RenderStateSet object to this
Parameters
stateSet
RenderStateSet
Returns
void
useColorState()
useColorState(
state?):ColorState
Defined in: libs/device/src/render_states.ts:318
Allocates a ColorState
Parameters
state?
Returns
The created ColorState
defaultColorState()
defaultColorState():
void
Defined in: libs/device/src/render_states.ts:322
Deletes the ColorState that was allocated by RenderStateSet.useColorState, so that the default value will be used
Returns
void
getTargetColorState()
getTargetColorState(
index):ColorState
Defined in: libs/device/src/render_states.ts:327
Gets the ColorState override for a color target or null if the global/default ColorState should be used
Parameters
index
number
The zero-based color target index
Returns
useTargetColorState()
useTargetColorState(
index,state?):ColorState
Defined in: libs/device/src/render_states.ts:334
Allocates a ColorState override for a color target
Parameters
index
number
The zero-based color target index
state?
Optional existing ColorState to use as the override
Returns
The created ColorState
defaultTargetColorState()
defaultTargetColorState(
index):void
Defined in: libs/device/src/render_states.ts:339
Deletes the ColorState override for a color target, so that the global/default ColorState will be used
Parameters
index
number
The zero-based color target index
Returns
void
useBlendingState()
useBlendingState(
state?):BlendingState
Defined in: libs/device/src/render_states.ts:344
Allocates a BlendingState
Parameters
state?
Returns
The created BlendingState
defaultBlendingState()
defaultBlendingState():
void
Defined in: libs/device/src/render_states.ts:348
Deletes the BlendingState that was allocated by RenderStateSet.useBlendingState, so that the default value will be used
Returns
void
getTargetBlendingState()
getTargetBlendingState(
index):BlendingState
Defined in: libs/device/src/render_states.ts:353
Gets the BlendingState override for a color target or null if the global/default BlendingState should be used
Parameters
index
number
The zero-based color target index
Returns
useTargetBlendingState()
useTargetBlendingState(
index,state?):BlendingState
Defined in: libs/device/src/render_states.ts:360
Allocates a BlendingState override for a color target
Parameters
index
number
The zero-based color target index
state?
Optional existing BlendingState to use as the override
Returns
The created BlendingState
defaultTargetBlendingState()
defaultTargetBlendingState(
index):void
Defined in: libs/device/src/render_states.ts:365
Deletes the BlendingState override for a color target, so that the global/default BlendingState will be used
Parameters
index
number
The zero-based color target index
Returns
void
useRasterizerState()
useRasterizerState(
state?):RasterizerState
Defined in: libs/device/src/render_states.ts:370
Allocates a RasterizerState
Parameters
state?
Returns
The created RasterizerState
defaultRasterizerState()
defaultRasterizerState():
void
Defined in: libs/device/src/render_states.ts:374
Deletes the RasterizerState that was allocated by RenderStateSet.useRasterizerState, so that the default value will be used
Returns
void
useDepthState()
useDepthState(
state?):DepthState
Defined in: libs/device/src/render_states.ts:379
Allocates a DepthState
Parameters
state?
Returns
The created DepthState
defaultDepthState()
defaultDepthState():
void
Defined in: libs/device/src/render_states.ts:383
Deletes the DepthState that was allocated by RenderStateSet.useDepthState, so that the default value will be used
Returns
void
useStencilState()
useStencilState(
state?):StencilState
Defined in: libs/device/src/render_states.ts:388
Allocates a StencilState
Parameters
state?
Returns
The created StencilState
defaultStencilState()
defaultStencilState():
void
Defined in: libs/device/src/render_states.ts:392
Deletes the StencilState that was allocated by RenderStateSet.useStencilState, so that the default value will be used
Returns
void
apply()
apply(
force?):void
Defined in: libs/device/src/render_states.ts:397
Applis the render statements to current device
Parameters
force?
boolean
Force applying all render statements
Returns
void