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/editors/transform/transform_constraints.c')
-rw-r--r--source/blender/editors/transform/transform_constraints.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c
index 9169d0a87bb..5f097c5d12e 100644
--- a/source/blender/editors/transform/transform_constraints.c
+++ b/source/blender/editors/transform/transform_constraints.c
@@ -38,7 +38,6 @@
#include <io.h>
#endif
-#include "MEM_guardedalloc.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
@@ -50,7 +49,6 @@
#include "BIF_glutil.h"
#include "BKE_context.h"
-#include "BKE_global.h"
#include "BKE_utildefines.h"
#include "ED_image.h"
@@ -620,6 +618,8 @@ void drawConstraint(const struct bContext *C, TransInfo *t)
if (tc->mode & CON_SELECT) {
float vec[3];
char col2[3] = {255,255,255};
+ int depth_test_enabled;
+
convertViewVec(t, vec, (short)(t->mval[0] - t->con.imval[0]), (short)(t->mval[1] - t->con.imval[1]));
add_v3_v3(vec, tc->center);
@@ -629,15 +629,18 @@ void drawConstraint(const struct bContext *C, TransInfo *t)
glColor3ubv((GLubyte *)col2);
- glDisable(GL_DEPTH_TEST);
+ depth_test_enabled = glIsEnabled(GL_DEPTH_TEST);
+ if(depth_test_enabled)
+ glDisable(GL_DEPTH_TEST);
+
setlinestyle(1);
glBegin(GL_LINE_STRIP);
glVertex3fv(tc->center);
glVertex3fv(vec);
glEnd();
setlinestyle(0);
- // TRANSFORM_FIX_ME
- //if(G.vd->zbuf)
+
+ if(depth_test_enabled)
glEnable(GL_DEPTH_TEST);
}