I have a problem with my textures. It seems as it has a border. I think that the colour of the border is take from the texture. The coordinates of the texture i’m using are between 0 and 1 (i control this).
I use this for create textura, so i don’t use any border.
glTexImage2D ( GL_TEXTURE_2D,0,GL_RGB4, Width, Height, 0,GL_RGB, GL_UNSIGNED_BYTE, data);
If you image data doesn’t specify border pixels, a single border color (which defaults to black) is used. The texture coordinates 0 and 1 fall right in the middle between the left/bottom border and the first pixel, and the last pixel and the right/top border. Thus the combination of a texture withou border and GL_CLAMP texture wrap mode causes the outer edge of the texture to be blended with a constant border color. That’s what you see in the screenshot.
You can fix this by
[ul]Providing explicit border pixels that copy the adjacent edge of the neighboring texture.Specifying texture coordinates from 1/2n to 1-1/2n, where n is the texture width/height in pixels.[*]Using texture wrap mode GL_CLAMP_TO_EDGE, which limits the texture coordinates to the range mentioned above.[/ul]