ngscopeclient 0.1-dev+51fbda87c
Public Member Functions | Protected Attributes | List of all members
TextureManager Class Reference

Manages loading and saving texture resources to files. More...

#include <TextureManager.h>

Public Member Functions

 TextureManager (std::shared_ptr< QueueHandle > queue)
 
void LoadTexture (const std::string &name, const std::string &path)
 Loads a texture from a file into a named resource. More...
 
ImTextureID GetTexture (const std::string &name)
 
std::unique_ptr< vk::raii::Sampler > & GetSampler ()
 
void clear ()
 
vk::raii::CommandBuffer & GetCmdBuffer ()
 
std::shared_ptr< QueueHandleGetQueue ()
 
vk::ImageView GetView (const std::string &name)
 

Protected Attributes

std::map< std::string, std::shared_ptr< Texture > > m_textures
 
std::unique_ptr< vk::raii::Sampler > m_sampler
 Sampler for textures.
 
std::shared_ptr< QueueHandlem_queue
 
std::unique_ptr< vk::raii::CommandPool > m_cmdPool
 
std::unique_ptr< vk::raii::CommandBuffer > m_cmdBuf
 

Detailed Description

Manages loading and saving texture resources to files.

Member Function Documentation

◆ LoadTexture()

void TextureManager::LoadTexture ( const std::string &  name,
const std::string &  path 
)

Loads a texture from a file into a named resource.

If an existing texture by the same name already exists, it is overwritten.


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