FCDEffectPassShader Class Reference

A COLLADA shader. More...

#include <FCDEffectPassShader.h>

Inheritance diagram for FCDEffectPassShader:

FCDObject FUObject List of all members.

Public Member Functions

 FCDEffectPassShader (FCDocument *document, FCDEffectPass *parent)
 Constructor: do not use directly.
virtual ~FCDEffectPassShader ()
 Destructor: do not use directly.
FCDEffectPassGetParent ()
 Retrieves the effect pass that contains this shader.
const FCDEffectPassGetParent () const
 See above.
void AffectsVertices ()
 Sets this shader as affecting vertices.
void AffectsFragments ()
 Sets this shader as affecting fragments/pixels.
bool IsFragmentShader () const
 Retrieves whether this shader affects fragments/pixels.
bool IsVertexShader () const
 Retrieves whether this shader affects vertices.
FCDEffectPassBindListGetBindings ()
 Retrieves the list of bindings for this shader.
const FCDEffectPassBindListGetBindings () const
 See above.
size_t GetBindingCount () const
 Retrieves the number of bindings for this shader.
FCDEffectPassBindGetBinding (size_t index)
 Retrieves a binding contained in this shader.
const FCDEffectPassBindGetBinding (size_t index) const
 See above.
FCDEffectPassBindAddBinding ()
 Adds a new binding to this shader.
void ReleaseBinding (FCDEffectPassBind *binding)
 Releases a binding contained within this shader.
const fstring & GetCompilerTarget () const
 Retrieves the compiler target information.
void SetCompilerTarget (const fstring &_compilerTarget)
 Sets the compiler target information string.
const fstring & GetCompilerOptions () const
 Retrieves the compiler option string.
void SetCompilerOptions (const fstring &_compilerOptions)
 Sets the compiler option string.
const string & GetName () const
 Retrieves the sub-id of the shader.
void SetName (const string &_name)
 Sets the sub-id of the shader.
FCDEffectCodeGetCode ()
 Retrieves the code inclusion that contains the code for this shader.
const FCDEffectCodeGetCode () const
 See above.
void SetCode (FCDEffectCode *_code)
 Sets the code inclusion that contains the code for this shader.
FCDEffectPassShaderClone (FCDEffectPass *newParent) const
 [INTERNAL] Clones this shader.
FUStatus LoadFromXML (xmlNode *shaderNode)
 [INTERNAL] Reads in the pass shader from a given COLLADA XML tree node.
xmlNode * WriteToXML (xmlNode *parentNode) const
 [INTERNAL] Writes out the pass shader to the given COLLADA XML tree node.

Detailed Description

A COLLADA shader.

The shader abstraction level in ColladaFX is contained within the effect passes. There are two types of shaders: vertex shaders and fragment/pixel shaders. A COLLADA shader contains a list of bindings to attach the effect parameters to the shader input parameters.

The shader object also contains the compiler information necessary to build the shader: its code, the compiler target and the compiler options.


Constructor & Destructor Documentation

FCDEffectPassShader::FCDEffectPassShader FCDocument document,
FCDEffectPass parent
 

Constructor: do not use directly.

Instead, use the FCDEffectPass::AddShader, FCDEffectPass::AddVertexShader or FCDEffectPass::AddFragmentShader functions.

Parameters:
document The COLLADA document that owns this shader.
parent The effect pass that contains this shader.

virtual FCDEffectPassShader::~FCDEffectPassShader  )  [virtual]
 

Destructor: do not use directly.

Instead, use the FCDEffectPass::ReleaseShader function.


Member Function Documentation

FCDEffectPassBind* FCDEffectPassShader::AddBinding  ) 
 

Adds a new binding to this shader.

Returns:
The new binding.

void FCDEffectPassShader::AffectsFragments  )  [inline]
 

Sets this shader as affecting fragments/pixels.

This sets the stage of the shader to the fragment/pixel pipeline.

void FCDEffectPassShader::AffectsVertices  )  [inline]
 

Sets this shader as affecting vertices.

