natiny_shader_load
C
NatinyShader natiny_shader_load(NatinyResource nsl_source);
Compiles an NSL resource containing vertex and fragment stages for the active
graphics backend.
Parameters
| Name |
Type |
Description |
nsl_source |
NatinyResource |
Resource holding the .nsl source |
Returns
| Type |
Description |
NatinyShader |
Shader handle, or 0 when the source does not compile |
Example
C
NatinyShader shader = natiny_shader_load(source);
Notes
- A successfully initialized backend and graphics device are required.
- Compilation or backend rejection prints diagnostics and returns
0.
- The source bytes are consumed during the call; the source resource is not
retained and may be destroyed afterwards.