OpenGL: Difference between revisions
m (Opengl moved to OpenGL) |
DavidLeoni (talk | contribs) (added Contents and troubleshooting section) |
||
Line 2: | Line 2: | ||
[http://www.haskell.org/HOpenGL-old/ old page]. | [http://www.haskell.org/HOpenGL-old/ old page]. | ||
First, note that the implementation is far more up-to-date than that old page suggested (originally, it was quite useful, but the page hasn't kept up with the implementation for a long time now). | First, note that the implementation is far more up-to-date than that old page suggested (originally, it was quite useful, but the page hasn't kept up with the implementation for a long time now). | ||
== References == | |||
[http://www.haskell.org/mailman/listinfo/hopengl the hopengl mailing list] | [http://www.haskell.org/mailman/listinfo/hopengl the hopengl mailing list] | ||
Line 18: | Line 19: | ||
Both the API documentation and the examples are best studied with the [http://www.opengl.org/documentation/specs/ original specs] and the original [http://www.opengl.org/documentation/red_book/ red book] examples at hand. An index of the examples from v1.1 of the red book, with screen shots, can be found [http://www.opengl.org/resources/code/samples/redbook/ here] | Both the API documentation and the examples are best studied with the [http://www.opengl.org/documentation/specs/ original specs] and the original [http://www.opengl.org/documentation/red_book/ red book] examples at hand. An index of the examples from v1.1 of the red book, with screen shots, can be found [http://www.opengl.org/resources/code/samples/redbook/ here] | ||
Projects using the OpenGL bindings | == Projects using the OpenGL bindings == | ||
* [[Frag]], a 3D first-person shooter game | * [[Frag]], a 3D first-person shooter game | ||
HOpenGL Resources | == HOpenGL Resources == | ||
* http://www.cin.ufpe.br/~haskell/hopengl/ Andre Furtado's nice tutorial written in 2001 (bitrotted) | * http://www.cin.ufpe.br/~haskell/hopengl/ Andre Furtado's nice tutorial written in 2001 (bitrotted) | ||
Line 30: | Line 31: | ||
OpenGL Resources | == OpenGL Resources == | ||
* [http://www.opengl.org/resources/faq/technical/ OpenGL FAQ and Toubleshooting Guide] Assumes some knowledge of OpenGL. Good for those who have written something but want to avoid common pitfalls. | * [http://www.opengl.org/resources/faq/technical/ OpenGL FAQ and Toubleshooting Guide] Assumes some knowledge of OpenGL. Good for those who have written something but want to avoid common pitfalls. | ||
Getting Started | == Getting Started == | ||
* assuming you know Haskell, any OpenGL tutorial of your choice should get you going (browsing the [http://www.opengl.org OpenGL] site is also a good idea) | * assuming you know Haskell, any OpenGL tutorial of your choice should get you going (browsing the [http://www.opengl.org OpenGL] site is also a good idea) | ||
Line 40: | Line 41: | ||
* use the OpenGL and GLUT specs to find your way around the HOpenGL Haddock documentation | * use the OpenGL and GLUT specs to find your way around the HOpenGL Haddock documentation | ||
* use the HopenGL list for questions and success stories | * use the HopenGL list for questions and success stories | ||
== Troubleshooting == | |||
=== I can't display text with renderString === | |||
It's probably because the text is displayed too big. Setting a much smaller scale factor before calling renderString should solve the problem. | |||
<haskell> | |||
scale 0.001 0.001 (0.001∷GLfloat) | |||
renderString Roman "Test string" | |||
</haskell> | |||
[[Category:Packages]] | [[Category:Packages]] |
Revision as of 18:30, 28 April 2008
This is a stub page for Haskell's OpenGL and GLUT bindings. It is meant as a starting point to replace the outdated and misleading documentation at the old page.
First, note that the implementation is far more up-to-date than that old page suggested (originally, it was quite useful, but the page hasn't kept up with the implementation for a long time now).
References
the API docs for the OpenGL binding
the API docs for the GLUT binding
the darcs repo with the sources for the OpenGL binding
the darcs repo with the sources for the GLUT binding
In particular, note that the examples/ directory in the GLUT repo contains lots of examples, including translations of the red book examples.
Both the API documentation and the examples are best studied with the original specs and the original red book examples at hand. An index of the examples from v1.1 of the red book, with screen shots, can be found here
Projects using the OpenGL bindings
- Frag, a 3D first-person shooter game
HOpenGL Resources
- http://www.cin.ufpe.br/~haskell/hopengl/ Andre Furtado's nice tutorial written in 2001 (bitrotted)
- http://www.haskell.org/~pairwise/HOpenGL/HOpenGL.html#texLoad Spriting with HOpenGL, David Morra
- a short Haskell OpenGL tutorial part 1
- a short Haskell OpenGL tutorial part 2
OpenGL Resources
- OpenGL FAQ and Toubleshooting Guide Assumes some knowledge of OpenGL. Good for those who have written something but want to avoid common pitfalls.
Getting Started
- assuming you know Haskell, any OpenGL tutorial of your choice should get you going (browsing the OpenGL site is also a good idea)
- use the Red Book, and its example code translations, to understand the small differences between OpenGL and HOpenGL
- use the OpenGL and GLUT specs to find your way around the HOpenGL Haddock documentation
- use the HopenGL list for questions and success stories
Troubleshooting
I can't display text with renderString
It's probably because the text is displayed too big. Setting a much smaller scale factor before calling renderString should solve the problem.
scale 0.001 0.001 (0.001∷GLfloat)
renderString Roman "Test string"