#include <ShVariableNode.hpp>
Inheritance diagram for SH::ShVariableNode:


Public Member Functions | |
| ShVariableNode (ShBindingType kind, int size, ShValueType valueType, ShSemanticType type=SH_ATTRIB) | |
| Constructs a VariableNode that holds a tuple of data of type. | |
| bool | uniform () const |
| Is this a uniform (non-shader specific) variable? | |
| bool | hasValues () const |
| Does this variable have values in the host, e.g. | |
| int | size () const |
| Get the number of elements in this variable. | |
| void | size (int size) |
| void | lock () |
| Do not update bound shaders in subsequent setValue calls. | |
| void | unlock () |
| Update bound shader values, and turn off locking. | |
| ShValueType | valueType () const |
| Returns index of the data type held in this node. | |
| std::string | name () const |
| Get this variable's name. | |
| void | name (const std::string &n) |
| Set this variable's name. | |
| void | rangeVariant (const ShVariant *low, const ShVariant *high) |
| Set a range of possible values for this variable's elements. | |
| void | rangeVariant (const ShVariant *low, const ShVariant *high, bool neg, const ShSwizzle &writemask) |
| ShVariantPtr | lowBoundVariant () const |
| Generates a new ShVariant holding the lower bound. | |
| ShVariantPtr | highBoundVariant () const |
| Generates a new ShVariant holding the upper bound. | |
| ShBindingType | kind () const |
| ShSemanticType | specialType () const |
| void | specialType (ShSemanticType) |
| std::string | nameOfType () const |
| Get a string of this var's specialType, kind, & size. | |
| const ShVariant * | getVariant () const |
| Retrieve the variant. | |
| ShVariant * | getVariant () |
| Retrieve the variant. This should probably only be used internally. | |
| void | addVariant () |
| Ensure this node has space to store host-side values. | |
| void | attach (const ShPointer< ShProgramNode > &evaluator) |
| Attaching a null program causes this uniform to no longer become dependent. | |
| void | update () |
| Reevaluate a dependent uniform. | |
| void | update_all () |
| const ShPointer< ShProgramNode > & | evaluator () const |
| Updates a uniform in currently bound shaders and all dependencies Obtain the program defining this uniform, if any. | |
| void * | operator new (std::size_t size) |
| void | operator delete (void *d) |
| ShVariableNodePtr | clone (ShBindingType newKind=SH_BINDINGTYPE_END, int newSize=0, ShValueType newValueType=SH_VALUETYPE_END, ShSemanticType newType=SH_SEMANTICTYPE_END, bool updateVarList=true, bool keepUniform=true) const |
| void | setVariant (const ShVariant *other) |
| void | setVariant (ShVariantCPtr other) |
| void | setVariant (const ShVariant *other, int index) |
| void | setVariant (ShVariantCPtr other, int index) |
| void | setVariant (const ShVariant *other, bool neg, const ShSwizzle &writemask) |
| void | setVariant (ShVariantCPtr other, bool neg, const ShSwizzle &writemask) |
Protected Member Functions | |
| ShVariableNode (const ShVariableNode &old, ShBindingType newKind, int newSize, ShValueType newValueType, ShSemanticType newType, bool updateVarList, bool keepUniform) | |
| Creates a new variable node that holds the same data type as old. | |
| ShVariant * | makeLow () const |
| ShVariant * | makeHigh () const |
| void | programVarListInit () |
| void | add_dependent (ShVariableNode *dep) |
| After kind, size and type are set, this. | |
| void | remove_dependent (ShVariableNode *dep) |
| void | update_dependents () |
| void | detach_dependencies () |
Protected Attributes | |
| bool | m_uniform |
| ShBindingType | m_kind |
| ShSemanticType | m_specialType |
| ShValueType | m_valueType |
| int | m_size |
| int | m_id |
| int | m_locked |
| ShVariantPtr | m_variant |
| Ref-counted pointer to the variant. | |
| ShVariableNodeEval * | m_eval |
| std::list< ShVariableNode * > | m_dependents |
Static Protected Attributes | |
| static int | m_maxID |
| static ShPool * | m_pool |
Definition at line 53 of file ShVariableNode.hpp.
|
|
Ensure this node has space to store host-side values. Normally this is not necessary, but when uniforms are given dependent programs and evaluated all the temporaries will need to store values during an evaluation. Definition at line 394 of file ShVariableNode.cpp. References m_variant. Referenced by ShVariableNode(). |
|
|
Does this variable have values in the host, e.g. for constants and uniforms. Definition at line 127 of file ShVariableNode.cpp. References m_variant. |
|
|
Ref-counted pointer to the variant. ShVariableNode is always the sole owner of this pointer once the node exists. Definition at line 219 of file ShVariableNode.hpp. Referenced by addVariant(), getVariant(), hasValues(), and name(). |
1.4.1