From a4728957da7086a3025740335807918e4173808a Mon Sep 17 00:00:00 2001 From: David Rose Date: Sun, 18 Dec 2011 01:26:17 +0000 Subject: [PATCH] whoops, fix bam reading --- panda/src/gobj/geomVertexColumn.cxx | 6 ++++++ panda/src/putil/bam.h | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/panda/src/gobj/geomVertexColumn.cxx b/panda/src/gobj/geomVertexColumn.cxx index 03d9773de5..5668dd7b98 100644 --- a/panda/src/gobj/geomVertexColumn.cxx +++ b/panda/src/gobj/geomVertexColumn.cxx @@ -309,6 +309,7 @@ write_datagram(BamWriter *manager, Datagram &dg) { dg.add_uint8(_numeric_type); dg.add_uint8(_contents); dg.add_uint16(_start); + dg.add_uint8(_column_alignment); } //////////////////////////////////////////////////////////////////// @@ -343,6 +344,11 @@ fillin(DatagramIterator &scan, BamReader *manager) { _contents = (Contents)scan.get_uint8(); _start = scan.get_uint16(); + _column_alignment = 1; + if (manager->get_file_minor_ver() >= 29) { + _column_alignment = scan.get_uint8(); + } + setup(); } diff --git a/panda/src/putil/bam.h b/panda/src/putil/bam.h index efe5291b6a..0a24a6432a 100644 --- a/panda/src/putil/bam.h +++ b/panda/src/putil/bam.h @@ -33,7 +33,7 @@ static const unsigned short _bam_major_ver = 6; // Bumped to major version 6 on 2/11/06 to factor out PandaNode::CData. static const unsigned short _bam_first_minor_ver = 14; -static const unsigned short _bam_minor_ver = 28; +static const unsigned short _bam_minor_ver = 29; // Bumped to minor version 14 on 12/19/07 to change default ColorAttrib. // Bumped to minor version 15 on 4/9/08 to add TextureAttrib::_implicit_sort. // Bumped to minor version 16 on 5/13/08 to add Texture::_quality_level. @@ -49,6 +49,7 @@ static const unsigned short _bam_minor_ver = 28; // Bumped to minor version 26 on 8/5/11 to add multiview (stereo) Textures. // Bumped to minor version 27 on 10/9/11 to add stdfloat_double. // Bumped to minor version 28 on 11/28/11 to add Texture::_auto_texture_scale. +// Bumped to minor version 29 on 12/17/11 to add GeomVertexColumn::_column_alignment. #endif