OGLplus (0.52.0) a C++ wrapper for OpenGL

oglplus::ObjectOps< tag::DirectState, tag::Framebuffer > Class Template Reference

Class wrapping framebuffer-related functionality with direct state access. More...

#include </home/chochlik/devel/oglplus/include/oglplus/dsa/framebuffer.hpp>

Inheritance diagram for oglplus::ObjectOps< tag::DirectState, tag::Framebuffer >:
Collaboration diagram for oglplus::ObjectOps< tag::DirectState, tag::Framebuffer >:

Classes

struct  Property
 Types related to Framebuffer. More...
 

Public Types

typedef OneOf< GLenum,
std::tuple
< oglplus::ColorBuffer,
oglplus::FramebufferColorAttachment > > 
ColorBuffer
 Color buffer specification type.
 
typedef FramebufferTarget Target
 Framebuffer bind targets.
 

Public Member Functions

FramebufferStatus Status (Target target) const
 Checks the status of the framebuffer. More...
 
bool IsComplete (Target target) const
 Returns true if the framebuffer is complete. More...
 
void Complete (Target target) const
 Throws an exception if the framebuffer is not complete.
 
void AttachRenderbuffer (Property::Attachment attachment, RenderbufferName renderbuffer)
 Attach a renderbuffer to the attachment point of this FBO. More...
 
void AttachColorRenderbuffer (FramebufferColorAttachmentNumber attachment_no, RenderbufferName renderbuffer)
 Attach a renderbuffer to the color attachment_no of this FBO. More...
 
void AttachTexture (Property::Attachment attachment, TextureName texture, GLint level)
 Attach a texture to the attachment point of this FBO. More...
 
void AttachColorTexture (FramebufferColorAttachmentNumber attachment_no, TextureName texture, GLint level)
 Attach a texture to the color attachment point of this FBO. More...
 
void AttachTextureLayer (Property::Attachment attachment, TextureName texture, GLint level, GLint layer)
 Attach a texture layer to the attachment point of this FBO. More...
 
void DrawBuffer (ColorBuffer buffer)
 Sets the destination color buffer for draw operations. More...
 
template<unsigned N>
void DrawBuffers (const EnumArray< ColorBuffer > &buffers)
 Sets the destination color buffers for draw operations. More...
 
void ReadBuffer (ColorBuffer buffer)
 Sets the source color buffer for read operations. More...
 
void Bind (Target target) const
 Binds this framebuffer to the specified target. More...
 

Static Public Member Functions

static void Bind (Target target, FramebufferName framebuffer)
 Binds the specified framebuffer to the specified target. More...
 
static FramebufferName Binding (Target target)
 Returns the current Framebuffer bound to specified target. More...
 

Detailed Description

template<>
class oglplus::ObjectOps< tag::DirectState, tag::Framebuffer >

Class wrapping framebuffer-related functionality with direct state access.

Note
Do not use this class directly, use DSARenderbuffer instead.

Member Function Documentation

void oglplus::ObjectOps< tag::DirectState, tag::Framebuffer >::AttachColorRenderbuffer ( FramebufferColorAttachmentNumber  attachment_no,
RenderbufferName  renderbuffer 
)

Attach a renderbuffer to the color attachment_no of this FBO.

See Also
AttachRenderbuffer
AttachTexture
AttachTextureLayer
AttachTexture1D
AttachTexture2D
AttachTexture3D
AttachColorTexture
Related OpenGL symbols:
glFramebufferRenderbuffer

References oglplus::GetGLName().

void oglplus::ObjectOps< tag::DirectState, tag::Framebuffer >::AttachColorTexture ( FramebufferColorAttachmentNumber  attachment_no,
TextureName  texture,
GLint  level 
)

Attach a texture to the color attachment point of this FBO.

See Also
AttachRenderbuffer
AttachColorRenderbuffer
AttachTexture1D
AttachTexture2D
AttachTexture3D
AttachTexture
AttachTextureLayer
Related OpenGL symbols:
glFramebufferTexture

