Explorar o código

Merge branch 'master' into webgl-port

rdb %!s(int64=9) %!d(string=hai) anos
pai
achega
f79117e3fd
Modificáronse 60 ficheiros con 388 adicións e 146 borrados
  1. 5 3
      .travis.yml
  2. 1 1
      direct/src/directscripts/eggcacher.py
  3. 1 1
      direct/src/directscripts/packpanda.py
  4. 2 2
      direct/src/p3d/Packager.py
  5. 1 1
      direct/src/p3d/PatchMaker.py
  6. 3 2
      direct/src/plugin/p3dPackage.cxx
  7. 2 2
      dtool/src/parser-inc/zlib.h
  8. 8 3
      makepanda/makepanda.py
  9. 1 1
      panda/metalibs/pandaegg/pandaegg.h
  10. 29 10
      panda/src/audio/audioManager.cxx
  11. 2 0
      panda/src/audiotraits/config_openalAudio.cxx
  12. 1 1
      panda/src/audiotraits/config_openalAudio.h
  13. 1 1
      panda/src/audiotraits/milesAudioManager.cxx
  14. 1 1
      panda/src/collada/loaderFileTypeDae.cxx
  15. 1 1
      panda/src/downloader/decompressor.cxx
  16. 1 1
      panda/src/egg2pg/loaderFileTypeEgg.cxx
  17. 7 3
      panda/src/express/virtualFileSimple.cxx
  18. 3 3
      panda/src/express/virtualFileSystem.I
  19. 4 4
      panda/src/express/zStreamBuf.cxx
  20. 6 3
      panda/src/framework/pandaFramework.cxx
  21. 1 1
      panda/src/framework/windowFramework.cxx
  22. 4 1
      panda/src/gobj/geomVertexArrayFormat.cxx
  23. 12 2
      panda/src/gobj/geomVertexColumn.cxx
  24. 23 14
      panda/src/gobj/material.cxx
  25. 11 7
      panda/src/gobj/matrixLens.cxx
  26. 2 2
      panda/src/gobj/texture.I
  27. 36 8
      panda/src/gobj/texture.cxx
  28. 4 1
      panda/src/gobj/textureStage.cxx
  29. 4 1
      panda/src/grutil/movieTexture.cxx
  30. 3 3
      panda/src/grutil/shaderTerrainMesh.cxx
  31. 4 8
      panda/src/movies/dr_flac.h
  32. 18 4
      panda/src/pgraph/clipPlaneAttrib.cxx
  33. 4 2
      panda/src/pgraph/depthOffsetAttrib.cxx
  34. 7 3
      panda/src/pgraph/light.cxx
  35. 17 4
      panda/src/pgraph/lightAttrib.cxx
  36. 8 8
      panda/src/pgraph/loader.cxx
  37. 1 1
      panda/src/pgraph/loaderFileType.cxx
  38. 1 1
      panda/src/pgraph/loaderFileTypeBam.cxx
  39. 9 2
      panda/src/pgraph/occluderEffect.cxx
  40. 12 1
      panda/src/pgraph/paramNodePath.cxx
  41. 3 1
      panda/src/pgraph/scissorAttrib.cxx
  42. 20 2
      panda/src/pgraph/stencilAttrib.cxx
  43. 4 1
      panda/src/pgraph/texMatrixAttrib.cxx
  44. 10 4
      panda/src/pgraph/textureAttrib.cxx
  45. 3 1
      panda/src/pgraphnodes/directionalLight.cxx
  46. 3 1
      panda/src/pgraphnodes/pointLight.cxx
  47. 3 1
      panda/src/pgraphnodes/spotlight.cxx
  48. 6 2
      panda/src/pgraphnodes/uvScrollNode.cxx
  49. 1 1
      panda/src/pnmimage/pnmFileTypeRegistry.cxx
  50. 2 1
      panda/src/pnmimage/pnmImageHeader.cxx
  51. 2 2
      panda/src/pnmimagetypes/pnmFileTypeStbImage.cxx
  52. 10 0
      panda/src/putil/bamWriter.I
  53. 48 7
      panda/src/putil/bamWriter.cxx
  54. 1 0
      panda/src/putil/bamWriter.h
  55. 6 0
      panda/src/putil/config_util.cxx
  56. 1 0
      panda/src/putil/config_util.h
  57. 1 1
      panda/src/speedtree/loaderFileTypeSrt.cxx
  58. 1 1
      panda/src/speedtree/loaderFileTypeStf.cxx
  59. 1 1
      pandatool/src/assimp/loaderFileTypeAssimp.cxx
  60. 1 1
      pandatool/src/ptloader/loaderFileTypePandatool.cxx

+ 5 - 3
.travis.yml

@@ -3,9 +3,11 @@ sudo: false
 matrix:
 matrix:
   include:
   include:
     - compiler: gcc
     - compiler: gcc
-      env: PYTHONV=python2.7
+      env: PYTHONV=python2.7 FLAGS=
     - compiler: clang
     - compiler: clang
-      env: PYTHONV=python3
+      env: PYTHONV=python3 FLAGS=--installer
+    - compiler: clang
+      env: PYTHONV=python2.7 FLAGS=--override=STDFLOAT_DOUBLE=1
 addons:
 addons:
   apt:
   apt:
     packages:
     packages:
@@ -26,7 +28,7 @@ addons:
     - python-dev
     - python-dev
     - python3-dev
     - python3-dev
     - zlib1g-dev
     - zlib1g-dev
-script: $PYTHONV makepanda/makepanda.py --everything --git-commit $TRAVIS_COMMIT --installer --threads 4 && LD_LIBRARY_PATH=built/lib PYTHONPATH=built $PYTHONV makepanda/test_imports.py
+script: $PYTHONV makepanda/makepanda.py --everything --git-commit $TRAVIS_COMMIT $FLAGS --threads 4 && LD_LIBRARY_PATH=built/lib PYTHONPATH=built $PYTHONV makepanda/test_imports.py
 notifications:
 notifications:
   irc:
   irc:
     channels:
     channels:

+ 1 - 1
direct/src/directscripts/eggcacher.py

@@ -55,7 +55,7 @@ class EggCacher:
             size = os.path.getsize(path)
             size = os.path.getsize(path)
             eggs.append((path,size))
             eggs.append((path,size))
             return
             return
-        if (path.endswith(".egg.pz")):
+        if (path.endswith(".egg.pz") or path.endswith(".egg.gz")):
             size = os.path.getsize(path)
             size = os.path.getsize(path)
             if (self.pzkeep): eggs.append((path,size))
             if (self.pzkeep): eggs.append((path,size))
             else: eggs.append((path[:-3],size))
             else: eggs.append((path[:-3],size))

+ 1 - 1
direct/src/directscripts/packpanda.py

@@ -274,7 +274,7 @@ def CompileFiles(file):
     if (os.path.isfile(file)):
     if (os.path.isfile(file)):
         if (file.endswith(".egg")):
         if (file.endswith(".egg")):
             egg2bam(file, file[:-4]+'.bam')
             egg2bam(file, file[:-4]+'.bam')
-        elif (file.endswith(".egg.pz")):
+        elif (file.endswith(".egg.pz") or file.endswith(".egg.gz")):
             egg2bam(file, file[:-7]+'.bam')
             egg2bam(file, file[:-7]+'.bam')
         elif (file.endswith(".py")):
         elif (file.endswith(".py")):
             py2pyc(file)
             py2pyc(file)

+ 2 - 2
direct/src/p3d/Packager.py

@@ -61,7 +61,7 @@ class Packager:
                 self.newName = str(self.filename)
                 self.newName = str(self.filename)
 
 
             ext = Filename(self.newName).getExtension()
             ext = Filename(self.newName).getExtension()
-            if ext == 'pz':
+            if ext == 'pz' or ext == 'gz':
                 # Strip off a .pz extension; we can compress files
                 # Strip off a .pz extension; we can compress files
                 # within the Multifile without it.
                 # within the Multifile without it.
                 filename = Filename(self.newName)
                 filename = Filename(self.newName)
@@ -3772,7 +3772,7 @@ class Packager:
             self.currentPackage.addFile(filename, newName = newName,
             self.currentPackage.addFile(filename, newName = newName,
                                         explicit = False, unprocessed = unprocessed)
                                         explicit = False, unprocessed = unprocessed)
         else:
         else:
-            if ext == 'pz':
+            if ext == 'pz' or ext == 'gz':
                 # Strip off an implicit .pz extension.
                 # Strip off an implicit .pz extension.
                 newFilename = Filename(filename)
                 newFilename = Filename(filename)
                 newFilename.setExtension('')
                 newFilename.setExtension('')

+ 1 - 1
direct/src/p3d/PatchMaker.py

@@ -137,7 +137,7 @@ class PatchMaker:
 
 
             startFile, startPv, plan = self.getRecreateFilePlan()
             startFile, startPv, plan = self.getRecreateFilePlan()
 
 
-            if startFile.getExtension() == 'pz':
+            if startFile.getExtension() in ('pz', 'gz'):
                 # If the starting file is compressed, we have to
                 # If the starting file is compressed, we have to
                 # decompress it first.
                 # decompress it first.
                 assert startPv.tempFile is None
                 assert startPv.tempFile is None

+ 3 - 2
direct/src/plugin/p3dPackage.cxx

