attackgoat / screen-13

Screen 13 is an easy-to-use Vulkan rendering engine in the spirit of QBasic.
Apache License 2.0
264 stars 13 forks source link

Fix for accessing destroyed swapchain #36

Closed attackgoat closed 2 years ago

attackgoat commented 2 years ago

Fixes #35

The swapchain handle was kept after destroy, and later used as part of the recreate function.

TODO:

attackgoat commented 2 years ago

At least for now, events will be cleared and not delivered while minimized on the Windows platform. Other platforms may continue to provide frame callbacks and render things, depending on their implementation.

I'm okay with this weird behavior because more advanced programs can always create their own event loop implementation that handles things the way they prefer. This way works "for most people".

heavyrain266 commented 2 years ago

Seems to be working fine for me. Also just realised that I will need custom event loop for ECS comatibility and in the future also for switch through nintendo's subsdk...

attackgoat commented 2 years ago

kajiya and sierra seem to just unwrap the exception and panic; so this is definitely common in other engines but it's not a similar bug that could be solved in the same way as this PR.