Sorry Pq. I confused you so much.

Just one requirement not related with architecture. You can imagine write a 
simple program for example glxgears. No compositor manager, no architecture, no 
window manager. Just has x server, or compositor server(weston).

I want to call eglCreatePixmapSurface to create a pixmap surface. If the 
xserver is backend, I need to connect with X server and create a pixmap and 
then create the pixmap surface using egl interface provided by mesa.
If the backend is weston compositor, I need to connect with weston compositor 
and using egl to create the pixmap and its surface. Before that the context is 
created. Just like the code in simple-egl.c of weston.
===
-- function init_egl()
...
        display->egl.dpy = eglGetDisplay(display->display);
        assert(display->egl.dpy);

        ret = eglInitialize(display->egl.dpy, &major, &minor);
        assert(ret == EGL_TRUE);
        ret = eglBindAPI(EGL_OPENGL_ES_API);
        assert(ret == EGL_TRUE);

        ret = eglChooseConfig(display->egl.dpy, config_attribs,
                              &display->egl.conf, 1, &n);
        assert(ret && n == 1); 

        display->egl.ctx = eglCreateContext(display->egl.dpy,
                                            display->egl.conf,
                                            EGL_NO_CONTEXT, context_attribs);
        assert(display->egl.ctx);
...
===

The current issue is pixmap of wayland is not supported in wayland protocol and 
mesa. I could not do this like X. 

Sorry my title and description make you confused, I change it to 'how to create 
pixmap or pixmap surface in wayland'.

Thanks

Regards

Quanxian Wang

> -----Original Message-----
> From: Pekka Paalanen [mailto:ppaala...@gmail.com]
> Sent: Thursday, February 07, 2013 6:05 PM
> To: Wang, Quanxian
> Cc: wayland-devel@lists.freedesktop.org
> Subject: Re: How to enable Wayland when original software support X?
> 
> On Thu, 7 Feb 2013 03:30:48 +0000
> "Wang, Quanxian" <quanxian.w...@intel.com> wrote:
> 
> > Thanks pq.
> >
> > > -----Original Message-----
> > > From: Pekka Paalanen [mailto:ppaala...@gmail.com]
> > > Sent: Wednesday, February 06, 2013 7:34 PM
> > > To: Wang, Quanxian
> > > Subject: Re: How to enable Wayland when original software support X?
> > >
> > > > > I don't really see the "replace X operations with Wayland
> > > > > operations" as a feasible approach, in the way you have it
> > > > > below. I think it will become a nightmare to develop and
> > > > > maintain. The separation to
> > > X vs.
> > > > > Wayland paths should be done on a higher level, because usually
> > > > > there is no one-to-one correspondence at libwayland/xlib
> > > > > function level. At least you should use functions in different files 
> > > > > instead

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to