first commit

This commit is contained in:
Greg Wells
2025-05-05 19:29:42 -04:00
commit 406d669de0
284 changed files with 32727 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
#pragma once
#ifdef GN_PLATFORM_LINUX
#include <platform/platform_linux/gryphn_platform_linux.h>
#elif GN_PLATFORM_MACOS
#include <platform/platform_macos/gryphn_platform_macos.h>
#elif GN_PLATFORM_WINDOWS
#include <platform/platform_windows/gryphn_platform_windows.h>
#endif
#include <core/gryphn_rendering_api.h>
std::vector<gnRenderingAPI> gnGetSupportedRenderingAPIS();
void* gnPlatformLoadDLL(gnString name);
void* gnLoadFunctionPtr(void* dll, gnString name);
template <typename function>
void gnPlatformLoadDLLFunction(void *dll, function& func, gnString name) {
func = (function)gnLoadFunctionPtr(dll, name);
}

View File

@@ -0,0 +1,17 @@
#ifdef GN_PLATFORM_MACOS
#include <platform/platform_macos/gryphn_platform_macos.h>
#include <dlfcn.h>
std::vector<gnRenderingAPI> gnGetSupportedRenderingAPIS() {
return { GN_RENDERINGAPI_METAL, GN_RENDERINGAPI_VULKAN };
}
void* gnPlatformLoadDLL(gnString name) {
return dlopen(gnToCString(name + ".dylib"), RTLD_LAZY);
}
void* gnLoadFunctionPtr(void *dll, gnString name) {
return dlsym(dll, gnToCString(name));
}
#endif

View File

@@ -0,0 +1,5 @@
#pragma once
#include <core/gryphn_rendering_api.h>
#include <utils/strings/gryphn_string.h>
#include <vector>
#include <dlfcn.h>