mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
Fix issue #294: Canvas not working when not rendering to default render target.
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include <font/Rasterizer.h>
|
||||
|
||||
#include <scripts/graphics.lua.h>
|
||||
#include <cassert>
|
||||
|
||||
namespace love
|
||||
{
|
||||
@@ -168,6 +169,9 @@ namespace opengl
|
||||
|
||||
static int setStencil(lua_State * L, bool invert)
|
||||
{
|
||||
// stencils require the default fb to work properly
|
||||
Canvas::TemporaryUnbinder unbinder;
|
||||
|
||||
// no argument -> clear mask
|
||||
if (lua_isnoneornil(L, 1)) {
|
||||
instance->discardStencil();
|
||||
|
||||
Reference in New Issue
Block a user