luna engine
software engine
Loading...
Searching...
No Matches
luna::utils::vulkanObjectFactory Class Reference

static class that creates vulkan objects like buffers and images. More...

#include <vulkanObjectFactory.h>

Static Public Member Functions

static VkResult init (ref< renderer::device > device)
 initializes the vulkan object factory. More...
 
static VkResult createImage (VkImage *pImage, VkImageCreateInfo *pCreateInfo)
 creates a vulkan image. More...
 
static VkResult createImage (VkImage *pImage, VkImageUsageFlags usageFlags, VkExtent3D extent, VkFormat format=VK_FORMAT_R8G8B8A8_UNORM)
 creates a vulkan image. More...
 
static VkResult createImageView (VkImageView *pImageView, VkImageViewCreateInfo *pImageViewCreateInfo)
 creates a VkImageView. More...
 
static VkResult createImageView (VkImageView *pImageView, const VkImage &image, const VkFormat &format, const VkImageAspectFlags &imageAspectFlags)
 creates a VkImageView. More...
 

Static Private Attributes

static ref< renderer::devicepDevice
 

Detailed Description

static class that creates vulkan objects like buffers and images.

Note
this class is only meant to be included in the .cpp files not in the .h files

Member Function Documentation

◆ createImage() [1/2]

VkResult luna::utils::vulkanObjectFactory::createImage ( VkImage *  pImage,
VkImageCreateInfo *  pCreateInfo = nullptr 
)
static

◆ createImage() [2/2]

VkResult luna::utils::vulkanObjectFactory::createImage ( VkImage *  pImage,
VkImageUsageFlags  usageFlags,
VkExtent3D  extent,
VkFormat  format = VK_FORMAT_R8G8B8A8_UNORM 
)
static

creates a vulkan image.

Parameters
VkImage*pImage, pointer to the image handle
VkFormatformat, image format
VkImageUsageFlags,usageFlags
VkExtent3Dextent, image extent (width height)
See also
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkImage.html
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateImage.html
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkImageCreateInfo.html

◆ createImageView() [1/2]

VkResult luna::utils::vulkanObjectFactory::createImageView ( VkImageView *  pImageView,
const VkImage &  image,
const VkFormat &  format,
const VkImageAspectFlags &  imageAspectFlags 
)
static

creates a VkImageView.

Parameters
pImageView*pointer to the imageView.
VkImageimage handle
VkFormatformat image format
imageAspectFlags
Returns
VK_SUCCES when creation was succesful.
See also
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkImageView.html
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateImageView.html
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkImageViewCreateInfo.html

◆ createImageView() [2/2]

VkResult luna::utils::vulkanObjectFactory::createImageView ( VkImageView *  pImageView,
VkImageViewCreateInfo *  pImageViewCreateInfo = nullptr 
)
static

creates a VkImageView.

Parameters
pImageView*pointer to the imageView.
pImageViewCreateInfo*pointer to the creareInfoStruct
Returns
VK_SUCCES when creation was succesful.
See also
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkImageView.html
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCreateImageView.html
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkImageViewCreateInfo.html

◆ init()

VkResult luna::utils::vulkanObjectFactory::init ( ref< renderer::device device)
static

initializes the vulkan object factory.

Member Data Documentation

◆ pDevice

ref<renderer::device> luna::utils::vulkanObjectFactory::pDevice
inlinestaticprivate

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