So I have recently started on my own 3D renderer in Java. I have made a cube and a camera that can be moved with WASD
and mouse. I have just one problem:
When the camera looks away or a point of the cube ends up on the corner of the display the renderer freaks out (it renders a polygon that shouldn't be drawn).
After debugging I saw that the renderer wanted to render a point at x: -142500
(way out of my 1500x1500
window). I then tried to fix this by implementing screen clipping (so that 142500
x coordinate would be moved to the edge of the screen). Well, that didn't work either :(
I would appreciate any help. The problem (the red is where the edge is and the blue striped area is where the white triangle should have rendered)
Edit: dropbox jar file