OGRE  13.6
Object-Oriented Graphics Rendering Engine
Ogre::RTShader::ProgramManager Class Reference

A singleton manager class that manages shader based programs. More...

#include <OgreShaderProgramManager.h>

+ Inheritance diagram for Ogre::RTShader::ProgramManager:

Public Member Functions

 ProgramManager ()
 Class default constructor. More...
 
 ~ProgramManager ()
 Class destructor. More...
 
void flushGpuProgramsCache ()
 Flush the local GPU programs cache. More...
 
void releasePrograms (const ProgramSet *programSet)
 Release CPU/GPU programs set associated with the given ProgramSet. More...
 
- Public Member Functions inherited from Ogre::Singleton< ProgramManager >
 Singleton (void)
 
 ~Singleton (void)
 

Static Public Member Functions

static ProgramManagergetSingleton ()
 Override standard Singleton retrieval. More...
 
static ProgramManagergetSingletonPtr ()
 Get the singleton instance. More...
 
- Static Public Member Functions inherited from Ogre::Singleton< ProgramManager >
static ProgramManager & getSingleton (void)
 Get the singleton instance. More...
 
static ProgramManager * getSingletonPtr (void)
 Get the singleton instance. More...
 

Detailed Description

A singleton manager class that manages shader based programs.

Constructor & Destructor Documentation

◆ ProgramManager()

Ogre::RTShader::ProgramManager::ProgramManager ( )

Class default constructor.

◆ ~ProgramManager()

Ogre::RTShader::ProgramManager::~ProgramManager ( )

Class destructor.

Member Function Documentation

◆ getSingleton()

static ProgramManager& Ogre::RTShader::ProgramManager::getSingleton ( )
static

Override standard Singleton retrieval.

Why do we do this? Well, it's because the Singleton implementation is in a .h file, which means it gets compiled into anybody who includes it. This is needed for the Singleton template to work, but we actually only want it compiled into the implementation of the class based on the Singleton, not all of them. If we don't change this, we get link errors when trying to use the Singleton-based class from an outside dll.

This method just delegates to the template version anyway, but the implementation stays in this single compilation unit, preventing link errors.

◆ getSingletonPtr()

static ProgramManager* Ogre::RTShader::ProgramManager::getSingletonPtr ( )
static

Get the singleton instance.

◆ releasePrograms()

void Ogre::RTShader::ProgramManager::releasePrograms ( const ProgramSet programSet)

Release CPU/GPU programs set associated with the given ProgramSet.

Parameters
programSetThe ProgramSet holds the programs.

◆ flushGpuProgramsCache()

void Ogre::RTShader::ProgramManager::flushGpuProgramsCache ( )

Flush the local GPU programs cache.


The documentation for this class was generated from the following file: