bam version 3.5

This commit is contained in:
David Rose 2001-12-13 23:28:12 +00:00
parent 61d882ddd4
commit 4a0b5d3d7e
2 changed files with 11 additions and 6 deletions

View File

@ -463,7 +463,7 @@ clear_gsg(GraphicsStateGuardianBase *gsg) {
////////////////////////////////////////////////////////////////////
PixelBuffer *Texture::
get_ram_image() {
if (!has_ram_image()) {
if (!has_ram_image() && has_name()) {
// Now we have to reload the texture image.
gobj_cat.info()
<< "Reloading texture " << get_name() << "\n";
@ -609,12 +609,18 @@ fillin(DatagramIterator &scan, BamReader *manager) {
//Texture to know how the parent write_datagram works. And
//makes the assumption that the only data being written is
//the name
// scan.get_uint32(); // For historical purposes
if (manager->get_file_minor_ver() < 5) {
// Obsolete parameter.
scan.get_uint32();
}
_wrapu = (enum WrapMode) scan.get_uint8();
_wrapv = (enum WrapMode) scan.get_uint8();
_minfilter = (enum FilterType) scan.get_uint8();
_magfilter = (enum FilterType) scan.get_uint8();
// scan.get_uint16(); // placeholder for obsolete settings, remove this when you feel like bumping bam version number
if (manager->get_file_minor_ver() < 5) {
scan.get_uint16();
}
_anisotropic_degree = scan.get_int16();
if (scan.get_remaining_size() > 0) {
@ -646,12 +652,10 @@ fillin(DatagramIterator &scan, BamReader *manager) {
void Texture::
write_datagram(BamWriter *manager, Datagram &me) {
ImageBuffer::write_datagram(manager, me);
// me.add_uint32(0); // For historical purposes
me.add_uint8(_wrapu);
me.add_uint8(_wrapv);
me.add_uint8(_minfilter);
me.add_uint8(_magfilter);
// me.add_int16(0); // placeholder for obsolete settings, remove this when you feel like bumping bam version number
me.add_int16(_anisotropic_degree);
// We also need to write out the pixel buffer's format, even though

View File

@ -32,12 +32,13 @@ static const unsigned short _bam_major_ver = 3;
// Bumped to major version 2 on 7/6/00 due to major changes in Character.
// Bumped to major version 3 on 12/8/00 to change float64's to float32's.
static const unsigned short _bam_minor_ver = 4;
static const unsigned short _bam_minor_ver = 5;
// Bumped to minor version 1 on 12/15/00 to add FFT-style channel
// compression.
// Bumped to minor version 2 on 2/15/01 to add ModelNode::_preserve_transform.
// Bumped to minor version 3 on 4/11/01 to support correctly ordered children.
// Bumped to minor version 4 on 12/11/01 to transpose quaternions.
// Bumped to minor version 5 on 12/13/01 to remove obsolete fields from Texture.
#endif