natiny_script_open_shader

C
void natiny_script_open_shader(NatinyScript script);

Makes the Lua API for shader loading and lifetime available as natiny.shader in the specified state.

Parameters

Name Type Description
script NatinyScript State whose natiny module receives the shader table

Example

C
natiny_script_open_std(script);
natiny_script_open_shader(script);
if (natiny_script_run(script, source) != NATINY_SCRIPT_OK)
    return 1;

Here, source may contain:

Lua
local natiny = require("natiny")
assert(natiny.shader ~= nil)