csShaderVariableStack Class Reference (Crystal Space 2.0 Public API Reference)

| ## Public API Reference

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

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions
csShaderVariableStack Class Reference

A "shader variable stack". More...

`#include <ivideo/shader/shader.h>`

List of all members.

## Public Member Functions
void | Clear ()
| Clear the current array.
bool | Copy (const csShaderVariableStack &other)
| Copy contents of another stack.
| csShaderVariableStack ()
| Construct an empty stack.
| csShaderVariableStack (const csShaderVariableStack &other)
| Copies from another stack.
| csShaderVariableStack (csShaderVariable **va, size_t size)
| Construct a stack from a preallocated array of shader variables.
size_t | GetSize () const
| Get the number of variable slots in the stack.
void | MakeOwnArray ()
| Make a local copy if the array was preallocated.
void | MergeBack (const csShaderVariableStack &other)
| Merge one stack onto the "back" of this one.
void | MergeFront (const csShaderVariableStack &other)
| Merge one stack onto the "front" of this one.
csShaderVariableStack & | operator= (const csShaderVariableStack &other)
| Copies from another stack.
csShaderVariable *& | operator[] (size_t index)
| Access a single element in the stack.
void | Setup (size_t size)
| Initialize stack internal storage.
void | Setup (csShaderVariable **stack, size_t size)
| Initialize stack with external storage.
void | Setup (const csShaderVariableStack &stack)
| Initialize stack with external storage taken from another stack.

## Detailed Description

A "shader variable stack".

Stores a list of shader variables, indexed by it's name.

Definition at line 65 of file shader.h.

## Constructor & Destructor Documentation

csShaderVariableStack::csShaderVariableStack | ( |  | ) | `[inline]`

Construct an empty stack.

Definition at line 69 of file shader.h.

csShaderVariableStack::csShaderVariableStack | ( | const csShaderVariableStack & | other | ) | `[inline]`

Copies from another stack.

If the other stack was created from a preallocated array, the new stack points to that same array. If the other stack used internal storage the new stack will allocate it's own internal array and copy over the contents.

Definition at line 79 of file shader.h.

csShaderVariableStack::csShaderVariableStack | ( | csShaderVariable ** | va,
|  | size_t | size
| ) |  | `[inline]`

Construct a stack from a preallocated array of shader variables.

Definition at line 94 of file shader.h.

## Member Function Documentation

void csShaderVariableStack::Clear | ( |  | ) | `[inline]`

Clear the current array.

Definition at line 199 of file shader.h.

bool csShaderVariableStack::Copy | ( | const csShaderVariableStack & | other | ) | `[inline]`

Copy contents of another stack.

Unlike operator=() it does not change the storage of this stack. This stack must have the same number of elements as other. Returns whether a copy was actually made. No copy is made if both stacks point to the same storage.

Definition at line 234 of file shader.h.

size_t csShaderVariableStack::GetSize | ( |  | ) | const`[inline]`

Get the number of variable slots in the stack.

Definition at line 180 of file shader.h.

void csShaderVariableStack::MakeOwnArray | ( |  | ) | `[inline]`

Make a local copy if the array was preallocated.

Definition at line 169 of file shader.h.

void csShaderVariableStack::MergeBack | ( | const csShaderVariableStack & | other | ) | `[inline]`

Merge one stack onto the "back" of this one.

Definition at line 217 of file shader.h.

void csShaderVariableStack::MergeFront | ( | const csShaderVariableStack & | other | ) | `[inline]`

Merge one stack onto the "front" of this one.

Definition at line 206 of file shader.h.

csShaderVariableStack& csShaderVariableStack::operator= | ( | const csShaderVariableStack & | other | ) | `[inline]`

Copies from another stack.

If the other stack was created from a preallocated array, the stack points to that same array after the assignment. If the other stack used internal storage the new stack will allocate it's own internal array and copy over the contents.

Definition at line 111 of file shader.h.

csShaderVariable*& csShaderVariableStack::operator[] | ( | size_t | index | ) | `[inline]`

Access a single element in the stack.

Definition at line 186 of file shader.h.

void csShaderVariableStack::Setup | ( | size_t | size | ) | `[inline]`

Initialize stack internal storage.

Definition at line 129 of file shader.h.

void csShaderVariableStack::Setup | ( | csShaderVariable ** | stack,
|  | size_t | size
| ) |  | `[inline]`

Initialize stack with external storage.

Definition at line 147 of file shader.h.

void csShaderVariableStack::Setup | ( | const csShaderVariableStack & | stack | ) | `[inline]`

Initialize stack with external storage taken from another stack.

Definition at line 158 of file shader.h.

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

- ivideo/shader/shader.h