]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_textures.c
added -benchmark commandline option
[xonotic/darkplaces.git] / gl_textures.c
index 4c9b11ac4f5a33b230ba0a45eb3d731a3e1b1eb7..ad9a4ca947caf50e3d2fae6e59832a544405fdb7 100644 (file)
@@ -338,11 +338,11 @@ static void GL_TextureMode_f (void)
                {
                        if (gl_filter_min == modes[i].minification)
                        {
-                               Con_Printf ("%s\n", modes[i].name);
+                               Con_Printf("%s\n", modes[i].name);
                                return;
                        }
                }
-               Con_Print("current filter is unknown???\n");
+               Con_Print("current filter is unknown???\n");
                return;
        }
 
@@ -351,7 +351,7 @@ static void GL_TextureMode_f (void)
                        break;
        if (i == 6)
        {
-               Con_Print("bad filter name\n");
+               Con_Print("bad filter name\n");
                return;
        }
 
@@ -365,7 +365,7 @@ static void GL_TextureMode_f (void)
                for (image = pool->imagechain;image;image = image->imagechain)
                {
                        // only update already uploaded images
-                       if (!(image->flags & GLTEXF_UPLOAD))
+                       if (!(image->flags & GLTEXF_UPLOAD) && !(image->flags & (TEXF_FORCENEAREST | TEXF_FORCELINEAR)))
                        {
                                qglGetIntegerv(gltexturetypebindingenums[image->texturetype], &oldbindtexnum);
                                qglBindTexture(gltexturetypeenums[image->texturetype], image->texnum);
@@ -452,7 +452,7 @@ static void R_TextureStats_f(void)
        int loaded;
        gltexture_t *glt;
        gltexturepool_t *pool;
-       Con_Printf("glsize input loaded mip alpha name\n");
+       Con_Print("glsize input loaded mip alpha name\n");
        for (pool = gltexturepoolchain;pool;pool = pool->next)
        {
                for (glt = pool->gltchain;glt;glt = glt->chain)
@@ -631,7 +631,7 @@ static void R_Upload(gltexture_t *glt, qbyte *data)
                if (glt->image->flags & GLTEXF_UPLOAD)
                {
                        glt->image->flags &= ~GLTEXF_UPLOAD;
-                       Con_DPrintf("uploaded new fragments image\n");
+                       Con_DPrint("uploaded new fragments image\n");
                        R_MakeResizeBufferBigger(glt->image->width * glt->image->height * glt->image->depth * glt->image->bytesperpixel);
                        memset(resizebuffer, 255, glt->image->width * glt->image->height * glt->image->depth * glt->image->bytesperpixel);
                        switch(glt->image->texturetype)
@@ -786,7 +786,7 @@ static void R_Upload(gltexture_t *glt, qbyte *data)
                        for (i = 0;i < 6;i++)
                        {
                                prevbuffer = texturebuffer;
-                               texturebuffer += width * height * depth * glt->textype->inputbytesperpixel;
+                               texturebuffer += glt->width * glt->height * glt->depth * glt->textype->inputbytesperpixel;
                                if (glt->width != width || glt->height != height || glt->depth != depth)
                                {
                                        Image_Resample(prevbuffer, glt->width, glt->height, glt->depth, resizebuffer, width, height, depth, glt->image->bytesperpixel, r_lerpimages.integer);