OpenGL is a 3D technology. Now, in the 2.0 line, P2D uses OpenGL, so the output shouldn't be that different.
I am guessing (not being a specialist of OpenGL) that P2D uses some special OpenGL settings to get the display plane (2D) and behaving correctly.
Perhaps you need to apply these settings in your sketch, too.
I am guessing (not being a specialist of OpenGL) that P2D uses some special OpenGL settings to get the display plane (2D) and behaving correctly.
Perhaps you need to apply these settings in your sketch, too.