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 in case 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 |
parent | |
◆ GpuProgramUsage() [2/2]
◆ ~GpuProgramUsage()
Ogre::GpuProgramUsage::~GpuProgramUsage |
( |
| ) |
|
◆ getType()
Gets the type of program we're trying to link to.
◆ 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. |
◆ setProgram()
void Ogre::GpuProgramUsage::setProgram |
( |
const GpuProgramPtr & |
prog, |
|
|
bool |
resetParams = true |
|
) |
| |
◆ getProgram()
Gets the program being used.
◆ getProgramName()
const String& Ogre::GpuProgramUsage::getProgramName |
( |
void |
| ) |
const |
|
inline |
◆ 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.
◆ getParameters()
Gets the parameters being used here.
◆ _load()
void Ogre::GpuProgramUsage::_load |
( |
void |
| ) |
|
Load this usage (and ensure program is loaded)
◆ _unload()
void Ogre::GpuProgramUsage::_unload |
( |
void |
| ) |
|
◆ calculateSize()
size_t Ogre::GpuProgramUsage::calculateSize |
( |
void |
| ) |
const |
◆ unloadingComplete()
void Ogre::GpuProgramUsage::unloadingComplete |
( |
Resource * |
| ) |
|
|
overridevirtual |
◆ 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.
◆ _getProgramByName()
The documentation for this class was generated from the following file: