diff --git a/panda/src/gobj/geom.cxx b/panda/src/gobj/geom.cxx index 9fedfbaef1..5733c4bee0 100644 --- a/panda/src/gobj/geom.cxx +++ b/panda/src/gobj/geom.cxx @@ -62,26 +62,6 @@ Geom(const Geom ©) : { } -/** - * The copy assignment operator is not pipeline-safe. This will completely - * obliterate all stages of the pipeline, so don't do it for a Geom that is - * actively being used for rendering. - */ -void Geom:: -operator = (const Geom ©) { - CopyOnWriteObject::operator = (copy); - - clear_cache(); - - _cycler = copy._cycler; - - OPEN_ITERATE_ALL_STAGES(_cycler) { - CDStageWriter cdata(_cycler, pipeline_stage); - mark_internal_bounds_stale(cdata); - } - CLOSE_ITERATE_ALL_STAGES(_cycler); -} - /** * */ diff --git a/panda/src/gobj/geom.h b/panda/src/gobj/geom.h index 425d2b0a0a..073805e7ca 100644 --- a/panda/src/gobj/geom.h +++ b/panda/src/gobj/geom.h @@ -62,10 +62,11 @@ protected: Geom(const Geom ©); PUBLISHED: - void operator = (const Geom ©); virtual ~Geom(); ALLOC_DELETED_CHAIN(Geom); + void operator = (const Geom ©) = delete; + virtual Geom *make_copy() const; INLINE PrimitiveType get_primitive_type() const; diff --git a/panda/src/gobj/geomPrimitive.cxx b/panda/src/gobj/geomPrimitive.cxx index 97f5306110..8e9b9039c0 100644 --- a/panda/src/gobj/geomPrimitive.cxx +++ b/panda/src/gobj/geomPrimitive.cxx @@ -77,17 +77,6 @@ GeomPrimitive(const GeomPrimitive ©) : { } -/** - * The copy assignment operator is not pipeline-safe. This will completely - * obliterate all stages of the pipeline, so don't do it for a GeomPrimitive - * that is actively being used for rendering. - */ -void GeomPrimitive:: -operator = (const GeomPrimitive ©) { - CopyOnWriteObject::operator = (copy); - _cycler = copy._cycler; -} - /** * */ diff --git a/panda/src/gobj/geomPrimitive.h b/panda/src/gobj/geomPrimitive.h index 03d8a314aa..dab0a3b830 100644 --- a/panda/src/gobj/geomPrimitive.h +++ b/panda/src/gobj/geomPrimitive.h @@ -61,10 +61,11 @@ protected: PUBLISHED: explicit GeomPrimitive(UsageHint usage_hint); GeomPrimitive(const GeomPrimitive ©); - void operator = (const GeomPrimitive ©); virtual ~GeomPrimitive(); ALLOC_DELETED_CHAIN(GeomPrimitive); + void operator = (const GeomPrimitive ©) = delete; + virtual PT(GeomPrimitive) make_copy() const=0; virtual PrimitiveType get_primitive_type() const=0; diff --git a/panda/src/gobj/geomVertexArrayData.cxx b/panda/src/gobj/geomVertexArrayData.cxx index ae45b50f56..9b07969e46 100644 --- a/panda/src/gobj/geomVertexArrayData.cxx +++ b/panda/src/gobj/geomVertexArrayData.cxx @@ -107,30 +107,6 @@ GeomVertexArrayData(const GeomVertexArrayData ©) : nassertv(_array_format->is_registered()); } -/** - * The copy assignment operator is not pipeline-safe. This will completely - * obliterate all stages of the pipeline, so don't do it for a - * GeomVertexArrayData that is actively being used for rendering. - */ -void GeomVertexArrayData:: -operator = (const GeomVertexArrayData ©) { - CopyOnWriteObject::operator = (copy); - SimpleLruPage::operator = (copy); - - copy.mark_used_lru(); - - _array_format = copy._array_format; - _cycler = copy._cycler; - - OPEN_ITERATE_ALL_STAGES(_cycler) { - CDStageWriter cdata(_cycler, pipeline_stage); - cdata->_modified = Geom::get_next_modified(); - } - CLOSE_ITERATE_ALL_STAGES(_cycler); - - nassertv(_array_format->is_registered()); -} - /** * */ diff --git a/panda/src/gobj/geomVertexArrayData.h b/panda/src/gobj/geomVertexArrayData.h index 917b27c71a..e7f1fa750d 100644 --- a/panda/src/gobj/geomVertexArrayData.h +++ b/panda/src/gobj/geomVertexArrayData.h @@ -66,10 +66,11 @@ PUBLISHED: explicit GeomVertexArrayData(const GeomVertexArrayFormat *array_format, UsageHint usage_hint); GeomVertexArrayData(const GeomVertexArrayData ©); - void operator = (const GeomVertexArrayData ©); virtual ~GeomVertexArrayData(); ALLOC_DELETED_CHAIN(GeomVertexArrayData); + void operator = (const GeomVertexArrayData ©) = delete; + int compare_to(const GeomVertexArrayData &other) const; INLINE const GeomVertexArrayFormat *get_array_format() const; diff --git a/panda/src/gobj/geomVertexData.cxx b/panda/src/gobj/geomVertexData.cxx index 8f05651e6d..2345fbef6f 100644 --- a/panda/src/gobj/geomVertexData.cxx +++ b/panda/src/gobj/geomVertexData.cxx @@ -136,33 +136,6 @@ GeomVertexData(const GeomVertexData ©, CLOSE_ITERATE_ALL_STAGES(_cycler); } -/** - * The copy assignment operator is not pipeline-safe. This will completely - * obliterate all stages of the pipeline, so don't do it for a GeomVertexData - * that is actively being used for rendering. - */ -void GeomVertexData:: -operator = (const GeomVertexData ©) { - CopyOnWriteObject::operator = (copy); - - clear_cache(); - - _name = copy._name; - _cycler = copy._cycler; - _char_pcollector = copy._char_pcollector; - _skinning_pcollector = copy._skinning_pcollector; - _morphs_pcollector = copy._morphs_pcollector; - _blends_pcollector = copy._blends_pcollector; - - OPEN_ITERATE_ALL_STAGES(_cycler) { - CDStageWriter cdata(_cycler, pipeline_stage); - cdata->_modified = Geom::get_next_modified(); - cdata->_animated_vertices = nullptr; - cdata->_animated_vertices_modified = UpdateSeq(); - } - CLOSE_ITERATE_ALL_STAGES(_cycler); -} - /** * */ diff --git a/panda/src/gobj/geomVertexData.h b/panda/src/gobj/geomVertexData.h index 84f2e279aa..63a9024190 100644 --- a/panda/src/gobj/geomVertexData.h +++ b/panda/src/gobj/geomVertexData.h @@ -78,10 +78,11 @@ PUBLISHED: GeomVertexData(const GeomVertexData ©); explicit GeomVertexData(const GeomVertexData ©, const GeomVertexFormat *format); - void operator = (const GeomVertexData ©); virtual ~GeomVertexData(); ALLOC_DELETED_CHAIN(GeomVertexData); + void operator = (const GeomVertexData ©) = delete; + int compare_to(const GeomVertexData &other) const; INLINE const std::string &get_name() const; diff --git a/panda/src/text/geomTextGlyph.cxx b/panda/src/text/geomTextGlyph.cxx index ecd1a2173c..87751532f9 100644 --- a/panda/src/text/geomTextGlyph.cxx +++ b/panda/src/text/geomTextGlyph.cxx @@ -67,15 +67,6 @@ GeomTextGlyph(const Geom ©, const TextGlyph *glyph) : } } -/** - * - */ -void GeomTextGlyph:: -operator = (const GeomTextGlyph ©) { - Geom::operator = (copy); - _glyphs = copy._glyphs; -} - /** * */ diff --git a/panda/src/text/geomTextGlyph.h b/panda/src/text/geomTextGlyph.h index 7e697c1405..e9fa1245ae 100644 --- a/panda/src/text/geomTextGlyph.h +++ b/panda/src/text/geomTextGlyph.h @@ -30,10 +30,11 @@ public: GeomTextGlyph(const GeomVertexData *data); GeomTextGlyph(const GeomTextGlyph ©); GeomTextGlyph(const Geom ©, const TextGlyph *glyph); - void operator = (const GeomTextGlyph ©); virtual ~GeomTextGlyph(); ALLOC_DELETED_CHAIN(GeomTextGlyph); + void operator = (const GeomTextGlyph ©) = delete; + virtual Geom *make_copy() const; virtual bool copy_primitives_from(const Geom *other); void count_geom(const Geom *other);