Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_view3d/view3d_view.c
| Show First 20 Lines • Show All 1,093 Lines • ▼ Show 20 Lines | int view3d_opengl_select(ViewContext *vc, | ||||
| /* Important we use the 'viewmat' and don't re-calculate since | /* Important we use the 'viewmat' and don't re-calculate since | ||||
| * the object & bone view locking takes 'rect' into account, see: T51629. */ | * the object & bone view locking takes 'rect' into account, see: T51629. */ | ||||
| ED_view3d_draw_setup_view(vc->win, depsgraph, scene, ar, v3d, vc->rv3d->viewmat, NULL, &rect); | ED_view3d_draw_setup_view(vc->win, depsgraph, scene, ar, v3d, vc->rv3d->viewmat, NULL, &rect); | ||||
| if (!XRAY_ACTIVE(v3d)) { | if (!XRAY_ACTIVE(v3d)) { | ||||
| GPU_depth_test(true); | GPU_depth_test(true); | ||||
| } | } | ||||
| if (vc->rv3d->rflag & RV3D_CLIPPING) { | if (RV3D_CLIPPING_ENABLED(vc->v3d, vc->rv3d)) { | ||||
| ED_view3d_clipping_set(vc->rv3d); | ED_view3d_clipping_set(vc->rv3d); | ||||
| } | } | ||||
| /* If in xray mode, we select the wires in priority. */ | /* If in xray mode, we select the wires in priority. */ | ||||
| if (XRAY_ACTIVE(v3d) && use_nearest) { | if (XRAY_ACTIVE(v3d) && use_nearest) { | ||||
| /* We need to call "GPU_select_*" API's inside DRW_draw_select_loop | /* We need to call "GPU_select_*" API's inside DRW_draw_select_loop | ||||
| * because the OpenGL context created & destroyed inside this function. */ | * because the OpenGL context created & destroyed inside this function. */ | ||||
| struct DrawSelectLoopUserData drw_select_loop_user_data = { | struct DrawSelectLoopUserData drw_select_loop_user_data = { | ||||
| ▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | int view3d_opengl_select(ViewContext *vc, | ||||
| G.f &= ~G_FLAG_PICKSEL; | G.f &= ~G_FLAG_PICKSEL; | ||||
| ED_view3d_draw_setup_view(vc->win, depsgraph, scene, ar, v3d, vc->rv3d->viewmat, NULL, NULL); | ED_view3d_draw_setup_view(vc->win, depsgraph, scene, ar, v3d, vc->rv3d->viewmat, NULL, NULL); | ||||
| if (!XRAY_ACTIVE(v3d)) { | if (!XRAY_ACTIVE(v3d)) { | ||||
| GPU_depth_test(false); | GPU_depth_test(false); | ||||
| } | } | ||||
| if (vc->rv3d->rflag & RV3D_CLIPPING) { | if (RV3D_CLIPPING_ENABLED(v3d, vc->rv3d)) { | ||||
| ED_view3d_clipping_disable(); | ED_view3d_clipping_disable(); | ||||
| } | } | ||||
| DRW_opengl_context_disable(); | DRW_opengl_context_disable(); | ||||
| finally: | finally: | ||||
| if (hits < 0) { | if (hits < 0) { | ||||
| ▲ Show 20 Lines • Show All 504 Lines • Show Last 20 Lines | |||||