diff options
author | Tomasz Kramkowski <tk@the-tk.com> | 2018-05-02 19:35:20 +0100 |
---|---|---|
committer | Tomasz Kramkowski <tk@the-tk.com> | 2018-05-02 19:35:20 +0100 |
commit | 3c1b90a736e3958a9f0545f04b1af7fc00b74b4e (patch) | |
tree | 7e65e1edcbf231710534c7a391e08a24b3cdfb76 /faqe.c | |
parent | 024a3b2dc8c600013b9b76c7f919594d533ba774 (diff) | |
download | faqe-3c1b90a736e3958a9f0545f04b1af7fc00b74b4e.tar.gz faqe-3c1b90a736e3958a9f0545f04b1af7fc00b74b4e.tar.xz faqe-3c1b90a736e3958a9f0545f04b1af7fc00b74b4e.zip |
Improve glprog_load to take sentinel terminated lists
Numerous times a new uniform has been added and the corresponding
increment of the nunis parameter was forgotten causing confusion. This
should not happen anymore.
Diffstat (limited to 'faqe.c')
-rw-r--r-- | faqe.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -75,14 +75,16 @@ int main(int argc, char **argv) fmd_free(&cube_fmd); fclose(cube_file); - prog = glprog_load(2, (struct shdrdat []){ + prog = glprog_load((struct shdrdat []){ { GL_VERTEX_SHADER, vert_glsl.data, vert_glsl.size }, { GL_FRAGMENT_SHADER, frag_glsl.data, frag_glsl.size }, + { 0 }, }, - 3, (struct unidat []){ + (struct unidat []){ { "model", &uni.model }, { "view", &uni.view }, { "proj", &uni.proj }, + { 0 }, }); gl_prog_use(prog); |