Disable filtering for charmap

This commit is contained in:
jgk
2021-07-18 22:22:14 +02:00
parent 595cb6e9a8
commit e657d8e852
3 changed files with 5 additions and 6 deletions
+1 -1
View File
@@ -40,13 +40,13 @@ addTextureNoFilter texturePath shad = do
let tex = convertRGBA8 cmap
textureOb <- genObjectName
textureBinding Texture2D $= Just textureOb
textureFilter Texture2D $= ((Nearest,Nothing) , Nearest)
let texData = V.toList $ imageData tex
wtex = fromIntegral $ imageWidth tex
htex = fromIntegral $ imageHeight tex
glTexStorage2D GL_TEXTURE_2D 1 GL_RGBA8 wtex htex
withArray texData $ \ptr -> do
glTexSubImage2D GL_TEXTURE_2D 0 0 0 wtex htex GL_RGBA GL_UNSIGNED_BYTE ptr
textureFilter Texture2DArray $= ((Nearest,Nothing) , Nearest)
return $ shad & shaderTexture ?~ ShaderTexture {_textureObject = textureOb}
addTextureArray :: String -> FullShader -> IO FullShader