gnIsExtensionSupported
This commit is contained in:
36
projects/loader/src/gryphn_extension_loader.c
Normal file
36
projects/loader/src/gryphn_extension_loader.c
Normal file
@@ -0,0 +1,36 @@
|
||||
#include "gryphn_extension_loader.h"
|
||||
|
||||
#ifdef GN_API_VULKAN
|
||||
#include <apis/vulkan/loader/vulkan_loader.h>
|
||||
#endif
|
||||
#ifdef GN_API_METAL
|
||||
#include <apis/metal/loader/metal_loader.h>
|
||||
#endif
|
||||
#ifdef GN_API_OPENGL
|
||||
#include <apis/opengl/loader/opengl_loader.h>
|
||||
#endif
|
||||
|
||||
gnBool gnIsExtensionSuppoted(gnRenderingAPI api, gnExtension extension) {
|
||||
switch (api) {
|
||||
case GN_RENDERINGAPI_NONE: return gnFalse;
|
||||
#ifdef GN_API_VULKAN
|
||||
case GN_RENDERINGAPI_VULKAN: return vulkanIsExtensionSupported(extension);
|
||||
#endif
|
||||
#ifdef GN_API_SOFTWARE
|
||||
case GN_RENDERINGAPI_SOFTWARE: return softwareIsExtensionSupported(extension);
|
||||
#endif
|
||||
#ifdef GN_API_DX11
|
||||
case GN_RENDERINGAPI_DIRECTX11: return dx11IsExtensionSupported(extension);
|
||||
#endif
|
||||
#ifdef GN_API_DX12
|
||||
case GN_RENDERINGAPI_DIRECTX12: return dx12IsExtensionSupported(extension);
|
||||
#endif
|
||||
#ifdef GN_API_OPENGL
|
||||
case GN_RENDERINGAPI_OPENGL: return openglIsExtensionSupported(extension);
|
||||
#endif
|
||||
#ifdef GN_API_METAL
|
||||
case GN_RENDERINGAPI_METAL: return metalIsExtensionSupported(extension);
|
||||
#endif
|
||||
default: return gnFalse;
|
||||
}
|
||||
}
|
6
projects/loader/src/gryphn_extension_loader.h
Normal file
6
projects/loader/src/gryphn_extension_loader.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
#include <utils/gryphn_bool.h>
|
||||
#include <core/src/gryphn_rendering_api.h>
|
||||
#include <core/gryphn_extensions.h>
|
||||
|
||||
gnBool gnIsExtensionSuppoted(gnRenderingAPI api, gnExtension extension);
|
Reference in New Issue
Block a user