Commit: 2eddfa85e00d9efa7571721e605a331ca4cd5bc6
Author: Clément Foucault
Date:   Sun Aug 16 02:03:02 2020 +0200
Branches: master
https://developer.blender.org/rB2eddfa85e00d9efa7571721e605a331ca4cd5bc6

Cleanup: GPU: Remove uneeded depth precision getter.

We always use 24bit framebuffers nowadays.

===================================================================

M       source/blender/gpu/intern/gpu_matrix.cc

===================================================================

diff --git a/source/blender/gpu/intern/gpu_matrix.cc 
b/source/blender/gpu/intern/gpu_matrix.cc
index c9bb7e9dad9..951652b9393 100644
--- a/source/blender/gpu/intern/gpu_matrix.cc
+++ b/source/blender/gpu/intern/gpu_matrix.cc
@@ -732,8 +732,8 @@ float GPU_polygon_offset_calc(const float (*winmat)[4], 
float viewdist, float di
 #else
     static float depth_fac = 0.0f;
     if (depth_fac == 0.0f) {
-      int depthbits;
-      glGetIntegerv(GL_DEPTH_BITS, &depthbits);
+      /* Hardcode for 24 bit precision. */
+      int depthbits = 24;
       depth_fac = 1.0f / (float)((1 << depthbits) - 1);
     }
     offs = (-1.0 / winmat[2][2]) * dist * depth_fac;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to