Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/isaacmarovitz/sharpmetal
Handcrafted Metal bindings for C#
https://github.com/isaacmarovitz/sharpmetal
csharp dotnet graphics metal
Last synced: 19 days ago
JSON representation
Handcrafted Metal bindings for C#
- Host: GitHub
- URL: https://github.com/isaacmarovitz/sharpmetal
- Owner: IsaacMarovitz
- License: mit
- Created: 2023-05-25T03:23:59.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-08-24T10:29:22.000Z (3 months ago)
- Last Synced: 2024-10-14T10:55:16.786Z (about 1 month ago)
- Topics: csharp, dotnet, graphics, metal
- Language: C#
- Homepage: https://www.nuget.org/packages/SharpMetal/
- Size: 1.13 MB
- Stars: 45
- Watchers: 3
- Forks: 7
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SharpMetal
*Metal bindings for C#.*![](https://img.shields.io/github/actions/workflow/status/IsaacMarovitz/SharpMetal/format.yml?style=for-the-badge)
## Why?
The .NET ecosystem is very much lacking a good Metal binding package. Existing options are outdated or don't integrate well into cross-platform projects. This project aims to be a complete, up-to-date package that stays true to the original API while making the API easy to use and integrate into C#.
## What can you make with it?
Progress is underway to build a full set of working reimplementations of the metal-cpp samples. Thanks to the generator, the entire Metal API, from compute shaders to raytracing, should be available, although specific things may take further tweaking.
## I want to contribute!
Wonderful! SharpMetal is built with .NET 8.0, and follows a couple of specific guidelines:
- Block Namespaces
- Source Generated P/Invokes
- `LibraryImport` not `DllImport`
- Use C# types where possible
- `NSInteger` -> `long`
- `NSUInteger` -> `ulong`
- Mark structs and classes with `SupportedOSPlatform` attribute
- SharpMetal is built for macOS primarily, so when there are platform-specific differences, use the macOS option