I'm writing a first person 3D program with 2D HUD using Processing 1.5. I do this in draw():
camera(eyex,eyey,eyez,camerax,cameray,cameraz,0,1,0);
// Draw 3D objects
camera();
// Draw 2D lines
That works fine on Linux, and I get all of my lines showing over the 3D scene. However, on Android the 2D lines disappear into 3D objects nearby. I think the problem may be that on Linux camera(); disables/resets depth testing, but on Android depth testing is still being applied when I draw the 2D objects. I've tried using the hint to disable depth testing after camera(); which sort of helped but applied itself to all of the previously drawn 3D content. Moving the cameraz default back to zero, and using frustrum with a small near clipping plane distance, didn't work either.
As PGraphicsAndroid3D doesn't seem to have a zbuffer to access and clear (like the one in PGraphics3D) I can't seem to find a way to clear the depth bits to allow my 2D to draw properly over the 3D. Therefore, I wondered if anyone knows how I can achieve this?
I think it might be a bug (or inconsitency) in the Android implementation of camera(); but I wasn't able to file an issue as the server kept giving me an error 500. Therefore I'd be grateful for any advice available :)