Commit: ee2a71876308c891d19cb7df87ef85e2321d0420
Author: Clément Foucault
Date: Wed Feb 15 00:49:51 2017 +0100
Branches: blender2.8
https://developer.blender.org/rBee2a71876308c891d19cb7df87ef85e2321d0420
Clay Engine: Fix empty drawing
===================================================================
M source/blender/draw/intern/draw_cache.c
M source/blender/draw/intern/draw_mode_pass.c
===================================================================
diff --git a/source/blender/draw/intern/draw_cache.c
b/source/blender/draw/intern/draw_cache.c
index 7ea6b8d006..dfb7ff2263 100644
--- a/source/blender/draw/intern/draw_cache.c
+++ b/source/blender/draw/intern/draw_cache.c
@@ -167,13 +167,13 @@ Batch *DRW_cache_circle_get(void)
for (int a = 0; a < CIRCLE_RESOL; a++) {
v[0] = sinf((2.0f * M_PI * a) / ((float)CIRCLE_RESOL));
- v[1] = cosf((2.0f * M_PI * a) / ((float)CIRCLE_RESOL));
- v[2] = 0.0f;
+ v[2] = cosf((2.0f * M_PI * a) / ((float)CIRCLE_RESOL));
+ v[1] = 0.0f;
setAttrib(vbo, pos_id, a * 2, v);
v[0] = sinf((2.0f * M_PI * (a + 1)) /
((float)CIRCLE_RESOL));
- v[1] = cosf((2.0f * M_PI * (a + 1)) /
((float)CIRCLE_RESOL));
- v[2] = 0.0f;
+ v[2] = cosf((2.0f * M_PI * (a + 1)) /
((float)CIRCLE_RESOL));
+ v[1] = 0.0f;
setAttrib(vbo, pos_id, a * 2 + 1, v);
}
@@ -245,7 +245,7 @@ Batch *DRW_cache_plain_axes_get(void)
Batch *DRW_cache_single_arrow_get(void)
{
if (!SHC.drw_single_arrow) {
- float v1[3] = {0.0f, 0.0f, 0.0f}, v2[3], v3[3];
+ float v1[3] = {0.0f, 0.0f, 1.0f}, v2[3], v3[3];
/* Position Only 3D format */
static VertexFormat format = { 0 };
diff --git a/source/blender/draw/intern/draw_mode_pass.c
b/source/blender/draw/intern/draw_mode_pass.c
index 4e04bf5f87..e1a6ff34c1 100644
--- a/source/blender/draw/intern/draw_mode_pass.c
+++ b/source/blender/draw/intern/draw_mode_pass.c
@@ -208,7 +208,7 @@ void DRW_pass_setup_common(DRWPass **wire_overlay, DRWPass
**wire_outline, DRWPa
geom = DRW_cache_single_line_get();
single_arrow_line = shgroup_instance(*non_meshes, geom);
- geom = DRW_cache_single_arrow_get();
+ geom = DRW_cache_arrows_get();
arrows = shgroup_instance(*non_meshes, geom);
/* Lamps */
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs