1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
#pragma once
#include "opengl/storage.hpp"
#include "geometry_batcher.hpp"
#include "../geometry/point2d.hpp"
#include "../geometry/rect2d.hpp"
#include "../base/buffer_vector.hpp"
#include "../std/shared_ptr.hpp"
class ScreenBase;
namespace graphics
{
struct Color;
namespace gl
{
class BaseTexture;
}
struct BlitInfo
{
shared_ptr<gl::BaseTexture> m_srcSurface;
math::Matrix<double, 3, 3> m_matrix;
m2::RectI m_srcRect;
m2::RectU m_texRect;
};
class Blitter : public GeometryBatcher
{
protected:
typedef GeometryBatcher base_t;
void calcPoints(m2::RectI const & srcRect,
m2::RectU const & texRect,
shared_ptr<gl::BaseTexture> const & texture,
math::Matrix<double, 3, 3> const & m,
bool isSubPixel,
m2::PointF * geomPts,
m2::PointF * texPts);
public:
Blitter(base_t::Params const & params);
~Blitter();
/// Immediate mode rendering functions.
/// they doesn't buffer any data as other functions do, but immediately renders it
/// @{
void blit(BlitInfo const * blitInfo,
size_t s,
bool isSubPixel,
double depth);
/// @}
};
}
|