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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2020-03-17 18:27:08 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2020-03-18 13:23:05 +0300
commitfd53b72871e045dfebfb9ddbe2b3c491491aa913 (patch)
tree892721f97e6bff16c9d87bc3ffee295d2f4a77bc /source/blender/draw/intern/draw_cache_impl.h
parentb0a1cf2c9ae696b07f7a236bc855a5ab4a493dcb (diff)
Objects: Eevee and workbench rendering of new Volume, Hair, PointCloud
Only the volume drawing part is really finished and exposed to the user. Hair plugs into the existing hair rendering code and is fairly straightforward. The pointcloud drawing is a hack using overlays rather than Eevee and workbench. The most tricky part for volume rendering is the case where each volume grid has a different transform, which requires an additional matrix in the shader and non-trivial logic in Eevee volume drawing. In the common case were all the transforms match we don't use the additional per-grid matrix in the shader. Ref T73201, T68981 Differential Revision: https://developer.blender.org/D6955
Diffstat (limited to 'source/blender/draw/intern/draw_cache_impl.h')
-rw-r--r--source/blender/draw/intern/draw_cache_impl.h33
1 files changed, 32 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl.h b/source/blender/draw/intern/draw_cache_impl.h
index 755f794d201..b3450bf4715 100644
--- a/source/blender/draw/intern/draw_cache_impl.h
+++ b/source/blender/draw/intern/draw_cache_impl.h
@@ -32,11 +32,14 @@ struct ModifierData;
struct PTCacheEdit;
struct ParticleSystem;
+struct bGPdata;
struct Curve;
+struct Hair;
struct Lattice;
struct Mesh;
struct MetaBall;
-struct bGPdata;
+struct PointCloud;
+struct Volume;
/* Expose via BKE callbacks */
void DRW_mball_batch_cache_dirty_tag(struct MetaBall *mb, int mode);
@@ -61,11 +64,26 @@ void DRW_particle_batch_cache_free(struct ParticleSystem *psys);
void DRW_gpencil_batch_cache_dirty_tag(struct bGPdata *gpd);
void DRW_gpencil_batch_cache_free(struct bGPdata *gpd);
+void DRW_hair_batch_cache_dirty_tag(struct Hair *hair, int mode);
+void DRW_hair_batch_cache_validate(struct Hair *hair);
+void DRW_hair_batch_cache_free(struct Hair *hair);
+
+void DRW_pointcloud_batch_cache_dirty_tag(struct PointCloud *pointcloud, int mode);
+void DRW_pointcloud_batch_cache_validate(struct PointCloud *pointcloud);
+void DRW_pointcloud_batch_cache_free(struct PointCloud *pointcloud);
+
+void DRW_volume_batch_cache_dirty_tag(struct Volume *volume, int mode);
+void DRW_volume_batch_cache_validate(struct Volume *volume);
+void DRW_volume_batch_cache_free(struct Volume *volume);
+
/* Garbage collection */
void DRW_batch_cache_free_old(struct Object *ob, int ctime);
void DRW_mesh_batch_cache_free_old(struct Mesh *me, int ctime);
+/* Generic */
+void DRW_vertbuf_create_wiredata(struct GPUVertBuf *vbo, const int vert_len);
+
/* Curve */
void DRW_curve_batch_cache_create_requested(struct Object *ob);
@@ -118,6 +136,19 @@ struct GPUBatch *DRW_lattice_batch_cache_get_all_edges(struct Lattice *lt,
struct GPUBatch *DRW_lattice_batch_cache_get_all_verts(struct Lattice *lt);
struct GPUBatch *DRW_lattice_batch_cache_get_edit_verts(struct Lattice *lt);
+/* Hair */
+int DRW_hair_material_count_get(struct Hair *hair);
+
+/* PointCloud */
+int DRW_pointcloud_material_count_get(struct PointCloud *pointcloud);
+
+struct GPUBatch *DRW_pointcloud_batch_cache_get_dots(struct Object *ob);
+
+/* Volume */
+int DRW_volume_material_count_get(struct Volume *volume);
+
+struct GPUBatch *DRW_volume_batch_cache_get_wireframes_face(struct Volume *volume);
+
/* Mesh */
void DRW_mesh_batch_cache_create_requested(struct Object *ob,
struct Mesh *me,