private readBlockImage ( byte imgData, int w, int h ) : |
||
imgData | byte | |
w | int | |
h | int | |
return |
private Bitmap readBlockImage(byte[] imgData, int w, int h)
{
switch (header.ddspf.dwFourCC)
{
case FOURCC_DXT1:
ddsFormat = DDSFormat.DXT1;
return UncompressDXT1(imgData, w, h);
case FOURCC_DXT5:
ddsFormat = DDSFormat.DXT5;
return UncompressDXT5(imgData, w, h);
default: break;
}
throw new Exception("invalid texture format");
}