Add makeCurrent to all methods that calls OpenGL
This commit is contained in:
@@ -182,6 +182,7 @@ void ImageWidget::blockRepaint(bool block)
|
|||||||
|
|
||||||
void ImageWidget::allocateThumbnails(const QStringList &paths)
|
void ImageWidget::allocateThumbnails(const QStringList &paths)
|
||||||
{
|
{
|
||||||
|
makeCurrent();
|
||||||
int count = paths.size();
|
int count = paths.size();
|
||||||
m_thumbnailCount = count;
|
m_thumbnailCount = count;
|
||||||
m_thumnails.clear();
|
m_thumnails.clear();
|
||||||
@@ -253,6 +254,7 @@ QImage ImageWidget::renderToImage()
|
|||||||
|
|
||||||
void ImageWidget::thumbnailLoaded(const Image *image)
|
void ImageWidget::thumbnailLoaded(const Image *image)
|
||||||
{
|
{
|
||||||
|
makeCurrent();
|
||||||
const RawImage *raw = image->thumbnail();
|
const RawImage *raw = image->thumbnail();
|
||||||
m_thumbnailTexture->setData(0, image->number(), QOpenGLTexture::RGB, QOpenGLTexture::UInt16, raw->data(), m_transferOptions.get());
|
m_thumbnailTexture->setData(0, image->number(), QOpenGLTexture::RGB, QOpenGLTexture::UInt16, raw->data(), m_transferOptions.get());
|
||||||
float a = raw->thumbAspect();
|
float a = raw->thumbAspect();
|
||||||
|
|||||||
Reference in New Issue
Block a user