tags:

views:

245

answers:

1

Can anyone tell me out how remove the seams in the skybox implementation I have here:

source code:

http://openglviewcontroller.codeplex.com/SourceControl/list/changesets

I've been trying GL_CLAMP_TO_EDGE to no avail.

+4  A: 

You have to set GL_CLAMP_TO_EDGE on both GL_TEXTURE_WRAP_S and GL_TEXTURE_WRAP_T, usually near texture creation for clarity:

glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);

Also, you seem to be assuming GL_TEXTURE_WRAP_* comes along for the ride when you bind another texture; this is not the case. It's an aspect of a particular texture object's state, not the GL state as a whole.

genpfault
Thanks that was the solution to the main problem. The other problem was the cubemap I was using had been resized badly so the colours had bled into each other at the edges. Cheers
PeanutPower