]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_glx.c
Cleaned up a bit..
[xonotic/darkplaces.git] / vid_glx.c
index 14f9c268eb75b0e1f55cefd5af1ea06883246cc9..16e012ab16a410e11117551ca53af04a90ba1993 100644 (file)
--- a/vid_glx.c
+++ b/vid_glx.c
@@ -82,13 +82,6 @@ static qboolean vidmode_active = false;
 
 /*-----------------------------------------------------------------------*/
 
-//int          texture_mode = GL_NEAREST;
-//int          texture_mode = GL_NEAREST_MIPMAP_NEAREST;
-//int          texture_mode = GL_NEAREST_MIPMAP_LINEAR;
-int            texture_mode = GL_LINEAR;
-//int          texture_mode = GL_LINEAR_MIPMAP_NEAREST;
-//int          texture_mode = GL_LINEAR_MIPMAP_LINEAR;
-
 int            texture_extension_number = 1;
 
 float          gldepthmin, gldepthmax;
@@ -597,25 +590,8 @@ void GL_Init (void)
        // LordHavoc: report supported extensions
        Con_Printf ("\nQSG extensions: %s\n", QSG_EXTENSIONS);
 
-//     glClearColor (1,0,0,0);
        glCullFace(GL_FRONT);
-//     glEnable(GL_TEXTURE_2D);
-//
-//     glEnable(GL_ALPHA_TEST);
        glAlphaFunc(GL_GREATER, 0.5);
-//
-//     glPolygonMode (GL_FRONT_AND_BACK, GL_FILL);
-//     glShadeModel (GL_FLAT);
-//
-//     glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
-//     glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-//     glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
-//     glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
-//
-//     glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-//
-//     glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
-//     glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
 }
 
 /*
@@ -639,6 +615,8 @@ void GL_BeginRendering (int *x, int *y, int *width, int *height)
 
 void GL_EndRendering (void)
 {
+       if (!r_render.value)
+               return;
        glFlush();
        glXSwapBuffers(dpy, win);
 }
@@ -735,11 +713,6 @@ void VID_Init(unsigned char *palette)
        Cvar_RegisterVariable (&in_dgamouse);
        Cvar_RegisterVariable (&m_filter);
        
-       vid.maxwarpwidth = WARP_WIDTH;
-       vid.maxwarpheight = WARP_HEIGHT;
-       vid.colormap = host_colormap;
-       vid.fullbright = 256 - LittleLong (*((int *)vid.colormap + 2048));
-
 // interpret command-line params
 
 // set vid parameters
@@ -877,7 +850,6 @@ void VID_Init(unsigned char *palette)
        vid.height = vid.conheight;
 
        vid.aspect = ((float)vid.height / (float)vid.width) * (320.0 / 240.0);
-       vid.numpages = 2;
 
        InitSig(); // trap evil signals