Skip to content

Commit

Permalink
Add depth formats
Browse files Browse the repository at this point in the history
  • Loading branch information
xCollateral committed Sep 26, 2024
1 parent 327d211 commit 600129e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/net/vulkanmod/gl/GlUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public static int vulkanFormat(int glFormat, int type) {
case GL11.GL_UNSIGNED_BYTE -> VK_FORMAT_R8_UNORM;
default -> throw new IllegalStateException("Unexpected type: " + type);
};
case GL11.GL_DEPTH_COMPONENT ->
case GL11.GL_DEPTH_COMPONENT, GL30.GL_DEPTH_COMPONENT32F, GL30.GL_DEPTH_COMPONENT24 ->
// switch (type) {
// case GL11.GL_FLOAT -> VK_FORMAT_D32_SFLOAT;
// default -> throw new IllegalStateException("Unexpected value: " + type);
Expand All @@ -99,6 +99,7 @@ public static int vulkanFormat(int glFormat, int type) {
};
}

// TODO: refactor
public static int vulkanFormat(int glInternalFormat) {
return switch (glInternalFormat) {
case GL30.GL_UNSIGNED_INT_8_8_8_8_REV -> VK_FORMAT_R8G8B8A8_UINT;
Expand Down

0 comments on commit 600129e

Please sign in to comment.