직렬화 함수 작성 끝
This commit is contained in:
24
impl/vulkan_engine/vulkan/vk_function_ext_impl.cpp
Normal file
24
impl/vulkan_engine/vulkan/vk_function_ext_impl.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#include "vulkan_engine/vulkan/graphics.h"
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateDebugUtilsMessengerEXT(
|
||||
VkInstance instance, const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkDebugUtilsMessengerEXT* pMessenger) {
|
||||
PFN_vkCreateDebugUtilsMessengerEXT function =
|
||||
reinterpret_cast<PFN_vkCreateDebugUtilsMessengerEXT>(
|
||||
vkGetInstanceProcAddr(instance, "vkCreateDebugUtilsMessengerEXT"));
|
||||
if (function != nullptr) {
|
||||
return function(instance, pCreateInfo, pAllocator, pMessenger);
|
||||
} else {
|
||||
return VK_ERROR_EXTENSION_NOT_PRESENT;
|
||||
}
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkDestroyDebugUtilsMessengerEXT(
|
||||
VkInstance instance, VkDebugUtilsMessengerEXT messenger,
|
||||
const VkAllocationCallbacks* pAllocator) {
|
||||
PFN_vkDestroyDebugUtilsMessengerEXT function =
|
||||
reinterpret_cast<PFN_vkDestroyDebugUtilsMessengerEXT>(
|
||||
vkGetInstanceProcAddr(instance, "vkDestroyDebugUtilsMessengerEXT"));
|
||||
if (function != nullptr) function(instance, messenger, pAllocator);
|
||||
}
|
||||
Reference in New Issue
Block a user