A simple example on how to do simple heightmapping with OpenTK, enjoy...
GLU is an OpenGL utility library (an extra helper library), that it contains various goodies to help development such as Textures, Matrices, e.t.c. more information here http://www.opengl.org/resources/libraries/glx/
GLU on OpenTK:
Using GLU is outdated and is discouraged, in that spirit GLU support is dropped and removed in OpenTK 1.0, so no need to worry about it anymore.
You can say that GL matches the gl prefix from the OpenGL commands.
for example is you say glBindBuffer in C++
in OpenTK you would say GL.BindBuffer
GL is just a namespace that contains all the OpenGL commands.
Same goes for OpenTK.Graphics namespace, it might contain graphics code relevant to OpenTK,
as also as OpenTK.Input, is a namespace that contains OpenTK code for user input.
If I did not explain something good ask me to repeat :)
No no, that makes perfect sense. . Thank you very much for your example and an understanding. This is great to learn from. I had not known that OpenGL could be used this easily with C#. Glad to know it can.
WOW thats cool! Is there a technique to make this looking more smooth, and less computationally intensive?
Sorry for this outdated code, the most proper way is to create vertex buffer/array objects, that way it will be very fast.
I will try to create it someday.
That would be amazing.
Is there a technique to smooth the vertexes and map a higher resolution texture over this heightmap?
For smoothing the terrain you could use normals and shading modes set to smooth. Other than that higher resolution means more polygons. Sorry for not updating the code but I have not enough time.
However I found that there is guy who created an amazing terrain engine. It worth to have a look to his project.
Site design by Stefanos A. Icons courtesy of gnome-colors.