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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-01-24 16:43:45 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-01-24 16:47:01 +0300
commit992ac8f94252cb3a1b3bd68bdd0d88b0af4eabba (patch)
treeac7ee3a48f409d068154b338c2efe3a97221b8e8 /source
parentc0ddbf39c4e175537de89d63be60bd3bc20fbace (diff)
Fix for fix w/ GPU_batch_wire_from_poly_2d_encoded
Was missing first edge
Diffstat (limited to 'source')
-rw-r--r--source/blender/gpu/intern/gpu_batch.c6
1 files changed, 5 insertions, 1 deletions
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];
}
}