Pre shader refactor commit

This commit is contained in:
2021-03-10 14:31:50 +01:00
parent d3c8504d21
commit fe2abc9266
5 changed files with 27 additions and 16 deletions
-5
View File
@@ -404,7 +404,6 @@ renderPicture' pdata rot zoom (tranx,trany) (winx,winy) wallPoints lightPoints p
wallPtr2 = (\(_,x,_) -> x) $ (_vaoBufferTargets $ _wallVAO pdata) !! 1
foldWalls n ((x,y),(z,w),(a,b),(c,d)) = do
pokeFourOff wallPtr n (x,y,z,w)
-- pokeElemOff (_dummyPtr pdata) n (fromIntegral n)
pokeFourOff wallPtr2 n (a,b,c,d)
return $ n+1
nWalls <- foldM foldWalls 0 wallPoints
@@ -417,10 +416,6 @@ renderPicture' pdata rot zoom (tranx,trany) (winx,winy) wallPoints lightPoints p
bindVertexArrayObject $= Just (_vao $ _wallVAO pdata)
uniform (_wssLightPos pdata) $= Vector2 (x) (y)
blendFunc $= (Zero,One)
-- drawElements Points (fromIntegral nWalls) UnsignedByte (_dummyPtr pdata)
-- withArray [0..(nWalls-1)::Int] $ \ptr ->
---- --drawElements Points (fromIntegral nWalls) UnsignedByte ptr
-- glDrawElements GL_POINTS (fromIntegral $ length wallPoints) GL_UNSIGNED_BYTE ptr
drawArrays Points (fromIntegral 0) (fromIntegral $ nWalls)
cullFace $= Nothing
currentProgram $= Just (fst $ _lightmapCircleShader pdata)