Continue migration to openglraw

This commit is contained in:
2023-03-09 21:00:16 +00:00
parent 487a904584
commit 2388715d52
3 changed files with 17 additions and 26 deletions
+5 -19
View File
@@ -84,25 +84,11 @@ doDrawing win pdata u = do
, (_windowShader pdata, nWins)
, (_textureArrayShader pdata, nFls)
]
--bindBuffer ElementArrayBuffer $= pdata ^? shapeEBO . eboName --Just (_ebo $ _shapeEBO pdata)
--bufferSubData
-- ElementArrayBuffer
-- WriteToBuffer
-- 0
-- (fromIntegral $ glushortSize * nIndices)
-- (_eboPtr $ _shapeEBO pdata)
glNamedBufferSubData
(_eboName $ _shapeEBO pdata)
0
(fromIntegral $ glushortSize * nIndices)
(_eboPtr $ _shapeEBO pdata)
--bindBuffer ElementArrayBuffer $= pdata ^? silhouetteEBO . eboName --Just (_ebo $ _silhouetteEBO pdata)
--bufferSubData
-- ElementArrayBuffer
-- WriteToBuffer
-- 0
-- (fromIntegral $ glushortSize * nSilIndices)
-- (_eboPtr $ _silhouetteEBO pdata)
glNamedBufferSubData
(_eboName $ _silhouetteEBO pdata)
0
@@ -113,7 +99,7 @@ doDrawing win pdata u = do
setViewportSize (round winx `div` resFact) (round winy `div` resFact)
--bindFramebuffer Framebuffer $= fst (_fboBase pdata)
glBindFramebuffer GL_FRAMEBUFFER (_unFBO (fst (_fboBase pdata)))
clearColor $= Color4 0 0 0 0
glClearColor 0 0 0 0
clear [ColorBuffer, DepthBuffer]
depthFunc $= Just Less
-- draw wall occlusions from the camera's point of view
@@ -162,7 +148,7 @@ doDrawing win pdata u = do
(snd $ snd $ pdata ^. fboBase)
(drawCPUShadows pdata ws)
colorMask $= Color4 Enabled Enabled Enabled Enabled
clearColor $= Color4 0 0 0 0
glClearColor 0 0 0 0
--apply lightmap to base buffer
--bindFramebuffer Framebuffer $= pdata ^. fboBase . _1 --fst (_fboBase pdata)
glBindFramebuffer GL_FRAMEBUFFER (pdata ^. fboBase . _1 . unFBO)
@@ -200,7 +186,7 @@ doDrawing win pdata u = do
glBindFramebuffer GL_FRAMEBUFFER (_unFBO (fst (_fboCloud pdata)))
depthFunc $= Just Lequal
depthMask $= Disabled
clearColor $= Color4 0.5 0.5 0.5 0
glClearColor 0.5 0.5 0.5 0
--blendFunc $= (SrcAlphaSaturate,One)
--blendColor $= Color4 0.5 0.5 0.5 0.5
--blendFuncSeparate $= ((SrcAlphaSaturate,One) , (One,OneMinusSrcAlpha))
@@ -232,9 +218,9 @@ doDrawing win pdata u = do
(snd $ snd $ _fboCloud pdata)
(drawCPUShadows pdata ws)
colorMask $= Color4 Enabled Enabled Enabled Enabled
clearColor $= Color4 0 0 0 0
glClearColor 0 0 0 0
--apply lightmap to cloud buffer
clearColor $= Color4 0 0 0 0
glClearColor 0 0 0 0
--bindFramebuffer Framebuffer $= fst (_fboCloud pdata)
glBindFramebuffer GL_FRAMEBUFFER (_unFBO (fst (_fboCloud pdata)))
depthMask $= Disabled