1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

fully working i guess

This commit is contained in:
Perttu Ahola 2011-02-11 19:55:42 +02:00
parent 804b2647ce
commit 52d99fef31
16 changed files with 358 additions and 122 deletions

View file

@ -103,10 +103,28 @@ struct SourceAtlasPointer
}
};
/*
Implementation (to be used as a no-op on the server)
*/
class ITextureSource
{
public:
ITextureSource(){}
virtual ~ITextureSource(){}
virtual u32 getTextureId(const std::string &name){return 0;}
virtual u32 getTextureIdDirect(const std::string &name){return 0;}
virtual std::string getTextureName(u32 id){return "";}
virtual AtlasPointer getTexture(u32 id){return AtlasPointer(0);}
virtual AtlasPointer getTexture(const std::string &name)
{return AtlasPointer(0);}
virtual video::ITexture* getTextureRaw(const std::string &name)
{return NULL;}
};
/*
Creates and caches textures.
*/
class TextureSource
class TextureSource : public ITextureSource
{
public:
TextureSource(IrrlichtDevice *device);