Remove unused ObjC helper methods

This helper method is now implemented by Metal-CPP
void ObjC::Get_defaultLibraryData(bytebuf &buffer);
This commit is contained in:
Jake Turner
2022-07-25 20:52:25 +01:00
committed by Baldur Karlsson
parent 4e3d43bb36
commit 92fdfa097f
5 changed files with 1 additions and 51 deletions
-1
View File
@@ -46,7 +46,6 @@ set(sources
metal_manager.cpp
metal_manager.h
metal_init_state.cpp
metal_helpers_bridge.h
metal_helpers_bridge.mm
metal_serialise.cpp
metal_stringise.cpp
@@ -25,7 +25,6 @@
#include "metal_command_buffer.h"
#include "metal_blit_command_encoder.h"
#include "metal_device.h"
#include "metal_helpers_bridge.h"
#include "metal_render_command_encoder.h"
#include "metal_resources.h"
#include "metal_texture.h"
-1
View File
@@ -26,7 +26,6 @@
#include "metal_buffer.h"
#include "metal_command_queue.h"
#include "metal_function.h"
#include "metal_helpers_bridge.h"
#include "metal_library.h"
#include "metal_manager.h"
#include "metal_render_pipeline_state.h"
@@ -1,32 +0,0 @@
/******************************************************************************
* The MIT License (MIT)
*
* Copyright (c) 2022 Baldur Karlsson
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
******************************************************************************/
#pragma once
#include "metal_types.h"
namespace ObjC
{
void Get_defaultLibraryData(bytebuf &buffer);
};
+1 -16
View File
@@ -22,22 +22,7 @@
* THE SOFTWARE.
******************************************************************************/
#include "metal_helpers_bridge.h"
#import <AppKit/AppKit.h>
#import <Foundation/NSStream.h>
#import <QuartzCore/CAMetalLayer.h>
void ObjC::Get_defaultLibraryData(bytebuf &buffer)
{
NSBundle *mainAppBundle = [NSBundle mainBundle];
NSString *defaultLibaryPath = [mainAppBundle pathForResource:@"default" ofType:@"metallib"];
NSData *myData = [NSData dataWithContentsOfFile:defaultLibaryPath];
dispatch_data_t data = dispatch_data_create(
myData.bytes, myData.length, dispatch_get_main_queue(), DISPATCH_DATA_DESTRUCTOR_DEFAULT);
NSData *nsData = (NSData *)data;
buffer.assign((byte *)nsData.bytes, nsData.length);
dispatch_release(data);
}
#include "metal_types.h"
@interface ObjCTrackedCAMetalLayer : NSObject
@end