Add depth clear/check to fixed layer pictures

This commit is contained in:
2024-11-17 20:01:17 +00:00
parent d5be125a3b
commit afddcae6d1
7 changed files with 185 additions and 207 deletions
+3 -2
View File
@@ -367,15 +367,16 @@ doDrawing' win pdata u = do
-- draw the overlay
--glBindFramebuffer GL_FRAMEBUFFER (pdata ^. fboOverlay ._1 . unFBO)
glDepthFunc GL_ALWAYS
--glDepthFunc GL_GEQUAL
glDepthMask GL_FALSE
--glDepthMask GL_TRUE
glEnable GL_BLEND
glBlendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
renderLayer DebugLayer shadV pokeCounts
glBindBufferBase GL_UNIFORM_BUFFER 0 (pdata ^. matUBO)
withArray (scaleMatrix (2 / windowXFloat cfig) (2 / windowYFloat cfig))
$ \ptr -> glNamedBufferSubData (pdata ^. matUBO) 0 64 ptr
glDepthFunc GL_GEQUAL
glDepthMask GL_TRUE
with (-1) $ \ptr -> glClearNamedFramebufferfv 0 GL_DEPTH 0 ptr
renderLayer FixedCoordLayer shadV pokeCounts
SDL.glSwapWindow win