disables a texture on the render state * * Disables a texture that has previourly been enabled. * * @name render.disable_texture * @param binding [type:texture|string|hash] texture binding, either by texture unit, string or hash that should be disabled * @examples * * ```lua * function update(self, dt) * render.enable_texture(0, self.my_render_
| 1469 | * ``` |
| 1470 | */ |
| 1471 | int RenderScript_DisableTexture(lua_State* L) |
| 1472 | { |
| 1473 | RenderScriptInstance* i = RenderScriptInstance_Check(L); |
| 1474 | dmhash_t sampler_hash = 0; |
| 1475 | uint32_t unit = 0; |
| 1476 | |
| 1477 | if (lua_isnumber(L, 1)) |
| 1478 | { |
| 1479 | unit = lua_tointeger(L, 1); |
| 1480 | } |
| 1481 | else |
| 1482 | { |
| 1483 | sampler_hash = dmScript::CheckHashOrString(L, 1); |
| 1484 | } |
| 1485 | |
| 1486 | if (InsertCommand(i, Command(COMMAND_TYPE_DISABLE_TEXTURE, sampler_hash, unit))) |
| 1487 | return 0; |
| 1488 | else |
| 1489 | return luaL_error(L, "Command buffer is full (%d).", i->m_CommandBuffer.Capacity()); |
| 1490 | } |
| 1491 | |
| 1492 | /*# retrieve the buffer width from a render target |
| 1493 | * |
nothing calls this directly
no test coverage detected