From 2b6ddb0810a60b159501d60dbeaea5fd1b24daa7 Mon Sep 17 00:00:00 2001 From: sanine-a Date: Sun, 24 May 2020 20:53:24 -0500 Subject: add honey_shader_new() --- include/shader.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include') 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 -- cgit v1.2.1