Disable filtering for charmap
This commit is contained in:
@@ -42,7 +42,6 @@ preloadRender = do
|
|||||||
setupVertexAttribPointer 0 4 8 0
|
setupVertexAttribPointer 0 4 8 0
|
||||||
wpColVAOname <- genObjectName
|
wpColVAOname <- genObjectName
|
||||||
bindVertexArrayObject $= Just wpColVAOname
|
bindVertexArrayObject $= Just wpColVAOname
|
||||||
bindBuffer ArrayBuffer $= Just wpVBOname
|
|
||||||
setupVertexAttribPointer 0 4 8 0
|
setupVertexAttribPointer 0 4 8 0
|
||||||
setupVertexAttribPointer 1 4 8 4
|
setupVertexAttribPointer 1 4 8 4
|
||||||
let wpVAO = VAO {_vao = wpVAOname, _vaoVBO = wpVBO}
|
let wpVAO = VAO {_vao = wpVAOname, _vaoVBO = wpVBO}
|
||||||
@@ -92,8 +91,8 @@ preloadRender = do
|
|||||||
>>= addTextureArray "data/texture/ayene_wooden_floor.png"
|
>>= addTextureArray "data/texture/ayene_wooden_floor.png"
|
||||||
-- bind fixed vertex data
|
-- bind fixed vertex data
|
||||||
bindShaderBuffers [fsShad,fullscreenAlphaHalveShad] [4,4]
|
bindShaderBuffers [fsShad,fullscreenAlphaHalveShad] [4,4]
|
||||||
framebuf2 <- setupTextureFramebuffer 600 600
|
framebuf2 <- setupTextureFramebuffer 800 600
|
||||||
framebuf3 <- setupTextureFramebuffer 600 600
|
framebuf3 <- setupTextureFramebuffer 800 600
|
||||||
|
|
||||||
rboLightingName <- genObjectName
|
rboLightingName <- genObjectName
|
||||||
bindRenderbuffer Renderbuffer $= rboLightingName
|
bindRenderbuffer Renderbuffer $= rboLightingName
|
||||||
|
|||||||
@@ -40,13 +40,13 @@ addTextureNoFilter texturePath shad = do
|
|||||||
let tex = convertRGBA8 cmap
|
let tex = convertRGBA8 cmap
|
||||||
textureOb <- genObjectName
|
textureOb <- genObjectName
|
||||||
textureBinding Texture2D $= Just textureOb
|
textureBinding Texture2D $= Just textureOb
|
||||||
|
textureFilter Texture2D $= ((Nearest,Nothing) , Nearest)
|
||||||
let texData = V.toList $ imageData tex
|
let texData = V.toList $ imageData tex
|
||||||
wtex = fromIntegral $ imageWidth tex
|
wtex = fromIntegral $ imageWidth tex
|
||||||
htex = fromIntegral $ imageHeight tex
|
htex = fromIntegral $ imageHeight tex
|
||||||
glTexStorage2D GL_TEXTURE_2D 1 GL_RGBA8 wtex htex
|
glTexStorage2D GL_TEXTURE_2D 1 GL_RGBA8 wtex htex
|
||||||
withArray texData $ \ptr -> do
|
withArray texData $ \ptr -> do
|
||||||
glTexSubImage2D GL_TEXTURE_2D 0 0 0 wtex htex GL_RGBA GL_UNSIGNED_BYTE ptr
|
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}
|
return $ shad & shaderTexture ?~ ShaderTexture {_textureObject = textureOb}
|
||||||
|
|
||||||
addTextureArray :: String -> FullShader -> IO FullShader
|
addTextureArray :: String -> FullShader -> IO FullShader
|
||||||
|
|||||||
Reference in New Issue
Block a user