Some removal of unused framebuffers, partial fix debug layer

This commit is contained in:
2023-04-11 19:44:45 +01:00
parent 33a6e471ae
commit b80241f10e
4 changed files with 3 additions and 6 deletions
-1
View File
@@ -36,7 +36,6 @@ data RenderData = RenderData
, _fbo3 :: (FBO, TO)
, _fboHalf1 :: (FBO, TO)
, _fboHalf2 :: (FBO, TO)
, _fboHalf3 :: (FBO, TO)
, _fboBase :: (FBO, (TO, TO, TO))
, _fboCloud :: (FBO, (TO, TO, TO))
, _fboBloom :: (FBO, TO)
+2 -2
View File
@@ -107,9 +107,8 @@ doDrawing' win pdata u = do
-- set the coordinate uniform ready for drawing elements using world coordinates
withArray (perspectiveMatrixb rot camzoom trans wins viewFroms) $ \ptr ->
glNamedBufferSubData (pdata ^. matUBO) 0 64 ptr
renderLayer DebugLayer shadV layerCounts
setViewport _graphics_world_resolution cfig
glBindFramebuffer GL_FRAMEBUFFER (pdata ^. fboBase ._1 . unFBO)
glBindFramebuffer GL_FRAMEBUFFER (pdata ^. fboBase . _1 . unFBO)
glDepthMask GL_TRUE
glDisable GL_BLEND
glDepthFunc GL_LESS
@@ -366,6 +365,7 @@ doDrawing' win pdata u = do
glDepthMask GL_FALSE
glEnable GL_BLEND
glBlendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
renderLayer DebugLayer shadV layerCounts
glBindBufferBase GL_UNIFORM_BUFFER 0 (pdata ^. matUBO)
withArray (scaleMatrix (2 / windowXFloat cfig) (2 / windowYFloat cfig))
$ \ptr -> glNamedBufferSubData (pdata ^. matUBO) 0 64 ptr
+1 -1
View File
@@ -60,7 +60,7 @@ sizeFBOs cfig rdata =
GL_LINEAR_MIPMAP_LINEAR
GL_LINEAR
GL_RGBA16F
[fboHalf1, fboHalf2, fboHalf3]
[fboHalf1, fboHalf2]
>>= resizeShadowFBO' cfig
where
updateFBOTO' f =
-2
View File
@@ -173,7 +173,6 @@ preloadRender = do
fboHalf1Name <- newTextureFramebuffer
fboHalf2Name <- newTextureFramebuffer
fboHalf3Name <- newTextureFramebuffer
-- reset to default framebuffer, ready for drawing direct to screen
glBindFramebuffer GL_FRAMEBUFFER 0
@@ -220,7 +219,6 @@ preloadRender = do
, _fbo3 = framebuf3
, _fboHalf1 = fboHalf1Name
, _fboHalf2 = fboHalf2Name
, _fboHalf3 = fboHalf3Name
, _fboLighting = fboLightingName
, _fboShadow = fboShadowName
, _fboBase = fboBaseName