make some gryphn stuff happen (DOES NOT COMPILE)

This commit is contained in:
Gregory Wells
2025-06-24 13:04:33 -04:00
parent 78202825db
commit 1915166c82
21 changed files with 150 additions and 294 deletions

View File

@@ -1,10 +1,13 @@
#include "gryphn_instance.h"
#include <gryphn_platform_functions.h>
#include "instance/gryphn_instance.h"
#include <loader/src/gryphn_instance_functions.h>
#include "loader/src/gryphn_loader.h"
gnReturnCode gnCreateInstance(gnInstanceHandle* instance, gnInstanceInfo info) {
*instance = malloc(sizeof(struct gnInstance_t));
(*instance)->instanceFunctions = loadInstanceFunctions(info.renderingAPI);
// instance->dynamicLib = gnLoadRenderingDLL(info.renderingAPI);
// if (instance->dynamicLib == NULL) return GN_UNABLE_TO_LOAD_DYNAMIC_LIBARRY;
// instance->functions = gnLoadFunctions(instance);
@@ -12,10 +15,9 @@ gnReturnCode gnCreateInstance(gnInstanceHandle* instance, gnInstanceInfo info) {
// if (info.debugger)
// instance->debugger = info.debugger;
// return instance->functions->_gnCreateInstance(instance, info);
return GN_SUCCESS;
return (*instance)->instanceFunctions._gnCreateInstance((*instance), info);
}
void gnDestroyInstance(gnInstanceHandle instance) {
instance->functions->_gnDestroyInstance(instance);
instance->instanceFunctions._gnDestroyInstance(instance);
}