MCPcopy Create free account
hub / github.com/defold/defold / Compute_SetTextures

Function Compute_SetTextures

engine/gamesys/src/gamesys/scripts/script_compute.cpp:588–602  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

586 }
587
588 static int Compute_SetTextures(lua_State* L)
589 {
590 DM_LUA_STACK_CHECK(L, 0);
591 ComputeResource* compute_res = CheckComputeResource(L, 1);
592
593 luaL_checktype(L, 2, LUA_TTABLE);
594 lua_pushnil(L);
595 while (lua_next(L, 2) != 0)
596 {
597 dmhash_t name_hash = dmScript::CheckHashOrString(L, -2);
598 SetComputeTexture(L, compute_res, name_hash, lua_gettop(L));
599 lua_pop(L, 1);
600 }
601 return 0;
602 }
603
604 static const luaL_reg ScriptCompute_methods[] =
605 {

Callers

nothing calls this directly

Calls 7

CheckComputeResourceFunction · 0.85
luaL_checktypeFunction · 0.85
lua_pushnilFunction · 0.85
lua_nextFunction · 0.85
CheckHashOrStringFunction · 0.85
SetComputeTextureFunction · 0.85
lua_gettopFunction · 0.85

Tested by

no test coverage detected