<html>
<body>
  <div id="body" style="background-color:#ffffff;" >
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head" style="border-bottom-width:1px;border-bottom-style:solid;" ><td class="headtd" style="padding:0;padding-top:.2em;" colspan="4">Commit in <b><tt>lxdream</tt></b></td></tr>
<tr><td><tt><a href="#file1">config.h.in</a></tt></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+4</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-1</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">cf6126df0398 -> 8168aa94e6d7</td></tr>
<tr class="alt" style=";" ><td><tt><a href="#file2">configure</a></tt></td><td id="addedalt" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ccf7cc;" align="right">+89</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-1</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">cf6126df0398 -> 8168aa94e6d7</td></tr>
<tr><td><tt><a href="#file3">configure.in</a></tt></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+2</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-2</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">cf6126df0398 -> 8168aa94e6d7</td></tr>
<tr class="alt" style=";" ><td><tt>src/drivers/<a href="#file4">gl_fbo.c</a></tt></td><td id="addedalt" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ccf7cc;" align="right">+6</td><td></td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">cf6126df0398 -> 8168aa94e6d7</td></tr>
<tr><td></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+101</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-4</td><td></td></tr>
</table>
<small id="info" style="color: #888888;" >4 modified files</small><br />
<pre class="comment" style="white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;word-wrap:break-word;padding:4px;border:1px dashed #000000;background-color:#ffffdd;" >
Check for existence of glDrawBuffer (assuming that glReadBuffer will
follow). Note only need to guard the common code in gl_fbo.c
</pre>
<hr /><a name="file1" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>config.h.in</b></big> <small id="info" style="color: #888888;" >cf6126df0398 -> 8168aa94e6d7</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/config.h.in
+++ lxdream/config.h.in
@@ -109,6 +109,9 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > /* Have glClearDepthf function */
 #undef HAVE_OPENGL_CLEAR_DEPTHF
 
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+/* Have glDrawBuffer function */
+#undef HAVE_OPENGL_DRAW_BUFFER
+
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > /* Have 2.0 framebuffer_object support */
 #undef HAVE_OPENGL_FBO
 
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -124,7 +127,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > /* Have ARB shader support */
 #undef HAVE_OPENGL_SHADER_ARB
 
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-/* Have glAreTexturesResident */
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+/* Have glAreTexturesResident <span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" >function </span>*/
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #undef HAVE_OPENGL_TEX_RESIDENT
 
 /* Building with the OSMesa video driver */
</pre></div>
<hr /><a name="file2" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>configure</b></big> <small id="info" style="color: #888888;" >cf6126df0398 -> 8168aa94e6d7</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/configure
+++ lxdream/configure
@@ -12372,6 +12372,95 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
 fi
 
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+{ echo "$as_me:$LINENO: checking for glDrawBuffer" >&5
+echo $ECHO_N "checking for glDrawBuffer... $ECHO_C" >&6; }
+if test "${ac_cv_func_glDrawBuffer+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define glDrawBuffer to an innocuous variant, in case <limits.h> declares glDrawBuffer.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define glDrawBuffer innocuous_glDrawBuffer
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char glDrawBuffer (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef glDrawBuffer
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char glDrawBuffer ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_glDrawBuffer || defined __stub___glDrawBuffer
+choke me
+#endif
+
+int
+main ()
+{
+return glDrawBuffer ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_func_glDrawBuffer=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_func_glDrawBuffer=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_glDrawBuffer" >&5
+echo "${ECHO_T}$ac_cv_func_glDrawBuffer" >&6; }
+if test $ac_cv_func_glDrawBuffer = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_OPENGL_DRAW_BUFFER 1
+_ACEOF
+
+fi
+
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > { echo "$as_me:$LINENO: checking for glTexEnvi" >&5
 echo $ECHO_N "checking for glTexEnvi... $ECHO_C" >&6; }
 if test "${ac_cv_func_glTexEnvi+set}" = set; then
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -12464,7 +12553,6 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
 
 
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > if test "x$enable_translator" != "xno"; then
     case $host_cpu in
         i386|i486|i586|i686|x86_64)
