From: divverent Date: Sat, 16 Jul 2011 18:54:18 +0000 (+0000) Subject: fix two errors in DDS format as written by DP X-Git-Tag: xonotic-v0.6.0~163^2~303 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8b77d5651e90b342b1b2b3cdb768294a6619e353;p=xonotic%2Fdarkplaces.git fix two errors in DDS format as written by DP git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11247 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_textures.c b/gl_textures.c index edefc5a6..f675908c 100644 --- a/gl_textures.c +++ b/gl_textures.c @@ -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);