Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | List of all members
om::graphics::materials::ConstantVariable Class Reference

A class that provides a desciption of a constant shader input variable. More...

#include <omGraphicsConstantVariable.h>

Public Member Functions

 ConstantVariable (const ShaderSourceString &newName, const AttributeType &newType, ShaderVariableLocation newLocation, Size newArraySize=Size(1))
 Create a shader attribute variable with the specified name, type, and identifier, and array size. More...
 
const ShaderSourceStringgetName () const
 Return the name of the constant variable in the shader source code. More...
 
const AttributeTypegetType () const
 Return an object that describes the type of the constant variable. More...
 
ShaderVariableLocation getLocation () const
 Return the implementation-defined location for the constant variable within the shader. More...
 
Size getArraySize () const
 Return the number of elements that are in the array starting at this variable. More...
 
Bool isArray () const
 Return whether or not this shader variable denotes the start of its array. More...
 

Detailed Description

A class that provides a desciption of a constant shader input variable.

A ConstantVariable object contains a description of a constant input variable from a shader's source code. These are variables that are constant across an entire draw call. The description consists of the variable's name, the type of the variable, and an integral location for the variable within the shader.

Constructor & Destructor Documentation

om::graphics::materials::ConstantVariable::ConstantVariable ( const ShaderSourceString newName,
const AttributeType newType,
ShaderVariableLocation  newLocation,
Size  newArraySize = Size(1) 
)
inline

Create a shader attribute variable with the specified name, type, and identifier, and array size.

This attribute variable represents a variable that is the start of an array of attributes under the same array name.

Member Function Documentation

const ShaderSourceString& om::graphics::materials::ConstantVariable::getName ( ) const
inline

Return the name of the constant variable in the shader source code.

const AttributeType& om::graphics::materials::ConstantVariable::getType ( ) const
inline

Return an object that describes the type of the constant variable.

ShaderVariableLocation om::graphics::materials::ConstantVariable::getLocation ( ) const
inline

Return the implementation-defined location for the constant variable within the shader.

Size om::graphics::materials::ConstantVariable::getArraySize ( ) const
inline

Return the number of elements that are in the array starting at this variable.

For shader variables that are declared as arrays, this function will return the size of the static variable array. For shader variables that are not arrays, this function returns 1.

Bool om::graphics::materials::ConstantVariable::isArray ( ) const
inline

Return whether or not this shader variable denotes the start of its array.


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