natiny_script_open_render
void natiny_script_open_render(NatinyScript script);
Makes the Lua API for drawing commands and render state available as natiny.render in the
specified state.
Parameters
| Name | Type | Description |
|---|---|---|
script |
NatinyScript |
State whose natiny module receives the render table |
Example
natiny_script_open_std(script);
natiny_script_open_render(script);
if (natiny_script_run(script, source) != NATINY_SCRIPT_OK)
return 1;
Here, source may contain:
local natiny = require("natiny")
assert(natiny.render ~= nil)