[Bf-blender-cvs] [bf2e0c75984] blender2.8: GPUState: Remove glLineWidth warnings about size 0x0
Clément Foucault
noreply at git.blender.org
Tue Dec 11 21:15:59 CET 2018
Commit: bf2e0c759843e50c85eefd0654e7c4c5efe612d9
Author: Clément Foucault
Date: Tue Dec 11 21:15:39 2018 +0100
Branches: blender2.8
https://developer.blender.org/rBbf2e0c759843e50c85eefd0654e7c4c5efe612d9
GPUState: Remove glLineWidth warnings about size 0x0
===================================================================
M source/blender/gpu/intern/gpu_state.c
===================================================================
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);
}
More information about the Bf-blender-cvs
mailing list