[SOLVED] QImage and glTexImage2D()
-
Hi there,
I am using Qt 5 and want to know what the current approach to use glTexImage2D() with QImage or QPixmap is. I used to do it like this:
@QImage tmpImage("someTex.jpg");
QImage image = QGLWidget::convertToGLFormat(tmpImage);glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, image.width(), image.height(), 0, GL_RGBA, GL_UNSIGNED_BYTE, image.bits());@
Since QGLWidget is or will be deprecated (i at least do believe so), i want to get rid of this approach.
I also do not want to use QOpenGLTexture because the software i am writing is for learning OpenGL.Thanks in advance.
Happy new year!