Downscale image to max OpenGL texture
This commit is contained in:
@@ -99,6 +99,7 @@ void ImageWidget::setImage(std::shared_ptr<RawImage> image, int index)
|
||||
if(image == nullptr)return;
|
||||
makeCurrent();
|
||||
m_rawImage = image;
|
||||
m_rawImage->downscaleTo(m_maxTextureSize);
|
||||
|
||||
m_imgWidth = image->width();
|
||||
m_imgHeight = image->height();
|
||||
@@ -398,9 +399,12 @@ void ImageWidget::initializeGL()
|
||||
qDebug() << message;
|
||||
});
|
||||
|
||||
qDebug() << (char*)f->glGetString(GL_VENDOR);
|
||||
qDebug() << (char*)f->glGetString(GL_RENDERER);
|
||||
qDebug() << (char*)f->glGetString(GL_VERSION);
|
||||
qDebug() << "Vendor:" << (char*)f->glGetString(GL_VENDOR);
|
||||
qDebug() << "Renderer:" << (char*)f->glGetString(GL_RENDERER);
|
||||
qDebug() << "Version:" << (char*)f->glGetString(GL_VERSION);
|
||||
f->glGetIntegerv(GL_MAX_TEXTURE_SIZE, &m_maxTextureSize);
|
||||
f->glGetIntegerv(GL_MAX_ARRAY_TEXTURE_LAYERS, &m_maxArrayLayers);
|
||||
qDebug() << "Max texture size:" << m_maxTextureSize << "max layers:" << m_maxArrayLayers;
|
||||
|
||||
//MANUAL_MIPMAP_GEN = QString((const char*)f->glGetString(GL_VENDOR)).startsWith("ATI Technologies Inc", Qt::CaseInsensitive);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user