Minetest  5.4.0
ITextureSource Class Referenceabstract

#include <tile.h>

+ Inheritance diagram for ITextureSource:
+ Collaboration diagram for ITextureSource:

Public Member Functions

 ITextureSource ()=default
 
virtual ~ITextureSource ()=default
 
virtual u32 getTextureId (const std::string &name)=0
 
virtual std::string getTextureName (u32 id)=0
 
virtual video::ITexture * getTexture (u32 id)=0
 
virtual video::ITexture * getTexture (const std::string &name, u32 *id=nullptr)=0
 
virtual video::ITexture * getTextureForMesh (const std::string &name, u32 *id=nullptr)=0
 
virtual PalettegetPalette (const std::string &name)=0
 
virtual bool isKnownSourceImage (const std::string &name)=0
 
virtual video::ITexture * getNormalTexture (const std::string &name)=0
 
virtual video::SColor getTextureAverageColor (const std::string &name)=0
 
virtual video::ITexture * getShaderFlagsTexture (bool normalmap_present)=0
 
- Public Member Functions inherited from ISimpleTextureSource
 ISimpleTextureSource ()=default
 
virtual ~ISimpleTextureSource ()=default
 

Constructor & Destructor Documentation

◆ ITextureSource()

ITextureSource::ITextureSource ( )
default

◆ ~ITextureSource()

virtual ITextureSource::~ITextureSource ( )
virtualdefault

Member Function Documentation

◆ getNormalTexture()

virtual video::ITexture* ITextureSource::getNormalTexture ( const std::string &  name)
pure virtual

Implemented in IWritableTextureSource, and TextureSource.

Referenced by fillTileAttribs().

+ Here is the caller graph for this function:

◆ getPalette()

virtual Palette* ITextureSource::getPalette ( const std::string &  name)
pure virtual

Returns a palette from the given texture name. The pointer is valid until the texture source is destructed. Should be called from the main thread.

Implemented in TextureSource.

Referenced by CItemDefManager::createClientCachedDirect(), and ContentFeatures::updateTextures().

+ Here is the caller graph for this function:

◆ getShaderFlagsTexture()

virtual video::ITexture* ITextureSource::getShaderFlagsTexture ( bool  normalmap_present)
pure virtual

Implemented in TextureSource, and IWritableTextureSource.

Referenced by fillTileAttribs(), and WieldMeshSceneNode::setExtruded().

+ Here is the caller graph for this function:

◆ getTexture() [1/2]

virtual video::ITexture* ITextureSource::getTexture ( const std::string &  name,
u32 *  id = nullptr 
)
pure virtual

Implements ISimpleTextureSource.

Implemented in IWritableTextureSource, and TextureSource.

◆ getTexture() [2/2]

◆ getTextureAverageColor()

virtual video::SColor ITextureSource::getTextureAverageColor ( const std::string &  name)
pure virtual

Implemented in IWritableTextureSource, and TextureSource.

Referenced by ContentFeatures::updateTextures().

+ Here is the caller graph for this function:

◆ getTextureForMesh()

virtual video::ITexture* ITextureSource::getTextureForMesh ( const std::string &  name,
u32 *  id = nullptr 
)
pure virtual

Implemented in TextureSource.

Referenced by Hud::Hud(), MapBlockMesh::MapBlockMesh(), Sky::Sky(), SmokePuffCSO::SmokePuffCSO(), Sky::addTextureToSkybox(), TestCAO::addToScene(), GenericCAO::addToScene(), MapBlockMesh::animate(), fillTileAttribs(), getExtrudedMesh(), Sky::setMoonTexture(), Sky::setSunriseTexture(), Sky::setSunTexture(), and GenericCAO::updateTextures().

+ Here is the caller graph for this function:

◆ getTextureId()

virtual u32 ITextureSource::getTextureId ( const std::string &  name)
pure virtual

Implemented in IWritableTextureSource, and TextureSource.

◆ getTextureName()

virtual std::string ITextureSource::getTextureName ( u32  id)
pure virtual

Implemented in IWritableTextureSource, and TextureSource.

Referenced by MapBlockMesh::MapBlockMesh(), getItemMesh(), and WieldMeshSceneNode::setItem().

+ Here is the caller graph for this function:

◆ isKnownSourceImage()

virtual bool ITextureSource::isKnownSourceImage ( const std::string &  name)
pure virtual

Implemented in IWritableTextureSource, and TextureSource.

Referenced by GUIChatConsole::GUIChatConsole(), Hud::Hud(), Sky::Sky(), Sky::setMoonTexture(), and Sky::setSunTexture().

+ Here is the caller graph for this function:

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