[Bf-blender-cvs] [f9d23b8] master: Rewind fix for T44505 (leave in ifdef'd)
Campbell Barton
noreply at git.blender.org
Tue Apr 28 22:11:12 CEST 2015
Commit: f9d23b82fe4461ccab40124b8a4cdb4735fbedd3
Author: Campbell Barton
Date: Wed Apr 29 06:08:45 2015 +1000
Branches: master
https://developer.blender.org/rBf9d23b82fe4461ccab40124b8a4cdb4735fbedd3
Rewind fix for T44505 (leave in ifdef'd)
This makes selection fail in simple cases,
default cube subdiv 10x for eg.
===================================================================
M source/blender/editors/screen/glutil.c
===================================================================
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c
index 2a0e13b..a478a1f 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 {
More information about the Bf-blender-cvs
mailing list