diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-07-06 11:17:58 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-07-06 11:17:58 +0300 |
commit | 1daa20ad9f6f0c433a4e0a97a74e5beb9ea4e2c7 (patch) | |
tree | 982857c47d650cb3f53df065cdcbcca827bff56d /intern/cycles/render/particles.cpp | |
parent | 62fbb7d4a10bea1ce88a486657a87743b93c9fd1 (diff) |
Cleanup: strip trailing space for cycles
Diffstat (limited to 'intern/cycles/render/particles.cpp')
-rw-r--r-- | intern/cycles/render/particles.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/intern/cycles/render/particles.cpp b/intern/cycles/render/particles.cpp index e4be3306d7e..0583556c8a9 100644 --- a/intern/cycles/render/particles.cpp +++ b/intern/cycles/render/particles.cpp @@ -61,12 +61,12 @@ void ParticleSystemManager::device_update_particles(Device *, DeviceScene *dscen int num_particles = 1; for(size_t j = 0; j < scene->particle_systems.size(); j++) num_particles += scene->particle_systems[j]->particles.size(); - + KernelParticle *kparticles = dscene->particles.alloc(num_particles); - + /* dummy particle */ memset(kparticles, 0, sizeof(KernelParticle)); - + int i = 1; for(size_t j = 0; j < scene->particle_systems.size(); j++) { ParticleSystem *psys = scene->particle_systems[j]; @@ -74,7 +74,7 @@ void ParticleSystemManager::device_update_particles(Device *, DeviceScene *dscen for(size_t k = 0; k < psys->particles.size(); k++) { /* pack in texture */ Particle& pa = psys->particles[k]; - + kparticles[i].index = pa.index; kparticles[i].age = pa.age; kparticles[i].lifetime = pa.lifetime; @@ -83,13 +83,13 @@ void ParticleSystemManager::device_update_particles(Device *, DeviceScene *dscen kparticles[i].location = float3_to_float4(pa.location); kparticles[i].velocity = float3_to_float4(pa.velocity); kparticles[i].angular_velocity = float3_to_float4(pa.angular_velocity); - + i++; - + if(progress.get_cancel()) return; } } - + dscene->particles.copy_to_device(); } @@ -105,9 +105,9 @@ void ParticleSystemManager::device_update(Device *device, DeviceScene *dscene, S progress.set_status("Updating Particle Systems", "Copying Particles to device"); device_update_particles(device, dscene, scene, progress); - + if(progress.get_cancel()) return; - + need_update = false; } @@ -122,4 +122,3 @@ void ParticleSystemManager::tag_update(Scene * /*scene*/) } CCL_NAMESPACE_END - |