9#include <dimension2d.h>
19typedef std::vector<video::SColor>
Palette;
41 const std::string &name, u32 *
id =
nullptr) = 0;
67 const std::vector<std::string> &images, u32 *
id =
nullptr) = 0;
76 const std::string &image, u32 *
id =
nullptr)
Definition texturesource.h:34
virtual ~ISimpleTextureSource()=default
virtual video::ITexture * getTexture(const std::string &name, u32 *id=nullptr)=0
Generates a texture string into a standard texture.
ISimpleTextureSource()=default
Definition texturesource.h:45
virtual video::ITexture * getTexture(u32 id)=0
Returns existing texture by ID.
virtual std::string getTextureName(u32 id)=0
Returns name of existing texture by ID.
static constexpr const char * FILTER_FOR_MESH
Filter needed for mesh-suitable textures, including leading ^.
Definition texturesource.h:87
virtual void setImageCaching(bool enabled)
Enables or disables the caching of finished texture images.
Definition texturesource.h:116
virtual video::SColor getTextureAverageColor(const std::string &image)=0
Return average color of a texture string.
video::ITexture * getTextureForMesh(const std::string &image, u32 *id=nullptr)
Generates a texture string into a standard texture Filters will be applied to make the texture suitab...
Definition texturesource.h:75
virtual video::ITexture * addArrayTexture(const std::vector< std::string > &images, u32 *id=nullptr)=0
Generates texture string(s) into an array texture.
virtual u32 getTextureId(const std::string &image)=0
Generates a texture string into a standard texture.
virtual Palette * getPalette(const std::string &image)=0
Returns a palette from the given texture string.
virtual core::dimension2du getTextureDimensions(const std::string &image)=0
Return dimensions of a texture string (will avoid actually creating the texture)
virtual ~ITextureSource()=default
virtual bool needFilterForMesh() const =0
virtual bool isKnownSourceImage(const std::string &name)=0
Check if given image name exists.
Definition texturesource.h:120
virtual void insertSourceImage(const std::string &name, video::IImage *img)=0
Inserts a source image.
IWritableTextureSource()=default
virtual void processQueue()=0
Fulfil texture requests from other threads.
virtual ~IWritableTextureSource()=default
virtual void rebuildImagesAndTextures()=0
Rebuilds all textures (in case-source images have changed)
Definition clientmap.h:36
std::vector< video::SColor > Palette
Definition texturesource.h:19
IWritableTextureSource * createTextureSource()
Definition texturesource.cpp:182