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:
Diffstat (limited to 'source/blender/src/editview.c')
-rw-r--r--source/blender/src/editview.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/src/editview.c b/source/blender/src/editview.c
index 16c695288a4..3b375a0319f 100644
--- a/source/blender/src/editview.c
+++ b/source/blender/src/editview.c
@@ -2541,6 +2541,11 @@ void view3d_edit_clipping(View3D *v3d)
glGetIntegerv(GL_VIEWPORT, viewport);
glGetDoublev(GL_MODELVIEW_MATRIX, mvmatrix);
glGetDoublev(GL_PROJECTION_MATRIX, projmatrix);
+
+ /* near zero floating point values can give issues with gluUnProject
+ in side view on some implementations */
+ if(fabs(mvmatrix[0]) < 1e-6) mvmatrix[0]= 0.0;
+ if(fabs(mvmatrix[5]) < 1e-6) mvmatrix[5]= 0.0;
/* Set up viewport so that gluUnProject will give correct values */
viewport[0] = 0;