diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-04-28 23:08:45 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-04-28 23:08:45 +0300 |
commit | f9d23b82fe4461ccab40124b8a4cdb4735fbedd3 (patch) | |
tree | 10c50a4a43697c5d0b2f0da08c33e543818ca4be /source/blender/editors/screen/glutil.c | |
parent | cbb601346a6401192298b34255f7f3c981078293 (diff) |
Rewind fix for T44505 (leave in ifdef'd)
This makes selection fail in simple cases,
default cube subdiv 10x for eg.
Diffstat (limited to 'source/blender/editors/screen/glutil.c')
-rw-r--r-- | source/blender/editors/screen/glutil.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c index 2a0e13bccbc..a478a1f1b84 100644 --- a/source/blender/editors/screen/glutil.c +++ b/source/blender/editors/screen/glutil.c @@ -991,7 +991,7 @@ void bgl_get_mats(bglMats *mats) /** * \note \a viewdist is only for ortho at the moment. */ -void bglPolygonOffset(float UNUSED(viewdist), float dist) +void bglPolygonOffset(float viewdist, float dist) { static float winmat[16], offset = 0.0; @@ -1008,7 +1008,7 @@ void bglPolygonOffset(float UNUSED(viewdist), float dist) /* dist is from camera to center point */ if (winmat[15] > 0.5f) { -#if 0 +#if 1 offs = 0.00001f * dist * viewdist; // ortho tweaking #else static float depth_fac = 0.0f; @@ -1018,6 +1018,8 @@ void bglPolygonOffset(float UNUSED(viewdist), float dist) depth_fac = 1.0f / (float)((1 << depthbits) - 1); } offs = (-1.0 / winmat[10]) * dist * depth_fac; + + UNUSED_VARS(viewdist); #endif } else { |