[webkit-help] WebGL in WebKit to iOS

James James_h_lu at hotmail.com
Mon Aug 15 16:55:33 PDT 2011


Shahab Layeghi <shahab at ...> writes:

> 
> 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 
methods?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,Shahab


Hi Shahab,

I am also looking to port WebGL portion of WebKit to iOS. I saw you did this a 
while ago, hope you did well. I am interested the status of your project, I 
may get a lot benifits from you.

Thanks,
James






More information about the webkit-help mailing list