lowgl-0.3.0.0: Basic gl wrapper and reference

Safe HaskellNone
LanguageHaskell2010

Graphics.GL.Low.Framebuffer

Description

Framebuffers, FBO, RBO...

Example

This example program renders an animating object to an off-screen framebuffer. The resulting texture is then show on a full-screen quad with an effect.

The vertex shader for this program is

The two fragment shaders, one for the object, one for the effect, are

And the output looks like

Synopsis

Documentation

newFBO :: IO FBO Source

Create a new framebuffer object. Before the framebuffer can be used for rendering it must have a color image attachment.

bindFramebuffer :: Framebuffer a => a -> IO () Source

Binds an FBO or the default framebuffer to the framebuffer binding target. Replaces the framebuffer already bound there.

deleteFBO :: FBO -> IO () Source

Delete an FBO.

attachTex2D :: Attachable a => Tex2D a -> IO () Source

Attach a 2D texture to the FBO currently bound to the framebuffer binding target.

attachCubeMap :: Attachable a => CubeMap a -> Side -> IO () Source

Attach one of the sides of a cubemap texture to the FBO currently bound to the framebuffer binding target.

attachRBO :: Attachable a => RBO a -> IO () Source

Attach an RBO to the FBO currently bound to the framebuffer binding target.

newRBO :: InternalFormat a => Int -> Int -> IO (RBO a) Source

Create a new renderbuffer with the specified dimensions.

deleteRBO :: RBO a -> IO () Source

Delete an RBO.

data FBO Source

A framebuffer object is an alternative rendering destination. Once an FBO is bound to framebuffer binding target, it is possible to attach images (textures or RBOs) for color, depth, or stencil rendering.

data RBO a Source

An RBO is a kind of image object used for rendering. The only thing you can do with an RBO is attach it to an FBO.

Instances

Show (RBO a) 
GLObject (RBO a)