projects
/
gl4
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d84a0f
)
accidentally linked twice, removed second link_program
author
Eleni Maria Stea
<estea@igalia.com>
Thu, 8 Mar 2018 09:00:58 +0000
(11:00 +0200)
committer
Eleni Maria Stea
<estea@igalia.com>
Thu, 8 Mar 2018 09:01:59 +0000
(11:01 +0200)
delete ubo at cleanup
main.c
patch
|
blob
|
history
diff --git
a/main.c
b/main.c
index
0c956e2
..
de73cdc
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-130,11
+130,6
@@
int init(void)
}
#endif
- if(link_program(sdr) == -1) {
- fprintf(stderr, "failed to bind attribute locations\n");
- return -1;
- }
-
glUseProgram(sdr);
glGenBuffers(1, &ubo_matrix);
@@
-156,6
+151,7
@@
void cleanup(void)
glDeleteVertexArrays(1, &torus.vao);
}
glDeleteTextures(1, &tex);
+ glDeleteBuffers(1, &ubo_matrix);
}
void display(void)
@@
-475,6
+471,10
@@
unsigned int load_program(const char *vfname, const char *pfname)
glDeleteProgram(prog);
return 0;
}
+
+ glDetachShader(prog, vs);
+ glDetachShader(prog, ps);
+
return prog;
}