References oglplus::GetGLName().

void oglplus::ObjectOps< tag::DirectState, tag::Framebuffer >::AttachRenderbuffer ( Property::Attachment  attachment,
RenderbufferName  renderbuffer 
)

Attach a renderbuffer to the attachment point of this FBO.

See Also
AttachColorRenderbuffer
AttachTexture
AttachTextureLayer
AttachTexture1D
AttachTexture2D
AttachTexture3D
AttachColorTexture
Related OpenGL symbols:
glFramebufferRenderbuffer

References oglplus::GetGLName().

void oglplus::ObjectOps< tag::DirectState, tag::Framebuffer >::AttachTexture ( Property::Attachment  attachment,
TextureName  texture,
GLint  level 
)

Attach a texture to the attachment point of this FBO.

See Also
AttachRenderbuffer
AttachColorRenderbuffer
AttachTextureLayer
AttachTexture1D
AttachTexture2D
AttachTexture3D
AttachColorTexture
Related OpenGL symbols:
glFramebufferTexture

References oglplus::GetGLName().

void oglplus::ObjectOps< tag::DirectState, tag::Framebuffer >::AttachTextureLayer ( Property::Attachment  attachment,
TextureName  texture,
GLint  level,
GLint  layer 
)

Attach a texture layer to the attachment point of this FBO.

See Also
AttachRenderbuffer
AttachColorRenderbuffer
AttachTexture1D
AttachTexture2D
AttachTexture3D
AttachColorTexture
AttachTexture
Related OpenGL symbols:
glFramebufferTextureLayer

References oglplus::GetGLName().

static void oglplus::ObjBindingOps< tag::Framebuffer >::Bind ( Target  target,
FramebufferName  framebuffer 
)
staticinherited

Binds the specified framebuffer to the specified target.

Related OpenGL symbols:
glBindFramebuffer

References oglplus::GetGLName().

void oglplus::ObjCommonOps< tag::Framebuffer >::Bind ( Target  target) const
inherited

Binds this framebuffer to the specified target.

Related OpenGL symbols:
glBindFramebuffer
static FramebufferName oglplus::ObjBindingOps< tag::Framebuffer >::Binding ( Target  target)
staticinherited

Returns the current Framebuffer bound to specified target.

Related OpenGL symbols:
glGetIntegerv
void oglplus::ObjectOps< tag::DirectState, tag::Framebuffer >::DrawBuffer ( ColorBuffer  buffer)

Sets the destination color buffer for draw operations.

Related OpenGL symbols:
glDrawBuffer
template<unsigned N>
void oglplus::ObjectOps< tag::DirectState, tag::Framebuffer >::DrawBuffers ( const EnumArray< ColorBuffer > &  buffers)

Sets the destination color buffers for draw operations.

Related OpenGL symbols:
glDrawBuffers
bool oglplus::ObjectOps< tag::DirectState, tag::Framebuffer >::IsComplete ( Target  target) const

Returns true if the framebuffer is complete.

See Also
FramebufferStatus
Status()
Related OpenGL symbols:
glCheckFramebufferStatus

References oglplus::Complete.

void oglplus::ObjectOps< tag::DirectState, tag::Framebuffer >::ReadBuffer ( ColorBuffer  buffer)

Sets the source color buffer for read operations.

Related OpenGL symbols:
glReadBuffer
FramebufferStatus oglplus::ObjectOps< tag::DirectState, tag::Framebuffer >::Status ( Target  target) const

Checks the status of the framebuffer.

Returns one of the values in the FramebufferStatus enumeration. For complete framebuffers this member function returns Status::Complete.

See Also
IsComplete
Related OpenGL symbols:
glCheckFramebufferStatus

The documentation for this class was generated from the following file:

Copyright © 2010-2014 Matúš Chochlík, University of Žilina, Žilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Mon Sep 22 2014 by Doxygen (version 1.8.6).