5 ms·
The exposed API for Metal is Obj-C, and the one for DirectX is using COM. (for shaders, MSL is a C++ dialect, but HLSL isn't)
by my123 5y ago
The exposed API for Metal is Obj-C, and the one for DirectX is using COM.
(for shaders, MSL is a C++ dialect, but HLSL isn't)
- pjmlp 5y agoThanks for being pedantic, none of them is C.
- vvanders 5y agoPedantically, none of them are C++ either.
- pjmlp 5y agoIn which language are DirectX examples and SDK written on?
- joe91 5y agoWhile not being based on C DirectX actually has a C API, even for D3D12. For example to call device->CreateRootSignature(...) from C you call ID3D12Device_CreateRootSignature(device, ...).
- pjmlp 5y agoBecause COM can be called from C, yet no sane people do it, unless they are trying to make a point no matter what.
- codeflo 5y agoThere’s no shame in simply admitting one was mistaken.
- pjmlp 5y agoI am not mistaken. DirectX is a COM API, and although some masochits can make use of it from C, 99% of the world does not, including the official SDK. Metal is a mix of Objective-C and C++, with Swift bindings thanks Objective-C interop. None of them are C based like Khronos darlings.