Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
Renderer::Backend::Vulkan::CTexture Class Referencefinal

#include <Texture.h>

Inheritance diagram for Renderer::Backend::Vulkan::CTexture:
Collaboration diagram for Renderer::Backend::Vulkan::CTexture:

Public Member Functions

 ~CTexture () override
 
IDeviceGetDevice () override
 
Type GetType () const override
 
uint32_t GetUsage () const override
 
Format GetFormat () const override
 
uint32_t GetWidth () const override
 
uint32_t GetHeight () const override
 
uint32_t GetMIPLevelCount () const override
 
uint32_t GetSampleCount () const
 
uint32_t GetLayerCount () const
 
VkImage GetImage ()
 
VkImageView GetAttachmentImageView ()
 
VkImageView GetSamplerImageView ()
 
VkSampler GetSampler ()
 
bool IsCompareEnabled ()
 
VkFormat GetVkFormat () const
 
VkImageAspectFlags GetAttachmentImageAspectMask ()
 
VkImageAspectFlags GetSamplerImageAspectMask ()
 
void * GetMappedData ()
 
VkDeviceMemory GetDeviceMemory ()
 
bool IsInitialized () const
 
void SetInitialized ()
 
DeviceObjectUID GetUID () const
 
virtual Type GetType () const =0
 
virtual uint32_t GetUsage () const =0
 
virtual Format GetFormat () const =0
 
virtual uint32_t GetWidth () const =0
 
virtual uint32_t GetHeight () const =0
 
virtual uint32_t GetMIPLevelCount () const =0
 
- Public Member Functions inherited from Renderer::Backend::IDeviceObject< ITexture >
virtual ~IDeviceObject ()
 
virtual IDeviceGetDevice ()=0
 
TAs ()
 

Private Member Functions

 CTexture (CDevice *device)
 

Static Private Member Functions

static std::unique_ptr< CTextureCreate (CDevice *device, const char *name, const Type type, const uint32_t usage, const Format format, const uint32_t width, const uint32_t height, const Sampler::Desc &defaultSamplerDesc, const uint32_t MIPLevelCount, const uint32_t sampleCount)
 
static std::unique_ptr< CTextureWrapBackbufferImage (CDevice *device, const char *name, const VkImage image, const VkFormat format, const VkImageUsageFlags usage, const uint32_t width, const uint32_t height)
 
static std::unique_ptr< CTextureCreateReadback (CDevice *device, const char *name, const Format format, const uint32_t width, const uint32_t height)
 

Private Attributes

Type m_Type = Type::TEXTURE_2D
 
uint32_t m_Usage = 0
 
Format m_Format = Format::UNDEFINED
 
VkFormat m_VkFormat = VK_FORMAT_UNDEFINED
 
uint32_t m_Width = 0
 
uint32_t m_Height = 0
 
uint32_t m_MIPLevelCount = 0
 
uint32_t m_SampleCount = 0
 
uint32_t m_LayerCount = 0
 
CDevicem_Device = nullptr
 
VkImage m_Image = VK_NULL_HANDLE
 
VkImageView m_AttachmentImageView = VK_NULL_HANDLE
 
VkImageView m_SamplerImageView = VK_NULL_HANDLE
 
VkSampler m_Sampler = VK_NULL_HANDLE
 
bool m_IsCompareEnabled = false
 
VmaAllocation m_Allocation {}
 
VmaAllocationInfo m_AllocationInfo {}
 
DeviceObjectUID m_UID {INVALID_DEVICE_OBJECT_UID}
 
VkImageAspectFlags m_AttachmentImageAspectMask = 0
 
VkImageAspectFlags m_SamplerImageAspectMask = 0
 
bool m_Initialized = false
 

Friends

class CDevice
 
class CSwapChain
 

Additional Inherited Members

- Public Types inherited from Renderer::Backend::ITexture
enum class  Type { TEXTURE_2D , TEXTURE_2D_MULTISAMPLE , TEXTURE_CUBE }
 

Constructor & Destructor Documentation

◆ ~CTexture()

CTexture::~CTexture ( )
override

◆ CTexture()

CTexture::CTexture ( CDevice device)
private

Member Function Documentation

◆ Create()

std::unique_ptr< CTexture > CTexture::Create ( CDevice device,
const char *  name,
const Type  type,
const uint32_t  usage,
const Format  format,
const uint32_t  width,
const uint32_t  height,
const Sampler::Desc defaultSamplerDesc,
const uint32_t  MIPLevelCount,
const uint32_t  sampleCount 
)
staticprivate

◆ CreateReadback()

std::unique_ptr< CTexture > CTexture::CreateReadback ( CDevice device,
const char *  name,
const Format  format,
const uint32_t  width,
const uint32_t  height 
)
staticprivate

◆ GetAttachmentImageAspectMask()

VkImageAspectFlags Renderer::Backend::Vulkan::CTexture::GetAttachmentImageAspectMask ( )
inline

◆ GetAttachmentImageView()

VkImageView Renderer::Backend::Vulkan::CTexture::GetAttachmentImageView ( )
inline

◆ GetDevice()

IDevice * CTexture::GetDevice ( )
overridevirtual

◆ GetDeviceMemory()

VkDeviceMemory Renderer::Backend::Vulkan::CTexture::GetDeviceMemory ( )
inline

◆ GetFormat()

Format Renderer::Backend::Vulkan::CTexture::GetFormat ( ) const
inlineoverridevirtual

◆ GetHeight()

uint32_t Renderer::Backend::Vulkan::CTexture::GetHeight ( ) const
inlineoverridevirtual

◆ GetImage()

VkImage Renderer::Backend::Vulkan::CTexture::GetImage ( )
inline

◆ GetLayerCount()

uint32_t Renderer::Backend::Vulkan::CTexture::GetLayerCount ( ) const
inline

◆ GetMappedData()

void * Renderer::Backend::Vulkan::CTexture::GetMappedData ( )
inline
Returns
mapped data for readback textures else returns nullptr.

◆ GetMIPLevelCount()

uint32_t Renderer::Backend::Vulkan::CTexture::GetMIPLevelCount ( ) const
inlineoverridevirtual

◆ GetSampleCount()

uint32_t Renderer::Backend::Vulkan::CTexture::GetSampleCount ( ) const
inline

◆ GetSampler()

VkSampler Renderer::Backend::Vulkan::CTexture::GetSampler ( )
inline

◆ GetSamplerImageAspectMask()

VkImageAspectFlags Renderer::Backend::Vulkan::CTexture::GetSamplerImageAspectMask ( )
inline

◆ GetSamplerImageView()

VkImageView Renderer::Backend::Vulkan::CTexture::GetSamplerImageView ( )
inline

◆ GetType()

Type Renderer::Backend::Vulkan::CTexture::GetType ( ) const
inlineoverridevirtual

◆ GetUID()

DeviceObjectUID Renderer::Backend::Vulkan::CTexture::GetUID ( ) const
inline

◆ GetUsage()

uint32_t Renderer::Backend::Vulkan::CTexture::GetUsage ( ) const
inlineoverridevirtual

◆ GetVkFormat()

VkFormat Renderer::Backend::Vulkan::CTexture::GetVkFormat ( ) const
inline

◆ GetWidth()

uint32_t Renderer::Backend::Vulkan::CTexture::GetWidth ( ) const
inlineoverridevirtual

◆ IsCompareEnabled()

bool Renderer::Backend::Vulkan::CTexture::IsCompareEnabled ( )
inline

◆ IsInitialized()

bool Renderer::Backend::Vulkan::CTexture::IsInitialized ( ) const
inline

◆ SetInitialized()

void Renderer::Backend::Vulkan::CTexture::SetInitialized ( )
inline

◆ WrapBackbufferImage()

std::unique_ptr< CTexture > CTexture::WrapBackbufferImage ( CDevice device,
const char *  name,
const VkImage  image,
const VkFormat  format,
const VkImageUsageFlags  usage,
const uint32_t  width,
const uint32_t  height 
)
staticprivate

Friends And Related Function Documentation

◆ CDevice

friend class CDevice
friend

◆ CSwapChain

friend class CSwapChain
friend

Member Data Documentation

◆ m_Allocation

VmaAllocation Renderer::Backend::Vulkan::CTexture::m_Allocation {}
private

◆ m_AllocationInfo

VmaAllocationInfo Renderer::Backend::Vulkan::CTexture::m_AllocationInfo {}
private

◆ m_AttachmentImageAspectMask

VkImageAspectFlags Renderer::Backend::Vulkan::CTexture::m_AttachmentImageAspectMask = 0
private

◆ m_AttachmentImageView

VkImageView Renderer::Backend::Vulkan::CTexture::m_AttachmentImageView = VK_NULL_HANDLE
private

◆ m_Device

CDevice* Renderer::Backend::Vulkan::CTexture::m_Device = nullptr
private

◆ m_Format

Format Renderer::Backend::Vulkan::CTexture::m_Format = Format::UNDEFINED
private

◆ m_Height

uint32_t Renderer::Backend::Vulkan::CTexture::m_Height = 0
private

◆ m_Image

VkImage Renderer::Backend::Vulkan::CTexture::m_Image = VK_NULL_HANDLE
private

◆ m_Initialized

bool Renderer::Backend::Vulkan::CTexture::m_Initialized = false
private

◆ m_IsCompareEnabled

bool Renderer::Backend::Vulkan::CTexture::m_IsCompareEnabled = false
private

◆ m_LayerCount

uint32_t Renderer::Backend::Vulkan::CTexture::m_LayerCount = 0
private

◆ m_MIPLevelCount

uint32_t Renderer::Backend::Vulkan::CTexture::m_MIPLevelCount = 0
private

◆ m_SampleCount

uint32_t Renderer::Backend::Vulkan::CTexture::m_SampleCount = 0
private

◆ m_Sampler

VkSampler Renderer::Backend::Vulkan::CTexture::m_Sampler = VK_NULL_HANDLE
private

◆ m_SamplerImageAspectMask

VkImageAspectFlags Renderer::Backend::Vulkan::CTexture::m_SamplerImageAspectMask = 0
private

◆ m_SamplerImageView

VkImageView Renderer::Backend::Vulkan::CTexture::m_SamplerImageView = VK_NULL_HANDLE
private

◆ m_Type

Type Renderer::Backend::Vulkan::CTexture::m_Type = Type::TEXTURE_2D
private

◆ m_UID

DeviceObjectUID Renderer::Backend::Vulkan::CTexture::m_UID {INVALID_DEVICE_OBJECT_UID}
private

◆ m_Usage

uint32_t Renderer::Backend::Vulkan::CTexture::m_Usage = 0
private

◆ m_VkFormat

VkFormat Renderer::Backend::Vulkan::CTexture::m_VkFormat = VK_FORMAT_UNDEFINED
private

◆ m_Width

uint32_t Renderer::Backend::Vulkan::CTexture::m_Width = 0
private

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