mirror of
https://github.com/love2d/love.git
synced 2026-08-19 12:14:20 +02:00
vulkan: implement setActive
This commit is contained in:
@@ -125,6 +125,10 @@ namespace love {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Graphics::present(void* screenshotCallbackdata) {
|
void Graphics::present(void* screenshotCallbackdata) {
|
||||||
|
if (!isActive()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
flushBatchedDraws();
|
flushBatchedDraws();
|
||||||
|
|
||||||
endRecordingGraphicsCommands();
|
endRecordingGraphicsCommands();
|
||||||
@@ -301,6 +305,11 @@ namespace love {
|
|||||||
cleanup();
|
cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Graphics::setActive(bool enable) {
|
||||||
|
flushBatchedDraws();
|
||||||
|
active = enable;
|
||||||
|
}
|
||||||
|
|
||||||
void Graphics::setFrontFaceWinding(Winding winding) {
|
void Graphics::setFrontFaceWinding(Winding winding) {
|
||||||
const auto& currentState = states.back();
|
const auto& currentState = states.back();
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ namespace love {
|
|||||||
void setViewportSize(int width, int height, int pixelwidth, int pixelheight) override;
|
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;
|
bool setMode(void* context, int width, int height, int pixelwidth, int pixelheight, bool windowhasstencil, int msaa) override;
|
||||||
void unSetMode() override;
|
void unSetMode() override;
|
||||||
void setActive(bool active) override { }
|
void setActive(bool active) override;
|
||||||
int getRequestedBackbufferMSAA() const override { return 0; }
|
int getRequestedBackbufferMSAA() const override { return 0; }
|
||||||
int getBackbufferMSAA() const override { return 0; }
|
int getBackbufferMSAA() const override { return 0; }
|
||||||
void setColor(Colorf c) override;
|
void setColor(Colorf c) override;
|
||||||
|
|||||||
Reference in New Issue
Block a user