Start translating shader compilation and linking to openglraw

This commit is contained in:
2023-03-07 11:43:35 +00:00
parent f2e406b05c
commit e6ec46edce
4 changed files with 95 additions and 13 deletions
+12 -12
View File
@@ -81,18 +81,18 @@ resizeShadowFBO (fboname,(oldto1,oldto2)) xsize ysize = do
deleteObjectName oldto2
to1 <- genObjectName
to2 <- genObjectName
-- textureBinding Texture2DArray $= Just to1
-- glTexStorage3D GL_TEXTURE_2D_ARRAY 1 GL_RGBA8 xsize' ysize' 10
-- textureFilter Texture2DArray $= minMagFilter
-- glFramebufferTexture GL_FRAMEBUFFER GL_COLOR_ATTACHMENT0 (unTexture to1) 0
-- textureBinding Texture2DArray $= Just to2
-- glTexStorage3D GL_TEXTURE_2D_ARRAY 1 GL_DEPTH24_STENCIL8 xsize' ysize' 10
-- textureFilter Texture2DArray $= minMagFilter
-- glFramebufferTexture GL_FRAMEBUFFER GL_DEPTH_STENCIL_ATTACHMENT (unTexture to2) 0
-- fboStatus <- framebufferStatus Framebuffer
-- case fboStatus of
-- Complete -> return ()
-- _ -> error $ "after resize, resizeFBOTO2 framebuffer status:" ++ show fboStatus
textureBinding Texture2DArray $= Just to1
glTexStorage3D GL_TEXTURE_2D_ARRAY 1 GL_RGBA8 xsize' ysize' 10
textureFilter Texture2DArray $= minMagFilter
glFramebufferTexture GL_FRAMEBUFFER GL_COLOR_ATTACHMENT0 (unTexture to1) 0
textureBinding Texture2DArray $= Just to2
glTexStorage3D GL_TEXTURE_2D_ARRAY 1 GL_DEPTH24_STENCIL8 xsize' ysize' 10
textureFilter Texture2DArray $= minMagFilter
glFramebufferTexture GL_FRAMEBUFFER GL_DEPTH_STENCIL_ATTACHMENT (unTexture to2) 0
fboStatus <- framebufferStatus Framebuffer
case fboStatus of
Complete -> return ()
_ -> error $ "after resize, resizeFBOTO2 framebuffer status:" ++ show fboStatus
return (fboname,(to1,to2))
unTexture :: TextureObject -> GLuint