开发者

Skybox seams in OpenGL [closed]

Closed. This question needs debugging details. It is not currently accepting answers.

Edit the question to include desired behavior, a specific problem or error, a开发者_如何学Gond the shortest code necessary to reproduce the problem. This will help others answer the question.

Closed 4 years ago.

Improve this question

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