Improve (reduce) error messaging from shader compilation and framebuffers

This commit is contained in:
2021-11-22 16:56:15 +00:00
parent 5d9ea4b733
commit 05e1307336
3 changed files with 17 additions and 7 deletions
+9 -3
View File
@@ -23,7 +23,9 @@ setupTextureFramebuffer x y = do
textureFilter Texture2D $= minMagFilter
framebufferTexture2D Framebuffer (ColorAttachment 0) Texture2D fboTO 0
fboStatus <- framebufferStatus Framebuffer
print fboStatus
case fboStatus of
Complete -> return ()
_ -> putStrLn $ "Texture framebuffer status: " ++ show fboStatus
return (fboName, fboTO)
setupFramebufferGivenStencil
@@ -36,7 +38,9 @@ setupFramebufferGivenStencil rboName = do
toName <- genObjectName
framebufferRenderbuffer Framebuffer DepthStencilAttachment Renderbuffer rboName
fboStatus <- framebufferStatus Framebuffer
print fboStatus
case fboStatus of
Complete -> return ()
_ -> putStrLn $ "Framebuffer with given stencil status: " ++ show fboStatus
return (fboName,toName)
setupFramebuffer2GivenStencil
:: RenderbufferObject
@@ -48,7 +52,9 @@ setupFramebuffer2GivenStencil rboName = do
toName2 <- genObjectName
framebufferRenderbuffer Framebuffer DepthStencilAttachment Renderbuffer rboName
fboStatus <- framebufferStatus Framebuffer
print fboStatus
case fboStatus of
Complete -> return ()
_ -> putStrLn $ "Framebuffer with given stencil and two texture objects status: " ++ show fboStatus
return (fboName,(toName,toName2))
minMagFilter :: ((TextureFilter, Maybe TextureFilter),TextureFilter)