[Haskell-cafe] OpenGL performance issue on OSX

Michael Baker michaeltbaker at gmail.com
Tue May 20 15:36:20 UTC 2014

On Mon, May 19, 2014 at 11:43 PM, Anthony Cowley <acowley at gmail.com> wrote:

> > On May 20, 2014, at 12:20 AM, Michael Baker <michaeltbaker at gmail.com>
> wrote:
> >
> > I'm using OpenGLRaw and I'm getting 3 frames per second trying to draw
> 8000 triangles. When I profile the application, I see that almost all of
> the time is taken by a call to CGLFlushDrawable, which is apparently OSX's
> function for swapping the back buffer to the front buffer.
> Can you put the code somewhere so we can take a look? OpenGL offers 8000
> ways to draw 8000 triangles.
> Anthony
> >
> > Has anyone else run into a problem like this? I seem to recall a thread
> a while ago about a Haskell specific OpenGL performance issue, but I can't
> find it now.
> > _______________________________________________
> > Haskell-Cafe mailing list
> > Haskell-Cafe at haskell.org
> > http://www.haskell.org/mailman/listinfo/haskell-cafe

Here's the code https://gist.github.com/MichaelBaker/4429c93f2aca04bc79bb.
I think I have everything important in there. Line 53 is the one that
causes the slow down. I guess some things to note are that "Triangle" is
Storable and the vector I'm creating on line 14 and writing to on line 47
is a mutable storable vector.

Also, thanks Alp, I'll look into this when I get home. Although I don't
think my computer has more than one graphics card (it's a Macbook Air).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140520/06abc15c/attachment.html>

More information about the Haskell-Cafe mailing list