Visualization Library 2.0.0

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

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Protected Attributes | List of all members
vl::BlitFramebuffer Class Reference

A RenderEventCallback that can be used to copy pixels from a framebuffer to another as described in GL_EXT_framebuffer_blit. More...

#include <BlitFramebuffer.hpp>

+ Inheritance diagram for vl::BlitFramebuffer:

Public Member Functions

 BlitFramebuffer ()
 
void copyPixels ()
 Performs the actual pixel copy from the read framebuffer to the draw framebuffer. More...
 
virtual bool onRenderingStarted (const RenderingAbstract *)
 Reimplement to react to this event. More...
 
virtual bool onRenderingFinished (const RenderingAbstract *)
 Reimplement to react to this event. More...
 
virtual bool onRendererStarted (const RendererAbstract *)
 Reimplement to react to this event. More...
 
virtual bool onRendererFinished (const RendererAbstract *)
 Reimplement to react to this event. More...
 
void setReadFramebuffer (Framebuffer *fbo)
 The render-target used as source during blitting. More...
 
const FramebufferreadFramebuffer () const
 The render-target used as source during blitting. More...
 
FramebufferreadFramebuffer ()
 The render-target used as source during blitting. More...
 
void setReadBuffer (EReadDrawBuffer read_buffer)
 The read-buffer of the read-render-target used as pixel source during blitting. More...
 
EReadDrawBuffer readBuffer () const
 The read-buffer of the read-render-target used as pixel source during blitting. More...
 
void setDrawFramebuffer (Framebuffer *fbo)
 The render-target used as destination during blitting. More...
 
const FramebufferdrawFramebuffer () const
 The render-target used as destination during blitting. More...
 
FramebufferdrawFramebuffer ()
 The render-target used as destination during blitting. More...
 
void setSrcRect (int x0, int y0, int x1, int y1)
 
void setDstRect (int x0, int y0, int x1, int y1)
 
const int * srcRect () const
 
const int * dstRect () const
 
void setBufferMask (int buffer_mask)
 takes a bitmask combination of EBufferBits More...
 
int bufferMask () const
 
void setLinearFilteringEnabled (bool enable_linear_filtering)
 
bool linearFilteringEnabled () const
 
- Public Member Functions inherited from vl::RenderEventCallback
 RenderEventCallback ()
 
void setRemoveAfterCall (bool remove)
 Defines if the callback shall be removed after being executed. More...
 
bool removeAfterCall () const
 Defines if the callback shall be removed after being executed. More...
 
void setEnabled (bool enabled)
 Enabled/disabled callback. More...
 
bool isEnabled () const
 Whether the callback is enabled or not. 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...
 
