Remove polymorphism of shader type

This commit is contained in:
2021-06-11 19:41:17 +02:00
parent 0e0d8f4e99
commit 7b6521587d
6 changed files with 61 additions and 52 deletions
+3 -2
View File
@@ -16,6 +16,7 @@ import Geometry
--import Picture
import Picture.Render
import Picture.Preload
import Picture.Data
import Shader
import MatrixHelper
@@ -135,7 +136,7 @@ renderBlankWalls
-> GLmatrix GLfloat
-> IO ()
renderBlankWalls pdata wps pmat = do
n <- F.foldM (pokeShader $ _wallBlankShader pdata) wps
n <- F.foldM (pokeShader $ _wallBlankShader pdata) (map Render22x4 wps)
bindShaderBuffers [_wallBlankShader pdata] [n]
currentProgram $= Just (_shaderProgram $ _wallBlankShader pdata)
uniform (_shaderMatrixUniform $ _wallBlankShader pdata) $= pmat
@@ -149,7 +150,7 @@ renderTextureWalls
-> GLmatrix GLfloat
-> IO ()
renderTextureWalls pdata wps pmat = do
n <- F.foldM (pokeShader $ _wallTextureShader pdata) wps
n <- F.foldM (pokeShader $ _wallTextureShader pdata) (map Render22x4 wps)
bindShaderBuffers [_wallTextureShader pdata] [n]
currentProgram $= Just (_shaderProgram $ _wallTextureShader pdata)
uniform (_shaderMatrixUniform $ _wallTextureShader pdata) $= pmat