Use DSA for renderbuffers
This commit is contained in:
@@ -9,7 +9,7 @@ where
|
||||
import Data.Preload.Render
|
||||
|
||||
import Graphics.Rendering.OpenGL
|
||||
import Graphics.GL.Core43
|
||||
import Graphics.GL.Core45
|
||||
--import Foreign
|
||||
import Control.Lens
|
||||
import Control.Monad
|
||||
@@ -37,15 +37,20 @@ sizeFBOs xsize ysize xfull yfull rdata = do
|
||||
-- return rdata4
|
||||
|
||||
resizeRBO
|
||||
:: RenderbufferObject
|
||||
:: GLuint -- RenderbufferObject
|
||||
-> Int
|
||||
-> Int
|
||||
-> IO ()
|
||||
resizeRBO rboName xsize ysize = do
|
||||
let xsize' = fromIntegral xsize
|
||||
ysize' = fromIntegral ysize
|
||||
bindRenderbuffer Renderbuffer $= rboName
|
||||
renderbufferStorage Renderbuffer Depth24Stencil8 (RenderbufferSize xsize' ysize')
|
||||
--bindRenderbuffer Renderbuffer $= rboName
|
||||
--renderbufferStorage Renderbuffer Depth24Stencil8 (RenderbufferSize xsize' ysize')
|
||||
glNamedRenderbufferStorage
|
||||
rboName
|
||||
GL_DEPTH24_STENCIL8
|
||||
xsize'
|
||||
ysize'
|
||||
updateFBOTO
|
||||
:: Int
|
||||
-> Int
|
||||
|
||||
Reference in New Issue
Block a user