1 | #include "OgreRenderingrun.h"
|
---|
2 | #include "OgreIlluminationManager.h"
|
---|
3 |
|
---|
4 | MovablePlane* OgreRenderingRun::fullScreenQuad = NULL;
|
---|
5 | Entity* OgreRenderingRun::fullScreenQuadEntity = NULL;
|
---|
6 | BillboardSet* OgreRenderingRun::pixelSprites = NULL;
|
---|
7 | Entity* OgreRenderingRun::fullscreenGrid = NULL;
|
---|
8 | String OgreRenderingRun::spriteSetName = "";
|
---|
9 |
|
---|
10 | class MaterialSetVisitor : public QueuedRenderableVisitor
|
---|
11 | {
|
---|
12 | private:
|
---|
13 | String materialName;
|
---|
14 | String triggerName;
|
---|
15 | std::map<Renderable*, String>* materialRestoreMap;
|
---|
16 | std::set<Renderable*>* visibleObjects;
|
---|
17 | public:
|
---|
18 |
|
---|
19 | MaterialSetVisitor(String& materialName,
|
---|
20 | std::map<Renderable*, String>* materialRestoreMap,
|
---|
21 | std::set<Renderable*>* visibleObjects,
|
---|
22 | String trigger = "")
|
---|
23 | {
|
---|
24 | this->materialName = materialName;
|
---|
25 | this->materialRestoreMap = materialRestoreMap;
|
---|
26 | this->visibleObjects = visibleObjects;
|
---|
27 | triggerName = trigger;
|
---|
28 | }
|
---|
29 |
|
---|
30 | void visit(const Renderable* r)
|
---|
31 | {
|
---|
32 | Renderable* rend = (Renderable*) r; //sorry for removing the const
|
---|
33 |
|
---|
34 | if( visibleObjects->count(rend) == 0)
|
---|
35 | {
|
---|
36 | visibleObjects->insert(rend);
|
---|
37 |
|
---|
38 | if( materialRestoreMap->count(rend) == 0)
|
---|
39 | {
|
---|
40 | (*materialRestoreMap)[rend] = rend->getMaterial().getPointer()->getName();
|
---|
41 |
|
---|
42 | String materialToSet = materialName;
|
---|
43 | if(triggerName != "")//we have a trigger here
|
---|
44 | {
|
---|
45 | OgreTechniqueGroup* TG = (OgreTechniqueGroup*)rend->getRenderTechniqueGroup();
|
---|
46 | if(TG)
|
---|
47 | {
|
---|
48 | String triggeredMaterial = TG->getMaterialNameForTrigger(triggerName);
|
---|
49 | if(triggeredMaterial != "")//a trigger is associated
|
---|
50 | materialToSet = triggeredMaterial;
|
---|
51 | }
|
---|
52 | }
|
---|
53 | rend->setMaterialName(materialToSet);
|
---|
54 | }
|
---|
55 | }
|
---|
56 | }
|
---|
57 | bool visit(const Pass* p){return true;}
|
---|
58 | void visit(const RenderablePass* rp)
|
---|
59 | {
|
---|
60 | Renderable* rend = rp->renderable;
|
---|
61 | if( visibleObjects->count(rend) == 0)
|
---|
62 | {
|
---|
63 | visibleObjects->insert(rend);
|
---|
64 |
|
---|
65 | if( materialRestoreMap->count(rend) == 0)
|
---|
66 | {
|
---|
67 | (*materialRestoreMap)[rend] = rend->getMaterial().getPointer()->getName();
|
---|
68 | String materialToSet = materialName;
|
---|
69 | if(triggerName != "")//we have a trigger here
|
---|
70 | {
|
---|
71 | OgreTechniqueGroup* TG = (OgreTechniqueGroup*)rend->getRenderTechniqueGroup();
|
---|
72 | if(TG)
|
---|
73 | {
|
---|
74 | String triggeredMaterial = TG->getMaterialNameForTrigger(triggerName);
|
---|
75 | if(triggeredMaterial != "")//a trigger is associated
|
---|
76 | materialToSet = triggeredMaterial;
|
---|
77 | }
|
---|
78 | }
|
---|
79 | rend->setMaterialName(materialToSet);
|
---|
80 | }
|
---|
81 | }
|
---|
82 | }
|
---|
83 |
|
---|
84 | };
|
---|
85 |
|
---|
86 | class RenderQueueFill
|
---|
87 | {
|
---|
88 | public:
|
---|
89 |
|
---|
90 | inline void Fill( RenderQueue* rq, //the queue to add the renderables to
|
---|
91 | bool shadowcastersonly,
|
---|
92 | std::list<Renderable*>* renderables = 0, //if not null add only these materials
|
---|
93 | String materialName = "", //material to set, if "" leave original
|
---|
94 | std::map<Renderable*, String>* visibleObjects = 0, //map to restore materials later
|
---|
95 | String trigger = "") //trigger
|
---|
96 | {
|
---|
97 | if(renderables == 0)
|
---|
98 | {
|
---|
99 | SceneManager *sm = Root::getSingleton()._getCurrentSceneManager();
|
---|
100 | SceneManager::MovableObjectIterator it = sm->getMovableObjectIterator("Entity");
|
---|
101 | while(it.hasMoreElements())
|
---|
102 | {
|
---|
103 | MovableObject* o = it.getNext();
|
---|
104 | Entity* e = (Entity*) o;
|
---|
105 | if( (!shadowcastersonly || e->getCastShadows()) && e->isVisible())
|
---|
106 | {
|
---|
107 | for (int i = 0; i < e->getNumSubEntities(); i++)
|
---|
108 | {
|
---|
109 | SubEntity* sube = e->getSubEntity(i);
|
---|
110 |
|
---|
111 | if(materialName != "")
|
---|
112 | {
|
---|
113 | String materialToSet = materialName;
|
---|
114 |
|
---|
115 | if(trigger != "")
|
---|
116 | {
|
---|
117 | String triggeredMaterial =
|
---|
118 | ((OgreTechniqueGroup*)sube->getRenderTechniqueGroup())
|
---|
119 | ->getMaterialNameForTrigger(trigger);
|
---|
120 | if(triggeredMaterial != "")//a trigger is associated
|
---|
121 | materialToSet = triggeredMaterial;
|
---|
122 | }
|
---|
123 |
|
---|
124 | if(visibleObjects->count(sube) == 0)
|
---|
125 | (*visibleObjects)[sube] =
|
---|
126 | sube->getMaterial().getPointer()->getName();
|
---|
127 | sube->setMaterialName(materialToSet);
|
---|
128 | }
|
---|
129 | rq->addRenderable(sube);
|
---|
130 | }
|
---|
131 | }
|
---|
132 | }
|
---|
133 | }
|
---|
134 | }
|
---|
135 | };
|
---|
136 |
|
---|
137 | Vector3 OgreRenderingRun::getCubeMapFaceDirection(unsigned char faceId)
|
---|
138 | {
|
---|
139 | switch(faceId)
|
---|
140 | {
|
---|
141 | case 0: //positive X
|
---|
142 | return Vector3(1,0,0);
|
---|
143 | case 1: //negative X
|
---|
144 | return Vector3(-1,0,0);
|
---|
145 | case 2: //positiove Y
|
---|
146 | return Vector3(0,1,0);
|
---|
147 | case 3: //negative Y
|
---|
148 | return Vector3(0,-1,0);
|
---|
149 | case 4: //positiove Z
|
---|
150 | return Vector3(0,0,-1);
|
---|
151 | case 5: //negative Z
|
---|
152 | return Vector3(0,0,1);
|
---|
153 | default:
|
---|
154 | return Vector3(0,0,0);
|
---|
155 | }
|
---|
156 | }
|
---|
157 |
|
---|
158 | Texture* OgreRenderingRun::createCubeRenderTexture(String name, const Vector3 position, unsigned int resolution, PixelFormat format, int numMips, ColourValue clearColor)
|
---|
159 | {
|
---|
160 | //create texture
|
---|
161 | TexturePtr texPtr = Ogre::TextureManager::getSingleton().createManual( name,
|
---|
162 | "default",
|
---|
163 | TEX_TYPE_CUBE_MAP,
|
---|
164 | resolution,
|
---|
165 | resolution,
|
---|
166 | 0,
|
---|
167 | numMips,
|
---|
168 | format,
|
---|
169 | TU_RENDERTARGET);
|
---|
170 | Texture* result = texPtr.getPointer();
|
---|
171 |
|
---|
172 | //add viewports to faces
|
---|
173 | for(unsigned int i = 0; i < 6; i++)
|
---|
174 | {
|
---|
175 | Camera* cam = Root::getSingleton()._getCurrentSceneManager()
|
---|
176 | ->createCamera(name + "CUBEMAPFACE_" + StringConverter::toString(i) + "_CAMERA");
|
---|
177 |
|
---|
178 | cam->setPosition(position);
|
---|
179 | cam->setAspectRatio(1);
|
---|
180 | cam->setFOVy(Radian(Degree(90)));
|
---|
181 | cam->setNearClipDistance(0.1);
|
---|
182 | cam->setFarClipDistance(OgreIlluminationManager::getSingleton().
|
---|
183 | getMainCamera()->getFarClipDistance());
|
---|
184 |
|
---|
185 | //set camera orientation
|
---|
186 | switch(i)
|
---|
187 | {
|
---|
188 | case 2:
|
---|
189 | cam->setOrientation(Quaternion(Radian(Degree(90)),Vector3(1,0,0)));
|
---|
190 | break;
|
---|
191 | case 3:
|
---|
192 | cam->setOrientation(Quaternion(Radian(Degree(90)),Vector3(-1,0,0)));
|
---|
193 | break;
|
---|
194 | default:
|
---|
195 | cam->setDirection(getCubeMapFaceDirection(i));
|
---|
196 | break;
|
---|
197 | }
|
---|
198 |
|
---|
199 | HardwarePixelBuffer* hpb = (result->getBuffer(i, 0)).getPointer();
|
---|
200 | RenderTarget* rt = hpb->getRenderTarget(0);
|
---|
201 | Viewport* v = rt->addViewport(cam);
|
---|
202 | v->setOverlaysEnabled(false);
|
---|
203 | rt->setAutoUpdated(false);
|
---|
204 | v->setBackgroundColour(clearColor);
|
---|
205 | Root::getSingleton()._getCurrentSceneManager()->getRenderQueue()->clear();
|
---|
206 | Root::getSingleton()._getCurrentSceneManager()->setFindVisibleObjects(false);
|
---|
207 | rt->update();
|
---|
208 | Root::getSingleton()._getCurrentSceneManager()->setFindVisibleObjects(true);
|
---|
209 |
|
---|
210 | Root::getSingleton().getRenderSystem()->_setViewport(v);
|
---|
211 | Root::getSingleton().getRenderSystem()->clearFrameBuffer( FBT_COLOUR, clearColor);
|
---|
212 | }
|
---|
213 |
|
---|
214 | return result;
|
---|
215 |
|
---|
216 | }
|
---|
217 |
|
---|
218 | void OgreRenderingRun::setMaterialForRenderables(String& materialName, RenderQueue* rq, bool solidsonly, String triggerName)
|
---|
219 | {
|
---|
220 | SceneManager* sm = Ogre::Root::getSingleton()._getCurrentSceneManager();
|
---|
221 |
|
---|
222 | RenderQueue::QueueGroupIterator queueIt = rq->_getQueueGroupIterator();
|
---|
223 |
|
---|
224 | visibleObjects.clear();
|
---|
225 | MaterialSetVisitor visitor(materialName, &materialRestoreMap, &visibleObjects, triggerName);
|
---|
226 |
|
---|
227 | while (queueIt.hasMoreElements())
|
---|
228 | {
|
---|
229 | RenderQueueGroup* pGroup = queueIt.getNext();
|
---|
230 |
|
---|
231 | RenderQueueGroup::PriorityMapIterator groupIt = pGroup->getIterator();
|
---|
232 |
|
---|
233 | while (groupIt.hasMoreElements())
|
---|
234 | {
|
---|
235 | RenderPriorityGroup* pPriorityGrp = groupIt.getNext();
|
---|
236 | const QueuedRenderableCollection& solids = pPriorityGrp->getSolidsBasic();
|
---|
237 | const QueuedRenderableCollection& transparents = pPriorityGrp->getTransparents();
|
---|
238 | solids.acceptVisitor(&visitor, QueuedRenderableCollection::OM_PASS_GROUP);
|
---|
239 | if(!solidsonly)
|
---|
240 | transparents.acceptVisitor(&visitor, QueuedRenderableCollection::OM_SORT_ASCENDING);
|
---|
241 | }
|
---|
242 | }
|
---|
243 |
|
---|
244 | //refill renderqueue
|
---|
245 | rq->clear();
|
---|
246 |
|
---|
247 | std::set<Renderable*>::iterator it = visibleObjects.begin();
|
---|
248 | std::set<Renderable*>::iterator itend = visibleObjects.end();
|
---|
249 |
|
---|
250 | while(it != itend)
|
---|
251 | {
|
---|
252 | rq->addRenderable((*it));
|
---|
253 | it++;
|
---|
254 | }
|
---|
255 |
|
---|
256 | sm->setFindVisibleObjects(false);
|
---|
257 | }
|
---|
258 |
|
---|
259 | void OgreRenderingRun::setMaterialForVisibles(String& materialName, Camera* cam, bool shadowcastersonly, bool solidsonly, String triggerName)
|
---|
260 | {
|
---|
261 | SceneManager* sm = Ogre::Root::getSingleton()._getCurrentSceneManager();
|
---|
262 |
|
---|
263 | RenderQueue* rq = sm->getRenderQueue();
|
---|
264 | rq->clear();
|
---|
265 |
|
---|
266 | RenderQueue::QueueGroupIterator groupIter = rq->_getQueueGroupIterator();
|
---|
267 | while (groupIter.hasMoreElements())
|
---|
268 | {
|
---|
269 | RenderQueueGroup* g = groupIter.getNext();
|
---|
270 | g->defaultOrganisationMode();
|
---|
271 | }
|
---|
272 |
|
---|
273 | sm->_findVisibleObjects(cam, shadowcastersonly);
|
---|
274 |
|
---|
275 | setMaterialForRenderables(materialName, sm->getRenderQueue(), solidsonly, triggerName);
|
---|
276 | }
|
---|
277 |
|
---|
278 | void OgreRenderingRun::setMaterialForRenderables(String& materialName, bool shadowcastersonly, String triggerName)
|
---|
279 | {
|
---|
280 | SceneManager* sm = Ogre::Root::getSingleton()._getCurrentSceneManager();
|
---|
281 | sm->setFindVisibleObjects(false);
|
---|
282 |
|
---|
283 | RenderQueueFill RQF;
|
---|
284 | RenderQueue* rq = Root::getSingleton()._getCurrentSceneManager()->getRenderQueue();
|
---|
285 | rq->clear();
|
---|
286 | visibleObjects.clear();
|
---|
287 | RQF.Fill(rq, shadowcastersonly, 0, materialName, &materialRestoreMap, triggerName);
|
---|
288 | }
|
---|
289 |
|
---|
290 | void OgreRenderingRun::restoreMaterials()
|
---|
291 | {
|
---|
292 | SceneManager* sm = Ogre::Root::getSingleton()._getCurrentSceneManager();
|
---|
293 |
|
---|
294 | std::map<Renderable*, String>::iterator it = materialRestoreMap.begin();
|
---|
295 | std::map<Renderable*, String>::iterator itend = materialRestoreMap.end();
|
---|
296 |
|
---|
297 | while(it != itend)
|
---|
298 | {
|
---|
299 | ((*it).first)->setMaterialName((*it).second);
|
---|
300 | it++;
|
---|
301 | }
|
---|
302 |
|
---|
303 | materialRestoreMap.clear();
|
---|
304 |
|
---|
305 | sm->setFindVisibleObjects(true);
|
---|
306 | }
|
---|
307 |
|
---|
308 | void OgreRenderingRun::renderFullscreenQuad(String materialName, RenderTarget* target)
|
---|
309 | {
|
---|
310 | SceneManager* sm = Ogre::Root::getSingleton()._getCurrentSceneManager();
|
---|
311 |
|
---|
312 | if(fullScreenQuad == NULL)
|
---|
313 | {
|
---|
314 | fullScreenQuad = new MovablePlane("PASS_FULLSCREENQUAD_PLANE");
|
---|
315 | fullScreenQuad->d = 0;
|
---|
316 | fullScreenQuad->normal = Vector3::UNIT_Z;
|
---|
317 | MeshManager::getSingleton().createPlane("PASS_FULLSCREENQUAD_MESH",
|
---|
318 | ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME,
|
---|
319 | *fullScreenQuad, 2, 2,
|
---|
320 | 1, 1, true, 1, 1, 1, Vector3::UNIT_Y);
|
---|
321 | fullScreenQuadEntity = sm->createEntity( "PASS_FULLSCREENQUAD_ENTITY", "PASS_FULLSCREENQUAD_MESH" );
|
---|
322 | sm->getRootSceneNode()->attachObject(fullScreenQuadEntity);
|
---|
323 | fullScreenQuadEntity->setVisible(false);
|
---|
324 | }
|
---|
325 |
|
---|
326 | fullScreenQuadEntity->setMaterialName(materialName);
|
---|
327 | sm->getRenderQueue()->clear();
|
---|
328 | sm->getRenderQueue()->addRenderable(fullScreenQuadEntity->getSubEntity(0));
|
---|
329 | bool lastFindVisible = sm->getFindVisibleObjects();
|
---|
330 | sm->setFindVisibleObjects(false);
|
---|
331 | target->update();
|
---|
332 | sm->getRenderQueue()->clear();
|
---|
333 | sm->setFindVisibleObjects(lastFindVisible);
|
---|
334 | }
|
---|
335 |
|
---|
336 | void OgreRenderingRun::renderFullscreenGrid(String& materialName, RenderTarget* rt, int width, int height)
|
---|
337 | {
|
---|
338 | SceneManager* sm = Root::getSingleton()._getCurrentSceneManager();
|
---|
339 |
|
---|
340 | if(fullscreenGrid == NULL)
|
---|
341 | {
|
---|
342 | MeshPtr mesh = MeshManager::getSingleton().createManual("FullScreenGrid",ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
|
---|
343 | SubMesh* subMesh = mesh->createSubMesh();
|
---|
344 |
|
---|
345 | mesh->sharedVertexData = new VertexData();
|
---|
346 | VertexData* vertexData = mesh->sharedVertexData;
|
---|
347 |
|
---|
348 | // define the vertex format
|
---|
349 | VertexDeclaration* vertexDecl = vertexData->vertexDeclaration;
|
---|
350 | size_t currOffset = 0;
|
---|
351 | // positions
|
---|
352 | vertexDecl->addElement(0, currOffset, VET_FLOAT3, VES_POSITION);
|
---|
353 | currOffset += VertexElement::getTypeSize(VET_FLOAT3);
|
---|
354 |
|
---|
355 | // allocate the vertex buffer
|
---|
356 | vertexData->vertexCount = width * height;
|
---|
357 | HardwareVertexBufferSharedPtr vBuf = HardwareBufferManager::getSingleton().createVertexBuffer(vertexDecl->getVertexSize(0), vertexData->vertexCount, HardwareBuffer::HBU_STATIC_WRITE_ONLY, false);
|
---|
358 | VertexBufferBinding* binding = vertexData->vertexBufferBinding;
|
---|
359 | binding->setBinding(0, vBuf);
|
---|
360 | float* pVertex = static_cast<float*>(vBuf->lock(HardwareBuffer::HBL_DISCARD));
|
---|
361 |
|
---|
362 | // allocate index buffer
|
---|
363 | subMesh->indexData->indexCount = 6 * (width - 1) * (height - 1);
|
---|
364 | subMesh->indexData->indexBuffer = HardwareBufferManager::getSingleton().createIndexBuffer(HardwareIndexBuffer::IT_16BIT, subMesh->indexData->indexCount, HardwareBuffer::HBU_STATIC_WRITE_ONLY, false);
|
---|
365 | HardwareIndexBufferSharedPtr iBuf = subMesh->indexData->indexBuffer;
|
---|
366 | unsigned short* pIndices = static_cast<unsigned short*>(iBuf->lock(HardwareBuffer::HBL_DISCARD));
|
---|
367 |
|
---|
368 | unsigned short wVerticeIndex = 0 ;
|
---|
369 |
|
---|
370 |
|
---|
371 | for( int j = 0; j < height; j++ )
|
---|
372 | {
|
---|
373 | for( int i = 0; i < width; i++ )
|
---|
374 | { //positions
|
---|
375 | float x = ((float)i + 0.5) / (float) width;
|
---|
376 | float y = ((float)j + 0.5) / (float) height;
|
---|
377 | *pVertex++ = x;
|
---|
378 | *pVertex++ = y;
|
---|
379 | *pVertex++ = 0;
|
---|
380 |
|
---|
381 | //indexes
|
---|
382 | if( j < height - 1 && i < width -1 )
|
---|
383 | {
|
---|
384 | *pIndices++ = j * width + i;
|
---|
385 | *pIndices++ = (j + 1) * width + i;
|
---|
386 | *pIndices++ = j * width + i + 1;
|
---|
387 | *pIndices++ = j * width + i + 1;
|
---|
388 | *pIndices++ = (j + 1) * width + i;
|
---|
389 | *pIndices++ = (j + 1) * width + i + 1;
|
---|
390 | }
|
---|
391 |
|
---|
392 | }
|
---|
393 | }
|
---|
394 |
|
---|
395 | // Unlock
|
---|
396 | vBuf->unlock();
|
---|
397 | iBuf->unlock();
|
---|
398 | // Generate face list
|
---|
399 | subMesh->useSharedVertices = true;
|
---|
400 |
|
---|
401 | // this line makes clear the mesh is loaded (avoids memory leaks)
|
---|
402 | mesh->load();
|
---|
403 |
|
---|
404 | fullscreenGrid = sm->createEntity("FullScreenGridEntity", "FullScreenGrid");
|
---|
405 | SceneNode* n = sm->getRootSceneNode()->createChildSceneNode("FullScreenGridNode");
|
---|
406 | n->attachObject(fullscreenGrid);
|
---|
407 | fullscreenGrid->setVisible(false);
|
---|
408 | }
|
---|
409 |
|
---|
410 | fullscreenGrid->setMaterialName(materialName);
|
---|
411 |
|
---|
412 | sm->getRenderQueue()->clear();
|
---|
413 | sm->getRenderQueue()->addRenderable(fullscreenGrid->getSubEntity(0));
|
---|
414 | bool lastFindVisible = sm->getFindVisibleObjects();
|
---|
415 | sm->setFindVisibleObjects(false);
|
---|
416 | rt->update();
|
---|
417 | sm->setFindVisibleObjects(lastFindVisible);
|
---|
418 |
|
---|
419 | }
|
---|
420 |
|
---|
421 | void OgreRenderingRun::renderPixelSprites(String& materialName, RenderTarget* rt, int width, int height)
|
---|
422 | {
|
---|
423 | SceneManager* sm = Ogre::Root::getSingleton()._getCurrentSceneManager();
|
---|
424 |
|
---|
425 | if(pixelSprites == 0)
|
---|
426 | {
|
---|
427 | int resolutionX = width;
|
---|
428 | int resolutionY = height;
|
---|
429 | pixelSprites = new BillboardSet(spriteSetName, resolutionX * resolutionY, true);
|
---|
430 | pixelSprites->setBillboardsInWorldSpace(true);
|
---|
431 | pixelSprites->setCullIndividually(false);
|
---|
432 | pixelSprites->setPointRenderingEnabled(true);
|
---|
433 | //pixelSprites->setDefaultDimensions(1.0 / (float) resolutionX, 1.0 / resolutionY);
|
---|
434 | pixelSprites->beginBillboards();
|
---|
435 | for(int i = 0; i < resolutionX; i++)
|
---|
436 | {
|
---|
437 | for(int j = 0; j < resolutionY; j++)
|
---|
438 | {
|
---|
439 | Billboard bb( Vector3(
|
---|
440 | ( (float)i + 0.5 )/ (float) resolutionX, //position x
|
---|
441 | ( (float)j + 0.5 )/ (float) resolutionY, //position y
|
---|
442 | 0),
|
---|
443 | pixelSprites);
|
---|
444 | bb.setDimensions(1.0 / (float) resolutionX, 1.0 / resolutionY);
|
---|
445 | pixelSprites->injectBillboard(bb);
|
---|
446 | }
|
---|
447 | }
|
---|
448 | pixelSprites->endBillboards();
|
---|
449 |
|
---|
450 | sm->getRootSceneNode()->attachObject(pixelSprites);
|
---|
451 |
|
---|
452 | pixelSprites->setVisible(false);
|
---|
453 | }
|
---|
454 |
|
---|
455 | pixelSprites->setMaterialName(materialName);
|
---|
456 |
|
---|
457 | sm->getRenderQueue()->clear();
|
---|
458 | sm->getRenderQueue()->addRenderable(pixelSprites);
|
---|
459 | bool lastFindVisible = sm->getFindVisibleObjects();
|
---|
460 | sm->setFindVisibleObjects(false);
|
---|
461 | rt->update();
|
---|
462 | sm->setFindVisibleObjects(lastFindVisible);
|
---|
463 |
|
---|
464 | }
|
---|
465 |
|
---|