vulkan: implement setActive

This commit is contained in:
niki
2022-07-16 23:27:54 +02:00
parent 9b7cfef5ef
commit 913aab0226
2 changed files with 10 additions and 1 deletions
+9
View File
@@ -125,6 +125,10 @@ namespace love {
}
void Graphics::present(void* screenshotCallbackdata) {
if (!isActive()) {
return;
}
flushBatchedDraws();
endRecordingGraphicsCommands();
@@ -301,6 +305,11 @@ namespace love {
cleanup();
}
void Graphics::setActive(bool enable) {
flushBatchedDraws();
active = enable;
}
void Graphics::setFrontFaceWinding(Winding winding) {
const auto& currentState = states.back();
+1 -1
View File
@@ -97,7 +97,7 @@ namespace love {
void setViewportSize(int width, int height, int pixelwidth, int pixelheight) override;
bool setMode(void* context, int width, int height, int pixelwidth, int pixelheight, bool windowhasstencil, int msaa) override;
void unSetMode() override;
void setActive(bool active) override { }
void setActive(bool active) override;
int getRequestedBackbufferMSAA() const override { return 0; }
int getBackbufferMSAA() const override { return 0; }
void setColor(Colorf c) override;