| Fling Engine 0.00.1 Fling Engine is a game engine written in Vulkan

Functions
Fling::GraphicsHelpers Namespace Reference

## Functions
UINT32 | FindMemoryType (VkPhysicalDevice t_PhysicalDevice, UINT32 t_Filter, VkMemoryPropertyFlags t_Props)
| Find a suitable memory type for use on the current device. More...
void | CreateBuffer (VkDevice t_Device, VkPhysicalDevice t_PhysicalDevice, VkDeviceSize t_Size, VkBufferUsageFlags t_Usage, VkMemoryPropertyFlags t_Properties, VkBuffer &t_Buffer, VkDeviceMemory &t_BuffMemory)
VkCommandBuffer | BeginSingleTimeCommands ()
void | EndSingleTimeCommands (VkCommandBuffer t_CommandBuffer)
void | CreateVkImage (VkDevice t_Dev, UINT32 t_Width, UINT32 t_Height, VkFormat t_Format, VkImageTiling t_Tiling, VkImageUsageFlags t_Useage, VkMemoryPropertyFlags t_Props, VkImage &t_Image, VkDeviceMemory &t_Memory, VkSampleCountFlagBits t_NumSamples=VK_SAMPLE_COUNT_1_BIT)
VkSemaphore | CreateSemaphore (VkDevice t_Dev)
void | CreateVkImage (VkDevice t_Dev, UINT32 t_Width, UINT32 t_Height, UINT32 t_MipLevels, UINT32 t_Depth, UINT32 t_ArrayLayers, VkFormat t_Format, VkImageTiling t_Tiling, VkImageUsageFlags t_Useage, VkMemoryPropertyFlags t_Props, VkImageCreateFlags t_flags, VkImage &t_Image, VkDeviceMemory &t_Memory, VkSampleCountFlagBits t_NumSamples=VK_SAMPLE_COUNT_1_BIT)
void | CreateVkSampler (VkFilter t_magFilter, VkFilter t_minFilter, VkSamplerMipmapMode t_mipmapMode, VkSamplerAddressMode t_addressModeU, VkSamplerAddressMode t_addressModeV, VkSamplerAddressMode t_addressModeM, VkBorderColor t_borderColor, VkSampler &t_sampler)
void | SetImageLayout (VkCommandBuffer t_cmdbuffer, VkImage t_image, VkImageAspectFlags t_aspectMask, VkImageLayout t_oldImageLayout, VkImageLayout t_newImageLayout, VkPipelineStageFlags t_srcStageMask, VkPipelineStageFlags t_dstStageMask)
void | SetImageLayout (VkCommandBuffer t_cmdbuffer, VkImage t_image, VkImageLayout t_oldImageLayout, VkImageLayout t_newImageLayout, VkImageSubresourceRange t_subresourceRange, VkPipelineStageFlags t_srcStageMask, VkPipelineStageFlags t_dstStageMask)
void | CreateCommandPool (VkCommandPool *t_commandPool, VkCommandPoolCreateFlags t_flags)
void | CreateCommandBuffers (VkCommandBuffer *t_commandBuffer, UINT32 t_commandBufferCount, VkCommandPool &t_commandPool)
void | CreatePipelineCache (VkPipelineCache &t_PipelineCache)
VkShaderModule | CreateShaderModule (std::shared_ptr< File > t_ShaderCode)
VkImageView | CreateVkImageView (VkImage t_Image, VkFormat t_Format, VkImageAspectFlags t_AspectFalgs, UINT32 t_MipLevels=1)
| Create a an image view for Vulkan with the given format. More...
VkFormat | FindSupportedFormat (const std::vector< VkFormat > &t_Candidates, VkImageTiling t_Tiling, VkFormatFeatureFlags t_Features)
void | TransitionImageLayout (VkImage t_Image, VkFormat t_Format, VkImageLayout t_oldLayout, VkImageLayout t_NewLayout, UINT32 t_MipLevels=1)
bool | HasStencilComponent (VkFormat t_format)
| Returns true if the given format has a stencil component. More...

## Function Documentation

## ◆ BeginSingleTimeCommands()

VkCommandBuffer Fling::GraphicsHelpers::BeginSingleTimeCommands | ( |  | ) |

## ◆ CreateBuffer()

void Fling::GraphicsHelpers::CreateBuffer | ( | VkDevice | t_Device,
|  | VkPhysicalDevice | t_PhysicalDevice,
|  | VkDeviceSize | t_Size,
|  | VkBufferUsageFlags | t_Usage,
|  | VkMemoryPropertyFlags | t_Properties,
|  | VkBuffer & | t_Buffer,
|  | VkDeviceMemory & | t_BuffMemory
| ) |  |

## ◆ CreateCommandBuffers()

void Fling::GraphicsHelpers::CreateCommandBuffers | ( | VkCommandBuffer * | t_commandBuffer,
|  | UINT32 | t_commandBufferCount,
|  | VkCommandPool & | t_commandPool
| ) |  |

## ◆ CreateCommandPool()

void Fling::GraphicsHelpers::CreateCommandPool | ( | VkCommandPool * | t_commandPool,
|  | VkCommandPoolCreateFlags | t_flags
| ) |  |

## ◆ CreatePipelineCache()

