OGRE
2.2.4
Object-Oriented Graphics Rendering Engine
|
This class makes the usage of a vertex and fragment programs (low-level or high-level), with a given set of parameters, explicit. More...
#include <OgreGpuProgramUsage.h>
Public Member Functions | |
GpuProgramUsage (GpuProgramType gptype, Pass *parent) | |
Default constructor. More... | |
GpuProgramUsage (const GpuProgramUsage &rhs, Pass *newparent) | |
Copy constructor. More... | |
~GpuProgramUsage () | |
void | _load (void) |
Load this usage (and ensure program is loaded) More... | |
void | _unload (void) |
Unload this usage. More... | |
size_t | calculateSize (void) const |
GpuProgramParametersSharedPtr | getParameters (void) |
Gets the parameters being used here. More... | |
const GpuProgramPtr & | getProgram () const |
Gets the program being used. More... | |
const String & | getProgramName (void) const |
Gets the program being used. More... | |
GpuProgramType | getType (void) const |
Gets the type of program we're trying to link to. More... | |
void | loadingComplete (Resource *prog) |
Called whenever the resource finishes loading. More... | |
void | operator delete (void *ptr) |
void | operator delete (void *ptr, void *) |
void | operator delete (void *ptr, const char *, int, const char *) |
void | operator delete[] (void *ptr) |
void | operator delete[] (void *ptr, const char *, int, const char *) |
void * | operator new (size_t sz, const char *file, int line, const char *func) |
operator new, with debug line info More... | |
void * | operator new (size_t sz) |
void * | operator new (size_t sz, void *ptr) |
placement operator new More... | |
void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
array operator new, with debug line info More... | |
void * | operator new[] (size_t sz) |
virtual void | preparingComplete (Resource *) |
Called whenever the resource finishes preparing (paging into memory). More... | |
void | setParameters (GpuProgramParametersSharedPtr params) |
Sets the program parameters that should be used; because parameters can be shared between multiple usages for efficiency, this method is here for you to register externally created parameter objects. More... | |
void | setProgram (GpuProgramPtr &prog) |
Sets the program to use. More... | |
void | setProgramName (const String &name, bool resetParams=true) |
Sets the name of the program to use. More... | |
void | unloadingComplete (Resource *prog) |
Called whenever the resource has been unloaded. More... | |
This class makes the usage of a vertex and fragment programs (low-level or high-level), with a given set of parameters, explicit.
Ogre::GpuProgramUsage::GpuProgramUsage | ( | GpuProgramType | gptype, |
Pass * | parent | ||
) |
Default constructor.
gptype | The type of program to link to |
Ogre::GpuProgramUsage::GpuProgramUsage | ( | const GpuProgramUsage & | rhs, |
Pass * | newparent | ||
) |
Copy constructor.
Ogre::GpuProgramUsage::~GpuProgramUsage | ( | ) |
void Ogre::GpuProgramUsage::_load | ( | void | ) |
Load this usage (and ensure program is loaded)
void Ogre::GpuProgramUsage::_unload | ( | void | ) |
Unload this usage.
size_t Ogre::GpuProgramUsage::calculateSize | ( | void | ) | const |
GpuProgramParametersSharedPtr Ogre::GpuProgramUsage::getParameters | ( | void | ) |
Gets the parameters being used here.
|
inline |
Gets the program being used.
|
inline |
Gets the program being used.
References Ogre::Resource::getName().
|
inline |
Gets the type of program we're trying to link to.
|
virtual |
Called whenever the resource finishes loading.
Reimplemented from Ogre::Resource::Listener.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
operator new, with debug line info
|
inlineinherited |
|
inlineinherited |
placement operator new
|
inlineinherited |
array operator new, with debug line info
|
inlineinherited |
|
inlinevirtualinherited |
Called whenever the resource finishes preparing (paging into memory).
void Ogre::GpuProgramUsage::setParameters | ( | GpuProgramParametersSharedPtr | params | ) |
Sets the program parameters that should be used; because parameters can be shared between multiple usages for efficiency, this method is here for you to register externally created parameter objects.
Otherwise, the parameters will be created for you when a program is linked.
void Ogre::GpuProgramUsage::setProgram | ( | GpuProgramPtr & | prog | ) |
Sets the program to use.
void Ogre::GpuProgramUsage::setProgramName | ( | const String & | name, |
bool | resetParams = true |
||
) |
Sets the name of the program to use.
name | The name of the program to use |
resetParams | If true, this will create a fresh set of parameters from the new program being linked, so if you had previously set parameters you will have to set them again. If you set this to false, you must be absolutely sure that the parameters match perfectly, and in the case of named parameters refers to the indexes underlying them, not just the names. |
|
virtual |
Called whenever the resource has been unloaded.
Reimplemented from Ogre::Resource::Listener.