I can't get them correct, but anyway, now even the normals in the side of the chunks are incorrect (I should get vertices from other chunks to get the normal, etc.) It's getting a little too complex for the little optimization I want to do.
Yeah, you need to use vertices outside the chunk to calculate normals. But, you can do this offline, and make it part of your heighmap data. So it doesn't really complicate your chunk algorithm too much.
If the boundingbox containing the last vertices of my terrain is not in view, then the amount of primitives to draw is the amount of vertices - the amount of vertices contained in the box.
I don't quite understand how this would work. Like, how you would order your vertices in order to make this work.
Another alternative, which I suggested before, is to have a terrain grid just large enough to cover the area viewable by the camera, and move it with the camera. This is what I used in my game engine, and in terms of managing stuff on the CPU, it's extremely straightforward. I just have a single vertex and index buffer, and I set a world matrix to offset the terrain grid by the right amount when drawing. Height calculation is done by sampling the heightmap in the vertex shader. But I think it works best if you have a camera that doesn't allow a great variety in viewing angles (otherwise you'll have to account for different numbers of vertices being seen).