mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user