Doesn't show texture after using fill()
in
Android Processing
•
2 years ago
Hi, i'm working in the 3D enviroment of processing on android and I have a problem with the fill command. after using it, it removes the textures i've used on the vertex. Here's my code:
- PImage[] img = new PImage[6];
- String textValue = "text.";
- PFont font;
- void setup() {
- size(screenWidth, screenHeight,A3D);
- orientation(LANDSCAPE); // the hot dog way
- smooth();
- noStroke();
- int start = 2;
- for(int x=0; x<6; x++){
- img[x] = loadImage("/sdcard/magazine/L-"+start+".png");
- start++;
- }
- }
- pushMatrix(); // linker helft
- translate(0,moveLeft);
- int addWidth = 335;
- int addHeight = 200;
- fill(0);
- text(textValue,width/2,height/2,200,1000,addZ);
- noFill();
- for(int x=0; x<img.length; x++){
- pushMatrix();
- translate(width+width/2-width-width-100, 0+(x*(height+addHeight+300)),addZ);
- rotateY(QUARTER_PI);
- beginShape();
- texture(img[x]);
- vertex(width/2, -addHeight, img[x].width, 0);
- vertex(width+addWidth, -addHeight, 0, 0);
- vertex(width+addWidth, height+addHeight, 0, img[x].height);
- vertex(width/2, height+addHeight, img[x].width, img[x].height);
- endShape();
- popMatrix();
- }
- popMatrix();
- }
1