From 00ff773ea10dba1fd4c1a2bb09c1ec811a798af3 Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Sun, 15 Sep 2019 14:21:43 +0200 Subject: WIP: utils.c for factoring opengl tedious tasks, switch to OpenGL 3.3 For now, it display nothing, shaders changed without updating client code. --- src/utils.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/utils.h (limited to 'src/utils.h') diff --git a/src/utils.h b/src/utils.h new file mode 100644 index 0000000..586e152 --- /dev/null +++ b/src/utils.h @@ -0,0 +1,13 @@ +#ifndef UTILS_H_INCLUDED +#define UTILS_H_INCLUDED + +#include "main.h" + +typedef float t_mat4x4[16]; +void gl_mat4x4_ortho(t_mat4x4 out, float left, float right, float bottom, float top, float znear, float zfar); + +const GLchar* gl_shaderfile_read(const char* path, Sint64 *out_fsize); +void gl_trace_shader_or_program_log(GLuint object); +GLint gl_compile_shader_from_file(GLuint shader, const char* path); + +#endif -- cgit v1.2.3