OGRE: Ogre::HlmsLowLevelDatablock Class Reference

| OGRE 2.2.4 Object-Oriented Graphics Rendering Engine

Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
Ogre::HlmsLowLevelDatablock Class Reference
Component » Material

Contains information needed by the UI (2D) for OpenGL ES 2.0. More...

`#include <OgreHlmsLowLevelDatablock.h>`

Inheritance diagram for Ogre::HlmsLowLevelDatablock:
[legend]

## Public Member Functions
| HlmsLowLevelDatablock (IdString name, Hlms *creator, const HlmsMacroblock *macroblock, const HlmsBlendblock *blendblock, const HlmsParamVec &params)
virtual | ~HlmsLowLevelDatablock ()
void | _linkRenderable (Renderable *renderable)
void | _unlinkRenderable (Renderable *renderable)
virtual void | calculateHash ()
| Calculates the hashes needed for sorting by the RenderQueue (i.e. mTextureHash) More...
HlmsDatablock * | clone (String name) const
| Creates a copy of this datablock with the same settings, but a different name. More...
CompareFunction | getAlphaTest (void) const
bool | getAlphaTestShadowCasterOnly (void) const
float | getAlphaTestThreshold (void) const
const HlmsBlendblock * | getBlendblock (bool casterBlock=false) const
Hlms * | getCreator (void) const
virtual ColourValue | getDiffuseColour (void) const
| Returns the closest match for a diffuse colour, if applicable by the actual implementation. More...
virtual TextureGpu * | getDiffuseTexture (void) const
| Returns the closest match for a diffuse texture, if applicable by the actual implementation. More...
virtual ColourValue | getEmissiveColour (void) const
| Returns the closest match for a emissive colour, if applicable by the actual implementation. More...
virtual TextureGpu * | getEmissiveTexture (void) const
| Returns the closest match for a emissive texture, if applicable by the actual implementation. More...
void | getFilenameAndResourceGroup (String const **outFilename, String const **outResourceGroup) const
const vector< Renderable * >::type & | getLinkedRenderables (void) const
const HlmsMacroblock * | getMacroblock (bool casterBlock=false) const
IdString | getName (void) const
const String * | getNameStr (void) const
virtual bool | hasCustomShadowMacroblock (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 *)
void * | operator new (size_t sz)
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 *ptr)
| placement operator new More...
void * | operator new[] (size_t sz)
void * | operator new[] (size_t sz, const char *file, int line, const char *func)
| array operator new, with debug line info More...
virtual void | saveTextures (const String &folderPath, set< String >::type &savedTextures, bool saveOitd, bool saveOriginal, HlmsTextureExportListener *listener)
virtual void | setAlphaTest (CompareFunction compareFunction, bool shadowCasterOnly=false)
| Sets the alpha test to the given compare function. More...
virtual void | setAlphaTestThreshold (float threshold)
| Alpha test's threshold. More...
void | setBlendblock (const HlmsBlendblock &blendblock, bool casterBlock=false)
| Sets a new blendblock that matches the same parameter as the input. More...
void | setBlendblock (const HlmsBlendblock *blendblock, bool casterBlock=false)
| Sets the blendblock from the given pointer that was already retrieved from the HlmsManager. More...
void | setMacroblock (const HlmsMacroblock &macroblock, bool casterBlock=false)
| Sets a new macroblock that matches the same parameter as the input. More...
void | setMacroblock (const HlmsMacroblock *macroblock, bool casterBlock=false)
| Sets the macroblock from the given pointer that was already retrieved from the HlmsManager. More...

## Static Public Member Functions
static const char * | getCmpString (CompareFunction compareFunction)

## Public Attributes
bool | mAllowTextureResidencyChange
| When false, we won't try to have Textures become resident. More...
uint16 | mMacroblockHash [2]
Material * | mProxyMaterial
float | mShadowConstantBias
uint32 | mTextureHash
uint8 | mType

## Friends
class | HlmsLowLevel

## Detailed Description

Contains information needed by the UI (2D) for OpenGL ES 2.0.

## Constructor & Destructor Documentation

## ◆ HlmsLowLevelDatablock()

Ogre::HlmsLowLevelDatablock::HlmsLowLevelDatablock | ( | IdString | name,
|  | Hlms * | creator,
|  | const HlmsMacroblock * | macroblock,
|  | const HlmsBlendblock * | blendblock,
|  | const HlmsParamVec & | params
| ) |  |

## ◆ ~HlmsLowLevelDatablock()

virtual Ogre::HlmsLowLevelDatablock::~HlmsLowLevelDatablock | ( |  | ) |
| virtual

## Member Function Documentation

## ◆ _linkRenderable()

void Ogre::HlmsDatablock::_linkRenderable | ( | Renderable * | renderable | ) |
| inherited

## ◆ _unlinkRenderable()

void Ogre::HlmsDatablock::_unlinkRenderable | ( | Renderable * | renderable | ) |
| inherited

## ◆ calculateHash()

virtual void Ogre::HlmsDatablock::calculateHash | ( |  | ) |
| inlinevirtualinherited

