浏览代码

`#force_inline` procedures and move foreign procedures to a separate file

gingerBill 3 年之前
父节点
当前提交
ae3b95b194
共有 2 个文件被更改,包括 199 次插入199 次删除
  1. 185 199
      vendor/Metal/MetalClasses.odin
  2. 14 0
      vendor/Metal/MetalProcedures.odin

文件差异内容过多而无法显示
+ 185 - 199
vendor/Metal/MetalClasses.odin


+ 14 - 0
vendor/Metal/MetalProcedures.odin

@@ -0,0 +1,14 @@
+package objc_Metal
+
+import NS "core:sys/darwin/Foundation"
+
+@(require)
+foreign import "system:Metal.framework"
+
+@(default_calling_convention="c", link_prefix="MTL")
+foreign Metal {
+	CopyAllDevices             :: proc() -> ^NS.Array ---
+	CopyAllDevicesWithObserver :: proc(observer: ^^NS.Object, handler: DeviceNotificationHandler) -> ^NS.Array ---
+	CreateSystemDefaultDevice  :: proc() -> ^NS.Object ---
+	RemoveDeviceObserver       :: proc(observer: ^NS.Object) ---
+}

部分文件因为文件数量过多而无法显示