[Interest] Accellerated WebGL in Qt/WebKit?

Jori Liesenborgs jori.liesenborgs at gmail.com
Fri Mar 7 19:53:32 CET 2014


Hi Allan,

> On Saturday 01 March 2014, Jori Liesenborgs wrote:
>> Hi everyone,
>>
>> I was wondering if someone knows how to avoid copying the view from a
>> WebGL component to the CPU each time. On [1] it says to use a
>> QGraphicsWebView with a QGLWidget viewport, but if I try this the result
>> seems to be even slower than the more naive version.
>>
> It should work. What version of Qt are you using?  There was a regression in
> Qt 5.1 that could trigger if you build against EGL instead of OpenGL. This
> would cause CPU copying on every frame. In Qt 5.2 though, QGraphicsWebView
> should always render directly to the QGLWidget, if using accelerated
> compositing is enable and a Qt GL context was found.

This is with Qt 5.2.1. When I run it in the 'normal' mode, I get a 
framerate of 35 fps, while using the QGLWidget I get 20 fps (1/3 vsync).

Is there a working example somewhere that shows how this should be done?

Cheers,
Jori



More information about the Interest mailing list