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:
authorCampbell Barton <ideasman42@gmail.com>2017-04-15 09:46:17 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-04-19 17:38:44 +0300
commitcdba73c8faf7ec28de66b380ed2952d42a2aac38 (patch)
treea8c07ccfcbf3fe513ba1c83cfc392a0d5a903841 /source/blender/draw/intern/draw_cache.c
parentce6b01f203caae98a648bb3024479dba2e033c2a (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.c44
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
* \{ */