From b0505615355a8e6b91de431ff7ac080b12349c6a Mon Sep 17 00:00:00 2001 From: Csaba Hruska Date: Thu, 20 Sep 2018 22:52:00 +0300 Subject: textureDataTypeToGLArityType: fix translation for integer textures --- src/LambdaCube/GL/Util.hs | 12 ++++++------ 1 file 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 textureDataTypeToGLArityType :: ImageSemantic -> TextureDataType -> GLenum textureDataTypeToGLArityType Color a = case a of FloatT Red -> GL_RED - IntT Red -> GL_RED - WordT Red -> GL_RED + IntT Red -> GL_RED_INTEGER + WordT Red -> GL_RED_INTEGER FloatT RG -> GL_RG - IntT RG -> GL_RG - WordT RG -> GL_RG + IntT RG -> GL_RG_INTEGER + WordT RG -> GL_RG_INTEGER FloatT RGBA -> GL_RGBA - IntT RGBA -> GL_RGBA - WordT RGBA -> GL_RGBA + IntT RGBA -> GL_RGBA_INTEGER + WordT RGBA -> GL_RGBA_INTEGER a -> error $ "FIXME: This texture format is not yet supported" ++ show a textureDataTypeToGLArityType Depth a = case a of FloatT Red -> GL_DEPTH_COMPONENT -- cgit v1.2.3