All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Luminous::FrameBufferGL Class Reference

FrameBufferGL is the FrameBuffer representation in GPU memory. More...

#include <Luminous/FrameBufferGL.hpp>

Inheritance diagram for Luminous::FrameBufferGL:
Luminous::ResourceHandleGL

Public Member Functions

LUMINOUS_API void attach (GLenum attachment, RenderBufferGL &renderBuffer)
 Attach a render buffer to the framebuffer. More...
 
LUMINOUS_API void attach (GLenum attachment, TextureGL &texture)
 Attach a texture to the framebuffer. More...
 
LUMINOUS_API void bind ()
 Bind the framebuffer.
 
LUMINOUS_API bool check ()
 Check that the framebuffer object is valid. More...
 
LUMINOUS_API void detach (GLenum attachment)
 Detach the specified attachment. More...
 
LUMINOUS_API FrameBufferGL (StateGL &state)
 Constructor. More...
 
LUMINOUS_API FrameBufferGL (FrameBufferGL &&target)
 Move constructor. More...
 
LUMINOUS_API void sync (const FrameBuffer &target)
 Synchronize the state of the GPU object to the given CPU object. More...
 
LUMINOUS_API void unbind ()
 Unbind the framebuffer.
 
LUMINOUS_API ~FrameBufferGL ()
 Destructor.
 
- Public Member Functions inherited from Luminous::ResourceHandleGL
bool expired () const
 Check if the resource has expired. More...
 
GLuint handle () const
 Get the raw OpenGL handle for the resource. More...
 
ResourceHandleGLoperator= (ResourceHandleGL &&r)
 Move assignment operator. More...
 
 ResourceHandleGL (StateGL &state)
 Constructor. More...
 
 ResourceHandleGL (ResourceHandleGL &&r)
 Move constructor. More...
 
void setExpirationSeconds (unsigned int secs)
 Set the expiration time in seconds for the resource. More...
 
void touch ()
 Update the last used timestamp to current frame-time. More...
 

Additional Inherited Members

- Protected Attributes inherited from Luminous::ResourceHandleGL
GLuint m_handle
 Raw OpenGL handle of the resource.
 
StateGLm_state
 OpenGL state owned by the graphics driver.
 

Detailed Description

FrameBufferGL is the FrameBuffer representation in GPU memory.

See Also
FrameBuffer

Constructor & Destructor Documentation

LUMINOUS_API Luminous::FrameBufferGL::FrameBufferGL ( StateGL state)

Constructor.

Parameters
stateOpenGL state
LUMINOUS_API Luminous::FrameBufferGL::FrameBufferGL ( FrameBufferGL &&  target)

Move constructor.

Parameters
targetframebuffer to move

Member Function Documentation

LUMINOUS_API void Luminous::FrameBufferGL::attach ( GLenum  attachment,
RenderBufferGL renderBuffer 
)

Attach a render buffer to the framebuffer.

Parameters
attachmentattachment to use
renderBufferrender buffer to attach
LUMINOUS_API void Luminous::FrameBufferGL::attach ( GLenum  attachment,
TextureGL texture 
)

Attach a texture to the framebuffer.

Parameters
attachmentattachment to use
texturetexture to attach
LUMINOUS_API bool Luminous::FrameBufferGL::check ( )

Check that the framebuffer object is valid.

This function will output warnings to stderr if the framebuffer is not complete.

Returns
true if the framebuffer is complete and can be rendered to; otherwise false
LUMINOUS_API void Luminous::FrameBufferGL::detach ( GLenum  attachment)

Detach the specified attachment.

Parameters
attachmentattachment to detach
LUMINOUS_API void Luminous::FrameBufferGL::sync ( const FrameBuffer target)

Synchronize the state of the GPU object to the given CPU object.

Parameters
targetframebuffer object to sync to