delete old metal instance

This commit is contained in:
Greg Wells
2025-05-21 10:47:42 -04:00
parent f97e26d019
commit f527afdb7a
2 changed files with 0 additions and 38 deletions

View File

@@ -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;
}

View File

@@ -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;
};