diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-12-11 23:15:39 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-12-11 23:15:50 +0300 |
commit | bf2e0c759843e50c85eefd0654e7c4c5efe612d9 (patch) | |
tree | 54ea819814910b510efe6880dbedacf5356beba0 | |
parent | 0ba02c6e9e5459936438c6a0f69b8a2a8336c936 (diff) |
GPUState: Remove glLineWidth warnings about size 0x0
-rw-r--r-- | source/blender/gpu/intern/gpu_state.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/gpu/intern/gpu_state.c b/source/blender/gpu/intern/gpu_state.c index d06854f669f..767437a0255 100644 --- a/source/blender/gpu/intern/gpu_state.c +++ b/source/blender/gpu/intern/gpu_state.c @@ -122,9 +122,7 @@ void GPU_line_width(float width) float max_size = GPU_max_line_width(); float final_size = width * U.pixelsize; /* Fix opengl errors on certain platform / drivers. */ - if (max_size < final_size) { - final_size = max_size; - } + CLAMP(final_size, 1.0f, max_size); glLineWidth(final_size); } |