So even Swift 6, Xcode 16 did not help. it seems to be a bug within the original code. The function is not working as expected. I would like to ask to solve the bug by the function: renderEncoder?.drawPrimitives(type: .line, vertexStart: 0, vertexCount: 3) and renderEncoder?.drawPrimitives(type: .lineStrip, vertexStart: 0, vertexCount: 3)
Post
Replies
Boosts
Views
Activity
Hi Noah-w,
Thanks for your reply. Actually, the issue has nothing to do with the camera or z-far. For example, when I use renderEncoder?.drawIndexedPrimitives(type: .triangle...), the rendering is perfect, and even the areas that weren't correct in .line mode are displayed properly. The cube rotates as expected. However, in line mode, if a line isn’t rendered, it remains missing throughout the entire rotation of the cube, even when it falls within the z-near and z-far range.