[Bf-blender-cvs] [992ac8f9425] blender2.8: Fix for fix w/ GPU_batch_wire_from_poly_2d_encoded
Campbell Barton
noreply at git.blender.org
Wed Jan 24 14:35:59 CET 2018
Commit: 992ac8f94252cb3a1b3bd68bdd0d88b0af4eabba
Author: Campbell Barton
Date: Thu Jan 25 00:43:45 2018 +1100
Branches: blender2.8
https://developer.blender.org/rB992ac8f94252cb3a1b3bd68bdd0d88b0af4eabba
Fix for fix w/ GPU_batch_wire_from_poly_2d_encoded
Was missing first edge
===================================================================
M source/blender/gpu/intern/gpu_batch.c
===================================================================
diff --git a/source/blender/gpu/intern/gpu_batch.c b/source/blender/gpu/intern/gpu_batch.c
index baf24c95881..0400fc1025b 100644
--- a/source/blender/gpu/intern/gpu_batch.c
+++ b/source/blender/gpu/intern/gpu_batch.c
@@ -215,8 +215,12 @@ Gwn_Batch *GPU_batch_wire_from_poly_2d_encoded(
{
qsort(lines, lines_len, sizeof(int32_t), BLI_sortutil_cmp_int);
lines_step = lines;
+
+ if (lines[0] != lines[1]) {
+ *lines_step++ = lines[0];
+ }
for (uint i_prev = 0, i = 1; i < lines_len; i_prev = i++) {
- if ((lines[i] != lines[i_prev])) {
+ if (lines[i] != lines[i_prev]) {
*lines_step++ = lines[i];
}
}
More information about the Bf-blender-cvs
mailing list