rewrote instance creation
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user