diff options
author | Tomasz Kramkowski <tk@the-tk.com> | 2018-03-27 18:51:07 +0100 |
---|---|---|
committer | Tomasz Kramkowski <tk@the-tk.com> | 2018-03-27 19:21:34 +0100 |
commit | 4329c4e47c43dd34a106b5c8158f06728780629a (patch) | |
tree | 8ede3a5a46773730f9ad88ae201badb3636e4214 /glprog.h | |
parent | 126c248cf55d10c1584f9bb340144b42ae57e847 (diff) | |
download | faqe-4329c4e47c43dd34a106b5c8158f06728780629a.tar.gz faqe-4329c4e47c43dd34a106b5c8158f06728780629a.tar.xz faqe-4329c4e47c43dd34a106b5c8158f06728780629a.zip |
glprog: Wrap OpenGL program object loading
glprog provides a simple interface to loadign OpenGL program objects
and getting their uniform locations.
Diffstat (limited to 'glprog.h')
-rw-r--r-- | glprog.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/glprog.h b/glprog.h new file mode 100644 index 0000000..1f540a9 --- /dev/null +++ b/glprog.h @@ -0,0 +1,23 @@ +/* + * Copyright (C) 2018 Tomasz Kramkowski <tk@the-tk.com> + * SPDX-License-Identifier: MIT + */ +#ifndef GLPROG_H +#define GLPROG_H + +#include "gldefs.h" + +struct unidat { + const char *name; + GLint *loc; +}; + +struct shdrdat { + GLuint type; + const char *src; + GLint len; +}; + +GLuint glprog_load(int nshdrs, const struct shdrdat *shdrs, int nunis, const struct unidat *unis); + +#endif // SHADER_H |