]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - glquake.h
customizable loading screen picture scale, including limiting to screen bounds in...
[xonotic/darkplaces.git] / glquake.h
index 26f1771471d3314bc04bf9041dcd08a99346ffa5..bb9220f4cdf9d337adf4936926d6a5816ca083e6 100644 (file)
--- a/glquake.h
+++ b/glquake.h
@@ -24,8 +24,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 // 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 : 4244)     // LordHavoc: MSVC++ 4 x86, double/float
+//#pragma warning(disable : 4305)              // LordHavoc: MSVC++ 6 x86, double/float
+//#pragma warning(disable : 4706)              // LordHavoc: MSVC++ 2008 x86, assignment within conditional expression
+//#pragma warning(disable : 4127)              // LordHavoc: MSVC++ 2008 x86, conditional expression is constant
+//#pragma warning(disable : 4100)              // LordHavoc: MSVC++ 2008 x86, unreferenced formal parameter
+//#pragma warning(disable : 4055)              // LordHavoc: MSVC++ 2008 x86, 'type cast' from data pointer   to function pointer
+//#pragma warning(disable : 4054)              // LordHavoc: MSVC++ 2008 x86, 'type cast' from function pointer   to data pointer
 #endif
 
 
@@ -124,6 +129,11 @@ typedef ptrdiff_t GLsizeiptrARB;
 #define GL_UNPACK_ALIGNMENT                    0x0CF5
 #define GL_TEXTURE_BINDING_1D                   0x8068
 #define GL_TEXTURE_BINDING_2D                   0x8069
+#define GL_TEXTURE_INTERNAL_FORMAT             0x1003
+#define GL_TEXTURE_MIN_LOD                     0x813A
+#define GL_TEXTURE_MAX_LOD                     0x813B
+#define GL_TEXTURE_BASE_LEVEL                  0x813C
+#define GL_TEXTURE_MAX_LEVEL                   0x813D
 
 #define GL_NEAREST                             0x2600
 #define GL_LINEAR                              0x2601
@@ -204,6 +214,7 @@ typedef ptrdiff_t GLsizeiptrARB;
 #define GL_OUT_OF_MEMORY                       0x0505
 
 #define GL_DITHER                              0x0BD0
+#define GL_ALPHA                               0x1906
 #define GL_RGB                                 0x1907
 #define GL_RGBA                                        0x1908
 
@@ -330,10 +341,6 @@ extern void (GLAPIENTRY *qglClientActiveTexture) (GLenum);
 #define GL_TEXTURE31_ARB                               0x84DF
 #endif
 
-// GL_EXT_compiled_vertex_array
-extern void (GLAPIENTRY *qglLockArraysEXT) (GLint first, GLint count);
-extern void (GLAPIENTRY *qglUnlockArraysEXT) (void);
-
 // GL_ARB_texture_env_combine
 #ifndef GL_COMBINE_ARB
 #define GL_COMBINE_ARB                                 0x8570
