But there are borders of the box, which I don't want. I already searched the internet and they all said that GL_CLAMP_TO_EDGE should work, but I am still seeing the borders.
This is what I used for the texture loading:
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glGenerateMipmap(GL_TEXTURE_2D);
Can anyone tell me what I am doing wrong?
Strange thing is that the borders are only showing at the top of the skybox. so when a skybox face, touches the roof of the box.
I finally found the solution. This is a filthy mistake in the texture itself. There is a black border around the texture, but you can barely see it unless you zoom in. So I removed the borders and it worked.