mirror of
https://github.com/opus-tango/IntroductionToVulkan.git
synced 2026-03-20 03:55:26 +00:00
Modified rendering framework to support surface size of 0 width and 0 height (this can occur on Windows when window gets minimized). In such situation, swapchain is not created and rendering function is not called. Instead, rendering loop waits for 1/10 of a second.
This commit is contained in:
@@ -58,8 +58,19 @@ namespace ApiWithoutSecrets {
|
||||
virtual bool OnWindowSizeChanged() = 0;
|
||||
virtual bool Draw() = 0;
|
||||
|
||||
virtual bool ReadyToDraw() const final {
|
||||
return CanRender;
|
||||
}
|
||||
|
||||
TutorialBase() :
|
||||
CanRender( false ) {
|
||||
}
|
||||
|
||||
virtual ~TutorialBase() {
|
||||
}
|
||||
|
||||
protected:
|
||||
bool CanRender;
|
||||
};
|
||||
|
||||
// ************************************************************ //
|
||||
|
||||
Reference in New Issue
Block a user