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

Encapsulates the various Vulkan objects we need to represent texture image memory. More...

#include <TextureManager.h>

Public Member Functions

 Texture (const vk::raii::Device &device, const vk::ImageCreateInfo &imageInfo, const vk::raii::Buffer &srcBuf, int width, int height, TextureManager *mgr, const std::string &name="")
 Creates a texture from an externally supplied staging buffer.
 
 Texture (const vk::raii::Device &device, const vk::ImageCreateInfo &imageInfo, TextureManager *mgr, const std::string &name="")
 
ImTextureID GetTexture ()
 
vk::ImageView GetView ()
 
vk::Image GetImage ()
 
void SetName (const std::string &name)
 

Protected Member Functions

void LayoutTransition (vk::raii::CommandBuffer &cmdBuf, vk::AccessFlags src, vk::AccessFlags dst, vk::ImageLayout from, vk::ImageLayout to)
 

Protected Attributes

vk::raii::Image m_image
 Image object for our texture.
 
std::unique_ptr< vk::raii::ImageView > m_view
 View of the image.
 
ImTextureID m_texture
 
std::unique_ptr< vk::raii::DeviceMemory > m_deviceMemory
 Device memory backing the image.
 

Detailed Description

Encapsulates the various Vulkan objects we need to represent texture image memory.

We don't do multitexturing at the moment, so each texture has its own single-binding descriptor set


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