Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_state.cc
| Show First 20 Lines • Show All 159 Lines • ▼ Show 20 Lines | |||||
| void GPU_depth_range(float near, float far) | void GPU_depth_range(float near, float far) | ||||
| { | { | ||||
| StateManager *stack = Context::get()->state_manager; | StateManager *stack = Context::get()->state_manager; | ||||
| auto &state = stack->mutable_state; | auto &state = stack->mutable_state; | ||||
| copy_v2_fl2(state.depth_range, near, far); | copy_v2_fl2(state.depth_range, near, far); | ||||
| } | } | ||||
| /** | |||||
| * \note By convention, this is set as needed and not reset back to 1.0. | |||||
| * This means code that draws lines must always set the line width beforehand, | |||||
| * but is not expected to restore it's previous value. | |||||
| */ | |||||
| void GPU_line_width(float width) | void GPU_line_width(float width) | ||||
| { | { | ||||
| width = max_ff(1.0f, width * PIXELSIZE); | width = max_ff(1.0f, width * PIXELSIZE); | ||||
| SET_MUTABLE_STATE(line_width, width); | SET_MUTABLE_STATE(line_width, width); | ||||
| } | } | ||||
| void GPU_point_size(float size) | void GPU_point_size(float size) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 249 Lines • Show Last 20 Lines | |||||