rename to projects (DOES NOT COMPILE)

This commit is contained in:
Gregory Wells
2025-06-24 12:04:16 -04:00
parent 7a80d0fd61
commit d66f470a52
148 changed files with 2 additions and 4 deletions

View File

@@ -0,0 +1,32 @@
#ifdef GN_PLATFORM_LINUX
#include "gryphn_platform_linux.h"
#include "core/gryphn_rendering_api.h"
#include "core/instance/init/gryphn_dynamic_library.h"
#include "dlfcn.h"
gnRenderingAPI renderingAPIs[2] = {
GN_RENDERINGAPI_VULKAN,
GN_RENDERINGAPI_SOFTWARE
};
gnRenderingAPI* gnGetSupportedRenderingAPIs(int* count) {
*count = 2;
return renderingAPIs;
}
struct gnDynamicLibrary_t* gnLoadDynamicLibrary(const gnString path) {
struct gnDynamicLibrary_t* dll = malloc(sizeof(struct gnDynamicLibrary_t));
dll->dllPtr = dlopen(gnToCString(gnCombineStrings(path, ".so")), RTLD_LAZY),
dll->isValid = gnTrue;
if (dll->dllPtr == NULL) dll->isValid = gnFalse;
return dll;
}
void* gnLoadFunctionPtr(struct gnDynamicLibrary_t* dll, const char* name) {
if (dll->isValid == gnFalse) return NULL;
return dlsym(dll->dllPtr, name);
}
void gnUnloadDynamicLibrary(struct gnDynamicLibrary_t* dll) {
if (dll->isValid) dlclose(dll->dllPtr);
}
#endif

View File

@@ -0,0 +1,8 @@
#pragma once
#include <X11/Xlib.h>
// #ifdef GN_WINDOW_X11
// #endif
// #ifdef GN_WINDOW_WAYLAND
// #include <wayland-client.h>
// #endif