class SpriteManager

Contains materials used for sprite rendering.

Public

Constructors

SpriteManager

SpriteManager()

Methods

~SpriteManager

~SpriteManager() noexcept

GetImageMaterial

SpriteMaterial *GetImageMaterial(SpriteMaterialTransparency transparency, bool animation = false) const

Returns the material used for rendering image sprites.

transparency
Transparency mode the material should support.
animation
True if the material should be able to perform sprite sheet animation.

Returns: Requested sprite material.

GetTextMaterial

SpriteMaterial *GetTextMaterial() const

Returns the material used for rendering text sprites.

GetLineMaterial

SpriteMaterial *GetLineMaterial() const

Returns the material used for rendering antialiased lines.

GetMaterial

SpriteMaterial *GetMaterial(u32 id) const

Returns a sprite material with the specified ID.

Returns null if one cannot be found.

staticInstance

static T &Instance()

Returns a reference to the module instance.

Module has to have been started up first otherwise an exception will be thrown.

staticInstancePtr

static T *InstancePtr()

Returns a pointer to the module instance.

Module has to have been started up first otherwise an exception will be thrown.

staticShutDown

static void ShutDown()

Shuts down this module and frees any resources it is using.

staticIsStarted

static bool IsStarted()

Query if the module has been started.

Protected

Methods

~Module<T>

virtual ~Module<T>() = default

OnStartUp

virtual void OnStartUp()

Override if you want your module to be notified once it has been constructed and started.

OnShutDown

virtual void OnShutDown()

Override if you want your module to be notified just before it is deleted.

staticInstanceInternal

static T *&InstanceInternal()

Returns a singleton instance of this module.

staticIsDestroyed

static bool &IsDestroyed()

Checks has the Module been shut down.

staticIsStartedUp

static bool &IsStartedUp()

Checks has the Module been started up.

Private

Fields

mMaterials

UnorderedMap<u32, SpriteMaterial *> mMaterials

builtinMaterialIds

u32[8] builtinMaterialIds