#include <CgProgram.h>
Public Member Functions | |
CgProgram (const std::string &programFile, CGprofile profile, const std::string &entryPoint, IoTextureSet *ioTextureSet) | |
unsigned int | getParameterId (const std::string &name) |
void | setParameter (unsigned int parameterId, float value) const |
void | setParameter (unsigned int parameterId, float values[4]) const |
void | setMatrixParameter (unsigned int parameterId, const float values[16]) const |
void | setMatrixParameter (const std::string &name, const float values[16]) |
template<typename T> | |
void | setParameter (const std::string &name, T value) |
void | setTextureParameter (const std::string &name, unsigned int value) |
void | setTextureParameter (unsigned int parameterId, unsigned int value) |
void | setFreeTextureParameter (const std::string &name, GLuint texture) |
void | setFreeTextureParameter (unsigned int parameterId, GLuint texture) |
void | loadModelViewProjection (unsigned int parameterId) const |
IoTextureSet * | getIoTextureSet () const |
bool | isInputTexture (unsigned int texture) const |
void | activate () |
void | deactivate () |
|
Constructs a new CgProgram instance that acts as a wrapper for the Cg program given by the entry point in the Cg program file.
|
|
Activates the Cg program. |
|
Deactivates the Cg program. |
|
Returns a pointer to the IoTextureSet instance used by the CgProgram instance.
|
|
Returns a parameter identifier associated with a Cg parameter with the given name. The Cg parameter is bound to the Cg program.
|
|
Returns whether the texture with the given texture identifier is set to one of the Cg parameters of this CgProgram instance.
|
|
Loads the OpenGL modelview projection matrix into the Cg parameter associated with the given parameter identifier.
|
|
Sets a free texture directly on the Cg parameter associated with the given parameter identifier. The free texture does not have to be a part of the IoTextureSet used by the CgProgram instance.
|
|
Sets a free texture directly on the Cg parameter associated with the given parameter name. The free texture does not have to be a part of the IoTextureSet used by the CgProgram instance.
|
|
Sets a matrix on the Cg parameter associated with the given parameter name.
|
|
Sets a matrix on the Cg parameter associated with the given parameter identifier.
|
|
Sets a value on the Cg parameter associated with the given parameter name.
|
|
Sets a vector on the Cg parameter associated with the given parameter identifier.
|
|
Sets a value on the Cg parameter associated with the given parameter identifier.
|
|
Sets a texture on the Cg parameter associated with the given parameter identifier.
|
|
Sets a texture on the Cg parameter associated with the given parameter name.
|