BALL
1.4.2
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
BALL
VIEW
RENDERING
glOffscreenTarget.h
Go to the documentation of this file.
1
// -*- Mode: C++; tab-width: 2; -*-
2
// vi: set ts=2:
3
//
4
5
#ifndef BALL_VIEW_RENDERING_GLOFFSCREENTARGET_H
6
#define BALL_VIEW_RENDERING_GLOFFSCREENTARGET_H
7
8
#ifndef BALL_COMMON_GLOBAL_H
9
# include <
BALL/COMMON/global.h
>
10
#endif
11
12
#ifndef BALL_VIEW_RENDERING_RENDERWINDOW_H
13
# include <
BALL/VIEW/RENDERING/renderWindow.h
>
14
#endif
15
16
#ifndef BALL_VIEW_RENDERING_GLRENDERWINDOW_H
17
# include <
BALL/VIEW/RENDERING/glRenderWindow.h
>
18
#endif
19
20
21
#include <QtGui/QPaintDevice>
22
23
#include <boost/shared_ptr.hpp>
24
25
class
QGLPixelBuffer;
26
27
namespace
BALL
28
{
29
namespace
VIEW
30
{
36
class
BALL_VIEW_EXPORT
GLOffscreenTarget
37
:
public
t_RenderWindow
,
38
public
QPaintDevice
39
{
40
public
:
43
GLOffscreenTarget
(
GLRenderWindow
* share_from,
const
String
& filename);
44
45
virtual
void
prepareRendering();
46
virtual
void
prepareUpscaling(
Size
final_width,
Size
final_height);
47
48
virtual
bool
resize(
const
unsigned
int
width,
const
unsigned
int
height);
49
virtual
void
refresh();
50
51
void
tryUsePixelBuffer(
bool
use_pbo =
true
);
52
53
QImage getImage();
54
void
updateImageTile(
Size
x_lower,
Size
y_lower,
Size
x_upper,
Size
y_upper);
55
56
virtual
QPaintEngine* paintEngine()
const
;
57
virtual
int
metric(PaintDeviceMetric metric)
const
;
58
59
protected
:
60
String
filename_
;
61
62
GLRenderWindow
*
share_from_
;
63
64
boost::shared_ptr<QGLPixelBuffer>
pixel_buffer_
;
65
66
bool
use_pixel_buffer_
;
67
68
QImage
current_image_
;
69
};
70
71
}
72
}
73
#endif // BALL_VIEW_RENDERING_GLOFFSCREENTARGET_H
Generated by
1.8.3.1