]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_textures.c
fix an uninitialized variable warning in win32
[xonotic/darkplaces.git] / gl_textures.c
index cab9f636b450bd135bb4be3df5b18eda327d8ffb..8ed0cca9b8d74b6a935475b3457b17694ba9f080 100644 (file)
@@ -372,7 +372,6 @@ static void GL_TextureMode_f (void)
                        }
                }
        }
-       gl_backend_rebindtextures = true;
 }
 
 static int R_CalcTexelDataSize (gltexture_t *glt)
@@ -478,7 +477,9 @@ static void r_textures_start(void)
        texturedatamempool = Mem_AllocPool("Texture Storage (not yet uploaded)");
        textureprocessingmempool = Mem_AllocPool("Texture Processing Buffers");
 
-       JPEG_OpenLibrary ();
+       // Disable JPEG screenshots if the DLL isn't loaded
+       if (! JPEG_OpenLibrary ())
+               Cvar_SetValueQuick (&scr_screenshot_jpeg, 0);
 }
 
 static void r_textures_shutdown(void)
@@ -606,6 +607,8 @@ static void R_Upload(gltexture_t *glt, qbyte *data)
        qbyte *prevbuffer;
        prevbuffer = data;
 
+       R_Mesh_EndBatch();
+
        CHECKGLERROR
 
        glt->texnum = glt->image->texnum;