LWJGL Forum

Programming => OpenGL => Topic started by: matan45 on October 05, 2017, 10:32:22

Title: sphere texture
Post by: matan45 on October 05, 2017, 10:32:22
why i have this bug when i texture ball?


https://imgur.com/boaIvDr
Title: Re: sphere texture
Post by: KaiHH on October 05, 2017, 17:54:55
With standard filtering, OpenGL is interpolating beyond the edges of the texture at the coordinates around 0.0 and 1.0 and uses the texture's border color wraps around/repeats at the other side of the texture.
Use CLAMP_TO_EDGE wrap mode to fix this:

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
Title: Re: sphere texture
Post by: matan45 on October 06, 2017, 05:12:47
is not fixing it