Clear image sizes buffer to prevent graphical glitches

This commit is contained in:
2022-04-18 09:55:06 +02:00
parent 4e6230eef2
commit cba8a0bb9c
+4 -1
View File
@@ -126,7 +126,10 @@ void ImageWidget::allocateThumbnails(int count)
m_thumbnailTexture->setLayers(count);
m_thumbnailTexture->allocateStorage();
m_bufferSizes->bind();
m_bufferSizes->allocate(count * sizeof(float)*3);
float *tmp = new float[count*3];
memset(tmp, 0, count * sizeof(float)*3);
m_bufferSizes->allocate(tmp, count * sizeof(float)*3);
delete [] tmp;
m_thumbnailCount = count;
}