Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/draw_manager.c
| Show First 20 Lines • Show All 2,417 Lines • ▼ Show 20 Lines | DRW_state_lock(DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_ALWAYS | DRW_STATE_DEPTH_LESS_EQUAL | | ||||
| DRW_STATE_DEPTH_EQUAL | DRW_STATE_DEPTH_GREATER | DRW_STATE_DEPTH_ALWAYS); | DRW_STATE_DEPTH_EQUAL | DRW_STATE_DEPTH_GREATER | DRW_STATE_DEPTH_ALWAYS); | ||||
| /* Only 1-2 passes. */ | /* Only 1-2 passes. */ | ||||
| while (true) { | while (true) { | ||||
| if (!select_pass_fn(DRW_SELECT_PASS_PRE, select_pass_user_data)) { | if (!select_pass_fn(DRW_SELECT_PASS_PRE, select_pass_user_data)) { | ||||
| break; | break; | ||||
| } | } | ||||
| /* On Windows with latest Intel drivers the Depth test needs to be turned on. | |||||
| * If it is not on the depth test will fail and the glQueries, used for | |||||
| * testing `select_id` will not find results for the geometry drawn by the | |||||
| * basic_engine depth passes. See T62947 */ | |||||
| if (GPU_type_matches(GPU_DEVICE_INTEL, GPU_OS_WIN, GPU_DRIVER_OFFICIAL)) { | |||||
| glEnable(GL_DEPTH_TEST); | |||||
| } | |||||
| drw_engines_draw_scene(); | drw_engines_draw_scene(); | ||||
| if (!select_pass_fn(DRW_SELECT_PASS_POST, select_pass_user_data)) { | if (!select_pass_fn(DRW_SELECT_PASS_POST, select_pass_user_data)) { | ||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| DRW_state_lock(0); | DRW_state_lock(0); | ||||
| ▲ Show 20 Lines • Show All 660 Lines • Show Last 20 Lines | |||||