natiny_material_create
NatinyMaterial natiny_material_create(NatinyShader shader);
Builds a material from a shader's reflected constants, textures and vertex layout. Render pipelines are created lazily for the render states and target layouts used when drawing.
Parameters
| Name | Type | Description |
|---|---|---|
shader |
NatinyShader |
Shader handle from natiny_shader_load |
Returns
| Type | Description |
|---|---|
NatinyMaterial |
Material handle, or 0 on failure |
Example
NatinyMaterial material = natiny_material_create(shader);