Texture on one side of cylinder

Transporter

13-08-2013 10:15:22

Hi,

I create a cylinder like this:
Ogre::MeshPtr pMesh = Procedural::CylinderGenerator().setRadius(MAN_RADIUS).setCapped(true).setHeight(MAN_HEIGHT).setNumSegHeight(1).realizeMesh("Cylinder4684", "Res4684");

Now I want to set a texture only on the top cap of the cylinder. How can I realize that? It should be easy if each part (casing, top cap, bottom cap) is realized as a submesh.

Thanks,
Transporter

mikachu

13-08-2013 10:49:05

Yes, someone already asked for this kind of feature.
Actually, outputing several submeshes must not be the default behaviour, because of performance considerations (1 submesh=1 batch).

I had in mind an idea to create a somewhat generic solution for this ( https://code.google.com/p/ogre-procedur ... ail?id=129 ) but didn't have time to actually implement it...