aboutsummaryrefslogtreecommitdiffstats
path: root/gl.h
blob: 2b31aa979e6f4a6bd90fa92941b056f5fa4efc49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
 * Copyright (C) 2018 Tomasz Kramkowski <tk@the-tk.com>
 * SPDX-License-Identifier: MIT
 */
#ifndef GL_H
#define GL_H

#include <GL/gl.h>

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