[Bf-blender-cvs] [f1e34ee7faa] master: Fix T80782 GPU: Curve editing widget point size broken after recent commit
Clément Foucault
noreply at git.blender.org
Mon Sep 14 20:53:55 CEST 2020
Commit: f1e34ee7faabeaebf857435e8422a68fb520e283
Author: Clément Foucault
Date: Mon Sep 14 20:52:45 2020 +0200
Branches: master
https://developer.blender.org/rBf1e34ee7faabeaebf857435e8422a68fb520e283
Fix T80782 GPU: Curve editing widget point size broken after recent commit
This was caused by a faulty default where program point size was used.
===================================================================
M source/blender/gpu/intern/gpu_state.cc
M source/blender/gpu/intern/gpu_state_private.hh
===================================================================
diff --git a/source/blender/gpu/intern/gpu_state.cc b/source/blender/gpu/intern/gpu_state.cc
index 9ab056e868d..1dc8b106029 100644
--- a/source/blender/gpu/intern/gpu_state.cc
+++ b/source/blender/gpu/intern/gpu_state.cc
@@ -351,7 +351,7 @@ StateManager::StateManager(void)
mutable_state.depth_range[0] = 0.0f;
mutable_state.depth_range[1] = 1.0f;
- mutable_state.point_size = 1.0f;
+ mutable_state.point_size = -1.0f; /* Negative is not using point size. */
mutable_state.line_width = 1.0f;
mutable_state.stencil_write_mask = 0x00;
mutable_state.stencil_compare_mask = 0x00;
diff --git a/source/blender/gpu/intern/gpu_state_private.hh b/source/blender/gpu/intern/gpu_state_private.hh
index b8d247ec175..149a1ece186 100644
--- a/source/blender/gpu/intern/gpu_state_private.hh
+++ b/source/blender/gpu/intern/gpu_state_private.hh
@@ -98,7 +98,7 @@ union GPUStateMutable {
/* Viewport State */
/** TODO remove */
float depth_range[2];
- /** Negative if using program point size. */
+ /** Positive if using program point size. */
/* TODO(fclem) should be passed as uniform to all shaders. */
float point_size;
/** Not supported on every platform. Prefer using wideline shader. */
More information about the Bf-blender-cvs
mailing list