
Hello! (new to the list) I am taking a course in computer graphics, so i installed the latest version of the OpenGL package through cabal. At the top of of the documentation page it says OpenGL 3.2, but when i read different parts of the documentation on hoogle it says OpenGL 2.1 every here and there. What's what? (and if I can, how do i load my GLSL code?) hello! // Alexander, Gothenburg

2009/9/25 Alexander Göransson
Hello! (new to the list)
I am taking a course in computer graphics, so i installed the latest version of the OpenGL package through cabal.
At the top of of the documentation page it says OpenGL 3.2, but when i read different parts of the documentation on hoogle it says OpenGL 2.1 every here and there.
What's what? (and if I can, how do i load my GLSL code?)
Hi, Probably hoogle has the own (and old) documentation. If you go to hackage and look the package list [1], you'll see the link to the latest package [2] which has itself links to its documentation. The most important part is in the Core31 module [3] where you'll find for instance the glCreateProgram, glShaderSource, .... functions which you can use to load your GLSL code. I just realize I've answered your question with the OpenGLRaw package. See for the OpenGL package on [1] too. HTH, Thu [1] http://hackage.haskell.org/packages/archive/pkg-list.html [2] http://hackage.haskell.org/package/OpenGLRaw [3] http://hackage.haskell.org/packages/archive/OpenGLRaw/1.1.0.0/doc/html/Graph...

Am Freitag, 25. September 2009 00:33:58 schrieb Alexander Göransson:
[...] At the top of of the documentation page it says OpenGL 3.2, but when i read different parts of the documentation on hoogle it says OpenGL 2.1 every here and there. [...]
To clarify things a bit: The OpenGLRaw package has full support for OpenGL 3.2 plus tons of extensions, but the OpenGL package does not expose all OpenGL 3.2 features yet. There are no deep technical reasons for the latter, just a lack of time on my side and a sudden burst of activity of the OpenGL ARB/Khronos. But there is an easy workaround: Use the OpenGL package as far as possible and simply fall back to the parts of the OpenGLRaw API for unexposed features. If you explicitly need an OpenGL 3.x context and/or a specific OpenGL profile, you have to use the functions in: http://hackage.haskell.org/packages/archive/GLUT/2.2.2.0/doc/html/Graphics-U... GLUT-Initialization.html#7 initialContext{Version,Flags,Profile} depend on recent freeglut features, so you might need to update this native library. The freeglut project hasn't released an official new version for a long time, so your mileage may vary, depending e.g. on your Linux distribution. If you don't find a precompiled package, you can use the usual "./configure && make install" or compile freeglut via VisualStudio, which should be easy. Cheers, S.
participants (3)
-
Alexander Göransson
-
minh thu
-
Sven Panne