mirror of
https://github.com/love2d/love.git
synced 2026-08-17 11:00:31 +02:00
Add new variants of love.graphics.clear for controlling how the depth and stencil buffers are cleared.
- Add love.graphics.clear(r, g, b, a [, stencilvalue, depthvalue]). - Add love.graphics.clear(color1, color2, …, [, stencilvalue, depthvalue]). - Add love.graphics.clear(false, stencilvalue, depthvalue). stencilvalue and depthvalue are either true, false, or a number. True is the default behaviour and clears that buffer to the default value (0 for stencil, 1 for depth), false prevents clearing. The third variant listed above only clears the depth and/or stencil buffers and not the color buffer. --HG-- branch : minor
This commit is contained in:
@@ -88,8 +88,8 @@ public:
|
||||
|
||||
void flushStreamDraws() override;
|
||||
|
||||
void clear(Colorf color) override;
|
||||
void clear(const std::vector<OptionalColorf> &colors) override;
|
||||
void clear(OptionalColorf color, OptionalInt stencil, OptionalDouble depth) override;
|
||||
void clear(const std::vector<OptionalColorf> &colors, OptionalInt stencil, OptionalDouble depth) override;
|
||||
|
||||
void discard(const std::vector<bool> &colorbuffers, bool depthstencil) override;
|
||||
|
||||
@@ -109,7 +109,7 @@ public:
|
||||
void setStencilTest(CompareMode compare, int value) override;
|
||||
void setStencilTest() override;
|
||||
|
||||
void clearStencil() override;
|
||||
void clearStencil(int value) override;
|
||||
|
||||
void setColorMask(ColorMask mask) override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user