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.
master
Vlad Zahorodnii 1 year ago
parent 6a1418c5b1
commit b25e7a849b

@ -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…
Cancel
Save