Is ortho() working as it should?
in
Core Library Questions
•
3 years ago
I had problems to mix 3D and 2D together by drawing 3D stuff first and then some 2D (e.g. text) on top of everything (using OPENGL). I tried to use ortho() to do that, but after calling it I couldn't get any of my 2D stuff to show up.
At first I solved the issue by explicitly using PGraphicsOpenGL to clear projection and model view matrices and then using glOrtho to apply new settings. However, I just found out that Processing's own ortho() works as well, but I have to call it like this:
ortho(0,width,-height,0,-10,10);
The documentation claims that default one is
ortho(0, width, 0, height, -10, 10), but using those params just doesn't seem to work (I think it makes everything to go actually "below" screen or something).
1