Visualization Library v1.0.3A lightweight C++ OpenGL middleware for 2D/3D graphics |
[Download] [Tutorials] [All Classes] [Grouped Classes] |
A RenderEventCallback that copyes a rectangular pixel area from a source buffer to an Image at the end of a rendering. More...
#include <ReadPixels.hpp>
Public Member Functions | |
ReadPixels () | |
ReadPixels (int x, int y, int width, int height, EReadDrawBuffer read_buffer, Image *image, bool store_in_pbo) | |
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 | setup (int x, int y, int width, int height, EReadDrawBuffer read_buffer, bool store_in_pbo) |
void | setX (int x) |
void | setY (int y) |
void | setWidth (int width) |
void | setHeight (int height) |
void | setReadBuffer (EReadDrawBuffer buffer) |
void | setImage (Image *image) |
void | setSavePath (const String &path) |
int | x () const |
int | y () const |
int | width () const |
int | height () const |
EReadDrawBuffer | readBuffer () const |
Image * | image () |
const Image * | image () const |
const String & | savePath () const |
void | setStoreInPixelBufferObject (bool use_pbo) |
bool | storeInPixelBufferObject () const |
Protected Member Functions | |
void | readPixels () |
Protected Attributes | |
int | mX |
int | mY |
int | mWidth |
int | mHeight |
EReadDrawBuffer | mReadBuffer |
ref< Image > | mImage |
String | mSavePath |
bool | mStoreInPixelBufferObject |
A RenderEventCallback that copyes a rectangular pixel area from a source buffer to an Image at the end of a rendering.
The actual copy is performed using the function Image::readPixels(). Using the function setSavePath() the Image will be saved on the specified location.
Definition at line 152 of file ReadPixels.hpp.
vl::ReadPixels::ReadPixels | ( | ) | [inline] |
Definition at line 157 of file ReadPixels.hpp.
References VL_DEBUG_SET_OBJECT_NAME.
vl::ReadPixels::ReadPixels | ( | int | x, |
int | y, | ||
int | width, | ||
int | height, | ||
EReadDrawBuffer | read_buffer, | ||
Image * | image, | ||
bool | store_in_pbo | ||
) | [inline] |
Definition at line 168 of file ReadPixels.hpp.
References VL_DEBUG_SET_OBJECT_NAME.
virtual bool vl::ReadPixels::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 180 of file ReadPixels.hpp.
References readPixels().
virtual bool vl::ReadPixels::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 186 of file ReadPixels.hpp.
References readPixels().
virtual bool vl::ReadPixels::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 192 of file ReadPixels.hpp.
References readPixels().
virtual bool vl::ReadPixels::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 198 of file ReadPixels.hpp.
References readPixels().
void vl::ReadPixels::setup | ( | int | x, |
int | y, | ||
int | width, | ||
int | height, | ||
EReadDrawBuffer | read_buffer, | ||
bool | store_in_pbo | ||
) | [inline] |
Definition at line 204 of file ReadPixels.hpp.
References height(), mHeight, mReadBuffer, mStoreInPixelBufferObject, mWidth, mX, mY, width(), x(), and y().
void vl::ReadPixels::setX | ( | int | x ) | [inline] |
Definition at line 214 of file ReadPixels.hpp.
void vl::ReadPixels::setY | ( | int | y ) | [inline] |
Definition at line 215 of file ReadPixels.hpp.
void vl::ReadPixels::setWidth | ( | int | width ) | [inline] |
Definition at line 216 of file ReadPixels.hpp.
void vl::ReadPixels::setHeight | ( | int | height ) | [inline] |
Definition at line 217 of file ReadPixels.hpp.
void vl::ReadPixels::setReadBuffer | ( | EReadDrawBuffer | buffer ) | [inline] |
Definition at line 218 of file ReadPixels.hpp.
References mReadBuffer.
void vl::ReadPixels::setImage | ( | Image * | image ) | [inline] |
Definition at line 219 of file ReadPixels.hpp.
void vl::ReadPixels::setSavePath | ( | const String & | path ) | [inline] |
Definition at line 220 of file ReadPixels.hpp.
References mSavePath.
int vl::ReadPixels::x | ( | ) | const [inline] |
int vl::ReadPixels::y | ( | ) | const [inline] |
int vl::ReadPixels::width | ( | ) | const [inline] |
Definition at line 224 of file ReadPixels.hpp.
References mWidth.
Referenced by setup(), and setWidth().
int vl::ReadPixels::height | ( | ) | const [inline] |
Definition at line 225 of file ReadPixels.hpp.
References mHeight.
Referenced by setHeight(), and setup().
EReadDrawBuffer vl::ReadPixels::readBuffer | ( | ) | const [inline] |
Definition at line 226 of file ReadPixels.hpp.
References mReadBuffer.
Image* vl::ReadPixels::image | ( | ) | [inline] |
Definition at line 227 of file ReadPixels.hpp.
References vl::ref< T >::get(), and mImage.
Referenced by setImage().
const Image* vl::ReadPixels::image | ( | ) | const [inline] |
Definition at line 228 of file ReadPixels.hpp.
References vl::ref< T >::get(), and mImage.
const String& vl::ReadPixels::savePath | ( | ) | const [inline] |
void vl::ReadPixels::setStoreInPixelBufferObject | ( | bool | use_pbo ) | [inline] |
Definition at line 231 of file ReadPixels.hpp.
References mStoreInPixelBufferObject.
bool vl::ReadPixels::storeInPixelBufferObject | ( | ) | const [inline] |
Definition at line 232 of file ReadPixels.hpp.
References mStoreInPixelBufferObject.
Referenced by readPixels().
void vl::ReadPixels::readPixels | ( | ) | [inline, protected] |
Definition at line 235 of file ReadPixels.hpp.
References vl::Log::error(), vl::ref< T >::get(), vl::String::length(), mHeight, mImage, mReadBuffer, mWidth, mX, mY, NULL, vl::saveImage(), savePath(), and storeInPixelBufferObject().
Referenced by onRendererFinished(), onRendererStarted(), onRenderingFinished(), and onRenderingStarted().
int vl::ReadPixels::mX [protected] |
Definition at line 248 of file ReadPixels.hpp.
Referenced by readPixels(), setup(), setX(), and x().
int vl::ReadPixels::mY [protected] |
Definition at line 249 of file ReadPixels.hpp.
Referenced by readPixels(), setup(), setY(), and y().
int vl::ReadPixels::mWidth [protected] |
Definition at line 250 of file ReadPixels.hpp.
Referenced by readPixels(), setup(), setWidth(), and width().
int vl::ReadPixels::mHeight [protected] |
Definition at line 251 of file ReadPixels.hpp.
Referenced by height(), readPixels(), setHeight(), and setup().
EReadDrawBuffer vl::ReadPixels::mReadBuffer [protected] |
Definition at line 252 of file ReadPixels.hpp.
Referenced by readBuffer(), readPixels(), setReadBuffer(), and setup().
ref<Image> vl::ReadPixels::mImage [protected] |
Definition at line 253 of file ReadPixels.hpp.
Referenced by image(), readPixels(), and setImage().
String vl::ReadPixels::mSavePath [protected] |
Definition at line 254 of file ReadPixels.hpp.
Referenced by savePath(), and setSavePath().
bool vl::ReadPixels::mStoreInPixelBufferObject [protected] |
Definition at line 255 of file ReadPixels.hpp.
Referenced by setStoreInPixelBufferObject(), setup(), and storeInPixelBufferObject().