reimplement gnCreateOutputDevice
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
gnReturnCode gnCreateInstance(gnInstance* instance, struct gnInstanceInfo_t info) {
|
||||
if (!gnIsAPISupported(info.renderingAPI)) return GN_UNSUPPORTED_RENDERING_API;
|
||||
instance->debugger = NULL;
|
||||
instance->dynamicLib = gnLoadRenderingDLL(info.renderingAPI);
|
||||
if (instance->dynamicLib == NULL) return GN_UNABLE_TO_LOAD_DYNAMIC_LIBARRY;
|
||||
instance->functions = malloc(sizeof(struct gnFunctions_t));
|
||||
|
@@ -5,6 +5,7 @@
|
||||
struct gnPlatformInstance_t;
|
||||
struct gnFunctions_t;
|
||||
struct gnDynamicLibrary_t;
|
||||
struct gnDebugger_t;
|
||||
|
||||
typedef struct gnInstanceInfo_t {
|
||||
gnString applicationName;
|
||||
@@ -22,6 +23,8 @@ typedef struct gnInstance_t {
|
||||
|
||||
struct gnFunctions_t* functions;
|
||||
struct gnDynamicLibrary_t* dynamicLib;
|
||||
|
||||
struct gnDebugger_t* debugger;
|
||||
} gnInstance;
|
||||
|
||||
gnReturnCode gnCreateInstance(gnInstance* instance, struct gnInstanceInfo_t info);
|
||||
|
@@ -42,8 +42,7 @@ void gnLoadFunctions(struct gnDynamicLibrary_t* lib, struct gnFunctions_t* funct
|
||||
gnLoadDLLFunction(lib, functions->_gnCreateDebugger, "gnCreateDebuggerFn");
|
||||
gnLoadDLLFunction(lib, functions->_gnDestroyDebugger, "gnDestroyDebuggerFn");
|
||||
gnLoadDLLFunction(lib, functions->_gnGetPhysicalDevices, "gnGetPhysicalDevicesFn");
|
||||
gnLoadDLLFunction(lib, functions->_gnDeviceSupportsAPI, "gnDeviceSupportsAPIFn");
|
||||
gnLoadDLLFunction(lib, functions->_gnRegisterOutputDevice, "gnRegisterOutputDeviceFn");
|
||||
gnLoadDLLFunction(lib, functions->_gnCreateOutputDevoce, "gnCreateOutputDeviceFn");
|
||||
gnLoadDLLFunction(lib, functions->_gnDestroyOutputDevice, "gnDestroyOutputDeviceFn");
|
||||
|
||||
#ifdef GN_PLATFORM_LINUX
|
||||
|
Reference in New Issue
Block a user