BradLarson / GPUImage3

GPUImage 3 is a BSD-licensed Swift framework for GPU-accelerated video and image processing using Metal.
BSD 3-Clause "New" or "Revised" License
2.68k stars 330 forks source link

Switch filters #100

Open pxc052 opened 3 years ago

pxc052 commented 3 years ago

Hi, I want to switch between filters but the camera just freeze. func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { camera.removeAllTargets() currentFilter?.removeAllTargets() let filter = filters[indexPath.item] currentFilter = filter camera.addTarget(currentFilter) currentFilter.addTarget(renderView) }