Cleanup: GPU: Remove uneeded depth precision getter.

We always use 24bit framebuffers nowadays.
This commit is contained in:
Clément Foucault
2020-08-16 02:03:02 +02:00
parent 0f292dc072
commit 2eddfa85e0

View File

@@ -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;