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:
authorGermano <germano.costa@ig.com.br>2018-03-15 19:36:16 +0300
committerGermano <germano.costa@ig.com.br>2018-03-15 19:36:16 +0300
commitcca1e1b707c2d34244d3da87efcd78775c4eb048 (patch)
treeb19b8f1d60e5d2387aa77e69125e010d9de1ec35 /intern/gawain
parent709ffd94eeca1f2f6f7e929128b5657665b2736c (diff)
UV/Image Editor: Optimize UV Drawing
Use batchs to store the entire buffer of loops before drawing. These batchs can be stored in the mesh draw cache later.
Diffstat (limited to 'intern/gawain')
-rw-r--r--intern/gawain/src/gwn_immediate.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/intern/gawain/src/gwn_immediate.c b/intern/gawain/src/gwn_immediate.c
index f063665b423..c6df3ada018 100644
--- a/intern/gawain/src/gwn_immediate.c
+++ b/intern/gawain/src/gwn_immediate.c
@@ -277,8 +277,6 @@ Gwn_Batch* immBeginBatch(Gwn_PrimType prim_type, unsigned vertex_ct)
imm.batch = GWN_batch_create(prim_type, verts, NULL);
imm.batch->phase = GWN_BATCH_BUILDING;
- GWN_batch_program_set(imm.batch, imm.bound_program, imm.shader_interface);
-
return imm.batch;
}
@@ -398,6 +396,7 @@ void immEnd(void)
// TODO: resize only if vertex count is much smaller
}
+ GWN_batch_program_set(imm.batch, imm.bound_program, imm.shader_interface);
imm.batch->phase = GWN_BATCH_READY_TO_DRAW;
imm.batch = NULL; // don't free, batch belongs to caller
}