Browse Source

Merge branch 'release/1.10.x'

rdb 6 years ago
parent
commit
a8a775ad09

+ 11 - 10
README.md

@@ -52,11 +52,11 @@ Building Panda3D
 Windows
 Windows
 -------
 -------
 
 
-You can build Panda3D with the Microsoft Visual C++ 2015 or 2017 compiler,
+You can build Panda3D with the Microsoft Visual C++ 2015, 2017 or 2019 compiler,
 which can be downloaded for free from the [Visual Studio site](https://visualstudio.microsoft.com/downloads/).
 which can be downloaded for free from the [Visual Studio site](https://visualstudio.microsoft.com/downloads/).
 You will also need to install the [Windows 10 SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk),
 You will also need to install the [Windows 10 SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk),
-and if you intend to target Windows XP, you will also need the
-[Windows 7.1 SDK](https://www.microsoft.com/en-us/download/details.aspx?id=8279).
+and if you intend to target Windows XP, you will also need the Windows 7.1A
+SDK (which can be installed from the Visual Studio Installer).
 
 
 You will also need to have the third-party dependency libraries available for
 You will also need to have the third-party dependency libraries available for
 the build scripts to use.  These are available from one of these two URLs,
 the build scripts to use.  These are available from one of these two URLs,
@@ -64,16 +64,17 @@ depending on whether you are on a 32-bit or 64-bit system, or you can
 [click here](https://github.com/rdb/panda3d-thirdparty) for instructions on
 [click here](https://github.com/rdb/panda3d-thirdparty) for instructions on
 building them from source.
 building them from source.
 
 
-https://www.panda3d.org/download/panda3d-1.10.4.1/panda3d-1.10.4.1-tools-win64.zip
-https://www.panda3d.org/download/panda3d-1.10.4.1/panda3d-1.10.4.1-tools-win32.zip
+- https://www.panda3d.org/download/panda3d-1.10.5/panda3d-1.10.5-tools-win64.zip
+- https://www.panda3d.org/download/panda3d-1.10.5/panda3d-1.10.5-tools-win32.zip
 
 
-After acquiring these dependencies, you may simply build Panda3D from the
-command prompt using the following command.  (Change `14.1` to `14` if you are
-using Visual C++ 2015 instead of 2017.  Add the `--windows-sdk=10` option if
-you don't need to support Windows XP and did not install the Windows 7.1 SDK.)
+After acquiring these dependencies, you can build Panda3D from the command
+prompt using the following command.  Change the `--msvc-version` option based
+on your version of Visual C++; 2019 is 14.2, 2017 is 14.1, and 2015 is 14.
+Remove the `--windows-sdk=10` option if you need to support Windows XP, which
+requires the Windows 7.1A SDK.
 
 
 ```bash
 ```bash
-makepanda\makepanda.bat --everything --installer --msvc-version=14.1 --no-eigen --threads=2
+makepanda\makepanda.bat --everything --installer --msvc-version=14.2 --windows-sdk=10 --no-eigen --threads=2
 ```
 ```
 
 
 When the build succeeds, it will produce an .exe file that you can use to
 When the build succeeds, it will produce an .exe file that you can use to

+ 1 - 1
direct/src/tkpanels/AnimPanel.py

@@ -276,7 +276,7 @@ class AnimPanel(AppShell):
             title = 'Load Animation',
             title = 'Load Animation',
             parent = self.component('hull')
             parent = self.component('hull')
             )
             )
-        if not animFilename:
+        if not animFilename or animFilename == 'None':
             # no file selected, canceled
             # no file selected, canceled
             return
             return
 
 

+ 1 - 1
direct/src/tkpanels/MopathRecorder.py

@@ -1638,7 +1638,7 @@ class MopathRecorder(AppShell, DirectObject):
             initialdir = path,
             initialdir = path,
             title = 'Load Nurbs Curve',
             title = 'Load Nurbs Curve',
             parent = self.parent)
             parent = self.parent)
-        if mopathFilename:
+        if mopathFilename and mopathFilename != 'None':
             self.reset()
             self.reset()
             nodePath = loader.loadModel(
             nodePath = loader.loadModel(
                 Filename.fromOsSpecific(mopathFilename))
                 Filename.fromOsSpecific(mopathFilename))

+ 1 - 1
direct/src/tkpanels/ParticlePanel.py

@@ -1272,7 +1272,7 @@ class ParticlePanel(AppShell):
             initialdir = path,
             initialdir = path,
             title = 'Load Particle Effect',
             title = 'Load Particle Effect',
             parent = self.parent)
             parent = self.parent)
-        if particleFilename:
+        if particleFilename and particleFilename != 'None':
             # Delete existing particles and forces
             # Delete existing particles and forces
             self.particleEffect.loadConfig(
             self.particleEffect.loadConfig(
                 Filename.fromOsSpecific(particleFilename))
                 Filename.fromOsSpecific(particleFilename))

+ 4 - 2
panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx

