Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-09-11 00:55:22 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-09-11 00:55:22 +0300
commit66078594d130f640f479949856630aa23083c9fa (patch)
treeea4ad4a6b2d26bea1e051e5605a6d3f41e9764c9 /source/blender/gpu/intern/gpu_state.cc
parent8ff397b3b1a95a8fa69752d4c0cdc95f2b3daadd (diff)
GPUState: Fix missing changed program point size state
Also avoid a case where size is zero and making it impossible to change it back. This fix T80664 Tiny node sockets
Diffstat (limited to 'source/blender/gpu/intern/gpu_state.cc')
-rw-r--r--source/blender/gpu/intern/gpu_state.cc4
1 files changed, 2 insertions, 2 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