How to texture an irregular (hexagon) shape (mesh) ?

Hi, I have made an algorithm for creating a 3d world made out of irregular shapes… but I have a problem when trying to texture those shapes…

I would like the texture to wrap the shapes , is this possible? If yes, how to do it by code?

This is my world currently which looks awful… :

A sample of the shapes :

26866-hexagon.jpg

It’s possible to make a tillable hex texture

http://gamelogic.co.za/2013/08/04/how-do-i-make-a-seamless-hex-tile/

You’d need to make sure the uv’s are laid out correctly for this to work.