mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-09 20:58:31 +09:00
[Feat] (WGL): add Windows host layer - drop-in opengl32.dll with WGL over EGLImpl, Win32 window backend plumbing for both backends, ANGLE loader path, and leak-at-exit process teardown
This commit is contained in:
@@ -7560,6 +7560,10 @@ void main() {
|
||||
MOBILEGL_ASSERT(hwnd, "HWND is null");
|
||||
|
||||
VkWin32SurfaceCreateInfoKHR sci{VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR};
|
||||
sci.hinstance = reinterpret_cast<HINSTANCE>(GetWindowLongPtrW(hwnd, GWLP_HINSTANCE));
|
||||
if (!sci.hinstance) {
|
||||
sci.hinstance = GetModuleHandleW(nullptr);
|
||||
}
|
||||
sci.hwnd = hwnd;
|
||||
VK_VERIFY(vkCreateWin32SurfaceKHR(m_instance, &sci, nullptr, &m_surface), "vkCreateWin32SurfaceKHR failed");
|
||||
#elif defined VK_USE_PLATFORM_METAL_EXT
|
||||
|
||||
Reference in New Issue
Block a user