Skip to content

Commit

Permalink
Fix rendering via bitmap adapter (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
almarklein authored Dec 10, 2024
1 parent a6d7c02 commit f7cc8cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rendercanvas/utils/bitmappresentadapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ def present_bitmap(self, bitmap):
self._texture_helper.set_texture_data(bitmap)

if not self._context_is_configured:
self._context.configure(device=self._device, format="rgba8unorm")
format = self._context.get_preferred_format(self._device.adapter)
self._context.configure(device=self._device, format=format)

target = self._context.get_current_texture().create_view()
command_encoder = self._device.create_command_encoder()
Expand Down

0 comments on commit f7cc8cc

Please sign in to comment.