diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-09-10 16:51:20 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-09-10 16:55:14 +0300 |
commit | 72f63ba7e9be0c41dff4c3ed3c4fb527b607dbc3 (patch) | |
tree | 5d81dd72fe9651aefb3c0804ce8f45074794be20 /source/blender/gpu/intern | |
parent | 7f4799a18931a1b9f8edd970cd4bb30bf1577d40 (diff) |
GPUState: Fix Point Size issues
The point size was not updated in the right branch and setting the point
size via GPU_point_size was effectively disabling its use.
Diffstat (limited to 'source/blender/gpu/intern')
-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..07eacc06bcf 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; + /* Set point size sign negative to disable. */ + state.point_size = size * signf(state.point_size); } /* 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) { |