Browse Source

Merge branch 'release/1.9.x'

Conflicts:
	makepanda/makepandacore.py
	panda/src/cocoadisplay/cocoaGraphicsStateGuardian.mm
rdb 9 years ago
parent
commit
365e1d53ef

+ 1 - 0
doc/ReleaseNotes

@@ -15,6 +15,7 @@ This issue fixes several bugs that were still found in 1.9.2.
 * Work around GLSL issue with #pragma and certain Intel drivers
 * Work around GLSL issue with #pragma and certain Intel drivers
 * Improve performance of texture load and store operations
 * Improve performance of texture load and store operations
 * Fix crashes with pbuffers on Intel cards on Windows
 * Fix crashes with pbuffers on Intel cards on Windows
+* Support for Autodesk Maya 2016.5
 
 
 ------------------------  RELEASE 1.9.2  ------------------------
 ------------------------  RELEASE 1.9.2  ------------------------
 
 

+ 20 - 0
panda/src/cocoadisplay/cocoaGraphicsStateGuardian.mm

@@ -97,6 +97,26 @@ get_properties(FrameBufferProperties &properties, NSOpenGLPixelFormat* pixel_for
   }
   }
   // TODO: add aux buffers
   // TODO: add aux buffers
 
 
+  // Cocoa doesn't provide individual RGB bits.  Make assumptions.
+  // Note that color_size seems to be returning values like 32, which
+  // suggests that it contains the alpha size as well.
+
+  if (color_size == 24 || color_size == 32) {
+    properties.set_rgba_bits(8, 8, 8, alpha_size);
+
+  } else if (color_size == 64) {
+    properties.set_rgba_bits(16, 16, 16, alpha_size);
+
+  } else if (color_size == 128) {
+    properties.set_rgba_bits(32, 32, 32, alpha_size);
+
+  } else if (color_size >= 3) {
+    // Assume it's giving us at least one of each.
+    properties.set_red_bits(1);
+    properties.set_green_bits(1);
+    properties.set_blue_bits(1);
+  }
+
   // Extract the renderer ID bits and check if our renderer matches the known
   // Extract the renderer ID bits and check if our renderer matches the known
   // software renderers.
   // software renderers.
   renderer_id &= kCGLRendererIDMatchingMask;
   renderer_id &= kCGLRendererIDMatchingMask;

+ 3 - 2
pandatool/src/maya/mayaApi.cxx

@@ -184,9 +184,10 @@ open_api(string program_name, bool view_license, bool revertdir) {
 
 
       size_t dot2 = runtime_version.find('.', dot1 + 1);
       size_t dot2 = runtime_version.find('.', dot1 + 1);
       if (dot2 == string::npos) {
       if (dot2 == string::npos) {
-        rtver_b = 0;
+        string_to_int(runtime_version.substr(dot1 + 1), rtver_b);
+
       } else {
       } else {
-        string_to_int(runtime_version.substr(dot1, dot2 - dot1), rtver_b);
+        string_to_int(runtime_version.substr(dot1 + 1, dot2 - dot1 - 1), rtver_b);
         simple_runtime_version = runtime_version.substr(0, dot2);
         simple_runtime_version = runtime_version.substr(0, dot2);
       }
       }
     }
     }

+ 6 - 2
pandatool/src/maya/pre_maya_include.h

@@ -61,8 +61,12 @@ typedef istream maya_istream;
 #endif  // PHAVE_IOSTREAM
 #endif  // PHAVE_IOSTREAM
 
 
 #ifdef __MACH__
 #ifdef __MACH__
-#undef _BOOL
-#include "maya/OpenMayaMac.h"
+#define OSMac_ 1
+// This defines MAYA_API_VERSION
+#include <maya/MTypes.h>
+#if MAYA_API_VERSION < 201600
+#include <maya/OpenMayaMac.h>
+#endif
 #endif
 #endif
 
 
 #endif  // MAYA_PRE_5_0
 #endif  // MAYA_PRE_5_0

+ 6 - 2
pandatool/src/mayaprogs/mayaSavePview.h

@@ -25,8 +25,12 @@
 #endif
 #endif
 
 
 #ifdef __MACH__
 #ifdef __MACH__
-#undef _BOOL
-#include "maya/OpenMayaMac.h"
+#define OSMac_ 1
+// This defines MAYA_API_VERSION
+#include <maya/MTypes.h>
+#if MAYA_API_VERSION < 201600
+#include <maya/OpenMayaMac.h>
+#endif
 #endif
 #endif
 
 
 // Even though we don't include any Panda headers, it's safe to include this
 // Even though we don't include any Panda headers, it's safe to include this