Hi there.
First of all forgive me for any language mistakes that will follow - English isn't my native language, Polish is.
I'm stuck with this problem - I'm trying to apply one texture to Quad so that the texture would be repeated multiple times on the surface. I already know that I need to set Textures wrap to WM_WRAP… sth and I need to manipulate texture coordinage matrix but HOW… HOW to get a handle coordinates??? :? The problem is that there is so much obsolete non working code in tutorials that it's very hard for me to do anything right now. I work with nightly builds and don't know anymore if It's me/my Eclipse doing sth wrong or is it the new version of jME API???
Lukasz
There is no reply so far so let me put it this way:
How to manipulate texture coordinates for Geometry objects?
Thanks.
getTextureBuffer will return a float buffer with all the texture coordinates. The buffer is arrange in (x,y,x,y…) So the x component of the first vertex is 0, y is 1, etc.
xN = FloatBuffer.get(N2);
yN = FloatBuffer.get(N2 + 1);
Since you are just repeating, you can just run through the buffer and multiple by the amount you wish to repeat.
It all works now.
Thanks for feedback.
Łukasz