compute-toys / wgpu-compute-toy

Cross-platform compute shader engine
https://compute.toys
MIT License
119 stars 16 forks source link

expose render_to #7

Closed davidar closed 1 year ago

davidar commented 1 year ago

this exposes render_to, and moves the call to present() to render_async instead. this way, render_to can return the SubmissionIndex and non-web targets can use device.poll() to wait for the frame at later time, presenting it then.

my render loop calls render_to on a timer to limit fps and stores the SubmissionIndex until a Wayland frame callback comes in and i need to actually .present().