diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-04-15 09:46:17 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-04-19 17:38:44 +0300 |
commit | cdba73c8faf7ec28de66b380ed2952d42a2aac38 (patch) | |
tree | a8c07ccfcbf3fe513ba1c83cfc392a0d5a903841 /source/blender/draw/intern/draw_cache.c | |
parent | ce6b01f203caae98a648bb3024479dba2e033c2a (diff) |
Draw Manager: curve support
Draws the curve centerline and editmode verts/handles.
Handle theme colors, and normal display still need adding.
Diffstat (limited to 'source/blender/draw/intern/draw_cache.c')
-rw-r--r-- | source/blender/draw/intern/draw_cache.c | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_cache.c b/source/blender/draw/intern/draw_cache.c index 8e6c64943bd..92acc8073df 100644 --- a/source/blender/draw/intern/draw_cache.c +++ b/source/blender/draw/intern/draw_cache.c @@ -31,8 +31,9 @@ #include "BLI_utildefines.h" #include "BLI_math.h" -#include "BKE_mesh_render.h" +#include "BKE_curve_render.h" #include "BKE_lattice_render.h" +#include "BKE_mesh_render.h" #include "GPU_batch.h" @@ -1592,6 +1593,47 @@ Batch *DRW_cache_mesh_verts_get(Object *ob) /* -------------------------------------------------------------------- */ +/** \name Curve + * \{ */ + +Batch *DRW_cache_curve_edge_wire_get(Object *ob) +{ + Batch *surface = NULL; + + BLI_assert(ob->type == OB_CURVE); + + struct Curve *cu = ob->data; + surface = BKE_curve_batch_cache_get_wire_edge(cu, ob->curve_cache); + + return surface; +} + +Batch *DRW_cache_curve_edge_overlay_get(Object *ob) +{ + Batch *surface = NULL; + + BLI_assert(ob->type == OB_CURVE); + + struct Curve *cu = ob->data; + surface = BKE_curve_batch_cache_get_overlay_edges(cu); + + return surface; +} + +Batch *DRW_cache_curve_vert_overlay_get(Object *ob) +{ + Batch *surface = NULL; + + BLI_assert(ob->type == OB_CURVE); + + struct Curve *cu = ob->data; + surface = BKE_curve_batch_cache_get_overlay_verts(cu); + + return surface; +} + +/* -------------------------------------------------------------------- */ + /** \name Lattice * \{ */ |