delete old metal instance
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
#include <gryphn/gryphn.h>
|
||||
#include <gryphn/gryphn_utils.h>
|
||||
#include "bridge/metal_bridge.h"
|
||||
#include "metal_instance.h"
|
||||
|
||||
GN_EXPORT gnReturnCode gnCreateInstanceFn(gnInstance* instance) {
|
||||
if (instance->instance == nullptr) instance->instance = new gnPlatformInstanceData();
|
||||
|
||||
return GN_SUCCESS;
|
||||
}
|
||||
|
||||
GN_EXPORT void gnDestroyInstanceFn(gnInstance& instance) {
|
||||
|
||||
}
|
||||
|
||||
GN_EXPORT gnReturnCode gnCreateMacOSWindowSurfaceFn(gnInstance& instance, NS::Window* window, NS::View* view) {
|
||||
if (instance.instance == nullptr) instance.instance = new gnPlatformInstanceData();
|
||||
instance.instance->metalContentView = view;
|
||||
return GN_SUCCESS;
|
||||
}
|
@@ -1,18 +0,0 @@
|
||||
#pragma once
|
||||
#ifndef OBJECT_C_CODE
|
||||
#include <Metal/Metal.hpp>
|
||||
#include <QuartzCore/CAMetalLayer.hpp>
|
||||
#include <QuartzCore/CAMetalLayer.h>
|
||||
#include <QuartzCore/QuartzCore.hpp>
|
||||
|
||||
#include <AppKit/AppKit.hpp>
|
||||
#include <MetalKit/MetalKit.hpp>
|
||||
#include <Foundation/Foundation.hpp>
|
||||
#endif
|
||||
|
||||
struct GLFWwindow;
|
||||
|
||||
struct gnPlatformInstanceData {
|
||||
NS::View* metalContentView;
|
||||
MTL::RenderPipelineState* framebufferRenderer, *testSquareRenderer;
|
||||
};
|
Reference in New Issue
Block a user