@@ -615,8 +615,10 @@ release_vertex_buffer(VertexBufferContext *vbc) {
   }
   }
   #endif
   #endif
 
 
-  dvbc->_vbuffer->Release();
-  dvbc->_vbuffer = nullptr;
+  if (dvbc->_vbuffer != nullptr) {
+    dvbc->_vbuffer->Release();
+    dvbc->_vbuffer = nullptr;
+  }
 
 
   delete dvbc;
   delete dvbc;
 }
 }

+ 5 - 0
panda/src/gobj/material.cxx

@@ -544,6 +544,11 @@ fillin(DatagramIterator &scan, BamReader *manager) {
     }
     }
     _refractive_index = scan.get_stdfloat();
     _refractive_index = scan.get_stdfloat();
 
 
+    if ((_flags & (F_base_color | F_metallic)) == (F_base_color | F_metallic)) {
+      // Compute the ambient, diffuse and specular settings.
+      set_base_color(_base_color);
+    }
+
   } else {
   } else {
     _ambient.read_datagram(scan);
     _ambient.read_datagram(scan);
     _diffuse.read_datagram(scan);
     _diffuse.read_datagram(scan);

+ 1 - 1
panda/src/grutil/lineSegs.I

@@ -99,7 +99,7 @@ draw_to(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z) {
  * Creates a new GeomNode that will render the series of line segments and
  * Creates a new GeomNode that will render the series of line segments and
  * points described via calls to move_to() and draw_to().  The lines and
  * points described via calls to move_to() and draw_to().  The lines and
  * points are created with the color and thickness established by calls to
  * points are created with the color and thickness established by calls to
- * set_color() and set_thick().
+ * set_color() and set_thickness().
  *
  *
  * If dynamic is true, the line segments will be created with the dynamic Geom
  * If dynamic is true, the line segments will be created with the dynamic Geom
  * setting, optimizing them for runtime vertex animation.
  * setting, optimizing them for runtime vertex animation.

+ 1 - 1
panda/src/grutil/lineSegs.cxx

@@ -164,7 +164,7 @@ get_current_position() {
  * Appends to an existing GeomNode a new Geom that will render the series of
  * Appends to an existing GeomNode a new Geom that will render the series of
  * line segments and points described via calls to move_to() and draw_to().
  * line segments and points described via calls to move_to() and draw_to().
  * The lines and points are created with the color and thickness established
  * The lines and points are created with the color and thickness established
- * by calls to set_color() and set_thick().
+ * by calls to set_color() and set_thickness().
  *
  *
  * If dynamic is true, the line segments will be created with the dynamic Geom
  * If dynamic is true, the line segments will be created with the dynamic Geom
  * setting, optimizing them for runtime vertex animation.
  * setting, optimizing them for runtime vertex animation.

+ 13 - 1
panda/src/pgraph/shaderInput.I

@@ -490,7 +490,19 @@ operator < (const ShaderInput &other) const {
     return false;
     return false;
 
 
   case M_vector:
   case M_vector:
-    return _stored_vector < other._stored_vector;
+    if (_stored_vector[0] != other._stored_vector[0]) {
+      return _stored_vector[0] < other._stored_vector[0];
+    }
+    if (_stored_vector[1] != other._stored_vector[1]) {
+      return _stored_vector[1] < other._stored_vector[1];
+    }
+    if (_stored_vector[2] != other._stored_vector[2]) {
+      return _stored_vector[2] < other._stored_vector[2];
+    }
+    if (_stored_vector[3] != other._stored_vector[3]) {
+      return _stored_vector[3] < other._stored_vector[3];
+    }
+    return false;
 
 
   case M_numeric:
   case M_numeric:
     return _stored_ptr._ptr < other._stored_ptr._ptr;
     return _stored_ptr._ptr < other._stored_ptr._ptr;

+ 32 - 0
tests/pgraph/test_shaderinput.py

@@ -0,0 +1,32 @@
+from panda3d.core import ShaderInput, Vec4
+
+
+def test_shaderinput_vector_compare():
+    i0 = ShaderInput('a', Vec4(0, 0, 0, 0))
+    i1 = ShaderInput('a', Vec4(1e-9, 0, 0, 0))
+    i2 = ShaderInput('a', Vec4(1e-8, 0, 0, 0))
+    i3 = ShaderInput('a', Vec4(2, 0, 0, 0))
+
+    assert i0 == i0
+    assert i1 == i1
+    assert i2 == i2
+    assert i3 == i3
+
+    assert i0 != i1
+    assert i0 != i2
+    assert i0 != i3
+    assert i1 != i2
+    assert i2 != i3
+    assert i1 != i3
+
+    assert not i0 < i0
+    assert not i1 < i1
+    assert not i2 < i2
+    assert not i3 < i3
+
+    assert i0 < i1
+    assert i0 < i2
+    assert i0 < i3
+    assert i1 < i2
+    assert i2 < i3
+    assert i1 < i3