[webkit-qt] WebGL rendering offscreen

Allan Sandfeld Jensen kde at carewolf.com
Tue Nov 11 07:33:59 PST 2014


On Tuesday 11 November 2014, Jorge Fernandez Monteagudo wrote:
> 
> Hi Allan! Thank you for answering.
> 
> I'm open to use the correct way to do it. My only need is to be able to
> render the given page in my opengl context. The typical example rendering
> a WebGL in the faces of a cube in OpenGL will be great! Is there any demo
> like this? :)
> 
> Or, at least, where can I find an example using QGraphicsWebView with a
> QGLWidget viewport?
> 
See the documentation of QGraphicsView and especially setViewPort ( http://qt-project.org/doc/qt-5/qgraphicsview.html ). In Qt 5.4 you can also use a 
QOpenGLWidget. It basically sets a specific widget as the output, qtwebkit can 
find that widget and use the same opengl-context in case it uses one. Without 
this qtwebkit would have its own widget that can mess with yours and would 
still need copying over CPU to blit textures.

`Allan


More information about the webkit-qt mailing list