Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
ITextureSource Class Referenceabstract

#include <texturesource.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
 
- 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.

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

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

virtual video::ITexture * ITextureSource::getTexture ( u32 id)
pure virtual

◆ getTextureAverageColor()

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

Implemented in IWritableTextureSource, and TextureSource.

◆ 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(), GenericCAO::addToScene(), TestCAO::addToScene(), MapBlockMesh::animate(), 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::setMoonTexture(), and Sky::setSunTexture().

+ Here is the caller graph for this function:

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