-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdraw.h
99 lines (98 loc) · 4.4 KB
/
draw.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#ifndef DRAW_HEADER
#define DRAW_HEADER
if(t < t_forestinside)
{
glUseProgram(shader_program_gfx_forestmountains.handle);
glUniform1f(shader_uniform_gfx_forestmountains_iTime, t-t_forestmountains);
glUniform2f(shader_uniform_gfx_forestmountains_iResolution, w, h);
#ifdef MIDI
glUniform1f(shader_uniform_gfx_forestmountains_iFader0, fader0);
glUniform1f(shader_uniform_gfx_forestmountains_iFader1, fader1);
glUniform1f(shader_uniform_gfx_forestmountains_iFader2, fader2);
glUniform1f(shader_uniform_gfx_forestmountains_iFader3, fader3);
glUniform1f(shader_uniform_gfx_forestmountains_iFader4, fader4);
glUniform1f(shader_uniform_gfx_forestmountains_iFader5, fader5);
glUniform1f(shader_uniform_gfx_forestmountains_iFader6, fader6);
glUniform1f(shader_uniform_gfx_forestmountains_iFader7, fader7);
#endif
}
else if(t < t_branch)
{
glUseProgram(shader_program_gfx_forestinside.handle);
glUniform1f(shader_uniform_gfx_forestinside_iTime, t-t_forestinside);
glUniform2f(shader_uniform_gfx_forestinside_iResolution, w, h);
#ifdef MIDI
glUniform1f(shader_uniform_gfx_forestinside_iFader0, fader0);
glUniform1f(shader_uniform_gfx_forestinside_iFader1, fader1);
glUniform1f(shader_uniform_gfx_forestinside_iFader2, fader2);
glUniform1f(shader_uniform_gfx_forestinside_iFader3, fader3);
glUniform1f(shader_uniform_gfx_forestinside_iFader4, fader4);
glUniform1f(shader_uniform_gfx_forestinside_iFader5, fader5);
glUniform1f(shader_uniform_gfx_forestinside_iFader6, fader6);
glUniform1f(shader_uniform_gfx_forestinside_iFader7, fader7);
#endif
}
else if(t < t_mountains)
{
glUseProgram(shader_program_gfx_branch.handle);
glUniform1f(shader_uniform_gfx_branch_iTime, t-t_branch);
glUniform2f(shader_uniform_gfx_branch_iResolution, w, h);
#ifdef MIDI
glUniform1f(shader_uniform_gfx_branch_iFader0, fader0);
glUniform1f(shader_uniform_gfx_branch_iFader1, fader1);
glUniform1f(shader_uniform_gfx_branch_iFader2, fader2);
glUniform1f(shader_uniform_gfx_branch_iFader3, fader3);
glUniform1f(shader_uniform_gfx_branch_iFader4, fader4);
glUniform1f(shader_uniform_gfx_branch_iFader5, fader5);
glUniform1f(shader_uniform_gfx_branch_iFader6, fader6);
glUniform1f(shader_uniform_gfx_branch_iFader7, fader7);
#endif
}
else if(t < t_flowers)
{
glUseProgram(shader_program_gfx_mountains.handle);
glUniform1f(shader_uniform_gfx_mountains_iTime, t-t_mountains);
glUniform2f(shader_uniform_gfx_mountains_iResolution, w, h);
#ifdef MIDI
glUniform1f(shader_uniform_gfx_mountains_iFader0, fader0);
glUniform1f(shader_uniform_gfx_mountains_iFader1, fader1);
glUniform1f(shader_uniform_gfx_mountains_iFader2, fader2);
glUniform1f(shader_uniform_gfx_mountains_iFader3, fader3);
glUniform1f(shader_uniform_gfx_mountains_iFader4, fader4);
glUniform1f(shader_uniform_gfx_mountains_iFader5, fader5);
glUniform1f(shader_uniform_gfx_mountains_iFader6, fader6);
glUniform1f(shader_uniform_gfx_mountains_iFader7, fader7);
#endif
}
else if(t < t_greetings)
{
glUseProgram(shader_program_gfx_flowers.handle);
glUniform1f(shader_uniform_gfx_flowers_iTime, t-t_flowers);
glUniform2f(shader_uniform_gfx_flowers_iResolution, w, h);
#ifdef MIDI
glUniform1f(shader_uniform_gfx_flowers_iFader0, fader0);
glUniform1f(shader_uniform_gfx_flowers_iFader1, fader1);
glUniform1f(shader_uniform_gfx_flowers_iFader2, fader2);
glUniform1f(shader_uniform_gfx_flowers_iFader3, fader3);
glUniform1f(shader_uniform_gfx_flowers_iFader4, fader4);
glUniform1f(shader_uniform_gfx_flowers_iFader5, fader5);
glUniform1f(shader_uniform_gfx_flowers_iFader6, fader6);
glUniform1f(shader_uniform_gfx_flowers_iFader7, fader7);
#endif
}
else {
glUseProgram(shader_program_gfx_greetings.handle);
glUniform1f(shader_uniform_gfx_greetings_iTime, t-t_greetings);
glUniform2f(shader_uniform_gfx_greetings_iResolution, w, h);
#ifdef MIDI
glUniform1f(shader_uniform_gfx_greetings_iFader0, fader0);
glUniform1f(shader_uniform_gfx_greetings_iFader1, fader1);
glUniform1f(shader_uniform_gfx_greetings_iFader2, fader2);
glUniform1f(shader_uniform_gfx_greetings_iFader3, fader3);
glUniform1f(shader_uniform_gfx_greetings_iFader4, fader4);
glUniform1f(shader_uniform_gfx_greetings_iFader5, fader5);
glUniform1f(shader_uniform_gfx_greetings_iFader6, fader6);
glUniform1f(shader_uniform_gfx_greetings_iFader7, fader7);
#endif
}
#endif