update vulkan/opengl
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
This commit is contained in:
parent
b82e13cb2e
commit
5201c46a21
4 changed files with 92 additions and 25 deletions
|
|
@ -2,9 +2,12 @@
|
|||
|
||||
#include <Mw/Milsko.h>
|
||||
|
||||
#ifdef MW_OPENGL
|
||||
#ifndef MW_OPENGL
|
||||
#define MW_OPENGL_NO_INCLUDE
|
||||
#endif
|
||||
#include <Mw/Widget/OpenGL.h>
|
||||
|
||||
#ifdef MW_OPENGL
|
||||
#ifdef USE_GDI
|
||||
typedef HGLRC(WINAPI* MWwglCreateContext)(HDC);
|
||||
typedef BOOL(WINAPI* MWwglMakeCurrent)(HDC, HGLRC);
|
||||
|
|
|
|||
|
|
@ -4,9 +4,12 @@
|
|||
* ioixd maintains this file. nishi doesn't know vulkan at all
|
||||
*/
|
||||
|
||||
#ifdef MW_VULKAN
|
||||
#ifndef MW_VULKAN
|
||||
#define MW_VULKAN_NO_INCLUDE
|
||||
#endif
|
||||
#include <Mw/Widget/Vulkan.h>
|
||||
|
||||
#ifdef MW_VULKAN
|
||||
#ifdef USE_GDI
|
||||
#define VK_USE_PLATFORM_WIN32_KHR 1
|
||||
#endif
|
||||
|
|
@ -498,7 +501,7 @@ void MwVulkanEnableLayer(const char* name) {
|
|||
arrput(enabledLayers, name);
|
||||
}
|
||||
|
||||
VkBool32 MwVulkanSupported(void) {
|
||||
int MwVulkanSupported(void) {
|
||||
if(vulkan_supported == VULKAN_SUPPORTED_UNKNOWN) {
|
||||
void* lib = vulkan_lib_load();
|
||||
if(lib == NULL) {
|
||||
|
|
@ -509,9 +512,9 @@ VkBool32 MwVulkanSupported(void) {
|
|||
}
|
||||
}
|
||||
if(vulkan_supported == VULKAN_SUPPORTED_YES) {
|
||||
return VK_TRUE;
|
||||
return 1;
|
||||
} else {
|
||||
return VK_FALSE;
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -582,7 +585,21 @@ MwClassRec MwVulkanClassRec = {
|
|||
NULL};
|
||||
MwClass MwVulkanClass = &MwVulkanClassRec;
|
||||
#else
|
||||
MWDECL MwClass MwVulkanClass;
|
||||
|
||||
MwClass MwVulkanClass = NULL;
|
||||
|
||||
void MwVulkanEnableExtension(const char* ext_name) {
|
||||
(void)ext_name;
|
||||
}
|
||||
|
||||
void MwVulkanEnableLayer(const char* ext_name) {
|
||||
(void)ext_name;
|
||||
}
|
||||
|
||||
void MwVulkanConfigure(MwVulkanConfig cfg) {
|
||||
(void)cfg;
|
||||
}
|
||||
|
||||
int MwVulkanSupported(void) {
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue