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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With