annotate engine/core/view/renderers/genericrenderer.i @ 46:90005975cdbb

* Final LGPL switch step by adjusting the file headers * Remaining issues (just slightly related to the unittest switch): * No working unittest solution for msvc2005 yet * Unittests not working with mingw + scons either though this seems hard to impossible to fix without an expert in this field * sample_unit_test.cpp would need to get modified for unittest++; it still contains the old boost unittest code
author mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
date Sun, 13 Jul 2008 11:05:12 +0000
parents 75b6394ced14
children 2241b0d5379e
rev   line source
46
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 32
diff changeset
1 /***************************************************************************
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 32
diff changeset
2 * Copyright (C) 2005-2008 by the FIFE team *
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 32
diff changeset
3 * http://www.fifengine.de *
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 32
diff changeset
4 * This file is part of FIFE. *
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 32
diff changeset
5 * *
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 32
diff changeset
6 * FIFE is free software; you can redistribute it and/or *
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 32
diff changeset
7 * modify it under the terms of the GNU Lesser General Public *
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 32
diff changeset
8 * License as published by the Free Software Foundation; either *
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 32
diff changeset
9 * version 2.1 of the License, or (at your option) any later version. *
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 32
diff changeset
10 * *
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 32
diff changeset
11 * This library is distributed in the hope that it will be useful, *
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 32
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 32
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 32
diff changeset
14 * Lesser General Public License for more details. *
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 32
diff changeset
15 * *
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 32
diff changeset
16 * You should have received a copy of the GNU Lesser General Public *
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 32
diff changeset
17 * License along with this library; if not, write to the *
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 32
diff changeset
18 * Free Software Foundation, Inc., *
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 32
diff changeset
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 32
diff changeset
20 ***************************************************************************/
90005975cdbb * Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 32
diff changeset
21
23
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
22 %module fife
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
23 %{
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
24 #include "view/renderers/genericrenderer.h"
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
25 %}
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
26
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
27 namespace FIFE {
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
28 class RenderBackend;
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
29
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
30 class GenericRendererNode {
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
31 public:
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
32 GenericRendererNode(Instance* attached_instance, Location* relative_location, const Point &relative_point = Point(0,0));
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
33 GenericRendererNode(Instance* attached_instance, const Point &relative_point = Point(0,0));
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
34 GenericRendererNode(Location* attached_location, const Point &relative_point = Point(0,0));
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
35 GenericRendererNode(const Point &attached_point);
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
36 ~GenericRendererNode();
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
37
26
70f41ea8e7db fix compile errors in node setters...
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 23
diff changeset
38 void setAttached(Instance* attached_instance, Location* relative_location, const Point &relative_point);
70f41ea8e7db fix compile errors in node setters...
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 23
diff changeset
39 void setAttached(Instance* attached_instance, Location* relative_location);
23
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
40 void setAttached(Instance* attached_instance, const Point &relative_point);
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
41 void setAttached(Instance* attached_instance);
26
70f41ea8e7db fix compile errors in node setters...
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 23
diff changeset
42 void setAttached(Location* attached_location, const Point &relative_point);
70f41ea8e7db fix compile errors in node setters...
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 23
diff changeset
43 void setAttached(Location* attached_location);
23
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
44 void setAttached(const Point &attached_point);
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
45
26
70f41ea8e7db fix compile errors in node setters...
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 23
diff changeset
46 void setRelative(Location* relative_location);
70f41ea8e7db fix compile errors in node setters...
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 23
diff changeset
47 void setRelative(Location* relative_location, Point relative_point);
23
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
48 void setRelative(const Point &relative_point);
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
49
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
50 Instance* getAttachedInstance();
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
51 Location* getAttachedLocation();
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
52 Point getAttachedPoint();
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
53
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
54 Location* getOffsetLocation();
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
55 Point getOffsetPoint();
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
56
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
57 Instance* getInstance();
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
58 Location* getLocation();
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
59 Point getPoint();
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
60
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
61 Point getCalculatedPoint(Camera* cam, Layer* layer, std::vector<Instance*>& instances);
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
62 private:
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
63 Instance* m_instance;
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
64 Location* m_location;
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
65 Point m_point;
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
66 };
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
67 class GenericRendererElementInfo {
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
68 public:
29
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
69 virtual void render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool) {};
23
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
70 virtual ~GenericRendererElementInfo() {};
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
71 };
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
72
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
73 class GenericRendererLineInfo : public GenericRendererElementInfo {
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
74 public:
29
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
75 void render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool);
23
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
76 GenericRendererLineInfo(GenericRendererNode n1, GenericRendererNode n2, uint8_t r, uint8_t g, uint8_t b);
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
77 virtual ~GenericRendererLineInfo() {};
29
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
78 private:
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
79 GenericRendererNode m_edge1;
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
80 GenericRendererNode m_edge2;
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
81 uint8_t m_red;
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
82 uint8_t m_green;
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
83 uint8_t m_blue;
23
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
84 };
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
85 class GenericRendererPointInfo : public GenericRendererElementInfo {
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
86 public:
29
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
87 void render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool);
23
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
88 GenericRendererPointInfo(GenericRendererNode n, uint8_t r, uint8_t g, uint8_t b);
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
89 virtual ~GenericRendererPointInfo() {};
29
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
90 private:
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
91 GenericRendererNode m_anchor;
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
92 uint8_t m_red;
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
93 uint8_t m_green;
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
94 uint8_t m_blue;
23
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
95 };
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
96 class GenericRendererQuadInfo : public GenericRendererElementInfo {
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
97 public:
29
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
98 void render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool);
23
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
99 GenericRendererQuadInfo(GenericRendererNode n1, GenericRendererNode n2, GenericRendererNode n3, GenericRendererNode n4, uint8_t r, uint8_t g, uint8_t b);
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
100 virtual ~GenericRendererQuadInfo() {};
29
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
101 private:
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
102 GenericRendererNode m_edge1;
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
103 GenericRendererNode m_edge2;
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
104 GenericRendererNode m_edge3;
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
105 GenericRendererNode m_edge4;
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
106 uint8_t m_red;
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
107 uint8_t m_green;
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
108 uint8_t m_blue;
23
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
109 };
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
110 class GenericRendererImageInfo : public GenericRendererElementInfo {
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
111 public:
29
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
112 void render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool);
23
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
113 GenericRendererImageInfo(GenericRendererNode n, int image);
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
114 virtual ~GenericRendererImageInfo() {};
29
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
115 private:
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
116 GenericRendererNode m_anchor;
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
117 int m_image;
23
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
118 };
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
119 class GenericRendererAnimationInfo : public GenericRendererElementInfo {
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
120 public:
29
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
121 void render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool);
23
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
122 GenericRendererAnimationInfo(GenericRendererNode n, int animation);
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
123 virtual ~GenericRendererAnimationInfo() {};
29
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
124 private:
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
125 GenericRendererNode m_anchor;
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
126 int m_animation;
23
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
127 };
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
128 class GenericRendererTextInfo : public GenericRendererElementInfo {
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
129 public:
29
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
130 void render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool);
23
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
131 GenericRendererTextInfo(GenericRendererNode n, AbstractFont* font, std::string text);
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
132 virtual ~GenericRendererTextInfo() {};
29
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
133 private:
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
134 GenericRendererNode m_anchor;
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
135 AbstractFont* m_font;
0cb049f291e1 make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 27
diff changeset
136 std::string m_text;
23
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
137 };
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
138 class GenericRenderer: public RendererBase {
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
139 public:
27
788cb9525b2f add image and text renderer to generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 26
diff changeset
140 GenericRenderer(RenderBackend* renderbackend, int position, ImagePool* imagepool, AnimationPool* animpool);
23
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
141 ~GeometricRenderer();
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
142 std::string getName();
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
143 static GenericRenderer* getInstance(IRendererContainer* cnt);
32
75b6394ced14 * remove geometric renderer, its not replaced by the more functional generic renderern
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 29
diff changeset
144 void addLine(int group, GenericRendererNode n1, GenericRendererNode n2, uint8_t r, uint8_t g, uint8_t b);
75b6394ced14 * remove geometric renderer, its not replaced by the more functional generic renderern
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 29
diff changeset
145 void addPoint(int group, GenericRendererNode n, uint8_t r, uint8_t g, uint8_t b);
75b6394ced14 * remove geometric renderer, its not replaced by the more functional generic renderern
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 29
diff changeset
146 void addQuad(int group, GenericRendererNode n1, GenericRendererNode n2, GenericRendererNode n3, GenericRendererNode n4, uint8_t r, uint8_t g, uint8_t b);
75b6394ced14 * remove geometric renderer, its not replaced by the more functional generic renderern
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 29
diff changeset
147 void addText(int group, GenericRendererNode n, AbstractFont* font, std::string text);
75b6394ced14 * remove geometric renderer, its not replaced by the more functional generic renderern
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 29
diff changeset
148 void addImage(int group, GenericRendererNode n, int image);
75b6394ced14 * remove geometric renderer, its not replaced by the more functional generic renderern
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 29
diff changeset
149 void addAnimation(int group, GenericRendererNode n, int animation);
75b6394ced14 * remove geometric renderer, its not replaced by the more functional generic renderern
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 29
diff changeset
150 void removeAll(int group);
23
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
151 };
e5e2fec68834 add generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
152 }