Reputation: 548
I am quite new to XNA, and am a bit confused with...well most concepts. Any pointers in a good direction would be helpful!
I have a data structure in a row/column format. Essentially they represent the height values of the terrain. How do I go about drawing the terrain? (note that I am not reading this data from a file)
Here is a sample representation of the data. The actual data can be as much as 100 rows x 1mil columns.
3 4 5 6 7 1
2 2 1 4 1 6
4 5 7 9 0 0
5 3 3 4 5 6
1 2 1 4 1 1
edit: Can I create a 3D texture object and fill it with height data and render it? I think that would be easier than creating and meshing together triangles right?
Upvotes: 0
Views: 1638
Reputation: 1014
I suggest Riemer's tutorials - they deal with terrain rendering basing on a heightmap. Check http://riemers.net/. They offer a good start, once you will pass through them search for quad-tree terrain rendering - that is done to optimize rendering.
Upvotes: 2