textureWrap()

Image / Textures

Description

Defines if textures repeat or clamp when outside the texture boundary.

Syntax

void textureWrap(int mode)

Parameters

NameTypeDescription
modeintCLAMP or REPEAT

Returns

void

Related

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); }