<div dir="ltr"><div><div>Hi.<br><br></div>AFAIK glfw-b uses its own version of glfw which is built during setup.<br></div><div>There is a makefile inside the package.<br></div><div><br></div>Can&#39;t reproduce this error on Arch.<br>
<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/3/10 Hollister Herhold <span dir="ltr">&lt;<a href="mailto:hollister@fafoh.com" target="_blank">hollister@fafoh.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
OK, I get the same results as you. I ran a dtruss on the two different apps to look at the system calls being made and I can see where the C code opens the OpenGL hardware driver and the haskell code does not, but I&#39;m not sure why. There are a lot of preferences files flying around. Still digging.<br>

<br>
I do know that both apps are using the same glfw library.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Mar 10, 2013, at 8:23 AM, Hollister Herhold wrote:<br>
<br>
&gt;<br>
&gt; I&#39;m building glfw now on 10.7.5 and I&#39;ll try your test code.<br>
&gt;<br>
&gt; I&#39;ve been learning haskell (still very much a beginner) but I know OpenGL, so I&#39;m very interested in how this turns out.<br>
&gt;<br>
&gt; -Hollister<br>
&gt;<br>
&gt;<br>
&gt; On Mar 10, 2013, at 4:38 AM, Jesper Särnesjö wrote:<br>
&gt;<br>
&gt;&gt; On Sun, Mar 10, 2013 at 4:46 PM, Jesper Särnesjö &lt;<a href="mailto:sarnesjo@gmail.com">sarnesjo@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt; I&#39;ve figured out what the problem is: the Haskell program is using a<br>
&gt;&gt;&gt; software implementation of OpenGL, so rendering *does* in fact happen<br>
&gt;&gt;&gt; on the CPU.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; It would appear that there is in fact some relevant difference between<br>
&gt;&gt;&gt; the Haskell and C versions of my program, or possibly some way<br>
&gt;&gt;&gt; in which the bindings from the GLFW-b package are different from the C<br>
&gt;&gt;&gt; library.<br>
&gt;&gt;<br>
&gt;&gt; To remove any possibility of the problem being in GLFW-b or OpenGLRaw,<br>
&gt;&gt; I created two new programs, one in Haskell [1] and one in C [2], that<br>
&gt;&gt; don&#39;t import or include anything related to OpenGL, and that simply<br>
&gt;&gt; create a context, check if it is hardware accelerated, and then exit.<br>
&gt;&gt; That is all. And still, the Haskell program receives a software<br>
&gt;&gt; renderer, while the C program receives a hardware one:<br>
&gt;&gt;<br>
&gt;&gt;   $ ghc -O2 Test2.hs -lglfw -framework OpenGL -fforce-recomp &amp;&amp; ./Test2<br>
&gt;&gt;   [1 of 1] Compiling Main             ( Test2.hs, Test2.o )<br>
&gt;&gt;   Linking Test2 ...<br>
&gt;&gt;   software<br>
&gt;&gt;   (2,7,7)<br>
&gt;&gt;   (3,2,0)<br>
&gt;&gt;   $ gcc -O2 test2.c -lglfw -framework OpenGL &amp;&amp; ./a.out<br>
&gt;&gt;   hardware<br>
&gt;&gt;   2.7.7<br>
&gt;&gt;   3.2.0<br>
&gt;&gt;<br>
&gt;&gt; I haven&#39;t had the chance to run these programs on any OS other than<br>
&gt;&gt; Mac OS X 10.8.2, so I don&#39;t know if this problem is Mac-specific.<br>
&gt;&gt; Still, it&#39;s really weird that the system would differentiate between<br>
&gt;&gt; Haskell and C programs in this way.<br>
&gt;&gt;<br>
&gt;&gt; If anyone has any ideas about what&#39;s going on here, I&#39;d very much like<br>
&gt;&gt; to hear them.<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Jesper Särnesjö<br>
&gt;&gt; <a href="http://jesper.sarnesjo.org/" target="_blank">http://jesper.sarnesjo.org/</a><br>
&gt;&gt;<br>
&gt;&gt; [1] <a href="https://gist.github.com/sarnesjo/5116084#file-test2-hs" target="_blank">https://gist.github.com/sarnesjo/5116084#file-test2-hs</a><br>
&gt;&gt; [2] <a href="https://gist.github.com/sarnesjo/5116084#file-test2-c" target="_blank">https://gist.github.com/sarnesjo/5116084#file-test2-c</a><br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Beginners mailing list<br>
&gt;&gt; <a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
&gt;&gt; <a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Beginners mailing list<br>
&gt; <a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
&gt; <a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
<br>
<br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
</div></div></blockquote></div><br></div>