Public Member Functions | |
TexturesState () | |
Construct a TexturesState render state. | |
void | ResetTextureBinding (string sName) |
Reset specific texture input. | |
void | ResetTextureBindings () |
Reset every texture input. | |
override void | SetState (RenderContext ctx, ShaderProgram sProgram) |
Apply this texture state. | |
void | SetTextureBinding (string sName, Texture sTexture) |
Set texture input. | |
Static Public Attributes | |
static readonly string | StateID = "Textures" |
The name of this render context. | |
Properties | |
override bool | Inheritable [get] |
Determine whether this RenderState is inheritable. | |
override bool | ServerSide [get] |
Determine whether this RenderState is defined on server side. |
Texture state.
This RenderState is dedicated for setting up shader texture samplers. Every texture used in shader stages shall be managed by the TextureState.
This state is dedicated to setting samplers variables (sampler1D, sampler2D, ...). Each uniform variable which have sampler type has a name and it has associated an unique Texture instance.
A centralized state for each Texture partecipating to the shader program execution is necessary since texture units must be assigned sequentially. This avoid mistakes by aliasing texture units between different states.
Derm.Render.TexturesState.TexturesState | ( | ) |
Construct a TexturesState render state.
void Derm.Render.TexturesState.ResetTextureBinding | ( | string | sName | ) |
Reset specific texture input.
sName | A System.String specifying the name of the uniform variable (sampler) for the corresponding texture. |
void Derm.Render.TexturesState.ResetTextureBindings | ( | ) |
Reset every texture input.
override void Derm.Render.TexturesState.SetState | ( | RenderContext | ctx, | |
ShaderProgram | sProgram | |||
) | [virtual] |
void Derm.Render.TexturesState.SetTextureBinding | ( | string | sName, | |
Texture | sTexture | |||
) |
Set texture input.
readonly string Derm.Render.TexturesState.StateID = "Textures" [static] |
The name of this render context.
override bool Derm.Render.TexturesState.Inheritable [get] |
Determine whether this RenderState is inheritable.
This RenderState is not inheritable.
Reimplemented from Derm.Render.RenderState.
override bool Derm.Render.TexturesState.ServerSide [get] |
Determine whether this RenderState is defined on server side.
This RenderState doesn't modify the OpenGL internal state.
Reimplemented from Derm.Render.RenderState.