diff options
author | sanine-a <sanine.not@pm.me> | 2020-05-24 20:53:24 -0500 |
---|---|---|
committer | sanine-a <sanine.not@pm.me> | 2020-05-24 20:53:24 -0500 |
commit | 2b6ddb0810a60b159501d60dbeaea5fd1b24daa7 (patch) | |
tree | 3b77d52f8526681ffe6c03b1b08f814aff28eaca /include | |
parent | e147d9409ce56f63c1a45199ff262c079bd557a4 (diff) |
add honey_shader_new()
Diffstat (limited to 'include')
-rw-r--r-- | include/shader.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/shader.h b/include/shader.h index 771ea4a..552af5d 100644 --- a/include/shader.h +++ b/include/shader.h @@ -34,6 +34,18 @@ enum honey_shader_result honey_shader_load(honey_shader* shader, char* vertex_shader_path, char* fragment_shader_path); +/** @brief Create a shader from code strings. + * + * @param[out] shader Pointer to the shader destination. + * @param[in] vertex_shader_code Zero-terminated string containing the vertex shader code to compile + * @param[in] fragment_shader_code Zero-terminated string containing the fragment shader code to compile + * + * @return The result of the shader creation. + */ +enum honey_shader_result honey_shader_new(honey_shader* shader, + char* vertex_shader_code, + char* fragment_shader_code); + /** @brief Set an integer uniform. * * @param[in] shader The shader to which the uniform belongs |