Draw floors using vertex pulling

This commit is contained in:
2025-11-13 22:22:19 +00:00
parent 836c0ba772
commit cffa75c014
8 changed files with 34 additions and 34 deletions
+5 -4
View File
@@ -130,16 +130,17 @@ preloadRender = do
barrelShad <- makeShaderVBO "texture/barrel" [vert, geom, frag] (toFloatVAs [2, 2, 2, 1]) pmPoints
-- blank wallShader
putStrLn "Setup floor VBO, shader"
let floorverxstrd = 8
floorvbo <- setupVBOStatic (floatSize * floorverxstrd)
floorshader <- makeShaderUsingVBO "floor/arrayPos" [vert, frag] (toFloatVAs [4, 4]) pmTriangles floorvbo
flvbo <- mglCreate glCreateBuffers
flptr <- mallocArray (8 * 65536)
let floorvbo = VBO flvbo flptr (8 * floatSize)
floorshader <- makeSourcedShader "floor/arrayPos" [vert, frag]
initTexture2DArraySquare 40 3 GL_LINEAR_MIPMAP_LINEAR GL_LINEAR "data/normalMaps/diffuseArray.png"
initTexture2DArraySquare 41 3 GL_LINEAR_MIPMAP_LINEAR GL_LINEAR "data/normalMaps/normalArray.png"
putStrLn "Setup chasm VBO, shader"
chvbo <- mglCreate glCreateBuffers
chptr <- mallocArray (2 * 65536)
let chasmvbo = VBO chvbo chptr floatSize
let chasmvbo = VBO chvbo chptr (2 * floatSize)
chasmshader <- makeSourcedShader "chasm" [vert]
framebuf2 <- newTextureFramebuffer
framebuf3 <- newTextureFramebuffer