Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-08-16 03:03:02 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-08-18 22:30:10 +0300
commit2eddfa85e00d9efa7571721e605a331ca4cd5bc6 (patch)
treed6aa2502ff3f19d7ee02fbfaac2446828f68e91d
parent0f292dc07265db181bd3ec13f12c48fee755f5b5 (diff)
Cleanup: GPU: Remove uneeded depth precision getter.
We always use 24bit framebuffers nowadays.
-rw-r--r--source/blender/gpu/intern/gpu_matrix.cc4
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;