summaryrefslogtreecommitdiff
path: root/include/shader.h
diff options
context:
space:
mode:
authorsanine-a <sanine.not@pm.me>2020-06-01 13:22:08 -0500
committersanine-a <sanine.not@pm.me>2020-06-01 13:22:08 -0500
commitea197a4459f3dc8ad885e5134e6358173650901f (patch)
treeca2749291fc3e60697413764615588b68834d0c4 /include/shader.h
parent2b6ddb0810a60b159501d60dbeaea5fd1b24daa7 (diff)
refactor: unify error handling
Diffstat (limited to 'include/shader.h')
-rw-r--r--include/shader.h23
1 files changed, 6 insertions, 17 deletions
diff --git a/include/shader.h b/include/shader.h
index 552af5d..9a567f5 100644
--- a/include/shader.h
+++ b/include/shader.h
@@ -8,17 +8,6 @@
#include "common.h"
-enum honey_shader_result {
- SHADER_OK,
- VERTEX_SHADER_NOT_FOUND,
- VERTEX_SHADER_TOO_LARGE,
- VERTEX_SHADER_FAILED,
- FRAGMENT_SHADER_NOT_FOUND,
- FRAGMENT_SHADER_TOO_LARGE,
- FRAGMENT_SHADER_FAILED,
- SHADER_LINK_FAILED,
- N_SHADER_STATES };
-
typedef int honey_shader;
/** @brief Load a shader.
@@ -30,9 +19,9 @@ typedef int honey_shader;
*
* @return The result of the shader load.
*/
-enum honey_shader_result honey_shader_load(honey_shader* shader,
- char* vertex_shader_path,
- char* fragment_shader_path);
+honey_error honey_shader_load(honey_shader* shader,
+ char* vertex_shader_path,
+ char* fragment_shader_path);
/** @brief Create a shader from code strings.
*
@@ -42,9 +31,9 @@ enum honey_shader_result honey_shader_load(honey_shader* shader,
*
* @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);
+honey_error honey_shader_new(honey_shader* shader,
+ char* vertex_shader_code,
+ char* fragment_shader_code);
/** @brief Set an integer uniform.
*