[Haskell-beginners] OpenGLRaw Tutorial

Mateusz Kowalczyk fuuzetsu at fuuzetsu.co.uk
Mon Mar 11 10:59:29 CET 2013


On 11/03/13 06:45, Michael Baker wrote:
> I'm trying to follow this book on
> OpenGL: http://www.arcsynthesis.org/gltut/Basics/Tut01%20Following%20the%20Data.html
> 
> I'm trying to follow the examples using the OpenGLRaw package as the
> OpenGL package doesn't map very neatly to any of the examples. For
> instance, it is not clear to me now to create and use the vertex array
> used in the example that I linked to.
> 
> However, I'm struggling a bit because I haven't used Haskell's foreign
> interface before. Here is an attempt which is expected to draw a
> triangle, but instead draws nothing: http://hpaste.org/83837
> 
> Does anyone know of a tutorial for OpenGLRaw or the foreign interface
> that might help me understand how to marshall data around? It seems like
> many people turn to OpenGLRaw when they're learning OpenGL so that they
> can follow the tutorials. I imagine it would be useful to have a guide
> out there that covers how to actually use it.
> 
> 
> 
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
> 
I don't think that it's the best idea to learn OpenGL using Haskell
simply because of how drastically different C and Haskell are and for
the reason you mentioned yourself.

Nevertheless, you can find many examples at [1]. You can find things
such as the red book examples translated into Haskell as well as links
to other resources.

[1] - http://www.haskell.org/haskellwiki/Opengl

-- 
Mateusz K.



More information about the Beginners mailing list