main
xszAzy 3 months ago
parent d5723f0f2c
commit 752076d2cc

5
.gitmodules vendored

@ -1,3 +1,6 @@
[submodule "MetalLearning/src/vendor"]
[submodule "MetalLearning/vendor/imgui"]
path=MetalLearning/vendor/imgui
url=https://github.com/TheCherno/imgui.git
[submodule "MetalLearning/vendor/spdlog"]
path = MetalLearning/vendor/spdlog
url = https://github.com/gabime/spdlog.git

@ -1,11 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:MetalLearning/MetalLearning.xcodeproj">
</FileRef>
<Group
location = "group:MetalLearning/src/MEL/Events"
name = "Events">
</Group>
</Workspace>
version = "1.0">
<FileRef
location = "group:MetalLearning/vendor/imgui/ImGui.xcodeproj">
</FileRef>
<FileRef
location = "group:MetalLearning/MetalLearning.xcodeproj">
</FileRef>
</Workspace>

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
uuid = "DF66116D-CBEC-417A-B438-C6E6BCF5D426"
type = "0"
version = "2.0">
</Bucket>

@ -2,3 +2,5 @@
#define BIT(x)(1<<x)
#define MEL_BIND_EVENT_FN(fn) std::bind(&fn, this, std::placeholders::_1)

@ -2,3 +2,5 @@
#include "MEL/Application.h"
#include "Log.h"
#include "Layer/Layer.h"

File diff suppressed because one or more lines are too long

@ -31,5 +31,8 @@ namespace MEL {
virtual void Show()=0;
static Window* Create(const WindowProps& props=WindowProps());
public:
//Metal Methods
};
}

@ -1,9 +1,9 @@
#pragma once
#include "Window.h"
#include "Events/Event.h"
#include "Events/KeyEvent.h"
#include "Events/MouseEvent.h"
#include "Events/ApplicationEvent.h"
#include "Layer/LayerStack.h"
namespace MEL{
class Window;
}
@ -12,14 +12,22 @@ namespace MEL {
public:
Application();
virtual ~Application();
void OnEvent(Event& e);
void Run();
void OnEvent(Event& e);
void PushLayer(Layer* layer);
void PushOverlay(Layer* overlay);
inline static Application& Get() {return * s_Instance;}
inline Window& GetWindow(){return *m_Window;}
private:
bool OnWindowClose(WindowCloseEvent& event);
private:
std::unique_ptr<Window> m_Window;
bool m_Running=true;
LayerStack m_LayerStack;
static Application* s_Instance;
};
Application* CreateApplication();
}

