Files
Odin/vendor/darwin/Metal/MetalProcedures.odin
T
2022-04-15 11:33:28 +01:00

19 lines
558 B
Odin

package objc_Metal
import NS "vendor:darwin/Foundation"
@(require)
foreign import "system:Metal.framework"
@(default_calling_convention="c", link_prefix="MTL")
foreign Metal {
CopyAllDevices :: proc() -> ^NS.Array ---
CopyAllDevicesWithObserver :: proc(observer: ^id, handler: DeviceNotificationHandler) -> ^NS.Array ---
CreateSystemDefaultDevice :: proc() -> ^Device ---
RemoveDeviceObserver :: proc(observer: id) ---
}
new :: proc($T: typeid) -> ^T where intrinsics.type_is_subtype_of(T, NS.Object) {
return T.alloc()->init()
}