فهرست منبع

no bonus for unrequested bits

David Rose 17 سال پیش
والد
کامیت
ea1f1d632d
1فایلهای تغییر یافته به همراه11 افزوده شده و 5 حذف شده
  1. 11 5
      panda/src/display/frameBufferProperties.cxx

+ 11 - 5
panda/src/display/frameBufferProperties.cxx

@@ -518,17 +518,23 @@ get_quality(const FrameBufferProperties &reqs) const {
   }
 
   // Bonus for each depth bit.
-  // Extra: 3 per bit.
-  quality += 3 * _property[FBP_depth_bits];
+  // Extra: 2 per bit.
+  if (reqs._property[FBP_depth_bits] != 0) {
+    quality += 2 * _property[FBP_depth_bits];
+  }
 
-  // Bonus for each multisamples.
+  // Bonus for each multisample.
   // Extra: 2 per sample.
-  quality += 2 * _property[FBP_multisamples];
+  if (reqs._property[FBP_multisamples] != 0) {
+    quality += 2 * _property[FBP_multisamples];
+  }
 
   // Bonus for each color, alpha, stencil, and accum.
   // Extra: 1 per bit.
   for (int prop=FBP_color_bits; prop<=FBP_accum_bits; prop++) {
-    quality += _property[prop];
+    if (reqs._property[prop] != 0) {
+      quality += _property[prop];
+    }
   }
   
   return quality;