diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/gpu/intern/gpu_state.cc | 4 | ||||
-rw-r--r-- | source/blender/gpu/opengl/gl_state.cc | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/gpu/intern/gpu_state.cc b/source/blender/gpu/intern/gpu_state.cc index 07eacc06bcf..be523020e8a 100644 --- a/source/blender/gpu/intern/gpu_state.cc +++ b/source/blender/gpu/intern/gpu_state.cc @@ -175,8 +175,8 @@ void GPU_point_size(float size) { 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); + /* 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 diff --git a/source/blender/gpu/opengl/gl_state.cc b/source/blender/gpu/opengl/gl_state.cc index 487cd4369cc..1678760e9cd 100644 --- a/source/blender/gpu/opengl/gl_state.cc +++ b/source/blender/gpu/opengl/gl_state.cc @@ -141,7 +141,7 @@ void GLStateManager::set_mutable_state(const GPUStateMutable &state) GPUStateMutable changed = state ^ current_mutable_; /* TODO remove, should be uniform. */ - if (changed.point_size != 0.0f) { + if (float_as_uint(changed.point_size) != 0) { if (state.point_size > 0.0f) { glEnable(GL_PROGRAM_POINT_SIZE); } |