# endDraw() error - M2 mac

**URL:** <https://discourse.processing.org/t/enddraw-error-m2-mac/40895>\
**Category:** Processing\
**Created:** [February 11, 2023, 1:24am UTC](https://discourse.processing.org/t/enddraw-error-m2-mac/40895 "2023-02-11T01:24:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mattleaf](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mattleaf/32/3400_2.png) [@mattleaf](https://discourse.processing.org/u/mattleaf)\
**Post date:** [February 11, 2023, 1:24am UTC](https://discourse.processing.org/t/enddraw-error-m2-mac/40895/1 "2023-02-11T01:24:55Z")

</div>

Howdy folks, it’s been a while since I’ve used Processing and now I’ve upgraded to an M2 Air.

I was just testing an old project on an Intel MBP first where everything is fine, now coming across to the M2 Air I seem to hit this error:

```auto
Cannot validate shader program:
Validation Failed: Current draw framebuffer is invalid.

```

This occurs after an endDraw();

Is there anything to be aware of on the new Macs with regard to renderers etc? I’m using P3D in the project.

My code is a total plate of spaghetti mess, but it works on Intel, just not here in the M2.

I’m using the 4.1.2 build as directed on the Processing website.

Cheers

---

<div class="post-metadata">

**Author:** ![mattleaf](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mattleaf/32/3400_2.png) [@mattleaf](https://discourse.processing.org/u/mattleaf)\
**Post date:** [February 11, 2023, 3:33am UTC](https://discourse.processing.org/t/enddraw-error-m2-mac/40895/2 "2023-02-11T03:33:31Z")

</div>

Ah, disregard.

I found the culprit. It appears to have been the smooth() call, for whatever reason.

I’m using a bunch of PGraphics, and the reference here gave me the clue:

> **[smooth() / Reference](https://processing.org/reference/smooth_.html)**
>
> Draws all geometry with smooth (anti-aliased) edges. This behavior is the default, so smooth() only needs to be used when a program needs to set the smoothing in a different way. The level para…

Cheers!
