Preliminary texture mapping support.
Maps a texture onto triangles being built
from vertices according to the chosen formation.
Optional indices can be used to avoid rearrangement of vertex lists,
otherwise the vertex list is processed consecutively, i.e. as if indices
are ascending numbers starting at zero.
Either the number of indices (if non NULL) or the number of vertices is
specified by num and has to be three at least. If the chosen formation
is DTTF_LIST it also has to be a multiple of three.