[Haskell-beginners] Vertices and Indices

Tom Davie tom.davie at gmail.com
Fri Apr 5 10:40:05 CEST 2013


On 5 Apr 2013, at 09:12, Adrian May <adrian.alexander.may at gmail.com> wrote:

> 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




More information about the Beginners mailing list