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
+6 -2
View File
@@ -94,7 +94,9 @@ resizeFBOTO2 (fboName,(toOld1,toOld2)) xsize ysize mmfilt inFormat1 inFormat2 =
framebufferTexture2D Framebuffer (ColorAttachment 1) Texture2D toName2 0
drawBuffers $= [FBOColorAttachment 0,FBOColorAttachment 1]
fboStatus <- framebufferStatus Framebuffer
putStrLn $ "after resize, framebuffer status:" ++ show fboStatus
case fboStatus of
Complete -> return ()
_ -> putStrLn $ "after resize, resizeFBOTO2 framebuffer status:" ++ show fboStatus
return (fboName, (toName1,toName2))
resizeFBOTO
@@ -115,7 +117,9 @@ resizeFBOTO (fboName,toOld) xsize ysize mmfilt inFormat = do
textureFilter Texture2D $= mmfilt
framebufferTexture2D Framebuffer (ColorAttachment 0) Texture2D toName 0
fboStatus <- framebufferStatus Framebuffer
putStrLn $ "after resize, framebuffer status:" ++ show fboStatus
case fboStatus of
Complete -> return ()
_ -> putStrLn $ "after resize, resizeFBOTO framebuffer status:" ++ show fboStatus
return (fboName, toName)
minMagFilter :: ((TextureFilter, Maybe TextureFilter),TextureFilter)