diff options
Diffstat (limited to 'source/blender/gpu/intern/gpu_state.cc')
-rw-r--r-- | source/blender/gpu/intern/gpu_state.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_state.cc b/source/blender/gpu/intern/gpu_state.cc index 529c8795327..be523020e8a 100644 --- a/source/blender/gpu/intern/gpu_state.cc +++ b/source/blender/gpu/intern/gpu_state.cc @@ -173,12 +173,15 @@ void GPU_line_width(float width) void GPU_point_size(float size) { - SET_MUTABLE_STATE(point_size, size * PIXELSIZE); + GPUStateManager *stack = Context::get()->state_manager; + auto &state = stack->mutable_state; + /* Keep the sign of point_size since it represents the enable state. */ + state.point_size = size * ((state.point_size > 0.0) ? 1.0f : -1.0f); } /* Programmable point size * - shaders set their own point size when enabled - * - use glPointSize when disabled */ + * - use GPU_point_size when disabled */ /* TODO remove and use program point size everywhere */ void GPU_program_point_size(bool enable) { |