I want to draw a terrain for a 2d game, and this terrain is defined by some rotated rectangles and circles, I want to draw my terrain as if it was a repeating texture clipped by those forms. I already modified the cocos2d draw primitives methods to draw them using a triangle fan, but I'm not sure how to apply a texture on them.
Very difficult to make out what it is you are asking from this question.
1) The one thing you might allude to would be the UV wrap mode on a mesh. You bind the texture, render the mesh (of course, depending on ES2.0 shaders or fixed function ES1.1), and make sure the wrap mode is set to repeat, not clamp.
Also, for more thorough information, read this page : http://iphonedevelopment.blogspot.com/2009/05/opengl-es-from-ground-up-part-6_25.html