module Graphics.Rendering.OpenGL.GL.FramebufferObjects.Attachments (
FramebufferObjectAttachment(..),
fboaToBufferMode, fboaFromBufferMode,
FramebufferAttachment(..),
framebufferRenderbuffer, framebufferTexture1D, framebufferTexture2D,
framebufferTexture3D, framebufferTextureLayer
) where
import Graphics.Rendering.OpenGL.GL.FramebufferObjects.FramebufferObjectAttachment
import Graphics.Rendering.OpenGL.GL.FramebufferObjects.FramebufferTarget
import Graphics.Rendering.OpenGL.GL.FramebufferObjects.RenderbufferObject
import Graphics.Rendering.OpenGL.GL.FramebufferObjects.RenderbufferTarget
import Graphics.Rendering.OpenGL.GL.Texturing.Specification
import Graphics.Rendering.OpenGL.GL.Texturing.TextureObject
import Graphics.Rendering.OpenGL.GL.Texturing.TextureTarget
import Graphics.Rendering.OpenGL.GLU.ErrorsInternal
import Graphics.GL
framebufferRenderbuffer :: FramebufferTarget -> FramebufferObjectAttachment
-> RenderbufferTarget -> RenderbufferObject -> IO ()
framebufferRenderbuffer :: FramebufferTarget
-> FramebufferObjectAttachment
-> RenderbufferTarget
-> RenderbufferObject
-> IO ()
framebufferRenderbuffer FramebufferTarget
fbt FramebufferObjectAttachment
fba RenderbufferTarget
rbt (RenderbufferObject GLuint
rboi) =
forall b a. b -> (a -> b) -> Maybe a -> b
maybe IO ()
recordInvalidValue (\GLuint
mfba -> forall (m :: * -> *).
MonadIO m =>
GLuint -> GLuint -> GLuint -> GLuint -> m ()
glFramebufferRenderbuffer (FramebufferTarget -> GLuint
marshalFramebufferTarget FramebufferTarget
fbt)
GLuint
mfba (RenderbufferTarget -> GLuint
marshalRenderbufferTarget RenderbufferTarget
rbt) GLuint
rboi) forall a b. (a -> b) -> a -> b
$ FramebufferObjectAttachment -> Maybe GLuint
marshalFramebufferObjectAttachment FramebufferObjectAttachment
fba
framebufferTexture1D :: FramebufferTarget -> FramebufferObjectAttachment
-> TextureTarget1D -> TextureObject -> Level -> IO ()
framebufferTexture1D :: FramebufferTarget
-> FramebufferObjectAttachment
-> TextureTarget1D
-> TextureObject
-> Level
-> IO ()
framebufferTexture1D FramebufferTarget
fbt FramebufferObjectAttachment
fba TextureTarget1D
tt (TextureObject GLuint
t) Level
l = forall b a. b -> (a -> b) -> Maybe a -> b
maybe IO ()
recordInvalidValue
(\GLuint
mfba -> forall (m :: * -> *).
MonadIO m =>
GLuint -> GLuint -> GLuint -> GLuint -> Level -> m ()
glFramebufferTexture1D (FramebufferTarget -> GLuint
marshalFramebufferTarget FramebufferTarget
fbt) GLuint
mfba
(forall t. QueryableTextureTarget t => t -> GLuint
marshalQueryableTextureTarget TextureTarget1D
tt) GLuint
t Level
l) forall a b. (a -> b) -> a -> b
$ FramebufferObjectAttachment -> Maybe GLuint
marshalFramebufferObjectAttachment FramebufferObjectAttachment
fba
framebufferTexture2D :: FramebufferTarget -> FramebufferObjectAttachment
-> TextureTarget2D -> TextureObject -> Level -> IO ()
framebufferTexture2D :: FramebufferTarget
-> FramebufferObjectAttachment
-> TextureTarget2D
-> TextureObject
-> Level
-> IO ()
framebufferTexture2D FramebufferTarget
fbt FramebufferObjectAttachment
fba TextureTarget2D
tt (TextureObject GLuint
t) Level
l = forall b a. b -> (a -> b) -> Maybe a -> b
maybe IO ()
recordInvalidValue
(\GLuint
mfba -> forall (m :: * -> *).
MonadIO m =>
GLuint -> GLuint -> GLuint -> GLuint -> Level -> m ()
glFramebufferTexture2D (FramebufferTarget -> GLuint
marshalFramebufferTarget FramebufferTarget
fbt) GLuint
mfba
(forall t. QueryableTextureTarget t => t -> GLuint
marshalQueryableTextureTarget TextureTarget2D
tt) GLuint
t Level
l)
forall a b. (a -> b) -> a -> b
$ FramebufferObjectAttachment -> Maybe GLuint
marshalFramebufferObjectAttachment FramebufferObjectAttachment
fba
framebufferTexture3D :: FramebufferTarget -> FramebufferObjectAttachment
-> TextureTarget3D -> TextureObject -> Level -> GLint -> IO ()
framebufferTexture3D :: FramebufferTarget
-> FramebufferObjectAttachment
-> TextureTarget3D
-> TextureObject
-> Level
-> Level
-> IO ()
framebufferTexture3D FramebufferTarget
fbt FramebufferObjectAttachment
fba TextureTarget3D
tt (TextureObject GLuint
t) Level
le Level
la = forall b a. b -> (a -> b) -> Maybe a -> b
maybe IO ()
recordInvalidValue
(\GLuint
mfba -> forall (m :: * -> *).
MonadIO m =>
GLuint -> GLuint -> GLuint -> GLuint -> Level -> Level -> m ()
glFramebufferTexture3D (FramebufferTarget -> GLuint
marshalFramebufferTarget FramebufferTarget
fbt) GLuint
mfba
(forall t. QueryableTextureTarget t => t -> GLuint
marshalQueryableTextureTarget TextureTarget3D
tt) GLuint
t Level
le Level
la) forall a b. (a -> b) -> a -> b
$ FramebufferObjectAttachment -> Maybe GLuint
marshalFramebufferObjectAttachment FramebufferObjectAttachment
fba
framebufferTextureLayer :: FramebufferTarget -> FramebufferObjectAttachment
-> TextureObject -> Level -> GLint -> IO()
framebufferTextureLayer :: FramebufferTarget
-> FramebufferObjectAttachment
-> TextureObject
-> Level
-> Level
-> IO ()
framebufferTextureLayer FramebufferTarget
fbt FramebufferObjectAttachment
fba (TextureObject GLuint
t) Level
le Level
la = forall b a. b -> (a -> b) -> Maybe a -> b
maybe IO ()
recordInvalidValue
(\GLuint
mfba -> forall (m :: * -> *).
MonadIO m =>
GLuint -> GLuint -> GLuint -> Level -> Level -> m ()
glFramebufferTextureLayer (FramebufferTarget -> GLuint
marshalFramebufferTarget FramebufferTarget
fbt)
GLuint
mfba GLuint
t Level
le Level
la) forall a b. (a -> b) -> a -> b
$ FramebufferObjectAttachment -> Maybe GLuint
marshalFramebufferObjectAttachment FramebufferObjectAttachment
fba