rewrote instance creation

This commit is contained in:
Gregory Wells
2025-07-29 06:18:47 -04:00
parent bcb58fcbe7
commit 9e2dc76e8a
4 changed files with 36 additions and 36 deletions

View File

@@ -2,40 +2,38 @@
#include "core/src/gryphn_rendering_api.h"
#include "core/src/gryphn_handles.h"
#include "utils/gryphn_version.h"
#include "utils/gryphn_error_code.h"
#include "core/gryphn_error_code.h"
#include "core/src/instance/gryphn_debugger.h"
#include <gryphn_extensions.h>
typedef struct gnInstanceInfo {
typedef struct gnApplicationInfo {
gnString applicationName;
gnVersion applicationVersion;
gnString engineName;
gnVersion engineVersion;
} gnApplicationInfo;
gnRenderingAPI renderingAPI;
gnDebuggerInfo* debugger;
typedef struct gnInstanceCreateInfo {
gnApplicationInfo applicationInfo;
gnDebuggerCreateInfo debuggerInfo;
uint32_t extensionCount;
gnExtension* extensions;
} gnInstanceInfo;
gnRenderingAPI coreAPI;
} gnInstanceCreateInfo;
#ifdef GN_REVEAL_IMPL
#include <loader/src/gryphn_loader.h>
struct gnInstance_t {
struct gnPlatformInstance_t* instance;
gnBool valid;
loaderLayerArrayList layers;
loaderLayer* callingLayer;
uint32_t currentLayer;
gnBool enabledExtensions[GN_EXT_MAX];
gnBool hasDebugger;
gnDebuggerInfo debugger;
gnDebuggerCreateInfo debugger;
};
#endif
gnReturnCode gnCreateInstance(gnInstanceHandle* instance, gnInstanceInfo info);
gnReturnCode gnCreateInstance(gnInstanceHandle* instance, gnInstanceCreateInfo* info);
void gnDestroyInstance(gnInstanceHandle instance);