Move FBOs to opengl raw
This commit is contained in:
+9
-6
@@ -143,15 +143,17 @@ createLightMap pdata lightPoints nWalls nSils nCaps drawObjShads toPos drawCPUSh
|
||||
|
||||
-- assumes that vertices have already been sent to the shader
|
||||
pingPongBetween ::
|
||||
(FramebufferObject, TextureObject) ->
|
||||
(FramebufferObject, TextureObject) ->
|
||||
(FBO, TextureObject) ->
|
||||
(FBO, TextureObject) ->
|
||||
FullShader ->
|
||||
IO ()
|
||||
pingPongBetween (fb1, to1) (fb2, to2) fs = do
|
||||
bindFramebuffer Framebuffer $= fb2
|
||||
--bindFramebuffer Framebuffer $= fb2
|
||||
glBindFramebuffer GL_FRAMEBUFFER (_unFBO fb2)
|
||||
textureBinding Texture2D $= Just to1
|
||||
drawShader fs 4
|
||||
bindFramebuffer Framebuffer $= fb1
|
||||
--bindFramebuffer Framebuffer $= fb1
|
||||
glBindFramebuffer GL_FRAMEBUFFER (_unFBO fb1)
|
||||
textureBinding Texture2D $= Just to2
|
||||
drawShader fs 4
|
||||
|
||||
@@ -179,5 +181,6 @@ renderLayer layer shads counts = do
|
||||
bindTO :: TextureObject -> IO ()
|
||||
bindTO t = textureBinding Texture2D $= Just t
|
||||
|
||||
bindFBO :: FramebufferObject -> IO ()
|
||||
bindFBO fb = bindFramebuffer Framebuffer $= fb
|
||||
bindFBO :: FBO -> IO ()
|
||||
bindFBO fb = --bindFramebuffer Framebuffer $= fb
|
||||
glBindFramebuffer GL_FRAMEBUFFER (_unFBO fb)
|
||||
|
||||
Reference in New Issue
Block a user