# Optimization question about WEBGL

**URL:** <https://discourse.processing.org/t/optimization-question-about-webgl/39196>\
**Category:** Coding Questions\
**Created:** [October 10, 2022, 5:48pm UTC](https://discourse.processing.org/t/optimization-question-about-webgl/39196 "2022-10-10T17:48:56Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![josephh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josephh/32/210_2.png) [@josephh](https://discourse.processing.org/u/josephh)\
**Post date:** [October 11, 2022, 8:53am UTC](https://discourse.processing.org/t/optimization-question-about-webgl/39196/2 "2022-10-11T08:53:58Z")

</div>

Hi @Omri,

I would say that making the whole canvas WEBGL is more optimized than using `createGraphics` and drawing it over the canvas since you have an additional overhead during compositing the two.

Also the default mode of p5.js is not PD2 but it uses the native HTML canvas in your browser 😉 (see [this](https://discourse.processing.org/t/making-use-of-the-gpu-to-render-huge-amount-of-objects/26267/3))

---

_[View the full topic](https://discourse.processing.org/t/optimization-question-about-webgl/39196)._
