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:
authorCampbell Barton <ideasman42@gmail.com>2017-12-16 10:55:42 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-12-16 11:05:27 +0300
commit625d72ed48dfe16efcf3ac62ba66cc367539dc15 (patch)
tree794fa67168f00adb6a268de2684b9146f3d92d90 /source/blender/draw/intern/draw_view.c
parentd855fc4dad10732b479d4f0d7e8fc81b9107108c (diff)
Manipulator: draw 2d manipulators over view border
Needed so passepartout doesn't cover 2d manipulators.
Diffstat (limited to 'source/blender/draw/intern/draw_view.c')
-rw-r--r--source/blender/draw/intern/draw_view.c34
1 files changed, 12 insertions, 22 deletions
diff --git a/source/blender/draw/intern/draw_view.c b/source/blender/draw/intern/draw_view.c
index 474d6ac8769..391c29e511f 100644
--- a/source/blender/draw/intern/draw_view.c
+++ b/source/blender/draw/intern/draw_view.c
@@ -715,16 +715,13 @@ void DRW_draw_cursor(void)
/* **************************** 3D Manipulator ******************************** */
-void DRW_draw_manipulator(void)
+void DRW_draw_manipulator_3d(void)
{
const DRWContextState *draw_ctx = DRW_context_state_get();
View3D *v3d = draw_ctx->v3d;
v3d->zbuf = false;
ARegion *ar = draw_ctx->ar;
-
- /* TODO, only draws 3D manipulators right now, need to see how 2D drawing will work in new viewport */
-
/* draw depth culled manipulators - manipulators need to be updated *after* view matrix was set up */
/* TODO depth culling manipulators is not yet supported, just drawing _3D here, should
* later become _IN_SCENE (and draw _3D separate) */
@@ -732,25 +729,18 @@ void DRW_draw_manipulator(void)
ar->manipulator_map, draw_ctx->evil_C,
WM_MANIPULATORMAP_DRAWSTEP_3D);
- /* We may want to split this into a separate pass.
- * or maintain a stage in the draw manager where all pixel-space drawing happens. */
- {
- float original_proj[4][4];
- gpuGetProjectionMatrix(original_proj);
- wmOrtho2_region_pixelspace(ar);
-
- gpuPushMatrix();
- gpuLoadIdentity();
-
- glDepthMask(GL_FALSE);
+}
- WM_manipulatormap_draw(
- ar->manipulator_map, draw_ctx->evil_C,
- WM_MANIPULATORMAP_DRAWSTEP_2D);
+void DRW_draw_manipulator_2d(void)
+{
+ const DRWContextState *draw_ctx = DRW_context_state_get();
+ View3D *v3d = draw_ctx->v3d;
+ v3d->zbuf = false;
+ ARegion *ar = draw_ctx->ar;
- glDepthMask(GL_TRUE);
+ WM_manipulatormap_draw(
+ ar->manipulator_map, draw_ctx->evil_C,
+ WM_MANIPULATORMAP_DRAWSTEP_2D);
- gpuPopMatrix();
- gpuLoadProjectionMatrix(original_proj);
- }
+ glDepthMask(GL_TRUE);
}