Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
EdgeLinesFactory CreateEdgeLines wrong index buffer returned for PlaneModelNode
#1
Question 
Hello

Could it be possible that CreateEdgeLines method in EdgeLinesFactory static class is returning wrong index buffer so outter edges are rendered in diagonal?
#2
I have checked that and found out that there is an optimized code path for edge line generation where the mesh has only 4 positions (also for plane mesh). In this case, the code produces invalid indices for edge lines when the positions for the mesh are not organized in a nice clockwise or counter-clockwise direction. This also happens for the default plane mesh, where the indexes of the positions ordered in the clockwise directions are: 0, 1, 3, 2.

I have just updated the code so it now correctly finds where the diagonal lies and, based on that, generates the edge lines. The code now also handles a few invalid meshes more correctly.

I will now also add support for frustum culling (as promised in this post) and then prepare a pre-release version for you.
Andrej Benedik
  


Forum Jump:


Users browsing this thread:
1 Guest(s)