# Which instance actually executes beginDraw() and endDraw()?

**URL:** https://discourse.processing.org/t/which-instance-actually-executes-begindraw-and-enddraw/42057
**Category:** Coding Questions
**Created:** [May 23, 2023, 6:43am UTC](https://discourse.processing.org/t/which-instance-actually-executes-begindraw-and-enddraw/42057 "2023-05-23T06:43:22Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![scudly](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/scudly/32/5597_2.png) [@scudly](https://discourse.processing.org/u/scudly)
#### Post date: [May 23, 2023, 6:33pm UTC](https://discourse.processing.org/t/which-instance-actually-executes-begindraw-and-enddraw/42057/3 "2023-05-23T18:33:58Z")

</div>

Except that you shouldn’t update the angle `ang+=0.01;` inside the `draws()` function otherwise the two images will be at slightly different angles. Move the `ang` update back out to `draw()` instead so it only gets called once per frame.

This is similar to the code I used for stereo imaging: [https://discourse.processing.org/t/cross-eyed-stereoscopy/38637](https://discourse.processing.org/t/cross-eyed-stereoscopy/38637).

---

_[View the full topic](https://discourse.processing.org/t/which-instance-actually-executes-begindraw-and-enddraw/42057)._
