I'm trying to use QGLWidget::drawTexture to draw a texture with an alpha channel, but it is not working; the areas that should be transparent are instead black, as if the alpha channel is missing in the GL texture.
Here's a quick sketch of what I am doing: MyWidget::initializeGL() { d->tex = bindTexture(QImage{":/images/texture"}); glEnable(GL_TEXTURE_2D); } MyWidget::paintGL() { glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); drawTexture(QRectF{128, 128, 128, 128}, d->tex); } If I inspect the loaded QImage::format(), it is ARGB, as expected. (I've also tried with QOpenGLTexture instead of QGLWidget::bindTexture, with the same results. This does, however, let me confirm that the GL texture format is GL_RGBA8, again as expected.) Inspecting the image file in an external editor or Designer, the alpha channel is as expected. Am I missing something? -- Matthew _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest