![]() |
OGRE-Next
4.0.0unstable
Object-Oriented Graphics Rendering Engine
|
This is not a regular header, therefore it has no include guards. More...
#include <OgreHlmsTextureBaseClass.h>
Public Member Functions | |
OGRE_HLMS_TEXTURE_BASE_CLASS (IdString name, Hlms *creator, const HlmsMacroblock *macroblock, const HlmsBlendblock *blendblock, const HlmsParamVec ¶ms) | |
~OGRE_HLMS_TEXTURE_BASE_CLASS () override | |
void | _setSamplerblock (uint8 texType, const HlmsSamplerblock *samplerblockPtr) |
Same as setSamplerblock, but samplerblockPtr is a raw samplerblock retrieved from HlmsManager, and is assumed to have its reference count already be incremented for us. More... | |
void | _setTexture (uint8 texType, TextureGpu *texture, const HlmsSamplerblock *samplerblockPtr=0, uint16 sliceIdx=std::numeric_limits< uint16 >::max()) |
Same as setTexture, but samplerblockPtr is a raw samplerblock retrieved from HlmsManager, and is assumed to have its reference count already be incremented for us (note HlmsManager::getSamplerblock() already increments the ref. More... | |
uint8 | getIndexToDescriptorSampler (uint8 texType) |
Do not call this function if RSC_SEPARATE_SAMPLERS_FROM_TEXTURES is not set. More... | |
uint8 | getIndexToDescriptorTexture (uint8 texType) |
This function has O( log N ) complexity, but O(1) if the texture was not set. More... | |
const HlmsSamplerblock * | getSamplerblock (uint8 texType) const |
TextureGpu * | getTexture (uint8 texType) const |
void | loadAllTextures () |
void | notifyTextureChanged (TextureGpu *texture, TextureGpuListener::Reason reason, void *extraData) override |
Called when a TextureGpu changed in a way that affects how it is displayed: More... | |
void | preload () override |
Tells datablock to start loading all of its textures (if not loaded already) and any other resource it may need. More... | |
void | saveTextures (const String &folderPath, set< String >::type &savedTextures, bool saveOitd, bool saveOriginal, HlmsTextureExportListener *listener) override |
void | setAlphaTestThreshold (float threshold) override |
Alpha test's threshold. More... | |
void | setSamplerblock (uint8 texType, const HlmsSamplerblock ¶ms) |
Sets a new sampler block to be associated with the texture (i.e. More... | |
void | setTexture (uint8 texType, TextureGpu *texture, const HlmsSamplerblock *refParams=0, uint16 sliceIdx=std::numeric_limits< uint16 >::max()) |
Sets a new texture for rendering. More... | |
bool | shouldStayLoaded (TextureGpu *texture) override |
Return true if this TextureGpu should likely stay loaded or else graphical changes could occur. More... | |
![]() | |
HlmsDatablock (IdString name, Hlms *creator, const HlmsMacroblock *macroblock, const HlmsBlendblock *blendblock, const HlmsParamVec ¶ms) | |
virtual | ~HlmsDatablock () |
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... | |
bool | getAlphaHashing () const |
CompareFunction | getAlphaTest () const |
bool | getAlphaTestShadowCasterOnly () const |
float | getAlphaTestThreshold () const |
const HlmsBlendblock * | getBlendblock (bool casterBlock=false) const |
Hlms * | getCreator () const |
int32 | getCustomPieceFileIdHash (ShaderType shaderType) const |
Returns the internal ID generated by setCustomPieceFile() and setCustomPieceCodeFromMemory(). More... | |
const String & | getCustomPieceFileStr (ShaderType shaderType) const |
Returns the filename argument set to setCustomPieceFile() and setCustomPieceCodeFromMemory(). More... | |
virtual ColourValue | getDiffuseColour () const |
Returns the closest match for a diffuse colour, if applicable by the actual implementation. More... | |
virtual TextureGpu * | getDiffuseTexture () const |
Returns the closest match for a diffuse texture, if applicable by the actual implementation. More... | |
virtual ColourValue | getEmissiveColour () const |
Returns the closest match for a emissive colour, if applicable by the actual implementation. More... | |
virtual TextureGpu * | getEmissiveTexture () 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 () const |
const HlmsMacroblock * | getMacroblock (bool casterBlock=false) const |
IdString | getName () const |
const String * | getNameStr () const |
virtual bool | hasCustomShadowMacroblock () const |
void | setAlphaHashing (bool bAlphaHashing) |
Uses a trick to mimic true Order Independent Transparency alpha blending. More... | |
virtual void | setAlphaTest (CompareFunction compareFunction, bool shadowCasterOnly=false, bool useAlphaFromTextures=true) |
Sets the alpha test to the given compare function. More... | |
void | setBlendblock (const HlmsBlendblock &blendblock, bool casterBlock=false, bool overrideCasterBlock=true) |
Sets a new blendblock that matches the same parameter as the input. More... | |
void | setBlendblock (const HlmsBlendblock *blendblock, bool casterBlock=false, bool overrideCasterBlock=true) |
Sets the blendblock from the given pointer that was already retrieved from the HlmsManager. More... | |
void | setCustomPieceCodeFromMemory (const String &filename, const String &shaderCode, ShaderType shaderType) |
Same as setCustomPieceFile() but sources the code from memory instead of from disk. More... | |
void | setCustomPieceFile (const String &filename, const String &resourceGroup, ShaderType shaderType) |
Sets the filename of a piece file to be parsed from disk. More... | |
void | setMacroblock (const HlmsMacroblock ¯oblock, bool casterBlock=false, bool overrideCasterBlock=true) |
Sets a new macroblock that matches the same parameter as the input. More... | |
void | setMacroblock (const HlmsMacroblock *macroblock, bool casterBlock=false, bool overrideCasterBlock=true) |
Sets the macroblock from the given pointer that was already retrieved from the HlmsManager. More... | |
![]() | |
ConstBufferPoolUser () | |
const ConstBufferPool::BufferPool * | getAssignedPool () const |
uint32 | getAssignedSlot () const |
uint8 | getDirtyFlags () const |
![]() | |
virtual | ~TextureGpuListener () |
Additional Inherited Members | |
![]() | |
enum | Reason { Unknown , FromStorageToSysRam , FromSysRamToStorage , GainedResidency , LostResidency , PoolTextureSlotChanged , ResidentToSysRamSync , MetadataCacheOutOfDate , ExceptionThrown , FsaaSettingAlteredByApi , ReadyForRendering , Deleted } |
![]() | |
static const char * | getCmpString (CompareFunction compareFunction) |
![]() | |
bool | mAllowTextureResidencyChange |
When false, we won't try to have Textures become resident. More... | |
uint16 | mMacroblockHash [2] |
float | mShadowConstantBias |
uint32 | mTextureHash |
uint8 | mType |
This is not a regular header, therefore it has no include guards.
This header contains a base class that defines common functionality across multiple Hlms datablock implementations that need textures. However C++ does not let us statically define the size of mTexIndices, mTextures & mSamplerblocks array; we would have to either force the same maximum to all implementations, or use the heap.
The way to include this header is by doing:
Where all the necessary macros are defined prior to including this header, and once we're done, we undef these macros.
When OGRE_HLMS_TEXTURE_BASE_CLASS is not defined, the *.inl version of this file will include a few headers in order to get proper syntax highlighting.