Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_view3d/view3d_draw.c
| Show First 20 Lines • Show All 719 Lines • ▼ Show 20 Lines | BLF_draw_default(x1i, | ||||
| v3d->camera->id.name + 2, | v3d->camera->id.name + 2, | ||||
| sizeof(v3d->camera->id.name) - 2); | sizeof(v3d->camera->id.name) - 2); | ||||
| } | } | ||||
| } | } | ||||
| static void drawrenderborder(ARegion *ar, View3D *v3d) | static void drawrenderborder(ARegion *ar, View3D *v3d) | ||||
| { | { | ||||
| /* use the same program for everything */ | /* use the same program for everything */ | ||||
| uint shdr_pos = GPU_vertformat_attr_add( | uint shdr_pos = GPU_vertformat_attr_add( | ||||
Gvgeo: Remove obcenter_dia from ED_view3d_draw_depth.
Used for drawing with grease-pencil on surface… | |||||
| immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); | immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); | ||||
| GPU_line_width(1.0f); | GPU_line_width(1.0f); | ||||
| immBindBuiltinProgram(GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR); | immBindBuiltinProgram(GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR); | ||||
| float viewport_size[4]; | float viewport_size[4]; | ||||
| GPU_viewport_size_get_f(viewport_size); | GPU_viewport_size_get_f(viewport_size); | ||||
| Show All 16 Lines | |||||
| void ED_view3d_draw_depth(Depsgraph *depsgraph, ARegion *ar, View3D *v3d, bool alphaoverride) | void ED_view3d_draw_depth(Depsgraph *depsgraph, ARegion *ar, View3D *v3d, bool alphaoverride) | ||||
| { | { | ||||
| struct bThemeState theme_state; | struct bThemeState theme_state; | ||||
| Scene *scene = DEG_get_evaluated_scene(depsgraph); | Scene *scene = DEG_get_evaluated_scene(depsgraph); | ||||
| RegionView3D *rv3d = ar->regiondata; | RegionView3D *rv3d = ar->regiondata; | ||||
| short flag = v3d->flag; | short flag = v3d->flag; | ||||
| float glalphaclip = U.glalphaclip; | float glalphaclip = U.glalphaclip; | ||||
| int obcenter_dia = U.obcenter_dia; | |||||
| /* temp set drawtype to solid */ | /* temp set drawtype to solid */ | ||||
| /* Setting these temporarily is not nice */ | /* Setting these temporarily is not nice */ | ||||
| v3d->flag &= ~V3D_SELECT_OUTLINE; | v3d->flag &= ~V3D_SELECT_OUTLINE; | ||||
| /* not that nice but means we wont zoom into billboards */ | /* not that nice but means we wont zoom into billboards */ | ||||
| U.glalphaclip = alphaoverride ? 0.5f : glalphaclip; | U.glalphaclip = alphaoverride ? 0.5f : glalphaclip; | ||||
| U.obcenter_dia = 0; | |||||
| /* Tools may request depth outside of regular drawing code. */ | /* Tools may request depth outside of regular drawing code. */ | ||||
| UI_Theme_Store(&theme_state); | UI_Theme_Store(&theme_state); | ||||
| UI_SetTheme(SPACE_VIEW3D, RGN_TYPE_WINDOW); | UI_SetTheme(SPACE_VIEW3D, RGN_TYPE_WINDOW); | ||||
| ED_view3d_draw_setup_view(NULL, depsgraph, scene, ar, v3d, NULL, NULL, NULL); | ED_view3d_draw_setup_view(NULL, depsgraph, scene, ar, v3d, NULL, NULL, NULL); | ||||
| GPU_clear(GPU_DEPTH_BIT); | GPU_clear(GPU_DEPTH_BIT); | ||||
| Show All 14 Lines | void ED_view3d_draw_depth(Depsgraph *depsgraph, ARegion *ar, View3D *v3d, bool alphaoverride) | ||||
| } | } | ||||
| rv3d->rflag &= ~RV3D_ZOFFSET_DISABLED; | rv3d->rflag &= ~RV3D_ZOFFSET_DISABLED; | ||||
| /* Reset default for UI */ | /* Reset default for UI */ | ||||
| GPU_depth_test(false); | GPU_depth_test(false); | ||||
| U.glalphaclip = glalphaclip; | U.glalphaclip = glalphaclip; | ||||
| v3d->flag = flag; | v3d->flag = flag; | ||||
| U.obcenter_dia = obcenter_dia; | |||||
| UI_Theme_Restore(&theme_state); | UI_Theme_Restore(&theme_state); | ||||
| } | } | ||||
| /* ******************** other elements ***************** */ | /* ******************** other elements ***************** */ | ||||
| /** could move this elsewhere, but tied into #ED_view3d_grid_scale */ | /** could move this elsewhere, but tied into #ED_view3d_grid_scale */ | ||||
| float ED_scene_grid_scale(Scene *scene, const char **grid_unit) | float ED_scene_grid_scale(Scene *scene, const char **grid_unit) | ||||
| ▲ Show 20 Lines • Show All 1,131 Lines • Show Last 20 Lines | |||||
Remove obcenter_dia from ED_view3d_draw_depth.
Used for drawing with grease-pencil on surface rBe2f5d31453c8. With the removal of blender Internal rB51b796ff1528, is no longer need.
Last used here. https://developer.blender.org/diffusion/B/browse/master/source/blender/editors/space_view3d/drawobject.c;785e8a636a293941a4295e669cb5aeecfafae039