Refactor poking slightly

This commit is contained in:
2021-06-12 02:40:45 +02:00
parent 02a2d3920d
commit 8723be7f26
5 changed files with 71 additions and 75 deletions
+4 -2
View File
@@ -18,6 +18,8 @@ import Picture.Render
import Picture.Preload
import Picture.Data
import Shader
import Shader.Data
import Shader.Poke
import MatrixHelper
import Foreign (Word32)
@@ -136,7 +138,7 @@ renderBlankWalls
-> GLmatrix GLfloat
-> IO ()
renderBlankWalls pdata wps pmat = do
n <- F.foldM (pokeShader' $ _wallBlankShader pdata) (map Render22x4 wps)
n <- F.foldM (pokeShader $ _wallBlankShader pdata) (map Render22x4 wps)
bindShaderBuffers [_wallBlankShader pdata] [n]
currentProgram $= Just (_shaderProgram $ _wallBlankShader pdata)
uniform (_shaderMatrixUniform $ _wallBlankShader pdata) $= pmat
@@ -150,7 +152,7 @@ renderTextureWalls
-> GLmatrix GLfloat
-> IO ()
renderTextureWalls pdata wps pmat = do
n <- F.foldM (pokeShader' $ _wallTextureShader pdata) (map Render22x4 wps)
n <- F.foldM (pokeShader $ _wallTextureShader pdata) (map Render22x4 wps)
bindShaderBuffers [_wallTextureShader pdata] [n]
currentProgram $= Just (_shaderProgram $ _wallTextureShader pdata)
uniform (_shaderMatrixUniform $ _wallTextureShader pdata) $= pmat