scenes/opengl: Use GL_CLAMP_TO_EDGE wrap mode with sw cursor

We use the GL_LINEAR magnification filter. This means that GL_REPEAT
wrap mode cannot be used for the software cursor because sampling texels
beyond the right texture edge is the same as sampling texels on the
left edge. This may produce undesired visual artifacts.
This commit is contained in:
Vlad Zahorodnii 2020-10-28 18:48:44 +02:00
parent 329e816f16
commit e5b2fca409

View file

@ -586,6 +586,7 @@ void SceneOpenGL2::paintCursor(const QRegion &rendered)
return;
}
m_cursorTexture.reset(new GLTexture(img));
m_cursorTexture->setWrapMode(GL_CLAMP_TO_EDGE);
};
// init now