]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix two errors in DDS format as written by DP
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 16 Jul 2011 18:54:18 +0000 (18:54 +0000)
committerRudolf Polzer <divVerent@xonotic.org>
Sat, 23 Jul 2011 08:20:54 +0000 (10:20 +0200)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11247 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=8b77d5651e90b342b1b2b3cdb768294a6619e353

gl_textures.c

index edefc5a64f22da3367532d97781fe5fbc31a4f30..f675908cbad6a6eebf434669d1cd9ddf3e027fca 100644 (file)
@@ -1911,11 +1911,11 @@ int R_SaveTextureDDSFile(rtexture_t *rt, const char *filename, qboolean skipunco
        if(hasalpha)
                dds_format_flags |= 0x1; // DDPF_ALPHAPIXELS
        memcpy(dds, "DDS ", 4);
-       StoreLittleLong(dds+4, ddssize);
+       StoreLittleLong(dds+4, 124); // http://msdn.microsoft.com/en-us/library/bb943982%28v=vs.85%29.aspx says so
        StoreLittleLong(dds+8, dds_flags);
        StoreLittleLong(dds+12, mipinfo[0][1]); // height
        StoreLittleLong(dds+16, mipinfo[0][0]); // width
-       StoreLittleLong(dds+24, 1); // depth
+       StoreLittleLong(dds+24, 0); // depth
        StoreLittleLong(dds+28, mipmaps); // mipmaps
        StoreLittleLong(dds+76, 32); // format size
        StoreLittleLong(dds+80, dds_format_flags);