Set GL_UNPACK_ALIGNMENT
This commit is contained in:
@@ -144,9 +144,7 @@ void ImageWidget::setImage(std::shared_ptr<RawImage> image, int index)
|
||||
m_image->allocateStorage();
|
||||
m_image->setMinMagFilters(QOpenGLTexture::LinearMipMapLinear, QOpenGLTexture::Linear);
|
||||
m_image->setWrapMode(QOpenGLTexture::ClampToEdge);
|
||||
//m_image->setBorderColor(0, 0, 0, 0);
|
||||
m_image->setData(0, rawImageType.pixelFormat, rawImageType.dataType, (const void*)image->data());
|
||||
//m_image->generateMipMaps();
|
||||
m_image->bind();
|
||||
f->glGenerateMipmap(GL_TEXTURE_2D);
|
||||
qDebug() << "setImage" << timer.elapsed();
|
||||
@@ -598,8 +596,7 @@ void ImageWidget::initializeGL()
|
||||
|
||||
m_thumbnailTexture = std::unique_ptr<QOpenGLTexture>(new QOpenGLTexture(QOpenGLTexture::Target2DArray));
|
||||
|
||||
m_transferOptions = std::unique_ptr<QOpenGLPixelTransferOptions>(new QOpenGLPixelTransferOptions);
|
||||
m_transferOptions->setAlignment(1);
|
||||
f->glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
|
||||
m_lut = std::make_unique<QOpenGLTexture>(QOpenGLTexture::Target3D);
|
||||
m_lut->setSize(LUT_SIZE, LUT_SIZE, LUT_SIZE);
|
||||
|
||||
@@ -40,7 +40,6 @@ class ImageWidget : public QOpenGLWidget
|
||||
std::unique_ptr<QOpenGLTexture> m_image;
|
||||
std::unique_ptr<QOpenGLVertexArrayObject> m_vao;
|
||||
std::unique_ptr<QOpenGLVertexArrayObject> m_vaoThumb;
|
||||
std::unique_ptr<QOpenGLPixelTransferOptions> m_transferOptions;
|
||||
std::unique_ptr<QOpenGLTexture> m_thumbnailTexture;
|
||||
std::unique_ptr<QOpenGLTexture> m_lut;
|
||||
GLuint m_debayerTex = 0;
|
||||
|
||||
Reference in New Issue
Block a user