texture and shape
in
Android Processing
•
1 year ago
Can't seem to get texture to work on device (Galaxy S) or emulator.
I know the image loads, and I've tried different renders. Screen is just black.
Works in javascript and java.
2.0b3
Thanks
- PImage img;
- void setup() {
- size(400, 500, P3D);
- img = loadImage("portr1.jpg");
- }
- void draw() {
- // image(img, 0, 0); // works
- beginShape();
- texture(img);
- vertex(0, 0, 0, 0);
- vertex(img.width, 0, img.width, 0);
- vertex(img.width, img.height, img.width, img.height);
- vertex(0, img.height, 0, img.height);
- endShape();
- }
1