|
Hello! I've been spinning my head around this for a little bit and I can't seem to find a good awenser, but basically I want to save whatever is rendered on the screen to disk. Right now I'm able to save a file but it's a black image. Let me know if it's possible to use the window surface or if I need to render everything into a another renderpass and save that thanks! here's my code: |
Answered by
kpreid
Dec 25, 2025
Replies: 1 comment 1 reply
|
I’m not sure whether it’s supposed to be possible to copy from the surface texture, but presuming it isn’t, you still don't need to render more than once. Create a normal texture, render to it, and copy that texture to the surface texture as well as to your screenshot buffer. |
1 reply
Answer selected by
inner-daemons
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I’m not sure whether it’s supposed to be possible to copy from the surface texture, but presuming it isn’t, you still don't need to render more than once. Create a normal texture, render to it, and copy that texture to the surface texture as well as to your screenshot buffer.