Added love.graphics.discard, which discards the contents of the screen (or currently active Canvas.)

Using it just after activating a Canvas can improve performance on many mobile devices, if the conditions for using it are right.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2015-02-27 04:51:38 -04:00
parent 1326ae9a5d
commit b52b9c7a2b
4 changed files with 60 additions and 17 deletions
@@ -42,6 +42,7 @@ namespace opengl
int w_reset(lua_State *L);
int w_clear(lua_State *L);
int w_discard(lua_State *L);
int w_present(lua_State *L);
int w_isCreated(lua_State *L);
int w_isActive(lua_State *L);