forked from pyrite-dev/milsko
cocoa: untested vulkan code
This commit is contained in:
parent
32f99b62b6
commit
065b0d824c
4 changed files with 43 additions and 0 deletions
|
|
@ -2,6 +2,11 @@
|
|||
#include "../../external/stb_ds.h"
|
||||
#include "Mw/LowLevel/Cocoa.h"
|
||||
|
||||
#ifdef MW_VULKAN
|
||||
#include <vulkan/vulkan_core.h>
|
||||
#include <vulkan/vulkan_metal.h>
|
||||
#endif
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
|
@ -1087,5 +1092,17 @@ static int MwLLCocoaCallInitImpl(void) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef MW_VULKAN
|
||||
VkMetalSurfaceCreateInfoEXT MwCocoaGetMetalSurfaceCreateInfo(MwWidget handle) {
|
||||
VkMetalSurfaceCreateInfoEXT createInfo = {
|
||||
.sType = VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT,
|
||||
.pNext = NULL,
|
||||
.flags = 0,
|
||||
.pLayer = (CAMetalLayer*)[handle->lowlevel->cocoa.real->view layer],
|
||||
};
|
||||
return createInfo;
|
||||
};
|
||||
#endif
|
||||
|
||||
#include "call.c"
|
||||
CALL(Cocoa);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue