# setTexture() not working in PGraphics window

**URL:** <https://discourse.processing.org/t/settexture-not-working-in-pgraphics-window/18629>\
**Category:** Coding Questions\
**Created:** [March 12, 2020, 11:22pm UTC](https://discourse.processing.org/t/settexture-not-working-in-pgraphics-window/18629 "2020-03-12T23:22:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Java.SourceForger](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/java.sourceforger/32/9831_2.png) [@Java.SourceForger](https://discourse.processing.org/u/Java.SourceForger)\
**Post date:** [March 12, 2020, 11:22pm UTC](https://discourse.processing.org/t/settexture-not-working-in-pgraphics-window/18629/1 "2020-03-12T23:22:49Z")

</div>

In my sketch, I have put my 3d rendering into a PGraphics object. But now, I have no way, whatsoever of drawing textures on PShape objects. The result is an invisible shape. Does anyone know what to do or has had this issue before?

**I tried…**

```auto
    model.setTexture(PImage);

```

```auto
 PShape face = new PShape();
      face = createShape();
      face.beginShape();
      face.textureMode(NORMAL);
      face.noStroke();
      face.texture(PImage); //<--------------------
      
      for (int v = 0; v < verts.length; v++) { //iterate through each vert
        String coords[] = split(verts[v], ",");
        String UVcoords[] = split(UVverts[v], ",");
        face.vertex(parseFloat(coords[0]), parseFloat(coords[1]), parseFloat(coords[2]), parseFloat(UVcoords[0]), 0-parseFloat(UVcoords[1]));
      }

      face.endShape(CLOSE);
      model.addChild(face);

```

```auto
 PShape face = new PShape();
      face = createShape();
      face.beginShape();
      face.textureMode(NORMAL);
      face.noStroke();
      PGraphicsObject.texture(PImage); //<--------------------
      
      for (int v = 0; v < verts.length; v++) { //iterate through each vert
        String coords[] = split(verts[v], ",");
        String UVcoords[] = split(UVverts[v], ",");
        face.vertex(parseFloat(coords[0]), parseFloat(coords[1]), parseFloat(coords[2]), parseFloat(UVcoords[0]), 0-parseFloat(UVcoords[1]));
      }

      face.endShape(CLOSE);
      model.addChild(face);

```

Nothing has worked.
