From 4329c4e47c43dd34a106b5c8158f06728780629a Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Tue, 27 Mar 2018 18:51:07 +0100 Subject: glprog: Wrap OpenGL program object loading glprog provides a simple interface to loadign OpenGL program objects and getting their uniform locations. --- glprog.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 glprog.h (limited to 'glprog.h') 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 + * 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 -- cgit v1.2.3-54-g00ecf