Texture problem with AddMesh...

Blitz3D Forums/Blitz3D Programming/Texture problem with AddMesh...

No, they are not welded, but I'm sure there is a welding routine in the archives. For a cube-based shape, you need to generate texture coordinates for each side.
Say, for all sides that point to the front, you can ignore the Z-coordinate and base the UV coordinates on the XY coordinates. To make them fit the mesh, divide the XY coordinates with MeshWidth(). For the back sides goes the same, only the X coordinate should be reversed (-X).
For the left/right side, use Z and X, and for the upper/lower side, use X and Z.
For distinguising the different sides from each other, you could use the normals. For all front sides, the normal is either (0, 0, -1) or (0, 0, 1). You'd have to try that. Because the UpdateNormals() command in Blitz generates vertex normals rather than face normals, you could better try the MeshNormals routine here: http://www.blitzbasic.com/Community/posts.php?topic=64797
(It is a routine by Stevie, in his 2nd post in that topic.
) To use it, you need the Unweld function too (it is on the same page), however I think cubes, created with CreateCube() are unwelded by default.