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>2018-08-17 13:16:50 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-08-17 14:04:26 +0300
commit435f308eeda151ae7ebc1341996fe0caf12f7cbd (patch)
tree190f31872f676f09339e1786657f8c9deb41c13c /source/blender/draw/intern/draw_cache.c
parent7d720cc655b43af7c871a3715eb9fd5d3ffd753a (diff)
Object Mode: Use same empty (arrow) drawing as the bone axes display
Diffstat (limited to 'source/blender/draw/intern/draw_cache.c')
-rw-r--r--source/blender/draw/intern/draw_cache.c71
1 files changed, 0 insertions, 71 deletions
diff --git a/source/blender/draw/intern/draw_cache.c b/source/blender/draw/intern/draw_cache.c
index c3fa9f5c1aa..d5d5972f153 100644
--- a/source/blender/draw/intern/draw_cache.c
+++ b/source/blender/draw/intern/draw_cache.c
@@ -985,77 +985,6 @@ GPUBatch *DRW_cache_empty_capsule_cap_get(void)
#undef NSEGMENTS
}
-GPUBatch *DRW_cache_arrows_get(void)
-{
- if (!SHC.drw_arrows) {
- GPUVertBuf *vbo = fill_arrows_vbo(1.0f);
-
- SHC.drw_arrows = GPU_batch_create_ex(GPU_PRIM_LINES, vbo, NULL, GPU_BATCH_OWNS_VBO);
- }
- return SHC.drw_arrows;
-}
-
-GPUBatch *DRW_cache_axis_names_get(void)
-{
- if (!SHC.drw_axis_names) {
- const float size = 0.1f;
- float v1[3], v2[3];
-
- /* Position Only 3D format */
- static GPUVertFormat format = { 0 };
- static struct { uint pos; } attr_id;
- if (format.attr_len == 0) {
- /* Using 3rd component as axis indicator */
- attr_id.pos = GPU_vertformat_attr_add(&format, "pos", GPU_COMP_F32, 3, GPU_FETCH_FLOAT);
- }
-
- /* Line */
- GPUVertBuf *vbo = GPU_vertbuf_create_with_format(&format);
- GPU_vertbuf_data_alloc(vbo, 14);
-
- /* X */
- copy_v3_fl3(v1, -size, size, 0.0f);
- copy_v3_fl3(v2, size, -size, 0.0f);
- GPU_vertbuf_attr_set(vbo, attr_id.pos, 0, v1);
- GPU_vertbuf_attr_set(vbo, attr_id.pos, 1, v2);
-
- copy_v3_fl3(v1, size, size, 0.0f);
- copy_v3_fl3(v2, -size, -size, 0.0f);
- GPU_vertbuf_attr_set(vbo, attr_id.pos, 2, v1);
- GPU_vertbuf_attr_set(vbo, attr_id.pos, 3, v2);
-
- /* Y */
- copy_v3_fl3(v1, -size + 0.25f * size, size, 1.0f);
- copy_v3_fl3(v2, 0.0f, 0.0f, 1.0f);
- GPU_vertbuf_attr_set(vbo, attr_id.pos, 4, v1);
- GPU_vertbuf_attr_set(vbo, attr_id.pos, 5, v2);
-
- copy_v3_fl3(v1, size - 0.25f * size, size, 1.0f);
- copy_v3_fl3(v2, -size + 0.25f * size, -size, 1.0f);
- GPU_vertbuf_attr_set(vbo, attr_id.pos, 6, v1);
- GPU_vertbuf_attr_set(vbo, attr_id.pos, 7, v2);
-
- /* Z */
- copy_v3_fl3(v1, -size, size, 2.0f);
- copy_v3_fl3(v2, size, size, 2.0f);
- GPU_vertbuf_attr_set(vbo, attr_id.pos, 8, v1);
- GPU_vertbuf_attr_set(vbo, attr_id.pos, 9, v2);
-
- copy_v3_fl3(v1, size, size, 2.0f);
- copy_v3_fl3(v2, -size, -size, 2.0f);
- GPU_vertbuf_attr_set(vbo, attr_id.pos, 10, v1);
- GPU_vertbuf_attr_set(vbo, attr_id.pos, 11, v2);
-
- copy_v3_fl3(v1, -size, -size, 2.0f);
- copy_v3_fl3(v2, size, -size, 2.0f);
- GPU_vertbuf_attr_set(vbo, attr_id.pos, 12, v1);
- GPU_vertbuf_attr_set(vbo, attr_id.pos, 13, v2);
-
- SHC.drw_axis_names = GPU_batch_create_ex(GPU_PRIM_LINES, vbo, NULL, GPU_BATCH_OWNS_VBO);
- }
- return SHC.drw_axis_names;
-}
-
GPUBatch *DRW_cache_image_plane_get(void)
{
if (!SHC.drw_image_plane) {