This situation seems weird given that i am drawing the surface in triangles one by one using a buffer.
If anyone can guide me as to what causes this behaviour.
All of them are supposed to be a solid surface with their respective backgrounds. But i see this strange lines and stuff. Not sure what is the reason. Its not valid for all files though.
And yeah it seems that it exists in the wireframe mode also. Thank you for pointing it out.
I am drawing every triangle separately using glMultiDrawElements. No sure why the wirefram mode is like this.
It looks like depth-fighting, where you have two parallel surfaces and the distance between them is less than the numerical precision of the depth buffer.
First, try increasing the near plane distance for the projection transformation. That will increase the effective precision of the depth buffer. If that doesn’t fix it, it’s likely that you have multiple surfaces with zero distance between them; in which case, you need to fix the model.
I tried increasing the near plane distance ( intial setting near-0.01 far 20.0) changed to 0.1 but still there is no difference. I guess it might be a model issue.