# How to use filter on PGraphics in thread?

**URL:** https://discourse.processing.org/t/how-to-use-filter-on-pgraphics-in-thread/44949
**Category:** Coding Questions
**Created:** [August 16, 2024, 9:19pm UTC](https://discourse.processing.org/t/how-to-use-filter-on-pgraphics-in-thread/44949 "2024-08-16T21:19:43Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)
#### Post date: [August 16, 2024, 10:28pm UTC](https://discourse.processing.org/t/how-to-use-filter-on-pgraphics-in-thread/44949/2 "2024-08-16T22:28:11Z")

</div>

> [@Problems when trying to draw to a P3D PGraphics when called from a thread?](https://discourse.processing.org/t/problems-when-trying-to-draw-to-a-p3d-pgraphics-when-called-from-a-thread/6301/4):
>
> Although it’s pretty much a hack, here’s the workaround I’ve come up w/: crazy_face /\*\* \* Threaded PGraphics II (v1.0.1) \* GoToLoop (2018/Dec/07) \* \* https://Discourse.Processing.org/t/ \* problems-when-trying-to-draw-to-a-p3d-pgraphics- \* when-called-from-a-thread/6301/4 \* \* https://Forum.Processing.org/two/discussion/25799/ \* how-to-draw-a-rect-in-a-thread#Item\_2 \*/ static final int W = 250, H = 200, FPS = 10; Layer layer; void settings() { size(W, H, JAVA2D); smooth(3); } v…

---

_[View the full topic](https://discourse.processing.org/t/how-to-use-filter-on-pgraphics-in-thread/44949)._
