first commit
This commit is contained in:
10
src/core/instance/application_information/gryphn_app_info.h
Normal file
10
src/core/instance/application_information/gryphn_app_info.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
#include <gryphn/gryphn_utils.h>
|
||||
|
||||
struct gnAppInfo {
|
||||
public:
|
||||
gnString ApplicationName;
|
||||
gnString EngineName;
|
||||
gnVersion ApplicationVersion;
|
||||
gnVersion EngineVersion;
|
||||
};
|
9
src/core/instance/gryphn_instance.cpp
Normal file
9
src/core/instance/gryphn_instance.cpp
Normal file
@@ -0,0 +1,9 @@
|
||||
#include "gryphn_instance.h"
|
||||
|
||||
void gnInstanceSetDebugger(gnInstance& instance, gnDebugger& debugger) {
|
||||
instance.debugger = &debugger;
|
||||
}
|
||||
|
||||
void gnInstanceSetAppInfo(gnInstance& instance, const gnAppInfo info) {
|
||||
instance.AppInfo = info;
|
||||
}
|
29
src/core/instance/gryphn_instance.h
Normal file
29
src/core/instance/gryphn_instance.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
#include <gryphn/gryphn_utils.h>
|
||||
#include "application_information/gryphn_app_info.h"
|
||||
#include "core/debugger/gryphn_debugger.h"
|
||||
#include <core/output_device/gryphn_output_device.h>
|
||||
|
||||
class GLFWwindow;
|
||||
|
||||
struct gnPlatformInstanceData;
|
||||
|
||||
struct gnInstance {
|
||||
ACCESS_LEVEL:
|
||||
bool valid = false;
|
||||
gnPlatformInstanceData* instance = nullptr;
|
||||
gnAppInfo AppInfo;
|
||||
gnDebugger* debugger;
|
||||
public:
|
||||
gnInstance() {}
|
||||
};
|
||||
|
||||
void gnInstanceSetAppInfo(gnInstance& instance, const gnAppInfo info);
|
||||
void gnInstanceSetDebugger(gnInstance& instance, gnDebugger& debugger);
|
||||
|
||||
inline gnReturnCode (*gnCreateInstance)(gnInstance* instance);
|
||||
inline void (*gnDestroyInstance)(gnInstance& instance);
|
||||
inline gnReturnCode (*gnInstanceSetWindow)(gnInstance& instance, GLFWwindow* window);
|
||||
|
||||
// TODO: if instance creation fails add in a query to why the instance creation failed
|
||||
// Lowkey thats a lot of work tho and I dont really want to do alllllll that
|
Reference in New Issue
Block a user