[TextRenderer] Using depth test in 2D mode
Posted by
Djak on
Dec 14, 2010; 10:54am
URL: https://forum.jogamp.org/TextRenderer-Using-depth-test-in-2D-mode-tp2084831.html
Hi,
is there any way to use depth test to draw text in 2D orthographic projection with TextRenderer ? I think my question may be silly :)
Actually, I use the 2D mode to draw texts associated to spheres and having the same font size, independantly of the z of the spheres or the cameras (and to get some kind of billboard).
But texts are drawn in front of all the spheres, ie :

in this shot, the sphere "choix" is the nearest sphere, so it appears bigger due of perspective.
____________

If I span camera, I can see "urgence" is drawn in front of the "choix" sphere.
I know all the matrix are affected by the beginRendering() method but do you think I must use the 3D mode of TextRender and adjust the font size from the z of the sphere and the camera ? or anyone knows a way to do that with the 2d mode of TextRender ?
Thanks in advance for any help :)