Visualization Library v1.0.3

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Protected Member Functions | Protected Attributes | Friends

vl::FBORenderbufferAttachment Class Reference

Abstract class that represents a framebuffer renderbuffer attachment, that is, a non-texture fbo attachment (wraps glFramebufferRenderbuffer()). More...

#include <FramebufferObject.hpp>

Inheritance diagram for vl::FBORenderbufferAttachment:
vl::FBOAbstractAttachment vl::Object vl::FBOColorBufferAttachment vl::FBODepthBufferAttachment vl::FBODepthStencilBufferAttachment vl::FBOStencilBufferAttachment

List of all members.

Public Member Functions

 FBORenderbufferAttachment ()
 Constructor.
 ~FBORenderbufferAttachment ()
 Destructor.
void createRenderBuffer ()
 Creates a renderbuffer object calling glGenRenderbuffers().
void deleteRenderBuffer ()
 Deletes the renderbuffer object created with the createRenderBuffer() method.
void setHandle (GLuint handle)
 Sets the handle for this attachment, the handle must have been created by glGenRenderbuffers().
GLuint handle () const
 Returns the handle obtained by createRenderBuffer() using glGenRenderbuffers()
void initStorage (int w, int h, int samples)
 Initializes the storage of the renderbuffer with the given sample count and dimensions.
void initStorage ()
 The same as calling initStorage( width(), height() )
int width () const
 Returns the with of the renderbuffer storage.
int height () const
 Returns the height of the renderbuffer storage.
int samples () const
 Returns the number of samples to be used when allocating the renderbuffer's storage.
void setWidth (int w)
 The width of the renderbuffer storage to be allocated.
void setHeight (int h)
 The height of the renderbuffer storage to be allocated.
void setSamples (int samples)
 Sets the number of samples to be specified when allocating the renderbuffer's storage.
bool renderbufferStorageReady () const
 Returns false if the renderbuffer storage needs to be created or reallocated due to a change of the sample count, renderbuffer type or dimension.

Protected Member Functions

void bindAttachment (FramebufferObject *fbo, EAttachmentPoint attach_point)
virtual int internalType ()=0

Protected Attributes

GLuint mHandle
int mWidth
int mHeight
int mSamples
bool mReallocateRenderbuffer

Friends

class FramebufferObject

Detailed Description

Abstract class that represents a framebuffer renderbuffer attachment, that is, a non-texture fbo attachment (wraps glFramebufferRenderbuffer()).

See also:
FramebufferObject.
http://www.opengl.org/sdk/docs/man3/xhtml/glFramebufferRenderbuffer.xml

Definition at line 87 of file FramebufferObject.hpp.


Constructor & Destructor Documentation

vl::FBORenderbufferAttachment::FBORenderbufferAttachment (  ) [inline]

Constructor.

Definition at line 95 of file FramebufferObject.hpp.

vl::FBORenderbufferAttachment::~FBORenderbufferAttachment (  ) [inline]

Destructor.

Definition at line 98 of file FramebufferObject.hpp.


Member Function Documentation

void FBORenderbufferAttachment::createRenderBuffer (  )

Creates a renderbuffer object calling glGenRenderbuffers().

The identifier returned by glGenRenderbuffers() can be queried calling the handle() method.

Definition at line 500 of file FramebufferObject.cpp.

References vl::Has_FBO, mHandle, mReallocateRenderbuffer, VL_CHECK, and VL_CHECK_OGL.

Referenced by bindAttachment().

void FBORenderbufferAttachment::deleteRenderBuffer (  )

Deletes the renderbuffer object created with the createRenderBuffer() method.

Definition at line 514 of file FramebufferObject.cpp.

References vl::Has_FBO, mHandle, mHeight, mReallocateRenderbuffer, mWidth, vl::FBOAbstractAttachment::unbindFromAllFBO(), VL_CHECK, and VL_CHECK_OGL.

void vl::FBORenderbufferAttachment::setHandle ( GLuint  handle ) [inline]

Sets the handle for this attachment, the handle must have been created by glGenRenderbuffers().

Normally you don't need to call this. See also: createRenderBuffer(), handle().

Definition at line 113 of file FramebufferObject.hpp.

GLuint vl::FBORenderbufferAttachment::handle (  ) const [inline]

Returns the handle obtained by createRenderBuffer() using glGenRenderbuffers()

Definition at line 116 of file FramebufferObject.hpp.

