[Interest] opengl graphics system status in 4.8.x?

Samuel Rødal samuel.rodal at digia.com
Tue Mar 19 11:58:34 CET 2013


On 03/18/2013 09:07 PM, Simon St James wrote:
> Hi all,
>
> I am currently working on emscripten-qt
> (http://vps2.etotheipiplusone.com:30176/redmine/projects/emscripten-qt/wiki/Demos/), a project that uses Emscripten
> (https://github.com/kripken/emscripten/wiki) to compile Qt 4.8.x to Javascript
> and run in a browser using an HTML5 canvas for rendering.
>
> Currently, performance is surprisingly good considering we are still using the
> "raster" graphics system where everything is plotted pixel by pixel by Qt and
> then flushed to the canvas after pixel format conversion.   However, we suspect
> that we can get significant gains in rendering speed by writing a Qt graphics
> system that uses HTML5 Canvas drawing primitives.
>
> However however, it has been suggested that maybe using Qt's own "opengl"
> graphics
> system would be an even more performant approach.  I started investigating
> this by running stock Qt apps with stock Qt packages (on Kubuntu 12.04, Intel
> HD Graphics card) with " -graphicssystem opengl", and every app I tried gave
> only a black window, except for some more visually complex which were mostly
> black with a few coloured rectangles scattered about   When I compiled Qt
> myself and tried with that, I noticed that using KDE's default "Oxygen" style
> with  -graphicssystem opengl actually triggered an assertion within Qt[1], and
> while forcing the style to "plastique" no longer triggered it, I still just
> had a black window.  Other OpenGL apps work fine.
>
> So I was wondering whether using Qt's opengl graphics system is feasible? I
> heard it was "experimental" and "not pixel-perfect", but I've not heard any
> reports that that matched mine, which makes me wonder if I just got very
> unlucky

True, it's experimental and not pixel-perfect, and not really well 
maintained at all for the desktop platforms. You could try to see if 
"export QT_GL_SWAPBUFFER_PRESERVE=1" fixes the issue with the black 
windows though.

Were you planning on using WebGL? It might be possible, but I'd probably 
sooner recommend you to use HTML5 Canvas (i.e. a custom paint engine for 
QPainter).

--
Samuel




More information about the Interest mailing list