natiny_shader_destroy
void natiny_shader_destroy(NatinyShader shader);
Destroys a custom shader and frees its GPU resources.
Parameters
| Name | Type | Description |
|---|---|---|
shader |
NatinyShader |
Shader handle from natiny_shader_load |
Example
natiny_shader_destroy(shader);
Notes
- Destroy every material created from this shader first. Those materials keep references to the shader's GPU modules.
- The shader handle becomes invalid. Invalid or already destroyed handles are ignored.