Loading...
Searching...
No Matches
glOffscreenTarget.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
#ifndef BALL_VIEW_RENDERING_GLOFFSCREENTARGET_H
#define BALL_VIEW_RENDERING_GLOFFSCREENTARGET_H
#ifndef BALL_COMMON_GLOBAL_H
# include <BALL/COMMON/global.h>
#endif
#ifndef BALL_VIEW_RENDERING_RENDERWINDOW_H
# include <BALL/VIEW/RENDERING/renderWindow.h>
#endif
#ifndef BALL_VIEW_RENDERING_GLRENDERWINDOW_H
# include <BALL/VIEW/RENDERING/glRenderWindow.h>
#endif
#include <QtGui/QPaintDevice>
#include <boost/shared_ptr.hpp>
class QGLPixelBuffer;
namespace BALL
{
namespace VIEW
{
class BALL_VIEW_EXPORT GLOffscreenTarget
: public RenderWindow,
public QPaintDevice
{
public:
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;
protected:
String filename_;
GLRenderWindow* share_from_;
boost::shared_ptr<QGLPixelBuffer> pixel_buffer_;
bool use_pixel_buffer_;
QImage current_image_;
};
}
}
#endif // BALL_VIEW_RENDERING_GLOFFSCREENTARGET_H
global.h
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition COMMON/global.h:52
BALL::String
Definition string.h:57
BALL::VIEW::GLOffscreenTarget::tryUsePixelBuffer
void tryUsePixelBuffer(bool use_pbo=true)
BALL::VIEW::GLOffscreenTarget::resize
virtual bool resize(const unsigned int width, const unsigned int height)
BALL::VIEW::GLOffscreenTarget::pixel_buffer_
boost::shared_ptr< QGLPixelBuffer > pixel_buffer_
Definition glOffscreenTarget.h:64
BALL::VIEW::GLOffscreenTarget::refresh
virtual void refresh()
BALL::VIEW::GLOffscreenTarget::filename_
String filename_
Definition glOffscreenTarget.h:60
BALL::VIEW::GLOffscreenTarget::prepareUpscaling
virtual void prepareUpscaling(Size final_width, Size final_height)
BALL::VIEW::GLOffscreenTarget::use_pixel_buffer_
bool use_pixel_buffer_
Definition glOffscreenTarget.h:66
BALL::VIEW::GLOffscreenTarget::getImage
QImage getImage()
BALL::VIEW::GLOffscreenTarget::prepareRendering
virtual void prepareRendering()
BALL::VIEW::GLOffscreenTarget::updateImageTile
void updateImageTile(Size x_lower, Size y_lower, Size x_upper, Size y_upper)
BALL::VIEW::GLOffscreenTarget::share_from_
GLRenderWindow * share_from_
Definition glOffscreenTarget.h:62
BALL::VIEW::GLOffscreenTarget::paintEngine
virtual QPaintEngine * paintEngine() const
BALL::VIEW::GLOffscreenTarget::metric
virtual int metric(PaintDeviceMetric metric) const
BALL::VIEW::GLOffscreenTarget::GLOffscreenTarget
GLOffscreenTarget(GLRenderWindow *share_from, const String &filename)
BALL::VIEW::GLOffscreenTarget::current_image_
QImage current_image_
Definition glOffscreenTarget.h:68
BALL::VIEW::GLRenderWindow
Definition glRenderWindow.h:40
QPaintDevice
glRenderWindow.h
BALL::VIEW
Definition constraints.h:35
BALL::VIEW::RenderWindow
TRenderWindow< BALL_DEFAULT_PIXEL_TYPE > RenderWindow
Definition renderWindow.h:115
BALL
Definition constants.h:13
BALL::Size
BALL_SIZE_TYPE Size
Definition COMMON/global.h:114
renderWindow.h