setTexXY

HC Graphics Texturing setTexXY
Texture setTexPos

setTexXY x y


sets the OpenGL texture coordinates to (x,y). x and y should be in the range of 0..1 for displaying only one occurence of the texture. If the values are greater the texture is repeated.

This primitive is useful with PolyStart..PolyEnd and TessStart..TessEnd.

Example:

entex
bricks=loadImage "bricks.png
tex=texture bricks
setpc "white
PolyStart
setTexXY 0 1 fd 100 rt 90
setTexXY 1 1 fd 100 rt 90
setTexXY 1 0 fd 100 rt 90
setTexXY 0 0 fd 100 rt 90
PolyEnd

Example:

References:

Texture setTexPos