OGRE 2.1
Object-Oriented Graphics Rendering Engine
Loading...
Searching...
No Matches
Ogre::ShaderParams Class Reference

The purpose of this class is to contain a set of both auto and manual parameters that may apply to multiple shaders; without having the shader to be created first (the drawback of GpuProgramParameters). More...

#include <OgreShaderParams.h>

+ Inheritance diagram for Ogre::ShaderParams:

Classes

struct  AutoParam
 
struct  ManualParam
 
struct  Param
 

Public Types

enum  ElementType { ElementInt , ElementUInt , ElementFloat }
 
typedef vector< Param >::type ParamVec
 

Public Member Functions

 ShaderParams ()
 
ParamfindParameter (const String &name)
 Finds a parameter.
 
uint32 getUpdateCounter (void) const
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, const char *, int, const char *)
 
void operator delete (void *ptr, void *)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, const char *, int, const char *)
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info
 
voidoperator new (size_t sz, void *ptr)
 placement operator new
 
voidoperator new[] (size_t sz)
 
voidoperator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info
 
void setDirty (void)
 Call this whenever you've updated a parameter in mParams.
 
void updateParameters (GpuProgramParametersSharedPtr params, bool bForce)
 

Public Attributes

ParamVec mParams
 
bool mSilenceMissingParameterWarnings
 Don't log exceptions about missing parameters.
 
uint32 mUpdateCounter
 

Detailed Description

The purpose of this class is to contain a set of both auto and manual parameters that may apply to multiple shaders; without having the shader to be created first (the drawback of GpuProgramParameters).

Useful when loading an Hlms material via JSON (e.g. a Compute Job) which may generate multiple shaders depending on the property settings.
Parameters are kept unsorted in mParams

Member Typedef Documentation

◆ ParamVec

Member Enumeration Documentation

◆ ElementType

Enumerator
ElementInt 
ElementUInt 
ElementFloat 

Constructor & Destructor Documentation

◆ ShaderParams()

Ogre::ShaderParams::ShaderParams ( )

Member Function Documentation

◆ findParameter()

Param * Ogre::ShaderParams::findParameter ( const String name)

Finds a parameter.

Returns null if not found. This operation is O(N) as it makes a linear search. You can cache the return pointer (as long as the iterators from mParams aren't invalidated)

◆ getUpdateCounter()

uint32 Ogre::ShaderParams::getUpdateCounter ( void  ) const
inline

◆ operator delete() [1/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void ptr)
inlineinherited

◆ operator delete() [2/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void ptr,
const char ,
int  ,
const char  
)
inlineinherited

◆ operator delete() [3/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void ptr,
void  
)
inlineinherited

◆ operator delete[]() [1/2]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void ptr)
inlineinherited

◆ operator delete[]() [2/2]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void ptr,
const char ,
int  ,
const char  
)
inlineinherited

◆ operator new() [1/3]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz)
inlineinherited

◆ operator new() [2/3]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
const char file,
int  line,
const char func 
)
inlineinherited

operator new, with debug line info

◆ operator new() [3/3]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
void ptr 
)
inlineinherited

placement operator new

◆ operator new[]() [1/2]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz)
inlineinherited

◆ operator new[]() [2/2]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz,
const char file,
int  line,
const char func 
)
inlineinherited

array operator new, with debug line info

◆ setDirty()

void Ogre::ShaderParams::setDirty ( void  )
inline

Call this whenever you've updated a parameter in mParams.

◆ updateParameters()

void Ogre::ShaderParams::updateParameters ( GpuProgramParametersSharedPtr  params,
bool  bForce 
)

Member Data Documentation

◆ mParams

ParamVec Ogre::ShaderParams::mParams

◆ mSilenceMissingParameterWarnings

bool Ogre::ShaderParams::mSilenceMissingParameterWarnings

Don't log exceptions about missing parameters.

◆ mUpdateCounter

uint32 Ogre::ShaderParams::mUpdateCounter

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