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, int window_width,
8  int window_height);
9 int compile_shaders(unsigned int *shader_program,
10  const char *const fragment_shader_file);
11 char *read_file(const char *const filename);
12 
13 #endif /* SHADERS_H */
initialize_shaders
int initialize_shaders(struct renderer_state *state, const char *shader_file, const char *buffer_file, int window_width, int window_height)
Initialize shaders, compile them, and create the required texture for the buffer shader.
Definition: shaders.c:22
compile_shaders
int compile_shaders(unsigned int *shader_program, const char *const fragment_shader_file)
Compile shaders from source files.
Definition: shaders.c:100
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:178
renderer.h