| 394 | } |
| 395 | |
| 396 | static int Compute_SetSamplers(lua_State* L) |
| 397 | { |
| 398 | DM_LUA_STACK_CHECK(L, 0); |
| 399 | ComputeResource* compute_res = CheckComputeResource(L, 1); |
| 400 | |
| 401 | luaL_checktype(L, 2, LUA_TTABLE); |
| 402 | lua_pushnil(L); |
| 403 | while (lua_next(L, 2) != 0) |
| 404 | { |
| 405 | dmhash_t name_hash = dmScript::CheckHashOrString(L, -2); |
| 406 | SetComputeSampler(L, compute_res, name_hash, lua_gettop(L)); |
| 407 | lua_pop(L, 1); |
| 408 | } |
| 409 | return 0; |
| 410 | } |
| 411 | |
| 412 | /*# sets shader constants in a compute program |
| 413 | * Sets shader constants in a compute program, if the constants exist. |
nothing calls this directly
no test coverage detected