Calculates the hashes needed for sorting by the RenderQueue (i.e. mTextureHash)

Reimplemented in Ogre::HlmsUnlitMobileDatablock, and Ogre::HlmsPbsMobileDatablock.

## ◆ clone()

HlmsDatablock* Ogre::HlmsDatablock::clone | ( | String | name | ) | const
| inherited

Creates a copy of this datablock with the same settings, but a different name.

Parameters

  name | Name of the cloned datablock.

## ◆ getAlphaTest()

CompareFunction Ogre::HlmsDatablock::getAlphaTest | ( | void |  | ) | const
| inherited

## ◆ getAlphaTestShadowCasterOnly()

bool Ogre::HlmsDatablock::getAlphaTestShadowCasterOnly | ( | void |  | ) | const
| inherited

## ◆ getAlphaTestThreshold()

float Ogre::HlmsDatablock::getAlphaTestThreshold | ( | void |  | ) | const
| inlineinherited

## ◆ getBlendblock()

const HlmsBlendblock* Ogre::HlmsDatablock::getBlendblock | ( | bool | casterBlock = `false` | ) | const
| inlineinherited

## ◆ getCmpString()

static const char* Ogre::HlmsDatablock::getCmpString | ( | CompareFunction | compareFunction | ) |
| staticinherited

## ◆ getCreator()

Hlms* Ogre::HlmsDatablock::getCreator | ( | void |  | ) | const
| inlineinherited

## ◆ getDiffuseColour()

virtual ColourValue Ogre::HlmsDatablock::getDiffuseColour | ( | void |  | ) | const
| virtualinherited

Returns the closest match for a diffuse colour, if applicable by the actual implementation.

Note that Unlit implementation returns 0 as diffuse, since it's considered emissive instead due to being bright even in the absence lights.

## ◆ getDiffuseTexture()

virtual TextureGpu* Ogre::HlmsDatablock::getDiffuseTexture | ( | void |  | ) | const
| virtualinherited

Returns the closest match for a diffuse texture, if applicable by the actual implementation.

See HlmsDatablock::getDiffuseColour

## ◆ getEmissiveColour()

virtual ColourValue Ogre::HlmsDatablock::getEmissiveColour | ( | void |  | ) | const
| virtualinherited

Returns the closest match for a emissive colour, if applicable by the actual implementation.

See HlmsDatablock::getDiffuseColour

## ◆ getEmissiveTexture()

virtual TextureGpu* Ogre::HlmsDatablock::getEmissiveTexture | ( | void |  | ) | const
| virtualinherited

Returns the closest match for a emissive texture, if applicable by the actual implementation.

See HlmsDatablock::getDiffuseColour

## ◆ getFilenameAndResourceGroup()

void Ogre::HlmsDatablock::getFilenameAndResourceGroup | ( | String const ** | outFilename,
|  | String const ** | outResourceGroup
| ) |  | const
| inherited

