Fling Engine  0.00.1
Fling Engine is a game engine written in Vulkan
Namespaces | Functions
GraphicsHelpers.cpp File Reference
#include "pch.h"
#include "GraphicsHelpers.h"
#include "VulkanApp.h"
#include "LogicalDevice.h"
#include "PhyscialDevice.h"

Namespaces

 Fling
 
 Fling::GraphicsHelpers
 
 Fling::Initializers
 

Functions

UINT32 Fling::GraphicsHelpers::FindMemoryType (VkPhysicalDevice t_PhysicalDevice, UINT32 t_Filter, VkMemoryPropertyFlags t_Props)
 Find a suitable memory type for use on the current device. More...
 
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)
 
VkCommandBuffer Fling::GraphicsHelpers::BeginSingleTimeCommands ()
 
void Fling::GraphicsHelpers::EndSingleTimeCommands (VkCommandBuffer t_CommandBuffer)
 
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)
 
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)
 
VkSemaphore Fling::GraphicsHelpers::CreateSemaphore (VkDevice t_Dev)
 
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)
 
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)
 
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)
 
void Fling::GraphicsHelpers::CreateCommandPool (VkCommandPool *t_commandPool, VkCommandPoolCreateFlags t_flags)
 
void Fling::GraphicsHelpers::CreateCommandBuffers (VkCommandBuffer *t_commandBuffer, UINT32 t_commandBufferCount, VkCommandPool &t_commandPool)
 
void Fling::GraphicsHelpers::CreatePipelineCache (VkPipelineCache &t_PipelineCache)
 
void Fling::GraphicsHelpers::TransitionImageLayout (VkImage t_Image, VkFormat t_Format, VkImageLayout t_oldLayout, VkImageLayout t_NewLayout, UINT32 t_MipLevels=1)
 
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. More...
 
VkFormat Fling::GraphicsHelpers::FindSupportedFormat (const std::vector< VkFormat > &t_Candidates, VkImageTiling t_Tiling, VkFormatFeatureFlags t_Features)
 
VkShaderModule Fling::GraphicsHelpers::CreateShaderModule (std::shared_ptr< File > t_ShaderCode)
 
bool Fling::GraphicsHelpers::HasStencilComponent (VkFormat t_format)
 Returns true if the given format has a stencil component. More...
 
VkMappedMemoryRange Fling::Initializers::MappedMemoryRange ()
 
VkDescriptorSetLayoutBinding Fling::Initializers::DescriptorSetLayoutBinding (VkDescriptorType type, VkShaderStageFlags stageFlags, uint32_t binding, uint32_t descriptorCount=1)
 
VkWriteDescriptorSet Fling::Initializers::WriteDescriptorSet (VkDescriptorSet dstSet, VkDescriptorType type, uint32_t binding, VkDescriptorBufferInfo *bufferInfo, uint32_t descriptorCount=1)
 
VkRect2D Fling::Initializers::Rect2D (int32_t width, int32_t height, int32_t offsetX, int32_t offsetY)
 
VkPipelineVertexInputStateCreateInfo Fling::Initializers::PiplineVertexInptStateCreateInfo ()
 
VkDescriptorPoolSize Fling::Initializers::DescriptorPoolSize (VkDescriptorType t_type, UINT32 t_descriptorCount)
 
VkDescriptorPoolCreateInfo Fling::Initializers::DescriptorPoolCreateInfo (const std::vector< VkDescriptorPoolSize > &t_poolSizes, UINT32 t_maxSets)
 
VkMemoryAllocateInfo Fling::Initializers::MemoryAllocateInfo ()
 
VkDescriptorSetLayoutBinding Fling::Initializers::DescriptorSetLayoutBindings (VkDescriptorType t_type, VkShaderStageFlags t_stageFlags, UINT32 t_binding, UINT32 t_descriptorCount=1)
 
VkDescriptorSetLayoutCreateInfo Fling::Initializers::DescriptorSetLayoutCreateInfo (const std::vector< VkDescriptorSetLayoutBinding > &t_bindings)
 
VkWriteDescriptorSet Fling::Initializers::WriteDescriptorSetUniform (Buffer *t_Buffer, VkDescriptorSet t_DstSet, UINT32 t_Binding, UINT32 t_Set=0, VkDeviceSize t_Offset=0)
 
