[Bf-blender-cvs] [afc8ad75373] temp-lanpr-cleanup: LANPR: Fix chaining bounding area logic & make format
YimingWu
noreply at git.blender.org
Mon Sep 16 14:56:42 CEST 2019
Commit: afc8ad75373560dc42e0ac6df5431886d53c6c8c
Author: YimingWu
Date: Mon Sep 16 20:52:21 2019 +0800
Branches: temp-lanpr-cleanup
https://developer.blender.org/rBafc8ad75373560dc42e0ac6df5431886d53c6c8c
LANPR: Fix chaining bounding area logic & make format
===================================================================
M source/blender/draw/engines/lanpr/lanpr_chain_draw.c
M source/blender/draw/engines/lanpr/lanpr_cpu.c
M source/blender/editors/lanpr/lanpr_cpu.c
===================================================================
diff --git a/source/blender/draw/engines/lanpr/lanpr_chain_draw.c b/source/blender/draw/engines/lanpr/lanpr_chain_draw.c
index 57cb92163cc..2f5fc095f88 100644
--- a/source/blender/draw/engines/lanpr/lanpr_chain_draw.c
+++ b/source/blender/draw/engines/lanpr/lanpr_chain_draw.c
@@ -160,15 +160,15 @@ void lanpr_chain_generate_draw_command(LANPR_RenderBuffer *rb)
if (rlci == rlc->chain.first) {
if (rlci->next == rlc->chain.last) {
- GPU_indexbuf_add_line_adj_verts(&elb, vert_count-1, i, i + 1, vert_count-1);
+ GPU_indexbuf_add_line_adj_verts(&elb, vert_count - 1, i, i + 1, vert_count - 1);
}
else {
- GPU_indexbuf_add_line_adj_verts(&elb, vert_count-1, i, i + 1, i + 2);
+ GPU_indexbuf_add_line_adj_verts(&elb, vert_count - 1, i, i + 1, i + 2);
}
}
else {
if (rlci->next == rlc->chain.last) {
- GPU_indexbuf_add_line_adj_verts(&elb, i - 1, i, i + 1, vert_count-1);
+ GPU_indexbuf_add_line_adj_verts(&elb, i - 1, i, i + 1, vert_count - 1);
}
else {
GPU_indexbuf_add_line_adj_verts(&elb, i - 1, i, i + 1, i + 2);
diff --git a/source/blender/draw/engines/lanpr/lanpr_cpu.c b/source/blender/draw/engines/lanpr/lanpr_cpu.c
index 9ca6e002d96..1dc8153eb8c 100644
--- a/source/blender/draw/engines/lanpr/lanpr_cpu.c
+++ b/source/blender/draw/engines/lanpr/lanpr_cpu.c
@@ -253,7 +253,7 @@ void lanpr_software_draw_scene(void *vedata, GPUFrameBuffer *dfb, int is_render)
pd->dpix_viewport[3] = texh;
unit_m4(indentity_mat);
- copy_m4_m4(win_mat,indentity_mat);
+ copy_m4_m4(win_mat, indentity_mat);
/* win_mat needs to be negative */
swap_v3_v3(win_mat[0], win_mat[1]);
diff --git a/source/blender/editors/lanpr/lanpr_cpu.c b/source/blender/editors/lanpr/lanpr_cpu.c
index 48b051e8806..2c9fc9939fd 100644
--- a/source/blender/editors/lanpr/lanpr_cpu.c
+++ b/source/blender/editors/lanpr/lanpr_cpu.c
@@ -3286,16 +3286,16 @@ static void lanpr_link_line_with_bounding_area(LANPR_RenderBuffer *rb,
rb, rl->l->fbcoord, rl->r->fbcoord, &RootBoundingArea->child[0])) {
lanpr_link_line_with_bounding_area(rb, &RootBoundingArea->child[0], rl);
}
- else if (lanpr_line_crosses_bounding_area(
- rb, rl->l->fbcoord, rl->r->fbcoord, &RootBoundingArea->child[1])) {
+ if (lanpr_line_crosses_bounding_area(
+ rb, rl->l->fbcoord, rl->r->fbcoord, &RootBoundingArea->child[1])) {
lanpr_link_line_with_bounding_area(rb, &RootBoundingArea->child[1], rl);
}
- else if (lanpr_line_crosses_bounding_area(
- rb, rl->l->fbcoord, rl->r->fbcoord, &RootBoundingArea->child[2])) {
+ if (lanpr_line_crosses_bounding_area(
+ rb, rl->l->fbcoord, rl->r->fbcoord, &RootBoundingArea->child[2])) {
lanpr_link_line_with_bounding_area(rb, &RootBoundingArea->child[2], rl);
}
- else if (lanpr_line_crosses_bounding_area(
- rb, rl->l->fbcoord, rl->r->fbcoord, &RootBoundingArea->child[3])) {
+ if (lanpr_line_crosses_bounding_area(
+ rb, rl->l->fbcoord, rl->r->fbcoord, &RootBoundingArea->child[3])) {
lanpr_link_line_with_bounding_area(rb, &RootBoundingArea->child[3], rl);
}
}
More information about the Bf-blender-cvs
mailing list