Loading...
Searching...
No Matches
BALL::VIEW::GLOffscreenTarget Class Reference

`#include <BALL/VIEW/RENDERING/glOffscreenTarget.h>`

Inheritance diagram for BALL::VIEW::GLOffscreenTarget:

## Public Member Functions

| GLOffscreenTarget (GLRenderWindow *share_from, const String &filename)
virtual void | prepareRendering ()
virtual void | prepareUpscaling (Size final_width, Size final_height)
virtual bool | resize (const unsigned int width, const unsigned int height)
virtual void | refresh ()
void | tryUsePixelBuffer (bool use_pbo=true)
QImage | getImage ()
void | updateImageTile (Size x_lower, Size y_lower, Size x_upper, Size y_upper)
virtual QPaintEngine * | paintEngine () const
virtual int | metric (PaintDeviceMetric metric) const
Public Member Functions inherited from BALL::VIEW::TRenderWindow< BALL_DEFAULT_PIXEL_TYPE >
| TRenderWindow ()
virtual | ~TRenderWindow ()
virtual bool | init ()
virtual FrameBufferPtr | getBuffer ()
virtual FrameBufferFormat | getFormat () const
virtual void | releaseBuffer (FrameBufferPtr buffer)
virtual bool | doNotResize () const
virtual void | setDoNotResize (bool do_not_resize)
Public Member Functions inherited from BALL::VIEW::RenderTarget
virtual | ~RenderTarget ()
virtual void | setupStereo (float, float)

## Protected Attributes

String | filename_
GLRenderWindow * | share_from_
boost::shared_ptr< QGLPixelBuffer > | pixel_buffer_
bool | use_pixel_buffer_
QImage | current_image_
Protected Attributes inherited from BALL::VIEW::TRenderWindow< BALL_DEFAULT_PIXEL_TYPE >
t_PixelPtr | m_pixels
FrameBufferPtr | m_framebuffer
FrameBufferFormat | m_fmt
const PixelFormat | m_pfm
bool | m_bufferLocked
const Size | m_minimalWidth
const Size | m_minimalHeight
bool | do_not_resize_

## Detailed Description

Model of the RenderWindow which uses OpenGL to render its buffer into a file.

The class will try to use a pixel buffer target if this is available. If the OpenGL driver has no support for PixelBufferObjects, we try to render into a window on screen instead.

Definition at line 36 of file glOffscreenTarget.h.

## Constructor & Destructor Documentation

## GLOffscreenTarget()

BALL::VIEW::GLOffscreenTarget::GLOffscreenTarget | ( | GLRenderWindow * | share_from,
|  | const String & | filename )

Create a new GLOffscreenTarget with context shared from an existing GLRenderWindow.

## Member Function Documentation

## getImage()

QImage BALL::VIEW::GLOffscreenTarget::getImage | ( |  | ) |

## metric()

virtual int BALL::VIEW::GLOffscreenTarget::metric | ( | PaintDeviceMetric | metric | ) | const

virtual

## paintEngine()

virtual QPaintEngine * BALL::VIEW::GLOffscreenTarget::paintEngine | ( |  | ) | const

virtual

## prepareRendering()

virtual void BALL::VIEW::GLOffscreenTarget::prepareRendering | ( |  | ) |

virtual

Reimplemented from BALL::VIEW::TRenderWindow< BALL_DEFAULT_PIXEL_TYPE >.

## prepareUpscaling()

virtual void BALL::VIEW::GLOffscreenTarget::prepareUpscaling | ( | Size | final_width,
|  | Size | final_height )

virtual

## refresh()

virtual void BALL::VIEW::GLOffscreenTarget::refresh | ( |  | ) |

virtual

Request that the image is actually displayed on the screen or other device the window encapsulated. You should implement this method in subclass. This is different from RenderTarget releaseBuffer. ReleaseBuffer only informs the window that a buffer is ready, but does not imply the buffer is actually displayed somewhere. This is done by refresh. On the other hand, refresh called inbetween getBuffer and releaseBuffer has no effect.

Reimplemented from BALL::VIEW::TRenderWindow< BALL_DEFAULT_PIXEL_TYPE >.

## resize()

virtual bool BALL::VIEW::GLOffscreenTarget::resize | ( | const unsigned int | width,
|  | const unsigned int | height )

virtual

Request new window size. Returns false if such a size cannot be supplied This call must be made before the window buffer is handed out to be rendered. This precondition is being checked automatically, see getBuffer

Reimplemented from BALL::VIEW::TRenderWindow< BALL_DEFAULT_PIXEL_TYPE >.

## tryUsePixelBuffer()

void BALL::VIEW::GLOffscreenTarget::tryUsePixelBuffer | ( | bool | use_pbo = true | ) |

## updateImageTile()

void BALL::VIEW::GLOffscreenTarget::updateImageTile | ( | Size | x_lower,
|  | Size | y_lower,
|  | Size | x_upper,
|  | Size | y_upper )

## Member Data Documentation

## current_image_

QImage BALL::VIEW::GLOffscreenTarget::current_image_

protected

Definition at line 68 of file glOffscreenTarget.h.

## filename_

String BALL::VIEW::GLOffscreenTarget::filename_

protected

Definition at line 60 of file glOffscreenTarget.h.

## pixel_buffer_

boost::shared_ptr<QGLPixelBuffer> BALL::VIEW::GLOffscreenTarget::pixel_buffer_

protected

Definition at line 64 of file glOffscreenTarget.h.

## share_from_

GLRenderWindow* BALL::VIEW::GLOffscreenTarget::share_from_

protected

Definition at line 62 of file glOffscreenTarget.h.

## use_pixel_buffer_

bool BALL::VIEW::GLOffscreenTarget::use_pixel_buffer_

protected

Definition at line 66 of file glOffscreenTarget.h.