Open topic with navigation
<texture>.wrap
This will change the wrap mode of the texture
<texture>.wrap( |
|
parameter |
mode |
) |
|
parameter
This can be one of the following values:
viz.WRAP_S
viz.WRAP_T
viz.WRAP_R
mode
This can be one of the following values:
viz.CLAMP
viz.CLAMP_TO_EDGE
viz.CLAMP_TO_BORDER
viz.REPEAT
viz.MIRROR
Remarks
Use this command to change the OpenGL wrap mode of the texture.
The first parameter determines which texture coordinate axis the wrap mode is set for.
The wrap mode changes how the texture coordinates will map to the object geometry. Basically, CLAMP mode stretches the texture across the object while REPEAT tiles the texture. Default is REPEAT.
Return Value
None
Example
tex = viz.addTexture('picture.jpg')
# Disable repeating of the texture
tex.wrap(viz.WRAP_S,viz.CLAMP)
tex.wrap(viz.WRAP_T,viz.CLAMP)
See also