From deca38fce30548d0ee624b7c747daacafca37f24 Mon Sep 17 00:00:00 2001 From: Rami Santina Date: Fri, 8 Apr 2011 17:41:45 +0300 Subject: TextRenderer - createString exposed; Renderer - added scale(); createString function is now public to be able to create a string without initializing textRenderer. Temp change, should be cleaned up. added missing scale transformation to renderer pmvmatrix; added glyphstring.getBounds() so not to use font.getStringBounds. since it Would be a redundant call. --- src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java') diff --git a/src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java b/src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java index 57eeb016f..c9661b52a 100644 --- a/src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java +++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java @@ -124,6 +124,13 @@ public abstract class Renderer { st.glUniform(gl, mgl_PMVMatrix); } } + + public void scale(GL2ES2 gl, float x, float y, float z) { + pmvMatrix.glScalef(x, y, z); + if(initialized && null != gl && st.inUse()) { + st.glUniform(gl, mgl_PMVMatrix); + } + } public void resetModelview(GL2ES2 gl) { pmvMatrix.glMatrixMode(GLMatrixFunc.GL_MODELVIEW); -- cgit v1.2.3