Play with floor textures

This commit is contained in:
2023-03-18 22:31:24 +00:00
parent 49f96ab18e
commit 70c15fea5d
12 changed files with 68 additions and 33 deletions
+2 -14
View File
@@ -5,6 +5,7 @@ module Dodge.Render (
--import qualified Data.Vector as V
import GLHelp
import Control.Lens
import Control.Monad
import qualified Control.Monad.Parallel as MP
@@ -157,17 +158,10 @@ doDrawing' win pdata u = do
glDisable GL_CULL_FACE
--draw floor onto base buffer
glDisable GL_BLEND
-- glUseProgram (pdata ^. textureArrayShader . _1 . shadName)
-- glBindVertexArray $ pdata ^. textureArrayShader . _1 . shadVAO . vaoName
-- glBindTextureUnit 1 (pdata ^. toNormalMaps . unTO)
---- glBindTextureUnit 0 $ pdata ^?! textureArrayShader . _1 . shadTex' . _Just . textureObject
-- glDrawArrays
-- (marshalEPrimitiveMode $ pdata ^. textureArrayShader . _1 . shadPrim' )
-- 0
-- (fromIntegral nFls)
glUseProgram (pdata ^. floorShader . shadName)
glBindVertexArray $ pdata ^. floorShader . shadVAO . vaoName
glBindTextureUnit 1 (pdata ^. toNormalMaps . unTO)
glBindTextureUnit 2 (pdata ^. toDiffuse . unTO)
glDrawArrays
(marshalEPrimitiveMode $ pdata ^. floorShader . shadPrim' )
0
@@ -370,9 +364,3 @@ renderTextureWalls pdata nWalls = do
--cullFace $= Nothing
checkGLError :: IO ()
checkGLError = do
err <- glGetError
case err of
0 -> return ()
i -> error $ "OpenGL error: " ++ show i