diff --git a/common/src/main/java/net/irisshaders/iris/gl/GlVersion.java b/common/src/main/java/net/irisshaders/iris/gl/GlVersion.java index d0e8dcc496..60afd943f3 100644 --- a/common/src/main/java/net/irisshaders/iris/gl/GlVersion.java +++ b/common/src/main/java/net/irisshaders/iris/gl/GlVersion.java @@ -4,5 +4,7 @@ public enum GlVersion { GL_11, GL_12, GL_30, - GL_31 + GL_31, + GL_33, + GL_41 } diff --git a/common/src/main/java/net/irisshaders/iris/gl/texture/InternalTextureFormat.java b/common/src/main/java/net/irisshaders/iris/gl/texture/InternalTextureFormat.java index 2a4b7462b8..dd270ec2e8 100644 --- a/common/src/main/java/net/irisshaders/iris/gl/texture/InternalTextureFormat.java +++ b/common/src/main/java/net/irisshaders/iris/gl/texture/InternalTextureFormat.java @@ -4,6 +4,8 @@ import org.lwjgl.opengl.GL11C; import org.lwjgl.opengl.GL30C; import org.lwjgl.opengl.GL31C; +import org.lwjgl.opengl.GL33C; +import org.lwjgl.opengl.GL41C; import java.util.Locale; import java.util.Optional; @@ -72,10 +74,16 @@ public enum InternalTextureFormat { RG32UI(GL30C.GL_RG32UI, GlVersion.GL_30, PixelFormat.RG_INTEGER), RGB32UI(GL30C.GL_RGB32UI, GlVersion.GL_30, PixelFormat.RGB_INTEGER), RGBA32UI(GL30C.GL_RGBA32UI, GlVersion.GL_30, PixelFormat.RGBA_INTEGER), + // 2-bit normalized + RGBA2(GL11C.GL_RGBA2, GlVersion.GL_11, PixelFormat.RGBA), + // 4-bit normalized + RGBA4(GL11C.GL_RGBA4, GlVersion.GL_11, PixelFormat.RGBA), // Mixed R3_G3_B2(GL11C.GL_R3_G3_B2, GlVersion.GL_11, PixelFormat.RGB), RGB5_A1(GL11C.GL_RGB5_A1, GlVersion.GL_11, PixelFormat.RGBA), + RGB565(GL41C.GL_RGB565, GlVersion.GL_41, PixelFormat.RGB), RGB10_A2(GL11C.GL_RGB10_A2, GlVersion.GL_11, PixelFormat.RGBA), + RGB10_A2UI(GL33C.GL_RGB10_A2UI, GlVersion.GL_33, PixelFormat.RGBA), R11F_G11F_B10F(GL30C.GL_R11F_G11F_B10F, GlVersion.GL_30, PixelFormat.RGB), RGB9_E5(GL30C.GL_RGB9_E5, GlVersion.GL_30, PixelFormat.RGB); diff --git a/common/src/main/java/net/irisshaders/iris/gl/texture/PixelType.java b/common/src/main/java/net/irisshaders/iris/gl/texture/PixelType.java index e5f3c7909f..28fc797472 100644 --- a/common/src/main/java/net/irisshaders/iris/gl/texture/PixelType.java +++ b/common/src/main/java/net/irisshaders/iris/gl/texture/PixelType.java @@ -29,7 +29,9 @@ public enum PixelType { UNSIGNED_INT_8_8_8_8(4, GL12C.GL_UNSIGNED_INT_8_8_8_8, GlVersion.GL_12), UNSIGNED_INT_8_8_8_8_REV(4, GL12C.GL_UNSIGNED_INT_8_8_8_8_REV, GlVersion.GL_12), UNSIGNED_INT_10_10_10_2(4, GL12C.GL_UNSIGNED_INT_10_10_10_2, GlVersion.GL_12), - UNSIGNED_INT_2_10_10_10_REV(4, GL12C.GL_UNSIGNED_INT_2_10_10_10_REV, GlVersion.GL_12); + UNSIGNED_INT_2_10_10_10_REV(4, GL12C.GL_UNSIGNED_INT_2_10_10_10_REV, GlVersion.GL_12), + UNSIGNED_INT_10F_11F_11F_REV(4, GL30C.GL_UNSIGNED_INT_10F_11F_11F_REV, GlVersion.GL_30), + UNSIGNED_INT_5_9_9_9_REV(4, GL30C.GL_UNSIGNED_INT_5_9_9_9_REV, GlVersion.GL_30); private final int byteSize; private final int glFormat;