| 998 | return 0; |
| 999 | } |
| 1000 | static int CreateRenderTarget(lua_State* L)LNOEXCEPT |
| 1001 | { |
| 1002 | const char* name = luaL_checkstring(L, 1); |
| 1003 | |
| 1004 | ResourcePool* pActivedPool = LRES.GetActivedPool(); |
| 1005 | if (!pActivedPool) |
| 1006 | return luaL_error(L, "can't load resource at this time."); |
| 1007 | |
| 1008 | if (!pActivedPool->CreateRenderTarget(name)) |
| 1009 | return luaL_error(L, "can't create render target with name '%s'.", name); |
| 1010 | return 0; |
| 1011 | } |
| 1012 | static int IsRenderTarget(lua_State* L)LNOEXCEPT |
| 1013 | { |
| 1014 | ResTexture* p = LRES.FindTexture(luaL_checkstring(L, 1)); |
no test coverage detected