Re: [Haskell-cafe] Compiled program using OpenGL fails to trigger GPU switch on Mac, but works in GHCi

2013-03-20 Thread Jesper Särnesjö
On Tue, Mar 19, 2013 at 8:18 AM, Albert Y. C. Lai tre...@vex.net wrote: On 13-03-18 09:19 AM, Jesper Särnesjö wrote: Interestingly, running the program in GHCi with the -fno-ghci-sandbox flag, causes it to misbehave in the same way as when compiled: Then perhaps to mimic default ghci in hope

Re: [Haskell-cafe] Compiled program using OpenGL fails to trigger GPU switch on Mac, but works in GHCi

2013-03-20 Thread Jesper Särnesjö
On Tue, Mar 19, 2013 at 12:19 AM, Jesper Särnesjö sarne...@gmail.com wrote: As I final note, I did learn that the GHC runtime generates SIGVTALRM signals to cause the scheduler to switch contexts. Perhaps this prevents GLFW from running properly? Looks like I'll need to brush up on my dtrace

Re: [Haskell-cafe] Compiled program using OpenGL fails to trigger GPU switch on Mac, but works in GHCi

2013-03-18 Thread Jesper Särnesjö
On Mon, Mar 18, 2013 at 11:27 AM, Brandon Allbery allber...@gmail.com wrote: On Sun, Mar 17, 2013 at 7:58 PM, Jason Dagit dag...@gmail.com wrote: On Sat, Mar 16, 2013 at 6:53 PM, Jesper Särnesjö sarne...@gmail.com wrote: To be clear, I think this isn't really an OpenGL problem, but rather one

Re: [Haskell-cafe] Compiled program using OpenGL fails to trigger GPU switch on Mac, but works in GHCi

2013-03-16 Thread Jesper Särnesjö
On Thu, Mar 14, 2013 at 12:51 AM, Jesper Särnesjö sarne...@gmail.com wrote: In short, I have two programs, one written in Haskell [1] and one written in C [2], that consist of calls to the same functions, in the same order, to the same C library, but which do not exhibit the same behavior

[Haskell-cafe] Compiled program using OpenGL fails to trigger GPU switch on Mac, but works in GHCi

2013-03-13 Thread Jesper Särnesjö
reproduced this on 10.7.5 [8]. You'll also need the GLFW library [9], which can be built from source or installed using Homebrew. Please let me know if I can provide any more information. -- Jesper Särnesjö http://jesper.sarnesjo.org/ [1] https://gist.github.com/sarnesjo/5151894#file-glfw_test-hs