wgpu
glow
wgpu | glow | |
---|---|---|
212 | 10 | |
14,497 | 1,347 | |
1.8% | 1.6% | |
9.9 | 8.0 | |
7 days ago | 5 months ago | |
Rust | Rust | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
wgpu
-
Ask HN: Resources for General Purpose GPU development on Apple's M* chips?
People have already mentioned Metal, but if you want cross platform, https://github.com/gfx-rs/wgpu has a vulkan-like API and cross compiles to all the various GPU frameworks. I believe it uses https://github.com/KhronosGroup/MoltenVK to run on Macs. You can also see the metal shader transpilation results for debugging.
-
What's Next for WebGPU
This is in reference to [1].
[1] https://github.com/gfx-rs/wgpu/issues/6434
-
Repeatability: As Difficult as it is Important
> Did they actually write that somewhere?
wgpu.rs for comments about "general purpose", "modern" is my own interjection, and [1] about the difference in priorities between the WGPU maintainers and (funnily enough) you.
I do believe a cross-platform and modern interface is difficult to square with high performance. I don't think either side is wrong to choose the priorities it has, but someone will be underserved. They probably need far more manpower/talent than they have to improve performance proportionately.
[1] https://github.com/gfx-rs/wgpu/discussions/5525
-
Pygfx
Sorry, I'll try to be clearer. QRhi docs[1] say "The Qt Rendering Hardware Interface is an abstraction for hardware accelerated graphics APIs, such as, OpenGL, OpenGL ES, Direct3D, Metal, and Vulkan." And PySide6 includes a (python) wrapper for QRhi[2]. Meanwhile, pygfx builds on wgpu-py[3] which builds on wgpu[4] which is a "is a cross-platform, safe, pure-rust graphics API. It runs natively on Vulkan, Metal, D3D12, and OpenGL".
So, from the standpoint of someone using PySide6, QRhi and pygfx seem to be alternative paths to the exact same underlying graphics APIs.
Thus my question: How do they compare? How should I make an informed comparison between them?
[1] https://doc.qt.io/qt-6/qrhi.html
[2] https://doc.qt.io/qtforpython-6/PySide6/QtWidgets/QRhiWidget...
[3] https://github.com/pygfx/wgpu-py/
[4] https://github.com/gfx-rs/wgpu
-
Q3 dev update for Graphite, a Blender-inspired 2D procedural design Rust app
Everything will be using compute shaders for the foreseeable future. [WGPU](https://wgpu.rs/) abstracts that to work with WebGPU on browsers, DirectX/Vulkan on Windows, Metal on Mac, and Vulkan on Linux and Android. There may be opportunities to explore vendor-specific options like CUDA in the far future to leverage a further increase in performance, but compute shaders are portable and nearly as good.
- How to get started in Graphics Programming in 2024?
-
A high-performance, zero-overhead, extensible Python compiler using LLVM
Instead of building their GPU support atop CUDA/NVIDIA [0], I’m wondering why they didn’t instead go with WebGPU [1] via something like wgpu [2]. Using wgpu, they could offer cross-platform compatibility across several graphics API’s, covering a wide range of hardware including NVIDIA GeForce and Quadro, AMD Radeon, Intel Iris and Arc, ARM Mali, and Apple’s integrated GPU’s.
They note the following [0]:
> The GPU module is under active development. APIs and semantics might change between Codon releases.
The thing is, based on the current syntax and semantics I see, it’ll almost certainly need to change to support non-NVIDIA devices, so I think it might be a better idea to just go with WebGPU compute pipelines sooner rather than later.
Just my two pennies…
[0]: https://docs.exaloop.io/codon/advanced/gpu
[1]: https://www.w3.org/TR/webgpu
[2]: https://wgpu.rs
-
SDL3 new GPU API merged
wgpu supports WebGPU: https://github.com/gfx-rs/wgpu :
> While WebGPU does not support any shading language other than WGSL, we will automatically convert your non-WGSL shaders if you're running on WebGPU.
- First major release of gfx-rs/wgpu
-
I learned Vulkan and wrote a small game engine with it (in 3 months)
https://github.com/gfx-rs/wgpu?tab=readme-ov-file#tracking-t...
glow
-
Egui – An immediate mode GUI written in Rust
I just opened https://github.com/grovesNL/glow/pull/331 to do exactly that.
-
rust game for web, gltf question
You can absolutely do WebGL. glow is a good place if you want to do the webgl stuff yourself. With wgpu you can as well, though it is mostly targeted to the upcoming WebGPU standard. I have seen many crates that are capable of gltf loading, but I haven't used any yet. Hence I can't reall recommend one. But gltf capability does not really have anything to do with rust. As long as you can read a file and translate it to your engines scene/entity structure, I don't see why it shouldn't be possible to load gltf files.
-
Recreating macOS’s Drift screensaver with Rust and Wasm
Most of it is written in Rust and compiles to Wasm with WebGL/OpenGL bindings via glow. The settings panel is written in Elm and the whole project is compiled with Nix. There’s also a very basic native desktop app. I haven’t seen many examples of a complete setup like this, so hopefully this can serve as a template for anyone trying out a similar stack.
-
How to use OpenGL in Rust?
If you want to target desktop, mobile and/or web: https://github.com/grovesNL/glow
-
Are there any big projects written in Rust without any use of unsafe code?
A/B Street, which comprises a UI library, lots of data import pipelines, and traffic simulation. 100k LoC, the only unafe is to make system calls through glow
-
[Media] Spinning triangle using Nalgebra and Glow OpenGL bindings. Followed WebGL Programming Guide and Glow example.
https://github.com/grovesNL/glow/blob/main/examples/howto/src/main.rs :)
-
opengl bindings
https://github.com/grovesNL/glow is used by wgpu for its OpenGL ES / WebGL backend
-
Shaders and Uniforms in pure SDL2?
By the way, nowadays many projects use glow instead of glutin because of.. I think it's because glow works on wasm, in the web (as webgl).
-
Graphics Libraries?
But what glow actually does is highlighted on lines 66 to 123. This section is filled with gl.some_function() calls, which is the same on every platform.
What are some alternatives?
gfx - [maintenance mode] A low-overhead Vulkan-like GPU API for Rust.
glium - Safe OpenGL wrapper for the Rust language.
vulkano - Safe and rich Rust wrapper around the Vulkan API
learn-opengl - Learn OpenGL lessons in Rust
rust-gpu - 🐉 Making Rust a first-class language and ecosystem for GPU shaders 🚧
nebari - A pure Rust database implementation using an append-only B-Tree file format.