summaryrefslogtreecommitdiff
path: root/include/shader.h
diff options
context:
space:
mode:
authorsanine-a <sanine.not@pm.me>2020-05-24 20:53:24 -0500
committersanine-a <sanine.not@pm.me>2020-05-24 20:53:24 -0500
commit2b6ddb0810a60b159501d60dbeaea5fd1b24daa7 (patch)
tree3b77d52f8526681ffe6c03b1b08f814aff28eaca /include/shader.h
parente147d9409ce56f63c1a45199ff262c079bd557a4 (diff)
add honey_shader_new()
Diffstat (limited to 'include/shader.h')
-rw-r--r--include/shader.h12
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