Browse Source

display: prefer 24-bit depth buffer on Intel over 16-bit

rdb 8 years ago
parent
commit
84520ce21c
1 changed files with 6 additions and 2 deletions
  1. 6 2
      panda/src/display/frameBufferProperties.cxx

+ 6 - 2
panda/src/display/frameBufferProperties.cxx

@@ -581,9 +581,13 @@ get_quality(const FrameBufferProperties &reqs) const {
     }
   }
 
-  // Bonus for each depth bit.  Extra: 2 per bit.
+  // Bonus for each depth bit.  Extra: 8 per bit.
+  // Please note that the Intel Windows driver only gives extra depth in
+  // combination with a stencil buffer, so we need 8 extra depth bits to
+  // outweigh the penalty of 50 for the unwanted stencil buffer, otherwise we
+  // will end up only getting 16-bit depth.
   if (reqs._property[FBP_depth_bits] != 0) {
-    quality += 2 * _property[FBP_depth_bits];
+    quality += 8 * _property[FBP_depth_bits];
   }
 
   // Bonus for each multisample.  Extra: 2 per sample.