Mercurial > fife-parpg
annotate engine/core/view/renderers/genericrenderer.cpp @ 430:ad1f09d954f9
Added the ability to render a vertex on the screen. The vertex is represented by a small square. fixes[t:455]
author | prock@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Tue, 23 Feb 2010 19:25:59 +0000 |
parents | 56ac89189bc4 |
children | f855809822cf |
rev | line source |
---|---|
23 | 1 /*************************************************************************** |
2 * Copyright (C) 2005-2008 by the FIFE team * | |
3 * http://www.fifengine.de * | |
4 * This file is part of FIFE. * | |
5 * * | |
46
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
36
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:
36
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:
36
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:
36
diff
changeset
|
9 * version 2.1 of the License, or (at your option) any later version. * |
23 | 10 * * |
46
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
36
diff
changeset
|
11 * This library is distributed in the hope that it will be useful, * |
23 | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
46
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
36
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:
36
diff
changeset
|
14 * Lesser General Public License for more details. * |
23 | 15 * * |
46
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
36
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:
36
diff
changeset
|
17 * License along with this library; if not, write to the * |
23 | 18 * Free Software Foundation, Inc., * |
46
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
36
diff
changeset
|
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * |
23 | 20 ***************************************************************************/ |
21 | |
22 // Standard C++ library includes | |
23 | |
24 // 3rd party library includes | |
25 | |
26 // FIFE includes | |
27 // These includes are split up in two parts, separated by one empty line | |
28 // First block: files included from the FIFE root src directory | |
29 // Second block: files included from the same folder | |
30 #include "video/renderbackend.h" | |
27
788cb9525b2f
add image and text renderer to generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
26
diff
changeset
|
31 #include "video/imagepool.h" |
788cb9525b2f
add image and text renderer to generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
26
diff
changeset
|
32 #include "video/animation.h" |
788cb9525b2f
add image and text renderer to generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
26
diff
changeset
|
33 #include "video/animationpool.h" |
788cb9525b2f
add image and text renderer to generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
26
diff
changeset
|
34 #include "video/fonts/abstractfont.h" |
788cb9525b2f
add image and text renderer to generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
26
diff
changeset
|
35 #include "video/image.h" |
23 | 36 #include "util/math/fife_math.h" |
37 #include "util/log/logger.h" | |
181
56ac89189bc4
fixed time handling in fife:
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
105
diff
changeset
|
38 #include "util/time/timemanager.h" |
23 | 39 #include "model/metamodel/grids/cellgrid.h" |
31
9a9f4447af7c
add animation renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
30
diff
changeset
|
40 #include "model/metamodel/timeprovider.h" |
23 | 41 #include "model/structures/instance.h" |
42 #include "model/structures/layer.h" | |
43 #include "model/structures/location.h" | |
44 | |
45 #include "view/camera.h" | |
46 #include "genericrenderer.h" | |
47 | |
48 | |
49 namespace FIFE { | |
50 static Logger _log(LM_VIEWVIEW); | |
51 | |
52 GenericRendererNode::GenericRendererNode(Instance* attached_instance, Location* relative_location, const Point &relative_point): | |
53 m_instance(attached_instance), | |
54 m_location(relative_location), | |
55 m_point(relative_point) { | |
56 } | |
57 GenericRendererNode::GenericRendererNode(Instance* attached_instance, const Point &relative_point): | |
58 m_instance(attached_instance), | |
59 m_location(NULL), | |
60 m_point(relative_point) { | |
61 } | |
62 GenericRendererNode::GenericRendererNode(Location* attached_location, const Point &relative_point): | |
63 m_instance(NULL), | |
64 m_location(attached_location), | |
65 m_point(relative_point) { | |
66 } | |
67 GenericRendererNode::GenericRendererNode(const Point &attached_point): | |
68 m_instance(NULL), | |
69 m_location(NULL), | |
70 m_point(attached_point) { | |
71 } | |
72 GenericRendererNode::~GenericRendererNode() { | |
73 } | |
74 | |
26
70f41ea8e7db
fix compile errors in node setters...
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
25
diff
changeset
|
75 void GenericRendererNode::setAttached(Instance* attached_instance, Location* relative_location, const Point &relative_point) { |
25
fc6713d72b80
add setter for nodes
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
24
diff
changeset
|
76 m_instance = attached_instance; |
fc6713d72b80
add setter for nodes
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
24
diff
changeset
|
77 m_location = relative_location; |
fc6713d72b80
add setter for nodes
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
24
diff
changeset
|
78 m_point = relative_point; |
23 | 79 } |
26
70f41ea8e7db
fix compile errors in node setters...
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
25
diff
changeset
|
80 void GenericRendererNode::setAttached(Instance* attached_instance, Location* relative_location) { |
25
fc6713d72b80
add setter for nodes
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
24
diff
changeset
|
81 m_instance = attached_instance; |
fc6713d72b80
add setter for nodes
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
24
diff
changeset
|
82 m_location = relative_location; |
23 | 83 } |
84 void GenericRendererNode::setAttached(Instance* attached_instance, const Point &relative_point) { | |
25
fc6713d72b80
add setter for nodes
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
24
diff
changeset
|
85 m_instance = attached_instance; |
fc6713d72b80
add setter for nodes
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
24
diff
changeset
|
86 m_point = relative_point; |
23 | 87 } |
88 void GenericRendererNode::setAttached(Instance* attached_instance) { | |
25
fc6713d72b80
add setter for nodes
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
24
diff
changeset
|
89 m_instance = attached_instance; |
23 | 90 } |
26
70f41ea8e7db
fix compile errors in node setters...
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
25
diff
changeset
|
91 void GenericRendererNode::setAttached(Location* attached_location, const Point &relative_point) { |
25
fc6713d72b80
add setter for nodes
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
24
diff
changeset
|
92 m_instance = NULL; |
fc6713d72b80
add setter for nodes
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
24
diff
changeset
|
93 m_location = attached_location; |
fc6713d72b80
add setter for nodes
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
24
diff
changeset
|
94 m_point = relative_point; |
23 | 95 } |
26
70f41ea8e7db
fix compile errors in node setters...
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
25
diff
changeset
|
96 void GenericRendererNode::setAttached(Location* attached_location) { |
25
fc6713d72b80
add setter for nodes
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
24
diff
changeset
|
97 m_instance = NULL; |
fc6713d72b80
add setter for nodes
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
24
diff
changeset
|
98 m_location = attached_location; |
23 | 99 } |
100 void GenericRendererNode::setAttached(const Point &attached_point) { | |
25
fc6713d72b80
add setter for nodes
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
24
diff
changeset
|
101 m_instance = NULL; |
fc6713d72b80
add setter for nodes
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
24
diff
changeset
|
102 m_location = NULL; |
fc6713d72b80
add setter for nodes
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
24
diff
changeset
|
103 m_point = attached_point; |
23 | 104 } |
105 | |
26
70f41ea8e7db
fix compile errors in node setters...
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
25
diff
changeset
|
106 void GenericRendererNode::setRelative(Location* relative_location) { |
25
fc6713d72b80
add setter for nodes
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
24
diff
changeset
|
107 if(m_instance == NULL) { |
fc6713d72b80
add setter for nodes
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
24
diff
changeset
|
108 throw NotSupported("No instance attached."); |
fc6713d72b80
add setter for nodes
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
24
diff
changeset
|
109 } |
fc6713d72b80
add setter for nodes
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
24
diff
changeset
|
110 m_location = relative_location; |
23 | 111 } |
26
70f41ea8e7db
fix compile errors in node setters...
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
25
diff
changeset
|
112 void GenericRendererNode::setRelative(Location* relative_location, Point relative_point) { |
25
fc6713d72b80
add setter for nodes
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
24
diff
changeset
|
113 if(m_instance == NULL) { |
fc6713d72b80
add setter for nodes
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
24
diff
changeset
|
114 throw NotSupported("No instance attached."); |
fc6713d72b80
add setter for nodes
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
24
diff
changeset
|
115 } |
fc6713d72b80
add setter for nodes
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
24
diff
changeset
|
116 m_location = relative_location; |
fc6713d72b80
add setter for nodes
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
24
diff
changeset
|
117 m_point = relative_point; |
23 | 118 } |
119 void GenericRendererNode::setRelative(const Point &relative_point) { | |
36
6f1227f4932b
Fixed and's and or's.
aldart@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
32
diff
changeset
|
120 if(m_instance == NULL || m_location == NULL) { |
25
fc6713d72b80
add setter for nodes
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
24
diff
changeset
|
121 throw NotSupported("No instance or location attached."); |
fc6713d72b80
add setter for nodes
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
24
diff
changeset
|
122 } |
fc6713d72b80
add setter for nodes
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
24
diff
changeset
|
123 m_point = relative_point; |
23 | 124 } |
125 | |
126 Instance* GenericRendererNode::getAttachedInstance() { | |
127 if(m_instance == NULL) { | |
24
cb87d40e9342
fix exceptions and cleanup code
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
23
diff
changeset
|
128 throw NotSupported("No instance attached."); |
23 | 129 } |
130 return m_instance; | |
131 } | |
132 Location* GenericRendererNode::getAttachedLocation() { | |
36
6f1227f4932b
Fixed and's and or's.
aldart@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
32
diff
changeset
|
133 if(m_instance != NULL || m_location == NULL) { |
24
cb87d40e9342
fix exceptions and cleanup code
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
23
diff
changeset
|
134 throw NotSupported("No location attached."); |
23 | 135 } |
136 return m_location; | |
137 } | |
138 Point GenericRendererNode::getAttachedPoint() { | |
36
6f1227f4932b
Fixed and's and or's.
aldart@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
32
diff
changeset
|
139 if(m_instance != NULL || m_location != NULL) { |
24
cb87d40e9342
fix exceptions and cleanup code
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
23
diff
changeset
|
140 throw NotSupported("No point attached."); |
23 | 141 } |
142 return m_point; | |
143 } | |
144 | |
145 Location* GenericRendererNode::getOffsetLocation() { | |
36
6f1227f4932b
Fixed and's and or's.
aldart@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
32
diff
changeset
|
146 if(m_instance == NULL || m_location == NULL) { |
24
cb87d40e9342
fix exceptions and cleanup code
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
23
diff
changeset
|
147 throw NotSupported("No location as offset used."); |
23 | 148 } |
149 return m_location; | |
150 } | |
151 Point GenericRendererNode::getOffsetPoint() { | |
36
6f1227f4932b
Fixed and's and or's.
aldart@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
32
diff
changeset
|
152 if(m_instance == NULL && m_location == NULL) { |
24
cb87d40e9342
fix exceptions and cleanup code
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
23
diff
changeset
|
153 throw NotSupported("No point as offset used."); |
23 | 154 } |
155 return m_point; | |
156 } | |
157 | |
158 Instance* GenericRendererNode::getInstance() { | |
159 return m_instance; | |
160 } | |
161 Location* GenericRendererNode::getLocation() { | |
162 return m_location; | |
163 } | |
164 Point GenericRendererNode::getPoint() { | |
165 return m_point; | |
166 } | |
167 | |
168 Point GenericRendererNode::getCalculatedPoint(Camera* cam, Layer* layer, std::vector<Instance*>& instances) { | |
169 ScreenPoint p; | |
170 if(m_instance != NULL) { | |
171 if(m_location != NULL) { | |
172 p = cam->toScreenCoordinates(m_instance->getLocationRef().getMapCoordinates() + m_location->getMapCoordinates()); | |
173 } | |
174 else { | |
175 p = cam->toScreenCoordinates(m_instance->getLocation().getMapCoordinates()); | |
176 } | |
177 } | |
178 else if(m_location != NULL) { | |
179 p = cam->toScreenCoordinates(m_location->getMapCoordinates()); | |
180 } | |
181 else | |
182 return m_point; | |
183 return Point(m_point.x + p.x, m_point.y + p.y); | |
184 } | |
185 | |
186 GenericRendererLineInfo::GenericRendererLineInfo(GenericRendererNode n1, GenericRendererNode n2, uint8_t r, uint8_t g, uint8_t b): | |
187 GenericRendererElementInfo(), | |
29
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
188 m_edge1(n1), |
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
189 m_edge2(n2), |
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
190 m_red(r), |
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
191 m_green(g), |
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
192 m_blue(b) { |
23 | 193 } |
27
788cb9525b2f
add image and text renderer to generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
26
diff
changeset
|
194 void GenericRendererLineInfo::render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool) { |
29
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
195 Point p1 = m_edge1.getCalculatedPoint(cam, layer, instances); |
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
196 Point p2 = m_edge2.getCalculatedPoint(cam, layer, instances); |
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
197 renderbackend->drawLine(p1, p2, m_red, m_green, m_blue); |
23 | 198 } |
430
ad1f09d954f9
Added the ability to render a vertex on the screen. The vertex is represented by a small square. fixes[t:455]
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
181
diff
changeset
|
199 |
29
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
200 GenericRendererPointInfo::GenericRendererPointInfo(GenericRendererNode anchor, uint8_t r, uint8_t g, uint8_t b): |
23 | 201 GenericRendererElementInfo(), |
29
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
202 m_anchor(anchor), |
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
203 m_red(r), |
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
204 m_green(g), |
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
205 m_blue(b) { |
23 | 206 } |
27
788cb9525b2f
add image and text renderer to generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
26
diff
changeset
|
207 void GenericRendererPointInfo::render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool) { |
29
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
208 Point p = m_anchor.getCalculatedPoint(cam, layer, instances); |
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
209 renderbackend->putPixel(p.x, p.y, m_red, m_green, m_blue); |
23 | 210 } |
430
ad1f09d954f9
Added the ability to render a vertex on the screen. The vertex is represented by a small square. fixes[t:455]
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
181
diff
changeset
|
211 |
23 | 212 GenericRendererQuadInfo::GenericRendererQuadInfo(GenericRendererNode n1, GenericRendererNode n2, GenericRendererNode n3, GenericRendererNode n4, uint8_t r, uint8_t g, uint8_t b): |
213 GenericRendererElementInfo(), | |
29
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
214 m_edge1(n1), |
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
215 m_edge2(n2), |
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
216 m_edge3(n3), |
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
217 m_edge4(n4), |
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
218 m_red(r), |
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
219 m_green(g), |
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
220 m_blue(b) { |
23 | 221 } |
27
788cb9525b2f
add image and text renderer to generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
26
diff
changeset
|
222 void GenericRendererQuadInfo::render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool) { |
29
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
223 Point p1 = m_edge1.getCalculatedPoint(cam, layer, instances); |
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
224 Point p2 = m_edge2.getCalculatedPoint(cam, layer, instances); |
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
225 Point p3 = m_edge3.getCalculatedPoint(cam, layer, instances); |
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
226 Point p4 = m_edge4.getCalculatedPoint(cam, layer, instances); |
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
227 renderbackend->drawQuad(p1, p2, p3, p4, m_red, m_green, m_blue); |
23 | 228 } |
430
ad1f09d954f9
Added the ability to render a vertex on the screen. The vertex is represented by a small square. fixes[t:455]
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
181
diff
changeset
|
229 |
ad1f09d954f9
Added the ability to render a vertex on the screen. The vertex is represented by a small square. fixes[t:455]
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
181
diff
changeset
|
230 GenericRendererVertexInfo::GenericRendererVertexInfo(GenericRendererNode center, int size, uint8_t r, uint8_t g, uint8_t b): |
ad1f09d954f9
Added the ability to render a vertex on the screen. The vertex is represented by a small square. fixes[t:455]
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
181
diff
changeset
|
231 GenericRendererElementInfo(), |
ad1f09d954f9
Added the ability to render a vertex on the screen. The vertex is represented by a small square. fixes[t:455]
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
181
diff
changeset
|
232 m_center(center), |
ad1f09d954f9
Added the ability to render a vertex on the screen. The vertex is represented by a small square. fixes[t:455]
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
181
diff
changeset
|
233 m_size(size), |
ad1f09d954f9
Added the ability to render a vertex on the screen. The vertex is represented by a small square. fixes[t:455]
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
181
diff
changeset
|
234 m_red(r), |
ad1f09d954f9
Added the ability to render a vertex on the screen. The vertex is represented by a small square. fixes[t:455]
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
181
diff
changeset
|
235 m_green(g), |
ad1f09d954f9
Added the ability to render a vertex on the screen. The vertex is represented by a small square. fixes[t:455]
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
181
diff
changeset
|
236 m_blue(b) { |
ad1f09d954f9
Added the ability to render a vertex on the screen. The vertex is represented by a small square. fixes[t:455]
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
181
diff
changeset
|
237 } |
ad1f09d954f9
Added the ability to render a vertex on the screen. The vertex is represented by a small square. fixes[t:455]
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
181
diff
changeset
|
238 void GenericRendererVertexInfo::render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool) { |
ad1f09d954f9
Added the ability to render a vertex on the screen. The vertex is represented by a small square. fixes[t:455]
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
181
diff
changeset
|
239 Point p = m_center.getCalculatedPoint(cam, layer, instances); |
ad1f09d954f9
Added the ability to render a vertex on the screen. The vertex is represented by a small square. fixes[t:455]
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
181
diff
changeset
|
240 renderbackend->drawVertex(p, m_size, m_red, m_green, m_blue); |
ad1f09d954f9
Added the ability to render a vertex on the screen. The vertex is represented by a small square. fixes[t:455]
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
181
diff
changeset
|
241 } |
ad1f09d954f9
Added the ability to render a vertex on the screen. The vertex is represented by a small square. fixes[t:455]
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
181
diff
changeset
|
242 |
29
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
243 GenericRendererImageInfo::GenericRendererImageInfo(GenericRendererNode anchor, int image): |
23 | 244 GenericRendererElementInfo(), |
29
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
245 m_anchor(anchor), |
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
246 m_image(image) { |
23 | 247 } |
27
788cb9525b2f
add image and text renderer to generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
26
diff
changeset
|
248 void GenericRendererImageInfo::render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool) { |
29
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
249 Point p = m_anchor.getCalculatedPoint(cam, layer, instances); |
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
250 Image* img = &imagepool->getImage(m_image); |
27
788cb9525b2f
add image and text renderer to generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
26
diff
changeset
|
251 Rect r; |
788cb9525b2f
add image and text renderer to generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
26
diff
changeset
|
252 r.x = p.x-img->getWidth()/2; |
788cb9525b2f
add image and text renderer to generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
26
diff
changeset
|
253 r.y = p.y-img->getHeight()/2; |
788cb9525b2f
add image and text renderer to generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
26
diff
changeset
|
254 r.w = img->getWidth(); |
788cb9525b2f
add image and text renderer to generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
26
diff
changeset
|
255 r.h = img->getHeight(); |
788cb9525b2f
add image and text renderer to generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
26
diff
changeset
|
256 img->render(r); |
23 | 257 } |
430
ad1f09d954f9
Added the ability to render a vertex on the screen. The vertex is represented by a small square. fixes[t:455]
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
181
diff
changeset
|
258 |
29
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
259 GenericRendererAnimationInfo::GenericRendererAnimationInfo(GenericRendererNode anchor, int animation): |
23 | 260 GenericRendererElementInfo(), |
29
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
261 m_anchor(anchor), |
31
9a9f4447af7c
add animation renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
30
diff
changeset
|
262 m_animation(animation), |
181
56ac89189bc4
fixed time handling in fife:
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
105
diff
changeset
|
263 m_start_time(TimeManager::instance()->getTime()), |
31
9a9f4447af7c
add animation renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
30
diff
changeset
|
264 m_time_scale(1.0) { |
23 | 265 } |
27
788cb9525b2f
add image and text renderer to generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
26
diff
changeset
|
266 void GenericRendererAnimationInfo::render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool) { |
31
9a9f4447af7c
add animation renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
30
diff
changeset
|
267 Point p = m_anchor.getCalculatedPoint(cam, layer, instances); |
9a9f4447af7c
add animation renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
30
diff
changeset
|
268 Animation& animation = animpool->getAnimation(m_animation); |
181
56ac89189bc4
fixed time handling in fife:
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
105
diff
changeset
|
269 int animtime = scaleTime(m_time_scale, TimeManager::instance()->getTime() - m_start_time) % animation.getDuration(); |
31
9a9f4447af7c
add animation renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
30
diff
changeset
|
270 Image* img = animation.getFrameByTimestamp(animtime); |
9a9f4447af7c
add animation renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
30
diff
changeset
|
271 Rect r; |
9a9f4447af7c
add animation renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
30
diff
changeset
|
272 r.x = p.x-img->getWidth()/2; |
9a9f4447af7c
add animation renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
30
diff
changeset
|
273 r.y = p.y-img->getHeight()/2; |
9a9f4447af7c
add animation renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
30
diff
changeset
|
274 r.w = img->getWidth(); |
9a9f4447af7c
add animation renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
30
diff
changeset
|
275 r.h = img->getHeight(); |
9a9f4447af7c
add animation renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
30
diff
changeset
|
276 img->render(r); |
23 | 277 } |
430
ad1f09d954f9
Added the ability to render a vertex on the screen. The vertex is represented by a small square. fixes[t:455]
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
181
diff
changeset
|
278 |
29
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
279 GenericRendererTextInfo::GenericRendererTextInfo(GenericRendererNode anchor, AbstractFont* font, std::string text): |
23 | 280 GenericRendererElementInfo(), |
29
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
281 m_anchor(anchor), |
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
282 m_font(font), |
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
283 m_text(text) { |
23 | 284 } |
27
788cb9525b2f
add image and text renderer to generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
26
diff
changeset
|
285 void GenericRendererTextInfo::render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool) { |
29
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
286 Point p = m_anchor.getCalculatedPoint(cam, layer, instances); |
0cb049f291e1
make members private and prefix with m_
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
27
diff
changeset
|
287 Image* img = m_font->getAsImageMultiline(m_text); |
27
788cb9525b2f
add image and text renderer to generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
26
diff
changeset
|
288 Rect r; |
788cb9525b2f
add image and text renderer to generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
26
diff
changeset
|
289 r.x = p.x-img->getWidth()/2; |
788cb9525b2f
add image and text renderer to generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
26
diff
changeset
|
290 r.y = p.y-img->getHeight()/2; |
788cb9525b2f
add image and text renderer to generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
26
diff
changeset
|
291 r.w = img->getWidth(); |
788cb9525b2f
add image and text renderer to generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
26
diff
changeset
|
292 r.h = img->getHeight(); |
788cb9525b2f
add image and text renderer to generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
26
diff
changeset
|
293 img->render(r); |
23 | 294 } |
430
ad1f09d954f9
Added the ability to render a vertex on the screen. The vertex is represented by a small square. fixes[t:455]
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
181
diff
changeset
|
295 |
23 | 296 GenericRenderer* GenericRenderer::getInstance(IRendererContainer* cnt) { |
297 return dynamic_cast<GenericRenderer*>(cnt->getRenderer("GenericRenderer")); | |
298 } | |
430
ad1f09d954f9
Added the ability to render a vertex on the screen. The vertex is represented by a small square. fixes[t:455]
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
181
diff
changeset
|
299 |
27
788cb9525b2f
add image and text renderer to generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
26
diff
changeset
|
300 GenericRenderer::GenericRenderer(RenderBackend* renderbackend, int position, ImagePool* imagepool, AnimationPool* animpool): |
23 | 301 RendererBase(renderbackend, position), |
27
788cb9525b2f
add image and text renderer to generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
26
diff
changeset
|
302 m_imagepool(imagepool), |
788cb9525b2f
add image and text renderer to generic renderer
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
26
diff
changeset
|
303 m_animationpool(animpool), |
32
75b6394ced14
* remove geometric renderer, its not replaced by the more functional generic renderern
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
31
diff
changeset
|
304 m_groups() { |
23 | 305 setEnabled(false); |
306 } | |
307 | |
308 GenericRenderer::GenericRenderer(const GenericRenderer& old): | |
30
9c3f37432a28
fix clone constructor
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
29
diff
changeset
|
309 RendererBase(old), |
9c3f37432a28
fix clone constructor
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
29
diff
changeset
|
310 m_imagepool(old.m_imagepool), |
9c3f37432a28
fix clone constructor
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
29
diff
changeset
|
311 m_animationpool(old.m_animationpool), |
32
75b6394ced14
* remove geometric renderer, its not replaced by the more functional generic renderern
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
31
diff
changeset
|
312 m_groups() { |
23 | 313 setEnabled(false); |
314 } | |
315 | |
316 RendererBase* GenericRenderer::clone() { | |
317 return new GenericRenderer(*this); | |
318 } | |
319 | |
320 GenericRenderer::~GenericRenderer() { | |
321 } | |
105
2241b0d5379e
use strings as grouping in generic renderer, easier for the clients...
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
322 void GenericRenderer::addLine(const std::string &group, GenericRendererNode n1, GenericRendererNode n2, uint8_t r, uint8_t g, uint8_t b) { |
23 | 323 GenericRendererElementInfo* info = new GenericRendererLineInfo(n1, n2, r, g, b); |
32
75b6394ced14
* remove geometric renderer, its not replaced by the more functional generic renderern
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
31
diff
changeset
|
324 m_groups[group].push_back(info); |
23 | 325 } |
105
2241b0d5379e
use strings as grouping in generic renderer, easier for the clients...
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
326 void GenericRenderer::addPoint(const std::string &group, GenericRendererNode n, uint8_t r, uint8_t g, uint8_t b) { |
23 | 327 GenericRendererElementInfo* info = new GenericRendererPointInfo(n, r, g, b); |
32
75b6394ced14
* remove geometric renderer, its not replaced by the more functional generic renderern
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
31
diff
changeset
|
328 m_groups[group].push_back(info); |
23 | 329 } |
105
2241b0d5379e
use strings as grouping in generic renderer, easier for the clients...
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
330 void GenericRenderer::addQuad(const std::string &group, GenericRendererNode n1, GenericRendererNode n2, GenericRendererNode n3, GenericRendererNode n4, uint8_t r, uint8_t g, uint8_t b) { |
23 | 331 GenericRendererElementInfo* info = new GenericRendererQuadInfo(n1, n2, n3, n4, r, g, b); |
32
75b6394ced14
* remove geometric renderer, its not replaced by the more functional generic renderern
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
31
diff
changeset
|
332 m_groups[group].push_back(info); |
23 | 333 } |
430
ad1f09d954f9
Added the ability to render a vertex on the screen. The vertex is represented by a small square. fixes[t:455]
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
181
diff
changeset
|
334 void GenericRenderer::addVertex(const std::string &group, GenericRendererNode n, int size, uint8_t r, uint8_t g, uint8_t b) { |
ad1f09d954f9
Added the ability to render a vertex on the screen. The vertex is represented by a small square. fixes[t:455]
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
181
diff
changeset
|
335 GenericRendererElementInfo* info = new GenericRendererVertexInfo(n, size, r, g, b); |
ad1f09d954f9
Added the ability to render a vertex on the screen. The vertex is represented by a small square. fixes[t:455]
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
181
diff
changeset
|
336 m_groups[group].push_back(info); |
ad1f09d954f9
Added the ability to render a vertex on the screen. The vertex is represented by a small square. fixes[t:455]
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
181
diff
changeset
|
337 } |
105
2241b0d5379e
use strings as grouping in generic renderer, easier for the clients...
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
338 void GenericRenderer::addText(const std::string &group, GenericRendererNode n, AbstractFont* font, const std::string &text) { |
23 | 339 GenericRendererElementInfo* info = new GenericRendererTextInfo(n, font, text); |
32
75b6394ced14
* remove geometric renderer, its not replaced by the more functional generic renderern
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
31
diff
changeset
|
340 m_groups[group].push_back(info); |
23 | 341 } |
105
2241b0d5379e
use strings as grouping in generic renderer, easier for the clients...
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
342 void GenericRenderer::addImage(const std::string &group, GenericRendererNode n, int image) { |
23 | 343 GenericRendererElementInfo* info = new GenericRendererImageInfo(n, image); |
32
75b6394ced14
* remove geometric renderer, its not replaced by the more functional generic renderern
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
31
diff
changeset
|
344 m_groups[group].push_back(info); |
23 | 345 } |
105
2241b0d5379e
use strings as grouping in generic renderer, easier for the clients...
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
346 void GenericRenderer::addAnimation(const std::string &group, GenericRendererNode n, int animation) { |
23 | 347 GenericRendererElementInfo* info = new GenericRendererAnimationInfo(n, animation); |
32
75b6394ced14
* remove geometric renderer, its not replaced by the more functional generic renderern
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
31
diff
changeset
|
348 m_groups[group].push_back(info); |
23 | 349 } |
430
ad1f09d954f9
Added the ability to render a vertex on the screen. The vertex is represented by a small square. fixes[t:455]
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
181
diff
changeset
|
350 |
105
2241b0d5379e
use strings as grouping in generic renderer, easier for the clients...
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
351 void GenericRenderer::removeAll(const std::string &group) { |
32
75b6394ced14
* remove geometric renderer, its not replaced by the more functional generic renderern
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
31
diff
changeset
|
352 std::vector<GenericRendererElementInfo*>::const_iterator info_it = m_groups[group].begin(); |
75b6394ced14
* remove geometric renderer, its not replaced by the more functional generic renderern
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
31
diff
changeset
|
353 for (;info_it != m_groups[group].end(); ++info_it) { |
24
cb87d40e9342
fix exceptions and cleanup code
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
23
diff
changeset
|
354 delete *info_it; |
cb87d40e9342
fix exceptions and cleanup code
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
23
diff
changeset
|
355 } |
32
75b6394ced14
* remove geometric renderer, its not replaced by the more functional generic renderern
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
31
diff
changeset
|
356 m_groups[group].clear(); |
75b6394ced14
* remove geometric renderer, its not replaced by the more functional generic renderern
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
31
diff
changeset
|
357 m_groups.erase(group); |
23 | 358 } |
359 | |
360 void GenericRenderer::render(Camera* cam, Layer* layer, std::vector<Instance*>& instances) { | |
105
2241b0d5379e
use strings as grouping in generic renderer, easier for the clients...
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
361 std::map<std::string, std::vector<GenericRendererElementInfo*> >::iterator group_it = m_groups.begin(); |
32
75b6394ced14
* remove geometric renderer, its not replaced by the more functional generic renderern
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
31
diff
changeset
|
362 for(; group_it != m_groups.end(); ++group_it) { |
75b6394ced14
* remove geometric renderer, its not replaced by the more functional generic renderern
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
31
diff
changeset
|
363 std::vector<GenericRendererElementInfo*>::const_iterator info_it = group_it->second.begin(); |
75b6394ced14
* remove geometric renderer, its not replaced by the more functional generic renderern
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
31
diff
changeset
|
364 for (;info_it != group_it->second.end(); ++info_it) { |
75b6394ced14
* remove geometric renderer, its not replaced by the more functional generic renderern
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
31
diff
changeset
|
365 (*info_it)->render(cam, layer, instances, m_renderbackend, m_imagepool, m_animationpool); |
75b6394ced14
* remove geometric renderer, its not replaced by the more functional generic renderern
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
31
diff
changeset
|
366 } |
23 | 367 } |
368 } | |
369 } |