[webkit-dev] Sharing the OpenGL GraphicsContext3D implementation
Kenneth Russell
kbr at google.com
Wed Feb 23 12:49:15 PST 2011
On Wed, Feb 23, 2011 at 12:40 PM, Zan Dobersek <zandobersek at gmail.com> wrote:
> Forgot to reply to all, sorry for the mess, webkit-dev :/
> On Wed, Feb 23, 2011 at 7:15 PM, Mo, Zhenyao <zhenyao at gmail.com> wrote:
>>
>> You could just create a new Extension3DOpenGLGtk class that inherits
>> from Extension3DOpenGL, and do your specific thing there.
>
> The goal here is to make OpenGL GC3D shareable, so using Extensions3D calls
> to extensions functions in that implementation would be replaced with
> something like getExtensions()->extensionsFunction(). I don't see this being
> possible without adding prototypes to Extensions3D class, not without some
> dirty hacks that cast Extensions3D class to an Extensions3DOpenGLGtk class
> in specific cases, or similar.
The Extensions3D class already has prototypes for all of the
extensions it supports, and more could be added for the entry points
in GraphicsContext3D which are not in core OpenGL. There are also
already per-port implementations of this class, so Gtk could handle
looking up the extensions differently than the Mac platform, for
example. I think Mo's suggestion would work; take a closer look at the
code.
-Ken
>> If you don't mind, please add me (zmo at google.com) and Ken
>> (kbr at google.com) to the cc list on the bug for this issue.
>
> Created bug #55072[1] fon this issue and added both to the CC list.
> [1] https://bugs.webkit.org/show_bug.cgi?id=55072
>
> Zan
> (Below are the two messages in their entirety that weren't sent to the
> list.)
> On Wed, Feb 23, 2011 at 7:15 PM, Mo, Zhenyao <zhenyao at gmail.com> wrote:
>>
>> You could just create a new Extension3DOpenGLGtk class that inherits
>> from Extension3DOpenGL, and do your specific thing there.
>>
>> If you don't mind, please add me (zmo at google.com) and Ken
>> (kbr at google.com) to the cc list on the bug for this issue.
>>
>> Thank you.
>>
>> Mo
>>
>> On Wed, Feb 23, 2011 at 9:06 AM, Zan Dobersek <zandobersek at gmail.com>
>> wrote:
>> > On Wed, Feb 23, 2011 at 3:59 PM, Mo, Zhenyao <zhenyao at gmail.com> wrote:
>> >>
>> >> We already have a mechanism installed to handle extensions. Look at
>> >> WebCore/platform/graphics/Extension3D.h
>> >>
>> >> And we have chromium specific ones in
>> >> WebCore/platform/graphics/chromium/Extension3DChromium.h
>> >>
>> >> 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.
>> >>
>> >
>> > To use the Extensions3D class, it should be modified, adding ~90
>> > function
>> > prototypes to the class for Mac and Gtk platforms only, and then
>> > implement
>> > those in separate files, e.g.
>> > platform/graphics/mac/Extensions3DOpenGLMac.cpp (or .mm, dunno) and
>> > platform/graphics/gtk/Extensions3DOpenGLGtk.cpp. That's basically
>> > already
>> > being done for the glBlitFramebuffer and
>> > glRenderbufferStorageMultisample
>> > functions.
>> > If the Mac developers give a green light I can come up with a patch
>> > containing these changes and providing a Mac implementation in a
>> > reasonably
>> > short time.
>> > Zan
>
>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
>
More information about the webkit-dev
mailing list