OGRE
1.12.13
Object-Oriented Graphics Rendering Engine
|
A class that represents a shader based program. More...
#include <OgreShaderProgram.h>
Public Member Functions | |
~Program () | |
Class destructor. More... | |
void | addDependency (const String &libFileName) |
Add dependency for this program. More... | |
void | addPreprocessorDefines (const String &defines) |
Function * | createFunction (const String &name, const String &desc, const Function::FunctionType functionType) |
const String & | getDependency (unsigned int index) const |
Get the library name of the given index dependency. More... | |
size_t | getDependencyCount () const |
Get the number of external libs this program depends on. More... | |
Function * | getEntryPointFunction () |
Function * | getFunctionByName (const String &name) |
const ShaderFunctionList & | getFunctions () const |
Function * | getMain () |
UniformParameterPtr | getParameterByAutoType (GpuProgramParameters::AutoConstantType autoType) |
Get parameter by a given auto constant type. More... | |
UniformParameterPtr | getParameterByName (const String &name) |
Get parameter by a given name. More... | |
UniformParameterPtr | getParameterByType (GpuConstantType type, int index) |
Get parameter by a given type and index. More... | |
const UniformParameterList & | getParameters () const |
Get the list of uniform parameters of this program. More... | |
const String & | getPreprocessorDefines () const |
bool | getSkeletalAnimationIncluded () const |
Returns whether a vertex program includes the required instructions to perform skeletal animation. More... | |
GpuProgramType | getType () const |
Get the type of this program. More... | |
bool | getUseColumnMajorMatrices () const |
Returns whether Ogre will pass auto-bound matrices as column-major. More... | |
UniformParameterPtr | resolveAutoParameterInt (GpuProgramParameters::AutoConstantType autoType, GpuConstantType type, size_t data, size_t size=0) |
Resolve uniform auto constant parameter with associated int data of this program. More... | |
UniformParameterPtr | resolveAutoParameterReal (GpuProgramParameters::AutoConstantType autoType, GpuConstantType type, Real data, size_t size=0) |
Resolve uniform auto constant parameter with associated real data of this program. More... | |
UniformParameterPtr | resolveAutoParameterReal (GpuProgramParameters::AutoConstantType autoType, Real data, size_t size=0) |
Resolve uniform auto constant parameter with associated real data of this program. More... | |
UniformParameterPtr | resolveParameter (GpuConstantType type, const String &name, int index=-1) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
UniformParameterPtr | resolveParameter (GpuConstantType type, int index, uint16 variability, const String &suggestedName, size_t size=0) |
Resolve uniform parameter of this program. More... | |
UniformParameterPtr | resolveParameter (GpuProgramParameters::AutoConstantType autoType, size_t data=0) |
Resolve uniform auto constant parameter. More... | |
void | setEntryPointFunction (Function *function) |
void | setSkeletalAnimationIncluded (bool value) |
Sets whether a vertex program includes the required instructions to perform skeletal animation. More... | |
void | setUseColumnMajorMatrices (bool value) |
Tells Ogre whether auto-bound matrices should be sent in column or row-major order. More... | |
A class that represents a shader based program.
Ogre::RTShader::Program::~Program | ( | ) |
Class destructor.
GpuProgramType Ogre::RTShader::Program::getType | ( | ) | const |
Get the type of this program.
UniformParameterPtr Ogre::RTShader::Program::resolveAutoParameterReal | ( | GpuProgramParameters::AutoConstantType | autoType, |
Real | data, | ||
size_t | size = 0 |
||
) |
Resolve uniform auto constant parameter with associated real data of this program.
autoType | The auto type of the desired parameter. |
data | The data to associate with the auto parameter. |
size | number of elements in the parameter. |
UniformParameterPtr Ogre::RTShader::Program::resolveAutoParameterReal | ( | GpuProgramParameters::AutoConstantType | autoType, |
GpuConstantType | type, | ||
Real | data, | ||
size_t | size = 0 |
||
) |
Resolve uniform auto constant parameter with associated real data of this program.
autoType | The auto type of the desired parameter. |
type | The desired data type of the auto parameter. |
data | The data to associate with the auto parameter. |
size | number of elements in the parameter. |
UniformParameterPtr Ogre::RTShader::Program::resolveAutoParameterInt | ( | GpuProgramParameters::AutoConstantType | autoType, |
GpuConstantType | type, | ||
size_t | data, | ||
size_t | size = 0 |
||
) |
Resolve uniform auto constant parameter with associated int data of this program.
autoType | The auto type of the desired parameter. |
type | The desired data type of the auto parameter. |
data | The data to associate with the auto parameter. |
size | number of elements in the parameter. |
UniformParameterPtr Ogre::RTShader::Program::resolveParameter | ( | GpuConstantType | type, |
int | index, | ||
uint16 | variability, | ||
const String & | suggestedName, | ||
size_t | size = 0 |
||
) |
Resolve uniform parameter of this program.
type | The type of the desired parameter. |
index | The index of the desired parameter. |
suggestedName | The suggested name for the parameter in case new one should be create. |
variability | How this parameter varies (bitwise combination of GpuProgramVariability). |
size | number of elements in the parameter. |
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
References Ogre::GPV_GLOBAL.
UniformParameterPtr Ogre::RTShader::Program::resolveParameter | ( | GpuProgramParameters::AutoConstantType | autoType, |
size_t | data = 0 |
||
) |
Resolve uniform auto constant parameter.
autoType | The auto type of the desired parameter |
data | The data to associate with the auto parameter. |
UniformParameterPtr Ogre::RTShader::Program::getParameterByName | ( | const String & | name | ) |
Get parameter by a given name.
name | The name of the parameter to search for. |
UniformParameterPtr Ogre::RTShader::Program::getParameterByAutoType | ( | GpuProgramParameters::AutoConstantType | autoType | ) |
Get parameter by a given auto constant type.
autoType | The auto type of the parameter to search for. |
UniformParameterPtr Ogre::RTShader::Program::getParameterByType | ( | GpuConstantType | type, |
int | index | ||
) |
Get parameter by a given type and index.
type | The type of the parameter to search for. |
index | The index of the parameter to search for. |
|
inline |
Get the list of uniform parameters of this program.
Function* Ogre::RTShader::Program::createFunction | ( | const String & | name, |
const String & | desc, | ||
const Function::FunctionType | functionType | ||
) |
|
inline |
|
inline |
|
inline |
|
inline |
void Ogre::RTShader::Program::addDependency | ( | const String & | libFileName | ) |
Add dependency for this program.
Basically a filename that will be included in this program and provide predefined shader functions code. One should verify that the given library file he provides can be reached by the resource manager. This step can be achieved using the ResourceGroupManager::addResourceLocation method.
size_t Ogre::RTShader::Program::getDependencyCount | ( | ) | const |
Get the number of external libs this program depends on.
const String& Ogre::RTShader::Program::getDependency | ( | unsigned int | index | ) | const |
Get the library name of the given index dependency.
index | The index of the dependecy. |
|
inline |
Sets whether a vertex program includes the required instructions to perform skeletal animation.
|
inline |
Returns whether a vertex program includes the required instructions to perform skeletal animation.
|
inline |
Tells Ogre whether auto-bound matrices should be sent in column or row-major order.
value | Should Ogre pass auto-bound matrices as column-major? The default is true. |
|
inline |
Returns whether Ogre will pass auto-bound matrices as column-major.
void Ogre::RTShader::Program::addPreprocessorDefines | ( | const String & | defines | ) |
|
inline |