VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions
makVrv::DtEffectControllerShaderCache Class Reference

brief DtEffectControllerShaderCache is a cache for shaders used by effect texture controller

Public Member Functions

 DtEffectControllerShaderCache (DtDe &de, DtOsgFileCache &fileCache)
 
virtual ~DtEffectControllerShaderCache ()
 
virtual const std::string & vertShaderSource (const std::string &vertShaderFile, int textureUnit) const
 
virtual const std::string & fragShaderSource (const std::string &fragShaderFile, bool forTexArray, const std::string &effectUnitName) const
 

Protected Types

typedef std::pair< std::string,
int
VertShaderKey
 
typedef std::map
< VertShaderKey, std::string > 
MapVertShaders
 
typedef std::pair< std::string,
bool
FragShaderKey
 
typedef std::map
< FragShaderKey, std::string > 
MapFragShaders
 

Protected Member Functions

virtual std::string generateVertShaderSource (const std::string &vertShaderFile, int textureUnit) const
 
virtual std::string generateFragShaderSource (const std::string &fragShaderFile, bool forTexArray, const std::string &effectUnitName) const
 

Protected Attributes

const DtOsgFileCachemyFileCache
 
MapVertShaders myMapVertShaders
 
MapFragShaders myMapFragShaders
 
tbb::spin_rw_mutex myFragMapMutex
 
tbb::spin_rw_mutex myVertMapMutex
 
DtDemyDe
 

Private Member Functions

 DtEffectControllerShaderCache ()
 
 DtEffectControllerShaderCache (const DtEffectControllerShaderCache &other)
 
DtEffectControllerShaderCacheoperator= (const DtEffectControllerShaderCache &other)
 

Member Typedef Documentation

typedef std::pair<std::string, int> makVrv::DtEffectControllerShaderCache::VertShaderKey
protected
typedef std::map<VertShaderKey, std::string> makVrv::DtEffectControllerShaderCache::MapVertShaders
protected
typedef std::pair<std::string, bool> makVrv::DtEffectControllerShaderCache::FragShaderKey
protected
typedef std::map<FragShaderKey, std::string> makVrv::DtEffectControllerShaderCache::MapFragShaders
protected

Constructor & Destructor Documentation

makVrv::DtEffectControllerShaderCache::DtEffectControllerShaderCache ( DtDe de,
DtOsgFileCache fileCache 
)

constructor

virtual makVrv::DtEffectControllerShaderCache::~DtEffectControllerShaderCache ( )
virtual

destructor

makVrv::DtEffectControllerShaderCache::DtEffectControllerShaderCache ( )
private

Default Constructor not implemented.

makVrv::DtEffectControllerShaderCache::DtEffectControllerShaderCache ( const DtEffectControllerShaderCache other)
private

Copy Constructor not implemented – Copy Not Allowed.

Member Function Documentation

DtEffectControllerShaderCache& makVrv::DtEffectControllerShaderCache::operator= ( const DtEffectControllerShaderCache other)
private

Assignment Operator Not implemented – Assignment Not Allowed.

virtual const std::string& makVrv::DtEffectControllerShaderCache::vertShaderSource ( const std::string &  vertShaderFile,
int  textureUnit 
) const
virtual

get vert shader, given an effect vert shader file name, with the multi texture coords adjusted for the given texture unit create an entry in the cache if its not present

virtual const std::string& makVrv::DtEffectControllerShaderCache::fragShaderSource ( const std::string &  fragShaderFile,
bool  forTexArray,
const std::string &  effectUnitName 
) const
virtual

get vert shader, given an effect vert shader file name, with the shader adjusted for texture array, if that bool is true create an entry in the cache if its not present

virtual std::string makVrv::DtEffectControllerShaderCache::generateVertShaderSource ( const std::string &  vertShaderFile,
int  textureUnit 
) const
protectedvirtual

generate the source, given the shader, texture unit

virtual std::string makVrv::DtEffectControllerShaderCache::generateFragShaderSource ( const std::string &  fragShaderFile,
bool  forTexArray,
const std::string &  effectUnitName 
) const
protectedvirtual

generate the source, given the shader, whether its for texture array and the effect unit name

Member Data Documentation

const DtOsgFileCache& makVrv::DtEffectControllerShaderCache::myFileCache
protected
MapVertShaders makVrv::DtEffectControllerShaderCache::myMapVertShaders
mutableprotected
MapFragShaders makVrv::DtEffectControllerShaderCache::myMapFragShaders
mutableprotected
tbb::spin_rw_mutex makVrv::DtEffectControllerShaderCache::myFragMapMutex
mutableprotected
tbb::spin_rw_mutex makVrv::DtEffectControllerShaderCache::myVertMapMutex
mutableprotected
DtDe& makVrv::DtEffectControllerShaderCache::myDe
protected

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

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)