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:
authorClément Foucault <foucault.clem@gmail.com>2017-02-15 02:49:51 +0300
committerClément Foucault <foucault.clem@gmail.com>2017-02-15 14:28:26 +0300
commitee2a71876308c891d19cb7df87ef85e2321d0420 (patch)
tree61b59e57eed7c981f81cb026c0ca149aeb449ed3 /source/blender/draw
parente813ebab710174eaa0f3dec0b7ba848783b44bd8 (diff)
Clay Engine: Fix empty drawing
Diffstat (limited to 'source/blender/draw')
-rw-r--r--source/blender/draw/intern/draw_cache.c10
-rw-r--r--source/blender/draw/intern/draw_mode_pass.c2
2 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/draw/intern/draw_cache.c b/source/blender/draw/intern/draw_cache.c
index 7ea6b8d0066..dfb7ff22639 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 4e04bf5f87d..e1a6ff34c13 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 */