synfig-core
1.0.3
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
synfig
renderersoftware.h
Go to the documentation of this file.
1
/* === S Y N F I G ========================================================= */
21
/* ========================================================================= */
22
23
/* === S T A R T =========================================================== */
24
25
#ifndef __SYNFIG_RENDERERSOFTWARE_H
26
#define __SYNFIG_RENDERERSOFTWARE_H
27
28
/* === H E A D E R S ======================================================= */
29
30
#include "
renderer.h
"
31
#include "
surface.h
"
32
#include "
vector.h
"
33
#include "
mesh.h
"
34
#include "
polygon.h
"
35
36
/* === M A C R O S ========================================================= */
37
38
/* === T Y P E D E F S ===================================================== */
39
40
/* === C L A S S E S & S T R U C T S ======================================= */
41
42
namespace
synfig
43
{
44
45
class
RendererSoftware;
46
47
template
<>
48
class
Renderer::TypesTemplate
<
RendererSoftware
,
Renderer
::PrimitiveTypeSurface>:
49
public
Renderer::TypesTemplateBase
<synfig::Surface> { };
50
51
template
<>
52
class
Renderer::TypesTemplate
<
RendererSoftware
,
Renderer
::PrimitiveTypeMesh>:
53
public
Renderer::TypesTemplateBase
<synfig::Mesh> { };
54
55
class
RendererSoftware
:
public
Renderer
{
56
private
:
57
static
RendererId
id;
58
struct
Helper;
59
struct
IntVector;
60
public
:
61
typedef
RendererSoftware
RendererType
;
62
typedef
Renderer::TypesBase<RendererType>
Types
;
63
64
static
RendererId
get_id
();
65
static
void
initialize
();
66
static
void
deinitialize
();
67
68
static
void
render_triangle
(
69
synfig::Surface
&target_surface,
70
const
Vector
&p0,
71
const
Vector
&p1,
72
const
Vector
&p2,
73
const
Color
&color,
74
Color::BlendMethod
blend_method );
75
76
static
void
render_triangle
(
77
synfig::Surface
&target_surface,
78
const
Vector
&p0,
79
const
Vector
&t0,
80
const
Vector
&p1,
81
const
Vector
&t1,
82
const
Vector
&p2,
83
const
Vector
&t2,
84
const
synfig::Surface
&texture,
85
Real
alpha,
86
Color::BlendMethod
blend_method );
87
88
static
void
render_polygon
(
89
synfig::Surface
&target_surface,
90
const
synfig::Polygon
&polygon,
91
const
Matrix
&transform_matrix,
92
const
Color
&color,
93
Color::BlendMethod
blend_method );
94
95
static
void
render_mesh
(
96
synfig::Surface
&target_surface,
97
const
synfig::Mesh
&mesh,
98
const
synfig::Surface
&texture,
99
const
Matrix
&transform_matrix,
100
const
Matrix
&texture_matrix,
101
Real
alpha,
102
Color::BlendMethod
blend_method );
103
104
RendererSoftware
();
105
virtual
Result
render_surface
(
const
Params
¶ms,
const
Primitive<PrimitiveTypeSurface>
&primitive);
106
virtual
Result
render_polygon
(
const
Params
¶ms,
const
Primitive<PrimitiveTypePolygon>
&primitive);
107
virtual
Result
render_colored_polygon
(
const
Params
¶ms,
const
Primitive<PrimitiveTypeColoredPolygon>
&primitive);
108
virtual
Result
render_mesh
(
const
Params
¶ms,
const
Primitive<PrimitiveTypeMesh>
&primitive);
109
};
110
111
};
/* end namespace synfig */
112
113
/* -- E N D ----------------------------------------------------------------- */
114
115
#endif
Generated on Mon Nov 16 2015 15:33:49 for synfig-core by
1.8.1.2