Comments (6)
@adamnemecek my feeling is that MetalKit is a higher level framework built on top of Metal itself, and thus on Rust side it should be a different wrapper crate that depends on metal-rs.
from metal-rs.
Its the same level of abstraction. It just wraps some idioms into corresponding API.
Eg these unsafe lines of code are not needed https://github.com/gfx-rs/metal-rs/blob/master/examples/window/main.rs#L72
MTKView and MTKViewDelegate make using the framework a lot more pleasant.
from metal-rs.
I don't think this is correct, still.
Metal is the API that Apple platform implements by a combination of runtime + driver. Metal Kit is a wrapper library for working with Metal "quicker and easier, using far less code", it's a classical higher level abstraction thing. It's a library built on top of Metal: implementing new interfaces via the low-level ones, providing read-to-use shaders, etc.
The bindings to MetalKit should live in some metal-toolkit-rs
library that doesn't exist yet.
@grovesNL please let us know if you feel differently.
from metal-rs.
read-to-use shaders
You might be thinking about MetalPerformanceShaders, MetalKit doesn't provide ready-to-use shaders.
The main thing it provides is MTKView which frees you from the need to setup the layer and such yourself. It's the recommended way of writing metal.
Also, MTKViewDelegate is a much better way of rendering than alternatives.
from metal-rs.
Ok, I create a crate, it's still WIP.
https://github.com/adamnemecek/metalkit
Do you happen to know how to wrap the MTKViewDelegate?
from metal-rs.
You might be thinking about MetalPerformanceShaders, MetalKit doesn't provide ready-to-use shaders.
Indeed, thanks for correction!
Also, MTKViewDelegate is a much better way of rendering than alternatives.
I don't question it's usefulness. What I'm saying is that it's built on top of Metal, it doesn't offer anything that you can't build manually on Metal.
Ok, I create a crate, it's still WIP.
Great stuff! We'll happily follow, and this issue can now be closed.
from metal-rs.
Related Issues (20)
- Derive PartialEq on MTlScissorRect
- Naming conventions HOT 5
- [MTLIGRenderPipelineState setLabel:]: unrecognized selector sent to instance
- fatal assert when calling ArgumentDescriptor::set_access HOT 2
- Document function availability on platforms
- Publishing new version HOT 2
- Debug groups and signposts on render passes
- `MTLPixelFormat` and related enumeration types are unsound? HOT 1
- Don't use auto-release pool in string-related methods
- Using metal-cpp for auto-generating bindings HOT 2
- Investigate use of objc_retainAutoreleasedReturnValue HOT 6
- Make auto-release pools visible HOT 1
- Different behaviour using Metal with Swift in Xcode vs Rust HOT 2
- Incorrect buffer value in compute example HOT 2
- Export MTLAccelerationStructure
- computation performs slower than cpu version in benchmark HOT 3
- Including `metal-rs` on `cargo.toml` results in a compile error due to `cocoa` HOT 1
- trouble with xcode shader debugger locating source code HOT 1
- Question about mesh shaders HOT 3
- Updating version on crates.io HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metal-rs.