What is the reson for the surface to look like this?

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.
ImproperFillSurface6

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.

Any help will be appreciated.

So if you render your surface in wireframe, does it track with where those lines are?

glPolygonMode( GL_FRONT_AND_BACK, GL_LINE )

Kinda looks like Z-fighting with the edges of your tris or vertex positioning inaccuracies.

Talk more about how you’re rendering and what you’ve tried thus far?

Thanks for your response.
I can clarify the issue maybe. Actually this lines appear when rotating the camera.

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.

1 Like

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.

Solved the model and solved the issue.
image

Thank you all for your input and help.