From e099c2312ef1c8020fde3773e855643eec9e7514 Mon Sep 17 00:00:00 2001 From: David Rose Date: Tue, 16 Aug 2005 20:28:25 +0000 Subject: [PATCH] deal with animation better --- panda/src/grutil/multitexReducer.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/panda/src/grutil/multitexReducer.cxx b/panda/src/grutil/multitexReducer.cxx index ef5515ec2b..b6899c9c7c 100644 --- a/panda/src/grutil/multitexReducer.cxx +++ b/panda/src/grutil/multitexReducer.cxx @@ -809,7 +809,16 @@ transfer_geom(GeomNode *geom_node, const InternalName *texcoord_name, const GeomInfo &geom_info = (*gi); const Geom *orig_geom = geom_info._geom_node->get_geom(geom_info._index); + // Copy the Geom. This actually performs just a pointer copy of + // the original GeomVertexData and other associated structures. PT(Geom) geom = new Geom(*orig_geom); + + // Ensure that any vertex animation has been applied. + geom->set_vertex_data(geom->get_vertex_data()->animate_vertices()); + + // Now get a modifiable pointer to the vertex data in the new + // Geom. This will actually perform a deep copy of the vertex + // data. PT(GeomVertexData) vdata = geom->modify_vertex_data(); vdata->set_usage_hint(Geom::UH_stream);