CrystalSpace

Public API Reference

Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

iShader Struct Reference

Specific shader. More...

#include <ivideo/shader/shader.h>

Inheritance diagram for iShader:

iShaderVariableContext iBase List of all members.

Public Member Functions

virtual iObjectQueryObject ()=0
 Query the object.
virtual const char * GetFileName ()=0
 Get name of the File where it was loaded from.
virtual void SetFileName (const char *filename)=0
 Set name of the File where it was loaded from.
virtual size_t GetTicket (const csRenderMeshModes &modes, const csShaderVarStack &stacks)=0
 Query a "shader ticket".
virtual size_t GetNumberOfPasses (size_t ticket)=0
 Get number of passes this shader have.
virtual bool ActivatePass (size_t ticket, size_t number)=0
 Activate a pass for rendering.
virtual bool SetupPass (size_t ticket, const csRenderMesh *mesh, csRenderMeshModes &modes, const csShaderVarStack &stacks)=0
 Setup a pass.
virtual bool TeardownPass (size_t ticket)=0
 Tear down current state, and prepare for a new mesh (for which SetupPass is called).
virtual bool DeactivatePass (size_t ticket)=0
 Completly deactivate a pass.

Detailed Description

Specific shader.

Can/will be either render-specific or general The shader in this form is "compiled" and cannot be modified.

Definition at line 190 of file shader.h.


Member Function Documentation

virtual bool iShader::ActivatePass size_t  ticket,
size_t  number
[pure virtual]
 

Activate a pass for rendering.

virtual bool iShader::DeactivatePass size_t  ticket  )  [pure virtual]
 

Completly deactivate a pass.

virtual const char* iShader::GetFileName  )  [pure virtual]
 

Get name of the File where it was loaded from.

virtual size_t iShader::GetNumberOfPasses size_t  ticket  )  [pure virtual]
 

Get number of passes this shader have.

virtual size_t iShader::GetTicket const csRenderMeshModes modes,
const csShaderVarStack stacks
[pure virtual]
 

Query a "shader ticket".

Internally, a shader may choose one of several actual techniques or variants at runtime. However, the variant has to be known in order to determine the number of passes or to do pass preparation. As the decision what variant is to be used is made based on the mesh modes and the shader vars used for rendering, those have to be provided to get the actual variant, which is then identified by the "ticket".

virtual iObject* iShader::QueryObject  )  [pure virtual]
 

Query the object.

virtual void iShader::SetFileName const char *  filename  )  [pure virtual]
 

Set name of the File where it was loaded from.

virtual bool iShader::SetupPass size_t  ticket,
const csRenderMesh mesh,
csRenderMeshModes modes,
const csShaderVarStack stacks
[pure virtual]
 

Setup a pass.

virtual bool iShader::TeardownPass size_t  ticket  )  [pure virtual]
 

Tear down current state, and prepare for a new mesh (for which SetupPass is called).


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