[webkit-dev] Sharing the OpenGL GraphicsContext3D implementation
zhenyao at gmail.com
Wed Feb 23 06:59:10 PST 2011
We already have a mechanism installed to handle extensions. Look at
And we have chromium specific ones in
Develop another mechanism to handle GL extensions would cause a mess.
You should look into the above mentioned classes and see if they can
be used in Gtk easily. If not, then we should look into refactoring
it instead creating something totally new.
On Tue, Feb 22, 2011 at 12:53 PM, Zan Dobersek <zandobersek at gmail.com> wrote:
> I'm writing this mail in order to propose changes that would make the OpenGL
> implementation of the GraphicsContext3D a lot easier to share between the
> Mac and Gtk port.
> Currently the mentioned implementation is only used by the Mac port. The Gtk
> port is also interested in using this implementation and there is already a
> patch available in bug #31517 by Martin Robinson that brings the WebGL
> functionality to daylight.
> There is, however, the issue of the OpenGL extensions functions. Current
> OpenGL implementation is Mac-only, and Mac port has a specific set of
> extensions functions available. The same cannot be said for the Gtk port,
> which can end up having extensions functions available that do not have the
> same extension suffix as the Mac port's functions (EXT vs ARB). Because of
> that the current proposed implementation acquires addresses of the OpenGL
> extensions functions and then uses shims to make the GraphicsContext3D work.
> I recommend a new class to be created for these two ports to use, named
> something like OpenGLExtensionsFunctions. Extensions-specific functions in
> the GraphicsContext3D class would then be replaced with calls to the
> corresponding functions in this class, for example
> OpenGLExtensionsFunctions::blitFramebuffer instead of current
> ::glBlitFramebufferEXT. Implementation for the Mac port would be simple,
> passing arguments on to functions that are currently used in the
> GraphicsContext3D class. Gtk port's implementation would simply call the
> functions that were acquired, with no need to depend on shims.
> Modifying the OpenGL implementation of the GraphicsContext3D class in this
> way would ease the use of it for the Gtk port and perhaps any other port
> that would go on to use this implementation with no damage to the Mac port.
> I'd like to hear what Mac folks think of this approach and if there are any
> other ideas that address this problem.
> Zan Dobersek
>  https://bugs.webkit.org/show_bug.cgi?id=31517
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
More information about the webkit-dev