This sets the stage of the shader to the vertex pipeline.

FCDEffectPassShader* FCDEffectPassShader::Clone FCDEffectPass newParent  )  const
 

[INTERNAL] Clones this shader.

You must manually delete the clone.

Parameters:
newParent The effect pass that will contain the clone.
Returns:
The cloned shader.

FCDEffectPassBind* FCDEffectPassShader::GetBinding size_t  index  )  [inline]
 

Retrieves a binding contained in this shader.

Parameters:
index The index of the binding.
Returns:
The binding. This pointer will be NULL if the index is out-of-bounds.

size_t FCDEffectPassShader::GetBindingCount  )  const [inline]
 

Retrieves the number of bindings for this shader.

Returns:
The number of bindings.

FCDEffectPassBindList& FCDEffectPassShader::GetBindings  )  [inline]
 

Retrieves the list of bindings for this shader.

Returns:
The list of bindings.

FCDEffectCode* FCDEffectPassShader::GetCode  )  [inline]
 

Retrieves the code inclusion that contains the code for this shader.

Returns:
The code inclusion. This pointer will be NULL if this shader is not yet attached to any code.

const fstring& FCDEffectPassShader::GetCompilerOptions  )  const [inline]
 

Retrieves the compiler option string.

The validity of this string depends on the type of the profile that contains this shader.

Returns:
The compiler option string.

const fstring& FCDEffectPassShader::GetCompilerTarget  )  const [inline]
 

Retrieves the compiler target information.

The validity of this string depends on the type of the profile that contains this shader.

Returns:
The compiler target information string.

const string& FCDEffectPassShader::GetName  )  const [inline]
 

Retrieves the sub-id of the shader.

Returns:
The sub-id.

FCDEffectPass* FCDEffectPassShader::GetParent  )  [inline]
 

Retrieves the effect pass that contains this shader.

Returns:
The effect pass.

bool FCDEffectPassShader::IsFragmentShader  )  const [inline]
 

Retrieves whether this shader affects fragments/pixels.

Returns:
Whether this shader affects fragments/pixels.

bool FCDEffectPassShader::IsVertexShader  )  const [inline]
 

Retrieves whether this shader affects vertices.

Returns:
Whether this shader affects vertices.

FUStatus FCDEffectPassShader::LoadFromXML xmlNode *  shaderNode  ) 
 

[INTERNAL] Reads in the pass shader from a given COLLADA XML tree node.

Parameters:
shaderNode The COLLADA XML tree node.
Returns:
The status of the import. If the status is not successful, it may be dangerous to extract information from the shader.

void FCDEffectPassShader::ReleaseBinding FCDEffectPassBind binding  ) 
 

Releases a binding contained within this shader.

Parameters:
binding The binding to release.

void FCDEffectPassShader::SetCode FCDEffectCode _code  )  [inline]
 

Sets the code inclusion that contains the code for this shader.

Parameters:
_code The code inclusion. This pointer will be NULL to detach a shader from its code.

void FCDEffectPassShader::SetCompilerOptions const fstring &  _compilerOptions  )  [inline]
 

Sets the compiler option string.

The validity of this string depends on the type of the profile that contains this shader.

Parameters:
_compilerOptions The compiler option string.

void FCDEffectPassShader::SetCompilerTarget const fstring &  _compilerTarget  )  [inline]
 

Sets the compiler target information string.

The validity of this string depends on the type of the profile that contains this shader.

Parameters:
_compilerTarget The compiler target information.

void FCDEffectPassShader::SetName const string &  _name  )  [inline]
 

Sets the sub-id of the shader.

Parameters:
_name The sub-id.

xmlNode* FCDEffectPassShader::WriteToXML xmlNode *  parentNode  )  const
 

[INTERNAL] Writes out the pass shader to the given COLLADA XML tree node.

Parameters:
parentNode The COLLADA XML parent node in which to insert the effect profile.
Returns:
The created element XML tree node.


The documentation for this class was generated from the following file:
Generated on Fri May 12 16:44:42 2006 for FCollada by  doxygen 1.4.6-NO