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>2018-12-11 23:15:39 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-12-11 23:15:50 +0300
commitbf2e0c759843e50c85eefd0654e7c4c5efe612d9 (patch)
tree54ea819814910b510efe6880dbedacf5356beba0 /source/blender/gpu
parent0ba02c6e9e5459936438c6a0f69b8a2a8336c936 (diff)
GPUState: Remove glLineWidth warnings about size 0x0
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/intern/gpu_state.c4
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);
}