aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/main.c b/main.c
index b247c04..e65c829 100644
--- a/main.c
+++ b/main.c
@@ -69,18 +69,17 @@ int main(int argc, char** argv) {
glewInit();
init_tri();
+ init_uniforms();
GLuint pass1 = link_shaders(
vert_shader(fill_vert, fill_vert_size),
frag_shader(pass1_frag, pass1_frag_size)
);
- uniforms_t * pass1_uniforms = init_uniforms(pass1, window);
GLuint pass2 = link_shaders(
vert_shader(fill_vert, fill_vert_size),
frag_shader(pass2_frag, pass2_frag_size)
);
- uniforms_t * pass2_uniforms = init_uniforms(pass2, window);
GLuint fbo;
glGenFramebuffers(1, &fbo);
@@ -104,12 +103,12 @@ int main(int argc, char** argv) {
glfwPollEvents();
glUseProgram(pass1);
- update_uniforms(pass1_uniforms);
+ update_uniforms();
glBindFramebuffer(GL_FRAMEBUFFER, fbo);
glDrawArrays(GL_TRIANGLES, 0, 3);
glUseProgram(pass2);
- update_uniforms(pass2_uniforms);
+ update_uniforms();
glBindFramebuffer(GL_FRAMEBUFFER, 0);
glDrawArrays(GL_TRIANGLES, 0, 3);