| 492 | } |
| 493 | |
| 494 | static int Compute_SetConstants(lua_State* L) |
| 495 | { |
| 496 | DM_LUA_STACK_CHECK(L, 0); |
| 497 | ComputeResource* compute_res = CheckComputeResource(L, 1); |
| 498 | |
| 499 | luaL_checktype(L, 2, LUA_TTABLE); |
| 500 | lua_pushnil(L); |
| 501 | while (lua_next(L, 2) != 0) |
| 502 | { |
| 503 | dmhash_t name_hash = dmScript::CheckHashOrString(L, -2); |
| 504 | SetComputeConstant(L, compute_res, name_hash, lua_gettop(L)); |
| 505 | lua_pop(L, 1); |
| 506 | } |
| 507 | return 0; |
| 508 | } |
| 509 | |
| 510 | /*# sets textures in a compute program |
| 511 | * Sets textures in a compute program, if the samplers exist. |
nothing calls this directly
no test coverage detected