]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_textures.c
renamed r_shadow_shadows to r_shadow_dlightshadows and added r_shadow_worldshadows...
[xonotic/darkplaces.git] / gl_textures.c
index bcfc554fdef9518331d5d4ff34251a2f841057fa..f3e8a1b24725f79354ef47fbb8096cea351b55e4 100644 (file)
@@ -39,11 +39,12 @@ typedef struct
 }
 textypeinfo_t;
 
-static textypeinfo_t textype_palette       = {TEXTYPE_PALETTE, 1, 4, GL_RGBA, 3};
-static textypeinfo_t textype_rgb           = {TEXTYPE_RGB    , 3, 3, GL_RGB , 3};
-static textypeinfo_t textype_rgba          = {TEXTYPE_RGBA   , 4, 4, GL_RGBA, 3};
-static textypeinfo_t textype_palette_alpha = {TEXTYPE_PALETTE, 1, 4, GL_RGBA, 4};
-static textypeinfo_t textype_rgba_alpha    = {TEXTYPE_RGBA   , 4, 4, GL_RGBA, 4};
+static textypeinfo_t textype_palette       = {TEXTYPE_PALETTE, 1, 4, GL_RGBA   , 3};
+static textypeinfo_t textype_rgb           = {TEXTYPE_RGB    , 3, 3, GL_RGB    , 3};
+static textypeinfo_t textype_rgba          = {TEXTYPE_RGBA   , 4, 4, GL_RGBA   , 3};
+static textypeinfo_t textype_palette_alpha = {TEXTYPE_PALETTE, 1, 4, GL_RGBA   , 4};
+static textypeinfo_t textype_rgba_alpha    = {TEXTYPE_RGBA   , 4, 4, GL_RGBA   , 4};
+static textypeinfo_t textype_dsdt          = {TEXTYPE_DSDT   , 2, 2, GL_DSDT_NV, GL_DSDT8_NV};
 
 // a tiling texture (most common type)
 #define GLIMAGETYPE_TILE 0
@@ -167,6 +168,8 @@ static textypeinfo_t *R_GetTexTypeInfo(int textype, int flags)
                        return &textype_rgb;
                case TEXTYPE_RGBA:
                        return &textype_rgba;
+               case TEXTYPE_DSDT:
+                       return &textype_dsdt;
                default:
                        Host_Error("R_GetTexTypeInfo: unknown texture format\n");
                        return NULL;
@@ -362,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);
@@ -1032,6 +1035,8 @@ static rtexture_t *R_SetupTexture(rtexturepool_t *rtexturepool, const char *iden
                        }
                }
                break;
+       case TEXTYPE_DSDT:
+               break;
        default:
                Host_Error("R_LoadTexture: unknown texture type\n");
        }