I have solved this issue, the problem was located in the projection matrix which led to the same coordinate z of each point, so all the triangles would overlap together which resulted in the wrong image of the intersecting part. you’d better deduce the projection matrix correctly based on your own coordinate system.