diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-08-16 03:03:02 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-08-18 22:30:10 +0300 |
commit | 2eddfa85e00d9efa7571721e605a331ca4cd5bc6 (patch) | |
tree | d6aa2502ff3f19d7ee02fbfaac2446828f68e91d /source | |
parent | 0f292dc07265db181bd3ec13f12c48fee755f5b5 (diff) |
Cleanup: GPU: Remove uneeded depth precision getter.
We always use 24bit framebuffers nowadays.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/gpu/intern/gpu_matrix.cc | 4 |
1 files changed, 2 insertions, 2 deletions
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; |