<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style id="owaParaStyle" type="text/css">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi Ross,<br>
<br>
I believe you missed the second patch of this batch as I can only see this one incorporated. The other patch is: http://patchwork.openembedded.org/patch/121519/<br>
<div><br>
<div style="font-family:Tahoma; font-size:13px"><font face="Tahoma"></font>
<div style="font-size:13px">
<div><font face="Tahoma" size="2"><span lang="en-US">
<div style="margin:0">BR,</div>
<div style="margin:0"><i>Awais</i></div>
</span></font></div>
</div>
<font face="Tahoma"></font></div>
</div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF590051"><font color="#000000" face="Tahoma" size="2"><b>From:</b> openembedded-core-bounces@lists.openembedded.org [openembedded-core-bounces@lists.openembedded.org] on behalf of Belal, Awais<br>
<b>Sent:</b> Friday, May 06, 2016 3:07 PM<br>
<b>To:</b> Burton, Ross<br>
<b>Cc:</b> OE-core<br>
<b>Subject:</b> Re: [OE-core] [[PATCH v2 1/2] mesa-demos: remove demos using obsolete screen surface<br>
</font><br>
</div>
<div></div>
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">Hi Ross,<br>
<br>
These can be found at: https://github.com/abelal/openembedded-core/tree/mesa_updates<br>
<div><br>
<div style="font-family:Tahoma; font-size:13px"><font face="Tahoma"></font>
<div style="font-size:13px">
<div><font face="Tahoma" size="2"><span lang="en-US">
<div style="margin:0">BR,</div>
<div style="margin:0"><i>Awais</i></div>
</span></font></div>
</div>
<font face="Tahoma"></font></div>
</div>
<div style="font-family:Times New Roman; color:#000000; font-size:16px">
<hr tabindex="-1">
<div id="divRpF490895" style="direction:ltr"><font color="#000000" face="Tahoma" size="2"><b>From:</b> Burton, Ross [ross.burton@intel.com]<br>
<b>Sent:</b> Wednesday, May 04, 2016 7:40 PM<br>
<b>To:</b> Belal, Awais<br>
<b>Cc:</b> OE-core<br>
<b>Subject:</b> Re: [OE-core] [[PATCH v2 1/2] mesa-demos: remove demos using obsolete screen surface<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">Can you push these patches to a branch?&nbsp; For some reason git-am isn't able to parse the patch.
<div><br>
</div>
<div>Ross</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 4 May 2016 at 10:11, Awais Belal <span dir="ltr">&lt;<a href="mailto:awais_belal@mentor.com" target="_blank">awais_belal@mentor.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
The mesa surface EGL_MESA_screen_surface was obsoleted<br>
and then dropped from mesa some time ago. Drop demos<br>
depending on this.<br>
<br>
Signed-off-by: Awais Belal &lt;<a href="mailto:awais_belal@mentor.com" target="_blank">awais_belal@mentor.com</a>&gt;<br>
---<br>
&nbsp;...dependant-on-obsolete-MESA_screen_surface.patch | 1592 &#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;&#43;<br>
&nbsp;meta/recipes-graphics/mesa/<a href="http://mesa-demos_8.2.0.bb" rel="noreferrer" target="_blank">mesa-demos_8.2.0.bb</a>&nbsp; &nbsp; &nbsp;|&nbsp; &nbsp; 1 &#43;<br>
&nbsp;2 files changed, 1593 insertions(&#43;)<br>
&nbsp;create mode 100644 meta/recipes-graphics/mesa/mesa-demos/0011-drop-demos-dependant-on-obsolete-MESA_screen_surface.patch<br>
<br>
diff --git a/meta/recipes-graphics/mesa/mesa-demos/0011-drop-demos-dependant-on-obsolete-MESA_screen_surface.patch b/meta/recipes-graphics/mesa/mesa-demos/0011-drop-demos-dependant-on-obsolete-MESA_screen_surface.patch<br>
new file mode 100644<br>
index 0000000..a2621ce<br>
--- /dev/null<br>
&#43;&#43;&#43; b/meta/recipes-graphics/mesa/mesa-demos/0011-drop-demos-dependant-on-obsolete-MESA_screen_surface.patch<br>
@@ -0,0 &#43;1,1592 @@<br>
&#43;commit 74443c6ee79f3251f643ea05e94df58183e37d0d<br>
&#43;Author: Matt Turner &lt;<a href="mailto:mattst88@gmail.com" target="_blank">mattst88@gmail.com</a>&gt;<br>
&#43;Date:&nbsp; &nbsp;Fri Aug 28 15:57:38 2015 -0700<br>
&#43;<br>
&#43;&nbsp; &nbsp; egl: Remove demos using EGL_MESA_screen_surface.<br>
&#43;<br>
&#43;&nbsp; &nbsp; The remnants of the extension were removed from Mesa in commit 7a58262e.<br>
&#43;<br>
&#43;&nbsp; &nbsp; Reviewed-by: Andreas Boll &lt;<a href="mailto:andreas.boll.dev@gmail.com" target="_blank">andreas.boll.dev@gmail.com</a>&gt;<br>
&#43;&nbsp; &nbsp; Tested-by: Andreas Boll &lt;<a href="mailto:andreas.boll.dev@gmail.com" target="_blank">andreas.boll.dev@gmail.com</a>&gt;<br>
&#43;&nbsp; &nbsp; Reviewed-by: Marek Olšák &lt;<a href="mailto:marek.olsak@amd.com" target="_blank">marek.olsak@amd.com</a>&gt;<br>
&#43;<br>
&#43;Upstream-Status: Backport<br>
&#43;<br>
&#43;diff --git a/src/egl/eglut/Makefile.am b/src/egl/eglut/Makefile.am<br>
&#43;index 2d2f2af..b765069 100644<br>
&#43;--- a/src/egl/eglut/Makefile.am<br>
&#43;&#43;&#43;&#43; b/src/egl/eglut/Makefile.am<br>
&#43;@@ -33,17 &#43;33,12 @@ if HAVE_WAYLAND<br>
&#43; eglut_wayland = <a href="http://libeglut_wayland.la" rel="noreferrer" target="_blank">
libeglut_wayland.la</a><br>
&#43; endif<br>
&#43;<br>
&#43;-noinst_LTLIBRARIES = <a href="http://libeglut_screen.la" rel="noreferrer" target="_blank">
libeglut_screen.la</a> $(eglut_x11) $(eglut_wayland)<br>
&#43;&#43;noinst_LTLIBRARIES = $(eglut_x11) $(eglut_wayland)<br>
&#43; endif<br>
&#43;<br>
&#43;-libeglut_screen_la_SOURCES = \<br>
&#43;-&nbsp; &nbsp; &nbsp; eglut.c \<br>
&#43;-&nbsp; &nbsp; &nbsp; eglut.h \<br>
&#43;-&nbsp; &nbsp; &nbsp; eglutint.h \<br>
&#43;-&nbsp; &nbsp; &nbsp; eglut_screen.c<br>
&#43;-<br>
&#43; libeglut_x11_la_SOURCES = \<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp;eglut.c \<br>
&#43;&#43;&nbsp; &nbsp; &nbsp; eglut.h \<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp;eglutint.h \<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp;eglut_x11.c<br>
&#43; libeglut_x11_la_CFLAGS = $(X11_CFLAGS) $(EGL_CFLAGS)<br>
&#43;@@ -52,6 &#43;47,7 @@ libeglut_x11_la_LIBADD = $(X11_LIBS) $(EGL_LIBS)<br>
&#43;<br>
&#43; libeglut_wayland_la_SOURCES = \<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp;eglut.c \<br>
&#43;&#43;&nbsp; &nbsp; &nbsp; eglut.h \<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp;eglutint.h \<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp;eglut_wayland.c<br>
&#43;<br>
&#43;diff --git a/src/egl/eglut/eglut.c b/src/egl/eglut/eglut.c<br>
&#43;index f6a2ad4..58b354a 100644<br>
&#43;--- a/src/egl/eglut/eglut.c<br>
&#43;&#43;&#43;&#43; b/src/egl/eglut/eglut.c<br>
&#43;@@ -176,9 &#43;176,6 @@ _eglutCreateWindow(const char *title, int x, int y, int w, int h)<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;win-&gt;config, win-&gt;native.u.pixmap, NULL);<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp;break;<br>
&#43;&nbsp; &nbsp; case EGL_PBUFFER_BIT:<br>
&#43;-#ifdef EGL_MESA_screen_surface<br>
&#43;-&nbsp; &nbsp;case EGL_SCREEN_BIT_MESA:<br>
&#43;-#endif<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp;win-&gt;surface = win-&gt;native.u.surface;<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp;break;<br>
&#43;&nbsp; &nbsp; default:<br>
&#43;@@ -292,11 &#43;289,7 @@ eglutDestroyWindow(int win)<br>
&#43;&nbsp; &nbsp; if (window-&gt;index != win)<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp;return;<br>
&#43;<br>
&#43;-#ifdef EGL_MESA_screen_surface<br>
&#43;-&nbsp; &nbsp;/* XXX it causes some bug in st/egl KMS backend */<br>
&#43;-&nbsp; &nbsp;if ( _eglut-&gt;surface_type != EGL_SCREEN_BIT_MESA)<br>
&#43;-#endif<br>
&#43;-&nbsp; &nbsp; &nbsp; eglMakeCurrent(_eglut-&gt;dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);<br>
&#43;&#43;&nbsp; &nbsp;eglMakeCurrent(_eglut-&gt;dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);<br>
&#43;<br>
&#43;&nbsp; &nbsp; _eglutDestroyWindow(_eglut-&gt;current);<br>
&#43; }<br>
&#43;diff --git a/src/egl/eglut/eglut_screen.c b/src/egl/eglut/eglut_screen.c<br>
&#43;deleted file mode 100644<br>
&#43;index 094a4e2..0000000<br>
&#43;--- a/src/egl/eglut/eglut_screen.c<br>
&#43;&#43;&#43;&#43; /dev/null<br>
&#43;@@ -1,194 &#43;0,0 @@<br>
&#43;-/*<br>
&#43;- * Copyright (C) 2010 LunarG Inc.<br>
&#43;- *<br>
&#43;- * Permission is hereby granted, free of charge, to any person obtaining a<br>
&#43;- * copy of this software and associated documentation files (the &quot;Software&quot;),<br>
&#43;- * to deal in the Software without restriction, including without limitation<br>
&#43;- * the rights to use, copy, modify, merge, publish, distribute, sublicense,<br>
&#43;- * and/or sell copies of the Software, and to permit persons to whom the<br>
&#43;- * Software is furnished to do so, subject to the following conditions:<br>
&#43;- *<br>
&#43;- * The above copyright notice and this permission notice shall be included<br>
&#43;- * in all copies or substantial portions of the Software.<br>
&#43;- *<br>
&#43;- * THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR<br>
&#43;- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,<br>
&#43;- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.&nbsp; IN NO EVENT SHALL<br>
&#43;- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER<br>
&#43;- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING<br>
&#43;- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER<br>
&#43;- * DEALINGS IN THE SOFTWARE.<br>
&#43;- *<br>
&#43;- * Authors:<br>
&#43;- *&nbsp; &nbsp; Chia-I Wu &lt;<a href="mailto:olv@lunarg.com" target="_blank">olv@lunarg.com</a>&gt;<br>
&#43;- */<br>
&#43;-<br>
&#43;-#include &lt;stdio.h&gt;<br>
&#43;-#include &lt;string.h&gt;<br>
&#43;-#include &lt;sys/time.h&gt;<br>
&#43;-<br>
&#43;-#define EGL_EGLEXT_PROTOTYPES<br>
&#43;-#include &quot;EGL/egl.h&quot;<br>
&#43;-#include &quot;EGL/eglext.h&quot;<br>
&#43;-<br>
&#43;-#include &quot;eglutint.h&quot;<br>
&#43;-<br>
&#43;-#define MAX_MODES 100<br>
&#43;-<br>
&#43;-#ifdef EGL_MESA_screen_surface<br>
&#43;-static EGLScreenMESA kms_screen;<br>
&#43;-static EGLModeMESA kms_mode;<br>
&#43;-static EGLint kms_width, kms_height;<br>
&#43;-#endif<br>
&#43;-<br>
&#43;-void<br>
&#43;-_eglutNativeInitDisplay(void)<br>
&#43;-{<br>
&#43;-#ifdef EGL_MESA_screen_surface<br>
&#43;-&nbsp; &nbsp;_eglut-&gt;native_dpy = EGL_DEFAULT_DISPLAY;<br>
&#43;-&nbsp; &nbsp;_eglut-&gt;surface_type = EGL_SCREEN_BIT_MESA;<br>
&#43;-#endif<br>
&#43;-}<br>
&#43;-<br>
&#43;-void<br>
&#43;-_eglutNativeFiniDisplay(void)<br>
&#43;-{<br>
&#43;-#ifdef EGL_MESA_screen_surface<br>
&#43;-&nbsp; &nbsp;kms_screen = 0;<br>
&#43;-&nbsp; &nbsp;kms_mode = 0;<br>
&#43;-&nbsp; &nbsp;kms_width = 0;<br>
&#43;-&nbsp; &nbsp;kms_height = 0;<br>
&#43;-#endif<br>
&#43;-}<br>
&#43;-<br>
&#43;-#ifdef EGL_MESA_screen_surface<br>
&#43;-static void<br>
&#43;-init_kms(void)<br>
&#43;-{<br>
&#43;-&nbsp; &nbsp;EGLModeMESA modes[MAX_MODES];<br>
&#43;-&nbsp; &nbsp;EGLint num_screens, num_modes;<br>
&#43;-&nbsp; &nbsp;EGLint width, height, best_mode;<br>
&#43;-&nbsp; &nbsp;EGLint i;<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;if (!eglGetScreensMESA(_eglut-&gt;dpy, &amp;kms_screen, 1, &amp;num_screens) ||<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;!num_screens)<br>
&#43;-&nbsp; &nbsp; &nbsp; _eglutFatal(&quot;eglGetScreensMESA failed\n&quot;);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;if (!eglGetModesMESA(_eglut-&gt;dpy, kms_screen,<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; modes, MAX_MODES, &amp;num_modes) || !num_modes)<br>
&#43;-&nbsp; &nbsp; &nbsp; _eglutFatal(&quot;eglGetModesMESA failed!\n&quot;);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;printf(&quot;Found %d modes:\n&quot;, num_modes);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;best_mode = 0;<br>
&#43;-&nbsp; &nbsp;width = 0;<br>
&#43;-&nbsp; &nbsp;height = 0;<br>
&#43;-&nbsp; &nbsp;for (i = 0; i &lt; num_modes; i&#43;&#43;) {<br>
&#43;-&nbsp; &nbsp; &nbsp; EGLint w, h;<br>
&#43;-&nbsp; &nbsp; &nbsp; eglGetModeAttribMESA(_eglut-&gt;dpy, modes[i], EGL_WIDTH, &amp;w);<br>
&#43;-&nbsp; &nbsp; &nbsp; eglGetModeAttribMESA(_eglut-&gt;dpy, modes[i], EGL_HEIGHT, &amp;h);<br>
&#43;-&nbsp; &nbsp; &nbsp; printf(&quot;%3d: %d x %d\n&quot;, i, w, h);<br>
&#43;-&nbsp; &nbsp; &nbsp; if (w &gt; width &amp;&amp; h &gt; height) {<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;width = w;<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;height = h;<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;best_mode = i;<br>
&#43;-&nbsp; &nbsp; &nbsp; }<br>
&#43;-&nbsp; &nbsp;}<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;printf(&quot;Will use screen size: %d x %d\n&quot;, width, height);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;kms_mode = modes[best_mode];<br>
&#43;-&nbsp; &nbsp;kms_width = width;<br>
&#43;-&nbsp; &nbsp;kms_height = height;<br>
&#43;-}<br>
&#43;-#endif<br>
&#43;-<br>
&#43;-void<br>
&#43;-_eglutNativeInitWindow(struct eglut_window *win, const char *title,<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int x, int y, int w, int h)<br>
&#43;-{<br>
&#43;-#ifdef EGL_MESA_screen_surface<br>
&#43;-&nbsp; &nbsp;EGLint surf_attribs[16];<br>
&#43;-&nbsp; &nbsp;EGLint i;<br>
&#43;-#endif<br>
&#43;-&nbsp; &nbsp;const char *exts;<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;exts = eglQueryString(_eglut-&gt;dpy, EGL_EXTENSIONS);<br>
&#43;-&nbsp; &nbsp;if (!exts || !strstr(exts, &quot;EGL_MESA_screen_surface&quot;))<br>
&#43;-&nbsp; &nbsp; &nbsp; _eglutFatal(&quot;EGL_MESA_screen_surface is not supported\n&quot;);<br>
&#43;-<br>
&#43;-#ifdef EGL_MESA_screen_surface<br>
&#43;-&nbsp; &nbsp;init_kms();<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;i = 0;<br>
&#43;-&nbsp; &nbsp;surf_attribs[i&#43;&#43;] = EGL_WIDTH;<br>
&#43;-&nbsp; &nbsp;surf_attribs[i&#43;&#43;] = kms_width;<br>
&#43;-&nbsp; &nbsp;surf_attribs[i&#43;&#43;] = EGL_HEIGHT;<br>
&#43;-&nbsp; &nbsp;surf_attribs[i&#43;&#43;] = kms_height;<br>
&#43;-&nbsp; &nbsp;surf_attribs[i&#43;&#43;] = EGL_NONE;<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;/* create surface */<br>
&#43;-&nbsp; &nbsp;win-&gt;native.u.surface = eglCreateScreenSurfaceMESA(_eglut-&gt;dpy,<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;win-&gt;config, surf_attribs);<br>
&#43;-&nbsp; &nbsp;if (win-&gt;native.u.surface == EGL_NO_SURFACE)<br>
&#43;-&nbsp; &nbsp; &nbsp; _eglutFatal(&quot;eglCreateScreenSurfaceMESA failed\n&quot;);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;if (!eglShowScreenSurfaceMESA(_eglut-&gt;dpy, kms_screen,<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; win-&gt;native.u.surface, kms_mode))<br>
&#43;-&nbsp; &nbsp; &nbsp; _eglutFatal(&quot;eglShowScreenSurfaceMESA failed\n&quot;);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;win-&gt;native.width = kms_width;<br>
&#43;-&nbsp; &nbsp;win-&gt;native.height = kms_height;<br>
&#43;-#endif<br>
&#43;-}<br>
&#43;-<br>
&#43;-void<br>
&#43;-_eglutNativeFiniWindow(struct eglut_window *win)<br>
&#43;-{<br>
&#43;-#ifdef EGL_MESA_screen_surface<br>
&#43;-&nbsp; &nbsp;eglShowScreenSurfaceMESA(_eglut-&gt;dpy,<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;kms_screen, EGL_NO_SURFACE, 0);<br>
&#43;-&nbsp; &nbsp;eglDestroySurface(_eglut-&gt;dpy, win-&gt;native.u.surface);<br>
&#43;-#endif<br>
&#43;-}<br>
&#43;-<br>
&#43;-void<br>
&#43;-_eglutNativeEventLoop(void)<br>
&#43;-{<br>
&#43;-&nbsp; &nbsp;int start = _eglutNow();<br>
&#43;-&nbsp; &nbsp;int frames = 0;<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;_eglut-&gt;redisplay = 1;<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;while (1) {<br>
&#43;-&nbsp; &nbsp; &nbsp; struct eglut_window *win = _eglut-&gt;current;<br>
&#43;-&nbsp; &nbsp; &nbsp; int now = _eglutNow();<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; &nbsp; if (now - start &gt; 5000) {<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;double elapsed = (double) (now - start) / 1000.0;<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;printf(&quot;%d frames in %3.1f seconds = %6.3f FPS\n&quot;,<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;frames, elapsed, frames / elapsed);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fflush(stdout);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;start = now;<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;frames = 0;<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/* send escape */<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (win-&gt;keyboard_cb)<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; win-&gt;keyboard_cb(27);<br>
&#43;-&nbsp; &nbsp; &nbsp; }<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; &nbsp; if (_eglut-&gt;idle_cb)<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_eglut-&gt;idle_cb();<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; &nbsp; if (_eglut-&gt;redisplay) {<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_eglut-&gt;redisplay = 0;<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (win-&gt;display_cb)<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; win-&gt;display_cb();<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;eglSwapBuffers(_eglut-&gt;dpy, win-&gt;surface);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;frames&#43;&#43;;<br>
&#43;-&nbsp; &nbsp; &nbsp; }<br>
&#43;-&nbsp; &nbsp;}<br>
&#43;-}<br>
&#43;diff --git a/src/egl/opengl/Makefile.am b/src/egl/opengl/Makefile.am<br>
&#43;index 87b2f1a..3e48141 100644<br>
&#43;--- a/src/egl/opengl/Makefile.am<br>
&#43;&#43;&#43;&#43; b/src/egl/opengl/Makefile.am<br>
&#43;@@ -51,20 &#43;51,12 @@ endif<br>
&#43;<br>
&#43; if HAVE_EGL<br>
&#43; bin_PROGRAMS = \<br>
&#43;-&nbsp; &nbsp; &nbsp; demo1 \<br>
&#43;-&nbsp; &nbsp; &nbsp; demo2 \<br>
&#43;-&nbsp; &nbsp; &nbsp; demo3 \<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp;eglinfo \<br>
&#43;-&nbsp; &nbsp; &nbsp; eglgears_screen \<br>
&#43;-&nbsp; &nbsp; &nbsp; egltri_screen \<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp;peglgears \<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp;$(EGL_DRM_DEMOS) \<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp;$(EGL_X11_DEMOS)<br>
&#43; endif<br>
&#43;<br>
&#43;-egltri_screen_SOURCES = egltri.c<br>
&#43;-eglgears_screen_SOURCES = eglgears.c<br>
&#43;-<br>
&#43; egltri_x11_SOURCES = egltri.c<br>
&#43; eglgears_x11_SOURCES = eglgears.c<br>
&#43;<br>
&#43;@@ -73,9 &#43;65,6 @@ egltri_x11_LDFLAGS = $(AM_LDFLAGS) $(X11_LIBS)<br>
&#43; xeglgears_LDFLAGS = $(AM_LDFLAGS) $(X11_LIBS)<br>
&#43; xeglthreads_LDFLAGS = $(AM_LDFLAGS) $(X11_LIBS) -pthread<br>
&#43;<br>
&#43;-eglgears_screen_LDADD = ../eglut/<a href="http://libeglut_screen.la" rel="noreferrer" target="_blank">libeglut_screen.la</a><br>
&#43;-egltri_screen_LDADD = ../eglut/<a href="http://libeglut_screen.la" rel="noreferrer" target="_blank">libeglut_screen.la</a><br>
&#43;-<br>
&#43; eglgears_x11_LDADD = ../eglut/<a href="http://libeglut_x11.la" rel="noreferrer" target="_blank">libeglut_x11.la</a><br>
&#43; egltri_x11_LDADD = ../eglut/<a href="http://libeglut_x11.la" rel="noreferrer" target="_blank">libeglut_x11.la</a><br>
&#43;<br>
&#43;diff --git a/src/egl/opengl/demo1.c b/src/egl/opengl/demo1.c<br>
&#43;deleted file mode 100644<br>
&#43;index 06e2138..0000000<br>
&#43;--- a/src/egl/opengl/demo1.c<br>
&#43;&#43;&#43;&#43; /dev/null<br>
&#43;@@ -1,155 &#43;0,0 @@<br>
&#43;-/*<br>
&#43;- * Exercise EGL API functions<br>
&#43;- */<br>
&#43;-<br>
&#43;-#define EGL_EGLEXT_PROTOTYPES<br>
&#43;-<br>
&#43;-#include &lt;EGL/egl.h&gt;<br>
&#43;-#include &lt;EGL/eglext.h&gt;<br>
&#43;-#include &lt;assert.h&gt;<br>
&#43;-#include &lt;stdio.h&gt;<br>
&#43;-#include &lt;stdlib.h&gt;<br>
&#43;-#include &lt;string.h&gt;<br>
&#43;-<br>
&#43;-<br>
&#43;-/**<br>
&#43;- * Test EGL_MESA_screen_surface functions<br>
&#43;- */<br>
&#43;-static void<br>
&#43;-TestScreens(EGLDisplay dpy)<br>
&#43;-{<br>
&#43;-#ifdef EGL_MESA_screen_surface<br>
&#43;-#define MAX 8<br>
&#43;-&nbsp; &nbsp;EGLScreenMESA screens[MAX];<br>
&#43;-&nbsp; &nbsp;EGLint numScreens;<br>
&#43;-&nbsp; &nbsp;EGLint i;<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;eglGetScreensMESA(dpy, screens, MAX, &amp;numScreens);<br>
&#43;-&nbsp; &nbsp;printf(&quot;Found %d screens\n&quot;, numScreens);<br>
&#43;-&nbsp; &nbsp;for (i = 0; i &lt; numScreens; i&#43;&#43;) {<br>
&#43;-&nbsp; &nbsp; &nbsp; printf(&quot; Screen %d handle: %d\n&quot;, i, (int) screens[i]);<br>
&#43;-&nbsp; &nbsp;}<br>
&#43;-#endif<br>
&#43;-}<br>
&#43;-<br>
&#43;-/**<br>
&#43;- * Print table of all available configurations.<br>
&#43;- */<br>
&#43;-static void<br>
&#43;-PrintConfigs(EGLDisplay d, EGLConfig *configs, EGLint numConfigs)<br>
&#43;-{<br>
&#43;-&nbsp; &nbsp;EGLint i;<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;printf(&quot;Configurations:\n&quot;);<br>
&#43;-&nbsp; &nbsp;printf(&quot;&nbsp; &nbsp; &nbsp;bf lv d st colorbuffer dp st&nbsp; &nbsp;supported \n&quot;);<br>
&#43;-&nbsp; &nbsp;printf(&quot;&nbsp; id sz&nbsp; l b ro&nbsp; r&nbsp; g&nbsp; b&nbsp; a th cl&nbsp; &nbsp;surfaces&nbsp; \n&quot;);<br>
&#43;-&nbsp; &nbsp;printf(&quot;----------------------------------------------\n&quot;);<br>
&#43;-&nbsp; &nbsp;for (i = 0; i &lt; numConfigs; i&#43;&#43;) {<br>
&#43;-&nbsp; &nbsp; &nbsp; EGLint id, size, level;<br>
&#43;-&nbsp; &nbsp; &nbsp; EGLint red, green, blue, alpha;<br>
&#43;-&nbsp; &nbsp; &nbsp; EGLint depth, stencil;<br>
&#43;-&nbsp; &nbsp; &nbsp; EGLint surfaces;<br>
&#43;-&nbsp; &nbsp; &nbsp; EGLint doubleBuf = 1, stereo = 0;<br>
&#43;-&nbsp; &nbsp; &nbsp; char surfString[100] = &quot;&quot;;<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; &nbsp; eglGetConfigAttrib(d, configs[i], EGL_CONFIG_ID, &amp;id);<br>
&#43;-&nbsp; &nbsp; &nbsp; eglGetConfigAttrib(d, configs[i], EGL_BUFFER_SIZE, &amp;size);<br>
&#43;-&nbsp; &nbsp; &nbsp; eglGetConfigAttrib(d, configs[i], EGL_LEVEL, &amp;level);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; &nbsp; eglGetConfigAttrib(d, configs[i], EGL_RED_SIZE, &amp;red);<br>
&#43;-&nbsp; &nbsp; &nbsp; eglGetConfigAttrib(d, configs[i], EGL_GREEN_SIZE, &amp;green);<br>
&#43;-&nbsp; &nbsp; &nbsp; eglGetConfigAttrib(d, configs[i], EGL_BLUE_SIZE, &amp;blue);<br>
&#43;-&nbsp; &nbsp; &nbsp; eglGetConfigAttrib(d, configs[i], EGL_ALPHA_SIZE, &amp;alpha);<br>
&#43;-&nbsp; &nbsp; &nbsp; eglGetConfigAttrib(d, configs[i], EGL_DEPTH_SIZE, &amp;depth);<br>
&#43;-&nbsp; &nbsp; &nbsp; eglGetConfigAttrib(d, configs[i], EGL_STENCIL_SIZE, &amp;stencil);<br>
&#43;-&nbsp; &nbsp; &nbsp; eglGetConfigAttrib(d, configs[i], EGL_SURFACE_TYPE, &amp;surfaces);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; &nbsp; if (surfaces &amp; EGL_WINDOW_BIT)<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;strcat(surfString, &quot;win,&quot;);<br>
&#43;-&nbsp; &nbsp; &nbsp; if (surfaces &amp; EGL_PBUFFER_BIT)<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;strcat(surfString, &quot;pb,&quot;);<br>
&#43;-&nbsp; &nbsp; &nbsp; if (surfaces &amp; EGL_PIXMAP_BIT)<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;strcat(surfString, &quot;pix,&quot;);<br>
&#43;-&nbsp; &nbsp; &nbsp; if (strlen(surfString) &gt; 0)<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;surfString[strlen(surfString) - 1] = 0;<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; &nbsp; printf(&quot;0x%02x %2d %2d %c&nbsp; %c %2d %2d %2d %2d %2d %2d&nbsp; &nbsp;%-12s\n&quot;,<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;id, size, level,<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;doubleBuf ? 'y' : '.',<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;stereo ? 'y' : '.',<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;red, green, blue, alpha,<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;depth, stencil, surfString);<br>
&#43;-&nbsp; &nbsp;}<br>
&#43;-}<br>
&#43;-<br>
&#43;-<br>
&#43;-<br>
&#43;-int<br>
&#43;-main(int argc, char *argv[])<br>
&#43;-{<br>
&#43;-&nbsp; &nbsp;int maj, min;<br>
&#43;-&nbsp; &nbsp;EGLContext ctx;<br>
&#43;-&nbsp; &nbsp;EGLSurface pbuffer;<br>
&#43;-&nbsp; &nbsp;EGLConfig *configs;<br>
&#43;-&nbsp; &nbsp;EGLint numConfigs;<br>
&#43;-&nbsp; &nbsp;EGLBoolean b;<br>
&#43;-&nbsp; &nbsp;const EGLint pbufAttribs[] = {<br>
&#43;-&nbsp; &nbsp; &nbsp; EGL_WIDTH, 500,<br>
&#43;-&nbsp; &nbsp; &nbsp; EGL_HEIGHT, 500,<br>
&#43;-&nbsp; &nbsp; &nbsp; EGL_NONE<br>
&#43;-&nbsp; &nbsp;};<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;EGLDisplay d = eglGetDisplay(EGL_DEFAULT_DISPLAY);<br>
&#43;-&nbsp; &nbsp;assert(d);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;if (!eglInitialize(d, &amp;maj, &amp;min)) {<br>
&#43;-&nbsp; &nbsp; &nbsp; printf(&quot;demo: eglInitialize failed\n&quot;);<br>
&#43;-&nbsp; &nbsp; &nbsp; exit(1);<br>
&#43;-&nbsp; &nbsp;}<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;printf(&quot;EGL version = %d.%d\n&quot;, maj, min);<br>
&#43;-&nbsp; &nbsp;printf(&quot;EGL_VENDOR = %s\n&quot;, eglQueryString(d, EGL_VENDOR));<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;if (!strstr(eglQueryString(d, EGL_EXTENSIONS),<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;EGL_MESA_screen_surface&quot;)) {<br>
&#43;-&nbsp; &nbsp; &nbsp; printf(&quot;EGL_MESA_screen_surface is not supported\n&quot;);<br>
&#43;-&nbsp; &nbsp; &nbsp; exit(1);<br>
&#43;-&nbsp; &nbsp;}<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;eglGetConfigs(d, NULL, 0, &amp;numConfigs);<br>
&#43;-&nbsp; &nbsp;configs = malloc(sizeof(*configs) *numConfigs);<br>
&#43;-&nbsp; &nbsp;eglGetConfigs(d, configs, numConfigs, &amp;numConfigs);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;PrintConfigs(d, configs, numConfigs);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;eglBindAPI(EGL_OPENGL_API);<br>
&#43;-&nbsp; &nbsp;ctx = eglCreateContext(d, configs[0], EGL_NO_CONTEXT, NULL);<br>
&#43;-&nbsp; &nbsp;if (ctx == EGL_NO_CONTEXT) {<br>
&#43;-&nbsp; &nbsp; &nbsp; printf(&quot;failed to create context\n&quot;);<br>
&#43;-&nbsp; &nbsp; &nbsp; return 0;<br>
&#43;-&nbsp; &nbsp;}<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;pbuffer = eglCreatePbufferSurface(d, configs[0], pbufAttribs);<br>
&#43;-&nbsp; &nbsp;if (pbuffer == EGL_NO_SURFACE) {<br>
&#43;-&nbsp; &nbsp; &nbsp; printf(&quot;failed to create pbuffer\n&quot;);<br>
&#43;-&nbsp; &nbsp; &nbsp; return 0;<br>
&#43;-&nbsp; &nbsp;}<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;free(configs);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;b = eglMakeCurrent(d, pbuffer, pbuffer, ctx);<br>
&#43;-&nbsp; &nbsp;if (!b) {<br>
&#43;-&nbsp; &nbsp; &nbsp; printf(&quot;make current failed\n&quot;);<br>
&#43;-&nbsp; &nbsp; &nbsp; return 0;<br>
&#43;-&nbsp; &nbsp;}<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;b = eglMakeCurrent(d, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;TestScreens(d);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;eglDestroySurface(d, pbuffer);<br>
&#43;-&nbsp; &nbsp;eglDestroyContext(d, ctx);<br>
&#43;-&nbsp; &nbsp;eglTerminate(d);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;return 0;<br>
&#43;-}<br>
&#43;diff --git a/src/egl/opengl/demo2.c b/src/egl/opengl/demo2.c<br>
&#43;deleted file mode 100644<br>
&#43;index bfef59e..0000000<br>
&#43;--- a/src/egl/opengl/demo2.c<br>
&#43;&#43;&#43;&#43; /dev/null<br>
&#43;@@ -1,221 &#43;0,0 @@<br>
&#43;-/*<br>
&#43;- * Exercise EGL API functions<br>
&#43;- */<br>
&#43;-<br>
&#43;-#define EGL_EGLEXT_PROTOTYPES<br>
&#43;-<br>
&#43;-#include &lt;assert.h&gt;<br>
&#43;-#include &lt;stdio.h&gt;<br>
&#43;-#include &lt;stdlib.h&gt;<br>
&#43;-#include &lt;string.h&gt;<br>
&#43;-#include &lt;unistd.h&gt;<br>
&#43;-<br>
&#43;-#include &lt;EGL/egl.h&gt;<br>
&#43;-#include &lt;EGL/eglext.h&gt;<br>
&#43;-#include &quot;gl_wrap.h&quot;<br>
&#43;-<br>
&#43;-/*#define FRONTBUFFER*/<br>
&#43;-<br>
&#43;-#ifdef EGL_MESA_screen_surface<br>
&#43;-static void _subset_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2,<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GLfloat r, GLfloat g, GLfloat b)<br>
&#43;-{<br>
&#43;-&nbsp; &nbsp;GLfloat v[4][2], c[4][4];<br>
&#43;-&nbsp; &nbsp;int i;<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;v[0][0] = x1;&nbsp; &nbsp;v[0][1] = y1;<br>
&#43;-&nbsp; &nbsp;v[1][0] = x2;&nbsp; &nbsp;v[1][1] = y1;<br>
&#43;-&nbsp; &nbsp;v[2][0] = x2;&nbsp; &nbsp;v[2][1] = y2;<br>
&#43;-&nbsp; &nbsp;v[3][0] = x1;&nbsp; &nbsp;v[3][1] = y2;<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;for (i = 0; i &lt; 4; i&#43;&#43;) {<br>
&#43;-&nbsp; &nbsp; &nbsp; c[i][0] = r;<br>
&#43;-&nbsp; &nbsp; &nbsp; c[i][1] = g;<br>
&#43;-&nbsp; &nbsp; &nbsp; c[i][2] = b;<br>
&#43;-&nbsp; &nbsp; &nbsp; c[i][3] = 1.0;<br>
&#43;-&nbsp; &nbsp;}<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;glVertexPointer(2, GL_FLOAT, 0, v);<br>
&#43;-&nbsp; &nbsp;glColorPointer(4, GL_FLOAT, 0, c);<br>
&#43;-&nbsp; &nbsp;glEnableClientState(GL_VERTEX_ARRAY);<br>
&#43;-&nbsp; &nbsp;glEnableClientState(GL_COLOR_ARRAY);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;glDrawArrays(GL_TRIANGLE_FAN, 0, 4);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;glDisableClientState(GL_VERTEX_ARRAY);<br>
&#43;-&nbsp; &nbsp;glDisableClientState(GL_COLOR_ARRAY);<br>
&#43;-}<br>
&#43;-<br>
&#43;-<br>
&#43;-static void redraw(EGLDisplay dpy, EGLSurface surf, int rot)<br>
&#43;-{<br>
&#43;-&nbsp; &nbsp;GLfloat r, g, b;<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;printf(&quot;Redraw event\n&quot;);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;glClearColor( rand()/(float)RAND_MAX,<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;rand()/(float)RAND_MAX,<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;rand()/(float)RAND_MAX,<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;glClear( GL_COLOR_BUFFER_BIT );<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;r = rand()/(float)RAND_MAX;<br>
&#43;-&nbsp; &nbsp;g = rand()/(float)RAND_MAX;<br>
&#43;-&nbsp; &nbsp;b = rand()/(float)RAND_MAX;<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;glPushMatrix();<br>
&#43;-&nbsp; &nbsp;glRotatef(rot, 0, 0, 1);<br>
&#43;-&nbsp; &nbsp;glScalef(.5, .5, .5);<br>
&#43;-&nbsp; &nbsp;_subset_Rectf( -1, -1, 1, 1, r, g, b );<br>
&#43;-&nbsp; &nbsp;glPopMatrix();<br>
&#43;-<br>
&#43;-#ifdef FRONTBUFFER<br>
&#43;-&nbsp; &nbsp;glFlush();<br>
&#43;-#else<br>
&#43;-&nbsp; &nbsp;eglSwapBuffers( dpy, surf );<br>
&#43;-#endif<br>
&#43;-&nbsp; &nbsp;glFinish();<br>
&#43;-}<br>
&#43;-<br>
&#43;-<br>
&#43;-/**<br>
&#43;- * Test EGL_MESA_screen_surface functions<br>
&#43;- */<br>
&#43;-static void<br>
&#43;-TestScreens(EGLDisplay dpy)<br>
&#43;-{<br>
&#43;-#define MAX 8<br>
&#43;-&nbsp; &nbsp;EGLScreenMESA screens[MAX];<br>
&#43;-&nbsp; &nbsp;EGLint numScreens;<br>
&#43;-&nbsp; &nbsp;EGLint i;<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;eglGetScreensMESA(dpy, screens, MAX, &amp;numScreens);<br>
&#43;-&nbsp; &nbsp;printf(&quot;Found %d screens\n&quot;, numScreens);<br>
&#43;-&nbsp; &nbsp;for (i = 0; i &lt; numScreens; i&#43;&#43;) {<br>
&#43;-&nbsp; &nbsp; &nbsp; printf(&quot; Screen %d handle: %d\n&quot;, i, (int) screens[i]);<br>
&#43;-&nbsp; &nbsp;}<br>
&#43;-}<br>
&#43;-#endif<br>
&#43;-<br>
&#43;-int<br>
&#43;-main(int argc, char *argv[])<br>
&#43;-{<br>
&#43;-&nbsp; &nbsp;int maj, min;<br>
&#43;-#ifdef EGL_MESA_screen_surface<br>
&#43;-&nbsp; &nbsp;EGLContext ctx;<br>
&#43;-&nbsp; &nbsp;EGLSurface pbuffer, screen_surf;<br>
&#43;-&nbsp; &nbsp;EGLConfig configs[10];<br>
&#43;-&nbsp; &nbsp;EGLint numConfigs, i;<br>
&#43;-&nbsp; &nbsp;EGLBoolean b;<br>
&#43;-&nbsp; &nbsp;const EGLint pbufAttribs[] = {<br>
&#43;-&nbsp; &nbsp; &nbsp; EGL_WIDTH, 500,<br>
&#43;-&nbsp; &nbsp; &nbsp; EGL_HEIGHT, 500,<br>
&#43;-&nbsp; &nbsp; &nbsp; EGL_NONE<br>
&#43;-&nbsp; &nbsp;};<br>
&#43;-&nbsp; &nbsp;EGLint screenAttribs[32];<br>
&#43;-&nbsp; &nbsp;EGLModeMESA mode;<br>
&#43;-&nbsp; &nbsp;EGLScreenMESA screen;<br>
&#43;-&nbsp; &nbsp;EGLint count;<br>
&#43;-#endif<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;EGLDisplay d = eglGetDisplay(EGL_DEFAULT_DISPLAY);<br>
&#43;-&nbsp; &nbsp;assert(d);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;if (!eglInitialize(d, &amp;maj, &amp;min)) {<br>
&#43;-&nbsp; &nbsp; &nbsp; printf(&quot;demo: eglInitialize failed\n&quot;);<br>
&#43;-&nbsp; &nbsp; &nbsp; exit(1);<br>
&#43;-&nbsp; &nbsp;}<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;printf(&quot;EGL version = %d.%d\n&quot;, maj, min);<br>
&#43;-&nbsp; &nbsp;printf(&quot;EGL_VENDOR = %s\n&quot;, eglQueryString(d, EGL_VENDOR));<br>
&#43;-&nbsp; &nbsp;if (!strstr(eglQueryString(d, EGL_EXTENSIONS),<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;EGL_MESA_screen_surface&quot;)) {<br>
&#43;-&nbsp; &nbsp; &nbsp; printf(&quot;EGL_MESA_screen_surface is not supported\n&quot;);<br>
&#43;-&nbsp; &nbsp; &nbsp; exit(1);<br>
&#43;-&nbsp; &nbsp;}<br>
&#43;-<br>
&#43;-#ifdef EGL_MESA_screen_surface<br>
&#43;-&nbsp; &nbsp;eglGetConfigs(d, configs, 10, &amp;numConfigs);<br>
&#43;-&nbsp; &nbsp;printf(&quot;Got %d EGL configs:\n&quot;, numConfigs);<br>
&#43;-&nbsp; &nbsp;for (i = 0; i &lt; numConfigs; i&#43;&#43;) {<br>
&#43;-&nbsp; &nbsp; &nbsp; EGLint id, red, depth;<br>
&#43;-&nbsp; &nbsp; &nbsp; eglGetConfigAttrib(d, configs[i], EGL_CONFIG_ID, &amp;id);<br>
&#43;-&nbsp; &nbsp; &nbsp; eglGetConfigAttrib(d, configs[i], EGL_RED_SIZE, &amp;red);<br>
&#43;-&nbsp; &nbsp; &nbsp; eglGetConfigAttrib(d, configs[i], EGL_DEPTH_SIZE, &amp;depth);<br>
&#43;-&nbsp; &nbsp; &nbsp; printf(&quot;%2d:&nbsp; Red Size = %d&nbsp; Depth Size = %d\n&quot;, id, red, depth);<br>
&#43;-&nbsp; &nbsp;}<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;eglGetScreensMESA(d, &amp;screen, 1, &amp;count);<br>
&#43;-&nbsp; &nbsp;eglGetModesMESA(d, screen, &amp;mode, 1, &amp;count);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;eglBindAPI(EGL_OPENGL_API);<br>
&#43;-&nbsp; &nbsp;ctx = eglCreateContext(d, configs[0], EGL_NO_CONTEXT, NULL);<br>
&#43;-&nbsp; &nbsp;if (ctx == EGL_NO_CONTEXT) {<br>
&#43;-&nbsp; &nbsp; &nbsp; printf(&quot;failed to create context\n&quot;);<br>
&#43;-&nbsp; &nbsp; &nbsp; return 0;<br>
&#43;-&nbsp; &nbsp;}<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;pbuffer = eglCreatePbufferSurface(d, configs[0], pbufAttribs);<br>
&#43;-&nbsp; &nbsp;if (pbuffer == EGL_NO_SURFACE) {<br>
&#43;-&nbsp; &nbsp; &nbsp; printf(&quot;failed to create pbuffer\n&quot;);<br>
&#43;-&nbsp; &nbsp; &nbsp; return 0;<br>
&#43;-&nbsp; &nbsp;}<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;b = eglMakeCurrent(d, pbuffer, pbuffer, ctx);<br>
&#43;-&nbsp; &nbsp;if (!b) {<br>
&#43;-&nbsp; &nbsp; &nbsp; printf(&quot;make current failed\n&quot;);<br>
&#43;-&nbsp; &nbsp; &nbsp; return 0;<br>
&#43;-&nbsp; &nbsp;}<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;b = eglMakeCurrent(d, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;i = 0;<br>
&#43;-&nbsp; &nbsp;screenAttribs[i&#43;&#43;] = EGL_WIDTH;<br>
&#43;-&nbsp; &nbsp;eglGetModeAttribMESA(d, mode, EGL_WIDTH, &amp;screenAttribs[i&#43;&#43;]);<br>
&#43;-&nbsp; &nbsp;screenAttribs[i&#43;&#43;] = EGL_HEIGHT;<br>
&#43;-&nbsp; &nbsp;eglGetModeAttribMESA(d, mode, EGL_HEIGHT, &amp;screenAttribs[i&#43;&#43;]);<br>
&#43;-&nbsp; &nbsp;screenAttribs[i] = EGL_NONE;<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;screen_surf = eglCreateScreenSurfaceMESA(d, configs[0], screenAttribs);<br>
&#43;-&nbsp; &nbsp;if (screen_surf == EGL_NO_SURFACE) {<br>
&#43;-&nbsp; &nbsp; &nbsp; printf(&quot;failed to create screen surface\n&quot;);<br>
&#43;-&nbsp; &nbsp; &nbsp; return 0;<br>
&#43;-&nbsp; &nbsp;}<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;eglShowScreenSurfaceMESA(d, screen, screen_surf, mode);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;b = eglMakeCurrent(d, screen_surf, screen_surf, ctx);<br>
&#43;-&nbsp; &nbsp;if (!b) {<br>
&#43;-&nbsp; &nbsp; &nbsp; printf(&quot;make current failed\n&quot;);<br>
&#43;-&nbsp; &nbsp; &nbsp; return 0;<br>
&#43;-&nbsp; &nbsp;}<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;glViewport(0, 0, 1024, 768);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;glClearColor( 0,<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1.0,<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0,<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;glClear( GL_COLOR_BUFFER_BIT );<br>
&#43;-<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;TestScreens(d);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;glShadeModel( GL_FLAT );<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;for (i = 0; i &lt; 6; i&#43;&#43;) {<br>
&#43;-&nbsp; &nbsp; &nbsp; redraw(d, screen_surf, i*10 );<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; &nbsp; printf(&quot;sleep(1)\n&quot;);<br>
&#43;-&nbsp; &nbsp; &nbsp; sleep(1);<br>
&#43;-&nbsp; &nbsp;}<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;eglDestroySurface(d, pbuffer);<br>
&#43;-&nbsp; &nbsp;eglDestroyContext(d, ctx);<br>
&#43;-&nbsp; &nbsp;eglTerminate(d);<br>
&#43;-#endif<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;return 0;<br>
&#43;-}<br>
&#43;diff --git a/src/egl/opengl/demo3.c b/src/egl/opengl/demo3.c<br>
&#43;deleted file mode 100644<br>
&#43;index 31b5d8b..0000000<br>
&#43;--- a/src/egl/opengl/demo3.c<br>
&#43;&#43;&#43;&#43; /dev/null<br>
&#43;@@ -1,652 &#43;0,0 @@<br>
&#43;-/*<br>
&#43;- * Exercise EGL API functions<br>
&#43;- */<br>
&#43;-<br>
&#43;-#define EGL_EGLEXT_PROTOTYPES<br>
&#43;-<br>
&#43;-#include &lt;EGL/egl.h&gt;<br>
&#43;-#include &lt;EGL/eglext.h&gt;<br>
&#43;-#include &quot;gl_wrap.h&quot;<br>
&#43;-#include &lt;assert.h&gt;<br>
&#43;-#include &lt;stdio.h&gt;<br>
&#43;-#include &lt;stdlib.h&gt;<br>
&#43;-#include &lt;string.h&gt;<br>
&#43;-#include &lt;unistd.h&gt;<br>
&#43;-<br>
&#43;-<br>
&#43;-<br>
&#43;-#define PIXEL_CENTER(x) ((long)(x) &#43; 0.5)<br>
&#43;-<br>
&#43;-#define GAP 10<br>
&#43;-#define ROWS 3<br>
&#43;-#define COLS 4<br>
&#43;-<br>
&#43;-#define OPENGL_WIDTH 48<br>
&#43;-#define OPENGL_HEIGHT 13<br>
&#43;-<br>
&#43;-<br>
&#43;-GLenum rgb, doubleBuffer, windType;<br>
&#43;-GLint windW, windH;<br>
&#43;-<br>
&#43;-GLenum mode1, mode2;<br>
&#43;-GLint boxW, boxH;<br>
&#43;-GLubyte OpenGL_bits[] = {<br>
&#43;-&nbsp; &nbsp;0x00, 0x03, 0x00, 0x00, 0x00, 0x00,<br>
&#43;-&nbsp; &nbsp;0x7f, 0xfb, 0xff, 0xff, 0xff, 0x01,<br>
&#43;-&nbsp; &nbsp;0x7f, 0xfb, 0xff, 0xff, 0xff, 0x01,<br>
&#43;-&nbsp; &nbsp;0x00, 0x03, 0x00, 0x00, 0x00, 0x00,<br>
&#43;-&nbsp; &nbsp;0x3e, 0x8f, 0xb7, 0xf9, 0xfc, 0x01,<br>
&#43;-&nbsp; &nbsp;0x63, 0xdb, 0xb0, 0x8d, 0x0d, 0x00,<br>
&#43;-&nbsp; &nbsp;0x63, 0xdb, 0xb7, 0x8d, 0x0d, 0x00,<br>
&#43;-&nbsp; &nbsp;0x63, 0xdb, 0xb6, 0x8d, 0x0d, 0x00,<br>
&#43;-&nbsp; &nbsp;0x63, 0x8f, 0xf3, 0xcc, 0x0d, 0x00,<br>
&#43;-&nbsp; &nbsp;0x63, 0x00, 0x00, 0x0c, 0x4c, 0x0a,<br>
&#43;-&nbsp; &nbsp;0x63, 0x00, 0x00, 0x0c, 0x4c, 0x0e,<br>
&#43;-&nbsp; &nbsp;0x63, 0x00, 0x00, 0x8c, 0xed, 0x0e,<br>
&#43;-&nbsp; &nbsp;0x3e, 0x00, 0x00, 0xf8, 0x0c, 0x00,<br>
&#43;-};<br>
&#43;-<br>
&#43;-#ifdef EGL_MESA_screen_surface<br>
&#43;-static void Init(void)<br>
&#43;-{<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; mode1 = GL_TRUE;<br>
&#43;-&nbsp; &nbsp; mode2 = GL_TRUE;<br>
&#43;-}<br>
&#43;-<br>
&#43;-static void Reshape(int width, int height)<br>
&#43;-{<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; windW = (GLint)width;<br>
&#43;-&nbsp; &nbsp; windH = (GLint)height;<br>
&#43;-}<br>
&#43;-<br>
&#43;-#if 0<br>
&#43;-static void RotateColorMask(void)<br>
&#43;-{<br>
&#43;-&nbsp; &nbsp; static GLint rotation = 0;<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; rotation = (rotation &#43; 1) &amp; 0x3;<br>
&#43;-&nbsp; &nbsp; switch (rotation) {<br>
&#43;-&nbsp; &nbsp; &nbsp; case 0:<br>
&#43;-&nbsp; &nbsp; &nbsp; glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);<br>
&#43;-&nbsp; &nbsp; &nbsp; glIndexMask( 0xff );<br>
&#43;-&nbsp; &nbsp; &nbsp; break;<br>
&#43;-&nbsp; &nbsp; &nbsp; case 1:<br>
&#43;-&nbsp; &nbsp; &nbsp; glColorMask(GL_FALSE, GL_TRUE, GL_TRUE, GL_TRUE);<br>
&#43;-&nbsp; &nbsp; &nbsp; glIndexMask(0xFE);<br>
&#43;-&nbsp; &nbsp; &nbsp; break;<br>
&#43;-&nbsp; &nbsp; &nbsp; case 2:<br>
&#43;-&nbsp; &nbsp; &nbsp; glColorMask(GL_TRUE, GL_FALSE, GL_TRUE, GL_TRUE);<br>
&#43;-&nbsp; &nbsp; &nbsp; glIndexMask(0xFD);<br>
&#43;-&nbsp; &nbsp; &nbsp; break;<br>
&#43;-&nbsp; &nbsp; &nbsp; case 3:<br>
&#43;-&nbsp; &nbsp; &nbsp; glColorMask(GL_TRUE, GL_TRUE, GL_FALSE, GL_TRUE);<br>
&#43;-&nbsp; &nbsp; &nbsp; glIndexMask(0xFB);<br>
&#43;-&nbsp; &nbsp; &nbsp; break;<br>
&#43;-&nbsp; &nbsp; }<br>
&#43;-}<br>
&#43;-#endif<br>
&#43;-<br>
&#43;-static void Viewport(GLint row, GLint column)<br>
&#43;-{<br>
&#43;-&nbsp; &nbsp; GLint x, y;<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; boxW = (windW - (COLS &#43; 1) * GAP) / COLS;<br>
&#43;-&nbsp; &nbsp; boxH = (windH - (ROWS &#43; 1) * GAP) / ROWS;<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; x = GAP &#43; column * (boxW &#43; GAP);<br>
&#43;-&nbsp; &nbsp; y = GAP &#43; row * (boxH &#43; GAP);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glViewport(x, y, boxW, boxH);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glMatrixMode(GL_PROJECTION);<br>
&#43;-&nbsp; &nbsp; glLoadIdentity();<br>
&#43;-&nbsp; &nbsp; glOrtho(-boxW/2, boxW/2, -boxH/2, boxH/2, 0.0, 1.0);<br>
&#43;-&nbsp; &nbsp; glMatrixMode(GL_MODELVIEW);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glEnable(GL_SCISSOR_TEST);<br>
&#43;-&nbsp; &nbsp; glScissor(x, y, boxW, boxH);<br>
&#43;-}<br>
&#43;-<br>
&#43;-enum {<br>
&#43;-&nbsp; &nbsp; COLOR_BLACK = 0,<br>
&#43;-&nbsp; &nbsp; COLOR_RED,<br>
&#43;-&nbsp; &nbsp; COLOR_GREEN,<br>
&#43;-&nbsp; &nbsp; COLOR_YELLOW,<br>
&#43;-&nbsp; &nbsp; COLOR_BLUE,<br>
&#43;-&nbsp; &nbsp; COLOR_MAGENTA,<br>
&#43;-&nbsp; &nbsp; COLOR_CYAN,<br>
&#43;-&nbsp; &nbsp; COLOR_WHITE<br>
&#43;-};<br>
&#43;-<br>
&#43;-static float RGBMap[9][3] = {<br>
&#43;-&nbsp; &nbsp; {0, 0, 0},<br>
&#43;-&nbsp; &nbsp; {1, 0, 0},<br>
&#43;-&nbsp; &nbsp; {0, 1, 0},<br>
&#43;-&nbsp; &nbsp; {1, 1, 0},<br>
&#43;-&nbsp; &nbsp; {0, 0, 1},<br>
&#43;-&nbsp; &nbsp; {1, 0, 1},<br>
&#43;-&nbsp; &nbsp; {0, 1, 1},<br>
&#43;-&nbsp; &nbsp; {1, 1, 1},<br>
&#43;-&nbsp; &nbsp; {0.5, 0.5, 0.5}<br>
&#43;-};<br>
&#43;-<br>
&#43;-static void SetColor(int c)<br>
&#43;-{<br>
&#43;-&nbsp; &nbsp; &nbsp;glColor3fv(RGBMap[c]);<br>
&#43;-}<br>
&#43;-<br>
&#43;-static void Point(void)<br>
&#43;-{<br>
&#43;-&nbsp; &nbsp; GLint i;<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glBegin(GL_POINTS);<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_WHITE);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(0, 0);<br>
&#43;-&nbsp; &nbsp; &nbsp; for (i = 1; i &lt; 8; i&#43;&#43;) {<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GLint j = i * 2;<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SetColor(COLOR_BLACK&#43;i);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; glVertex2i(-j, -j);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; glVertex2i(-j, 0);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; glVertex2i(-j, j);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; glVertex2i(0, j);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; glVertex2i(j, j);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; glVertex2i(j, 0);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; glVertex2i(j, -j);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; glVertex2i(0, -j);<br>
&#43;-&nbsp; &nbsp; &nbsp; }<br>
&#43;-&nbsp; &nbsp; glEnd();<br>
&#43;-}<br>
&#43;-<br>
&#43;-static void Lines(void)<br>
&#43;-{<br>
&#43;-&nbsp; &nbsp; GLint i;<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glPushMatrix();<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glTranslatef(-12, 0, 0);<br>
&#43;-&nbsp; &nbsp; for (i = 1; i &lt; 8; i&#43;&#43;) {<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_BLACK&#43;i);<br>
&#43;-&nbsp; &nbsp; &nbsp; glBegin(GL_LINES);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; glVertex2i(-boxW/4, -boxH/4);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; glVertex2i(boxW/4, boxH/4);<br>
&#43;-&nbsp; &nbsp; &nbsp; glEnd();<br>
&#43;-&nbsp; &nbsp; &nbsp; glTranslatef(4, 0, 0);<br>
&#43;-&nbsp; &nbsp; }<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glPopMatrix();<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glBegin(GL_LINES);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(0, 0);<br>
&#43;-&nbsp; &nbsp; glEnd();<br>
&#43;-}<br>
&#43;-<br>
&#43;-static void LineStrip(void)<br>
&#43;-{<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glBegin(GL_LINE_STRIP);<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_RED);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2f(PIXEL_CENTER(-boxW/4), PIXEL_CENTER(-boxH/4));<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_GREEN);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2f(PIXEL_CENTER(-boxW/4), PIXEL_CENTER(boxH/4));<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_BLUE);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2f(PIXEL_CENTER(boxW/4), PIXEL_CENTER(boxH/4));<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_WHITE);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2f(PIXEL_CENTER(boxW/4), PIXEL_CENTER(-boxH/4));<br>
&#43;-&nbsp; &nbsp; glEnd();<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glBegin(GL_LINE_STRIP);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(0, 0);<br>
&#43;-&nbsp; &nbsp; glEnd();<br>
&#43;-}<br>
&#43;-<br>
&#43;-static void LineLoop(void)<br>
&#43;-{<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glBegin(GL_LINE_LOOP);<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_RED);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2f(PIXEL_CENTER(-boxW/4), PIXEL_CENTER(-boxH/4));<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_GREEN);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2f(PIXEL_CENTER(-boxW/4), PIXEL_CENTER(boxH/4));<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_BLUE);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2f(PIXEL_CENTER(boxW/4), PIXEL_CENTER(boxH/4));<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_WHITE);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2f(PIXEL_CENTER(boxW/4), PIXEL_CENTER(-boxH/4));<br>
&#43;-&nbsp; &nbsp; glEnd();<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glEnable(GL_LOGIC_OP);<br>
&#43;-&nbsp; &nbsp; glLogicOp(GL_XOR);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glEnable(GL_BLEND);<br>
&#43;-&nbsp; &nbsp; glBlendFunc(GL_ONE, GL_ONE);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; SetColor(COLOR_MAGENTA);<br>
&#43;-&nbsp; &nbsp; glBegin(GL_LINE_LOOP);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2f(PIXEL_CENTER(-boxW/8), PIXEL_CENTER(-boxH/8));<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2f(PIXEL_CENTER(-boxW/8), PIXEL_CENTER(boxH/8));<br>
&#43;-&nbsp; &nbsp; glEnd();<br>
&#43;-&nbsp; &nbsp; glBegin(GL_LINE_LOOP);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2f(PIXEL_CENTER(-boxW/8), PIXEL_CENTER(boxH/8&#43;5));<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2f(PIXEL_CENTER(boxW/8), PIXEL_CENTER(boxH/8&#43;5));<br>
&#43;-&nbsp; &nbsp; glEnd();<br>
&#43;-&nbsp; &nbsp; glDisable(GL_LOGIC_OP);<br>
&#43;-&nbsp; &nbsp; glDisable(GL_BLEND);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; SetColor(COLOR_GREEN);<br>
&#43;-&nbsp; &nbsp; glBegin(GL_POINTS);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(0, 0);<br>
&#43;-&nbsp; &nbsp; glEnd();<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glBegin(GL_LINE_LOOP);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(0, 0);<br>
&#43;-&nbsp; &nbsp; glEnd();<br>
&#43;-}<br>
&#43;-<br>
&#43;-static void Bitmap(void)<br>
&#43;-{<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glBegin(GL_LINES);<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_GREEN);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(-boxW/2, 0);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(boxW/2, 0);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(0, -boxH/2);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(0, boxH/2);<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_RED);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(0, -3);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(0, -3&#43;OPENGL_HEIGHT);<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_BLUE);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(0, -3);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(OPENGL_WIDTH, -3);<br>
&#43;-&nbsp; &nbsp; glEnd();<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; SetColor(COLOR_GREEN);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glPixelStorei(GL_UNPACK_LSB_FIRST, GL_TRUE);<br>
&#43;-&nbsp; &nbsp; glPixelStorei(GL_UNPACK_ALIGNMENT, 1);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glRasterPos2i(0, 0);<br>
&#43;-&nbsp; &nbsp; glBitmap(OPENGL_WIDTH, OPENGL_HEIGHT, 0, 3, 0.0, 0.0, OpenGL_bits);<br>
&#43;-}<br>
&#43;-<br>
&#43;-static void Triangles(void)<br>
&#43;-{<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glBegin(GL_TRIANGLES);<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_GREEN);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(-boxW/4, -boxH/4);<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_RED);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(-boxW/8, -boxH/16);<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_BLUE);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(boxW/8, -boxH/16);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_GREEN);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(-boxW/4, boxH/4);<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_RED);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(-boxW/8, boxH/16);<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_BLUE);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(boxW/8, boxH/16);<br>
&#43;-&nbsp; &nbsp; glEnd();<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glBegin(GL_TRIANGLES);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(0, 0);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(-100, 100);<br>
&#43;-&nbsp; &nbsp; glEnd();<br>
&#43;-}<br>
&#43;-<br>
&#43;-static void TriangleStrip(void)<br>
&#43;-{<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glBegin(GL_TRIANGLE_STRIP);<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_GREEN);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(-boxW/4, -boxH/4);<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_RED);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(-boxW/4, boxH/4);<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_BLUE);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(0, -boxH/4);<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_WHITE);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(0, boxH/4);<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_CYAN);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(boxW/4, -boxH/4);<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_YELLOW);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(boxW/4, boxH/4);<br>
&#43;-&nbsp; &nbsp; glEnd();<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glBegin(GL_TRIANGLE_STRIP);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(0, 0);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(-100, 100);<br>
&#43;-&nbsp; &nbsp; glEnd();<br>
&#43;-}<br>
&#43;-<br>
&#43;-static void TriangleFan(void)<br>
&#43;-{<br>
&#43;-&nbsp; &nbsp; GLint vx[8][2];<br>
&#43;-&nbsp; &nbsp; GLint x0, y0, x1, y1, x2, y2, x3, y3;<br>
&#43;-&nbsp; &nbsp; GLint i;<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; y0 = -boxH/4;<br>
&#43;-&nbsp; &nbsp; y1 = y0 &#43; boxH/2/3;<br>
&#43;-&nbsp; &nbsp; y2 = y1 &#43; boxH/2/3;<br>
&#43;-&nbsp; &nbsp; y3 = boxH/4;<br>
&#43;-&nbsp; &nbsp; x0 = -boxW/4;<br>
&#43;-&nbsp; &nbsp; x1 = x0 &#43; boxW/2/3;<br>
&#43;-&nbsp; &nbsp; x2 = x1 &#43; boxW/2/3;<br>
&#43;-&nbsp; &nbsp; x3 = boxW/4;<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; vx[0][0] = x0; vx[0][1] = y1;<br>
&#43;-&nbsp; &nbsp; vx[1][0] = x0; vx[1][1] = y2;<br>
&#43;-&nbsp; &nbsp; vx[2][0] = x1; vx[2][1] = y3;<br>
&#43;-&nbsp; &nbsp; vx[3][0] = x2; vx[3][1] = y3;<br>
&#43;-&nbsp; &nbsp; vx[4][0] = x3; vx[4][1] = y2;<br>
&#43;-&nbsp; &nbsp; vx[5][0] = x3; vx[5][1] = y1;<br>
&#43;-&nbsp; &nbsp; vx[6][0] = x2; vx[6][1] = y0;<br>
&#43;-&nbsp; &nbsp; vx[7][0] = x1; vx[7][1] = y0;<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glBegin(GL_TRIANGLE_FAN);<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_WHITE);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(0, 0);<br>
&#43;-&nbsp; &nbsp; &nbsp; for (i = 0; i &lt; 8; i&#43;&#43;) {<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SetColor(COLOR_WHITE-i);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; glVertex2iv(vx[i]);<br>
&#43;-&nbsp; &nbsp; &nbsp; }<br>
&#43;-&nbsp; &nbsp; glEnd();<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glBegin(GL_TRIANGLE_FAN);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(0, 0);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(-100, 100);<br>
&#43;-&nbsp; &nbsp; glEnd();<br>
&#43;-}<br>
&#43;-<br>
&#43;-static void Rect(void)<br>
&#43;-{<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; SetColor(COLOR_GREEN);<br>
&#43;-&nbsp; &nbsp; glRecti(-boxW/4, -boxH/4, boxW/4, boxH/4);<br>
&#43;-}<br>
&#43;-<br>
&#43;-static void PolygonFunc(void)<br>
&#43;-{<br>
&#43;-&nbsp; &nbsp; GLint vx[8][2];<br>
&#43;-&nbsp; &nbsp; GLint x0, y0, x1, y1, x2, y2, x3, y3;<br>
&#43;-&nbsp; &nbsp; GLint i;<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; y0 = -boxH/4;<br>
&#43;-&nbsp; &nbsp; y1 = y0 &#43; boxH/2/3;<br>
&#43;-&nbsp; &nbsp; y2 = y1 &#43; boxH/2/3;<br>
&#43;-&nbsp; &nbsp; y3 = boxH/4;<br>
&#43;-&nbsp; &nbsp; x0 = -boxW/4;<br>
&#43;-&nbsp; &nbsp; x1 = x0 &#43; boxW/2/3;<br>
&#43;-&nbsp; &nbsp; x2 = x1 &#43; boxW/2/3;<br>
&#43;-&nbsp; &nbsp; x3 = boxW/4;<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; vx[0][0] = x0; vx[0][1] = y1;<br>
&#43;-&nbsp; &nbsp; vx[1][0] = x0; vx[1][1] = y2;<br>
&#43;-&nbsp; &nbsp; vx[2][0] = x1; vx[2][1] = y3;<br>
&#43;-&nbsp; &nbsp; vx[3][0] = x2; vx[3][1] = y3;<br>
&#43;-&nbsp; &nbsp; vx[4][0] = x3; vx[4][1] = y2;<br>
&#43;-&nbsp; &nbsp; vx[5][0] = x3; vx[5][1] = y1;<br>
&#43;-&nbsp; &nbsp; vx[6][0] = x2; vx[6][1] = y0;<br>
&#43;-&nbsp; &nbsp; vx[7][0] = x1; vx[7][1] = y0;<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glBegin(GL_POLYGON);<br>
&#43;-&nbsp; &nbsp; &nbsp; for (i = 0; i &lt; 8; i&#43;&#43;) {<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SetColor(COLOR_WHITE-i);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; glVertex2iv(vx[i]);<br>
&#43;-&nbsp; &nbsp; &nbsp; }<br>
&#43;-&nbsp; &nbsp; glEnd();<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glBegin(GL_POLYGON);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(0, 0);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(100, 100);<br>
&#43;-&nbsp; &nbsp; glEnd();<br>
&#43;-}<br>
&#43;-<br>
&#43;-static void Quads(void)<br>
&#43;-{<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glBegin(GL_QUADS);<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_GREEN);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(-boxW/4, -boxH/4);<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_RED);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(-boxW/8, -boxH/16);<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_BLUE);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(boxW/8, -boxH/16);<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_WHITE);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(boxW/4, -boxH/4);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_GREEN);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(-boxW/4, boxH/4);<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_RED);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(-boxW/8, boxH/16);<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_BLUE);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(boxW/8, boxH/16);<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_WHITE);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(boxW/4, boxH/4);<br>
&#43;-&nbsp; &nbsp; glEnd();<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glBegin(GL_QUADS);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(0, 0);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(100, 100);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(-100, 100);<br>
&#43;-&nbsp; &nbsp; glEnd();<br>
&#43;-}<br>
&#43;-<br>
&#43;-static void QuadStrip(void)<br>
&#43;-{<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glBegin(GL_QUAD_STRIP);<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_GREEN);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(-boxW/4, -boxH/4);<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_RED);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(-boxW/4, boxH/4);<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_BLUE);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(0, -boxH/4);<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_WHITE);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(0, boxH/4);<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_CYAN);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(boxW/4, -boxH/4);<br>
&#43;-&nbsp; &nbsp; &nbsp; SetColor(COLOR_YELLOW);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(boxW/4, boxH/4);<br>
&#43;-&nbsp; &nbsp; glEnd();<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glBegin(GL_QUAD_STRIP);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(0, 0);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(100, 100);<br>
&#43;-&nbsp; &nbsp; &nbsp; glVertex2i(-100, 100);<br>
&#43;-&nbsp; &nbsp; glEnd();<br>
&#43;-}<br>
&#43;-<br>
&#43;-static void Draw(EGLDisplay dpy, EGLSurface surf)<br>
&#43;-{<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glViewport(0, 0, windW, windH);<br>
&#43;-&nbsp; &nbsp; glDisable(GL_SCISSOR_TEST);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glPushAttrib(GL_COLOR_BUFFER_BIT);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glColorMask(1, 1, 1, 1);<br>
&#43;-&nbsp; &nbsp; glIndexMask(~0);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glClearColor(0.0, 0.0, 0.0, 0.0);<br>
&#43;-&nbsp; &nbsp; glClear(GL_COLOR_BUFFER_BIT);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glPopAttrib();<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; if (mode1) {<br>
&#43;-&nbsp; &nbsp; &nbsp; glShadeModel(GL_SMOOTH);<br>
&#43;-&nbsp; &nbsp; } else {<br>
&#43;-&nbsp; &nbsp; &nbsp; glShadeModel(GL_FLAT);<br>
&#43;-&nbsp; &nbsp; }<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; if (mode2) {<br>
&#43;-&nbsp; &nbsp; &nbsp; glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);<br>
&#43;-&nbsp; &nbsp; } else {<br>
&#43;-&nbsp; &nbsp; &nbsp; glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);<br>
&#43;-&nbsp; &nbsp; }<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; Viewport(0, 0); Point();<br>
&#43;-&nbsp; &nbsp; Viewport(0, 1); Lines();<br>
&#43;-&nbsp; &nbsp; Viewport(0, 2); LineStrip();<br>
&#43;-&nbsp; &nbsp; Viewport(0, 3); LineLoop();<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; Viewport(1, 0); Bitmap();<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; Viewport(1, 1); TriangleFan();<br>
&#43;-&nbsp; &nbsp; Viewport(1, 2); Triangles();<br>
&#43;-&nbsp; &nbsp; Viewport(1, 3); TriangleStrip();<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; Viewport(2, 0); Rect();<br>
&#43;-&nbsp; &nbsp; Viewport(2, 1); PolygonFunc();<br>
&#43;-&nbsp; &nbsp; Viewport(2, 2); Quads();<br>
&#43;-&nbsp; &nbsp; Viewport(2, 3); QuadStrip();<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; glFlush();<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; if (doubleBuffer) {<br>
&#43;-&nbsp; &nbsp; &nbsp; eglSwapBuffers(dpy, surf);<br>
&#43;-&nbsp; &nbsp; }<br>
&#43;-}<br>
&#43;-<br>
&#43;-static void<br>
&#43;-write_ppm(const char *filename, const GLubyte *buffer, int width, int height)<br>
&#43;-{<br>
&#43;-&nbsp; &nbsp;const int binary = 0;<br>
&#43;-&nbsp; &nbsp;FILE *f = fopen( filename, &quot;w&quot; );<br>
&#43;-&nbsp; &nbsp;if (f) {<br>
&#43;-&nbsp; &nbsp; &nbsp; int i, x, y;<br>
&#43;-&nbsp; &nbsp; &nbsp; const GLubyte *ptr = buffer;<br>
&#43;-&nbsp; &nbsp; &nbsp; if (binary) {<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fprintf(f,&quot;P6\n&quot;);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fprintf(f,&quot;# ppm-file created by osdemo.c\n&quot;);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fprintf(f,&quot;%i %i\n&quot;, width,height);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fprintf(f,&quot;255\n&quot;);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fclose(f);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;f = fopen( filename, &quot;ab&quot; );&nbsp; /* reopen in binary append mode */<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for (y=height-1; y&gt;=0; y--) {<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (x=0; x&lt;width; x&#43;&#43;) {<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;i = (y*width &#43; x) * 4;<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fputc(ptr[i], f);&nbsp; &nbsp;/* write red */<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fputc(ptr[i&#43;1], f); /* write green */<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fputc(ptr[i&#43;2], f); /* write blue */<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
&#43;-&nbsp; &nbsp; &nbsp; }<br>
&#43;-&nbsp; &nbsp; &nbsp; else {<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/*ASCII*/<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;int counter = 0;<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fprintf(f,&quot;P3\n&quot;);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fprintf(f,&quot;# ascii ppm file created by osdemo.c\n&quot;);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fprintf(f,&quot;%i %i\n&quot;, width, height);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fprintf(f,&quot;255\n&quot;);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for (y=height-1; y&gt;=0; y--) {<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (x=0; x&lt;width; x&#43;&#43;) {<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;i = (y*width &#43; x) * 4;<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fprintf(f, &quot; %3d %3d %3d&quot;, ptr[i], ptr[i&#43;1], ptr[i&#43;2]);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;counter&#43;&#43;;<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (counter % 5 == 0)<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fprintf(f, &quot;\n&quot;);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
&#43;-&nbsp; &nbsp; &nbsp; }<br>
&#43;-&nbsp; &nbsp; &nbsp; fclose(f);<br>
&#43;-&nbsp; &nbsp;}<br>
&#43;-}<br>
&#43;-#endif<br>
&#43;-<br>
&#43;-int<br>
&#43;-main(int argc, char *argv[])<br>
&#43;-{<br>
&#43;-&nbsp; &nbsp;int maj, min;<br>
&#43;-#ifdef EGL_MESA_screen_surface<br>
&#43;-&nbsp; &nbsp;EGLContext ctx;<br>
&#43;-&nbsp; &nbsp;EGLSurface screen_surf;<br>
&#43;-&nbsp; &nbsp;EGLConfig configs[10];<br>
&#43;-&nbsp; &nbsp;EGLScreenMESA screen;<br>
&#43;-&nbsp; &nbsp;EGLModeMESA mode;<br>
&#43;-&nbsp; &nbsp;EGLint numConfigs, count;<br>
&#43;-&nbsp; &nbsp;EGLBoolean b;<br>
&#43;-&nbsp; &nbsp;const GLubyte *bitmap;<br>
&#43;-&nbsp; &nbsp;EGLint screenAttribs[32];<br>
&#43;-&nbsp; &nbsp;EGLint i;<br>
&#43;-#endif<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;EGLDisplay d = eglGetDisplay(EGL_DEFAULT_DISPLAY);<br>
&#43;-&nbsp; &nbsp;assert(d);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;if (!eglInitialize(d, &amp;maj, &amp;min)) {<br>
&#43;-&nbsp; &nbsp; &nbsp; printf(&quot;demo: eglInitialize failed\n&quot;);<br>
&#43;-&nbsp; &nbsp; &nbsp; exit(1);<br>
&#43;-&nbsp; &nbsp;}<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;printf(&quot;EGL version = %d.%d\n&quot;, maj, min);<br>
&#43;-&nbsp; &nbsp;printf(&quot;EGL_VENDOR = %s\n&quot;, eglQueryString(d, EGL_VENDOR));<br>
&#43;-&nbsp; &nbsp;if (!strstr(eglQueryString(d, EGL_EXTENSIONS),<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;EGL_MESA_screen_surface&quot;)) {<br>
&#43;-&nbsp; &nbsp; &nbsp; printf(&quot;EGL_MESA_screen_surface is not supported\n&quot;);<br>
&#43;-&nbsp; &nbsp; &nbsp; exit(1);<br>
&#43;-&nbsp; &nbsp;}<br>
&#43;-<br>
&#43;-#ifdef EGL_MESA_screen_surface<br>
&#43;-&nbsp; &nbsp;eglGetConfigs(d, configs, 10, &amp;numConfigs);<br>
&#43;-&nbsp; &nbsp;eglGetScreensMESA(d, &amp;screen, 1, &amp;count);<br>
&#43;-&nbsp; &nbsp;eglGetModesMESA(d, screen, &amp;mode, 1, &amp;count);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;eglBindAPI(EGL_OPENGL_API);<br>
&#43;-&nbsp; &nbsp;ctx = eglCreateContext(d, configs[0], EGL_NO_CONTEXT, NULL);<br>
&#43;-&nbsp; &nbsp;if (ctx == EGL_NO_CONTEXT) {<br>
&#43;-&nbsp; &nbsp; &nbsp; printf(&quot;failed to create context\n&quot;);<br>
&#43;-&nbsp; &nbsp; &nbsp; return 0;<br>
&#43;-&nbsp; &nbsp;}<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;i = 0;<br>
&#43;-&nbsp; &nbsp;screenAttribs[i&#43;&#43;] = EGL_WIDTH;<br>
&#43;-&nbsp; &nbsp;eglGetModeAttribMESA(d, mode, EGL_WIDTH, &amp;screenAttribs[i&#43;&#43;]);<br>
&#43;-&nbsp; &nbsp;screenAttribs[i&#43;&#43;] = EGL_HEIGHT;<br>
&#43;-&nbsp; &nbsp;eglGetModeAttribMESA(d, mode, EGL_HEIGHT, &amp;screenAttribs[i&#43;&#43;]);<br>
&#43;-&nbsp; &nbsp;screenAttribs[i] = EGL_NONE;<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;screen_surf = eglCreateScreenSurfaceMESA(d, configs[0], screenAttribs);<br>
&#43;-&nbsp; &nbsp;if (screen_surf == EGL_NO_SURFACE) {<br>
&#43;-&nbsp; &nbsp; &nbsp; printf(&quot;failed to create screen surface\n&quot;);<br>
&#43;-&nbsp; &nbsp; &nbsp; return 0;<br>
&#43;-&nbsp; &nbsp;}<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;eglShowScreenSurfaceMESA(d, screen, screen_surf, mode);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;b = eglMakeCurrent(d, screen_surf, screen_surf, ctx);<br>
&#43;-&nbsp; &nbsp;if (!b) {<br>
&#43;-&nbsp; &nbsp; &nbsp; printf(&quot;make current failed\n&quot;);<br>
&#43;-&nbsp; &nbsp; &nbsp; return 0;<br>
&#43;-&nbsp; &nbsp;}<br>
&#43;-&nbsp; &nbsp;glViewport(0, 0, 1024, 768);<br>
&#43;-<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;Init();<br>
&#43;-&nbsp; &nbsp;Reshape(1024, 768);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;/* some drivers crash when rendering to front buffer */<br>
&#43;-#if 0<br>
&#43;-&nbsp; &nbsp;glDrawBuffer( GL_FRONT );<br>
&#43;-&nbsp; &nbsp;glClearColor( 0, 1.0, 0, 1);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;glClear( GL_COLOR_BUFFER_BIT );<br>
&#43;-#endif<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;doubleBuffer = 1;<br>
&#43;-&nbsp; &nbsp;glDrawBuffer( GL_BACK );<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;Draw(d, screen_surf);<br>
&#43;-&nbsp; &nbsp;sleep(2);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;/* TODO EGL_KHR_lock_surface */<br>
&#43;-&nbsp; &nbsp;bitmap = NULL;<br>
&#43;-&nbsp; &nbsp;if (bitmap)<br>
&#43;-&nbsp; &nbsp; &nbsp; write_ppm(&quot;dump.ppm&quot;, bitmap, 1024, 768);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;eglDestroySurface(d, screen_surf);<br>
&#43;-&nbsp; &nbsp;eglDestroyContext(d, ctx);<br>
&#43;-&nbsp; &nbsp;eglTerminate(d);<br>
&#43;-#endif<br>
&#43;-<br>
&#43;-&nbsp; &nbsp;return 0;<br>
&#43;-}<br>
&#43;diff --git a/src/egl/opengl/eglinfo.c b/src/egl/opengl/eglinfo.c<br>
&#43;index 8e82e73..1f79fef 100644<br>
&#43;--- a/src/egl/opengl/eglinfo.c<br>
&#43;&#43;&#43;&#43; b/src/egl/opengl/eglinfo.c<br>
&#43;@@ -93,10 &#43;93,6 @@ PrintConfigs(EGLDisplay d)<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strcat(surfString, &quot;pb,&quot;);<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp;if (surfaces &amp; EGL_PIXMAP_BIT)<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strcat(surfString, &quot;pix,&quot;);<br>
&#43;-#ifdef EGL_MESA_screen_surface<br>
&#43;-&nbsp; &nbsp; &nbsp; if (surfaces &amp; EGL_SCREEN_BIT_MESA)<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;strcat(surfString, &quot;scrn,&quot;);<br>
&#43;-#endif<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp;if (strlen(surfString) &gt; 0)<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; surfString[strlen(surfString) - 1] = 0;<br>
&#43;<br>
&#43;@@ -117,45 &#43;113,6 @@ PrintConfigs(EGLDisplay d)<br>
&#43; }<br>
&#43;<br>
&#43;<br>
&#43;-/**<br>
&#43;- * Print table of all available configurations.<br>
&#43;- */<br>
&#43;-static void<br>
&#43;-PrintModes(EGLDisplay d)<br>
&#43;-{<br>
&#43;-#ifdef EGL_MESA_screen_surface<br>
&#43;-&nbsp; &nbsp;const char *extensions = eglQueryString(d, EGL_EXTENSIONS);<br>
&#43;-&nbsp; &nbsp;if (strstr(extensions, &quot;EGL_MESA_screen_surface&quot;)) {<br>
&#43;-&nbsp; &nbsp; &nbsp; EGLScreenMESA screens[MAX_SCREENS];<br>
&#43;-&nbsp; &nbsp; &nbsp; EGLint numScreens = 1, scrn;<br>
&#43;-&nbsp; &nbsp; &nbsp; EGLModeMESA modes[MAX_MODES];<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; &nbsp; eglGetScreensMESA(d, screens, MAX_SCREENS, &amp;numScreens);<br>
&#43;-&nbsp; &nbsp; &nbsp; printf(&quot;Number of Screens: %d\n\n&quot;, numScreens);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; &nbsp; for (scrn = 0; scrn &lt; numScreens; scrn&#43;&#43;) {<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;EGLint numModes, i;<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;eglGetModesMESA(d, screens[scrn], modes, MAX_MODES, &amp;numModes);<br>
&#43;-<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;printf(&quot;Screen %d Modes:\n&quot;, scrn);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;printf(&quot;&nbsp; id&nbsp; width height refresh&nbsp; name\n&quot;);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;printf(&quot;-----------------------------------------\n&quot;);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for (i = 0; i &lt; numModes; i&#43;&#43;) {<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EGLint id, w, h, r;<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; const char *str;<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; eglGetModeAttribMESA(d, modes[i], EGL_MODE_ID_MESA, &amp;id);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; eglGetModeAttribMESA(d, modes[i], EGL_WIDTH, &amp;w);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; eglGetModeAttribMESA(d, modes[i], EGL_HEIGHT, &amp;h);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; eglGetModeAttribMESA(d, modes[i], EGL_REFRESH_RATE_MESA, &amp;r);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; str = eglQueryModeStringMESA(d, modes[i]);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printf(&quot;0x%02x %5d&nbsp; %5d&nbsp; &nbsp;%.3f&nbsp; %s\n&quot;, id, w, h, r / 1000.0, str);<br>
&#43;-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
&#43;-&nbsp; &nbsp; &nbsp; }<br>
&#43;-&nbsp; &nbsp;}<br>
&#43;-#endif<br>
&#43;-}<br>
&#43;-<br>
&#43; static void<br>
&#43; PrintExtensions(EGLDisplay d)<br>
&#43; {<br>
&#43;@@ -215,8 &#43;172,6 @@ main(int argc, char *argv[])<br>
&#43;<br>
&#43;&nbsp; &nbsp; PrintConfigs(d);<br>
&#43;<br>
&#43;-&nbsp; &nbsp;PrintModes(d);<br>
&#43;-<br>
&#43;&nbsp; &nbsp; eglTerminate(d);<br>
&#43;<br>
&#43;&nbsp; &nbsp; return 0;<br>
&#43;diff --git a/src/egl/opengles1/Makefile.am b/src/egl/opengles1/Makefile.am<br>
&#43;index 516e516..1cc2e1f 100644<br>
&#43;--- a/src/egl/opengles1/Makefile.am<br>
&#43;&#43;&#43;&#43; b/src/egl/opengles1/Makefile.am<br>
&#43;@@ -38,24 &#43;38,6 @@ AM_LDFLAGS = \<br>
&#43;<br>
&#43; bin_PROGRAMS =<br>
&#43;<br>
&#43;-if HAVE_EGL<br>
&#43;-if HAVE_GLESV1<br>
&#43;-bin_PROGRAMS &#43;= \<br>
&#43;-&nbsp; &nbsp; &nbsp; drawtex_screen \<br>
&#43;-&nbsp; &nbsp; &nbsp; gears_screen \<br>
&#43;-&nbsp; &nbsp; &nbsp; torus_screen \<br>
&#43;-&nbsp; &nbsp; &nbsp; tri_screen<br>
&#43;-<br>
&#43;-drawtex_screen_SOURCES = drawtex.c<br>
&#43;-gears_screen_SOURCES = gears.c<br>
&#43;-torus_screen_SOURCES = torus.c<br>
&#43;-tri_screen_SOURCES = tri.c<br>
&#43;-<br>
&#43;-drawtex_screen_LDADD = ../eglut/<a href="http://libeglut_screen.la" rel="noreferrer" target="_blank">libeglut_screen.la</a><br>
&#43;-gears_screen_LDADD = ../eglut/<a href="http://libeglut_screen.la" rel="noreferrer" target="_blank">libeglut_screen.la</a><br>
&#43;-torus_screen_LDADD = ../eglut/<a href="http://libeglut_screen.la" rel="noreferrer" target="_blank">libeglut_screen.la</a><br>
&#43;-tri_screen_LDADD = ../eglut/<a href="http://libeglut_screen.la" rel="noreferrer" target="_blank">libeglut_screen.la</a><br>
&#43;-<br>
&#43; if HAVE_X11<br>
&#43; bin_PROGRAMS &#43;= \<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp;clear \<br>
&#43;@@ -94,5 &#43;76,3 @@ gears_x11_LDADD = ../eglut/<a href="http://libeglut_x11.la" rel="noreferrer" target="_blank">libeglut_x11.la</a><br>
&#43; torus_x11_LDADD = ../eglut/<a href="http://libeglut_x11.la" rel="noreferrer" target="_blank">libeglut_x11.la</a><br>
&#43; tri_x11_LDADD = ../eglut/<a href="http://libeglut_x11.la" rel="noreferrer" target="_blank">libeglut_x11.la</a><br>
&#43; endif<br>
&#43;-endif<br>
&#43;-endif<br>
&#43;diff --git a/src/egl/opengles2/Makefile.am b/src/egl/opengles2/Makefile.am<br>
&#43;index 74af460..422cb03 100644<br>
&#43;--- a/src/egl/opengles2/Makefile.am<br>
&#43;&#43;&#43;&#43; b/src/egl/opengles2/Makefile.am<br>
&#43;@@ -33,13 &#43;33,7 @@ AM_LDFLAGS = \<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp;$(EGL_LIBS) \<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp;-lm<br>
&#43;<br>
&#43;-if HAVE_EGL<br>
&#43;-if HAVE_GLESV2<br>
&#43;-bin_PROGRAMS = \<br>
&#43;-&nbsp; &nbsp; &nbsp; es2gears_screen<br>
&#43;-<br>
&#43;-es2gears_screen_SOURCES = es2gears.c<br>
&#43;-es2gears_screen_LDADD = ../eglut/<a href="http://libeglut_screen.la" rel="noreferrer" target="_blank">libeglut_screen.la</a><br>
&#43;&#43;bin_PROGRAMS =<br>
&#43;<br>
&#43; if HAVE_WAYLAND<br>
&#43; bin_PROGRAMS &#43;= es2gears_wayland<br>
&#43;@@ -59,6 &#43;53,4 @@ es2gears_x11_SOURCES = es2gears.c<br>
&#43; es2gears_x11_LDADD = ../eglut/<a href="http://libeglut_x11.la" rel="noreferrer" target="_blank">libeglut_x11.la</a><br>
&#43; es2tri_LDADD = $(X11_LIBS)<br>
&#43; endif<br>
&#43;-endif<br>
&#43;-endif<br>
&#43;<br>
&#43;diff --git a/src/egl/openvg/Makefile.am b/src/egl/openvg/Makefile.am<br>
&#43;index b545225..5fd1cf8 100644<br>
&#43;--- a/src/egl/openvg/Makefile.am<br>
&#43;&#43;&#43;&#43; b/src/egl/openvg/Makefile.am<br>
&#43;@@ -50,21 &#43;50,13 @@ endif<br>
&#43; if HAVE_EGL<br>
&#43; if HAVE_VG<br>
&#43; bin_PROGRAMS = \<br>
&#43;-&nbsp; &nbsp; &nbsp; lion_screen \<br>
&#43;-&nbsp; &nbsp; &nbsp; sp_screen \<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp;$(EGL_X11_DEMOS)<br>
&#43; endif<br>
&#43; endif<br>
&#43;<br>
&#43;-lion_screen_SOURCES = lion.c lion-render.c lion-render.h<br>
&#43;-sp_screen_SOURCES = sp.c<br>
&#43;-<br>
&#43; lion_x11_SOURCES = lion.c lion-render.c lion-render.h<br>
&#43; sp_x11_SOURCES = sp.c<br>
&#43;<br>
&#43;-lion_screen_LDADD = ../eglut/<a href="http://libeglut_screen.la" rel="noreferrer" target="_blank">libeglut_screen.la</a><br>
&#43;-sp_screen_LDADD = ../eglut/<a href="http://libeglut_screen.la" rel="noreferrer" target="_blank">libeglut_screen.la</a><br>
&#43;-<br>
&#43; lion_x11_LDADD = ../eglut/<a href="http://libeglut_x11.la" rel="noreferrer" target="_blank">libeglut_x11.la</a><br>
&#43; sp_x11_LDADD = ../eglut/<a href="http://libeglut_x11.la" rel="noreferrer" target="_blank">libeglut_x11.la</a><br>
&#43;<br>
&#43;diff --git a/src/egl/openvg/Makefile.in b/src/egl/openvg/Makefile.in<br>
&#43;index 99e9288..3652fbb 100644<br>
&#43;--- a/src/egl/openvg/Makefile.in<br>
&#43;&#43;&#43;&#43; b/src/egl/openvg/Makefile.in<br>
&#43;@@ -108,8 &#43;108,6 @@ host_triplet = @host@<br>
&#43; @HAVE_FREETYPE2_TRUE@@HAVE_X11_TRUE@am__append_1 = \<br>
&#43; @HAVE_FREETYPE2_TRUE@@HAVE_X11_TRUE@&nbsp; text<br>
&#43;<br>
&#43;-@HAVE_EGL_TRUE@@HAVE_VG_TRUE@noinst_PROGRAMS = lion_screen$(EXEEXT) \<br>
&#43;-@HAVE_EGL_TRUE@@HAVE_VG_TRUE@ sp_screen$(EXEEXT) \<br>
&#43; @HAVE_EGL_TRUE@@HAVE_VG_TRUE@ $(am__EXEEXT_2)<br>
&#43; subdir = src/egl/openvg<br>
&#43; DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \<br>
&#43;@@ -128,9 &#43;126,6 @@ CONFIG_CLEAN_VPATH_FILES =<br>
&#43; @HAVE_X11_TRUE@am__EXEEXT_2 = lion_x11$(EXEEXT) sp_x11$(EXEEXT) \<br>
&#43; @HAVE_X11_TRUE@&nbsp; &nbsp; &nbsp; &nbsp;$(am__EXEEXT_1)<br>
&#43; PROGRAMS = $(noinst_PROGRAMS)<br>
&#43;-am_lion_screen_OBJECTS = lion.$(OBJEXT) lion-render.$(OBJEXT)<br>
&#43;-lion_screen_OBJECTS = $(am_lion_screen_OBJECTS)<br>
&#43;-lion_screen_DEPENDENCIES = ../eglut/<a href="http://libeglut_screen.la" rel="noreferrer" target="_blank">libeglut_screen.la</a><br>
&#43; AM_V_lt = $(am__v_lt_@AM_V@)<br>
&#43; am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)<br>
&#43; am__v_lt_0 = --silent<br>
&#43;@@ -138,9 &#43;133,6 @@ am__v_lt_1 =<br>
&#43; am_lion_x11_OBJECTS = lion.$(OBJEXT) lion-render.$(OBJEXT)<br>
&#43; lion_x11_OBJECTS = $(am_lion_x11_OBJECTS)<br>
&#43; lion_x11_DEPENDENCIES = ../eglut/<a href="http://libeglut_x11.la" rel="noreferrer" target="_blank">libeglut_x11.la</a><br>
&#43;-am_sp_screen_OBJECTS = sp.$(OBJEXT)<br>
&#43;-sp_screen_OBJECTS = $(am_sp_screen_OBJECTS)<br>
&#43;-sp_screen_DEPENDENCIES = ../eglut/<a href="http://libeglut_screen.la" rel="noreferrer" target="_blank">libeglut_screen.la</a><br>
&#43; am_sp_x11_OBJECTS = sp.$(OBJEXT)<br>
&#43; sp_x11_OBJECTS = $(am_sp_x11_OBJECTS)<br>
&#43; sp_x11_DEPENDENCIES = ../eglut/<a href="http://libeglut_x11.la" rel="noreferrer" target="_blank">libeglut_x11.la</a><br>
&#43;@@ -184,10 &#43;176,10 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@)<br>
&#43; am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)<br>
&#43; am__v_CCLD_0 = @echo &quot;&nbsp; CCLD&nbsp; &nbsp; &quot; $@;<br>
&#43; am__v_CCLD_1 =<br>
&#43;-SOURCES = $(lion_screen_SOURCES) $(lion_x11_SOURCES) \<br>
&#43;-&nbsp; &nbsp; &nbsp; $(sp_screen_SOURCES) $(sp_x11_SOURCES) $(text_SOURCES)<br>
&#43;-DIST_SOURCES = $(lion_screen_SOURCES) $(lion_x11_SOURCES) \<br>
&#43;-&nbsp; &nbsp; &nbsp; $(sp_screen_SOURCES) $(sp_x11_SOURCES) $(text_SOURCES)<br>
&#43;&#43;SOURCES = $(lion_x11_SOURCES) \<br>
&#43;&#43;&nbsp; &nbsp; &nbsp; $(sp_x11_SOURCES) $(text_SOURCES)<br>
&#43;&#43;DIST_SOURCES = $(lion_x11_SOURCES) \<br>
&#43;&#43;&nbsp; &nbsp; &nbsp; $(sp_x11_SOURCES) $(text_SOURCES)<br>
&#43; RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp;ctags-recursive dvi-recursive html-recursive info-recursive \<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp;install-data-recursive install-dvi-recursive \<br>
&#43;@@ -423,12 &#43;415,8 @@ AM_LDFLAGS = \<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp;-lm<br>
&#43;<br>
&#43; @HAVE_X11_TRUE@EGL_X11_DEMOS = lion_x11 sp_x11 $(am__append_1)<br>
&#43;-lion_screen_SOURCES = lion.c lion-render.c lion-render.h<br>
&#43;-sp_screen_SOURCES = sp.c<br>
&#43; lion_x11_SOURCES = lion.c lion-render.c lion-render.h<br>
&#43; sp_x11_SOURCES = sp.c<br>
&#43;-lion_screen_LDADD = ../eglut/<a href="http://libeglut_screen.la" rel="noreferrer" target="_blank">libeglut_screen.la</a><br>
&#43;-sp_screen_LDADD = ../eglut/<a href="http://libeglut_screen.la" rel="noreferrer" target="_blank">libeglut_screen.la</a><br>
&#43; lion_x11_LDADD = ../eglut/<a href="http://libeglut_x11.la" rel="noreferrer" target="_blank">libeglut_x11.la</a><br>
&#43; sp_x11_LDADD = ../eglut/<a href="http://libeglut_x11.la" rel="noreferrer" target="_blank">libeglut_x11.la</a><br>
&#43; text_SOURCES = text.c<br>
&#43;@@ -481,18 &#43;469,10 @@ clean-noinstPROGRAMS:<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp;echo &quot; rm -f&quot; $$list; \<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp;rm -f $$list<br>
&#43;<br>
&#43;-lion_screen$(EXEEXT): $(lion_screen_OBJECTS) $(lion_screen_DEPENDENCIES) $(EXTRA_lion_screen_DEPENDENCIES)<br>
&#43;-&nbsp; &nbsp; &nbsp; @rm -f lion_screen$(EXEEXT)<br>
&#43;-&nbsp; &nbsp; &nbsp; $(AM_V_CCLD)$(LINK) $(lion_screen_OBJECTS) $(lion_screen_LDADD) $(LIBS)<br>
&#43;-<br>
&#43; lion_x11$(EXEEXT): $(lion_x11_OBJECTS) $(lion_x11_DEPENDENCIES) $(EXTRA_lion_x11_DEPENDENCIES)<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp;@rm -f lion_x11$(EXEEXT)<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp;$(AM_V_CCLD)$(LINK) $(lion_x11_OBJECTS) $(lion_x11_LDADD) $(LIBS)<br>
&#43;<br>
&#43;-sp_screen$(EXEEXT): $(sp_screen_OBJECTS) $(sp_screen_DEPENDENCIES) $(EXTRA_sp_screen_DEPENDENCIES)<br>
&#43;-&nbsp; &nbsp; &nbsp; @rm -f sp_screen$(EXEEXT)<br>
&#43;-&nbsp; &nbsp; &nbsp; $(AM_V_CCLD)$(LINK) $(sp_screen_OBJECTS) $(sp_screen_LDADD) $(LIBS)<br>
&#43;-<br>
&#43; sp_x11$(EXEEXT): $(sp_x11_OBJECTS) $(sp_x11_DEPENDENCIES) $(EXTRA_sp_x11_DEPENDENCIES)<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp;@rm -f sp_x11$(EXEEXT)<br>
&#43;&nbsp; &nbsp; &nbsp; &nbsp;$(AM_V_CCLD)$(LINK) $(sp_x11_OBJECTS) $(sp_x11_LDADD) $(LIBS)<br>
&#43;<br>
diff --git a/meta/recipes-graphics/mesa/<a href="http://mesa-demos_8.2.0.bb" rel="noreferrer" target="_blank">mesa-demos_8.2.0.bb</a> b/meta/recipes-graphics/mesa/<a href="http://mesa-demos_8.2.0.bb" rel="noreferrer" target="_blank">mesa-demos_8.2.0.bb</a><br>
index 557b8c6..2df9bba 100644<br>
--- a/meta/recipes-graphics/mesa/<a href="http://mesa-demos_8.2.0.bb" rel="noreferrer" target="_blank">mesa-demos_8.2.0.bb</a><br>
&#43;&#43;&#43; b/meta/recipes-graphics/mesa/<a href="http://mesa-demos_8.2.0.bb" rel="noreferrer" target="_blank">mesa-demos_8.2.0.bb</a><br>
@@ -20,6 &#43;20,7 @@ SRC_URI = &quot;<a href="ftp://ftp.freedesktop.org/pub/mesa/demos/${PV}/${BPN}-${PV}.tar.bz2" rel="noreferrer" target="_blank">ftp://ftp.freedesktop.org/pub/mesa/demos/${PV}/${BPN}-${PV}.tar.bz2</a> \<br>
&nbsp; &nbsp; &nbsp;file://0008-glsl-perf-Add-few-missing-.glsl-.vert-.frag-files-to.patch \<br>
&nbsp; &nbsp; &nbsp;file://0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch \<br>
&nbsp; &nbsp; &nbsp;file://0010-sharedtex_mt-fix-rendering-thread-hang.patch \<br>
&#43;&nbsp; &nbsp; file://0011-drop-demos-dependant-on-obsolete-MESA_screen_surface.patch \<br>
&nbsp;&quot;<br>
&nbsp;SRC_URI[md5sum] = &quot;72613a2c8c013716db02e3ff59d29061&quot;<br>
&nbsp;SRC_URI[sha256sum] = &quot;e4bfecb5816ddd4b7b37c1bc876b63f1f7f06fda5879221a9774d0952f90ba92&quot;<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.9.1<br>
<br>
</font></span><br>
--<br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>