only load device functions once per instance
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
gnReturnCode gnCreateInstance(gnInstance* instance, struct gnInstanceInfo_t info) {
|
||||
if (!gnIsAPISupported(info.renderingAPI)) return GN_UNSUPPORTED_RENDERING_API;
|
||||
instance->loadDeviceFunctions = gnFalse;
|
||||
instance->debugger = NULL;
|
||||
instance->dynamicLib = gnLoadRenderingDLL(info.renderingAPI);
|
||||
if (instance->dynamicLib == NULL) return GN_UNABLE_TO_LOAD_DYNAMIC_LIBARRY;
|
||||
|
||||
@@ -19,9 +19,10 @@ typedef struct gnInstanceInfo_t {
|
||||
|
||||
typedef struct gnInstance_t {
|
||||
struct gnPlatformInstance_t* instance;
|
||||
gnBool valid;
|
||||
gnBool valid, loadDeviceFunctions;
|
||||
|
||||
struct gnFunctions_t* functions;
|
||||
struct gnDeviceFunctions_t* deviceFunctions;
|
||||
struct gnDynamicLibrary_t* dynamicLib;
|
||||
|
||||
struct gnDebugger_t* debugger;
|
||||
|
||||
Reference in New Issue
Block a user