scene: Make ImageItem use linear filter and clamp-to-edges wrap mode
Use the linear filter to ensure that the cursor doesn't look blocky with some scale factors and use the clamp-to-edge wrap mode to avoid potential artifacts when the image is scaled.
This commit is contained in:
parent
6a1418c5b1
commit
b25e7a849b
1 changed files with 2 additions and 0 deletions
|
@ -50,6 +50,8 @@ void ImageItemOpenGL::preprocess()
|
|||
|
||||
if (!m_texture || m_texture->size() != m_image.size()) {
|
||||
m_texture = GLTexture::upload(m_image);
|
||||
m_texture->setFilter(GL_LINEAR);
|
||||
m_texture->setWrapMode(GL_CLAMP_TO_EDGE);
|
||||
} else {
|
||||
m_texture->update(m_image);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue