Leaf Texture

I am trying to make some Leaf for my generator

So i wanted to texture it.

texture size is 256x256 so i put it onto my new object which source u can find here:



http://rafb.net/paste/results/YxbEoO41.html



it looks a little bit messed up

can u say me why this is so ?



Are you trying to repeat the texture across the leaf?  If some, you'll want to set your Texture wrap mode to wrap instead of clamp.  If you don't mean to wrap the texture, it looks like your texture coords are incorrect.

you can see the code in the link posted upper the picture :smiley:

Ok, so I see you are using tex coords outside of [0,1] which means you'd like to repeat the texture.  So you just need to setup your Texture/TextureState to be repeating.

thx renanse, that fits



                new Vector2f(0,0),// Left

                new Vector2f(1,0),// Middle

                new Vector2f(0,1),// Upper Left

                new Vector2f(1,1),// Up

                new Vector2f(0,0), // Upper Right

                new Vector2f(0,1), // Right

                new Vector2f(0,0),// Lower Right

                new Vector2f(1,1),// Down

                new Vector2f(0,1) // Lower Left



making up this









thx folks