a port of the Processing Visualization Language
Name

texture()

Examples
example pic
size(100, 100, P3D);
noStroke();
PImage a = loadImage("arch.jpg");
beginShape();
texture(a);
vertex(10, 20, 0, 0);
vertex(80, 5, 100, 0);
vertex(95, 90, 100, 100);
vertex(40, 95, 0, 100);
endShape();
Description

Sets a texture to be applied to vertex points. The texture() function must be called between beginShape() and endShape() and before any calls to vertex().

When textures are in use, the fill color is ignored. Instead, use tint() to specify the color of the texture as it is applied to the shape.

Syntax
texture(img)
Parameters
img PImage: the texture to apply
Returns None
Usage Web & Application
Related textureMode()
beginShape()
endShape()
vertex()

This reference is licensed under the CC BY-NC-SA 2.0 license:

Creative Commons License
Fork me on GitHub