wgpu-py icon indicating copy to clipboard operation
wgpu-py copied to clipboard

Using context managers

Open almarklein opened this issue 2 years ago • 0 comments

There's a few places where the API could be made more Pythonic by supporting context managers.

Use-cases:

  • The buffer.map() and buffer.unmap() is pretty obvious.
  • Maybe some part of the command encoders (which have .end()), and/or the queue.

almarklein avatar Oct 23 '23 21:10 almarklein