See also
  Hlms::getFilenameAndResourceGroup. This operations is NOT fast. Might return null (if the datablock was removed from the Hlms but somehow is still alive) Usage: String const *filename; String const *resourceGroup; datablock->getFilenameAndResourceGroup( &filename, &resourceGroup ); if( filename && resourceGroup && !filename->empty() && !resourceGroup->empty() ) { //Valid filename & resource group. }

## ◆ getLinkedRenderables()

const vector<Renderable*>::type& Ogre::HlmsDatablock::getLinkedRenderables | ( | void |  | ) | const
| inlineinherited

## ◆ getMacroblock()

const HlmsMacroblock* Ogre::HlmsDatablock::getMacroblock | ( | bool | casterBlock = `false` | ) | const
| inlineinherited

## ◆ getName()

IdString Ogre::HlmsDatablock::getName | ( | void |  | ) | const
| inlineinherited

## ◆ getNameStr()

const String* Ogre::HlmsDatablock::getNameStr | ( | void |  | ) | const
| inherited

See also
  Hlms::getNameStr. This operations is NOT fast. Might return null (if the datablock was removed from the Hlms but somehow is still alive)

## ◆ hasCustomShadowMacroblock()

virtual bool Ogre::HlmsDatablock::hasCustomShadowMacroblock | ( | void |  | ) | const
| virtualinherited

## ◆ 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

## ◆ saveTextures()

virtual void Ogre::HlmsDatablock::saveTextures | ( | const String & | folderPath,
|  | set< String >::type & | savedTextures,
|  | bool | saveOitd,
|  | bool | saveOriginal,
|  | HlmsTextureExportListener * | listener
| ) |  |
| virtualinherited

Remarks
  It's possible to set both saveOitd & saveOriginal to true, but will likely double storage requirements (2x as many textures). Setting both to true is useful for troubleshooting obscure Ogre bugs.

Parameters

  folderPath | Folder where to dump the textures.
  savedTextures | [in/out] Set of texture names. Textures whose name is already in the set won't be saved again. Textures that were saved will be inserted into the set.
  saveOitd | When true, we will download the texture from GPU and save it in OITD format. OITD is faster to load as it's stored in Ogre's native format it understands, but it cannot be opened by traditional image editors; also OITD is not backwards compatible with older versions of Ogre.
  saveOriginal | When true, we will attempt to read the raw filestream of the original texture and save it (i.e. copy the original png/dds/etc file).

Reimplemented in Ogre::OGRE_HLMS_TEXTURE_BASE_CLASS.

## ◆ setAlphaTest()

virtual void Ogre::HlmsDatablock::setAlphaTest | ( | CompareFunction | compareFunction,
|  | bool | shadowCasterOnly = `false`
| ) |  |
| virtualinherited

Sets the alpha test to the given compare function.

CMPF_ALWAYS_PASS means disabled.

See also
  mAlphaTestThreshold. Calling this function triggers a HlmsDatablock::flushRenderables

Remarks
  It is to the derived implementation to actually implement the alpha test.

Parameters

  compareFunction | Compare function to use. Default is CMPF_ALWAYS_PASS, which means disabled. Note: CMPF_ALWAYS_FAIL is not supported. Set a negative threshold to workaround this issue.

## ◆ setAlphaTestThreshold()

virtual void Ogre::HlmsDatablock::setAlphaTestThreshold | ( | float | threshold | ) |
| virtualinherited

Alpha test's threshold.

See also
  setAlphaTest

Parameters

  threshold | Value typically in the range [0; 1)

Reimplemented in Ogre::HlmsPbsMobileDatablock.

## ◆ setBlendblock() [1/2]

void Ogre::HlmsDatablock::setBlendblock | ( | const HlmsBlendblock & | blendblock,
|  | bool | casterBlock = `false`
| ) |  |
| inherited

Sets a new blendblock that matches the same parameter as the input.

Decreases the reference count of the previous mBlendblock. Runs an O(N) search to get the right block. Calling this function triggers a HlmsDatablock::flushRenderables

Parameters

  blendblock | @See HlmsManager::getBlendblock
  casterBlock | True to directly set the blendblock to be used during the shadow mapping's caster pass. Note that when false, it will reset the caster block to the same as the regular one.

## ◆ setBlendblock() [2/2]

void Ogre::HlmsDatablock::setBlendblock | ( | const HlmsBlendblock * | blendblock,
|  | bool | casterBlock = `false`
| ) |  |
| inherited

Sets the blendblock from the given pointer that was already retrieved from the HlmsManager.

Unlike the other overload, this operation is O(1). Calling this function triggers a HlmsDatablock::flushRenderables

Parameters

  blendblock | A valid block. The reference count is increased inside this function.
  casterBlock | True to directly set the blendblock to be used during the shadow mapping's caster pass. Note that when false, it will reset the caster block to the same as the regular one.

## ◆ setMacroblock() [1/2]

void Ogre::HlmsDatablock::setMacroblock | ( | const HlmsMacroblock & | macroblock,
|  | bool | casterBlock = `false`
| ) |  |
| inherited

Sets a new macroblock that matches the same parameter as the input.

Decreases the reference count of the previously set one. Runs an O(N) search to get the right block. Calling this function triggers a HlmsDatablock::flushRenderables

Parameters

  macroblock | @See HlmsManager::getMacroblock
  casterBlock | True to directly set the macroblock to be used during the shadow mapping's caster pass. Note that when false, it will automatically reset the caster's block according to HlmsManager::setShadowMappingUseBackFaces setting.

## ◆ setMacroblock() [2/2]

void Ogre::HlmsDatablock::setMacroblock | ( | const HlmsMacroblock * | macroblock,
|  | bool | casterBlock = `false`
| ) |  |
| inherited

Sets the macroblock from the given pointer that was already retrieved from the HlmsManager.

Unlike the other overload, this operation is O(1). Calling this function triggers a HlmsDatablock::flushRenderables

Parameters

  macroblock | A valid block. The reference count is increased inside this function.
  casterBlock | True to directly set the macroblock to be used during the shadow mapping's caster pass. Note that when false, it will automatically reset the caster's block according to HlmsManager::setShadowMappingUseBackFaces setting.

## Friends And Related Function Documentation

## ◆ HlmsLowLevel

friend class HlmsLowLevel
| friend

## Member Data Documentation

## ◆ mAllowTextureResidencyChange

bool Ogre::HlmsDatablock::mAllowTextureResidencyChange
| inherited

When false, we won't try to have Textures become resident.

## ◆ mMacroblockHash

uint16 Ogre::HlmsDatablock::mMacroblockHash[2]
| inherited

## ◆ mProxyMaterial

Material* Ogre::HlmsLowLevelDatablock::mProxyMaterial

## ◆ mShadowConstantBias

float Ogre::HlmsDatablock::mShadowConstantBias
| inherited

## ◆ mTextureHash

uint32 Ogre::HlmsDatablock::mTextureHash
| inherited

## ◆ mType

uint8 Ogre::HlmsDatablock::mType
| inherited

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

- OgreHlmsLowLevelDatablock.h