テクスチャをU方向、V方向にフリップさせながら
マッピングします。4回繰り返してマッピングする
ようにUV値を指定しています。
poly[0].x = 100.f;
poly[0].y = 100.f;
poly[0].z = 0.5f;
poly[0].u = 0.f;
poly[0].v = 0.f;
poly[0].col = 0xFFFFFFFF;
poly[1].x = 100.f;
poly[1].y = 200.f;
poly[1].z = 0.5f;
poly[1].u = 0.f;
poly[1].v = 4.f;
poly[1].col = 0xFFFFFFFF;
poly[2].x = 300.f;
poly[2].y = 100.f;
poly[2].z = 0.5f;
poly[2].u = 4.f;
poly[2].v = 0.f;
poly[2].col = 0xFFFFFFFF;
poly[3].x = 300.f;
poly[3].y = 200.f;
poly[3].z = 0.5f;
poly[3].u = 4.f;
poly[3].v = 4.f;
poly[3].col = 0xFFFFFFFF;
/* Clamping is not applied in either
the U direction or the V direction */
njTextureClampMode(NJD_TEXTURECLAMP_NOCLAMP);
/* The texture is flipped in both the U direction
and the V direction */
njTextureFlipMode( NJD_TEXTUREFLIP_FLIP_UV );
njSetTextureNum(0);
njDrawTextureEx( poly, 4, FALSE);