From 83b3fe86b1c13f40a6be4580b4079980030a54a7 Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Fri, 30 Mar 2018 15:35:05 +0100 Subject: Simplify gl loading by removing m4 and merging gldefs.h m4 has been removed, loadgl.c.in is now gl.c, gldefs.h and loadgl.h.in have now been merged into gl.h. loadgl.m4 has been transformed into glfunc.h which is being used in the way of a bie index file to generate information at 3 places. lgl_load is now gl_load and doesn't return anything, the jongjmp.h method of error handling was pre-emptive and for now this much simpler system will suffice. This means that lgl_strerror is no longer neede. --- Makefile | 6 +--- gl.c | 46 +++++++++++++++++++++++++++++++ gl.h | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++ gldefs.h | 63 ------------------------------------------ glfunc.h | 44 ++++++++++++++++++++++++++++++ glprog.c | 2 +- glprog.h | 2 +- gltest.c | 8 ++---- loadgl.c.in | 64 ------------------------------------------- loadgl.h.in | 28 ------------------- loadgl.m4 | 91 ------------------------------------------------------------- 11 files changed, 170 insertions(+), 259 deletions(-) create mode 100644 gl.c create mode 100644 gl.h delete mode 100644 gldefs.h create mode 100644 glfunc.h delete mode 100644 loadgl.c.in delete mode 100644 loadgl.h.in delete mode 100644 loadgl.m4 diff --git a/Makefile b/Makefile index 8681e8b..6810635 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ CFLAGS += $(shell $(PKG_CONFIG) --cflags $(LIBS)) -std=c11 -MMD -MP LDFLAGS += -Wl,--as-needed LDLIBS += $(shell $(PKG_CONFIG) --libs $(LIBS)) -lm -OBJ := gltest.o loadgl.o eprintf.o glprog.o +OBJ := gltest.o gl.o eprintf.o glprog.o all: $(PROG) @@ -23,10 +23,6 @@ include $(EPRINTF_PATH)/module.mk $(PROG): $(OBJ) gltest.o: assets.h -loadgl.o gltest.o glprog.o: loadgl.h -loadgl.c loadgl.h: loadgl.%: loadgl.m4 loadgl.%.in - m4 $^ >$@ -CLEAN += loadgl.c loadgl.h deplinks: $(EPRINTF_FILES) diff --git a/gl.c b/gl.c new file mode 100644 index 0000000..8e84e16 --- /dev/null +++ b/gl.c @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2018 Tomasz Kramkowski + * SPDX-License-Identifier: MIT + */ + +#include "eprintf.h" +#include "gl.h" + +#define GL_FUNC(glname, rtype, name, ...) name##_func *name; +#include "glfunc.h" +#undef GL_FUNC + +static void *load_func(const char *name, gl_loadfunc *load) +{ + void *ret; + + ret = load(name); + if (ret == NULL) + eprintf("Could not load OpenGL function: %s\n", name); + + return ret; +} + +void gl_load(gl_loadfunc *load) +{ +#define GL_FUNC(glname, rtype, name, ...) \ + name = (name##_func *)load_func(#glname, load); +#include "glfunc.h" +#undef GL_FUNC +} + +const char *gl_strerror(GLenum error) +{ + switch (error) { + case GL_NO_ERROR: return "No error"; + case GL_INVALID_ENUM: return "Invalid enumeration"; + case GL_INVALID_VALUE: return "Invalid value"; + case GL_INVALID_OPERATION: return "Invalid operation"; + case GL_STACK_OVERFLOW: return "Stack overflow"; + case GL_STACK_UNDERFLOW: return "Stack underflow"; + case GL_OUT_OF_MEMORY: return "Out of memory"; + case GL_INVALID_FRAMEBUFFER_OPERATION: return "Invalid framebuffer operation"; + case GL_CONTEXT_LOST: return "Context lost"; + } + return "Unknown"; +} diff --git a/gl.h b/gl.h new file mode 100644 index 0000000..30e7862 --- /dev/null +++ b/gl.h @@ -0,0 +1,75 @@ +/* + * Copyright (C) 2018 Tomasz Kramkowski + * SPDX-License-Identifier: MIT + */ +#ifndef GL_H +#define GL_H + +#include +#include + +typedef uint8_t GLboolean; +typedef int8_t GLbyte; +typedef uint8_t GLubyte; +typedef char GLchar; +typedef int16_t GLshort; +typedef uint16_t GLushort; +typedef int32_t GLint; +typedef uint32_t GLuint; +typedef int32_t GLfixed; +typedef int64_t GLint64; +typedef uint64_t GLuint64; +typedef int32_t GLsizei; +typedef int32_t GLenum; +typedef ptrdiff_t GLintptr; +typedef ptrdiff_t GLsizeiptr; +typedef struct gl_sync *GLsync; +typedef uint32_t GLbitfield; +typedef uint16_t GLhalf; +typedef float GLfloat; +typedef float GLclampf; +typedef double GLdouble; +typedef double GLclampd; + +enum { + GL_NO_ERROR = 0, + GL_FALSE = 0, + GL_TRUE = 1, + GL_TRIANGLES = 0x0004, + GL_FRONT_AND_BACK = 0x0408, + GL_INVALID_ENUM = 0x0500, + GL_INVALID_VALUE = 0x0501, + GL_INVALID_OPERATION = 0x0502, + GL_STACK_OVERFLOW = 0x0503, + GL_STACK_UNDERFLOW = 0x0504, + GL_OUT_OF_MEMORY = 0x0505, + GL_INVALID_FRAMEBUFFER_OPERATION = 0x0506, + GL_CONTEXT_LOST = 0x0507, + GL_UNSIGNED_INT = 0x1405, + GL_FLOAT = 0x1406, + GL_LINE = 0x1B01, + GL_COLOR_BUFFER_BIT = 0x4000, + GL_ARRAY_BUFFER = 0x8892, + GL_ELEMENT_ARRAY_BUFFER = 0x8893, + GL_STREAM_DRAW = 0x88e0, + GL_STATIC_DRAW = 0x88e4, + GL_DYNAMIC_DRAW = 0x88e8, + GL_FRAGMENT_SHADER = 0x8b30, + GL_VERTEX_SHADER = 0x8b31, + GL_COMPILE_STATUS = 0x8b81, + GL_LINK_STATUS = 0x8b82, +}; + +typedef void *gl_loadfunc(const char *name); +void gl_load(gl_loadfunc *load); +const char *gl_strerror(GLenum error); + +#define _GL_FUNC(rtype, name, type, ...) \ + typedef rtype type(__VA_ARGS__); \ + extern type *name; +#define GL_FUNC(glname, rtype, name, ...) _GL_FUNC(rtype, name, name##_func, __VA_ARGS__) +#include "glfunc.h" +#undef GL_FUNC +#undef _GL_FUNC + +#endif // GL_H diff --git a/gldefs.h b/gldefs.h deleted file mode 100644 index f1bf79f..0000000 --- a/gldefs.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2018 Tomasz Kramkowski - * SPDX-License-Identifier: MIT - */ -#ifndef GLDEFS_H -#define GLDEFS_H - -#include -#include - -typedef uint8_t GLboolean; -typedef int8_t GLbyte; -typedef uint8_t GLubyte; -typedef char GLchar; -typedef int16_t GLshort; -typedef uint16_t GLushort; -typedef int32_t GLint; -typedef uint32_t GLuint; -typedef int32_t GLfixed; -typedef int64_t GLint64; -typedef uint64_t GLuint64; -typedef int32_t GLsizei; -typedef int32_t GLenum; -typedef ptrdiff_t GLintptr; -typedef ptrdiff_t GLsizeiptr; -typedef struct gl_sync *GLsync; -typedef uint32_t GLbitfield; -typedef uint16_t GLhalf; -typedef float GLfloat; -typedef float GLclampf; -typedef double GLdouble; -typedef double GLclampd; - -enum { - GL_NO_ERROR = 0, - GL_FALSE = 0, - GL_TRUE = 1, - GL_TRIANGLES = 0x0004, - GL_FRONT_AND_BACK = 0x0408, - GL_INVALID_ENUM = 0x0500, - GL_INVALID_VALUE = 0x0501, - GL_INVALID_OPERATION = 0x0502, - GL_STACK_OVERFLOW = 0x0503, - GL_STACK_UNDERFLOW = 0x0504, - GL_OUT_OF_MEMORY = 0x0505, - GL_INVALID_FRAMEBUFFER_OPERATION = 0x0506, - GL_CONTEXT_LOST = 0x0507, - GL_UNSIGNED_INT = 0x1405, - GL_FLOAT = 0x1406, - GL_LINE = 0x1B01, - GL_COLOR_BUFFER_BIT = 0x4000, - GL_ARRAY_BUFFER = 0x8892, - GL_ELEMENT_ARRAY_BUFFER = 0x8893, - GL_STREAM_DRAW = 0x88e0, - GL_STATIC_DRAW = 0x88e4, - GL_DYNAMIC_DRAW = 0x88e8, - GL_FRAGMENT_SHADER = 0x8b30, - GL_VERTEX_SHADER = 0x8b31, - GL_COMPILE_STATUS = 0x8b81, - GL_LINK_STATUS = 0x8b82, -}; - -#endif // GLDEFS_H diff --git a/glfunc.h b/glfunc.h new file mode 100644 index 0000000..22a0021 --- /dev/null +++ b/glfunc.h @@ -0,0 +1,44 @@ +// Copyright (C) Tomasz Kramkowski +// SPDX-License-Identifier: MIT + +GL_FUNC(glGetError, GLenum, gl_error, void) +GL_FUNC(glViewport, void, gl_viewport, GLint x, GLint y, GLsizei width, GLsizei height) +GL_FUNC(glClearColor, void, gl_clearcolor, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) +GL_FUNC(glClear, void, gl_clear, GLbitfield mask) +GL_FUNC(glGenBuffers, void, gl_buf_gen, GLsizei n, GLuint *buffers) +GL_FUNC(glBindBuffer, void, gl_buf_bind, GLenum target, GLuint buffer) +GL_FUNC(glBufferData, void, gl_buf_data, GLenum target, GLsizeiptr size, const void *data, GLenum usage) +GL_FUNC(glCreateShader, GLuint, gl_shdr_create, GLenum type) +GL_FUNC(glDeleteShader, void, gl_shdr_del, GLuint shader) +GL_FUNC(glShaderSource, void, gl_shdr_source, GLuint shader, GLsizei count, const char * const *string, const GLint *length) +GL_FUNC(glCompileShader, void, gl_shdr_compile, GLuint shader) +GL_FUNC(glGetShaderiv, void, gl_shdr_param, GLuint shader, GLenum pname, GLint *params) +GL_FUNC(glGetShaderInfoLog, void, gl_shdr_infolog, GLuint shader, GLsizei size, GLsizei *len, char *data) +GL_FUNC(glCreateProgram, GLuint, gl_prog_create, void) +GL_FUNC(glDeleteProgram, void, gl_prog_del, GLuint program) +GL_FUNC(glAttachShader, void, gl_prog_attachshdr, GLuint program, GLuint shader) +GL_FUNC(glDetachShader, void, gl_prog_detachshdr, GLuint program, GLuint shader) +GL_FUNC(glGetAttachedShaders, void, gl_prog_getshdrs, GLuint program, GLsizei max, GLsizei *count, GLuint *shaders) +GL_FUNC(glLinkProgram, void, gl_prog_link, GLuint program) +GL_FUNC(glUseProgram, void, gl_prog_use, GLuint program) +GL_FUNC(glGetProgramiv, void, gl_prog_param, GLuint prog, GLenum pname, GLint *params) +GL_FUNC(glGetProgramInfoLog, void, gl_prog_infolog, GLuint prog, GLsizei size, GLsizei *len, char *data) +GL_FUNC(glVertexAttribPointer, void, gl_va_define, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *data) +GL_FUNC(glEnableVertexAttribArray, void, gl_va_enable, GLuint index) +GL_FUNC(glDisableVertexAttribArray, void, gl_va_disable, GLuint index) +GL_FUNC(glGenVertexArrays, void, gl_va_gen, GLsizei n, GLuint *arrays) +GL_FUNC(glBindVertexArray, void, gl_va_bind, GLuint va) +GL_FUNC(glDrawArrays, void, gl_draw_arrays, GLenum mode, GLint first, GLsizei count) +GL_FUNC(glDrawElements, void, gl_draw_elems, GLenum mode, GLsizei count, GLenum type, const void *indices) +GL_FUNC(glPolygonMode, void, gl_poly_mode, GLenum face, GLenum mode) +GL_FUNC(glGetUniformLocation, GLint, gl_uni_loc, GLuint program, const char *name); +GL_FUNC(glGetUniformfv, void, gl_uni_getf, GLuint program, GLint location, GLfloat *params); +GL_FUNC(glGetUniformiv, void, gl_uni_geti, GLuint program, GLint location, GLint *params); +GL_FUNC(glUniform1i, void, gl_uni_set1i, GLint location, GLint v0) +GL_FUNC(glUniform1f, void, gl_uni_set1f, GLint location, GLfloat v0) +GL_FUNC(glUniform3f, void, gl_uni_set3f, GLint location, GLfloat v0, GLfloat v1, GLfloat v2) +GL_FUNC(glUniform4f, void, gl_uni_set4f, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) +GL_FUNC(glUniform3fv, void, gl_uni_set3fv, GLint location, GLsizei count, const GLfloat *value) +GL_FUNC(glUniform4fv, void, gl_uni_set4fv, GLint location, GLsizei count, const GLfloat *value) +GL_FUNC(glUniformMatrix3fv, void, gl_uni_setm3fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) +GL_FUNC(glUniformMatrix4fv, void, gl_uni_setm4fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) diff --git a/glprog.c b/glprog.c index 84f2bab..19e0d44 100644 --- a/glprog.c +++ b/glprog.c @@ -5,8 +5,8 @@ #include #include "eprintf.h" +#include "gl.h" #include "glprog.h" -#include "loadgl.h" enum { LOGSIZE = 1024, diff --git a/glprog.h b/glprog.h index 1f540a9..a81f6d6 100644 --- a/glprog.h +++ b/glprog.h @@ -5,7 +5,7 @@ #ifndef GLPROG_H #define GLPROG_H -#include "gldefs.h" +#include "gl.h" struct unidat { const char *name; diff --git a/gltest.c b/gltest.c index 335b4af..394162c 100644 --- a/gltest.c +++ b/gltest.c @@ -7,10 +7,9 @@ #include "assets.h" #include "eprintf.h" -#include "gldefs.h" +#include "gl.h" #include "glprog.h" #include "linmath.h" -#include "loadgl.h" #include "nelem.h" enum { @@ -33,7 +32,6 @@ void take_input(GLFWwindow *win) int main(int argc, char **argv) { GLFWwindow *win; - int ret; GLuint ebo, vbo, vao, prog; GLint ucolor; struct vertex { @@ -64,9 +62,7 @@ int main(int argc, char **argv) eprintf("Failed to create GLFW window"); glfwMakeContextCurrent(win); - ret = lgl_load((lgl_loadfunc *)glfwGetProcAddress); - if (ret != 0) - eprintf("Failed to load GL: %s", lgl_strerror(ret)); + gl_load((gl_loadfunc *)glfwGetProcAddress); glfwSetFramebufferSizeCallback(win, &fb_size_cb); fb_size_cb(win, WIDTH, HEIGHT); diff --git a/loadgl.c.in b/loadgl.c.in deleted file mode 100644 index 1959b64..0000000 --- a/loadgl.c.in +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2018 Tomasz Kramkowski - * SPDX-License-Identifier: MIT - */ -#include - -#include "loadgl.h" - -#define LGL_FUNC(name, glname) \ - name##_func *name; \ - static const char *name##_gln = #glname; - -FUNCS()dnl - -static void *load_func(const char *name, lgl_loadfunc *load, jmp_buf env) -{ - void *ret; - - ret = load(name); - if (ret == NULL) - longjmp(env, LGL_MISSING); - - return ret; -} - -enum lgl_status lgl_load(lgl_loadfunc *load) -{ - enum lgl_status status; - jmp_buf env; - - status = setjmp(env); - if (status != 0) - return status; - -#define LGL_LOAD(name) name = (name##_func *)load_func(name##_gln, load, env); - LOADS()dnl - - return LGL_OK; -} - -const char *lgl_strerror(enum lgl_status status) -{ - switch (status) { - case LGL_OK: return "Success"; - case LGL_MISSING: return "Missing function"; - } - return "Unknown"; -} - -const char *gl_strerror(GLenum error) -{ - switch (error) { - case GL_NO_ERROR: return "No error"; - case GL_INVALID_ENUM: return "Invalid enumeration"; - case GL_INVALID_VALUE: return "Invalid value"; - case GL_INVALID_OPERATION: return "Invalid operation"; - case GL_STACK_OVERFLOW: return "Stack overflow"; - case GL_STACK_UNDERFLOW: return "Stack underflow"; - case GL_OUT_OF_MEMORY: return "Out of memory"; - case GL_INVALID_FRAMEBUFFER_OPERATION: return "Invalid framebuffer operation"; - case GL_CONTEXT_LOST: return "Context lost"; - } - return "Unknown"; -} diff --git a/loadgl.h.in b/loadgl.h.in deleted file mode 100644 index e741d5e..0000000 --- a/loadgl.h.in +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2018 Tomasz Kramkowski - * SPDX-License-Identifier: MIT - */ -#ifndef LOADGL_H -#define LOADGL_H - -#include "gldefs.h" - -typedef void *lgl_loadfunc(const char *name); - -enum lgl_status { - LGL_OK, - LGL_MISSING, -}; - -enum lgl_status lgl_load(lgl_loadfunc *load); -const char *lgl_strerror(enum lgl_status status); -const char *gl_strerror(GLenum error); - -#define _LGL_INTERFACE(rett, name, func, ...) \ - typedef rett func(__VA_ARGS__); \ - extern func *name; -#define LGL_INTERFACE(rett, name, ...) _LGL_INTERFACE(rett, name, name##_func, __VA_ARGS__) - -INTERFACES()dnl - -#endif // LOADGL_H diff --git a/loadgl.m4 b/loadgl.m4 deleted file mode 100644 index 7a7bde4..0000000 --- a/loadgl.m4 +++ /dev/null @@ -1,91 +0,0 @@ -divert(-1) -# Copyright (C) Tomasz Kramkowski -# SPDX-License - -# Macros - -# LOAD(glname, rtype, name, args) -define(`LOAD', -`divert(1)LGL_INTERFACE(shift($@)); -divert(2)LGL_FUNC($3, $1); -divert(3)LGL_LOAD($3); -divert(-1)') -m4wrap(`m4exit') - -# 1 - LGL_INTERFACE(rtype, name, args); -define(`INTERFACES', `undivert(1)') -# 2 - LGL_FUNC(name, glname); -define(`FUNCS', `undivert(2)') -# 3 - LGL_LOAD(name); -define(`LOADS', `undivert(3)') - -define(`FOR', `ifelse($#, 0, ``$0'', `ifelse(eval($2 <= $3), 1, - `pushdef(`$1', $2)$4`'popdef(`$1')$0(`$1', incr($2), $3, `$4')')')') - -# PAT(pattern, subst) -define(`PAT', `pushdef(`P', $2)$1`'popdef(`P')') -# PARAMS(start, n, pattern) -define(`PARAMS', `ifelse(eval(`$1 < ($2 - 1)'), 1, - `PAT(`$3', $1), $0(incr($1), $2, `$3')', `PAT(`$3', $1)')') -define(`TYPE', `PARAMS(0, $1, `$2 v`'P')') -# $1 $2 $3 $4 $5 $6 $7 -# FLOAT(vec, suf, vectype, glname, rtype, name, args...) -define(`LOADV', `LOAD($4$1$2, $5, $6$1$2, shift(shift(shift(shift(shift(shift($@)))))), TYPE($1, $3))') -define(`LOADP', `LOAD($4$1$2, $5, $6$1$2, shift(shift(shift(shift(shift(shift($@)))))), $3 *value)') -define(`MULTI', `FOR(`n', 1, $1, `$2')') -define(`FOREACH', `ifelse(eval($# > 2), 1, - `pushdef(`$1', `$3')$2`'popdef(`$1')dnl -`'ifelse(eval($# > 3), 1, `$0(`$1', `$2', shift(shift(shift($@))))')')') - -# Functions - -LOAD(glGetError, GLenum, gl_error, void) -LOAD(glViewport, void, gl_viewport, GLint x, GLint y, GLsizei width, GLsizei height) -LOAD(glClearColor, void, gl_clearcolor, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) -LOAD(glClear, void, gl_clear, GLbitfield mask) -LOAD(glGenBuffers, void, gl_buf_gen, GLsizei n, GLuint *buffers) -LOAD(glBindBuffer, void, gl_buf_bind, GLenum target, GLuint buffer) -LOAD(glBufferData, void, gl_buf_data, GLenum target, GLsizeiptr size, const void *data, GLenum usage) -LOAD(glCreateShader, GLuint, gl_shdr_create, GLenum type) -LOAD(glDeleteShader, void, gl_shdr_del, GLuint shader) -LOAD(glShaderSource, void, gl_shdr_source, GLuint shader, GLsizei count, const char * const *string, const GLint *length) -LOAD(glCompileShader, void, gl_shdr_compile, GLuint shader) -LOAD(glGetShaderiv, void, gl_shdr_param, GLuint shader, GLenum pname, GLint *params) -LOAD(glGetShaderInfoLog, void, gl_shdr_infolog, GLuint shader, GLsizei size, GLsizei *len, char *data) -LOAD(glCreateProgram, GLuint, gl_prog_create, void) -LOAD(glDeleteProgram, void, gl_prog_del, GLuint program) -LOAD(glAttachShader, void, gl_prog_attachshdr, GLuint program, GLuint shader) -LOAD(glDetachShader, void, gl_prog_detachshdr, GLuint program, GLuint shader) -LOAD(glGetAttachedShaders, void, gl_prog_getshdrs, GLuint program, GLsizei max, GLsizei *count, GLuint *shaders) -LOAD(glLinkProgram, void, gl_prog_link, GLuint program) -LOAD(glUseProgram, void, gl_prog_use, GLuint program) -LOAD(glGetProgramiv, void, gl_prog_param, GLuint prog, GLenum pname, GLint *params) -LOAD(glGetProgramInfoLog, void, gl_prog_infolog, GLuint prog, GLsizei size, GLsizei *len, char *data) -LOAD(glVertexAttribPointer, void, gl_va_define, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *data) -LOAD(glEnableVertexAttribArray, void, gl_va_enable, GLuint index) -LOAD(glDisableVertexAttribArray, void, gl_va_disable, GLuint index) -LOAD(glGenVertexArrays, void, gl_va_gen, GLsizei n, GLuint *arrays) -LOAD(glBindVertexArray, void, gl_va_bind, GLuint va) -LOAD(glDrawArrays, void, gl_draw_arrays, GLenum mode, GLint first, GLsizei count) -LOAD(glDrawElements, void, gl_draw_elems, GLenum mode, GLsizei count, GLenum type, const void *indices) -LOAD(glPolygonMode, void, gl_poly_mode, GLenum face, GLenum mode) -LOAD(glGetUniformLocation, GLint, gl_uni_loc, GLuint program, const char *name); -LOAD(glGetUniformfv, void, gl_uni_getf, GLuint program, GLint location, GLfloat *params); -LOAD(glGetUniformiv, void, gl_uni_geti, GLuint program, GLint location, GLint *params); -FOREACH(`type', `FOR(`n', 1, 4, `LOADV(n, type, glUniform, void, gl_uni_set, GLint location)')', - `f, GLfloat', `i, GLint', `ui, GLuint') -FOREACH(`type', `FOR(`n', 1, 4, `LOADP(n, type, glUniform, void, gl_uni_set, GLint location, GLsizei count)')', - `fv, const GLfloat', `iv, const GLint', `uiv, const GLuint') -FOR(`n', 2, 4, `LOAD(glUniformMatrix`'n`'fv, void, gl_uni_setm`'n`'fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)') -LOAD(glUniformMatrix2x3fv, void, gl_uni_setm2x3fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -LOAD(glUniformMatrix2x4fv, void, gl_uni_setm2x4fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -LOAD(glUniformMatrix3x2fv, void, gl_uni_setm3x2fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -LOAD(glUniformMatrix3x4fv, void, gl_uni_setm3x4fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -LOAD(glUniformMatrix4x2fv, void, gl_uni_setm4x2fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -LOAD(glUniformMatrix4x3fv, void, gl_uni_setm4x3fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) - -# Undefine - -undefine(`LOAD') - -divert(0)dnl -- cgit v1.2.3-54-g00ecf