textureWrap()
Image / TexturesDescription
Defines if textures repeat or clamp when outside the texture boundary.
Syntax
void textureWrap(int mode)
Parameters
| Name | Type | Description |
|---|---|---|
| mode | int | CLAMP or REPEAT |
Returns
voidRelated
Under the Hood
From Processing.h:
void textureWrap(int mode);
Under the Hood
From Processing.cpp:
void PApplet::textureWrap(int mode){
textureWrapVal=mode;
GLint wrap=mode==REPEAT?GL_REPEAT:GL_CLAMP_TO_EDGE;
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,wrap);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,wrap);
}