VkWriteDescriptorSet Fling::Initializers::WriteDescriptorSetImage (Texture *t_Image, VkDescriptorSet t_DstSet, UINT32 t_Binding, UINT32 t_Set=0, VkDeviceSize t_Offset=0)
 
VkSamplerCreateInfo Fling::Initializers::SamplerCreateInfo ()
 
VkImageViewCreateInfo Fling::Initializers::ImageViewCreateInfo ()
 
VkDescriptorSetAllocateInfo Fling::Initializers::DescriptorSetAllocateInfo (VkDescriptorPool t_descriptorPool, const VkDescriptorSetLayout *t_pSetLayouts, UINT32 t_descriptorSetCount)
 
VkDescriptorImageInfo Fling::Initializers::DescriptorImageInfo (VkSampler t_sampler, VkImageView t_imageView, VkImageLayout t_imageLayout)
 
VkWriteDescriptorSet Fling::Initializers::WriteDescriptorSet (VkDescriptorSet t_dstSet, VkDescriptorType t_type, UINT32 t_binding, VkDescriptorImageInfo *imageInfo, UINT32 descriptorCount=1)
 
VkPushConstantRange Fling::Initializers::PushConstantRange (VkShaderStageFlags t_stageFlags, UINT32 t_size, UINT32 t_offset)
 
VkPipelineLayoutCreateInfo Fling::Initializers::PiplineLayoutCreateInfo (const VkDescriptorSetLayout *t_pSetLayouts, UINT32 t_setLayoutCount=1)
 
VkPipelineInputAssemblyStateCreateInfo Fling::Initializers::PipelineInputAssemblyStateCreateInfo (VkPrimitiveTopology t_topology, VkPipelineInputAssemblyStateCreateFlags t_flags, VkBool32 t_primitiveRestartEnable)
 
VkPipelineRasterizationStateCreateInfo Fling::Initializers::PipelineRasterizationStateCreateInfo (VkPolygonMode t_polygonMode, VkCullModeFlags t_cullMode, VkFrontFace t_frontFace, VkPipelineRasterizationStateCreateFlags t_flags=0)
 
VkPipelineColorBlendStateCreateInfo Fling::Initializers::PipelineColorBlendStateCreateInfo (UINT32 t_attachmentCount, const VkPipelineColorBlendAttachmentState *t_pAttachments)
 
VkPipelineColorBlendAttachmentState Fling::Initializers::PipelineColorBlendAttachmentState (VkColorComponentFlags t_colorWriteMask, VkBool32 t_blendEnable)
 
VkPipelineDepthStencilStateCreateInfo Fling::Initializers::DepthStencilState (VkBool32 t_depthTestEnable, VkBool32 t_depthWriteEnable, VkCompareOp t_depthCompareOp)
 
VkPipelineViewportStateCreateInfo Fling::Initializers::PipelineViewportStateCreateInfo (UINT32 t_viewportCount, UINT32 t_scissorCount, VkPipelineViewportStateCreateFlags t_flags=0)
 
VkPipelineMultisampleStateCreateInfo Fling::Initializers::PipelineMultiSampleStateCreateInfo (VkSampleCountFlagBits t_rasterizationSamples, VkPipelineMultisampleStateCreateFlags t_flags=0)
 
VkPipelineDynamicStateCreateInfo Fling::Initializers::PipelineDynamicStateCreateInfo (const std::vector< VkDynamicState > &t_pDynamicStates, VkPipelineDynamicStateCreateFlags t_flags=0)
 
VkGraphicsPipelineCreateInfo Fling::Initializers::PipelineCreateInfo (VkPipelineLayout t_layout, VkRenderPass t_renderPass, VkPipelineCreateFlags t_flags=0)
 
VkVertexInputBindingDescription Fling::Initializers::VertexInputBindingDescription (UINT32 t_binding, UINT32 t_stride, VkVertexInputRate t_inputRate)
 
VkVertexInputAttributeDescription Fling::Initializers::VertexInputAttributeDescription (UINT32 t_binding, UINT32 t_location, VkFormat t_format, UINT32 t_offset)
 
VkViewport Fling::Initializers::Viewport (float t_width, float t_height, float t_minDepth, float t_maxDepth)