@ -1,10 +1,11 @@
#import "melpch.h"
#import "Renderer/AppDelegate.h"
#include "Log.h"
#include "Application.h"
#include "Events/ApplicationEvent.h"
namespace MEL{
Application* Application::s_Instance=nullptr;
Application::Application(){
m_Window=std::unique_ptr<Window>(Window::Create());
m_Window->SetEventCallback([this](MEL::Event& e){
@ -21,23 +22,50 @@ namespace MEL{
dispathcher.Dispatch<WindowCloseEvent>(MEL_BIND_EVENT_FN(Application::OnWindowClose));
MEL_CORE_INFO("{0}",e.ToString());
for(auto it=m_LayerStack.end();it!=m_LayerStack.begin();){
(*--it)->OnEvent(e);
if(e.m_Handled)
break;
}
}
bool Application::OnWindowClose(WindowCloseEvent& event){
m_Running=false;
return true;
}
void Application::Run() {
m_Window->Show();
NSApplication* application=[NSApplication sharedApplication];
AppDelegate* appDelegate=[[AppDelegate alloc] init];
[application setDelegate:appDelegate];
[application run];
[application finishLaunching];
[application activateIgnoringOtherApps:YES];
while (m_Running){
m_Window->OnUpdate();
@autoreleasepool {
NSEvent* event;
while ((event=[application nextEventMatchingMask:NSEventMaskAny
untilDate:[NSDate distantPast]
inMode:NSDefaultRunLoopMode
dequeue:YES])){
[application sendEvent:event];
}
m_Window->OnUpdate();
[NSThread sleepForTimeInterval:0.001];
m_Window->Show();
}
}
[application stop:nil];
}
bool Application::OnWindowClose(WindowCloseEvent& event){
m_Running=false;
return true;
void Application::PushLayer(Layer *layer){
m_LayerStack.PushLayer(layer);
}
void Application::PushOverlay(Layer *overlay){
m_LayerStack.PushOverLay(overlay);
}
}

@ -0,0 +1,24 @@
#pragma once
#include "Layer/Layer.h"
#include "Layer/LayerStack.h"
namespace MEL{
class ImGuiLayer:public Layer{
public:
ImGuiLayer(NSWindow* window);
~ImGuiLayer();
virtual void OnAttach()override;
virtual void OnDetach()override;
virtual void OnUpdate()override;
virtual void OnImGuiRender()override;
virtual void OnEvent(Event& event)override;
void Begin();
void End();
private:
NSWindow* m_NativeWindow;
};
}

@ -0,0 +1,15 @@
#include "ImGuiLayer.h"
#import "imgui.h"
#import "imgui_impl_metal.h"
#import "imgui_impl_osx.h"
namespace MEL{
ImGuiLayer::ImGuiLayer(NSWindow* window):m_NativeWindow(window){
}
void ImGuiLayer::OnAttach(){
}
}

@ -1 +1,72 @@
#pragma once
#include "melpch.h"
#include <utility>
namespace MEL {
using Keycode =uint16_t;
namespace Key{
enum: Keycode{
D1 =18,
D2 =19,
D3 =20,
D4 =21,
D5 =23,
D6 =22,
D7 =26,
D8 =28,
D9 =25,
D0 =29,
S1 =50,//`
S2 =33,//[
S3 =30,//]
S4 =42,//|
S6 =41,//;
S7 =39,//'
S8 =27,//-
S9 =24,//=
S10 =43,//,
S11 =47,//.
S12 =44,//?
N =45,
M =46,
Q =12,
W =13,
E =14,
R =15,
T =17,
Y =16,
U =32,
I =34,
O =31,
P =35,
A =0,
S =1,
D =2,
F =3,
G =5,
H =4,
J =38,
K =40,
L =37,
Z =6,
X =7,
C =8,
V =9,
B =11,
enter =76
};
}
class Input{
static bool IsKeypressed(Keycode keycode){return IsKeyPressedImpl(keycode);}
static bool IsMouseButtonPressed(int button){return IsMouseButtonPressedImpl(button);}
static float GetMouseX(){return GetMouseXImpl();}
static float GetMouseY(){return GetMouseYImpl();}
static std::pair<float,float> GetMousePosition(){return GetMousePositionImpl();}
private:
static bool IsKeyPressedImpl(Keycode keycode);
static bool IsMouseButtonPressedImpl(int button);
static float GetMouseXImpl();
static float GetMouseYImpl();
static std::pair<float,float> GetMousePositionImpl();
};
}

@ -0,0 +1,29 @@
#pragma once
#include "Input.h"
#include <AppKit/AppKit.h>
namespace MEL{
class MacInput:public Input{
public:
static void Init();
static void OnKeyEvent(NSEvent* event,bool pressed);
static void OnMouseEvent(NSEvent* event);
static void OnMouseMovedEvent(NSEvent* event);
static bool IsKeyPressedImpl(Keycode keycode);
static bool IsMouseButtonPressedImpl(int button);
static float GetMouseXImpl(){return MouseX;}
static float GetMouseYImpl(){return MouseY;}
static std::pair<float,float> GetMousePositionImpl();
private:
static std::unordered_map<Keycode, bool> s_KeyState;
static std::unordered_map<int, bool> s_MouseState;
static float MouseX,MouseY;
static std::unordered_map<uint16_t, Keycode> s_KeyMap;
static int CocoaToEngineMouseButton(NSEvent* event);
};
}

@ -0,0 +1,132 @@
#include "MacInput.h"
#include "Application.h"
namespace MEL{
std::unordered_map<uint16_t, Keycode> MacInput::s_KeyMap;
std::unordered_map<Keycode, bool> MacInput::s_KeyState;
std::unordered_map<int, bool> MacInput::s_MouseState;
float MacInput::MouseX=.0f;
float MacInput::MouseY=.0f;
void MacInput::Init(){
s_KeyState[Key::D1 ]=false;
s_KeyState[Key::D2 ]=false;
s_KeyState[Key::D3 ]=false;
s_KeyState[Key::D4 ]=false;
s_KeyState[Key::D5 ]=false;
s_KeyState[Key::D6 ]=false;
s_KeyState[Key::D7 ]=false;
s_KeyState[Key::D8 ]=false;
s_KeyState[Key::D9 ]=false;
s_KeyState[Key::D0 ]=false;
s_KeyState[Key::S1 ]=false;
s_KeyState[Key::S2 ]=false;
s_KeyState[Key::S3 ]=false;
s_KeyState[Key::S4 ]=false;
s_KeyState[Key::S6 ]=false;
s_KeyState[Key::S7 ]=false;
s_KeyState[Key::S8 ]=false;
s_KeyState[Key::S9 ]=false;
s_KeyState[Key::S10 ]=false;
s_KeyState[Key::S11 ]=false;
s_KeyState[Key::S12 ]=false;
s_KeyState[Key::N ]=false;
s_KeyState[Key::M ]=false;
s_KeyState[Key::Q ]=false;
s_KeyState[Key::W ]=false;
s_KeyState[Key::E ]=false;
s_KeyState[Key::R ]=false;
s_KeyState[Key::T ]=false;
s_KeyState[Key::Y ]=false;
s_KeyState[Key::U ]=false;
s_KeyState[Key::I ]=false;
s_KeyState[Key::O ]=false;
s_KeyState[Key::P ]=false;
s_KeyState[Key::A ]=false;
s_KeyState[Key::S ]=false;
s_KeyState[Key::D ]=false;
s_KeyState[Key::F ]=false;
s_KeyState[Key::G ]=false;
s_KeyState[Key::H ]=false;
s_KeyState[Key::J ]=false;
s_KeyState[Key::K ]=false;
s_KeyState[Key::L ]=false;
s_KeyState[Key::Z ]=false;
s_KeyState[Key::X ]=false;
s_KeyState[Key::C ]=false;
s_KeyState[Key::V ]=false;
s_KeyState[Key::B ]=false;
s_KeyState[Key::enter ]=false;
s_MouseState[0]=false;
s_MouseState[1]=false;
s_MouseState[2]=false;
}
void MacInput::OnKeyEvent(NSEvent *event, bool pressed){
Keycode keycode=[event keyCode];
s_KeyState[keycode]=pressed;
}
void MacInput::OnMouseEvent(NSEvent *event){
int button=CocoaToEngineMouseButton(event);
NSEventType type=[event type];
switch (type) {
case NSEventTypeLeftMouseUp:
case NSEventTypeRightMouseUp:
case NSEventTypeOtherMouseUp:
s_MouseState[button]=false;
break;
case NSEventTypeLeftMouseDown:
case NSEventTypeRightMouseDown:
case NSEventTypeOtherMouseDown:
s_MouseState[button]=true;
break;
default:
break;
}
}
void MacInput::OnMouseMovedEvent(NSEvent *event){
NSPoint location=[event locationInWindow];
MouseX=location.x;
MouseY=location.y;
}
int MacInput::CocoaToEngineMouseButton(NSEvent *event){
switch ([event type]) {
case NSEventTypeLeftMouseDown:
case NSEventTypeLeftMouseUp:
case NSEventTypeLeftMouseDragged:
return 0;
break;
case NSEventTypeRightMouseUp:
case NSEventTypeRightMouseDown:
case NSEventTypeRightMouseDragged:
return 1;
break;
case NSEventTypeOtherMouseUp:
case NSEventTypeOtherMouseDown:
case NSEventTypeOtherMouseDragged:
return 2;
break;
default:
return -1;
break;
}
}
bool MacInput::IsKeyPressedImpl(Keycode keycode){
auto it=s_KeyState.find(keycode);
return (it != s_KeyState.end())?it->second:false;
}
bool MacInput::IsMouseButtonPressedImpl(int button){
auto it=s_MouseState.find(button);
return (it != s_MouseState.end())?it->second:false;
}
std::pair<float,float> MacInput::GetMousePositionImpl(){
return {MouseX,MouseY};
}
}

@ -1,4 +1,8 @@
#include "melpch.h"
#include "Layer.h"
namespace MEL {
Layer::Layer(const std::string& debugName)
:m_DebugName(debugName){}
Layer::~Layer(){}
}

@ -11,6 +11,7 @@ namespace MEL {
virtual void OnAttach(){}
virtual void OnDetach(){}
virtual void OnUpdate(){}
virtual void OnImGuiRender(){}
virtual void OnEvent(Event& event){}
inline const std::string& GetName()const{return m_DebugName;}
protected:

@ -0,0 +1,35 @@
#include "melpch.h"
#include "LayerStack.h"
namespace MEL{
LayerStack::LayerStack(){
m_LayerInsert=m_Layers.begin();
}
LayerStack::~LayerStack(){
for (Layer* layer : m_Layers)
delete layer;
}
void LayerStack::PushLayer(Layer *layer){
m_LayerInsert=m_Layers.emplace(m_LayerInsert, layer);
}
void LayerStack::PushOverLay(Layer *overlay){
m_Layers.emplace_back(overlay);
}
void LayerStack::PopLayer(Layer *layer){
auto it=std::find(m_Layers.begin(),m_Layers.end(),layer);
if(it != m_Layers.end()){
m_Layers.erase(it);
m_LayerInsert--;
}
}
void LayerStack::PopOverLay(Layer *overlay){
auto it=std::find(m_Layers.begin(),m_Layers.end(),overlay);
if(it != m_Layers.end())
m_Layers.erase(it);
}
}

@ -0,0 +1,25 @@
#pragma once
#include "Core.h"
#include "Layer.h"
#include<vector>
namespace MEL{
class LayerStack{
public:
LayerStack();
~LayerStack();
void PushLayer(Layer* layer);
void PushOverLay(Layer* overlay);
void PopLayer(Layer* layer);
void PopOverLay(Layer* overlay);
std::vector<Layer*>::iterator begin() {return m_Layers.begin();}
std::vector<Layer*>::iterator end() {return m_Layers.end();}
private:
std::vector<Layer*>m_Layers;
std::vector<Layer*>::iterator m_LayerInsert;
};
}

@ -4,6 +4,7 @@
@implementation AppDelegate
-(void)applicationDidFinishLaunching:(NSNotification *)notification{
NSLog(@"finished launching application");
}
-(BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender{

@ -5,4 +5,9 @@
-(nonnull instancetype)initWithMetalKitView:
(nonnull MTKView*)mtkView;
-(void)setupImGui;
-(void)cleanup;
@property (readonly)uint64_t windowID;
@end

@ -1,28 +1,43 @@
#import "MetalRenderer.h"
#import "imgui.h"
#import "imgui_impl_metal.h"
#import "imgui_impl_osx.h"
@implementation MetalRenderer{
id<MTLDevice> _device;
id<MTLRenderPipelineState> _pipelineState;
id<MTLCommandQueue> _commandQueue;
vector_uint2 _viewportSize;
MTKView* _mtkView;
}
-(nonnull instancetype)initWithMetalKitView:(MTKView *)mtkView{
self=[super init];
if(self){
_device=mtkView.device;
[self _setupPipeline];
_mtkView=mtkView;
_commandQueue=[_device newCommandQueue];
_viewportSize=(vector_uint2)
{
(uint32_t)mtkView.drawableSize.width,
(uint32_t)mtkView.drawableSize.height
};
[self _setupPipeline];
}
return self;
}
-(void)setupImGui{
ImGui::CreateContext();
ImGui_ImplMetal_Init(_device);
ImGui_ImplOSX_Init(_mtkView);
ImGui::StyleColorsDark();
ImGuiIO& io=ImGui::GetIO();
io.Fonts->AddFontDefault();
}
-(void)_setupPipeline{
id<MTLLibrary> defaultLibrary=[_device newDefaultLibrary];
@ -42,6 +57,11 @@
id<MTLFunction> vertexFunction=[defaultLibrary newFunctionWithName:@"vertexShader"];
id<MTLFunction> fragmentFunction=[defaultLibrary newFunctionWithName:@"fragmentShader"];
if(!vertexFunction || !fragmentFunction){
NSLog(@"Note:Custom shaders not found,only ImGui rendering will be available!");
return;
}
MTLRenderPipelineDescriptor* pipeLineDescriptor=[[MTLRenderPipelineDescriptor alloc] init];
pipeLineDescriptor.label=@"Simple Pipeline";
@ -69,21 +89,49 @@
[commandBuffer commit];
return;
}
//begin imgui render
ImGui_ImplMetal_NewFrame(renderPassDescriptor);
ImGui_ImplOSX_NewFrame(view);
ImGui::NewFrame();
//draw imgui (that's imguilayer::end() in hazel)
[self _drawImGui];
//renderPassDescriptor.colorAttachments[0].clearColor=MTLClearColorMake(0.1, 0.1, 0.1, 1.0);
ImGui::Render();
id<MTLRenderCommandEncoder> renderEncoder=[commandBuffer renderCommandEncoderWithDescriptor:renderPassDescriptor];
renderEncoder.label=@"MyRenderEncoder";
[renderEncoder setRenderPipelineState:_pipelineState];
if(_pipelineState){
[renderEncoder setRenderPipelineState:_pipelineState];
[renderEncoder drawPrimitives:MTLPrimitiveTypeTriangle
vertexStart:0
vertexCount:3];
}
[renderEncoder drawPrimitives:MTLPrimitiveTypeTriangle
vertexStart:0
vertexCount:3];
ImGui_ImplMetal_RenderDrawData(ImGui::GetDrawData(), commandBuffer, renderEncoder);
[renderEncoder endEncoding];
[commandBuffer presentDrawable:view.currentDrawable];
[commandBuffer commit];
if(ImGui::GetIO().ConfigFlags & ImGuiConfigFlags_ViewportsEnable){
ImGui::UpdatePlatformWindows();
ImGui::RenderPlatformWindowsDefault();
}
}
-(void)_drawImGui{
//render ImGui things here,it's really clear!!
ImGui::Begin("MEL Engine - Metal Implementation");
ImGui::Text("Hello, Metal! This is your engine");
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)",1000.0f/ImGui::GetIO().Framerate,ImGui::GetIO().Framerate);
ImGui::ShowDemoWindow();
ImGui::End();
}
-(void)mtkView:(MTKView *)view drawableSizeWillChange:(CGSize)size{
@ -91,4 +139,12 @@
_viewportSize.y=(uint32_t)size.height;
}
-(void)cleanup{
ImGui_ImplOSX_Shutdown();
ImGui_ImplMetal_Shutdown();
ImGui::DestroyContext();
}
@end
#pragma mark - TODO:
//I'll add multi-window later,not now. :P

@ -5,6 +5,7 @@
@property (nonatomic,strong)MTKView* metalView;
@property (nonatomic,strong)MetalRenderer* renderer;
@property (nonatomic,strong)id<MTLCommandQueue> commandQueue;
@end;
@ -21,6 +22,9 @@
[self.view addSubview:self.metalView];
self.renderer=[[MetalRenderer alloc] initWithMetalKitView:self.metalView];
[self.renderer setupImGui];
self.metalView.delegate=self.renderer;
}
@ -32,7 +36,11 @@
-(void)loadView{
self.view=[[NSView alloc] init];
self.view.wantsLayer=YES;
//self.view.layer.backgroundColor=[[NSColor blueColor] CGColor];
}
-(void)viewWillDisappear{
[super viewWillDisappear];
[self.renderer cleanup];
}
@end

@ -3,6 +3,8 @@
#import "Events/KeyEvent.h"
#import "Events/MouseEvent.h"
#import "Events/ApplicationEvent.h"
#include "imgui_impl_osx.h"
#include "MacInput.h"
@implementation CocoaWindow
@ -22,6 +24,7 @@
//Key Events
-(void)keyDown:(NSEvent *)event{
//MEL::MacInput::OnKeyEvent(event, true);
int action;
action=[event isARepeat]?1:0;
MEL::KeyPressedEvent keyPressedEvent((int)[event keyCode],action);
@ -32,22 +35,26 @@
}
-(void)keyUp:(NSEvent *)event{
MEL::MacInput::OnKeyEvent(event, false);
MEL::KeyReleasedEvent keyReleasedEvent((int)[event keyCode]);
[self dispatchEvent:keyReleasedEvent];
}
//Mouse Events
-(void)mouseDown:(NSEvent *)event{
MEL::MacInput::OnMouseEvent(event);
MEL::MouseButtonPressedEvent mousePressed(1);
[self dispatchEvent:mousePressed];
}
-(void)mouseUp:(NSEvent *)event{
MEL::MacInput::OnMouseEvent(event);
MEL::MouseButtonReleasedEvent mouseReleased(0);
[self dispatchEvent:mouseReleased];
}
-(void)mouseMoved:(NSEvent *)event{
MEL::MacInput::OnMouseMovedEvent(event);
NSPoint location=[event locationInWindow];
MEL::MouseMovedEvent mouseMovedEvent(location.x,location.y);
[self dispatchEvent:mouseMovedEvent];

@ -1,8 +1,9 @@
#pragma once
#include "melpch.h"
#include "MEL.h"
#include "Window.h"
#include "ImGuiLayer/ImGuiLayer.h"
namespace MEL {
class MacWindow:public Window{
public:
@ -24,7 +25,6 @@ namespace MEL {
static Window* Create(const WindowProps& props=WindowProps());
void Show()override;
private:
virtual void Init(const WindowProps& props);
virtual void ShutDown();
@ -37,6 +37,8 @@ namespace MEL {
EventCallbackFn EventCallback;
};
WindowData m_Data;
private:
ImGuiLayer* m_ImGuiLayer;
};
}

@ -52,6 +52,8 @@ namespace MEL {
m_Data.EventCallback(event);
};
}
m_ImGuiLayer=new ImGuiLayer(m_Window);
LayerStack::PushOverLay(m_ImGuiLayer);
}
void MacWindow::ShutDown(){

@ -1,8 +1,29 @@
#include "MEL.h"
#include <stdio.h>
class ExampleLayer:public MEL::Layer{
public:
ExampleLayer()
:Layer("Example"){
}
void OnUpdate() override{
MEL_INFO("testing update");
}
void OnEvent(MEL::Event& e) override{
MEL_INFO("testing event{0}",e.ToString());
}
private:
};
class Sandbox:public MEL::Application{
public:
Sandbox(){
PushLayer(new ExampleLayer());
}
~Sandbox(){

@ -10,3 +10,4 @@
#include <string>

@ -0,0 +1 @@
Subproject commit 781a4ffc674d98dfd2b4d42747e1cd27887fac36

@ -6,7 +6,10 @@ workspace "MEL"
outputdir= "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
-- Include directories relative to root folder (solution directory)
IncludeDir={}
IncludeDir["spdlog"]="MEL/vendor/spdlog/include"
IncludeDir["spdlog"]="MetalLearning/vendor/spdlog/include"
IncludeDir["ImGui"]="MetalLearning/vendor/imgui"
include "MetalLearning/vendor/imgui"
project "MetalLearning"
location "MetalLearning"
@ -23,7 +26,10 @@ project "MetalLearning"
"%{prj.name}/src/**.cpp",
"%{prj.name}/src/**.mm",
"%{prj.name}/src/**.m",
"%{prj.name}/ShaderSrc/**.metal"
"%{prj.name}/*.h",
"%{prj.name}/ShaderSrc/**.metal",
"%{prj.name}/vendor/imgui/backends/imgui_impl_osx.mm",
"%{prj.name}/vendor/imgui/backends/imgui_impl_metal.mm"
}
includedirs
@ -31,12 +37,13 @@ project "MetalLearning"
"**",
"%{prj.name}/ShaderSrc",
"%{IncludeDir.spdlog}",
"%{IncludeDir.ImGui}",
}
links
{
-- link directories here
"ImGui",
}
filter "system:macosx"
@ -53,19 +60,10 @@ project "MetalLearning"
"QuartzCore.framework",
"CoreFoundation.framework",
"CoreGraphics.framework",
"MetalKit.framework"
"MetalKit.framework",
"GameController.framework"
}
filter "configurations:Debug"
defines"MEL_DEBUG"
runtime "Debug"
symbols "on"
filter "configurations:Release"
defines "MEL_RELEASE"
runtime "Release"
optimize "on"
xcodebuildsettings{
["MACOSX_DEPLOYMENT_TARGET"]="10.15",
["GCC_PRECOMPILE_PREFIX_HEADER"]="NO",
@ -79,3 +77,14 @@ project "MetalLearning"
["GENERATE_INFOPLIST_FILE"]="YES"
}
filter "configurations:Debug"
defines"MEL_DEBUG"
runtime "Debug"
symbols "on"
filter "configurations:Release"
defines "MEL_RELEASE"
runtime "Release"
optimize "on"

Loading…
Cancel
Save