ngscopeclient 0.1-dev+51fbda87c
|
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< QueueHandle > | GetQueue () |
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< QueueHandle > | m_queue |
std::unique_ptr< vk::raii::CommandPool > | m_cmdPool |
std::unique_ptr< vk::raii::CommandBuffer > | m_cmdBuf |
Manages loading and saving texture resources to files.
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.