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_G = 0x8E43;
|
||||
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_R8UI = 33330;
|
||||
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);
|
||||
}
|
||||
|
||||
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)) {
|
||||
formatComp(formatToGL, Format.ETC1, GLExt.GL_COMPRESSED_RGB8_ETC2, GL.GL_RGB, GL.GL_UNSIGNED_BYTE);
|
||||
} else if (caps.contains(Caps.TextureCompressionETC1)) {
|
||||
|
@ -186,6 +186,14 @@ public class Image extends NativeObject implements Savable /*, Cloneable*/ {
|
||||
*/
|
||||
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.
|
||||
*
|
||||
|
@ -280,16 +280,14 @@ public class DDSLoader implements AssetLoader {
|
||||
normal = true;
|
||||
}
|
||||
break;
|
||||
/*
|
||||
case PF_ATI1:
|
||||
bpp = 4;
|
||||
pixelFormat = Image.Format.LTC;
|
||||
pixelFormat = Image.Format.RGTC1;
|
||||
break;
|
||||
case PF_ATI2:
|
||||
bpp = 8;
|
||||
pixelFormat = Image.Format.LATC;
|
||||
pixelFormat = Image.Format.RGTC2;
|
||||
break;
|
||||
*/
|
||||
case PF_DX10:
|
||||
compressed = false;
|
||||
directx10 = true;
|
||||
|
@ -213,14 +213,12 @@ public class DXTFlipper {
|
||||
case DXT5:
|
||||
type = 3;
|
||||
break;
|
||||
/*
|
||||
case LATC:
|
||||
case RGTC2:
|
||||
type = 4;
|
||||
break;
|
||||
case LTC:
|
||||
case RGTC1:
|
||||
type = 5;
|
||||
break;
|
||||
*/
|
||||
default:
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user