@@ -399,15 +406,6 @@ extern void (GLAPIENTRY *qglCopyTexSubImage3D)(GLenum target, GLint level, GLint
 #define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB               0x851C
 #endif
 
-#ifndef GL_TEXTURE_RECTANGLE_ARB
-#define GL_TEXTURE_RECTANGLE_ARB            0x84F5
-#define GL_TEXTURE_BINDING_RECTANGLE_ARB    0x84F6
-#define GL_PROXY_TEXTURE_RECTANGLE_ARB      0x84F7
-#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB   0x84F8
-#define GL_SAMPLER_2D_RECT_ARB              0x8B63
-#define GL_SAMPLER_2D_RECT_SHADOW_ARB       0x8B64
-#endif
-
 #ifndef GL_DEPTH_COMPONENT16_ARB
 #define GL_DEPTH_COMPONENT16_ARB       0x81A5
 #define GL_DEPTH_COMPONENT24_ARB       0x81A6
@@ -574,6 +572,29 @@ extern void (GLAPIENTRY *qglFramebufferRenderbufferEXT)(GLenum target, GLenum at
 extern void (GLAPIENTRY *qglGetFramebufferAttachmentParameterivEXT)(GLenum target, GLenum attachment, GLenum pname, GLint *params);
 extern void (GLAPIENTRY *qglGenerateMipmapEXT)(GLenum target);
 
+// GL_ARB_draw_buffers
+#ifndef GL_MAX_DRAW_BUFFERS_ARB
+#define GL_MAX_DRAW_BUFFERS_ARB                              0x8824
+#define GL_DRAW_BUFFER0_ARB                                  0x8825
+#define GL_DRAW_BUFFER1_ARB                                  0x8826
+#define GL_DRAW_BUFFER2_ARB                                  0x8827
+#define GL_DRAW_BUFFER3_ARB                                  0x8828
+#define GL_DRAW_BUFFER4_ARB                                  0x8829
+#define GL_DRAW_BUFFER5_ARB                                  0x882A
+#define GL_DRAW_BUFFER6_ARB                                  0x882B
+#define GL_DRAW_BUFFER7_ARB                                  0x882C
+#define GL_DRAW_BUFFER8_ARB                                  0x882D
+#define GL_DRAW_BUFFER9_ARB                                  0x882E
+#define GL_DRAW_BUFFER10_ARB                                 0x882F
+#define GL_DRAW_BUFFER11_ARB                                 0x8830
+#define GL_DRAW_BUFFER12_ARB                                 0x8831
+#define GL_DRAW_BUFFER13_ARB                                 0x8832
+#define GL_DRAW_BUFFER14_ARB                                 0x8833
+#define GL_DRAW_BUFFER15_ARB                                 0x8834
+#endif
+extern void (GLAPIENTRY *qglDrawBuffersARB)(GLsizei n, const GLenum *bufs);
+
+
 extern void (GLAPIENTRY *qglScissor)(GLint x, GLint y, GLsizei width, GLsizei height);
 
 extern void (GLAPIENTRY *qglClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
@@ -611,12 +632,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 *qglDrawArrays)(GLenum mode, GLint first, GLsizei count);
 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 *qglColor4ub)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
 extern void (GLAPIENTRY *qglColor4f)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
 extern void (GLAPIENTRY *qglTexCoord1f)(GLfloat s);
 extern void (GLAPIENTRY *qglTexCoord2f)(GLfloat s, GLfloat t);
@@ -624,26 +647,27 @@ extern void (GLAPIENTRY *qglTexCoord3f)(GLfloat s, GLfloat t, GLfloat r);
 extern void (GLAPIENTRY *qglTexCoord4f)(GLfloat s, GLfloat t, GLfloat r, GLfloat q);
 extern void (GLAPIENTRY *qglVertex2f)(GLfloat x, GLfloat y);
 extern void (GLAPIENTRY *qglVertex3f)(GLfloat x, GLfloat y, GLfloat z);
+extern void (GLAPIENTRY *qglVertex4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
 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 *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 *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 *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 *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);
 
@@ -658,6 +682,11 @@ 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 *qglGetTexParameterfv)(GLenum target, GLenum pname, GLfloat *params);
+extern void (GLAPIENTRY *qglGetTexParameteriv)(GLenum target, GLenum pname, GLint *params);
+extern void (GLAPIENTRY *qglGetTexLevelParameterfv)(GLenum target, GLint level, GLenum pname, GLfloat *params);
+extern void (GLAPIENTRY *qglGetTexLevelParameteriv)(GLenum target, GLint level, GLenum pname, GLint *params);
+extern void (GLAPIENTRY *qglGetTexImage)(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);
 extern void (GLAPIENTRY *qglHint)(GLenum target, GLenum mode);
 
 extern void (GLAPIENTRY *qglGenTextures)(GLsizei n, GLuint *textures);
@@ -665,8 +694,8 @@ 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 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);
@@ -681,8 +710,8 @@ extern void (GLAPIENTRY *qglCopyTexSubImage2D)(GLenum target, GLint level, GLint
 extern void (GLAPIENTRY *qglPolygonOffset)(GLfloat factor, GLfloat units);
 extern void (GLAPIENTRY *qglPolygonMode)(GLenum face, GLenum mode);
 
-extern void (GLAPIENTRY *qglClipPlane)(GLenum plane, const GLdouble *equation);
-extern void (GLAPIENTRY *qglGetClipPlane)(GLenum plane, GLdouble *equation);
+//extern void (GLAPIENTRY *qglClipPlane)(GLenum plane, const GLdouble *equation);
+//extern void (GLAPIENTRY *qglGetClipPlane)(GLenum plane, GLdouble *equation);
 
 //[515]: added on 29.07.2005
 extern void (GLAPIENTRY *qglLineWidth)(GLfloat width);
@@ -886,6 +915,14 @@ extern void (GLAPIENTRY *qglGetCompressedTexImageARB)(GLenum target, GLint lod,
 #define GL_COMPRESSED_TEXTURE_FORMATS_ARB                      0x86A3
 #endif
 
+// GL_EXT_texture_compression_s3tc
+#ifndef GL_COMPRESSED_RGB_S3TC_DXT1_EXT
+#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT                   0x83F0
+#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT                  0x83F1
+#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT                  0x83F2
+#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT                  0x83F3
+#endif
+
 // GL_ARB_occlusion_query
 extern void (GLAPIENTRY *qglGenQueriesARB)(GLsizei n, GLuint *ids);
 extern void (GLAPIENTRY *qglDeleteQueriesARB)(GLsizei n, const GLuint *ids);
@@ -916,9 +953,9 @@ extern void (GLAPIENTRY *qglGetQueryObjectuivARB)(GLuint qid, GLenum pname, GLui
 #define DEBUGGL
 
 #ifdef DEBUGGL
-#define CHECKGLERROR {if (gl_paranoid.integer){if (gl_printcheckerror.integer) Con_Printf("CHECKGLERROR at %s:%d\n", __FILE__, __LINE__);errornumber = qglGetError();if (errornumber) GL_PrintError(errornumber, __FILE__, __LINE__);}}
+#define CHECKGLERROR {if (gl_paranoid.integer){if (gl_printcheckerror.integer) Con_Printf("CHECKGLERROR at %s:%d\n", __FILE__, __LINE__);errornumber = qglGetError ? qglGetError() : 0;if (errornumber) GL_PrintError(errornumber, __FILE__, __LINE__);}}
 extern int errornumber;
-void GL_PrintError(int errornumber, char *filename, int linenumber);
+void GL_PrintError(int errornumber, const char *filename, int linenumber);
 #else
 #define CHECKGLERROR
 #endif