- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# FCDEffectPassShader Class Reference

A COLLADA shader. More...

`#include <FCDEffectPassShader.h>`

Inheritance diagram for FCDEffectPassShader:

List of all members.

## Public Member Functions
| FCDEffectPassShader (FCDocument *document, FCDEffectPass *parent)
| Constructor: do not use directly.
virtual | ~FCDEffectPassShader ()
| Destructor.
FCDEffectPass * | GetParent ()
| Retrieves the effect pass that contains this shader.
const FCDEffectPass * | GetParent () 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.
| DEPRECATED (3.05A, GetBindingCount and GetBinding(index)) void GetBindings() const
| Retrieves the list of bindings for this shader.
size_t | GetBindingCount () const
| Retrieves the number of bindings for this shader.
FCDEffectPassBind * | GetBinding (size_t index)
| Retrieves a binding contained in this shader.
const FCDEffectPassBind * | GetBinding (size_t index) const
| See above.
const FCDEffectPassBind * | FindBindingReference (const char *reference) const
| Retrieves a binding for a given COLLADA reference.
FCDEffectPassBind * | FindBindingReference (const char *reference)
| See above.
const FCDEffectPassBind * | FindBindingSymbol (const char *symbol) const
| Retrieves a binding for a given FX symbol.
FCDEffectPassBind * | FindBindingSymbol (const char *symbol)
| See above.
FCDEffectPassBind * | AddBinding ()
| Adds a new binding to this shader.
| DEPRECATED (3.05A, binding->Release()) void ReleaseBinding(FCDEffectPassBind *binding)
| Releases a binding contained within this shader.
const fstring & | GetCompilerTarget () const
| Retrieves the compiler target information.
void | SetCompilerTarget (const fchar *_compilerTarget)
| Sets the compiler target information string.
const fstring & | GetCompilerOptions () const
| Retrieves the compiler option string.
void | SetCompilerOptions (const fchar *_compilerOptions)
| Sets the compiler option string.
const fm::string & | GetName () const
| Retrieves the sub-id of the shader.
void | SetName (const char *_name)
| Sets the sub-id of the shader.
FCDEffectCode * | GetCode ()
| Retrieves the code inclusion that contains the code for this shader.
const FCDEffectCode * | GetCode () const
| See above.
void | SetCode (FCDEffectCode *_code)
| Sets the code inclusion that contains the code for this shader.
FCDEffectPassShader * | Clone (FCDEffectPassShader *clone) const
| Clones this shader.

## 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:
  | parent | The effect pass that contains this shader.

## 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 | ( | FCDEffectPassShader * | clone | ) | const

  | Clones this shader. Parameters:
  | clone | The cloned shader. If this pointer is NULL, a new shader is created and you will need to release this new shader.
Returns: The cloned shader.

FCDEffectPassShader::DEPRECATED | ( | 3. | 05A,
|  | binding-> | Release()
| ) | `[inline]`

  | Releases a binding contained within this shader. Parameters:
  | binding | The binding to release.

FCDEffectPassShader::DEPRECATED | ( | 3. | 05A,
|  | GetBindingCount and | GetBinding(index)
| ) | const`[inline]`

| Retrieves the list of bindings for this shader. Returns: The list of bindings.

const FCDEffectPassBind* FCDEffectPassShader::FindBindingReference | ( | const char * | reference | ) | const

  | Retrieves a binding for a given COLLADA reference. Parameters:
  | reference | The reference of the parameter binding.
Returns: The binding. This pointer will be NULL if the parameter is not bound in this shader.

const FCDEffectPassBind* FCDEffectPassShader::FindBindingSymbol | ( | const char * | symbol | ) | const

  | Retrieves a binding for a given FX symbol. Parameters:
  | symbol | The symbol of the parameter binding.
Returns: The binding. This pointer will be NULL if the parameter is not bound in this 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.

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 fm::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.

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 fchar * | _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 fchar * | _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 char * | _name | ) | `[inline]`

  | Sets the sub-id of the shader. Parameters:
  | _name | The sub-id.

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

- FCDocument/FCDEffectPassShader.h