]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - glquake.h
Fixed findkeysforcommand hopefully.
[xonotic/darkplaces.git] / glquake.h
index ef65f0d1b4b903f49f8ecbd4b5ff811faf851fd0..d871480c16376dece9f5b80b43bd70fb1453be75 100644 (file)
--- a/glquake.h
+++ b/glquake.h
@@ -26,16 +26,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #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
 
-#ifdef _WIN32
-#include <windows.h>
-#define strcasecmp stricmp
-#define strncasecmp strnicmp
-#endif
-
-//#include <GL/gl.h>
 
 //====================================================
 
@@ -118,6 +110,8 @@ typedef double GLclampd;
 #define GL_TEXTURE_MAG_FILTER                  0x2800
 #define GL_TEXTURE_MIN_FILTER                  0x2801
 #define GL_UNPACK_ALIGNMENT                    0x0CF5
+#define GL_TEXTURE_BINDING_1D                   0x8068
+#define GL_TEXTURE_BINDING_2D                   0x8069
 
 #define GL_NEAREST                             0x2600
 #define GL_LINEAR                              0x2601
@@ -126,13 +120,26 @@ typedef double GLclampd;
 #define GL_LINEAR_MIPMAP_NEAREST               0x2701
 #define GL_LINEAR_MIPMAP_LINEAR                        0x2703
 
+extern int gl_support_anisotropy;
+#define GL_TEXTURE_MAX_ANISOTROPY_EXT          0x84FE
+#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT      0x84FF
+
 #define GL_DECAL                               0x2101
 #define GL_MODULATE                            0x2100
 
 #define GL_REPEAT                              0x2901
 #define GL_CLAMP                               0x2900
 
-#define GL_TRIANGLES                           0x0004
+#define GL_POINTS                              0x0000
+#define GL_LINES                               0x0001
+#define GL_LINE_LOOP                   0x0002
+#define GL_LINE_STRIP                  0x0003
+#define GL_TRIANGLES                   0x0004
+#define GL_TRIANGLE_STRIP              0x0005
+#define GL_TRIANGLE_FAN                        0x0006
+#define GL_QUADS                               0x0007
+#define GL_QUAD_STRIP                  0x0008
+#define GL_POLYGON                             0x0009
 
 #define GL_FALSE                               0x0
 #define GL_TRUE                                        0x1
@@ -203,11 +210,18 @@ typedef double GLclampd;
 #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 *qglMultiTexCoord3f) (GLenum, GLfloat, GLfloat, GLfloat);
 extern void (GLAPIENTRY *qglActiveTexture) (GLenum);
 extern void (GLAPIENTRY *qglClientActiveTexture) (GLenum);
 #ifndef GL_ACTIVE_TEXTURE_ARB
@@ -289,6 +303,17 @@ extern int gl_combine_extension;
 
 extern cvar_t gl_combine;
 
+extern int gl_textureshader;
+#ifndef GL_TEXTURE_SHADER_NV
+#define GL_TEXTURE_SHADER_NV                   0x86DE
+#define GL_SHADER_OPERATION_NV                 0x86DF
+#define GL_OFFSET_TEXTURE_MATRIX_NV            0x86E1
+#define GL_PREVIOUS_TEXTURE_INPUT_NV   0x86E4
+#define GL_OFFSET_TEXTURE_2D_NV                        0x86E8
+#define GL_DSDT_NV                                             0x86F5
+#define GL_DSDT8_NV                                            0x8709
+#endif
+
 extern int gl_texture3d;
 #ifndef GL_TEXTURE_3D
 #define GL_PACK_SKIP_IMAGES                    0x806B
@@ -342,6 +367,28 @@ extern int gl_dot3ext;
 #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);
@@ -352,18 +399,18 @@ extern void (GLAPIENTRY *qglClear)(GLbitfield mask);
 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 *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 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 *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);
@@ -380,13 +427,14 @@ extern void (GLAPIENTRY *qglColorMask)(GLboolean red, GLboolean green, GLboolean
 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 *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 *qglTexCoord3f)(GLfloat s, GLfloat t, GLfloat r);
 extern void (GLAPIENTRY *qglVertex2f)(GLfloat x, GLfloat y);
 extern void (GLAPIENTRY *qglVertex3f)(GLfloat x, GLfloat y, GLfloat z);
 extern void (GLAPIENTRY *qglBegin)(GLenum mode);
@@ -399,16 +447,16 @@ extern void (GLAPIENTRY *qglViewport)(GLint x, GLint y, GLsizei width, GLsizei h
 //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 *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 *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 *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);
 
@@ -417,19 +465,20 @@ 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 *qglTexEnvf)(GLenum target, GLenum pname, GLfloat param);
+extern void (GLAPIENTRY *qglTexEnvfv)(GLenum target, GLenum pname, const GLfloat *params);
 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 *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 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 *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);
@@ -441,6 +490,8 @@ extern void (GLAPIENTRY *qglCopyTexImage2D)(GLenum target, GLint level, GLenum i
 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);
@@ -457,7 +508,7 @@ extern BOOL (WINAPI *qwglSwapIntervalEXT)(int interval);
 #define DEBUGGL
 
 #ifdef DEBUGGL
-#define CHECKGLERROR if ((errornumber = qglGetError())) GL_PrintError(errornumber, __FILE__, __LINE__);
+#define CHECKGLERROR {if (gl_printcheckerror.integer) Con_Printf("CHECKGLERROR at %s:%d\n", __FILE__, __LINE__);if (gl_paranoid.integer && (errornumber = qglGetError())) GL_PrintError(errornumber, __FILE__, __LINE__);}
 extern int errornumber;
 void GL_PrintError(int errornumber, char *filename, int linenumber);
 #else