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>
This class makes the usage of a vertex and fragment programs (low-level or high-level), with a given set of parameters, explicit.
- Just incase it wasn't clear from the above, this class provides linkage to both GpuProgram and HighLevelGpuProgram, despite its name.
◆ GpuProgramUsage() [1/2]
Default constructor.
- Parameters
-
gptype | The type of program to link to |
◆ GpuProgramUsage() [2/2]
◆ ~GpuProgramUsage()
Ogre::GpuProgramUsage::~GpuProgramUsage |
( |
| ) |
|
|
override |
◆ _load()
void Ogre::GpuProgramUsage::_load |
( |
| ) |
|
Load this usage (and ensure program is loaded)
◆ _unload()
void Ogre::GpuProgramUsage::_unload |
( |
| ) |
|
◆ calculateSize()
size_t Ogre::GpuProgramUsage::calculateSize |
( |
| ) |
const |
◆ getParameters()
Gets the parameters being used here.
◆ getProgram()
Gets the program being used.
◆ getProgramName()
const String& Ogre::GpuProgramUsage::getProgramName |
( |
| ) |
const |
|
inline |
◆ getType()
Gets the type of program we're trying to link to.
◆ loadingComplete()
void Ogre::GpuProgramUsage::loadingComplete |
( |
Resource * |
| ) |
|
|
overridevirtual |
Called whenever the resource finishes loading.
- See also
- Resource::setBackgroundLoaded), the call does not itself occur in the thread which is doing the loading; when loading is complete a response indicator is placed with the ResourceGroupManager, which will then be sent back to the listener as part of the application's primary frame loop thread.
Reimplemented from Ogre::Resource::Listener.
◆ setParameters()
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.
◆ setProgram()
◆ setProgramName()
void Ogre::GpuProgramUsage::setProgramName |
( |
const String & |
name, |
|
|
bool |
resetParams = true |
|
) |
| |
Sets the name of the program to use.
- Parameters
-
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. |
◆ unloadingComplete()
void Ogre::GpuProgramUsage::unloadingComplete |
( |
Resource * |
| ) |
|
|
overridevirtual |
The documentation for this class was generated from the following file: