On Mon, Jan 4, 2010 at 11:17 PM, Luca Barbieri <luca.barbi...@gmail.com> wrote:
> I meant, how about having egl_g3d provide the GLX API as well as the EGL
> API?
> Of course, it will require some code in libGL.so to dispatch glX* functions
> to egl_g3d.
> That code already exists in src/mesa/drivers/x11/glxapi.c: it would only
> need to be passed a suitable dispatch table.
> This way, you could run all the usual OpenGL applications/games using only
> egl_g3d without any of the legacy src/glx/x11 or src/mesa/drivers/dri code.
I see.  It is, in some sense, re-implement GLX over EGL.  I like the idea in
general, but if the goal is to get rid of the legacy code, it should be a long
term project and allow incremental improvement.  At least, the X server still
loads DRI drivers to support indirect rendering.

Actually, if you look at the native display code in egl_g3d, there is no
dependency on EGL (well, except for _eglLog that can be replaced by
debug_pritnf, and the types to represent native display/window/pixmap).  The
native display support is coded according to native.h, which states

  /**
   * A pipe winsys abstracts the OS.  A pipe screen abstracts the graphcis
   * hardware.  A native display consists of a pipe winsys, a pipe screen, and
   * the native display server.
   */
  struct native_display;

While working on egl_g3d, i slowly define an interface that abstracts the
native display.  The interface suits the need of EGL.  And I believe it suits
the need of GLX in its current form.  Eventually, it might evolve into
`struct pipe_display` that can be shared.  But that is not my current focus.

Back to the GLX API.  Reading the code in state_trackers/glx/xlib/, it seems
you can implement GLX by providing a `struct xm_driver`.  A direction I would
suggest is to implement xm_driver using x11 native_display.  Or the other way
around, have state_trackers/glx/xlib/ use native_display, and implement a
native_display through xm_driver.  Once that is done, you might consider
improve the x11 native display and eventually deprecate winsys/xlib/.

I am focusing on egl_g3d now, and I plan to work on st_public.h to support more
EGL extensions next.  It would be great if someone is interested in turing
native_display into pipe_display (or any better name/form).

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to