</pre></div>
<hr /><a name="file3" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>configure.in</b></big> <small id="info" style="color: #888888;" >cf6126df0398 -> 8168aa94e6d7</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/configure.in
+++ lxdream/configure.in
@@ -303,9 +303,9 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > AC_CHECK_FUNC(glCreateShaderObjectARB, [ AC_DEFINE([HAVE_OPENGL_SHADER_ARB],1,[Have ARB shader support]) ], [])
 AC_CHECK_FUNC(glClampColorARB, [ AC_DEFINE([HAVE_OPENGL_CLAMP_COLOR],1,[Have Color Clamp]) ], [])
 AC_CHECK_FUNC(glClearDepthf, [ AC_DEFINE([HAVE_OPENGL_CLEAR_DEPTHF],1,[Have glClearDepthf function]) ], [])
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-AC_CHECK_FUNC(glAreTexturesResident, [ AC_DEFINE([HAVE_OPENGL_TEX_RESIDENT],1,[Have glAreTexturesResident]) ], [])
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+AC_CHECK_FUNC(glAreTexturesResident, [ AC_DEFINE([HAVE_OPENGL_TEX_RESIDENT],1,[Have glAreTexturesResident<span id="addedchars" style="background-color:#99ff99;font-weight:bolder;" > function</span>]) ], [])
+AC_CHECK_FUNC(glDrawBuffer, [ AC_DEFINE([HAVE_OPENGL_DRAW_BUFFER],1,[Have glDrawBuffer function])], [])
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > AC_CHECK_FUNC(glTexEnvi, [ AC_DEFINE([HAVE_OPENGL_FIXEDFUNC],1,[Have OpenGL fixed-functionality]) ], [])dnl glTexEnvi is a pretty fair proxy for this.
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >- 
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
 
 
</pre></div>
<hr /><a name="file4" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src/drivers</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>gl_fbo.c</b></big> <small id="info" style="color: #888888;" >cf6126df0398 -> 8168aa94e6d7</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/drivers/gl_fbo.c
+++ lxdream/src/drivers/gl_fbo.c
@@ -198,8 +198,10 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     int attach = -1, i;
     for( i=0; i<gl_fbo_max_attachments; i++ ) {
         if( fbo[fbo_no].tex_ids[i] == tex_id ) {
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#ifdef HAVE_OPENGL_DRAW_BUFFER
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >             glDrawBuffer(ATTACHMENT_POINT(i));
             glReadBuffer(ATTACHMENT_POINT(i)); 
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#endif
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >             return ATTACHMENT_POINT(i); // already attached
         } else if( fbo[fbo_no].tex_ids[i] == -1 && attach == -1 ) {
             attach = i;
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -213,8 +215,10 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     glFramebufferTexture2D(GL_FRAMEBUFFER, ATTACHMENT_POINT(attach), 
                               GL_TEXTURE_2D, tex_id, 0 );
     /* Set draw/read buffers by default */
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#ifdef HAVE_OPENGL_DRAW_BUFFER    
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     glDrawBuffer(ATTACHMENT_POINT(attach));
     glReadBuffer(ATTACHMENT_POINT(attach)); 
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#endif
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
     return ATTACHMENT_POINT(attach);
 }
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -345,8 +349,10 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > {
     glBindFramebuffer( GL_FRAMEBUFFER, 0 );
     /* Make sure texture attachment is not a current draw/read buffer */
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#ifdef HAVE_OPENGL_DRAW_BUFFER
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     glDrawBuffer( GL_FRONT );
     glReadBuffer( GL_FRONT );
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#endif
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     display_driver->swap_buffers();
 }    
 
</pre></div>
<center><small>Chaos Theory</small></center>
</div></body></html>