@@ -998,7 +998,8 @@ build_install_plans(TiXmlDocument *doc) {
           FileSpec new_file = patchfile->_file;
           FileSpec new_file = patchfile->_file;
           string new_filename = new_file.get_filename();
           string new_filename = new_file.get_filename();
           size_t dot = new_filename.rfind('.');
           size_t dot = new_filename.rfind('.');
-          assert(new_filename.substr(dot) == ".pz");
+          string extension = new_filename.substr(dot);
+          assert(extension == ".pz" || extension == ".gz");
           new_filename = new_filename.substr(0, dot);
           new_filename = new_filename.substr(0, dot);
           new_file.set_filename(new_filename);
           new_file.set_filename(new_filename);
           step = new InstallStepUncompressFile
           step = new InstallStepUncompressFile
@@ -1834,7 +1835,7 @@ thread_step() {
   z.next_in = (Bytef *)decompress_buffer;
   z.next_in = (Bytef *)decompress_buffer;
   z.avail_in = (size_t)read_count;
   z.avail_in = (size_t)read_count;
 
 
-  int result = inflateInit(&z);
+  int result = inflateInit2(&z, 32 + 15);
   if (result < 0) {
   if (result < 0) {
     nout << z.msg << "\n";
     nout << z.msg << "\n";
     return IT_step_failed;
     return IT_step_failed;

+ 2 - 2
dtool/src/parser-inc/zlib.h

@@ -21,8 +21,8 @@
 
 
 #include "zconf.h"
 #include "zconf.h"
 
 
-class z_stream {
-};
+typedef struct z_stream_s z_stream;
+typedef struct gz_header_s gz_header;
 
 
 #endif
 #endif
 
 

+ 8 - 3
makepanda/makepanda.py

@@ -592,8 +592,12 @@ if (COMPILER == "MSVC"):
     if (PkgSkip("DIRECTCAM")==0): LibName("DIRECTCAM", "odbc32.lib")
     if (PkgSkip("DIRECTCAM")==0): LibName("DIRECTCAM", "odbc32.lib")
     if (PkgSkip("DIRECTCAM")==0): LibName("DIRECTCAM", "odbccp32.lib")
     if (PkgSkip("DIRECTCAM")==0): LibName("DIRECTCAM", "odbccp32.lib")
     if (PkgSkip("OPENSSL")==0):
     if (PkgSkip("OPENSSL")==0):
-        LibName("OPENSSL", GetThirdpartyDir() + "openssl/lib/libpandassl.lib")
-        LibName("OPENSSL", GetThirdpartyDir() + "openssl/lib/libpandaeay.lib")
+        if os.path.isfile(GetThirdpartyDir() + "openssl/lib/libpandassl.lib"):
+            LibName("OPENSSL", GetThirdpartyDir() + "openssl/lib/libpandassl.lib")
+            LibName("OPENSSL", GetThirdpartyDir() + "openssl/lib/libpandaeay.lib")
+        else:
+            LibName("OPENSSL", GetThirdpartyDir() + "openssl/lib/libeay32.lib")
+            LibName("OPENSSL", GetThirdpartyDir() + "openssl/lib/ssleay32.lib")
     if (PkgSkip("PNG")==0):
     if (PkgSkip("PNG")==0):
         if os.path.isfile(GetThirdpartyDir() + "png/lib/libpng16_static.lib"):
         if os.path.isfile(GetThirdpartyDir() + "png/lib/libpng16_static.lib"):
             LibName("PNG", GetThirdpartyDir() + "png/lib/libpng16_static.lib")
             LibName("PNG", GetThirdpartyDir() + "png/lib/libpng16_static.lib")
@@ -4100,7 +4104,8 @@ if (not RUNTIME):
   TargetAdd('core.pyd', input='p3display_pythonGraphicsWindowProc.obj')
   TargetAdd('core.pyd', input='p3display_pythonGraphicsWindowProc.obj')
 
 
   TargetAdd('core.pyd', input='core_module.obj')
   TargetAdd('core.pyd', input='core_module.obj')
-  #TargetAdd('core.pyd', input='libp3tinyxml.ilb')
+  if not GetLinkAllStatic() and GetTarget() != 'emscripten':
+     TargetAdd('core.pyd', input='libp3tinyxml.ilb')
   TargetAdd('core.pyd', input='libp3interrogatedb.dll')
   TargetAdd('core.pyd', input='libp3interrogatedb.dll')
   TargetAdd('core.pyd', input=COMMON_PANDA_LIBS)
   TargetAdd('core.pyd', input=COMMON_PANDA_LIBS)
   TargetAdd('core.pyd', opts=['PYTHON', 'WINSOCK2'])
   TargetAdd('core.pyd', opts=['PYTHON', 'WINSOCK2'])

+ 1 - 1
panda/metalibs/pandaegg/pandaegg.h

@@ -9,6 +9,6 @@
 
 
 #include "pandabase.h"
 #include "pandabase.h"
 
 
-EXPCL_PANDAEGG void init_libpandaegg();
+extern "C" EXPCL_PANDAEGG void init_libpandaegg();
 
 
 #endif
 #endif

+ 29 - 10
panda/src/audio/audioManager.cxx

@@ -36,25 +36,35 @@ namespace {
   }
   }
 }
 }
 
 
-Create_AudioManager_proc* AudioManager::_create_AudioManager
-    =create_NullAudioManager;
+Create_AudioManager_proc *AudioManager::_create_AudioManager = NULL;
 
 
-void AudioManager::register_AudioManager_creator(Create_AudioManager_proc* proc) {
-  nassertv(_create_AudioManager==create_NullAudioManager);
-  _create_AudioManager=proc;
+void AudioManager::
+register_AudioManager_creator(Create_AudioManager_proc* proc) {
+  nassertv(_create_AudioManager == NULL);
+  _create_AudioManager = proc;
 }
 }
 
 
-
-
 // Factory method for getting a platform specific AudioManager:
 // Factory method for getting a platform specific AudioManager:
 PT(AudioManager) AudioManager::create_AudioManager() {
 PT(AudioManager) AudioManager::create_AudioManager() {
   audio_debug("create_AudioManager()\n  audio_library_name=\""<<audio_library_name<<"\"");
   audio_debug("create_AudioManager()\n  audio_library_name=\""<<audio_library_name<<"\"");
+
+  if (_create_AudioManager != NULL) {
+    // Someone was already so good as to register an audio manager creation function,
+    // perhaps by statically linking the requested library.  Let's use that, then.
+    PT(AudioManager) am = (*_create_AudioManager)();
+    if (!am->is_exact_type(NullAudioManager::get_class_type()) && !am->is_valid()) {
+      audio_error("  " << am->get_type() << " is not valid, will use NullAudioManager");
+      am = create_NullAudioManager();
+    }
+    return am;
+  }
+
   static bool lib_load = false;
   static bool lib_load = false;
   if (!lib_load) {
   if (!lib_load) {
     lib_load = true;
     lib_load = true;
-    if (!audio_library_name.empty() && !(audio_library_name == "null")) {
+    if (!audio_library_name.empty() && audio_library_name != "null") {
       Filename dl_name = Filename::dso_filename(
       Filename dl_name = Filename::dso_filename(
-          "lib"+string(audio_library_name)+".so");
+          "lib" + string(audio_library_name) + ".so");
       dl_name.to_os_specific();
       dl_name.to_os_specific();
       audio_debug("  dl_name=\""<<dl_name<<"\"");
       audio_debug("  dl_name=\""<<dl_name<<"\"");
       void *handle = load_dso(get_plugin_path().get_value(), dl_name);
       void *handle = load_dso(get_plugin_path().get_value(), dl_name);
@@ -84,11 +94,20 @@ PT(AudioManager) AudioManager::create_AudioManager() {
         } else {
         } else {
           typedef Create_AudioManager_proc *FuncType();
           typedef Create_AudioManager_proc *FuncType();
           Create_AudioManager_proc *factory_func = (*(FuncType *)dso_symbol)();
           Create_AudioManager_proc *factory_func = (*(FuncType *)dso_symbol)();
-          AudioManager::register_AudioManager_creator(factory_func);
+
+          // Note that the audio manager module may register itself upon load.
+          if (_create_AudioManager == NULL) {
+            AudioManager::register_AudioManager_creator(factory_func);
+          }
         }
         }
       }
       }
     }
     }
   }
   }
+
+  if (_create_AudioManager == NULL) {
+    _create_AudioManager = create_NullAudioManager;
+  }
+
   PT(AudioManager) am = (*_create_AudioManager)();
   PT(AudioManager) am = (*_create_AudioManager)();
   if (!am->is_exact_type(NullAudioManager::get_class_type()) && !am->is_valid()) {
   if (!am->is_exact_type(NullAudioManager::get_class_type()) && !am->is_valid()) {
     audio_error("  " << am->get_type() << " is not valid, will use NullAudioManager");
     audio_error("  " << am->get_type() << " is not valid, will use NullAudioManager");

+ 2 - 0
panda/src/audiotraits/config_openalAudio.cxx

@@ -48,6 +48,8 @@ init_libOpenALAudio() {
   OpenALAudioManager::init_type();
   OpenALAudioManager::init_type();
   OpenALAudioSound::init_type();
   OpenALAudioSound::init_type();
 
 
+  AudioManager::register_AudioManager_creator(&Create_OpenALAudioManager);
+
   PandaSystem *ps = PandaSystem::get_global_ptr();
   PandaSystem *ps = PandaSystem::get_global_ptr();
   ps->add_system("OpenAL");
   ps->add_system("OpenAL");
   ps->add_system("audio");
   ps->add_system("audio");

+ 1 - 1
panda/src/audiotraits/config_openalAudio.h

@@ -22,7 +22,7 @@
 ConfigureDecl(config_openalAudio, EXPCL_OPENAL_AUDIO, EXPTP_OPENAL_AUDIO);
 ConfigureDecl(config_openalAudio, EXPCL_OPENAL_AUDIO, EXPTP_OPENAL_AUDIO);
 NotifyCategoryDecl(openalAudio, EXPCL_OPENAL_AUDIO, EXPTP_OPENAL_AUDIO);
 NotifyCategoryDecl(openalAudio, EXPCL_OPENAL_AUDIO, EXPTP_OPENAL_AUDIO);
 
 
-extern EXPCL_OPENAL_AUDIO void init_libOpenALAudio();
+extern "C" EXPCL_OPENAL_AUDIO void init_libOpenALAudio();
 extern "C" EXPCL_OPENAL_AUDIO Create_AudioManager_proc *get_audio_manager_func_openal_audio();
 extern "C" EXPCL_OPENAL_AUDIO Create_AudioManager_proc *get_audio_manager_func_openal_audio();
 
 
 extern ConfigVariableString openal_device;
 extern ConfigVariableString openal_device;

+ 1 - 1
panda/src/audiotraits/milesAudioManager.cxx

@@ -893,7 +893,7 @@ load(const Filename &file_name) {
   sd->_basename = file_name.get_basename();
   sd->_basename = file_name.get_basename();
 
 
   string extension = sd->_basename.get_extension();
   string extension = sd->_basename.get_extension();
-  if (extension == "pz") {
+  if (extension == "pz" || extension == "gz") {
     extension = Filename(sd->_basename.get_basename_wo_extension()).get_extension();
     extension = Filename(sd->_basename.get_basename_wo_extension()).get_extension();
   }
   }
 
 

+ 1 - 1
panda/src/collada/loaderFileTypeDae.cxx

@@ -56,7 +56,7 @@ get_additional_extensions() const {
 
 
 /**
 /**
  * Returns true if this file type can transparently load compressed files
  * Returns true if this file type can transparently load compressed files
- * (with a .pz extension), false otherwise.
+ * (with a .pz or .gz extension), false otherwise.
  */
  */
 bool LoaderFileTypeDae::
 bool LoaderFileTypeDae::
 supports_compressed() const {
 supports_compressed() const {

+ 1 - 1
panda/src/downloader/decompressor.cxx

@@ -55,7 +55,7 @@ Decompressor::
 int Decompressor::
 int Decompressor::
 initiate(const Filename &source_file) {
 initiate(const Filename &source_file) {
   string extension = source_file.get_extension();
   string extension = source_file.get_extension();
-  if (extension == "pz") {
+  if (extension == "pz" || extension == "gz") {
     Filename dest_file = source_file;
     Filename dest_file = source_file;
     dest_file = source_file.get_fullpath_wo_extension();
     dest_file = source_file.get_fullpath_wo_extension();
     return initiate(source_file, dest_file);
     return initiate(source_file, dest_file);

+ 1 - 1
panda/src/egg2pg/loaderFileTypeEgg.cxx

@@ -44,7 +44,7 @@ get_extension() const {
 
 
 /**
 /**
  * Returns true if this file type can transparently load compressed files
  * Returns true if this file type can transparently load compressed files
- * (with a .pz extension), false otherwise.
+ * (with a .pz or .gz extension), false otherwise.
  */
  */
 bool LoaderFileTypeEgg::
 bool LoaderFileTypeEgg::
 supports_compressed() const {
 supports_compressed() const {

+ 7 - 3
panda/src/express/virtualFileSimple.cxx

@@ -186,7 +186,7 @@ copy_file(VirtualFile *new_file) {
  * (which you should eventually delete when you are done reading). Returns
  * (which you should eventually delete when you are done reading). Returns
  * NULL on failure.
  * NULL on failure.
  *
  *
- * If auto_unwrap is true, an explicitly-named .pz file is automatically
+ * If auto_unwrap is true, an explicitly-named .pz/.gz file is automatically
  * decompressed and the decompressed contents are returned.  This is different
  * decompressed and the decompressed contents are returned.  This is different
  * than vfs-implicit-pz, which will automatically decompress a file if the
  * than vfs-implicit-pz, which will automatically decompress a file if the
  * extension .pz is *not* given.
  * extension .pz is *not* given.
@@ -195,7 +195,9 @@ istream *VirtualFileSimple::
 open_read_file(bool auto_unwrap) const {
 open_read_file(bool auto_unwrap) const {
 
 
   // Will we be automatically unwrapping a .pz file?
   // Will we be automatically unwrapping a .pz file?
-  bool do_uncompress = (_implicit_pz_file || (auto_unwrap && _local_filename.get_extension() == "pz"));
+  bool do_uncompress = (_implicit_pz_file ||
+    (auto_unwrap && (_local_filename.get_extension() == "pz" ||
+                     _local_filename.get_extension() == "gz")));
 
 
   Filename local_filename(_local_filename);
   Filename local_filename(_local_filename);
   if (do_uncompress) {
   if (do_uncompress) {
@@ -364,7 +366,9 @@ bool VirtualFileSimple::
 read_file(pvector<unsigned char> &result, bool auto_unwrap) const {
 read_file(pvector<unsigned char> &result, bool auto_unwrap) const {
 
 
   // Will we be automatically unwrapping a .pz file?
   // Will we be automatically unwrapping a .pz file?
-  bool do_uncompress = (_implicit_pz_file || (auto_unwrap && _local_filename.get_extension() == "pz"));
+  bool do_uncompress = (_implicit_pz_file ||
+    (auto_unwrap && (_local_filename.get_extension() == "pz" ||
+                     _local_filename.get_extension() == "gz")));
 
 
   Filename local_filename(_local_filename);
   Filename local_filename(_local_filename);
   if (do_uncompress) {
   if (do_uncompress) {

+ 3 - 3
panda/src/express/virtualFileSystem.I

@@ -88,7 +88,7 @@ ls_all(const Filename &filename) const {
  * Convenience function; returns the entire contents of the indicated file as
  * Convenience function; returns the entire contents of the indicated file as
  * a string.
  * a string.
  *
  *
- * If auto_unwrap is true, an explicitly-named .pz file is automatically
+ * If auto_unwrap is true, an explicitly-named .pz/.gz file is automatically
  * decompressed and the decompressed contents are returned.  This is different
  * decompressed and the decompressed contents are returned.  This is different
  * than vfs-implicit-pz, which will automatically decompress a file if the
  * than vfs-implicit-pz, which will automatically decompress a file if the
  * extension .pz is *not* given.
  * extension .pz is *not* given.
@@ -118,7 +118,7 @@ write_file(const Filename &filename, const string &data, bool auto_wrap) {
  * file, if it exists and can be read.  Returns true on success, false
  * file, if it exists and can be read.  Returns true on success, false
  * otherwise.
  * otherwise.
  *
  *
- * If auto_unwrap is true, an explicitly-named .pz file is automatically
+ * If auto_unwrap is true, an explicitly-named .pz/.gz file is automatically
  * decompressed and the decompressed contents are returned.  This is different
  * decompressed and the decompressed contents are returned.  This is different
  * than vfs-implicit-pz, which will automatically decompress a file if the
  * than vfs-implicit-pz, which will automatically decompress a file if the
  * extension .pz is *not* given.
  * extension .pz is *not* given.
@@ -134,7 +134,7 @@ read_file(const Filename &filename, string &result, bool auto_unwrap) const {
  * file, if it exists and can be read.  Returns true on success, false
  * file, if it exists and can be read.  Returns true on success, false
  * otherwise.
  * otherwise.
  *
  *
- * If auto_unwrap is true, an explicitly-named .pz file is automatically
+ * If auto_unwrap is true, an explicitly-named .pz/.gz file is automatically
  * decompressed and the decompressed contents are returned.  This is different
  * decompressed and the decompressed contents are returned.  This is different
  * than vfs-implicit-pz, which will automatically decompress a file if the
  * than vfs-implicit-pz, which will automatically decompress a file if the
  * extension .pz is *not* given.
  * extension .pz is *not* given.

+ 4 - 4
panda/src/express/zStreamBuf.cxx

@@ -87,9 +87,9 @@ open_read(istream *source, bool owns_source) {
   _z_source.opaque = Z_NULL;
   _z_source.opaque = Z_NULL;
   _z_source.msg = (char *)"no error message";
   _z_source.msg = (char *)"no error message";
 
 
-  int result = inflateInit(&_z_source);
+  int result = inflateInit2(&_z_source, 32 + 15);
   if (result < 0) {
   if (result < 0) {
-    show_zlib_error("inflateInit", result, _z_source);
+    show_zlib_error("inflateInit2", result, _z_source);
     close_read();
     close_read();
   }
   }
   thread_consider_yield();
   thread_consider_yield();
@@ -178,7 +178,7 @@ streampos ZStreamBuf::
 seekoff(streamoff off, ios_seekdir dir, ios_openmode which) {
 seekoff(streamoff off, ios_seekdir dir, ios_openmode which) {
   // Necessary for tellg() to work after seeking to 0.
   // Necessary for tellg() to work after seeking to 0.
   if (dir == ios::cur && off == 0) {
   if (dir == ios::cur && off == 0) {
-    if (_source->tellg() == 0) {
+    if (_source->tellg() == (streampos)0) {
       return 0;
       return 0;
     } else {
     } else {
       return -1;
       return -1;
@@ -199,7 +199,7 @@ seekoff(streamoff off, ios_seekdir dir, ios_openmode which) {
   gbump(n);
   gbump(n);
 
 
   _source->seekg(0, ios::beg);
   _source->seekg(0, ios::beg);
-  if (_source->tellg() == 0) {
+  if (_source->tellg() == (streampos)0) {
     _z_source.next_in = Z_NULL;
     _z_source.next_in = Z_NULL;
     _z_source.avail_in = 0;
     _z_source.avail_in = 0;
     _z_source.next_out = Z_NULL;
     _z_source.next_out = Z_NULL;

+ 6 - 3
panda/src/framework/pandaFramework.cxx

@@ -31,6 +31,12 @@
 #include "transformState.h"
 #include "transformState.h"
 #include "renderState.h"
 #include "renderState.h"
 
 
+#ifdef LINK_ALL_STATIC
+#ifdef HAVE_EGG
+#include "pandaegg.h"
+#endif
+#endif
+
 #ifdef __EMSCRIPTEN__
 #ifdef __EMSCRIPTEN__
 #include <emscripten.h>
 #include <emscripten.h>
 
 
@@ -43,7 +49,6 @@ static void em_do_frame(void *arg) {
     framework_cat.info() << "Main loop cancelled.\n";
     framework_cat.info() << "Main loop cancelled.\n";
   }
   }
 }
 }
-
 #endif
 #endif
 
 
 LoaderOptions PandaFramework::_loader_options;
 LoaderOptions PandaFramework::_loader_options;
@@ -116,10 +121,8 @@ open_framework(int &argc, char **&argv) {
 
 
   // We also want the egg loader.
   // We also want the egg loader.
   #ifdef HAVE_EGG
   #ifdef HAVE_EGG
-  extern EXPCL_PANDAEGG void init_libpandaegg();
   init_libpandaegg();
   init_libpandaegg();
   #endif
   #endif
-
 #endif
 #endif
 
 
   // Let's explicitly make a call to the image type library to ensure it gets
   // Let's explicitly make a call to the image type library to ensure it gets

+ 1 - 1
panda/src/framework/windowFramework.cxx

@@ -591,7 +591,7 @@ load_model(const NodePath &parent, Filename filename) {
   bool is_image = false;
   bool is_image = false;
   string extension = filename.get_extension();
   string extension = filename.get_extension();
 #ifdef HAVE_ZLIB
 #ifdef HAVE_ZLIB
-  if (extension == "pz") {
+  if (extension == "pz" || extension == "gz") {
     extension = Filename(filename.get_basename_wo_extension()).get_extension();
     extension = Filename(filename.get_basename_wo_extension()).get_extension();
   }
   }
 #endif  // HAVE_ZLIB
 #endif  // HAVE_ZLIB

+ 4 - 1
panda/src/gobj/geomVertexArrayFormat.cxx

@@ -708,7 +708,10 @@ write_datagram(BamWriter *manager, Datagram &dg) {
   dg.add_uint16(_stride);
   dg.add_uint16(_stride);
   dg.add_uint16(_total_bytes);
   dg.add_uint16(_total_bytes);
   dg.add_uint8(_pad_to);
   dg.add_uint8(_pad_to);
-  dg.add_uint16(_divisor);
+
+  if (manager->get_file_minor_ver() > 36) {
+    dg.add_uint16(_divisor);
+  }
 
 
   consider_sort_columns();
   consider_sort_columns();
 
 

+ 12 - 2
panda/src/gobj/geomVertexColumn.cxx

@@ -378,9 +378,19 @@ write_datagram(BamWriter *manager, Datagram &dg) {
   manager->write_pointer(dg, _name);
   manager->write_pointer(dg, _name);
   dg.add_uint8(_num_components);
   dg.add_uint8(_num_components);
   dg.add_uint8(_numeric_type);
   dg.add_uint8(_numeric_type);
-  dg.add_uint8(_contents);
+
+  if (_contents == C_normal && manager->get_file_minor_ver() < 38) {
+    // Panda 1.9 did not have C_normal.
+    dg.add_uint8(C_vector);
+  } else {
+    dg.add_uint8(_contents);
+  }
+
   dg.add_uint16(_start);
   dg.add_uint16(_start);
-  dg.add_uint8(_column_alignment);
+
+  if (manager->get_file_minor_ver() >= 29) {
+    dg.add_uint8(_column_alignment);
+  }
 }
 }
 
 
 /**
 /**

+ 23 - 14
panda/src/gobj/material.cxx

@@ -257,7 +257,7 @@ set_roughness(PN_stdfloat roughness) {
   // Calculate the specular exponent from the roughness as it is used in
   // Calculate the specular exponent from the roughness as it is used in
   // Blinn-Phong shading model.  We use the popular Disney method of squaring
   // Blinn-Phong shading model.  We use the popular Disney method of squaring
   // the roughness to get a more perceptually linear scale.  From:
   // the roughness to get a more perceptually linear scale.  From:
-  // http:graphicrants.blogspot.de201308specular-brdf-reference.html
+  // http://graphicrants.blogspot.de/2013/08/specular-brdf-reference.html
   if (roughness <= 0 || IS_NEARLY_ZERO(roughness)) {
   if (roughness <= 0 || IS_NEARLY_ZERO(roughness)) {
     _shininess = make_inf((PN_stdfloat)0);
     _shininess = make_inf((PN_stdfloat)0);
   } else {
   } else {
@@ -481,26 +481,35 @@ void Material::
 write_datagram(BamWriter *manager, Datagram &me) {
 write_datagram(BamWriter *manager, Datagram &me) {
   me.add_string(get_name());
   me.add_string(get_name());
 
 
-  me.add_int32(_flags);
+  if (manager->get_file_minor_ver() >= 39) {
+    me.add_int32(_flags);
 
 
-  if (_flags & F_metallic) {
-    // Metalness workflow.
-    _base_color.write_datagram(me);
-    me.add_stdfloat(_metallic);
+    if (_flags & F_metallic) {
+      // Metalness workflow.
+      _base_color.write_datagram(me);
+      me.add_stdfloat(_metallic);
+    } else {
+      _ambient.write_datagram(me);
+      _diffuse.write_datagram(me);
+      _specular.write_datagram(me);
+    }
+    _emission.write_datagram(me);
+
+    if (_flags & F_roughness) {
+      me.add_stdfloat(_roughness);
+    } else {
+      me.add_stdfloat(_shininess);
+    }
+
+    me.add_stdfloat(_refractive_index);
   } else {
   } else {
     _ambient.write_datagram(me);
     _ambient.write_datagram(me);
     _diffuse.write_datagram(me);
     _diffuse.write_datagram(me);
     _specular.write_datagram(me);
     _specular.write_datagram(me);
-  }
-  _emission.write_datagram(me);
-
-  if (_flags & F_roughness) {
-    me.add_stdfloat(_roughness);
-  } else {
+    _emission.write_datagram(me);
     me.add_stdfloat(_shininess);
     me.add_stdfloat(_shininess);
+    me.add_int32(_flags & 0x7f);
   }
   }
-
-  me.add_stdfloat(_refractive_index);
 }
 }
 
 
 /**
 /**

+ 11 - 7
panda/src/gobj/matrixLens.cxx

@@ -83,14 +83,18 @@ register_with_read_factory() {
  */
  */
 void MatrixLens::
 void MatrixLens::
 write_datagram(BamWriter *manager, Datagram &dg) {
 write_datagram(BamWriter *manager, Datagram &dg) {
-  dg.add_uint8(_ml_flags);
-  _user_mat.write_datagram(dg);
+  Lens::write_datagram(manager, dg);
 
 
-  if (_ml_flags & MF_has_left_eye) {
-    _left_eye_mat.write_datagram(dg);
-  }
-  if (_ml_flags & MF_has_right_eye) {
-    _left_eye_mat.write_datagram(dg);
+  if (manager->get_file_minor_ver() >= 41) {
+    dg.add_uint8(_ml_flags);
+    _user_mat.write_datagram(dg);
+
+    if (_ml_flags & MF_has_left_eye) {
+      _left_eye_mat.write_datagram(dg);
+    }
+    if (_ml_flags & MF_has_right_eye) {
+      _left_eye_mat.write_datagram(dg);
+    }
   }
   }
 }
 }
 
 

+ 2 - 2
panda/src/gobj/texture.I

@@ -2325,7 +2325,7 @@ INLINE bool Texture::
 is_txo_filename(const Filename &fullpath) {
 is_txo_filename(const Filename &fullpath) {
   string extension = fullpath.get_extension();
   string extension = fullpath.get_extension();
 #ifdef HAVE_ZLIB
 #ifdef HAVE_ZLIB
-  if (extension == "pz") {
+  if (extension == "pz" || extension == "gz") {
     extension = Filename(fullpath.get_basename_wo_extension()).get_extension();
     extension = Filename(fullpath.get_basename_wo_extension()).get_extension();
   }
   }
 #endif  // HAVE_ZLIB
 #endif  // HAVE_ZLIB
@@ -2340,7 +2340,7 @@ INLINE bool Texture::
 is_dds_filename(const Filename &fullpath) {
 is_dds_filename(const Filename &fullpath) {
   string extension = fullpath.get_extension();
   string extension = fullpath.get_extension();
 #ifdef HAVE_ZLIB
 #ifdef HAVE_ZLIB
-  if (extension == "pz") {
+  if (extension == "pz" || extension == "gz") {
     extension = Filename(fullpath.get_basename_wo_extension()).get_extension();
     extension = Filename(fullpath.get_basename_wo_extension()).get_extension();
   }
   }
 #endif  // HAVE_ZLIB
 #endif  // HAVE_ZLIB

+ 36 - 8
panda/src/gobj/texture.cxx

@@ -8663,8 +8663,19 @@ do_write_datagram_header(CData *cdata, BamWriter *manager, Datagram &me, bool &h
   me.add_uint8(cdata->_primary_file_num_channels);
   me.add_uint8(cdata->_primary_file_num_channels);
   me.add_uint8(cdata->_alpha_file_channel);
   me.add_uint8(cdata->_alpha_file_channel);
   me.add_bool(has_rawdata);
   me.add_bool(has_rawdata);
-  me.add_uint8(cdata->_texture_type);
-  me.add_bool(cdata->_has_read_mipmaps);
+
+  if (manager->get_file_minor_ver() < 25 &&
+      cdata->_texture_type == TT_cube_map) {
+    // Between Panda3D releases 1.7.2 and 1.8.0 (bam versions 6.24 and 6.25),
+    // we added TT_2d_texture_array, shifting the definition for TT_cube_map.
+    me.add_uint8(TT_2d_texture_array);
+  } else {
+    me.add_uint8(cdata->_texture_type);
+  }
+
+  if (manager->get_file_minor_ver() >= 32) {
+    me.add_bool(cdata->_has_read_mipmaps);
+  }
 }
 }
 
 
 /**
 /**
@@ -8673,7 +8684,18 @@ do_write_datagram_header(CData *cdata, BamWriter *manager, Datagram &me, bool &h
  */
  */
 void Texture::
 void Texture::
 do_write_datagram_body(CData *cdata, BamWriter *manager, Datagram &me) {
 do_write_datagram_body(CData *cdata, BamWriter *manager, Datagram &me) {
-  cdata->_default_sampler.write_datagram(me);
+  if (manager->get_file_minor_ver() >= 36) {
+    cdata->_default_sampler.write_datagram(me);
+  } else {
+    const SamplerState &s = cdata->_default_sampler;
+    me.add_uint8(s.get_wrap_u());
+    me.add_uint8(s.get_wrap_v());
+    me.add_uint8(s.get_wrap_w());
+    me.add_uint8(s.get_minfilter());
+    me.add_uint8(s.get_magfilter());
+    me.add_int16(s.get_anisotropic_degree());
+    s.get_border_color().write_datagram(me);
+  }
 
 
   me.add_uint8(cdata->_compression);
   me.add_uint8(cdata->_compression);
   me.add_uint8(cdata->_quality_level);
   me.add_uint8(cdata->_quality_level);
@@ -8685,7 +8707,9 @@ do_write_datagram_body(CData *cdata, BamWriter *manager, Datagram &me) {
     me.add_uint8(cdata->_usage_hint);
     me.add_uint8(cdata->_usage_hint);
   }
   }
 
 
-  me.add_uint8(cdata->_auto_texture_scale);
+  if (manager->get_file_minor_ver() >= 28) {
+    me.add_uint8(cdata->_auto_texture_scale);
+  }
   me.add_uint32(cdata->_orig_file_x_size);
   me.add_uint32(cdata->_orig_file_x_size);
   me.add_uint32(cdata->_orig_file_y_size);
   me.add_uint32(cdata->_orig_file_y_size);
 
 
@@ -8711,11 +8735,15 @@ do_write_datagram_rawdata(CData *cdata, BamWriter *manager, Datagram &me) {
   me.add_uint32(cdata->_y_size);
   me.add_uint32(cdata->_y_size);
   me.add_uint32(cdata->_z_size);
   me.add_uint32(cdata->_z_size);
 
 
-  me.add_uint32(cdata->_pad_x_size);
-  me.add_uint32(cdata->_pad_y_size);
-  me.add_uint32(cdata->_pad_z_size);
+  if (manager->get_file_minor_ver() >= 30) {
+    me.add_uint32(cdata->_pad_x_size);
+    me.add_uint32(cdata->_pad_y_size);
+    me.add_uint32(cdata->_pad_z_size);
+  }
 
 
-  me.add_uint32(cdata->_num_views);
+  if (manager->get_file_minor_ver() >= 26) {
+    me.add_uint32(cdata->_num_views);
+  }
   me.add_uint8(cdata->_component_type);
   me.add_uint8(cdata->_component_type);
   me.add_uint8(cdata->_component_width);
   me.add_uint8(cdata->_component_width);
   me.add_uint8(cdata->_ram_image_compression);
   me.add_uint8(cdata->_ram_image_compression);

+ 4 - 1
panda/src/gobj/textureStage.cxx

@@ -438,7 +438,10 @@ write_datagram(BamWriter *manager, Datagram &me) {
     me.add_uint8(_rgb_scale);
     me.add_uint8(_rgb_scale);
     me.add_uint8(_alpha_scale);
     me.add_uint8(_alpha_scale);
     me.add_bool(_saved_result);
     me.add_bool(_saved_result);
-    me.add_int32(_tex_view_offset);
+
+    if (manager->get_file_minor_ver() >= 26) {
+      me.add_int32(_tex_view_offset);
+    }
 
 
     me.add_uint8(_combine_rgb_mode);
     me.add_uint8(_combine_rgb_mode);
     me.add_uint8(_num_combine_rgb_operands);
     me.add_uint8(_num_combine_rgb_operands);

+ 4 - 1
panda/src/grutil/movieTexture.cxx

@@ -816,7 +816,10 @@ do_write_datagram_rawdata(Texture::CData *cdata_tex, BamWriter *manager, Datagra
   CDReader cdata(_cycler);
   CDReader cdata(_cycler);
 
 
   dg.add_uint16(cdata_tex->_z_size);
   dg.add_uint16(cdata_tex->_z_size);
-  dg.add_uint16(cdata_tex->_num_views);
+  if (manager->get_file_minor_ver() >= 26) {
+    dg.add_uint16(cdata_tex->_num_views);
+  }
+
   nassertv(cdata->_pages.size() == (size_t)(cdata_tex->_z_size * cdata_tex->_num_views));
   nassertv(cdata->_pages.size() == (size_t)(cdata_tex->_z_size * cdata_tex->_num_views));
   for (size_t n = 0; n < cdata->_pages.size(); ++n) {
   for (size_t n = 0; n < cdata->_pages.size(); ++n) {
     const VideoPage &page = cdata->_pages[n];
     const VideoPage &page = cdata->_pages[n];

+ 3 - 3
panda/src/grutil/shaderTerrainMesh.cxx

@@ -383,10 +383,10 @@ void ShaderTerrainMesh::do_create_chunk_geom() {
       // Stitched vertices at the cornders
       // Stitched vertices at the cornders
       if (x == -1 || y == -1 || x == size + 1 || y == size + 1) {
       if (x == -1 || y == -1 || x == size + 1 || y == size + 1) {
         vtx_pos.set_z(-1.0f / (PN_stdfloat)size);
         vtx_pos.set_z(-1.0f / (PN_stdfloat)size);
-        vtx_pos.set_x(max(0.0f, min(1.0f, vtx_pos.get_x())));
-        vtx_pos.set_y(max(0.0f, min(1.0f, vtx_pos.get_y())));
+        vtx_pos.set_x(max((PN_stdfloat)0, min((PN_stdfloat)1, vtx_pos.get_x())));
+        vtx_pos.set_y(max((PN_stdfloat)0, min((PN_stdfloat)1, vtx_pos.get_y())));
       }
       }
-      vertex_writer.add_data3f(vtx_pos);
+      vertex_writer.add_data3(vtx_pos);
     }
     }
   }
   }
 
 

+ 4 - 8
panda/src/movies/dr_flac.h

@@ -92,7 +92,7 @@
 
 
 #include <stddef.h>
 #include <stddef.h>
 #include <stdint.h>
 #include <stdint.h>
-#include <stdbool.h>
+//#include <stdbool.h>
 
 
 // As data is read from the client it is placed into an internal buffer for fast access. This controls the
 // As data is read from the client it is placed into an internal buffer for fast access. This controls the
 // size of that buffer. Larger values means more speed, but also more memory. In my testing there is diminishing
 // size of that buffer. Larger values means more speed, but also more memory. In my testing there is diminishing
@@ -332,11 +332,7 @@ static drflac* drflac_open_memory(const void* data, size_t dataSize);
 #include <endian.h>
 #include <endian.h>
 #endif
 #endif
 
 
-#ifdef _MSC_VER
-#define DRFLAC_INLINE __forceinline
-#else
-#define DRFLAC_INLINE inline
-#endif
+#define DRFLAC_INLINE ALWAYS_INLINE
 
 
 #define DRFLAC_BLOCK_TYPE_STREAMINFO                    0
 #define DRFLAC_BLOCK_TYPE_STREAMINFO                    0
 #define DRFLAC_BLOCK_TYPE_PADDING                       1
 #define DRFLAC_BLOCK_TYPE_PADDING                       1
@@ -2248,7 +2244,7 @@ done_reading_block_header:
     }
     }
 
 
     if (pIsLastBlockOut) {
     if (pIsLastBlockOut) {
-        *pIsLastBlockOut = isLastBlock;
+        *pIsLastBlockOut = (isLastBlock != 0);
     }
     }
 
 
     return blockType;
     return blockType;
@@ -2354,7 +2350,7 @@ static bool drflac__seek_to_sample__brute_force(drflac* pFlac, uint64_t sampleIn
         return false;
         return false;
     }
     }
 
 
-    return drflac_read_s16(pFlac, samplesToDecode, NULL);
+    return (drflac_read_s16(pFlac, samplesToDecode, NULL) != 0);
 }
 }
 
 
 static bool drflac__seek_to_sample__seek_table(drflac* pFlac, uint64_t sampleIndex)
 static bool drflac__seek_to_sample__seek_table(drflac* pFlac, uint64_t sampleIndex)

+ 18 - 4
panda/src/pgraph/clipPlaneAttrib.cxx

@@ -872,18 +872,32 @@ write_datagram(BamWriter *manager, Datagram &dg) {
 
 
   // write the number of off_planes
   // write the number of off_planes
   dg.add_uint16(get_num_off_planes());
   dg.add_uint16(get_num_off_planes());
+
   // write the off planes pointers if any
   // write the off planes pointers if any
   Planes::const_iterator fi;
   Planes::const_iterator fi;
-  for (fi = _off_planes.begin(); fi != _off_planes.end(); ++fi) {
-    (*fi).write_datagram(manager, dg);
+  if (manager->get_file_minor_ver() < 40) {
+    for (fi = _off_planes.begin(); fi != _off_planes.end(); ++fi) {
+      manager->write_pointer(dg, fi->node());
+    }
+  } else {
+    for (fi = _off_planes.begin(); fi != _off_planes.end(); ++fi) {
+      (*fi).write_datagram(manager, dg);
+    }
   }
   }
 
 
   // write the number of on planes
   // write the number of on planes
   dg.add_uint16(get_num_on_planes());
   dg.add_uint16(get_num_on_planes());
+
   // write the on planes pointers if any
   // write the on planes pointers if any
   Planes::const_iterator nti;
   Planes::const_iterator nti;
-  for (nti = _on_planes.begin(); nti != _on_planes.end(); ++nti) {
-    (*nti).write_datagram(manager, dg);
+  if (manager->get_file_minor_ver() < 40) {
+    for (nti = _on_planes.begin(); nti != _on_planes.end(); ++nti) {
+      manager->write_pointer(dg, nti->node());
+    }
+  } else {
+    for (nti = _on_planes.begin(); nti != _on_planes.end(); ++nti) {
+      (*nti).write_datagram(manager, dg);
+    }
   }
   }
 }
 }
 
 

+ 4 - 2
panda/src/pgraph/depthOffsetAttrib.cxx

@@ -162,8 +162,10 @@ write_datagram(BamWriter *manager, Datagram &dg) {
   RenderAttrib::write_datagram(manager, dg);
   RenderAttrib::write_datagram(manager, dg);
 
 
   dg.add_int32(_offset);
   dg.add_int32(_offset);
-  dg.add_stdfloat(_min_value);
-  dg.add_stdfloat(_max_value);
+  if (manager->get_file_minor_ver() >= 31) {
+    dg.add_stdfloat(_min_value);
+    dg.add_stdfloat(_max_value);
+  }
 }
 }
 
 
 /**
 /**

+ 7 - 3
panda/src/pgraph/light.cxx

@@ -206,9 +206,13 @@ fill_viz_geom(GeomNode *) {
  */
  */
 void Light::
 void Light::
 write_datagram(BamWriter *manager, Datagram &dg) {
 write_datagram(BamWriter *manager, Datagram &dg) {
-  dg.add_bool(_has_color_temperature);
-  if (_has_color_temperature) {
-    dg.add_stdfloat(_color_temperature);
+  if (manager->get_file_minor_ver() >= 39) {
+    dg.add_bool(_has_color_temperature);
+    if (_has_color_temperature) {
+      dg.add_stdfloat(_color_temperature);
+    } else {
+      manager->write_cdata(dg, _cycler);
+    }
   } else {
   } else {
     manager->write_cdata(dg, _cycler);
     manager->write_cdata(dg, _cycler);
   }
   }

+ 17 - 4
panda/src/pgraph/lightAttrib.cxx

@@ -898,18 +898,31 @@ write_datagram(BamWriter *manager, Datagram &dg) {
 
 
   // write the number of off_lights
   // write the number of off_lights
   dg.add_uint16(get_num_off_lights());
   dg.add_uint16(get_num_off_lights());
+
   // write the off lights pointers if any
   // write the off lights pointers if any
   Lights::const_iterator fi;
   Lights::const_iterator fi;
-  for (fi = _off_lights.begin(); fi != _off_lights.end(); ++fi) {
-    (*fi).write_datagram(manager, dg);
+  if (manager->get_file_minor_ver() < 40) {
+    for (fi = _off_lights.begin(); fi != _off_lights.end(); ++fi) {
+      manager->write_pointer(dg, fi->node());
+    }
+  } else {
+    for (fi = _off_lights.begin(); fi != _off_lights.end(); ++fi) {
+      (*fi).write_datagram(manager, dg);
+    }
   }
   }
 
 
   // write the number of on lights
   // write the number of on lights
   dg.add_uint16(get_num_on_lights());
   dg.add_uint16(get_num_on_lights());
   // write the on lights pointers if any
   // write the on lights pointers if any
   Lights::const_iterator nti;
   Lights::const_iterator nti;
-  for (nti = _on_lights.begin(); nti != _on_lights.end(); ++nti) {
-    (*nti).write_datagram(manager, dg);
+  if (manager->get_file_minor_ver() < 40) {
+    for (nti = _on_lights.begin(); nti != _on_lights.end(); ++nti) {
+      manager->write_pointer(dg, nti->node());
+    }
+  } else {
+    for (nti = _on_lights.begin(); nti != _on_lights.end(); ++nti) {
+      (*nti).write_datagram(manager, dg);
+    }
   }
   }
 }
 }
 
 

+ 8 - 8
panda/src/pgraph/loader.cxx

@@ -140,10 +140,10 @@ load_file(const Filename &filename, const LoaderOptions &options) const {
     extension = this_filename.get_extension();
     extension = this_filename.get_extension();
   }
   }
 
 
-  bool pz_file = false;
+  bool compressed = false;
 #ifdef HAVE_ZLIB
 #ifdef HAVE_ZLIB
-  if (extension == "pz") {
-    pz_file = true;
+  if (extension == "pz" || extension == "gz") {
+    compressed = true;
     extension = Filename(this_filename.get_basename_wo_extension()).get_extension();
     extension = Filename(this_filename.get_basename_wo_extension()).get_extension();
   }
   }
 #endif  // HAVE_ZLIB
 #endif  // HAVE_ZLIB
@@ -182,7 +182,7 @@ load_file(const Filename &filename, const LoaderOptions &options) const {
         << extension << ") does not support loading.\n";
         << extension << ") does not support loading.\n";
     }
     }
     return NULL;
     return NULL;
-  } else if (pz_file && !requested_type->supports_compressed()) {
+  } else if (compressed && !requested_type->supports_compressed()) {
     if (report_errors) {
     if (report_errors) {
       loader_cat.error()
       loader_cat.error()
         << requested_type->get_name() << " file type (."
         << requested_type->get_name() << " file type (."
@@ -382,10 +382,10 @@ save_file(const Filename &filename, const LoaderOptions &options,
     extension = this_filename.get_extension();
     extension = this_filename.get_extension();
   }
   }
 
 
-  bool pz_file = false;
+  bool compressed = false;
 #ifdef HAVE_ZLIB
 #ifdef HAVE_ZLIB
-  if (extension == "pz") {
-    pz_file = true;
+  if (extension == "pz" || extension == "gz") {
+    compressed = true;
     extension = Filename(this_filename.get_basename_wo_extension()).get_extension();
     extension = Filename(this_filename.get_basename_wo_extension()).get_extension();
   }
   }
 #endif  // HAVE_ZLIB
 #endif  // HAVE_ZLIB
@@ -422,7 +422,7 @@ save_file(const Filename &filename, const LoaderOptions &options,
     }
     }
     return false;
     return false;
 
 
-  } else if (pz_file && !requested_type->supports_compressed()) {
+  } else if (compressed && !requested_type->supports_compressed()) {
     if (report_errors) {
     if (report_errors) {
       loader_cat.error()
       loader_cat.error()
         << requested_type->get_name() << " file type (."
         << requested_type->get_name() << " file type (."

+ 1 - 1
panda/src/pgraph/loaderFileType.cxx

@@ -48,7 +48,7 @@ get_additional_extensions() const {
 
 
 /**
 /**
  * Returns true if this file type can transparently load compressed files
  * Returns true if this file type can transparently load compressed files
- * (with a .pz extension), false otherwise.
+ * (with a .pz or .gz extension), false otherwise.
  */
  */
 bool LoaderFileType::
 bool LoaderFileType::
 supports_compressed() const {
 supports_compressed() const {

+ 1 - 1
panda/src/pgraph/loaderFileTypeBam.cxx

@@ -47,7 +47,7 @@ get_extension() const {
 
 
 /**
 /**
  * Returns true if this file type can transparently load compressed files
  * Returns true if this file type can transparently load compressed files
- * (with a .pz extension), false otherwise.
+ * (with a .pz or .gz extension), false otherwise.
  */
  */
 bool LoaderFileTypeBam::
 bool LoaderFileTypeBam::
 supports_compressed() const {
 supports_compressed() const {

+ 9 - 2
panda/src/pgraph/occluderEffect.cxx

@@ -146,10 +146,17 @@ write_datagram(BamWriter *manager, Datagram &dg) {
 
 
   // write the number of on occluders
   // write the number of on occluders
   dg.add_uint16(get_num_on_occluders());
   dg.add_uint16(get_num_on_occluders());
+
   // write the on occluders pointers if any
   // write the on occluders pointers if any
   Occluders::const_iterator nti;
   Occluders::const_iterator nti;
-  for (nti = _on_occluders.begin(); nti != _on_occluders.end(); ++nti) {
-    (*nti).write_datagram(manager, dg);
+  if (manager->get_file_minor_ver() < 40) {
+    for (nti = _on_occluders.begin(); nti != _on_occluders.end(); ++nti) {
+      manager->write_pointer(dg, nti->node());
+    }
+  } else {
+    for (nti = _on_occluders.begin(); nti != _on_occluders.end(); ++nti) {
+      (*nti).write_datagram(manager, dg);
+    }
   }
   }
 }
 }
 
 

+ 12 - 1
panda/src/pgraph/paramNodePath.cxx

@@ -40,7 +40,18 @@ register_with_read_factory() {
 void ParamNodePath::
 void ParamNodePath::
 write_datagram(BamWriter *manager, Datagram &dg) {
 write_datagram(BamWriter *manager, Datagram &dg) {
   ParamValueBase::write_datagram(manager, dg);
   ParamValueBase::write_datagram(manager, dg);
-  _node_path.write_datagram(manager, dg);
+
+  if (manager->get_file_minor_ver() < 40) {
+    // Before bam 6.40, we did not support writing NodePaths.  Instaed, we
+    // write the PandaNode pointer and pray there is an unambiguous path.
+    if (_node_path.is_empty()) {
+      manager->write_pointer(dg, NULL);
+    } else {
+      manager->write_pointer(dg, _node_path.node());
+    }
+  } else {
+    _node_path.write_datagram(manager, dg);
+  }
 }
 }
 
 
 /**
 /**

+ 3 - 1
panda/src/pgraph/scissorAttrib.cxx

@@ -177,7 +177,9 @@ write_datagram(BamWriter *manager, Datagram &dg) {
   RenderAttrib::write_datagram(manager, dg);
   RenderAttrib::write_datagram(manager, dg);
 
 
   _frame.write_datagram(dg);
   _frame.write_datagram(dg);
-  dg.add_bool(_off);
+  if (manager->get_file_minor_ver() >= 34) {
+    dg.add_bool(_off);
+  }
 }
 }
 
 
 /**
 /**

+ 20 - 2
panda/src/pgraph/stencilAttrib.cxx

@@ -338,8 +338,26 @@ void StencilAttrib::
 write_datagram(BamWriter *manager, Datagram &dg) {
 write_datagram(BamWriter *manager, Datagram &dg) {
   RenderAttrib::write_datagram(manager, dg);
   RenderAttrib::write_datagram(manager, dg);
 
 
-  for (int index = 0; index < SRS_total; ++index) {
-    dg.add_uint32(_stencil_render_states[index]);
+  if (manager->get_file_minor_ver() < 35) {
+    dg.add_int32(_stencil_render_states[SRS_front_comparison_function] != M_none);
+    dg.add_int32(_stencil_render_states[SRS_back_comparison_function] != M_none);
+
+    for (int index = 0; index < SRS_total; ++index) {
+      if (index == SRS_front_comparison_function ||
+          index == SRS_back_comparison_function) {
+        if (_stencil_render_states[index] == M_none) {
+          dg.add_uint32(7);
+        } else {
+          dg.add_uint32(_stencil_render_states[index] - 1);
+        }
+      } else {
+        dg.add_uint32(_stencil_render_states[index]);
+      }
+    }
+  } else {
+    for (int index = 0; index < SRS_total; ++index) {
+      dg.add_uint32(_stencil_render_states[index]);
+    }
   }
   }
 }
 }
 
 

+ 4 - 1
panda/src/pgraph/texMatrixAttrib.cxx

@@ -461,7 +461,10 @@ write_datagram(BamWriter *manager, Datagram &dg) {
 
 
     manager->write_pointer(dg, sn._stage);
     manager->write_pointer(dg, sn._stage);
     manager->write_pointer(dg, sn._transform);
     manager->write_pointer(dg, sn._transform);
-    dg.add_int32(sn._override);
+
+    if (manager->get_file_minor_ver() >= 24) {
+      dg.add_int32(sn._override);
+    }
   }
   }
 }
 }
 
 

+ 10 - 4
panda/src/pgraph/textureAttrib.cxx

@@ -778,10 +778,16 @@ write_datagram(BamWriter *manager, Datagram &dg) {
     manager->write_pointer(dg, stage);
     manager->write_pointer(dg, stage);
     manager->write_pointer(dg, tex);
     manager->write_pointer(dg, tex);
     dg.add_uint16((*si)._implicit_sort);
     dg.add_uint16((*si)._implicit_sort);
-    dg.add_int32((*si)._override);
-    dg.add_bool((*si)._has_sampler);
-    if ((*si)._has_sampler) {
-      (*si)._sampler.write_datagram(dg);
+
+    if (manager->get_file_minor_ver() >= 23) {
+      dg.add_int32((*si)._override);
+    }
+
+    if (manager->get_file_minor_ver() >= 36) {
+      dg.add_bool((*si)._has_sampler);
+      if ((*si)._has_sampler) {
+        (*si)._sampler.write_datagram(dg);
+      }
     }
     }
   }
   }
 }
 }

+ 3 - 1
panda/src/pgraphnodes/directionalLight.cxx

@@ -167,7 +167,9 @@ register_with_read_factory() {
 void DirectionalLight::
 void DirectionalLight::
 write_datagram(BamWriter *manager, Datagram &dg) {
 write_datagram(BamWriter *manager, Datagram &dg) {
   LightLensNode::write_datagram(manager, dg);
   LightLensNode::write_datagram(manager, dg);
-  dg.add_bool(_has_specular_color);
+  if (manager->get_file_minor_ver() >= 39) {
+    dg.add_bool(_has_specular_color);
+  }
   manager->write_cdata(dg, _cycler);
   manager->write_cdata(dg, _cycler);
 }
 }
 
 

+ 3 - 1
panda/src/pgraphnodes/pointLight.cxx

@@ -196,7 +196,9 @@ register_with_read_factory() {
 void PointLight::
 void PointLight::
 write_datagram(BamWriter *manager, Datagram &dg) {
 write_datagram(BamWriter *manager, Datagram &dg) {
   LightLensNode::write_datagram(manager, dg);
   LightLensNode::write_datagram(manager, dg);
-  dg.add_bool(_has_specular_color);
+  if (manager->get_file_minor_ver() >= 39) {
+    dg.add_bool(_has_specular_color);
+  }
   manager->write_cdata(dg, _cycler);
   manager->write_cdata(dg, _cycler);
 }
 }
 
 

+ 3 - 1
panda/src/pgraphnodes/spotlight.cxx

@@ -252,7 +252,9 @@ register_with_read_factory() {
 void Spotlight::
 void Spotlight::
 write_datagram(BamWriter *manager, Datagram &dg) {
 write_datagram(BamWriter *manager, Datagram &dg) {
   LightLensNode::write_datagram(manager, dg);
   LightLensNode::write_datagram(manager, dg);
-  dg.add_bool(_has_specular_color);
+  if (manager->get_file_minor_ver() >= 39) {
+    dg.add_bool(_has_specular_color);
+  }
   manager->write_cdata(dg, _cycler);
   manager->write_cdata(dg, _cycler);
 }
 }
 
 

+ 6 - 2
panda/src/pgraphnodes/uvScrollNode.cxx

@@ -53,8 +53,12 @@ write_datagram(BamWriter *manager, Datagram &dg) {
   PandaNode::write_datagram(manager, dg);
   PandaNode::write_datagram(manager, dg);
   dg.add_stdfloat(_u_speed);
   dg.add_stdfloat(_u_speed);
   dg.add_stdfloat(_v_speed);
   dg.add_stdfloat(_v_speed);
-  dg.add_stdfloat(_w_speed);
-  dg.add_stdfloat(_r_speed);
+  if (manager->get_file_minor_ver() >= 33) {
+    dg.add_stdfloat(_w_speed);
+  }
+  if (manager->get_file_minor_ver() >= 22) {
+    dg.add_stdfloat(_r_speed);
+  }
 }
 }
 
 
 /**
 /**

+ 1 - 1
panda/src/pnmimage/pnmFileTypeRegistry.cxx

@@ -127,7 +127,7 @@ get_type_from_extension(const string &filename) const {
   }
   }
 
 
 #ifdef HAVE_ZLIB
 #ifdef HAVE_ZLIB
-  if (extension == "pz") {
+  if (extension == "pz" || extension == "gz") {
     // If the extension is .pz, then we've got a Panda-compressed image file.
     // If the extension is .pz, then we've got a Panda-compressed image file.
     // Back up some more and get the extension before that.
     // Back up some more and get the extension before that.
     size_t prev_dot = filename.rfind('.', dot - 1);
     size_t prev_dot = filename.rfind('.', dot - 1);

+ 2 - 1
panda/src/pnmimage/pnmImageHeader.cxx

@@ -181,7 +181,8 @@ make_reader(istream *file, bool owns_file, const Filename &filename,
           << type->get_name() << ".\n";
           << type->get_name() << ".\n";
       } else {
       } else {
         pnmimage_cat.debug()
         pnmimage_cat.debug()
-          << "Unable to guess image file type from its extension.\n";
+          << "Unable to guess image file type from its extension ("
+          << filename.get_extension() << ").\n";
       }
       }
     }
     }
   }
   }

+ 2 - 2
panda/src/pnmimagetypes/pnmFileTypeStbImage.cxx

@@ -276,7 +276,7 @@ read_pfm(PfmFile &pfm) {
 
 
   // Reposition the file at the beginning.
   // Reposition the file at the beginning.
   _file->seekg(0, ios::beg);
   _file->seekg(0, ios::beg);
-  if (_file->tellg() != 0) {
+  if (_file->tellg() != (streampos)0) {
     pnmimage_cat.error()
     pnmimage_cat.error()
       << "Could not reposition file pointer to the beginning.\n";
       << "Could not reposition file pointer to the beginning.\n";
     return false;
     return false;
@@ -427,7 +427,7 @@ int StbImageReader::
 read_data(xel *array, xelval *alpha) {
 read_data(xel *array, xelval *alpha) {
   // Reposition the file at the beginning.
   // Reposition the file at the beginning.
   _file->seekg(0, ios::beg);
   _file->seekg(0, ios::beg);
-  if (_file->tellg() != 0) {
+  if (_file->tellg() != (streampos)0) {
     pnmimage_cat.error()
     pnmimage_cat.error()
       << "Could not reposition file pointer to the beginning.\n";
       << "Could not reposition file pointer to the beginning.\n";
     return 0;
     return 0;

+ 10 - 0
panda/src/putil/bamWriter.I

@@ -42,6 +42,16 @@ get_file_major_ver() const {
   return _file_major;
   return _file_major;
 }
 }
 
 
+/**
+ * Changes the minor .bam version to write.  This should be called before
+ * init().  Each Panda version has only a fairly narrow range of versions it
+ * is able to write; consult the .bam documentation for more information.
+ */
+INLINE void BamWriter::
+set_file_minor_ver(int minor_ver) {
+  _file_minor = minor_ver;
+}
+
 /**
 /**
  * Returns the minor version number of the Bam file currently being written.
  * Returns the minor version number of the Bam file currently being written.
  */
  */

+ 48 - 7
panda/src/putil/bamWriter.cxx

@@ -41,8 +41,43 @@ BamWriter(DatagramSink *target) :
   _next_pta_id = 1;
   _next_pta_id = 1;
   _long_pta_id = false;
   _long_pta_id = false;
 
 
-  _file_major = _bam_major_ver;
-  _file_minor = _bam_minor_ver;
+  // Check which version .bam files we should write.
+  if (bam_version.get_num_words() > 0) {
+    if (bam_version.get_num_words() != 2) {
+      util_cat.error()
+        << "bam-version configuration variable requires two arguments.\n";
+    }
+    _file_major = bam_version[0];
+    _file_minor = bam_version[1];
+
+    if (_file_major < _bam_major_ver || _file_minor < 21) {
+      util_cat.error()
+        << "bam-version is set to " << bam_version << ", but this version of "
+           "Panda3D cannot produce .bam files older than 6.21.  Set "
+           "bam-version to 6 21 in Config.prc to suppress this error, or "
+           "leave it blank to write version " << _bam_major_ver << "."
+           << _bam_minor_ver << " files.\n";
+      _file_major = 6;
+      _file_minor = 21;
+      bam_version.set_string_value("6 21");
+
+    } else if (_file_major > _bam_major_ver || _file_minor > _bam_minor_ver) {
+      util_cat.error()
+        << "bam-version is set to " << bam_version << ", but this version of "
+           "Panda3D cannot produce .bam files newer than " << _bam_major_ver
+        << "." << _bam_minor_ver << ".  Set bam-version to a supported "
+           "version or leave it blank to write version " << _bam_major_ver
+        << "." << _bam_minor_ver << " files.\n";
+
+      _file_major = _bam_major_ver;
+      _file_minor = _bam_minor_ver;
+      bam_version.set_word(0, _bam_major_ver);
+      bam_version.set_word(1, _bam_minor_ver);
+    }
+  } else {
+    _file_major = _bam_major_ver;
+    _file_minor = _bam_minor_ver;
+  }
   _file_endian = bam_endian;
   _file_endian = bam_endian;
   _file_stdfloat_double = bam_stdfloat_double;
   _file_stdfloat_double = bam_stdfloat_double;
   _file_texture_mode = bam_texture_mode;
   _file_texture_mode = bam_texture_mode;
@@ -98,18 +133,24 @@ init() {
   _next_pta_id = 1;
   _next_pta_id = 1;
   _long_pta_id = false;
   _long_pta_id = false;
 
 
-  _file_major = _bam_major_ver;
-  _file_minor = _bam_minor_ver;
+  nassertr_always(_file_major == _bam_major_ver, false);
+  nassertr_always(_file_minor <= _bam_minor_ver && _file_minor >= 21, false);
+
   _file_endian = bam_endian;
   _file_endian = bam_endian;
   _file_texture_mode = bam_texture_mode;
   _file_texture_mode = bam_texture_mode;
 
 
   // Write out the current major and minor BAM file version numbers.
   // Write out the current major and minor BAM file version numbers.
   Datagram header;
   Datagram header;
 
 
-  header.add_uint16(_bam_major_ver);
-  header.add_uint16(_bam_minor_ver);
+  header.add_uint16(_file_major);
+  header.add_uint16(_file_minor);
   header.add_uint8(_file_endian);
   header.add_uint8(_file_endian);
-  header.add_bool(_file_stdfloat_double);
+
+  if (_file_major >= 6 || _file_minor >= 27) {
+    header.add_bool(_file_stdfloat_double);
+  } else {
+    _file_stdfloat_double = false;
+  }
 
 
   if (!_target->put_datagram(header)) {
   if (!_target->put_datagram(header)) {
     util_cat.error()
     util_cat.error()

+ 1 - 0
panda/src/putil/bamWriter.h

@@ -76,6 +76,7 @@ PUBLISHED:
 
 
   INLINE int get_file_major_ver() const;
   INLINE int get_file_major_ver() const;
   INLINE int get_file_minor_ver() const;
   INLINE int get_file_minor_ver() const;
+  INLINE void set_file_minor_ver(int minor_ver);
 
 
   INLINE BamEndian get_file_endian() const;
   INLINE BamEndian get_file_endian() const;
   INLINE bool get_file_stdfloat_double() const;
   INLINE bool get_file_stdfloat_double() const;

+ 6 - 0
panda/src/putil/config_util.cxx

@@ -51,6 +51,12 @@ ConfigureDef(config_util);
 NotifyCategoryDef(util, "");
 NotifyCategoryDef(util, "");
 NotifyCategoryDef(bam, util_cat);
 NotifyCategoryDef(bam, util_cat);
 
 
+ConfigVariableInt bam_version
+("bam-version", "",
+ PRC_DESC("Set this to specify which version .bam files to generate.  Each "
+          "Panda version only supports outputting a limited number of .bam "
+          "versions.  The default is to use the latest supported version."));
+
 ConfigVariableEnum<BamEnums::BamEndian> bam_endian
 ConfigVariableEnum<BamEnums::BamEndian> bam_endian
 ("bam-endian", BamEnums::BE_native,
 ("bam-endian", BamEnums::BE_native,
  PRC_DESC("The default endianness to use for writing major numeric data "
  PRC_DESC("The default endianness to use for writing major numeric data "

+ 1 - 0
panda/src/putil/config_util.h

@@ -33,6 +33,7 @@ NotifyCategoryDecl(bam, EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL);
 // a global constant, we'll make it a member of MemoryUsage.  extern
 // a global constant, we'll make it a member of MemoryUsage.  extern
 // EXPCL_PANDA_PUTIL const bool track_memory_usage;
 // EXPCL_PANDA_PUTIL const bool track_memory_usage;
 
 
+extern EXPCL_PANDA_PUTIL ConfigVariableInt bam_version;
 extern EXPCL_PANDA_PUTIL ConfigVariableEnum<BamEnums::BamEndian> bam_endian;
 extern EXPCL_PANDA_PUTIL ConfigVariableEnum<BamEnums::BamEndian> bam_endian;
 extern EXPCL_PANDA_PUTIL ConfigVariableBool bam_stdfloat_double;
 extern EXPCL_PANDA_PUTIL ConfigVariableBool bam_stdfloat_double;
 extern EXPCL_PANDA_PUTIL ConfigVariableEnum<BamEnums::BamTextureMode> bam_texture_mode;
 extern EXPCL_PANDA_PUTIL ConfigVariableEnum<BamEnums::BamTextureMode> bam_texture_mode;

+ 1 - 1
panda/src/speedtree/loaderFileTypeSrt.cxx

@@ -42,7 +42,7 @@ get_extension() const {
 
 
 /**
 /**
  * Returns true if this file type can transparently load compressed files
  * Returns true if this file type can transparently load compressed files
- * (with a .pz extension), false otherwise.
+ * (with a .pz or .gz extension), false otherwise.
  */
  */
 bool LoaderFileTypeSrt::
 bool LoaderFileTypeSrt::
 supports_compressed() const {
 supports_compressed() const {

+ 1 - 1
panda/src/speedtree/loaderFileTypeStf.cxx

@@ -41,7 +41,7 @@ get_extension() const {
 
 
 /**
 /**
  * Returns true if this file type can transparently load compressed files
  * Returns true if this file type can transparently load compressed files
- * (with a .pz extension), false otherwise.
+ * (with a .pz or .gz extension), false otherwise.
  */
  */
 bool LoaderFileTypeStf::
 bool LoaderFileTypeStf::
 supports_compressed() const {
 supports_compressed() const {

+ 1 - 1
pandatool/src/assimp/loaderFileTypeAssimp.cxx

@@ -63,7 +63,7 @@ get_additional_extensions() const {
 
 
 /**
 /**
  * Returns true if this file type can transparently load compressed files
  * Returns true if this file type can transparently load compressed files
- * (with a .pz extension), false otherwise.
+ * (with a .pz or .gz extension), false otherwise.
  */
  */
 bool LoaderFileTypeAssimp::
 bool LoaderFileTypeAssimp::
 supports_compressed() const {
 supports_compressed() const {

+ 1 - 1
pandatool/src/ptloader/loaderFileTypePandatool.cxx

@@ -80,7 +80,7 @@ get_additional_extensions() const {
 
 
 /**
 /**
  * Returns true if this file type can transparently load compressed files
  * Returns true if this file type can transparently load compressed files
- * (with a .pz extension), false otherwise.
+ * (with a .pz or .gz extension), false otherwise.
  */
  */
 bool LoaderFileTypePandatool::
 bool LoaderFileTypePandatool::
 supports_compressed() const {
 supports_compressed() const {