Hi,

I am porting existing Qt4-based code to Qt5 (5.5.0), switching from QGLWidget to QOpenGLWidget. In my app I render a bunch of text and bitmaps into a transparent QImage. The QImage is then alpha-blended in OpenGL on top of video frame (rendered with OpenGL with texture buffer originating from ffmpeg libraries).

I've observed an artifact after the switch to QOpenGLWidget. It appears as if rendering anti-aliased text to a transparent buffer blends a white background color into the text outline -- see attached screenshots. It should be red background, black outline, gray text. What I get is red background, whitish anti-aliasing (or alpha-blending) halo around black outline, black outline, and gray text.

I don't think the problem is with QPainter::drawText, because I see the same whitish halo around bitmap subtitles which I render into the same transparent QImage via QPainter::drawImage. Also, if I use QGLWidget as the base class the issue vanishes -- the anti-aliasing halo only appears when using QOpenGLWidget.

Is this a bug, or some secret setting I missed?

Thank you,
    Pavel.

_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to