Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_view3d/view3d_draw.c
| Show All 31 Lines | |||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include <math.h> | #include <math.h> | ||||
| #include "DNA_armature_types.h" | #include "DNA_armature_types.h" | ||||
| #include "DNA_camera_types.h" | #include "DNA_camera_types.h" | ||||
| #include "DNA_customdata_types.h" | #include "DNA_customdata_types.h" | ||||
| #include "DNA_object_types.h" | #include "DNA_object_types.h" | ||||
| #include "DNA_group_types.h" | #include "DNA_group_types.h" | ||||
| #include "DNA_mesh_types.h" | |||||
| #include "DNA_key_types.h" | #include "DNA_key_types.h" | ||||
| #include "DNA_lamp_types.h" | #include "DNA_lamp_types.h" | ||||
| #include "DNA_scene_types.h" | #include "DNA_scene_types.h" | ||||
| #include "DNA_world_types.h" | #include "DNA_world_types.h" | ||||
| #include "MEM_guardedalloc.h" | #include "MEM_guardedalloc.h" | ||||
| #include "BLI_blenlib.h" | #include "BLI_blenlib.h" | ||||
| ▲ Show 20 Lines • Show All 2,552 Lines • ▼ Show 20 Lines | static void view3d_draw_objects( | ||||
| if (!draw_offscreen) { | if (!draw_offscreen) { | ||||
| ED_region_draw_cb_draw(C, ar, REGION_DRAW_PRE_VIEW); | ED_region_draw_cb_draw(C, ar, REGION_DRAW_PRE_VIEW); | ||||
| } | } | ||||
| if (rv3d->rflag & RV3D_CLIPPING) | if (rv3d->rflag & RV3D_CLIPPING) | ||||
| view3d_draw_clipping(rv3d); | view3d_draw_clipping(rv3d); | ||||
| /* set zbuffer after we draw clipping region */ | /* set zbuffer after we draw clipping region */ | ||||
| if (v3d->drawtype > OB_WIRE) { | if (v3d->drawtype > OB_WIRE) { | ||||
| v3d->zbuf = true; | v3d->zbuf = true; | ||||
| glEnable(GL_DEPTH_TEST); | |||||
| } | } | ||||
| else { | else { | ||||
| v3d->zbuf = false; | v3d->zbuf = false; | ||||
| } | } | ||||
| /* special case (depth for wire color) */ | |||||
| if (v3d->drawtype <= OB_WIRE) { | |||||
| if (scene->obedit && scene->obedit->type == OB_MESH) { | |||||
| Mesh *me = scene->obedit->data; | |||||
| if (me->drawflag & ME_DRAWEIGHT) { | |||||
| v3d->zbuf = true; | |||||
| } | |||||
| } | |||||
| } | |||||
| if (v3d->zbuf) { | |||||
| glEnable(GL_DEPTH_TEST); | |||||
| } | |||||
| if (!draw_offscreen) { | if (!draw_offscreen) { | ||||
| /* needs to be done always, gridview is adjusted in drawgrid() now, but only for ortho views. */ | /* needs to be done always, gridview is adjusted in drawgrid() now, but only for ortho views. */ | ||||
| rv3d->gridview = v3d->grid; | rv3d->gridview = v3d->grid; | ||||
| if (scene->unit.system) { | if (scene->unit.system) { | ||||
| rv3d->gridview /= scene->unit.scale_length; | rv3d->gridview /= scene->unit.scale_length; | ||||
| } | } | ||||
| if ((rv3d->view == RV3D_VIEW_USER) || (rv3d->persp != RV3D_ORTHO)) { | if ((rv3d->view == RV3D_VIEW_USER) || (rv3d->persp != RV3D_ORTHO)) { | ||||
| ▲ Show 20 Lines • Show All 1,007 Lines • Show Last 20 Lines | |||||