texture()
Image / TexturesDescription
Sets a texture to be applied to vertex points. Must be called between beginShape() and endShape().
Syntax
void texture(PImage& img)
Parameters
| Name | Type | Description |
|---|---|---|
| img | PImage | image to use as texture |
Returns
voidRelated
Under the Hood
From Processing.h:
void texture(PImage& img);
Under the Hood
From Processing.cpp:
void PApplet::texture(PImage& img){
if(img.dirty)img.uploadTexture();
if(img.texID){ glEnable(GL_TEXTURE_2D);glBindTexture(GL_TEXTURE_2D,img.texID); }
}