forked from mremallin/christmas_tree
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shader.h
48 lines (40 loc) · 917 Bytes
/
shader.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* Christmas Tree - Brought to you by SDL2 and OpenGL
* Inspired by: https://github.com/anvaka/atree#
*
* Mike Mallin, 2019 - 2020
*/
#ifndef __SHADER_H__
#define __SHADER_H__
/**
* Returns the index where the shader's vertex attribute is bound
*/
GLuint
get_vertex_attribute(void);
/**
* Returns the index where the shader's color uniform attribute is bound
*/
GLuint
get_color_uniform_attribute(void);
/**
* Returns the index where the projection matrix is bound
*/
GLuint
get_vertex_uniform_projection(void);
/**
* Returns the index where the modelview matrix is bound
*/
GLuint
get_vertex_uniform_modelview(void);
/**
* Initializes the shader. Loads from disk, compiles, links and uploads to GPU.
* Will exit() in case of failure.
*/
void
initialize_shaders(void);
/**
* De-initializes the shader and frees allocated resources.
*/
void
deinit_shaders(void);
#endif /* __SHADER_H__ */