Visualization Library v1.0.3A lightweight C++ OpenGL middleware for 2D/3D graphics |
[Download] [Tutorials] [All Classes] [Grouped Classes] |
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>
Public Member Functions | |
BlitFramebuffer () | |
void | copyPixels () |
Performs the actual pixel copy from the read framebuffer to the draw framebuffer. | |
virtual bool | onRenderingStarted (const RenderingAbstract *) |
Reimplement to react to this event. | |
virtual bool | onRenderingFinished (const RenderingAbstract *) |
Reimplement to react to this event. | |
virtual bool | onRendererStarted (const RendererAbstract *) |
Reimplement to react to this event. | |
virtual bool | onRendererFinished (const RendererAbstract *) |
Reimplement to react to this event. | |
void | setReadFramebuffer (Framebuffer *fbo) |
The render-target used as source during blitting. | |
const Framebuffer * | readFramebuffer () const |
The render-target used as source during blitting. | |
Framebuffer * | readFramebuffer () |
The render-target used as source during blitting. | |
void | setReadBuffer (EReadDrawBuffer read_buffer) |
The read-buffer of the read-render-target used as pixel source during blitting. | |
EReadDrawBuffer | readBuffer () const |
The read-buffer of the read-render-target used as pixel source during blitting. | |
void | setDrawFramebuffer (Framebuffer *fbo) |
The render-target used as destination during blitting. | |
const Framebuffer * | drawFramebuffer () const |
The render-target used as destination during blitting. | |
Framebuffer * | drawFramebuffer () |
The render-target used as destination during blitting. | |
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 | |
int | bufferMask () const |
void | setLinearFilteringEnabled (bool enable_linear_filtering) |
bool | linearFilteringEnabled () const |
Protected Attributes | |
ref< Framebuffer > | mReadFramebuffer |
ref< Framebuffer > | mDrawFramebuffer |
int | mSrcRect [4] |
int | mDstRect [4] |
int | mBufferMask |
EReadDrawBuffer | mReadBuffer |
bool | mLinearFilteringEnabled |
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.
vl::BlitFramebuffer::BlitFramebuffer | ( | ) | [inline] |
Definition at line 49 of file BlitFramebuffer.hpp.
References mBufferMask, mLinearFilteringEnabled, mReadBuffer, vl::RDB_COLOR_ATTACHMENT0, setDstRect(), setSrcRect(), and VL_DEBUG_SET_OBJECT_NAME.
void vl::BlitFramebuffer::copyPixels | ( | ) | [inline] |
Performs the actual pixel copy from the read framebuffer to the draw framebuffer.
Definition at line 60 of file BlitFramebuffer.hpp.
References vl::Framebuffer::activate(), drawFramebuffer(), vl::FBB_DRAW_FRAMEBUFFER, vl::FBB_READ_FRAMEBUFFER, mBufferMask, mDstRect, mLinearFilteringEnabled, mReadBuffer, mSrcRect, readFramebuffer(), and VL_CHECK_OGL.
Referenced by onRendererFinished(), onRendererStarted(), onRenderingFinished(), and onRenderingStarted().
virtual bool vl::BlitFramebuffer::onRenderingStarted | ( | const RenderingAbstract * | ) | [inline, virtual] |
Reimplement to react to this event.
true
if the callback reacted to the given event. Implements vl::RenderEventCallback.
Definition at line 99 of file BlitFramebuffer.hpp.
References copyPixels().
virtual bool vl::BlitFramebuffer::onRenderingFinished | ( | const RenderingAbstract * | ) | [inline, virtual] |
Reimplement to react to this event.
true
if the callback reacted to the given event. Implements vl::RenderEventCallback.
Definition at line 105 of file BlitFramebuffer.hpp.
References copyPixels().
virtual bool vl::BlitFramebuffer::onRendererStarted | ( | const RendererAbstract * | ) | [inline, virtual] |
Reimplement to react to this event.
true
if the callback reacted to the given event. Implements vl::RenderEventCallback.
Definition at line 111 of file BlitFramebuffer.hpp.
References copyPixels().
virtual bool vl::BlitFramebuffer::onRendererFinished | ( | const RendererAbstract * | ) | [inline, virtual] |
Reimplement to react to this event.
true
if the callback reacted to the given event. Implements vl::RenderEventCallback.
Definition at line 117 of file BlitFramebuffer.hpp.
References copyPixels().
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.
const Framebuffer* vl::BlitFramebuffer::readFramebuffer | ( | ) | const [inline] |
The render-target used as source during blitting.
Definition at line 127 of file BlitFramebuffer.hpp.
References vl::ref< T >::get(), and mReadFramebuffer.
Referenced by copyPixels().
Framebuffer* vl::BlitFramebuffer::readFramebuffer | ( | ) | [inline] |
The render-target used as source during blitting.
Definition at line 130 of file BlitFramebuffer.hpp.
References vl::ref< T >::get(), and mReadFramebuffer.
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.
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.
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.
const Framebuffer* vl::BlitFramebuffer::drawFramebuffer | ( | ) | const [inline] |
The render-target used as destination during blitting.
Definition at line 142 of file BlitFramebuffer.hpp.
References vl::ref< T >::get(), and mDrawFramebuffer.
Referenced by copyPixels().
Framebuffer* vl::BlitFramebuffer::drawFramebuffer | ( | ) | [inline] |
The render-target used as destination during blitting.
Definition at line 145 of file BlitFramebuffer.hpp.
References vl::ref< T >::get(), and mDrawFramebuffer.
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().
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().
const int* vl::BlitFramebuffer::srcRect | ( | ) | const [inline] |
Definition at line 163 of file BlitFramebuffer.hpp.
References mSrcRect.
const int* vl::BlitFramebuffer::dstRect | ( | ) | const [inline] |
Definition at line 164 of file BlitFramebuffer.hpp.
References mDstRect.
void vl::BlitFramebuffer::setBufferMask | ( | int | buffer_mask ) | [inline] |
takes a bitmask combination of EBufferBits
Definition at line 167 of file BlitFramebuffer.hpp.
References mBufferMask.
int vl::BlitFramebuffer::bufferMask | ( | ) | const [inline] |
Definition at line 168 of file BlitFramebuffer.hpp.
References mBufferMask.
void vl::BlitFramebuffer::setLinearFilteringEnabled | ( | bool | enable_linear_filtering ) | [inline] |
Definition at line 170 of file BlitFramebuffer.hpp.
References mLinearFilteringEnabled.
bool vl::BlitFramebuffer::linearFilteringEnabled | ( | ) | const [inline] |
Definition at line 171 of file BlitFramebuffer.hpp.
References mLinearFilteringEnabled.
ref<Framebuffer> vl::BlitFramebuffer::mReadFramebuffer [protected] |
Definition at line 174 of file BlitFramebuffer.hpp.
Referenced by readFramebuffer(), and setReadFramebuffer().
ref<Framebuffer> vl::BlitFramebuffer::mDrawFramebuffer [protected] |
Definition at line 175 of file BlitFramebuffer.hpp.
Referenced by drawFramebuffer(), and setDrawFramebuffer().
int vl::BlitFramebuffer::mSrcRect[4] [protected] |
Definition at line 176 of file BlitFramebuffer.hpp.
Referenced by copyPixels(), setSrcRect(), and srcRect().
int vl::BlitFramebuffer::mDstRect[4] [protected] |
Definition at line 177 of file BlitFramebuffer.hpp.
Referenced by copyPixels(), dstRect(), and setDstRect().
int vl::BlitFramebuffer::mBufferMask [protected] |
Definition at line 178 of file BlitFramebuffer.hpp.
Referenced by BlitFramebuffer(), bufferMask(), copyPixels(), and setBufferMask().
EReadDrawBuffer vl::BlitFramebuffer::mReadBuffer [protected] |
Definition at line 179 of file BlitFramebuffer.hpp.
Referenced by BlitFramebuffer(), copyPixels(), readBuffer(), and setReadBuffer().
bool vl::BlitFramebuffer::mLinearFilteringEnabled [protected] |
Definition at line 180 of file BlitFramebuffer.hpp.
Referenced by BlitFramebuffer(), copyPixels(), linearFilteringEnabled(), and setLinearFilteringEnabled().