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:
plapins
2016-06-20 16:26:00 +02:00
parent 55b350815e
commit a4f78d3eed
4 changed files with 71 additions and 15 deletions

View File

@@ -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;
};
// ************************************************************ //