Remove old instancing framebuffer
This commit is contained in:
@@ -61,7 +61,6 @@ sizeFBOs cfig rdata =
|
||||
GL_LINEAR
|
||||
GL_RGBA16F
|
||||
[fboHalf1, fboHalf2]
|
||||
>>= resizeShadowFBO' cfig
|
||||
where
|
||||
updateFBOTO' f =
|
||||
uncurry
|
||||
@@ -149,33 +148,6 @@ updateFBOTO3 xsize ysize minfilt magfilt inFormat1 inFormat2 inFormat3 pdata tar
|
||||
newfbo2 <- resizeFBOTO3 (pdata ^# target) xsize ysize minfilt magfilt inFormat1 inFormat2 inFormat3
|
||||
return $ storing target newfbo2 pdata
|
||||
|
||||
resizeShadowFBO' :: Configuration -> RenderData -> IO RenderData
|
||||
resizeShadowFBO' cfig = fboShadow (uncurry resizeShadowFBO (getWindowSize _graphics_world_resolution cfig))
|
||||
|
||||
-- note we only really "change" the texture objects
|
||||
resizeShadowFBO ::
|
||||
Int ->
|
||||
Int ->
|
||||
(FBO, (TO, TO)) ->
|
||||
IO (FBO, (TO, TO))
|
||||
resizeShadowFBO x y (fbo, (oldto1, oldto2)) = do
|
||||
glBindFramebuffer GL_FRAMEBUFFER (_unFBO fbo)
|
||||
mglDelete glDeleteTextures $ _unTO oldto1
|
||||
mglDelete glDeleteTextures $ _unTO oldto2
|
||||
to1 <- initializeTexture2DArray fbo GL_COLOR_ATTACHMENT0 x y 20 GL_NEAREST GL_NEAREST GL_RGBA8
|
||||
to2 <-
|
||||
initializeTexture2DArray
|
||||
fbo
|
||||
GL_DEPTH_STENCIL_ATTACHMENT
|
||||
x
|
||||
y
|
||||
20
|
||||
GL_NEAREST
|
||||
GL_NEAREST
|
||||
GL_DEPTH24_STENCIL8
|
||||
checkFBO fbo
|
||||
return (fbo, (TO to1, TO to2))
|
||||
|
||||
--resizeFBOTO2 ::
|
||||
-- (FBO, (TO, TO)) ->
|
||||
-- Int ->
|
||||
@@ -257,18 +229,6 @@ initializeTexture2D fbo attachpoint x y minfilt magfilt informat = do
|
||||
glNamedFramebufferTexture (_unFBO fbo) attachpoint to1 0
|
||||
return to1
|
||||
|
||||
initializeTexture2DArray :: FBO -> GLenum -> Int -> Int -> Int -> GLenum -> GLenum -> GLenum -> IO GLuint
|
||||
initializeTexture2DArray fbo attachpoint x y z minfilt magfilt informat = do
|
||||
let xsize = fromIntegral x
|
||||
ysize = fromIntegral y
|
||||
zsize = fromIntegral z
|
||||
to1 <- mglCreate (glCreateTextures GL_TEXTURE_2D_ARRAY)
|
||||
glTextureStorage3D to1 1 informat xsize ysize zsize
|
||||
glTextureParameteri to1 GL_TEXTURE_MIN_FILTER (unsafeCoerce minfilt)
|
||||
glTextureParameteri to1 GL_TEXTURE_MAG_FILTER (unsafeCoerce magfilt)
|
||||
glNamedFramebufferTexture (_unFBO fbo) attachpoint to1 0
|
||||
return to1
|
||||
|
||||
--getWindowSize :: Integral a => (Configuration -> ResFactor) -> Configuration -> (a, a)
|
||||
--getWindowSize f cfig = (g _windowX, g _windowY)
|
||||
-- where
|
||||
|
||||
Reference in New Issue
Block a user