here is what i did to have a repeatable layer, based on RepeatableLayer.m. it works with cocos2d 1.xx rc.
my repeatable layer is initialized with the gl_repeat parameters (like in the gffparallax classes), a rect size of (0,0,wins.width,wins.height) and texture size a of 128x128
in RepeatableLayer.m : replace the (void)draw {} by the draw function in cocos2d CCSprite.m.
you can run the project at this point, and see the texture repeated all over the screen, now we have to translate it ...
in the draw function, just before the glDrawArrays do this:
glMatrixMode(GL_TEXTURE); //switch to the texture matrix
glPushMatrix();
glTranslatef(youroffset.x,youroffsety,0); //translate the texture
glMatrixMode(GL_MODELVIEW); //go back to modelview for drawing
glDrawArrays(.........); //the glDrawArrays...
//and add this after:
glMatrixMode(GL_TEXTURE); //goback to the texture matrix
glPopMatrix(); //and pop the pushed one
glMatrixMode(GL_MODELVIEW); //go back again to the default modelview...
last step is important because we need to restore the texture matrix or it will up side down all the other textures after drawing your background.
i'm not an opengl expert, maybe there is points i am missing or doing badly, please feel free to improve the code.