29#include "Utils/CSingleton.h"
30#include "Utils/CStringImp.h"
60 struct STexturePackage
ITexture * getCubeTexture(const char *pathX1, const char *pathX2, const char *pathY1, const char *pathY2, const char *pathZ1, const char *pathZ2)
Load a cube map texture from 6 image paths.
CTextureManager()
Constructor.
void setCurrentPackage(const char *name)
Set the current texture package name.
Definition CTextureManager.h:118
ITexture * getNullNormalMap()
Get the default null normal map texture.
Definition CTextureManager.h:229
const char * getCurrentPackage()
Get the current texture package name.
Definition CTextureManager.h:127
ITexture * createVectorTexture2D(const char *name, core::vector3df *vectors, int w, int h)
Create a 2D texture from a list of vector3df values.
ITexture * createTransformTexture2D(const char *name, core::matrix4 *transforms, int w, int h)
Create a 2D texture from a list of transformation matrices.
ITexture * getTextureArray(std::vector< std::string > &listTexture)
Load a texture array from a list of texture paths.
bool isTextureLoaded(const char *path)
Check if a texture is already loaded.
ITexture * getTexture(const char *filename, const std::vector< std::string > &folders)
Load and get a texture from a set of folders.
ITexture * getNullTexture()
Get the default null texture.
Definition CTextureManager.h:238
ITexture * getTexture(const char *path)
Load and get a texture by path.
static const char * getGlobalName()
Get the global package name.
std::vector< std::string > m_listCommonTexture
List of common textures.
Definition CTextureManager.h:82
bool existTexture(const char *path)
Check if a texture exists by path.
ITexture * getTextureFromRealPath(const char *path)
Get texture using the real file path.
std::vector< STexturePackage * > m_textureList
List of loaded texture packages.
Definition CTextureManager.h:79
const char * getTexturePath(ITexture *tex)
Get the file path of a texture.
static std::vector< std::string > getTextureExts()
Get supported texture file extensions.
bool resolveTexturePath(const char *path, std::string &result)
Finds the actual, existing file path for a texture, resolving the correct file extension.
void removeAllTexture()
Remove all loaded textures.
static bool isTextureExt(const char *ext)
Check if a file extension is a supported texture format.
void removeTexture(const char *namePackage)
Remove all textures in a specific package.
ITexture * m_nullTexture
Default null texture.
Definition CTextureManager.h:88
void registerTexture(ITexture *tex, const char *path)
Register a texture with the manager.
ITexture * m_nullNormalMap
Default null normal map texture.
Definition CTextureManager.h:85
virtual ~CTextureManager()
Destructor. Releases all resources.
void removeTexture(ITexture *tex)
Remove a specific texture resource.
std::string m_currentPackage
Current package used for loading textures.
Definition CTextureManager.h:76
Interface of a Video Driver dependent Texture.
Definition ITexture.h:119
#define DECLARE_SINGLETON(className)
Declare the standard singleton accessors for a class.
Definition CSingleton.h:36
Everything in the Skylicht Engine. You can start by looking at the topics.
Definition AudioDebugLog.h:29
vector3d< f32 > vector3df
Typedef for a f32 3d vector.
Definition vector3d.h:445
CMatrix4< f32 > matrix4
Typedef for f32 matrix.
Definition matrix4.h:2241
std::string Path
Actual path of the texture file.
Definition CTextureManager.h:65
std::string Package
Name of the package containing the texture.
Definition CTextureManager.h:63
ITexture * Texture
Pointer to the texture resource.
Definition CTextureManager.h:67