CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

iShaderProgram Struct Reference

A shader-program is either a vertexprogram, fragmentprogram or any other type of "program" utilizied by shader. More...

#include <shader.h>

Inheritance diagram for iShaderProgram:

iBase List of all members.

Public Methods

virtual csPtr< iString > GetProgramID ()=0
 Get a programid for the current program. More...

virtual void Activate (iShaderPass *current, csRenderMesh *mesh)=0
 Sets this program to be the one used when rendering. More...

virtual void Deactivate (iShaderPass *current)=0
 Deactivate program so that it's not used in next rendering. More...

virtual void SetupState (iShaderPass *current, csRenderMesh *mesh)=0
 Setup states needed for proper operation of the shader. More...

virtual void ResetState ()=0
 Reset states to original. More...

virtual bool AddVariable (iShaderVariable *variable)=0
 Add a variable to this context. More...

virtual iShaderVariable * GetVariable (int namehash)=0
 Get variable. More...

virtual csBasicVector GetAllVariableNames ()=0
 Get all variable stringnames added to this context (used when creatingthem). More...

virtual bool IsValid ()=0
 Check if valid. More...

virtual bool Load (iDataBuffer *program)=0
 Loads shaderprogram from buffer. More...

virtual bool Load (iDocumentNode *node)=0
 Loads from a document-node. More...

virtual bool Prepare ()=0
 Prepares the shaderprogram for usage. Must be called before the shader is assigned to a material. More...


Detailed Description

A shader-program is either a vertexprogram, fragmentprogram or any other type of "program" utilizied by shader.

Definition at line 254 of file shader.h.


Member Function Documentation

virtual void iShaderProgram::Activate (  iShaderPass *    current,
csRenderMesh *    mesh
)  [pure virtual]
 

Sets this program to be the one used when rendering.

virtual bool iShaderProgram::AddVariable (  iShaderVariable *    variable )  [pure virtual]
 

Add a variable to this context.

virtual void iShaderProgram::Deactivate (  iShaderPass *    current )  [pure virtual]
 

Deactivate program so that it's not used in next rendering.

virtual csBasicVector iShaderProgram::GetAllVariableNames (    )  [pure virtual]
 

Get all variable stringnames added to this context (used when creatingthem).

virtual csPtr<iString> iShaderProgram::GetProgramID (    )  [pure virtual]
 

Get a programid for the current program.

virtual iShaderVariable* iShaderProgram::GetVariable (  int    namehash )  [pure virtual]
 

Get variable.

virtual bool iShaderProgram::IsValid (    )  [pure virtual]
 

Check if valid.

virtual bool iShaderProgram::Load (  iDocumentNode *    node )  [pure virtual]
 

Loads from a document-node.

virtual bool iShaderProgram::Load (  iDataBuffer *    program )  [pure virtual]
 

Loads shaderprogram from buffer.

virtual bool iShaderProgram::Prepare (    )  [pure virtual]
 

Prepares the shaderprogram for usage. Must be called before the shader is assigned to a material.

virtual void iShaderProgram::ResetState (    )  [pure virtual]
 

Reset states to original.

virtual void iShaderProgram::SetupState (  iShaderPass *    current,
csRenderMesh *    mesh
)  [pure virtual]
 

Setup states needed for proper operation of the shader.


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.2.14