Skip to content

Commit bbee3b9

Browse files
committed
add luminance mapping
1 parent 1c68158 commit bbee3b9

File tree

1 file changed

+2
-0
lines changed
  • common/src/main/kotlin/com/lambda/graphics/texture

1 file changed

+2
-0
lines changed

common/src/main/kotlin/com/lambda/graphics/texture/Texture.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,8 @@ open class Texture{
222222

223223
private fun getNativeFormat(gl: Int) =
224224
when (gl) {
225+
GL_RED, GL_GREEN, GL_BLUE -> NativeImage.Format.LUMINANCE
226+
GL_RG -> NativeImage.Format.LUMINANCE_ALPHA
225227
GL_RGB -> NativeImage.Format.RGB
226228
else -> NativeImage.Format.RGBA
227229
}

0 commit comments

Comments
 (0)