]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_shared.c
some added structures in in preparation for another protocol version bump (to add...
[xonotic/darkplaces.git] / vid_shared.c
index f711424d694479de713b7100e72dd31a0da5b8df..2260f240e2db5ad224b0092b13bc3b5a77679d5f 100644 (file)
@@ -24,6 +24,8 @@ int gl_texture3d = false;
 int gl_texturecubemap = false;
 // GL_ARB_texture_env_dot3
 int gl_dot3arb = false;
+// GL_SGIS_texture_edge_clamp
+int gl_support_clamptoedge = false;
 
 // LordHavoc: if window is hidden, don't update screen
 int vid_hidden = true;
@@ -40,8 +42,8 @@ cvar_t vid_stencil = {CVAR_SAVE, "vid_stencil", "0"};
 cvar_t vid_mouse = {CVAR_SAVE, "vid_mouse", "1"};
 cvar_t gl_combine = {0, "gl_combine", "1"};
 
-cvar_t in_pitch_min = {0, "in_pitch_min", "-90"};
-cvar_t in_pitch_max = {0, "in_pitch_max", "90"};
+cvar_t in_pitch_min = {0, "in_pitch_min", "-70"};
+cvar_t in_pitch_max = {0, "in_pitch_max", "80"};
 
 cvar_t m_filter = {CVAR_SAVE, "m_filter","0"};
 
@@ -127,7 +129,7 @@ void (GLAPIENTRY *qglFrustum)(GLdouble left, GLdouble right, GLdouble bottom, GL
 void (GLAPIENTRY *qglViewport)(GLint x, GLint y, GLsizei width, GLsizei height);
 //void (GLAPIENTRY *qglPushMatrix)(void);
 //void (GLAPIENTRY *qglPopMatrix)(void);
-//void (GLAPIENTRY *qglLoadIdentity)(void);
+void (GLAPIENTRY *qglLoadIdentity)(void);
 //void (GLAPIENTRY *qglLoadMatrixd)(const GLdouble *m);
 void (GLAPIENTRY *qglLoadMatrixf)(const GLfloat *m);
 //void (GLAPIENTRY *qglMultMatrixd)(const GLdouble *m);
@@ -269,7 +271,7 @@ static dllfunction_t opengl110funcs[] =
        {"glViewport", (void **) &qglViewport},
 //     {"glPushMatrix", (void **) &qglPushMatrix},
 //     {"glPopMatrix", (void **) &qglPopMatrix},
-//     {"glLoadIdentity", (void **) &qglLoadIdentity},
+       {"glLoadIdentity", (void **) &qglLoadIdentity},
 //     {"glLoadMatrixd", (void **) &qglLoadMatrixd},
        {"glLoadMatrixf", (void **) &qglLoadMatrixf},
 //     {"glMultMatrixd", (void **) &qglMultMatrixd},
@@ -353,6 +355,7 @@ void VID_CheckExtensions(void)
        gl_dot3arb = false;
        gl_supportslockarrays = false;
        gl_textureunits = 1;
+       gl_support_clamptoedge = false;
 
        if (!GL_CheckExtension("OpenGL 1.1.0", opengl110funcs, NULL, false))
                Sys_Error("OpenGL 1.1.0 functions not found\n");
@@ -379,6 +382,7 @@ void VID_CheckExtensions(void)
        gl_texture3d = GL_CheckExtension("GL_EXT_texture3D", texture3dextfuncs, "-notexture3d", false);
        gl_texturecubemap = GL_CheckExtension("GL_ARB_texture_cube_map", NULL, "-nocubemap", false);
        gl_supportslockarrays = GL_CheckExtension("GL_EXT_compiled_vertex_array", compiledvertexarrayfuncs, "-nocva", false);
+       gl_support_clamptoedge = GL_CheckExtension("GL_EXT_texture_edge_clamp", NULL, "-noedgeclamp", false) || GL_CheckExtension("GL_SGIS_texture_edge_clamp", NULL, "-noedgeclamp", false);
 
        // we don't care if it's an extension or not, they are identical functions, so keep it simple in the rendering code
        if (qglDrawRangeElements == NULL)