GeomVertexWriter now has a default constructor

This commit is contained in:
David Rose 2006-04-26 13:33:35 +00:00
parent ddd1046462
commit ca31ec231c
2 changed files with 3 additions and 18 deletions

View File

@ -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) {

View File

@ -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),