S3DR_SetTextureCoordinates()

Syntax

S3DR_SetTextureCoordinates(TU1.f,TV1.f,TU2.f,TV2.f,TU3.f,TV3.f,TU4.f,TV4.f)

Description

This command sets the texture coordinates for the selected Texture.
The value of a texture coordinate is from 0.0 To 1.0.
You can calculate the texture coordinate with that formula:
tu.f=X.l/SpriteWidth.l
tv.f=Y.l/SpriteHeight.l

 tu1,tv1         tu2,tv2
   +--------------+
    |               |
    |               |
    |               |
    |               |
   +--------------+
 tu3,tv3         tu4,tv4

The default is S3DR_SetTextureCoordinates(0,0,1,0,0,1,1,1).

This command must be inside of a S3DR_BeginReal3D()...S3DR_EndReal3D() block.

Supported OS

Windows

Sprite3DReal - Index