February 7, 2011

Processing: Shapes disappear when switching from P3D to OPENGL renderer

I was having some issues with my 3d scene in Processing when switching to OPENGL from the P3D rendering mode. At a certain distance, my shapes were disappearing in OPENGL, but they displayed properly in P3D. My good friend (and Processing whiz) Movax gave me the suggestion to adjust my perspective(). Theses we the value that helped my situation:
perspective( 1.0f, 1.5f, 1f, 200000f );
The 200,000 value is the maximum depth that the camera will be able to see in OPENGL mode, which was large enough to view some of my distant objects that had been disappearing.

No comments:

Post a Comment