summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCsaba Hruska <csaba.hruska@gmail.com>2018-09-20 22:52:00 +0300
committerKosyrev Serge <_deepfire@feelingofgreen.ru>2018-09-20 23:03:28 +0300
commitb0505615355a8e6b91de431ff7ac080b12349c6a (patch)
tree6f78e87618a0b2fa2d9b0ab20102784550615cd9
parent4735792a761d8c352985eb4eb123b100a2da2e2f (diff)
textureDataTypeToGLArityType: fix translation for integer textures
-rw-r--r--src/LambdaCube/GL/Util.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/LambdaCube/GL/Util.hs b/src/LambdaCube/GL/Util.hs
index 7885860..b267c7f 100644
--- a/src/LambdaCube/GL/Util.hs
+++ b/src/LambdaCube/GL/Util.hs
@@ -427,14 +427,14 @@ textureDataTypeToGLType Stencil a = case a of
427textureDataTypeToGLArityType :: ImageSemantic -> TextureDataType -> GLenum 427textureDataTypeToGLArityType :: ImageSemantic -> TextureDataType -> GLenum
428textureDataTypeToGLArityType Color a = case a of 428textureDataTypeToGLArityType Color a = case a of
429 FloatT Red -> GL_RED 429 FloatT Red -> GL_RED
430 IntT Red -> GL_RED 430 IntT Red -> GL_RED_INTEGER
431 WordT Red -> GL_RED 431 WordT Red -> GL_RED_INTEGER
432 FloatT RG -> GL_RG 432 FloatT RG -> GL_RG
433 IntT RG -> GL_RG 433 IntT RG -> GL_RG_INTEGER
434 WordT RG -> GL_RG 434 WordT RG -> GL_RG_INTEGER
435 FloatT RGBA -> GL_RGBA 435 FloatT RGBA -> GL_RGBA
436 IntT RGBA -> GL_RGBA 436 IntT RGBA -> GL_RGBA_INTEGER
437 WordT RGBA -> GL_RGBA 437 WordT RGBA -> GL_RGBA_INTEGER
438 a -> error $ "FIXME: This texture format is not yet supported" ++ show a 438 a -> error $ "FIXME: This texture format is not yet supported" ++ show a
439textureDataTypeToGLArityType Depth a = case a of 439textureDataTypeToGLArityType Depth a = case a of
440 FloatT Red -> GL_DEPTH_COMPONENT 440 FloatT Red -> GL_DEPTH_COMPONENT