Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/draw_manager_exec.c
| Show First 20 Lines • Show All 224 Lines • ▼ Show 20 Lines | if (CHANGED_ANY_STORE_VAR(DRW_STATE_STENCIL_TEST_ENABLED, test)) { | ||||
| glEnable(GL_STENCIL_TEST); | glEnable(GL_STENCIL_TEST); | ||||
| } | } | ||||
| else { | else { | ||||
| glDisable(GL_STENCIL_TEST); | glDisable(GL_STENCIL_TEST); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| /* Wire Width */ | /* Wire Smooth */ | ||||
| { | { | ||||
| int test; | int test; | ||||
| if ((test = CHANGED_TO(DRW_STATE_WIRE_SMOOTH))) { | if ((test = CHANGED_TO(DRW_STATE_WIRE_SMOOTH))) { | ||||
| if (test == 1) { | if (test == 1) { | ||||
| GPU_line_width(2.0f); | |||||
| GPU_line_smooth(true); | GPU_line_smooth(true); | ||||
| } | } | ||||
| else { | else { | ||||
| GPU_line_width(1.0f); | |||||
| GPU_line_smooth(false); | GPU_line_smooth(false); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| /* Wire Thickness */ | |||||
| { | |||||
| DRWState test; | |||||
| if (CHANGED_ANY_STORE_VAR(DRW_STATE_WIRE_MEDIUM | DRW_STATE_WIRE_THICK, test)) { | |||||
| if (test) { | |||||
| if (state & DRW_STATE_WIRE_MEDIUM) { | |||||
| GPU_line_width(2.0f); | |||||
| } | |||||
| else if (state & DRW_STATE_WIRE_THICK) { | |||||
| GPU_line_width(3.0f); | |||||
| } | |||||
| else { | |||||
| GPU_line_width(1.0f); | |||||
| } | |||||
| } | |||||
| else { | |||||
| GPU_line_width(1.0f); | |||||
| } | |||||
| } | |||||
| } | |||||
| /* Blending (all buffer) */ | /* Blending (all buffer) */ | ||||
| { | { | ||||
| int test; | int test; | ||||
| if (CHANGED_ANY_STORE_VAR(DRW_STATE_BLEND_ALPHA | DRW_STATE_BLEND_ALPHA_PREMUL | | if (CHANGED_ANY_STORE_VAR(DRW_STATE_BLEND_ALPHA | DRW_STATE_BLEND_ALPHA_PREMUL | | ||||
| DRW_STATE_BLEND_ADD | DRW_STATE_BLEND_MUL | | DRW_STATE_BLEND_ADD | DRW_STATE_BLEND_MUL | | ||||
| DRW_STATE_BLEND_ADD_FULL | DRW_STATE_BLEND_OIT | | DRW_STATE_BLEND_ADD_FULL | DRW_STATE_BLEND_OIT | | ||||
| DRW_STATE_BLEND_ALPHA_UNDER_PREMUL | DRW_STATE_BLEND_CUSTOM, | DRW_STATE_BLEND_ALPHA_UNDER_PREMUL | DRW_STATE_BLEND_CUSTOM, | ||||
| test)) { | test)) { | ||||
| ▲ Show 20 Lines • Show All 1,184 Lines • Show Last 20 Lines | |||||