MCPcopy Create free account
hub / github.com/9chu/LuaSTGPlus / PushRenderTarget

Method PushRenderTarget

LuaSTGPlus/LuaWrapper.cpp:1405–1416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1403 return 0;
1404 }
1405 static int PushRenderTarget(lua_State* L)LNOEXCEPT
1406 {
1407 ResTexture* p = LRES.FindTexture(luaL_checkstring(L, 1));
1408 if (!p)
1409 return luaL_error(L, "rendertarget '%s' not found.", luaL_checkstring(L, 1));
1410 if (!p->IsRenderTarget())
1411 return luaL_error(L, "'%s' is a texture.", luaL_checkstring(L, 1));
1412
1413 if (!LAPP.PushRenderTarget(p))
1414 return luaL_error(L, "push rendertarget '%s' failed.", luaL_checkstring(L, 1));
1415 return 0;
1416 }
1417 static int PopRenderTarget(lua_State* L)LNOEXCEPT
1418 {
1419 if (!LAPP.PopRenderTarget())

Callers

nothing calls this directly

Calls 2

FindTextureMethod · 0.80
IsRenderTargetMethod · 0.45

Tested by

no test coverage detected