Adding an .obj file

Try loading both the shape and image from setup() with everything else in draw(). For example:

void setup() {
  size(1000, 1000, P3D);
  obj = loadShape("dalle_2.obj");
  txtr = loadImage("grid3.jpg");
}

Personally, I would do away with the objAbstractShape() function and I’m not sure you really need pushMatrix() and popMatrix() unless there is more to your project than is being shown.

1 Like