export PGraphics with transparent texture
in
Programming Questions
•
2 years ago
Hello,
I'm kind of stuck here. I'd like to export a png file with transparency from a pgraphics containing textures with transparency...
My simplified code:
I'm kind of stuck here. I'd like to export a png file with transparency from a pgraphics containing textures with transparency...
My simplified code:
- PGraphics pg = createGraphics(width, height, P2D);
- pg.beginDraw();
- pg.textureMode(NORMALIZED);
- for(int i = 0; i < fnb; i++){
- pg.beginShape();
- pg.texture(bigTex);//bigTex is a PImage containing a png with transparency
- /*insert some vertex stuff here */
- pg.endShape();
- }
- pg.endDraw();
- pg.save(frameCount+".png");
1