mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
Removed love.graphics.newStencil (issue #569)
This commit is contained in:
@@ -238,17 +238,9 @@ int w_getScissor(lua_State *L)
|
|||||||
return instance->getScissor(L);
|
return instance->getScissor(L);
|
||||||
}
|
}
|
||||||
|
|
||||||
int w_newStencil(lua_State *L)
|
|
||||||
{
|
|
||||||
// just return the function
|
|
||||||
luaL_checktype(L, 1, LUA_TFUNCTION);
|
|
||||||
lua_settop(L, 1);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int setStencil(lua_State *L, bool invert)
|
static int setStencil(lua_State *L, bool invert)
|
||||||
{
|
{
|
||||||
// no argument -> clear mask
|
// no argument -> clear stencil
|
||||||
if (lua_isnoneornil(L, 1))
|
if (lua_isnoneornil(L, 1))
|
||||||
{
|
{
|
||||||
instance->discardStencil();
|
instance->discardStencil();
|
||||||
@@ -258,7 +250,7 @@ static int setStencil(lua_State *L, bool invert)
|
|||||||
luaL_checktype(L, 1, LUA_TFUNCTION);
|
luaL_checktype(L, 1, LUA_TFUNCTION);
|
||||||
|
|
||||||
instance->defineStencil();
|
instance->defineStencil();
|
||||||
lua_call(L, lua_gettop(L) - 1, 0); // call mask(...)
|
lua_call(L, lua_gettop(L) - 1, 0); // call stencil(...)
|
||||||
instance->useStencil(invert);
|
instance->useStencil(invert);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -1677,7 +1669,6 @@ static const luaL_Reg functions[] =
|
|||||||
{ "setScissor", w_setScissor },
|
{ "setScissor", w_setScissor },
|
||||||
{ "getScissor", w_getScissor },
|
{ "getScissor", w_getScissor },
|
||||||
|
|
||||||
{ "newStencil", w_newStencil },
|
|
||||||
{ "setStencil", w_setStencil },
|
{ "setStencil", w_setStencil },
|
||||||
{ "setInvertedStencil", w_setInvertedStencil },
|
{ "setInvertedStencil", w_setInvertedStencil },
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,6 @@ int w_getDimensions(lua_State *L);
|
|||||||
int w_isCreated(lua_State *L);
|
int w_isCreated(lua_State *L);
|
||||||
int w_setScissor(lua_State *L);
|
int w_setScissor(lua_State *L);
|
||||||
int w_getScissor(lua_State *L);
|
int w_getScissor(lua_State *L);
|
||||||
int w_newStencil(lua_State *L);
|
|
||||||
int w_setStencil(lua_State *L);
|
int w_setStencil(lua_State *L);
|
||||||
int w_setAlphaTest(lua_State *L);
|
int w_setAlphaTest(lua_State *L);
|
||||||
int w_getAlphaTest(lua_State *L);
|
int w_getAlphaTest(lua_State *L);
|
||||||
|
|||||||
Reference in New Issue
Block a user