Objectoperator= (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...
 
IMutexrefCountMutex ()
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
const IMutexrefCountMutex () 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 Attributes

ref< FramebuffermReadFramebuffer
 
ref< FramebuffermDrawFramebuffer
 
int mSrcRect [4]
 
int mDstRect [4]
 
int mBufferMask
 
EReadDrawBuffer mReadBuffer
 
bool mLinearFilteringEnabled
 
- Protected Attributes inherited from vl::RenderEventCallback
bool mRemoveAfterCall
 
bool mEnabled
 
- Protected Attributes inherited from vl::Object
std::string mObjectName
 
IMutexmRefCountMutex
 
int mReferenceCount
 
bool mAutomaticDelete
 

Additional Inherited Members

- Protected Member Functions inherited from vl::Object
virtual ~Object ()
 

Detailed Description

A RenderEventCallback that can be used to copy pixels from a framebuffer to another as described in GL_EXT_framebuffer_blit.

Definition at line 44 of file BlitFramebuffer.hpp.

Constructor & Destructor Documentation

◆ BlitFramebuffer()

vl::BlitFramebuffer::BlitFramebuffer ( )
inline

Member Function Documentation

◆ bufferMask()

int vl::BlitFramebuffer::bufferMask ( ) const
inline

Definition at line 168 of file BlitFramebuffer.hpp.

References mBufferMask.

◆ copyPixels()

void vl::BlitFramebuffer::copyPixels ( )
inline

◆ drawFramebuffer() [1/2]

const Framebuffer* vl::BlitFramebuffer::drawFramebuffer ( ) const
inline

The render-target used as destination during blitting.

Definition at line 142 of file BlitFramebuffer.hpp.

References mDrawFramebuffer.

Referenced by copyPixels().

◆ drawFramebuffer() [2/2]

Framebuffer* vl::BlitFramebuffer::drawFramebuffer ( )
inline

The render-target used as destination during blitting.

Definition at line 145 of file BlitFramebuffer.hpp.

References mDrawFramebuffer.

◆ dstRect()

const int* vl::BlitFramebuffer::dstRect ( ) const
inline

Definition at line 164 of file BlitFramebuffer.hpp.

References mDstRect.

◆ linearFilteringEnabled()

bool vl::BlitFramebuffer::linearFilteringEnabled ( ) const
inline

Definition at line 171 of file BlitFramebuffer.hpp.

References mLinearFilteringEnabled.

◆ onRendererFinished()

virtual bool vl::BlitFramebuffer::onRendererFinished ( const RendererAbstract )
inlinevirtual

Reimplement to react to this event.

Returns
true if the callback reacted to the given event.

Implements vl::RenderEventCallback.

Definition at line 117 of file BlitFramebuffer.hpp.

References copyPixels().

◆ onRendererStarted()

virtual bool vl::BlitFramebuffer::onRendererStarted ( const RendererAbstract )
inlinevirtual

Reimplement to react to this event.

Returns
true if the callback reacted to the given event.

Implements vl::RenderEventCallback.

Definition at line 111 of file BlitFramebuffer.hpp.

References copyPixels().

◆ onRenderingFinished()

virtual bool vl::BlitFramebuffer::onRenderingFinished ( const RenderingAbstract )
inlinevirtual

Reimplement to react to this event.

Returns
true if the callback reacted to the given event.

Implements vl::RenderEventCallback.

Definition at line 105 of file BlitFramebuffer.hpp.

References copyPixels().

◆ onRenderingStarted()

virtual bool vl::BlitFramebuffer::onRenderingStarted ( const RenderingAbstract )
inlinevirtual

Reimplement to react to this event.

Returns
true if the callback reacted to the given event.

Implements vl::RenderEventCallback.

Definition at line 99 of file BlitFramebuffer.hpp.

References copyPixels().

◆ readBuffer()

EReadDrawBuffer vl::BlitFramebuffer::readBuffer ( ) const
inline

The read-buffer of the read-render-target used as pixel source during blitting.

Definition at line 136 of file BlitFramebuffer.hpp.

References mReadBuffer.

◆ readFramebuffer() [1/2]

const Framebuffer* vl::BlitFramebuffer::readFramebuffer ( ) const
inline

The render-target used as source during blitting.

Definition at line 127 of file BlitFramebuffer.hpp.

References mReadFramebuffer.

Referenced by copyPixels().

◆ readFramebuffer() [2/2]

Framebuffer* vl::BlitFramebuffer::readFramebuffer ( )
inline

The render-target used as source during blitting.

Definition at line 130 of file BlitFramebuffer.hpp.

References mReadFramebuffer.

◆ setBufferMask()

void vl::BlitFramebuffer::setBufferMask ( int  buffer_mask)
inline

takes a bitmask combination of EBufferBits

Definition at line 167 of file BlitFramebuffer.hpp.

References mBufferMask.

◆ setDrawFramebuffer()

void vl::BlitFramebuffer::setDrawFramebuffer ( Framebuffer fbo)
inline

The render-target used as destination during blitting.

Definition at line 139 of file BlitFramebuffer.hpp.

References mDrawFramebuffer.

◆ setDstRect()

void vl::BlitFramebuffer::setDstRect ( int  x0,
int  y0,
int  x1,
int  y1 
)
inline

Definition at line 155 of file BlitFramebuffer.hpp.

References mDstRect.

Referenced by BlitFramebuffer().

◆ setLinearFilteringEnabled()

void vl::BlitFramebuffer::setLinearFilteringEnabled ( bool  enable_linear_filtering)
inline

Definition at line 170 of file BlitFramebuffer.hpp.

References mLinearFilteringEnabled.

◆ setReadBuffer()

void vl::BlitFramebuffer::setReadBuffer ( EReadDrawBuffer  read_buffer)
inline

The read-buffer of the read-render-target used as pixel source during blitting.

Definition at line 133 of file BlitFramebuffer.hpp.

References mReadBuffer.

◆ setReadFramebuffer()

void vl::BlitFramebuffer::setReadFramebuffer ( Framebuffer fbo)
inline

The render-target used as source during blitting.

Definition at line 124 of file BlitFramebuffer.hpp.

References mReadFramebuffer.

◆ setSrcRect()

void vl::BlitFramebuffer::setSrcRect ( int  x0,
int  y0,
int  x1,
int  y1 
)
inline

Definition at line 147 of file BlitFramebuffer.hpp.

References mSrcRect.

Referenced by BlitFramebuffer().

◆ srcRect()

const int* vl::BlitFramebuffer::srcRect ( ) const
inline

Definition at line 163 of file BlitFramebuffer.hpp.

References mSrcRect.

Member Data Documentation

◆ mBufferMask

int vl::BlitFramebuffer::mBufferMask
protected

Definition at line 178 of file BlitFramebuffer.hpp.

Referenced by BlitFramebuffer(), bufferMask(), copyPixels(), and setBufferMask().

◆ mDrawFramebuffer

ref<Framebuffer> vl::BlitFramebuffer::mDrawFramebuffer
protected

Definition at line 175 of file BlitFramebuffer.hpp.

Referenced by drawFramebuffer(), and setDrawFramebuffer().

◆ mDstRect

int vl::BlitFramebuffer::mDstRect[4]
protected

Definition at line 177 of file BlitFramebuffer.hpp.

Referenced by copyPixels(), dstRect(), and setDstRect().

◆ mLinearFilteringEnabled

bool vl::BlitFramebuffer::mLinearFilteringEnabled
protected

◆ mReadBuffer

EReadDrawBuffer vl::BlitFramebuffer::mReadBuffer
protected

Definition at line 179 of file BlitFramebuffer.hpp.

Referenced by BlitFramebuffer(), copyPixels(), readBuffer(), and setReadBuffer().

◆ mReadFramebuffer

ref<Framebuffer> vl::BlitFramebuffer::mReadFramebuffer
protected

Definition at line 174 of file BlitFramebuffer.hpp.

Referenced by readFramebuffer(), and setReadFramebuffer().

◆ mSrcRect

int vl::BlitFramebuffer::mSrcRect[4]
protected

Definition at line 176 of file BlitFramebuffer.hpp.

Referenced by copyPixels(), setSrcRect(), and srcRect().


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