Karma Engine
Loading...
Searching...
No Matches
Karma::VulkanContext Class Reference
Inheritance diagram for Karma::VulkanContext:
Collaboration diagram for Karma::VulkanContext:

Public Member Functions

 VulkanContext (GLFWwindow *windowHandle)
 
virtual void Init () override
 
virtual void SwapBuffers () override
 
virtual bool OnWindowResize (WindowResizeEvent &event) override
 
void CreateInstance ()
 
void PrintAvailableExtensions ()
 
void PrintAvailablePhysicalDevices (const std::vector< VkPhysicalDevice > &physicalDevices)
 
bool CheckValidationLayerSupport ()
 
std::vector< const char * > GetRequiredExtensions (VkInstanceCreateFlags &flagsToBeSet)
 
void SetupDebugMessenger ()
 
void PopulateDebugMessengerCreateInfo (VkDebugUtilsMessengerCreateInfoEXT &createInfo)
 
VkResult CreateDebugUtilsMessengerEXT (VkInstance instance, const VkDebugUtilsMessengerCreateInfoEXT *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDebugUtilsMessengerEXT *pDebugMessenger)
 
void DestroyDebugUtilsMessengerEXT (VkInstance instance, VkDebugUtilsMessengerEXT debugMessenger, const VkAllocationCallbacks *pAllocator)
 
void CreateSurface ()
 
void PickPhysicalDevice ()
 
bool IsDeviceSuitable (VkPhysicalDevice device)
 
QueueFamilyIndices FindQueueFamilies (VkPhysicalDevice device)
 
void CreateLogicalDevice ()
 
void CreateSwapChain ()
 
bool CheckDeviceExtensionSupport (VkPhysicalDevice device)
 
SwapChainSupportDetails QuerySwapChainSupport (VkPhysicalDevice device)
 
VkSurfaceFormatKHR ChooseSwapSurfaceFormat (const std::vector< VkSurfaceFormatKHR > &availableFormats)
 
VkPresentModeKHR ChooseSwapPresentMode (const std::vector< VkPresentModeKHR > &availablePresentModes)
 
VkExtent2D ChooseSwapExtent (const VkSurfaceCapabilitiesKHR &capabilities)
 
uint32_t FindMemoryType (uint32_t typeFilter, VkMemoryPropertyFlags properties)
 
void CreateImageViews ()
 
void CreateRenderPass ()
 
void CreateFrameBuffers ()
 
void CreateCommandPool ()
 
void CreateDepthResources ()
 
VkFormat FindSupportedFormat (const std::vector< VkFormat > &candidates, VkImageTiling tiling, VkFormatFeatureFlags features)
 
VkFormat FindDepthFormat ()
 
bool HasStencilComponent (VkFormat format)
 
void TransitionImageLayout (VkImage image, VkFormat format, VkImageLayout oldLayout, VkImageLayout newLayout)
 
void CopyBufferToImage (VkBuffer buffer, VkImage image, uint32_t width, uint32_t height)
 
void RecreateSwapChain ()
 
void CleanupSwapChain ()
 
void SetVSync (bool bEnable)
 
void Initializeglslang ()
 
void RegisterUBO (const std::shared_ptr< VulkanUniformBuffer > &ubo)
 
void ClearUBO ()
 
void RecreateUBO ()
 
void UploadUBO (size_t frameIndex)
 
VkDevice GetLogicalDevice () const
 
VkPhysicalDevice GetPhysicalDevice () const
 
VkExtent2D GetSwapChainExtent () const
 
VkRenderPass GetRenderPass () const
 
const std::vector< VkFramebuffer > & GetSwapChainFrameBuffer () const
 
VkSwapchainKHR GetSwapChain () const
 
const std::vector< VkImage > & GetSwapChainImages () const
 
VkFormat GetSwapChainImageFormat () const
 
const std::vector< VkImageView > & GetSwapChainImageViews () const
 
VkSurfaceFormatKHR GetSurfaceFormat () const
 
VkQueue GetGraphicsQueue () const
 
VkQueue GetPresentQueue () const
 
VkCommandPool GetCommandPool () const
 
const VkPhysicalDeviceFeatures & GetSupportedDeviceFeatures () const
 
VkInstance GetInstance () const
 
uint32_t GetImageCount () const
 
uint32_t GetMinImageCount () const
 
VkSurfaceKHR GetSurface () const
 
VkPresentModeKHR GetPresentMode () const
 
- Public Member Functions inherited from Karma::GraphicsContext

Static Public Member Functions

static VKAPI_ATTR VkBool32 VKAPI_CALL DebugCallback (VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VkDebugUtilsMessageTypeFlagsEXT messageType, const VkDebugUtilsMessengerCallbackDataEXT *pCallbackData, void *pUserData)
 

Member Function Documentation

◆ Init()

void Karma::VulkanContext::Init ( )
overridevirtual

◆ OnWindowResize()

virtual bool Karma::VulkanContext::OnWindowResize ( WindowResizeEvent & event)
inlineoverridevirtual

◆ SwapBuffers()

void Karma::VulkanContext::SwapBuffers ( )
overridevirtual

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