https://github.com/olilarkin/metal-cpp-extensions
Fork of https://gitlab.com/mark-grimes/metal-cpp-extensions
https://github.com/olilarkin/metal-cpp-extensions
Last synced: over 1 year ago
JSON representation
Fork of https://gitlab.com/mark-grimes/metal-cpp-extensions
- Host: GitHub
- URL: https://github.com/olilarkin/metal-cpp-extensions
- Owner: olilarkin
- Created: 2025-02-07T00:23:32.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-08T14:47:00.000Z (over 1 year ago)
- Last Synced: 2025-04-02T15:22:14.887Z (over 1 year ago)
- Language: C++
- Size: 102 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# metal-cpp-extensions
C++ bindings into Apple's platform SDK to help with using Metal directly from C++. The majority of the code is from Apple, taken from their [Learn Metal with C++](https://developer.apple.com/metal/LearnMetalCPP.zip) example but with some things added by me. This will probably never be an exhaustive set of bindings, I just add what I need when I need them.
## Additions to Apple's code
* AppKit
* NS::GridView
* only creating from an NS::Array of NS::Arrays of NS::Views.
* NS::StackView
* only creating from an NS::Array NS::Views.
* allows setting orientation.
* allows setting the distribution.
* MetalKit
* MTK::TextureLoader
* only has the `MTL::Texture* newTexture( const NS::URL* URL, const NS::Dictionary* options, NS::Error** error );` method, and I haven't tested setting anything other than `nullptr` for the options.
* Metal Performance Shaders
* MPS::Image
* only has creation from MTL::Texture and MPS::ImageDescriptor; and conversion back to MTL::Texture.
* MPS::ImageGaussianBlur
* MPS::ImageGaussianPyramid
* Only the in place `encode` method works. I think this is an MPS internal thing, see Apple's [documentation for MPSImageGaussianPyramid] (https://developer.apple.com/documentation/metalperformanceshaders/mpsimagegaussianpyramid?language=objc).
* MPS::ImageSubtract