SleakEngine 1.0.0
C++23 multi-backend game engine
Loading...
Searching...
No Matches
Sleak::RenderEngine::VulkanCubemapTexture Class Reference

Vulkan cubemap texture, loadable from six face images or a single equirectangular panorama. More...

#include <VulkanCubemapTexture.hpp>

Inheritance diagram for Sleak::RenderEngine::VulkanCubemapTexture:

Public Member Functions

 VulkanCubemapTexture (VkDevice device, VkPhysicalDevice physicalDevice, VkCommandPool commandPool, VkQueue graphicsQueue)
 ~VulkanCubemapTexture () override
void Bind (uint32_t slot=0) const override
TextureFormat GetFormat () const override
uint32_t GetHeight () const override
VkImageView GetImageView () const
VkSampler GetSampler () const
TextureType GetType () const override
uint32_t GetWidth () const override
bool LoadCubemap (const std::array< std::string, 6 > &facePaths)
 Loads and uploads 6 face images: +X, -X, +Y, -Y, +Z, -Z.
bool LoadEquirectangular (const std::string &path, uint32_t faceSize=512)
 Load from a single equirectangular panorama and convert to cubemap.
bool LoadFromFile (const std::string &filePath) override
 Unused for cubemaps; load via LoadCubemap/LoadEquirectangular instead.
bool LoadFromMemory (const void *data, uint32_t width, uint32_t height, TextureFormat format) override
 Unused for cubemaps; load via LoadCubemap/LoadEquirectangular instead.
void SetFilter (TextureFilter filter) override
void SetWrapMode (TextureWrapMode wrapMode) override
void Unbind () const override
Public Member Functions inherited from Sleak::Texture
virtual ~Texture ()=default
virtual uint64_t GetImGuiTextureID () const
virtual float GetLodBias () const
virtual void SetLodBias (float bias)

Detailed Description

Vulkan cubemap texture, loadable from six face images or a single equirectangular panorama.

Definition at line 14 of file VulkanCubemapTexture.hpp.

Constructor & Destructor Documentation

◆ VulkanCubemapTexture()

Sleak::RenderEngine::VulkanCubemapTexture::VulkanCubemapTexture ( VkDevice device,
VkPhysicalDevice physicalDevice,
VkCommandPool commandPool,
VkQueue graphicsQueue )

Definition at line 12 of file VulkanCubemapTexture.cpp.

◆ ~VulkanCubemapTexture()

Sleak::RenderEngine::VulkanCubemapTexture::~VulkanCubemapTexture ( )
override

Definition at line 21 of file VulkanCubemapTexture.cpp.

Member Function Documentation

◆ Bind()

void Sleak::RenderEngine::VulkanCubemapTexture::Bind ( uint32_t slot = 0) const
overridevirtual

Implements Sleak::Texture.

Definition at line 562 of file VulkanCubemapTexture.cpp.

◆ GetFormat()

TextureFormat Sleak::RenderEngine::VulkanCubemapTexture::GetFormat ( ) const
inlineoverridevirtual

Implements Sleak::Texture.

Definition at line 41 of file VulkanCubemapTexture.hpp.

◆ GetHeight()

uint32_t Sleak::RenderEngine::VulkanCubemapTexture::GetHeight ( ) const
inlineoverridevirtual

Implements Sleak::Texture.

Definition at line 40 of file VulkanCubemapTexture.hpp.

◆ GetImageView()

VkImageView Sleak::RenderEngine::VulkanCubemapTexture::GetImageView ( ) const
inline

Definition at line 44 of file VulkanCubemapTexture.hpp.

◆ GetSampler()

VkSampler Sleak::RenderEngine::VulkanCubemapTexture::GetSampler ( ) const
inline

Definition at line 45 of file VulkanCubemapTexture.hpp.

◆ GetType()

TextureType Sleak::RenderEngine::VulkanCubemapTexture::GetType ( ) const
inlineoverridevirtual

Implements Sleak::Texture.

Definition at line 42 of file VulkanCubemapTexture.hpp.

◆ GetWidth()

uint32_t Sleak::RenderEngine::VulkanCubemapTexture::GetWidth ( ) const
inlineoverridevirtual

Implements Sleak::Texture.

Definition at line 39 of file VulkanCubemapTexture.hpp.

◆ LoadCubemap()

bool Sleak::RenderEngine::VulkanCubemapTexture::LoadCubemap ( const std::array< std::string, 6 > & facePaths)

Loads and uploads 6 face images: +X, -X, +Y, -Y, +Z, -Z.

Definition at line 25 of file VulkanCubemapTexture.cpp.

◆ LoadEquirectangular()

bool Sleak::RenderEngine::VulkanCubemapTexture::LoadEquirectangular ( const std::string & path,
uint32_t faceSize = 512 )

Load from a single equirectangular panorama and convert to cubemap.

Definition at line 278 of file VulkanCubemapTexture.cpp.

◆ LoadFromFile()

bool Sleak::RenderEngine::VulkanCubemapTexture::LoadFromFile ( const std::string & filePath)
overridevirtual

Unused for cubemaps; load via LoadCubemap/LoadEquirectangular instead.

Implements Sleak::Texture.

Definition at line 557 of file VulkanCubemapTexture.cpp.

◆ LoadFromMemory()

bool Sleak::RenderEngine::VulkanCubemapTexture::LoadFromMemory ( const void * data,
uint32_t width,
uint32_t height,
TextureFormat format )
overridevirtual

Unused for cubemaps; load via LoadCubemap/LoadEquirectangular instead.

Implements Sleak::Texture.

Definition at line 547 of file VulkanCubemapTexture.cpp.

◆ SetFilter()

void Sleak::RenderEngine::VulkanCubemapTexture::SetFilter ( TextureFilter filter)
overridevirtual

Implements Sleak::Texture.

Definition at line 569 of file VulkanCubemapTexture.cpp.

◆ SetWrapMode()

void Sleak::RenderEngine::VulkanCubemapTexture::SetWrapMode ( TextureWrapMode wrapMode)
overridevirtual

Implements Sleak::Texture.

Definition at line 573 of file VulkanCubemapTexture.cpp.

◆ Unbind()

void Sleak::RenderEngine::VulkanCubemapTexture::Unbind ( ) const
overridevirtual

Implements Sleak::Texture.

Definition at line 567 of file VulkanCubemapTexture.cpp.