Pyrogenesis  trunk
Public Types | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
Renderer::Backend::Vulkan::CTexture Class Referencefinal

#include <Texture.h>

Inheritance diagram for Renderer::Backend::Vulkan::CTexture:
Inheritance graph
[legend]
Collaboration diagram for Renderer::Backend::Vulkan::CTexture:
Collaboration graph
[legend]

Public Types

using UID = uint32_t
 
- Public Types inherited from Renderer::Backend::ITexture
enum  Type { Type::TEXTURE_2D, Type::TEXTURE_2D_MULTISAMPLE, Type::TEXTURE_CUBE }
 

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 ()
 
bool IsInitialized () const
 
void SetInitialized ()
 
UID GetUID () const
 
- Public Member Functions inherited from Renderer::Backend::IDeviceObject< ITexture >
virtual ~IDeviceObject ()
 
TAs ()
 

Private Member Functions

 CTexture ()
 

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)
 

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 {}
 
UID m_UID = 0
 
VkImageAspectFlags m_AttachmentImageAspectMask = 0
 
VkImageAspectFlags m_SamplerImageAspectMask = 0
 
bool m_Initialized = false
 

Friends

class CDevice
 
class CSwapChain
 

Member Typedef Documentation

◆ UID

Returns
UID of the texture. It's unique along all textures during a whole application run. We assume that 32bits should be enough, else we'd have a too big texture flow.

Constructor & Destructor Documentation

◆ ~CTexture()

CTexture::~CTexture ( )
override

◆ CTexture()

CTexture::CTexture ( )
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

◆ GetAttachmentImageAspectMask()

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

◆ GetAttachmentImageView()

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

◆ GetDevice()

IDevice * CTexture::GetDevice ( )
overridevirtual

◆ 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

◆ 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()

UID 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_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

UID Renderer::Backend::Vulkan::CTexture::m_UID = 0
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: