I am creating a terrain and I have a texture that I would like to map over the entire surface. When specifying each vertex within this terrain I would like to attach it to a certaing part of the texture using glTexCoord2f(), but it doesn’t want to work…the values I pass to glTexCoord2f can be as small as 1/2048,1/2048 …is this a problem…??
If this is a problem can you please tell a way that it can be done .thanks.
Exactly what problem do you have? You only want the texture to be at certain polys, not at all? Then try to use GL_CLAMP instead of GL_REPEAT in the texture settings.
Originally posted by dans:
1/2048 gives you a result of 0.00048828125… or there abouts.
so using floats glTexCoord2f()you are loosing quite some precision.
Wrong.
You see - usual floating point formats are binary based, not decimal.
1/2048 = 2^-11, it is exact number in binary representation - “float” has more then enough precision for it.