DDSLoader: fix loading 16-bit images (as exported by PVRTexTool)
This commit is contained in:
parent
badefdf4e4
commit
629c007cd4
@ -327,10 +327,18 @@ public class DDSLoader implements AssetLoader {
|
||||
|
||||
if (is(pfFlags, DDPF_RGB)) {
|
||||
if (is(pfFlags, DDPF_ALPHAPIXELS)) {
|
||||
if (bpp == 16) {
|
||||
pixelFormat = Format.RGB5A1;
|
||||
} else {
|
||||
pixelFormat = Format.RGBA8;
|
||||
}
|
||||
} else {
|
||||
if (bpp == 16) {
|
||||
pixelFormat = Format.RGB565;
|
||||
} else {
|
||||
pixelFormat = Format.RGB8;
|
||||
}
|
||||
}
|
||||
} else if (is(pfFlags, DDPF_GRAYSCALE) && is(pfFlags, DDPF_ALPHAPIXELS)) {
|
||||
switch (bpp) {
|
||||
case 16:
|
||||
|
Loading…
x
Reference in New Issue
Block a user