Derm.Render.TexturesState Class Reference

Texture state. More...

Inheritance diagram for Derm.Render.TexturesState:
Derm.Render.RenderState Derm.Render.IShaderState

List of all members.

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.

Detailed Description

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.


Constructor & Destructor Documentation

Derm.Render.TexturesState.TexturesState (  ) 

Construct a TexturesState render state.


Member Function Documentation

void Derm.Render.TexturesState.ResetTextureBinding ( string  sName  ) 

Reset specific texture input.

Parameters:
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]

Apply this texture state.

Parameters:
ctx 
sProgram 

Reimplemented from Derm.Render.RenderState.

void Derm.Render.TexturesState.SetTextureBinding ( string  sName,
Texture  sTexture 
)

Set texture input.

Parameters:
sName A System.String specifying the name of the uniform variable (sampler) for the corresponding texture.
sTexture A Texture specifying the texture object to bind on uniform variable. Attentions shall be taken to bind a correct sampler type depending on Texture implementation.

Member Data Documentation

readonly string Derm.Render.TexturesState.StateID = "Textures" [static]

The name of this render context.


Property Documentation

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.



Services powered by Get Deus Ex Render Machina at SourceForge.net. Fast, secure and Free Open Source software downloads