@@ -82,19 +82,18 @@ class RenderColorMapSysTrans :
8282 GLuint mSortedID ;
8383
8484 SortedObject () :
85- mName (" " ),
86- mSortedID (NULL )
85+ mSortedID (0 )
8786 {}
8887
89- SortedObject (std::string name, GLuint ID) :
88+ SortedObject (const std::string& name, GLuint ID) :
9089 mName (name),
9190 mSortedID (ID)
9291 {}
9392 };
9493
9594 Core::Geometry::Vector prevDir = Core::Geometry::Vector(0.0 );
9695 std::vector<SortedObject> sortedObjects;
97-
96+
9897 class DepthIndex {
9998 public:
10099 size_t mIndex ;
@@ -117,7 +116,7 @@ class RenderColorMapSysTrans :
117116 };
118117
119118 GLuint sortObjects (const Core::Geometry::Vector& dir,
120- const es::ComponentGroup<ren::IBO>& ibo,
119+ const es::ComponentGroup<ren::IBO>& ibo,
121120 const es::ComponentGroup<Core::Datatypes::GeometryObject::SpireSubPass>& pass,
122121 const es::ComponentGroup<ren::StaticIBOMan>& iboMan)
123122 {
@@ -169,7 +168,7 @@ class RenderColorMapSysTrans :
169168 result = iboMan.front ().instance ->addInMemoryIBO (sbuffer, pass.front ().ibo .data ->getBufferSize (), ibo.front ().primMode , ibo.front ().primType ,
170169 numPrimitives, transIBOName);
171170 }
172-
171+
173172 return result;
174173 }
175174
@@ -210,12 +209,12 @@ class RenderColorMapSysTrans :
210209 }
211210
212211 bool drawLines = (ibo.front ().primMode == Core::Datatypes::GeometryObject::SpireIBO::LINES);
213- GLuint iboID = ibo.front ().glid ;
212+ GLuint iboID = ibo.front ().glid ;
214213
215214 Core::Geometry::Vector dir (camera.front ().data .worldToView [0 ][2 ],
216215 camera.front ().data .worldToView [1 ][2 ],
217216 camera.front ().data .worldToView [2 ][2 ]);
218-
217+
219218 if (sortedObjects.size () <=0 )
220219 {
221220 prevDir = dir;
@@ -246,14 +245,14 @@ class RenderColorMapSysTrans :
246245 if (!indexed)
247246 {
248247 index = sortedObjects.size ();
249- sortedObjects.push_back (SortedObject (pass.front ().ibo .name , NULL ));
248+ sortedObjects.push_back (SortedObject (pass.front ().ibo .name , 0 ));
250249 }
251250
252251 Core::Geometry::Vector diff = prevDir - dir;
253252 float distance = sqrtf (Core::Geometry::Dot (diff, diff));
254- if (distance >= 1.23 || sortedObjects[index].mSortedID == NULL )
253+ if (distance >= 1.23 || sortedObjects[index].mSortedID == 0 )
255254 {
256- if (sortedObjects[index].mSortedID != NULL )
255+ if (sortedObjects[index].mSortedID != 0 )
257256 {
258257 iboMan.front ().instance ->removeInMemoryIBO (sortedObjects[index].mSortedID );
259258 }
@@ -407,11 +406,11 @@ class RenderColorMapSysTrans :
407406 for (const ren::MatUniform& unif : matUniforms) {unif.applyUniform ();}
408407
409408 geom.front ().attribs .bind ();
410-
409+
411410 bool depthMask = glIsEnabled (GL_DEPTH_WRITEMASK);
412411 bool cullFace = glIsEnabled (GL_CULL_FACE);
413412 bool blend = glIsEnabled (GL_BLEND);
414-
413+
415414 GL (glEnable (GL_DEPTH_TEST));
416415 GL (glDepthMask (GL_FALSE));
417416 GL (glDisable (GL_CULL_FACE));
@@ -442,7 +441,7 @@ class RenderColorMapSysTrans :
442441 rlist.front ().data ->getBuffer (), rlist.front ().data ->getBufferSize ());
443442
444443 CPM_BSERIALIZE_NS::BSerialize dataDeserialize (
445- rlist.front ().data ->getBuffer (), rlist.front ().data ->getBufferSize ());
444+ rlist.front ().data ->getBuffer (), rlist.front ().data ->getBufferSize ());
446445
447446 int64_t posSize = 0 ;
448447 int64_t dataSize = 0 ;
@@ -574,4 +573,3 @@ const char* getSystemName_RenderColorMapTrans()
574573
575574} // namespace Render
576575} // namespace SCIRun
577-
0 commit comments