Login  Register

Re: Need help understanding use of TextRenderer

Posted by Ryan McFall on Feb 18, 2021; 10:45am
URL: https://forum.jogamp.org/Need-help-understanding-use-of-TextRenderer-tp4041009p4041022.html

I just tried it with begin3DRenderering and I think that the answer is yes, it works correctly.


gl.glMatrixMode(GLMatrixFunc.GL_PROJECTION);
gl.glLoadIdentity();
glu.gluOrtho2D(0, canvas.getWidth(), 0, canvas.getHeight());
		
gl.glMatrixMode(GLMatrixFunc.GL_MODELVIEW);
gl.glLoadIdentity();
gl.glTranslated(50, 25, 0);
		
renderer.begin3DRendering();
renderer.draw(str, 0, 0);
renderer.end3DRendering();

draws the string appropriately translated up and to the right.