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

Function RenderScriptInstance_index

engine/render/src/render/render_script.cpp:517–533  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

515 }
516
517 static int RenderScriptInstance_index(lua_State *L)
518 {
519 int top = lua_gettop(L);
520 (void) top;
521
522 RenderScriptInstance* i = RenderScriptInstance_Check(L, 1);
523 assert(i);
524
525 // Try to find value in instance data
526 lua_rawgeti(L, LUA_REGISTRYINDEX, i->m_RenderScriptDataReference);
527 lua_pushvalue(L, 2);
528 lua_gettable(L, -2);
529 lua_remove(L, 3);
530
531 assert(top + 1 == lua_gettop(L));
532 return 1;
533 }
534
535 static int RenderScriptInstance_newindex(lua_State *L)
536 {

Callers

nothing calls this directly

Calls 7

lua_gettopFunction · 0.85
lua_rawgetiFunction · 0.85
lua_pushvalueFunction · 0.85
lua_gettableFunction · 0.85
lua_removeFunction · 0.85
assertFunction · 0.50

Tested by

no test coverage detected