/* Copyright (C) 1996-1997 Id Software, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef GLQUAKE_H #define GLQUAKE_H // disable data conversion warnings #ifdef _MSC_VER #pragma warning(disable : 4244) // LordHavoc: MSVC++ 4 x86, double/float #pragma warning(disable : 4305) // LordHavoc: MSVC++ 6 x86, double/float #pragma warning(disable : 4018) // LordHavoc: MSVC++ 4 x86, signed/unsigned mismatch #endif //==================================================== // wgl uses APIENTRY #ifndef APIENTRY #define APIENTRY #endif // for platforms (wgl) that do not use GLAPIENTRY #ifndef GLAPIENTRY #define GLAPIENTRY APIENTRY #endif #ifndef GL_PROJECTION typedef unsigned int GLenum; typedef unsigned char GLboolean; typedef unsigned int GLbitfield; typedef void GLvoid; // 1-byte signed typedef signed char GLbyte; // 2-byte signed typedef short GLshort; // 4-byte signed typedef int GLint; // 1-byte unsigned typedef unsigned char GLubyte; // 2-byte unsigned typedef unsigned short GLushort; // 4-byte unsigned typedef unsigned int GLuint; // 4-byte signed typedef int GLsizei; // single precision float typedef float GLfloat; // single precision float in [0,1] typedef float GLclampf; // double precision float typedef double GLdouble; // double precision float in [0,1] typedef double GLclampd; #define GL_MODELVIEW 0x1700 #define GL_PROJECTION 0x1701 #define GL_TEXTURE 0x1702 #define GL_MATRIX_MODE 0x0BA0 #define GL_MODELVIEW_MATRIX 0x0BA6 #define GL_PROJECTION_MATRIX 0x0BA7 #define GL_TEXTURE_MATRIX 0x0BA8 #define GL_DEPTH_TEST 0x0B71 #define GL_CULL_FACE 0x0B44 #define GL_BLEND 0x0BE2 #define GL_ZERO 0x0 #define GL_ONE 0x1 #define GL_SRC_COLOR 0x0300 #define GL_ONE_MINUS_SRC_COLOR 0x0301 #define GL_DST_COLOR 0x0306 #define GL_ONE_MINUS_DST_COLOR 0x0307 #define GL_SRC_ALPHA 0x0302 #define GL_ONE_MINUS_SRC_ALPHA 0x0303 #define GL_DST_ALPHA 0x0304 #define GL_ONE_MINUS_DST_ALPHA 0x0305 #define GL_SRC_ALPHA_SATURATE 0x0308 #define GL_CONSTANT_COLOR 0x8001 #define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 #define GL_CONSTANT_ALPHA 0x8003 #define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 #define GL_TEXTURE_ENV 0x2300 #define GL_TEXTURE_ENV_MODE 0x2200 #define GL_TEXTURE_1D 0x0DE0 #define GL_TEXTURE_2D 0x0DE1 #define GL_TEXTURE_WRAP_S 0x2802 #define GL_TEXTURE_WRAP_T 0x2803 #define GL_TEXTURE_WRAP_R 0x8072 #define GL_TEXTURE_BORDER_COLOR 0x1004 #define GL_TEXTURE_MAG_FILTER 0x2800 #define GL_TEXTURE_MIN_FILTER 0x2801 #define GL_UNPACK_ALIGNMENT 0x0CF5 #define GL_NEAREST 0x2600 #define GL_LINEAR 0x2601 #define GL_NEAREST_MIPMAP_NEAREST 0x2700 #define GL_NEAREST_MIPMAP_LINEAR 0x2702 #define GL_LINEAR_MIPMAP_NEAREST 0x2701 #define GL_LINEAR_MIPMAP_LINEAR 0x2703 #define GL_DECAL 0x2101 #define GL_MODULATE 0x2100 #define GL_REPEAT 0x2901 #define GL_CLAMP 0x2900 #define GL_TRIANGLES 0x0004 #define GL_FALSE 0x0 #define GL_TRUE 0x1 #define GL_BYTE 0x1400 #define GL_UNSIGNED_BYTE 0x1401 #define GL_SHORT 0x1402 #define GL_UNSIGNED_SHORT 0x1403 #define GL_INT 0x1404 #define GL_UNSIGNED_INT 0x1405 #define GL_FLOAT 0x1406 #define GL_DOUBLE 0x140A #define GL_2_BYTES 0x1407 #define GL_3_BYTES 0x1408 #define GL_4_BYTES 0x1409 #define GL_VERTEX_ARRAY 0x8074 #define GL_NORMAL_ARRAY 0x8075 #define GL_COLOR_ARRAY 0x8076 //#define GL_INDEX_ARRAY 0x8077 #define GL_TEXTURE_COORD_ARRAY 0x8078 //#define GL_EDGE_FLAG_ARRAY 0x8079 #define GL_FRONT 0x0404 #define GL_BACK 0x0405 #define GL_VENDOR 0x1F00 #define GL_RENDERER 0x1F01 #define GL_VERSION 0x1F02 #define GL_EXTENSIONS 0x1F03 #define GL_NO_ERROR 0x0 #define GL_INVALID_VALUE 0x0501 #define GL_INVALID_ENUM 0x0500 #define GL_INVALID_OPERATION 0x0502 #define GL_STACK_OVERFLOW 0x0503 #define GL_STACK_UNDERFLOW 0x0504 #define GL_OUT_OF_MEMORY 0x0505 #define GL_DITHER 0x0BD0 #define GL_RGB 0x1907 #define GL_RGBA 0x1908 #define GL_MAX_TEXTURE_SIZE 0x0D33 #define GL_NEVER 0x0200 #define GL_LESS 0x0201 #define GL_EQUAL 0x0202 #define GL_LEQUAL 0x0203 #define GL_GREATER 0x0204 #define GL_NOTEQUAL 0x0205 #define GL_GEQUAL 0x0206 #define GL_ALWAYS 0x0207 #define GL_DEPTH_TEST 0x0B71 #define GL_RED_SCALE 0x0D14 #define GL_GREEN_SCALE 0x0D18 #define GL_BLUE_SCALE 0x0D1A #define GL_ALPHA_SCALE 0x0D1C #define GL_DEPTH_BUFFER_BIT 0x00000100 #define GL_ACCUM_BUFFER_BIT 0x00000200 #define GL_STENCIL_BUFFER_BIT 0x00000400 #define GL_COLOR_BUFFER_BIT 0x00004000 #define GL_STENCIL_TEST 0x0B90 #define GL_KEEP 0x1E00 #define GL_REPLACE 0x1E01 #define GL_INCR 0x1E02 #define GL_DECR 0x1E03 #define GL_POLYGON_OFFSET_FACTOR 0x8038 #define GL_POLYGON_OFFSET_UNITS 0x2A00 #define GL_POLYGON_OFFSET_POINT 0x2A01 #define GL_POLYGON_OFFSET_LINE 0x2A02 #define GL_POLYGON_OFFSET_FILL 0x8037 #endif // GL_ARB_multitexture extern int gl_textureunits; extern void (GLAPIENTRY *qglMultiTexCoord2f) (GLenum, GLfloat, GLfloat); extern void (GLAPIENTRY *qglActiveTexture) (GLenum); extern void (GLAPIENTRY *qglClientActiveTexture) (GLenum); #ifndef GL_ACTIVE_TEXTURE_ARB #define GL_ACTIVE_TEXTURE_ARB 0x84E0 #define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1 #define GL_MAX_TEXTURE_UNITS_ARB 0x84E2 #define GL_TEXTURE0_ARB 0x84C0 #define GL_TEXTURE1_ARB 0x84C1 #define GL_TEXTURE2_ARB 0x84C2 #define GL_TEXTURE3_ARB 0x84C3 #define GL_TEXTURE4_ARB 0x84C4 #define GL_TEXTURE5_ARB 0x84C5 #define GL_TEXTURE6_ARB 0x84C6 #define GL_TEXTURE7_ARB 0x84C7 #define GL_TEXTURE8_ARB 0x84C8 #define GL_TEXTURE9_ARB 0x84C9 #define GL_TEXTURE10_ARB 0x84CA #define GL_TEXTURE11_ARB 0x84CB #define GL_TEXTURE12_ARB 0x84CC #define GL_TEXTURE13_ARB 0x84CD #define GL_TEXTURE14_ARB 0x84CE #define GL_TEXTURE15_ARB 0x84CF #define GL_TEXTURE16_ARB 0x84D0 #define GL_TEXTURE17_ARB 0x84D1 #define GL_TEXTURE18_ARB 0x84D2 #define GL_TEXTURE19_ARB 0x84D3 #define GL_TEXTURE20_ARB 0x84D4 #define GL_TEXTURE21_ARB 0x84D5 #define GL_TEXTURE22_ARB 0x84D6 #define GL_TEXTURE23_ARB 0x84D7 #define GL_TEXTURE24_ARB 0x84D8 #define GL_TEXTURE25_ARB 0x84D9 #define GL_TEXTURE26_ARB 0x84DA #define GL_TEXTURE27_ARB 0x84DB #define GL_TEXTURE28_ARB 0x84DC #define GL_TEXTURE29_ARB 0x84DD #define GL_TEXTURE30_ARB 0x84DE #define GL_TEXTURE31_ARB 0x84DF #endif // GL_EXT_compiled_vertex_array extern int gl_supportslockarrays; extern void (GLAPIENTRY *qglLockArraysEXT) (GLint first, GLint count); extern void (GLAPIENTRY *qglUnlockArraysEXT) (void); // GL_ARB_texture_env_combine extern int gl_combine_extension; #ifndef GL_COMBINE_ARB #define GL_COMBINE_ARB 0x8570 #define GL_COMBINE_RGB_ARB 0x8571 #define GL_COMBINE_ALPHA_ARB 0x8572 #define GL_SOURCE0_RGB_ARB 0x8580 #define GL_SOURCE1_RGB_ARB 0x8581 #define GL_SOURCE2_RGB_ARB 0x8582 #define GL_SOURCE0_ALPHA_ARB 0x8588 #define GL_SOURCE1_ALPHA_ARB 0x8589 #define GL_SOURCE2_ALPHA_ARB 0x858A #define GL_OPERAND0_RGB_ARB 0x8590 #define GL_OPERAND1_RGB_ARB 0x8591 #define GL_OPERAND2_RGB_ARB 0x8592 #define GL_OPERAND0_ALPHA_ARB 0x8598 #define GL_OPERAND1_ALPHA_ARB 0x8599 #define GL_OPERAND2_ALPHA_ARB 0x859A #define GL_RGB_SCALE_ARB 0x8573 #define GL_ADD_SIGNED_ARB 0x8574 #define GL_INTERPOLATE_ARB 0x8575 #define GL_SUBTRACT_ARB 0x84E7 #define GL_CONSTANT_ARB 0x8576 #define GL_PRIMARY_COLOR_ARB 0x8577 #define GL_PREVIOUS_ARB 0x8578 #endif #ifndef GL_MAX_ELEMENTS_VERTICES #define GL_MAX_ELEMENTS_VERTICES 0x80E8 #endif #ifndef GL_MAX_ELEMENTS_INDICES #define GL_MAX_ELEMENTS_INDICES 0x80E9 #endif extern cvar_t gl_combine; extern int gl_texture3d; #ifndef GL_TEXTURE_3D #define GL_PACK_SKIP_IMAGES 0x806B #define GL_PACK_IMAGE_HEIGHT 0x806C #define GL_UNPACK_SKIP_IMAGES 0x806D #define GL_UNPACK_IMAGE_HEIGHT 0x806E #define GL_TEXTURE_3D 0x806F #define GL_PROXY_TEXTURE_3D 0x8070 #define GL_TEXTURE_DEPTH 0x8071 #define GL_TEXTURE_WRAP_R 0x8072 #define GL_MAX_3D_TEXTURE_SIZE 0x8073 #define GL_TEXTURE_BINDING_3D 0x806A extern void (GLAPIENTRY *qglTexImage3D)(GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); extern void (GLAPIENTRY *qglTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); extern void (GLAPIENTRY *qglCopyTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); #endif extern int gl_texturecubemap; #ifndef GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB #define GL_NORMAL_MAP_ARB 0x8511 #define GL_REFLECTION_MAP_ARB 0x8512 #define GL_TEXTURE_CUBE_MAP_ARB 0x8513 #define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A #define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B #define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C #endif extern int gl_dot3arb; #ifndef GL_DOT3_RGB_ARB #define GL_DOT3_RGB_ARB 0x86AE #define GL_DOT3_RGBA_ARB 0x86AF #endif /* // uncomment if this is actually needed by anyone extern int gl_dot3ext; #ifndef GL_DOT3_RGB_EXT #define GL_DOT3_RGB_EXT 0x8740 #define GL_DOT3_RGBA_EXT 0x8741 #endif */ #ifndef GL_SCISSOR_TEST #define GL_SCISSOR_TEST 0x0C11 #define GL_SCISSOR_BOX 0x0C10 #endif // GL_SGIS_texture_edge_clamp or GL_EXT_texture_edge_clamp extern int gl_support_clamptoedge; #ifndef GL_CLAMP_TO_EDGE #define GL_CLAMP_TO_EDGE 0x812F #endif //GL_NV_vertex_array_range extern GLvoid *(GLAPIENTRY *qglAllocateMemoryNV)(GLsizei size, GLfloat readFrequency, GLfloat writeFrequency, GLfloat priority); extern GLvoid (GLAPIENTRY *qglFreeMemoryNV)(GLvoid *pointer); extern GLvoid (GLAPIENTRY *qglVertexArrayRangeNV)(GLsizei length, GLvoid *pointer); extern GLvoid (GLAPIENTRY *qglFlushVertexArrayRangeNV)(GLvoid); #define GL_VERTEX_ARRAY_RANGE_NV 0x851D #define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E #define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520 #define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521 extern int gl_support_var; //GL_NV_vertex_array_range2 #define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533 extern int gl_support_var2; extern void (GLAPIENTRY *qglScissor)(GLint x, GLint y, GLsizei width, GLsizei height); extern void (GLAPIENTRY *qglClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); extern void (GLAPIENTRY *qglClear)(GLbitfield mask); //extern void (GLAPIENTRY *qglAlphaFunc)(GLenum func, GLclampf ref); extern void (GLAPIENTRY *qglBlendFunc)(GLenum sfactor, GLenum dfactor); extern void (GLAPIENTRY *qglCullFace)(GLenum mode); //extern void (GLAPIENTRY *qglDrawBuffer)(GLenum mode); //extern void (GLAPIENTRY *qglReadBuffer)(GLenum mode); extern void (GLAPIENTRY *qglEnable)(GLenum cap); extern void (GLAPIENTRY *qglDisable)(GLenum cap); //extern GLboolean GLAPIENTRY *qglIsEnabled)(GLenum cap); extern void (GLAPIENTRY *qglEnableClientState)(GLenum cap); extern void (GLAPIENTRY *qglDisableClientState)(GLenum cap); //extern void (GLAPIENTRY *qglGetBooleanv)(GLenum pname, GLboolean *params); //extern void (GLAPIENTRY *qglGetDoublev)(GLenum pname, GLdouble *params); //extern void (GLAPIENTRY *qglGetFloatv)(GLenum pname, GLfloat *params); extern void (GLAPIENTRY *qglGetIntegerv)(GLenum pname, GLint *params); extern GLenum (GLAPIENTRY *qglGetError)(void); extern const GLubyte* (GLAPIENTRY *qglGetString)(GLenum name); extern void (GLAPIENTRY *qglFinish)(void); extern void (GLAPIENTRY *qglFlush)(void); extern void (GLAPIENTRY *qglClearDepth)(GLclampd depth); extern void (GLAPIENTRY *qglDepthFunc)(GLenum func); extern void (GLAPIENTRY *qglDepthMask)(GLboolean flag); //extern void (GLAPIENTRY *qglDepthRange)(GLclampd near_val, GLclampd far_val); extern void (GLAPIENTRY *qglColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); extern void (GLAPIENTRY *qglDrawRangeElements)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); extern void (GLAPIENTRY *qglDrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices); extern void (GLAPIENTRY *qglVertexPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr); //extern void (GLAPIENTRY *qglNormalPointer)(GLenum type, GLsizei stride, const GLvoid *ptr); extern void (GLAPIENTRY *qglColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr); extern void (GLAPIENTRY *qglTexCoordPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr); //extern void (GLAPIENTRY *qglArrayElement)(GLint i); extern void (GLAPIENTRY *qglColor4f)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); //extern void (GLAPIENTRY *qglTexCoord2f)(GLfloat s, GLfloat t); //extern void (GLAPIENTRY *qglVertex2f)(GLfloat x, GLfloat y); //extern void (GLAPIENTRY *qglVertex3f)(GLfloat x, GLfloat y, GLfloat z); //extern void (GLAPIENTRY *qglBegin)(GLenum mode); //extern void (GLAPIENTRY *qglEnd)(void); extern void (GLAPIENTRY *qglMatrixMode)(GLenum mode); extern void (GLAPIENTRY *qglOrtho)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val); extern void (GLAPIENTRY *qglFrustum)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val); extern void (GLAPIENTRY *qglViewport)(GLint x, GLint y, GLsizei width, GLsizei height); //extern void (GLAPIENTRY *qglPushMatrix)(void); //extern void (GLAPIENTRY *qglPopMatrix)(void); extern void (GLAPIENTRY *qglLoadIdentity)(void); //extern void (GLAPIENTRY *qglLoadMatrixd)(const GLdouble *m); extern void (GLAPIENTRY *qglLoadMatrixf)(const GLfloat *m); //extern void (GLAPIENTRY *qglMultMatrixd)(const GLdouble *m); //extern void (GLAPIENTRY *qglMultMatrixf)(const GLfloat *m); //extern void (GLAPIENTRY *qglRotated)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z); //extern void (GLAPIENTRY *qglRotatef)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z); //extern void (GLAPIENTRY *qglScaled)(GLdouble x, GLdouble y, GLdouble z); //extern void (GLAPIENTRY *qglScalef)(GLfloat x, GLfloat y, GLfloat z); //extern void (GLAPIENTRY *qglTranslated)(GLdouble x, GLdouble y, GLdouble z); //extern void (GLAPIENTRY *qglTranslatef)(GLfloat x, GLfloat y, GLfloat z); extern void (GLAPIENTRY *qglReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels); extern void (GLAPIENTRY *qglStencilFunc)(GLenum func, GLint ref, GLuint mask); extern void (GLAPIENTRY *qglStencilMask)(GLuint mask); extern void (GLAPIENTRY *qglStencilOp)(GLenum fail, GLenum zfail, GLenum zpass); extern void (GLAPIENTRY *qglClearStencil)(GLint s); //extern void (GLAPIENTRY *qglTexEnvf)(GLenum target, GLenum pname, GLfloat param); extern void (GLAPIENTRY *qglTexEnvi)(GLenum target, GLenum pname, GLint param); //extern void (GLAPIENTRY *qglTexParameterf)(GLenum target, GLenum pname, GLfloat param); //extern void (GLAPIENTRY *qglTexParameterfv)(GLenum target, GLenum pname, GLfloat *params); extern void (GLAPIENTRY *qglTexParameteri)(GLenum target, GLenum pname, GLint param); extern void (GLAPIENTRY *qglGenTextures)(GLsizei n, GLuint *textures); extern void (GLAPIENTRY *qglDeleteTextures)(GLsizei n, const GLuint *textures); extern void (GLAPIENTRY *qglBindTexture)(GLenum target, GLuint texture); //extern void (GLAPIENTRY *qglPrioritizeTextures)(GLsizei n, const GLuint *textures, const GLclampf *priorities); //extern GLboolean (GLAPIENTRY *qglAreTexturesResident)(GLsizei n, const GLuint *textures, GLboolean *residences); extern GLboolean (GLAPIENTRY *qglIsTexture)(GLuint texture); //extern void (GLAPIENTRY *qglPixelStoref)(GLenum pname, GLfloat param); extern void (GLAPIENTRY *qglPixelStorei)(GLenum pname, GLint param); extern void (GLAPIENTRY *qglTexImage1D)(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); extern void (GLAPIENTRY *qglTexImage2D)(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); extern void (GLAPIENTRY *qglTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); extern void (GLAPIENTRY *qglTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); extern void (GLAPIENTRY *qglCopyTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); extern void (GLAPIENTRY *qglCopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); extern void (GLAPIENTRY *qglCopyTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); extern void (GLAPIENTRY *qglCopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); extern void (GLAPIENTRY *qglPolygonOffset)(GLfloat factor, GLfloat units); #if WIN32 extern int (WINAPI *qwglChoosePixelFormat)(HDC, CONST PIXELFORMATDESCRIPTOR *); extern int (WINAPI *qwglDescribePixelFormat)(HDC, int, UINT, LPPIXELFORMATDESCRIPTOR); //extern int (WINAPI *qwglGetPixelFormat)(HDC); extern BOOL (WINAPI *qwglSetPixelFormat)(HDC, int, CONST PIXELFORMATDESCRIPTOR *); extern BOOL (WINAPI *qwglSwapBuffers)(HDC); extern HGLRC (WINAPI *qwglCreateContext)(HDC); extern BOOL (WINAPI *qwglDeleteContext)(HGLRC); extern PROC (WINAPI *qwglGetProcAddress)(LPCSTR); extern BOOL (WINAPI *qwglMakeCurrent)(HDC, HGLRC); extern BOOL (WINAPI *qwglSwapIntervalEXT)(int interval); #endif #define DEBUGGL #ifdef DEBUGGL #define CHECKGLERROR if ((errornumber = qglGetError())) GL_PrintError(errornumber, __FILE__, __LINE__); extern int errornumber; void GL_PrintError(int errornumber, char *filename, int linenumber); #else #define CHECKGLERROR #endif #endif