load all instance functions
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
#pragma once
|
||||
#include <Metal/MTLRenderPipeline.h>
|
||||
#include <AppKit/AppKit.h>
|
||||
#include "core/src/instance/gryphn_instance.h"
|
||||
|
||||
typedef struct gnPlatformInstance_t {
|
||||
NSView* metalContentView;
|
||||
} gnPlatformInstance;
|
||||
|
||||
gnReturnCode createMetalInstance(gnInstanceHandle instance, gnInstanceInfo instanceInfo);
|
||||
void destroyMetalInstance(gnInstance instance);
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
#include <gryphn/gryphn.h>
|
||||
#include <gryphn/gryphn_utils.h>
|
||||
#include "metal_instance.h"
|
||||
// #include "bridge/metal_bridge.h"
|
||||
|
||||
|
||||
gnReturnCode gnCreateInstanceFn(gnInstanceHandle instance, gnInstanceInfo instanceInfo) {
|
||||
// metal instances are kinda useless
|
||||
gnReturnCode createMetalInstance(gnInstanceHandle instance, gnInstanceInfo instanceInfo) {
|
||||
if (instance->instance == NULL) instance->instance = malloc(sizeof(gnPlatformInstance));
|
||||
return GN_SUCCESS;
|
||||
}
|
||||
|
||||
void gnDestroyInstanceFn(gnInstanceHandle instance) {
|
||||
void destroyMetalInstance(gnInstance instance) {
|
||||
free(instance->instance);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user