OGRE 2.1
Object-Oriented Graphics Rendering Engine
|
A class that represents a shader based program. More...
#include <OgreShaderProgram.h>
Public Member Functions | |
void | addDependency (const String &libFileName) |
Add dependency for this program. | |
Function * | createFunction (const String &name, const String &desc, const Function::FunctionType functionType) |
Create new function in this program. | |
const String & | getDependency (unsigned int index) const |
Get the library name of the given index dependency. | |
size_t | getDependencyCount () const |
Get the number of external libs this program depends on. | |
Function * | getEntryPointFunction () |
Get the entry point function of this program. | |
Function * | getFunctionByName (const String &name) |
Get a function by a given name. | |
const ShaderFunctionList & | getFunctions () const |
Get the function list of this program. | |
UniformParameterPtr | getParameterByAutoType (GpuProgramParameters::AutoConstantType autoType) |
Get parameter by a given auto constant type. | |
UniformParameterPtr | getParameterByName (const String &name) |
Get parameter by a given name. | |
UniformParameterPtr | getParameterByType (GpuConstantType type, int index) |
Get parameter by a given type and index. | |
const UniformParameterList & | getParameters () const |
Get the list of uniform parameters of this program. | |
bool | getSkeletalAnimationIncluded () const |
Returns whether a vertex program includes the required instructions to perform skeletal animation. | |
GpuProgramType | getType () const |
Get the type of this program. | |
bool | getUseColumnMajorMatrices () const |
Returns whether Ogre will pass auto-bound matrices as column-major. | |
void | operator delete (void *ptr) |
void | operator delete (void *ptr, const char *, int, const char *) |
void | operator delete (void *ptr, void *) |
void | operator delete[] (void *ptr) |
void | operator delete[] (void *ptr, const char *, int, const char *) |
void * | operator new (size_t sz) |
void * | operator new (size_t sz, const char *file, int line, const char *func) |
operator new, with debug line info | |
void * | operator new (size_t sz, void *ptr) |
placement operator new | |
void * | operator new[] (size_t sz) |
void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
array operator new, with debug line info | |
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. | |
UniformParameterPtr | resolveAutoParameterInt (GpuProgramParameters::AutoConstantType autoType, size_t data, size_t size=0) |
Resolve uniform auto constant parameter with associated int data of this program. | |
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. | |
UniformParameterPtr | resolveAutoParameterReal (GpuProgramParameters::AutoConstantType autoType, Real data, size_t size=0) |
Resolve uniform auto constant parameter with associated real data of this program. | |
UniformParameterPtr | resolveParameter (GpuConstantType type, int index, uint16 variability, const String &suggestedName, size_t size=0) |
Resolve uniform parameter of this program. | |
void | setEntryPointFunction (Function *function) |
Set the entry point function. | |
void | setSkeletalAnimationIncluded (bool value) |
Sets whether a vertex program includes the required instructions to perform skeletal animation. | |
void | setUseColumnMajorMatrices (bool value) |
Tells Ogre whether auto-bound matrices should be sent in column or row-major order. | |
Friends | |
class | ProgramManager |
A class that represents a shader based program.
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.
Function * Ogre::RTShader::Program::createFunction | ( | const String & | name, |
const String & | desc, | ||
const Function::FunctionType | functionType | ||
) |
Create new function in this program.
Return the newly created function instance.
name | The name of the function to create. |
desc | The description of the function. |
Get the library name of the given index dependency.
index | The index of the dependecy. |
size_t Ogre::RTShader::Program::getDependencyCount | ( | ) | const |
Get the number of external libs this program depends on.
|
inline |
Get the entry point function of this program.
Get a function by a given name.
Return NULL if no matching function found.
name | The name of the function to search for. |
|
inline |
Get the function list of this program.
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::getParameterByName | ( | const String & | name | ) |
Get parameter by a given name.
name | The name 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.
|
inline |
Returns whether a vertex program includes the required instructions to perform skeletal animation.
GpuProgramType Ogre::RTShader::Program::getType | ( | ) | const |
Get the type of this program.
|
inline |
Returns whether Ogre will pass auto-bound matrices as column-major.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
operator new, with debug line info
placement operator new
|
inlineinherited |
|
inlineinherited |
array operator new, with debug line info
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. Return parameter instance in case of that resolve operation succeeded. |
UniformParameterPtr Ogre::RTShader::Program::resolveAutoParameterInt | ( | GpuProgramParameters::AutoConstantType | autoType, |
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. |
data | The data to associate with the auto parameter. |
size | number of elements in the parameter. Return parameter instance in case of that resolve operation succeeded. |
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. Return parameter instance in case of that resolve operation succeeded. |
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. Return parameter instance in case of that resolve operation succeeded. |
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. Return parameter instance in case of that resolve operation succeeded. |
Set the entry point function.
function | The function that will use as entry point of this program. |
Sets whether a vertex program includes the required instructions to perform skeletal animation.
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. |
|
friend |