void Fling::GraphicsHelpers::CreatePipelineCache | ( | VkPipelineCache & | t_PipelineCache | ) |

## ◆ CreateSemaphore()

VkSemaphore Fling::GraphicsHelpers::CreateSemaphore | ( | VkDevice | t_Dev | ) |

## ◆ CreateShaderModule()

VkShaderModule Fling::GraphicsHelpers::CreateShaderModule | ( | std::shared_ptr< File > | t_ShaderCode | ) |

## ◆ CreateVkImage() [1/2]

void Fling::GraphicsHelpers::CreateVkImage | ( | VkDevice | t_Dev,
|  | UINT32 | t_Width,
|  | UINT32 | t_Height,
|  | VkFormat | t_Format,
|  | VkImageTiling | t_Tiling,
|  | VkImageUsageFlags | t_Useage,
|  | VkMemoryPropertyFlags | t_Props,
|  | VkImage & | t_Image,
|  | VkDeviceMemory & | t_Memory,
|  | VkSampleCountFlagBits | t_NumSamples = `VK_SAMPLE_COUNT_1_BIT`
| ) |  |

## ◆ CreateVkImage() [2/2]

void Fling::GraphicsHelpers::CreateVkImage | ( | VkDevice | t_Dev,
|  | UINT32 | t_Width,
|  | UINT32 | t_Height,
|  | UINT32 | t_MipLevels,
|  | UINT32 | t_Depth,
|  | UINT32 | t_ArrayLayers,
|  | VkFormat | t_Format,
|  | VkImageTiling | t_Tiling,
|  | VkImageUsageFlags | t_Useage,
|  | VkMemoryPropertyFlags | t_Props,
|  | VkImageCreateFlags | t_flags,
|  | VkImage & | t_Image,
|  | VkDeviceMemory & | t_Memory,
|  | VkSampleCountFlagBits | t_NumSamples = `VK_SAMPLE_COUNT_1_BIT`
| ) |  |

## ◆ CreateVkImageView()

VkImageView Fling::GraphicsHelpers::CreateVkImageView | ( | VkImage | t_Image,
|  | VkFormat | t_Format,
|  | VkImageAspectFlags | t_AspectFalgs,
|  | UINT32 | t_MipLevels = `1`
| ) |  |

Create a an image view for Vulkan with the given format.

## ◆ CreateVkSampler()

void Fling::GraphicsHelpers::CreateVkSampler | ( | VkFilter | t_magFilter,
|  | VkFilter | t_minFilter,
|  | VkSamplerMipmapMode | t_mipmapMode,
|  | VkSamplerAddressMode | t_addressModeU,
|  | VkSamplerAddressMode | t_addressModeV,
|  | VkSamplerAddressMode | t_addressModeM,
|  | VkBorderColor | t_borderColor,
|  | VkSampler & | t_sampler
| ) |  |

## ◆ EndSingleTimeCommands()

void Fling::GraphicsHelpers::EndSingleTimeCommands | ( | VkCommandBuffer | t_CommandBuffer | ) |

## ◆ FindMemoryType()

UINT32 Fling::GraphicsHelpers::FindMemoryType | ( | VkPhysicalDevice | t_PhysicalDevice,
|  | UINT32 | t_Filter,
|  | VkMemoryPropertyFlags | t_Props
| ) |  |

Find a suitable memory type for use on the current device.

Parameters

  t_Filter | Type of memory types that are suitable for this application
  t_Props | Memory properties

Returns
  The

## ◆ FindSupportedFormat()

VkFormat Fling::GraphicsHelpers::FindSupportedFormat | ( | const std::vector< VkFormat > & | t_Candidates,
|  | VkImageTiling | t_Tiling,
|  | VkFormatFeatureFlags | t_Features
| ) |  |

## ◆ HasStencilComponent()

bool Fling::GraphicsHelpers::HasStencilComponent | ( | VkFormat | t_format | ) |

Returns true if the given format has a stencil component.

## ◆ SetImageLayout() [1/2]

void Fling::GraphicsHelpers::SetImageLayout | ( | VkCommandBuffer | t_cmdbuffer,
|  | VkImage | t_image,
|  | VkImageAspectFlags | t_aspectMask,
|  | VkImageLayout | t_oldImageLayout,
|  | VkImageLayout | t_newImageLayout,
|  | VkPipelineStageFlags | t_srcStageMask,
|  | VkPipelineStageFlags | t_dstStageMask
| ) |  |

## ◆ SetImageLayout() [2/2]

void Fling::GraphicsHelpers::SetImageLayout | ( | VkCommandBuffer | t_cmdbuffer,
|  | VkImage | t_image,
|  | VkImageLayout | t_oldImageLayout,
|  | VkImageLayout | t_newImageLayout,
|  | VkImageSubresourceRange | t_subresourceRange,
|  | VkPipelineStageFlags | t_srcStageMask,
|  | VkPipelineStageFlags | t_dstStageMask
| ) |  |

## ◆ TransitionImageLayout()

void Fling::GraphicsHelpers::TransitionImageLayout | ( | VkImage | t_Image,
|  | VkFormat | t_Format,
|  | VkImageLayout | t_oldLayout,
|  | VkImageLayout | t_NewLayout,
|  | UINT32 | t_MipLevels = `1`
| ) |  |