Removed Win/WinVulkan.cpp

This commit is contained in:
hyzboy 2023-07-09 22:30:53 +08:00
parent 3c9e1e8e29
commit 1199a44dd3
No known key found for this signature in database
GPG Key ID: 067EE4525D4FB6D3
5 changed files with 3 additions and 40 deletions

View File

@ -1,6 +1,4 @@
OPTION(VULKAN_SUPPORT "" OFF)
SET(CPU_INFO_HEADER ${CMPLATFORM_ROOT_INCLUDE_PATH}/hgl/platform/CpuInfo.h)
SET(CPU_INFO_HEADER ${CMPLATFORM_ROOT_INCLUDE_PATH}/hgl/platform/CpuInfo.h)
IF(UNIX)
SET(PLATFORM_FILE_SOURCE UNIX/File.cpp
@ -105,11 +103,6 @@ IF(WIN32)
Win/WinWindow.cpp
Win/WinMessage.cpp
Win/EnumWinFonts.cpp)
IF(VULKAN_SUPPORT)
SET(PLATFORM_WINDOW_SOURCE ${PLATFORM_WINDOW_SOURCE}
Win/WinVulkan.cpp)
ENDIF()
ENDIF(WIN32)
SET(PLATFORM_WINDOW_SOURCE ${PLATFORM_WINDOW_SOURCE} Window.cpp )

View File

@ -1,4 +1,4 @@
#include"WinWindow.h"
#include<hgl/platform/WinWindow.h>
#include<hgl/io/event/KeyboardEvent.h>
#include<hgl/io/event/MouseEvent.h>
#include<hgl/io/event/WindowEvent.h>

View File

@ -1,30 +0,0 @@
#include<hgl/platform/Vulkan.h>
#include"WinWindow.h"
#include<vulkan/vulkan_win32.h>
namespace hgl
{
VkSurfaceKHR CreateVulkanSurface(VkInstance vk_inst,Window *w)
{
if(vk_inst==VK_NULL_HANDLE)return(VK_NULL_HANDLE);
if(!w)return(VK_NULL_HANDLE);
WinWindow *win=(WinWindow *)w;
VkWin32SurfaceCreateInfoKHR createInfo;
createInfo.sType =VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR;
createInfo.pNext =nullptr;
createInfo.flags =0;
createInfo.hinstance=win->GetInstance();
createInfo.hwnd =win->GetWnd();
VkSurfaceKHR surface;
VkResult res=vkCreateWin32SurfaceKHR(vk_inst,&createInfo,nullptr,&surface);
if(res!=VK_SUCCESS)
return(VK_NULL_HANDLE);
return(surface);
}
}//namespace hgl

View File

@ -1,4 +1,4 @@
#include"WinWindow.h"
#include<hgl/platform/WinWindow.h>
namespace hgl
{