Hi,
I'm wondering if it is possible to set a repeat mode for a texture like the one in the following Opengl code.
GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_S, GLES20.GL_REPEAT);
GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_T, GLES20.GL_REPEAT);
If yes then is it possible to set the number of repetition in S and T?
thanks
Yes, you can use this http://www.jpct.net/jpct-ae/doc/com/threed/jpct/Texture.html#setClamping(boolean) (http://www.jpct.net/jpct-ae/doc/com/threed/jpct/Texture.html#setClamping(boolean)). To repeat properly, your model has to be build in a way so this makes sense, of course (i.e. using uv-coodinates <0 or >1 for some polygons). This setting (as well as the GL settings you've mentioned) don't make textures magically repeat whose uv-coordinates are just between 0 and 1.
However, you can't specify the number of repeats because that's defined by the way in which the model has been build. It's NOT a texture related attribute.
Edit: Added a 'not' where it belonged...
Thanks for the answer.