OGRE  1.8
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Ogre::GpuNamedConstants Struct Reference

Struct collecting together the information for named constants. More...

#include <OgreGpuProgramParams.h>

+ Inheritance diagram for Ogre::GpuNamedConstants:
+ Collaboration diagram for Ogre::GpuNamedConstants:

Public Member Functions

 GpuNamedConstants ()
 
void generateConstantDefinitionArrayEntries (const String &paramName, const GpuConstantDefinition &baseDef)
 Generate additional constant entries for arrays based on a base definition. More...
 
void load (DataStreamPtr &stream)
 Loads constant definitions from a stream, compatible with GpuProgram::setManualNamedConstantsFile. More...
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, void *)
 
void operator delete (void *ptr, const char *, int, const char *)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, const char *, int, const char *)
 
void * operator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info More...
 
void * operator new (size_t sz)
 
void * operator new (size_t sz, void *ptr)
 placement operator new More...
 
void * operator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info More...
 
void * operator new[] (size_t sz)
 
void save (const String &filename) const
 Saves constant definitions to a file, compatible with GpuProgram::setManualNamedConstantsFile. More...
 

Static Public Member Functions

static bool getGenerateAllConstantDefinitionArrayEntries ()
 Indicates whether all array entries will be generated and added to the definitions map. More...
 
static void setGenerateAllConstantDefinitionArrayEntries (bool generateAll)
 Sets whether all array entries will be generated and added to the definitions map. More...
 

Public Attributes

size_t floatBufferSize
 Total size of the float buffer required. More...
 
size_t intBufferSize
 Total size of the int buffer required. More...
 
GpuConstantDefinitionMap map
 Map of parameter names to GpuConstantDefinition. More...
 

Static Protected Attributes

static bool msGenerateAllConstantDefinitionArrayEntries
 Indicates whether all array entries will be generated and added to the definitions map. More...
 

Detailed Description

Struct collecting together the information for named constants.

Definition at line 271 of file OgreGpuProgramParams.h.

Constructor & Destructor Documentation

Ogre::GpuNamedConstants::GpuNamedConstants ( )
inline

Definition at line 280 of file OgreGpuProgramParams.h.

Member Function Documentation

void Ogre::GpuNamedConstants::generateConstantDefinitionArrayEntries ( const String paramName,
const GpuConstantDefinition baseDef 
)

Generate additional constant entries for arrays based on a base definition.

Remarks
Array uniforms will be added just with their base name with no array suffix. This method will add named entries for array suffixes too so individual array entries can be addressed. Note that we only individually index array elements if the array size is up to 16 entries in size. Anything larger than that only gets a [0] entry as well as the main entry, to save cluttering up the name map. After all, you can address the larger arrays in a bulk fashion much more easily anyway.
static bool Ogre::GpuNamedConstants::getGenerateAllConstantDefinitionArrayEntries ( )
static

Indicates whether all array entries will be generated and added to the definitions map.

void Ogre::GpuNamedConstants::load ( DataStreamPtr stream)

Loads constant definitions from a stream, compatible with GpuProgram::setManualNamedConstantsFile.

See also
GpuProgram::setManualNamedConstantsFile
template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr)
inlineinherited

Definition at line 95 of file OgreMemoryAllocatedObject.h.

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

Definition at line 101 of file OgreMemoryAllocatedObject.h.

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

Definition at line 107 of file OgreMemoryAllocatedObject.h.

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

Definition at line 112 of file OgreMemoryAllocatedObject.h.

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

Definition at line 118 of file OgreMemoryAllocatedObject.h.

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

Definition at line 67 of file OgreMemoryAllocatedObject.h.

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

Definition at line 72 of file OgreMemoryAllocatedObject.h.

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

placement operator new

Definition at line 78 of file OgreMemoryAllocatedObject.h.

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

Definition at line 85 of file OgreMemoryAllocatedObject.h.

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

Definition at line 90 of file OgreMemoryAllocatedObject.h.

void Ogre::GpuNamedConstants::save ( const String filename) const

Saves constant definitions to a file, compatible with GpuProgram::setManualNamedConstantsFile.

See also
GpuProgram::setManualNamedConstantsFile
static void Ogre::GpuNamedConstants::setGenerateAllConstantDefinitionArrayEntries ( bool  generateAll)
static

Sets whether all array entries will be generated and added to the definitions map.

Remarks
Usually, array entries can only be individually indexed if they're up to 16 entries long, to save memory - arrays larger than that can be set but only via the bulk setting methods. This option allows you to choose to individually index every array entry.

Member Data Documentation

size_t Ogre::GpuNamedConstants::floatBufferSize

Total size of the float buffer required.

Definition at line 274 of file OgreGpuProgramParams.h.

size_t Ogre::GpuNamedConstants::intBufferSize

Total size of the int buffer required.

Definition at line 276 of file OgreGpuProgramParams.h.

GpuConstantDefinitionMap Ogre::GpuNamedConstants::map

Map of parameter names to GpuConstantDefinition.

Definition at line 278 of file OgreGpuProgramParams.h.

bool Ogre::GpuNamedConstants::msGenerateAllConstantDefinitionArrayEntries
staticprotected

Indicates whether all array entries will be generated and added to the definitions map.

Remarks
Normally, the number of array entries added to the definitions map is capped at 16 to save memory. Setting this value to true allows all of the entries to be generated and added to the map.

Definition at line 323 of file OgreGpuProgramParams.h.


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