#include <ShVariableNode.hpp>
Inheritance diagram for SH::ShVariableNode:
Public Types | |
typedef float | ValueType |
This is not necessarily correct. Oh well. | |
Public Member Functions | |
ShVariableNode (ShBindingType kind, int size, ShSemanticType type=SH_ATTRIB) | |
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. | |
std::string | name () const |
Get this variable's name. | |
void | name (const std::string &n) |
Set this variable's name. | |
void | range (ShVariableNode::ValueType low, ShVariableNode::ValueType high) |
Set a range of possible values for this variable's elements. | |
ShVariableNode::ValueType | lowBound () const |
ShVariableNode::ValueType | highBound () const |
ShBindingType | kind () const |
ShSemanticType | specialType () const |
void | specialType (ShSemanticType) |
std::string | nameOfType () const |
Get a string of this var's specialType, kind, & size. | |
void | setValue (int i, ValueType value) |
For variables with values only. | |
ValueType | getValue (int i) const |
Retrieve a particular value. | |
void | addValues () |
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. | |
const ShPointer< ShProgramNode > & | evaluator () const |
Obtain the program defining this uniform, if any. | |
Protected Member Functions | |
void | add_dependent (ShVariableNode *dep) |
void | remove_dependent (ShVariableNode *dep) |
void | update_dependents () |
void | detach_dependencies () |
Protected Attributes | |
bool | m_uniform |
ShBindingType | m_kind |
ShSemanticType | m_specialType |
int | m_size |
int | m_id |
int | m_locked |
ValueType * | m_values |
ValueType | m_lowBound |
ValueType | m_highBound |
ShVariableNodeEval * | m_eval |
std::list< ShVariableNode * > | m_dependents |
Static Protected Attributes | |
int | m_maxID |
Definition at line 74 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 296 of file ShVariableNode.cpp. References ValueType. |
|
Does this variable have values in the host, e.g. for constants and uniforms. Definition at line 142 of file ShVariableNode.cpp. |
|
For variables with values only. Sets the value of the i'th entry. If i is outside [0, size - 1] this is a no-op.
Definition at line 273 of file ShVariableNode.cpp. References SH::shBeginBound(), and SH::shEndBound(). |