CrystalSpace

Public API Reference

iShaderCompiler Struct Reference

Compiler of shaders. More...

#include <ivideo/shader/shader.h>

Inheritance diagram for iShaderCompiler:

List of all members.

Public Member Functions

virtual csPtr< iShaderCompileShader (iLoaderContext *ldr_context, iDocumentNode *templ, int forcepriority=-1)=0
 Compile a template into a shader.
virtual const char * GetName ()=0
 Get a name identifying this compiler.
virtual csPtr
< iShaderPriorityList
GetPriorities (iDocumentNode *templ)=0
 Return a list of all possible priorities (for techniques) for this shader.
virtual bool IsTemplateToCompiler (iDocumentNode *templ)=0
 Check if template is parsable by this compiler.
virtual bool PrecacheShader (iDocumentNode *node, iHierarchicalCache *cacheTo, bool quick=false)=0
 'Precache' a shader.
virtual bool ValidateTemplate (iDocumentNode *templ)=0
 Validate if a template is a valid shader to this compiler.

Detailed Description

Compiler of shaders.

Compile from a description of the shader to a compiled shader. The exact schema for input is specific to each shader- compiler.

Definition at line 613 of file shader.h.


Member Function Documentation

virtual csPtr<iShader> iShaderCompiler::CompileShader ( iLoaderContext ldr_context,
iDocumentNode templ,
int  forcepriority = -1 
) [pure virtual]

Compile a template into a shader.

Will return 0 if it fails. If the optional 'forcepriority' parameter is given then only the technique with the given priority will be considered. If this technique fails then the shader cannot be compiled. If no priority is forced then the highest priority technique that works will be selected.

virtual const char* iShaderCompiler::GetName (  )  [pure virtual]

Get a name identifying this compiler.

virtual csPtr<iShaderPriorityList> iShaderCompiler::GetPriorities ( iDocumentNode templ  )  [pure virtual]

Return a list of all possible priorities (for techniques) for this shader.

This is a full list. It might also contain priorities for techniques that don't work on this hardware.

virtual bool iShaderCompiler::IsTemplateToCompiler ( iDocumentNode templ  )  [pure virtual]

Check if template is parsable by this compiler.

virtual bool iShaderCompiler::PrecacheShader ( iDocumentNode node,
iHierarchicalCache cacheTo,
bool  quick = false 
) [pure virtual]

'Precache' a shader.

Compiles a shader but stores results of that in the cache cacheTo for faster loading at runtime.

Parameters:
node Root node of the shader to cache.
cacheTo Cache object to store data in. Usually an instance of VfsHierarchicalCache pointing to a VFS dir that is used as a cache directory for the shader manager at runtime.
quick Do a "quick" precache. That means thoroughness is traded for time: the precache will take less time than a full one, but will be incomplete, meaning that some more compilation will take place at load time.
Note:
In practice, 'quick' precaching means that the XMLShader plugin does not compile shader programs; this is deferred to the application run time.
virtual bool iShaderCompiler::ValidateTemplate ( iDocumentNode templ  )  [pure virtual]

Validate if a template is a valid shader to this compiler.


The documentation for this struct was generated from the following file:

Generated for Crystal Space 2.0 by doxygen 1.6.1