I’m not sure there are many built-in examples of this. Look under Topics / Textures. Only the sphere example builds a PShape with texture coordinates I think.
IIRC there’s an issue where you can’t change the texture for the shape later. I think I managed this by using a PGraphics as the texture and drawing video, etc. into that first if you need it to update.
i’m figuring out that the issue is not with the PShape itself, it’s with the PGraphics itself.
i’ve dumped all the PShapes, commented color sampling, using ‘live’ vector data and the problem is still the same. it starts with 9.5 fps and keeps dropping to 0.3. it looks like it’s in a giant loop that’s redrawing the vector data all over.
it’s funny cause when i draw them out of PGraph it runs smoothly
I just noticed what might be an obvious problem. You’re calling pg.beginDraw() and pg.endDraw() in every brick display. Just do this once in your main draw method.