Skip to content

Commit f4e4cbf

Browse files
committed
Skin: Clamp texture coordinates
1 parent f414538 commit f4e4cbf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/skin.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ Texture Skin::createAndPaintTexture(int width, int height)
6060
m_textures.push_back(texture);
6161
texture->setMinificationFilter(QOpenGLTexture::Nearest);
6262
texture->setMagnificationFilter(QOpenGLTexture::Nearest);
63+
texture->bind();
64+
glF.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
65+
glF.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
66+
texture->release();
6367

6468
return Texture(texture->textureId(), width, height);
6569
}

0 commit comments

Comments
 (0)