Referenced by bindAttachment(), and initStorage().

void FBORenderbufferAttachment::initStorage ( int  w,
int  h,
int  samples 
)

Initializes the storage of the renderbuffer with the given sample count and dimensions.

This method does nothing if the the width, height and sample count has not changed since last time it was called. Note that the renderbuffer storage type is defined by the setType() method of FBOColorBufferAttachment, FBODepthBufferAttachment, FBOStencilBufferAttachment, FBODepthStencilBufferAttachment. See also setSamples().

Definition at line 533 of file FramebufferObject.cpp.

References vl::Log::error(), handle(), vl::Has_FBO, vl::Has_FBO_Multisample, height(), internalType(), mHeight, mReallocateRenderbuffer, mSamples, mWidth, samples(), VL_CHECK, VL_CHECK_OGL, and width().

void vl::FBORenderbufferAttachment::initStorage (  ) [inline]

The same as calling initStorage( width(), height() )

Definition at line 128 of file FramebufferObject.hpp.

References initStorage().

Referenced by bindAttachment(), and initStorage().

int vl::FBORenderbufferAttachment::width (  ) const [inline]

Returns the with of the renderbuffer storage.

Note that if renderbufferStorageReady() returns false it means that the renderbuffer has not been allocated yet.

Definition at line 135 of file FramebufferObject.hpp.

Referenced by bindAttachment(), and initStorage().

int vl::FBORenderbufferAttachment::height (  ) const [inline]

Returns the height of the renderbuffer storage.

Note that if renderbufferStorageReady() returns false it means that the renderbuffer has not been allocated yet.

Definition at line 142 of file FramebufferObject.hpp.

Referenced by bindAttachment(), and initStorage().

int vl::FBORenderbufferAttachment::samples (  ) const [inline]

Returns the number of samples to be used when allocating the renderbuffer's storage.

Note that if renderbufferStorageReady() returns false it means that the renderbuffer has not been allocated yet.

Definition at line 149 of file FramebufferObject.hpp.

Referenced by bindAttachment(), and initStorage().

void vl::FBORenderbufferAttachment::setWidth ( int  w ) [inline]

The width of the renderbuffer storage to be allocated.

If 'w' is set to 0 the renderbuffer storage allocation will use the dimensions of the next FramebufferObject bound.

Definition at line 155 of file FramebufferObject.hpp.

void vl::FBORenderbufferAttachment::setHeight ( int  h ) [inline]

The height of the renderbuffer storage to be allocated.

If 'h' is set to 0 the renderbuffer storage allocation will use the dimensions of the next FramebufferObject bound.

Definition at line 161 of file FramebufferObject.hpp.

void vl::FBORenderbufferAttachment::setSamples ( int  samples ) [inline]

Sets the number of samples to be specified when allocating the renderbuffer's storage.

Definition at line 166 of file FramebufferObject.hpp.

bool vl::FBORenderbufferAttachment::renderbufferStorageReady (  ) const [inline]

Returns false if the renderbuffer storage needs to be created or reallocated due to a change of the sample count, renderbuffer type or dimension.

Definition at line 169 of file FramebufferObject.hpp.

void FBORenderbufferAttachment::bindAttachment ( FramebufferObject fbo,
EAttachmentPoint  attach_point 
) [protected, virtual]
virtual int vl::FBORenderbufferAttachment::internalType (  ) [protected, pure virtual]

Friends And Related Function Documentation

friend class FramebufferObject [friend]

Reimplemented from vl::FBOAbstractAttachment.

Definition at line 91 of file FramebufferObject.hpp.


Member Data Documentation

Definition at line 176 of file FramebufferObject.hpp.

Referenced by createRenderBuffer(), and deleteRenderBuffer().

Definition at line 177 of file FramebufferObject.hpp.

Referenced by deleteRenderBuffer(), and initStorage().

Definition at line 178 of file FramebufferObject.hpp.

Referenced by deleteRenderBuffer(), and initStorage().

Definition at line 179 of file FramebufferObject.hpp.

Referenced by initStorage().

Definition at line 180 of file FramebufferObject.hpp.

Referenced by createRenderBuffer(), deleteRenderBuffer(), and initStorage().


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

Visualization Library v1.0.3 Reference Documentation
Copyright Michele Bosi. All rights reserved.
Updated on Tue Feb 7 2017 00:55:10.
Permission is granted to use this page to write and publish articles regarding Visualization Library.