summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-04-08 18:08:56 +0200
committerSven Gothel <[email protected]>2011-04-08 18:08:56 +0200
commit547724c6790db5888bf803ec7e79b5eaa8cc1d87 (patch)
tree6d41675a8aafe6f7d2dec28ade0813f749388cc2 /src/jogl/classes/com
parentba47ef11171a8da45c718c89d1e962287b504e36 (diff)
parentf628fc29468b7a6b821b5a47dd93224730222dc4 (diff)
Merge remote-tracking branch 'rsantina/graph' into graph
Diffstat (limited to 'src/jogl/classes/com')
-rwxr-xr-xsrc/jogl/classes/com/jogamp/graph/curve/Region.java4
-rw-r--r--src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java7
-rw-r--r--src/jogl/classes/com/jogamp/graph/curve/opengl/TextRenderer.java3
-rw-r--r--src/jogl/classes/com/jogamp/graph/geom/AABBox.java8
4 files changed, 15 insertions, 7 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/curve/Region.java b/src/jogl/classes/com/jogamp/graph/curve/Region.java
index e238889e0..cc21af859 100755
--- a/src/jogl/classes/com/jogamp/graph/curve/Region.java
+++ b/src/jogl/classes/com/jogamp/graph/curve/Region.java
@@ -29,9 +29,9 @@ package com.jogamp.graph.curve;
import java.util.ArrayList;
+import com.jogamp.graph.geom.AABBox;
import jogamp.opengl.Debug;
-import com.jogamp.graph.curve.opengl.Renderer;
import com.jogamp.graph.geom.Triangle;
import com.jogamp.graph.geom.Vertex;
import com.jogamp.opengl.util.PMVMatrix;
@@ -129,6 +129,8 @@ public interface Region {
*/
public void destroy();
+ public AABBox getBounds();
+
public boolean isFlipped();
/** Set if the y coordinate of the region should be flipped
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 aa14bcbd8..ce3e83692 100644
--- a/src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java
+++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java
@@ -125,6 +125,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);
diff --git a/src/jogl/classes/com/jogamp/graph/curve/opengl/TextRenderer.java b/src/jogl/classes/com/jogamp/graph/curve/opengl/TextRenderer.java
index 4b7299a33..ee8dfb372 100644
--- a/src/jogl/classes/com/jogamp/graph/curve/opengl/TextRenderer.java
+++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/TextRenderer.java
@@ -48,11 +48,10 @@ public abstract class TextRenderer extends Renderer {
* @param sharpness parameter for Region generation of the resulting GlyphString
* @return the resulting GlyphString inclusive the generated region
*/
- protected GlyphString createString(GL2ES2 gl, Font font, int size, String str, float sharpness) {
+ public GlyphString createString(GL2ES2 gl, Font font, int size, String str, float sharpness) {
if(DEBUG) {
System.err.println("createString: "+getCacheSize()+"/"+getCacheLimit()+" - "+Font.NAME_UNIQUNAME + " - " + str + " - " + size);
}
-
AffineTransform affineTransform = new AffineTransform(pointFactory);
Path2D[] paths = new Path2D[str.length()];
diff --git a/src/jogl/classes/com/jogamp/graph/geom/AABBox.java b/src/jogl/classes/com/jogamp/graph/geom/AABBox.java
index 8cd06329e..17a805b31 100644
--- a/src/jogl/classes/com/jogamp/graph/geom/AABBox.java
+++ b/src/jogl/classes/com/jogamp/graph/geom/AABBox.java
@@ -57,8 +57,8 @@ public class AABBox {
public AABBox(float lx, float ly, float lz,
float hx, float hy, float hz)
{
- setLow(lx, ly, lz);
- setHigh(hx, hy, hz);
+ resize(lx, ly, lz);
+ resize(hx, hy, hz);
computeCenter();
}
@@ -69,8 +69,8 @@ public class AABBox {
*/
public AABBox(float[] low, float[] high)
{
- this.low = low;
- this.high = high;
+ resize(low[0],low[1],low[2]);
+ resize(high[0],high[1],high[2]);
computeCenter();
}