Replies: 1 comment 1 reply
-
In order to render anything to a window, you need to acquire a The After you've submitted some work that writes to the surface texture you then have to call (I'm not aware of a simpler way of doing this with just wgpu, but there might be other libraries that make this easier) |
Beta Was this translation helpful? Give feedback.
-
I saw a discussion post from 2022 about copying pixels to a window surface, but the question revolved more around a bug that user encountered than the process of writing/copying the pixels itself.
My question is this: what is the recommended workflow/set of functions for writing the colors of individual pixels to a window? For context: I am trying to write my own rendering engine (no intention of it being a good one, just that it works), and I have a series of compute shaders that will raytrace an object and return the rgba values for a given pixel. Unfortunately, I'm a bit lost in regards to actually updating the window with those pixel colors once I have them in-hand. Any help would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions