10 #if defined(__gl_h_) || defined(__GL_H__) 11 #error gl.h included before OpenGL4.h 13 #if defined(__glext_h_) || defined(__GLEXT_H_) 14 #error glext.h included before OpenGL4.h 21 #if defined(WIN32) || defined(_WIN64) 23 #if !defined(_MSC_VER) 24 #error Microsoft Visual Studio 2013 or later is required. 37 #error Microsoft Visual Studio 2013 or later is required. 41 #if defined(OPENGL4_EXPORT) 43 #define GLAPI extern __declspec(dllexport) 44 #elif defined(OPENGL4_IMPORT) 46 #define GLAPI extern __declspec(dllimport) 54 #define GL_VERSION_1_0 55 #define GL_VERSION_1_1 60 typedef unsigned int GLenum;
66 typedef unsigned int GLuint;
70 __declspec(dllimport)
void __stdcall
glFrontFace(GLenum mode);
71 __declspec(dllimport)
void __stdcall
glHint(GLenum
target, GLenum mode);
75 __declspec(dllimport)
void __stdcall
glScissor(GLint
x, GLint
y, GLsizei width, GLsizei
height);
78 __declspec(dllimport)
void __stdcall
glTexParameteri(GLenum target, GLenum pname, GLint param);
79 __declspec(dllimport)
void __stdcall
glTexParameteriv(GLenum target, GLenum pname,
const GLint *params);
81 __declspec(dllimport)
void __stdcall
glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type,
const void *pixels);
82 __declspec(dllimport)
void __stdcall
glDrawBuffer(GLenum mode);
83 __declspec(dllimport)
void __stdcall
glClear(GLbitfield
mask);
87 __declspec(dllimport)
void __stdcall
glStencilMask(GLuint mask);
88 __declspec(dllimport)
void __stdcall
glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
89 __declspec(dllimport)
void __stdcall
glDepthMask(GLboolean flag);
90 __declspec(dllimport)
void __stdcall
glDisable(GLenum
cap);
91 __declspec(dllimport)
void __stdcall
glEnable(GLenum cap);
92 __declspec(dllimport)
void __stdcall
glFinish(
void);
93 __declspec(dllimport)
void __stdcall
glFlush(
void);
95 __declspec(dllimport)
void __stdcall
glLogicOp(GLenum opcode);
98 __declspec(dllimport)
void __stdcall
glDepthFunc(GLenum func);
99 __declspec(dllimport)
void __stdcall
glPixelStoref(GLenum pname, GLfloat param);
100 __declspec(dllimport)
void __stdcall
glPixelStorei(GLenum pname, GLint param);
101 __declspec(dllimport)
void __stdcall
glReadBuffer(GLenum mode);
102 __declspec(dllimport)
void __stdcall
glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type,
void *pixels);
103 __declspec(dllimport)
void __stdcall
glGetBooleanv(GLenum pname, GLboolean *
data);
104 __declspec(dllimport)
void __stdcall
glGetDoublev(GLenum pname, GLdouble *data);
105 __declspec(dllimport) GLenum __stdcall
glGetError(
void);
106 __declspec(dllimport)
void __stdcall
glGetFloatv(GLenum pname, GLfloat *data);
107 __declspec(dllimport)
void __stdcall
glGetIntegerv(GLenum pname, GLint *data);
108 __declspec(dllimport)
const GLubyte * __stdcall
glGetString(GLenum
name);
109 __declspec(dllimport)
void __stdcall
glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type,
void *pixels);
110 __declspec(dllimport)
void __stdcall
glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params);
111 __declspec(dllimport)
void __stdcall
glGetTexParameteriv(GLenum target, GLenum pname, GLint *params);
112 __declspec(dllimport)
void __stdcall
glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat *params);
113 __declspec(dllimport)
void __stdcall
glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params);
114 __declspec(dllimport) GLboolean __stdcall
glIsEnabled(GLenum cap);
115 __declspec(dllimport)
void __stdcall
glDepthRange(GLdouble near, GLdouble
far);
116 __declspec(dllimport)
void __stdcall
glViewport(GLint x, GLint y, GLsizei width, GLsizei height);
121 #define GL_DEPTH_BUFFER_BIT 0x00000100 122 #define GL_STENCIL_BUFFER_BIT 0x00000400 123 #define GL_COLOR_BUFFER_BIT 0x00004000 126 #define GL_POINTS 0x0000 127 #define GL_LINES 0x0001 128 #define GL_LINE_LOOP 0x0002 129 #define GL_LINE_STRIP 0x0003 130 #define GL_TRIANGLES 0x0004 131 #define GL_TRIANGLE_STRIP 0x0005 132 #define GL_TRIANGLE_FAN 0x0006 133 #define GL_QUADS 0x0007 134 #define GL_NEVER 0x0200 135 #define GL_LESS 0x0201 136 #define GL_EQUAL 0x0202 137 #define GL_LEQUAL 0x0203 138 #define GL_GREATER 0x0204 139 #define GL_NOTEQUAL 0x0205 140 #define GL_GEQUAL 0x0206 141 #define GL_ALWAYS 0x0207 144 #define GL_SRC_COLOR 0x0300 145 #define GL_ONE_MINUS_SRC_COLOR 0x0301 146 #define GL_SRC_ALPHA 0x0302 147 #define GL_ONE_MINUS_SRC_ALPHA 0x0303 148 #define GL_DST_ALPHA 0x0304 149 #define GL_ONE_MINUS_DST_ALPHA 0x0305 150 #define GL_DST_COLOR 0x0306 151 #define GL_ONE_MINUS_DST_COLOR 0x0307 152 #define GL_SRC_ALPHA_SATURATE 0x0308 154 #define GL_FRONT_LEFT 0x0400 155 #define GL_FRONT_RIGHT 0x0401 156 #define GL_BACK_LEFT 0x0402 157 #define GL_BACK_RIGHT 0x0403 158 #define GL_FRONT 0x0404 159 #define GL_BACK 0x0405 160 #define GL_LEFT 0x0406 161 #define GL_RIGHT 0x0407 162 #define GL_FRONT_AND_BACK 0x0408 163 #define GL_NO_ERROR 0 164 #define GL_INVALID_ENUM 0x0500 165 #define GL_INVALID_VALUE 0x0501 166 #define GL_INVALID_OPERATION 0x0502 167 #define GL_OUT_OF_MEMORY 0x0505 169 #define GL_CCW 0x0901 170 #define GL_POINT_SIZE 0x0B11 171 #define GL_POINT_SIZE_RANGE 0x0B12 172 #define GL_POINT_SIZE_GRANULARITY 0x0B13 173 #define GL_LINE_SMOOTH 0x0B20 174 #define GL_LINE_WIDTH 0x0B21 175 #define GL_LINE_WIDTH_RANGE 0x0B22 176 #define GL_LINE_WIDTH_GRANULARITY 0x0B23 177 #define GL_POLYGON_MODE 0x0B40 178 #define GL_POLYGON_SMOOTH 0x0B41 179 #define GL_CULL_FACE 0x0B44 180 #define GL_CULL_FACE_MODE 0x0B45 181 #define GL_FRONT_FACE 0x0B46 182 #define GL_DEPTH_RANGE 0x0B70 183 #define GL_DEPTH_TEST 0x0B71 184 #define GL_DEPTH_WRITEMASK 0x0B72 185 #define GL_DEPTH_CLEAR_VALUE 0x0B73 186 #define GL_DEPTH_FUNC 0x0B74 187 #define GL_STENCIL_TEST 0x0B90 188 #define GL_STENCIL_CLEAR_VALUE 0x0B91 189 #define GL_STENCIL_FUNC 0x0B92 190 #define GL_STENCIL_VALUE_MASK 0x0B93 191 #define GL_STENCIL_FAIL 0x0B94 192 #define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 193 #define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 194 #define GL_STENCIL_REF 0x0B97 195 #define GL_STENCIL_WRITEMASK 0x0B98 196 #define GL_VIEWPORT 0x0BA2 197 #define GL_DITHER 0x0BD0 198 #define GL_BLEND_DST 0x0BE0 199 #define GL_BLEND_SRC 0x0BE1 200 #define GL_BLEND 0x0BE2 201 #define GL_LOGIC_OP_MODE 0x0BF0 202 #define GL_COLOR_LOGIC_OP 0x0BF2 203 #define GL_DRAW_BUFFER 0x0C01 204 #define GL_READ_BUFFER 0x0C02 205 #define GL_SCISSOR_BOX 0x0C10 206 #define GL_SCISSOR_TEST 0x0C11 207 #define GL_COLOR_CLEAR_VALUE 0x0C22 208 #define GL_COLOR_WRITEMASK 0x0C23 209 #define GL_DOUBLEBUFFER 0x0C32 210 #define GL_STEREO 0x0C33 211 #define GL_LINE_SMOOTH_HINT 0x0C52 212 #define GL_POLYGON_SMOOTH_HINT 0x0C53 213 #define GL_UNPACK_SWAP_BYTES 0x0CF0 214 #define GL_UNPACK_LSB_FIRST 0x0CF1 215 #define GL_UNPACK_ROW_LENGTH 0x0CF2 216 #define GL_UNPACK_SKIP_ROWS 0x0CF3 217 #define GL_UNPACK_SKIP_PIXELS 0x0CF4 218 #define GL_UNPACK_ALIGNMENT 0x0CF5 219 #define GL_PACK_SWAP_BYTES 0x0D00 220 #define GL_PACK_LSB_FIRST 0x0D01 221 #define GL_PACK_ROW_LENGTH 0x0D02 222 #define GL_PACK_SKIP_ROWS 0x0D03 223 #define GL_PACK_SKIP_PIXELS 0x0D04 224 #define GL_PACK_ALIGNMENT 0x0D05 225 #define GL_MAX_TEXTURE_SIZE 0x0D33 226 #define GL_MAX_VIEWPORT_DIMS 0x0D3A 227 #define GL_SUBPIXEL_BITS 0x0D50 228 #define GL_TEXTURE_1D 0x0DE0 229 #define GL_TEXTURE_2D 0x0DE1 230 #define GL_POLYGON_OFFSET_UNITS 0x2A00 231 #define GL_POLYGON_OFFSET_POINT 0x2A01 232 #define GL_POLYGON_OFFSET_LINE 0x2A02 233 #define GL_POLYGON_OFFSET_FILL 0x8037 234 #define GL_POLYGON_OFFSET_FACTOR 0x8038 235 #define GL_TEXTURE_BINDING_1D 0x8068 236 #define GL_TEXTURE_BINDING_2D 0x8069 237 #define GL_TEXTURE_WIDTH 0x1000 238 #define GL_TEXTURE_HEIGHT 0x1001 239 #define GL_TEXTURE_INTERNAL_FORMAT 0x1003 240 #define GL_TEXTURE_BORDER_COLOR 0x1004 241 #define GL_TEXTURE_RED_SIZE 0x805C 242 #define GL_TEXTURE_GREEN_SIZE 0x805D 243 #define GL_TEXTURE_BLUE_SIZE 0x805E 244 #define GL_TEXTURE_ALPHA_SIZE 0x805F 245 #define GL_DONT_CARE 0x1100 246 #define GL_FASTEST 0x1101 247 #define GL_NICEST 0x1102 248 #define GL_BYTE 0x1400 249 #define GL_UNSIGNED_BYTE 0x1401 250 #define GL_SHORT 0x1402 251 #define GL_UNSIGNED_SHORT 0x1403 252 #define GL_INT 0x1404 253 #define GL_UNSIGNED_INT 0x1405 254 #define GL_FLOAT 0x1406 255 #define GL_DOUBLE 0x140A 256 #define GL_STACK_OVERFLOW 0x0503 257 #define GL_STACK_UNDERFLOW 0x0504 258 #define GL_CLEAR 0x1500 259 #define GL_AND 0x1501 260 #define GL_AND_REVERSE 0x1502 261 #define GL_COPY 0x1503 262 #define GL_AND_INVERTED 0x1504 263 #define GL_NOOP 0x1505 264 #define GL_XOR 0x1506 266 #define GL_NOR 0x1508 267 #define GL_EQUIV 0x1509 268 #define GL_INVERT 0x150A 269 #define GL_OR_REVERSE 0x150B 270 #define GL_COPY_INVERTED 0x150C 271 #define GL_OR_INVERTED 0x150D 272 #define GL_NAND 0x150E 273 #define GL_SET 0x150F 274 #define GL_TEXTURE 0x1702 275 #define GL_COLOR 0x1800 276 #define GL_DEPTH 0x1801 277 #define GL_STENCIL 0x1802 278 #define GL_STENCIL_INDEX 0x1901 279 #define GL_DEPTH_COMPONENT 0x1902 280 #define GL_RED 0x1903 281 #define GL_GREEN 0x1904 282 #define GL_BLUE 0x1905 283 #define GL_ALPHA 0x1906 284 #define GL_RGB 0x1907 285 #define GL_RGBA 0x1908 286 #define GL_POINT 0x1B00 287 #define GL_LINE 0x1B01 288 #define GL_FILL 0x1B02 289 #define GL_KEEP 0x1E00 290 #define GL_REPLACE 0x1E01 291 #define GL_INCR 0x1E02 292 #define GL_DECR 0x1E03 293 #define GL_VENDOR 0x1F00 294 #define GL_RENDERER 0x1F01 295 #define GL_VERSION 0x1F02 296 #define GL_EXTENSIONS 0x1F03 297 #define GL_NEAREST 0x2600 298 #define GL_LINEAR 0x2601 299 #define GL_NEAREST_MIPMAP_NEAREST 0x2700 300 #define GL_LINEAR_MIPMAP_NEAREST 0x2701 301 #define GL_NEAREST_MIPMAP_LINEAR 0x2702 302 #define GL_LINEAR_MIPMAP_LINEAR 0x2703 303 #define GL_TEXTURE_MAG_FILTER 0x2800 304 #define GL_TEXTURE_MIN_FILTER 0x2801 305 #define GL_TEXTURE_WRAP_S 0x2802 306 #define GL_TEXTURE_WRAP_T 0x2803 307 #define GL_PROXY_TEXTURE_1D 0x8063 308 #define GL_PROXY_TEXTURE_2D 0x8064 309 #define GL_REPEAT 0x2901 310 #define GL_R3_G3_B2 0x2A10 311 #define GL_RGB4 0x804F 312 #define GL_RGB5 0x8050 313 #define GL_RGB8 0x8051 314 #define GL_RGB10 0x8052 315 #define GL_RGB12 0x8053 316 #define GL_RGB16 0x8054 317 #define GL_RGBA2 0x8055 318 #define GL_RGBA4 0x8056 319 #define GL_RGB5_A1 0x8057 320 #define GL_RGBA8 0x8058 321 #define GL_RGB10_A2 0x8059 322 #define GL_RGBA12 0x805A 323 #define GL_RGBA16 0x805B 324 #define GL_VERTEX_ARRAY 0x8074 326 __declspec(dllimport)
void __stdcall
glDrawElements(GLenum mode, GLsizei count, GLenum type,
const void *
indices);
327 __declspec(dllimport)
void __stdcall
glGetPointerv(GLenum pname,
void **params);
329 __declspec(dllimport)
void __stdcall
glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
330 __declspec(dllimport)
void __stdcall
glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
331 __declspec(dllimport)
void __stdcall
glCopyTexSubImage1D(GLenum target, GLint level, GLint
xoffset, GLint x, GLint y, GLsizei width);
332 __declspec(dllimport)
void __stdcall
glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint
yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
333 __declspec(dllimport)
void __stdcall
glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type,
const void *pixels);
334 __declspec(dllimport)
void __stdcall
glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type,
const void *pixels);
337 __declspec(dllimport)
void __stdcall
glGenTextures(GLsizei n, GLuint *textures);
338 __declspec(dllimport) GLboolean __stdcall
glIsTexture(GLuint texture);
351 #define GL_GLEXT_PROTOTYPES 352 #if defined(__MSWINDOWS__)
void APIENTRY glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, void *pixels)
void APIENTRY glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border)
void APIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor)
GLfloat GLfloat GLfloat alpha
GLint GLint GLint yoffset
GLint GLint GLsizei GLint border
void APIENTRY glTexParameteri(GLenum target, GLenum pname, GLint param)
void APIENTRY glDrawArrays(GLenum mode, GLint first, GLsizei count)
void APIENTRY glGetFloatv(GLenum pname, GLfloat *data)
void APIENTRY glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
void APIENTRY glGetPointerv(GLenum pname, void **params)
void APIENTRY glDepthMask(GLboolean flag)
void APIENTRY glDepthRange(GLdouble near, GLdouble far)
GLboolean APIENTRY glIsTexture(GLuint texture)
void APIENTRY glTexParameterf(GLenum target, GLenum pname, GLfloat param)
void APIENTRY glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
void APIENTRY glLineWidth(GLfloat width)
void APIENTRY glStencilMask(GLuint mask)
void APIENTRY glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
void APIENTRY glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels)
void APIENTRY glDeleteTextures(GLsizei n, const GLuint *textures)
GLuint const GLchar * name
void APIENTRY glGetTexParameteriv(GLenum target, GLenum pname, GLint *params)
void APIENTRY glTexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
void APIENTRY glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels)
void APIENTRY glPixelStorei(GLenum pname, GLint param)
void APIENTRY glLogicOp(GLenum opcode)
GLint GLint GLsizei GLsizei GLsizei depth
void APIENTRY glBindTexture(GLenum target, GLuint texture)
GLenum APIENTRY glGetError()
void APIENTRY glReadBuffer(GLenum src)
void APIENTRY glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params)
GLsizei GLenum const void * indices
GLint GLint internalformat
void APIENTRY glDrawBuffer(GLenum buf)
int __stdcall wglGetSwapIntervalEXT(void)
void APIENTRY glTexParameteriv(GLenum target, GLenum pname, const GLint *params)
const GLubyte *APIENTRY glGetString(GLenum name)
int __stdcall wglSwapIntervalEXT(int interval)
void APIENTRY glGenTextures(GLsizei n, GLuint *textures)
void APIENTRY glDrawElements(GLenum mode, GLsizei count, GLenum type, const void *indices)
void APIENTRY glStencilFunc(GLenum func, GLint ref, GLuint mask)
void InitializeOpenGL(int &major, int &minor, char const *infofile)
void APIENTRY glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
void APIENTRY glHint(GLenum target, GLenum mode)
void APIENTRY glCullFace(GLenum mode)
GLint GLint GLsizei GLint GLenum format
GLint GLsizei GLsizei height
void APIENTRY glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat *params)
void APIENTRY glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels)
GLint GLint GLsizei GLint GLenum GLenum const void * pixels
void APIENTRY glClearDepth(GLdouble depth)
void APIENTRY glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
void APIENTRY glGetBooleanv(GLenum pname, GLboolean *data)
void APIENTRY glGetIntegerv(GLenum pname, GLint *data)
void APIENTRY glTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels)
void APIENTRY glPolygonOffset(GLfloat factor, GLfloat units)
void APIENTRY glClear(GLbitfield mask)
GLenum const GLfloat * params
void APIENTRY glGetDoublev(GLenum pname, GLdouble *data)
void APIENTRY glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
void APIENTRY glClearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
void APIENTRY glDisable(GLenum cap)
void APIENTRY glPointSize(GLfloat size)
void APIENTRY glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels)
void APIENTRY glFrontFace(GLenum mode)
void APIENTRY glClearStencil(GLint s)
void APIENTRY glDepthFunc(GLenum func)
void APIENTRY glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
void APIENTRY glPixelStoref(GLenum pname, GLfloat param)
void APIENTRY glPolygonMode(GLenum face, GLenum mode)
void APIENTRY glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params)
GLenum GLuint GLint GLenum face
GLint GLint GLsizei GLint GLenum GLenum type
GLboolean APIENTRY glIsEnabled(GLenum cap)
void APIENTRY glEnable(GLenum cap)