Преглед изворни кода

GeomVertexWriter now has a default constructor

David Rose пре 20 година
родитељ
комит
ca31ec231c

+ 1 - 6
panda/src/particlesystem/spriteParticleRenderer.cxx

@@ -505,12 +505,7 @@ init_geoms() {
       geom->add_primitive(_sprites[i][j]);
       
       // This will be overwritten in render(), but we had to have some initial value 
-      // since there are no default constructors for GeomVertexWriter.
-      _sprite_writer[i].push_back(SpriteWriter(GeomVertexWriter(_vdata[i][j], InternalName::get_vertex()),
-                                               GeomVertexWriter(_vdata[i][j], InternalName::get_color()),
-                                               GeomVertexWriter(_vdata[i][j], InternalName::get_rotate()),
-                                               GeomVertexWriter(_vdata[i][j], InternalName::get_size()),
-                                               GeomVertexWriter(_vdata[i][j], InternalName::get_aspect_ratio())));
+      _sprite_writer[i].push_back(SpriteWriter());
 
       state = state->add_attrib(RenderModeAttrib::make(RenderModeAttrib::M_unchanged, _base_y_scale * _height, true));
       if (anim->get_frame(j) != (Texture *)NULL) {

+ 2 - 12
panda/src/particlesystem/spriteParticleRenderer.h

@@ -45,18 +45,8 @@ class NodePath;
 ////////////////////////////////////////////////////////////////////
 class SpriteWriter {
 public:
-  SpriteWriter(GeomVertexWriter v,
-               GeomVertexWriter c,
-               GeomVertexWriter r,
-               GeomVertexWriter s,
-               GeomVertexWriter a):
-    vertex(v),
-    color(c),
-    rotate(r),
-    size(s),
-    aspect_ratio(a){
-    };
-
+  SpriteWriter() {
+  }
   SpriteWriter(const SpriteWriter &copy):
     vertex(copy.vertex),
     color(copy.color),