scene/cursordelegate_opengl: recreate texture if the format is wrong
This commit is contained in:
parent
ee05ea7912
commit
7ad1c163a3
1 changed files with 1 additions and 1 deletions
|
@ -41,7 +41,7 @@ void CursorDelegateOpenGL::paint(const RenderTarget &renderTarget, const QRegion
|
|||
|
||||
// Render the cursor scene in an offscreen render target.
|
||||
const QSize bufferSize = (Cursors::self()->currentCursor()->rect().size() * scale).toSize();
|
||||
if (!m_texture || m_texture->size() != bufferSize) {
|
||||
if (!m_texture || m_texture->size() != bufferSize || m_texture->internalFormat() != renderTarget.framebuffer()->colorAttachment()->internalFormat()) {
|
||||
m_texture = GLTexture::allocate(renderTarget.framebuffer()->colorAttachment()->internalFormat(), bufferSize);
|
||||
if (!m_texture) {
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue