Maybe that did work under an earlier version but in the current build you end up with only one poly on each face. Or at least, I do.
The following however does work; each face is textured as you'd expect looking towards each direction:
Code: Select all
// create front side
Material[2] = mat;
Material[2].Textures[0] = front;
Vertices[8] = video::S3DVertex( l,-l, l, 0,0,1, video::SColor(255,255,255,255), t, t);
Vertices[9] = video::S3DVertex(-l,-l, l, 0,0,1, video::SColor(255,255,255,255), o, t);
Vertices[10] = video::S3DVertex(-l, l, l, 0,0,1, video::SColor(255,255,255,255), o, o);
Vertices[11] = video::S3DVertex( l, l, l, 0,0,1, video::SColor(255,255,255,255), t, o);
// create left side
Material[3] = mat;
Material[3].Textures[0] = left;
Vertices[12] = video::S3DVertex(-l,-l, l, -1,0,0, video::SColor(255,255,255,255), t, t);
Vertices[13] = video::S3DVertex(-l,-l,-l, -1,0,0, video::SColor(255,255,255,255), o, t);
Vertices[14] = video::S3DVertex(-l, l,-l, -1,0,0, video::SColor(255,255,255,255), o, o);
Vertices[15] = video::S3DVertex(-l, l, l, -1,0,0, video::SColor(255,255,255,255), t, o);
// create back side
Material[0] = mat;
Material[0].Textures[0] = back;
Vertices[0] = video::S3DVertex(-l,-l,-l, 0,0,-1, video::SColor(255,255,255,255), t, t);
Vertices[1] = video::S3DVertex( l,-l,-l, 0,0,-1, video::SColor(255,255,255,255), o, t);
Vertices[2] = video::S3DVertex( l, l,-l, 0,0,-1, video::SColor(255,255,255,255), o, o);
Vertices[3] = video::S3DVertex(-l, l,-l, 0,0,-1, video::SColor(255,255,255,255), t, o);
// create right side
Material[1] = mat;
Material[1].Textures[0] = right;
Vertices[4] = video::S3DVertex( l,-l,-l, 1,0,0, video::SColor(255,255,255,255), t, t);
Vertices[5] = video::S3DVertex( l,-l, l, 1,0,0, video::SColor(255,255,255,255), o, t);
Vertices[6] = video::S3DVertex( l, l, l, 1,0,0, video::SColor(255,255,255,255), o, o);
Vertices[7] = video::S3DVertex( l, l,-l, 1,0,0, video::SColor(255,255,255,255), t, o);
// create top side
Material[4] = mat;
Material[4].Textures[0] = top;
Vertices[16] = video::S3DVertex( l, l, l, 0,1,0, video::SColor(255,255,255,255), t, t);
Vertices[17] = video::S3DVertex(-l, l, l, 0,1,0, video::SColor(255,255,255,255), o, t);
Vertices[18] = video::S3DVertex(-l, l,-l, 0,1,0, video::SColor(255,255,255,255), o, o);
Vertices[19] = video::S3DVertex( l, l,-l, 0,1,0, video::SColor(255,255,255,255), t, o);
// create bottom side
Material[5] = mat;
Material[5].Textures[0] = bottom;
Vertices[20] = video::S3DVertex(-l,-l, l, 0,-1,0, video::SColor(255,255,255,255), o, o);
Vertices[21] = video::S3DVertex( l,-l, l, 0,-1,0, video::SColor(255,255,255,255), t, o);
Vertices[22] = video::S3DVertex( l,-l,-l, 0,-1,0, video::SColor(255,255,255,255), t, t);
Vertices[23] = video::S3DVertex(-l,-l,-l, 0,-1,0, video::SColor(255,255,255,255), o, t);