Hi everyone, I'm new to here. I work as a full-stack engineer, primarily focused on front-end development, building web applications.
I’ve been learning Rust for less than two months and haven’t worked on any particularly large projects with it yet. The first time I came across wgpu, I was completely captivated—I thought to myself, this is exactly the kind of thing I want to do with Rust. However, I’ve been struggling with the learn-wgpu documentation, and after going through it, I’m still not sure what to do next. I’d really appreciate any advice you more experienced folks might have.
Also, is this area considered part of computer graphics? To be honest, I’m not even entirely sure which field this falls under—I’m just fascinated by any technology that can render things onto a screen. Lastly, since English isn’t my first language, I used a translation tool to help write this. If it makes for uncomfortable reading, that’s entirely my fault!
Yes.
Well, wgpu
can also be used for computations that don’t end up on any screen and are not graphical at all, but the majority of uses are for graphics.
In my opinion, the most effective way to practice and learn more about computer graphics — whether using a GPU or not — is to approach it as practicing art. Write programs that place vertices and choose colors according to mathematical rules, and draw them and see what happens. Change it. Animate it. Learn what sort of code produces what sort of shape. Repeat. Explore.
WGPU is an low to intermediate layer for use by game engine and renderer developers. If you want to draw something, try using Bevy or something else that runs atop WGPU.
Yes, I’m aware of that too. It was actually through Graphite that I discovered wgpu — and I believe that’s the tool you mentioned running on wgpu, right? I’ve already started learning how to use it, and I’d like to contribute to the project as well, which is why I need to dive into some lower-level concepts. Anyway, thanks for your answer!
Thank you so much for your answer. While learning, I've noticed the API is evolving so rapidly that many tutorials and documentation have become outdated. Quite a few people have told me it might be too early to dive into wgpu—I'd love to hear your take on that.
Personally, I see it as a unique opportunity to learn both Rust and graphics programming simultaneously, and that dual benefit is what drives me forward. Anyway, thanks again for your time!
WGPU's API is basically Vulkan's API, but safer, and with emulators for non-Vulkan back ends such as Metal and OpenGL.
Game engines let you work at the level of meshes and textures.
-
wgpu
’s API changes generally affect only a small part of your program, if any. They are mostly things like changing abool
to anenum
to allow more options — certainly a breaking change according to the formal rules of Rust, but not at all “you have to rewrite your program”. I would specifically advise that, if you follow a tutorial, use the version ofwgpu
it was written for, and then once you are somewhat comfortable with what you are doing, upgrade your code to use the latest version ofwgpu
. -
I think that learning graphics programming is a lot like learning programming: you can be a better programmer by learning many languages, to understand the problem of writing good programs from many perspectives, and you can be a better graphics programmer by using many different graphics APIs[1]. So, you should not worry too much about whether what you learn first is perfect or not.
And by that I don't mean just different GPU APIs. Graphics programming can also mean learning to use ANSI terminal control codes, or SVG, or using the HTML 2D Canvas API. These might not be what you use to make a visually complex, real-time game, but they still have things to teach you about writing code to make pictures. ↩︎
Thank you for the insightful response! I'm sure I'll have more questions as I go, but this is a fantastic starting point. I appreciate your help!