CrystalSpace

Public API Reference

iShader Struct Reference

Specific shader. More...

#include <ivideo/shader/shader.h>

Inheritance diagram for iShader:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual bool ActivatePass (size_t ticket, size_t number)=0
 Activate a pass for rendering.
virtual bool DeactivatePass (size_t ticket)=0
 Completly deactivate a pass.
virtual const char * GetFileName ()=0
 Get name of the File where it was loaded from.
virtual const csShaderMetadataGetMetadata (size_t ticket) const =0
 Get shader metadata.
virtual size_t GetNumberOfPasses (size_t ticket)=0
 Get number of passes this shader have.
virtual size_t GetTicket (const csRenderMeshModes &modes, const iShaderVarStack *stacks)=0
 Query a "shader ticket".
virtual iObjectQueryObject ()=0
 Query the object.
virtual void SetFileName (const char *filename)=0
 Set name of the File where it was loaded from.
virtual bool SetupPass (size_t ticket, const csRenderMesh *mesh, csRenderMeshModes &modes, const iShaderVarStack *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).

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 261 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 const csShaderMetadata& iShader::GetMetadata ( size_t  ticket  )  const [pure virtual]

Get shader metadata.

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 iShaderVarStack 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 iShaderVarStack 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.4.7