# Issue with a texture from createGraphics()

**URL:** <https://discourse.processing.org/t/issue-with-a-texture-from-creategraphics/21421>\
**Category:** Coding Questions\
**Created:** [May 30, 2020, 4:39am UTC](https://discourse.processing.org/t/issue-with-a-texture-from-creategraphics/21421 "2020-05-30T04:39:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![d128](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/d128/32/9281_2.png) [@d128](https://discourse.processing.org/u/d128)\
**Post date:** [May 30, 2020, 4:39am UTC](https://discourse.processing.org/t/issue-with-a-texture-from-creategraphics/21421/1 "2020-05-30T04:39:34Z")

</div>

Hi everyone, I’m applying a texture in a box from a createGraphics() with a rotating sphere. When I’m doing this, the sphere on the texture starts to ‘dissapear’ (something similar when the background isn’t updated).

I’m I missing somenthing in my code?

```auto
let canvas1;
let n = 0.0;

function setup() {
  createCanvas(windowWidth, windowHeight, WEBGL);
  canvas1 = createGraphics(windowWidth, windowHeight, WEBGL);
}

function draw() {
  canvas1.background(0, 255);
  canvas1.rotateY(n);
  canvas1.sphere(250);
  
  background(128);
  orbitControl();
  texture(canvas1);
  box(500);
  n += 0.001;
}

```

Thanks!

---

<div class="post-metadata">

**Author:** ![Sven](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sven/32/8293_2.png) [@Sven](https://discourse.processing.org/u/Sven)\
**Post date:** [May 30, 2020, 10:38am UTC](https://discourse.processing.org/t/issue-with-a-texture-from-creategraphics/21421/2 "2020-05-30T10:38:48Z")

</div>

Hi @d128,

I can’t say that I experience the disappearance you describe. This is what it looks like for me in Safari, Chrome, and Firefox on macOS.

![Rotating sphere.](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/a/aba55fac1693273c0de82d70040b2dd9d0743918.gif)
