[webkit-help] WebGL in WebKit to iOS

Shahab Layeghi shahab at appmobi.com
Wed Oct 20 14:46:15 PDT 2010

Hello all,

I'm looking into porting WebGL portion of WebKit to iOS.  The goal is making
an app that can support WebGL until it is natively supported by Safari.
I've been looking into WebKit code for the past few days, built and ran it
on Mac and can step through relevant functions in XCode debugger.  I don't
have a prior experience with OpenGL and Mac graphics APIs, but I've been
browsing through the documentations to get a basic understanding of how
things work.

A general question is whether there is an Open Source WebKit port to iOS?
If not, what are the major items needed for the port (considering the only
WebGL portion is the target)?  For example it looks like many places in
WebCore that utilize some functionality in wtf such as RefPtrs.  What does
it take to port these classes to iOS, are there already existing equivalent

To do this project, one thing that needs to be done is to intercept WebGL's
JavaScript commands and route them to relevant functions in
WebGLRenderingContext.cpp.  This should be doable.  On the rendering side
there are differences between the graphics APIs of Max OS X, and iOS.  iOS
uses CAEAGLLayer to support OpenGL ES rendering, while Mac uses
CAOpenGLLayer, so it looks like gl calls in GraphicsContext3D need to
converted from OpenGL to OpenGL ES, ANGLE would be removed, and WebGLLayer
needs to be reimplemented.  Do you foresee any major difficulties in this,
are there other areas that need to be redone?  Any pointers and suggestions
on best approach for this porting would be highly appreciated.

Thanks in advance for the responses,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20101020/60160df6/attachment.html>

More information about the webkit-help mailing list