cf_make_shader_from_bytecode¶
Category: graphics
GitHub: cute_graphics.h
Creates a shader from SPIR-V bytecode.
CF_Shader cf_make_shader_from_bytecode(CF_ShaderBytecode vertex_bytecode, CF_ShaderBytecode fragment_bytecode);
Parameters | Description |
---|---|
vertex_bytecode | A bytecode blob from cf_compile_shader_to_bytecode or the cute-shaderc compiler for the vertex shader. |
fragment_bytecode | A bytecode blob from cf_compile_shader_to_bytecode or the cute-shaderc compiler for the fragment shader. |
Remarks¶
This function is good for precompiling shaders from bytecode, which can help speed up app startup times. SPIR-V blobs can be saved straight to disk and shipped with your game. Create the bytecode blob with cf_make_shader_from_bytecode.