Simple Quad, Highly tesselated

Hi all, I'm trying to create just a simple quad with a repeating texture (not stretched). It's a huge quad for the world and all the Quad implementations have 4 vertices and the uv's just stretch the texture. How would I create this said object??

Either through geometry or texturestate? Not sure. Guesses?

Texture wrap modes and texture scale should do the trick for you.

Hm not working for me, here is what I have so far (may help):


                    Quad quad = new Quad("wallbogs", 40, 25);
                    ts = DisplaySystem.getDisplaySystem().getRenderer().createTextureState();
                    Texture tex = TextureManager.loadTexture(
                            Piece.class.getClassLoader().getResource(textureFile),
                            Texture.MinificationFilter.Trilinear,
                            Texture.MagnificationFilter.Bilinear, 3.0f, true);
                    tex.setWrap(WrapMode.MirroredRepeat);
                    tex.setScale(new Vector3f(1.0f,1.0f,1.0f));
                    ts.setTexture(tex);
                    ts.apply();
//                    WM_WRAP_S_WRAP_T
                    quad.setRenderState(ts);

Try setting the scale to something other than 1. Like x = 10 should tile it 10 times in the x axis.



Or you can do it with the geometry if you want, by creating a quad with texture coords that go higher than 1. Eg if the quad has uv corners (0,0) (2,2) then there will be 4 of the texture on one quad (2x2).

That worked perfectly!!!


tex.setScale(new Vector3f(piece.customSize.x,piece.customSize.y,1.0f));



That modification sets it so that the texture repeats itself width/height times. Thanks a bunch!