natiny.render.clear
natiny.render.clear([r [, g [, b [, a]]]])
Clears the currently bound render target with the specified color.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
r |
number |
0.0 |
Red channel (0.0 – 1.0) |
g |
number |
0.0 |
Green channel (0.0 – 1.0) |
b |
number |
0.0 |
Blue channel (0.0 – 1.0) |
a |
number |
1.0 |
Alpha channel (0.0 – 1.0) |
Example
natiny.render.clear(0.1, 0.1, 0.15, 1.0)
Notes
- In Lua, omitted color components use the defaults shown above.
- The clear value is applied when the current render pass begins. Call it before other draws intended for that pass.