Visualization Library 2.1.0
A lightweight C++ OpenGL middleware for 2D/3D graphics
|
[Download] [Tutorials] [All Classes] [Grouped Classes] |
Abstract class that represents a framebuffer renderbuffer attachment, that is, a non-texture fbo attachment (wraps glFramebufferRenderbuffer()
).
More...
#include <FramebufferObject.hpp>
Public Member Functions | |
FBORenderbufferAttachment () | |
Constructor. More... | |
~FBORenderbufferAttachment () | |
Destructor. More... | |
void | createRenderBuffer () |
Creates a renderbuffer object calling glGenRenderbuffers(). More... | |
void | deleteRenderBuffer () |
Deletes the renderbuffer object created with the createRenderBuffer() method. More... | |
void | setHandle (GLuint handle) |
Sets the handle for this attachment, the handle must have been created by glGenRenderbuffers(). More... | |
GLuint | handle () const |
Returns the handle obtained by createRenderBuffer() using glGenRenderbuffers() More... | |
void | initStorage (int w, int h, int samples) |
Initializes the storage of the renderbuffer with the given sample count and dimensions. More... | |
void | initStorage () |
The same as calling initStorage( width(), height() ) More... | |
int | width () const |
Returns the with of the renderbuffer storage. More... | |
int | height () const |
Returns the height of the renderbuffer storage. More... | |
int | samples () const |
Returns the number of samples to be used when allocating the renderbuffer's storage. More... | |
void | setWidth (int w) |
The width of the renderbuffer storage to be allocated. More... | |
void | setHeight (int h) |
The height of the renderbuffer storage to be allocated. More... | |
void | setSamples (int samples) |
Sets the number of samples to be specified when allocating the renderbuffer's storage. More... | |
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. More... | |
Public Member Functions inherited from vl::FBOAbstractAttachment | |
FBOAbstractAttachment () | |
Constructor. More... | |
virtual | ~FBOAbstractAttachment () |
Destructor. More... | |
virtual void | unbindFromAllFBO () |
Removes the FBO attachment from all bound FBO render targets. More... | |
const std::set< ref< FramebufferObject > > & | fboFramebuffers () const |
Returns an std::set containing the FramebufferObject that use this FBO attachment. More... | |
Public Member Functions inherited from vl::Object | |
Object () | |
Constructor. More... | |
Object (const Object &other) | |
Copy constructor: copies the name, ref count mutex and user data. More... | |
Object & | operator= (const Object &other) |
Copy operator: copies the object's name, ref count mutex and user data. More... | |
const std::string & | objectName () const |
The name of the object, by default set to the object's class name. More... | |
void | setObjectName (const char *name) |
The name of the object, by default set to the object's class name in debug builds. More... | |
void | setObjectName (const std::string &name) |
The name of the object, by default set to the object's class name in debug builds. More... | |
void | setRefCountMutex (IMutex *mutex) |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
IMutex * | refCountMutex () |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
const IMutex * | refCountMutex () const |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
int | referenceCount () const |
Returns the number of references of an object. More... | |
void | incReference () const |
Increments the reference count of an object. More... | |
void | decReference () |
Decrements the reference count of an object and deletes it if both automaticDelete() is true the count reaches 0. More... | |
void | setAutomaticDelete (bool autodel_on) |
If set to true the Object is deleted when its reference count reaches 0. More... | |
bool | automaticDelete () const |
If set to true the Object is deleted when its reference count reaches 0. More... | |
template<class T > | |
T * | as () |
Casts an Object to the specified class. More... | |
template<class T > | |
const T * | as () const |
Casts an Object to the specified class. More... | |
Protected Member Functions | |
void | bindAttachment (FramebufferObject *fbo, EAttachmentPoint attach_point) |
virtual int | internalType ()=0 |
Protected Member Functions inherited from vl::Object | |
virtual | ~Object () |
Protected Attributes | |
GLuint | mHandle |
int | mWidth |
int | mHeight |
int | mSamples |
bool | mReallocateRenderbuffer |
Protected Attributes inherited from vl::FBOAbstractAttachment | |
std::set< ref< FramebufferObject > > | mFramebufferObjects |
Protected Attributes inherited from vl::Object | |
std::string | mObjectName |
IMutex * | mRefCountMutex |
int | mReferenceCount |
bool | mAutomaticDelete |
Friends | |
class | FramebufferObject |
Abstract class that represents a framebuffer renderbuffer attachment, that is, a non-texture fbo attachment (wraps glFramebufferRenderbuffer()
).
Definition at line 93 of file FramebufferObject.hpp.
|
inline |
Constructor.
Definition at line 101 of file FramebufferObject.hpp.
|
inline |
Destructor.
Definition at line 104 of file FramebufferObject.hpp.
|
protectedvirtual |
Implements vl::FBOAbstractAttachment.
Definition at line 699 of file FramebufferObject.cpp.
References vl::Has_FBO, vl::FramebufferObject::height(), VL_CHECK, VL_CHECK_OGL, and vl::FramebufferObject::width().
Referenced by vl::FramebufferObject::addColorAttachment().
void FBORenderbufferAttachment::createRenderBuffer | ( | ) |
Creates a renderbuffer object calling glGenRenderbuffers().
The identifier returned by glGenRenderbuffers() can be queried calling the handle() method.
Definition at line 635 of file FramebufferObject.cpp.
References vl::Has_FBO, VL_CHECK, and VL_CHECK_OGL.
void FBORenderbufferAttachment::deleteRenderBuffer | ( | ) |
Deletes the renderbuffer object created with the createRenderBuffer() method.
Definition at line 649 of file FramebufferObject.cpp.
References vl::Has_FBO, VL_CHECK, and VL_CHECK_OGL.
|
inline |
Returns the handle obtained by createRenderBuffer() using glGenRenderbuffers()
Definition at line 122 of file FramebufferObject.hpp.
|
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 148 of file FramebufferObject.hpp.
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 668 of file FramebufferObject.cpp.
References vl::Log::error(), vl::Has_FBO, vl::Has_FBO_Multisample, VL_CHECK, and VL_CHECK_OGL.
|
inline |
The same as calling initStorage( width(), height() )
Definition at line 134 of file FramebufferObject.hpp.
References initStorage().
Referenced by initStorage().
|
protectedpure virtual |
|
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 175 of file FramebufferObject.hpp.
|
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 155 of file FramebufferObject.hpp.
|
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 119 of file FramebufferObject.hpp.
|
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 167 of file FramebufferObject.hpp.
|
inline |
Sets the number of samples to be specified when allocating the renderbuffer's storage.
Definition at line 172 of file FramebufferObject.hpp.
|
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 161 of file FramebufferObject.hpp.
|
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 141 of file FramebufferObject.hpp.
|
friend |
Definition at line 97 of file FramebufferObject.hpp.
|
protected |
Definition at line 182 of file FramebufferObject.hpp.
|
protected |
Definition at line 184 of file FramebufferObject.hpp.
|
protected |
Definition at line 186 of file FramebufferObject.hpp.
|
protected |
Definition at line 185 of file FramebufferObject.hpp.
|
protected |
Definition at line 183 of file FramebufferObject.hpp.
Visualization Library 2.1.0 Reference Documentation
Updated on Wed Mar 10 2021 16:02:50.
© Copyright Michele Bosi. All rights reserved.