<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        text-align:justify;
        text-justify:inter-ideograph;
        font-size:10.5pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin:0cm;
        margin-bottom:.0001pt;
        text-align:justify;
        text-justify:inter-ideograph;
        text-indent:21.0pt;
        font-size:10.5pt;
        font-family:"Calibri","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
/* Page Definitions */
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:420762041;
        mso-list-type:hybrid;
        mso-list-template-ids:478058060 -125000204 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:39.0pt;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-tab-stop:72.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-tab-stop:108.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level4
        {mso-level-tab-stop:144.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-tab-stop:180.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-tab-stop:216.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level7
        {mso-level-tab-stop:252.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-tab-stop:288.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-tab-stop:324.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=ZH-CN link=blue vlink=purple style='text-justify-trim:punctuation'><div class=WordSection1><p class=MsoNormal><span lang=EN-US>Hi all,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>         Recently, I’ve tried to enable my opengles application run on tizen-ivi, tizen-ivi use wayland to display, how to enable the opengles part show on it?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>         My latest patch crashed again, the following sequences describe what I do on for the opengles parts:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoListParagraph style='margin-left:39.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span lang=EN-US><span style='mso-list:Ignore'>1.<span style='font:7.0pt "Times New Roman"'>       </span></span></span><![endif]><span lang=EN-US>wl_display_connect(NULL) </span><span lang=EN-US style='font-family:Wingdings'>à</span><span lang=EN-US> return a global g_nativeDisplay object, I see someone do it, so that I do it.<o:p></o:p></span></p><p class=MsoListParagraph style='margin-left:39.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span lang=EN-US><span style='mso-list:Ignore'>2.<span style='font:7.0pt "Times New Roman"'>       </span></span></span><![endif]><span lang=EN-US>wl_display_get_registry, wl_registry_add_listener, wl_display_dispatch -> some APIs I’m not familiar, I see someone do it, so that I do it.<o:p></o:p></span></p><p class=MsoListParagraph style='margin-left:39.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span lang=EN-US><span style='mso-list:Ignore'>3.<span style='font:7.0pt "Times New Roman"'>       </span></span></span><![endif]><span lang=EN-US>wl_egl_window_create(<span style='color:red'>NULL</span>,1280,720) </span><span lang=EN-US style='font-family:Wingdings'>à</span><span lang=EN-US> return a nativeWindow object which will be passed for EGL to Create Window Surface, I believe that the “NULL”(wl_surface*) parameter lead to the crash. But I have no idea how to get a wl_surface object.<o:p></o:p></span></p><p class=MsoListParagraph style='margin-left:39.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span lang=EN-US><span style='mso-list:Ignore'>4.<span style='font:7.0pt "Times New Roman"'>       </span></span></span><![endif]><span lang=EN-US>eglGetDisplay, eglInitialize, eglChooseConfig, eglCreateContext, eglCreateWindowSurface, eglMakeCurrent, eglQuerySurface, these APIs all work fine, return no error. <o:p></o:p></span></p><p class=MsoListParagraph style='margin-left:39.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1'><![if !supportLists]><span lang=EN-US><span style='mso-list:Ignore'>5.<span style='font:7.0pt "Times New Roman"'>       </span></span></span><![endif]><span lang=EN-US>eglSwapBuffers, lead to the crash, trace the bt, I find that it is because wl_surface is<b><span style='color:red'> NULL,</span></b><o:p></o:p></span></p><p class=MsoListParagraph style='margin-left:39.0pt'><span lang=EN-US>(gdb) bt<o:p></o:p></span></p><p class=MsoListParagraph style='margin-left:39.0pt'><span lang=EN-US>#0  0xb7e35a85 in wl_proxy_create () from /lib/libwayland-client.so.0<o:p></o:p></span></p><p class=MsoListParagraph style='margin-left:39.0pt'><span lang=EN-US>#1  0xb7e1ac10 in wl_surface_frame (wl_surface=0x0)<o:p></o:p></span></p><p class=MsoListParagraph style='margin-left:39.0pt'><span lang=EN-US>    at /home/jacky/Apps/Wayland/include/wayland-client-protocol.h:1355<o:p></o:p></span></p><p class=MsoListParagraph style='margin-left:39.0pt'><span lang=EN-US>#2  0xb7e1bfbb in dri2_wl_swap_buffers_with_damage (drv=0x8730f88, <o:p></o:p></span></p><p class=MsoListParagraph style='margin-left:39.0pt'><span lang=EN-US>    disp=0x8730300, draw=0x87cc380, rects=0x0, n_rects=0)<o:p></o:p></span></p><p class=MsoListParagraph style='margin-left:39.0pt'><span lang=EN-US>    at platform_wayland.c:617<o:p></o:p></span></p><p class=MsoListParagraph style='margin-left:39.0pt'><span lang=EN-US>#3  0xb7e1c309 in dri2_wl_swap_buffers (drv=0x8730f88, disp=0x8730300, <o:p></o:p></span></p><p class=MsoListParagraph style='margin-left:39.0pt'><span lang=EN-US>    draw=0x87cc380) at platform_wayland.c:702<o:p></o:p></span></p><p class=MsoListParagraph style='margin-left:39.0pt'><span lang=EN-US>#4  0xb7e19739 in dri2_swap_buffers (drv=0x8730f88, dpy=0x8730300, <o:p></o:p></span></p><p class=MsoListParagraph style='margin-left:39.0pt'><span lang=EN-US>    surf=0x87cc380) at egl_dri2.c:1074<o:p></o:p></span></p><p class=MsoListParagraph style='margin-left:39.0pt'><span lang=EN-US>#5  0xb7e0cd03 in eglSwapBuffers (dpy=0x8730300, surface=0x87cc380)<o:p></o:p></span></p><p class=MsoListParagraph style='margin-left:39.0pt'><span lang=EN-US>at eglapi.c:811<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>  I searched the internet but get less useful information, even now , I plan to make some fake data to initialize the wl_surface, but I have not got the definition for the struct “wl_surface”, just a url(<a href="http://wayland.freedesktop.org/docs/html/protocol-spec-interface-wl_surface.html">http://wayland.freedesktop.org/docs/html/protocol-spec-interface-wl_surface.html</a> ) describe how to use its function, no initialize function…<o:p></o:p></span></p><p class=MsoNormal style='text-indent:10.5pt'><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal style='text-indent:10.5pt'><span lang=EN-US>It is so different from X11 who only need to prepare a window passed to EGL, So far, I’ve learned I need prepare a wl_egl_window and a wl_surface for EGL on wayland, wl_egl_window need three parameters “wl_surface”, “width” and “height” to create,but “wl_surface” seems need compositor(API:”wl_compositor_create_surface” )to create, so compositor need what to create? May I need to create a compositor firstly?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>  Could someone help me lists how to use the wayland’s API and EGL’s wayland API to enable the display on wayland?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal align=left style='text-align:left'><span lang=EN-US style='font-size:11.0pt;color:#1F497D'>Best Regards,</span><span lang=EN-US style='font-size:11.0pt;font-family:SimSun;color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal align=left style='text-align:left'><span lang=EN-US style='font-size:11.0pt;color:#1F497D'>Jacky Ni</span><span lang=EN-US style='font-size:11.0pt'><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div><p>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.</p>
</body></html>