diff options
author | Jeroen Bakker <jeroen@blender.org> | 2020-10-07 14:49:14 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2020-10-07 17:18:12 +0300 |
commit | 0796807720882731cdb70be144aa182e9b0b9ee5 (patch) | |
tree | 5063394eb04b828e5d7f18db3baa5e5753dea2a0 /source/blender/draw | |
parent | 13391038a5ce38835e1a7e9aa727f9c78f2e8dcd (diff) |
CleanUp: Introduce `eMeshBatchDirtyMode` enum
It used to be an `int mode`.
Diffstat (limited to 'source/blender/draw')
9 files changed, 18 insertions, 16 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl.h b/source/blender/draw/intern/draw_cache_impl.h index e5cc18f6e09..95cdb849e63 100644 --- a/source/blender/draw/intern/draw_cache_impl.h +++ b/source/blender/draw/intern/draw_cache_impl.h @@ -41,38 +41,40 @@ struct PointCloud; struct Volume; struct bGPdata; +#include "BKE_mesh_types.h" + /* Expose via BKE callbacks */ -void DRW_mball_batch_cache_dirty_tag(struct MetaBall *mb, int mode); +void DRW_mball_batch_cache_dirty_tag(struct MetaBall *mb, eMeshBatchDirtyMode mode); void DRW_mball_batch_cache_validate(struct MetaBall *mb); void DRW_mball_batch_cache_free(struct MetaBall *mb); -void DRW_curve_batch_cache_dirty_tag(struct Curve *cu, int mode); +void DRW_curve_batch_cache_dirty_tag(struct Curve *cu, eMeshBatchDirtyMode mode); void DRW_curve_batch_cache_validate(struct Curve *cu); void DRW_curve_batch_cache_free(struct Curve *cu); -void DRW_mesh_batch_cache_dirty_tag(struct Mesh *me, int mode); +void DRW_mesh_batch_cache_dirty_tag(struct Mesh *me, eMeshBatchDirtyMode mode); void DRW_mesh_batch_cache_validate(struct Mesh *me); void DRW_mesh_batch_cache_free(struct Mesh *me); -void DRW_lattice_batch_cache_dirty_tag(struct Lattice *lt, int mode); +void DRW_lattice_batch_cache_dirty_tag(struct Lattice *lt, eMeshBatchDirtyMode mode); void DRW_lattice_batch_cache_validate(struct Lattice *lt); void DRW_lattice_batch_cache_free(struct Lattice *lt); -void DRW_particle_batch_cache_dirty_tag(struct ParticleSystem *psys, int mode); +void DRW_particle_batch_cache_dirty_tag(struct ParticleSystem *psys, eMeshBatchDirtyMode mode); 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_dirty_tag(struct Hair *hair, eMeshBatchDirtyMode 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_dirty_tag(struct PointCloud *pointcloud, eMeshBatchDirtyMode 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_dirty_tag(struct Volume *volume, eMeshBatchDirtyMode mode); void DRW_volume_batch_cache_validate(struct Volume *volume); void DRW_volume_batch_cache_free(struct Volume *volume); diff --git a/source/blender/draw/intern/draw_cache_impl_curve.c b/source/blender/draw/intern/draw_cache_impl_curve.c index 938c26a9cdf..01fe43e081f 100644 --- a/source/blender/draw/intern/draw_cache_impl_curve.c +++ b/source/blender/draw/intern/draw_cache_impl_curve.c @@ -484,7 +484,7 @@ static CurveBatchCache *curve_batch_cache_get(Curve *cu) return cu->batch_cache; } -void DRW_curve_batch_cache_dirty_tag(Curve *cu, int mode) +void DRW_curve_batch_cache_dirty_tag(Curve *cu, eMeshBatchDirtyMode mode) { CurveBatchCache *cache = cu->batch_cache; if (cache == NULL) { diff --git a/source/blender/draw/intern/draw_cache_impl_hair.c b/source/blender/draw/intern/draw_cache_impl_hair.c index 327a92a997e..aeb53418392 100644 --- a/source/blender/draw/intern/draw_cache_impl_hair.c +++ b/source/blender/draw/intern/draw_cache_impl_hair.c @@ -90,7 +90,7 @@ static HairBatchCache *hair_batch_cache_get(Hair *hair) return hair->batch_cache; } -void DRW_hair_batch_cache_dirty_tag(Hair *hair, int mode) +void DRW_hair_batch_cache_dirty_tag(Hair *hair, eMeshBatchDirtyMode mode) { HairBatchCache *cache = hair->batch_cache; if (cache == NULL) { diff --git a/source/blender/draw/intern/draw_cache_impl_lattice.c b/source/blender/draw/intern/draw_cache_impl_lattice.c index 0f80b5159a7..0c5bbbb89f5 100644 --- a/source/blender/draw/intern/draw_cache_impl_lattice.c +++ b/source/blender/draw/intern/draw_cache_impl_lattice.c @@ -294,7 +294,7 @@ static LatticeBatchCache *lattice_batch_cache_get(Lattice *lt) return lt->batch_cache; } -void DRW_lattice_batch_cache_dirty_tag(Lattice *lt, int mode) +void DRW_lattice_batch_cache_dirty_tag(Lattice *lt, eMeshBatchDirtyMode mode) { LatticeBatchCache *cache = lt->batch_cache; if (cache == NULL) { diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c index 66865fcfde6..eb0aef40216 100644 --- a/source/blender/draw/intern/draw_cache_impl_mesh.c +++ b/source/blender/draw/intern/draw_cache_impl_mesh.c @@ -626,7 +626,7 @@ static void mesh_batch_cache_discard_uvedit_select(MeshBatchCache *cache) cache->batch_ready &= ~MBC_EDITUV; } -void DRW_mesh_batch_cache_dirty_tag(Mesh *me, int mode) +void DRW_mesh_batch_cache_dirty_tag(Mesh *me, eMeshBatchDirtyMode mode) { MeshBatchCache *cache = me->runtime.batch_cache; if (cache == NULL) { diff --git a/source/blender/draw/intern/draw_cache_impl_metaball.c b/source/blender/draw/intern/draw_cache_impl_metaball.c index 53c31ac3de8..91d9f134da2 100644 --- a/source/blender/draw/intern/draw_cache_impl_metaball.c +++ b/source/blender/draw/intern/draw_cache_impl_metaball.c @@ -112,7 +112,7 @@ static MetaBallBatchCache *metaball_batch_cache_get(MetaBall *mb) return mb->batch_cache; } -void DRW_mball_batch_cache_dirty_tag(MetaBall *mb, int mode) +void DRW_mball_batch_cache_dirty_tag(MetaBall *mb, eMeshBatchDirtyMode mode) { MetaBallBatchCache *cache = mb->batch_cache; if (cache == NULL) { diff --git a/source/blender/draw/intern/draw_cache_impl_particles.c b/source/blender/draw/intern/draw_cache_impl_particles.c index 52d1fcfdb80..e04da8e2686 100644 --- a/source/blender/draw/intern/draw_cache_impl_particles.c +++ b/source/blender/draw/intern/draw_cache_impl_particles.c @@ -157,7 +157,7 @@ static ParticleBatchCache *particle_batch_cache_get(ParticleSystem *psys) return psys->batch_cache; } -void DRW_particle_batch_cache_dirty_tag(ParticleSystem *psys, int mode) +void DRW_particle_batch_cache_dirty_tag(ParticleSystem *psys, eMeshBatchDirtyMode mode) { ParticleBatchCache *cache = psys->batch_cache; if (cache == NULL) { diff --git a/source/blender/draw/intern/draw_cache_impl_pointcloud.c b/source/blender/draw/intern/draw_cache_impl_pointcloud.c index 74020a228e7..bd34760ca4e 100644 --- a/source/blender/draw/intern/draw_cache_impl_pointcloud.c +++ b/source/blender/draw/intern/draw_cache_impl_pointcloud.c @@ -106,7 +106,7 @@ static PointCloudBatchCache *pointcloud_batch_cache_get(PointCloud *pointcloud) return pointcloud->batch_cache; } -void DRW_pointcloud_batch_cache_dirty_tag(PointCloud *pointcloud, int mode) +void DRW_pointcloud_batch_cache_dirty_tag(PointCloud *pointcloud, eMeshBatchDirtyMode mode) { PointCloudBatchCache *cache = pointcloud->batch_cache; if (cache == NULL) { diff --git a/source/blender/draw/intern/draw_cache_impl_volume.c b/source/blender/draw/intern/draw_cache_impl_volume.c index 10bacadb199..b9eef066533 100644 --- a/source/blender/draw/intern/draw_cache_impl_volume.c +++ b/source/blender/draw/intern/draw_cache_impl_volume.c @@ -107,7 +107,7 @@ static VolumeBatchCache *volume_batch_cache_get(Volume *volume) return volume->batch_cache; } -void DRW_volume_batch_cache_dirty_tag(Volume *volume, int mode) +void DRW_volume_batch_cache_dirty_tag(Volume *volume, eMeshBatchDirtyMode mode) { VolumeBatchCache *cache = volume->batch_cache; if (cache == NULL) { |