GeomVertexArrayData::get_modified() wasn't getting updated

This commit is contained in:
David Rose 2007-05-24 22:48:31 +00:00
parent 16ee78a4be
commit 820a9fb99b
3 changed files with 20 additions and 19 deletions

View File

@ -156,9 +156,9 @@ get_modified() const {
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
INLINE CPT(GeomVertexArrayDataHandle) GeomVertexArrayData:: INLINE CPT(GeomVertexArrayDataHandle) GeomVertexArrayData::
get_handle(Thread *current_thread) const { get_handle(Thread *current_thread) const {
const CData *cdata = _cycler.read_unlocked(current_thread);
return new GeomVertexArrayDataHandle(this, current_thread, return new GeomVertexArrayDataHandle(this, current_thread,
_cycler.read_unlocked(current_thread), cdata, false);
false);
} }
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
@ -172,9 +172,9 @@ get_handle(Thread *current_thread) const {
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
INLINE PT(GeomVertexArrayDataHandle) GeomVertexArrayData:: INLINE PT(GeomVertexArrayDataHandle) GeomVertexArrayData::
modify_handle(Thread *current_thread) { modify_handle(Thread *current_thread) {
CData *cdata = _cycler.write_upstream(true, current_thread);
return new GeomVertexArrayDataHandle(this, current_thread, return new GeomVertexArrayDataHandle(this, current_thread,
_cycler.write_upstream(true, current_thread), cdata, true);
true);
} }
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
@ -266,7 +266,7 @@ operator = (const GeomVertexArrayData::CData &copy) {
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Function: GeomVertexArrayDataHandle::Constructor // Function: GeomVertexArrayDataHandle::Constructor
// Access: Public // Access: Private
// Description: // Description:
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
INLINE GeomVertexArrayDataHandle:: INLINE GeomVertexArrayDataHandle::
@ -377,19 +377,6 @@ get_read_pointer() const {
return _cdata->_buffer.get_read_pointer(); return _cdata->_buffer.get_read_pointer();
} }
////////////////////////////////////////////////////////////////////
// Function: GeomVertexArrayDataHandle::get_write_pointer
// Access: Public
// Description: Returns a writable pointer to the beginning of the
// actual data stream.
////////////////////////////////////////////////////////////////////
INLINE unsigned char *GeomVertexArrayDataHandle::
get_write_pointer() {
nassertr(_writable, NULL);
check_resident();
return _cdata->_buffer.get_write_pointer();
}
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Function: GeomVertexArrayDataHandle::get_array_format // Function: GeomVertexArrayDataHandle::get_array_format
// Access: Public // Access: Public

View File

@ -636,6 +636,20 @@ fillin(DatagramIterator &scan, BamReader *manager, void *extra_data) {
_modified = Geom::get_next_modified(); _modified = Geom::get_next_modified();
} }
////////////////////////////////////////////////////////////////////
// Function: GeomVertexArrayDataHandle::get_write_pointer
// Access: Public
// Description: Returns a writable pointer to the beginning of the
// actual data stream.
////////////////////////////////////////////////////////////////////
unsigned char *GeomVertexArrayDataHandle::
get_write_pointer() {
nassertr(_writable, NULL);
check_resident();
_cdata->_modified = Geom::get_next_modified();
return _cdata->_buffer.get_write_pointer();
}
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Function: GeomVertexArrayDataHandle::set_num_rows // Function: GeomVertexArrayDataHandle::set_num_rows
// Access: Public // Access: Public

View File

@ -259,7 +259,7 @@ public:
INLINE GeomVertexArrayData *get_object(); INLINE GeomVertexArrayData *get_object();
INLINE const unsigned char *get_read_pointer() const; INLINE const unsigned char *get_read_pointer() const;
INLINE unsigned char *get_write_pointer(); unsigned char *get_write_pointer();
PUBLISHED: PUBLISHED:
INLINE const GeomVertexArrayFormat *get_array_format() const; INLINE const GeomVertexArrayFormat *get_array_format() const;