diff options
Diffstat (limited to 'src/LambdaCube')
-rw-r--r-- | src/LambdaCube/GL/Util.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/LambdaCube/GL/Util.hs b/src/LambdaCube/GL/Util.hs index bba322b..7885860 100644 --- a/src/LambdaCube/GL/Util.hs +++ b/src/LambdaCube/GL/Util.hs | |||
@@ -403,6 +403,8 @@ blendingFactorToGLType a = case a of | |||
403 | SrcColor -> GL_SRC_COLOR | 403 | SrcColor -> GL_SRC_COLOR |
404 | Zero -> GL_ZERO | 404 | Zero -> GL_ZERO |
405 | 405 | ||
406 | -- XXX: we need to extend IR.TextureDescriptor to carry component bit depth | ||
407 | -- if we want to avoid making arbitrary decisions here | ||
406 | textureDataTypeToGLType :: ImageSemantic -> TextureDataType -> GLenum | 408 | textureDataTypeToGLType :: ImageSemantic -> TextureDataType -> GLenum |
407 | textureDataTypeToGLType Color a = case a of | 409 | textureDataTypeToGLType Color a = case a of |
408 | FloatT Red -> GL_R32F | 410 | FloatT Red -> GL_R32F |
@@ -412,8 +414,8 @@ textureDataTypeToGLType Color a = case a of | |||
412 | IntT RG -> GL_RG32I | 414 | IntT RG -> GL_RG32I |
413 | WordT RG -> GL_RG32UI | 415 | WordT RG -> GL_RG32UI |
414 | FloatT RGBA -> GL_RGBA32F | 416 | FloatT RGBA -> GL_RGBA32F |
415 | IntT RGBA -> GL_RGBA32I | 417 | IntT RGBA -> GL_RGBA8I |
416 | WordT RGBA -> GL_RGBA32UI | 418 | WordT RGBA -> GL_RGBA8UI |
417 | a -> error $ "FIXME: This texture format is not yet supported" ++ show a | 419 | a -> error $ "FIXME: This texture format is not yet supported" ++ show a |
418 | textureDataTypeToGLType Depth a = case a of | 420 | textureDataTypeToGLType Depth a = case a of |
419 | FloatT Red -> GL_DEPTH_COMPONENT32F | 421 | FloatT Red -> GL_DEPTH_COMPONENT32F |