Add RGTC format
This commit is contained in:
parent
7c6e12ed70
commit
3b24067a3c
@ -54,6 +54,10 @@ public interface GL3 extends GL2 {
|
|||||||
public static final int GL_TEXTURE_SWIZZLE_B = 0x8E44;
|
public static final int GL_TEXTURE_SWIZZLE_B = 0x8E44;
|
||||||
public static final int GL_TEXTURE_SWIZZLE_G = 0x8E43;
|
public static final int GL_TEXTURE_SWIZZLE_G = 0x8E43;
|
||||||
public static final int GL_TEXTURE_SWIZZLE_R = 0x8E42;
|
public static final int GL_TEXTURE_SWIZZLE_R = 0x8E42;
|
||||||
|
public static final int GL_COMPRESSED_RED_RGTC1 = 0x8DBB;
|
||||||
|
public static final int GL_COMPRESSED_SIGNED_RED_RGTC1 = 0x8DBC;
|
||||||
|
public static final int GL_COMPRESSED_RG_RGTC2 = 0x8DBD;
|
||||||
|
public static final int GL_COMPRESSED_SIGNED_RG_RGTC2 = 0x8DBE;
|
||||||
public static final int GL_R8I = 33329;
|
public static final int GL_R8I = 33329;
|
||||||
public static final int GL_R8UI = 33330;
|
public static final int GL_R8UI = 33330;
|
||||||
public static final int GL_R16I = 33331;
|
public static final int GL_R16I = 33331;
|
||||||
|
@ -246,6 +246,13 @@ public final class GLImageFormats {
|
|||||||
formatComp(formatToGL, Format.DXT5, GLExt.GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE);
|
formatComp(formatToGL, Format.DXT5, GLExt.GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(caps.contains(Caps.OpenGL30)){
|
||||||
|
formatComp(formatToGL, Format.RGTC2, GL3.GL_COMPRESSED_RG_RGTC2, GL3.GL_RG, GL.GL_UNSIGNED_BYTE);
|
||||||
|
formatComp(formatToGL, Format.SIGNED_RGTC2, GL3.GL_COMPRESSED_SIGNED_RG_RGTC2, GL3.GL_RG, GL.GL_BYTE);
|
||||||
|
formatComp(formatToGL, Format.RGTC1, GL3.GL_COMPRESSED_RED_RGTC1, GL3.GL_RED, GL.GL_UNSIGNED_BYTE);
|
||||||
|
formatComp(formatToGL, Format.SIGNED_RGTC1, GL3.GL_COMPRESSED_SIGNED_RED_RGTC1, GL3.GL_RED, GL.GL_BYTE);
|
||||||
|
}
|
||||||
|
|
||||||
if (caps.contains(Caps.TextureCompressionETC2)) {
|
if (caps.contains(Caps.TextureCompressionETC2)) {
|
||||||
formatComp(formatToGL, Format.ETC1, GLExt.GL_COMPRESSED_RGB8_ETC2, GL.GL_RGB, GL.GL_UNSIGNED_BYTE);
|
formatComp(formatToGL, Format.ETC1, GLExt.GL_COMPRESSED_RGB8_ETC2, GL.GL_RGB, GL.GL_UNSIGNED_BYTE);
|
||||||
} else if (caps.contains(Caps.TextureCompressionETC1)) {
|
} else if (caps.contains(Caps.TextureCompressionETC1)) {
|
||||||
|
@ -186,6 +186,14 @@ public class Image extends NativeObject implements Savable /*, Cloneable*/ {
|
|||||||
*/
|
*/
|
||||||
DXT5(8,false,true, false),
|
DXT5(8,false,true, false),
|
||||||
|
|
||||||
|
RGTC2(8,false,true, false),
|
||||||
|
|
||||||
|
SIGNED_RGTC2(8,false,true, false),
|
||||||
|
|
||||||
|
RGTC1(4,false,true, false),
|
||||||
|
|
||||||
|
SIGNED_RGTC1(4,false,true, false),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Luminance-Alpha Texture Compression.
|
* Luminance-Alpha Texture Compression.
|
||||||
*
|
*
|
||||||
|
@ -280,16 +280,14 @@ public class DDSLoader implements AssetLoader {
|
|||||||
normal = true;
|
normal = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
/*
|
|
||||||
case PF_ATI1:
|
case PF_ATI1:
|
||||||
bpp = 4;
|
bpp = 4;
|
||||||
pixelFormat = Image.Format.LTC;
|
pixelFormat = Image.Format.RGTC1;
|
||||||
break;
|
break;
|
||||||
case PF_ATI2:
|
case PF_ATI2:
|
||||||
bpp = 8;
|
bpp = 8;
|
||||||
pixelFormat = Image.Format.LATC;
|
pixelFormat = Image.Format.RGTC2;
|
||||||
break;
|
break;
|
||||||
*/
|
|
||||||
case PF_DX10:
|
case PF_DX10:
|
||||||
compressed = false;
|
compressed = false;
|
||||||
directx10 = true;
|
directx10 = true;
|
||||||
|
@ -213,14 +213,12 @@ public class DXTFlipper {
|
|||||||
case DXT5:
|
case DXT5:
|
||||||
type = 3;
|
type = 3;
|
||||||
break;
|
break;
|
||||||
/*
|
case RGTC2:
|
||||||
case LATC:
|
|
||||||
type = 4;
|
type = 4;
|
||||||
break;
|
break;
|
||||||
case LTC:
|
case RGTC1:
|
||||||
type = 5;
|
type = 5;
|
||||||
break;
|
break;
|
||||||
*/
|
|
||||||
default:
|
default:
|
||||||
throw new IllegalArgumentException();
|
throw new IllegalArgumentException();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user