diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3bfbb45c8..dd57b0f5f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -245,6 +245,7 @@ include_directories(AFTER
${CMAKE_CURRENT_SOURCE_DIR}/libsandbox/include
${CMAKE_CURRENT_SOURCE_DIR}/OpenCL/include
${CMAKE_CURRENT_SOURCE_DIR}/OpenDirectory/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/MetalKit/include
)
add_subdirectory(external/libkqueue)
@@ -439,6 +440,7 @@ add_subdirectory(CoreMIDI)
add_subdirectory(libsandbox)
add_subdirectory(OpenCL)
add_subdirectory(OpenDirectory)
+add_subdirectory(MetalKit)
# Just a stub
add_subdirectory(WebKit)
diff --git a/src/MetalKit/CMakeLists.txt b/src/MetalKit/CMakeLists.txt
new file mode 100644
index 000000000..076e84a54
--- /dev/null
+++ b/src/MetalKit/CMakeLists.txt
@@ -0,0 +1,37 @@
+project(MetalKit)
+
+set(DYLIB_COMPAT_VERSION "1.0.0")
+set(DYLIB_CURRENT_VERSION "113.0.0")
+
+add_framework(MetalKit
+ FAT
+ CURRENT_VERSION
+ VERSION "A"
+
+ SOURCES
+ src/MetalKit.m
+ src/MTKTextureLoaderPVR3.m
+ src/MTKTextureUploader.m
+ src/MTKTextureLoaderMDL.m
+ src/MTKTextureIOBufferMap.m
+ src/MTKTextureIOBuffer.m
+ src/MTKTextureIOBufferAllocator.m
+ src/MTKTextureLoader.m
+ src/MTKTextureLoaderData.m
+ src/MTKTextureLoaderImageIO.m
+ src/MTKTextureLoaderKTX.m
+ src/MTKTextureLoaderPVR.m
+ src/MTKOffscreenDrawable.m
+ src/MTKMeshBufferAllocator.m
+ src/MTKSubmesh.m
+ src/MTKMesh.m
+ src/MTKMeshBufferHolder.m
+ src/MTKMeshBufferZone.m
+ src/MTKMeshBuffer.m
+ src/MTKView.m
+
+ DEPENDENCIES
+ system
+ objc
+ Foundation
+)
diff --git a/src/MetalKit/include/MetalKit/CALayerDelegate.h b/src/MetalKit/include/MetalKit/CALayerDelegate.h
new file mode 100644
index 000000000..dcbc04a65
--- /dev/null
+++ b/src/MetalKit/include/MetalKit/CALayerDelegate.h
@@ -0,0 +1,24 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#include
+
+@protocol CALayerDelegate
+
+@end
diff --git a/src/MetalKit/include/MetalKit/CAMetalDrawable.h b/src/MetalKit/include/MetalKit/CAMetalDrawable.h
new file mode 100644
index 000000000..a43a38db8
--- /dev/null
+++ b/src/MetalKit/include/MetalKit/CAMetalDrawable.h
@@ -0,0 +1,24 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#include
+
+@protocol CAMetalDrawable
+
+@end
diff --git a/src/MetalKit/include/MetalKit/MDLMeshBuffer.h b/src/MetalKit/include/MetalKit/MDLMeshBuffer.h
new file mode 100644
index 000000000..a5ed65096
--- /dev/null
+++ b/src/MetalKit/include/MetalKit/MDLMeshBuffer.h
@@ -0,0 +1,24 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#include
+
+@protocol MDLMeshBuffer
+
+@end
diff --git a/src/MetalKit/include/MetalKit/MDLMeshBufferAllocator.h b/src/MetalKit/include/MetalKit/MDLMeshBufferAllocator.h
new file mode 100644
index 000000000..e171fc543
--- /dev/null
+++ b/src/MetalKit/include/MetalKit/MDLMeshBufferAllocator.h
@@ -0,0 +1,24 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#include
+
+@protocol MDLMeshBufferAllocator
+
+@end
diff --git a/src/MetalKit/include/MetalKit/MDLMeshBufferZone.h b/src/MetalKit/include/MetalKit/MDLMeshBufferZone.h
new file mode 100644
index 000000000..f01799902
--- /dev/null
+++ b/src/MetalKit/include/MetalKit/MDLMeshBufferZone.h
@@ -0,0 +1,24 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#include
+
+@protocol MDLMeshBufferZone
+
+@end
diff --git a/src/MetalKit/include/MetalKit/MDLNamed.h b/src/MetalKit/include/MetalKit/MDLNamed.h
new file mode 100644
index 000000000..c0151a875
--- /dev/null
+++ b/src/MetalKit/include/MetalKit/MDLNamed.h
@@ -0,0 +1,24 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#include
+
+@protocol MDLNamed
+
+@end
diff --git a/src/MetalKit/include/MetalKit/MTKMesh.h b/src/MetalKit/include/MetalKit/MTKMesh.h
new file mode 100644
index 000000000..567f35aa2
--- /dev/null
+++ b/src/MetalKit/include/MetalKit/MTKMesh.h
@@ -0,0 +1,24 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#include
+
+@interface MTKMesh : NSObject
+
+@end
diff --git a/src/MetalKit/include/MetalKit/MTKMeshBuffer.h b/src/MetalKit/include/MetalKit/MTKMeshBuffer.h
new file mode 100644
index 000000000..90e5fbc0d
--- /dev/null
+++ b/src/MetalKit/include/MetalKit/MTKMeshBuffer.h
@@ -0,0 +1,24 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#include
+
+@interface MTKMeshBuffer : NSObject
+
+@end
diff --git a/src/MetalKit/include/MetalKit/MTKMeshBufferAllocator.h b/src/MetalKit/include/MetalKit/MTKMeshBufferAllocator.h
new file mode 100644
index 000000000..7ecde42a7
--- /dev/null
+++ b/src/MetalKit/include/MetalKit/MTKMeshBufferAllocator.h
@@ -0,0 +1,24 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#include
+
+@interface MTKMeshBufferAllocator : NSObject
+
+@end
diff --git a/src/MetalKit/include/MetalKit/MTKMeshBufferHolder.h b/src/MetalKit/include/MetalKit/MTKMeshBufferHolder.h
new file mode 100644
index 000000000..e88259182
--- /dev/null
+++ b/src/MetalKit/include/MetalKit/MTKMeshBufferHolder.h
@@ -0,0 +1,24 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#include
+
+@interface MTKMeshBufferHolder : NSObject
+
+@end
diff --git a/src/MetalKit/include/MetalKit/MTKMeshBufferZone.h b/src/MetalKit/include/MetalKit/MTKMeshBufferZone.h
new file mode 100644
index 000000000..f3450a221
--- /dev/null
+++ b/src/MetalKit/include/MetalKit/MTKMeshBufferZone.h
@@ -0,0 +1,24 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#include
+
+@interface MTKMeshBufferZone : NSObject
+
+@end
diff --git a/src/MetalKit/include/MetalKit/MTKOffscreenDrawable.h b/src/MetalKit/include/MetalKit/MTKOffscreenDrawable.h
new file mode 100644
index 000000000..3c15a3b87
--- /dev/null
+++ b/src/MetalKit/include/MetalKit/MTKOffscreenDrawable.h
@@ -0,0 +1,24 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#include
+
+@interface MTKOffscreenDrawable : NSObject
+
+@end
diff --git a/src/MetalKit/include/MetalKit/MTKSubmesh.h b/src/MetalKit/include/MetalKit/MTKSubmesh.h
new file mode 100644
index 000000000..863eb4206
--- /dev/null
+++ b/src/MetalKit/include/MetalKit/MTKSubmesh.h
@@ -0,0 +1,24 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#include
+
+@interface MTKSubmesh : NSObject
+
+@end
diff --git a/src/MetalKit/include/MetalKit/MTKTextureIOBuffer.h b/src/MetalKit/include/MetalKit/MTKTextureIOBuffer.h
new file mode 100644
index 000000000..109191284
--- /dev/null
+++ b/src/MetalKit/include/MetalKit/MTKTextureIOBuffer.h
@@ -0,0 +1,24 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#include
+
+@interface MTKTextureIOBuffer : NSObject
+
+@end
diff --git a/src/MetalKit/include/MetalKit/MTKTextureIOBufferAllocator.h b/src/MetalKit/include/MetalKit/MTKTextureIOBufferAllocator.h
new file mode 100644
index 000000000..1012462b8
--- /dev/null
+++ b/src/MetalKit/include/MetalKit/MTKTextureIOBufferAllocator.h
@@ -0,0 +1,24 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#include
+
+@interface MTKTextureIOBufferAllocator : NSObject
+
+@end
diff --git a/src/MetalKit/include/MetalKit/MTKTextureIOBufferMap.h b/src/MetalKit/include/MetalKit/MTKTextureIOBufferMap.h
new file mode 100644
index 000000000..51341acba
--- /dev/null
+++ b/src/MetalKit/include/MetalKit/MTKTextureIOBufferMap.h
@@ -0,0 +1,24 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#include
+
+@interface MTKTextureIOBufferMap : NSObject
+
+@end
diff --git a/src/MetalKit/include/MetalKit/MTKTextureLoader.h b/src/MetalKit/include/MetalKit/MTKTextureLoader.h
new file mode 100644
index 000000000..59dd95f14
--- /dev/null
+++ b/src/MetalKit/include/MetalKit/MTKTextureLoader.h
@@ -0,0 +1,24 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#include
+
+@interface MTKTextureLoader : NSObject
+
+@end
diff --git a/src/MetalKit/include/MetalKit/MTKTextureLoaderData.h b/src/MetalKit/include/MetalKit/MTKTextureLoaderData.h
new file mode 100644
index 000000000..571ccd4cf
--- /dev/null
+++ b/src/MetalKit/include/MetalKit/MTKTextureLoaderData.h
@@ -0,0 +1,24 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#include
+
+@interface MTKTextureLoaderData : NSObject
+
+@end
diff --git a/src/MetalKit/include/MetalKit/MTKTextureLoaderImageIO.h b/src/MetalKit/include/MetalKit/MTKTextureLoaderImageIO.h
new file mode 100644
index 000000000..55981bce0
--- /dev/null
+++ b/src/MetalKit/include/MetalKit/MTKTextureLoaderImageIO.h
@@ -0,0 +1,24 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#include
+
+@interface MTKTextureLoaderImageIO : NSObject
+
+@end
diff --git a/src/MetalKit/include/MetalKit/MTKTextureLoaderKTX.h b/src/MetalKit/include/MetalKit/MTKTextureLoaderKTX.h
new file mode 100644
index 000000000..bef21c087
--- /dev/null
+++ b/src/MetalKit/include/MetalKit/MTKTextureLoaderKTX.h
@@ -0,0 +1,24 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#include
+
+@interface MTKTextureLoaderKTX : NSObject
+
+@end
diff --git a/src/MetalKit/include/MetalKit/MTKTextureLoaderMDL.h b/src/MetalKit/include/MetalKit/MTKTextureLoaderMDL.h
new file mode 100644
index 000000000..ed74c9915
--- /dev/null
+++ b/src/MetalKit/include/MetalKit/MTKTextureLoaderMDL.h
@@ -0,0 +1,24 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#include
+
+@interface MTKTextureLoaderMDL : NSObject
+
+@end
diff --git a/src/MetalKit/include/MetalKit/MTKTextureLoaderPVR.h b/src/MetalKit/include/MetalKit/MTKTextureLoaderPVR.h
new file mode 100644
index 000000000..e0fd1bb22
--- /dev/null
+++ b/src/MetalKit/include/MetalKit/MTKTextureLoaderPVR.h
@@ -0,0 +1,24 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#include
+
+@interface MTKTextureLoaderPVR : NSObject
+
+@end
diff --git a/src/MetalKit/include/MetalKit/MTKTextureLoaderPVR3.h b/src/MetalKit/include/MetalKit/MTKTextureLoaderPVR3.h
new file mode 100644
index 000000000..d562d6cbf
--- /dev/null
+++ b/src/MetalKit/include/MetalKit/MTKTextureLoaderPVR3.h
@@ -0,0 +1,24 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#include
+
+@interface MTKTextureLoaderPVR3 : NSObject
+
+@end
diff --git a/src/MetalKit/include/MetalKit/MTKTextureUploader.h b/src/MetalKit/include/MetalKit/MTKTextureUploader.h
new file mode 100644
index 000000000..adea85826
--- /dev/null
+++ b/src/MetalKit/include/MetalKit/MTKTextureUploader.h
@@ -0,0 +1,24 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#include
+
+@interface MTKTextureUploader : NSObject
+
+@end
diff --git a/src/MetalKit/include/MetalKit/MTKView.h b/src/MetalKit/include/MetalKit/MTKView.h
new file mode 100644
index 000000000..d71a63fa7
--- /dev/null
+++ b/src/MetalKit/include/MetalKit/MTKView.h
@@ -0,0 +1,24 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#include
+
+@interface MTKView : NSObject
+
+@end
diff --git a/src/MetalKit/include/MetalKit/MTLDrawable.h b/src/MetalKit/include/MetalKit/MTLDrawable.h
new file mode 100644
index 000000000..f620709d2
--- /dev/null
+++ b/src/MetalKit/include/MetalKit/MTLDrawable.h
@@ -0,0 +1,24 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#include
+
+@protocol MTLDrawable
+
+@end
diff --git a/src/MetalKit/include/MetalKit/MetalKit.h b/src/MetalKit/include/MetalKit/MetalKit.h
new file mode 100644
index 000000000..fea9d65a6
--- /dev/null
+++ b/src/MetalKit/include/MetalKit/MetalKit.h
@@ -0,0 +1,63 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+
+#ifndef _MetalKit_H_
+#define _MetalKit_H_
+
+#import
+
+#import
+#import
+#import
+#import
+#import
+#import
+#import
+#import
+#import
+#import
+#import
+#import
+#import
+#import
+#import
+#import
+#import
+#import
+#import
+#import
+#import
+#import
+#import
+#import
+#import
+#import
+#import
+#import
+#import
+
+void* MTKMetalVertexDescriptorFromModelIO(void);
+void* MTKMetalVertexDescriptorFromModelIOWithError(void);
+void* MTKMetalVertexFormatFromModelIO(void);
+void* MTKModelIOVertexDescriptorFromMetal(void);
+void* MTKModelIOVertexDescriptorFromMetalWithError(void);
+void* MTKModelIOVertexFormatFromMetal(void);
+
+#endif
diff --git a/src/MetalKit/include/MetalKit/TXRBuffer.h b/src/MetalKit/include/MetalKit/TXRBuffer.h
new file mode 100644
index 000000000..10e067b45
--- /dev/null
+++ b/src/MetalKit/include/MetalKit/TXRBuffer.h
@@ -0,0 +1,24 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#include
+
+@protocol TXRBuffer
+
+@end
diff --git a/src/MetalKit/include/MetalKit/TXRBufferAllocator.h b/src/MetalKit/include/MetalKit/TXRBufferAllocator.h
new file mode 100644
index 000000000..d08f1cff3
--- /dev/null
+++ b/src/MetalKit/include/MetalKit/TXRBufferAllocator.h
@@ -0,0 +1,24 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#include
+
+@protocol TXRBufferAllocator
+
+@end
diff --git a/src/MetalKit/include/MetalKit/TXRBufferMap.h b/src/MetalKit/include/MetalKit/TXRBufferMap.h
new file mode 100644
index 000000000..6681b1924
--- /dev/null
+++ b/src/MetalKit/include/MetalKit/TXRBufferMap.h
@@ -0,0 +1,24 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#include
+
+@protocol TXRBufferMap
+
+@end
diff --git a/src/MetalKit/src/MTKMesh.m b/src/MetalKit/src/MTKMesh.m
new file mode 100644
index 000000000..3051e77f1
--- /dev/null
+++ b/src/MetalKit/src/MTKMesh.m
@@ -0,0 +1,34 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#import
+
+@implementation MTKMesh
+
+- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
+{
+ return [NSMethodSignature signatureWithObjCTypes: "v@:"];
+}
+
+- (void)forwardInvocation:(NSInvocation *)anInvocation
+{
+ NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]);
+}
+
+@end
diff --git a/src/MetalKit/src/MTKMeshBuffer.m b/src/MetalKit/src/MTKMeshBuffer.m
new file mode 100644
index 000000000..761e2a1e2
--- /dev/null
+++ b/src/MetalKit/src/MTKMeshBuffer.m
@@ -0,0 +1,34 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#import
+
+@implementation MTKMeshBuffer
+
+- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
+{
+ return [NSMethodSignature signatureWithObjCTypes: "v@:"];
+}
+
+- (void)forwardInvocation:(NSInvocation *)anInvocation
+{
+ NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]);
+}
+
+@end
diff --git a/src/MetalKit/src/MTKMeshBufferAllocator.m b/src/MetalKit/src/MTKMeshBufferAllocator.m
new file mode 100644
index 000000000..99c3e95fd
--- /dev/null
+++ b/src/MetalKit/src/MTKMeshBufferAllocator.m
@@ -0,0 +1,34 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#import
+
+@implementation MTKMeshBufferAllocator
+
+- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
+{
+ return [NSMethodSignature signatureWithObjCTypes: "v@:"];
+}
+
+- (void)forwardInvocation:(NSInvocation *)anInvocation
+{
+ NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]);
+}
+
+@end
diff --git a/src/MetalKit/src/MTKMeshBufferHolder.m b/src/MetalKit/src/MTKMeshBufferHolder.m
new file mode 100644
index 000000000..8ef15cd39
--- /dev/null
+++ b/src/MetalKit/src/MTKMeshBufferHolder.m
@@ -0,0 +1,34 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#import
+
+@implementation MTKMeshBufferHolder
+
+- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
+{
+ return [NSMethodSignature signatureWithObjCTypes: "v@:"];
+}
+
+- (void)forwardInvocation:(NSInvocation *)anInvocation
+{
+ NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]);
+}
+
+@end
diff --git a/src/MetalKit/src/MTKMeshBufferZone.m b/src/MetalKit/src/MTKMeshBufferZone.m
new file mode 100644
index 000000000..172b815b2
--- /dev/null
+++ b/src/MetalKit/src/MTKMeshBufferZone.m
@@ -0,0 +1,34 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#import
+
+@implementation MTKMeshBufferZone
+
+- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
+{
+ return [NSMethodSignature signatureWithObjCTypes: "v@:"];
+}
+
+- (void)forwardInvocation:(NSInvocation *)anInvocation
+{
+ NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]);
+}
+
+@end
diff --git a/src/MetalKit/src/MTKOffscreenDrawable.m b/src/MetalKit/src/MTKOffscreenDrawable.m
new file mode 100644
index 000000000..fe691d3db
--- /dev/null
+++ b/src/MetalKit/src/MTKOffscreenDrawable.m
@@ -0,0 +1,34 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#import
+
+@implementation MTKOffscreenDrawable
+
+- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
+{
+ return [NSMethodSignature signatureWithObjCTypes: "v@:"];
+}
+
+- (void)forwardInvocation:(NSInvocation *)anInvocation
+{
+ NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]);
+}
+
+@end
diff --git a/src/MetalKit/src/MTKSubmesh.m b/src/MetalKit/src/MTKSubmesh.m
new file mode 100644
index 000000000..55408f41a
--- /dev/null
+++ b/src/MetalKit/src/MTKSubmesh.m
@@ -0,0 +1,34 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#import
+
+@implementation MTKSubmesh
+
+- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
+{
+ return [NSMethodSignature signatureWithObjCTypes: "v@:"];
+}
+
+- (void)forwardInvocation:(NSInvocation *)anInvocation
+{
+ NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]);
+}
+
+@end
diff --git a/src/MetalKit/src/MTKTextureIOBuffer.m b/src/MetalKit/src/MTKTextureIOBuffer.m
new file mode 100644
index 000000000..9e7dfe0d6
--- /dev/null
+++ b/src/MetalKit/src/MTKTextureIOBuffer.m
@@ -0,0 +1,34 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#import
+
+@implementation MTKTextureIOBuffer
+
+- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
+{
+ return [NSMethodSignature signatureWithObjCTypes: "v@:"];
+}
+
+- (void)forwardInvocation:(NSInvocation *)anInvocation
+{
+ NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]);
+}
+
+@end
diff --git a/src/MetalKit/src/MTKTextureIOBufferAllocator.m b/src/MetalKit/src/MTKTextureIOBufferAllocator.m
new file mode 100644
index 000000000..84a69ae7d
--- /dev/null
+++ b/src/MetalKit/src/MTKTextureIOBufferAllocator.m
@@ -0,0 +1,34 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#import
+
+@implementation MTKTextureIOBufferAllocator
+
+- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
+{
+ return [NSMethodSignature signatureWithObjCTypes: "v@:"];
+}
+
+- (void)forwardInvocation:(NSInvocation *)anInvocation
+{
+ NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]);
+}
+
+@end
diff --git a/src/MetalKit/src/MTKTextureIOBufferMap.m b/src/MetalKit/src/MTKTextureIOBufferMap.m
new file mode 100644
index 000000000..a3b3997cf
--- /dev/null
+++ b/src/MetalKit/src/MTKTextureIOBufferMap.m
@@ -0,0 +1,34 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#import
+
+@implementation MTKTextureIOBufferMap
+
+- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
+{
+ return [NSMethodSignature signatureWithObjCTypes: "v@:"];
+}
+
+- (void)forwardInvocation:(NSInvocation *)anInvocation
+{
+ NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]);
+}
+
+@end
diff --git a/src/MetalKit/src/MTKTextureLoader.m b/src/MetalKit/src/MTKTextureLoader.m
new file mode 100644
index 000000000..7dc75425c
--- /dev/null
+++ b/src/MetalKit/src/MTKTextureLoader.m
@@ -0,0 +1,34 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#import
+
+@implementation MTKTextureLoader
+
+- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
+{
+ return [NSMethodSignature signatureWithObjCTypes: "v@:"];
+}
+
+- (void)forwardInvocation:(NSInvocation *)anInvocation
+{
+ NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]);
+}
+
+@end
diff --git a/src/MetalKit/src/MTKTextureLoaderData.m b/src/MetalKit/src/MTKTextureLoaderData.m
new file mode 100644
index 000000000..eceaa15a1
--- /dev/null
+++ b/src/MetalKit/src/MTKTextureLoaderData.m
@@ -0,0 +1,34 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#import
+
+@implementation MTKTextureLoaderData
+
+- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
+{
+ return [NSMethodSignature signatureWithObjCTypes: "v@:"];
+}
+
+- (void)forwardInvocation:(NSInvocation *)anInvocation
+{
+ NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]);
+}
+
+@end
diff --git a/src/MetalKit/src/MTKTextureLoaderImageIO.m b/src/MetalKit/src/MTKTextureLoaderImageIO.m
new file mode 100644
index 000000000..072f90177
--- /dev/null
+++ b/src/MetalKit/src/MTKTextureLoaderImageIO.m
@@ -0,0 +1,34 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#import
+
+@implementation MTKTextureLoaderImageIO
+
+- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
+{
+ return [NSMethodSignature signatureWithObjCTypes: "v@:"];
+}
+
+- (void)forwardInvocation:(NSInvocation *)anInvocation
+{
+ NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]);
+}
+
+@end
diff --git a/src/MetalKit/src/MTKTextureLoaderKTX.m b/src/MetalKit/src/MTKTextureLoaderKTX.m
new file mode 100644
index 000000000..4ce59ae02
--- /dev/null
+++ b/src/MetalKit/src/MTKTextureLoaderKTX.m
@@ -0,0 +1,34 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#import
+
+@implementation MTKTextureLoaderKTX
+
+- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
+{
+ return [NSMethodSignature signatureWithObjCTypes: "v@:"];
+}
+
+- (void)forwardInvocation:(NSInvocation *)anInvocation
+{
+ NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]);
+}
+
+@end
diff --git a/src/MetalKit/src/MTKTextureLoaderMDL.m b/src/MetalKit/src/MTKTextureLoaderMDL.m
new file mode 100644
index 000000000..1b0d9111c
--- /dev/null
+++ b/src/MetalKit/src/MTKTextureLoaderMDL.m
@@ -0,0 +1,34 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#import
+
+@implementation MTKTextureLoaderMDL
+
+- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
+{
+ return [NSMethodSignature signatureWithObjCTypes: "v@:"];
+}
+
+- (void)forwardInvocation:(NSInvocation *)anInvocation
+{
+ NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]);
+}
+
+@end
diff --git a/src/MetalKit/src/MTKTextureLoaderPVR.m b/src/MetalKit/src/MTKTextureLoaderPVR.m
new file mode 100644
index 000000000..89f2dacf7
--- /dev/null
+++ b/src/MetalKit/src/MTKTextureLoaderPVR.m
@@ -0,0 +1,34 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#import
+
+@implementation MTKTextureLoaderPVR
+
+- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
+{
+ return [NSMethodSignature signatureWithObjCTypes: "v@:"];
+}
+
+- (void)forwardInvocation:(NSInvocation *)anInvocation
+{
+ NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]);
+}
+
+@end
diff --git a/src/MetalKit/src/MTKTextureLoaderPVR3.m b/src/MetalKit/src/MTKTextureLoaderPVR3.m
new file mode 100644
index 000000000..0c0f7b789
--- /dev/null
+++ b/src/MetalKit/src/MTKTextureLoaderPVR3.m
@@ -0,0 +1,34 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#import
+
+@implementation MTKTextureLoaderPVR3
+
+- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
+{
+ return [NSMethodSignature signatureWithObjCTypes: "v@:"];
+}
+
+- (void)forwardInvocation:(NSInvocation *)anInvocation
+{
+ NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]);
+}
+
+@end
diff --git a/src/MetalKit/src/MTKTextureUploader.m b/src/MetalKit/src/MTKTextureUploader.m
new file mode 100644
index 000000000..af9f98ce4
--- /dev/null
+++ b/src/MetalKit/src/MTKTextureUploader.m
@@ -0,0 +1,34 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#import
+
+@implementation MTKTextureUploader
+
+- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
+{
+ return [NSMethodSignature signatureWithObjCTypes: "v@:"];
+}
+
+- (void)forwardInvocation:(NSInvocation *)anInvocation
+{
+ NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]);
+}
+
+@end
diff --git a/src/MetalKit/src/MTKView.m b/src/MetalKit/src/MTKView.m
new file mode 100644
index 000000000..fcb2c8a38
--- /dev/null
+++ b/src/MetalKit/src/MTKView.m
@@ -0,0 +1,34 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+#import
+
+@implementation MTKView
+
+- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
+{
+ return [NSMethodSignature signatureWithObjCTypes: "v@:"];
+}
+
+- (void)forwardInvocation:(NSInvocation *)anInvocation
+{
+ NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]);
+}
+
+@end
diff --git a/src/MetalKit/src/MetalKit.m b/src/MetalKit/src/MetalKit.m
new file mode 100644
index 000000000..8c35f706e
--- /dev/null
+++ b/src/MetalKit/src/MetalKit.m
@@ -0,0 +1,66 @@
+/*
+ This file is part of Darling.
+
+ Copyright (C) 2019 Lubos Dolezel
+
+ Darling is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Darling is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Darling. If not, see .
+*/
+
+
+#include
+#include
+#include
+
+static int verbose = 0;
+
+__attribute__((constructor))
+static void initme(void) {
+ verbose = getenv("STUB_VERBOSE") != NULL;
+}
+
+void* MTKMetalVertexDescriptorFromModelIO(void)
+{
+ if (verbose) puts("STUB: MTKMetalVertexDescriptorFromModelIO called");
+ return NULL;
+}
+
+void* MTKMetalVertexDescriptorFromModelIOWithError(void)
+{
+ if (verbose) puts("STUB: MTKMetalVertexDescriptorFromModelIOWithError called");
+ return NULL;
+}
+
+void* MTKMetalVertexFormatFromModelIO(void)
+{
+ if (verbose) puts("STUB: MTKMetalVertexFormatFromModelIO called");
+ return NULL;
+}
+
+void* MTKModelIOVertexDescriptorFromMetal(void)
+{
+ if (verbose) puts("STUB: MTKModelIOVertexDescriptorFromMetal called");
+ return NULL;
+}
+
+void* MTKModelIOVertexDescriptorFromMetalWithError(void)
+{
+ if (verbose) puts("STUB: MTKModelIOVertexDescriptorFromMetalWithError called");
+ return NULL;
+}
+
+void* MTKModelIOVertexFormatFromMetal(void)
+{
+ if (verbose) puts("STUB: MTKModelIOVertexFormatFromMetal called");
+ return NULL;
+}