When multiple canvases are active at once (MRT), individual canvases can now be selectively cleared with love.graphics.clear(c1, c2, ...) by passing empty tables for the canvases that shouldn't be cleared, and color tables for the canvases that should.

This commit is contained in:
Alex Szpakowski
2015-12-29 00:10:40 -04:00
parent b56a0cfc3d
commit 09e6a9a434
3 changed files with 44 additions and 20 deletions
+7 -1
View File
@@ -62,6 +62,12 @@ class Graphics : public love::graphics::Graphics
{
public:
struct OptionalColorf
{
float r, g, b, a;
bool enabled;
};
Graphics();
virtual ~Graphics();
@@ -92,7 +98,7 @@ public:
/**
* Clears each active canvas to a different color.
**/
void clear(const std::vector<Colorf> &colors);
void clear(const std::vector<OptionalColorf> &colors);
/**
* Discards the contents of the screen.