]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
don't use TEXF_ALLOWUPDATES on fully-updated textures such as video
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 23 Aug 2010 15:07:35 +0000 (15:07 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 23 Aug 2010 15:07:35 +0000 (15:07 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10415 d7cf8633-e32d-0410-b094-e92efae38249

cl_gecko.c
cl_video.c
gl_draw.c
gl_rmain.c
r_textures.h

index ec09b5c33199be82a021f44cce6ae0de7ab97fcf..015b9bef0131426323832abd1bc0a26ef44889c3 100644 (file)
@@ -443,7 +443,7 @@ static void cl_gecko_updatecallback( rtexture_t *texture, void* callbackData ) {
 static void cl_gecko_linktexture( clgecko_t *instance ) {
        // TODO: assert that instance->texture == NULL
        instance->texture = R_LoadTexture2D( cl_geckotexturepool, instance->name, 
-               instance->texWidth, instance->texHeight, NULL, TEXTYPE_BGRA, TEXF_ALPHA | TEXF_PERSISTENT | TEXF_ALLOWUPDATES, -1, NULL );
+               instance->texWidth, instance->texHeight, NULL, TEXTYPE_BGRA, TEXF_ALPHA | TEXF_PERSISTENT, -1, NULL );
        R_MakeTextureDynamic( instance->texture, cl_gecko_updatecallback, instance );
        CL_LinkDynTexture( instance->name, instance->texture );
 }
index 12960d786c09fe690218225fffd4f7ba56c05ee0..59a5b6031c9713d5a85c05704f770d9ee1237b1b 100644 (file)
@@ -51,7 +51,7 @@ static void VideoUpdateCallback(rtexture_t *rt, void *data) {
 
 static void LinkVideoTexture( clvideo_t *video ) {
        video->cpif.tex = R_LoadTexture2D( cl_videotexturepool, video->cpif.name,
-               video->cpif.width, video->cpif.height, NULL, TEXTYPE_BGRA, TEXF_PERSISTENT | TEXF_ALLOWUPDATES, -1, NULL );
+               video->cpif.width, video->cpif.height, NULL, TEXTYPE_BGRA, TEXF_PERSISTENT, -1, NULL );
        R_MakeTextureDynamic( video->cpif.tex, VideoUpdateCallback, video );
        CL_LinkDynTexture( video->cpif.name, video->cpif.tex );
 }
index d9bdfac4e7d94f5963084ef383f671d0570d1088..6697db4263d7c1d1e096e1deebcb334fb650ad9f 100644 (file)
--- a/gl_draw.c
+++ b/gl_draw.c
@@ -536,7 +536,7 @@ cachepic_t *Draw_NewPic(const char *picname, int width, int height, int alpha, u
        pic->height = height;
        if (pic->tex)
                R_FreeTexture(pic->tex);
-       pic->tex = R_LoadTexture2D(drawtexturepool, picname, width, height, pixels_bgra, TEXTYPE_BGRA, (alpha ? TEXF_ALPHA : 0) | TEXF_ALLOWUPDATES, -1, NULL);
+       pic->tex = R_LoadTexture2D(drawtexturepool, picname, width, height, pixels_bgra, TEXTYPE_BGRA, (alpha ? TEXF_ALPHA : 0), -1, NULL);
        return pic;
 }
 
index 84a2974e629f992aa8226a41f0b1d57e2d6d1530..3fccfffd974487dece4fe20dcf7a30527066de72 100644 (file)
@@ -497,8 +497,8 @@ static void R_BuildFogTexture(void)
        }
        else
        {
-               r_texture_fogattenuation = R_LoadTexture2D(r_main_texturepool, "fogattenuation", FOGWIDTH, 1, &data1[0][0], TEXTYPE_BGRA, TEXF_FORCELINEAR | TEXF_CLAMP | TEXF_PERSISTENT | TEXF_ALLOWUPDATES, -1, NULL);
-               //r_texture_fogintensity = R_LoadTexture2D(r_main_texturepool, "fogintensity", FOGWIDTH, 1, &data2[0][0], TEXTYPE_BGRA, TEXF_FORCELINEAR | TEXF_CLAMP | TEXF_ALLOWUPDATES, NULL);
+               r_texture_fogattenuation = R_LoadTexture2D(r_main_texturepool, "fogattenuation", FOGWIDTH, 1, &data1[0][0], TEXTYPE_BGRA, TEXF_FORCELINEAR | TEXF_CLAMP | TEXF_PERSISTENT, -1, NULL);
+               //r_texture_fogintensity = R_LoadTexture2D(r_main_texturepool, "fogintensity", FOGWIDTH, 1, &data2[0][0], TEXTYPE_BGRA, TEXF_FORCELINEAR | TEXF_CLAMP, NULL);
        }
 }
 
@@ -9474,7 +9474,7 @@ void R_UpdateVariables(void)
                                }
                                else
                                {
-                                       r_texture_gammaramps = R_LoadTexture2D(r_main_texturepool, "gammaramps", RAMPWIDTH, 1, &rampbgr[0][0], TEXTYPE_BGRA, TEXF_FORCELINEAR | TEXF_CLAMP | TEXF_PERSISTENT | TEXF_ALLOWUPDATES, -1, NULL);
+                                       r_texture_gammaramps = R_LoadTexture2D(r_main_texturepool, "gammaramps", RAMPWIDTH, 1, &rampbgr[0][0], TEXTYPE_BGRA, TEXF_FORCELINEAR | TEXF_CLAMP | TEXF_PERSISTENT, -1, NULL);
                                }
                        }
                }
index fa6d645df128f2386caca4224ab7e628eacf3d3b..c89811833fe56733224b610afc26fab97e9b71ac 100644 (file)
@@ -22,7 +22,7 @@
 #define TEXF_COMPARE 0x00000800
 // indicates texture should use lower precision where supported
 #define TEXF_LOWPRECISION 0x00001000
-// indicates texture should support R_UpdateTexture, actual uploads may be delayed until R_Mesh_TexBind if gl_nopartialtextureupdates is on
+// indicates texture should support R_UpdateTexture on small regions, actual uploads may be delayed until R_Mesh_TexBind if gl_nopartialtextureupdates is on
 #define TEXF_ALLOWUPDATES 0x00002000
 // indicates texture should be affected by gl_picmip_world and r_picmipworld (maybe others in the future) instead of gl_picmip_other
 #define TEXF_ISWORLD 0x00004000