
Hi Folks, I'm looking at the OpenGL stuff in Haskell and one thing is worrying me. Doing OpenGL in the past I used to pass an array of vertices to the GPU and then a list of indices into that array together with a method of joining them up, e.g. TriangleStrip. In Haskell though, it seems like I'm just supposed to send a list of vertices and the method, meaning that lots of vertices get duplicated. Is Haskell doing something clever under the hood here or is it really that wasteful? Or can I persuade it to use these index lists? TIA, Adrian.

On 5 Apr 2013, at 09:12, Adrian May
Hi Folks,
I'm looking at the OpenGL stuff in Haskell and one thing is worrying me. Doing OpenGL in the past I used to pass an array of vertices to the GPU and then a list of indices into that array together with a method of joining them up, e.g. TriangleStrip. In Haskell though, it seems like I'm just supposed to send a list of vertices and the method, meaning that lots of vertices get duplicated. Is Haskell doing something clever under the hood here or is it really that wasteful? Or can I persuade it to use these index lists?
This has nothing to do with Haskell, but instead the fact that someone chose to call glDrawArrays instead of glDrawElements. Thanks Tom Davie
participants (2)
-
Adrian May
-
Tom Davie