OpenGL texture atlas bleeding

前端 未结 5 1854
滥情空心
滥情空心 2021-01-01 00:30

I\'m trying to draw a basic 2d ground mesh made up of smaller tiles from a texture atlas (note the 1 pixel transparent border):

5条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-01 00:47

    I had this exact same problem. I fixed it with this.

    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
    

提交回复
热议问题