ShaderTool  0.1
Live tool for developing OpenGL shaders interactively
shaders.h
Go to the documentation of this file.
1 #ifndef SHADERS_H
2 #define SHADERS_H
3 
4 #include "renderer.h"
5 
6 int initialize_shaders(struct renderer_state *state, const char *shader_file,
7  const char *buffer_file);
8 int compile_shaders(unsigned int *shader_program,
9  const char *const fragment_shader_file);
10 char *read_file(const char *const filename);
11 
12 #endif /* SHADERS_H */
initialize_shaders
int initialize_shaders(struct renderer_state *state, const char *shader_file, const char *buffer_file)
Initialize shaders and setup inotify if required.
Definition: shaders.c:19
compile_shaders
int compile_shaders(unsigned int *shader_program, const char *const fragment_shader_file)
Compile shaders from source files.
Definition: shaders.c:67
shader_state::filename
const char * filename
Definition: renderer.h:11
renderer_state
Definition: renderer.h:19
read_file
char * read_file(const char *const filename)
Reads a file in a heap-allocated buffer.
Definition: shaders.c:145
renderer.h