ze_jappie
01-10-2002, 09:24 PM
Hi ppl,
I made a little program that renders a patch of terrain from a heightmap. Using a brute-force approach to render things works very well. Since I wanted to optimize things a bit, I implemented a vertex array. Now here's the problem: when rendering the terrain using the vertex array, I get a floating-point division by zero error whenever I move the viewpoint over a certain z-value. If I move over this boundary using a brute-force render, everything's fine. When I don't cross that particular value using vertex arrays, everything works fine too. I'm pretty sure that the coordinates I calculated for my array are correct. Any ideas??
Jappie
I made a little program that renders a patch of terrain from a heightmap. Using a brute-force approach to render things works very well. Since I wanted to optimize things a bit, I implemented a vertex array. Now here's the problem: when rendering the terrain using the vertex array, I get a floating-point division by zero error whenever I move the viewpoint over a certain z-value. If I move over this boundary using a brute-force render, everything's fine. When I don't cross that particular value using vertex arrays, everything works fine too. I'm pretty sure that the coordinates I calculated for my array are correct. Any ideas??
Jappie