예제 #1
0
void marching_cubes_finish() {
  
  glDeleteBuffers(1, &point_positions);
  glDeleteBuffers(1, &point_colors);
    
  kernel_memory_delete(volume);
  kernel_memory_delete(point_color_buffer);
  
  glDeleteBuffers(1, &vertex_positions);
  glDeleteBuffers(1, &vertex_normals);

  kernel_memory_delete(vertex_positions_buffer);
  kernel_memory_delete(vertex_normals_buffer);
  kernel_memory_delete(vertex_index);
  
}
예제 #2
0
void particles_finish() {
  
#ifndef CPU_ONLY
  kernel_memory_delete(k_particle_positions);
  kernel_memory_delete(k_particle_velocities);
  kernel_memory_delete(k_particle_lifetimes);
  kernel_memory_delete(k_particle_randoms);
#endif
  
  glDeleteBuffers(1, &positions_buffer);
  glDeleteBuffers(1, &velocities_buffer);
  glDeleteBuffers(1, &lifetimes_buffer);
  glDeleteBuffers(1, &randoms_buffer);
  
  free(particle_positions);
  free(particle_velocities);
  free(particle_lifetimes);
  free(particle_randoms);
  
}