git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11327
d7cf8633-e32d-0410-b094-
e92efae38249
return NULL;
}
+ // when requesting a non-alpha texture and we have DXT3/5, convert to DXT1
+ if(!(flags & TEXF_ALPHA) && (textype == TEXTYPE_DXT3 || textype == TEXTYPE_DXT5))
+ {
+ textype = TEXTYPE_DXT1;
+ bytesperblock = 8;
+ ddssize -= 128;
+ ddssize /= 2;
+ for (i = 0;i < ddssize;i += bytesperblock)
+ memcpy(&ddspixels[i], &ddspixels[(i<<1)+8], 8);
+ ddssize += 128;
+ }
+
force_swdecode = false;
if(bytesperblock)
{