Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Skybox seams in OpenGL [closed]

Tags:

vb.net

opengl

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.

like image 764
acheo Avatar asked Feb 19 '10 15:02

acheo


1 Answers

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.

like image 134
genpfault Avatar answered Nov 20 '22 03:11

genpfault