1 //  ---------------------------------------------------------------------------
2 //
3 //  @file       LoadOGLCore.h
4 //  @brief      OpenGL Core Profile declarations for dynamic loading
5 //  @author     Philippe Decaudin
6 //  @license    This file is part of the AntTweakBar library.
7 //              For conditions of distribution and use, see License.txt
8 //
9 //  note:       Private header
10 //
11 //  ---------------------------------------------------------------------------
12 
13 
14 #if !defined ANT_LOAD_OGL_CORE_INCLUDED
15 #define ANT_LOAD_OGL_CORE_INCLUDED
16 
17 
18 #define ANT_GL_CORE_DECL_NO_FORWARD(_Ret, _Fct, _Params) \
19     extern "C" { typedef _Ret (APIENTRY* PFN##_Fct)_Params; } \
20     namespace GLCore { extern PFN##_Fct _##_Fct; } \
21     using GLCore::_##_Fct;
22 
23 #if defined(ANT_WINDOWS)
24 #   define ANT_GL_CORE_DECL(_Ret, _Fct, _Params) \
25         ANT_GL_CORE_DECL_NO_FORWARD(_Ret, _Fct, _Params)
26 #   define ANT_GL_CORE_IMPL(_Fct) \
27         namespace GLCore { PFN##_Fct _##_Fct = (PFN##_Fct)Record(#_Fct, (PFNOpenGL*)(&_##_Fct)); }
28 #elif defined(ANT_UNIX) || defined(ANT_OSX)
29 #   if !defined(APIENTRY)
30 #       define APIENTRY
31 #   endif
32 #   define ANT_GL_CORE_DECL(_Ret, _Fct, _Params) \
33         ANT_GL_CORE_DECL_NO_FORWARD(_Ret, _Fct, _Params) \
34         extern "C" { _Ret APIENTRY _Fct _Params; }
35 #   define ANT_GL_CORE_IMPL(_Fct) \
36         namespace GLCore { PFN##_Fct _##_Fct = _Fct; }
37 #endif
38 
39 
40 int LoadOpenGLCore();
41 int UnloadOpenGLCore();
42 
43 namespace GLCore
44 {
45     extern "C" { typedef void (APIENTRY* PFNOpenGL)(); }
46     PFNOpenGL Record(const char *_FuncName, PFNOpenGL *_FuncPtr);
47 
48     extern "C" { typedef PFNOpenGL (APIENTRY *PFNGLGetProcAddress)(const char *); }
49     extern PFNGLGetProcAddress _glGetProcAddress;
50 }
51 using GLCore::_glGetProcAddress;
52 
53 
54 // GL 1.0
55 ANT_GL_CORE_DECL(void, glCullFace, (GLenum mode))
56 ANT_GL_CORE_DECL(void, glFrontFace, (GLenum mode))
57 ANT_GL_CORE_DECL(void, glHint, (GLenum target, GLenum mode))
58 ANT_GL_CORE_DECL(void, glLineWidth, (GLfloat width))
59 ANT_GL_CORE_DECL(void, glPointSize, (GLfloat size))
60 ANT_GL_CORE_DECL(void, glPolygonMode, (GLenum face, GLenum mode))
61 ANT_GL_CORE_DECL(void, glScissor, (GLint x, GLint y, GLsizei width, GLsizei height))
62 ANT_GL_CORE_DECL(void, glTexParameterf, (GLenum target, GLenum pname, GLfloat param))
63 ANT_GL_CORE_DECL(void, glTexParameterfv, (GLenum target, GLenum pname, const GLfloat *params))
64 ANT_GL_CORE_DECL(void, glTexParameteri, (GLenum target, GLenum pname, GLint param))
65 ANT_GL_CORE_DECL(void, glTexParameteriv, (GLenum target, GLenum pname, const GLint *params))
66 #if defined(ANT_OSX) && (MAC_OS_X_VERSION_MAX_ALLOWED < 1070)
67 // Mac OSX < 10.7 redefines these OpenGL calls: glTexImage1D, glTexImage2D
68 ANT_GL_CORE_DECL(void, glTexImage1D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels))
69 ANT_GL_CORE_DECL(void, glTexImage2D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels))
70 #else
71 ANT_GL_CORE_DECL(void, glTexImage1D, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels))
72 ANT_GL_CORE_DECL(void, glTexImage2D, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels))
73 #endif
74 ANT_GL_CORE_DECL(void, glDrawBuffer, (GLenum mode))
75 ANT_GL_CORE_DECL(void, glClear, (GLbitfield mask))
76 ANT_GL_CORE_DECL(void, glClearColor, (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha))
77 ANT_GL_CORE_DECL(void, glClearStencil, (GLint s))
78 ANT_GL_CORE_DECL(void, glClearDepth, (GLclampd depth))
79 ANT_GL_CORE_DECL(void, glStencilMask, (GLuint mask))
80 ANT_GL_CORE_DECL(void, glColorMask, (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha))
81 ANT_GL_CORE_DECL(void, glDepthMask, (GLboolean flag))
82 ANT_GL_CORE_DECL(void, glDisable, (GLenum cap))
83 ANT_GL_CORE_DECL(void, glEnable, (GLenum cap))
84 ANT_GL_CORE_DECL(void, glFinish, (void))
85 ANT_GL_CORE_DECL(void, glFlush, (void))
86 ANT_GL_CORE_DECL(void, glBlendFunc, (GLenum sfactor, GLenum dfactor))
87 ANT_GL_CORE_DECL(void, glLogicOp, (GLenum opcode))
88 ANT_GL_CORE_DECL(void, glStencilFunc, (GLenum func, GLint ref, GLuint mask))
89 ANT_GL_CORE_DECL(void, glStencilOp, (GLenum fail, GLenum zfail, GLenum zpass))
90 ANT_GL_CORE_DECL(void, glDepthFunc, (GLenum func))
91 ANT_GL_CORE_DECL(void, glPixelStoref, (GLenum pname, GLfloat param))
92 ANT_GL_CORE_DECL(void, glPixelStorei, (GLenum pname, GLint param))
93 ANT_GL_CORE_DECL(void, glReadBuffer, (GLenum mode))
94 ANT_GL_CORE_DECL(void, glReadPixels, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels))
95 ANT_GL_CORE_DECL(void, glGetBooleanv, (GLenum pname, GLboolean *params))
96 ANT_GL_CORE_DECL(void, glGetDoublev, (GLenum pname, GLdouble *params))
97 ANT_GL_CORE_DECL(GLenum, glGetError, (void))
98 ANT_GL_CORE_DECL(void, glGetFloatv, (GLenum pname, GLfloat *params))
99 ANT_GL_CORE_DECL(void, glGetIntegerv, (GLenum pname, GLint *params))
100 ANT_GL_CORE_DECL(const GLubyte *, glGetString, (GLenum name))
101 ANT_GL_CORE_DECL(void, glGetTexImage, (GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels))
102 ANT_GL_CORE_DECL(void, glGetTexParameterfv, (GLenum target, GLenum pname, GLfloat *params))
103 ANT_GL_CORE_DECL(void, glGetTexParameteriv, (GLenum target, GLenum pname, GLint *params))
104 ANT_GL_CORE_DECL(void, glGetTexLevelParameterfv, (GLenum target, GLint level, GLenum pname, GLfloat *params))
105 ANT_GL_CORE_DECL(void, glGetTexLevelParameteriv, (GLenum target, GLint level, GLenum pname, GLint *params))
106 ANT_GL_CORE_DECL(GLboolean, glIsEnabled, (GLenum cap))
107 ANT_GL_CORE_DECL(void, glDepthRange, (GLclampd near, GLclampd far))
108 ANT_GL_CORE_DECL(void, glViewport, (GLint x, GLint y, GLsizei width, GLsizei height))
109 // GL 1.1
110 ANT_GL_CORE_DECL(void, glDrawArrays, (GLenum mode, GLint first, GLsizei count))
111 ANT_GL_CORE_DECL(void, glDrawElements, (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices))
112 ANT_GL_CORE_DECL(void, glGetPointerv, (GLenum pname, GLvoid* *params))
113 ANT_GL_CORE_DECL(void, glPolygonOffset, (GLfloat factor, GLfloat units))
114 ANT_GL_CORE_DECL(void, glCopyTexImage1D, (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border))
115 ANT_GL_CORE_DECL(void, glCopyTexImage2D, (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border))
116 ANT_GL_CORE_DECL(void, glCopyTexSubImage1D, (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width))
117 ANT_GL_CORE_DECL(void, glCopyTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height))
118 ANT_GL_CORE_DECL(void, glTexSubImage1D, (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels))
119 ANT_GL_CORE_DECL(void, glTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels))
120 ANT_GL_CORE_DECL(void, glBindTexture, (GLenum target, GLuint texture))
121 ANT_GL_CORE_DECL(void, glDeleteTextures, (GLsizei n, const GLuint *textures))
122 ANT_GL_CORE_DECL(void, glGenTextures, (GLsizei n, GLuint *textures))
123 ANT_GL_CORE_DECL(GLboolean, glIsTexture, (GLuint texture))
124 // GL 1.2
125 ANT_GL_CORE_DECL(void, glBlendColor, (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha))
126 ANT_GL_CORE_DECL(void, glBlendEquation, (GLenum mode))
127 ANT_GL_CORE_DECL(void, glDrawRangeElements, (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices))
128 #if defined(ANT_OSX) && (MAC_OS_X_VERSION_MAX_ALLOWED < 1070)
129 // Mac OSX < 10.7 redefines this OpenGL call: glTexImage3D
130 ANT_GL_CORE_DECL(void, glTexImage3D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels))
131 #else
132 ANT_GL_CORE_DECL(void, glTexImage3D, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels))
133 #endif
134 ANT_GL_CORE_DECL(void, glTexSubImage3D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels))
135 ANT_GL_CORE_DECL(void, glCopyTexSubImage3D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height))
136 // GL 1.3
137 ANT_GL_CORE_DECL(void, glActiveTexture, (GLenum texture))
138 ANT_GL_CORE_DECL(void, glSampleCoverage, (GLclampf value, GLboolean invert))
139 ANT_GL_CORE_DECL(void, glCompressedTexImage3D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data))
140 ANT_GL_CORE_DECL(void, glCompressedTexImage2D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data))
141 ANT_GL_CORE_DECL(void, glCompressedTexImage1D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data))
142 ANT_GL_CORE_DECL(void, glCompressedTexSubImage3D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data))
143 ANT_GL_CORE_DECL(void, glCompressedTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data))
144 ANT_GL_CORE_DECL(void, glCompressedTexSubImage1D, (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data))
145 ANT_GL_CORE_DECL(void, glGetCompressedTexImage, (GLenum target, GLint level, GLvoid *img))
146 // GL 1.4
147 ANT_GL_CORE_DECL(void, glBlendFuncSeparate, (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha))
148 ANT_GL_CORE_DECL(void, glMultiDrawArrays, (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount))
149 ANT_GL_CORE_DECL(void, glMultiDrawElements, (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount))
150 ANT_GL_CORE_DECL(void, glPointParameterf, (GLenum pname, GLfloat param))
151 ANT_GL_CORE_DECL(void, glPointParameterfv, (GLenum pname, const GLfloat *params))
152 ANT_GL_CORE_DECL(void, glPointParameteri, (GLenum pname, GLint param))
153 ANT_GL_CORE_DECL(void, glPointParameteriv, (GLenum pname, const GLint *params))
154 // GL 1.5
155 #if !defined(__DragonFly__)
156 #ifndef ANT_OSX
157     typedef ptrdiff_t GLintptr;
158     typedef ptrdiff_t GLsizeiptr;
159 #endif
160 #endif
161 ANT_GL_CORE_DECL(void, glGenQueries, (GLsizei n, GLuint *ids))
162 ANT_GL_CORE_DECL(void, glDeleteQueries, (GLsizei n, const GLuint *ids))
163 ANT_GL_CORE_DECL(GLboolean, glIsQuery, (GLuint id))
164 ANT_GL_CORE_DECL(void, glBeginQuery, (GLenum target, GLuint id))
165 ANT_GL_CORE_DECL(void, glEndQuery, (GLenum target))
166 ANT_GL_CORE_DECL(void, glGetQueryiv, (GLenum target, GLenum pname, GLint *params))
167 ANT_GL_CORE_DECL(void, glGetQueryObjectiv, (GLuint id, GLenum pname, GLint *params))
168 ANT_GL_CORE_DECL(void, glGetQueryObjectuiv, (GLuint id, GLenum pname, GLuint *params))
169 ANT_GL_CORE_DECL(void, glBindBuffer, (GLenum target, GLuint buffer))
170 ANT_GL_CORE_DECL(void, glDeleteBuffers, (GLsizei n, const GLuint *buffers))
171 ANT_GL_CORE_DECL(void, glGenBuffers, (GLsizei n, GLuint *buffers))
172 ANT_GL_CORE_DECL(GLboolean, glIsBuffer, (GLuint buffer))
173 ANT_GL_CORE_DECL(void, glBufferData, (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage))
174 ANT_GL_CORE_DECL(void, glBufferSubData, (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data))
175 ANT_GL_CORE_DECL(void, glGetBufferSubData, (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data))
176 ANT_GL_CORE_DECL(GLvoid*, glMapBuffer, (GLenum target, GLenum access))
177 ANT_GL_CORE_DECL(GLboolean, glUnmapBuffer, (GLenum target))
178 ANT_GL_CORE_DECL(void, glGetBufferParameteriv, (GLenum target, GLenum pname, GLint *params))
179 ANT_GL_CORE_DECL(void, glGetBufferPointerv, (GLenum target, GLenum pname, GLvoid* *params))
180 // GL 2.0
181 typedef char GLchar;
182 ANT_GL_CORE_DECL(void, glBlendEquationSeparate, (GLenum modeRGB, GLenum modeAlpha))
183 ANT_GL_CORE_DECL(void, glDrawBuffers, (GLsizei n, const GLenum *bufs))
184 ANT_GL_CORE_DECL(void, glStencilOpSeparate, (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass))
185 ANT_GL_CORE_DECL(void, glStencilFuncSeparate, (GLenum face, GLenum func, GLint ref, GLuint mask))
186 ANT_GL_CORE_DECL(void, glStencilMaskSeparate, (GLenum face, GLuint mask))
187 ANT_GL_CORE_DECL(void, glAttachShader, (GLuint program, GLuint shader))
188 ANT_GL_CORE_DECL(void, glBindAttribLocation, (GLuint program, GLuint index, const GLchar *name))
189 ANT_GL_CORE_DECL(void, glCompileShader, (GLuint shader))
190 ANT_GL_CORE_DECL(GLuint, glCreateProgram, (void))
191 ANT_GL_CORE_DECL(GLuint, glCreateShader, (GLenum type))
192 ANT_GL_CORE_DECL(void, glDeleteProgram, (GLuint program))
193 ANT_GL_CORE_DECL(void, glDeleteShader, (GLuint shader))
194 ANT_GL_CORE_DECL(void, glDetachShader, (GLuint program, GLuint shader))
195 ANT_GL_CORE_DECL(void, glDisableVertexAttribArray, (GLuint index))
196 ANT_GL_CORE_DECL(void, glEnableVertexAttribArray, (GLuint index))
197 ANT_GL_CORE_DECL(void, glGetActiveAttrib, (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name))
198 ANT_GL_CORE_DECL(void, glGetActiveUniform, (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name))
199 ANT_GL_CORE_DECL(void, glGetAttachedShaders, (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj))
200 ANT_GL_CORE_DECL(GLint, glGetAttribLocation, (GLuint program, const GLchar *name))
201 ANT_GL_CORE_DECL(void, glGetProgramiv, (GLuint program, GLenum pname, GLint *params))
202 ANT_GL_CORE_DECL(void, glGetProgramInfoLog, (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog))
203 ANT_GL_CORE_DECL(void, glGetShaderiv, (GLuint shader, GLenum pname, GLint *params))
204 ANT_GL_CORE_DECL(void, glGetShaderInfoLog, (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog))
205 ANT_GL_CORE_DECL(void, glGetShaderSource, (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source))
206 ANT_GL_CORE_DECL(GLint, glGetUniformLocation, (GLuint program, const GLchar *name))
207 ANT_GL_CORE_DECL(void, glGetUniformfv, (GLuint program, GLint location, GLfloat *params))
208 ANT_GL_CORE_DECL(void, glGetUniformiv, (GLuint program, GLint location, GLint *params))
209 ANT_GL_CORE_DECL(void, glGetVertexAttribdv, (GLuint index, GLenum pname, GLdouble *params))
210 ANT_GL_CORE_DECL(void, glGetVertexAttribfv, (GLuint index, GLenum pname, GLfloat *params))
211 ANT_GL_CORE_DECL(void, glGetVertexAttribiv, (GLuint index, GLenum pname, GLint *params))
212 ANT_GL_CORE_DECL(void, glGetVertexAttribPointerv, (GLuint index, GLenum pname, GLvoid* *pointer))
213 ANT_GL_CORE_DECL(GLboolean, glIsProgram, (GLuint program))
214 ANT_GL_CORE_DECL(GLboolean, glIsShader, (GLuint shader))
215 ANT_GL_CORE_DECL(void, glLinkProgram, (GLuint program))
216 ANT_GL_CORE_DECL(void, glShaderSource, (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length))
217 ANT_GL_CORE_DECL(void, glUseProgram, (GLuint program))
218 ANT_GL_CORE_DECL(void, glUniform1f, (GLint location, GLfloat v0))
219 ANT_GL_CORE_DECL(void, glUniform2f, (GLint location, GLfloat v0, GLfloat v1))
220 ANT_GL_CORE_DECL(void, glUniform3f, (GLint location, GLfloat v0, GLfloat v1, GLfloat v2))
221 ANT_GL_CORE_DECL(void, glUniform4f, (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3))
222 ANT_GL_CORE_DECL(void, glUniform1i, (GLint location, GLint v0))
223 ANT_GL_CORE_DECL(void, glUniform2i, (GLint location, GLint v0, GLint v1))
224 ANT_GL_CORE_DECL(void, glUniform3i, (GLint location, GLint v0, GLint v1, GLint v2))
225 ANT_GL_CORE_DECL(void, glUniform4i, (GLint location, GLint v0, GLint v1, GLint v2, GLint v3))
226 ANT_GL_CORE_DECL(void, glUniform1fv, (GLint location, GLsizei count, const GLfloat *value))
227 ANT_GL_CORE_DECL(void, glUniform2fv, (GLint location, GLsizei count, const GLfloat *value))
228 ANT_GL_CORE_DECL(void, glUniform3fv, (GLint location, GLsizei count, const GLfloat *value))
229 ANT_GL_CORE_DECL(void, glUniform4fv, (GLint location, GLsizei count, const GLfloat *value))
230 ANT_GL_CORE_DECL(void, glUniform1iv, (GLint location, GLsizei count, const GLint *value))
231 ANT_GL_CORE_DECL(void, glUniform2iv, (GLint location, GLsizei count, const GLint *value))
232 ANT_GL_CORE_DECL(void, glUniform3iv, (GLint location, GLsizei count, const GLint *value))
233 ANT_GL_CORE_DECL(void, glUniform4iv, (GLint location, GLsizei count, const GLint *value))
234 ANT_GL_CORE_DECL(void, glUniformMatrix2fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
235 ANT_GL_CORE_DECL(void, glUniformMatrix3fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
236 ANT_GL_CORE_DECL(void, glUniformMatrix4fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
237 ANT_GL_CORE_DECL(void, glValidateProgram, (GLuint program))
238 ANT_GL_CORE_DECL(void, glVertexAttrib1d, (GLuint index, GLdouble x))
239 ANT_GL_CORE_DECL(void, glVertexAttrib1dv, (GLuint index, const GLdouble *v))
240 ANT_GL_CORE_DECL(void, glVertexAttrib1f, (GLuint index, GLfloat x))
241 ANT_GL_CORE_DECL(void, glVertexAttrib1fv, (GLuint index, const GLfloat *v))
242 ANT_GL_CORE_DECL(void, glVertexAttrib1s, (GLuint index, GLshort x))
243 ANT_GL_CORE_DECL(void, glVertexAttrib1sv, (GLuint index, const GLshort *v))
244 ANT_GL_CORE_DECL(void, glVertexAttrib2d, (GLuint index, GLdouble x, GLdouble y))
245 ANT_GL_CORE_DECL(void, glVertexAttrib2dv, (GLuint index, const GLdouble *v))
246 ANT_GL_CORE_DECL(void, glVertexAttrib2f, (GLuint index, GLfloat x, GLfloat y))
247 ANT_GL_CORE_DECL(void, glVertexAttrib2fv, (GLuint index, const GLfloat *v))
248 ANT_GL_CORE_DECL(void, glVertexAttrib2s, (GLuint index, GLshort x, GLshort y))
249 ANT_GL_CORE_DECL(void, glVertexAttrib2sv, (GLuint index, const GLshort *v))
250 ANT_GL_CORE_DECL(void, glVertexAttrib3d, (GLuint index, GLdouble x, GLdouble y, GLdouble z))
251 ANT_GL_CORE_DECL(void, glVertexAttrib3dv, (GLuint index, const GLdouble *v))
252 ANT_GL_CORE_DECL(void, glVertexAttrib3f, (GLuint index, GLfloat x, GLfloat y, GLfloat z))
253 ANT_GL_CORE_DECL(void, glVertexAttrib3fv, (GLuint index, const GLfloat *v))
254 ANT_GL_CORE_DECL(void, glVertexAttrib3s, (GLuint index, GLshort x, GLshort y, GLshort z))
255 ANT_GL_CORE_DECL(void, glVertexAttrib3sv, (GLuint index, const GLshort *v))
256 ANT_GL_CORE_DECL(void, glVertexAttrib4Nbv, (GLuint index, const GLbyte *v))
257 ANT_GL_CORE_DECL(void, glVertexAttrib4Niv, (GLuint index, const GLint *v))
258 ANT_GL_CORE_DECL(void, glVertexAttrib4Nsv, (GLuint index, const GLshort *v))
259 ANT_GL_CORE_DECL(void, glVertexAttrib4Nub, (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w))
260 ANT_GL_CORE_DECL(void, glVertexAttrib4Nubv, (GLuint index, const GLubyte *v))
261 ANT_GL_CORE_DECL(void, glVertexAttrib4Nuiv, (GLuint index, const GLuint *v))
262 ANT_GL_CORE_DECL(void, glVertexAttrib4Nusv, (GLuint index, const GLushort *v))
263 ANT_GL_CORE_DECL(void, glVertexAttrib4bv, (GLuint index, const GLbyte *v))
264 ANT_GL_CORE_DECL(void, glVertexAttrib4d, (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w))
265 ANT_GL_CORE_DECL(void, glVertexAttrib4dv, (GLuint index, const GLdouble *v))
266 ANT_GL_CORE_DECL(void, glVertexAttrib4f, (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w))
267 ANT_GL_CORE_DECL(void, glVertexAttrib4fv, (GLuint index, const GLfloat *v))
268 ANT_GL_CORE_DECL(void, glVertexAttrib4iv, (GLuint index, const GLint *v))
269 ANT_GL_CORE_DECL(void, glVertexAttrib4s, (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w))
270 ANT_GL_CORE_DECL(void, glVertexAttrib4sv, (GLuint index, const GLshort *v))
271 ANT_GL_CORE_DECL(void, glVertexAttrib4ubv, (GLuint index, const GLubyte *v))
272 ANT_GL_CORE_DECL(void, glVertexAttrib4uiv, (GLuint index, const GLuint *v))
273 ANT_GL_CORE_DECL(void, glVertexAttrib4usv, (GLuint index, const GLushort *v))
274 ANT_GL_CORE_DECL(void, glVertexAttribPointer, (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer))
275 /*
276 // GL 2.1
277 ANT_GL_CORE_DECL(void, glUniformMatrix2x3fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
278 ANT_GL_CORE_DECL(void, glUniformMatrix3x2fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
279 ANT_GL_CORE_DECL(void, glUniformMatrix2x4fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
280 ANT_GL_CORE_DECL(void, glUniformMatrix4x2fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
281 ANT_GL_CORE_DECL(void, glUniformMatrix3x4fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
282 ANT_GL_CORE_DECL(void, glUniformMatrix4x3fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
283 // GL 3.0
284 ANT_GL_CORE_DECL(void, glColorMaski, (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a))
285 ANT_GL_CORE_DECL(void, glGetBooleani_v, (GLenum target, GLuint index, GLboolean *data))
286 ANT_GL_CORE_DECL(void, glGetIntegeri_v, (GLenum target, GLuint index, GLint *data))
287 ANT_GL_CORE_DECL(void, glEnablei, (GLenum target, GLuint index))
288 ANT_GL_CORE_DECL(void, glDisablei, (GLenum target, GLuint index))
289 ANT_GL_CORE_DECL(GLboolean, glIsEnabledi, (GLenum target, GLuint index))
290 ANT_GL_CORE_DECL(void, glBeginTransformFeedback, (GLenum primitiveMode))
291 ANT_GL_CORE_DECL(void, glEndTransformFeedback, (void))
292 ANT_GL_CORE_DECL(void, glBindBufferRange, (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size))
293 ANT_GL_CORE_DECL(void, glBindBufferBase, (GLenum target, GLuint index, GLuint buffer))
294 ANT_GL_CORE_DECL(void, glTransformFeedbackVaryings, (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode))
295 ANT_GL_CORE_DECL(void, glGetTransformFeedbackVarying, (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name))
296 ANT_GL_CORE_DECL(void, glClampColor, (GLenum target, GLenum clamp))
297 ANT_GL_CORE_DECL(void, glBeginConditionalRender, (GLuint id, GLenum mode))
298 ANT_GL_CORE_DECL(void, glEndConditionalRender, (void))
299 ANT_GL_CORE_DECL(void, glVertexAttribIPointer, (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer))
300 ANT_GL_CORE_DECL(void, glGetVertexAttribIiv, (GLuint index, GLenum pname, GLint *params))
301 ANT_GL_CORE_DECL(void, glGetVertexAttribIuiv, (GLuint index, GLenum pname, GLuint *params))
302 ANT_GL_CORE_DECL(void, glVertexAttribI1i, (GLuint index, GLint x))
303 ANT_GL_CORE_DECL(void, glVertexAttribI2i, (GLuint index, GLint x, GLint y))
304 ANT_GL_CORE_DECL(void, glVertexAttribI3i, (GLuint index, GLint x, GLint y, GLint z))
305 ANT_GL_CORE_DECL(void, glVertexAttribI4i, (GLuint index, GLint x, GLint y, GLint z, GLint w))
306 ANT_GL_CORE_DECL(void, glVertexAttribI1ui, (GLuint index, GLuint x))
307 ANT_GL_CORE_DECL(void, glVertexAttribI2ui, (GLuint index, GLuint x, GLuint y))
308 ANT_GL_CORE_DECL(void, glVertexAttribI3ui, (GLuint index, GLuint x, GLuint y, GLuint z))
309 ANT_GL_CORE_DECL(void, glVertexAttribI4ui, (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w))
310 ANT_GL_CORE_DECL(void, glVertexAttribI1iv, (GLuint index, const GLint *v))
311 ANT_GL_CORE_DECL(void, glVertexAttribI2iv, (GLuint index, const GLint *v))
312 ANT_GL_CORE_DECL(void, glVertexAttribI3iv, (GLuint index, const GLint *v))
313 ANT_GL_CORE_DECL(void, glVertexAttribI4iv, (GLuint index, const GLint *v))
314 ANT_GL_CORE_DECL(void, glVertexAttribI1uiv, (GLuint index, const GLuint *v))
315 ANT_GL_CORE_DECL(void, glVertexAttribI2uiv, (GLuint index, const GLuint *v))
316 ANT_GL_CORE_DECL(void, glVertexAttribI3uiv, (GLuint index, const GLuint *v))
317 ANT_GL_CORE_DECL(void, glVertexAttribI4uiv, (GLuint index, const GLuint *v))
318 ANT_GL_CORE_DECL(void, glVertexAttribI4bv, (GLuint index, const GLbyte *v))
319 ANT_GL_CORE_DECL(void, glVertexAttribI4sv, (GLuint index, const GLshort *v))
320 ANT_GL_CORE_DECL(void, glVertexAttribI4ubv, (GLuint index, const GLubyte *v))
321 ANT_GL_CORE_DECL(void, glVertexAttribI4usv, (GLuint index, const GLushort *v))
322 ANT_GL_CORE_DECL(void, glGetUniformuiv, (GLuint program, GLint location, GLuint *params))
323 ANT_GL_CORE_DECL(void, glBindFragDataLocation, (GLuint program, GLuint color, const GLchar *name))
324 ANT_GL_CORE_DECL(GLint, glGetFragDataLocation, (GLuint program, const GLchar *name))
325 ANT_GL_CORE_DECL(void, glUniform1ui, (GLint location, GLuint v0))
326 ANT_GL_CORE_DECL(void, glUniform2ui, (GLint location, GLuint v0, GLuint v1))
327 ANT_GL_CORE_DECL(void, glUniform3ui, (GLint location, GLuint v0, GLuint v1, GLuint v2))
328 ANT_GL_CORE_DECL(void, glUniform4ui, (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3))
329 ANT_GL_CORE_DECL(void, glUniform1uiv, (GLint location, GLsizei count, const GLuint *value))
330 ANT_GL_CORE_DECL(void, glUniform2uiv, (GLint location, GLsizei count, const GLuint *value))
331 ANT_GL_CORE_DECL(void, glUniform3uiv, (GLint location, GLsizei count, const GLuint *value))
332 ANT_GL_CORE_DECL(void, glUniform4uiv, (GLint location, GLsizei count, const GLuint *value))
333 ANT_GL_CORE_DECL(void, glTexParameterIiv, (GLenum target, GLenum pname, const GLint *params))
334 ANT_GL_CORE_DECL(void, glTexParameterIuiv, (GLenum target, GLenum pname, const GLuint *params))
335 ANT_GL_CORE_DECL(void, glGetTexParameterIiv, (GLenum target, GLenum pname, GLint *params))
336 ANT_GL_CORE_DECL(void, glGetTexParameterIuiv, (GLenum target, GLenum pname, GLuint *params))
337 ANT_GL_CORE_DECL(void, glClearBufferiv, (GLenum buffer, GLint drawbuffer, const GLint *value))
338 ANT_GL_CORE_DECL(void, glClearBufferuiv, (GLenum buffer, GLint drawbuffer, const GLuint *value))
339 ANT_GL_CORE_DECL(void, glClearBufferfv, (GLenum buffer, GLint drawbuffer, const GLfloat *value))
340 ANT_GL_CORE_DECL(void, glClearBufferfi, (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil))
341 ANT_GL_CORE_DECL(const GLubyte *, glGetStringi, (GLenum name, GLuint index))
342 // GL 3.1
343 ANT_GL_CORE_DECL(void, glDrawArraysInstanced, (GLenum mode, GLint first, GLsizei count, GLsizei primcount))
344 ANT_GL_CORE_DECL(void, glDrawElementsInstanced, (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount))
345 ANT_GL_CORE_DECL(void, glTexBuffer, (GLenum target, GLenum internalformat, GLuint buffer))
346 ANT_GL_CORE_DECL(void, glPrimitiveRestartIndex, (GLuint index))
347 // GL 3.2
348 //typedef int64_t GLint64;
349 //ANT_GL_CORE_DECL(void, glGetInteger64i_v, (GLenum target, GLuint index, GLint64 *data))
350 //ANT_GL_CORE_DECL(void, glGetBufferParameteri64v, (GLenum target, GLenum pname, GLint64 *params))
351 ANT_GL_CORE_DECL(void, glFramebufferTexture, (GLenum target, GLenum attachment, GLuint texture, GLint level))
352 */
353 // GL_ARB_vertex_array_object
354 ANT_GL_CORE_DECL_NO_FORWARD(void, glBindVertexArray, (GLuint array))
355 ANT_GL_CORE_DECL_NO_FORWARD(void, glDeleteVertexArrays, (GLsizei n, const GLuint *arrays))
356 ANT_GL_CORE_DECL_NO_FORWARD(void, glGenVertexArrays, (GLsizei n, GLuint *arrays))
357 ANT_GL_CORE_DECL_NO_FORWARD(GLboolean, glIsVertexArray, (GLuint array))
358 
359 
360 #ifdef ANT_WINDOWS
361 ANT_GL_CORE_DECL(PROC, wglGetProcAddress, (LPCSTR))
362 #endif
363 
364 #ifndef GL_CLAMP_TO_EDGE
365 #   define GL_CLAMP_TO_EDGE     0x812F
366 #endif
367 #ifndef GL_COMPILE_STATUS
368 #   define GL_COMPILE_STATUS    0x8B81
369 #endif
370 #ifndef GL_INFO_LOG_LENGTH
371 #   define GL_INFO_LOG_LENGTH   0x8B84
372 #endif
373 #ifndef GL_LINK_STATUS
374 #   define GL_LINK_STATUS       0x8B82
375 #endif
376 #ifndef GL_ARRAY_BUFFER
377 #   define GL_ARRAY_BUFFER      0x8892
378 #endif
379 #ifndef GL_DYNAMIC_DRAW
380 #   define GL_DYNAMIC_DRAW      0x88E8
381 #endif
382 #ifndef GL_VERTEX_SHADER
383 #   define GL_VERTEX_SHADER     0x8B31
384 #endif
385 #ifndef GL_FRAGMENT_SHADER
386 #   define GL_FRAGMENT_SHADER   0x8B30
387 #endif
388 #ifndef GL_VERTEX_ARRAY_BINDING
389 #   define GL_VERTEX_ARRAY_BINDING  0x85B5
390 #endif
391 #ifndef GL_CURRENT_PROGRAM
392 #   define GL_CURRENT_PROGRAM   0x8B8D
393 #endif
394 #ifndef GL_ACTIVE_TEXTURE
395 #   define GL_ACTIVE_TEXTURE    0x84E0
396 #endif
397 #ifndef GL_TEXTURE0
398 #   define GL_TEXTURE0          0x84C0
399 #endif
400 #ifndef GL_BGRA
401 #   define GL_BGRA              0x80E1
402 #endif
403 
404 
405 #endif // !defined ANT_LOAD_OGL_CORE_INCLUDED
406