The Joe Engine
Joe's engine programming playground
JoeEngine::JETextureLibrary Class Reference

The JETextureLibrary class. More...

#include <TextureLibrary.h>

Public Member Functions

 JETextureLibrary ()
 Default constructor. More...
 
 ~JETextureLibrary ()=default
 Destructor (default). More...
 
uint32_t CreateTexture (VkDevice device, VkPhysicalDevice physicalDevice, const JEVulkanQueue &graphicsQueue, VkCommandPool commandPool, const std::string &filepath)
 Create texture helper function. More...
 
void Cleanup (VkDevice device)
 Cleanup Vulkan objects. More...
 
VkImageView GetImageViewAt (int i) const
 Get image view at index. More...
 
VkSampler GetSamplerAt (int i) const
 Get texture sampler at index. More...
 

Detailed Description

The JETextureLibrary class.

Class for managing Vulkan texture data. Provides creation and getter convenience functions.

Constructor & Destructor Documentation

◆ JETextureLibrary()

JoeEngine::JETextureLibrary::JETextureLibrary ( )
inline

Default constructor.

◆ ~JETextureLibrary()

JoeEngine::JETextureLibrary::~JETextureLibrary ( )
default

Destructor (default).

Member Function Documentation

◆ Cleanup()

void JoeEngine::JETextureLibrary::Cleanup ( VkDevice  device)

Cleanup Vulkan objects.

Parameters
devicethe Vulkan logical device.

◆ CreateTexture()

uint32_t JoeEngine::JETextureLibrary::CreateTexture ( VkDevice  device,
VkPhysicalDevice  physicalDevice,
const JEVulkanQueue graphicsQueue,
VkCommandPool  commandPool,
const std::string &  filepath 
)
inline

Create texture helper function.

Public user API function for loading and creating a new texture.

Parameters
devicethe Vulkan logical device.
physicalDevicethe Vulkan physical device.
graphicsQueuethe Vulkan graphics queue.
commandPoolthe Vulkan command pool.
filepaththe texture file source path.
Returns
a texture ID that corresponds to the new texture.

◆ GetImageViewAt()

VkImageView JoeEngine::JETextureLibrary::GetImageViewAt ( int  i) const
inline

Get image view at index.

Parameters
ithe texture ID.
Returns
the texture image view corresponding to the given ID.

◆ GetSamplerAt()

VkSampler JoeEngine::JETextureLibrary::GetSamplerAt ( int  i) const
inline

Get texture sampler at index.

Parameters
ithe texture ID.
Returns
the texture sampler corresponding to the given ID.

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