Nazar554
Nazar554

Reputation: 4195

Qt5 convert QImage to OpenGL format

In Qt4 there was a nice little function QGLWidget::convertToGLFormat(QImage &img). If I am using Qt5 with OpenGL QWindow what should I use to convert the image?

Upvotes: 1

Views: 3703

Answers (1)

ratchet freak
ratchet freak

Reputation: 48176

QGlWidget is still available for use (QGLWidget is the only QGl* class not deprecated in Qt5 looks like)

beyond that there is a new QOpenGlTexture class that has functions taking QImages directly.

Upvotes: 1

Related Questions