Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics
[Home] [Tutorials] [All Classes] [Grouped Classes]

vl::ReadPixels Class Reference

A RenderingCallback that copyes a rectangular pixel area from a source buffer to an Image at the end of a rendering. More...

#include <ReadPixels.hpp>

Inheritance diagram for vl::ReadPixels:

vl::RenderingCallback vl::Object

List of all members.

Public Member Functions

virtual const char * className ()
 Returns the name of the class.
 ReadPixels ()
 ReadPixels (int x, int y, int width, int height, EReadDrawBuffer read_buffer, Image *image, bool store_in_pbo)
virtual bool renderingCallback (const RenderingAbstract *, ERenderingCallback reason)
 Implements the actual code to be executed upon callback activation.
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
Imageimage ()
const Imageimage () const
const StringsavePath () const
void setStoreInPixelBufferObject (bool use_pbo)
bool storeInPixelBufferObject () const

Protected Attributes

int mX
int mY
int mWidth
int mHeight
EReadDrawBuffer mReadBuffer
ref< ImagemImage
String mSavePath
bool mStoreInPixelBufferObject


Detailed Description

A RenderingCallback 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.

See also:

Constructor & Destructor Documentation

vl::ReadPixels::ReadPixels (  )  [inline]

vl::ReadPixels::ReadPixels ( int  x,
int  y,
int  width,
int  height,
EReadDrawBuffer  read_buffer,
Image image,
bool  store_in_pbo 
) [inline]


Member Function Documentation

virtual const char* vl::ReadPixels::className (  )  [inline, virtual]

Returns the name of the class.

Reimplemented from vl::RenderingCallback.

virtual bool vl::ReadPixels::renderingCallback ( const RenderingAbstract rendering,
ERenderingCallback  reason 
) [inline, virtual]

Implements the actual code to be executed upon callback activation.

Returns:
true if the callback reacted to the given reason

Implements vl::RenderingCallback.

void vl::ReadPixels::setup ( int  x,
int  y,
int  width,
int  height,
EReadDrawBuffer  read_buffer,
bool  store_in_pbo 
) [inline]

void vl::ReadPixels::setX ( int  x  )  [inline]

void vl::ReadPixels::setY ( int  y  )  [inline]

void vl::ReadPixels::setWidth ( int  width  )  [inline]

void vl::ReadPixels::setHeight ( int  height  )  [inline]

void vl::ReadPixels::setReadBuffer ( EReadDrawBuffer  buffer  )  [inline]

void vl::ReadPixels::setImage ( Image image  )  [inline]

void vl::ReadPixels::setSavePath ( const String path  )  [inline]

int vl::ReadPixels::x (  )  const [inline]

int vl::ReadPixels::y (  )  const [inline]

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

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

EReadDrawBuffer vl::ReadPixels::readBuffer (  )  const [inline]

Image* vl::ReadPixels::image (  )  [inline]

const Image* vl::ReadPixels::image (  )  const [inline]

const String& vl::ReadPixels::savePath (  )  const [inline]

void vl::ReadPixels::setStoreInPixelBufferObject ( bool  use_pbo  )  [inline]

bool vl::ReadPixels::storeInPixelBufferObject (  )  const [inline]


Member Data Documentation

int vl::ReadPixels::mX [protected]

int vl::ReadPixels::mY [protected]

int vl::ReadPixels::mWidth [protected]

int vl::ReadPixels::mHeight [protected]


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

Visualization Library v2009.08 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Fri Aug 28 10:14:13 2009.
Permission is granted to use this page to write and publish articles regarding Visualization Library.