]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_textures.c
change R_Upload error from Host_error to Sys_Error, added texture name
[xonotic/darkplaces.git] / gl_textures.c
index 1884633d51cb3dafd30356b03541cd72ba4c63e1..d244f00636bcb88dea49cda730be11351c9c191a 100644 (file)
@@ -341,7 +341,7 @@ void R_FreeTexturePool(rtexturepool_t **rtexturepool)
 
 typedef struct glmode_s
 {
-       char *name;
+       const char *name;
        int minification, magnification;
 }
 glmode_t;
@@ -359,7 +359,7 @@ static glmode_t modes[6] =
 #ifdef SUPPORTD3D
 typedef struct d3dmode_s
 {
-       char *name;
+       const char *name;
        int m1, m2;
 }
 d3dmode_t;
@@ -1078,7 +1078,7 @@ static void R_Upload(gltexture_t *glt, const unsigned char *data, int fragx, int
        else
        {
                if (fragx || fragy || fragz || glt->inputwidth != fragwidth || glt->inputheight != fragheight || glt->inputdepth != fragdepth)
-                       Host_Error("R_Upload: partial update not allowed on initial upload or in combination with PICMIP or MIPMAP\n");
+                       Sys_Error("R_Upload \"%s\": partial update not allowed on initial upload or in combination with PICMIP or MIPMAP\n", glt->identifier);
 
                // cubemaps contain multiple images and thus get processed a bit differently
                if (glt->texturetype != GLTEXTURETYPE_CUBEMAP)
@@ -2161,7 +2161,7 @@ void R_UpdateTexture(rtexture_t *rt, const unsigned char *data, int x, int y, in
                Host_Error("R_UpdateTexture: no texture supplied");
        if (!glt->texnum && !glt->d3dtexture)
        {
-               Con_Printf("R_UpdateTexture: texture %p \"%s\" in pool %p has not been uploaded yet", glt, glt->identifier, glt->pool);
+               Con_Printf("R_UpdateTexture: texture %p \"%s\" in pool %p has not been uploaded yet", (void *)glt, glt->identifier, (void *)glt->pool);
                return;
        }
        // update part of the texture