Commits

Alex Szpakowski  committed 8a9e57c

Removed love.graphics.newStencil (issue #569)

  • Participants
  • Parent commits fc6adf7

Comments (0)

Files changed (2)

File src/modules/graphics/opengl/wrap_Graphics.cpp

 	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)
 {
-	// no argument -> clear mask
+	// no argument -> clear stencil
 	if (lua_isnoneornil(L, 1))
 	{
 		instance->discardStencil();
 	luaL_checktype(L, 1, LUA_TFUNCTION);
 
 	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);
 
 	return 0;
 	{ "setScissor", w_setScissor },
 	{ "getScissor", w_getScissor },
 
-	{ "newStencil", w_newStencil },
 	{ "setStencil", w_setStencil },
 	{ "setInvertedStencil", w_setInvertedStencil },
 

File src/modules/graphics/opengl/wrap_Graphics.h

 int w_isCreated(lua_State *L);
 int w_setScissor(lua_State *L);
 int w_getScissor(lua_State *L);
-int w_newStencil(lua_State *L);
 int w_setStencil(lua_State *L);
 int w_setAlphaTest(lua_State *L);
 int w_getAlphaTest(lua_State *L);