Minetest 5.9.0-dev
 
Loading...
Searching...
No Matches
MenuTextureSource Class Reference

GUIEngine specific implementation of ISimpleTextureSource. More...

#include <guiEngine.h>

+ Inheritance diagram for MenuTextureSource:
+ Collaboration diagram for MenuTextureSource:

Public Member Functions

 MenuTextureSource (video::IVideoDriver *driver)
 default constructor
 
virtual ~MenuTextureSource ()
 destructor, removes all loaded textures
 
video::ITexture * getTexture (const std::string &name, u32 *id=NULL)
 get a texture, loading it if required
 
- Public Member Functions inherited from ISimpleTextureSource
 ISimpleTextureSource ()=default
 
virtual ~ISimpleTextureSource ()=default
 
virtual video::ITexture * getTexture (const std::string &name, u32 *id=nullptr)=0
 

Private Attributes

video::IVideoDriver * m_driver = nullptr
 driver to get textures from
 
std::vector< video::ITexture * > m_to_delete
 set of textures to delete
 

Detailed Description

GUIEngine specific implementation of ISimpleTextureSource.

Constructor & Destructor Documentation

◆ MenuTextureSource()

MenuTextureSource::MenuTextureSource ( video::IVideoDriver *  driver)
inline

default constructor

Parameters
driverthe video driver to load textures from

◆ ~MenuTextureSource()

MenuTextureSource::~MenuTextureSource ( )
virtual

destructor, removes all loaded textures

References infostream, m_driver, and m_to_delete.

Member Function Documentation

◆ getTexture()

video::ITexture * MenuTextureSource::getTexture ( const std::string &  name,
u32 *  id = NULL 
)
virtual

get a texture, loading it if required

Parameters
namepath to the texture
idreceives the texture ID, always 0 in this implementation

Implements ISimpleTextureSource.

References Align2Npot2(), m_driver, and m_to_delete.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_driver

video::IVideoDriver* MenuTextureSource::m_driver = nullptr
private

driver to get textures from

Referenced by ~MenuTextureSource(), and getTexture().

◆ m_to_delete

std::vector<video::ITexture*> MenuTextureSource::m_to_delete
private

set of textures to delete

Referenced by ~MenuTextureSource(), and getTexture().


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