简体   繁体   English

Qt5将QImage转换为OpenGL格式

[英]Qt5 convert QImage to OpenGL format

In Qt4 there was a nice little function QGLWidget::convertToGLFormat(QImage &img) . 在Qt4中,有一个很好的小函数QGLWidget::convertToGLFormat(QImage &img) If I am using Qt5 with OpenGL QWindow what should I use to convert the image? 如果我将Qt5与OpenGL QWindow使用,应该使用什么来转换图像?

QGlWidget is still available for use ( QGLWidget is the only QGl* class not deprecated in Qt5 looks like) QGlWidget仍可使用( QGLWidget是唯一未在Qt5中弃用的QGl*类)

beyond that there is a new QOpenGlTexture class that has functions taking QImages directly. 除此之外,还有一个新的QOpenGlTexture类,该类具有直接使用QImages的函数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM