Hi guys,

         I'm now programming opengl application for Tizen-IVI, for
opengl's function which named "eglCreateWindowSurface" need a window
handle as one of the parameters, I can get X11's window handle by the
following code snippet, but on wayland platform, the APIs are different
from X11, I have no idea on how to solve it by far, is there anyone who
is familiar with the wayland's window creating? Hope to get your
feedbacks, Thanks!





         Snippet for X11's window creating:

         EGLNativeWindowType* CreateWindow()

{

                int screen = -1;

              Display*     m_xldisplay = NULL ;

              Window     root_window;

                  EGLNativeWindowType* m_window = NULL;



              printf("Start CreateWindowSurface\n");

              m_xldisplay = XOpenDisplay ( NULL );   // open the
standard display (the primary screen)

              if ( m_xldisplay == NULL )

                   {

                 printf ("cannot connect to X server\n");

                 return NULL;

              }

              screen = DefaultScreen(m_xldisplay);

              root_window = RootWindow(m_xldisplay,screen);

              static int Hnd = XCreateSimpleWindow(m_xldisplay,
root_window,0,0,800,480,0,0,0);

              m_window = (EGLNativeWindowType*)&Hnd;

              if (!m_window)

              {

                 printf("Failed to create X window.\n");

                 return NULL;

              }

              XUndefineCursor(m_xldisplay, *m_window);

              XMapRaised(m_xldisplay, *m_window);

              XFlush(m_xldisplay);

              return m_window;

}



Best Regards,

Jacky Ni




CONFIDENTIALITY NOTICE: The information contained in this message may be 
privileged and/or confidential. If you are not the intended recipient, or 
responsible for delivering this message to the intended recipient, any review, 
forwarding, dissemination, distribution or copying of this communication or any 
attachment(s) is strictly prohibited. If you have received this message in 
error, please notify the sender immediately, and delete it and all attachments 
from your computer and network.
_______________________________________________
IVI mailing list
[email protected]
https://lists.tizen.org/listinfo/ivi

Reply via email to