[Haskell] GLUT gears speed

Wolfgang Jeltsch wolfgang at jeltsch.net
Mon Jan 16 15:52:45 EST 2006

Am Montag, 16. Januar 2006 15:16 schrieb Sebastian Sylvan:
> [...]

Hello Sebastian,

thank you for your answer.

> As long as you don't do it naively there should be no problems. I.e. 
> do not draw the terrain using the vertex-calls, but rather use
> vertex-arrays,

Hmm, this will make it rather complex for my students since they have not much 
experience with Haskell programming.  In addition, where can I find 
documentation about Graphics.Rendering.OpenGL.GL.VertexArrays?

> or (better) vertex buffer objects. 

What's this?

> Furthermore you should do some hierarchical culling on the terrain (using,
> e.g. a quad-tree) to avoid drawing things which are not visible.

Too complicated for the practical course.  Doesn't OpenGL already do something 
like this?

> Also, some sort of level-of-detail-scheme is probably a good idea (blocks of
> terrain far away have lower level of detail).

Maybe also too complicated or too extensive for the practical course.

> To summarize: Drawing vast terrains quickly has much more to do with
> algorithmic cleverness rather than miniscule overheads from library
> bindings.

I did not refer to the overheads of the binding but to "the slowness of 
Haskell" (compared to C, of course ;-) ).

> You may want to find a good terrain-rendering library rather than
> implementing it yourself.

Is there one for Haskell?

> /S


More information about the Haskell mailing list