From 615fd41f7b6674c4b42e3f9f70b92c7088d0ad7d Mon Sep 17 00:00:00 2001
From: Michael Bien
The JOGLAppletInstaller is distributed inside jogl.jar as a utility
-class in com.sun.opengl.util. It requires that the developer host a
+class in com.jogamp.opengl.util. It requires that the developer host a
local, signed copy of jogl.jar and all of the jogl-natives jars; the
certificates must be the same on all of these jars. Note that in the
release builds of JOGL all of these jars are signed by Sun
diff --git a/doc/wiki/FAQ.xml b/doc/wiki/FAQ.xml
index 25c3fe99d..7ee1f639b 100644
--- a/doc/wiki/FAQ.xml
+++ b/doc/wiki/FAQ.xml
@@ -86,7 +86,7 @@ and the output is:
Detected screen size 1920x1200
GLProfile[GL2ES1/GL2ES12] Entering initialization
GLProfile[GL2ES1/GL2ES12] GL Profile: GLProfile[GL2ES1/GL2ES12]
- GLProfile[GL2ES1/GL2ES12] GL:com.sun.opengl.impl.gl2es12.GL2ES12Impl@b815859
+ GLProfile[GL2ES1/GL2ES12] GL:com.jogamp.opengl.impl.gl2es12.GL2ES12Impl@b815859
GLProfile[GL2ES1/GL2ES12] GL_VERSION=3.0.0 NVIDIA 185.18.14
GLProfile[GL2ES1/GL2ES12] GL_EXTENSIONS: ..
diff --git a/make/build-jogl.xml b/make/build-jogl.xml
index a98de0b4a..80b106467 100644
--- a/make/build-jogl.xml
+++ b/make/build-jogl.xml
@@ -95,86 +95,86 @@
An Animator can be attached to one or more {@link
+ GLAutoDrawable}s to drive their display() methods in a loop. The Animator class creates a background thread in which the
+ calls to
+
+ Thanks to the LWJGL project for illustrating how to access gamma
+ control on the various platforms.
+*/
+
+public class Gamma {
+ private Gamma() {}
+
+ /**
+ * Sets the gamma, brightness, and contrast of the current main
+ * display. This functionality is not available on all platforms and
+ * graphics hardware. Returns true if the settings were successfully
+ * changed, false if not. This method may return false for some
+ * values of the incoming arguments even on hardware which does
+ * support the underlying functionality.
+ *
+ * If this method returns true, the display settings will
+ * automatically be reset to their original values upon JVM exit
+ * (assuming the JVM does not crash); if the user wishes to change
+ * the display settings back to normal ahead of time, use {@link
+ * #resetDisplayGamma resetDisplayGamma}(). It is recommended to
+ * call {@link #resetDisplayGamma resetDisplayGamma} before calling
+ * e.g.
+ *
+ * This method may be called multiple times during the application's
+ * execution, but calling {@link #resetDisplayGamma
+ * resetDisplayGamma} will only reset the settings to the values
+ * before the first call to this method.
+ *
+ * @param gamma The gamma value, typically > 1.0 (default values
+ * vary, but typically roughly 1.0)
+ * @param brightness The brightness value between -1.0 and 1.0,
+ * inclusive (default values vary, but typically 0)
+ * @param contrast The contrast, greater than 0.0 (default values
+ * vary, but typically 1)
+ * @return true if gamma settings were successfully changed, false
+ * if not
+ * @throws IllegalArgumentException if any of the parameters were
+ * out-of-bounds
+ */
+ public static boolean setDisplayGamma(GL gl, float gamma, float brightness, float contrast) throws IllegalArgumentException {
+ return GLDrawableFactoryImpl.getFactoryImpl(gl.getContext().getGLDrawable().getGLProfile()).setDisplayGamma(gamma, brightness, contrast);
+ }
+
+ /**
+ * Resets the gamma, brightness and contrast values for the primary
+ * display to their original values before {@link #setDisplayGamma
+ * setDisplayGamma} was called the first time. {@link
+ * #setDisplayGamma setDisplayGamma} must be called before calling
+ * this method or an unspecified exception will be thrown. While it
+ * is not explicitly required that this method be called before
+ * exiting, calling it is recommended because of the inevitable
+ * unspecified behavior during JVM teardown.
+ */
+ public static void resetDisplayGamma(GL gl) {
+ GLDrawableFactoryImpl.getFactoryImpl(gl.getContext().getGLDrawable().getGLProfile()).resetDisplayGamma();
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/ImmModeSink.java b/src/jogl/classes/com/jogamp/opengl/util/ImmModeSink.java
new file mode 100644
index 000000000..98249184d
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/ImmModeSink.java
@@ -0,0 +1,974 @@
+
+package com.jogamp.opengl.util;
+
+import javax.media.opengl.*;
+import javax.media.opengl.fixedfunc.*;
+import com.sun.nativewindow.impl.NWReflection;
+import java.nio.*;
+import java.util.Iterator;
+import java.util.ArrayList;
+
+public class ImmModeSink {
+
+ public static final boolean DEBUG_BEGIN_END = false;
+ public static final boolean DEBUG_DRAW = false;
+
+ // public static final int GL_QUADS = 0x0007; // Needs data manipulation
+ public static final int GL_QUAD_STRIP = 0x0008;
+ public static final int GL_POLYGON = 0x0009;
+
+ /**
+ * Uses a GL2ES1, or ES2 fixed function emulation immediate mode sink
+ */
+ public static ImmModeSink createFixed(GL gl, int glBufferUsage, int initialSize,
+ int vComps, int vDataType,
+ int cComps, int cDataType,
+ int nComps, int nDataType,
+ int tComps, int tDataType) {
+ return new ImmModeSink(gl, glBufferUsage, initialSize,
+ vComps, vDataType, cComps, cDataType, nComps, nDataType, tComps, tDataType, false);
+ }
+
+ /**
+ * Uses a GL2ES2 GLSL shader immediate mode sink.
+ * To issue the draw() command,
+ * a ShaderState must be current, using ShaderState.glUseProgram().
+ *
+ * @see #draw(GL, boolean)
+ * @see javax.media.opengl.glsl.ShaderState#glUseProgram(GL2ES2, boolean)
+ * @see javax.media.opengl.glsl.ShaderState#getCurrent()
+ */
+ public static ImmModeSink createGLSL(GL gl, int glBufferUsage, int initialSize,
+ int vComps, int vDataType,
+ int cComps, int cDataType,
+ int nComps, int nDataType,
+ int tComps, int tDataType) {
+ return new ImmModeSink(gl, glBufferUsage, initialSize,
+ vComps, vDataType, cComps, cDataType, nComps, nDataType, tComps, tDataType, true);
+ }
+
+ public static boolean usesVBO() { return vboUsage; }
+
+ public static void setVBOUsage(boolean v) { vboUsage = v; }
+
+ public void destroy(GL gl) {
+ destroyList(gl);
+
+ vboSet.destroy(gl);
+ }
+
+ public void reset() {
+ reset(null);
+ }
+
+ public void reset(GL gl) {
+ destroyList(gl);
+ vboSet.reset(gl);
+ }
+
+ public String toString() {
+ StringBuffer sb = new StringBuffer("ImmModeSink[");
+ sb.append(",\n\tVBO list: "+vboSetList.size()+" [");
+ for(Iterator i=vboSetList.iterator(); i.hasNext() ; ) {
+ sb.append("\n\t");
+ sb.append( (VBOSet)i.next() );
+ }
+ if(vboSetList.size()>0) {
+ sb.append("\n\t],\nVBO current: NOP]");
+ } else {
+ sb.append("\n\t],\nVBO current: \n");
+ sb.append(vboSet);
+ sb.append("\n]");
+ }
+ return sb.toString();
+ }
+
+ public void draw(GL gl, boolean disableBufferAfterDraw) {
+ if(DEBUG_DRAW) {
+ Exception e = new Exception("ImmModeSink.draw(disableBufferAfterDraw: "+disableBufferAfterDraw+"):\n\t"+this);
+ e.printStackTrace();
+ }
+ int n=0;
+ for(Iterator i=vboSetList.iterator(); i.hasNext() ; n++) {
+ ((VBOSet)i.next()).draw(gl, null, disableBufferAfterDraw, n);
+ }
+ }
+
+ public void draw(GL gl, Buffer indices, boolean disableBufferAfterDraw) {
+ if(DEBUG_DRAW) {
+ Exception e = new Exception("ImmModeSink.draw(disableBufferAfterDraw: "+disableBufferAfterDraw+"):\n\t"+this);
+ e.printStackTrace();
+ }
+ int n=0;
+ for(Iterator i=vboSetList.iterator(); i.hasNext() ; n++) {
+ ((VBOSet)i.next()).draw(gl, indices, disableBufferAfterDraw, n);
+ }
+ }
+
+ public void glBegin(int mode) {
+ if(DEBUG_BEGIN_END) {
+ Exception e = new Exception("ImmModeSink.glBegin("+vboSet.mode+"):\n\t"+this);
+ e.printStackTrace();
+ }
+ vboSet.modeOrig = mode;
+ switch(mode) {
+ // Needs data manipulation ..
+ //case GL_QUADS:
+ // mode=GL.GL_LINES;
+ // break;
+ case GL_QUAD_STRIP:
+ mode=GL.GL_TRIANGLE_STRIP;
+ break;
+ case GL_POLYGON:
+ mode=GL.GL_LINES;
+ break;
+ }
+ vboSet.mode = mode;
+ vboSet.checkSeal(false);
+ }
+
+ public final void glEnd(GL gl) {
+ glEnd(gl, null, true);
+ }
+
+ public void glEnd(GL gl, boolean immediateDraw) {
+ glEnd(gl, null, immediateDraw);
+ }
+
+ public final void glEnd(GL gl, Buffer indices) {
+ glEnd(gl, indices, true);
+ }
+
+ private void glEnd(GL gl, Buffer indices, boolean immediateDraw) {
+ if(DEBUG_BEGIN_END) {
+ Exception e = new Exception("ImmModeSink START glEnd(immediate: "+immediateDraw+"):\n\t"+this);
+ e.printStackTrace();
+ }
+ if(immediateDraw) {
+ vboSet.seal(gl, true);
+ vboSet.draw(gl, indices, true, -1);
+ reset(gl);
+ } else {
+ vboSet.seal(gl, true);
+ vboSet.enableBuffer(gl, false);
+ vboSetList.add(vboSet);
+ vboSet = vboSet.regenerate();
+ }
+ }
+
+ public void glVertexv(Buffer v) {
+ vboSet.glVertexv(v);
+ }
+ public void glNormalv(Buffer v) {
+ vboSet.glNormalv(v);
+ }
+ public void glColorv(Buffer v) {
+ vboSet.glColorv(v);
+ }
+ public void glTexCoordv(Buffer v) {
+ vboSet.glTexCoordv(v);
+ }
+
+ public final void glVertex2f(float x, float y) {
+ vboSet.glVertex2f(x,y);
+ }
+
+ public final void glVertex3f(float x, float y, float z) {
+ vboSet.glVertex3f(x,y,z);
+ }
+
+ public final void glNormal3f(float x, float y, float z) {
+ vboSet.glNormal3f(x,y,z);
+ }
+
+ public final void glColor3f(float x, float y, float z) {
+ vboSet.glColor3f(x,y,z);
+ }
+
+ public final void glColor4f(float x, float y, float z, float a) {
+ vboSet.glColor4f(x,y,z, a);
+ }
+
+ public final void glTexCoord2f(float x, float y) {
+ vboSet.glTexCoord2f(x,y);
+ }
+
+ public final void glTexCoord3f(float x, float y, float z) {
+ vboSet.glTexCoord3f(x,y,z);
+ }
+
+ public final void glVertex2s(short x, short y) {
+ vboSet.glVertex2s(x,y);
+ }
+
+ public final void glVertex3s(short x, short y, short z) {
+ vboSet.glVertex3s(x,y,z);
+ }
+
+ public final void glNormal3s(short x, short y, short z) {
+ vboSet.glNormal3s(x,y,z);
+ }
+
+ public final void glColor3s(short x, short y, short z) {
+ vboSet.glColor3s(x,y,z);
+ }
+
+ public final void glColor4s(short x, short y, short z, short a) {
+ vboSet.glColor4s(x,y,z,a);
+ }
+
+ public final void glTexCoord2s(short x, short y) {
+ vboSet.glTexCoord2s(x,y);
+ }
+
+ public final void glTexCoord3s(short x, short y, short z) {
+ vboSet.glTexCoord3s(x,y,z);
+ }
+
+ public final void glVertex2b(byte x, byte y) {
+ vboSet.glVertex2b(x,y);
+ }
+
+ public final void glVertex3b(byte x, byte y, byte z) {
+ vboSet.glVertex3b(x,y,z);
+ }
+
+ public final void glNormal3b(byte x, byte y, byte z) {
+ vboSet.glNormal3b(x,y,z);
+ }
+
+ public final void glColor3b(byte x, byte y, byte z) {
+ vboSet.glColor3b(x,y,z);
+ }
+
+ public final void glColor4b(byte x, byte y, byte z, byte a) {
+ vboSet.glColor4b(x,y,z,a);
+ }
+
+ public final void glTexCoord2b(byte x, byte y) {
+ vboSet.glTexCoord2b(x,y);
+ }
+
+ public final void glTexCoord3b(byte x, byte y, byte z) {
+ vboSet.glTexCoord3b(x,y,z);
+ }
+
+ protected ImmModeSink(GL gl, int glBufferUsage, int initialSize,
+ int vComps, int vDataType,
+ int cComps, int cDataType,
+ int nComps, int nDataType,
+ int tComps, int tDataType, boolean useGLSL) {
+ if(useGLSL && !gl.hasGLSL()) {
+ throw new GLException("ImmModeSink GLSL usage not supported: "+gl);
+ }
+ vboSet = new VBOSet(gl, glBufferUsage, initialSize,
+ vComps, vDataType, cComps, cDataType, nComps, nDataType, tComps, tDataType, useGLSL);
+ this.vboSetList = new ArrayList();
+ }
+
+ private void destroyList(GL gl) {
+ for(Iterator i=vboSetList.iterator(); i.hasNext() ; ) {
+ ((VBOSet)i.next()).destroy(gl);
+ }
+ vboSetList.clear();
+ }
+
+ private VBOSet vboSet;
+ private ArrayList vboSetList;
+ private static boolean vboUsage = true;
+
+ protected static class VBOSet {
+ protected VBOSet (GL gl, int glBufferUsage, int initialSize,
+ int vComps, int vDataType,
+ int cComps, int cDataType,
+ int nComps, int nDataType,
+ int tComps, int tDataType, boolean useGLSL) {
+ this.gl=gl;
+ this.glBufferUsage=glBufferUsage;
+ this.initialSize=initialSize;
+ this.vDataType=vDataType;
+ this.vComps=vComps;
+ this.cDataType=cDataType;
+ this.cComps=cComps;
+ this.nDataType=nDataType;
+ this.nComps=nComps;
+ this.tDataType=tDataType;
+ this.tComps=tComps;
+ this.useGLSL=useGLSL;
+
+ allocateBuffer(initialSize);
+ rewind();
+
+ this.sealed=false;
+ this.sealedGL=false;
+ this.mode = -1;
+ this.modeOrig = -1;
+ this.bufferEnabled=false;
+ this.bufferWritten=false;
+ }
+
+ protected final VBOSet regenerate() {
+ return new VBOSet(gl, glBufferUsage, initialSize,
+ vComps, vDataType, cComps, cDataType, nComps, nDataType, tComps, tDataType, useGLSL);
+ }
+
+ protected void checkSeal(boolean test) throws GLException {
+ if(mode<0) {
+ throw new GLException("No mode set yet, call glBegin(mode) first:\n\t"+this);
+ }
+ if(sealed!=test) {
+ if(test) {
+ throw new GLException("Not Sealed yet, call glEnd() first:\n\t"+this);
+ } else {
+ throw new GLException("Already Sealed, can't modify VBO after glEnd():\n\t"+this);
+ }
+ }
+ }
+
+ protected void draw(GL gl, Buffer indices, boolean disableBufferAfterDraw, int i)
+ {
+ if(DEBUG_DRAW) {
+ Exception e = new Exception("ImmModeSink.draw["+i+"](disableBufferAfterDraw: "+disableBufferAfterDraw+"):\n\t"+this);
+ e.printStackTrace();
+ }
+ enableBuffer(gl, true);
+
+ if (buffer!=null) {
+ GL2ES1 glf = gl.getGL2ES1();
+
+ if(null==indices) {
+ glf.glDrawArrays(mode, 0, count);
+ } else {
+ Class clazz = indices.getClass();
+ int type=-1;
+ if(NWReflection.instanceOf(clazz, ByteBuffer.class.getName())) {
+ type = GL.GL_UNSIGNED_BYTE;
+ } else if(NWReflection.instanceOf(clazz, ShortBuffer.class.getName())) {
+ type = GL.GL_UNSIGNED_SHORT;
+ }
+ if(0>type) {
+ throw new GLException("Given Buffer Class not supported: "+clazz+", should be ubyte or ushort:\n\t"+this);
+ }
+ glf.glDrawElements(mode, indices.remaining(), type, indices);
+ // GL2: gl.glDrawRangeElements(mode, 0, indices.remaining()-1, indices.remaining(), type, indices);
+ }
+ }
+
+ if(disableBufferAfterDraw) {
+ enableBuffer(gl, false);
+ }
+ }
+
+ public void glVertexv(Buffer v) {
+ checkSeal(false);
+ BufferUtil.put(vertexArray, v);
+ }
+ public void glNormalv(Buffer v) {
+ checkSeal(false);
+ BufferUtil.put(normalArray, v);
+ }
+ public void glColorv(Buffer v) {
+ checkSeal(false);
+ BufferUtil.put(colorArray, v);
+ }
+ public void glTexCoordv(Buffer v) {
+ checkSeal(false);
+ BufferUtil.put(textCoordArray, v);
+ }
+
+ public void glVertex2b(byte x, byte y) {
+ checkSeal(false);
+ growBufferIfNecessary(VERTEX, 2);
+ if(vComps>0)
+ BufferUtil.putb(vertexArray, x);
+ if(vComps>1)
+ BufferUtil.putb(vertexArray, y);
+ padding(VERTEX, vComps-2);
+ }
+ public void glVertex3b(byte x, byte y, byte z) {
+ checkSeal(false);
+ growBufferIfNecessary(VERTEX, 3);
+ if(vComps>0)
+ BufferUtil.putb(vertexArray, x);
+ if(vComps>1)
+ BufferUtil.putb(vertexArray, y);
+ if(vComps>2)
+ BufferUtil.putb(vertexArray, z);
+ padding(VERTEX, vComps-3);
+ }
+ public void glVertex2s(short x, short y) {
+ checkSeal(false);
+ growBufferIfNecessary(VERTEX, 2);
+ if(vComps>0)
+ BufferUtil.puts(vertexArray, x);
+ if(vComps>1)
+ BufferUtil.puts(vertexArray, y);
+ padding(VERTEX, vComps-2);
+ }
+ public void glVertex3s(short x, short y, short z) {
+ checkSeal(false);
+ growBufferIfNecessary(VERTEX, 3);
+ if(vComps>0)
+ BufferUtil.puts(vertexArray, x);
+ if(vComps>1)
+ BufferUtil.puts(vertexArray, y);
+ if(vComps>2)
+ BufferUtil.puts(vertexArray, z);
+ padding(VERTEX, vComps-3);
+ }
+ public void glVertex2f(float x, float y) {
+ checkSeal(false);
+ growBufferIfNecessary(VERTEX, 2);
+ if(vComps>0)
+ BufferUtil.putf(vertexArray, x);
+ if(vComps>1)
+ BufferUtil.putf(vertexArray, y);
+ padding(VERTEX, vComps-2);
+ }
+ public void glVertex3f(float x, float y, float z) {
+ checkSeal(false);
+ growBufferIfNecessary(VERTEX, 3);
+ if(vComps>0)
+ BufferUtil.putf(vertexArray, x);
+ if(vComps>1)
+ BufferUtil.putf(vertexArray, y);
+ if(vComps>2)
+ BufferUtil.putf(vertexArray, z);
+ padding(VERTEX, vComps-3);
+ }
+
+ public void glNormal3b(byte x, byte y, byte z) {
+ checkSeal(false);
+ growBufferIfNecessary(NORMAL, 3);
+ if(nComps>0)
+ BufferUtil.putb(normalArray, x);
+ if(nComps>1)
+ BufferUtil.putb(normalArray, y);
+ if(nComps>2)
+ BufferUtil.putb(normalArray, z);
+ padding(NORMAL, nComps-3);
+ }
+ public void glNormal3s(short x, short y, short z) {
+ checkSeal(false);
+ growBufferIfNecessary(NORMAL, 3);
+ if(nComps>0)
+ BufferUtil.puts(normalArray, x);
+ if(nComps>1)
+ BufferUtil.puts(normalArray, y);
+ if(nComps>2)
+ BufferUtil.puts(normalArray, z);
+ padding(NORMAL, nComps-3);
+ }
+ public void glNormal3f(float x, float y, float z) {
+ checkSeal(false);
+ growBufferIfNecessary(NORMAL, 3);
+ if(nComps>0)
+ BufferUtil.putf(normalArray, x);
+ if(nComps>1)
+ BufferUtil.putf(normalArray, y);
+ if(nComps>2)
+ BufferUtil.putf(normalArray, z);
+ padding(NORMAL, nComps-3);
+ }
+
+ public void glColor3b(byte r, byte g, byte b) {
+ checkSeal(false);
+ growBufferIfNecessary(COLOR, 3);
+ if(cComps>0)
+ BufferUtil.putb(colorArray, r);
+ if(cComps>1)
+ BufferUtil.putb(colorArray, g);
+ if(cComps>2)
+ BufferUtil.putb(colorArray, b);
+ padding(COLOR, cComps-3);
+ }
+ public void glColor4b(byte r, byte g, byte b, byte a) {
+ checkSeal(false);
+ growBufferIfNecessary(COLOR, 4);
+ if(cComps>0)
+ BufferUtil.putb(colorArray, r);
+ if(cComps>1)
+ BufferUtil.putb(colorArray, g);
+ if(cComps>2)
+ BufferUtil.putb(colorArray, b);
+ if(cComps>3)
+ BufferUtil.putb(colorArray, a);
+ padding(COLOR, cComps-4);
+ }
+ public void glColor3s(short r, short g, short b) {
+ checkSeal(false);
+ growBufferIfNecessary(COLOR, 3);
+ if(cComps>0)
+ BufferUtil.puts(colorArray, r);
+ if(cComps>1)
+ BufferUtil.puts(colorArray, g);
+ if(cComps>2)
+ BufferUtil.puts(colorArray, b);
+ padding(COLOR, cComps-3);
+ }
+ public void glColor4s(short r, short g, short b, short a) {
+ checkSeal(false);
+ growBufferIfNecessary(COLOR, 4);
+ if(cComps>0)
+ BufferUtil.puts(colorArray, r);
+ if(cComps>1)
+ BufferUtil.puts(colorArray, g);
+ if(cComps>2)
+ BufferUtil.puts(colorArray, b);
+ if(cComps>3)
+ BufferUtil.puts(colorArray, a);
+ padding(COLOR, cComps-4);
+ }
+ public void glColor3f(float r, float g, float b) {
+ checkSeal(false);
+ growBufferIfNecessary(COLOR, 3);
+ if(cComps>0)
+ BufferUtil.putf(colorArray, r);
+ if(cComps>1)
+ BufferUtil.putf(colorArray, g);
+ if(cComps>2)
+ BufferUtil.putf(colorArray, b);
+ padding(COLOR, cComps-3);
+ }
+ public void glColor4f(float r, float g, float b, float a) {
+ checkSeal(false);
+ growBufferIfNecessary(COLOR, 4);
+ if(cComps>0)
+ BufferUtil.putf(colorArray, r);
+ if(cComps>1)
+ BufferUtil.putf(colorArray, g);
+ if(cComps>2)
+ BufferUtil.putf(colorArray, b);
+ if(cComps>3)
+ BufferUtil.putf(colorArray, a);
+ padding(COLOR, cComps-4);
+ }
+
+ public void glTexCoord2b(byte x, byte y) {
+ checkSeal(false);
+ growBufferIfNecessary(TEXTCOORD, 2);
+ if(tComps>0)
+ BufferUtil.putb(textCoordArray, x);
+ if(tComps>1)
+ BufferUtil.putb(textCoordArray, y);
+ padding(TEXTCOORD, tComps-2);
+ }
+ public void glTexCoord3b(byte x, byte y, byte z) {
+ checkSeal(false);
+ growBufferIfNecessary(TEXTCOORD, 3);
+ if(tComps>0)
+ BufferUtil.putb(textCoordArray, x);
+ if(tComps>1)
+ BufferUtil.putb(textCoordArray, y);
+ if(tComps>2)
+ BufferUtil.putb(textCoordArray, z);
+ padding(TEXTCOORD, tComps-3);
+ }
+ public void glTexCoord2s(short x, short y) {
+ checkSeal(false);
+ growBufferIfNecessary(TEXTCOORD, 2);
+ if(tComps>0)
+ BufferUtil.puts(textCoordArray, x);
+ if(tComps>1)
+ BufferUtil.puts(textCoordArray, y);
+ padding(TEXTCOORD, tComps-2);
+ }
+ public void glTexCoord3s(short x, short y, short z) {
+ checkSeal(false);
+ growBufferIfNecessary(TEXTCOORD, 3);
+ if(tComps>0)
+ BufferUtil.puts(textCoordArray, x);
+ if(tComps>1)
+ BufferUtil.puts(textCoordArray, y);
+ if(tComps>2)
+ BufferUtil.puts(textCoordArray, z);
+ padding(TEXTCOORD, tComps-3);
+ }
+ public void glTexCoord2f(float x, float y) {
+ checkSeal(false);
+ growBufferIfNecessary(TEXTCOORD, 2);
+ if(tComps>0)
+ BufferUtil.putf(textCoordArray, x);
+ if(tComps>1)
+ BufferUtil.putf(textCoordArray, y);
+ padding(TEXTCOORD, tComps-2);
+ }
+ public void glTexCoord3f(float x, float y, float z) {
+ checkSeal(false);
+ growBufferIfNecessary(TEXTCOORD, 3);
+ if(tComps>0)
+ BufferUtil.putf(textCoordArray, x);
+ if(tComps>1)
+ BufferUtil.putf(textCoordArray, y);
+ if(tComps>2)
+ BufferUtil.putf(textCoordArray, z);
+ padding(TEXTCOORD, tComps-3);
+ }
+
+ public void rewind() {
+ if(null!=vertexArray) {
+ vertexArray.rewind();
+ }
+ if(null!=colorArray) {
+ colorArray.rewind();
+ }
+ if(null!=normalArray) {
+ normalArray.rewind();
+ }
+ if(null!=textCoordArray) {
+ textCoordArray.rewind();
+ }
+ }
+
+ public void destroy(GL gl) {
+ reset(gl);
+
+ vertexArray=null; colorArray=null; normalArray=null; textCoordArray=null;
+ vArrayData=null; cArrayData=null; nArrayData=null; tArrayData=null;
+ buffer=null;
+ bSize=0; count=0;
+ }
+
+ public void reset(GL gl) {
+ enableBuffer(gl, false);
+ reset();
+ }
+
+ public void reset() {
+ if(buffer!=null) {
+ buffer.clear();
+ }
+ rewind();
+
+ this.mode = -1;
+ this.modeOrig = -1;
+ this.sealed=false;
+ this.bufferEnabled=false;
+ this.bufferWritten=false;
+ }
+
+ public void seal(GL glObj, boolean seal)
+ {
+ seal(seal);
+ if(sealedGL==seal) return;
+ sealedGL = seal;
+ GL gl = glObj.getGL();
+ if(seal) {
+ if(vboUsage && vboName==0) {
+ int[] tmp = new int[1];
+ gl.glGenBuffers(1, tmp, 0);
+ vboName = tmp[0];
+ }
+ if(null!=vArrayData)
+ vArrayData.setVBOName(vboName);
+ if(null!=cArrayData)
+ cArrayData.setVBOName(vboName);
+ if(null!=nArrayData)
+ nArrayData.setVBOName(vboName);
+ if(null!=tArrayData)
+ tArrayData.setVBOName(vboName);
+ enableBuffer(gl, true);
+ } else {
+ enableBuffer(gl, false);
+ }
+ }
+
+ public void seal(boolean seal)
+ {
+ if(sealed==seal) return;
+ sealed = seal;
+ if(seal) {
+ bufferWritten=false;
+ }
+ }
+
+ public void enableBuffer(GL gl, boolean enable) {
+ /* if(enableBufferAlways && enable) {
+ bufferEnabled = false;
+ } */
+ if( bufferEnabled != enable && count>0 ) {
+ if(enable) {
+ checkSeal(true);
+ }
+ if(useGLSL) {
+ enableBufferGLSL(gl, enable);
+ } else {
+ enableBufferFixed(gl, enable);
+ }
+ bufferEnabled = enable;
+ }
+ }
+
+ public void enableBufferFixed(GL gl, boolean enable) {
+ GL2ES1 glf = gl.getGL2ES1();
+
+ if(enable) {
+ gl.glBindBuffer(GL.GL_ARRAY_BUFFER, vboName);
+
+ if(!bufferWritten) {
+ gl.glBufferData(GL.GL_ARRAY_BUFFER, buffer.limit(), buffer, GL.GL_STATIC_DRAW);
+ bufferWritten=true;
+ }
+
+ if(vComps>0) {
+ glf.glEnableClientState(glf.GL_VERTEX_ARRAY);
+ glf.glVertexPointer(vArrayData);
+ }
+ if(cComps>0) {
+ glf.glEnableClientState(glf.GL_COLOR_ARRAY);
+ glf.glColorPointer(cArrayData);
+ }
+ if(nComps>0) {
+ glf.glEnableClientState(glf.GL_NORMAL_ARRAY);
+ glf.glNormalPointer(nArrayData);
+ }
+ if(tComps>0) {
+ glf.glEnableClientState(glf.GL_TEXTURE_COORD_ARRAY);
+ glf.glTexCoordPointer(tArrayData);
+ }
+
+ gl.glBindBuffer(GL.GL_ARRAY_BUFFER, 0);
+ } else {
+ if(vComps>0) {
+ glf.glDisableClientState(glf.GL_VERTEX_ARRAY);
+ }
+ if(cComps>0) {
+ glf.glDisableClientState(glf.GL_COLOR_ARRAY);
+ }
+ if(nComps>0) {
+ glf.glDisableClientState(glf.GL_NORMAL_ARRAY);
+ }
+ if(tComps>0) {
+ glf.glDisableClientState(glf.GL_TEXTURE_COORD_ARRAY);
+ }
+ }
+ }
+
+ public void enableBufferGLSL(GL gl, boolean enable) {
+ GL2ES2 glsl = gl.getGL2ES2();
+ com.jogamp.opengl.util.glsl.ShaderState st = com.jogamp.opengl.util.glsl.ShaderState.getCurrent();
+ if(null==st) {
+ throw new GLException("No ShaderState current");
+ }
+
+ if(enable) {
+ glsl.glBindBuffer(GL.GL_ARRAY_BUFFER, vboName);
+
+ if(!bufferWritten) {
+ glsl.glBufferData(GL.GL_ARRAY_BUFFER, buffer.limit(), buffer, GL.GL_STATIC_DRAW);
+ bufferWritten=true;
+ }
+
+ if(vComps>0) {
+ st.glEnableVertexAttribArray(glsl, vArrayData.getName());
+ st.glVertexAttribPointer(glsl, vArrayData);
+ }
+ if(cComps>0) {
+ st.glEnableVertexAttribArray(glsl, cArrayData.getName());
+ st.glVertexAttribPointer(glsl, cArrayData);
+ }
+ if(nComps>0) {
+ st.glEnableVertexAttribArray(glsl, nArrayData.getName());
+ st.glVertexAttribPointer(glsl, nArrayData);
+ }
+ if(tComps>0) {
+ st.glEnableVertexAttribArray(glsl, tArrayData.getName());
+ st.glVertexAttribPointer(glsl, tArrayData);
+ }
+
+ glsl.glBindBuffer(GL.GL_ARRAY_BUFFER, 0);
+ } else {
+ if(vComps>0) {
+ st.glDisableVertexAttribArray(glsl, vArrayData.getName());
+ }
+ if(cComps>0) {
+ st.glDisableVertexAttribArray(glsl, cArrayData.getName());
+ }
+ if(nComps>0) {
+ st.glDisableVertexAttribArray(glsl, nArrayData.getName());
+ }
+ if(tComps>0) {
+ st.glDisableVertexAttribArray(glsl, tArrayData.getName());
+ }
+ }
+ }
+
+ public String toString() {
+ return "VBOSet[mode "+mode+
+ ", modeOrig "+modeOrig+
+ ", sealed "+sealed+
+ ", bufferEnabled "+bufferEnabled+
+ ", bufferWritten "+bufferWritten+
+ ",\n\t"+vArrayData+
+ ",\n\t"+cArrayData+
+ ",\n\t"+nArrayData+
+ ",\n\t"+tArrayData+
+ "]";
+ }
+
+ // non public matters
+
+ protected void allocateBuffer(int elements) {
+ int vWidth = vComps * BufferUtil.sizeOfGLType(vDataType);
+ int cWidth = cComps * BufferUtil.sizeOfGLType(cDataType);
+ int nWidth = nComps * BufferUtil.sizeOfGLType(nDataType);
+ int tWidth = tComps * BufferUtil.sizeOfGLType(tDataType);
+
+ count = elements;
+ bSize = count * ( vWidth + cWidth + nWidth + tWidth ) ;
+
+ buffer = BufferUtil.newByteBuffer(bSize);
+
+ int pos = 0;
+ int size= count * vWidth ;
+ if(size>0) {
+ vertexArray = BufferUtil.sliceGLBuffer(buffer, pos, size, vDataType);
+ } else {
+ vertexArray = null;
+ }
+ vOffset = pos;
+ pos+=size;
+
+ size= count * cWidth ;
+ if(size>0) {
+ colorArray = BufferUtil.sliceGLBuffer(buffer, pos, size, cDataType);
+ } else {
+ colorArray = null;
+ }
+ cOffset = pos;
+ pos+=size;
+
+ size= count * nWidth ;
+ if(size>0) {
+ normalArray = BufferUtil.sliceGLBuffer(buffer, pos, size, nDataType);
+ } else {
+ normalArray = null;
+ }
+ nOffset = pos;
+ pos+=size;
+
+ size= count * tWidth ;
+ if(size>0) {
+ textCoordArray = BufferUtil.sliceGLBuffer(buffer, pos, size, tDataType);
+ } else {
+ textCoordArray = null;
+ }
+ tOffset = pos;
+ pos+=size;
+
+ buffer.position(pos);
+ buffer.flip();
+
+ if(vComps>0) {
+ vArrayData = GLArrayDataWrapper.createFixed(gl, GLPointerFunc.GL_VERTEX_ARRAY, vComps, vDataType, false,
+ 0, vertexArray, 0, vOffset);
+ } else {
+ vArrayData = null;
+ }
+ if(cComps>0) {
+ cArrayData = GLArrayDataWrapper.createFixed(gl, GLPointerFunc.GL_COLOR_ARRAY, cComps, cDataType, false,
+ 0, colorArray, 0, cOffset);
+ } else {
+ cArrayData = null;
+ }
+ if(nComps>0) {
+ nArrayData = GLArrayDataWrapper.createFixed(gl, GLPointerFunc.GL_NORMAL_ARRAY, nComps, nDataType, false,
+ 0, normalArray, 0, nOffset);
+ } else {
+ nArrayData = null;
+ }
+ if(tComps>0) {
+ tArrayData = GLArrayDataWrapper.createFixed(gl, GLPointerFunc.GL_TEXTURE_COORD_ARRAY, tComps, tDataType, false,
+ 0, textCoordArray, 0, tOffset);
+ } else {
+ tArrayData = null;
+ }
+
+ }
+
+ protected final boolean growBufferIfNecessary(int type, int spare) {
+ if(buffer==null || count < spare) {
+ growBuffer(type, initialSize);
+ return true;
+ }
+ return false;
+ }
+
+ protected final void growBuffer(int type, int additional) {
+ if(sealed || 0==additional) return;
+
+ // save olde values ..
+ Buffer _vertexArray=vertexArray, _colorArray=colorArray, _normalArray=normalArray, _textCoordArray=textCoordArray;
+ ByteBuffer _buffer = buffer;
+
+ allocateBuffer(count+additional);
+
+ if(null!=_vertexArray) {
+ _vertexArray.flip();
+ BufferUtil.put(vertexArray, _vertexArray);
+ }
+ if(null!=_colorArray) {
+ _colorArray.flip();
+ BufferUtil.put(colorArray, _colorArray);
+ }
+ if(null!=_normalArray) {
+ _normalArray.flip();
+ BufferUtil.put(normalArray, _normalArray);
+ }
+ if(null!=_textCoordArray) {
+ _textCoordArray.flip();
+ BufferUtil.put(textCoordArray, _textCoordArray);
+ }
+ }
+
+ protected void padding(int type, int fill) {
+ if ( sealed ) return;
+
+ Buffer dest = null;
+
+ switch (type) {
+ case VERTEX:
+ dest = vertexArray;
+ break;
+ case COLOR:
+ dest = colorArray;
+ break;
+ case NORMAL:
+ dest = normalArray;
+ break;
+ case TEXTCOORD:
+ dest = textCoordArray;
+ break;
+ }
+
+ if ( null==dest ) return;
+
+ while((fill--)>0) {
+ BufferUtil.putb(dest, (byte)0);
+ }
+ }
+
+ protected int mode, modeOrig;
+ protected int glBufferUsage, initialSize;
+
+ protected ByteBuffer buffer;
+ protected int bSize, count, vboName;
+
+ public static final int VERTEX = 0;
+ public static final int COLOR = 1;
+ public static final int NORMAL = 2;
+ public static final int TEXTCOORD = 3;
+
+ protected int vOffset, cOffset, nOffset, tOffset;
+ protected int vComps, cComps, nComps, tComps;
+ protected int vDataType, cDataType, nDataType, tDataType;
+ protected Buffer vertexArray, colorArray, normalArray, textCoordArray;
+ protected GLArrayDataWrapper vArrayData, cArrayData, nArrayData, tArrayData;
+
+ protected boolean sealed, sealedGL, useGLSL;
+ protected boolean bufferEnabled, bufferWritten;
+ protected GL gl;
+ }
+
+}
+
diff --git a/src/jogl/classes/com/jogamp/opengl/util/Locator.java b/src/jogl/classes/com/jogamp/opengl/util/Locator.java
new file mode 100644
index 000000000..c524c0888
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/Locator.java
@@ -0,0 +1,137 @@
+/*
+ * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.opengl.util;
+
+import java.util.*;
+import java.nio.*;
+import java.io.*;
+import java.net.*;
+
+/** Utilities for dealing with resources. */
+
+public class Locator {
+ private Locator() {}
+
+ /**
+ * Locates the resource using 'getResource(String path, ClassLoader cl)',
+ * with this context ClassLoader and the path as is,
+ * as well with the context's package name path plus the path.
+ *
+ * @see #getResource(String, ClassLoader)
+ */
+ public static URL getResource(Class context, String path) {
+ ClassLoader contextCL = (null!=context)?context.getClassLoader():null;
+ URL url = getResource(path, contextCL);
+ if (url == null && null!=context) {
+ // Try again by scoping the path within the class's package
+ String className = context.getName().replace('.', '/');
+ int lastSlash = className.lastIndexOf('/');
+ if (lastSlash >= 0) {
+ String tmpPath = className.substring(0, lastSlash + 1) + path;
+ url = getResource(tmpPath, contextCL);
+ }
+ }
+ return url;
+ }
+
+ /**
+ * Locates the resource using the ClassLoader's facility,
+ * the absolute URL and absolute file.
+ *
+ * @see ClassLoader#getResource(String)
+ * @see ClassLoader#getSystemResource(String)
+ * @see URL#URL(String)
+ * @see File#File(String)
+ */
+ public static URL getResource(String path, ClassLoader cl) {
+ URL url = null;
+ if (cl != null) {
+ url = cl.getResource(path);
+ } else {
+ url = ClassLoader.getSystemResource(path);
+ }
+ if(!urlExists(url)) {
+ url = null;
+ try {
+ url = new URL(path);
+ } catch (MalformedURLException e) { }
+ }
+ if(!urlExists(url)) {
+ url = null;
+ try {
+ File file = new File(path);
+ if(file.exists()) {
+ url = file.toURL();
+ }
+ } catch (MalformedURLException e) {}
+ }
+ return url;
+ }
+
+ /**
+ * Generates a path for the 'relativeFile' relative to the 'absoluteFileLocation'
+ */
+ public static String getRelativeOf(String absoluteFileLocation, String relativeFile) {
+ File file = new File(absoluteFileLocation);
+ file = file.getParentFile();
+ while (file != null && relativeFile.startsWith("../")) {
+ file = file.getParentFile();
+ relativeFile = relativeFile.substring(3);
+ }
+ if (file != null) {
+ String res = new File(file, relativeFile).getPath();
+ // Handle things on Windows
+ return res.replace('\\', '/');
+ } else {
+ return relativeFile;
+ }
+ }
+
+ /**
+ * Returns true, if the url exists,
+ * trying to open a connection.
+ */
+ public static boolean urlExists(URL url) {
+ boolean v = false;
+ if(null!=url) {
+ try {
+ URLConnection uc = url.openConnection();
+ v = true;
+ } catch (IOException ioe) { }
+ }
+ return v;
+ }
+
+}
+
diff --git a/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java b/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java
new file mode 100755
index 000000000..9cf41804f
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java
@@ -0,0 +1,685 @@
+/*
+ * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.opengl.util;
+
+import com.jogamp.opengl.impl.ProjectFloat;
+
+import java.nio.*;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.media.opengl.*;
+import javax.media.opengl.fixedfunc.GLMatrixFunc;
+
+public class PMVMatrix implements GLMatrixFunc {
+
+ public PMVMatrix() {
+ projectFloat = new ProjectFloat();
+
+ matrixIdent = BufferUtil.newFloatBuffer(1*16);
+ projectFloat.gluMakeIdentityf(matrixIdent);
+ matrixIdent.rewind();
+
+ // T Texture
+ // P Projection
+ // Mv ModelView
+ // Mvi Modelview-Inverse
+ // Mvit Modelview-Inverse-Transpose
+ // Pmv P * Mv
+ matrixTPMvMvitPmv = BufferUtil.newFloatBuffer(6*16); // grouping T + P + Mv + Mvi + Mvit + Pmv
+ matrixPMvMvitPmv = slice(matrixTPMvMvitPmv, 1*16, 5*16); // grouping P + Mv + Mvi + Mvit + Pmv
+ matrixT = slice(matrixTPMvMvitPmv, 0*16, 1*16); // T
+ matrixPMvMvit = slice(matrixTPMvMvitPmv, 1*16, 4*16); // grouping P + Mv + Mvi + Mvit
+ matrixPMvMvi = slice(matrixTPMvMvitPmv, 1*16, 3*16); // grouping P + Mv + Mvi
+ matrixPMv = slice(matrixTPMvMvitPmv, 1*16, 2*16); // grouping P + Mv
+ matrixP = slice(matrixTPMvMvitPmv, 1*16, 1*16); // P
+ matrixMv = slice(matrixTPMvMvitPmv, 2*16, 1*16); // Mv
+ matrixMvi = slice(matrixTPMvMvitPmv, 3*16, 1*16); // Mvi
+ matrixMvit = slice(matrixTPMvMvitPmv, 4*16, 1*16); // Mvit
+ matrixPmv = slice(matrixTPMvMvitPmv, 5*16, 1*16); // Pmv
+ matrixTPMvMvitPmv.rewind();
+
+ matrixMvit3 = BufferUtil.newFloatBuffer(3*3);
+
+ localBuf = BufferUtil.newFloatBuffer(6*16);
+
+ matrixMult=slice(localBuf, 0*16, 16);
+
+ matrixTrans=slice(localBuf, 1*16, 16);
+ projectFloat.gluMakeIdentityf(matrixTrans);
+
+ matrixRot=slice(localBuf, 2*16, 16);
+ projectFloat.gluMakeIdentityf(matrixRot);
+
+ matrixScale=slice(localBuf, 3*16, 16);
+ projectFloat.gluMakeIdentityf(matrixScale);
+
+ matrixOrtho=slice(localBuf, 4*16, 16);
+ projectFloat.gluMakeIdentityf(matrixOrtho);
+
+ matrixFrustum=slice(localBuf, 5*16, 16);
+ projectFloat.gluMakeZero(matrixFrustum);
+
+ vec3f=new float[3];
+
+ matrixPStack = new ArrayList();
+ matrixMvStack= new ArrayList();
+
+ // default values and mode
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ glMatrixMode(GL_MODELVIEW);
+ glLoadIdentity();
+ glMatrixMode(GL.GL_TEXTURE);
+ glLoadIdentity();
+ setDirty();
+ }
+
+ public void destroy() {
+ if(null!=projectFloat) {
+ projectFloat.destroy(); projectFloat=null;
+ }
+
+ if(null!=matrixIdent) {
+ matrixIdent.clear(); matrixIdent=null;
+ }
+ if(null!=matrixTPMvMvitPmv) {
+ matrixTPMvMvitPmv.clear(); matrixTPMvMvitPmv=null;
+ }
+ if(null!=matrixMvit3) {
+ matrixMvit3.clear(); matrixMvit3=null;
+ }
+ if(null!=localBuf) {
+ localBuf.clear(); localBuf=null;
+ }
+
+ if(null!=matrixPStack) {
+ matrixPStack.clear(); matrixPStack=null;
+ }
+ vec3f=null;
+ if(null!=matrixMvStack) {
+ matrixMvStack.clear(); matrixMvStack=null;
+ }
+ if(null!=matrixPStack) {
+ matrixPStack.clear(); matrixPStack=null;
+ }
+ if(null!=matrixTStack) {
+ matrixTStack.clear(); matrixTStack=null;
+ }
+
+ matrixTPMvMvitPmv=null; matrixPMvMvit=null; matrixPMvMvitPmv=null; matrixPMvMvi=null; matrixPMv=null;
+ matrixP=null; matrixT=null; matrixMv=null; matrixMvi=null; matrixMvit=null; matrixPmv=null;
+ matrixMult=null; matrixTrans=null; matrixRot=null; matrixScale=null; matrixOrtho=null; matrixFrustum=null;
+ }
+
+ private static FloatBuffer slice(FloatBuffer buf, int pos, int len) {
+ buf.position(pos);
+ buf.limit(pos + len);
+ return buf.slice();
+ }
+
+ public static final boolean isMatrixModeName(final int matrixModeName) {
+ switch(matrixModeName) {
+ case GL_MODELVIEW_MATRIX:
+ case GL_PROJECTION_MATRIX:
+ case GL_TEXTURE_MATRIX:
+ return true;
+ }
+ return false;
+ }
+
+ public static final int matrixModeName2MatrixGetName(final int matrixModeName) {
+ switch(matrixModeName) {
+ case GL_MODELVIEW:
+ return GL_MODELVIEW_MATRIX;
+ case GL_PROJECTION:
+ return GL_PROJECTION_MATRIX;
+ case GL.GL_TEXTURE:
+ return GL_TEXTURE_MATRIX;
+ default:
+ throw new GLException("unsupported matrixName: "+matrixModeName);
+ }
+ }
+
+ public static final boolean isMatrixGetName(final int matrixGetName) {
+ switch(matrixGetName) {
+ case GL_MATRIX_MODE:
+ case GL_MODELVIEW_MATRIX:
+ case GL_PROJECTION_MATRIX:
+ case GL_TEXTURE_MATRIX:
+ return true;
+ }
+ return false;
+ }
+
+ public static final int matrixGetName2MatrixModeName(final int matrixGetName) {
+ switch(matrixGetName) {
+ case GL_MODELVIEW_MATRIX:
+ return GL_MODELVIEW;
+ case GL_PROJECTION_MATRIX:
+ return GL_PROJECTION;
+ case GL_TEXTURE_MATRIX:
+ return GL.GL_TEXTURE;
+ default:
+ throw new GLException("unsupported matrixGetName: "+matrixGetName);
+ }
+ }
+
+ public void setDirty() {
+ modified = DIRTY_MODELVIEW | DIRTY_PROJECTION | DIRTY_TEXTURE ;
+ matrixMode = GL_MODELVIEW;
+ }
+
+ public int getDirtyBits() {
+ return modified;
+ }
+
+ public boolean isDirty(final int matrixName) {
+ boolean res;
+ switch(matrixName) {
+ case GL_MODELVIEW:
+ res = (modified&DIRTY_MODELVIEW)!=0 ;
+ break;
+ case GL_PROJECTION:
+ res = (modified&DIRTY_PROJECTION)!=0 ;
+ break;
+ case GL.GL_TEXTURE:
+ res = (modified&DIRTY_TEXTURE)!=0 ;
+ break;
+ default:
+ throw new GLException("unsupported matrixName: "+matrixName);
+ }
+ return res;
+ }
+
+ public boolean isDirty() {
+ return modified!=0;
+ }
+
+ public boolean update() {
+ // if(0==modified) return false;
+
+ // int res = modified;
+ int res = DIRTY_MODELVIEW | DIRTY_PROJECTION ;
+ if( (res&DIRTY_MODELVIEW)!=0 ) {
+ setMviMvit();
+ }
+ if( (res&DIRTY_MODELVIEW)!=0 || (res&DIRTY_PROJECTION)!=0 ) {
+ glMultMatrixf(matrixP, matrixMv, matrixPmv);
+ }
+ modified=0;
+ return res!=0;
+ }
+
+ public final int glGetMatrixMode() {
+ return matrixMode;
+ }
+
+ public final FloatBuffer glGetTMatrixf() {
+ return matrixT;
+ }
+
+ public final FloatBuffer glGetPMatrixf() {
+ return matrixP;
+ }
+
+ public final FloatBuffer glGetMvMatrixf() {
+ return matrixMv;
+ }
+
+ public final FloatBuffer glGetPMvMvitPmvMatrixf() {
+ return matrixPMvMvitPmv;
+ }
+
+ public final FloatBuffer glGetPMvMvitMatrixf() {
+ return matrixPMvMvit;
+ }
+
+ public final FloatBuffer glGetPMvMviMatrixf() {
+ return matrixPMvMvi;
+ }
+
+ public final FloatBuffer glGetPMvMatrixf() {
+ return matrixPMv;
+ }
+
+ public final FloatBuffer glGetMviMatrixf() {
+ return matrixMvi;
+ }
+
+ public final FloatBuffer glGetPmvMatrixf() {
+ return matrixPmv;
+ }
+
+ public final FloatBuffer glGetNormalMatrixf() {
+ return matrixMvit3;
+ }
+
+ /*
+ * @return the current matrix
+ */
+ public final FloatBuffer glGetMatrixf() {
+ return glGetMatrixf(matrixMode);
+ }
+
+ /**
+ * @param pname GL_MODELVIEW, GL_PROJECTION or GL.GL_TEXTURE
+ * @return the given matrix
+ */
+ public final FloatBuffer glGetMatrixf(final int matrixName) {
+ if(matrixName==GL_MODELVIEW) {
+ return matrixMv;
+ } else if(matrixName==GL_PROJECTION) {
+ return matrixP;
+ } else if(matrixName==GL.GL_TEXTURE) {
+ return matrixT;
+ } else {
+ throw new GLException("unsupported matrixName: "+matrixName);
+ }
+ }
+
+ public final void gluPerspective(final float fovy, final float aspect, final float zNear, final float zFar) {
+ float top=(float)Math.tan(fovy*((float)Math.PI)/360.0f)*zNear;
+ float bottom=-1.0f*top;
+ float left=aspect*bottom;
+ float right=aspect*top;
+ glFrustumf(left, right, bottom, top, zNear, zFar);
+ }
+
+ public static final void glMultMatrixf(final FloatBuffer a, final FloatBuffer b, FloatBuffer p) {
+ for (int i = 0; i < 4; i++) {
+ final float ai0=a.get(i+0*4), ai1=a.get(i+1*4), ai2=a.get(i+2*4), ai3=a.get(i+3*4);
+ p.put(i+0*4 , ai0 * b.get(0+0*4) + ai1 * b.get(1+0*4) + ai2 * b.get(2+0*4) + ai3 * b.get(3+0*4) );
+ p.put(i+1*4 , ai0 * b.get(0+1*4) + ai1 * b.get(1+1*4) + ai2 * b.get(2+1*4) + ai3 * b.get(3+1*4) );
+ p.put(i+2*4 , ai0 * b.get(0+2*4) + ai1 * b.get(1+2*4) + ai2 * b.get(2+2*4) + ai3 * b.get(3+2*4) );
+ p.put(i+3*4 , ai0 * b.get(0+3*4) + ai1 * b.get(1+3*4) + ai2 * b.get(2+3*4) + ai3 * b.get(3+3*4) );
+ }
+ }
+ public static final void glMultMatrixf(final FloatBuffer a, final float[] b, int b_off, FloatBuffer p) {
+ for (int i = 0; i < 4; i++) {
+ final float ai0=a.get(i+0*4), ai1=a.get(i+1*4), ai2=a.get(i+2*4), ai3=a.get(i+3*4);
+ p.put(i+0*4 , ai0 * b[b_off+0+0*4] + ai1 * b[b_off+1+0*4] + ai2 * b[b_off+2+0*4] + ai3 * b[b_off+3+0*4] );
+ p.put(i+1*4 , ai0 * b[b_off+0+1*4] + ai1 * b[b_off+1+1*4] + ai2 * b[b_off+2+1*4] + ai3 * b[b_off+3+1*4] );
+ p.put(i+2*4 , ai0 * b[b_off+0+2*4] + ai1 * b[b_off+1+2*4] + ai2 * b[b_off+2+2*4] + ai3 * b[b_off+3+2*4] );
+ p.put(i+3*4 , ai0 * b[b_off+0+3*4] + ai1 * b[b_off+1+3*4] + ai2 * b[b_off+2+3*4] + ai3 * b[b_off+3+3*4] );
+ }
+ }
+
+ //
+ // MatrixIf
+ //
+
+ public void glMatrixMode(final int matrixName) {
+ switch(matrixName) {
+ case GL_MODELVIEW:
+ case GL_PROJECTION:
+ case GL.GL_TEXTURE:
+ break;
+ default:
+ throw new GLException("unsupported matrixName: "+matrixName);
+ }
+ matrixMode = matrixName;
+ }
+
+ public void glGetFloatv(int matrixGetName, FloatBuffer params) {
+ int pos = params.position();
+ if(matrixGetName==GL_MATRIX_MODE) {
+ params.put((float)matrixMode);
+ } else {
+ FloatBuffer matrix = glGetMatrixf(matrixGetName2MatrixModeName(matrixGetName));
+ params.put(matrix);
+ matrix.rewind();
+ }
+ params.position(pos);
+ }
+ public void glGetFloatv(int matrixGetName, float[] params, int params_offset) {
+ if(matrixGetName==GL_MATRIX_MODE) {
+ params[params_offset]=(float)matrixMode;
+ } else {
+ FloatBuffer matrix = glGetMatrixf(matrixGetName2MatrixModeName(matrixGetName));
+ matrix.get(params, params_offset, 16);
+ matrix.rewind();
+ }
+ }
+ public void glGetIntegerv(int pname, IntBuffer params) {
+ int pos = params.position();
+ if(pname==GL_MATRIX_MODE) {
+ params.put(matrixMode);
+ } else {
+ throw new GLException("unsupported pname: "+pname);
+ }
+ params.position(pos);
+ }
+ public void glGetIntegerv(int pname, int[] params, int params_offset) {
+ if(pname==GL_MATRIX_MODE) {
+ params[params_offset]=matrixMode;
+ } else {
+ throw new GLException("unsupported pname: "+pname);
+ }
+ }
+
+ public final void glLoadMatrixf(final float[] values, final int offset) {
+ int len = values.length-offset;
+ if(matrixMode==GL_MODELVIEW) {
+ matrixMv.clear();
+ matrixMv.put(values, offset, len);
+ matrixMv.rewind();
+ modified |= DIRTY_MODELVIEW ;
+ } else if(matrixMode==GL_PROJECTION) {
+ matrixP.clear();
+ matrixP.put(values, offset, len);
+ matrixP.rewind();
+ modified |= DIRTY_PROJECTION ;
+ } else if(matrixMode==GL.GL_TEXTURE) {
+ matrixT.clear();
+ matrixT.put(values, offset, len);
+ matrixT.rewind();
+ modified |= DIRTY_TEXTURE ;
+ }
+ }
+
+ public final void glLoadMatrixf(java.nio.FloatBuffer m) {
+ int spos = m.position();
+ if(matrixMode==GL_MODELVIEW) {
+ matrixMv.clear();
+ matrixMv.put(m);
+ matrixMv.rewind();
+ modified |= DIRTY_MODELVIEW ;
+ } else if(matrixMode==GL_PROJECTION) {
+ matrixP.clear();
+ matrixP.put(m);
+ matrixP.rewind();
+ modified |= DIRTY_PROJECTION ;
+ } else if(matrixMode==GL.GL_TEXTURE) {
+ matrixT.clear();
+ matrixT.put(m);
+ matrixT.rewind();
+ modified |= DIRTY_TEXTURE ;
+ }
+ m.position(spos);
+ }
+
+ public final void glPopMatrix() {
+ float[] stackEntry=null;
+ if(matrixMode==GL_MODELVIEW) {
+ stackEntry = (float[])matrixMvStack.remove(0);
+ } else if(matrixMode==GL_PROJECTION) {
+ stackEntry = (float[])matrixPStack.remove(0);
+ } else if(matrixMode==GL.GL_TEXTURE) {
+ stackEntry = (float[])matrixTStack.remove(0);
+ }
+ glLoadMatrixf(stackEntry, 0);
+ }
+
+ public final void glPushMatrix() {
+ float[] stackEntry = new float[1*16];
+ if(matrixMode==GL_MODELVIEW) {
+ matrixMv.get(stackEntry);
+ matrixMv.rewind();
+ matrixMvStack.add(0, stackEntry);
+ } else if(matrixMode==GL_PROJECTION) {
+ matrixP.get(stackEntry);
+ matrixP.rewind();
+ matrixPStack.add(0, stackEntry);
+ } else if(matrixMode==GL.GL_TEXTURE) {
+ matrixT.get(stackEntry);
+ matrixT.rewind();
+ matrixTStack.add(0, stackEntry);
+ }
+ }
+
+ public final void glLoadIdentity() {
+ if(matrixMode==GL_MODELVIEW) {
+ matrixMv.clear();
+ matrixMv.put(matrixIdent);
+ matrixMv.rewind();
+ matrixIdent.rewind();
+ modified |= DIRTY_MODELVIEW ;
+ } else if(matrixMode==GL_PROJECTION) {
+ matrixP.clear();
+ matrixP.put(matrixIdent);
+ matrixP.rewind();
+ matrixIdent.rewind();
+ modified |= DIRTY_PROJECTION ;
+ } else if(matrixMode==GL.GL_TEXTURE) {
+ matrixT.clear();
+ matrixT.put(matrixIdent);
+ matrixT.rewind();
+ matrixIdent.rewind();
+ modified |= DIRTY_TEXTURE ;
+ }
+ }
+
+ public final void glMultMatrixf(final FloatBuffer m) {
+ if(matrixMode==GL_MODELVIEW) {
+ glMultMatrixf(matrixMv, m, matrixMult);
+ matrixMv.clear();
+ matrixMv.put(matrixMult);
+ matrixMv.rewind();
+ modified |= DIRTY_MODELVIEW ;
+ } else if(matrixMode==GL_PROJECTION) {
+ glMultMatrixf(matrixP, m, matrixMult);
+ matrixP.clear();
+ matrixP.put(matrixMult);
+ matrixP.rewind();
+ modified |= DIRTY_PROJECTION ;
+ } else if(matrixMode==GL.GL_TEXTURE) {
+ glMultMatrixf(matrixT, m, matrixMult);
+ matrixT.clear();
+ matrixT.put(matrixMult);
+ matrixT.rewind();
+ modified |= DIRTY_TEXTURE ;
+ }
+ matrixMult.rewind();
+ }
+
+ public void glMultMatrixf(float[] m, int m_offset) {
+ if(matrixMode==GL_MODELVIEW) {
+ glMultMatrixf(matrixMv, m, m_offset, matrixMult);
+ matrixMv.clear();
+ matrixMv.put(matrixMult);
+ matrixMv.rewind();
+ modified |= DIRTY_MODELVIEW ;
+ } else if(matrixMode==GL_PROJECTION) {
+ glMultMatrixf(matrixP, m, m_offset, matrixMult);
+ matrixP.clear();
+ matrixP.put(matrixMult);
+ matrixP.rewind();
+ modified |= DIRTY_PROJECTION ;
+ } else if(matrixMode==GL.GL_TEXTURE) {
+ glMultMatrixf(matrixT, m, m_offset, matrixMult);
+ matrixT.clear();
+ matrixT.put(matrixMult);
+ matrixT.rewind();
+ modified |= DIRTY_TEXTURE ;
+ }
+ matrixMult.rewind();
+ }
+
+ public final void glTranslatef(final float x, final float y, final float z) {
+ // Translation matrix:
+ // 1 0 0 x
+ // 0 1 0 y
+ // 0 0 1 z
+ // 0 0 0 1
+ matrixTrans.put(0+4*3, x);
+ matrixTrans.put(1+4*3, y);
+ matrixTrans.put(2+4*3, z);
+ glMultMatrixf(matrixTrans);
+ }
+
+ public final void glRotatef(final float angdeg, float x, float y, float z) {
+ float angrad = angdeg * (float) Math.PI / 180;
+ float c = (float)Math.cos(angrad);
+ float ic= 1.0f - c;
+ float s = (float)Math.sin(angrad);
+
+ vec3f[0]=x; vec3f[1]=y; vec3f[2]=z;
+ projectFloat.normalize(vec3f);
+ x = vec3f[0]; y = vec3f[1]; z = vec3f[2];
+
+ // Rotation matrix:
+ // xx(1−c)+c xy(1−c)+zs xz(1−c)-ys 0
+ // xy(1−c)-zs yy(1−c)+c yz(1−c)+xs 0
+ // xz(1−c)+ys yz(1−c)-xs zz(1−c)+c 0
+ // 0 0 0 1
+ float xy = x*y;
+ float xz = x*z;
+ float xs = x*s;
+ float ys = y*s;
+ float yz = y*z;
+ float zs = z*s;
+ matrixRot.put(0*4+0, x*x*ic+c);
+ matrixRot.put(0*4+1, xy*ic+zs);
+ matrixRot.put(0*4+2, xz*ic-ys);
+
+ matrixRot.put(1*4+0, xy*ic-zs);
+ matrixRot.put(1*4+1, y*y*ic+c);
+ matrixRot.put(1*4+2, yz*ic+xs);
+
+ matrixRot.put(2*4+0, xz*ic+ys);
+ matrixRot.put(2*4+1, yz*ic-xs);
+ matrixRot.put(2*4+2, z*z*ic+c);
+
+ glMultMatrixf(matrixRot);
+ }
+
+ public final void glScalef(final float x, final float y, final float z) {
+ // Scale matrix:
+ // x 0 0 0
+ // 0 y 0 0
+ // 0 0 z 0
+ // 0 0 0 1
+ matrixScale.put(0+4*0, x);
+ matrixScale.put(1+4*1, y);
+ matrixScale.put(2+4*2, z);
+
+ glMultMatrixf(matrixScale);
+ }
+
+ public final void glOrthof(final float left, final float right, final float bottom, final float top, final float zNear, final float zFar) {
+ // Ortho matrix:
+ // 2/dx 0 0 tx
+ // 0 2/dy 0 ty
+ // 0 0 2/dz tz
+ // 0 0 0 1
+ float dx=right-left;
+ float dy=top-bottom;
+ float dz=zFar-zNear;
+ float tx=-1.0f*(right+left)/dx;
+ float ty=-1.0f*(top+bottom)/dy;
+ float tz=-1.0f*(zFar+zNear)/dz;
+
+ matrixOrtho.put(0+4*0, 2.0f/dx);
+ matrixOrtho.put(1+4*1, 2.0f/dy);
+ matrixOrtho.put(2+4*2, -2.0f/dz);
+ matrixOrtho.put(0+4*3, tx);
+ matrixOrtho.put(1+4*3, ty);
+ matrixOrtho.put(2+4*3, tz);
+
+ glMultMatrixf(matrixOrtho);
+ }
+
+ public final void glFrustumf(final float left, final float right, final float bottom, final float top, final float zNear, final float zFar) {
+ if(zNear<=0.0f||zFar<0.0f) {
+ throw new GLException("GL_INVALID_VALUE: zNear and zFar must be positive, and zNear>0");
+ }
+ if(left==right || top==bottom) {
+ throw new GLException("GL_INVALID_VALUE: top,bottom and left,right must not be equal");
+ }
+ // Frustum matrix:
+ // 2*zNear/dx 0 A 0
+ // 0 2*zNear/dy B 0
+ // 0 0 C D
+ // 0 0 −1 0
+ float zNear2 = 2.0f*zNear;
+ float dx=right-left;
+ float dy=top-bottom;
+ float dz=zFar-zNear;
+ float A=(right+left)/dx;
+ float B=(top+bottom)/dy;
+ float C=-1.0f*(zFar+zNear)/dz;
+ float D=-2.0f*(zFar*zNear)/dz;
+
+ matrixFrustum.put(0+4*0, zNear2/dx);
+ matrixFrustum.put(1+4*1, zNear2/dy);
+ matrixFrustum.put(2+4*2, C);
+
+ matrixFrustum.put(0+4*2, A);
+ matrixFrustum.put(1+4*2, B);
+
+ matrixFrustum.put(2+4*3, D);
+ matrixFrustum.put(3+4*2, -1.0f);
+
+ glMultMatrixf(matrixFrustum);
+ }
+
+ //
+ // private
+ //
+
+ private final void setMviMvit() {
+ if(!projectFloat.gluInvertMatrixf(matrixMv, matrixMvi)) {
+ throw new GLException("Invalid source Mv matrix, can't compute inverse");
+ }
+
+ // transpose matrix
+ for (int i = 0; i < 4; i++) {
+ for (int j = 0; j < 4; j++) {
+ matrixMvit.put(j+i*4, matrixMvi.get(i+j*4));
+ }
+ }
+
+ // fetch 3x3
+ for (int i = 0; i < 3; i++) {
+ for (int j = 0; j < 3; j++) {
+ matrixMvit3.put(i+j*3, matrixMvit.get(i+j*4));
+ }
+ }
+ }
+
+ protected FloatBuffer matrixIdent;
+ protected FloatBuffer matrixTPMvMvitPmv, matrixPMvMvit, matrixPMvMvitPmv, matrixPMvMvi, matrixPMv, matrixP, matrixT, matrixMv, matrixMvi, matrixMvit, matrixPmv;
+ protected FloatBuffer matrixMvit3;
+ protected FloatBuffer localBuf, matrixMult, matrixTrans, matrixRot, matrixScale, matrixOrtho, matrixFrustum;
+ protected float[] vec3f;
+ protected List/*FloatBuffer*/ matrixTStack, matrixPStack, matrixMvStack;
+ protected int matrixMode = GL_MODELVIEW;
+ protected int modified = 0;
+ protected ProjectFloat projectFloat;
+
+ public static final int DIRTY_MODELVIEW = 1 << 0;
+ public static final int DIRTY_PROJECTION = 1 << 1;
+ public static final int DIRTY_TEXTURE = 1 << 2;
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/StreamUtil.java b/src/jogl/classes/com/jogamp/opengl/util/StreamUtil.java
new file mode 100755
index 000000000..294f86303
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/StreamUtil.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.util;
+
+import java.io.*;
+import java.nio.*;
+
+/** Utilities for dealing with streams. */
+
+public class StreamUtil {
+ private StreamUtil() {}
+
+ public static byte[] readAll2Array(InputStream stream) throws IOException {
+ BytesRead bytesRead = readAllImpl(stream);
+ byte[] data = bytesRead.data;
+ if (bytesRead.payloadLen != data.length) {
+ data = new byte[bytesRead.payloadLen];
+ System.arraycopy(bytesRead.data, 0, data, 0, bytesRead.payloadLen);
+ }
+ return data;
+ }
+
+ public static ByteBuffer readAll2Buffer(InputStream stream) throws IOException {
+ BytesRead bytesRead = readAllImpl(stream);
+ return BufferUtil.newByteBuffer(bytesRead.data, 0, bytesRead.payloadLen);
+ }
+
+ private static BytesRead readAllImpl(InputStream stream) throws IOException {
+ // FIXME: Shall we do this here ?
+ if( !(stream instanceof BufferedInputStream) ) {
+ stream = new BufferedInputStream(stream);
+ }
+ int avail = stream.available();
+ byte[] data = new byte[avail];
+ int numRead = 0;
+ int pos = 0;
+ do {
+ if (pos + avail > data.length) {
+ byte[] newData = new byte[pos + avail];
+ System.arraycopy(data, 0, newData, 0, pos);
+ data = newData;
+ }
+ numRead = stream.read(data, pos, avail);
+ if (numRead >= 0) {
+ pos += numRead;
+ }
+ avail = stream.available();
+ } while (avail > 0 && numRead >= 0);
+
+ return new BytesRead(pos, data);
+ }
+
+ private static class BytesRead {
+ BytesRead(int payloadLen, byte[] data) {
+ this.payloadLen=payloadLen;
+ this.data=data;
+ }
+ int payloadLen;
+ byte[] data;
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/TGAWriter.java b/src/jogl/classes/com/jogamp/opengl/util/TGAWriter.java
new file mode 100755
index 000000000..c53cafdcb
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/TGAWriter.java
@@ -0,0 +1,118 @@
+/*
+ * Copyright (c) 2005 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ */
+
+package com.jogamp.opengl.util;
+
+import java.io.*;
+import java.nio.*;
+import java.nio.channels.*;
+
+/**
+ * Utility class which helps take fast screenshots of OpenGL rendering
+ * results into Targa-format files. Used by the {@link
+ * com.jogamp.opengl.util.gl2.Screenshot Screenshot} class; can also be used
+ * in conjunction with the {@link com.jogamp.opengl.util.gl2.TileRenderer
+ * TileRenderer} class.
+ */
+
+public class TGAWriter {
+ private static final int TARGA_HEADER_SIZE = 18;
+
+ private FileChannel ch;
+ private ByteBuffer buf;
+
+ /** Constructor for the TGAWriter. */
+ public TGAWriter() {
+ }
+
+ /**
+ * Opens the specified Targa file for writing, overwriting any
+ * existing file, and sets up the header of the file expecting the
+ * data to be filled in before closing it.
+ *
+ * @param file the file to write containing the screenshot
+ * @param width the width of the current drawable
+ * @param height the height of the current drawable
+ * @param alpha whether the alpha channel should be saved. If true,
+ * requires GL_EXT_abgr extension to be present.
+ *
+ * @throws IOException if an I/O error occurred while writing the
+ * file
+ */
+ public void open(File file,
+ int width,
+ int height,
+ boolean alpha) throws IOException {
+ RandomAccessFile out = new RandomAccessFile(file, "rw");
+ ch = out.getChannel();
+ int pixelSize = (alpha ? 32 : 24);
+ int numChannels = (alpha ? 4 : 3);
+
+ int fileLength = TARGA_HEADER_SIZE + width * height * numChannels;
+ out.setLength(fileLength);
+ MappedByteBuffer image = ch.map(FileChannel.MapMode.READ_WRITE, 0, fileLength);
+
+ // write the TARGA header
+ image.put(0, (byte) 0).put(1, (byte) 0);
+ image.put(2, (byte) 2); // uncompressed type
+ image.put(12, (byte) (width & 0xFF)); // width
+ image.put(13, (byte) (width >> 8)); // width
+ image.put(14, (byte) (height & 0xFF)); // height
+ image.put(15, (byte) (height >> 8)); // height
+ image.put(16, (byte) pixelSize); // pixel size
+
+ // go to image data position
+ image.position(TARGA_HEADER_SIZE);
+ // jogl needs a sliced buffer
+ buf = image.slice();
+ }
+
+ /**
+ * Returns the ByteBuffer corresponding to the data for the image.
+ * This must be filled in with data in either BGR or BGRA format
+ * depending on whether an alpha channel was specified during
+ * open().
+ */
+ public ByteBuffer getImageData() {
+ return buf;
+ }
+
+ public void close() throws IOException {
+ // close the file channel
+ ch.close();
+ buf = null;
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/awt/ImageUtil.java b/src/jogl/classes/com/jogamp/opengl/util/awt/ImageUtil.java
new file mode 100755
index 000000000..a3139b16a
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/awt/ImageUtil.java
@@ -0,0 +1,127 @@
+/*
+ * Copyright (c) 2005 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.util.awt;
+
+import java.awt.*;
+import java.awt.image.*;
+
+/** Utilities for dealing with images. */
+
+public class ImageUtil {
+ private ImageUtil() {}
+
+ /** Flips the supplied BufferedImage vertically. This is often a
+ necessary conversion step to display a Java2D image correctly
+ with OpenGL and vice versa. */
+ public static void flipImageVertically(BufferedImage image) {
+ WritableRaster raster = image.getRaster();
+ Object scanline1 = null;
+ Object scanline2 = null;
+
+ for (int i = 0; i < image.getHeight() / 2; i++) {
+ scanline1 = raster.getDataElements(0, i, image.getWidth(), 1, scanline1);
+ scanline2 = raster.getDataElements(0, image.getHeight() - i - 1, image.getWidth(), 1, scanline2);
+ raster.setDataElements(0, i, image.getWidth(), 1, scanline2);
+ raster.setDataElements(0, image.getHeight() - i - 1, image.getWidth(), 1, scanline1);
+ }
+ }
+
+ /**
+ * Creates a
+ *
+ * No alpha channel is written with this variant.
+ *
+ * @param file the file to write containing the screenshot
+ * @param width the width of the current drawable
+ * @param height the height of the current drawable
+ *
+ * @throws GLException if an OpenGL context was not current or
+ * another OpenGL-related error occurred
+ * @throws IOException if an I/O error occurred while writing the
+ * file
+ */
+ public static void writeToTargaFile(File file,
+ int width,
+ int height) throws GLException, IOException {
+ writeToTargaFile(file, width, height, false);
+ }
+
+ /**
+ * Takes a fast screenshot of the current OpenGL drawable to a Targa
+ * file. Requires the OpenGL context for the desired drawable to be
+ * current. Takes the screenshot from the last assigned read buffer,
+ * or the OpenGL default read buffer if none has been specified by
+ * the user (GL_FRONT for single-buffered configurations and GL_BACK
+ * for double-buffered configurations). This is the fastest
+ * mechanism for taking a screenshot of an application. Contributed
+ * by Carsten Weisse of Bytonic Software (http://bytonic.de/).
+ *
+ * @param file the file to write containing the screenshot
+ * @param width the width of the current drawable
+ * @param height the height of the current drawable
+ * @param alpha whether the alpha channel should be saved. If true,
+ * requires GL_EXT_abgr extension to be present.
+ *
+ * @throws GLException if an OpenGL context was not current or
+ * another OpenGL-related error occurred
+ * @throws IOException if an I/O error occurred while writing the
+ * file
+ */
+ public static void writeToTargaFile(File file,
+ int width,
+ int height,
+ boolean alpha) throws GLException, IOException {
+ writeToTargaFile(file, 0, 0, width, height, alpha);
+ }
+
+ /**
+ * Takes a fast screenshot of the current OpenGL drawable to a Targa
+ * file. Requires the OpenGL context for the desired drawable to be
+ * current. Takes the screenshot from the last assigned read buffer,
+ * or the OpenGL default read buffer if none has been specified by
+ * the user (GL_FRONT for single-buffered configurations and GL_BACK
+ * for double-buffered configurations). This is the fastest
+ * mechanism for taking a screenshot of an application. Contributed
+ * by Carsten Weisse of Bytonic Software (http://bytonic.de/).
+ *
+ * @param file the file to write containing the screenshot
+ * @param x the starting x coordinate of the screenshot, measured from the lower-left
+ * @param y the starting y coordinate of the screenshot, measured from the lower-left
+ * @param width the width of the desired screenshot area
+ * @param height the height of the desired screenshot area
+ * @param alpha whether the alpha channel should be saved. If true,
+ * requires GL_EXT_abgr extension to be present.
+ *
+ * @throws GLException if an OpenGL context was not current or
+ * another OpenGL-related error occurred
+ * @throws IOException if an I/O error occurred while writing the
+ * file
+ */
+ public static void writeToTargaFile(File file,
+ int x,
+ int y,
+ int width,
+ int height,
+ boolean alpha) throws GLException, IOException {
+ if (alpha) {
+ checkExtABGR();
+ }
+
+ TGAWriter writer = new TGAWriter();
+ writer.open(file, width, height, alpha);
+ ByteBuffer bgr = writer.getImageData();
+
+ GL2 gl = GLUgl2.getCurrentGL2();
+
+ // Set up pixel storage modes
+ PixelStorageModes psm = new PixelStorageModes();
+ psm.save(gl);
+
+ int readbackType = (alpha ? GL2.GL_ABGR_EXT : GL2.GL_BGR);
+
+ // read the BGR values into the image buffer
+ gl.glReadPixels(x, y, width, height, readbackType,
+ GL2.GL_UNSIGNED_BYTE, bgr);
+
+ // Restore pixel storage modes
+ psm.restore(gl);
+
+ // close the file
+ writer.close();
+ }
+
+ /**
+ * Takes a screenshot of the current OpenGL drawable to a
+ * BufferedImage. Requires the OpenGL context for the desired
+ * drawable to be current. Takes the screenshot from the last
+ * assigned read buffer, or the OpenGL default read buffer if none
+ * has been specified by the user (GL_FRONT for single-buffered
+ * configurations and GL_BACK for double-buffered configurations).
+ * Note that the scanlines of the resulting image are flipped
+ * vertically in order to correctly match the OpenGL contents, which
+ * takes time and is therefore not as fast as the Targa screenshot
+ * function.
+ *
+ * No alpha channel is read back with this variant.
+ *
+ * @param width the width of the current drawable
+ * @param height the height of the current drawable
+ *
+ * @throws GLException if an OpenGL context was not current or
+ * another OpenGL-related error occurred
+ */
+ public static BufferedImage readToBufferedImage(int width,
+ int height) throws GLException {
+ return readToBufferedImage(width, height, false);
+ }
+
+ /**
+ * Takes a screenshot of the current OpenGL drawable to a
+ * BufferedImage. Requires the OpenGL context for the desired
+ * drawable to be current. Takes the screenshot from the last
+ * assigned read buffer, or the OpenGL default read buffer if none
+ * has been specified by the user (GL_FRONT for single-buffered
+ * configurations and GL_BACK for double-buffered configurations).
+ * Note that the scanlines of the resulting image are flipped
+ * vertically in order to correctly match the OpenGL contents, which
+ * takes time and is therefore not as fast as the Targa screenshot
+ * function.
+ *
+ * @param width the width of the current drawable
+ * @param height the height of the current drawable
+ * @param alpha whether the alpha channel should be read back. If
+ * true, requires GL_EXT_abgr extension to be present.
+ *
+ * @throws GLException if an OpenGL context was not current or
+ * another OpenGL-related error occurred
+ */
+ public static BufferedImage readToBufferedImage(int width,
+ int height,
+ boolean alpha) throws GLException {
+ return readToBufferedImage(0, 0, width, height, alpha);
+ }
+
+ /**
+ * Takes a screenshot of the current OpenGL drawable to a
+ * BufferedImage. Requires the OpenGL context for the desired
+ * drawable to be current. Takes the screenshot from the last
+ * assigned read buffer, or the OpenGL default read buffer if none
+ * has been specified by the user (GL_FRONT for single-buffered
+ * configurations and GL_BACK for double-buffered configurations).
+ * Note that the scanlines of the resulting image are flipped
+ * vertically in order to correctly match the OpenGL contents, which
+ * takes time and is therefore not as fast as the Targa screenshot
+ * function.
+ *
+ * @param x the starting x coordinate of the screenshot, measured from the lower-left
+ * @param y the starting y coordinate of the screenshot, measured from the lower-left
+ * @param width the width of the desired screenshot area
+ * @param height the height of the desired screenshot area
+ * @param alpha whether the alpha channel should be read back. If
+ * true, requires GL_EXT_abgr extension to be present.
+ *
+ * @throws GLException if an OpenGL context was not current or
+ * another OpenGL-related error occurred
+ */
+ public static BufferedImage readToBufferedImage(int x,
+ int y,
+ int width,
+ int height,
+ boolean alpha) throws GLException {
+ int bufImgType = (alpha ? BufferedImage.TYPE_4BYTE_ABGR : BufferedImage.TYPE_3BYTE_BGR);
+ int readbackType = (alpha ? GL2.GL_ABGR_EXT : GL2.GL_BGR);
+
+ if (alpha) {
+ checkExtABGR();
+ }
+
+ // Allocate necessary storage
+ BufferedImage image = new BufferedImage(width, height, bufImgType);
+
+ GL2 gl = GLUgl2.getCurrentGL2();
+
+ // Set up pixel storage modes
+ PixelStorageModes psm = new PixelStorageModes();
+ psm.save(gl);
+
+ // read the BGR values into the image
+ gl.glReadPixels(x, y, width, height, readbackType,
+ GL2.GL_UNSIGNED_BYTE,
+ ByteBuffer.wrap(((DataBufferByte) image.getRaster().getDataBuffer()).getData()));
+
+ // Restore pixel storage modes
+ psm.restore(gl);
+
+ // Must flip BufferedImage vertically for correct results
+ ImageUtil.flipImageVertically(image);
+ return image;
+ }
+
+ /**
+ * Takes a screenshot of the current OpenGL drawable to the
+ * specified file on disk using the ImageIO package. Requires the
+ * OpenGL context for the desired drawable to be current. Takes the
+ * screenshot from the last assigned read buffer, or the OpenGL
+ * default read buffer if none has been specified by the user
+ * (GL_FRONT for single-buffered configurations and GL_BACK for
+ * double-buffered configurations). This is not the fastest
+ * mechanism for taking a screenshot but may be more convenient than
+ * others for getting images for consumption by other packages. The
+ * file format is inferred from the suffix of the given file.
+ *
+ * No alpha channel is saved with this variant.
+ *
+ * @param file the file to write containing the screenshot
+ * @param width the width of the current drawable
+ * @param height the height of the current drawable
+ *
+ * @throws GLException if an OpenGL context was not current or
+ * another OpenGL-related error occurred
+ *
+ * @throws IOException if an I/O error occurred or if the file could
+ * not be written to disk due to the requested file format being
+ * unsupported by ImageIO
+ */
+ public static void writeToFile(File file,
+ int width,
+ int height) throws IOException, GLException {
+ writeToFile(file, width, height, false);
+ }
+
+ /**
+ * Takes a screenshot of the current OpenGL drawable to the
+ * specified file on disk using the ImageIO package. Requires the
+ * OpenGL context for the desired drawable to be current. Takes the
+ * screenshot from the last assigned read buffer, or the OpenGL
+ * default read buffer if none has been specified by the user
+ * (GL_FRONT for single-buffered configurations and GL_BACK for
+ * double-buffered configurations). This is not the fastest
+ * mechanism for taking a screenshot but may be more convenient than
+ * others for getting images for consumption by other packages. The
+ * file format is inferred from the suffix of the given file.
+ *
+ * Note that some file formats, in particular JPEG, can not handle
+ * an alpha channel properly. If the "alpha" argument is specified
+ * as true for such a file format it will be silently ignored.
+ *
+ * @param file the file to write containing the screenshot
+ * @param width the width of the current drawable
+ * @param height the height of the current drawable
+ * @param alpha whether an alpha channel should be saved. If true,
+ * requires GL_EXT_abgr extension to be present.
+ *
+ * @throws GLException if an OpenGL context was not current or
+ * another OpenGL-related error occurred
+ *
+ * @throws IOException if an I/O error occurred or if the file could
+ * not be written to disk due to the requested file format being
+ * unsupported by ImageIO
+ */
+ public static void writeToFile(File file,
+ int width,
+ int height,
+ boolean alpha) throws IOException, GLException {
+ writeToFile(file, 0, 0, width, height, alpha);
+ }
+
+ /**
+ * Takes a screenshot of the current OpenGL drawable to the
+ * specified file on disk using the ImageIO package. Requires the
+ * OpenGL context for the desired drawable to be current. Takes the
+ * screenshot from the last assigned read buffer, or the OpenGL
+ * default read buffer if none has been specified by the user
+ * (GL_FRONT for single-buffered configurations and GL_BACK for
+ * double-buffered configurations). This is not the fastest
+ * mechanism for taking a screenshot but may be more convenient than
+ * others for getting images for consumption by other packages. The
+ * file format is inferred from the suffix of the given file.
+ *
+ * Note that some file formats, in particular JPEG, can not handle
+ * an alpha channel properly. If the "alpha" argument is specified
+ * as true for such a file format it will be silently ignored.
+ *
+ * @param file the file to write containing the screenshot
+ * @param x the starting x coordinate of the screenshot, measured from the lower-left
+ * @param y the starting y coordinate of the screenshot, measured from the lower-left
+ * @param width the width of the current drawable
+ * @param height the height of the current drawable
+ * @param alpha whether an alpha channel should be saved. If true,
+ * requires GL_EXT_abgr extension to be present.
+ *
+ * @throws GLException if an OpenGL context was not current or
+ * another OpenGL-related error occurred
+ *
+ * @throws IOException if an I/O error occurred or if the file could
+ * not be written to disk due to the requested file format being
+ * unsupported by ImageIO
+ */
+ public static void writeToFile(File file,
+ int x,
+ int y,
+ int width,
+ int height,
+ boolean alpha) throws IOException, GLException {
+ String fileSuffix = FileUtil.getFileSuffix(file);
+ if (alpha && (fileSuffix.equals("jpg") || fileSuffix.equals("jpeg"))) {
+ // JPEGs can't deal properly with alpha channels
+ alpha = false;
+ }
+
+ BufferedImage image = readToBufferedImage(x, y, width, height, alpha);
+ if (!ImageIO.write(image, fileSuffix, file)) {
+ throw new IOException("Unsupported file format " + fileSuffix);
+ }
+ }
+
+ private static int glGetInteger(GL2 gl, int pname, int[] tmp) {
+ gl.glGetIntegerv(pname, tmp, 0);
+ return tmp[0];
+ }
+
+ private static void checkExtABGR() {
+ GL2 gl = GLUgl2.getCurrentGL2();
+ if (!gl.isExtensionAvailable("GL_EXT_abgr")) {
+ throw new IllegalArgumentException("Saving alpha channel requires GL_EXT_abgr");
+ }
+ }
+
+ static class PixelStorageModes {
+ int packAlignment;
+ int packRowLength;
+ int packSkipRows;
+ int packSkipPixels;
+ int packSwapBytes;
+ int[] tmp = new int[1];
+
+ void save(GL2 gl) {
+ packAlignment = glGetInteger(gl, GL2.GL_PACK_ALIGNMENT, tmp);
+ packRowLength = glGetInteger(gl, GL2.GL_PACK_ROW_LENGTH, tmp);
+ packSkipRows = glGetInteger(gl, GL2.GL_PACK_SKIP_ROWS, tmp);
+ packSkipPixels = glGetInteger(gl, GL2.GL_PACK_SKIP_PIXELS, tmp);
+ packSwapBytes = glGetInteger(gl, GL2.GL_PACK_SWAP_BYTES, tmp);
+
+ gl.glPixelStorei(GL2.GL_PACK_ALIGNMENT, 1);
+ gl.glPixelStorei(GL2.GL_PACK_ROW_LENGTH, 0);
+ gl.glPixelStorei(GL2.GL_PACK_SKIP_ROWS, 0);
+ gl.glPixelStorei(GL2.GL_PACK_SKIP_PIXELS, 0);
+ gl.glPixelStorei(GL2.GL_PACK_SWAP_BYTES, 0);
+ }
+
+ void restore(GL2 gl) {
+ gl.glPixelStorei(GL2.GL_PACK_ALIGNMENT, packAlignment);
+ gl.glPixelStorei(GL2.GL_PACK_ROW_LENGTH, packRowLength);
+ gl.glPixelStorei(GL2.GL_PACK_SKIP_ROWS, packSkipRows);
+ gl.glPixelStorei(GL2.GL_PACK_SKIP_PIXELS, packSkipPixels);
+ gl.glPixelStorei(GL2.GL_PACK_SWAP_BYTES, packSwapBytes);
+ }
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java b/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java
new file mode 100755
index 000000000..1fbdade4e
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java
@@ -0,0 +1,1951 @@
+/*
+ * Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+package com.jogamp.opengl.util.awt;
+
+import com.jogamp.opengl.impl.Debug;
+import com.jogamp.opengl.util.*;
+import com.jogamp.opengl.util.packrect.*;
+import com.jogamp.opengl.util.texture.*;
+import com.jogamp.opengl.util.texture.awt.*;
+
+import java.awt.AlphaComposite;
+import java.awt.Color;
+import java.awt.Composite;
+
+// For debugging purposes
+import java.awt.EventQueue;
+import java.awt.Font;
+import java.awt.Frame;
+import java.awt.Graphics2D;
+import java.awt.Image;
+import java.awt.Point;
+import java.awt.RenderingHints;
+import java.awt.event.*;
+import java.awt.font.*;
+import java.awt.geom.*;
+
+import java.nio.*;
+
+import java.text.*;
+
+import java.util.*;
+
+import javax.media.opengl.*;
+import javax.media.opengl.glu.*;
+import javax.media.opengl.glu.gl2.*;
+import javax.media.opengl.awt.*;
+
+
+/** Renders bitmapped Java 2D text into an OpenGL window with high
+ performance, full Unicode support, and a simple API. Performs
+ appropriate caching of text rendering results in an OpenGL texture
+ internally to avoid repeated font rasterization. The caching is
+ completely automatic, does not require any user intervention, and
+ has no visible controls in the public API.
+
+ Using the {@link TextRenderer TextRenderer} is simple. Add a
+ " In the {@link javax.media.opengl.GLEventListener#display display} method of your
+ {@link javax.media.opengl.GLEventListener GLEventListener}, add:
+
+
+ Note that the TextRenderer may cause the vertex and texture
+ coordinate array buffer bindings to change, or to be unbound. This
+ is important to note if you are using Vertex Buffer Objects (VBOs)
+ in your application.
+
+ Internally, the renderer uses a rectangle packing algorithm to
+ pack both glyphs and full Strings' rendering results (which are
+ variable size) onto a larger OpenGL texture. The internal backing
+ store is maintained using a {@link
+ com.jogamp.opengl.util.awt.TextureRenderer TextureRenderer}. A least
+ recently used (LRU) algorithm is used to discard previously
+ rendered strings; the specific algorithm is undefined, but is
+ currently implemented by flushing unused Strings' rendering
+ results every few hundred rendering cycles, where a rendering
+ cycle is defined as a pair of calls to {@link #beginRendering
+ beginRendering} / {@link #endRendering endRendering}.
+
+ @author John Burkey
+ @author Kenneth Russell
+*/
+public class TextRenderer {
+ private static final boolean DEBUG = Debug.debug("TextRenderer");
+
+ // These are occasionally useful for more in-depth debugging
+ private static final boolean DISABLE_GLYPH_CACHE = false;
+ private static final boolean DRAW_BBOXES = false;
+
+ static final int kSize = 256;
+
+ // Every certain number of render cycles, flush the strings which
+ // haven't been used recently
+ private static final int CYCLES_PER_FLUSH = 100;
+
+ // The amount of vertical dead space on the backing store before we
+ // force a compaction
+ private static final float MAX_VERTICAL_FRAGMENTATION = 0.7f;
+ static final int kQuadsPerBuffer = 100;
+ static final int kCoordsPerVertVerts = 3;
+ static final int kCoordsPerVertTex = 2;
+ static final int kVertsPerQuad = 4;
+ static final int kTotalBufferSizeVerts = kQuadsPerBuffer * kVertsPerQuad;
+ static final int kTotalBufferSizeCoordsVerts = kQuadsPerBuffer * kVertsPerQuad * kCoordsPerVertVerts;
+ static final int kTotalBufferSizeCoordsTex = kQuadsPerBuffer * kVertsPerQuad * kCoordsPerVertTex;
+ static final int kTotalBufferSizeBytesVerts = kTotalBufferSizeCoordsVerts * 4;
+ static final int kTotalBufferSizeBytesTex = kTotalBufferSizeCoordsTex * 4;
+ static final int kSizeInBytes_OneVertices_VertexData = kCoordsPerVertVerts * 4;
+ static final int kSizeInBytes_OneVertices_TexData = kCoordsPerVertTex * 4;
+ private Font font;
+ private boolean antialiased;
+ private boolean useFractionalMetrics;
+
+ // Whether we're attempting to use automatic mipmap generation support
+ private boolean mipmap;
+ private RectanglePacker packer;
+ private boolean haveMaxSize;
+ private RenderDelegate renderDelegate;
+ private TextureRenderer cachedBackingStore;
+ private Graphics2D cachedGraphics;
+ private FontRenderContext cachedFontRenderContext;
+ private Map /*
+
+ Glyphs need to be able to re-upload themselves to the backing
+ store on demand as we go along in the render sequence.
+ */
+
+ class Glyph {
+ // If this Glyph represents an individual unicode glyph, this
+ // is its unicode ID. If it represents a String, this is -1.
+ private int unicodeID;
+ // If the above field isn't -1, then these fields are used.
+ // The glyph code in the font
+ private int glyphCode;
+ // The GlyphProducer which created us
+ private GlyphProducer producer;
+ // The advance of this glyph
+ private float advance;
+ // The GlyphVector for this single character; this is passed
+ // in during construction but cleared during the upload
+ // process
+ private GlyphVector singleUnicodeGlyphVector;
+ // The rectangle of this glyph on the backing store, or null
+ // if it has been cleared due to space pressure
+ private Rect glyphRectForTextureMapping;
+ // If this Glyph represents a String, this is the sequence of
+ // characters
+ private String str;
+ // Whether we need a valid advance when rendering this string
+ // (i.e., whether it has other single glyphs coming after it)
+ private boolean needAdvance;
+
+ // Creates a Glyph representing an individual Unicode character
+ public Glyph(int unicodeID,
+ int glyphCode,
+ float advance,
+ GlyphVector singleUnicodeGlyphVector,
+ GlyphProducer producer) {
+ this.unicodeID = unicodeID;
+ this.glyphCode = glyphCode;
+ this.advance = advance;
+ this.singleUnicodeGlyphVector = singleUnicodeGlyphVector;
+ this.producer = producer;
+ }
+
+ // Creates a Glyph representing a sequence of characters, with
+ // an indication of whether additional single glyphs are being
+ // rendered after it
+ public Glyph(String str, boolean needAdvance) {
+ this.str = str;
+ this.needAdvance = needAdvance;
+ }
+
+ /** Returns this glyph's unicode ID */
+ public int getUnicodeID() {
+ return unicodeID;
+ }
+
+ /** Returns this glyph's (font-specific) glyph code */
+ public int getGlyphCode() {
+ return glyphCode;
+ }
+
+ /** Returns the advance for this glyph */
+ public float getAdvance() {
+ return advance;
+ }
+
+ /** Draws this glyph and returns the (x) advance for this glyph */
+ public float draw3D(float inX, float inY, float z, float scaleFactor) {
+ if (str != null) {
+ draw3D_ROBUST(str, inX, inY, z, scaleFactor);
+ if (!needAdvance) {
+ return 0;
+ }
+ // Compute and return the advance for this string
+ GlyphVector gv = font.createGlyphVector(getFontRenderContext(), str);
+ float totalAdvance = 0;
+ for (int i = 0; i < gv.getNumGlyphs(); i++) {
+ totalAdvance += gv.getGlyphMetrics(i).getAdvance();
+ }
+ return totalAdvance;
+ }
+
+ // This is the code path taken for individual glyphs
+ if (glyphRectForTextureMapping == null) {
+ upload();
+ }
+
+ try {
+ if (mPipelinedQuadRenderer == null) {
+ mPipelinedQuadRenderer = new Pipelined_QuadRenderer();
+ }
+
+ TextureRenderer renderer = getBackingStore();
+ // Handles case where NPOT texture is used for backing store
+ TextureCoords wholeImageTexCoords = renderer.getTexture().getImageTexCoords();
+ float xScale = wholeImageTexCoords.right();
+ float yScale = wholeImageTexCoords.bottom();
+
+ Rect rect = glyphRectForTextureMapping;
+ TextData data = (TextData) rect.getUserData();
+ data.markUsed();
+
+ Rectangle2D origRect = data.origRect();
+
+ float x = inX - (scaleFactor * data.origOriginX());
+ float y = inY - (scaleFactor * ((float) origRect.getHeight() - data.origOriginY()));
+
+ int texturex = rect.x() + (data.origin().x - data.origOriginX());
+ int texturey = renderer.getHeight() - rect.y() - (int) origRect.getHeight() -
+ (data.origin().y - data.origOriginY());
+ int width = (int) origRect.getWidth();
+ int height = (int) origRect.getHeight();
+
+ float tx1 = xScale * (float) texturex / (float) renderer.getWidth();
+ float ty1 = yScale * (1.0f -
+ ((float) texturey / (float) renderer.getHeight()));
+ float tx2 = xScale * (float) (texturex + width) / (float) renderer.getWidth();
+ float ty2 = yScale * (1.0f -
+ ((float) (texturey + height) / (float) renderer.getHeight()));
+
+ mPipelinedQuadRenderer.glTexCoord2f(tx1, ty1);
+ mPipelinedQuadRenderer.glVertex3f(x, y, z);
+ mPipelinedQuadRenderer.glTexCoord2f(tx2, ty1);
+ mPipelinedQuadRenderer.glVertex3f(x + (width * scaleFactor), y,
+ z);
+ mPipelinedQuadRenderer.glTexCoord2f(tx2, ty2);
+ mPipelinedQuadRenderer.glVertex3f(x + (width * scaleFactor),
+ y + (height * scaleFactor), z);
+ mPipelinedQuadRenderer.glTexCoord2f(tx1, ty2);
+ mPipelinedQuadRenderer.glVertex3f(x,
+ y + (height * scaleFactor), z);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return advance;
+ }
+
+ /** Notifies this glyph that it's been cleared out of the cache */
+ public void clear() {
+ glyphRectForTextureMapping = null;
+ }
+
+ private void upload() {
+ GlyphVector gv = getGlyphVector();
+ Rectangle2D origBBox = preNormalize(renderDelegate.getBounds(gv, getFontRenderContext()));
+ Rectangle2D bbox = normalize(origBBox);
+ Point origin = new Point((int) -bbox.getMinX(),
+ (int) -bbox.getMinY());
+ Rect rect = new Rect(0, 0, (int) bbox.getWidth(),
+ (int) bbox.getHeight(),
+ new TextData(null, origin, origBBox, unicodeID));
+ packer.add(rect);
+ glyphRectForTextureMapping = rect;
+ Graphics2D g = getGraphics2D();
+ // OK, should now have an (x, y) for this rectangle; rasterize
+ // the glyph
+ int strx = rect.x() + origin.x;
+ int stry = rect.y() + origin.y;
+
+ // Clear out the area we're going to draw into
+ g.setComposite(AlphaComposite.Clear);
+ g.fillRect(rect.x(), rect.y(), rect.w(), rect.h());
+ g.setComposite(AlphaComposite.Src);
+
+ // Draw the string
+ renderDelegate.drawGlyphVector(g, gv, strx, stry);
+
+ if (DRAW_BBOXES) {
+ TextData data = (TextData) rect.getUserData();
+ // Draw a bounding box on the backing store
+ g.drawRect(strx - data.origOriginX(),
+ stry - data.origOriginY(),
+ (int) data.origRect().getWidth(),
+ (int) data.origRect().getHeight());
+ g.drawRect(strx - data.origin().x,
+ stry - data.origin().y,
+ rect.w(),
+ rect.h());
+ }
+
+ // Mark this region of the TextureRenderer as dirty
+ getBackingStore().markDirty(rect.x(), rect.y(), rect.w(),
+ rect.h());
+ // Re-register ourselves with our producer
+ producer.register(this);
+ }
+
+ private GlyphVector getGlyphVector() {
+ GlyphVector gv = singleUnicodeGlyphVector;
+ if (gv != null) {
+ singleUnicodeGlyphVector = null; // Don't need this anymore
+ return gv;
+ }
+ singleUnicode[0] = (char) unicodeID;
+ return font.createGlyphVector(getFontRenderContext(), singleUnicode);
+ }
+ }
+
+ class GlyphProducer {
+ final int undefined = -2;
+ FontRenderContext fontRenderContext;
+ List/*
+
+ Each component ranges from 0.0f - 1.0f. The alpha component, if
+ used, does not need to be premultiplied into the color channels
+ as described in the documentation for {@link
+ com.jogamp.opengl.util.texture.Texture Texture}, although
+ premultiplied colors are used internally. The default color is
+ opaque white.
+
+ @param r the red component of the new color
+ @param g the green component of the new color
+ @param b the blue component of the new color
+ @param a the alpha component of the new color, 0.0f = completely
+ transparent, 1.0f = completely opaque
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void setColor(float r, float g, float b, float a) throws GLException {
+ GL2 gl = GLContext.getCurrentGL().getGL2();
+ this.r = r * a;
+ this.g = g * a;
+ this.b = b * a;
+ this.a = a;
+
+ gl.glColor4f(this.r, this.g, this.b, this.a);
+ }
+
+ private float[] compArray;
+ /** Changes the current color of this TextureRenderer to the
+ supplied one. The default color is opaque white. See {@link
+ #setColor(float,float,float,float) setColor} for more details.
+
+ @param color the new color to use for rendering
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void setColor(Color color) throws GLException {
+ // Get color's RGBA components as floats in the range [0,1].
+ if (compArray == null) {
+ compArray = new float[4];
+ }
+ color.getRGBComponents(compArray);
+ setColor(compArray[0], compArray[1], compArray[2], compArray[3]);
+ }
+
+ /** Draws an orthographically projected rectangle containing all of
+ the underlying texture to the specified location on the
+ screen. All (x, y) coordinates are specified relative to the
+ lower left corner of either the texture image or the current
+ OpenGL drawable. This method is equivalent to
+
+
+ Copyright (c) Mark J. Kilgard, 1994, 1997.
+
+ (c) Copyright 1993, Silicon Graphics, Inc.
+
+ ALL RIGHTS RESERVED
+
+ Permission to use, copy, modify, and distribute this software
+ for any purpose and without fee is hereby granted, provided
+ that the above copyright notice appear in all copies and that
+ both the copyright notice and this permission notice appear in
+ supporting documentation, and that the name of Silicon
+ Graphics, Inc. not be used in advertising or publicity
+ pertaining to distribution of the software without specific,
+ written prior permission.
+
+ THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU
+ "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR
+ OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
+ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO
+ EVENT SHALL SILICON GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE
+ ELSE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT OR
+ CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER,
+ INCLUDING WITHOUT LIMITATION, LOSS OF PROFIT, LOSS OF USE,
+ SAVINGS OR REVENUE, OR THE CLAIMS OF THIRD PARTIES, WHETHER OR
+ NOT SILICON GRAPHICS, INC. HAS BEEN ADVISED OF THE POSSIBILITY
+ OF SUCH LOSS, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ ARISING OUT OF OR IN CONNECTION WITH THE POSSESSION, USE OR
+ PERFORMANCE OF THIS SOFTWARE.
+
+ US Government Users Restricted Rights
+
+ Use, duplication, or disclosure by the Government is subject to
+ restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
+ (c)(1)(ii) of the Rights in Technical Data and Computer
+ Software clause at DFARS 252.227-7013 and/or in similar or
+ successor clauses in the FAR or the DOD or NASA FAR
+ Supplement. Unpublished-- rights reserved under the copyright
+ laws of the United States. Contractor/manufacturer is Silicon
+ Graphics, Inc., 2011 N. Shoreline Blvd., Mountain View, CA
+ 94039-7311.
+
+ OpenGL(TM) is a trademark of Silicon Graphics, Inc.
+*/
+
+public class GLUT {
+ public static final int STROKE_ROMAN = 0;
+ public static final int STROKE_MONO_ROMAN = 1;
+ public static final int BITMAP_9_BY_15 = 2;
+ public static final int BITMAP_8_BY_13 = 3;
+ public static final int BITMAP_TIMES_ROMAN_10 = 4;
+ public static final int BITMAP_TIMES_ROMAN_24 = 5;
+ public static final int BITMAP_HELVETICA_10 = 6;
+ public static final int BITMAP_HELVETICA_12 = 7;
+ public static final int BITMAP_HELVETICA_18 = 8;
+
+ private GLUgl2 glu = new GLUgl2();
+
+ //----------------------------------------------------------------------
+ // Shapes
+ //
+
+ public void glutWireSphere(double radius, int slices, int stacks) {
+ quadObjInit(glu);
+ glu.gluQuadricDrawStyle(quadObj, GLU.GLU_LINE);
+ glu.gluQuadricNormals(quadObj, GLU.GLU_SMOOTH);
+ /* If we ever changed/used the texture or orientation state
+ of quadObj, we'd need to change it to the defaults here
+ with gluQuadricTexture and/or gluQuadricOrientation. */
+ glu.gluSphere(quadObj, radius, slices, stacks);
+ }
+
+ public void glutSolidSphere(double radius, int slices, int stacks) {
+ quadObjInit(glu);
+ glu.gluQuadricDrawStyle(quadObj, GLU.GLU_FILL);
+ glu.gluQuadricNormals(quadObj, GLU.GLU_SMOOTH);
+ /* If we ever changed/used the texture or orientation state
+ of quadObj, we'd need to change it to the defaults here
+ with gluQuadricTexture and/or gluQuadricOrientation. */
+ glu.gluSphere(quadObj, radius, slices, stacks);
+ }
+
+ public void glutWireCone(double base, double height,
+ int slices, int stacks) {
+ quadObjInit(glu);
+ glu.gluQuadricDrawStyle(quadObj, GLU.GLU_LINE);
+ glu.gluQuadricNormals(quadObj, GLU.GLU_SMOOTH);
+ /* If we ever changed/used the texture or orientation state
+ of quadObj, we'd need to change it to the defaults here
+ with gluQuadricTexture and/or gluQuadricOrientation. */
+ glu.gluCylinder(quadObj, base, 0.0, height, slices, stacks);
+ }
+
+ public void glutSolidCone(double base, double height,
+ int slices, int stacks) {
+ quadObjInit(glu);
+ glu.gluQuadricDrawStyle(quadObj, GLU.GLU_FILL);
+ glu.gluQuadricNormals(quadObj, GLU.GLU_SMOOTH);
+ /* If we ever changed/used the texture or orientation state
+ of quadObj, we'd need to change it to the defaults here
+ with gluQuadricTexture and/or gluQuadricOrientation. */
+ glu.gluCylinder(quadObj, base, 0.0, height, slices, stacks);
+ }
+
+ public void glutWireCylinder(double radius, double height, int slices, int stacks) {
+ quadObjInit(glu);
+ glu.gluQuadricDrawStyle(quadObj, GLU.GLU_LINE);
+ glu.gluQuadricNormals(quadObj, GLU.GLU_SMOOTH);
+ /* If we ever changed/used the texture or orientation state
+ of quadObj, we'd need to change it to the defaults here
+ with gluQuadricTexture and/or gluQuadricOrientation. */
+ glu.gluCylinder(quadObj, radius, radius, height, slices, stacks);
+ }
+
+ public void glutSolidCylinder(double radius, double height, int slices, int stacks) {
+ GL2 gl = GLUgl2.getCurrentGL2();
+
+ // Prepare table of points for drawing end caps
+ double [] x = new double[slices];
+ double [] y = new double[slices];
+ double angleDelta = Math.PI * 2 / slices;
+ double angle = 0;
+ for (int i = 0 ; i < slices ; i ++) {
+ angle = i * angleDelta;
+ x[i] = Math.cos(angle) * radius;
+ y[i] = Math.sin(angle) * radius;
+ }
+
+ // Draw bottom cap
+ gl.glBegin(GL2.GL_TRIANGLE_FAN);
+ gl.glNormal3d(0,0,-1);
+ gl.glVertex3d(0,0,0);
+ for (int i = 0 ; i < slices ; i ++) {
+ gl.glVertex3d(x[i], y[i], 0);
+ }
+ gl.glVertex3d(x[0], y[0], 0);
+ gl.glEnd();
+
+ // Draw top cap
+ gl.glBegin(GL2.GL_TRIANGLE_FAN);
+ gl.glNormal3d(0,0,1);
+ gl.glVertex3d(0,0,height);
+ for (int i = 0 ; i < slices ; i ++) {
+ gl.glVertex3d(x[i], y[i], height);
+ }
+ gl.glVertex3d(x[0], y[0], height);
+ gl.glEnd();
+
+ // Draw walls
+ quadObjInit(glu);
+ glu.gluQuadricDrawStyle(quadObj, GLU.GLU_FILL);
+ glu.gluQuadricNormals(quadObj, GLU.GLU_SMOOTH);
+ /* If we ever changed/used the texture or orientation state
+ of quadObj, we'd need to change it to the defaults here
+ with gluQuadricTexture and/or gluQuadricOrientation. */
+ glu.gluCylinder(quadObj, radius, radius, height, slices, stacks);
+ }
+
+ public void glutWireCube(float size) {
+ drawBox(GLUgl2.getCurrentGL2(), size, GL2.GL_LINE_LOOP);
+ }
+
+ public void glutSolidCube(float size) {
+ drawBox(GLUgl2.getCurrentGL2(), size, GL2.GL_QUADS);
+ }
+
+ public void glutWireTorus(double innerRadius, double outerRadius,
+ int nsides, int rings) {
+ GL2 gl = GLUgl2.getCurrentGL2();
+ gl.glPushAttrib(GL2.GL_POLYGON_BIT);
+ gl.glPolygonMode(GL2.GL_FRONT_AND_BACK, GL2.GL_LINE);
+ doughnut(gl, innerRadius, outerRadius, nsides, rings);
+ gl.glPopAttrib();
+ }
+
+ public void glutSolidTorus(double innerRadius, double outerRadius,
+ int nsides, int rings) {
+ doughnut(GLUgl2.getCurrentGL2(), innerRadius, outerRadius, nsides, rings);
+ }
+
+ public void glutWireDodecahedron() {
+ dodecahedron(GLUgl2.getCurrentGL2(), GL2.GL_LINE_LOOP);
+ }
+
+ public void glutSolidDodecahedron() {
+ dodecahedron(GLUgl2.getCurrentGL2(), GL2.GL_TRIANGLE_FAN);
+ }
+
+ public void glutWireOctahedron() {
+ octahedron(GLUgl2.getCurrentGL2(), GL2.GL_LINE_LOOP);
+ }
+
+ public void glutSolidOctahedron() {
+ octahedron(GLUgl2.getCurrentGL2(), GL2.GL_TRIANGLES);
+ }
+
+ public void glutWireIcosahedron() {
+ icosahedron(GLUgl2.getCurrentGL2(), GL2.GL_LINE_LOOP);
+ }
+
+ public void glutSolidIcosahedron() {
+ icosahedron(GLUgl2.getCurrentGL2(), GL2.GL_TRIANGLES);
+ }
+
+ public void glutWireTetrahedron() {
+ tetrahedron(GLUgl2.getCurrentGL2(), GL2.GL_LINE_LOOP);
+ }
+
+ public void glutSolidTetrahedron() {
+ tetrahedron(GLUgl2.getCurrentGL2(), GL2.GL_TRIANGLES);
+ }
+
+/**
+ * Renders the teapot as a solid shape of the specified size. The teapot is
+ * created in a way that replicates the C GLUT implementation.
+ *
+ * @param scale
+ * the factor by which to scale the teapot
+ */
+ public void glutSolidTeapot(double scale) {
+ glutSolidTeapot(scale, true);
+ }
+
+ /**
+ * Renders the teapot as a solid shape of the specified size. The teapot can
+ * either be created in a way that is backward-compatible with the standard
+ * C glut library (i.e. broken), or in a more pleasing way (i.e. with
+ * surfaces whose front-faces point outwards and standing on the z=0 plane,
+ * instead of the y=-1 plane). Both surface normals and texture coordinates
+ * for the teapot are generated. The teapot is generated with OpenGL
+ * evaluators.
+ *
+ * @param scale
+ * the factor by which to scale the teapot
+ * @param cStyle
+ * whether to create the teapot in exactly the same way as in the C
+ * implementation of GLUT
+ */
+ public void glutSolidTeapot(double scale, boolean cStyle) {
+ teapot(GLUgl2.getCurrentGL2(), 14, scale, GL2.GL_FILL, cStyle);
+ }
+
+ /**
+ * Renders the teapot as a wireframe shape of the specified size. The teapot
+ * is created in a way that replicates the C GLUT implementation.
+ *
+ * @param scale
+ * the factor by which to scale the teapot
+ */
+ public void glutWireTeapot(double scale) {
+ glutWireTeapot(scale, true);
+ }
+
+ /**
+ * Renders the teapot as a wireframe shape of the specified size. The teapot
+ * can either be created in a way that is backward-compatible with the
+ * standard C glut library (i.e. broken), or in a more pleasing way (i.e.
+ * with surfaces whose front-faces point outwards and standing on the z=0
+ * plane, instead of the y=-1 plane). Both surface normals and texture
+ * coordinates for the teapot are generated. The teapot is generated with
+ * OpenGL evaluators.
+ *
+ * @param scale
+ * the factor by which to scale the teapot
+ * @param cStyle
+ * whether to create the teapot in exactly the same way as in the C
+ * implementation of GLUT
+ */
+ public void glutWireTeapot(double scale, boolean cStyle) {
+ teapot(GLUgl2.getCurrentGL2(), 10, scale, GL2.GL_LINE, cStyle);
+ }
+
+ //----------------------------------------------------------------------
+ // Fonts
+ //
+
+ public void glutBitmapCharacter(int font, char character) {
+ GL2 gl = GLUgl2.getCurrentGL2();
+ int[] swapbytes = new int[1];
+ int[] lsbfirst = new int[1];
+ int[] rowlength = new int[1];
+ int[] skiprows = new int[1];
+ int[] skippixels = new int[1];
+ int[] alignment = new int[1];
+ beginBitmap(gl,
+ swapbytes,
+ lsbfirst,
+ rowlength,
+ skiprows,
+ skippixels,
+ alignment);
+ bitmapCharacterImpl(gl, font, character);
+ endBitmap(gl,
+ swapbytes,
+ lsbfirst,
+ rowlength,
+ skiprows,
+ skippixels,
+ alignment);
+ }
+
+ public void glutBitmapString (int font, String string) {
+ GL2 gl = GLUgl2.getCurrentGL2();
+ int[] swapbytes = new int[1];
+ int[] lsbfirst = new int[1];
+ int[] rowlength = new int[1];
+ int[] skiprows = new int[1];
+ int[] skippixels = new int[1];
+ int[] alignment = new int[1];
+ beginBitmap(gl,
+ swapbytes,
+ lsbfirst,
+ rowlength,
+ skiprows,
+ skippixels,
+ alignment);
+ int len = string.length();
+ for (int i = 0; i < len; i++) {
+ bitmapCharacterImpl(gl, font, string.charAt(i));
+ }
+ endBitmap(gl,
+ swapbytes,
+ lsbfirst,
+ rowlength,
+ skiprows,
+ skippixels,
+ alignment);
+ }
+
+ public int glutBitmapWidth (int font, char character) {
+ BitmapFontRec fontinfo = getBitmapFont(font);
+ int c = character & 0xFFFF;
+ if (c < fontinfo.first || c >= fontinfo.first + fontinfo.num_chars)
+ return 0;
+ BitmapCharRec ch = fontinfo.ch[c - fontinfo.first];
+ if (ch != null)
+ return (int) ch.advance;
+ else
+ return 0;
+ }
+
+ public void glutStrokeCharacter(int font, char character) {
+ GL2 gl = GLUgl2.getCurrentGL2();
+ StrokeFontRec fontinfo = getStrokeFont(font);
+ int c = character & 0xFFFF;
+ if (c < 0 || c >= fontinfo.num_chars)
+ return;
+ StrokeCharRec ch = fontinfo.ch[c];
+ if (ch != null) {
+ for (int i = 0; i < ch.num_strokes; i++) {
+ StrokeRec stroke = ch.stroke[i];
+ gl.glBegin(GL2.GL_LINE_STRIP);
+ for (int j = 0; j < stroke.num_coords; j++) {
+ CoordRec coord = stroke.coord[j];
+ gl.glVertex2f(coord.x, coord.y);
+ }
+ gl.glEnd();
+ }
+ gl.glTranslatef(ch.right, 0.0f, 0.0f);
+ }
+ }
+
+ public void glutStrokeString(int font, String string) {
+ GL2 gl = GLUgl2.getCurrentGL2();
+ StrokeFontRec fontinfo = getStrokeFont(font);
+ int len = string.length();
+ for (int pos = 0; pos < len; pos++) {
+ int c = string.charAt(pos) & 0xFFFF;
+ if (c < 0 || c >= fontinfo.num_chars)
+ continue;
+ StrokeCharRec ch = fontinfo.ch[c];
+ if (ch != null) {
+ for (int i = 0; i < ch.num_strokes; i++) {
+ StrokeRec stroke = ch.stroke[i];
+ gl.glBegin(GL2.GL_LINE_STRIP);
+ for (int j = 0; j < stroke.num_coords; j++) {
+ CoordRec coord = stroke.coord[j];
+ gl.glVertex2f(coord.x, coord.y);
+ }
+ gl.glEnd();
+ }
+ gl.glTranslatef(ch.right, 0.0f, 0.0f);
+ }
+ }
+ }
+
+ public int glutStrokeWidth (int font, char character) {
+ return (int) glutStrokeWidthf(font, character);
+ }
+
+ public float glutStrokeWidthf (int font, char character) {
+ StrokeFontRec fontinfo = getStrokeFont(font);
+ int c = character & 0xFFFF;
+ if (c < 0 || c >= fontinfo.num_chars)
+ return 0;
+ StrokeCharRec ch = fontinfo.ch[c];
+ if (ch != null)
+ return ch.right;
+ else
+ return 0;
+ }
+
+ public int glutBitmapLength (int font, String string) {
+ BitmapFontRec fontinfo = getBitmapFont(font);
+ int length = 0;
+ int len = string.length();
+ for (int pos = 0; pos < len; pos++) {
+ int c = string.charAt(pos) & 0xFFFF;
+ if (c >= fontinfo.first && c < fontinfo.first + fontinfo.num_chars) {
+ BitmapCharRec ch = fontinfo.ch[c - fontinfo.first];
+ if (ch != null)
+ length += ch.advance;
+ }
+ }
+ return length;
+ }
+
+ public int glutStrokeLength (int font, String string) {
+ return (int) glutStrokeLengthf(font, string);
+ }
+
+ public float glutStrokeLengthf (int font, String string) {
+ StrokeFontRec fontinfo = getStrokeFont(font);
+ float length = 0;
+ int len = string.length();
+ for (int i = 0; i < len; i++) {
+ char c = string.charAt(i);
+ if (c >= 0 && c < fontinfo.num_chars) {
+ StrokeCharRec ch = fontinfo.ch[c];
+ if (ch != null)
+ length += ch.right;
+ }
+ }
+ return length;
+ }
+
+ /**
+ This function draws a wireframe dodecahedron whose
+ facets are rhombic and
+ whose vertices are at unit radius.
+ No facet lies normal to any coordinate axes.
+ The polyhedron is centered at the origin.
+ */
+ public void glutWireRhombicDodecahedron() {
+ GL2 gl = GLUgl2.getCurrentGL2();
+ for( int i = 0; i < 12; i++ ) {
+ gl.glBegin( GL2.GL_LINE_LOOP );
+ gl.glNormal3dv( rdod_n[ i ],0 );
+ gl.glVertex3dv( rdod_r[ rdod_v[ i ][ 0 ] ],0 );
+ gl.glVertex3dv( rdod_r[ rdod_v[ i ][ 1 ] ],0 );
+ gl.glVertex3dv( rdod_r[ rdod_v[ i ][ 2 ] ],0 );
+ gl.glVertex3dv( rdod_r[ rdod_v[ i ][ 3 ] ],0 );
+ gl.glEnd( );
+ }
+ }
+
+ /**
+ This function draws a solid-shaded dodecahedron
+ whose facets are rhombic and
+ whose vertices are at unit radius.
+ No facet lies normal to any coordinate axes.
+ The polyhedron is centered at the origin.
+ */
+ public void glutSolidRhombicDodecahedron() {
+ GL2 gl = GLUgl2.getCurrentGL2();
+ gl.glBegin( GL2.GL_QUADS );
+ for( int i = 0; i < 12; i++ ) {
+ gl.glNormal3dv( rdod_n[ i ],0 );
+ gl.glVertex3dv( rdod_r[ rdod_v[ i ][ 0 ] ],0 );
+ gl.glVertex3dv( rdod_r[ rdod_v[ i ][ 1 ] ],0 );
+ gl.glVertex3dv( rdod_r[ rdod_v[ i ][ 2 ] ],0 );
+ gl.glVertex3dv( rdod_r[ rdod_v[ i ][ 3 ] ],0 );
+ }
+ gl.glEnd( );
+ }
+
+ //----------------------------------------------------------------------
+ // Internals only below this point
+ //
+
+ //----------------------------------------------------------------------
+ // Shape implementation
+ //
+
+ private GLUquadric quadObj;
+ private void quadObjInit(GLUgl2 glu) {
+ if (quadObj == null) {
+ quadObj = glu.gluNewQuadric();
+ }
+ if (quadObj == null) {
+ throw new GLException("Out of memory");
+ }
+ }
+
+ private static void doughnut(GL2 gl, double r, double R, int nsides, int rings) {
+ int i, j;
+ float theta, phi, theta1;
+ float cosTheta, sinTheta;
+ float cosTheta1, sinTheta1;
+ float ringDelta, sideDelta;
+
+ ringDelta = (float) (2.0 * Math.PI / rings);
+ sideDelta = (float) (2.0 * Math.PI / nsides);
+
+ theta = 0.0f;
+ cosTheta = 1.0f;
+ sinTheta = 0.0f;
+ for (i = rings - 1; i >= 0; i--) {
+ theta1 = theta + ringDelta;
+ cosTheta1 = (float) Math.cos(theta1);
+ sinTheta1 = (float) Math.sin(theta1);
+ gl.glBegin(GL2.GL_QUAD_STRIP);
+ phi = 0.0f;
+ for (j = nsides; j >= 0; j--) {
+ float cosPhi, sinPhi, dist;
+
+ phi += sideDelta;
+ cosPhi = (float) Math.cos(phi);
+ sinPhi = (float) Math.sin(phi);
+ dist = (float) (R + r * cosPhi);
+
+ gl.glNormal3f(cosTheta1 * cosPhi, -sinTheta1 * cosPhi, sinPhi);
+ gl.glVertex3f(cosTheta1 * dist, -sinTheta1 * dist, (float) r * sinPhi);
+ gl.glNormal3f(cosTheta * cosPhi, -sinTheta * cosPhi, sinPhi);
+ gl.glVertex3f(cosTheta * dist, -sinTheta * dist, (float) r * sinPhi);
+ }
+ gl.glEnd();
+ theta = theta1;
+ cosTheta = cosTheta1;
+ sinTheta = sinTheta1;
+ }
+ }
+
+ private static float[][] boxVertices;
+ private static final float[][] boxNormals = {
+ {-1.0f, 0.0f, 0.0f},
+ {0.0f, 1.0f, 0.0f},
+ {1.0f, 0.0f, 0.0f},
+ {0.0f, -1.0f, 0.0f},
+ {0.0f, 0.0f, 1.0f},
+ {0.0f, 0.0f, -1.0f}
+ };
+ private static final int[][] boxFaces = {
+ {0, 1, 2, 3},
+ {3, 2, 6, 7},
+ {7, 6, 5, 4},
+ {4, 5, 1, 0},
+ {5, 6, 2, 1},
+ {7, 4, 0, 3}
+ };
+ private void drawBox(GL2 gl, float size, int type) {
+ if (boxVertices == null) {
+ float[][] v = new float[8][];
+ for (int i = 0; i < 8; i++) {
+ v[i] = new float[3];
+ }
+ v[0][0] = v[1][0] = v[2][0] = v[3][0] = -0.5f;
+ v[4][0] = v[5][0] = v[6][0] = v[7][0] = 0.5f;
+ v[0][1] = v[1][1] = v[4][1] = v[5][1] = -0.5f;
+ v[2][1] = v[3][1] = v[6][1] = v[7][1] = 0.5f;
+ v[0][2] = v[3][2] = v[4][2] = v[7][2] = -0.5f;
+ v[1][2] = v[2][2] = v[5][2] = v[6][2] = 0.5f;
+ boxVertices = v;
+ }
+ float[][] v = boxVertices;
+ float[][] n = boxNormals;
+ int[][] faces = boxFaces;
+ for (int i = 5; i >= 0; i--) {
+ gl.glBegin(type);
+ gl.glNormal3fv(n[i], 0);
+ float[] vt = v[faces[i][0]];
+ gl.glVertex3f(vt[0] * size, vt[1] * size, vt[2] * size);
+ vt = v[faces[i][1]];
+ gl.glVertex3f(vt[0] * size, vt[1] * size, vt[2] * size);
+ vt = v[faces[i][2]];
+ gl.glVertex3f(vt[0] * size, vt[1] * size, vt[2] * size);
+ vt = v[faces[i][3]];
+ gl.glVertex3f(vt[0] * size, vt[1] * size, vt[2] * size);
+ gl.glEnd();
+ }
+ }
+
+ private float[][] dodec;
+
+ private void initDodecahedron() {
+ dodec = new float[20][];
+ for (int i = 0; i < dodec.length; i++) {
+ dodec[i] = new float[3];
+ }
+
+ float alpha, beta;
+
+ alpha = (float) Math.sqrt(2.0f / (3.0f + Math.sqrt(5.0)));
+ beta = 1.0f + (float) Math.sqrt(6.0 / (3.0 + Math.sqrt(5.0)) -
+ 2.0 + 2.0 * Math.sqrt(2.0 / (3.0 + Math.sqrt(5.0))));
+ dodec[0][0] = -alpha; dodec[0][1] = 0; dodec[0][2] = beta;
+ dodec[1][0] = alpha; dodec[1][1] = 0; dodec[1][2] = beta;
+ dodec[2][0] = -1; dodec[2][1] = -1; dodec[2][2] = -1;
+ dodec[3][0] = -1; dodec[3][1] = -1; dodec[3][2] = 1;
+ dodec[4][0] = -1; dodec[4][1] = 1; dodec[4][2] = -1;
+ dodec[5][0] = -1; dodec[5][1] = 1; dodec[5][2] = 1;
+ dodec[6][0] = 1; dodec[6][1] = -1; dodec[6][2] = -1;
+ dodec[7][0] = 1; dodec[7][1] = -1; dodec[7][2] = 1;
+ dodec[8][0] = 1; dodec[8][1] = 1; dodec[8][2] = -1;
+ dodec[9][0] = 1; dodec[9][1] = 1; dodec[9][2] = 1;
+ dodec[10][0] = beta; dodec[10][1] = alpha; dodec[10][2] = 0;
+ dodec[11][0] = beta; dodec[11][1] = -alpha; dodec[11][2] = 0;
+ dodec[12][0] = -beta; dodec[12][1] = alpha; dodec[12][2] = 0;
+ dodec[13][0] = -beta; dodec[13][1] = -alpha; dodec[13][2] = 0;
+ dodec[14][0] = -alpha; dodec[14][1] = 0; dodec[14][2] = -beta;
+ dodec[15][0] = alpha; dodec[15][1] = 0; dodec[15][2] = -beta;
+ dodec[16][0] = 0; dodec[16][1] = beta; dodec[16][2] = alpha;
+ dodec[17][0] = 0; dodec[17][1] = beta; dodec[17][2] = -alpha;
+ dodec[18][0] = 0; dodec[18][1] = -beta; dodec[18][2] = alpha;
+ dodec[19][0] = 0; dodec[19][1] = -beta; dodec[19][2] = -alpha;
+ }
+
+ private static void diff3(float[] a, float[] b, float[] c) {
+ c[0] = a[0] - b[0];
+ c[1] = a[1] - b[1];
+ c[2] = a[2] - b[2];
+ }
+
+ private static void crossprod(float[] v1, float[] v2, float[] prod) {
+ float[] p = new float[3]; /* in case prod == v1 or v2 */
+
+ p[0] = v1[1] * v2[2] - v2[1] * v1[2];
+ p[1] = v1[2] * v2[0] - v2[2] * v1[0];
+ p[2] = v1[0] * v2[1] - v2[0] * v1[1];
+ prod[0] = p[0];
+ prod[1] = p[1];
+ prod[2] = p[2];
+ }
+
+ private static void normalize(float[] v) {
+ float d;
+
+ d = (float) Math.sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
+ if (d == 0.0) {
+ v[0] = d = 1.0f;
+ }
+ d = 1 / d;
+ v[0] *= d;
+ v[1] *= d;
+ v[2] *= d;
+ }
+
+ private void pentagon(GL2 gl, int a, int b, int c, int d, int e, int shadeType) {
+ float[] n0 = new float[3];
+ float[] d1 = new float[3];
+ float[] d2 = new float[3];
+
+ diff3(dodec[a], dodec[b], d1);
+ diff3(dodec[b], dodec[c], d2);
+ crossprod(d1, d2, n0);
+ normalize(n0);
+
+ gl.glBegin(shadeType);
+ gl.glNormal3fv(n0, 0);
+ gl.glVertex3fv(dodec[a], 0);
+ gl.glVertex3fv(dodec[b], 0);
+ gl.glVertex3fv(dodec[c], 0);
+ gl.glVertex3fv(dodec[d], 0);
+ gl.glVertex3fv(dodec[e], 0);
+ gl.glEnd();
+ }
+
+ private void dodecahedron(GL2 gl, int type) {
+ if (dodec == null) {
+ initDodecahedron();
+ }
+ pentagon(gl, 0, 1, 9, 16, 5, type);
+ pentagon(gl, 1, 0, 3, 18, 7, type);
+ pentagon(gl, 1, 7, 11, 10, 9, type);
+ pentagon(gl, 11, 7, 18, 19, 6, type);
+ pentagon(gl, 8, 17, 16, 9, 10, type);
+ pentagon(gl, 2, 14, 15, 6, 19, type);
+ pentagon(gl, 2, 13, 12, 4, 14, type);
+ pentagon(gl, 2, 19, 18, 3, 13, type);
+ pentagon(gl, 3, 0, 5, 12, 13, type);
+ pentagon(gl, 6, 15, 8, 10, 11, type);
+ pentagon(gl, 4, 17, 8, 15, 14, type);
+ pentagon(gl, 4, 12, 5, 16, 17, type);
+ }
+
+ private static void recorditem(GL2 gl, float[] n1, float[] n2, float[] n3, int shadeType) {
+ float[] q0 = new float[3];
+ float[] q1 = new float[3];
+
+ diff3(n1, n2, q0);
+ diff3(n2, n3, q1);
+ crossprod(q0, q1, q1);
+ normalize(q1);
+
+ gl.glBegin(shadeType);
+ gl.glNormal3fv(q1, 0);
+ gl.glVertex3fv(n1, 0);
+ gl.glVertex3fv(n2, 0);
+ gl.glVertex3fv(n3, 0);
+ gl.glEnd();
+ }
+
+ private static void subdivide(GL2 gl, float[] v0, float[] v1, float[] v2, int shadeType) {
+ int depth;
+ float[] w0 = new float[3];
+ float[] w1 = new float[3];
+ float[] w2 = new float[3];
+ float l;
+ int i, j, k, n;
+
+ depth = 1;
+ for (i = 0; i < depth; i++) {
+ for (j = 0; i + j < depth; j++) {
+ k = depth - i - j;
+ for (n = 0; n < 3; n++) {
+ w0[n] = (i * v0[n] + j * v1[n] + k * v2[n]) / depth;
+ w1[n] = ((i + 1) * v0[n] + j * v1[n] + (k - 1) * v2[n])
+ / depth;
+ w2[n] = (i * v0[n] + (j + 1) * v1[n] + (k - 1) * v2[n])
+ / depth;
+ }
+ l = (float) Math.sqrt(w0[0] * w0[0] + w0[1] * w0[1] + w0[2] * w0[2]);
+ w0[0] /= l;
+ w0[1] /= l;
+ w0[2] /= l;
+ l = (float) Math.sqrt(w1[0] * w1[0] + w1[1] * w1[1] + w1[2] * w1[2]);
+ w1[0] /= l;
+ w1[1] /= l;
+ w1[2] /= l;
+ l = (float) Math.sqrt(w2[0] * w2[0] + w2[1] * w2[1] + w2[2] * w2[2]);
+ w2[0] /= l;
+ w2[1] /= l;
+ w2[2] /= l;
+ recorditem(gl, w1, w0, w2, shadeType);
+ }
+ }
+ }
+
+ private static void drawtriangle(GL2 gl, int i, float[][] data, int[][] ndx, int shadeType) {
+ float[] x0 = data[ndx[i][0]];
+ float[] x1 = data[ndx[i][1]];
+ float[] x2 = data[ndx[i][2]];
+ subdivide(gl, x0, x1, x2, shadeType);
+ }
+
+ /* octahedron data: The octahedron produced is centered at the
+ origin and has radius 1.0 */
+ private static final float[][] odata =
+ {
+ {1.0f, 0.0f, 0.0f},
+ {-1.0f, 0.0f, 0.0f},
+ {0.0f, 1.0f, 0.0f},
+ {0.0f, -1.0f, 0.0f},
+ {0.0f, 0.0f, 1.0f},
+ {0.0f, 0.0f, -1.0f}
+ };
+
+ private static final int[][] ondex =
+ {
+ {0, 4, 2},
+ {1, 2, 4},
+ {0, 3, 4},
+ {1, 4, 3},
+ {0, 2, 5},
+ {1, 5, 2},
+ {0, 5, 3},
+ {1, 3, 5}
+ };
+
+ private static void octahedron(GL2 gl, int shadeType) {
+ int i;
+
+ for (i = 7; i >= 0; i--) {
+ drawtriangle(gl, i, odata, ondex, shadeType);
+ }
+ }
+
+ /* icosahedron data: These numbers are rigged to make an
+ icosahedron of radius 1.0 */
+
+ private static final float X = .525731112119133606f;
+ private static final float Z = .850650808352039932f;
+
+ private static final float[][] idata =
+ {
+ {-X, 0, Z},
+ {X, 0, Z},
+ {-X, 0, -Z},
+ {X, 0, -Z},
+ {0, Z, X},
+ {0, Z, -X},
+ {0, -Z, X},
+ {0, -Z, -X},
+ {Z, X, 0},
+ {-Z, X, 0},
+ {Z, -X, 0},
+ {-Z, -X, 0}
+ };
+
+ private static final int[][] index =
+ {
+ {0, 4, 1},
+ {0, 9, 4},
+ {9, 5, 4},
+ {4, 5, 8},
+ {4, 8, 1},
+ {8, 10, 1},
+ {8, 3, 10},
+ {5, 3, 8},
+ {5, 2, 3},
+ {2, 7, 3},
+ {7, 10, 3},
+ {7, 6, 10},
+ {7, 11, 6},
+ {11, 0, 6},
+ {0, 1, 6},
+ {6, 1, 10},
+ {9, 0, 11},
+ {9, 11, 2},
+ {9, 2, 5},
+ {7, 2, 11},
+ };
+
+ private static void icosahedron(GL2 gl, int shadeType) {
+ int i;
+
+ for (i = 19; i >= 0; i--) {
+ drawtriangle(gl, i, idata, index, shadeType);
+ }
+ }
+
+ /* rhombic dodecahedron data: */
+
+ private static final double rdod_r[][] =
+ {
+ { 0.0, 0.0, 1.0 },
+ { 0.707106781187, 0.000000000000, 0.5 },
+ { 0.000000000000, 0.707106781187, 0.5 },
+ { -0.707106781187, 0.000000000000, 0.5 },
+ { 0.000000000000, -0.707106781187, 0.5 },
+ { 0.707106781187, 0.707106781187, 0.0 },
+ { -0.707106781187, 0.707106781187, 0.0 },
+ { -0.707106781187, -0.707106781187, 0.0 },
+ { 0.707106781187, -0.707106781187, 0.0 },
+ { 0.707106781187, 0.000000000000, -0.5 },
+ { 0.000000000000, 0.707106781187, -0.5 },
+ { -0.707106781187, 0.000000000000, -0.5 },
+ { 0.000000000000, -0.707106781187, -0.5 },
+ { 0.0, 0.0, -1.0 }
+ };
+
+ private static final int rdod_v[][] =
+ {
+ { 0, 1, 5, 2 },
+ { 0, 2, 6, 3 },
+ { 0, 3, 7, 4 },
+ { 0, 4, 8, 1 },
+ { 5, 10, 6, 2 },
+ { 6, 11, 7, 3 },
+ { 7, 12, 8, 4 },
+ { 8, 9, 5, 1 },
+ { 5, 9, 13, 10 },
+ { 6, 10, 13, 11 },
+ { 7, 11, 13, 12 },
+ { 8, 12, 13, 9 }
+ };
+
+ private static final double rdod_n[][] =
+ {
+ { 0.353553390594, 0.353553390594, 0.5 },
+ { -0.353553390594, 0.353553390594, 0.5 },
+ { -0.353553390594, -0.353553390594, 0.5 },
+ { 0.353553390594, -0.353553390594, 0.5 },
+ { 0.000000000000, 1.000000000000, 0.0 },
+ { -1.000000000000, 0.000000000000, 0.0 },
+ { 0.000000000000, -1.000000000000, 0.0 },
+ { 1.000000000000, 0.000000000000, 0.0 },
+ { 0.353553390594, 0.353553390594, -0.5 },
+ { -0.353553390594, 0.353553390594, -0.5 },
+ { -0.353553390594, -0.353553390594, -0.5 },
+ { 0.353553390594, -0.353553390594, -0.5 }
+ };
+
+ /* tetrahedron data: */
+
+ private static final float T = 1.73205080756887729f;
+
+ private static final float[][] tdata =
+ {
+ {T, T, T},
+ {T, -T, -T},
+ {-T, T, -T},
+ {-T, -T, T}
+ };
+
+ private static final int[][] tndex =
+ {
+ {0, 1, 3},
+ {2, 1, 0},
+ {3, 2, 0},
+ {1, 2, 3}
+ };
+
+ private static final void tetrahedron(GL2 gl, int shadeType) {
+ for (int i = 3; i >= 0; i--)
+ drawtriangle(gl, i, tdata, tndex, shadeType);
+ }
+
+ // Teapot implementation (a modified port of glut_teapot.c)
+ //
+ // Rim, body, lid, and bottom data must be reflected in x and
+ // y; handle and spout data across the y axis only.
+ private static final int[][] teapotPatchData = {
+ /* rim */
+ {102, 103, 104, 105, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15},
+ /* body */
+ {12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27},
+ {24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40},
+ /* lid */
+ {96, 96, 96, 96, 97, 98, 99, 100, 101, 101, 101, 101, 0, 1, 2, 3,},
+ {0, 1, 2, 3, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117},
+ /* bottom */
+ {118, 118, 118, 118, 124, 122, 119, 121, 123, 126, 125, 120, 40, 39, 38, 37},
+ /* handle */
+ {41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56},
+ {53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 28, 65, 66, 67},
+ /* spout */
+ {68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83},
+ {80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95}
+ };
+ private static final float[][] teapotCPData = {
+ {0.2f, 0f, 2.7f},
+ {0.2f, -0.112f, 2.7f},
+ {0.112f, -0.2f, 2.7f},
+ {0f, -0.2f, 2.7f},
+ {1.3375f, 0f, 2.53125f},
+ {1.3375f, -0.749f, 2.53125f},
+ {0.749f, -1.3375f, 2.53125f},
+ {0f, -1.3375f, 2.53125f},
+ {1.4375f, 0f, 2.53125f},
+ {1.4375f, -0.805f, 2.53125f},
+ {0.805f, -1.4375f, 2.53125f},
+ {0f, -1.4375f, 2.53125f},
+ {1.5f, 0f, 2.4f},
+ {1.5f, -0.84f, 2.4f},
+ {0.84f, -1.5f, 2.4f},
+ {0f, -1.5f, 2.4f},
+ {1.75f, 0f, 1.875f},
+ {1.75f, -0.98f, 1.875f},
+ {0.98f, -1.75f, 1.875f},
+ {0f, -1.75f, 1.875f},
+ {2f, 0f, 1.35f},
+ {2f, -1.12f, 1.35f},
+ {1.12f, -2f, 1.35f},
+ {0f, -2f, 1.35f},
+ {2f, 0f, 0.9f},
+ {2f, -1.12f, 0.9f},
+ {1.12f, -2f, 0.9f},
+ {0f, -2f, 0.9f},
+ {-2f, 0f, 0.9f},
+ {2f, 0f, 0.45f},
+ {2f, -1.12f, 0.45f},
+ {1.12f, -2f, 0.45f},
+ {0f, -2f, 0.45f},
+ {1.5f, 0f, 0.225f},
+ {1.5f, -0.84f, 0.225f},
+ {0.84f, -1.5f, 0.225f},
+ {0f, -1.5f, 0.225f},
+ {1.5f, 0f, 0.15f},
+ {1.5f, -0.84f, 0.15f},
+ {0.84f, -1.5f, 0.15f},
+ {0f, -1.5f, 0.15f},
+ {-1.6f, 0f, 2.025f},
+ {-1.6f, -0.3f, 2.025f},
+ {-1.5f, -0.3f, 2.25f},
+ {-1.5f, 0f, 2.25f},
+ {-2.3f, 0f, 2.025f},
+ {-2.3f, -0.3f, 2.025f},
+ {-2.5f, -0.3f, 2.25f},
+ {-2.5f, 0f, 2.25f},
+ {-2.7f, 0f, 2.025f},
+ {-2.7f, -0.3f, 2.025f},
+ {-3f, -0.3f, 2.25f},
+ {-3f, 0f, 2.25f},
+ {-2.7f, 0f, 1.8f},
+ {-2.7f, -0.3f, 1.8f},
+ {-3f, -0.3f, 1.8f},
+ {-3f, 0f, 1.8f},
+ {-2.7f, 0f, 1.575f},
+ {-2.7f, -0.3f, 1.575f},
+ {-3f, -0.3f, 1.35f},
+ {-3f, 0f, 1.35f},
+ {-2.5f, 0f, 1.125f},
+ {-2.5f, -0.3f, 1.125f},
+ {-2.65f, -0.3f, 0.9375f},
+ {-2.65f, 0f, 0.9375f},
+ {-2f, -0.3f, 0.9f},
+ {-1.9f, -0.3f, 0.6f},
+ {-1.9f, 0f, 0.6f},
+ {1.7f, 0f, 1.425f},
+ {1.7f, -0.66f, 1.425f},
+ {1.7f, -0.66f, 0.6f},
+ {1.7f, 0f, 0.6f},
+ {2.6f, 0f, 1.425f},
+ {2.6f, -0.66f, 1.425f},
+ {3.1f, -0.66f, 0.825f},
+ {3.1f, 0f, 0.825f},
+ {2.3f, 0f, 2.1f},
+ {2.3f, -0.25f, 2.1f},
+ {2.4f, -0.25f, 2.025f},
+ {2.4f, 0f, 2.025f},
+ {2.7f, 0f, 2.4f},
+ {2.7f, -0.25f, 2.4f},
+ {3.3f, -0.25f, 2.4f},
+ {3.3f, 0f, 2.4f},
+ {2.8f, 0f, 2.475f},
+ {2.8f, -0.25f, 2.475f},
+ {3.525f, -0.25f, 2.49375f},
+ {3.525f, 0f, 2.49375f},
+ {2.9f, 0f, 2.475f},
+ {2.9f, -0.15f, 2.475f},
+ {3.45f, -0.15f, 2.5125f},
+ {3.45f, 0f, 2.5125f},
+ {2.8f, 0f, 2.4f},
+ {2.8f, -0.15f, 2.4f},
+ {3.2f, -0.15f, 2.4f},
+ {3.2f, 0f, 2.4f},
+ {0f, 0f, 3.15f},
+ {0.8f, 0f, 3.15f},
+ {0.8f, -0.45f, 3.15f},
+ {0.45f, -0.8f, 3.15f},
+ {0f, -0.8f, 3.15f},
+ {0f, 0f, 2.85f},
+ {1.4f, 0f, 2.4f},
+ {1.4f, -0.784f, 2.4f},
+ {0.784f, -1.4f, 2.4f},
+ {0f, -1.4f, 2.4f},
+ {0.4f, 0f, 2.55f},
+ {0.4f, -0.224f, 2.55f},
+ {0.224f, -0.4f, 2.55f},
+ {0f, -0.4f, 2.55f},
+ {1.3f, 0f, 2.55f},
+ {1.3f, -0.728f, 2.55f},
+ {0.728f, -1.3f, 2.55f},
+ {0f, -1.3f, 2.55f},
+ {1.3f, 0f, 2.4f},
+ {1.3f, -0.728f, 2.4f},
+ {0.728f, -1.3f, 2.4f},
+ {0f, -1.3f, 2.4f},
+ {0f, 0f, 0f},
+ {1.425f, -0.798f, 0f},
+ {1.5f, 0f, 0.075f},
+ {1.425f, 0f, 0f},
+ {0.798f, -1.425f, 0f},
+ {0f, -1.5f, 0.075f},
+ {0f, -1.425f, 0f},
+ {1.5f, -0.84f, 0.075f},
+ {0.84f, -1.5f, 0.075f}
+ };
+ // Since GL2.glMap2f expects a packed array of floats, we must convert
+ // from a 3-dimensional array to a 1-dimensional array
+ private static final float[] teapotTex = {
+ 0, 0, 1, 0, 0, 1, 1, 1
+ };
+
+ private static void teapot(GL2 gl,
+ int grid,
+ double scale,
+ int type,
+ boolean backCompatible)
+ {
+ // As mentioned above, GL2.glMap2f expects a packed array of floats
+ float[] p = new float[4*4*3];
+ float[] q = new float[4*4*3];
+ float[] r = new float[4*4*3];
+ float[] s = new float[4*4*3];
+ int i, j, k, l;
+
+ gl.glPushAttrib(GL2.GL_ENABLE_BIT | GL2.GL_EVAL_BIT | GL2.GL_POLYGON_BIT);
+ gl.glEnable(GL2.GL_AUTO_NORMAL);
+ gl.glEnable(GL2.GL_NORMALIZE);
+ gl.glEnable(GL2.GL_MAP2_VERTEX_3);
+ gl.glEnable(GL2.GL_MAP2_TEXTURE_COORD_2);
+ gl.glPushMatrix();
+ if (!backCompatible) {
+ // The time has come to have the teapot no longer be inside out
+ gl.glFrontFace(GL2.GL_CW);
+ gl.glScaled(0.5*scale, 0.5*scale, 0.5*scale);
+ } else {
+ // We want the teapot in it's backward compatible position and
+ // orientation
+ gl.glRotatef(270.0f, 1, 0, 0);
+ gl.glScalef((float)(0.5 * scale),
+ (float)(0.5 * scale),
+ (float)(0.5 * scale));
+ gl.glTranslatef(0.0f, 0.0f, -1.5f);
+ }
+ for (i = 0; i < 10; i++) {
+ for (j = 0; j < 4; j++) {
+ for (k = 0; k < 4; k++) {
+ for (l = 0; l < 3; l++) {
+ p[(j*4+k)*3+l] = teapotCPData[teapotPatchData[i][j * 4 + k]][l];
+ q[(j*4+k)*3+l] =
+ teapotCPData[teapotPatchData[i][j * 4 + (3 - k)]][l];
+ if (l == 1)
+ q[(j*4+k)*3+l] *= -1.0;
+ if (i < 6) {
+ r[(j*4+k)*3+l] =
+ teapotCPData[teapotPatchData[i][j * 4 + (3 - k)]][l];
+ if (l == 0)
+ r[(j*4+k)*3+l] *= -1.0;
+ s[(j*4+k)*3+l] = teapotCPData[teapotPatchData[i][j * 4 + k]][l];
+ if (l == 0)
+ s[(j*4+k)*3+l] *= -1.0;
+ if (l == 1)
+ s[(j*4+k)*3+l] *= -1.0;
+ }
+ }
+ }
+ }
+ gl.glMap2f(GL2.GL_MAP2_TEXTURE_COORD_2, 0, 1, 2, 2, 0, 1, 4, 2, teapotTex, 0);
+ gl.glMap2f(GL2.GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, p, 0);
+ gl.glMapGrid2f(grid, 0.0f, 1.0f, grid, 0.0f, 1.0f);
+ evaluateTeapotMesh(gl, grid, type, i, !backCompatible);
+ gl.glMap2f(GL2.GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, q, 0);
+ evaluateTeapotMesh(gl, grid, type, i, !backCompatible);
+ if (i < 6) {
+ gl.glMap2f(GL2.GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, r, 0);
+ evaluateTeapotMesh(gl, grid, type, i, !backCompatible);
+ gl.glMap2f(GL2.GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, s, 0);
+ evaluateTeapotMesh(gl, grid, type, i, !backCompatible);
+ }
+ }
+ gl.glPopMatrix();
+ gl.glPopAttrib();
+ }
+
+ private static void evaluateTeapotMesh(GL2 gl,
+ int grid,
+ int type,
+ int partNum,
+ boolean repairSingularities)
+ {
+ if (repairSingularities && (partNum == 5 || partNum == 3)) {
+ // Instead of using evaluators that give bad results at singularities,
+ // evaluate by hand
+ gl.glPolygonMode(GL2.GL_FRONT_AND_BACK, type);
+ for (int nv = 0; nv < grid; nv++) {
+ if (nv == 0) {
+ // Draw a small triangle-fan to fill the hole
+ gl.glDisable(GL2.GL_AUTO_NORMAL);
+ gl.glNormal3f(0, 0, partNum == 3 ? 1 : -1);
+ gl.glBegin(GL2.GL_TRIANGLE_FAN);
+ {
+ gl.glEvalCoord2f(0, 0);
+ // Note that we draw in clock-wise order to match the evaluator
+ // method
+ for (int nu = 0; nu <= grid; nu++)
+ {
+ gl.glEvalCoord2f(nu / (float)grid, (1f / grid) / (float)grid);
+ }
+ }
+ gl.glEnd();
+ gl.glEnable(GL2.GL_AUTO_NORMAL);
+ }
+ // Draw the rest of the piece as an evaluated quad-strip
+ gl.glBegin(GL2.GL_QUAD_STRIP);
+ {
+ // Note that we draw in clock-wise order to match the evaluator method
+ for (int nu = grid; nu >= 0; nu--) {
+ gl.glEvalCoord2f(nu / (float)grid, (nv + 1) / (float)grid);
+ gl.glEvalCoord2f(nu / (float)grid, Math.max(nv, 1f / grid)
+ / (float)grid);
+ }
+ }
+ gl.glEnd();
+ }
+ } else {
+ gl.glEvalMesh2(type, 0, grid, 0, grid);
+ }
+ }
+
+ //----------------------------------------------------------------------
+ // Font implementation
+ //
+
+ private static void bitmapCharacterImpl(GL2 gl, int font, char cin) {
+ BitmapFontRec fontinfo = getBitmapFont(font);
+ int c = cin & 0xFFFF;
+ if (c < fontinfo.first ||
+ c >= fontinfo.first + fontinfo.num_chars)
+ return;
+ BitmapCharRec ch = fontinfo.ch[c - fontinfo.first];
+ if (ch != null) {
+ gl.glBitmap(ch.width, ch.height, ch.xorig, ch.yorig,
+ ch.advance, 0, ch.bitmap, 0);
+ }
+ }
+
+ private static final BitmapFontRec[] bitmapFonts = new BitmapFontRec[9];
+ private static final StrokeFontRec[] strokeFonts = new StrokeFontRec[9];
+
+ private static BitmapFontRec getBitmapFont(int font) {
+ BitmapFontRec rec = bitmapFonts[font];
+ if (rec == null) {
+ switch (font) {
+ case BITMAP_9_BY_15:
+ rec = GLUTBitmap9x15.glutBitmap9By15;
+ break;
+ case BITMAP_8_BY_13:
+ rec = GLUTBitmap8x13.glutBitmap8By13;
+ break;
+ case BITMAP_TIMES_ROMAN_10:
+ rec = GLUTBitmapTimesRoman10.glutBitmapTimesRoman10;
+ break;
+ case BITMAP_TIMES_ROMAN_24:
+ rec = GLUTBitmapTimesRoman24.glutBitmapTimesRoman24;
+ break;
+ case BITMAP_HELVETICA_10:
+ rec = GLUTBitmapHelvetica10.glutBitmapHelvetica10;
+ break;
+ case BITMAP_HELVETICA_12:
+ rec = GLUTBitmapHelvetica12.glutBitmapHelvetica12;
+ break;
+ case BITMAP_HELVETICA_18:
+ rec = GLUTBitmapHelvetica18.glutBitmapHelvetica18;
+ break;
+ default:
+ throw new GLException("Unknown bitmap font number " + font);
+ }
+ bitmapFonts[font] = rec;
+ }
+ return rec;
+ }
+
+ private static StrokeFontRec getStrokeFont(int font) {
+ StrokeFontRec rec = strokeFonts[font];
+ if (rec == null) {
+ switch (font) {
+ case STROKE_ROMAN:
+ rec = GLUTStrokeRoman.glutStrokeRoman;
+ break;
+ case STROKE_MONO_ROMAN:
+ rec = GLUTStrokeMonoRoman.glutStrokeMonoRoman;
+ break;
+ default:
+ throw new GLException("Unknown stroke font number " + font);
+ }
+ }
+ return rec;
+ }
+
+ private static void beginBitmap(GL2 gl,
+ int[] swapbytes,
+ int[] lsbfirst,
+ int[] rowlength,
+ int[] skiprows,
+ int[] skippixels,
+ int[] alignment) {
+ gl.glGetIntegerv(GL2.GL_UNPACK_SWAP_BYTES, swapbytes, 0);
+ gl.glGetIntegerv(GL2.GL_UNPACK_LSB_FIRST, lsbfirst, 0);
+ gl.glGetIntegerv(GL2.GL_UNPACK_ROW_LENGTH, rowlength, 0);
+ gl.glGetIntegerv(GL2.GL_UNPACK_SKIP_ROWS, skiprows, 0);
+ gl.glGetIntegerv(GL2.GL_UNPACK_SKIP_PIXELS, skippixels, 0);
+ gl.glGetIntegerv(GL2.GL_UNPACK_ALIGNMENT, alignment, 0);
+ /* Little endian machines (DEC Alpha for example) could
+ benefit from setting GL_UNPACK_LSB_FIRST to GL_TRUE
+ instead of GL_FALSE, but this would require changing the
+ generated bitmaps too. */
+ gl.glPixelStorei(GL2.GL_UNPACK_SWAP_BYTES, GL2.GL_FALSE);
+ gl.glPixelStorei(GL2.GL_UNPACK_LSB_FIRST, GL2.GL_FALSE);
+ gl.glPixelStorei(GL2.GL_UNPACK_ROW_LENGTH, 0);
+ gl.glPixelStorei(GL2.GL_UNPACK_SKIP_ROWS, 0);
+ gl.glPixelStorei(GL2.GL_UNPACK_SKIP_PIXELS, 0);
+ gl.glPixelStorei(GL2.GL_UNPACK_ALIGNMENT, 1);
+ }
+
+ private static void endBitmap(GL2 gl,
+ int[] swapbytes,
+ int[] lsbfirst,
+ int[] rowlength,
+ int[] skiprows,
+ int[] skippixels,
+ int[] alignment) {
+ /* Restore saved modes. */
+ gl.glPixelStorei(GL2.GL_UNPACK_SWAP_BYTES, swapbytes[0]);
+ gl.glPixelStorei(GL2.GL_UNPACK_LSB_FIRST, lsbfirst[0]);
+ gl.glPixelStorei(GL2.GL_UNPACK_ROW_LENGTH, rowlength[0]);
+ gl.glPixelStorei(GL2.GL_UNPACK_SKIP_ROWS, skiprows[0]);
+ gl.glPixelStorei(GL2.GL_UNPACK_SKIP_PIXELS, skippixels[0]);
+ gl.glPixelStorei(GL2.GL_UNPACK_ALIGNMENT, alignment[0]);
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTBitmap8x13.java b/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTBitmap8x13.java
new file mode 100644
index 000000000..07ded652a
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTBitmap8x13.java
@@ -0,0 +1,2078 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.util.gl2;
+
+class GLUTBitmap8x13 {
+
+/* GENERATED FILE -- DO NOT MODIFY */
+
+
+static final BitmapCharRec ch0 = new BitmapCharRec(0,0,0,0,8,null);
+
+static final BitmapCharRec ch32 = new BitmapCharRec(0,0,0,0,8,null);
+
+static final BitmapCharRec ch127 = new BitmapCharRec(0,0,0,0,8,null);
+
+static final BitmapCharRec ch160 = new BitmapCharRec(0,0,0,0,8,null);
+
+/* char: 0xff */
+
+static final byte[] ch255data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x4,(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x0,(byte) 0x48,(byte) 0x48,
+};
+
+static final BitmapCharRec ch255 = new BitmapCharRec(6,12,-1,2,8,ch255data);
+
+/* char: 0xfe */
+
+static final byte[] ch254data = {
+(byte) 0x80,(byte) 0x80,(byte) 0xb8,(byte) 0xc4,(byte) 0x84,(byte) 0x84,(byte) 0xc4,(byte) 0xb8,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch254 = new BitmapCharRec(6,10,-1,2,8,ch254data);
+
+/* char: 0xfd */
+
+static final byte[] ch253data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x4,(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch253 = new BitmapCharRec(6,12,-1,2,8,ch253data);
+
+/* char: 0xfc */
+
+static final byte[] ch252data = {
+(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x0,(byte) 0x0,(byte) 0x48,(byte) 0x48,
+};
+
+static final BitmapCharRec ch252 = new BitmapCharRec(6,10,-1,0,8,ch252data);
+
+/* char: 0xfb */
+
+static final byte[] ch251data = {
+(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x0,(byte) 0x0,(byte) 0x48,(byte) 0x30,
+};
+
+static final BitmapCharRec ch251 = new BitmapCharRec(6,10,-1,0,8,ch251data);
+
+/* char: 0xfa */
+
+static final byte[] ch250data = {
+(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x0,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch250 = new BitmapCharRec(6,10,-1,0,8,ch250data);
+
+/* char: 0xf9 */
+
+static final byte[] ch249data = {
+(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x0,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch249 = new BitmapCharRec(6,10,-1,0,8,ch249data);
+
+/* char: 0xf8 */
+
+static final byte[] ch248data = {
+(byte) 0x80,(byte) 0x78,(byte) 0xc4,(byte) 0xa4,(byte) 0x94,(byte) 0x8c,(byte) 0x78,(byte) 0x4,
+};
+
+static final BitmapCharRec ch248 = new BitmapCharRec(6,8,-1,1,8,ch248data);
+
+/* char: 0xf7 */
+
+static final byte[] ch247data = {
+(byte) 0x20,(byte) 0x20,(byte) 0x0,(byte) 0xf8,(byte) 0x0,(byte) 0x20,(byte) 0x20,
+};
+
+static final BitmapCharRec ch247 = new BitmapCharRec(5,7,-1,-1,8,ch247data);
+
+/* char: 0xf6 */
+
+static final byte[] ch246data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x48,(byte) 0x48,
+};
+
+static final BitmapCharRec ch246 = new BitmapCharRec(6,10,-1,0,8,ch246data);
+
+/* char: 0xf5 */
+
+static final byte[] ch245data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch245 = new BitmapCharRec(6,10,-1,0,8,ch245data);
+
+/* char: 0xf4 */
+
+static final byte[] ch244data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x48,(byte) 0x30,
+};
+
+static final BitmapCharRec ch244 = new BitmapCharRec(6,10,-1,0,8,ch244data);
+
+/* char: 0xf3 */
+
+static final byte[] ch243data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch243 = new BitmapCharRec(6,10,-1,0,8,ch243data);
+
+/* char: 0xf2 */
+
+static final byte[] ch242data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch242 = new BitmapCharRec(6,10,-1,0,8,ch242data);
+
+/* char: 0xf1 */
+
+static final byte[] ch241data = {
+(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xc4,(byte) 0xb8,(byte) 0x0,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch241 = new BitmapCharRec(6,10,-1,0,8,ch241data);
+
+/* char: 0xf0 */
+
+static final byte[] ch240data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x8,(byte) 0x50,(byte) 0x30,(byte) 0x48,
+};
+
+static final BitmapCharRec ch240 = new BitmapCharRec(6,10,-1,0,8,ch240data);
+
+/* char: 0xef */
+
+static final byte[] ch239data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x60,(byte) 0x0,(byte) 0x0,(byte) 0x50,(byte) 0x50,
+};
+
+static final BitmapCharRec ch239 = new BitmapCharRec(5,10,-1,0,8,ch239data);
+
+/* char: 0xee */
+
+static final byte[] ch238data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x60,(byte) 0x0,(byte) 0x0,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch238 = new BitmapCharRec(5,10,-1,0,8,ch238data);
+
+/* char: 0xed */
+
+static final byte[] ch237data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x60,(byte) 0x0,(byte) 0x0,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch237 = new BitmapCharRec(5,10,-1,0,8,ch237data);
+
+/* char: 0xec */
+
+static final byte[] ch236data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x60,(byte) 0x0,(byte) 0x0,(byte) 0x20,(byte) 0x40,
+};
+
+static final BitmapCharRec ch236 = new BitmapCharRec(5,10,-1,0,8,ch236data);
+
+/* char: 0xeb */
+
+static final byte[] ch235data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x80,(byte) 0xfc,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x48,(byte) 0x48,
+};
+
+static final BitmapCharRec ch235 = new BitmapCharRec(6,10,-1,0,8,ch235data);
+
+/* char: 0xea */
+
+static final byte[] ch234data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x80,(byte) 0xfc,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x48,(byte) 0x30,
+};
+
+static final BitmapCharRec ch234 = new BitmapCharRec(6,10,-1,0,8,ch234data);
+
+/* char: 0xe9 */
+
+static final byte[] ch233data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x80,(byte) 0xfc,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch233 = new BitmapCharRec(6,10,-1,0,8,ch233data);
+
+/* char: 0xe8 */
+
+static final byte[] ch232data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x80,(byte) 0xfc,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch232 = new BitmapCharRec(6,10,-1,0,8,ch232data);
+
+/* char: 0xe7 */
+
+static final byte[] ch231data = {
+(byte) 0x20,(byte) 0x10,(byte) 0x78,(byte) 0x84,(byte) 0x80,(byte) 0x80,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch231 = new BitmapCharRec(6,8,-1,2,8,ch231data);
+
+/* char: 0xe6 */
+
+static final byte[] ch230data = {
+(byte) 0x6c,(byte) 0x92,(byte) 0x90,(byte) 0x7c,(byte) 0x12,(byte) 0x6c,
+};
+
+static final BitmapCharRec ch230 = new BitmapCharRec(7,6,0,0,8,ch230data);
+
+/* char: 0xe5 */
+
+static final byte[] ch229data = {
+(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x7c,(byte) 0x4,(byte) 0x78,(byte) 0x0,(byte) 0x30,(byte) 0x48,(byte) 0x30,
+};
+
+static final BitmapCharRec ch229 = new BitmapCharRec(6,10,-1,0,8,ch229data);
+
+/* char: 0xe4 */
+
+static final byte[] ch228data = {
+(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x7c,(byte) 0x4,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x48,(byte) 0x48,
+};
+
+static final BitmapCharRec ch228 = new BitmapCharRec(6,10,-1,0,8,ch228data);
+
+/* char: 0xe3 */
+
+static final byte[] ch227data = {
+(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x7c,(byte) 0x4,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch227 = new BitmapCharRec(6,10,-1,0,8,ch227data);
+
+/* char: 0xe2 */
+
+static final byte[] ch226data = {
+(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x7c,(byte) 0x4,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x48,(byte) 0x30,
+};
+
+static final BitmapCharRec ch226 = new BitmapCharRec(6,10,-1,0,8,ch226data);
+
+/* char: 0xe1 */
+
+static final byte[] ch225data = {
+(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x7c,(byte) 0x4,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch225 = new BitmapCharRec(6,10,-1,0,8,ch225data);
+
+/* char: 0xe0 */
+
+static final byte[] ch224data = {
+(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x7c,(byte) 0x4,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch224 = new BitmapCharRec(6,10,-1,0,8,ch224data);
+
+/* char: 0xdf */
+
+static final byte[] ch223data = {
+(byte) 0x80,(byte) 0xb8,(byte) 0xc4,(byte) 0x84,(byte) 0x84,(byte) 0xf8,(byte) 0x84,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch223 = new BitmapCharRec(6,9,-1,1,8,ch223data);
+
+/* char: 0xde */
+
+static final byte[] ch222data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xf8,(byte) 0x80,
+};
+
+static final BitmapCharRec ch222 = new BitmapCharRec(6,9,-1,0,8,ch222data);
+
+/* char: 0xdd */
+
+static final byte[] ch221data = {
+(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x50,(byte) 0x88,(byte) 0x88,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch221 = new BitmapCharRec(5,10,-1,0,8,ch221data);
+
+/* char: 0xdc */
+
+static final byte[] ch220data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x48,(byte) 0x48,
+};
+
+static final BitmapCharRec ch220 = new BitmapCharRec(6,10,-1,0,8,ch220data);
+
+/* char: 0xdb */
+
+static final byte[] ch219data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x48,(byte) 0x30,
+};
+
+static final BitmapCharRec ch219 = new BitmapCharRec(6,10,-1,0,8,ch219data);
+
+/* char: 0xda */
+
+static final byte[] ch218data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch218 = new BitmapCharRec(6,10,-1,0,8,ch218data);
+
+/* char: 0xd9 */
+
+static final byte[] ch217data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch217 = new BitmapCharRec(6,10,-1,0,8,ch217data);
+
+/* char: 0xd8 */
+
+static final byte[] ch216data = {
+(byte) 0x80,(byte) 0x78,(byte) 0xc4,(byte) 0xa4,(byte) 0xa4,(byte) 0xa4,(byte) 0x94,(byte) 0x94,(byte) 0x8c,(byte) 0x78,(byte) 0x4,
+};
+
+static final BitmapCharRec ch216 = new BitmapCharRec(6,11,-1,1,8,ch216data);
+
+/* char: 0xd7 */
+
+static final byte[] ch215data = {
+(byte) 0x84,(byte) 0x48,(byte) 0x30,(byte) 0x30,(byte) 0x48,(byte) 0x84,
+};
+
+static final BitmapCharRec ch215 = new BitmapCharRec(6,6,-1,-1,8,ch215data);
+
+/* char: 0xd6 */
+
+static final byte[] ch214data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x28,(byte) 0x28,
+};
+
+static final BitmapCharRec ch214 = new BitmapCharRec(7,10,0,0,8,ch214data);
+
+/* char: 0xd5 */
+
+static final byte[] ch213data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x28,(byte) 0x14,
+};
+
+static final BitmapCharRec ch213 = new BitmapCharRec(7,10,0,0,8,ch213data);
+
+/* char: 0xd4 */
+
+static final byte[] ch212data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x24,(byte) 0x18,
+};
+
+static final BitmapCharRec ch212 = new BitmapCharRec(7,10,0,0,8,ch212data);
+
+/* char: 0xd3 */
+
+static final byte[] ch211data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x10,(byte) 0x8,
+};
+
+static final BitmapCharRec ch211 = new BitmapCharRec(7,10,0,0,8,ch211data);
+
+/* char: 0xd2 */
+
+static final byte[] ch210data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x8,(byte) 0x10,
+};
+
+static final BitmapCharRec ch210 = new BitmapCharRec(7,10,0,0,8,ch210data);
+
+/* char: 0xd1 */
+
+static final byte[] ch209data = {
+(byte) 0x82,(byte) 0x86,(byte) 0x8a,(byte) 0x92,(byte) 0xa2,(byte) 0xc2,(byte) 0x82,(byte) 0x0,(byte) 0x28,(byte) 0x14,
+};
+
+static final BitmapCharRec ch209 = new BitmapCharRec(7,10,0,0,8,ch209data);
+
+/* char: 0xd0 */
+
+static final byte[] ch208data = {
+(byte) 0xfc,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0xe2,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch208 = new BitmapCharRec(7,9,0,0,8,ch208data);
+
+/* char: 0xcf */
+
+static final byte[] ch207data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x0,(byte) 0x50,(byte) 0x50,
+};
+
+static final BitmapCharRec ch207 = new BitmapCharRec(5,10,-1,0,8,ch207data);
+
+/* char: 0xce */
+
+static final byte[] ch206data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x0,(byte) 0x48,(byte) 0x30,
+};
+
+static final BitmapCharRec ch206 = new BitmapCharRec(5,10,-1,0,8,ch206data);
+
+/* char: 0xcd */
+
+static final byte[] ch205data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch205 = new BitmapCharRec(5,10,-1,0,8,ch205data);
+
+/* char: 0xcc */
+
+static final byte[] ch204data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch204 = new BitmapCharRec(5,10,-1,0,8,ch204data);
+
+/* char: 0xcb */
+
+static final byte[] ch203data = {
+(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x0,(byte) 0x48,(byte) 0x48,
+};
+
+static final BitmapCharRec ch203 = new BitmapCharRec(6,10,-1,0,8,ch203data);
+
+/* char: 0xca */
+
+static final byte[] ch202data = {
+(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x0,(byte) 0x48,(byte) 0x30,
+};
+
+static final BitmapCharRec ch202 = new BitmapCharRec(6,10,-1,0,8,ch202data);
+
+/* char: 0xc9 */
+
+static final byte[] ch201data = {
+(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch201 = new BitmapCharRec(6,10,-1,0,8,ch201data);
+
+/* char: 0xc8 */
+
+static final byte[] ch200data = {
+(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch200 = new BitmapCharRec(6,10,-1,0,8,ch200data);
+
+/* char: 0xc7 */
+
+static final byte[] ch199data = {
+(byte) 0x20,(byte) 0x10,(byte) 0x78,(byte) 0x84,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch199 = new BitmapCharRec(6,11,-1,2,8,ch199data);
+
+/* char: 0xc6 */
+
+static final byte[] ch198data = {
+(byte) 0x9e,(byte) 0x90,(byte) 0x90,(byte) 0xf0,(byte) 0x9c,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x6e,
+};
+
+static final BitmapCharRec ch198 = new BitmapCharRec(7,9,0,0,8,ch198data);
+
+/* char: 0xc5 */
+
+static final byte[] ch197data = {
+(byte) 0x84,(byte) 0x84,(byte) 0xfc,(byte) 0x84,(byte) 0x84,(byte) 0x48,(byte) 0x30,(byte) 0x30,(byte) 0x48,(byte) 0x30,
+};
+
+static final BitmapCharRec ch197 = new BitmapCharRec(6,10,-1,0,8,ch197data);
+
+/* char: 0xc4 */
+
+static final byte[] ch196data = {
+(byte) 0x84,(byte) 0x84,(byte) 0xfc,(byte) 0x84,(byte) 0x84,(byte) 0x48,(byte) 0x30,(byte) 0x0,(byte) 0x48,(byte) 0x48,
+};
+
+static final BitmapCharRec ch196 = new BitmapCharRec(6,10,-1,0,8,ch196data);
+
+/* char: 0xc3 */
+
+static final byte[] ch195data = {
+(byte) 0x84,(byte) 0x84,(byte) 0xfc,(byte) 0x84,(byte) 0x84,(byte) 0x48,(byte) 0x30,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch195 = new BitmapCharRec(6,10,-1,0,8,ch195data);
+
+/* char: 0xc2 */
+
+static final byte[] ch194data = {
+(byte) 0x84,(byte) 0x84,(byte) 0xfc,(byte) 0x84,(byte) 0x84,(byte) 0x48,(byte) 0x30,(byte) 0x0,(byte) 0x48,(byte) 0x30,
+};
+
+static final BitmapCharRec ch194 = new BitmapCharRec(6,10,-1,0,8,ch194data);
+
+/* char: 0xc1 */
+
+static final byte[] ch193data = {
+(byte) 0x84,(byte) 0x84,(byte) 0xfc,(byte) 0x84,(byte) 0x84,(byte) 0x48,(byte) 0x30,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch193 = new BitmapCharRec(6,10,-1,0,8,ch193data);
+
+/* char: 0xc0 */
+
+static final byte[] ch192data = {
+(byte) 0x84,(byte) 0x84,(byte) 0xfc,(byte) 0x84,(byte) 0x84,(byte) 0x48,(byte) 0x30,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch192 = new BitmapCharRec(6,10,-1,0,8,ch192data);
+
+/* char: 0xbf */
+
+static final byte[] ch191data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x0,(byte) 0x20,
+};
+
+static final BitmapCharRec ch191 = new BitmapCharRec(6,9,-1,0,8,ch191data);
+
+/* char: 0xbe */
+
+static final byte[] ch190data = {
+(byte) 0x6,(byte) 0x1a,(byte) 0x12,(byte) 0xa,(byte) 0x66,(byte) 0x92,(byte) 0x10,(byte) 0x20,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch190 = new BitmapCharRec(7,10,0,0,8,ch190data);
+
+/* char: 0xbd */
+
+static final byte[] ch189data = {
+(byte) 0x1e,(byte) 0x10,(byte) 0xc,(byte) 0x2,(byte) 0xf2,(byte) 0x4c,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch189 = new BitmapCharRec(7,10,0,0,8,ch189data);
+
+/* char: 0xbc */
+
+static final byte[] ch188data = {
+(byte) 0x6,(byte) 0x1a,(byte) 0x12,(byte) 0xa,(byte) 0xe6,(byte) 0x42,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch188 = new BitmapCharRec(7,10,0,0,8,ch188data);
+
+/* char: 0xbb */
+
+static final byte[] ch187data = {
+(byte) 0x90,(byte) 0x48,(byte) 0x24,(byte) 0x12,(byte) 0x24,(byte) 0x48,(byte) 0x90,
+};
+
+static final BitmapCharRec ch187 = new BitmapCharRec(7,7,0,-1,8,ch187data);
+
+/* char: 0xba */
+
+static final byte[] ch186data = {
+(byte) 0xf0,(byte) 0x0,(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch186 = new BitmapCharRec(4,6,-1,-3,8,ch186data);
+
+/* char: 0xb9 */
+
+static final byte[] ch185data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch185 = new BitmapCharRec(3,6,-1,-4,8,ch185data);
+
+/* char: 0xb8 */
+
+static final byte[] ch184data = {
+(byte) 0xc0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch184 = new BitmapCharRec(2,2,-3,2,8,ch184data);
+
+/* char: 0xb7 */
+
+static final byte[] ch183data = {
+(byte) 0xc0,
+};
+
+static final BitmapCharRec ch183 = new BitmapCharRec(2,1,-3,-4,8,ch183data);
+
+/* char: 0xb6 */
+
+static final byte[] ch182data = {
+(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x68,(byte) 0xe8,(byte) 0xe8,(byte) 0xe8,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch182 = new BitmapCharRec(6,9,-1,0,8,ch182data);
+
+/* char: 0xb5 */
+
+static final byte[] ch181data = {
+(byte) 0x80,(byte) 0xb4,(byte) 0xcc,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,
+};
+
+static final BitmapCharRec ch181 = new BitmapCharRec(6,7,-1,1,8,ch181data);
+
+/* char: 0xb4 */
+
+static final byte[] ch180data = {
+(byte) 0x80,(byte) 0x40,
+};
+
+static final BitmapCharRec ch180 = new BitmapCharRec(2,2,-3,-8,8,ch180data);
+
+/* char: 0xb3 */
+
+static final byte[] ch179data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x10,(byte) 0x20,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch179 = new BitmapCharRec(4,6,-1,-4,8,ch179data);
+
+/* char: 0xb2 */
+
+static final byte[] ch178data = {
+(byte) 0xf0,(byte) 0x80,(byte) 0x60,(byte) 0x10,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch178 = new BitmapCharRec(4,6,-1,-4,8,ch178data);
+
+/* char: 0xb1 */
+
+static final byte[] ch177data = {
+(byte) 0xf8,(byte) 0x0,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x20,
+};
+
+static final BitmapCharRec ch177 = new BitmapCharRec(5,7,-1,-1,8,ch177data);
+
+/* char: 0xb0 */
+
+static final byte[] ch176data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch176 = new BitmapCharRec(4,4,-2,-5,8,ch176data);
+
+/* char: 0xaf */
+
+static final byte[] ch175data = {
+(byte) 0xfc,
+};
+
+static final BitmapCharRec ch175 = new BitmapCharRec(6,1,-1,-8,8,ch175data);
+
+/* char: 0xae */
+
+static final byte[] ch174data = {
+(byte) 0x38,(byte) 0x44,(byte) 0xaa,(byte) 0xb2,(byte) 0xaa,(byte) 0xaa,(byte) 0x92,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch174 = new BitmapCharRec(7,9,0,-1,8,ch174data);
+
+/* char: 0xad */
+
+static final byte[] ch173data = {
+(byte) 0xfc,
+};
+
+static final BitmapCharRec ch173 = new BitmapCharRec(6,1,-1,-4,8,ch173data);
+
+/* char: 0xac */
+
+static final byte[] ch172data = {
+(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch172 = new BitmapCharRec(6,4,-1,-1,8,ch172data);
+
+/* char: 0xab */
+
+static final byte[] ch171data = {
+(byte) 0x12,(byte) 0x24,(byte) 0x48,(byte) 0x90,(byte) 0x48,(byte) 0x24,(byte) 0x12,
+};
+
+static final BitmapCharRec ch171 = new BitmapCharRec(7,7,0,-1,8,ch171data);
+
+/* char: 0xaa */
+
+static final byte[] ch170data = {
+(byte) 0xf8,(byte) 0x0,(byte) 0x78,(byte) 0x88,(byte) 0x78,(byte) 0x8,(byte) 0x70,
+};
+
+static final BitmapCharRec ch170 = new BitmapCharRec(5,7,-1,-2,8,ch170data);
+
+/* char: 0xa9 */
+
+static final byte[] ch169data = {
+(byte) 0x38,(byte) 0x44,(byte) 0x92,(byte) 0xaa,(byte) 0xa2,(byte) 0xaa,(byte) 0x92,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch169 = new BitmapCharRec(7,9,0,-1,8,ch169data);
+
+/* char: 0xa8 */
+
+static final byte[] ch168data = {
+(byte) 0xd8,
+};
+
+static final BitmapCharRec ch168 = new BitmapCharRec(5,1,-1,-8,8,ch168data);
+
+/* char: 0xa7 */
+
+static final byte[] ch167data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x10,(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x60,(byte) 0x80,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch167 = new BitmapCharRec(4,10,-2,0,8,ch167data);
+
+/* char: 0xa6 */
+
+static final byte[] ch166data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch166 = new BitmapCharRec(1,9,-3,0,8,ch166data);
+
+/* char: 0xa5 */
+
+static final byte[] ch165data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x7c,(byte) 0x10,(byte) 0x7c,(byte) 0x28,(byte) 0x44,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch165 = new BitmapCharRec(7,9,0,0,8,ch165data);
+
+/* char: 0xa4 */
+
+static final byte[] ch164data = {
+(byte) 0x84,(byte) 0x78,(byte) 0x48,(byte) 0x48,(byte) 0x78,(byte) 0x84,
+};
+
+static final BitmapCharRec ch164 = new BitmapCharRec(6,6,-1,-1,8,ch164data);
+
+/* char: 0xa3 */
+
+static final byte[] ch163data = {
+(byte) 0xdc,(byte) 0x62,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x70,(byte) 0x20,(byte) 0x22,(byte) 0x1c,
+};
+
+static final BitmapCharRec ch163 = new BitmapCharRec(7,9,0,0,8,ch163data);
+
+/* char: 0xa2 */
+
+static final byte[] ch162data = {
+(byte) 0x20,(byte) 0x70,(byte) 0xa8,(byte) 0xa0,(byte) 0xa0,(byte) 0xa8,(byte) 0x70,(byte) 0x20,
+};
+
+static final BitmapCharRec ch162 = new BitmapCharRec(5,8,-1,-1,8,ch162data);
+
+/* char: 0xa1 */
+
+static final byte[] ch161data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,
+};
+
+static final BitmapCharRec ch161 = new BitmapCharRec(1,9,-3,0,8,ch161data);
+
+/* char: 0x7e '~' */
+
+static final byte[] ch126data = {
+(byte) 0x90,(byte) 0xa8,(byte) 0x48,
+};
+
+static final BitmapCharRec ch126 = new BitmapCharRec(5,3,-1,-6,8,ch126data);
+
+/* char: 0x7d '}' */
+
+static final byte[] ch125data = {
+(byte) 0xe0,(byte) 0x10,(byte) 0x10,(byte) 0x20,(byte) 0x18,(byte) 0x20,(byte) 0x10,(byte) 0x10,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch125 = new BitmapCharRec(5,9,-1,0,8,ch125data);
+
+/* char: 0x7c '|' */
+
+static final byte[] ch124data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch124 = new BitmapCharRec(1,9,-3,0,8,ch124data);
+
+/* char: 0x7b '{' */
+
+static final byte[] ch123data = {
+(byte) 0x38,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0xc0,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x38,
+};
+
+static final BitmapCharRec ch123 = new BitmapCharRec(5,9,-2,0,8,ch123data);
+
+/* char: 0x7a 'z' */
+
+static final byte[] ch122data = {
+(byte) 0xfc,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch122 = new BitmapCharRec(6,6,-1,0,8,ch122data);
+
+/* char: 0x79 'y' */
+
+static final byte[] ch121data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x4,(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x84,(byte) 0x84,
+};
+
+static final BitmapCharRec ch121 = new BitmapCharRec(6,8,-1,2,8,ch121data);
+
+/* char: 0x78 'x' */
+
+static final byte[] ch120data = {
+(byte) 0x84,(byte) 0x48,(byte) 0x30,(byte) 0x30,(byte) 0x48,(byte) 0x84,
+};
+
+static final BitmapCharRec ch120 = new BitmapCharRec(6,6,-1,0,8,ch120data);
+
+/* char: 0x77 'w' */
+
+static final byte[] ch119data = {
+(byte) 0x44,(byte) 0xaa,(byte) 0x92,(byte) 0x92,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch119 = new BitmapCharRec(7,6,0,0,8,ch119data);
+
+/* char: 0x76 'v' */
+
+static final byte[] ch118data = {
+(byte) 0x20,(byte) 0x50,(byte) 0x50,(byte) 0x88,(byte) 0x88,(byte) 0x88,
+};
+
+static final BitmapCharRec ch118 = new BitmapCharRec(5,6,-1,0,8,ch118data);
+
+/* char: 0x75 'u' */
+
+static final byte[] ch117data = {
+(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,
+};
+
+static final BitmapCharRec ch117 = new BitmapCharRec(6,6,-1,0,8,ch117data);
+
+/* char: 0x74 't' */
+
+static final byte[] ch116data = {
+(byte) 0x38,(byte) 0x44,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xf8,(byte) 0x40,(byte) 0x40,
+};
+
+static final BitmapCharRec ch116 = new BitmapCharRec(6,8,-1,0,8,ch116data);
+
+/* char: 0x73 's' */
+
+static final byte[] ch115data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x18,(byte) 0x60,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch115 = new BitmapCharRec(6,6,-1,0,8,ch115data);
+
+/* char: 0x72 'r' */
+
+static final byte[] ch114data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x44,(byte) 0xb8,
+};
+
+static final BitmapCharRec ch114 = new BitmapCharRec(6,6,-1,0,8,ch114data);
+
+/* char: 0x71 'q' */
+
+static final byte[] ch113data = {
+(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x8c,(byte) 0x74,
+};
+
+static final BitmapCharRec ch113 = new BitmapCharRec(6,8,-1,2,8,ch113data);
+
+/* char: 0x70 'p' */
+
+static final byte[] ch112data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xb8,(byte) 0xc4,(byte) 0x84,(byte) 0xc4,(byte) 0xb8,
+};
+
+static final BitmapCharRec ch112 = new BitmapCharRec(6,8,-1,2,8,ch112data);
+
+/* char: 0x6f 'o' */
+
+static final byte[] ch111data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch111 = new BitmapCharRec(6,6,-1,0,8,ch111data);
+
+/* char: 0x6e 'n' */
+
+static final byte[] ch110data = {
+(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xc4,(byte) 0xb8,
+};
+
+static final BitmapCharRec ch110 = new BitmapCharRec(6,6,-1,0,8,ch110data);
+
+/* char: 0x6d 'm' */
+
+static final byte[] ch109data = {
+(byte) 0x82,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0xec,
+};
+
+static final BitmapCharRec ch109 = new BitmapCharRec(7,6,0,0,8,ch109data);
+
+/* char: 0x6c 'l' */
+
+static final byte[] ch108data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x60,
+};
+
+static final BitmapCharRec ch108 = new BitmapCharRec(5,9,-1,0,8,ch108data);
+
+/* char: 0x6b 'k' */
+
+static final byte[] ch107data = {
+(byte) 0x84,(byte) 0x88,(byte) 0x90,(byte) 0xe0,(byte) 0x90,(byte) 0x88,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch107 = new BitmapCharRec(6,9,-1,0,8,ch107data);
+
+/* char: 0x6a 'j' */
+
+static final byte[] ch106data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x18,(byte) 0x0,(byte) 0x8,
+};
+
+static final BitmapCharRec ch106 = new BitmapCharRec(5,10,-1,2,8,ch106data);
+
+/* char: 0x69 'i' */
+
+static final byte[] ch105data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x60,(byte) 0x0,(byte) 0x20,
+};
+
+static final BitmapCharRec ch105 = new BitmapCharRec(5,8,-1,0,8,ch105data);
+
+/* char: 0x68 'h' */
+
+static final byte[] ch104data = {
+(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xc4,(byte) 0xb8,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch104 = new BitmapCharRec(6,9,-1,0,8,ch104data);
+
+/* char: 0x67 'g' */
+
+static final byte[] ch103data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x78,(byte) 0x80,(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x74,
+};
+
+static final BitmapCharRec ch103 = new BitmapCharRec(6,8,-1,2,8,ch103data);
+
+/* char: 0x66 'f' */
+
+static final byte[] ch102data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xf8,(byte) 0x40,(byte) 0x40,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch102 = new BitmapCharRec(6,9,-1,0,8,ch102data);
+
+/* char: 0x65 'e' */
+
+static final byte[] ch101data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x80,(byte) 0xfc,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch101 = new BitmapCharRec(6,6,-1,0,8,ch101data);
+
+/* char: 0x64 'd' */
+
+static final byte[] ch100data = {
+(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x84,(byte) 0x8c,(byte) 0x74,(byte) 0x4,(byte) 0x4,(byte) 0x4,
+};
+
+static final BitmapCharRec ch100 = new BitmapCharRec(6,9,-1,0,8,ch100data);
+
+/* char: 0x63 'c' */
+
+static final byte[] ch99data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x80,(byte) 0x80,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch99 = new BitmapCharRec(6,6,-1,0,8,ch99data);
+
+/* char: 0x62 'b' */
+
+static final byte[] ch98data = {
+(byte) 0xb8,(byte) 0xc4,(byte) 0x84,(byte) 0x84,(byte) 0xc4,(byte) 0xb8,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch98 = new BitmapCharRec(6,9,-1,0,8,ch98data);
+
+/* char: 0x61 'a' */
+
+static final byte[] ch97data = {
+(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x7c,(byte) 0x4,(byte) 0x78,
+};
+
+static final BitmapCharRec ch97 = new BitmapCharRec(6,6,-1,0,8,ch97data);
+
+/* char: 0x60 '`' */
+
+static final byte[] ch96data = {
+(byte) 0x10,(byte) 0x60,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch96 = new BitmapCharRec(4,3,-2,-6,8,ch96data);
+
+/* char: 0x5f '_' */
+
+static final byte[] ch95data = {
+(byte) 0xfe,
+};
+
+static final BitmapCharRec ch95 = new BitmapCharRec(7,1,0,1,8,ch95data);
+
+/* char: 0x5e '^' */
+
+static final byte[] ch94data = {
+(byte) 0x88,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch94 = new BitmapCharRec(5,3,-1,-6,8,ch94data);
+
+/* char: 0x5d ']' */
+
+static final byte[] ch93data = {
+(byte) 0xf0,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch93 = new BitmapCharRec(4,9,-1,0,8,ch93data);
+
+/* char: 0x5c '\' */
+
+static final byte[] ch92data = {
+(byte) 0x2,(byte) 0x2,(byte) 0x4,(byte) 0x8,(byte) 0x10,(byte) 0x20,(byte) 0x40,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch92 = new BitmapCharRec(7,9,0,0,8,ch92data);
+
+/* char: 0x5b '[' */
+
+static final byte[] ch91data = {
+(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch91 = new BitmapCharRec(4,9,-2,0,8,ch91data);
+
+/* char: 0x5a 'Z' */
+
+static final byte[] ch90data = {
+(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0x4,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch90 = new BitmapCharRec(6,9,-1,0,8,ch90data);
+
+/* char: 0x59 'Y' */
+
+static final byte[] ch89data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x44,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch89 = new BitmapCharRec(7,9,0,0,8,ch89data);
+
+/* char: 0x58 'X' */
+
+static final byte[] ch88data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x28,(byte) 0x44,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch88 = new BitmapCharRec(7,9,0,0,8,ch88data);
+
+/* char: 0x57 'W' */
+
+static final byte[] ch87data = {
+(byte) 0x44,(byte) 0xaa,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch87 = new BitmapCharRec(7,9,0,0,8,ch87data);
+
+/* char: 0x56 'V' */
+
+static final byte[] ch86data = {
+(byte) 0x10,(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch86 = new BitmapCharRec(7,9,0,0,8,ch86data);
+
+/* char: 0x55 'U' */
+
+static final byte[] ch85data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,
+};
+
+static final BitmapCharRec ch85 = new BitmapCharRec(6,9,-1,0,8,ch85data);
+
+/* char: 0x54 'T' */
+
+static final byte[] ch84data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch84 = new BitmapCharRec(7,9,0,0,8,ch84data);
+
+/* char: 0x53 'S' */
+
+static final byte[] ch83data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x4,(byte) 0x4,(byte) 0x78,(byte) 0x80,(byte) 0x80,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch83 = new BitmapCharRec(6,9,-1,0,8,ch83data);
+
+/* char: 0x52 'R' */
+
+static final byte[] ch82data = {
+(byte) 0x84,(byte) 0x88,(byte) 0x90,(byte) 0xa0,(byte) 0xf8,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch82 = new BitmapCharRec(6,9,-1,0,8,ch82data);
+
+/* char: 0x51 'Q' */
+
+static final byte[] ch81data = {
+(byte) 0x4,(byte) 0x78,(byte) 0x94,(byte) 0xa4,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch81 = new BitmapCharRec(6,10,-1,1,8,ch81data);
+
+/* char: 0x50 'P' */
+
+static final byte[] ch80data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch80 = new BitmapCharRec(6,9,-1,0,8,ch80data);
+
+/* char: 0x4f 'O' */
+
+static final byte[] ch79data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch79 = new BitmapCharRec(6,9,-1,0,8,ch79data);
+
+/* char: 0x4e 'N' */
+
+static final byte[] ch78data = {
+(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x8c,(byte) 0x94,(byte) 0xa4,(byte) 0xc4,(byte) 0x84,(byte) 0x84,
+};
+
+static final BitmapCharRec ch78 = new BitmapCharRec(6,9,-1,0,8,ch78data);
+
+/* char: 0x4d 'M' */
+
+static final byte[] ch77data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x92,(byte) 0x92,(byte) 0xaa,(byte) 0xc6,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch77 = new BitmapCharRec(7,9,0,0,8,ch77data);
+
+/* char: 0x4c 'L' */
+
+static final byte[] ch76data = {
+(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch76 = new BitmapCharRec(6,9,-1,0,8,ch76data);
+
+/* char: 0x4b 'K' */
+
+static final byte[] ch75data = {
+(byte) 0x84,(byte) 0x88,(byte) 0x90,(byte) 0xa0,(byte) 0xc0,(byte) 0xa0,(byte) 0x90,(byte) 0x88,(byte) 0x84,
+};
+
+static final BitmapCharRec ch75 = new BitmapCharRec(6,9,-1,0,8,ch75data);
+
+/* char: 0x4a 'J' */
+
+static final byte[] ch74data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch74 = new BitmapCharRec(6,9,-1,0,8,ch74data);
+
+/* char: 0x49 'I' */
+
+static final byte[] ch73data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch73 = new BitmapCharRec(5,9,-1,0,8,ch73data);
+
+/* char: 0x48 'H' */
+
+static final byte[] ch72data = {
+(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xfc,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,
+};
+
+static final BitmapCharRec ch72 = new BitmapCharRec(6,9,-1,0,8,ch72data);
+
+/* char: 0x47 'G' */
+
+static final byte[] ch71data = {
+(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x9c,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch71 = new BitmapCharRec(6,9,-1,0,8,ch71data);
+
+/* char: 0x46 'F' */
+
+static final byte[] ch70data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch70 = new BitmapCharRec(6,9,-1,0,8,ch70data);
+
+/* char: 0x45 'E' */
+
+static final byte[] ch69data = {
+(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch69 = new BitmapCharRec(6,9,-1,0,8,ch69data);
+
+/* char: 0x44 'D' */
+
+static final byte[] ch68data = {
+(byte) 0xfc,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch68 = new BitmapCharRec(7,9,0,0,8,ch68data);
+
+/* char: 0x43 'C' */
+
+static final byte[] ch67data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch67 = new BitmapCharRec(6,9,-1,0,8,ch67data);
+
+/* char: 0x42 'B' */
+
+static final byte[] ch66data = {
+(byte) 0xfc,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x7c,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch66 = new BitmapCharRec(7,9,0,0,8,ch66data);
+
+/* char: 0x41 'A' */
+
+static final byte[] ch65data = {
+(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xfc,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x48,(byte) 0x30,
+};
+
+static final BitmapCharRec ch65 = new BitmapCharRec(6,9,-1,0,8,ch65data);
+
+/* char: 0x40 '@' */
+
+static final byte[] ch64data = {
+(byte) 0x78,(byte) 0x80,(byte) 0x94,(byte) 0xac,(byte) 0xa4,(byte) 0x9c,(byte) 0x84,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch64 = new BitmapCharRec(6,9,-1,0,8,ch64data);
+
+/* char: 0x3f '?' */
+
+static final byte[] ch63data = {
+(byte) 0x10,(byte) 0x0,(byte) 0x10,(byte) 0x10,(byte) 0x8,(byte) 0x4,(byte) 0x84,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch63 = new BitmapCharRec(6,9,-1,0,8,ch63data);
+
+/* char: 0x3e '>' */
+
+static final byte[] ch62data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0x10,(byte) 0x20,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch62 = new BitmapCharRec(5,9,-1,0,8,ch62data);
+
+/* char: 0x3d '=' */
+
+static final byte[] ch61data = {
+(byte) 0xfc,(byte) 0x0,(byte) 0x0,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch61 = new BitmapCharRec(6,4,-1,-2,8,ch61data);
+
+/* char: 0x3c '<' */
+
+static final byte[] ch60data = {
+(byte) 0x8,(byte) 0x10,(byte) 0x20,(byte) 0x40,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,
+};
+
+static final BitmapCharRec ch60 = new BitmapCharRec(5,9,-2,0,8,ch60data);
+
+/* char: 0x3b ';' */
+
+static final byte[] ch59data = {
+(byte) 0x80,(byte) 0x60,(byte) 0x70,(byte) 0x0,(byte) 0x0,(byte) 0x20,(byte) 0x70,(byte) 0x20,
+};
+
+static final BitmapCharRec ch59 = new BitmapCharRec(4,8,-1,1,8,ch59data);
+
+/* char: 0x3a ':' */
+
+static final byte[] ch58data = {
+(byte) 0x40,(byte) 0xe0,(byte) 0x40,(byte) 0x0,(byte) 0x0,(byte) 0x40,(byte) 0xe0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch58 = new BitmapCharRec(3,8,-2,1,8,ch58data);
+
+/* char: 0x39 '9' */
+
+static final byte[] ch57data = {
+(byte) 0x70,(byte) 0x8,(byte) 0x4,(byte) 0x4,(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch57 = new BitmapCharRec(6,9,-1,0,8,ch57data);
+
+/* char: 0x38 '8' */
+
+static final byte[] ch56data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch56 = new BitmapCharRec(6,9,-1,0,8,ch56data);
+
+/* char: 0x37 '7' */
+
+static final byte[] ch55data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x10,(byte) 0x10,(byte) 0x8,(byte) 0x4,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch55 = new BitmapCharRec(6,9,-1,0,8,ch55data);
+
+/* char: 0x36 '6' */
+
+static final byte[] ch54data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0xc4,(byte) 0xb8,(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x38,
+};
+
+static final BitmapCharRec ch54 = new BitmapCharRec(6,9,-1,0,8,ch54data);
+
+/* char: 0x35 '5' */
+
+static final byte[] ch53data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x4,(byte) 0x4,(byte) 0xc4,(byte) 0xb8,(byte) 0x80,(byte) 0x80,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch53 = new BitmapCharRec(6,9,-1,0,8,ch53data);
+
+/* char: 0x34 '4' */
+
+static final byte[] ch52data = {
+(byte) 0x8,(byte) 0x8,(byte) 0xfc,(byte) 0x88,(byte) 0x88,(byte) 0x48,(byte) 0x28,(byte) 0x18,(byte) 0x8,
+};
+
+static final BitmapCharRec ch52 = new BitmapCharRec(6,9,-1,0,8,ch52data);
+
+/* char: 0x33 '3' */
+
+static final byte[] ch51data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x4,(byte) 0x4,(byte) 0x38,(byte) 0x10,(byte) 0x8,(byte) 0x4,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch51 = new BitmapCharRec(6,9,-1,0,8,ch51data);
+
+/* char: 0x32 '2' */
+
+static final byte[] ch50data = {
+(byte) 0xfc,(byte) 0x80,(byte) 0x40,(byte) 0x30,(byte) 0x8,(byte) 0x4,(byte) 0x84,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch50 = new BitmapCharRec(6,9,-1,0,8,ch50data);
+
+/* char: 0x31 '1' */
+
+static final byte[] ch49data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xa0,(byte) 0x60,(byte) 0x20,
+};
+
+static final BitmapCharRec ch49 = new BitmapCharRec(5,9,-1,0,8,ch49data);
+
+/* char: 0x30 '0' */
+
+static final byte[] ch48data = {
+(byte) 0x30,(byte) 0x48,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x48,(byte) 0x30,
+};
+
+static final BitmapCharRec ch48 = new BitmapCharRec(6,9,-1,0,8,ch48data);
+
+/* char: 0x2f '/' */
+
+static final byte[] ch47data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0x4,(byte) 0x2,(byte) 0x2,
+};
+
+static final BitmapCharRec ch47 = new BitmapCharRec(7,9,0,0,8,ch47data);
+
+/* char: 0x2e '.' */
+
+static final byte[] ch46data = {
+(byte) 0x40,(byte) 0xe0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch46 = new BitmapCharRec(3,3,-2,1,8,ch46data);
+
+/* char: 0x2d '-' */
+
+static final byte[] ch45data = {
+(byte) 0xfc,
+};
+
+static final BitmapCharRec ch45 = new BitmapCharRec(6,1,-1,-4,8,ch45data);
+
+/* char: 0x2c ',' */
+
+static final byte[] ch44data = {
+(byte) 0x80,(byte) 0x60,(byte) 0x70,
+};
+
+static final BitmapCharRec ch44 = new BitmapCharRec(4,3,-1,1,8,ch44data);
+
+/* char: 0x2b '+' */
+
+static final byte[] ch43data = {
+(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x20,
+};
+
+static final BitmapCharRec ch43 = new BitmapCharRec(5,5,-1,-2,8,ch43data);
+
+/* char: 0x2a '*' */
+
+static final byte[] ch42data = {
+(byte) 0x48,(byte) 0x30,(byte) 0xfc,(byte) 0x30,(byte) 0x48,
+};
+
+static final BitmapCharRec ch42 = new BitmapCharRec(6,5,-1,-2,8,ch42data);
+
+/* char: 0x29 ')' */
+
+static final byte[] ch41data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch41 = new BitmapCharRec(3,9,-2,0,8,ch41data);
+
+/* char: 0x28 '(' */
+
+static final byte[] ch40data = {
+(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch40 = new BitmapCharRec(3,9,-3,0,8,ch40data);
+
+/* char: 0x27 ''' */
+
+static final byte[] ch39data = {
+(byte) 0x80,(byte) 0x60,(byte) 0x70,
+};
+
+static final BitmapCharRec ch39 = new BitmapCharRec(4,3,-1,-6,8,ch39data);
+
+/* char: 0x26 '&' */
+
+static final byte[] ch38data = {
+(byte) 0x74,(byte) 0x88,(byte) 0x94,(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch38 = new BitmapCharRec(6,7,-1,0,8,ch38data);
+
+/* char: 0x25 '%' */
+
+static final byte[] ch37data = {
+(byte) 0x88,(byte) 0x54,(byte) 0x48,(byte) 0x20,(byte) 0x10,(byte) 0x10,(byte) 0x48,(byte) 0xa4,(byte) 0x44,
+};
+
+static final BitmapCharRec ch37 = new BitmapCharRec(6,9,-1,0,8,ch37data);
+
+/* char: 0x24 '$' */
+
+static final byte[] ch36data = {
+(byte) 0x20,(byte) 0xf0,(byte) 0x28,(byte) 0x70,(byte) 0xa0,(byte) 0x78,(byte) 0x20,
+};
+
+static final BitmapCharRec ch36 = new BitmapCharRec(5,7,-1,-1,8,ch36data);
+
+/* char: 0x23 '#' */
+
+static final byte[] ch35data = {
+(byte) 0x48,(byte) 0x48,(byte) 0xfc,(byte) 0x48,(byte) 0xfc,(byte) 0x48,(byte) 0x48,
+};
+
+static final BitmapCharRec ch35 = new BitmapCharRec(6,7,-1,-1,8,ch35data);
+
+/* char: 0x22 '"' */
+
+static final byte[] ch34data = {
+(byte) 0x90,(byte) 0x90,(byte) 0x90,
+};
+
+static final BitmapCharRec ch34 = new BitmapCharRec(4,3,-2,-6,8,ch34data);
+
+/* char: 0x21 '!' */
+
+static final byte[] ch33data = {
+(byte) 0x80,(byte) 0x0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch33 = new BitmapCharRec(1,9,-3,0,8,ch33data);
+
+/* char: 0x1f */
+
+static final byte[] ch31data = {
+(byte) 0x80,
+};
+
+static final BitmapCharRec ch31 = new BitmapCharRec(1,1,-3,-3,8,ch31data);
+
+/* char: 0x1e */
+
+static final byte[] ch30data = {
+(byte) 0xdc,(byte) 0x62,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x70,(byte) 0x20,(byte) 0x22,(byte) 0x1c,
+};
+
+static final BitmapCharRec ch30 = new BitmapCharRec(7,9,0,0,8,ch30data);
+
+/* char: 0x1d */
+
+static final byte[] ch29data = {
+(byte) 0x80,(byte) 0x40,(byte) 0xfe,(byte) 0x10,(byte) 0xfe,(byte) 0x4,(byte) 0x2,
+};
+
+static final BitmapCharRec ch29 = new BitmapCharRec(7,7,0,0,8,ch29data);
+
+/* char: 0x1c */
+
+static final byte[] ch28data = {
+(byte) 0x88,(byte) 0x48,(byte) 0x48,(byte) 0x48,(byte) 0x48,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch28 = new BitmapCharRec(6,6,-1,0,8,ch28data);
+
+/* char: 0x1b */
+
+static final byte[] ch27data = {
+(byte) 0xfe,(byte) 0x80,(byte) 0x20,(byte) 0x8,(byte) 0x2,(byte) 0x8,(byte) 0x20,(byte) 0x80,
+};
+
+static final BitmapCharRec ch27 = new BitmapCharRec(7,8,0,0,8,ch27data);
+
+/* char: 0x1a */
+
+static final byte[] ch26data = {
+(byte) 0xfe,(byte) 0x2,(byte) 0x8,(byte) 0x20,(byte) 0x80,(byte) 0x20,(byte) 0x8,(byte) 0x2,
+};
+
+static final BitmapCharRec ch26 = new BitmapCharRec(7,8,0,0,8,ch26data);
+
+/* char: 0x19 */
+
+static final byte[] ch25data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch25 = new BitmapCharRec(1,13,-3,2,8,ch25data);
+
+/* char: 0x18 */
+
+static final byte[] ch24data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xff,
+};
+
+static final BitmapCharRec ch24 = new BitmapCharRec(8,6,0,2,8,ch24data);
+
+/* char: 0x17 */
+
+static final byte[] ch23data = {
+(byte) 0xff,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,
+};
+
+static final BitmapCharRec ch23 = new BitmapCharRec(8,8,0,-3,8,ch23data);
+
+/* char: 0x16 */
+
+static final byte[] ch22data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xf0,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,
+};
+
+static final BitmapCharRec ch22 = new BitmapCharRec(4,13,0,2,8,ch22data);
+
+/* char: 0x15 */
+
+static final byte[] ch21data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch21 = new BitmapCharRec(5,13,-3,2,8,ch21data);
+
+/* char: 0x14 */
+
+static final byte[] ch20data = {
+(byte) 0xff,
+};
+
+static final BitmapCharRec ch20 = new BitmapCharRec(8,1,0,1,8,ch20data);
+
+/* char: 0x13 */
+
+static final byte[] ch19data = {
+(byte) 0xff,
+};
+
+static final BitmapCharRec ch19 = new BitmapCharRec(8,1,0,-1,8,ch19data);
+
+/* char: 0x12 */
+
+static final byte[] ch18data = {
+(byte) 0xff,
+};
+
+static final BitmapCharRec ch18 = new BitmapCharRec(8,1,0,-3,8,ch18data);
+
+/* char: 0x11 */
+
+static final byte[] ch17data = {
+(byte) 0xff,
+};
+
+static final BitmapCharRec ch17 = new BitmapCharRec(8,1,0,-5,8,ch17data);
+
+/* char: 0x10 */
+
+static final byte[] ch16data = {
+(byte) 0xff,
+};
+
+static final BitmapCharRec ch16 = new BitmapCharRec(8,1,0,-7,8,ch16data);
+
+/* char: 0xf */
+
+static final byte[] ch15data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xff,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,
+};
+
+static final BitmapCharRec ch15 = new BitmapCharRec(8,13,0,2,8,ch15data);
+
+/* char: 0xe */
+
+static final byte[] ch14data = {
+(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch14 = new BitmapCharRec(5,8,-3,-3,8,ch14data);
+
+/* char: 0xd */
+
+static final byte[] ch13data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch13 = new BitmapCharRec(5,6,-3,2,8,ch13data);
+
+/* char: 0xc */
+
+static final byte[] ch12data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch12 = new BitmapCharRec(4,6,0,2,8,ch12data);
+
+/* char: 0xb */
+
+static final byte[] ch11data = {
+(byte) 0xf0,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,
+};
+
+static final BitmapCharRec ch11 = new BitmapCharRec(4,8,0,-3,8,ch11data);
+
+/* char: 0xa */
+
+static final byte[] ch10data = {
+(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x3e,(byte) 0x20,(byte) 0x50,(byte) 0x88,(byte) 0x88,
+};
+
+static final BitmapCharRec ch10 = new BitmapCharRec(7,9,0,2,8,ch10data);
+
+/* char: 0x9 */
+
+static final byte[] ch9data = {
+(byte) 0x3e,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x88,(byte) 0x98,(byte) 0xa8,(byte) 0xc8,(byte) 0x88,
+};
+
+static final BitmapCharRec ch9 = new BitmapCharRec(7,9,0,2,8,ch9data);
+
+/* char: 0x8 */
+
+static final byte[] ch8data = {
+(byte) 0xfe,(byte) 0x10,(byte) 0x10,(byte) 0xfe,(byte) 0x10,(byte) 0x10,
+};
+
+static final BitmapCharRec ch8 = new BitmapCharRec(7,6,0,0,8,ch8data);
+
+/* char: 0x7 */
+
+static final byte[] ch7data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch7 = new BitmapCharRec(5,4,-1,-5,8,ch7data);
+
+/* char: 0x6 */
+
+static final byte[] ch6data = {
+(byte) 0x20,(byte) 0x20,(byte) 0x3c,(byte) 0x20,(byte) 0x3e,(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch6 = new BitmapCharRec(7,9,0,2,8,ch6data);
+
+/* char: 0x5 */
+
+static final byte[] ch5data = {
+(byte) 0x22,(byte) 0x22,(byte) 0x3c,(byte) 0x22,(byte) 0x3c,(byte) 0x78,(byte) 0x80,(byte) 0x80,(byte) 0x78,
+};
+
+static final BitmapCharRec ch5 = new BitmapCharRec(7,9,0,2,8,ch5data);
+
+/* char: 0x4 */
+
+static final byte[] ch4data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x1c,(byte) 0x10,(byte) 0x9e,(byte) 0x80,(byte) 0xe0,(byte) 0x80,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch4 = new BitmapCharRec(7,9,0,2,8,ch4data);
+
+/* char: 0x3 */
+
+static final byte[] ch3data = {
+(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x3e,(byte) 0x88,(byte) 0x88,(byte) 0xf8,(byte) 0x88,(byte) 0x88,
+};
+
+static final BitmapCharRec ch3 = new BitmapCharRec(7,9,0,2,8,ch3data);
+
+/* char: 0x2 */
+
+static final byte[] ch2data = {
+(byte) 0x55,(byte) 0xaa,(byte) 0x55,(byte) 0xaa,(byte) 0x55,(byte) 0xaa,(byte) 0x55,(byte) 0xaa,(byte) 0x55,(byte) 0xaa,(byte) 0x55,(byte) 0xaa,
+};
+
+static final BitmapCharRec ch2 = new BitmapCharRec(8,12,0,2,8,ch2data);
+
+/* char: 0x1 */
+
+static final byte[] ch1data = {
+(byte) 0x10,(byte) 0x38,(byte) 0x7c,(byte) 0xfe,(byte) 0x7c,(byte) 0x38,(byte) 0x10,
+};
+
+static final BitmapCharRec ch1 = new BitmapCharRec(7,7,0,-1,8,ch1data);
+
+static final BitmapCharRec[] chars = {
+ch0,
+ch1,
+ch2,
+ch3,
+ch4,
+ch5,
+ch6,
+ch7,
+ch8,
+ch9,
+ch10,
+ch11,
+ch12,
+ch13,
+ch14,
+ch15,
+ch16,
+ch17,
+ch18,
+ch19,
+ch20,
+ch21,
+ch22,
+ch23,
+ch24,
+ch25,
+ch26,
+ch27,
+ch28,
+ch29,
+ch30,
+ch31,
+ch32,
+ch33,
+ch34,
+ch35,
+ch36,
+ch37,
+ch38,
+ch39,
+ch40,
+ch41,
+ch42,
+ch43,
+ch44,
+ch45,
+ch46,
+ch47,
+ch48,
+ch49,
+ch50,
+ch51,
+ch52,
+ch53,
+ch54,
+ch55,
+ch56,
+ch57,
+ch58,
+ch59,
+ch60,
+ch61,
+ch62,
+ch63,
+ch64,
+ch65,
+ch66,
+ch67,
+ch68,
+ch69,
+ch70,
+ch71,
+ch72,
+ch73,
+ch74,
+ch75,
+ch76,
+ch77,
+ch78,
+ch79,
+ch80,
+ch81,
+ch82,
+ch83,
+ch84,
+ch85,
+ch86,
+ch87,
+ch88,
+ch89,
+ch90,
+ch91,
+ch92,
+ch93,
+ch94,
+ch95,
+ch96,
+ch97,
+ch98,
+ch99,
+ch100,
+ch101,
+ch102,
+ch103,
+ch104,
+ch105,
+ch106,
+ch107,
+ch108,
+ch109,
+ch110,
+ch111,
+ch112,
+ch113,
+ch114,
+ch115,
+ch116,
+ch117,
+ch118,
+ch119,
+ch120,
+ch121,
+ch122,
+ch123,
+ch124,
+ch125,
+ch126,
+ch127,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+ch160,
+ch161,
+ch162,
+ch163,
+ch164,
+ch165,
+ch166,
+ch167,
+ch168,
+ch169,
+ch170,
+ch171,
+ch172,
+ch173,
+ch174,
+ch175,
+ch176,
+ch177,
+ch178,
+ch179,
+ch180,
+ch181,
+ch182,
+ch183,
+ch184,
+ch185,
+ch186,
+ch187,
+ch188,
+ch189,
+ch190,
+ch191,
+ch192,
+ch193,
+ch194,
+ch195,
+ch196,
+ch197,
+ch198,
+ch199,
+ch200,
+ch201,
+ch202,
+ch203,
+ch204,
+ch205,
+ch206,
+ch207,
+ch208,
+ch209,
+ch210,
+ch211,
+ch212,
+ch213,
+ch214,
+ch215,
+ch216,
+ch217,
+ch218,
+ch219,
+ch220,
+ch221,
+ch222,
+ch223,
+ch224,
+ch225,
+ch226,
+ch227,
+ch228,
+ch229,
+ch230,
+ch231,
+ch232,
+ch233,
+ch234,
+ch235,
+ch236,
+ch237,
+ch238,
+ch239,
+ch240,
+ch241,
+ch242,
+ch243,
+ch244,
+ch245,
+ch246,
+ch247,
+ch248,
+ch249,
+ch250,
+ch251,
+ch252,
+ch253,
+ch254,
+ch255,
+};
+
+ public static final BitmapFontRec glutBitmap8By13 = new BitmapFontRec("-misc-fixed-medium-r-normal--13-120-75-75-C-80-iso8859-1",
+ 256,
+ 0,
+ chars);
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTBitmap9x15.java b/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTBitmap9x15.java
new file mode 100644
index 000000000..5d357f3f7
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTBitmap9x15.java
@@ -0,0 +1,2079 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.util.gl2;
+
+class GLUTBitmap9x15 {
+
+/* GENERATED FILE -- DO NOT MODIFY */
+
+static final BitmapCharRec ch0 = new BitmapCharRec(0,0,0,0,9,null);
+
+static final BitmapCharRec ch32 = new BitmapCharRec(0,0,0,0,9,null);
+
+static final BitmapCharRec ch127 = new BitmapCharRec(0,0,0,0,9,null);
+
+static final BitmapCharRec ch160 = new BitmapCharRec(0,0,0,0,9,null);
+
+/* char: 0xff */
+
+static final byte[] ch255data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x4,(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x0,(byte) 0x28,(byte) 0x28,
+};
+
+static final BitmapCharRec ch255 = new BitmapCharRec(6,14,-1,3,9,ch255data);
+
+/* char: 0xfe */
+
+static final byte[] ch254data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xbc,(byte) 0xc2,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xc2,(byte) 0xbc,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch254 = new BitmapCharRec(7,12,-1,3,9,ch254data);
+
+/* char: 0xfd */
+
+static final byte[] ch253data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x4,(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x0,(byte) 0x30,(byte) 0x8,
+};
+
+static final BitmapCharRec ch253 = new BitmapCharRec(6,14,-1,3,9,ch253data);
+
+/* char: 0xfc */
+
+static final byte[] ch252data = {
+(byte) 0x7a,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x0,(byte) 0x28,(byte) 0x28,
+};
+
+static final BitmapCharRec ch252 = new BitmapCharRec(7,11,-1,0,9,ch252data);
+
+/* char: 0xfb */
+
+static final byte[] ch251data = {
+(byte) 0x7a,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x0,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch251 = new BitmapCharRec(7,11,-1,0,9,ch251data);
+
+/* char: 0xfa */
+
+static final byte[] ch250data = {
+(byte) 0x7a,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x0,(byte) 0x30,(byte) 0x8,
+};
+
+static final BitmapCharRec ch250 = new BitmapCharRec(7,11,-1,0,9,ch250data);
+
+/* char: 0xf9 */
+
+static final byte[] ch249data = {
+(byte) 0x7a,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x0,(byte) 0x18,(byte) 0x20,
+};
+
+static final BitmapCharRec ch249 = new BitmapCharRec(7,11,-1,0,9,ch249data);
+
+/* char: 0xf8 */
+
+static final byte[] ch248data = {
+(byte) 0x80,(byte) 0x7c,(byte) 0xa2,(byte) 0xa2,(byte) 0x92,(byte) 0x8a,(byte) 0x8a,(byte) 0x7c,(byte) 0x2,
+};
+
+static final BitmapCharRec ch248 = new BitmapCharRec(7,9,-1,1,9,ch248data);
+
+/* char: 0xf7 */
+
+static final byte[] ch247data = {
+(byte) 0x10,(byte) 0x38,(byte) 0x10,(byte) 0x0,(byte) 0xfe,(byte) 0x0,(byte) 0x10,(byte) 0x38,(byte) 0x10,
+};
+
+static final BitmapCharRec ch247 = new BitmapCharRec(7,9,-1,0,9,ch247data);
+
+/* char: 0xf6 */
+
+static final byte[] ch246data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x28,(byte) 0x28,
+};
+
+static final BitmapCharRec ch246 = new BitmapCharRec(7,11,-1,0,9,ch246data);
+
+/* char: 0xf5 */
+
+static final byte[] ch245data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch245 = new BitmapCharRec(7,11,-1,0,9,ch245data);
+
+/* char: 0xf4 */
+
+static final byte[] ch244data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch244 = new BitmapCharRec(7,11,-1,0,9,ch244data);
+
+/* char: 0xf3 */
+
+static final byte[] ch243data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x30,(byte) 0x8,
+};
+
+static final BitmapCharRec ch243 = new BitmapCharRec(7,11,-1,0,9,ch243data);
+
+/* char: 0xf2 */
+
+static final byte[] ch242data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x18,(byte) 0x20,
+};
+
+static final BitmapCharRec ch242 = new BitmapCharRec(7,11,-1,0,9,ch242data);
+
+/* char: 0xf1 */
+
+static final byte[] ch241data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xc2,(byte) 0xbc,(byte) 0x0,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch241 = new BitmapCharRec(7,11,-1,0,9,ch241data);
+
+/* char: 0xf0 */
+
+static final byte[] ch240data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x8,(byte) 0x50,(byte) 0x30,(byte) 0x48,
+};
+
+static final BitmapCharRec ch240 = new BitmapCharRec(7,11,-1,0,9,ch240data);
+
+/* char: 0xef */
+
+static final byte[] ch239data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x50,(byte) 0x50,
+};
+
+static final BitmapCharRec ch239 = new BitmapCharRec(5,11,-2,0,9,ch239data);
+
+/* char: 0xee */
+
+static final byte[] ch238data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch238 = new BitmapCharRec(5,11,-2,0,9,ch238data);
+
+/* char: 0xed */
+
+static final byte[] ch237data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x60,(byte) 0x10,
+};
+
+static final BitmapCharRec ch237 = new BitmapCharRec(5,11,-2,0,9,ch237data);
+
+/* char: 0xec */
+
+static final byte[] ch236data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x30,(byte) 0x40,
+};
+
+static final BitmapCharRec ch236 = new BitmapCharRec(5,11,-2,0,9,ch236data);
+
+/* char: 0xeb */
+
+static final byte[] ch235data = {
+(byte) 0x7c,(byte) 0x80,(byte) 0x80,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x28,(byte) 0x28,
+};
+
+static final BitmapCharRec ch235 = new BitmapCharRec(7,11,-1,0,9,ch235data);
+
+/* char: 0xea */
+
+static final byte[] ch234data = {
+(byte) 0x7c,(byte) 0x80,(byte) 0x80,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch234 = new BitmapCharRec(7,11,-1,0,9,ch234data);
+
+/* char: 0xe9 */
+
+static final byte[] ch233data = {
+(byte) 0x7c,(byte) 0x80,(byte) 0x80,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x30,(byte) 0x8,
+};
+
+static final BitmapCharRec ch233 = new BitmapCharRec(7,11,-1,0,9,ch233data);
+
+/* char: 0xe8 */
+
+static final byte[] ch232data = {
+(byte) 0x7c,(byte) 0x80,(byte) 0x80,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x18,(byte) 0x20,
+};
+
+static final BitmapCharRec ch232 = new BitmapCharRec(7,11,-1,0,9,ch232data);
+
+/* char: 0xe7 */
+
+static final byte[] ch231data = {
+(byte) 0x30,(byte) 0x48,(byte) 0x18,(byte) 0x7c,(byte) 0x82,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x82,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch231 = new BitmapCharRec(7,10,-1,3,9,ch231data);
+
+/* char: 0xe6 */
+
+static final byte[] ch230data = {
+(byte) 0x6e,(byte) 0x92,(byte) 0x90,(byte) 0x7c,(byte) 0x12,(byte) 0x92,(byte) 0x6c,
+};
+
+static final BitmapCharRec ch230 = new BitmapCharRec(7,7,-1,0,9,ch230data);
+
+/* char: 0xe5 */
+
+static final byte[] ch229data = {
+(byte) 0x7a,(byte) 0x86,(byte) 0x82,(byte) 0x7e,(byte) 0x2,(byte) 0x2,(byte) 0x7c,(byte) 0x0,(byte) 0x18,(byte) 0x24,(byte) 0x18,
+};
+
+static final BitmapCharRec ch229 = new BitmapCharRec(7,11,-1,0,9,ch229data);
+
+/* char: 0xe4 */
+
+static final byte[] ch228data = {
+(byte) 0x7a,(byte) 0x86,(byte) 0x82,(byte) 0x7e,(byte) 0x2,(byte) 0x2,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x28,(byte) 0x28,
+};
+
+static final BitmapCharRec ch228 = new BitmapCharRec(7,11,-1,0,9,ch228data);
+
+/* char: 0xe3 */
+
+static final byte[] ch227data = {
+(byte) 0x7a,(byte) 0x86,(byte) 0x82,(byte) 0x7e,(byte) 0x2,(byte) 0x2,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch227 = new BitmapCharRec(7,11,-1,0,9,ch227data);
+
+/* char: 0xe2 */
+
+static final byte[] ch226data = {
+(byte) 0x7a,(byte) 0x86,(byte) 0x82,(byte) 0x7e,(byte) 0x2,(byte) 0x2,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch226 = new BitmapCharRec(7,11,-1,0,9,ch226data);
+
+/* char: 0xe1 */
+
+static final byte[] ch225data = {
+(byte) 0x7a,(byte) 0x86,(byte) 0x82,(byte) 0x7e,(byte) 0x2,(byte) 0x2,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x30,(byte) 0x8,
+};
+
+static final BitmapCharRec ch225 = new BitmapCharRec(7,11,-1,0,9,ch225data);
+
+/* char: 0xe0 */
+
+static final byte[] ch224data = {
+(byte) 0x7a,(byte) 0x86,(byte) 0x82,(byte) 0x7e,(byte) 0x2,(byte) 0x2,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x18,(byte) 0x20,
+};
+
+static final BitmapCharRec ch224 = new BitmapCharRec(7,11,-1,0,9,ch224data);
+
+/* char: 0xdf */
+
+static final byte[] ch223data = {
+(byte) 0x80,(byte) 0xbc,(byte) 0xc2,(byte) 0x82,(byte) 0x82,(byte) 0xfc,(byte) 0x82,(byte) 0x82,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch223 = new BitmapCharRec(7,9,-1,1,9,ch223data);
+
+/* char: 0xde */
+
+static final byte[] ch222data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfc,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch222 = new BitmapCharRec(7,10,-1,0,9,ch222data);
+
+/* char: 0xdd */
+
+static final byte[] ch221data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x44,(byte) 0x82,(byte) 0x82,(byte) 0x0,(byte) 0x30,(byte) 0x8,
+};
+
+static final BitmapCharRec ch221 = new BitmapCharRec(7,11,-1,0,9,ch221data);
+
+/* char: 0xdc */
+
+static final byte[] ch220data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x0,(byte) 0x28,(byte) 0x28,
+};
+
+static final BitmapCharRec ch220 = new BitmapCharRec(7,11,-1,0,9,ch220data);
+
+/* char: 0xdb */
+
+static final byte[] ch219data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x0,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch219 = new BitmapCharRec(7,11,-1,0,9,ch219data);
+
+/* char: 0xda */
+
+static final byte[] ch218data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x0,(byte) 0x30,(byte) 0x8,
+};
+
+static final BitmapCharRec ch218 = new BitmapCharRec(7,11,-1,0,9,ch218data);
+
+/* char: 0xd9 */
+
+static final byte[] ch217data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x0,(byte) 0x18,(byte) 0x20,
+};
+
+static final BitmapCharRec ch217 = new BitmapCharRec(7,11,-1,0,9,ch217data);
+
+/* char: 0xd8 */
+
+static final byte[] ch216data = {
+(byte) 0x80,(byte) 0x7c,(byte) 0xc2,(byte) 0xa2,(byte) 0xa2,(byte) 0x92,(byte) 0x92,(byte) 0x8a,(byte) 0x8a,(byte) 0x86,(byte) 0x7c,(byte) 0x2,
+};
+
+static final BitmapCharRec ch216 = new BitmapCharRec(7,12,-1,1,9,ch216data);
+
+/* char: 0xd7 */
+
+static final byte[] ch215data = {
+(byte) 0x82,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x28,(byte) 0x44,(byte) 0x82,
+};
+
+static final BitmapCharRec ch215 = new BitmapCharRec(7,7,-1,-1,9,ch215data);
+
+/* char: 0xd6 */
+
+static final byte[] ch214data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x28,(byte) 0x28,
+};
+
+static final BitmapCharRec ch214 = new BitmapCharRec(7,11,-1,0,9,ch214data);
+
+/* char: 0xd5 */
+
+static final byte[] ch213data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch213 = new BitmapCharRec(7,11,-1,0,9,ch213data);
+
+/* char: 0xd4 */
+
+static final byte[] ch212data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch212 = new BitmapCharRec(7,11,-1,0,9,ch212data);
+
+/* char: 0xd3 */
+
+static final byte[] ch211data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x30,(byte) 0x8,
+};
+
+static final BitmapCharRec ch211 = new BitmapCharRec(7,11,-1,0,9,ch211data);
+
+/* char: 0xd2 */
+
+static final byte[] ch210data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x18,(byte) 0x20,
+};
+
+static final BitmapCharRec ch210 = new BitmapCharRec(7,11,-1,0,9,ch210data);
+
+/* char: 0xd1 */
+
+static final byte[] ch209data = {
+(byte) 0x82,(byte) 0x86,(byte) 0x8a,(byte) 0x92,(byte) 0x92,(byte) 0xa2,(byte) 0xc2,(byte) 0x82,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch209 = new BitmapCharRec(7,11,-1,0,9,ch209data);
+
+/* char: 0xd0 */
+
+static final byte[] ch208data = {
+(byte) 0xfc,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0xf2,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch208 = new BitmapCharRec(7,10,-1,0,9,ch208data);
+
+/* char: 0xcf */
+
+static final byte[] ch207data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x0,(byte) 0x50,(byte) 0x50,
+};
+
+static final BitmapCharRec ch207 = new BitmapCharRec(5,11,-2,0,9,ch207data);
+
+/* char: 0xce */
+
+static final byte[] ch206data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x0,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch206 = new BitmapCharRec(5,11,-2,0,9,ch206data);
+
+/* char: 0xcd */
+
+static final byte[] ch205data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x0,(byte) 0x60,(byte) 0x10,
+};
+
+static final BitmapCharRec ch205 = new BitmapCharRec(5,11,-2,0,9,ch205data);
+
+/* char: 0xcc */
+
+static final byte[] ch204data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x0,(byte) 0x30,(byte) 0x40,
+};
+
+static final BitmapCharRec ch204 = new BitmapCharRec(5,11,-2,0,9,ch204data);
+
+/* char: 0xcb */
+
+static final byte[] ch203data = {
+(byte) 0xfe,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x78,(byte) 0x40,(byte) 0x40,(byte) 0xfe,(byte) 0x0,(byte) 0x28,(byte) 0x28,
+};
+
+static final BitmapCharRec ch203 = new BitmapCharRec(7,11,-1,0,9,ch203data);
+
+/* char: 0xca */
+
+static final byte[] ch202data = {
+(byte) 0xfe,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x78,(byte) 0x40,(byte) 0x40,(byte) 0xfe,(byte) 0x0,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch202 = new BitmapCharRec(7,11,-1,0,9,ch202data);
+
+/* char: 0xc9 */
+
+static final byte[] ch201data = {
+(byte) 0xfe,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x78,(byte) 0x40,(byte) 0x40,(byte) 0xfe,(byte) 0x0,(byte) 0x30,(byte) 0x8,
+};
+
+static final BitmapCharRec ch201 = new BitmapCharRec(7,11,-1,0,9,ch201data);
+
+/* char: 0xc8 */
+
+static final byte[] ch200data = {
+(byte) 0xfe,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x78,(byte) 0x40,(byte) 0x40,(byte) 0xfe,(byte) 0x0,(byte) 0x18,(byte) 0x20,
+};
+
+static final BitmapCharRec ch200 = new BitmapCharRec(7,11,-1,0,9,ch200data);
+
+/* char: 0xc7 */
+
+static final byte[] ch199data = {
+(byte) 0x30,(byte) 0x48,(byte) 0x18,(byte) 0x7c,(byte) 0x82,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x82,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch199 = new BitmapCharRec(7,13,-1,3,9,ch199data);
+
+/* char: 0xc6 */
+
+static final byte[] ch198data = {
+(byte) 0x9e,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0xfc,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x6e,
+};
+
+static final BitmapCharRec ch198 = new BitmapCharRec(7,10,-1,0,9,ch198data);
+
+/* char: 0xc5 */
+
+static final byte[] ch197data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x38,(byte) 0x10,(byte) 0x28,(byte) 0x10,
+};
+
+static final BitmapCharRec ch197 = new BitmapCharRec(7,11,-1,0,9,ch197data);
+
+/* char: 0xc4 */
+
+static final byte[] ch196data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x38,(byte) 0x0,(byte) 0x28,(byte) 0x28,
+};
+
+static final BitmapCharRec ch196 = new BitmapCharRec(7,11,-1,0,9,ch196data);
+
+/* char: 0xc3 */
+
+static final byte[] ch195data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x38,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch195 = new BitmapCharRec(7,11,-1,0,9,ch195data);
+
+/* char: 0xc2 */
+
+static final byte[] ch194data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x38,(byte) 0x0,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch194 = new BitmapCharRec(7,11,-1,0,9,ch194data);
+
+/* char: 0xc1 */
+
+static final byte[] ch193data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x38,(byte) 0x0,(byte) 0x30,(byte) 0x8,
+};
+
+static final BitmapCharRec ch193 = new BitmapCharRec(7,11,-1,0,9,ch193data);
+
+/* char: 0xc0 */
+
+static final byte[] ch192data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x38,(byte) 0x0,(byte) 0x18,(byte) 0x20,
+};
+
+static final BitmapCharRec ch192 = new BitmapCharRec(7,11,-1,0,9,ch192data);
+
+/* char: 0xbf */
+
+static final byte[] ch191data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x10,(byte) 0x0,(byte) 0x10,
+};
+
+static final BitmapCharRec ch191 = new BitmapCharRec(7,10,-1,0,9,ch191data);
+
+/* char: 0xbe */
+
+static final byte[] ch190data = {
+(byte) 0x6,(byte) 0x1a,(byte) 0x12,(byte) 0xa,(byte) 0x66,(byte) 0x92,(byte) 0x10,(byte) 0x20,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch190 = new BitmapCharRec(7,10,-1,0,9,ch190data);
+
+/* char: 0xbd */
+
+static final byte[] ch189data = {
+(byte) 0x1e,(byte) 0x10,(byte) 0xc,(byte) 0x2,(byte) 0xf2,(byte) 0x4c,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch189 = new BitmapCharRec(7,10,-1,0,9,ch189data);
+
+/* char: 0xbc */
+
+static final byte[] ch188data = {
+(byte) 0x6,(byte) 0x1a,(byte) 0x12,(byte) 0xa,(byte) 0xe6,(byte) 0x42,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch188 = new BitmapCharRec(7,10,-1,0,9,ch188data);
+
+/* char: 0xbb */
+
+static final byte[] ch187data = {
+(byte) 0x90,(byte) 0x48,(byte) 0x24,(byte) 0x12,(byte) 0x12,(byte) 0x24,(byte) 0x48,(byte) 0x90,
+};
+
+static final BitmapCharRec ch187 = new BitmapCharRec(7,8,-1,-1,9,ch187data);
+
+/* char: 0xba */
+
+static final byte[] ch186data = {
+(byte) 0xf8,(byte) 0x0,(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch186 = new BitmapCharRec(5,6,-1,-5,9,ch186data);
+
+/* char: 0xb9 */
+
+static final byte[] ch185data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch185 = new BitmapCharRec(3,6,-1,-4,9,ch185data);
+
+/* char: 0xb8 */
+
+static final byte[] ch184data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x30,
+};
+
+static final BitmapCharRec ch184 = new BitmapCharRec(4,3,-2,3,9,ch184data);
+
+/* char: 0xb7 */
+
+static final byte[] ch183data = {
+(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch183 = new BitmapCharRec(2,2,-4,-4,9,ch183data);
+
+/* char: 0xb6 */
+
+static final byte[] ch182data = {
+(byte) 0xa,(byte) 0xa,(byte) 0xa,(byte) 0xa,(byte) 0xa,(byte) 0x7a,(byte) 0x8a,(byte) 0x8a,(byte) 0x8a,(byte) 0x7e,
+};
+
+static final BitmapCharRec ch182 = new BitmapCharRec(7,10,-1,0,9,ch182data);
+
+/* char: 0xb5 */
+
+static final byte[] ch181data = {
+(byte) 0x80,(byte) 0x80,(byte) 0xba,(byte) 0xc6,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch181 = new BitmapCharRec(7,9,-1,2,9,ch181data);
+
+/* char: 0xb4 */
+
+static final byte[] ch180data = {
+(byte) 0xc0,(byte) 0x20,
+};
+
+static final BitmapCharRec ch180 = new BitmapCharRec(3,2,-3,-9,9,ch180data);
+
+/* char: 0xb3 */
+
+static final byte[] ch179data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x10,(byte) 0x20,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch179 = new BitmapCharRec(4,6,-1,-4,9,ch179data);
+
+/* char: 0xb2 */
+
+static final byte[] ch178data = {
+(byte) 0xf0,(byte) 0x80,(byte) 0x60,(byte) 0x10,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch178 = new BitmapCharRec(4,6,-1,-4,9,ch178data);
+
+/* char: 0xb1 */
+
+static final byte[] ch177data = {
+(byte) 0xfe,(byte) 0x0,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xfe,(byte) 0x10,(byte) 0x10,(byte) 0x10,
+};
+
+static final BitmapCharRec ch177 = new BitmapCharRec(7,9,-1,-1,9,ch177data);
+
+/* char: 0xb0 */
+
+static final byte[] ch176data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch176 = new BitmapCharRec(4,4,-3,-6,9,ch176data);
+
+/* char: 0xaf */
+
+static final byte[] ch175data = {
+(byte) 0xfc,
+};
+
+static final BitmapCharRec ch175 = new BitmapCharRec(6,1,-1,-9,9,ch175data);
+
+/* char: 0xae */
+
+static final byte[] ch174data = {
+(byte) 0x3c,(byte) 0x42,(byte) 0xa5,(byte) 0xa9,(byte) 0xbd,(byte) 0xa5,(byte) 0xb9,(byte) 0x42,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch174 = new BitmapCharRec(8,9,0,-1,9,ch174data);
+
+/* char: 0xad */
+
+static final byte[] ch173data = {
+(byte) 0xfc,
+};
+
+static final BitmapCharRec ch173 = new BitmapCharRec(6,1,-1,-4,9,ch173data);
+
+/* char: 0xac */
+
+static final byte[] ch172data = {
+(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch172 = new BitmapCharRec(6,4,-1,-2,9,ch172data);
+
+/* char: 0xab */
+
+static final byte[] ch171data = {
+(byte) 0x12,(byte) 0x24,(byte) 0x48,(byte) 0x90,(byte) 0x90,(byte) 0x48,(byte) 0x24,(byte) 0x12,
+};
+
+static final BitmapCharRec ch171 = new BitmapCharRec(7,8,-1,-1,9,ch171data);
+
+/* char: 0xaa */
+
+static final byte[] ch170data = {
+(byte) 0xf8,(byte) 0x0,(byte) 0x78,(byte) 0x90,(byte) 0x70,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch170 = new BitmapCharRec(5,7,-3,-3,9,ch170data);
+
+/* char: 0xa9 */
+
+static final byte[] ch169data = {
+(byte) 0x3c,(byte) 0x42,(byte) 0x99,(byte) 0xa5,(byte) 0xa1,(byte) 0xa5,(byte) 0x99,(byte) 0x42,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch169 = new BitmapCharRec(8,9,0,-1,9,ch169data);
+
+/* char: 0xa8 */
+
+static final byte[] ch168data = {
+(byte) 0xa0,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch168 = new BitmapCharRec(3,2,-3,-9,9,ch168data);
+
+/* char: 0xa7 */
+
+static final byte[] ch167data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x8,(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x80,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch167 = new BitmapCharRec(5,11,-2,1,9,ch167data);
+
+/* char: 0xa6 */
+
+static final byte[] ch166data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch166 = new BitmapCharRec(1,11,-4,1,9,ch166data);
+
+/* char: 0xa5 */
+
+static final byte[] ch165data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x7c,(byte) 0x10,(byte) 0x7c,(byte) 0x28,(byte) 0x44,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch165 = new BitmapCharRec(7,10,-1,0,9,ch165data);
+
+/* char: 0xa4 */
+
+static final byte[] ch164data = {
+(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x44,(byte) 0x7c,(byte) 0x82,
+};
+
+static final BitmapCharRec ch164 = new BitmapCharRec(7,6,-1,-3,9,ch164data);
+
+/* char: 0xa3 */
+
+static final byte[] ch163data = {
+(byte) 0x5c,(byte) 0xa2,(byte) 0x60,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x22,(byte) 0x1c,
+};
+
+static final BitmapCharRec ch163 = new BitmapCharRec(7,10,-1,0,9,ch163data);
+
+/* char: 0xa2 */
+
+static final byte[] ch162data = {
+(byte) 0x40,(byte) 0x78,(byte) 0xa4,(byte) 0xa0,(byte) 0x90,(byte) 0x94,(byte) 0x78,(byte) 0x8,
+};
+
+static final BitmapCharRec ch162 = new BitmapCharRec(6,8,-1,0,9,ch162data);
+
+/* char: 0xa1 */
+
+static final byte[] ch161data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch161 = new BitmapCharRec(1,11,-4,0,9,ch161data);
+
+/* char: 0x7e '~' */
+
+static final byte[] ch126data = {
+(byte) 0x8c,(byte) 0x92,(byte) 0x62,
+};
+
+static final BitmapCharRec ch126 = new BitmapCharRec(7,3,-1,-7,9,ch126data);
+
+/* char: 0x7d '}' */
+
+static final byte[] ch125data = {
+(byte) 0xe0,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x20,(byte) 0x18,(byte) 0x18,(byte) 0x20,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch125 = new BitmapCharRec(5,12,-1,1,9,ch125data);
+
+/* char: 0x7c '|' */
+
+static final byte[] ch124data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch124 = new BitmapCharRec(1,12,-4,1,9,ch124data);
+
+/* char: 0x7b '{' */
+
+static final byte[] ch123data = {
+(byte) 0x38,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0xc0,(byte) 0xc0,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x38,
+};
+
+static final BitmapCharRec ch123 = new BitmapCharRec(5,12,-3,1,9,ch123data);
+
+/* char: 0x7a 'z' */
+
+static final byte[] ch122data = {
+(byte) 0xfe,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0x4,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch122 = new BitmapCharRec(7,7,-1,0,9,ch122data);
+
+/* char: 0x79 'y' */
+
+static final byte[] ch121data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x4,(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,
+};
+
+static final BitmapCharRec ch121 = new BitmapCharRec(6,10,-1,3,9,ch121data);
+
+/* char: 0x78 'x' */
+
+static final byte[] ch120data = {
+(byte) 0x82,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x28,(byte) 0x44,(byte) 0x82,
+};
+
+static final BitmapCharRec ch120 = new BitmapCharRec(7,7,-1,0,9,ch120data);
+
+/* char: 0x77 'w' */
+
+static final byte[] ch119data = {
+(byte) 0x44,(byte) 0xaa,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch119 = new BitmapCharRec(7,7,-1,0,9,ch119data);
+
+/* char: 0x76 'v' */
+
+static final byte[] ch118data = {
+(byte) 0x10,(byte) 0x28,(byte) 0x28,(byte) 0x44,(byte) 0x44,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch118 = new BitmapCharRec(7,7,-1,0,9,ch118data);
+
+/* char: 0x75 'u' */
+
+static final byte[] ch117data = {
+(byte) 0x7a,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,
+};
+
+static final BitmapCharRec ch117 = new BitmapCharRec(7,7,-1,0,9,ch117data);
+
+/* char: 0x74 't' */
+
+static final byte[] ch116data = {
+(byte) 0x1c,(byte) 0x22,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xfc,(byte) 0x20,(byte) 0x20,
+};
+
+static final BitmapCharRec ch116 = new BitmapCharRec(7,9,-1,0,9,ch116data);
+
+/* char: 0x73 's' */
+
+static final byte[] ch115data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x2,(byte) 0x7c,(byte) 0x80,(byte) 0x82,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch115 = new BitmapCharRec(7,7,-1,0,9,ch115data);
+
+/* char: 0x72 'r' */
+
+static final byte[] ch114data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x42,(byte) 0x62,(byte) 0x9c,
+};
+
+static final BitmapCharRec ch114 = new BitmapCharRec(7,7,-1,0,9,ch114data);
+
+/* char: 0x71 'q' */
+
+static final byte[] ch113data = {
+(byte) 0x2,(byte) 0x2,(byte) 0x2,(byte) 0x7a,(byte) 0x86,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x86,(byte) 0x7a,
+};
+
+static final BitmapCharRec ch113 = new BitmapCharRec(7,10,-1,3,9,ch113data);
+
+/* char: 0x70 'p' */
+
+static final byte[] ch112data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xbc,(byte) 0xc2,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xc2,(byte) 0xbc,
+};
+
+static final BitmapCharRec ch112 = new BitmapCharRec(7,10,-1,3,9,ch112data);
+
+/* char: 0x6f 'o' */
+
+static final byte[] ch111data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch111 = new BitmapCharRec(7,7,-1,0,9,ch111data);
+
+/* char: 0x6e 'n' */
+
+static final byte[] ch110data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xc2,(byte) 0xbc,
+};
+
+static final BitmapCharRec ch110 = new BitmapCharRec(7,7,-1,0,9,ch110data);
+
+/* char: 0x6d 'm' */
+
+static final byte[] ch109data = {
+(byte) 0x82,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0xec,
+};
+
+static final BitmapCharRec ch109 = new BitmapCharRec(7,7,-1,0,9,ch109data);
+
+/* char: 0x6c 'l' */
+
+static final byte[] ch108data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch108 = new BitmapCharRec(5,10,-2,0,9,ch108data);
+
+/* char: 0x6b 'k' */
+
+static final byte[] ch107data = {
+(byte) 0x82,(byte) 0x8c,(byte) 0xb0,(byte) 0xc0,(byte) 0xb0,(byte) 0x8c,(byte) 0x82,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch107 = new BitmapCharRec(7,10,-1,0,9,ch107data);
+
+/* char: 0x6a 'j' */
+
+static final byte[] ch106data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0x1c,(byte) 0x0,(byte) 0x0,(byte) 0xc,
+};
+
+static final BitmapCharRec ch106 = new BitmapCharRec(6,13,-1,3,9,ch106data);
+
+/* char: 0x69 'i' */
+
+static final byte[] ch105data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x60,
+};
+
+static final BitmapCharRec ch105 = new BitmapCharRec(5,10,-2,0,9,ch105data);
+
+/* char: 0x68 'h' */
+
+static final byte[] ch104data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xc2,(byte) 0xbc,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch104 = new BitmapCharRec(7,10,-1,0,9,ch104data);
+
+/* char: 0x67 'g' */
+
+static final byte[] ch103data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x80,(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x7a,
+};
+
+static final BitmapCharRec ch103 = new BitmapCharRec(7,10,-1,3,9,ch103data);
+
+/* char: 0x66 'f' */
+
+static final byte[] ch102data = {
+(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x22,(byte) 0x22,(byte) 0x1c,
+};
+
+static final BitmapCharRec ch102 = new BitmapCharRec(7,10,-1,0,9,ch102data);
+
+/* char: 0x65 'e' */
+
+static final byte[] ch101data = {
+(byte) 0x7c,(byte) 0x80,(byte) 0x80,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch101 = new BitmapCharRec(7,7,-1,0,9,ch101data);
+
+/* char: 0x64 'd' */
+
+static final byte[] ch100data = {
+(byte) 0x7a,(byte) 0x86,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x86,(byte) 0x7a,(byte) 0x2,(byte) 0x2,(byte) 0x2,
+};
+
+static final BitmapCharRec ch100 = new BitmapCharRec(7,10,-1,0,9,ch100data);
+
+/* char: 0x63 'c' */
+
+static final byte[] ch99data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x82,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch99 = new BitmapCharRec(7,7,-1,0,9,ch99data);
+
+/* char: 0x62 'b' */
+
+static final byte[] ch98data = {
+(byte) 0xbc,(byte) 0xc2,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xc2,(byte) 0xbc,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch98 = new BitmapCharRec(7,10,-1,0,9,ch98data);
+
+/* char: 0x61 'a' */
+
+static final byte[] ch97data = {
+(byte) 0x7a,(byte) 0x86,(byte) 0x82,(byte) 0x7e,(byte) 0x2,(byte) 0x2,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch97 = new BitmapCharRec(7,7,-1,0,9,ch97data);
+
+/* char: 0x60 '`' */
+
+static final byte[] ch96data = {
+(byte) 0x10,(byte) 0x20,(byte) 0x40,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch96 = new BitmapCharRec(4,4,-3,-6,9,ch96data);
+
+/* char: 0x5f '_' */
+
+static final byte[] ch95data = {
+(byte) 0xff,
+};
+
+static final BitmapCharRec ch95 = new BitmapCharRec(8,1,0,1,9,ch95data);
+
+/* char: 0x5e '^' */
+
+static final byte[] ch94data = {
+(byte) 0x82,(byte) 0x44,(byte) 0x28,(byte) 0x10,
+};
+
+static final BitmapCharRec ch94 = new BitmapCharRec(7,4,-1,-6,9,ch94data);
+
+/* char: 0x5d ']' */
+
+static final byte[] ch93data = {
+(byte) 0xf0,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch93 = new BitmapCharRec(4,12,-2,1,9,ch93data);
+
+/* char: 0x5c '\' */
+
+static final byte[] ch92data = {
+(byte) 0x2,(byte) 0x4,(byte) 0x4,(byte) 0x8,(byte) 0x10,(byte) 0x10,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch92 = new BitmapCharRec(7,10,-1,0,9,ch92data);
+
+/* char: 0x5b '[' */
+
+static final byte[] ch91data = {
+(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch91 = new BitmapCharRec(4,12,-3,1,9,ch91data);
+
+/* char: 0x5a 'Z' */
+
+static final byte[] ch90data = {
+(byte) 0xfe,(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0x4,(byte) 0x2,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch90 = new BitmapCharRec(7,10,-1,0,9,ch90data);
+
+/* char: 0x59 'Y' */
+
+static final byte[] ch89data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x44,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch89 = new BitmapCharRec(7,10,-1,0,9,ch89data);
+
+/* char: 0x58 'X' */
+
+static final byte[] ch88data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x44,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch88 = new BitmapCharRec(7,10,-1,0,9,ch88data);
+
+/* char: 0x57 'W' */
+
+static final byte[] ch87data = {
+(byte) 0x44,(byte) 0xaa,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch87 = new BitmapCharRec(7,10,-1,0,9,ch87data);
+
+/* char: 0x56 'V' */
+
+static final byte[] ch86data = {
+(byte) 0x10,(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0x82,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch86 = new BitmapCharRec(7,10,-1,0,9,ch86data);
+
+/* char: 0x55 'U' */
+
+static final byte[] ch85data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch85 = new BitmapCharRec(7,10,-1,0,9,ch85data);
+
+/* char: 0x54 'T' */
+
+static final byte[] ch84data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch84 = new BitmapCharRec(7,10,-1,0,9,ch84data);
+
+/* char: 0x53 'S' */
+
+static final byte[] ch83data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x2,(byte) 0xc,(byte) 0x70,(byte) 0x80,(byte) 0x82,(byte) 0x82,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch83 = new BitmapCharRec(7,10,-1,0,9,ch83data);
+
+/* char: 0x52 'R' */
+
+static final byte[] ch82data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x84,(byte) 0x88,(byte) 0x90,(byte) 0xfc,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch82 = new BitmapCharRec(7,10,-1,0,9,ch82data);
+
+/* char: 0x51 'Q' */
+
+static final byte[] ch81data = {
+(byte) 0x6,(byte) 0x8,(byte) 0x7c,(byte) 0x92,(byte) 0xa2,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch81 = new BitmapCharRec(7,12,-1,2,9,ch81data);
+
+/* char: 0x50 'P' */
+
+static final byte[] ch80data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch80 = new BitmapCharRec(7,10,-1,0,9,ch80data);
+
+/* char: 0x4f 'O' */
+
+static final byte[] ch79data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch79 = new BitmapCharRec(7,10,-1,0,9,ch79data);
+
+/* char: 0x4e 'N' */
+
+static final byte[] ch78data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x86,(byte) 0x8a,(byte) 0x92,(byte) 0xa2,(byte) 0xc2,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch78 = new BitmapCharRec(7,10,-1,0,9,ch78data);
+
+/* char: 0x4d 'M' */
+
+static final byte[] ch77data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x92,(byte) 0x92,(byte) 0xaa,(byte) 0xaa,(byte) 0xc6,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch77 = new BitmapCharRec(7,10,-1,0,9,ch77data);
+
+/* char: 0x4c 'L' */
+
+static final byte[] ch76data = {
+(byte) 0xfe,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch76 = new BitmapCharRec(7,10,-1,0,9,ch76data);
+
+/* char: 0x4b 'K' */
+
+static final byte[] ch75data = {
+(byte) 0x82,(byte) 0x84,(byte) 0x88,(byte) 0x90,(byte) 0xa0,(byte) 0xe0,(byte) 0x90,(byte) 0x88,(byte) 0x84,(byte) 0x82,
+};
+
+static final BitmapCharRec ch75 = new BitmapCharRec(7,10,-1,0,9,ch75data);
+
+/* char: 0x4a 'J' */
+
+static final byte[] ch74data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0x1e,
+};
+
+static final BitmapCharRec ch74 = new BitmapCharRec(7,10,-1,0,9,ch74data);
+
+/* char: 0x49 'I' */
+
+static final byte[] ch73data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch73 = new BitmapCharRec(5,10,-2,0,9,ch73data);
+
+/* char: 0x48 'H' */
+
+static final byte[] ch72data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch72 = new BitmapCharRec(7,10,-1,0,9,ch72data);
+
+/* char: 0x47 'G' */
+
+static final byte[] ch71data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x8e,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x82,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch71 = new BitmapCharRec(7,10,-1,0,9,ch71data);
+
+/* char: 0x46 'F' */
+
+static final byte[] ch70data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x78,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch70 = new BitmapCharRec(7,10,-1,0,9,ch70data);
+
+/* char: 0x45 'E' */
+
+static final byte[] ch69data = {
+(byte) 0xfe,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x78,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch69 = new BitmapCharRec(7,10,-1,0,9,ch69data);
+
+/* char: 0x44 'D' */
+
+static final byte[] ch68data = {
+(byte) 0xfc,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch68 = new BitmapCharRec(7,10,-1,0,9,ch68data);
+
+/* char: 0x43 'C' */
+
+static final byte[] ch67data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x82,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch67 = new BitmapCharRec(7,10,-1,0,9,ch67data);
+
+/* char: 0x42 'B' */
+
+static final byte[] ch66data = {
+(byte) 0xfc,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x7c,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch66 = new BitmapCharRec(7,10,-1,0,9,ch66data);
+
+/* char: 0x41 'A' */
+
+static final byte[] ch65data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x28,(byte) 0x10,
+};
+
+static final BitmapCharRec ch65 = new BitmapCharRec(7,10,-1,0,9,ch65data);
+
+/* char: 0x40 '@' */
+
+static final byte[] ch64data = {
+(byte) 0x7c,(byte) 0x80,(byte) 0x80,(byte) 0x9a,(byte) 0xa6,(byte) 0xa2,(byte) 0x9e,(byte) 0x82,(byte) 0x82,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch64 = new BitmapCharRec(7,10,-1,0,9,ch64data);
+
+/* char: 0x3f '?' */
+
+static final byte[] ch63data = {
+(byte) 0x10,(byte) 0x0,(byte) 0x10,(byte) 0x10,(byte) 0x8,(byte) 0x4,(byte) 0x2,(byte) 0x82,(byte) 0x82,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch63 = new BitmapCharRec(7,10,-1,0,9,ch63data);
+
+/* char: 0x3e '>' */
+
+static final byte[] ch62data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0x8,(byte) 0x10,(byte) 0x20,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch62 = new BitmapCharRec(5,10,-2,0,9,ch62data);
+
+/* char: 0x3d '=' */
+
+static final byte[] ch61data = {
+(byte) 0xfe,(byte) 0x0,(byte) 0x0,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch61 = new BitmapCharRec(7,4,-1,-2,9,ch61data);
+
+/* char: 0x3c '<' */
+
+static final byte[] ch60data = {
+(byte) 0x8,(byte) 0x10,(byte) 0x20,(byte) 0x40,(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,
+};
+
+static final BitmapCharRec ch60 = new BitmapCharRec(5,10,-2,0,9,ch60data);
+
+/* char: 0x3b ';' */
+
+static final byte[] ch59data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch59 = new BitmapCharRec(2,10,-4,3,9,ch59data);
+
+/* char: 0x3a ':' */
+
+static final byte[] ch58data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch58 = new BitmapCharRec(2,7,-4,0,9,ch58data);
+
+/* char: 0x39 '9' */
+
+static final byte[] ch57data = {
+(byte) 0x78,(byte) 0x4,(byte) 0x2,(byte) 0x2,(byte) 0x7a,(byte) 0x86,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch57 = new BitmapCharRec(7,10,-1,0,9,ch57data);
+
+/* char: 0x38 '8' */
+
+static final byte[] ch56data = {
+(byte) 0x38,(byte) 0x44,(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x38,(byte) 0x44,(byte) 0x82,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch56 = new BitmapCharRec(7,10,-1,0,9,ch56data);
+
+/* char: 0x37 '7' */
+
+static final byte[] ch55data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0x4,(byte) 0x2,(byte) 0x2,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch55 = new BitmapCharRec(7,10,-1,0,9,ch55data);
+
+/* char: 0x36 '6' */
+
+static final byte[] ch54data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xc2,(byte) 0xbc,(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch54 = new BitmapCharRec(7,10,-1,0,9,ch54data);
+
+/* char: 0x35 '5' */
+
+static final byte[] ch53data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x2,(byte) 0x2,(byte) 0x2,(byte) 0xc2,(byte) 0xbc,(byte) 0x80,(byte) 0x80,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch53 = new BitmapCharRec(7,10,-1,0,9,ch53data);
+
+/* char: 0x34 '4' */
+
+static final byte[] ch52data = {
+(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0xfe,(byte) 0x84,(byte) 0x44,(byte) 0x24,(byte) 0x14,(byte) 0xc,(byte) 0x4,
+};
+
+static final BitmapCharRec ch52 = new BitmapCharRec(7,10,-1,0,9,ch52data);
+
+/* char: 0x33 '3' */
+
+static final byte[] ch51data = {
+(byte) 0x7c,(byte) 0x82,(byte) 0x2,(byte) 0x2,(byte) 0x2,(byte) 0x1c,(byte) 0x8,(byte) 0x4,(byte) 0x2,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch51 = new BitmapCharRec(7,10,-1,0,9,ch51data);
+
+/* char: 0x32 '2' */
+
+static final byte[] ch50data = {
+(byte) 0xfe,(byte) 0x80,(byte) 0x40,(byte) 0x30,(byte) 0x8,(byte) 0x4,(byte) 0x2,(byte) 0x82,(byte) 0x82,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch50 = new BitmapCharRec(7,10,-1,0,9,ch50data);
+
+/* char: 0x31 '1' */
+
+static final byte[] ch49data = {
+(byte) 0xfe,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x90,(byte) 0x50,(byte) 0x30,(byte) 0x10,
+};
+
+static final BitmapCharRec ch49 = new BitmapCharRec(7,10,-1,0,9,ch49data);
+
+/* char: 0x30 '0' */
+
+static final byte[] ch48data = {
+(byte) 0x38,(byte) 0x44,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch48 = new BitmapCharRec(7,10,-1,0,9,ch48data);
+
+/* char: 0x2f '/' */
+
+static final byte[] ch47data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x10,(byte) 0x8,(byte) 0x4,(byte) 0x4,(byte) 0x2,
+};
+
+static final BitmapCharRec ch47 = new BitmapCharRec(7,10,-1,0,9,ch47data);
+
+/* char: 0x2e '.' */
+
+static final byte[] ch46data = {
+(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch46 = new BitmapCharRec(2,2,-4,0,9,ch46data);
+
+/* char: 0x2d '-' */
+
+static final byte[] ch45data = {
+(byte) 0xfe,
+};
+
+static final BitmapCharRec ch45 = new BitmapCharRec(7,1,-1,-4,9,ch45data);
+
+/* char: 0x2c ',' */
+
+static final byte[] ch44data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch44 = new BitmapCharRec(2,5,-4,3,9,ch44data);
+
+/* char: 0x2b '+' */
+
+static final byte[] ch43data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xfe,(byte) 0x10,(byte) 0x10,(byte) 0x10,
+};
+
+static final BitmapCharRec ch43 = new BitmapCharRec(7,7,-1,-1,9,ch43data);
+
+/* char: 0x2a '*' */
+
+static final byte[] ch42data = {
+(byte) 0x10,(byte) 0x92,(byte) 0x54,(byte) 0x38,(byte) 0x54,(byte) 0x92,(byte) 0x10,
+};
+
+static final BitmapCharRec ch42 = new BitmapCharRec(7,7,-1,-1,9,ch42data);
+
+/* char: 0x29 ')' */
+
+static final byte[] ch41data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch41 = new BitmapCharRec(3,12,-3,1,9,ch41data);
+
+/* char: 0x28 '(' */
+
+static final byte[] ch40data = {
+(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch40 = new BitmapCharRec(3,12,-3,1,9,ch40data);
+
+/* char: 0x27 ''' */
+
+static final byte[] ch39data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x30,
+};
+
+static final BitmapCharRec ch39 = new BitmapCharRec(4,4,-3,-6,9,ch39data);
+
+/* char: 0x26 '&' */
+
+static final byte[] ch38data = {
+(byte) 0x62,(byte) 0x94,(byte) 0x88,(byte) 0x94,(byte) 0x62,(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch38 = new BitmapCharRec(7,10,-1,0,9,ch38data);
+
+/* char: 0x25 '%' */
+
+static final byte[] ch37data = {
+(byte) 0x84,(byte) 0x4a,(byte) 0x4a,(byte) 0x24,(byte) 0x10,(byte) 0x10,(byte) 0x48,(byte) 0xa4,(byte) 0xa4,(byte) 0x42,
+};
+
+static final BitmapCharRec ch37 = new BitmapCharRec(7,10,-1,0,9,ch37data);
+
+/* char: 0x24 '$' */
+
+static final byte[] ch36data = {
+(byte) 0x10,(byte) 0x7c,(byte) 0x92,(byte) 0x12,(byte) 0x12,(byte) 0x14,(byte) 0x38,(byte) 0x50,(byte) 0x90,(byte) 0x92,(byte) 0x7c,(byte) 0x10,
+};
+
+static final BitmapCharRec ch36 = new BitmapCharRec(7,12,-1,1,9,ch36data);
+
+/* char: 0x23 '#' */
+
+static final byte[] ch35data = {
+(byte) 0x48,(byte) 0x48,(byte) 0xfc,(byte) 0x48,(byte) 0x48,(byte) 0xfc,(byte) 0x48,(byte) 0x48,
+};
+
+static final BitmapCharRec ch35 = new BitmapCharRec(6,8,-1,-1,9,ch35data);
+
+/* char: 0x22 '"' */
+
+static final byte[] ch34data = {
+(byte) 0x90,(byte) 0x90,(byte) 0x90,
+};
+
+static final BitmapCharRec ch34 = new BitmapCharRec(4,3,-3,-7,9,ch34data);
+
+/* char: 0x21 '!' */
+
+static final byte[] ch33data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch33 = new BitmapCharRec(1,11,-4,0,9,ch33data);
+
+/* char: 0x1f */
+
+static final byte[] ch31data = {
+(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch31 = new BitmapCharRec(2,2,-4,-2,9,ch31data);
+
+/* char: 0x1e */
+
+static final byte[] ch30data = {
+(byte) 0x5c,(byte) 0xa2,(byte) 0x60,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x22,(byte) 0x1c,
+};
+
+static final BitmapCharRec ch30 = new BitmapCharRec(7,10,-1,0,9,ch30data);
+
+/* char: 0x1d */
+
+static final byte[] ch29data = {
+(byte) 0x80,(byte) 0x40,(byte) 0xfe,(byte) 0x10,(byte) 0xfe,(byte) 0x4,(byte) 0x2,
+};
+
+static final BitmapCharRec ch29 = new BitmapCharRec(7,7,-1,0,9,ch29data);
+
+/* char: 0x1c */
+
+static final byte[] ch28data = {
+(byte) 0x44,(byte) 0x24,(byte) 0x24,(byte) 0x24,(byte) 0x24,(byte) 0x24,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch28 = new BitmapCharRec(7,7,-1,0,9,ch28data);
+
+/* char: 0x1b */
+
+static final byte[] ch27data = {
+(byte) 0xfe,(byte) 0x0,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0x8,(byte) 0x10,(byte) 0x20,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch27 = new BitmapCharRec(7,12,-1,2,9,ch27data);
+
+/* char: 0x1a */
+
+static final byte[] ch26data = {
+(byte) 0xfc,(byte) 0x0,(byte) 0x4,(byte) 0x8,(byte) 0x10,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0x4,
+};
+
+static final BitmapCharRec ch26 = new BitmapCharRec(6,12,-2,2,9,ch26data);
+
+/* char: 0x19 */
+
+static final byte[] ch25data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch25 = new BitmapCharRec(1,15,-4,3,9,ch25data);
+
+/* char: 0x18 */
+
+static final byte[] ch24data = {
+(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0xff,(byte) 0x80,
+};
+
+static final BitmapCharRec ch24 = new BitmapCharRec(9,7,0,3,9,ch24data);
+
+/* char: 0x17 */
+
+static final byte[] ch23data = {
+(byte) 0xff,(byte) 0x80,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,
+(byte) 0x8,(byte) 0x0,
+};
+
+static final BitmapCharRec ch23 = new BitmapCharRec(9,9,0,-3,9,ch23data);
+
+/* char: 0x16 */
+
+static final byte[] ch22data = {
+(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0xf8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,
+};
+
+static final BitmapCharRec ch22 = new BitmapCharRec(5,15,0,3,9,ch22data);
+
+/* char: 0x15 */
+
+static final byte[] ch21data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch21 = new BitmapCharRec(5,15,-4,3,9,ch21data);
+
+/* char: 0x14 */
+
+static final byte[] ch20data = {
+(byte) 0xff,(byte) 0x80,
+};
+
+static final BitmapCharRec ch20 = new BitmapCharRec(9,1,0,1,9,ch20data);
+
+/* char: 0x13 */
+
+static final byte[] ch19data = {
+(byte) 0xff,(byte) 0x80,
+};
+
+static final BitmapCharRec ch19 = new BitmapCharRec(9,1,0,-1,9,ch19data);
+
+/* char: 0x12 */
+
+static final byte[] ch18data = {
+(byte) 0xff,(byte) 0x80,
+};
+
+static final BitmapCharRec ch18 = new BitmapCharRec(9,1,0,-3,9,ch18data);
+
+/* char: 0x11 */
+
+static final byte[] ch17data = {
+(byte) 0xff,(byte) 0x80,
+};
+
+static final BitmapCharRec ch17 = new BitmapCharRec(9,1,0,-5,9,ch17data);
+
+/* char: 0x10 */
+
+static final byte[] ch16data = {
+(byte) 0xff,(byte) 0x80,
+};
+
+static final BitmapCharRec ch16 = new BitmapCharRec(9,1,0,-7,9,ch16data);
+
+/* char: 0xf */
+
+static final byte[] ch15data = {
+(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0x8,(byte) 0x0,
+(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,
+};
+
+static final BitmapCharRec ch15 = new BitmapCharRec(9,15,0,3,9,ch15data);
+
+/* char: 0xe */
+
+static final byte[] ch14data = {
+(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch14 = new BitmapCharRec(5,9,-4,-3,9,ch14data);
+
+/* char: 0xd */
+
+static final byte[] ch13data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch13 = new BitmapCharRec(5,7,-4,3,9,ch13data);
+
+/* char: 0xc */
+
+static final byte[] ch12data = {
+(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch12 = new BitmapCharRec(5,7,0,3,9,ch12data);
+
+/* char: 0xb */
+
+static final byte[] ch11data = {
+(byte) 0xf8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,
+};
+
+static final BitmapCharRec ch11 = new BitmapCharRec(5,9,0,-3,9,ch11data);
+
+/* char: 0xa */
+
+static final byte[] ch10data = {
+(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x3e,(byte) 0x0,(byte) 0x20,(byte) 0x50,(byte) 0x88,(byte) 0x88,
+};
+
+static final BitmapCharRec ch10 = new BitmapCharRec(7,10,-1,2,9,ch10data);
+
+/* char: 0x9 */
+
+static final byte[] ch9data = {
+(byte) 0x3e,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x88,(byte) 0x98,(byte) 0xa8,(byte) 0xc8,(byte) 0x88,
+};
+
+static final BitmapCharRec ch9 = new BitmapCharRec(7,10,-1,2,9,ch9data);
+
+/* char: 0x8 */
+
+static final byte[] ch8data = {
+(byte) 0xfe,(byte) 0x10,(byte) 0x10,(byte) 0xfe,(byte) 0x10,(byte) 0x10,
+};
+
+static final BitmapCharRec ch8 = new BitmapCharRec(7,6,-1,0,9,ch8data);
+
+/* char: 0x7 */
+
+static final byte[] ch7data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch7 = new BitmapCharRec(5,4,-2,-6,9,ch7data);
+
+/* char: 0x6 */
+
+static final byte[] ch6data = {
+(byte) 0x20,(byte) 0x20,(byte) 0x3c,(byte) 0x20,(byte) 0x3e,(byte) 0x0,(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch6 = new BitmapCharRec(7,10,-1,2,9,ch6data);
+
+/* char: 0x5 */
+
+static final byte[] ch5data = {
+(byte) 0x22,(byte) 0x22,(byte) 0x3c,(byte) 0x22,(byte) 0x3c,(byte) 0x0,(byte) 0x78,(byte) 0x80,(byte) 0x80,(byte) 0x78,
+};
+
+static final BitmapCharRec ch5 = new BitmapCharRec(7,10,-1,2,9,ch5data);
+
+/* char: 0x4 */
+
+static final byte[] ch4data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x1c,(byte) 0x10,(byte) 0x1e,(byte) 0x80,(byte) 0x80,(byte) 0xe0,(byte) 0x80,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch4 = new BitmapCharRec(7,10,-1,2,9,ch4data);
+
+/* char: 0x3 */
+
+static final byte[] ch3data = {
+(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x3e,(byte) 0x0,(byte) 0x88,(byte) 0x88,(byte) 0xf8,(byte) 0x88,(byte) 0x88,
+};
+
+static final BitmapCharRec ch3 = new BitmapCharRec(7,10,-1,2,9,ch3data);
+
+/* char: 0x2 */
+
+static final byte[] ch2data = {
+(byte) 0x55,(byte) 0xaa,(byte) 0x55,(byte) 0xaa,(byte) 0x55,(byte) 0xaa,(byte) 0x55,(byte) 0xaa,(byte) 0x55,(byte) 0xaa,(byte) 0x55,(byte) 0xaa,(byte) 0x55,(byte) 0xaa,
+};
+
+static final BitmapCharRec ch2 = new BitmapCharRec(8,14,0,3,9,ch2data);
+
+/* char: 0x1 */
+
+static final byte[] ch1data = {
+(byte) 0x10,(byte) 0x38,(byte) 0x7c,(byte) 0xfe,(byte) 0x7c,(byte) 0x38,(byte) 0x10,
+};
+
+static final BitmapCharRec ch1 = new BitmapCharRec(7,7,-1,0,9,ch1data);
+
+static final BitmapCharRec[] chars = {
+ch0,
+ch1,
+ch2,
+ch3,
+ch4,
+ch5,
+ch6,
+ch7,
+ch8,
+ch9,
+ch10,
+ch11,
+ch12,
+ch13,
+ch14,
+ch15,
+ch16,
+ch17,
+ch18,
+ch19,
+ch20,
+ch21,
+ch22,
+ch23,
+ch24,
+ch25,
+ch26,
+ch27,
+ch28,
+ch29,
+ch30,
+ch31,
+ch32,
+ch33,
+ch34,
+ch35,
+ch36,
+ch37,
+ch38,
+ch39,
+ch40,
+ch41,
+ch42,
+ch43,
+ch44,
+ch45,
+ch46,
+ch47,
+ch48,
+ch49,
+ch50,
+ch51,
+ch52,
+ch53,
+ch54,
+ch55,
+ch56,
+ch57,
+ch58,
+ch59,
+ch60,
+ch61,
+ch62,
+ch63,
+ch64,
+ch65,
+ch66,
+ch67,
+ch68,
+ch69,
+ch70,
+ch71,
+ch72,
+ch73,
+ch74,
+ch75,
+ch76,
+ch77,
+ch78,
+ch79,
+ch80,
+ch81,
+ch82,
+ch83,
+ch84,
+ch85,
+ch86,
+ch87,
+ch88,
+ch89,
+ch90,
+ch91,
+ch92,
+ch93,
+ch94,
+ch95,
+ch96,
+ch97,
+ch98,
+ch99,
+ch100,
+ch101,
+ch102,
+ch103,
+ch104,
+ch105,
+ch106,
+ch107,
+ch108,
+ch109,
+ch110,
+ch111,
+ch112,
+ch113,
+ch114,
+ch115,
+ch116,
+ch117,
+ch118,
+ch119,
+ch120,
+ch121,
+ch122,
+ch123,
+ch124,
+ch125,
+ch126,
+ch127,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+ch160,
+ch161,
+ch162,
+ch163,
+ch164,
+ch165,
+ch166,
+ch167,
+ch168,
+ch169,
+ch170,
+ch171,
+ch172,
+ch173,
+ch174,
+ch175,
+ch176,
+ch177,
+ch178,
+ch179,
+ch180,
+ch181,
+ch182,
+ch183,
+ch184,
+ch185,
+ch186,
+ch187,
+ch188,
+ch189,
+ch190,
+ch191,
+ch192,
+ch193,
+ch194,
+ch195,
+ch196,
+ch197,
+ch198,
+ch199,
+ch200,
+ch201,
+ch202,
+ch203,
+ch204,
+ch205,
+ch206,
+ch207,
+ch208,
+ch209,
+ch210,
+ch211,
+ch212,
+ch213,
+ch214,
+ch215,
+ch216,
+ch217,
+ch218,
+ch219,
+ch220,
+ch221,
+ch222,
+ch223,
+ch224,
+ch225,
+ch226,
+ch227,
+ch228,
+ch229,
+ch230,
+ch231,
+ch232,
+ch233,
+ch234,
+ch235,
+ch236,
+ch237,
+ch238,
+ch239,
+ch240,
+ch241,
+ch242,
+ch243,
+ch244,
+ch245,
+ch246,
+ch247,
+ch248,
+ch249,
+ch250,
+ch251,
+ch252,
+ch253,
+ch254,
+ch255,
+};
+
+ public static final BitmapFontRec glutBitmap9By15 = new BitmapFontRec("-misc-fixed-medium-r-normal--15-140-75-75-C-90-iso8859-1",
+ 256,
+ 0,
+ chars);
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTBitmapHelvetica10.java b/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTBitmapHelvetica10.java
new file mode 100644
index 000000000..b9c7e6e50
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTBitmapHelvetica10.java
@@ -0,0 +1,1798 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.util.gl2;
+
+class GLUTBitmapHelvetica10 {
+
+/* GENERATED FILE -- DO NOT MODIFY */
+
+/* char: 0xff */
+
+static final byte[] ch255data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x60,(byte) 0xa0,(byte) 0xa0,(byte) 0x90,(byte) 0x90,(byte) 0x0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch255 = new BitmapCharRec(4,10,0,2,5,ch255data);
+
+/* char: 0xfe */
+
+static final byte[] ch254data = {
+(byte) 0x80,(byte) 0x80,(byte) 0xb0,(byte) 0xc8,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch254 = new BitmapCharRec(5,10,0,2,6,ch254data);
+
+/* char: 0xfd */
+
+static final byte[] ch253data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x60,(byte) 0xa0,(byte) 0xa0,(byte) 0x90,(byte) 0x90,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch253 = new BitmapCharRec(4,11,0,2,5,ch253data);
+
+/* char: 0xfc */
+
+static final byte[] ch252data = {
+(byte) 0x70,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch252 = new BitmapCharRec(4,8,0,0,5,ch252data);
+
+/* char: 0xfb */
+
+static final byte[] ch251data = {
+(byte) 0x70,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x0,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch251 = new BitmapCharRec(4,9,0,0,5,ch251data);
+
+/* char: 0xfa */
+
+static final byte[] ch250data = {
+(byte) 0x70,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x0,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch250 = new BitmapCharRec(4,9,0,0,5,ch250data);
+
+/* char: 0xf9 */
+
+static final byte[] ch249data = {
+(byte) 0x70,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x0,(byte) 0x20,(byte) 0x40,
+};
+
+static final BitmapCharRec ch249 = new BitmapCharRec(4,9,0,0,5,ch249data);
+
+/* char: 0xf8 */
+
+static final byte[] ch248data = {
+(byte) 0x70,(byte) 0x88,(byte) 0xc8,(byte) 0xa8,(byte) 0x98,(byte) 0x74,
+};
+
+static final BitmapCharRec ch248 = new BitmapCharRec(6,6,0,0,6,ch248data);
+
+/* char: 0xf7 */
+
+static final byte[] ch247data = {
+(byte) 0x20,(byte) 0x0,(byte) 0xf8,(byte) 0x0,(byte) 0x20,
+};
+
+static final BitmapCharRec ch247 = new BitmapCharRec(5,5,0,-1,6,ch247data);
+
+/* char: 0xf6 */
+
+static final byte[] ch246data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch246 = new BitmapCharRec(5,8,0,0,6,ch246data);
+
+/* char: 0xf5 */
+
+static final byte[] ch245data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch245 = new BitmapCharRec(5,9,0,0,6,ch245data);
+
+/* char: 0xf4 */
+
+static final byte[] ch244data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch244 = new BitmapCharRec(5,9,0,0,6,ch244data);
+
+/* char: 0xf3 */
+
+static final byte[] ch243data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch243 = new BitmapCharRec(5,9,0,0,6,ch243data);
+
+/* char: 0xf2 */
+
+static final byte[] ch242data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x20,(byte) 0x40,
+};
+
+static final BitmapCharRec ch242 = new BitmapCharRec(5,9,0,0,6,ch242data);
+
+/* char: 0xf1 */
+
+static final byte[] ch241data = {
+(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0xe0,(byte) 0x0,(byte) 0xa0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch241 = new BitmapCharRec(4,9,0,0,5,ch241data);
+
+/* char: 0xf0 */
+
+static final byte[] ch240data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x78,(byte) 0x90,(byte) 0x60,(byte) 0x50,
+};
+
+static final BitmapCharRec ch240 = new BitmapCharRec(5,9,0,0,6,ch240data);
+
+/* char: 0xef */
+
+static final byte[] ch239data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch239 = new BitmapCharRec(3,8,0,0,2,ch239data);
+
+/* char: 0xee */
+
+static final byte[] ch238data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0xa0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch238 = new BitmapCharRec(3,9,1,0,2,ch238data);
+
+/* char: 0xed */
+
+static final byte[] ch237data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,(byte) 0x40,
+};
+
+static final BitmapCharRec ch237 = new BitmapCharRec(2,9,0,0,2,ch237data);
+
+/* char: 0xec */
+
+static final byte[] ch236data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch236 = new BitmapCharRec(2,9,1,0,2,ch236data);
+
+/* char: 0xeb */
+
+static final byte[] ch235data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x80,(byte) 0xf0,(byte) 0x90,(byte) 0x60,(byte) 0x0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch235 = new BitmapCharRec(4,8,0,0,5,ch235data);
+
+/* char: 0xea */
+
+static final byte[] ch234data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x80,(byte) 0xf0,(byte) 0x90,(byte) 0x60,(byte) 0x0,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch234 = new BitmapCharRec(4,9,0,0,5,ch234data);
+
+/* char: 0xe9 */
+
+static final byte[] ch233data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x80,(byte) 0xf0,(byte) 0x90,(byte) 0x60,(byte) 0x0,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch233 = new BitmapCharRec(4,9,0,0,5,ch233data);
+
+/* char: 0xe8 */
+
+static final byte[] ch232data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x80,(byte) 0xf0,(byte) 0x90,(byte) 0x60,(byte) 0x0,(byte) 0x20,(byte) 0x40,
+};
+
+static final BitmapCharRec ch232 = new BitmapCharRec(4,9,0,0,5,ch232data);
+
+/* char: 0xe7 */
+
+static final byte[] ch231data = {
+(byte) 0x60,(byte) 0x20,(byte) 0x60,(byte) 0x90,(byte) 0x80,(byte) 0x80,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch231 = new BitmapCharRec(4,8,0,2,5,ch231data);
+
+/* char: 0xe6 */
+
+static final byte[] ch230data = {
+(byte) 0x6c,(byte) 0x92,(byte) 0x90,(byte) 0x7e,(byte) 0x12,(byte) 0xec,
+};
+
+static final BitmapCharRec ch230 = new BitmapCharRec(7,6,0,0,8,ch230data);
+
+/* char: 0xe5 */
+
+static final byte[] ch229data = {
+(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x70,(byte) 0x10,(byte) 0xe0,(byte) 0x20,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch229 = new BitmapCharRec(5,9,0,0,5,ch229data);
+
+/* char: 0xe4 */
+
+static final byte[] ch228data = {
+(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x70,(byte) 0x10,(byte) 0xe0,(byte) 0x0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch228 = new BitmapCharRec(5,8,0,0,5,ch228data);
+
+/* char: 0xe3 */
+
+static final byte[] ch227data = {
+(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x70,(byte) 0x10,(byte) 0xe0,(byte) 0x0,(byte) 0xa0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch227 = new BitmapCharRec(5,9,0,0,5,ch227data);
+
+/* char: 0xe2 */
+
+static final byte[] ch226data = {
+(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x70,(byte) 0x10,(byte) 0xe0,(byte) 0x0,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch226 = new BitmapCharRec(5,9,0,0,5,ch226data);
+
+/* char: 0xe1 */
+
+static final byte[] ch225data = {
+(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x70,(byte) 0x10,(byte) 0xe0,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch225 = new BitmapCharRec(5,9,0,0,5,ch225data);
+
+/* char: 0xe0 */
+
+static final byte[] ch224data = {
+(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x70,(byte) 0x10,(byte) 0xe0,(byte) 0x0,(byte) 0x20,(byte) 0x40,
+};
+
+static final BitmapCharRec ch224 = new BitmapCharRec(5,9,0,0,5,ch224data);
+
+/* char: 0xdf */
+
+static final byte[] ch223data = {
+(byte) 0xa0,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0xa0,(byte) 0x90,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch223 = new BitmapCharRec(4,8,0,0,5,ch223data);
+
+/* char: 0xde */
+
+static final byte[] ch222data = {
+(byte) 0x80,(byte) 0x80,(byte) 0xf0,(byte) 0x88,(byte) 0x88,(byte) 0xf0,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch222 = new BitmapCharRec(5,8,-1,0,7,ch222data);
+
+/* char: 0xdd */
+
+static final byte[] ch221data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x28,(byte) 0x44,(byte) 0x44,(byte) 0x82,(byte) 0x0,(byte) 0x10,(byte) 0x8,
+};
+
+static final BitmapCharRec ch221 = new BitmapCharRec(7,11,0,0,7,ch221data);
+
+/* char: 0xdc */
+
+static final byte[] ch220data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x48,
+};
+
+static final BitmapCharRec ch220 = new BitmapCharRec(6,10,-1,0,8,ch220data);
+
+/* char: 0xdb */
+
+static final byte[] ch219data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x28,(byte) 0x10,
+};
+
+static final BitmapCharRec ch219 = new BitmapCharRec(6,11,-1,0,8,ch219data);
+
+/* char: 0xda */
+
+static final byte[] ch218data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch218 = new BitmapCharRec(6,11,-1,0,8,ch218data);
+
+/* char: 0xd9 */
+
+static final byte[] ch217data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch217 = new BitmapCharRec(6,11,-1,0,8,ch217data);
+
+/* char: 0xd8 */
+
+static final byte[] ch216data = {
+(byte) 0x80,(byte) 0x78,(byte) 0xc4,(byte) 0xa4,(byte) 0xa4,(byte) 0x94,(byte) 0x94,(byte) 0x8c,(byte) 0x78,(byte) 0x4,
+};
+
+static final BitmapCharRec ch216 = new BitmapCharRec(6,10,-1,1,8,ch216data);
+
+/* char: 0xd7 */
+
+static final byte[] ch215data = {
+(byte) 0x88,(byte) 0x50,(byte) 0x20,(byte) 0x50,(byte) 0x88,
+};
+
+static final BitmapCharRec ch215 = new BitmapCharRec(5,5,0,-1,6,ch215data);
+
+/* char: 0xd6 */
+
+static final byte[] ch214data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x48,
+};
+
+static final BitmapCharRec ch214 = new BitmapCharRec(6,10,-1,0,8,ch214data);
+
+/* char: 0xd5 */
+
+static final byte[] ch213data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch213 = new BitmapCharRec(6,11,-1,0,8,ch213data);
+
+/* char: 0xd4 */
+
+static final byte[] ch212data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x28,(byte) 0x10,
+};
+
+static final BitmapCharRec ch212 = new BitmapCharRec(6,11,-1,0,8,ch212data);
+
+/* char: 0xd3 */
+
+static final byte[] ch211data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x10,(byte) 0x8,
+};
+
+static final BitmapCharRec ch211 = new BitmapCharRec(6,11,-1,0,8,ch211data);
+
+/* char: 0xd2 */
+
+static final byte[] ch210data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch210 = new BitmapCharRec(6,11,-1,0,8,ch210data);
+
+/* char: 0xd1 */
+
+static final byte[] ch209data = {
+(byte) 0x8c,(byte) 0x8c,(byte) 0x94,(byte) 0x94,(byte) 0xa4,(byte) 0xa4,(byte) 0xc4,(byte) 0xc4,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch209 = new BitmapCharRec(6,11,-1,0,8,ch209data);
+
+/* char: 0xd0 */
+
+static final byte[] ch208data = {
+(byte) 0x78,(byte) 0x44,(byte) 0x42,(byte) 0x42,(byte) 0xf2,(byte) 0x42,(byte) 0x44,(byte) 0x78,
+};
+
+static final BitmapCharRec ch208 = new BitmapCharRec(7,8,0,0,8,ch208data);
+
+/* char: 0xcf */
+
+static final byte[] ch207data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch207 = new BitmapCharRec(3,10,0,0,3,ch207data);
+
+/* char: 0xce */
+
+static final byte[] ch206data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0xa0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch206 = new BitmapCharRec(3,11,0,0,3,ch206data);
+
+/* char: 0xcd */
+
+static final byte[] ch205data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,(byte) 0x40,
+};
+
+static final BitmapCharRec ch205 = new BitmapCharRec(2,11,-1,0,3,ch205data);
+
+/* char: 0xcc */
+
+static final byte[] ch204data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch204 = new BitmapCharRec(2,11,0,0,3,ch204data);
+
+/* char: 0xcb */
+
+static final byte[] ch203data = {
+(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch203 = new BitmapCharRec(5,10,-1,0,7,ch203data);
+
+/* char: 0xca */
+
+static final byte[] ch202data = {
+(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x0,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch202 = new BitmapCharRec(5,11,-1,0,7,ch202data);
+
+/* char: 0xc9 */
+
+static final byte[] ch201data = {
+(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch201 = new BitmapCharRec(5,11,-1,0,7,ch201data);
+
+/* char: 0xc8 */
+
+static final byte[] ch200data = {
+(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x0,(byte) 0x20,(byte) 0x40,
+};
+
+static final BitmapCharRec ch200 = new BitmapCharRec(5,11,-1,0,7,ch200data);
+
+/* char: 0xc7 */
+
+static final byte[] ch199data = {
+(byte) 0x30,(byte) 0x10,(byte) 0x78,(byte) 0x84,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch199 = new BitmapCharRec(6,10,-1,2,8,ch199data);
+
+/* char: 0xc6 */
+
+static final byte[] ch198data = {
+(byte) 0x8f,(byte) 0x80,(byte) 0x88,(byte) 0x0,(byte) 0x78,(byte) 0x0,(byte) 0x48,(byte) 0x0,(byte) 0x2f,(byte) 0x80,(byte) 0x28,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x1f,(byte) 0x80,
+};
+
+static final BitmapCharRec ch198 = new BitmapCharRec(9,8,0,0,10,ch198data);
+
+/* char: 0xc5 */
+
+static final byte[] ch197data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x28,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x10,
+};
+
+static final BitmapCharRec ch197 = new BitmapCharRec(7,11,0,0,7,ch197data);
+
+/* char: 0xc4 */
+
+static final byte[] ch196data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x28,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x0,(byte) 0x28,
+};
+
+static final BitmapCharRec ch196 = new BitmapCharRec(7,10,0,0,7,ch196data);
+
+/* char: 0xc3 */
+
+static final byte[] ch195data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x28,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x0,(byte) 0x28,(byte) 0x14,
+};
+
+static final BitmapCharRec ch195 = new BitmapCharRec(7,11,0,0,7,ch195data);
+
+/* char: 0xc2 */
+
+static final byte[] ch194data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x28,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x0,(byte) 0x28,(byte) 0x10,
+};
+
+static final BitmapCharRec ch194 = new BitmapCharRec(7,11,0,0,7,ch194data);
+
+/* char: 0xc1 */
+
+static final byte[] ch193data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x28,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x0,(byte) 0x10,(byte) 0x8,
+};
+
+static final BitmapCharRec ch193 = new BitmapCharRec(7,11,0,0,7,ch193data);
+
+/* char: 0xc0 */
+
+static final byte[] ch192data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x28,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch192 = new BitmapCharRec(7,11,0,0,7,ch192data);
+
+/* char: 0xbf */
+
+static final byte[] ch191data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x0,(byte) 0x20,
+};
+
+static final BitmapCharRec ch191 = new BitmapCharRec(4,8,-1,2,6,ch191data);
+
+/* char: 0xbe */
+
+static final byte[] ch190data = {
+(byte) 0x21,(byte) 0x0,(byte) 0x17,(byte) 0x80,(byte) 0x13,(byte) 0x0,(byte) 0x9,(byte) 0x0,(byte) 0xc8,(byte) 0x0,(byte) 0x24,(byte) 0x0,(byte) 0x44,(byte) 0x0,(byte) 0xe2,(byte) 0x0,
+};
+
+static final BitmapCharRec ch190 = new BitmapCharRec(9,8,0,0,9,ch190data);
+
+/* char: 0xbd */
+
+static final byte[] ch189data = {
+(byte) 0x27,(byte) 0x12,(byte) 0x15,(byte) 0xb,(byte) 0x48,(byte) 0x44,(byte) 0xc4,(byte) 0x42,
+};
+
+static final BitmapCharRec ch189 = new BitmapCharRec(8,8,0,0,9,ch189data);
+
+/* char: 0xbc */
+
+static final byte[] ch188data = {
+(byte) 0x21,(byte) 0x0,(byte) 0x17,(byte) 0x80,(byte) 0x13,(byte) 0x0,(byte) 0x9,(byte) 0x0,(byte) 0x48,(byte) 0x0,(byte) 0x44,(byte) 0x0,(byte) 0xc4,(byte) 0x0,(byte) 0x42,(byte) 0x0,
+};
+
+static final BitmapCharRec ch188 = new BitmapCharRec(9,8,0,0,9,ch188data);
+
+/* char: 0xbb */
+
+static final byte[] ch187data = {
+(byte) 0xa0,(byte) 0x50,(byte) 0x28,(byte) 0x50,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch187 = new BitmapCharRec(5,5,0,0,6,ch187data);
+
+/* char: 0xba */
+
+static final byte[] ch186data = {
+(byte) 0xe0,(byte) 0x0,(byte) 0xe0,(byte) 0xa0,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch186 = new BitmapCharRec(3,5,0,-3,4,ch186data);
+
+/* char: 0xb9 */
+
+static final byte[] ch185data = {
+(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch185 = new BitmapCharRec(2,4,0,-3,3,ch185data);
+
+/* char: 0xb8 */
+
+static final byte[] ch184data = {
+(byte) 0xc0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch184 = new BitmapCharRec(2,2,0,2,3,ch184data);
+
+/* char: 0xb7 */
+
+static final byte[] ch183data = {
+(byte) 0xc0,
+};
+
+static final BitmapCharRec ch183 = new BitmapCharRec(2,1,0,-3,3,ch183data);
+
+/* char: 0xb6 */
+
+static final byte[] ch182data = {
+(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x68,(byte) 0xe8,(byte) 0xe8,(byte) 0xe8,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch182 = new BitmapCharRec(6,10,0,2,6,ch182data);
+
+/* char: 0xb5 */
+
+static final byte[] ch181data = {
+(byte) 0x80,(byte) 0x80,(byte) 0xf0,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,
+};
+
+static final BitmapCharRec ch181 = new BitmapCharRec(4,8,0,2,5,ch181data);
+
+/* char: 0xb4 */
+
+static final byte[] ch180data = {
+(byte) 0x80,(byte) 0x40,
+};
+
+static final BitmapCharRec ch180 = new BitmapCharRec(2,2,0,-6,3,ch180data);
+
+/* char: 0xb3 */
+
+static final byte[] ch179data = {
+(byte) 0xc0,(byte) 0x20,(byte) 0x40,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch179 = new BitmapCharRec(3,4,0,-3,3,ch179data);
+
+/* char: 0xb2 */
+
+static final byte[] ch178data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0xa0,(byte) 0x60,
+};
+
+static final BitmapCharRec ch178 = new BitmapCharRec(3,4,0,-3,3,ch178data);
+
+/* char: 0xb1 */
+
+static final byte[] ch177data = {
+(byte) 0xf8,(byte) 0x0,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x20,
+};
+
+static final BitmapCharRec ch177 = new BitmapCharRec(5,7,0,0,6,ch177data);
+
+/* char: 0xb0 */
+
+static final byte[] ch176data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch176 = new BitmapCharRec(4,4,0,-3,4,ch176data);
+
+/* char: 0xaf */
+
+static final byte[] ch175data = {
+(byte) 0xe0,
+};
+
+static final BitmapCharRec ch175 = new BitmapCharRec(3,1,0,-7,3,ch175data);
+
+/* char: 0xae */
+
+static final byte[] ch174data = {
+(byte) 0x38,(byte) 0x44,(byte) 0xaa,(byte) 0xb2,(byte) 0xba,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch174 = new BitmapCharRec(7,7,-1,0,9,ch174data);
+
+/* char: 0xad */
+
+static final byte[] ch173data = {
+(byte) 0xe0,
+};
+
+static final BitmapCharRec ch173 = new BitmapCharRec(3,1,0,-3,4,ch173data);
+
+/* char: 0xac */
+
+static final byte[] ch172data = {
+(byte) 0x8,(byte) 0x8,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch172 = new BitmapCharRec(5,3,-1,-2,7,ch172data);
+
+/* char: 0xab */
+
+static final byte[] ch171data = {
+(byte) 0x28,(byte) 0x50,(byte) 0xa0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch171 = new BitmapCharRec(5,5,0,0,6,ch171data);
+
+/* char: 0xaa */
+
+static final byte[] ch170data = {
+(byte) 0xe0,(byte) 0x0,(byte) 0xa0,(byte) 0x20,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch170 = new BitmapCharRec(3,5,0,-3,4,ch170data);
+
+/* char: 0xa9 */
+
+static final byte[] ch169data = {
+(byte) 0x38,(byte) 0x44,(byte) 0x9a,(byte) 0xa2,(byte) 0x9a,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch169 = new BitmapCharRec(7,7,-1,0,9,ch169data);
+
+/* char: 0xa8 */
+
+static final byte[] ch168data = {
+(byte) 0xa0,
+};
+
+static final BitmapCharRec ch168 = new BitmapCharRec(3,1,0,-7,3,ch168data);
+
+/* char: 0xa7 */
+
+static final byte[] ch167data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x18,(byte) 0x70,(byte) 0xc8,(byte) 0x98,(byte) 0x70,(byte) 0xc0,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch167 = new BitmapCharRec(5,10,0,2,6,ch167data);
+
+/* char: 0xa6 */
+
+static final byte[] ch166data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch166 = new BitmapCharRec(1,10,-1,2,3,ch166data);
+
+/* char: 0xa5 */
+
+static final byte[] ch165data = {
+(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0xf8,(byte) 0x50,(byte) 0x50,(byte) 0x88,(byte) 0x88,
+};
+
+static final BitmapCharRec ch165 = new BitmapCharRec(5,8,0,0,6,ch165data);
+
+/* char: 0xa4 */
+
+static final byte[] ch164data = {
+(byte) 0x90,(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x60,(byte) 0x90,
+};
+
+static final BitmapCharRec ch164 = new BitmapCharRec(4,6,0,-1,5,ch164data);
+
+/* char: 0xa3 */
+
+static final byte[] ch163data = {
+(byte) 0xb0,(byte) 0x48,(byte) 0x40,(byte) 0x40,(byte) 0xe0,(byte) 0x40,(byte) 0x48,(byte) 0x30,
+};
+
+static final BitmapCharRec ch163 = new BitmapCharRec(5,8,0,0,6,ch163data);
+
+/* char: 0xa2 */
+
+static final byte[] ch162data = {
+(byte) 0x40,(byte) 0x70,(byte) 0xa8,(byte) 0xa0,(byte) 0xa0,(byte) 0xa8,(byte) 0x70,(byte) 0x10,
+};
+
+static final BitmapCharRec ch162 = new BitmapCharRec(5,8,0,1,6,ch162data);
+
+/* char: 0xa1 */
+
+static final byte[] ch161data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,
+};
+
+static final BitmapCharRec ch161 = new BitmapCharRec(1,8,-1,2,3,ch161data);
+
+/* char: 0xa0 */
+
+static final BitmapCharRec ch160 = new BitmapCharRec(0,0,0,0,3,null);
+
+/* char: 0x7e '~' */
+
+static final byte[] ch126data = {
+(byte) 0x98,(byte) 0x64,
+};
+
+static final BitmapCharRec ch126 = new BitmapCharRec(6,2,0,-3,7,ch126data);
+
+/* char: 0x7d '}' */
+
+static final byte[] ch125data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch125 = new BitmapCharRec(3,10,0,2,3,ch125data);
+
+/* char: 0x7c '|' */
+
+static final byte[] ch124data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch124 = new BitmapCharRec(1,10,-1,2,3,ch124data);
+
+/* char: 0x7b '{' */
+
+static final byte[] ch123data = {
+(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch123 = new BitmapCharRec(3,10,0,2,3,ch123data);
+
+/* char: 0x7a 'z' */
+
+static final byte[] ch122data = {
+(byte) 0xf0,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch122 = new BitmapCharRec(4,6,0,0,5,ch122data);
+
+/* char: 0x79 'y' */
+
+static final byte[] ch121data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x60,(byte) 0xa0,(byte) 0xa0,(byte) 0x90,(byte) 0x90,
+};
+
+static final BitmapCharRec ch121 = new BitmapCharRec(4,8,0,2,5,ch121data);
+
+/* char: 0x78 'x' */
+
+static final byte[] ch120data = {
+(byte) 0x88,(byte) 0x88,(byte) 0x50,(byte) 0x20,(byte) 0x50,(byte) 0x88,
+};
+
+static final BitmapCharRec ch120 = new BitmapCharRec(5,6,0,0,6,ch120data);
+
+/* char: 0x77 'w' */
+
+static final byte[] ch119data = {
+(byte) 0x28,(byte) 0x28,(byte) 0x54,(byte) 0x54,(byte) 0x92,(byte) 0x92,
+};
+
+static final BitmapCharRec ch119 = new BitmapCharRec(7,6,0,0,8,ch119data);
+
+/* char: 0x76 'v' */
+
+static final byte[] ch118data = {
+(byte) 0x20,(byte) 0x20,(byte) 0x50,(byte) 0x50,(byte) 0x88,(byte) 0x88,
+};
+
+static final BitmapCharRec ch118 = new BitmapCharRec(5,6,0,0,6,ch118data);
+
+/* char: 0x75 'u' */
+
+static final byte[] ch117data = {
+(byte) 0x70,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,
+};
+
+static final BitmapCharRec ch117 = new BitmapCharRec(4,6,0,0,5,ch117data);
+
+/* char: 0x74 't' */
+
+static final byte[] ch116data = {
+(byte) 0x60,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,(byte) 0x40,(byte) 0x40,
+};
+
+static final BitmapCharRec ch116 = new BitmapCharRec(3,8,0,0,4,ch116data);
+
+/* char: 0x73 's' */
+
+static final byte[] ch115data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x10,(byte) 0x60,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch115 = new BitmapCharRec(4,6,0,0,5,ch115data);
+
+/* char: 0x72 'r' */
+
+static final byte[] ch114data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xc0,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch114 = new BitmapCharRec(3,6,0,0,4,ch114data);
+
+/* char: 0x71 'q' */
+
+static final byte[] ch113data = {
+(byte) 0x8,(byte) 0x8,(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x98,(byte) 0x68,
+};
+
+static final BitmapCharRec ch113 = new BitmapCharRec(5,8,0,2,6,ch113data);
+
+/* char: 0x70 'p' */
+
+static final byte[] ch112data = {
+(byte) 0x80,(byte) 0x80,(byte) 0xb0,(byte) 0xc8,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,
+};
+
+static final BitmapCharRec ch112 = new BitmapCharRec(5,8,0,2,6,ch112data);
+
+/* char: 0x6f 'o' */
+
+static final byte[] ch111data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch111 = new BitmapCharRec(5,6,0,0,6,ch111data);
+
+/* char: 0x6e 'n' */
+
+static final byte[] ch110data = {
+(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,
+};
+
+static final BitmapCharRec ch110 = new BitmapCharRec(5,6,0,0,6,ch110data);
+
+/* char: 0x6d 'm' */
+
+static final byte[] ch109data = {
+(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0xec,
+};
+
+static final BitmapCharRec ch109 = new BitmapCharRec(7,6,0,0,8,ch109data);
+
+/* char: 0x6c 'l' */
+
+static final byte[] ch108data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch108 = new BitmapCharRec(1,8,0,0,2,ch108data);
+
+/* char: 0x6b 'k' */
+
+static final byte[] ch107data = {
+(byte) 0x90,(byte) 0x90,(byte) 0xa0,(byte) 0xc0,(byte) 0xa0,(byte) 0x90,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch107 = new BitmapCharRec(4,8,0,0,5,ch107data);
+
+/* char: 0x6a 'j' */
+
+static final byte[] ch106data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,
+};
+
+static final BitmapCharRec ch106 = new BitmapCharRec(1,9,0,1,2,ch106data);
+
+/* char: 0x69 'i' */
+
+static final byte[] ch105data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,
+};
+
+static final BitmapCharRec ch105 = new BitmapCharRec(1,8,0,0,2,ch105data);
+
+/* char: 0x68 'h' */
+
+static final byte[] ch104data = {
+(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch104 = new BitmapCharRec(5,8,0,0,6,ch104data);
+
+/* char: 0x67 'g' */
+
+static final byte[] ch103data = {
+(byte) 0x70,(byte) 0x8,(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x98,(byte) 0x68,
+};
+
+static final BitmapCharRec ch103 = new BitmapCharRec(5,8,0,2,6,ch103data);
+
+/* char: 0x66 'f' */
+
+static final byte[] ch102data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,(byte) 0x40,(byte) 0x30,
+};
+
+static final BitmapCharRec ch102 = new BitmapCharRec(4,8,0,0,4,ch102data);
+
+/* char: 0x65 'e' */
+
+static final byte[] ch101data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x80,(byte) 0xf0,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch101 = new BitmapCharRec(4,6,0,0,5,ch101data);
+
+/* char: 0x64 'd' */
+
+static final byte[] ch100data = {
+(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x98,(byte) 0x68,(byte) 0x8,(byte) 0x8,
+};
+
+static final BitmapCharRec ch100 = new BitmapCharRec(5,8,0,0,6,ch100data);
+
+/* char: 0x63 'c' */
+
+static final byte[] ch99data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x80,(byte) 0x80,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch99 = new BitmapCharRec(4,6,0,0,5,ch99data);
+
+/* char: 0x62 'b' */
+
+static final byte[] ch98data = {
+(byte) 0xb0,(byte) 0xc8,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch98 = new BitmapCharRec(5,8,0,0,6,ch98data);
+
+/* char: 0x61 'a' */
+
+static final byte[] ch97data = {
+(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x70,(byte) 0x10,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch97 = new BitmapCharRec(5,6,0,0,5,ch97data);
+
+/* char: 0x60 '`' */
+
+static final byte[] ch96data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x40,
+};
+
+static final BitmapCharRec ch96 = new BitmapCharRec(2,3,0,-5,3,ch96data);
+
+/* char: 0x5f '_' */
+
+static final byte[] ch95data = {
+(byte) 0xfc,
+};
+
+static final BitmapCharRec ch95 = new BitmapCharRec(6,1,0,2,6,ch95data);
+
+/* char: 0x5e '^' */
+
+static final byte[] ch94data = {
+(byte) 0x88,(byte) 0x50,(byte) 0x50,(byte) 0x20,(byte) 0x20,
+};
+
+static final BitmapCharRec ch94 = new BitmapCharRec(5,5,0,-3,6,ch94data);
+
+/* char: 0x5d ']' */
+
+static final byte[] ch93data = {
+(byte) 0xc0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch93 = new BitmapCharRec(2,10,0,2,3,ch93data);
+
+/* char: 0x5c '\' */
+
+static final byte[] ch92data = {
+(byte) 0x20,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch92 = new BitmapCharRec(3,8,0,0,3,ch92data);
+
+/* char: 0x5b '[' */
+
+static final byte[] ch91data = {
+(byte) 0xc0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch91 = new BitmapCharRec(2,10,-1,2,3,ch91data);
+
+/* char: 0x5a 'Z' */
+
+static final byte[] ch90data = {
+(byte) 0xf8,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch90 = new BitmapCharRec(5,8,-1,0,7,ch90data);
+
+/* char: 0x59 'Y' */
+
+static final byte[] ch89data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x28,(byte) 0x44,(byte) 0x44,(byte) 0x82,
+};
+
+static final BitmapCharRec ch89 = new BitmapCharRec(7,8,0,0,7,ch89data);
+
+/* char: 0x58 'X' */
+
+static final byte[] ch88data = {
+(byte) 0x88,(byte) 0x88,(byte) 0x50,(byte) 0x50,(byte) 0x20,(byte) 0x50,(byte) 0x88,(byte) 0x88,
+};
+
+static final BitmapCharRec ch88 = new BitmapCharRec(5,8,-1,0,7,ch88data);
+
+/* char: 0x57 'W' */
+
+static final byte[] ch87data = {
+(byte) 0x22,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0x55,(byte) 0x0,(byte) 0x49,(byte) 0x0,(byte) 0x49,(byte) 0x0,(byte) 0x88,(byte) 0x80,(byte) 0x88,(byte) 0x80,
+};
+
+static final BitmapCharRec ch87 = new BitmapCharRec(9,8,0,0,9,ch87data);
+
+/* char: 0x56 'V' */
+
+static final byte[] ch86data = {
+(byte) 0x10,(byte) 0x28,(byte) 0x28,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch86 = new BitmapCharRec(7,8,0,0,7,ch86data);
+
+/* char: 0x55 'U' */
+
+static final byte[] ch85data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,
+};
+
+static final BitmapCharRec ch85 = new BitmapCharRec(6,8,-1,0,8,ch85data);
+
+/* char: 0x54 'T' */
+
+static final byte[] ch84data = {
+(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch84 = new BitmapCharRec(5,8,0,0,5,ch84data);
+
+/* char: 0x53 'S' */
+
+static final byte[] ch83data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x8,(byte) 0x70,(byte) 0x80,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch83 = new BitmapCharRec(5,8,-1,0,7,ch83data);
+
+/* char: 0x52 'R' */
+
+static final byte[] ch82data = {
+(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xf0,(byte) 0x88,(byte) 0x88,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch82 = new BitmapCharRec(5,8,-1,0,7,ch82data);
+
+/* char: 0x51 'Q' */
+
+static final byte[] ch81data = {
+(byte) 0x2,(byte) 0x7c,(byte) 0x8c,(byte) 0x94,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch81 = new BitmapCharRec(7,9,-1,1,8,ch81data);
+
+/* char: 0x50 'P' */
+
+static final byte[] ch80data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf0,(byte) 0x88,(byte) 0x88,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch80 = new BitmapCharRec(5,8,-1,0,7,ch80data);
+
+/* char: 0x4f 'O' */
+
+static final byte[] ch79data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch79 = new BitmapCharRec(6,8,-1,0,8,ch79data);
+
+/* char: 0x4e 'N' */
+
+static final byte[] ch78data = {
+(byte) 0x8c,(byte) 0x8c,(byte) 0x94,(byte) 0x94,(byte) 0xa4,(byte) 0xa4,(byte) 0xc4,(byte) 0xc4,
+};
+
+static final BitmapCharRec ch78 = new BitmapCharRec(6,8,-1,0,8,ch78data);
+
+/* char: 0x4d 'M' */
+
+static final byte[] ch77data = {
+(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0xaa,(byte) 0xaa,(byte) 0xc6,(byte) 0xc6,(byte) 0x82,
+};
+
+static final BitmapCharRec ch77 = new BitmapCharRec(7,8,-1,0,9,ch77data);
+
+/* char: 0x4c 'L' */
+
+static final byte[] ch76data = {
+(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch76 = new BitmapCharRec(4,8,-1,0,6,ch76data);
+
+/* char: 0x4b 'K' */
+
+static final byte[] ch75data = {
+(byte) 0x88,(byte) 0x88,(byte) 0x90,(byte) 0x90,(byte) 0xe0,(byte) 0xa0,(byte) 0x90,(byte) 0x88,
+};
+
+static final BitmapCharRec ch75 = new BitmapCharRec(5,8,-1,0,7,ch75data);
+
+/* char: 0x4a 'J' */
+
+static final byte[] ch74data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,
+};
+
+static final BitmapCharRec ch74 = new BitmapCharRec(4,8,0,0,5,ch74data);
+
+/* char: 0x49 'I' */
+
+static final byte[] ch73data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch73 = new BitmapCharRec(1,8,-1,0,3,ch73data);
+
+/* char: 0x48 'H' */
+
+static final byte[] ch72data = {
+(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xfc,(byte) 0x84,(byte) 0x84,(byte) 0x84,
+};
+
+static final BitmapCharRec ch72 = new BitmapCharRec(6,8,-1,0,8,ch72data);
+
+/* char: 0x47 'G' */
+
+static final byte[] ch71data = {
+(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x8c,(byte) 0x80,(byte) 0x80,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch71 = new BitmapCharRec(6,8,-1,0,8,ch71data);
+
+/* char: 0x46 'F' */
+
+static final byte[] ch70data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch70 = new BitmapCharRec(5,8,-1,0,6,ch70data);
+
+/* char: 0x45 'E' */
+
+static final byte[] ch69data = {
+(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch69 = new BitmapCharRec(5,8,-1,0,7,ch69data);
+
+/* char: 0x44 'D' */
+
+static final byte[] ch68data = {
+(byte) 0xf0,(byte) 0x88,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x88,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch68 = new BitmapCharRec(6,8,-1,0,8,ch68data);
+
+/* char: 0x43 'C' */
+
+static final byte[] ch67data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch67 = new BitmapCharRec(6,8,-1,0,8,ch67data);
+
+/* char: 0x42 'B' */
+
+static final byte[] ch66data = {
+(byte) 0xf0,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xf0,(byte) 0x88,(byte) 0x88,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch66 = new BitmapCharRec(5,8,-1,0,7,ch66data);
+
+/* char: 0x41 'A' */
+
+static final byte[] ch65data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x28,(byte) 0x28,(byte) 0x10,(byte) 0x10,
+};
+
+static final BitmapCharRec ch65 = new BitmapCharRec(7,8,0,0,7,ch65data);
+
+/* char: 0x40 '@' */
+
+static final byte[] ch64data = {
+(byte) 0x3e,(byte) 0x0,(byte) 0x40,(byte) 0x0,(byte) 0x9b,(byte) 0x0,(byte) 0xa4,(byte) 0x80,(byte) 0xa4,(byte) 0x80,(byte) 0xa2,(byte) 0x40,(byte) 0x92,(byte) 0x40,(byte) 0x4d,(byte) 0x40,
+(byte) 0x20,(byte) 0x80,(byte) 0x1f,(byte) 0x0,
+};
+
+static final BitmapCharRec ch64 = new BitmapCharRec(10,10,0,2,11,ch64data);
+
+/* char: 0x3f '?' */
+
+static final byte[] ch63data = {
+(byte) 0x40,(byte) 0x0,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch63 = new BitmapCharRec(4,8,-1,0,6,ch63data);
+
+/* char: 0x3e '>' */
+
+static final byte[] ch62data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch62 = new BitmapCharRec(3,5,-1,-1,6,ch62data);
+
+/* char: 0x3d '=' */
+
+static final byte[] ch61data = {
+(byte) 0xf0,(byte) 0x0,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch61 = new BitmapCharRec(4,3,0,-2,5,ch61data);
+
+/* char: 0x3c '<' */
+
+static final byte[] ch60data = {
+(byte) 0x20,(byte) 0x40,(byte) 0x80,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch60 = new BitmapCharRec(3,5,-1,-1,6,ch60data);
+
+/* char: 0x3b ';' */
+
+static final byte[] ch59data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch59 = new BitmapCharRec(2,8,0,2,3,ch59data);
+
+/* char: 0x3a ':' */
+
+static final byte[] ch58data = {
+(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x80,
+};
+
+static final BitmapCharRec ch58 = new BitmapCharRec(1,6,-1,0,3,ch58data);
+
+/* char: 0x39 '9' */
+
+static final byte[] ch57data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x8,(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch57 = new BitmapCharRec(5,8,0,0,6,ch57data);
+
+/* char: 0x38 '8' */
+
+static final byte[] ch56data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch56 = new BitmapCharRec(5,8,0,0,6,ch56data);
+
+/* char: 0x37 '7' */
+
+static final byte[] ch55data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x10,(byte) 0x10,(byte) 0x8,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch55 = new BitmapCharRec(5,8,0,0,6,ch55data);
+
+/* char: 0x36 '6' */
+
+static final byte[] ch54data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,(byte) 0x80,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch54 = new BitmapCharRec(5,8,0,0,6,ch54data);
+
+/* char: 0x35 '5' */
+
+static final byte[] ch53data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x8,(byte) 0x8,(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch53 = new BitmapCharRec(5,8,0,0,6,ch53data);
+
+/* char: 0x34 '4' */
+
+static final byte[] ch52data = {
+(byte) 0x10,(byte) 0x10,(byte) 0xf8,(byte) 0x90,(byte) 0x50,(byte) 0x50,(byte) 0x30,(byte) 0x10,
+};
+
+static final BitmapCharRec ch52 = new BitmapCharRec(5,8,0,0,6,ch52data);
+
+/* char: 0x33 '3' */
+
+static final byte[] ch51data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x8,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch51 = new BitmapCharRec(5,8,0,0,6,ch51data);
+
+/* char: 0x32 '2' */
+
+static final byte[] ch50data = {
+(byte) 0xf8,(byte) 0x80,(byte) 0x40,(byte) 0x30,(byte) 0x8,(byte) 0x8,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch50 = new BitmapCharRec(5,8,0,0,6,ch50data);
+
+/* char: 0x31 '1' */
+
+static final byte[] ch49data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch49 = new BitmapCharRec(2,8,-1,0,6,ch49data);
+
+/* char: 0x30 '0' */
+
+static final byte[] ch48data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch48 = new BitmapCharRec(5,8,0,0,6,ch48data);
+
+/* char: 0x2f '/' */
+
+static final byte[] ch47data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,
+};
+
+static final BitmapCharRec ch47 = new BitmapCharRec(3,8,0,0,3,ch47data);
+
+/* char: 0x2e '.' */
+
+static final byte[] ch46data = {
+(byte) 0x80,
+};
+
+static final BitmapCharRec ch46 = new BitmapCharRec(1,1,-1,0,3,ch46data);
+
+/* char: 0x2d '-' */
+
+static final byte[] ch45data = {
+(byte) 0xf8,
+};
+
+static final BitmapCharRec ch45 = new BitmapCharRec(5,1,-1,-3,7,ch45data);
+
+/* char: 0x2c ',' */
+
+static final byte[] ch44data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,
+};
+
+static final BitmapCharRec ch44 = new BitmapCharRec(2,3,0,2,3,ch44data);
+
+/* char: 0x2b '+' */
+
+static final byte[] ch43data = {
+(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x20,
+};
+
+static final BitmapCharRec ch43 = new BitmapCharRec(5,5,0,-1,6,ch43data);
+
+/* char: 0x2a '*' */
+
+static final byte[] ch42data = {
+(byte) 0xa0,(byte) 0x40,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch42 = new BitmapCharRec(3,3,0,-5,4,ch42data);
+
+/* char: 0x29 ')' */
+
+static final byte[] ch41data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch41 = new BitmapCharRec(3,10,-1,2,4,ch41data);
+
+/* char: 0x28 '(' */
+
+static final byte[] ch40data = {
+(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch40 = new BitmapCharRec(3,10,0,2,4,ch40data);
+
+/* char: 0x27 ''' */
+
+static final byte[] ch39data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,
+};
+
+static final BitmapCharRec ch39 = new BitmapCharRec(2,3,-1,-5,3,ch39data);
+
+/* char: 0x26 '&' */
+
+static final byte[] ch38data = {
+(byte) 0x64,(byte) 0x98,(byte) 0x98,(byte) 0xa4,(byte) 0x60,(byte) 0x50,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch38 = new BitmapCharRec(6,8,-1,0,8,ch38data);
+
+/* char: 0x25 '%' */
+
+static final byte[] ch37data = {
+(byte) 0x26,(byte) 0x29,(byte) 0x16,(byte) 0x10,(byte) 0x8,(byte) 0x68,(byte) 0x94,(byte) 0x64,
+};
+
+static final BitmapCharRec ch37 = new BitmapCharRec(8,8,0,0,9,ch37data);
+
+/* char: 0x24 '$' */
+
+static final byte[] ch36data = {
+(byte) 0x20,(byte) 0x70,(byte) 0xa8,(byte) 0x28,(byte) 0x70,(byte) 0xa0,(byte) 0xa8,(byte) 0x70,(byte) 0x20,
+};
+
+static final BitmapCharRec ch36 = new BitmapCharRec(5,9,0,1,6,ch36data);
+
+/* char: 0x23 '#' */
+
+static final byte[] ch35data = {
+(byte) 0x50,(byte) 0x50,(byte) 0xf8,(byte) 0x28,(byte) 0x7c,(byte) 0x28,(byte) 0x28,
+};
+
+static final BitmapCharRec ch35 = new BitmapCharRec(6,7,0,0,6,ch35data);
+
+/* char: 0x22 '"' */
+
+static final byte[] ch34data = {
+(byte) 0xa0,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch34 = new BitmapCharRec(3,2,-1,-6,4,ch34data);
+
+/* char: 0x21 '!' */
+
+static final byte[] ch33data = {
+(byte) 0x80,(byte) 0x0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch33 = new BitmapCharRec(1,8,-1,0,3,ch33data);
+
+/* char: 0x20 ' ' */
+
+static final BitmapCharRec ch32 = new BitmapCharRec(0,0,0,0,3,null);
+
+static final BitmapCharRec[] chars = {
+ch32,
+ch33,
+ch34,
+ch35,
+ch36,
+ch37,
+ch38,
+ch39,
+ch40,
+ch41,
+ch42,
+ch43,
+ch44,
+ch45,
+ch46,
+ch47,
+ch48,
+ch49,
+ch50,
+ch51,
+ch52,
+ch53,
+ch54,
+ch55,
+ch56,
+ch57,
+ch58,
+ch59,
+ch60,
+ch61,
+ch62,
+ch63,
+ch64,
+ch65,
+ch66,
+ch67,
+ch68,
+ch69,
+ch70,
+ch71,
+ch72,
+ch73,
+ch74,
+ch75,
+ch76,
+ch77,
+ch78,
+ch79,
+ch80,
+ch81,
+ch82,
+ch83,
+ch84,
+ch85,
+ch86,
+ch87,
+ch88,
+ch89,
+ch90,
+ch91,
+ch92,
+ch93,
+ch94,
+ch95,
+ch96,
+ch97,
+ch98,
+ch99,
+ch100,
+ch101,
+ch102,
+ch103,
+ch104,
+ch105,
+ch106,
+ch107,
+ch108,
+ch109,
+ch110,
+ch111,
+ch112,
+ch113,
+ch114,
+ch115,
+ch116,
+ch117,
+ch118,
+ch119,
+ch120,
+ch121,
+ch122,
+ch123,
+ch124,
+ch125,
+ch126,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+ch160,
+ch161,
+ch162,
+ch163,
+ch164,
+ch165,
+ch166,
+ch167,
+ch168,
+ch169,
+ch170,
+ch171,
+ch172,
+ch173,
+ch174,
+ch175,
+ch176,
+ch177,
+ch178,
+ch179,
+ch180,
+ch181,
+ch182,
+ch183,
+ch184,
+ch185,
+ch186,
+ch187,
+ch188,
+ch189,
+ch190,
+ch191,
+ch192,
+ch193,
+ch194,
+ch195,
+ch196,
+ch197,
+ch198,
+ch199,
+ch200,
+ch201,
+ch202,
+ch203,
+ch204,
+ch205,
+ch206,
+ch207,
+ch208,
+ch209,
+ch210,
+ch211,
+ch212,
+ch213,
+ch214,
+ch215,
+ch216,
+ch217,
+ch218,
+ch219,
+ch220,
+ch221,
+ch222,
+ch223,
+ch224,
+ch225,
+ch226,
+ch227,
+ch228,
+ch229,
+ch230,
+ch231,
+ch232,
+ch233,
+ch234,
+ch235,
+ch236,
+ch237,
+ch238,
+ch239,
+ch240,
+ch241,
+ch242,
+ch243,
+ch244,
+ch245,
+ch246,
+ch247,
+ch248,
+ch249,
+ch250,
+ch251,
+ch252,
+ch253,
+ch254,
+ch255,
+};
+
+ public static final BitmapFontRec glutBitmapHelvetica10 = new BitmapFontRec("-adobe-helvetica-medium-r-normal--10-100-75-75-p-56-iso8859-1",
+ 224,
+ 32,
+ chars);
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTBitmapHelvetica12.java b/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTBitmapHelvetica12.java
new file mode 100644
index 000000000..bc86f6216
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTBitmapHelvetica12.java
@@ -0,0 +1,1808 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.util.gl2;
+
+class GLUTBitmapHelvetica12 {
+
+/* GENERATED FILE -- DO NOT MODIFY */
+
+/* char: 0xff */
+
+static final byte[] ch255data = {
+(byte) 0xc0,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x30,(byte) 0x50,(byte) 0x50,(byte) 0x48,(byte) 0x88,(byte) 0x88,(byte) 0x0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch255 = new BitmapCharRec(5,12,-1,3,7,ch255data);
+
+/* char: 0xfe */
+
+static final byte[] ch254data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xb0,(byte) 0xc8,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch254 = new BitmapCharRec(5,12,-1,3,7,ch254data);
+
+/* char: 0xfd */
+
+static final byte[] ch253data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x50,(byte) 0x50,(byte) 0x90,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch253 = new BitmapCharRec(5,13,-1,3,7,ch253data);
+
+/* char: 0xfc */
+
+static final byte[] ch252data = {
+(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch252 = new BitmapCharRec(5,9,-1,0,7,ch252data);
+
+/* char: 0xfb */
+
+static final byte[] ch251data = {
+(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x0,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch251 = new BitmapCharRec(5,10,-1,0,7,ch251data);
+
+/* char: 0xfa */
+
+static final byte[] ch250data = {
+(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch250 = new BitmapCharRec(5,10,-1,0,7,ch250data);
+
+/* char: 0xf9 */
+
+static final byte[] ch249data = {
+(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x0,(byte) 0x20,(byte) 0x40,
+};
+
+static final BitmapCharRec ch249 = new BitmapCharRec(5,10,-1,0,7,ch249data);
+
+/* char: 0xf8 */
+
+static final byte[] ch248data = {
+(byte) 0xb8,(byte) 0x44,(byte) 0x64,(byte) 0x54,(byte) 0x4c,(byte) 0x44,(byte) 0x3a,
+};
+
+static final BitmapCharRec ch248 = new BitmapCharRec(7,7,0,0,7,ch248data);
+
+/* char: 0xf7 */
+
+static final byte[] ch247data = {
+(byte) 0x20,(byte) 0x0,(byte) 0xf8,(byte) 0x0,(byte) 0x20,
+};
+
+static final BitmapCharRec ch247 = new BitmapCharRec(5,5,-1,-1,7,ch247data);
+
+/* char: 0xf6 */
+
+static final byte[] ch246data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch246 = new BitmapCharRec(5,9,-1,0,7,ch246data);
+
+/* char: 0xf5 */
+
+static final byte[] ch245data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch245 = new BitmapCharRec(5,10,-1,0,7,ch245data);
+
+/* char: 0xf4 */
+
+static final byte[] ch244data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch244 = new BitmapCharRec(5,10,-1,0,7,ch244data);
+
+/* char: 0xf3 */
+
+static final byte[] ch243data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch243 = new BitmapCharRec(5,10,-1,0,7,ch243data);
+
+/* char: 0xf2 */
+
+static final byte[] ch242data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x20,(byte) 0x40,
+};
+
+static final BitmapCharRec ch242 = new BitmapCharRec(5,10,-1,0,7,ch242data);
+
+/* char: 0xf1 */
+
+static final byte[] ch241data = {
+(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch241 = new BitmapCharRec(5,10,-1,0,7,ch241data);
+
+/* char: 0xf0 */
+
+static final byte[] ch240data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x78,(byte) 0x8,(byte) 0x50,(byte) 0x30,(byte) 0x68,
+};
+
+static final BitmapCharRec ch240 = new BitmapCharRec(5,10,-1,0,7,ch240data);
+
+/* char: 0xef */
+
+static final byte[] ch239data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch239 = new BitmapCharRec(3,9,0,0,3,ch239data);
+
+/* char: 0xee */
+
+static final byte[] ch238data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0xa0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch238 = new BitmapCharRec(3,10,0,0,3,ch238data);
+
+/* char: 0xed */
+
+static final byte[] ch237data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,(byte) 0x40,
+};
+
+static final BitmapCharRec ch237 = new BitmapCharRec(2,10,-1,0,3,ch237data);
+
+/* char: 0xec */
+
+static final byte[] ch236data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch236 = new BitmapCharRec(2,10,0,0,3,ch236data);
+
+/* char: 0xeb */
+
+static final byte[] ch235data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x80,(byte) 0xf8,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch235 = new BitmapCharRec(5,9,-1,0,7,ch235data);
+
+/* char: 0xea */
+
+static final byte[] ch234data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x80,(byte) 0xf8,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch234 = new BitmapCharRec(5,10,-1,0,7,ch234data);
+
+/* char: 0xe9 */
+
+static final byte[] ch233data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x80,(byte) 0xf8,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch233 = new BitmapCharRec(5,10,-1,0,7,ch233data);
+
+/* char: 0xe8 */
+
+static final byte[] ch232data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x80,(byte) 0xf8,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x20,(byte) 0x40,
+};
+
+static final BitmapCharRec ch232 = new BitmapCharRec(5,10,-1,0,7,ch232data);
+
+/* char: 0xe7 */
+
+static final byte[] ch231data = {
+(byte) 0x60,(byte) 0x10,(byte) 0x20,(byte) 0x70,(byte) 0x88,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch231 = new BitmapCharRec(5,10,-1,3,7,ch231data);
+
+/* char: 0xe6 */
+
+static final byte[] ch230data = {
+(byte) 0x77,(byte) 0x0,(byte) 0x88,(byte) 0x80,(byte) 0x88,(byte) 0x0,(byte) 0x7f,(byte) 0x80,(byte) 0x8,(byte) 0x80,(byte) 0x88,(byte) 0x80,(byte) 0x77,(byte) 0x0,
+};
+
+static final BitmapCharRec ch230 = new BitmapCharRec(9,7,-1,0,11,ch230data);
+
+/* char: 0xe5 */
+
+static final byte[] ch229data = {
+(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x78,(byte) 0x8,(byte) 0x88,(byte) 0x70,(byte) 0x30,(byte) 0x48,(byte) 0x30,
+};
+
+static final BitmapCharRec ch229 = new BitmapCharRec(6,10,-1,0,7,ch229data);
+
+/* char: 0xe4 */
+
+static final byte[] ch228data = {
+(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x78,(byte) 0x8,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch228 = new BitmapCharRec(6,9,-1,0,7,ch228data);
+
+/* char: 0xe3 */
+
+static final byte[] ch227data = {
+(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x78,(byte) 0x8,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch227 = new BitmapCharRec(6,10,-1,0,7,ch227data);
+
+/* char: 0xe2 */
+
+static final byte[] ch226data = {
+(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x78,(byte) 0x8,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch226 = new BitmapCharRec(6,10,-1,0,7,ch226data);
+
+/* char: 0xe1 */
+
+static final byte[] ch225data = {
+(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x78,(byte) 0x8,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch225 = new BitmapCharRec(6,10,-1,0,7,ch225data);
+
+/* char: 0xe0 */
+
+static final byte[] ch224data = {
+(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x78,(byte) 0x8,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch224 = new BitmapCharRec(6,10,-1,0,7,ch224data);
+
+/* char: 0xdf */
+
+static final byte[] ch223data = {
+(byte) 0xb0,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xb0,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch223 = new BitmapCharRec(5,9,-1,0,7,ch223data);
+
+/* char: 0xde */
+
+static final byte[] ch222data = {
+(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xf8,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch222 = new BitmapCharRec(6,9,-1,0,8,ch222data);
+
+/* char: 0xdd */
+
+static final byte[] ch221data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x44,(byte) 0x44,(byte) 0x82,(byte) 0x82,(byte) 0x0,(byte) 0x10,(byte) 0x8,
+};
+
+static final BitmapCharRec ch221 = new BitmapCharRec(7,12,-1,0,9,ch221data);
+
+/* char: 0xdc */
+
+static final byte[] ch220data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x48,
+};
+
+static final BitmapCharRec ch220 = new BitmapCharRec(6,11,-1,0,8,ch220data);
+
+/* char: 0xdb */
+
+static final byte[] ch219data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x28,(byte) 0x10,
+};
+
+static final BitmapCharRec ch219 = new BitmapCharRec(6,12,-1,0,8,ch219data);
+
+/* char: 0xda */
+
+static final byte[] ch218data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x10,(byte) 0x8,
+};
+
+static final BitmapCharRec ch218 = new BitmapCharRec(6,12,-1,0,8,ch218data);
+
+/* char: 0xd9 */
+
+static final byte[] ch217data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch217 = new BitmapCharRec(6,12,-1,0,8,ch217data);
+
+/* char: 0xd8 */
+
+static final byte[] ch216data = {
+(byte) 0x80,(byte) 0x0,(byte) 0x5e,(byte) 0x0,(byte) 0x21,(byte) 0x0,(byte) 0x50,(byte) 0x80,(byte) 0x48,(byte) 0x80,(byte) 0x44,(byte) 0x80,(byte) 0x44,(byte) 0x80,(byte) 0x42,(byte) 0x80,
+(byte) 0x21,(byte) 0x0,(byte) 0x1e,(byte) 0x80,(byte) 0x0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch216 = new BitmapCharRec(10,11,0,1,10,ch216data);
+
+/* char: 0xd7 */
+
+static final byte[] ch215data = {
+(byte) 0x88,(byte) 0x50,(byte) 0x20,(byte) 0x50,(byte) 0x88,
+};
+
+static final BitmapCharRec ch215 = new BitmapCharRec(5,5,-1,-1,7,ch215data);
+
+/* char: 0xd6 */
+
+static final byte[] ch214data = {
+(byte) 0x3c,(byte) 0x42,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x42,(byte) 0x3c,(byte) 0x0,(byte) 0x24,
+};
+
+static final BitmapCharRec ch214 = new BitmapCharRec(8,11,-1,0,10,ch214data);
+
+/* char: 0xd5 */
+
+static final byte[] ch213data = {
+(byte) 0x3c,(byte) 0x42,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x42,(byte) 0x3c,(byte) 0x0,(byte) 0x28,(byte) 0x14,
+};
+
+static final BitmapCharRec ch213 = new BitmapCharRec(8,12,-1,0,10,ch213data);
+
+/* char: 0xd4 */
+
+static final byte[] ch212data = {
+(byte) 0x3c,(byte) 0x42,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x42,(byte) 0x3c,(byte) 0x0,(byte) 0x14,(byte) 0x8,
+};
+
+static final BitmapCharRec ch212 = new BitmapCharRec(8,12,-1,0,10,ch212data);
+
+/* char: 0xd3 */
+
+static final byte[] ch211data = {
+(byte) 0x3c,(byte) 0x42,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x42,(byte) 0x3c,(byte) 0x0,(byte) 0x8,(byte) 0x4,
+};
+
+static final BitmapCharRec ch211 = new BitmapCharRec(8,12,-1,0,10,ch211data);
+
+/* char: 0xd2 */
+
+static final byte[] ch210data = {
+(byte) 0x3c,(byte) 0x42,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x42,(byte) 0x3c,(byte) 0x0,(byte) 0x8,(byte) 0x10,
+};
+
+static final BitmapCharRec ch210 = new BitmapCharRec(8,12,-1,0,10,ch210data);
+
+/* char: 0xd1 */
+
+static final byte[] ch209data = {
+(byte) 0x82,(byte) 0x86,(byte) 0x8a,(byte) 0x8a,(byte) 0x92,(byte) 0xa2,(byte) 0xa2,(byte) 0xc2,(byte) 0x82,(byte) 0x0,(byte) 0x28,(byte) 0x14,
+};
+
+static final BitmapCharRec ch209 = new BitmapCharRec(7,12,-1,0,9,ch209data);
+
+/* char: 0xd0 */
+
+static final byte[] ch208data = {
+(byte) 0x7c,(byte) 0x42,(byte) 0x41,(byte) 0x41,(byte) 0xf1,(byte) 0x41,(byte) 0x41,(byte) 0x42,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch208 = new BitmapCharRec(8,9,0,0,9,ch208data);
+
+/* char: 0xcf */
+
+static final byte[] ch207data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch207 = new BitmapCharRec(3,11,0,0,3,ch207data);
+
+/* char: 0xce */
+
+static final byte[] ch206data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0xa0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch206 = new BitmapCharRec(3,12,0,0,3,ch206data);
+
+/* char: 0xcd */
+
+static final byte[] ch205data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,(byte) 0x40,
+};
+
+static final BitmapCharRec ch205 = new BitmapCharRec(2,12,-1,0,3,ch205data);
+
+/* char: 0xcc */
+
+static final byte[] ch204data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch204 = new BitmapCharRec(2,12,0,0,3,ch204data);
+
+/* char: 0xcb */
+
+static final byte[] ch203data = {
+(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x0,(byte) 0x28,
+};
+
+static final BitmapCharRec ch203 = new BitmapCharRec(6,11,-1,0,8,ch203data);
+
+/* char: 0xca */
+
+static final byte[] ch202data = {
+(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x0,(byte) 0x28,(byte) 0x10,
+};
+
+static final BitmapCharRec ch202 = new BitmapCharRec(6,12,-1,0,8,ch202data);
+
+/* char: 0xc9 */
+
+static final byte[] ch201data = {
+(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x0,(byte) 0x10,(byte) 0x8,
+};
+
+static final BitmapCharRec ch201 = new BitmapCharRec(6,12,-1,0,8,ch201data);
+
+/* char: 0xc8 */
+
+static final byte[] ch200data = {
+(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch200 = new BitmapCharRec(6,12,-1,0,8,ch200data);
+
+/* char: 0xc7 */
+
+static final byte[] ch199data = {
+(byte) 0x30,(byte) 0x8,(byte) 0x8,(byte) 0x3c,(byte) 0x42,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x42,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch199 = new BitmapCharRec(7,12,-1,3,9,ch199data);
+
+/* char: 0xc6 */
+
+static final byte[] ch198data = {
+(byte) 0x8f,(byte) 0x80,(byte) 0x88,(byte) 0x0,(byte) 0x88,(byte) 0x0,(byte) 0x78,(byte) 0x0,(byte) 0x4f,(byte) 0x80,(byte) 0x48,(byte) 0x0,(byte) 0x28,(byte) 0x0,(byte) 0x28,(byte) 0x0,
+(byte) 0x1f,(byte) 0x80,
+};
+
+static final BitmapCharRec ch198 = new BitmapCharRec(9,9,-1,0,11,ch198data);
+
+/* char: 0xc5 */
+
+static final byte[] ch197data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x10,
+};
+
+static final BitmapCharRec ch197 = new BitmapCharRec(7,12,-1,0,9,ch197data);
+
+/* char: 0xc4 */
+
+static final byte[] ch196data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x0,(byte) 0x28,
+};
+
+static final BitmapCharRec ch196 = new BitmapCharRec(7,11,-1,0,9,ch196data);
+
+/* char: 0xc3 */
+
+static final byte[] ch195data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x0,(byte) 0x28,(byte) 0x14,
+};
+
+static final BitmapCharRec ch195 = new BitmapCharRec(7,12,-1,0,9,ch195data);
+
+/* char: 0xc2 */
+
+static final byte[] ch194data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x0,(byte) 0x28,(byte) 0x10,
+};
+
+static final BitmapCharRec ch194 = new BitmapCharRec(7,12,-1,0,9,ch194data);
+
+/* char: 0xc1 */
+
+static final byte[] ch193data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x0,(byte) 0x10,(byte) 0x8,
+};
+
+static final BitmapCharRec ch193 = new BitmapCharRec(7,12,-1,0,9,ch193data);
+
+/* char: 0xc0 */
+
+static final byte[] ch192data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch192 = new BitmapCharRec(7,12,-1,0,9,ch192data);
+
+/* char: 0xbf */
+
+static final byte[] ch191data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x0,(byte) 0x20,
+};
+
+static final BitmapCharRec ch191 = new BitmapCharRec(5,9,-1,3,7,ch191data);
+
+/* char: 0xbe */
+
+static final byte[] ch190data = {
+(byte) 0x21,(byte) 0x0,(byte) 0x17,(byte) 0x80,(byte) 0x15,(byte) 0x0,(byte) 0xb,(byte) 0x0,(byte) 0xc9,(byte) 0x0,(byte) 0x24,(byte) 0x0,(byte) 0x44,(byte) 0x0,(byte) 0x22,(byte) 0x0,
+(byte) 0xe1,(byte) 0x0,
+};
+
+static final BitmapCharRec ch190 = new BitmapCharRec(9,9,0,0,10,ch190data);
+
+/* char: 0xbd */
+
+static final byte[] ch189data = {
+(byte) 0x47,(byte) 0x80,(byte) 0x22,(byte) 0x0,(byte) 0x11,(byte) 0x0,(byte) 0x14,(byte) 0x80,(byte) 0x4b,(byte) 0x0,(byte) 0x48,(byte) 0x0,(byte) 0x44,(byte) 0x0,(byte) 0xc2,(byte) 0x0,
+(byte) 0x41,(byte) 0x0,
+};
+
+static final BitmapCharRec ch189 = new BitmapCharRec(9,9,0,0,10,ch189data);
+
+/* char: 0xbc */
+
+static final byte[] ch188data = {
+(byte) 0x41,(byte) 0x0,(byte) 0x27,(byte) 0x80,(byte) 0x15,(byte) 0x0,(byte) 0x13,(byte) 0x0,(byte) 0x49,(byte) 0x0,(byte) 0x44,(byte) 0x0,(byte) 0x44,(byte) 0x0,(byte) 0xc2,(byte) 0x0,
+(byte) 0x41,(byte) 0x0,
+};
+
+static final BitmapCharRec ch188 = new BitmapCharRec(9,9,0,0,10,ch188data);
+
+/* char: 0xbb */
+
+static final byte[] ch187data = {
+(byte) 0xa0,(byte) 0x50,(byte) 0x28,(byte) 0x50,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch187 = new BitmapCharRec(5,5,-1,-1,7,ch187data);
+
+/* char: 0xba */
+
+static final byte[] ch186data = {
+(byte) 0xe0,(byte) 0x0,(byte) 0xe0,(byte) 0xa0,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch186 = new BitmapCharRec(3,5,-1,-4,5,ch186data);
+
+/* char: 0xb9 */
+
+static final byte[] ch185data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch185 = new BitmapCharRec(2,5,-1,-3,4,ch185data);
+
+/* char: 0xb8 */
+
+static final byte[] ch184data = {
+(byte) 0xc0,(byte) 0x20,(byte) 0x20,(byte) 0x40,
+};
+
+static final BitmapCharRec ch184 = new BitmapCharRec(3,4,0,3,3,ch184data);
+
+/* char: 0xb7 */
+
+static final byte[] ch183data = {
+(byte) 0x80,
+};
+
+static final BitmapCharRec ch183 = new BitmapCharRec(1,1,-1,-3,3,ch183data);
+
+/* char: 0xb6 */
+
+static final byte[] ch182data = {
+(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x68,(byte) 0xe8,(byte) 0xe8,(byte) 0xe8,(byte) 0x68,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch182 = new BitmapCharRec(6,12,0,3,7,ch182data);
+
+/* char: 0xb5 */
+
+static final byte[] ch181data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xe8,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,
+};
+
+static final BitmapCharRec ch181 = new BitmapCharRec(5,10,-1,3,7,ch181data);
+
+/* char: 0xb4 */
+
+static final byte[] ch180data = {
+(byte) 0x80,(byte) 0x40,
+};
+
+static final BitmapCharRec ch180 = new BitmapCharRec(2,2,0,-8,2,ch180data);
+
+/* char: 0xb3 */
+
+static final byte[] ch179data = {
+(byte) 0xc0,(byte) 0x20,(byte) 0x40,(byte) 0x20,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch179 = new BitmapCharRec(3,5,0,-3,4,ch179data);
+
+/* char: 0xb2 */
+
+static final byte[] ch178data = {
+(byte) 0xf0,(byte) 0x40,(byte) 0x20,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch178 = new BitmapCharRec(4,5,0,-3,4,ch178data);
+
+/* char: 0xb1 */
+
+static final byte[] ch177data = {
+(byte) 0xf8,(byte) 0x0,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x20,
+};
+
+static final BitmapCharRec ch177 = new BitmapCharRec(5,7,-1,0,7,ch177data);
+
+/* char: 0xb0 */
+
+static final byte[] ch176data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch176 = new BitmapCharRec(4,4,0,-4,5,ch176data);
+
+/* char: 0xaf */
+
+static final byte[] ch175data = {
+(byte) 0xf0,
+};
+
+static final BitmapCharRec ch175 = new BitmapCharRec(4,1,0,-8,4,ch175data);
+
+/* char: 0xae */
+
+static final byte[] ch174data = {
+(byte) 0x3e,(byte) 0x0,(byte) 0x41,(byte) 0x0,(byte) 0x94,(byte) 0x80,(byte) 0x94,(byte) 0x80,(byte) 0x98,(byte) 0x80,(byte) 0x94,(byte) 0x80,(byte) 0x9c,(byte) 0x80,(byte) 0x41,(byte) 0x0,
+(byte) 0x3e,(byte) 0x0,
+};
+
+static final BitmapCharRec ch174 = new BitmapCharRec(9,9,-1,0,11,ch174data);
+
+/* char: 0xad */
+
+static final byte[] ch173data = {
+(byte) 0xf0,
+};
+
+static final BitmapCharRec ch173 = new BitmapCharRec(4,1,0,-3,5,ch173data);
+
+/* char: 0xac */
+
+static final byte[] ch172data = {
+(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch172 = new BitmapCharRec(6,4,-1,-2,8,ch172data);
+
+/* char: 0xab */
+
+static final byte[] ch171data = {
+(byte) 0x28,(byte) 0x50,(byte) 0xa0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch171 = new BitmapCharRec(5,5,-1,-1,7,ch171data);
+
+/* char: 0xaa */
+
+static final byte[] ch170data = {
+(byte) 0xe0,(byte) 0x0,(byte) 0xa0,(byte) 0x20,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch170 = new BitmapCharRec(3,5,-1,-4,5,ch170data);
+
+/* char: 0xa9 */
+
+static final byte[] ch169data = {
+(byte) 0x3e,(byte) 0x0,(byte) 0x41,(byte) 0x0,(byte) 0x9c,(byte) 0x80,(byte) 0xa2,(byte) 0x80,(byte) 0xa0,(byte) 0x80,(byte) 0xa2,(byte) 0x80,(byte) 0x9c,(byte) 0x80,(byte) 0x41,(byte) 0x0,
+(byte) 0x3e,(byte) 0x0,
+};
+
+static final BitmapCharRec ch169 = new BitmapCharRec(9,9,-1,0,11,ch169data);
+
+/* char: 0xa8 */
+
+static final byte[] ch168data = {
+(byte) 0xa0,
+};
+
+static final BitmapCharRec ch168 = new BitmapCharRec(3,1,0,-8,3,ch168data);
+
+/* char: 0xa7 */
+
+static final byte[] ch167data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x8,(byte) 0x30,(byte) 0x48,(byte) 0x88,(byte) 0x88,(byte) 0x90,(byte) 0x60,(byte) 0x80,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch167 = new BitmapCharRec(5,12,0,3,6,ch167data);
+
+/* char: 0xa6 */
+
+static final byte[] ch166data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch166 = new BitmapCharRec(1,11,-1,2,3,ch166data);
+
+/* char: 0xa5 */
+
+static final byte[] ch165data = {
+(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x50,(byte) 0x88,(byte) 0x88,
+};
+
+static final BitmapCharRec ch165 = new BitmapCharRec(5,9,-1,0,7,ch165data);
+
+/* char: 0xa4 */
+
+static final byte[] ch164data = {
+(byte) 0x84,(byte) 0x78,(byte) 0x48,(byte) 0x48,(byte) 0x78,(byte) 0x84,
+};
+
+static final BitmapCharRec ch164 = new BitmapCharRec(6,6,0,-1,7,ch164data);
+
+/* char: 0xa3 */
+
+static final byte[] ch163data = {
+(byte) 0xb0,(byte) 0x48,(byte) 0x20,(byte) 0x20,(byte) 0xf0,(byte) 0x40,(byte) 0x40,(byte) 0x48,(byte) 0x30,
+};
+
+static final BitmapCharRec ch163 = new BitmapCharRec(5,9,-1,0,7,ch163data);
+
+/* char: 0xa2 */
+
+static final byte[] ch162data = {
+(byte) 0x40,(byte) 0x70,(byte) 0xc8,(byte) 0xa0,(byte) 0xa0,(byte) 0xa0,(byte) 0xa8,(byte) 0x70,(byte) 0x10,
+};
+
+static final BitmapCharRec ch162 = new BitmapCharRec(5,9,-1,1,7,ch162data);
+
+/* char: 0xa1 */
+
+static final byte[] ch161data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,
+};
+
+static final BitmapCharRec ch161 = new BitmapCharRec(1,10,-1,3,3,ch161data);
+
+/* char: 0xa0 */
+
+static final BitmapCharRec ch160 = new BitmapCharRec(0,0,0,0,4,null);
+
+/* char: 0x7e '~' */
+
+static final byte[] ch126data = {
+(byte) 0x98,(byte) 0x64,
+};
+
+static final BitmapCharRec ch126 = new BitmapCharRec(6,2,0,-3,7,ch126data);
+
+/* char: 0x7d '}' */
+
+static final byte[] ch125data = {
+(byte) 0xc0,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x10,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch125 = new BitmapCharRec(4,12,0,3,4,ch125data);
+
+/* char: 0x7c '|' */
+
+static final byte[] ch124data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch124 = new BitmapCharRec(1,12,-1,3,3,ch124data);
+
+/* char: 0x7b '{' */
+
+static final byte[] ch123data = {
+(byte) 0x30,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x30,
+};
+
+static final BitmapCharRec ch123 = new BitmapCharRec(4,12,0,3,4,ch123data);
+
+/* char: 0x7a 'z' */
+
+static final byte[] ch122data = {
+(byte) 0xf0,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch122 = new BitmapCharRec(4,7,-1,0,6,ch122data);
+
+/* char: 0x79 'y' */
+
+static final byte[] ch121data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x50,(byte) 0x50,(byte) 0x90,(byte) 0x88,(byte) 0x88,(byte) 0x88,
+};
+
+static final BitmapCharRec ch121 = new BitmapCharRec(5,10,-1,3,7,ch121data);
+
+/* char: 0x78 'x' */
+
+static final byte[] ch120data = {
+(byte) 0x84,(byte) 0x84,(byte) 0x48,(byte) 0x30,(byte) 0x30,(byte) 0x48,(byte) 0x84,
+};
+
+static final BitmapCharRec ch120 = new BitmapCharRec(6,7,0,0,6,ch120data);
+
+/* char: 0x77 'w' */
+
+static final byte[] ch119data = {
+(byte) 0x22,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0x55,(byte) 0x0,(byte) 0x49,(byte) 0x0,(byte) 0x49,(byte) 0x0,(byte) 0x88,(byte) 0x80,(byte) 0x88,(byte) 0x80,
+};
+
+static final BitmapCharRec ch119 = new BitmapCharRec(9,7,0,0,9,ch119data);
+
+/* char: 0x76 'v' */
+
+static final byte[] ch118data = {
+(byte) 0x20,(byte) 0x20,(byte) 0x50,(byte) 0x50,(byte) 0x88,(byte) 0x88,(byte) 0x88,
+};
+
+static final BitmapCharRec ch118 = new BitmapCharRec(5,7,-1,0,7,ch118data);
+
+/* char: 0x75 'u' */
+
+static final byte[] ch117data = {
+(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,
+};
+
+static final BitmapCharRec ch117 = new BitmapCharRec(5,7,-1,0,7,ch117data);
+
+/* char: 0x74 't' */
+
+static final byte[] ch116data = {
+(byte) 0x60,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,(byte) 0x40,(byte) 0x40,
+};
+
+static final BitmapCharRec ch116 = new BitmapCharRec(3,9,0,0,3,ch116data);
+
+/* char: 0x73 's' */
+
+static final byte[] ch115data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x10,(byte) 0x60,(byte) 0x80,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch115 = new BitmapCharRec(4,7,-1,0,6,ch115data);
+
+/* char: 0x72 'r' */
+
+static final byte[] ch114data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xc0,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch114 = new BitmapCharRec(3,7,-1,0,4,ch114data);
+
+/* char: 0x71 'q' */
+
+static final byte[] ch113data = {
+(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x98,(byte) 0x68,
+};
+
+static final BitmapCharRec ch113 = new BitmapCharRec(5,10,-1,3,7,ch113data);
+
+/* char: 0x70 'p' */
+
+static final byte[] ch112data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xb0,(byte) 0xc8,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,
+};
+
+static final BitmapCharRec ch112 = new BitmapCharRec(5,10,-1,3,7,ch112data);
+
+/* char: 0x6f 'o' */
+
+static final byte[] ch111data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch111 = new BitmapCharRec(5,7,-1,0,7,ch111data);
+
+/* char: 0x6e 'n' */
+
+static final byte[] ch110data = {
+(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,
+};
+
+static final BitmapCharRec ch110 = new BitmapCharRec(5,7,-1,0,7,ch110data);
+
+/* char: 0x6d 'm' */
+
+static final byte[] ch109data = {
+(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0xda,(byte) 0xa4,
+};
+
+static final BitmapCharRec ch109 = new BitmapCharRec(7,7,-1,0,9,ch109data);
+
+/* char: 0x6c 'l' */
+
+static final byte[] ch108data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch108 = new BitmapCharRec(1,9,-1,0,3,ch108data);
+
+/* char: 0x6b 'k' */
+
+static final byte[] ch107data = {
+(byte) 0x88,(byte) 0x90,(byte) 0xa0,(byte) 0xc0,(byte) 0xc0,(byte) 0xa0,(byte) 0x90,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch107 = new BitmapCharRec(5,9,-1,0,6,ch107data);
+
+/* char: 0x6a 'j' */
+
+static final byte[] ch106data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch106 = new BitmapCharRec(2,12,0,3,3,ch106data);
+
+/* char: 0x69 'i' */
+
+static final byte[] ch105data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,
+};
+
+static final BitmapCharRec ch105 = new BitmapCharRec(1,9,-1,0,3,ch105data);
+
+/* char: 0x68 'h' */
+
+static final byte[] ch104data = {
+(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch104 = new BitmapCharRec(5,9,-1,0,7,ch104data);
+
+/* char: 0x67 'g' */
+
+static final byte[] ch103data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x8,(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x98,(byte) 0x68,
+};
+
+static final BitmapCharRec ch103 = new BitmapCharRec(5,10,-1,3,7,ch103data);
+
+/* char: 0x66 'f' */
+
+static final byte[] ch102data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,(byte) 0x40,(byte) 0x30,
+};
+
+static final BitmapCharRec ch102 = new BitmapCharRec(4,9,0,0,3,ch102data);
+
+/* char: 0x65 'e' */
+
+static final byte[] ch101data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x80,(byte) 0xf8,(byte) 0x88,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch101 = new BitmapCharRec(5,7,-1,0,7,ch101data);
+
+/* char: 0x64 'd' */
+
+static final byte[] ch100data = {
+(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x98,(byte) 0x68,(byte) 0x8,(byte) 0x8,
+};
+
+static final BitmapCharRec ch100 = new BitmapCharRec(5,9,-1,0,7,ch100data);
+
+/* char: 0x63 'c' */
+
+static final byte[] ch99data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch99 = new BitmapCharRec(5,7,-1,0,7,ch99data);
+
+/* char: 0x62 'b' */
+
+static final byte[] ch98data = {
+(byte) 0xb0,(byte) 0xc8,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch98 = new BitmapCharRec(5,9,-1,0,7,ch98data);
+
+/* char: 0x61 'a' */
+
+static final byte[] ch97data = {
+(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x78,(byte) 0x8,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch97 = new BitmapCharRec(6,7,-1,0,7,ch97data);
+
+/* char: 0x60 '`' */
+
+static final byte[] ch96data = {
+(byte) 0xc0,(byte) 0x80,(byte) 0x40,
+};
+
+static final BitmapCharRec ch96 = new BitmapCharRec(2,3,0,-6,3,ch96data);
+
+/* char: 0x5f '_' */
+
+static final byte[] ch95data = {
+(byte) 0xfe,
+};
+
+static final BitmapCharRec ch95 = new BitmapCharRec(7,1,0,2,7,ch95data);
+
+/* char: 0x5e '^' */
+
+static final byte[] ch94data = {
+(byte) 0x88,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch94 = new BitmapCharRec(5,3,0,-5,6,ch94data);
+
+/* char: 0x5d ']' */
+
+static final byte[] ch93data = {
+(byte) 0xc0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch93 = new BitmapCharRec(2,12,0,3,3,ch93data);
+
+/* char: 0x5c '\' */
+
+static final byte[] ch92data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch92 = new BitmapCharRec(4,9,0,0,4,ch92data);
+
+/* char: 0x5b '[' */
+
+static final byte[] ch91data = {
+(byte) 0xc0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch91 = new BitmapCharRec(2,12,-1,3,3,ch91data);
+
+/* char: 0x5a 'Z' */
+
+static final byte[] ch90data = {
+(byte) 0xfe,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0x4,(byte) 0x2,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch90 = new BitmapCharRec(7,9,-1,0,9,ch90data);
+
+/* char: 0x59 'Y' */
+
+static final byte[] ch89data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x44,(byte) 0x44,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch89 = new BitmapCharRec(7,9,-1,0,9,ch89data);
+
+/* char: 0x58 'X' */
+
+static final byte[] ch88data = {
+(byte) 0x82,(byte) 0x44,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x28,(byte) 0x44,(byte) 0x44,(byte) 0x82,
+};
+
+static final BitmapCharRec ch88 = new BitmapCharRec(7,9,-1,0,9,ch88data);
+
+/* char: 0x57 'W' */
+
+static final byte[] ch87data = {
+(byte) 0x22,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0x55,(byte) 0x0,(byte) 0x55,(byte) 0x0,(byte) 0x49,(byte) 0x0,(byte) 0x88,(byte) 0x80,(byte) 0x88,(byte) 0x80,
+(byte) 0x88,(byte) 0x80,
+};
+
+static final BitmapCharRec ch87 = new BitmapCharRec(9,9,-1,0,11,ch87data);
+
+/* char: 0x56 'V' */
+
+static final byte[] ch86data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x28,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch86 = new BitmapCharRec(7,9,-1,0,9,ch86data);
+
+/* char: 0x55 'U' */
+
+static final byte[] ch85data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,
+};
+
+static final BitmapCharRec ch85 = new BitmapCharRec(6,9,-1,0,8,ch85data);
+
+/* char: 0x54 'T' */
+
+static final byte[] ch84data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch84 = new BitmapCharRec(7,9,0,0,7,ch84data);
+
+/* char: 0x53 'S' */
+
+static final byte[] ch83data = {
+(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x4,(byte) 0x18,(byte) 0x60,(byte) 0x80,(byte) 0x84,(byte) 0x78,
+};
+
+static final BitmapCharRec ch83 = new BitmapCharRec(6,9,-1,0,8,ch83data);
+
+/* char: 0x52 'R' */
+
+static final byte[] ch82data = {
+(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x88,(byte) 0xf8,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch82 = new BitmapCharRec(6,9,-1,0,8,ch82data);
+
+/* char: 0x51 'Q' */
+
+static final byte[] ch81data = {
+(byte) 0x3d,(byte) 0x42,(byte) 0x85,(byte) 0x89,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x42,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch81 = new BitmapCharRec(8,9,-1,0,10,ch81data);
+
+/* char: 0x50 'P' */
+
+static final byte[] ch80data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch80 = new BitmapCharRec(6,9,-1,0,8,ch80data);
+
+/* char: 0x4f 'O' */
+
+static final byte[] ch79data = {
+(byte) 0x3c,(byte) 0x42,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x42,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch79 = new BitmapCharRec(8,9,-1,0,10,ch79data);
+
+/* char: 0x4e 'N' */
+
+static final byte[] ch78data = {
+(byte) 0x82,(byte) 0x86,(byte) 0x8a,(byte) 0x8a,(byte) 0x92,(byte) 0xa2,(byte) 0xa2,(byte) 0xc2,(byte) 0x82,
+};
+
+static final BitmapCharRec ch78 = new BitmapCharRec(7,9,-1,0,9,ch78data);
+
+/* char: 0x4d 'M' */
+
+static final byte[] ch77data = {
+(byte) 0x88,(byte) 0x80,(byte) 0x88,(byte) 0x80,(byte) 0x94,(byte) 0x80,(byte) 0x94,(byte) 0x80,(byte) 0xa2,(byte) 0x80,(byte) 0xa2,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,
+(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch77 = new BitmapCharRec(9,9,-1,0,11,ch77data);
+
+/* char: 0x4c 'L' */
+
+static final byte[] ch76data = {
+(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch76 = new BitmapCharRec(5,9,-1,0,7,ch76data);
+
+/* char: 0x4b 'K' */
+
+static final byte[] ch75data = {
+(byte) 0x82,(byte) 0x84,(byte) 0x88,(byte) 0x90,(byte) 0xe0,(byte) 0xa0,(byte) 0x90,(byte) 0x88,(byte) 0x84,
+};
+
+static final BitmapCharRec ch75 = new BitmapCharRec(7,9,-1,0,8,ch75data);
+
+/* char: 0x4a 'J' */
+
+static final byte[] ch74data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,
+};
+
+static final BitmapCharRec ch74 = new BitmapCharRec(5,9,-1,0,7,ch74data);
+
+/* char: 0x49 'I' */
+
+static final byte[] ch73data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch73 = new BitmapCharRec(1,9,-1,0,3,ch73data);
+
+/* char: 0x48 'H' */
+
+static final byte[] ch72data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,
+};
+
+static final BitmapCharRec ch72 = new BitmapCharRec(7,9,-1,0,9,ch72data);
+
+/* char: 0x47 'G' */
+
+static final byte[] ch71data = {
+(byte) 0x3a,(byte) 0x46,(byte) 0x82,(byte) 0x82,(byte) 0x8e,(byte) 0x80,(byte) 0x80,(byte) 0x42,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch71 = new BitmapCharRec(7,9,-1,0,9,ch71data);
+
+/* char: 0x46 'F' */
+
+static final byte[] ch70data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch70 = new BitmapCharRec(6,9,-1,0,8,ch70data);
+
+/* char: 0x45 'E' */
+
+static final byte[] ch69data = {
+(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch69 = new BitmapCharRec(6,9,-1,0,8,ch69data);
+
+/* char: 0x44 'D' */
+
+static final byte[] ch68data = {
+(byte) 0xf8,(byte) 0x84,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x84,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch68 = new BitmapCharRec(7,9,-1,0,9,ch68data);
+
+/* char: 0x43 'C' */
+
+static final byte[] ch67data = {
+(byte) 0x3c,(byte) 0x42,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x42,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch67 = new BitmapCharRec(7,9,-1,0,9,ch67data);
+
+/* char: 0x42 'B' */
+
+static final byte[] ch66data = {
+(byte) 0xf8,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xf8,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch66 = new BitmapCharRec(6,9,-1,0,8,ch66data);
+
+/* char: 0x41 'A' */
+
+static final byte[] ch65data = {
+(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x44,(byte) 0x28,(byte) 0x28,(byte) 0x10,
+};
+
+static final BitmapCharRec ch65 = new BitmapCharRec(7,9,-1,0,9,ch65data);
+
+/* char: 0x40 '@' */
+
+static final byte[] ch64data = {
+(byte) 0x3e,(byte) 0x0,(byte) 0x40,(byte) 0x0,(byte) 0x9b,(byte) 0x0,(byte) 0xa6,(byte) 0x80,(byte) 0xa2,(byte) 0x40,(byte) 0xa2,(byte) 0x40,(byte) 0x92,(byte) 0x40,(byte) 0x4d,(byte) 0x40,
+(byte) 0x60,(byte) 0x80,(byte) 0x1f,(byte) 0x0,
+};
+
+static final BitmapCharRec ch64 = new BitmapCharRec(10,10,-1,1,12,ch64data);
+
+/* char: 0x3f '?' */
+
+static final byte[] ch63data = {
+(byte) 0x20,(byte) 0x0,(byte) 0x20,(byte) 0x20,(byte) 0x10,(byte) 0x10,(byte) 0x88,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch63 = new BitmapCharRec(5,9,-1,0,7,ch63data);
+
+/* char: 0x3e '>' */
+
+static final byte[] ch62data = {
+(byte) 0xc0,(byte) 0x30,(byte) 0xc,(byte) 0x30,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch62 = new BitmapCharRec(6,5,-1,-1,7,ch62data);
+
+/* char: 0x3d '=' */
+
+static final byte[] ch61data = {
+(byte) 0xf8,(byte) 0x0,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch61 = new BitmapCharRec(5,3,-1,-2,7,ch61data);
+
+/* char: 0x3c '<' */
+
+static final byte[] ch60data = {
+(byte) 0xc,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc,
+};
+
+static final BitmapCharRec ch60 = new BitmapCharRec(6,5,0,-1,7,ch60data);
+
+/* char: 0x3b ';' */
+
+static final byte[] ch59data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch59 = new BitmapCharRec(2,8,0,2,3,ch59data);
+
+/* char: 0x3a ':' */
+
+static final byte[] ch58data = {
+(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x80,
+};
+
+static final BitmapCharRec ch58 = new BitmapCharRec(1,6,-1,0,3,ch58data);
+
+/* char: 0x39 '9' */
+
+static final byte[] ch57data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x8,(byte) 0x8,(byte) 0x78,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch57 = new BitmapCharRec(5,9,-1,0,7,ch57data);
+
+/* char: 0x38 '8' */
+
+static final byte[] ch56data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch56 = new BitmapCharRec(5,9,-1,0,7,ch56data);
+
+/* char: 0x37 '7' */
+
+static final byte[] ch55data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x10,(byte) 0x10,(byte) 0x8,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch55 = new BitmapCharRec(5,9,-1,0,7,ch55data);
+
+/* char: 0x36 '6' */
+
+static final byte[] ch54data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,(byte) 0x80,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch54 = new BitmapCharRec(5,9,-1,0,7,ch54data);
+
+/* char: 0x35 '5' */
+
+static final byte[] ch53data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x8,(byte) 0x8,(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch53 = new BitmapCharRec(5,9,-1,0,7,ch53data);
+
+/* char: 0x34 '4' */
+
+static final byte[] ch52data = {
+(byte) 0x8,(byte) 0x8,(byte) 0xfc,(byte) 0x88,(byte) 0x48,(byte) 0x28,(byte) 0x28,(byte) 0x18,(byte) 0x8,
+};
+
+static final BitmapCharRec ch52 = new BitmapCharRec(6,9,0,0,7,ch52data);
+
+/* char: 0x33 '3' */
+
+static final byte[] ch51data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x8,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch51 = new BitmapCharRec(5,9,-1,0,7,ch51data);
+
+/* char: 0x32 '2' */
+
+static final byte[] ch50data = {
+(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch50 = new BitmapCharRec(5,9,-1,0,7,ch50data);
+
+/* char: 0x31 '1' */
+
+static final byte[] ch49data = {
+(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xe0,(byte) 0x20,
+};
+
+static final BitmapCharRec ch49 = new BitmapCharRec(3,9,-1,0,7,ch49data);
+
+/* char: 0x30 '0' */
+
+static final byte[] ch48data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,
+};
+
+static final BitmapCharRec ch48 = new BitmapCharRec(5,9,-1,0,7,ch48data);
+
+/* char: 0x2f '/' */
+
+static final byte[] ch47data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x10,(byte) 0x10,
+};
+
+static final BitmapCharRec ch47 = new BitmapCharRec(4,9,0,0,4,ch47data);
+
+/* char: 0x2e '.' */
+
+static final byte[] ch46data = {
+(byte) 0x80,
+};
+
+static final BitmapCharRec ch46 = new BitmapCharRec(1,1,-1,0,3,ch46data);
+
+/* char: 0x2d '-' */
+
+static final byte[] ch45data = {
+(byte) 0xf8,
+};
+
+static final BitmapCharRec ch45 = new BitmapCharRec(5,1,-1,-3,8,ch45data);
+
+/* char: 0x2c ',' */
+
+static final byte[] ch44data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,
+};
+
+static final BitmapCharRec ch44 = new BitmapCharRec(2,3,-1,2,4,ch44data);
+
+/* char: 0x2b '+' */
+
+static final byte[] ch43data = {
+(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x20,
+};
+
+static final BitmapCharRec ch43 = new BitmapCharRec(5,5,-1,-1,7,ch43data);
+
+/* char: 0x2a '*' */
+
+static final byte[] ch42data = {
+(byte) 0xa0,(byte) 0x40,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch42 = new BitmapCharRec(3,3,-1,-6,5,ch42data);
+
+/* char: 0x29 ')' */
+
+static final byte[] ch41data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch41 = new BitmapCharRec(3,12,0,3,4,ch41data);
+
+/* char: 0x28 '(' */
+
+static final byte[] ch40data = {
+(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch40 = new BitmapCharRec(3,12,-1,3,4,ch40data);
+
+/* char: 0x27 ''' */
+
+static final byte[] ch39data = {
+(byte) 0x80,(byte) 0x40,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch39 = new BitmapCharRec(2,3,-1,-6,3,ch39data);
+
+/* char: 0x26 '&' */
+
+static final byte[] ch38data = {
+(byte) 0x72,(byte) 0x8c,(byte) 0x84,(byte) 0x8a,(byte) 0x50,(byte) 0x30,(byte) 0x48,(byte) 0x48,(byte) 0x30,
+};
+
+static final BitmapCharRec ch38 = new BitmapCharRec(7,9,-1,0,9,ch38data);
+
+/* char: 0x25 '%' */
+
+static final byte[] ch37data = {
+(byte) 0x23,(byte) 0x0,(byte) 0x14,(byte) 0x80,(byte) 0x14,(byte) 0x80,(byte) 0x13,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x68,(byte) 0x0,(byte) 0x94,(byte) 0x0,(byte) 0x94,(byte) 0x0,
+(byte) 0x62,(byte) 0x0,
+};
+
+static final BitmapCharRec ch37 = new BitmapCharRec(9,9,-1,0,11,ch37data);
+
+/* char: 0x24 '$' */
+
+static final byte[] ch36data = {
+(byte) 0x20,(byte) 0x70,(byte) 0xa8,(byte) 0xa8,(byte) 0x28,(byte) 0x70,(byte) 0xa0,(byte) 0xa8,(byte) 0x70,(byte) 0x20,
+};
+
+static final BitmapCharRec ch36 = new BitmapCharRec(5,10,-1,1,7,ch36data);
+
+/* char: 0x23 '#' */
+
+static final byte[] ch35data = {
+(byte) 0x50,(byte) 0x50,(byte) 0x50,(byte) 0xfc,(byte) 0x28,(byte) 0xfc,(byte) 0x28,(byte) 0x28,
+};
+
+static final BitmapCharRec ch35 = new BitmapCharRec(6,8,0,0,7,ch35data);
+
+/* char: 0x22 '"' */
+
+static final byte[] ch34data = {
+(byte) 0xa0,(byte) 0xa0,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch34 = new BitmapCharRec(3,3,-1,-6,5,ch34data);
+
+/* char: 0x21 '!' */
+
+static final byte[] ch33data = {
+(byte) 0x80,(byte) 0x0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch33 = new BitmapCharRec(1,9,-1,0,3,ch33data);
+
+/* char: 0x20 ' ' */
+
+static final BitmapCharRec ch32 = new BitmapCharRec(0,0,0,0,4,null);
+
+static final BitmapCharRec[] chars = {
+ch32,
+ch33,
+ch34,
+ch35,
+ch36,
+ch37,
+ch38,
+ch39,
+ch40,
+ch41,
+ch42,
+ch43,
+ch44,
+ch45,
+ch46,
+ch47,
+ch48,
+ch49,
+ch50,
+ch51,
+ch52,
+ch53,
+ch54,
+ch55,
+ch56,
+ch57,
+ch58,
+ch59,
+ch60,
+ch61,
+ch62,
+ch63,
+ch64,
+ch65,
+ch66,
+ch67,
+ch68,
+ch69,
+ch70,
+ch71,
+ch72,
+ch73,
+ch74,
+ch75,
+ch76,
+ch77,
+ch78,
+ch79,
+ch80,
+ch81,
+ch82,
+ch83,
+ch84,
+ch85,
+ch86,
+ch87,
+ch88,
+ch89,
+ch90,
+ch91,
+ch92,
+ch93,
+ch94,
+ch95,
+ch96,
+ch97,
+ch98,
+ch99,
+ch100,
+ch101,
+ch102,
+ch103,
+ch104,
+ch105,
+ch106,
+ch107,
+ch108,
+ch109,
+ch110,
+ch111,
+ch112,
+ch113,
+ch114,
+ch115,
+ch116,
+ch117,
+ch118,
+ch119,
+ch120,
+ch121,
+ch122,
+ch123,
+ch124,
+ch125,
+ch126,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+ch160,
+ch161,
+ch162,
+ch163,
+ch164,
+ch165,
+ch166,
+ch167,
+ch168,
+ch169,
+ch170,
+ch171,
+ch172,
+ch173,
+ch174,
+ch175,
+ch176,
+ch177,
+ch178,
+ch179,
+ch180,
+ch181,
+ch182,
+ch183,
+ch184,
+ch185,
+ch186,
+ch187,
+ch188,
+ch189,
+ch190,
+ch191,
+ch192,
+ch193,
+ch194,
+ch195,
+ch196,
+ch197,
+ch198,
+ch199,
+ch200,
+ch201,
+ch202,
+ch203,
+ch204,
+ch205,
+ch206,
+ch207,
+ch208,
+ch209,
+ch210,
+ch211,
+ch212,
+ch213,
+ch214,
+ch215,
+ch216,
+ch217,
+ch218,
+ch219,
+ch220,
+ch221,
+ch222,
+ch223,
+ch224,
+ch225,
+ch226,
+ch227,
+ch228,
+ch229,
+ch230,
+ch231,
+ch232,
+ch233,
+ch234,
+ch235,
+ch236,
+ch237,
+ch238,
+ch239,
+ch240,
+ch241,
+ch242,
+ch243,
+ch244,
+ch245,
+ch246,
+ch247,
+ch248,
+ch249,
+ch250,
+ch251,
+ch252,
+ch253,
+ch254,
+ch255,
+};
+
+ public static final BitmapFontRec glutBitmapHelvetica12 = new BitmapFontRec("-adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1",
+ 224,
+ 32,
+ chars);
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTBitmapHelvetica18.java b/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTBitmapHelvetica18.java
new file mode 100644
index 000000000..1b2e69ba4
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTBitmapHelvetica18.java
@@ -0,0 +1,1917 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.util.gl2;
+
+class GLUTBitmapHelvetica18 {
+
+/* GENERATED FILE -- DO NOT MODIFY */
+
+/* char: 0xff */
+
+static final byte[] ch255data = {
+(byte) 0x70,(byte) 0x70,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x3c,(byte) 0x24,(byte) 0x66,(byte) 0x66,(byte) 0x66,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0x0,(byte) 0x66,
+(byte) 0x66,
+};
+
+static final BitmapCharRec ch255 = new BitmapCharRec(8,17,-1,4,10,ch255data);
+
+/* char: 0xfe */
+
+static final byte[] ch254data = {
+(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xde,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xe3,(byte) 0x0,(byte) 0xc1,(byte) 0x80,
+(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xe3,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xde,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,
+(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,
+};
+
+static final BitmapCharRec ch254 = new BitmapCharRec(9,18,-1,4,11,ch254data);
+
+/* char: 0xfd */
+
+static final byte[] ch253data = {
+(byte) 0x70,(byte) 0x70,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x3c,(byte) 0x24,(byte) 0x66,(byte) 0x66,(byte) 0x66,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0x0,(byte) 0x18,
+(byte) 0xc,(byte) 0x6,
+};
+
+static final BitmapCharRec ch253 = new BitmapCharRec(8,18,-1,4,10,ch253data);
+
+/* char: 0xfc */
+
+static final byte[] ch252data = {
+(byte) 0x73,(byte) 0xfb,(byte) 0xc7,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0x0,(byte) 0x66,(byte) 0x66,
+};
+
+static final BitmapCharRec ch252 = new BitmapCharRec(8,13,-1,0,10,ch252data);
+
+/* char: 0xfb */
+
+static final byte[] ch251data = {
+(byte) 0x73,(byte) 0xfb,(byte) 0xc7,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0x0,(byte) 0x66,(byte) 0x3c,(byte) 0x18,
+};
+
+static final BitmapCharRec ch251 = new BitmapCharRec(8,14,-1,0,10,ch251data);
+
+/* char: 0xfa */
+
+static final byte[] ch250data = {
+(byte) 0x73,(byte) 0xfb,(byte) 0xc7,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0x0,(byte) 0x18,(byte) 0xc,(byte) 0x6,
+};
+
+static final BitmapCharRec ch250 = new BitmapCharRec(8,14,-1,0,10,ch250data);
+
+/* char: 0xf9 */
+
+static final byte[] ch249data = {
+(byte) 0x73,(byte) 0xfb,(byte) 0xc7,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0x0,(byte) 0xc,(byte) 0x18,(byte) 0x30,
+};
+
+static final BitmapCharRec ch249 = new BitmapCharRec(8,14,-1,0,10,ch249data);
+
+/* char: 0xf8 */
+
+static final byte[] ch248data = {
+(byte) 0xce,(byte) 0x0,(byte) 0x7f,(byte) 0x80,(byte) 0x31,(byte) 0x80,(byte) 0x78,(byte) 0xc0,(byte) 0x6c,(byte) 0xc0,(byte) 0x66,(byte) 0xc0,(byte) 0x63,(byte) 0xc0,(byte) 0x31,(byte) 0x80,
+(byte) 0x3f,(byte) 0xc0,(byte) 0xe,(byte) 0x60,
+};
+
+static final BitmapCharRec ch248 = new BitmapCharRec(11,10,0,0,11,ch248data);
+
+/* char: 0xf7 */
+
+static final byte[] ch247data = {
+(byte) 0x18,(byte) 0x18,(byte) 0x0,(byte) 0xff,(byte) 0xff,(byte) 0x0,(byte) 0x18,(byte) 0x18,
+};
+
+static final BitmapCharRec ch247 = new BitmapCharRec(8,8,-1,-1,10,ch247data);
+
+/* char: 0xf6 */
+
+static final byte[] ch246data = {
+(byte) 0x3e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x63,(byte) 0x0,
+(byte) 0x7f,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x36,(byte) 0x0,(byte) 0x36,(byte) 0x0,
+};
+
+static final BitmapCharRec ch246 = new BitmapCharRec(9,13,-1,0,11,ch246data);
+
+/* char: 0xf5 */
+
+static final byte[] ch245data = {
+(byte) 0x3e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x63,(byte) 0x0,
+(byte) 0x7f,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x26,(byte) 0x0,(byte) 0x2d,(byte) 0x0,(byte) 0x19,(byte) 0x0,
+};
+
+static final BitmapCharRec ch245 = new BitmapCharRec(9,14,-1,0,11,ch245data);
+
+/* char: 0xf4 */
+
+static final byte[] ch244data = {
+(byte) 0x3e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x63,(byte) 0x0,
+(byte) 0x7f,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0xc,(byte) 0x0,
+};
+
+static final BitmapCharRec ch244 = new BitmapCharRec(9,14,-1,0,11,ch244data);
+
+/* char: 0xf3 */
+
+static final byte[] ch243data = {
+(byte) 0x3e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x63,(byte) 0x0,
+(byte) 0x7f,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+};
+
+static final BitmapCharRec ch243 = new BitmapCharRec(9,14,-1,0,11,ch243data);
+
+/* char: 0xf2 */
+
+static final byte[] ch242data = {
+(byte) 0x3e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x63,(byte) 0x0,
+(byte) 0x7f,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x30,(byte) 0x0,
+};
+
+static final BitmapCharRec ch242 = new BitmapCharRec(9,14,-1,0,11,ch242data);
+
+/* char: 0xf1 */
+
+static final byte[] ch241data = {
+(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xe3,(byte) 0xdf,(byte) 0xce,(byte) 0x0,(byte) 0x4c,(byte) 0x5a,(byte) 0x32,
+};
+
+static final BitmapCharRec ch241 = new BitmapCharRec(8,14,-1,0,10,ch241data);
+
+/* char: 0xf0 */
+
+static final byte[] ch240data = {
+(byte) 0x3e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x63,(byte) 0x0,
+(byte) 0x7f,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x4c,(byte) 0x0,(byte) 0x38,(byte) 0x0,(byte) 0x36,(byte) 0x0,(byte) 0x60,(byte) 0x0,
+};
+
+static final BitmapCharRec ch240 = new BitmapCharRec(9,14,-1,0,11,ch240data);
+
+/* char: 0xef */
+
+static final byte[] ch239data = {
+(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x0,(byte) 0xd8,(byte) 0xd8,
+};
+
+static final BitmapCharRec ch239 = new BitmapCharRec(5,13,0,0,4,ch239data);
+
+/* char: 0xee */
+
+static final byte[] ch238data = {
+(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x0,(byte) 0xcc,(byte) 0x78,(byte) 0x30,
+};
+
+static final BitmapCharRec ch238 = new BitmapCharRec(6,14,1,0,4,ch238data);
+
+/* char: 0xed */
+
+static final byte[] ch237data = {
+(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x0,(byte) 0xc0,(byte) 0x60,(byte) 0x30,
+};
+
+static final BitmapCharRec ch237 = new BitmapCharRec(4,14,0,0,4,ch237data);
+
+/* char: 0xec */
+
+static final byte[] ch236data = {
+(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x0,(byte) 0x30,(byte) 0x60,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch236 = new BitmapCharRec(4,14,0,0,4,ch236data);
+
+/* char: 0xeb */
+
+static final byte[] ch235data = {
+(byte) 0x3c,(byte) 0x7f,(byte) 0xe3,(byte) 0xc0,(byte) 0xc0,(byte) 0xff,(byte) 0xc3,(byte) 0xc3,(byte) 0x7e,(byte) 0x3c,(byte) 0x0,(byte) 0x36,(byte) 0x36,
+};
+
+static final BitmapCharRec ch235 = new BitmapCharRec(8,13,-1,0,10,ch235data);
+
+/* char: 0xea */
+
+static final byte[] ch234data = {
+(byte) 0x3c,(byte) 0x7f,(byte) 0xe3,(byte) 0xc0,(byte) 0xc0,(byte) 0xff,(byte) 0xc3,(byte) 0xc3,(byte) 0x7e,(byte) 0x3c,(byte) 0x0,(byte) 0x66,(byte) 0x3c,(byte) 0x18,
+};
+
+static final BitmapCharRec ch234 = new BitmapCharRec(8,14,-1,0,10,ch234data);
+
+/* char: 0xe9 */
+
+static final byte[] ch233data = {
+(byte) 0x3c,(byte) 0x7f,(byte) 0xe3,(byte) 0xc0,(byte) 0xc0,(byte) 0xff,(byte) 0xc3,(byte) 0xc3,(byte) 0x7e,(byte) 0x3c,(byte) 0x0,(byte) 0x18,(byte) 0xc,(byte) 0x6,
+};
+
+static final BitmapCharRec ch233 = new BitmapCharRec(8,14,-1,0,10,ch233data);
+
+/* char: 0xe8 */
+
+static final byte[] ch232data = {
+(byte) 0x3c,(byte) 0x7f,(byte) 0xe3,(byte) 0xc0,(byte) 0xc0,(byte) 0xff,(byte) 0xc3,(byte) 0xc3,(byte) 0x7e,(byte) 0x3c,(byte) 0x0,(byte) 0x18,(byte) 0x30,(byte) 0x60,
+};
+
+static final BitmapCharRec ch232 = new BitmapCharRec(8,14,-1,0,10,ch232data);
+
+/* char: 0xe7 */
+
+static final byte[] ch231data = {
+(byte) 0x78,(byte) 0x6c,(byte) 0xc,(byte) 0x38,(byte) 0x3e,(byte) 0x7f,(byte) 0x63,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x63,(byte) 0x7f,(byte) 0x3e,
+};
+
+static final BitmapCharRec ch231 = new BitmapCharRec(8,14,-1,4,10,ch231data);
+
+/* char: 0xe6 */
+
+static final byte[] ch230data = {
+(byte) 0x75,(byte) 0xe0,(byte) 0xef,(byte) 0xf8,(byte) 0xc7,(byte) 0x18,(byte) 0xc6,(byte) 0x0,(byte) 0xe6,(byte) 0x0,(byte) 0x7f,(byte) 0xf8,(byte) 0xe,(byte) 0x18,(byte) 0xc6,(byte) 0x18,
+(byte) 0xef,(byte) 0xf0,(byte) 0x7d,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch230 = new BitmapCharRec(13,10,-1,0,15,ch230data);
+
+/* char: 0xe5 */
+
+static final byte[] ch229data = {
+(byte) 0x76,(byte) 0xee,(byte) 0xc6,(byte) 0xc6,(byte) 0xe6,(byte) 0x7e,(byte) 0xe,(byte) 0xc6,(byte) 0xee,(byte) 0x7c,(byte) 0x38,(byte) 0x6c,(byte) 0x6c,(byte) 0x38,
+};
+
+static final BitmapCharRec ch229 = new BitmapCharRec(7,14,-1,0,9,ch229data);
+
+/* char: 0xe4 */
+
+static final byte[] ch228data = {
+(byte) 0x76,(byte) 0xee,(byte) 0xc6,(byte) 0xc6,(byte) 0xe6,(byte) 0x7e,(byte) 0xe,(byte) 0xc6,(byte) 0xee,(byte) 0x7c,(byte) 0x0,(byte) 0x6c,(byte) 0x6c,
+};
+
+static final BitmapCharRec ch228 = new BitmapCharRec(7,13,-1,0,9,ch228data);
+
+/* char: 0xe3 */
+
+static final byte[] ch227data = {
+(byte) 0x76,(byte) 0xee,(byte) 0xc6,(byte) 0xc6,(byte) 0xe6,(byte) 0x7e,(byte) 0xe,(byte) 0xc6,(byte) 0xee,(byte) 0x7c,(byte) 0x0,(byte) 0x4c,(byte) 0x5a,(byte) 0x32,
+};
+
+static final BitmapCharRec ch227 = new BitmapCharRec(7,14,-1,0,9,ch227data);
+
+/* char: 0xe2 */
+
+static final byte[] ch226data = {
+(byte) 0x76,(byte) 0xee,(byte) 0xc6,(byte) 0xc6,(byte) 0xe6,(byte) 0x7e,(byte) 0xe,(byte) 0xc6,(byte) 0xee,(byte) 0x7c,(byte) 0x0,(byte) 0x66,(byte) 0x3c,(byte) 0x18,
+};
+
+static final BitmapCharRec ch226 = new BitmapCharRec(7,14,-1,0,9,ch226data);
+
+/* char: 0xe1 */
+
+static final byte[] ch225data = {
+(byte) 0x76,(byte) 0xee,(byte) 0xc6,(byte) 0xc6,(byte) 0xe6,(byte) 0x7e,(byte) 0xe,(byte) 0xc6,(byte) 0xee,(byte) 0x7c,(byte) 0x0,(byte) 0x30,(byte) 0x18,(byte) 0xc,
+};
+
+static final BitmapCharRec ch225 = new BitmapCharRec(7,14,-1,0,9,ch225data);
+
+/* char: 0xe0 */
+
+static final byte[] ch224data = {
+(byte) 0x76,(byte) 0xee,(byte) 0xc6,(byte) 0xc6,(byte) 0xe6,(byte) 0x7e,(byte) 0xe,(byte) 0xc6,(byte) 0xee,(byte) 0x7c,(byte) 0x0,(byte) 0x18,(byte) 0x30,(byte) 0x60,
+};
+
+static final BitmapCharRec ch224 = new BitmapCharRec(7,14,-1,0,9,ch224data);
+
+/* char: 0xdf */
+
+static final byte[] ch223data = {
+(byte) 0xdc,(byte) 0xde,(byte) 0xc6,(byte) 0xc6,(byte) 0xc6,(byte) 0xc6,(byte) 0xdc,(byte) 0xdc,(byte) 0xc6,(byte) 0xc6,(byte) 0xc6,(byte) 0xc6,(byte) 0x7c,(byte) 0x38,
+};
+
+static final BitmapCharRec ch223 = new BitmapCharRec(7,14,-1,0,9,ch223data);
+
+/* char: 0xde */
+
+static final byte[] ch222data = {
+(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0xc1,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xc1,(byte) 0xc0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,
+};
+
+static final BitmapCharRec ch222 = new BitmapCharRec(10,14,-1,0,12,ch222data);
+
+/* char: 0xdd */
+
+static final byte[] ch221data = {
+(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x19,(byte) 0x80,
+(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0x0,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+(byte) 0x3,(byte) 0x0,(byte) 0x1,(byte) 0x80,
+};
+
+static final BitmapCharRec ch221 = new BitmapCharRec(12,18,-1,0,14,ch221data);
+
+/* char: 0xdc */
+
+static final byte[] ch220data = {
+(byte) 0x1f,(byte) 0x0,(byte) 0x7f,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,
+(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0x0,(byte) 0x0,(byte) 0x19,(byte) 0x80,
+(byte) 0x19,(byte) 0x80,
+};
+
+static final BitmapCharRec ch220 = new BitmapCharRec(11,17,-1,0,13,ch220data);
+
+/* char: 0xdb */
+
+static final byte[] ch219data = {
+(byte) 0x1f,(byte) 0x0,(byte) 0x7f,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,
+(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0x0,(byte) 0x0,(byte) 0x19,(byte) 0x80,
+(byte) 0xf,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+};
+
+static final BitmapCharRec ch219 = new BitmapCharRec(11,18,-1,0,13,ch219data);
+
+/* char: 0xda */
+
+static final byte[] ch218data = {
+(byte) 0x1f,(byte) 0x0,(byte) 0x7f,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,
+(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0x0,(byte) 0x0,(byte) 0xc,(byte) 0x0,
+(byte) 0x6,(byte) 0x0,(byte) 0x3,(byte) 0x0,
+};
+
+static final BitmapCharRec ch218 = new BitmapCharRec(11,18,-1,0,13,ch218data);
+
+/* char: 0xd9 */
+
+static final byte[] ch217data = {
+(byte) 0x1f,(byte) 0x0,(byte) 0x7f,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,
+(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0x0,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+(byte) 0xc,(byte) 0x0,(byte) 0x18,(byte) 0x0,
+};
+
+static final BitmapCharRec ch217 = new BitmapCharRec(11,18,-1,0,13,ch217data);
+
+/* char: 0xd8 */
+
+static final byte[] ch216data = {
+(byte) 0xc7,(byte) 0xc0,(byte) 0xff,(byte) 0xf0,(byte) 0x78,(byte) 0x38,(byte) 0x38,(byte) 0x18,(byte) 0x6c,(byte) 0x1c,(byte) 0x6e,(byte) 0xc,(byte) 0x67,(byte) 0xc,(byte) 0x63,(byte) 0x8c,
+(byte) 0x61,(byte) 0xcc,(byte) 0x70,(byte) 0xdc,(byte) 0x30,(byte) 0x78,(byte) 0x38,(byte) 0x38,(byte) 0x1f,(byte) 0xfc,(byte) 0x7,(byte) 0xcc,
+};
+
+static final BitmapCharRec ch216 = new BitmapCharRec(14,14,0,0,15,ch216data);
+
+/* char: 0xd7 */
+
+static final byte[] ch215data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x33,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x61,(byte) 0x80,
+(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch215 = new BitmapCharRec(10,9,0,0,10,ch215data);
+
+/* char: 0xd6 */
+
+static final byte[] ch214data = {
+(byte) 0xf,(byte) 0x80,(byte) 0x3f,(byte) 0xe0,(byte) 0x70,(byte) 0x70,(byte) 0x60,(byte) 0x30,(byte) 0xe0,(byte) 0x38,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,
+(byte) 0xc0,(byte) 0x18,(byte) 0xe0,(byte) 0x38,(byte) 0x60,(byte) 0x30,(byte) 0x70,(byte) 0x70,(byte) 0x3f,(byte) 0xe0,(byte) 0xf,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0xd,(byte) 0x80,
+(byte) 0xd,(byte) 0x80,
+};
+
+static final BitmapCharRec ch214 = new BitmapCharRec(13,17,-1,0,15,ch214data);
+
+/* char: 0xd5 */
+
+static final byte[] ch213data = {
+(byte) 0xf,(byte) 0x80,(byte) 0x3f,(byte) 0xe0,(byte) 0x70,(byte) 0x70,(byte) 0x60,(byte) 0x30,(byte) 0xe0,(byte) 0x38,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,
+(byte) 0xc0,(byte) 0x18,(byte) 0xe0,(byte) 0x38,(byte) 0x60,(byte) 0x30,(byte) 0x70,(byte) 0x70,(byte) 0x3f,(byte) 0xe0,(byte) 0xf,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x9,(byte) 0x80,
+(byte) 0xb,(byte) 0x40,(byte) 0x6,(byte) 0x40,
+};
+
+static final BitmapCharRec ch213 = new BitmapCharRec(13,18,-1,0,15,ch213data);
+
+/* char: 0xd4 */
+
+static final byte[] ch212data = {
+(byte) 0xf,(byte) 0x80,(byte) 0x3f,(byte) 0xe0,(byte) 0x70,(byte) 0x70,(byte) 0x60,(byte) 0x30,(byte) 0xe0,(byte) 0x38,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,
+(byte) 0xc0,(byte) 0x18,(byte) 0xe0,(byte) 0x38,(byte) 0x60,(byte) 0x30,(byte) 0x70,(byte) 0x70,(byte) 0x3f,(byte) 0xe0,(byte) 0xf,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0xc,(byte) 0xc0,
+(byte) 0x7,(byte) 0x80,(byte) 0x3,(byte) 0x0,
+};
+
+static final BitmapCharRec ch212 = new BitmapCharRec(13,18,-1,0,15,ch212data);
+
+/* char: 0xd3 */
+
+static final byte[] ch211data = {
+(byte) 0xf,(byte) 0x80,(byte) 0x3f,(byte) 0xe0,(byte) 0x70,(byte) 0x70,(byte) 0x60,(byte) 0x30,(byte) 0xe0,(byte) 0x38,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,
+(byte) 0xc0,(byte) 0x18,(byte) 0xe0,(byte) 0x38,(byte) 0x60,(byte) 0x30,(byte) 0x70,(byte) 0x70,(byte) 0x3f,(byte) 0xe0,(byte) 0xf,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x3,(byte) 0x0,
+(byte) 0x1,(byte) 0x80,(byte) 0x0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch211 = new BitmapCharRec(13,18,-1,0,15,ch211data);
+
+/* char: 0xd2 */
+
+static final byte[] ch210data = {
+(byte) 0xf,(byte) 0x80,(byte) 0x3f,(byte) 0xe0,(byte) 0x70,(byte) 0x70,(byte) 0x60,(byte) 0x30,(byte) 0xe0,(byte) 0x38,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,
+(byte) 0xc0,(byte) 0x18,(byte) 0xe0,(byte) 0x38,(byte) 0x60,(byte) 0x30,(byte) 0x70,(byte) 0x70,(byte) 0x3f,(byte) 0xe0,(byte) 0xf,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x3,(byte) 0x0,
+(byte) 0x6,(byte) 0x0,(byte) 0xc,(byte) 0x0,
+};
+
+static final BitmapCharRec ch210 = new BitmapCharRec(13,18,-1,0,15,ch210data);
+
+/* char: 0xd1 */
+
+static final byte[] ch209data = {
+(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xe0,(byte) 0xc1,(byte) 0xe0,(byte) 0xc1,(byte) 0xe0,(byte) 0xc3,(byte) 0x60,(byte) 0xc6,(byte) 0x60,(byte) 0xc6,(byte) 0x60,(byte) 0xcc,(byte) 0x60,
+(byte) 0xcc,(byte) 0x60,(byte) 0xd8,(byte) 0x60,(byte) 0xd8,(byte) 0x60,(byte) 0xf0,(byte) 0x60,(byte) 0xe0,(byte) 0x60,(byte) 0xe0,(byte) 0x60,(byte) 0x0,(byte) 0x0,(byte) 0x13,(byte) 0x0,
+(byte) 0x16,(byte) 0x80,(byte) 0xc,(byte) 0x80,
+};
+
+static final BitmapCharRec ch209 = new BitmapCharRec(11,18,-1,0,13,ch209data);
+
+/* char: 0xd0 */
+
+static final byte[] ch208data = {
+(byte) 0x7f,(byte) 0x80,(byte) 0x7f,(byte) 0xc0,(byte) 0x60,(byte) 0xe0,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x30,(byte) 0x60,(byte) 0x30,(byte) 0xfc,(byte) 0x30,(byte) 0xfc,(byte) 0x30,
+(byte) 0x60,(byte) 0x30,(byte) 0x60,(byte) 0x30,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0xe0,(byte) 0x7f,(byte) 0xc0,(byte) 0x7f,(byte) 0x80,
+};
+
+static final BitmapCharRec ch208 = new BitmapCharRec(12,14,0,0,13,ch208data);
+
+/* char: 0xcf */
+
+static final byte[] ch207data = {
+(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x0,(byte) 0xcc,
+(byte) 0xcc,
+};
+
+static final BitmapCharRec ch207 = new BitmapCharRec(6,17,0,0,6,ch207data);
+
+/* char: 0xce */
+
+static final byte[] ch206data = {
+(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x0,(byte) 0xcc,
+(byte) 0x78,(byte) 0x30,
+};
+
+static final BitmapCharRec ch206 = new BitmapCharRec(6,18,0,0,6,ch206data);
+
+/* char: 0xcd */
+
+static final byte[] ch205data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,
+(byte) 0x60,(byte) 0x30,
+};
+
+static final BitmapCharRec ch205 = new BitmapCharRec(4,18,-2,0,6,ch205data);
+
+/* char: 0xcc */
+
+static final byte[] ch204data = {
+(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x0,(byte) 0x30,
+(byte) 0x60,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch204 = new BitmapCharRec(4,18,0,0,6,ch204data);
+
+/* char: 0xcb */
+
+static final byte[] ch203data = {
+(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xff,(byte) 0x0,
+(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x33,(byte) 0x0,
+(byte) 0x33,(byte) 0x0,
+};
+
+static final BitmapCharRec ch203 = new BitmapCharRec(9,17,-1,0,11,ch203data);
+
+/* char: 0xca */
+
+static final byte[] ch202data = {
+(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xff,(byte) 0x0,
+(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x33,(byte) 0x0,
+(byte) 0x1e,(byte) 0x0,(byte) 0xc,(byte) 0x0,
+};
+
+static final BitmapCharRec ch202 = new BitmapCharRec(9,18,-1,0,11,ch202data);
+
+/* char: 0xc9 */
+
+static final byte[] ch201data = {
+(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xff,(byte) 0x0,
+(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0xc,(byte) 0x0,
+(byte) 0x6,(byte) 0x0,(byte) 0x3,(byte) 0x0,
+};
+
+static final BitmapCharRec ch201 = new BitmapCharRec(9,18,-1,0,11,ch201data);
+
+/* char: 0xc8 */
+
+static final byte[] ch200data = {
+(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xff,(byte) 0x0,
+(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0xc,(byte) 0x0,
+(byte) 0x18,(byte) 0x0,(byte) 0x30,(byte) 0x0,
+};
+
+static final BitmapCharRec ch200 = new BitmapCharRec(9,18,-1,0,11,ch200data);
+
+/* char: 0xc7 */
+
+static final byte[] ch199data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x1b,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0xe,(byte) 0x0,(byte) 0xf,(byte) 0x80,(byte) 0x3f,(byte) 0xe0,(byte) 0x70,(byte) 0x70,(byte) 0x60,(byte) 0x30,
+(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xe0,(byte) 0x0,(byte) 0x60,(byte) 0x30,(byte) 0x70,(byte) 0x70,
+(byte) 0x3f,(byte) 0xe0,(byte) 0xf,(byte) 0x80,
+};
+
+static final BitmapCharRec ch199 = new BitmapCharRec(12,18,-1,4,14,ch199data);
+
+/* char: 0xc6 */
+
+static final byte[] ch198data = {
+(byte) 0xc1,(byte) 0xff,(byte) 0xc1,(byte) 0xff,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x7f,(byte) 0x80,(byte) 0x3f,(byte) 0x80,(byte) 0x31,(byte) 0xfe,(byte) 0x31,(byte) 0xfe,
+(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0xd,(byte) 0x80,(byte) 0xd,(byte) 0x80,(byte) 0x7,(byte) 0xff,(byte) 0x7,(byte) 0xff,
+};
+
+static final BitmapCharRec ch198 = new BitmapCharRec(16,14,-1,0,18,ch198data);
+
+/* char: 0xc5 */
+
+static final byte[] ch197data = {
+(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x7f,(byte) 0xe0,(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,
+(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0xf,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x19,(byte) 0x80,
+(byte) 0x19,(byte) 0x80,(byte) 0xf,(byte) 0x0,
+};
+
+static final BitmapCharRec ch197 = new BitmapCharRec(12,18,0,0,12,ch197data);
+
+/* char: 0xc4 */
+
+static final byte[] ch196data = {
+(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x7f,(byte) 0xe0,(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,
+(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0xf,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x19,(byte) 0x80,
+(byte) 0x19,(byte) 0x80,
+};
+
+static final BitmapCharRec ch196 = new BitmapCharRec(12,17,0,0,12,ch196data);
+
+/* char: 0xc3 */
+
+static final byte[] ch195data = {
+(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x7f,(byte) 0xe0,(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,
+(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0xf,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x13,(byte) 0x0,
+(byte) 0x16,(byte) 0x80,(byte) 0xc,(byte) 0x80,
+};
+
+static final BitmapCharRec ch195 = new BitmapCharRec(12,18,0,0,12,ch195data);
+
+/* char: 0xc2 */
+
+static final byte[] ch194data = {
+(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x7f,(byte) 0xe0,(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,
+(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0xf,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x19,(byte) 0x80,
+(byte) 0xf,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+};
+
+static final BitmapCharRec ch194 = new BitmapCharRec(12,18,0,0,12,ch194data);
+
+/* char: 0xc1 */
+
+static final byte[] ch193data = {
+(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x7f,(byte) 0xe0,(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,
+(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0xf,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+(byte) 0x3,(byte) 0x0,(byte) 0x1,(byte) 0x80,
+};
+
+static final BitmapCharRec ch193 = new BitmapCharRec(12,18,0,0,12,ch193data);
+
+/* char: 0xc0 */
+
+static final byte[] ch192data = {
+(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x7f,(byte) 0xe0,(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,
+(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0xf,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+(byte) 0xc,(byte) 0x0,(byte) 0x18,(byte) 0x0,
+};
+
+static final BitmapCharRec ch192 = new BitmapCharRec(12,18,0,0,12,ch192data);
+
+/* char: 0xbf */
+
+static final byte[] ch191data = {
+(byte) 0x7c,(byte) 0xfe,(byte) 0xc6,(byte) 0xc6,(byte) 0xe0,(byte) 0x70,(byte) 0x38,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x0,(byte) 0x0,(byte) 0x18,(byte) 0x18,
+};
+
+static final BitmapCharRec ch191 = new BitmapCharRec(7,14,-1,4,10,ch191data);
+
+/* char: 0xbe */
+
+static final byte[] ch190data = {
+(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0xc,(byte) 0xfc,(byte) 0x6,(byte) 0xd8,(byte) 0x6,(byte) 0x78,(byte) 0x73,(byte) 0x38,(byte) 0xf9,(byte) 0x18,(byte) 0x99,(byte) 0x88,
+(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x98,(byte) 0x60,(byte) 0xf8,(byte) 0x30,(byte) 0x70,(byte) 0x30,
+};
+
+static final BitmapCharRec ch190 = new BitmapCharRec(14,13,0,0,15,ch190data);
+
+/* char: 0xbd */
+
+static final byte[] ch189data = {
+(byte) 0x30,(byte) 0xf8,(byte) 0x30,(byte) 0xf8,(byte) 0x18,(byte) 0x60,(byte) 0xc,(byte) 0x30,(byte) 0xc,(byte) 0x18,(byte) 0x66,(byte) 0x98,(byte) 0x62,(byte) 0xf8,(byte) 0x63,(byte) 0x70,
+(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xe0,(byte) 0xc0,(byte) 0xe0,(byte) 0x60,(byte) 0x60,(byte) 0x60,
+};
+
+static final BitmapCharRec ch189 = new BitmapCharRec(13,13,-1,0,15,ch189data);
+
+/* char: 0xbc */
+
+static final byte[] ch188data = {
+(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x19,(byte) 0xf8,(byte) 0xd,(byte) 0xb0,(byte) 0xc,(byte) 0xf0,(byte) 0x66,(byte) 0x70,(byte) 0x62,(byte) 0x30,(byte) 0x63,(byte) 0x10,
+(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xe0,(byte) 0xc0,(byte) 0xe0,(byte) 0x60,(byte) 0x60,(byte) 0x60,
+};
+
+static final BitmapCharRec ch188 = new BitmapCharRec(13,13,-1,0,15,ch188data);
+
+/* char: 0xbb */
+
+static final byte[] ch187data = {
+(byte) 0x90,(byte) 0xd8,(byte) 0x6c,(byte) 0x36,(byte) 0x36,(byte) 0x6c,(byte) 0xd8,(byte) 0x90,
+};
+
+static final BitmapCharRec ch187 = new BitmapCharRec(7,8,-1,-1,9,ch187data);
+
+/* char: 0xba */
+
+static final byte[] ch186data = {
+(byte) 0xf8,(byte) 0x0,(byte) 0x70,(byte) 0xd8,(byte) 0x88,(byte) 0x88,(byte) 0xd8,(byte) 0x70,
+};
+
+static final BitmapCharRec ch186 = new BitmapCharRec(5,8,-1,-6,7,ch186data);
+
+/* char: 0xb9 */
+
+static final byte[] ch185data = {
+(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0xe0,(byte) 0xe0,(byte) 0x60,
+};
+
+static final BitmapCharRec ch185 = new BitmapCharRec(3,8,-1,-5,6,ch185data);
+
+/* char: 0xb8 */
+
+static final byte[] ch184data = {
+(byte) 0xf0,(byte) 0xd8,(byte) 0x18,(byte) 0x70,(byte) 0x60,
+};
+
+static final BitmapCharRec ch184 = new BitmapCharRec(5,5,0,4,5,ch184data);
+
+/* char: 0xb7 */
+
+static final byte[] ch183data = {
+(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch183 = new BitmapCharRec(2,2,-1,-4,4,ch183data);
+
+/* char: 0xb6 */
+
+static final byte[] ch182data = {
+(byte) 0x12,(byte) 0x12,(byte) 0x12,(byte) 0x12,(byte) 0x12,(byte) 0x12,(byte) 0x12,(byte) 0x12,(byte) 0x12,(byte) 0x12,(byte) 0x32,(byte) 0x72,(byte) 0xf2,(byte) 0xf2,(byte) 0xf2,(byte) 0xf2,
+(byte) 0x72,(byte) 0x3f,
+};
+
+static final BitmapCharRec ch182 = new BitmapCharRec(8,18,-1,4,10,ch182data);
+
+/* char: 0xb5 */
+
+static final byte[] ch181data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xdb,(byte) 0xff,(byte) 0xe7,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,
+};
+
+static final BitmapCharRec ch181 = new BitmapCharRec(8,14,-1,4,10,ch181data);
+
+/* char: 0xb4 */
+
+static final byte[] ch180data = {
+(byte) 0xc0,(byte) 0x60,(byte) 0x30,
+};
+
+static final BitmapCharRec ch180 = new BitmapCharRec(4,3,0,-11,4,ch180data);
+
+/* char: 0xb3 */
+
+static final byte[] ch179data = {
+(byte) 0x70,(byte) 0xf8,(byte) 0x98,(byte) 0x30,(byte) 0x30,(byte) 0x98,(byte) 0xf8,(byte) 0x70,
+};
+
+static final BitmapCharRec ch179 = new BitmapCharRec(5,8,0,-5,6,ch179data);
+
+/* char: 0xb2 */
+
+static final byte[] ch178data = {
+(byte) 0xf8,(byte) 0xf8,(byte) 0x60,(byte) 0x30,(byte) 0x18,(byte) 0x98,(byte) 0xf8,(byte) 0x70,
+};
+
+static final BitmapCharRec ch178 = new BitmapCharRec(5,8,0,-5,6,ch178data);
+
+/* char: 0xb1 */
+
+static final byte[] ch177data = {
+(byte) 0xff,(byte) 0xff,(byte) 0x0,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0xff,(byte) 0xff,(byte) 0x18,(byte) 0x18,(byte) 0x18,
+};
+
+static final BitmapCharRec ch177 = new BitmapCharRec(8,11,-1,0,10,ch177data);
+
+/* char: 0xb0 */
+
+static final byte[] ch176data = {
+(byte) 0x70,(byte) 0xd8,(byte) 0x88,(byte) 0xd8,(byte) 0x70,
+};
+
+static final BitmapCharRec ch176 = new BitmapCharRec(5,5,-1,-8,7,ch176data);
+
+/* char: 0xaf */
+
+static final byte[] ch175data = {
+(byte) 0xf8,
+};
+
+static final BitmapCharRec ch175 = new BitmapCharRec(5,1,0,-12,5,ch175data);
+
+/* char: 0xae */
+
+static final byte[] ch174data = {
+(byte) 0xf,(byte) 0x80,(byte) 0x30,(byte) 0x60,(byte) 0x40,(byte) 0x10,(byte) 0x48,(byte) 0x50,(byte) 0x88,(byte) 0x88,(byte) 0x89,(byte) 0x8,(byte) 0x8f,(byte) 0x88,(byte) 0x88,(byte) 0x48,
+(byte) 0x88,(byte) 0x48,(byte) 0x4f,(byte) 0x90,(byte) 0x40,(byte) 0x10,(byte) 0x30,(byte) 0x60,(byte) 0xf,(byte) 0x80,
+};
+
+static final BitmapCharRec ch174 = new BitmapCharRec(13,13,-1,0,14,ch174data);
+
+/* char: 0xad */
+
+static final byte[] ch173data = {
+(byte) 0xf8,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch173 = new BitmapCharRec(5,2,-1,-4,7,ch173data);
+
+/* char: 0xac */
+
+static final byte[] ch172data = {
+(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,
+};
+
+static final BitmapCharRec ch172 = new BitmapCharRec(9,5,-1,-3,11,ch172data);
+
+/* char: 0xab */
+
+static final byte[] ch171data = {
+(byte) 0x12,(byte) 0x36,(byte) 0x6c,(byte) 0xd8,(byte) 0xd8,(byte) 0x6c,(byte) 0x36,(byte) 0x12,
+};
+
+static final BitmapCharRec ch171 = new BitmapCharRec(7,8,-1,-1,9,ch171data);
+
+/* char: 0xaa */
+
+static final byte[] ch170data = {
+(byte) 0xf8,(byte) 0x0,(byte) 0x68,(byte) 0xd8,(byte) 0x48,(byte) 0x38,(byte) 0xc8,(byte) 0x70,
+};
+
+static final BitmapCharRec ch170 = new BitmapCharRec(5,8,-1,-6,7,ch170data);
+
+/* char: 0xa9 */
+
+static final byte[] ch169data = {
+(byte) 0xf,(byte) 0x80,(byte) 0x30,(byte) 0x60,(byte) 0x40,(byte) 0x10,(byte) 0x47,(byte) 0x10,(byte) 0x88,(byte) 0x88,(byte) 0x90,(byte) 0x8,(byte) 0x90,(byte) 0x8,(byte) 0x90,(byte) 0x8,
+(byte) 0x88,(byte) 0x88,(byte) 0x47,(byte) 0x10,(byte) 0x40,(byte) 0x10,(byte) 0x30,(byte) 0x60,(byte) 0xf,(byte) 0x80,
+};
+
+static final BitmapCharRec ch169 = new BitmapCharRec(13,13,-1,0,15,ch169data);
+
+/* char: 0xa8 */
+
+static final byte[] ch168data = {
+(byte) 0xd8,(byte) 0xd8,
+};
+
+static final BitmapCharRec ch168 = new BitmapCharRec(5,2,0,-11,6,ch168data);
+
+/* char: 0xa7 */
+
+static final byte[] ch167data = {
+(byte) 0x3c,(byte) 0x7e,(byte) 0xc3,(byte) 0xc3,(byte) 0x7,(byte) 0xe,(byte) 0x3e,(byte) 0x73,(byte) 0xe3,(byte) 0xc3,(byte) 0xc7,(byte) 0x6e,(byte) 0x7c,(byte) 0xf0,(byte) 0xc3,(byte) 0xc3,
+(byte) 0x7e,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch167 = new BitmapCharRec(8,18,-1,4,10,ch167data);
+
+/* char: 0xa6 */
+
+static final byte[] ch166data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xc0,
+};
+
+static final BitmapCharRec ch166 = new BitmapCharRec(2,17,-1,3,4,ch166data);
+
+/* char: 0xa5 */
+
+static final byte[] ch165data = {
+(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0xff,(byte) 0x18,(byte) 0xff,(byte) 0x3c,(byte) 0x66,(byte) 0x66,(byte) 0x66,(byte) 0xc3,(byte) 0xc3,
+};
+
+static final BitmapCharRec ch165 = new BitmapCharRec(8,13,-1,0,10,ch165data);
+
+/* char: 0xa4 */
+
+static final byte[] ch164data = {
+(byte) 0xc3,(byte) 0xff,(byte) 0x66,(byte) 0x66,(byte) 0x66,(byte) 0xff,(byte) 0xc3,
+};
+
+static final BitmapCharRec ch164 = new BitmapCharRec(8,7,-1,-3,10,ch164data);
+
+/* char: 0xa3 */
+
+static final byte[] ch163data = {
+(byte) 0xdf,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0x60,(byte) 0x80,(byte) 0x30,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x7e,(byte) 0x0,(byte) 0x30,(byte) 0x0,
+(byte) 0x60,(byte) 0x0,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x3f,(byte) 0x0,(byte) 0x1e,(byte) 0x0,
+};
+
+static final BitmapCharRec ch163 = new BitmapCharRec(9,13,0,0,10,ch163data);
+
+/* char: 0xa2 */
+
+static final byte[] ch162data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x3e,(byte) 0x7f,(byte) 0x6b,(byte) 0xc8,(byte) 0xc8,(byte) 0xc8,(byte) 0xc8,(byte) 0x6b,(byte) 0x7f,(byte) 0x3e,(byte) 0x4,(byte) 0x4,
+};
+
+static final BitmapCharRec ch162 = new BitmapCharRec(8,14,-1,2,10,ch162data);
+
+/* char: 0xa1 */
+
+static final byte[] ch161data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch161 = new BitmapCharRec(2,14,-2,4,6,ch161data);
+
+/* char: 0xa0 */
+
+static final BitmapCharRec ch160 = new BitmapCharRec(0,0,0,0,5,null);
+
+/* char: 0x7e '~' */
+
+static final byte[] ch126data = {
+(byte) 0xcc,(byte) 0x7e,(byte) 0x33,
+};
+
+static final BitmapCharRec ch126 = new BitmapCharRec(8,3,-1,-4,10,ch126data);
+
+/* char: 0x7d '}' */
+
+static final byte[] ch125data = {
+(byte) 0xc0,(byte) 0x60,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x18,(byte) 0xc,(byte) 0x18,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,
+(byte) 0x60,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch125 = new BitmapCharRec(6,18,0,4,6,ch125data);
+
+/* char: 0x7c '|' */
+
+static final byte[] ch124data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch124 = new BitmapCharRec(2,18,-1,4,4,ch124data);
+
+/* char: 0x7b '{' */
+
+static final byte[] ch123data = {
+(byte) 0xc,(byte) 0x18,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,
+(byte) 0x18,(byte) 0xc,
+};
+
+static final BitmapCharRec ch123 = new BitmapCharRec(6,18,0,4,6,ch123data);
+
+/* char: 0x7a 'z' */
+
+static final byte[] ch122data = {
+(byte) 0xfe,(byte) 0xfe,(byte) 0xc0,(byte) 0x60,(byte) 0x30,(byte) 0x18,(byte) 0xc,(byte) 0x6,(byte) 0xfe,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch122 = new BitmapCharRec(7,10,-1,0,9,ch122data);
+
+/* char: 0x79 'y' */
+
+static final byte[] ch121data = {
+(byte) 0x70,(byte) 0x70,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x3c,(byte) 0x24,(byte) 0x66,(byte) 0x66,(byte) 0x66,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,
+};
+
+static final BitmapCharRec ch121 = new BitmapCharRec(8,14,-1,4,10,ch121data);
+
+/* char: 0x78 'x' */
+
+static final byte[] ch120data = {
+(byte) 0xc3,(byte) 0xe7,(byte) 0x66,(byte) 0x3c,(byte) 0x18,(byte) 0x18,(byte) 0x3c,(byte) 0x66,(byte) 0xe7,(byte) 0xc3,
+};
+
+static final BitmapCharRec ch120 = new BitmapCharRec(8,10,-1,0,10,ch120data);
+
+/* char: 0x77 'w' */
+
+static final byte[] ch119data = {
+(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0x39,(byte) 0xc0,(byte) 0x29,(byte) 0x40,(byte) 0x69,(byte) 0x60,(byte) 0x66,(byte) 0x60,(byte) 0x66,(byte) 0x60,(byte) 0xc6,(byte) 0x30,
+(byte) 0xc6,(byte) 0x30,(byte) 0xc6,(byte) 0x30,
+};
+
+static final BitmapCharRec ch119 = new BitmapCharRec(12,10,-1,0,14,ch119data);
+
+/* char: 0x76 'v' */
+
+static final byte[] ch118data = {
+(byte) 0x18,(byte) 0x18,(byte) 0x3c,(byte) 0x24,(byte) 0x66,(byte) 0x66,(byte) 0x66,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,
+};
+
+static final BitmapCharRec ch118 = new BitmapCharRec(8,10,-1,0,10,ch118data);
+
+/* char: 0x75 'u' */
+
+static final byte[] ch117data = {
+(byte) 0x73,(byte) 0xfb,(byte) 0xc7,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,
+};
+
+static final BitmapCharRec ch117 = new BitmapCharRec(8,10,-1,0,10,ch117data);
+
+/* char: 0x74 't' */
+
+static final byte[] ch116data = {
+(byte) 0x18,(byte) 0x38,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0xfc,(byte) 0xfc,(byte) 0x30,(byte) 0x30,(byte) 0x30,
+};
+
+static final BitmapCharRec ch116 = new BitmapCharRec(6,13,0,0,6,ch116data);
+
+/* char: 0x73 's' */
+
+static final byte[] ch115data = {
+(byte) 0x78,(byte) 0xfc,(byte) 0xc6,(byte) 0x6,(byte) 0x3e,(byte) 0xfc,(byte) 0xc0,(byte) 0xc6,(byte) 0x7e,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch115 = new BitmapCharRec(7,10,-1,0,9,ch115data);
+
+/* char: 0x72 'r' */
+
+static final byte[] ch114data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xe0,(byte) 0xd8,(byte) 0xd8,
+};
+
+static final BitmapCharRec ch114 = new BitmapCharRec(5,10,-1,0,6,ch114data);
+
+/* char: 0x71 'q' */
+
+static final byte[] ch113data = {
+(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x3d,(byte) 0x80,(byte) 0x7f,(byte) 0x80,(byte) 0x63,(byte) 0x80,(byte) 0xc1,(byte) 0x80,
+(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x63,(byte) 0x80,(byte) 0x7f,(byte) 0x80,(byte) 0x3d,(byte) 0x80,
+};
+
+static final BitmapCharRec ch113 = new BitmapCharRec(9,14,-1,4,11,ch113data);
+
+/* char: 0x70 'p' */
+
+static final byte[] ch112data = {
+(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xde,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xe3,(byte) 0x0,(byte) 0xc1,(byte) 0x80,
+(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xe3,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xde,(byte) 0x0,
+};
+
+static final BitmapCharRec ch112 = new BitmapCharRec(9,14,-1,4,11,ch112data);
+
+/* char: 0x6f 'o' */
+
+static final byte[] ch111data = {
+(byte) 0x3e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x63,(byte) 0x0,
+(byte) 0x7f,(byte) 0x0,(byte) 0x3e,(byte) 0x0,
+};
+
+static final BitmapCharRec ch111 = new BitmapCharRec(9,10,-1,0,11,ch111data);
+
+/* char: 0x6e 'n' */
+
+static final byte[] ch110data = {
+(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xe3,(byte) 0xdf,(byte) 0xce,
+};
+
+static final BitmapCharRec ch110 = new BitmapCharRec(8,10,-1,0,10,ch110data);
+
+/* char: 0x6d 'm' */
+
+static final byte[] ch109data = {
+(byte) 0xc6,(byte) 0x30,(byte) 0xc6,(byte) 0x30,(byte) 0xc6,(byte) 0x30,(byte) 0xc6,(byte) 0x30,(byte) 0xc6,(byte) 0x30,(byte) 0xc6,(byte) 0x30,(byte) 0xc6,(byte) 0x30,(byte) 0xe7,(byte) 0x30,
+(byte) 0xde,(byte) 0xf0,(byte) 0xcc,(byte) 0x60,
+};
+
+static final BitmapCharRec ch109 = new BitmapCharRec(12,10,-1,0,14,ch109data);
+
+/* char: 0x6c 'l' */
+
+static final byte[] ch108data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch108 = new BitmapCharRec(2,14,-1,0,4,ch108data);
+
+/* char: 0x6b 'k' */
+
+static final byte[] ch107data = {
+(byte) 0xc7,(byte) 0xc6,(byte) 0xce,(byte) 0xcc,(byte) 0xd8,(byte) 0xf8,(byte) 0xf0,(byte) 0xd8,(byte) 0xcc,(byte) 0xc6,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch107 = new BitmapCharRec(8,14,-1,0,9,ch107data);
+
+/* char: 0x6a 'j' */
+
+static final byte[] ch106data = {
+(byte) 0xe0,(byte) 0xf0,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x0,(byte) 0x0,
+(byte) 0x30,(byte) 0x30,
+};
+
+static final BitmapCharRec ch106 = new BitmapCharRec(4,18,1,4,4,ch106data);
+
+/* char: 0x69 'i' */
+
+static final byte[] ch105data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch105 = new BitmapCharRec(2,14,-1,0,4,ch105data);
+
+/* char: 0x68 'h' */
+
+static final byte[] ch104data = {
+(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xe3,(byte) 0xdf,(byte) 0xce,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch104 = new BitmapCharRec(8,14,-1,0,10,ch104data);
+
+/* char: 0x67 'g' */
+
+static final byte[] ch103data = {
+(byte) 0x1c,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x1,(byte) 0x80,(byte) 0x3d,(byte) 0x80,(byte) 0x7f,(byte) 0x80,(byte) 0x63,(byte) 0x80,(byte) 0xc1,(byte) 0x80,
+(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x7f,(byte) 0x80,(byte) 0x3d,(byte) 0x80,
+};
+
+static final BitmapCharRec ch103 = new BitmapCharRec(9,14,-1,4,11,ch103data);
+
+/* char: 0x66 'f' */
+
+static final byte[] ch102data = {
+(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0xfc,(byte) 0xfc,(byte) 0x30,(byte) 0x30,(byte) 0x3c,(byte) 0x1c,
+};
+
+static final BitmapCharRec ch102 = new BitmapCharRec(6,14,0,0,6,ch102data);
+
+/* char: 0x65 'e' */
+
+static final byte[] ch101data = {
+(byte) 0x3c,(byte) 0x7f,(byte) 0xe3,(byte) 0xc0,(byte) 0xc0,(byte) 0xff,(byte) 0xc3,(byte) 0xc3,(byte) 0x7e,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch101 = new BitmapCharRec(8,10,-1,0,10,ch101data);
+
+/* char: 0x64 'd' */
+
+static final byte[] ch100data = {
+(byte) 0x3d,(byte) 0x80,(byte) 0x7f,(byte) 0x80,(byte) 0x63,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x63,(byte) 0x80,
+(byte) 0x7f,(byte) 0x80,(byte) 0x3d,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,
+};
+
+static final BitmapCharRec ch100 = new BitmapCharRec(9,14,-1,0,11,ch100data);
+
+/* char: 0x63 'c' */
+
+static final byte[] ch99data = {
+(byte) 0x3e,(byte) 0x7f,(byte) 0x63,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x63,(byte) 0x7f,(byte) 0x3e,
+};
+
+static final BitmapCharRec ch99 = new BitmapCharRec(8,10,-1,0,10,ch99data);
+
+/* char: 0x62 'b' */
+
+static final byte[] ch98data = {
+(byte) 0xde,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xe3,(byte) 0x0,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xe3,(byte) 0x0,
+(byte) 0xff,(byte) 0x0,(byte) 0xde,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,
+};
+
+static final BitmapCharRec ch98 = new BitmapCharRec(9,14,-1,0,11,ch98data);
+
+/* char: 0x61 'a' */
+
+static final byte[] ch97data = {
+(byte) 0x76,(byte) 0xee,(byte) 0xc6,(byte) 0xc6,(byte) 0xe6,(byte) 0x7e,(byte) 0xe,(byte) 0xc6,(byte) 0xee,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch97 = new BitmapCharRec(7,10,-1,0,9,ch97data);
+
+/* char: 0x60 '`' */
+
+static final byte[] ch96data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0x80,(byte) 0x80,(byte) 0x40,
+};
+
+static final BitmapCharRec ch96 = new BitmapCharRec(2,5,-1,-9,4,ch96data);
+
+/* char: 0x5f '_' */
+
+static final byte[] ch95data = {
+(byte) 0xff,(byte) 0xc0,(byte) 0xff,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch95 = new BitmapCharRec(10,2,0,4,10,ch95data);
+
+/* char: 0x5e '^' */
+
+static final byte[] ch94data = {
+(byte) 0x82,(byte) 0xc6,(byte) 0x6c,(byte) 0x38,(byte) 0x10,
+};
+
+static final BitmapCharRec ch94 = new BitmapCharRec(7,5,-1,-8,9,ch94data);
+
+/* char: 0x5d ']' */
+
+static final byte[] ch93data = {
+(byte) 0xf0,(byte) 0xf0,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,
+(byte) 0xf0,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch93 = new BitmapCharRec(4,18,0,4,5,ch93data);
+
+/* char: 0x5c '\' */
+
+static final byte[] ch92data = {
+(byte) 0x18,(byte) 0x18,(byte) 0x10,(byte) 0x10,(byte) 0x30,(byte) 0x30,(byte) 0x20,(byte) 0x20,(byte) 0x60,(byte) 0x60,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch92 = new BitmapCharRec(5,14,0,0,5,ch92data);
+
+/* char: 0x5b '[' */
+
+static final byte[] ch91data = {
+(byte) 0xf0,(byte) 0xf0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xf0,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch91 = new BitmapCharRec(4,18,-1,4,5,ch91data);
+
+/* char: 0x5a 'Z' */
+
+static final byte[] ch90data = {
+(byte) 0xff,(byte) 0xc0,(byte) 0xff,(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x1c,(byte) 0x0,(byte) 0xc,(byte) 0x0,
+(byte) 0x6,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x1,(byte) 0x80,(byte) 0x0,(byte) 0xc0,(byte) 0xff,(byte) 0xc0,(byte) 0xff,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch90 = new BitmapCharRec(10,14,-1,0,12,ch90data);
+
+/* char: 0x59 'Y' */
+
+static final byte[] ch89data = {
+(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x19,(byte) 0x80,
+(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,
+};
+
+static final BitmapCharRec ch89 = new BitmapCharRec(12,14,-1,0,14,ch89data);
+
+/* char: 0x58 'X' */
+
+static final byte[] ch88data = {
+(byte) 0xc0,(byte) 0x60,(byte) 0xe0,(byte) 0xe0,(byte) 0x60,(byte) 0xc0,(byte) 0x71,(byte) 0xc0,(byte) 0x31,(byte) 0x80,(byte) 0x1b,(byte) 0x0,(byte) 0xe,(byte) 0x0,(byte) 0xe,(byte) 0x0,
+(byte) 0x1b,(byte) 0x0,(byte) 0x31,(byte) 0x80,(byte) 0x71,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xe0,(byte) 0xe0,(byte) 0xc0,(byte) 0x60,
+};
+
+static final BitmapCharRec ch88 = new BitmapCharRec(11,14,-1,0,13,ch88data);
+
+/* char: 0x57 'W' */
+
+static final byte[] ch87data = {
+(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x1c,(byte) 0x38,(byte) 0x34,(byte) 0x2c,(byte) 0x36,(byte) 0x6c,(byte) 0x36,(byte) 0x6c,(byte) 0x66,(byte) 0x66,(byte) 0x66,(byte) 0x66,
+(byte) 0x62,(byte) 0x46,(byte) 0x63,(byte) 0xc6,(byte) 0xc3,(byte) 0xc3,(byte) 0xc1,(byte) 0x83,(byte) 0xc1,(byte) 0x83,(byte) 0xc1,(byte) 0x83,
+};
+
+static final BitmapCharRec ch87 = new BitmapCharRec(16,14,-1,0,18,ch87data);
+
+/* char: 0x56 'V' */
+
+static final byte[] ch86data = {
+(byte) 0x6,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,
+(byte) 0x30,(byte) 0xc0,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,
+};
+
+static final BitmapCharRec ch86 = new BitmapCharRec(12,14,-1,0,14,ch86data);
+
+/* char: 0x55 'U' */
+
+static final byte[] ch85data = {
+(byte) 0x1f,(byte) 0x0,(byte) 0x7f,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,
+(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,
+};
+
+static final BitmapCharRec ch85 = new BitmapCharRec(11,14,-1,0,13,ch85data);
+
+/* char: 0x54 'T' */
+
+static final byte[] ch84data = {
+(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,
+(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0xff,(byte) 0xc0,(byte) 0xff,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch84 = new BitmapCharRec(10,14,-1,0,12,ch84data);
+
+/* char: 0x53 'S' */
+
+static final byte[] ch83data = {
+(byte) 0x3f,(byte) 0x0,(byte) 0x7f,(byte) 0xc0,(byte) 0xe0,(byte) 0xe0,(byte) 0xc0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0xe0,(byte) 0x3,(byte) 0xc0,(byte) 0x1f,(byte) 0x0,
+(byte) 0x7c,(byte) 0x0,(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x60,(byte) 0xe0,(byte) 0xe0,(byte) 0x7f,(byte) 0xc0,(byte) 0x1f,(byte) 0x0,
+};
+
+static final BitmapCharRec ch83 = new BitmapCharRec(11,14,-1,0,13,ch83data);
+
+/* char: 0x52 'R' */
+
+static final byte[] ch82data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xff,(byte) 0x0,(byte) 0xff,(byte) 0x80,
+(byte) 0xc1,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc1,(byte) 0xc0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x0,
+};
+
+static final BitmapCharRec ch82 = new BitmapCharRec(10,14,-1,0,12,ch82data);
+
+/* char: 0x51 'Q' */
+
+static final byte[] ch81data = {
+(byte) 0x0,(byte) 0x30,(byte) 0xf,(byte) 0xb0,(byte) 0x3f,(byte) 0xe0,(byte) 0x70,(byte) 0xf0,(byte) 0x61,(byte) 0xb0,(byte) 0xe1,(byte) 0xb8,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,
+(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,(byte) 0xe0,(byte) 0x38,(byte) 0x60,(byte) 0x30,(byte) 0x70,(byte) 0x70,(byte) 0x3f,(byte) 0xe0,(byte) 0xf,(byte) 0x80,
+};
+
+static final BitmapCharRec ch81 = new BitmapCharRec(13,15,-1,1,15,ch81data);
+
+/* char: 0x50 'P' */
+
+static final byte[] ch80data = {
+(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xff,(byte) 0x80,
+(byte) 0xc1,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc1,(byte) 0xc0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x0,
+};
+
+static final BitmapCharRec ch80 = new BitmapCharRec(10,14,-1,0,12,ch80data);
+
+/* char: 0x4f 'O' */
+
+static final byte[] ch79data = {
+(byte) 0xf,(byte) 0x80,(byte) 0x3f,(byte) 0xe0,(byte) 0x70,(byte) 0x70,(byte) 0x60,(byte) 0x30,(byte) 0xe0,(byte) 0x38,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,
+(byte) 0xc0,(byte) 0x18,(byte) 0xe0,(byte) 0x38,(byte) 0x60,(byte) 0x30,(byte) 0x70,(byte) 0x70,(byte) 0x3f,(byte) 0xe0,(byte) 0xf,(byte) 0x80,
+};
+
+static final BitmapCharRec ch79 = new BitmapCharRec(13,14,-1,0,15,ch79data);
+
+/* char: 0x4e 'N' */
+
+static final byte[] ch78data = {
+(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xe0,(byte) 0xc1,(byte) 0xe0,(byte) 0xc1,(byte) 0xe0,(byte) 0xc3,(byte) 0x60,(byte) 0xc6,(byte) 0x60,(byte) 0xc6,(byte) 0x60,(byte) 0xcc,(byte) 0x60,
+(byte) 0xcc,(byte) 0x60,(byte) 0xd8,(byte) 0x60,(byte) 0xf0,(byte) 0x60,(byte) 0xf0,(byte) 0x60,(byte) 0xe0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,
+};
+
+static final BitmapCharRec ch78 = new BitmapCharRec(11,14,-1,0,13,ch78data);
+
+/* char: 0x4d 'M' */
+
+static final byte[] ch77data = {
+(byte) 0xc3,(byte) 0xc,(byte) 0xc3,(byte) 0xc,(byte) 0xc7,(byte) 0x8c,(byte) 0xc4,(byte) 0x8c,(byte) 0xcc,(byte) 0xcc,(byte) 0xcc,(byte) 0xcc,(byte) 0xd8,(byte) 0x6c,(byte) 0xd8,(byte) 0x6c,
+(byte) 0xf0,(byte) 0x3c,(byte) 0xf0,(byte) 0x3c,(byte) 0xe0,(byte) 0x1c,(byte) 0xe0,(byte) 0x1c,(byte) 0xc0,(byte) 0xc,(byte) 0xc0,(byte) 0xc,
+};
+
+static final BitmapCharRec ch77 = new BitmapCharRec(14,14,-1,0,16,ch77data);
+
+/* char: 0x4c 'L' */
+
+static final byte[] ch76data = {
+(byte) 0xff,(byte) 0xff,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch76 = new BitmapCharRec(8,14,-1,0,10,ch76data);
+
+/* char: 0x4b 'K' */
+
+static final byte[] ch75data = {
+(byte) 0xc0,(byte) 0x70,(byte) 0xc0,(byte) 0xe0,(byte) 0xc1,(byte) 0xc0,(byte) 0xc3,(byte) 0x80,(byte) 0xc7,(byte) 0x0,(byte) 0xce,(byte) 0x0,(byte) 0xfc,(byte) 0x0,(byte) 0xf8,(byte) 0x0,
+(byte) 0xdc,(byte) 0x0,(byte) 0xce,(byte) 0x0,(byte) 0xc7,(byte) 0x0,(byte) 0xc3,(byte) 0x80,(byte) 0xc1,(byte) 0xc0,(byte) 0xc0,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch75 = new BitmapCharRec(12,14,-1,0,13,ch75data);
+
+/* char: 0x4a 'J' */
+
+static final byte[] ch74data = {
+(byte) 0x3c,(byte) 0x7e,(byte) 0xe7,(byte) 0xc3,(byte) 0xc3,(byte) 0x3,(byte) 0x3,(byte) 0x3,(byte) 0x3,(byte) 0x3,(byte) 0x3,(byte) 0x3,(byte) 0x3,(byte) 0x3,
+};
+
+static final BitmapCharRec ch74 = new BitmapCharRec(8,14,-1,0,10,ch74data);
+
+/* char: 0x49 'I' */
+
+static final byte[] ch73data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch73 = new BitmapCharRec(2,14,-2,0,6,ch73data);
+
+/* char: 0x48 'H' */
+
+static final byte[] ch72data = {
+(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xff,(byte) 0xe0,(byte) 0xff,(byte) 0xe0,
+(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,
+};
+
+static final BitmapCharRec ch72 = new BitmapCharRec(11,14,-1,0,13,ch72data);
+
+/* char: 0x47 'G' */
+
+static final byte[] ch71data = {
+(byte) 0xf,(byte) 0xb0,(byte) 0x3f,(byte) 0xf0,(byte) 0x70,(byte) 0x70,(byte) 0x60,(byte) 0x30,(byte) 0xe0,(byte) 0x30,(byte) 0xc1,(byte) 0xf0,(byte) 0xc1,(byte) 0xf0,(byte) 0xc0,(byte) 0x0,
+(byte) 0xc0,(byte) 0x0,(byte) 0xe0,(byte) 0x30,(byte) 0x60,(byte) 0x30,(byte) 0x70,(byte) 0x70,(byte) 0x3f,(byte) 0xe0,(byte) 0xf,(byte) 0x80,
+};
+
+static final BitmapCharRec ch71 = new BitmapCharRec(12,14,-1,0,14,ch71data);
+
+/* char: 0x46 'F' */
+
+static final byte[] ch70data = {
+(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xff,(byte) 0x0,
+(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,
+};
+
+static final BitmapCharRec ch70 = new BitmapCharRec(9,14,-1,0,11,ch70data);
+
+/* char: 0x45 'E' */
+
+static final byte[] ch69data = {
+(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xff,(byte) 0x0,
+(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,
+};
+
+static final BitmapCharRec ch69 = new BitmapCharRec(9,14,-1,0,11,ch69data);
+
+/* char: 0x44 'D' */
+
+static final byte[] ch68data = {
+(byte) 0xff,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0xc1,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,
+(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xc0,(byte) 0xc1,(byte) 0xc0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x0,
+};
+
+static final BitmapCharRec ch68 = new BitmapCharRec(11,14,-1,0,13,ch68data);
+
+/* char: 0x43 'C' */
+
+static final byte[] ch67data = {
+(byte) 0xf,(byte) 0x80,(byte) 0x3f,(byte) 0xe0,(byte) 0x70,(byte) 0x70,(byte) 0x60,(byte) 0x30,(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,
+(byte) 0xc0,(byte) 0x0,(byte) 0xe0,(byte) 0x0,(byte) 0x60,(byte) 0x30,(byte) 0x70,(byte) 0x70,(byte) 0x3f,(byte) 0xe0,(byte) 0xf,(byte) 0x80,
+};
+
+static final BitmapCharRec ch67 = new BitmapCharRec(12,14,-1,0,14,ch67data);
+
+/* char: 0x42 'B' */
+
+static final byte[] ch66data = {
+(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0xc0,(byte) 0xc0,(byte) 0xe0,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xe0,(byte) 0xff,(byte) 0xc0,(byte) 0xff,(byte) 0x80,
+(byte) 0xc1,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc1,(byte) 0xc0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x0,
+};
+
+static final BitmapCharRec ch66 = new BitmapCharRec(11,14,-1,0,13,ch66data);
+
+/* char: 0x41 'A' */
+
+static final byte[] ch65data = {
+(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x7f,(byte) 0xe0,(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,
+(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0xf,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+};
+
+static final BitmapCharRec ch65 = new BitmapCharRec(12,14,0,0,12,ch65data);
+
+/* char: 0x40 '@' */
+
+static final byte[] ch64data = {
+(byte) 0x7,(byte) 0xe0,(byte) 0x1f,(byte) 0xf0,(byte) 0x38,(byte) 0x0,(byte) 0x70,(byte) 0x0,(byte) 0x67,(byte) 0x70,(byte) 0xcf,(byte) 0xf8,(byte) 0xcc,(byte) 0xcc,(byte) 0xcc,(byte) 0x66,
+(byte) 0xcc,(byte) 0x66,(byte) 0xcc,(byte) 0x63,(byte) 0xc6,(byte) 0x33,(byte) 0x67,(byte) 0x73,(byte) 0x63,(byte) 0xb3,(byte) 0x30,(byte) 0x6,(byte) 0x1c,(byte) 0xe,(byte) 0xf,(byte) 0xfc,
+(byte) 0x3,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch64 = new BitmapCharRec(16,17,-1,3,18,ch64data);
+
+/* char: 0x3f '?' */
+
+static final byte[] ch63data = {
+(byte) 0x30,(byte) 0x30,(byte) 0x0,(byte) 0x0,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x38,(byte) 0x1c,(byte) 0xe,(byte) 0xc6,(byte) 0xc6,(byte) 0xfe,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch63 = new BitmapCharRec(7,14,-1,0,10,ch63data);
+
+/* char: 0x3e '>' */
+
+static final byte[] ch62data = {
+(byte) 0xc0,(byte) 0xf0,(byte) 0x3c,(byte) 0xe,(byte) 0x3,(byte) 0xe,(byte) 0x3c,(byte) 0xf0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch62 = new BitmapCharRec(8,9,-1,0,10,ch62data);
+
+/* char: 0x3d '=' */
+
+static final byte[] ch61data = {
+(byte) 0xfe,(byte) 0xfe,(byte) 0x0,(byte) 0x0,(byte) 0xfe,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch61 = new BitmapCharRec(7,6,-2,-2,11,ch61data);
+
+/* char: 0x3c '<' */
+
+static final byte[] ch60data = {
+(byte) 0x3,(byte) 0xf,(byte) 0x3c,(byte) 0x70,(byte) 0xc0,(byte) 0x70,(byte) 0x3c,(byte) 0xf,(byte) 0x3,
+};
+
+static final BitmapCharRec ch60 = new BitmapCharRec(8,9,-1,0,10,ch60data);
+
+/* char: 0x3b ';' */
+
+static final byte[] ch59data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch59 = new BitmapCharRec(2,13,-1,3,5,ch59data);
+
+/* char: 0x3a ':' */
+
+static final byte[] ch58data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch58 = new BitmapCharRec(2,10,-1,0,5,ch58data);
+
+/* char: 0x39 '9' */
+
+static final byte[] ch57data = {
+(byte) 0x7c,(byte) 0xfe,(byte) 0xc6,(byte) 0x3,(byte) 0x3,(byte) 0x3b,(byte) 0x7f,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc7,(byte) 0x7e,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch57 = new BitmapCharRec(8,13,-1,0,10,ch57data);
+
+/* char: 0x38 '8' */
+
+static final byte[] ch56data = {
+(byte) 0x3c,(byte) 0x7e,(byte) 0xe7,(byte) 0xc3,(byte) 0xc3,(byte) 0x66,(byte) 0x7e,(byte) 0x66,(byte) 0xc3,(byte) 0xc3,(byte) 0xe7,(byte) 0x7e,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch56 = new BitmapCharRec(8,13,-1,0,10,ch56data);
+
+/* char: 0x37 '7' */
+
+static final byte[] ch55data = {
+(byte) 0x60,(byte) 0x60,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x18,(byte) 0x18,(byte) 0xc,(byte) 0xc,(byte) 0x6,(byte) 0x3,(byte) 0xff,(byte) 0xff,
+};
+
+static final BitmapCharRec ch55 = new BitmapCharRec(8,13,-1,0,10,ch55data);
+
+/* char: 0x36 '6' */
+
+static final byte[] ch54data = {
+(byte) 0x3c,(byte) 0x7e,(byte) 0xe3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xfe,(byte) 0xdc,(byte) 0xc0,(byte) 0xc0,(byte) 0x63,(byte) 0x7f,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch54 = new BitmapCharRec(8,13,-1,0,10,ch54data);
+
+/* char: 0x35 '5' */
+
+static final byte[] ch53data = {
+(byte) 0x7c,(byte) 0xfe,(byte) 0xc7,(byte) 0xc3,(byte) 0x3,(byte) 0x3,(byte) 0xc7,(byte) 0xfe,(byte) 0xfc,(byte) 0xc0,(byte) 0xc0,(byte) 0xfe,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch53 = new BitmapCharRec(8,13,-1,0,10,ch53data);
+
+/* char: 0x34 '4' */
+
+static final byte[] ch52data = {
+(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0xc3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x33,(byte) 0x0,
+(byte) 0x33,(byte) 0x0,(byte) 0x1b,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x7,(byte) 0x0,(byte) 0x3,(byte) 0x0,
+};
+
+static final BitmapCharRec ch52 = new BitmapCharRec(9,13,-1,0,10,ch52data);
+
+/* char: 0x33 '3' */
+
+static final byte[] ch51data = {
+(byte) 0x3c,(byte) 0x7e,(byte) 0xc7,(byte) 0xc3,(byte) 0x3,(byte) 0x7,(byte) 0x1e,(byte) 0x1c,(byte) 0x6,(byte) 0xc3,(byte) 0xc3,(byte) 0x7e,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch51 = new BitmapCharRec(8,13,-1,0,10,ch51data);
+
+/* char: 0x32 '2' */
+
+static final byte[] ch50data = {
+(byte) 0xff,(byte) 0xff,(byte) 0xc0,(byte) 0xe0,(byte) 0x70,(byte) 0x38,(byte) 0x1c,(byte) 0xe,(byte) 0x7,(byte) 0x3,(byte) 0xc3,(byte) 0xfe,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch50 = new BitmapCharRec(8,13,-1,0,10,ch50data);
+
+/* char: 0x31 '1' */
+
+static final byte[] ch49data = {
+(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0xf8,(byte) 0xf8,(byte) 0x18,
+};
+
+static final BitmapCharRec ch49 = new BitmapCharRec(5,13,-2,0,10,ch49data);
+
+/* char: 0x30 '0' */
+
+static final byte[] ch48data = {
+(byte) 0x3c,(byte) 0x7e,(byte) 0x66,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0x66,(byte) 0x7e,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch48 = new BitmapCharRec(8,13,-1,0,10,ch48data);
+
+/* char: 0x2f '/' */
+
+static final byte[] ch47data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0x40,(byte) 0x40,(byte) 0x60,(byte) 0x60,(byte) 0x20,(byte) 0x20,(byte) 0x30,(byte) 0x30,(byte) 0x10,(byte) 0x10,(byte) 0x18,(byte) 0x18,
+};
+
+static final BitmapCharRec ch47 = new BitmapCharRec(5,14,0,0,5,ch47data);
+
+/* char: 0x2e '.' */
+
+static final byte[] ch46data = {
+(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch46 = new BitmapCharRec(2,2,-1,0,5,ch46data);
+
+/* char: 0x2d '-' */
+
+static final byte[] ch45data = {
+(byte) 0xff,(byte) 0xff,
+};
+
+static final BitmapCharRec ch45 = new BitmapCharRec(8,2,-1,-4,11,ch45data);
+
+/* char: 0x2c ',' */
+
+static final byte[] ch44data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch44 = new BitmapCharRec(2,5,-1,3,5,ch44data);
+
+/* char: 0x2b '+' */
+
+static final byte[] ch43data = {
+(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0xff,(byte) 0xff,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,
+};
+
+static final BitmapCharRec ch43 = new BitmapCharRec(8,10,-1,0,10,ch43data);
+
+/* char: 0x2a '*' */
+
+static final byte[] ch42data = {
+(byte) 0x88,(byte) 0x70,(byte) 0x70,(byte) 0xf8,(byte) 0x20,(byte) 0x20,
+};
+
+static final BitmapCharRec ch42 = new BitmapCharRec(5,6,-1,-8,7,ch42data);
+
+/* char: 0x29 ')' */
+
+static final byte[] ch41data = {
+(byte) 0x80,(byte) 0xc0,(byte) 0x60,(byte) 0x60,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x60,(byte) 0x60,
+(byte) 0xc0,(byte) 0x80,
+};
+
+static final BitmapCharRec ch41 = new BitmapCharRec(4,18,-1,4,6,ch41data);
+
+/* char: 0x28 '(' */
+
+static final byte[] ch40data = {
+(byte) 0x10,(byte) 0x30,(byte) 0x60,(byte) 0x60,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x60,(byte) 0x60,
+(byte) 0x30,(byte) 0x10,
+};
+
+static final BitmapCharRec ch40 = new BitmapCharRec(4,18,-1,4,6,ch40data);
+
+/* char: 0x27 ''' */
+
+static final byte[] ch39data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch39 = new BitmapCharRec(2,5,-1,-9,4,ch39data);
+
+/* char: 0x26 '&' */
+
+static final byte[] ch38data = {
+(byte) 0x3c,(byte) 0x70,(byte) 0x7e,(byte) 0xe0,(byte) 0xe7,(byte) 0xc0,(byte) 0xc3,(byte) 0x80,(byte) 0xc3,(byte) 0xc0,(byte) 0xc6,(byte) 0xc0,(byte) 0xee,(byte) 0xc0,(byte) 0x7c,(byte) 0x0,
+(byte) 0x3c,(byte) 0x0,(byte) 0x66,(byte) 0x0,(byte) 0x66,(byte) 0x0,(byte) 0x7e,(byte) 0x0,(byte) 0x3c,(byte) 0x0,
+};
+
+static final BitmapCharRec ch38 = new BitmapCharRec(12,13,-1,0,13,ch38data);
+
+/* char: 0x25 '%' */
+
+static final byte[] ch37data = {
+(byte) 0x18,(byte) 0x78,(byte) 0x18,(byte) 0xfc,(byte) 0xc,(byte) 0xcc,(byte) 0xc,(byte) 0xcc,(byte) 0x6,(byte) 0xfc,(byte) 0x6,(byte) 0x78,(byte) 0x3,(byte) 0x0,(byte) 0x7b,(byte) 0x0,
+(byte) 0xfd,(byte) 0x80,(byte) 0xcd,(byte) 0x80,(byte) 0xcc,(byte) 0xc0,(byte) 0xfc,(byte) 0xc0,(byte) 0x78,(byte) 0x60,
+};
+
+static final BitmapCharRec ch37 = new BitmapCharRec(14,13,-1,0,16,ch37data);
+
+/* char: 0x24 '$' */
+
+static final byte[] ch36data = {
+(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0xeb,(byte) 0x80,(byte) 0xc9,(byte) 0x80,(byte) 0x9,(byte) 0x80,(byte) 0xf,(byte) 0x0,
+(byte) 0x3e,(byte) 0x0,(byte) 0x78,(byte) 0x0,(byte) 0xe8,(byte) 0x0,(byte) 0xc8,(byte) 0x0,(byte) 0xcb,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x8,(byte) 0x0,
+};
+
+static final BitmapCharRec ch36 = new BitmapCharRec(9,16,-1,2,10,ch36data);
+
+/* char: 0x23 '#' */
+
+static final byte[] ch35data = {
+(byte) 0x24,(byte) 0x0,(byte) 0x24,(byte) 0x0,(byte) 0x24,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0x12,(byte) 0x0,(byte) 0x12,(byte) 0x0,(byte) 0x12,(byte) 0x0,
+(byte) 0x7f,(byte) 0xc0,(byte) 0x7f,(byte) 0xc0,(byte) 0x9,(byte) 0x0,(byte) 0x9,(byte) 0x0,(byte) 0x9,(byte) 0x0,
+};
+
+static final BitmapCharRec ch35 = new BitmapCharRec(10,13,0,0,10,ch35data);
+
+/* char: 0x22 '"' */
+
+static final byte[] ch34data = {
+(byte) 0x90,(byte) 0x90,(byte) 0xd8,(byte) 0xd8,(byte) 0xd8,
+};
+
+static final BitmapCharRec ch34 = new BitmapCharRec(5,5,0,-9,5,ch34data);
+
+/* char: 0x21 '!' */
+
+static final byte[] ch33data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x80,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch33 = new BitmapCharRec(2,14,-2,0,6,ch33data);
+
+/* char: 0x20 ' ' */
+
+static final BitmapCharRec ch32 = new BitmapCharRec(0,0,0,0,5,null);
+
+static final BitmapCharRec[] chars = {
+ch32,
+ch33,
+ch34,
+ch35,
+ch36,
+ch37,
+ch38,
+ch39,
+ch40,
+ch41,
+ch42,
+ch43,
+ch44,
+ch45,
+ch46,
+ch47,
+ch48,
+ch49,
+ch50,
+ch51,
+ch52,
+ch53,
+ch54,
+ch55,
+ch56,
+ch57,
+ch58,
+ch59,
+ch60,
+ch61,
+ch62,
+ch63,
+ch64,
+ch65,
+ch66,
+ch67,
+ch68,
+ch69,
+ch70,
+ch71,
+ch72,
+ch73,
+ch74,
+ch75,
+ch76,
+ch77,
+ch78,
+ch79,
+ch80,
+ch81,
+ch82,
+ch83,
+ch84,
+ch85,
+ch86,
+ch87,
+ch88,
+ch89,
+ch90,
+ch91,
+ch92,
+ch93,
+ch94,
+ch95,
+ch96,
+ch97,
+ch98,
+ch99,
+ch100,
+ch101,
+ch102,
+ch103,
+ch104,
+ch105,
+ch106,
+ch107,
+ch108,
+ch109,
+ch110,
+ch111,
+ch112,
+ch113,
+ch114,
+ch115,
+ch116,
+ch117,
+ch118,
+ch119,
+ch120,
+ch121,
+ch122,
+ch123,
+ch124,
+ch125,
+ch126,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+ch160,
+ch161,
+ch162,
+ch163,
+ch164,
+ch165,
+ch166,
+ch167,
+ch168,
+ch169,
+ch170,
+ch171,
+ch172,
+ch173,
+ch174,
+ch175,
+ch176,
+ch177,
+ch178,
+ch179,
+ch180,
+ch181,
+ch182,
+ch183,
+ch184,
+ch185,
+ch186,
+ch187,
+ch188,
+ch189,
+ch190,
+ch191,
+ch192,
+ch193,
+ch194,
+ch195,
+ch196,
+ch197,
+ch198,
+ch199,
+ch200,
+ch201,
+ch202,
+ch203,
+ch204,
+ch205,
+ch206,
+ch207,
+ch208,
+ch209,
+ch210,
+ch211,
+ch212,
+ch213,
+ch214,
+ch215,
+ch216,
+ch217,
+ch218,
+ch219,
+ch220,
+ch221,
+ch222,
+ch223,
+ch224,
+ch225,
+ch226,
+ch227,
+ch228,
+ch229,
+ch230,
+ch231,
+ch232,
+ch233,
+ch234,
+ch235,
+ch236,
+ch237,
+ch238,
+ch239,
+ch240,
+ch241,
+ch242,
+ch243,
+ch244,
+ch245,
+ch246,
+ch247,
+ch248,
+ch249,
+ch250,
+ch251,
+ch252,
+ch253,
+ch254,
+ch255,
+};
+
+ public static final BitmapFontRec glutBitmapHelvetica18 = new BitmapFontRec("-adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1",
+ 224,
+ 32,
+ chars);
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTBitmapTimesRoman10.java b/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTBitmapTimesRoman10.java
new file mode 100644
index 000000000..f753b56f7
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTBitmapTimesRoman10.java
@@ -0,0 +1,1797 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.util.gl2;
+
+class GLUTBitmapTimesRoman10 {
+
+/* GENERATED FILE -- DO NOT MODIFY */
+
+/* char: 0xff */
+
+static final byte[] ch255data = {
+(byte) 0x80,(byte) 0xc0,(byte) 0x40,(byte) 0x60,(byte) 0xa0,(byte) 0x90,(byte) 0xb8,(byte) 0x0,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch255 = new BitmapCharRec(5,9,0,2,5,ch255data);
+
+/* char: 0xfe */
+
+static final byte[] ch254data = {
+(byte) 0xc0,(byte) 0x80,(byte) 0xe0,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0xe0,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch254 = new BitmapCharRec(4,9,0,2,5,ch254data);
+
+/* char: 0xfd */
+
+static final byte[] ch253data = {
+(byte) 0x80,(byte) 0xc0,(byte) 0x40,(byte) 0x60,(byte) 0xa0,(byte) 0x90,(byte) 0xb8,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch253 = new BitmapCharRec(5,10,0,2,5,ch253data);
+
+/* char: 0xfc */
+
+static final byte[] ch252data = {
+(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch252 = new BitmapCharRec(5,7,0,0,5,ch252data);
+
+/* char: 0xfb */
+
+static final byte[] ch251data = {
+(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x0,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch251 = new BitmapCharRec(5,8,0,0,5,ch251data);
+
+/* char: 0xfa */
+
+static final byte[] ch250data = {
+(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x0,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch250 = new BitmapCharRec(5,8,0,0,5,ch250data);
+
+/* char: 0xf9 */
+
+static final byte[] ch249data = {
+(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x0,(byte) 0x20,(byte) 0x40,
+};
+
+static final BitmapCharRec ch249 = new BitmapCharRec(5,8,0,0,5,ch249data);
+
+/* char: 0xf8 */
+
+static final byte[] ch248data = {
+(byte) 0x80,(byte) 0x70,(byte) 0x48,(byte) 0x48,(byte) 0x48,(byte) 0x38,(byte) 0x4,
+};
+
+static final BitmapCharRec ch248 = new BitmapCharRec(6,7,1,1,5,ch248data);
+
+/* char: 0xf7 */
+
+static final byte[] ch247data = {
+(byte) 0x20,(byte) 0x0,(byte) 0xf8,(byte) 0x0,(byte) 0x20,
+};
+
+static final BitmapCharRec ch247 = new BitmapCharRec(5,5,0,0,6,ch247data);
+
+/* char: 0xf6 */
+
+static final byte[] ch246data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x60,(byte) 0x0,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch246 = new BitmapCharRec(4,7,0,0,5,ch246data);
+
+/* char: 0xf5 */
+
+static final byte[] ch245data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x60,(byte) 0x0,(byte) 0xa0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch245 = new BitmapCharRec(4,8,0,0,5,ch245data);
+
+/* char: 0xf4 */
+
+static final byte[] ch244data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x60,(byte) 0x0,(byte) 0xa0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch244 = new BitmapCharRec(4,8,0,0,5,ch244data);
+
+/* char: 0xf3 */
+
+static final byte[] ch243data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x60,(byte) 0x0,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch243 = new BitmapCharRec(4,8,0,0,5,ch243data);
+
+/* char: 0xf2 */
+
+static final byte[] ch242data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x60,(byte) 0x0,(byte) 0x20,(byte) 0x40,
+};
+
+static final BitmapCharRec ch242 = new BitmapCharRec(4,8,0,0,5,ch242data);
+
+/* char: 0xf1 */
+
+static final byte[] ch241data = {
+(byte) 0xd8,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0xe0,(byte) 0x0,(byte) 0xa0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch241 = new BitmapCharRec(5,8,0,0,5,ch241data);
+
+/* char: 0xf0 */
+
+static final byte[] ch240data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x70,(byte) 0xa0,(byte) 0x70,(byte) 0x40,
+};
+
+static final BitmapCharRec ch240 = new BitmapCharRec(4,8,0,0,5,ch240data);
+
+/* char: 0xef */
+
+static final byte[] ch239data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x0,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch239 = new BitmapCharRec(3,7,0,0,4,ch239data);
+
+/* char: 0xee */
+
+static final byte[] ch238data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x0,(byte) 0xa0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch238 = new BitmapCharRec(3,8,0,0,4,ch238data);
+
+/* char: 0xed */
+
+static final byte[] ch237data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x0,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch237 = new BitmapCharRec(3,8,0,0,4,ch237data);
+
+/* char: 0xec */
+
+static final byte[] ch236data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x0,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch236 = new BitmapCharRec(3,8,0,0,4,ch236data);
+
+/* char: 0xeb */
+
+static final byte[] ch235data = {
+(byte) 0x60,(byte) 0x80,(byte) 0xc0,(byte) 0xa0,(byte) 0x60,(byte) 0x0,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch235 = new BitmapCharRec(3,7,0,0,4,ch235data);
+
+/* char: 0xea */
+
+static final byte[] ch234data = {
+(byte) 0x60,(byte) 0x80,(byte) 0xc0,(byte) 0xa0,(byte) 0x60,(byte) 0x0,(byte) 0xa0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch234 = new BitmapCharRec(3,8,0,0,4,ch234data);
+
+/* char: 0xe9 */
+
+static final byte[] ch233data = {
+(byte) 0x60,(byte) 0x80,(byte) 0xc0,(byte) 0xa0,(byte) 0x60,(byte) 0x0,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch233 = new BitmapCharRec(3,8,0,0,4,ch233data);
+
+/* char: 0xe8 */
+
+static final byte[] ch232data = {
+(byte) 0x60,(byte) 0x80,(byte) 0xc0,(byte) 0xa0,(byte) 0x60,(byte) 0x0,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch232 = new BitmapCharRec(3,8,0,0,4,ch232data);
+
+/* char: 0xe7 */
+
+static final byte[] ch231data = {
+(byte) 0xc0,(byte) 0x20,(byte) 0x40,(byte) 0x60,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x60,
+};
+
+static final BitmapCharRec ch231 = new BitmapCharRec(3,8,0,3,4,ch231data);
+
+/* char: 0xe6 */
+
+static final byte[] ch230data = {
+(byte) 0xd8,(byte) 0xa0,(byte) 0x70,(byte) 0x28,(byte) 0xd8,
+};
+
+static final BitmapCharRec ch230 = new BitmapCharRec(5,5,0,0,6,ch230data);
+
+/* char: 0xe5 */
+
+static final byte[] ch229data = {
+(byte) 0xe0,(byte) 0xa0,(byte) 0x60,(byte) 0x20,(byte) 0xc0,(byte) 0x40,(byte) 0xa0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch229 = new BitmapCharRec(3,8,0,0,4,ch229data);
+
+/* char: 0xe4 */
+
+static final byte[] ch228data = {
+(byte) 0xe0,(byte) 0xa0,(byte) 0x60,(byte) 0x20,(byte) 0xc0,(byte) 0x0,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch228 = new BitmapCharRec(3,7,0,0,4,ch228data);
+
+/* char: 0xe3 */
+
+static final byte[] ch227data = {
+(byte) 0xe0,(byte) 0xa0,(byte) 0x60,(byte) 0x20,(byte) 0xc0,(byte) 0x0,(byte) 0xa0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch227 = new BitmapCharRec(4,8,0,0,4,ch227data);
+
+/* char: 0xe2 */
+
+static final byte[] ch226data = {
+(byte) 0xe0,(byte) 0xa0,(byte) 0x60,(byte) 0x20,(byte) 0xc0,(byte) 0x0,(byte) 0xa0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch226 = new BitmapCharRec(3,8,0,0,4,ch226data);
+
+/* char: 0xe1 */
+
+static final byte[] ch225data = {
+(byte) 0xe0,(byte) 0xa0,(byte) 0x60,(byte) 0x20,(byte) 0xc0,(byte) 0x0,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch225 = new BitmapCharRec(3,8,0,0,4,ch225data);
+
+/* char: 0xe0 */
+
+static final byte[] ch224data = {
+(byte) 0xe0,(byte) 0xa0,(byte) 0x60,(byte) 0x20,(byte) 0xc0,(byte) 0x0,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch224 = new BitmapCharRec(3,8,0,0,4,ch224data);
+
+/* char: 0xdf */
+
+static final byte[] ch223data = {
+(byte) 0xe0,(byte) 0x50,(byte) 0x50,(byte) 0x60,(byte) 0x50,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch223 = new BitmapCharRec(4,7,0,0,5,ch223data);
+
+/* char: 0xde */
+
+static final byte[] ch222data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x70,(byte) 0x48,(byte) 0x70,(byte) 0x40,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch222 = new BitmapCharRec(5,7,0,0,6,ch222data);
+
+/* char: 0xdd */
+
+static final byte[] ch221data = {
+(byte) 0x38,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x28,(byte) 0x44,(byte) 0xee,(byte) 0x0,(byte) 0x10,(byte) 0x8,
+};
+
+static final BitmapCharRec ch221 = new BitmapCharRec(7,10,0,0,8,ch221data);
+
+/* char: 0xdc */
+
+static final byte[] ch220data = {
+(byte) 0x38,(byte) 0x6c,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0xee,(byte) 0x0,(byte) 0x28,
+};
+
+static final BitmapCharRec ch220 = new BitmapCharRec(7,9,0,0,8,ch220data);
+
+/* char: 0xdb */
+
+static final byte[] ch219data = {
+(byte) 0x38,(byte) 0x6c,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0xee,(byte) 0x0,(byte) 0x28,(byte) 0x10,
+};
+
+static final BitmapCharRec ch219 = new BitmapCharRec(7,10,0,0,8,ch219data);
+
+/* char: 0xda */
+
+static final byte[] ch218data = {
+(byte) 0x38,(byte) 0x6c,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0xee,(byte) 0x0,(byte) 0x10,(byte) 0x8,
+};
+
+static final BitmapCharRec ch218 = new BitmapCharRec(7,10,0,0,8,ch218data);
+
+/* char: 0xd9 */
+
+static final byte[] ch217data = {
+(byte) 0x38,(byte) 0x6c,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0xee,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch217 = new BitmapCharRec(7,10,0,0,8,ch217data);
+
+/* char: 0xd8 */
+
+static final byte[] ch216data = {
+(byte) 0x80,(byte) 0x7c,(byte) 0x66,(byte) 0x52,(byte) 0x52,(byte) 0x4a,(byte) 0x66,(byte) 0x3e,(byte) 0x1,
+};
+
+static final BitmapCharRec ch216 = new BitmapCharRec(8,9,0,1,8,ch216data);
+
+/* char: 0xd7 */
+
+static final byte[] ch215data = {
+(byte) 0x88,(byte) 0x50,(byte) 0x20,(byte) 0x50,(byte) 0x88,
+};
+
+static final BitmapCharRec ch215 = new BitmapCharRec(5,5,0,0,6,ch215data);
+
+/* char: 0xd6 */
+
+static final byte[] ch214data = {
+(byte) 0x78,(byte) 0xcc,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xcc,(byte) 0x78,(byte) 0x0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch214 = new BitmapCharRec(6,9,0,0,7,ch214data);
+
+/* char: 0xd5 */
+
+static final byte[] ch213data = {
+(byte) 0x78,(byte) 0xcc,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xcc,(byte) 0x78,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch213 = new BitmapCharRec(6,10,0,0,7,ch213data);
+
+/* char: 0xd4 */
+
+static final byte[] ch212data = {
+(byte) 0x78,(byte) 0xcc,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xcc,(byte) 0x78,(byte) 0x0,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch212 = new BitmapCharRec(6,10,0,0,7,ch212data);
+
+/* char: 0xd3 */
+
+static final byte[] ch211data = {
+(byte) 0x78,(byte) 0xcc,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xcc,(byte) 0x78,(byte) 0x0,(byte) 0x10,(byte) 0x8,
+};
+
+static final BitmapCharRec ch211 = new BitmapCharRec(6,10,0,0,7,ch211data);
+
+/* char: 0xd2 */
+
+static final byte[] ch210data = {
+(byte) 0x78,(byte) 0xcc,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xcc,(byte) 0x78,(byte) 0x0,(byte) 0x20,(byte) 0x40,
+};
+
+static final BitmapCharRec ch210 = new BitmapCharRec(6,10,0,0,7,ch210data);
+
+/* char: 0xd1 */
+
+static final byte[] ch209data = {
+(byte) 0xe4,(byte) 0x4c,(byte) 0x4c,(byte) 0x54,(byte) 0x54,(byte) 0x64,(byte) 0xee,(byte) 0x0,(byte) 0x50,(byte) 0x28,
+};
+
+static final BitmapCharRec ch209 = new BitmapCharRec(7,10,0,0,8,ch209data);
+
+/* char: 0xd0 */
+
+static final byte[] ch208data = {
+(byte) 0xf8,(byte) 0x4c,(byte) 0x44,(byte) 0xe4,(byte) 0x44,(byte) 0x4c,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch208 = new BitmapCharRec(6,7,0,0,7,ch208data);
+
+/* char: 0xcf */
+
+static final byte[] ch207data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,(byte) 0x0,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch207 = new BitmapCharRec(3,9,0,0,4,ch207data);
+
+/* char: 0xce */
+
+static final byte[] ch206data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,(byte) 0x0,(byte) 0xa0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch206 = new BitmapCharRec(3,10,0,0,4,ch206data);
+
+/* char: 0xcd */
+
+static final byte[] ch205data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,(byte) 0x0,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch205 = new BitmapCharRec(3,10,0,0,4,ch205data);
+
+/* char: 0xcc */
+
+static final byte[] ch204data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,(byte) 0x0,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch204 = new BitmapCharRec(3,10,0,0,4,ch204data);
+
+/* char: 0xcb */
+
+static final byte[] ch203data = {
+(byte) 0xf8,(byte) 0x48,(byte) 0x40,(byte) 0x70,(byte) 0x40,(byte) 0x48,(byte) 0xf8,(byte) 0x0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch203 = new BitmapCharRec(5,9,0,0,6,ch203data);
+
+/* char: 0xca */
+
+static final byte[] ch202data = {
+(byte) 0xf8,(byte) 0x48,(byte) 0x40,(byte) 0x70,(byte) 0x40,(byte) 0x48,(byte) 0xf8,(byte) 0x0,(byte) 0x50,(byte) 0x20,
+};
+
+static final BitmapCharRec ch202 = new BitmapCharRec(5,10,0,0,6,ch202data);
+
+/* char: 0xc9 */
+
+static final byte[] ch201data = {
+(byte) 0xf8,(byte) 0x48,(byte) 0x40,(byte) 0x70,(byte) 0x40,(byte) 0x48,(byte) 0xf8,(byte) 0x0,(byte) 0x20,(byte) 0x10,
+};
+
+static final BitmapCharRec ch201 = new BitmapCharRec(5,10,0,0,6,ch201data);
+
+/* char: 0xc8 */
+
+static final byte[] ch200data = {
+(byte) 0xf8,(byte) 0x48,(byte) 0x40,(byte) 0x70,(byte) 0x40,(byte) 0x48,(byte) 0xf8,(byte) 0x0,(byte) 0x20,(byte) 0x40,
+};
+
+static final BitmapCharRec ch200 = new BitmapCharRec(5,10,0,0,6,ch200data);
+
+/* char: 0xc7 */
+
+static final byte[] ch199data = {
+(byte) 0x60,(byte) 0x10,(byte) 0x20,(byte) 0x78,(byte) 0xc4,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xc4,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch199 = new BitmapCharRec(6,10,0,3,7,ch199data);
+
+/* char: 0xc6 */
+
+static final byte[] ch198data = {
+(byte) 0xef,(byte) 0x49,(byte) 0x78,(byte) 0x2e,(byte) 0x28,(byte) 0x39,(byte) 0x1f,
+};
+
+static final BitmapCharRec ch198 = new BitmapCharRec(8,7,0,0,9,ch198data);
+
+/* char: 0xc5 */
+
+static final byte[] ch197data = {
+(byte) 0xee,(byte) 0x44,(byte) 0x7c,(byte) 0x28,(byte) 0x28,(byte) 0x38,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x10,
+};
+
+static final BitmapCharRec ch197 = new BitmapCharRec(7,10,0,0,8,ch197data);
+
+/* char: 0xc4 */
+
+static final byte[] ch196data = {
+(byte) 0xee,(byte) 0x44,(byte) 0x7c,(byte) 0x28,(byte) 0x28,(byte) 0x38,(byte) 0x10,(byte) 0x0,(byte) 0x28,
+};
+
+static final BitmapCharRec ch196 = new BitmapCharRec(7,9,0,0,8,ch196data);
+
+/* char: 0xc3 */
+
+static final byte[] ch195data = {
+(byte) 0xee,(byte) 0x44,(byte) 0x7c,(byte) 0x28,(byte) 0x28,(byte) 0x38,(byte) 0x10,(byte) 0x0,(byte) 0x28,(byte) 0x14,
+};
+
+static final BitmapCharRec ch195 = new BitmapCharRec(7,10,0,0,8,ch195data);
+
+/* char: 0xc2 */
+
+static final byte[] ch194data = {
+(byte) 0xee,(byte) 0x44,(byte) 0x7c,(byte) 0x28,(byte) 0x28,(byte) 0x38,(byte) 0x10,(byte) 0x0,(byte) 0x28,(byte) 0x10,
+};
+
+static final BitmapCharRec ch194 = new BitmapCharRec(7,10,0,0,8,ch194data);
+
+/* char: 0xc1 */
+
+static final byte[] ch193data = {
+(byte) 0xee,(byte) 0x44,(byte) 0x7c,(byte) 0x28,(byte) 0x28,(byte) 0x38,(byte) 0x10,(byte) 0x0,(byte) 0x10,(byte) 0x8,
+};
+
+static final BitmapCharRec ch193 = new BitmapCharRec(7,10,0,0,8,ch193data);
+
+/* char: 0xc0 */
+
+static final byte[] ch192data = {
+(byte) 0xee,(byte) 0x44,(byte) 0x7c,(byte) 0x28,(byte) 0x28,(byte) 0x38,(byte) 0x10,(byte) 0x0,(byte) 0x10,(byte) 0x20,
+};
+
+static final BitmapCharRec ch192 = new BitmapCharRec(7,10,0,0,8,ch192data);
+
+/* char: 0xbf */
+
+static final byte[] ch191data = {
+(byte) 0xe0,(byte) 0xa0,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch191 = new BitmapCharRec(3,7,0,2,4,ch191data);
+
+/* char: 0xbe */
+
+static final byte[] ch190data = {
+(byte) 0x44,(byte) 0x3e,(byte) 0x2c,(byte) 0xd4,(byte) 0x28,(byte) 0x48,(byte) 0xe4,
+};
+
+static final BitmapCharRec ch190 = new BitmapCharRec(7,7,0,0,8,ch190data);
+
+/* char: 0xbd */
+
+static final byte[] ch189data = {
+(byte) 0x4e,(byte) 0x24,(byte) 0x2a,(byte) 0xf6,(byte) 0x48,(byte) 0xc8,(byte) 0x44,
+};
+
+static final BitmapCharRec ch189 = new BitmapCharRec(7,7,0,0,8,ch189data);
+
+/* char: 0xbc */
+
+static final byte[] ch188data = {
+(byte) 0x44,(byte) 0x3e,(byte) 0x2c,(byte) 0xf4,(byte) 0x48,(byte) 0xc8,(byte) 0x44,
+};
+
+static final BitmapCharRec ch188 = new BitmapCharRec(7,7,0,0,8,ch188data);
+
+/* char: 0xbb */
+
+static final byte[] ch187data = {
+(byte) 0xa0,(byte) 0x50,(byte) 0x50,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch187 = new BitmapCharRec(4,4,0,-1,5,ch187data);
+
+/* char: 0xba */
+
+static final byte[] ch186data = {
+(byte) 0xe0,(byte) 0x0,(byte) 0x40,(byte) 0xa0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch186 = new BitmapCharRec(3,5,0,-2,4,ch186data);
+
+/* char: 0xb9 */
+
+static final byte[] ch185data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0xc0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch185 = new BitmapCharRec(3,4,0,-3,3,ch185data);
+
+/* char: 0xb8 */
+
+static final byte[] ch184data = {
+(byte) 0xc0,(byte) 0x20,(byte) 0x40,
+};
+
+static final BitmapCharRec ch184 = new BitmapCharRec(3,3,0,3,4,ch184data);
+
+/* char: 0xb7 */
+
+static final byte[] ch183data = {
+(byte) 0x80,
+};
+
+static final BitmapCharRec ch183 = new BitmapCharRec(1,1,0,-2,2,ch183data);
+
+/* char: 0xb6 */
+
+static final byte[] ch182data = {
+(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x68,(byte) 0xe8,(byte) 0xe8,(byte) 0xe8,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch182 = new BitmapCharRec(6,9,0,2,6,ch182data);
+
+/* char: 0xb5 */
+
+static final byte[] ch181data = {
+(byte) 0x80,(byte) 0x80,(byte) 0xe8,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,
+};
+
+static final BitmapCharRec ch181 = new BitmapCharRec(5,7,0,2,5,ch181data);
+
+/* char: 0xb4 */
+
+static final byte[] ch180data = {
+(byte) 0x80,(byte) 0x40,
+};
+
+static final BitmapCharRec ch180 = new BitmapCharRec(2,2,0,-5,3,ch180data);
+
+/* char: 0xb3 */
+
+static final byte[] ch179data = {
+(byte) 0xc0,(byte) 0x20,(byte) 0x40,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch179 = new BitmapCharRec(3,4,0,-3,3,ch179data);
+
+/* char: 0xb2 */
+
+static final byte[] ch178data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0xa0,(byte) 0x60,
+};
+
+static final BitmapCharRec ch178 = new BitmapCharRec(3,4,0,-3,3,ch178data);
+
+/* char: 0xb1 */
+
+static final byte[] ch177data = {
+(byte) 0xf8,(byte) 0x0,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x20,
+};
+
+static final BitmapCharRec ch177 = new BitmapCharRec(5,7,0,0,6,ch177data);
+
+/* char: 0xb0 */
+
+static final byte[] ch176data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch176 = new BitmapCharRec(4,4,0,-3,4,ch176data);
+
+/* char: 0xaf */
+
+static final byte[] ch175data = {
+(byte) 0xe0,
+};
+
+static final BitmapCharRec ch175 = new BitmapCharRec(3,1,0,-6,4,ch175data);
+
+/* char: 0xae */
+
+static final byte[] ch174data = {
+(byte) 0x38,(byte) 0x44,(byte) 0xaa,(byte) 0xb2,(byte) 0xba,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch174 = new BitmapCharRec(7,7,-1,0,9,ch174data);
+
+/* char: 0xad */
+
+static final byte[] ch173data = {
+(byte) 0xe0,
+};
+
+static final BitmapCharRec ch173 = new BitmapCharRec(3,1,0,-2,4,ch173data);
+
+/* char: 0xac */
+
+static final byte[] ch172data = {
+(byte) 0x8,(byte) 0x8,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch172 = new BitmapCharRec(5,3,-1,-1,7,ch172data);
+
+/* char: 0xab */
+
+static final byte[] ch171data = {
+(byte) 0x50,(byte) 0xa0,(byte) 0xa0,(byte) 0x50,
+};
+
+static final BitmapCharRec ch171 = new BitmapCharRec(4,4,0,-1,5,ch171data);
+
+/* char: 0xaa */
+
+static final byte[] ch170data = {
+(byte) 0xe0,(byte) 0x0,(byte) 0xa0,(byte) 0x20,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch170 = new BitmapCharRec(3,5,0,-2,4,ch170data);
+
+/* char: 0xa9 */
+
+static final byte[] ch169data = {
+(byte) 0x38,(byte) 0x44,(byte) 0x9a,(byte) 0xa2,(byte) 0x9a,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch169 = new BitmapCharRec(7,7,-1,0,9,ch169data);
+
+/* char: 0xa8 */
+
+static final byte[] ch168data = {
+(byte) 0xa0,
+};
+
+static final BitmapCharRec ch168 = new BitmapCharRec(3,1,-1,-6,5,ch168data);
+
+/* char: 0xa7 */
+
+static final byte[] ch167data = {
+(byte) 0xe0,(byte) 0x90,(byte) 0x20,(byte) 0x50,(byte) 0x90,(byte) 0xa0,(byte) 0x40,(byte) 0x90,(byte) 0x70,
+};
+
+static final BitmapCharRec ch167 = new BitmapCharRec(4,9,0,1,5,ch167data);
+
+/* char: 0xa6 */
+
+static final byte[] ch166data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch166 = new BitmapCharRec(1,7,0,0,2,ch166data);
+
+/* char: 0xa5 */
+
+static final byte[] ch165data = {
+(byte) 0x70,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0xd8,(byte) 0x50,(byte) 0x88,
+};
+
+static final BitmapCharRec ch165 = new BitmapCharRec(5,7,0,0,5,ch165data);
+
+/* char: 0xa4 */
+
+static final byte[] ch164data = {
+(byte) 0x88,(byte) 0x70,(byte) 0x50,(byte) 0x50,(byte) 0x70,(byte) 0x88,
+};
+
+static final BitmapCharRec ch164 = new BitmapCharRec(5,6,0,-1,5,ch164data);
+
+/* char: 0xa3 */
+
+static final byte[] ch163data = {
+(byte) 0xf0,(byte) 0xc8,(byte) 0x40,(byte) 0xe0,(byte) 0x40,(byte) 0x50,(byte) 0x30,
+};
+
+static final BitmapCharRec ch163 = new BitmapCharRec(5,7,0,0,5,ch163data);
+
+/* char: 0xa2 */
+
+static final byte[] ch162data = {
+(byte) 0x80,(byte) 0xe0,(byte) 0x90,(byte) 0x80,(byte) 0x90,(byte) 0x70,(byte) 0x10,
+};
+
+static final BitmapCharRec ch162 = new BitmapCharRec(4,7,0,1,5,ch162data);
+
+/* char: 0xa1 */
+
+static final byte[] ch161data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,
+};
+
+static final BitmapCharRec ch161 = new BitmapCharRec(1,7,-1,2,3,ch161data);
+
+/* char: 0xa0 */
+
+static final BitmapCharRec ch160 = new BitmapCharRec(0,0,0,0,2,null);
+
+/* char: 0x7e '~' */
+
+static final byte[] ch126data = {
+(byte) 0x98,(byte) 0x64,
+};
+
+static final BitmapCharRec ch126 = new BitmapCharRec(6,2,0,-2,7,ch126data);
+
+/* char: 0x7d '}' */
+
+static final byte[] ch125data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch125 = new BitmapCharRec(3,9,0,2,4,ch125data);
+
+/* char: 0x7c '|' */
+
+static final byte[] ch124data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch124 = new BitmapCharRec(1,9,0,2,2,ch124data);
+
+/* char: 0x7b '{' */
+
+static final byte[] ch123data = {
+(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch123 = new BitmapCharRec(3,9,0,2,4,ch123data);
+
+/* char: 0x7a 'z' */
+
+static final byte[] ch122data = {
+(byte) 0xf0,(byte) 0x90,(byte) 0x40,(byte) 0x20,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch122 = new BitmapCharRec(4,5,0,0,5,ch122data);
+
+/* char: 0x79 'y' */
+
+static final byte[] ch121data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x30,(byte) 0x50,(byte) 0x48,(byte) 0xdc,
+};
+
+static final BitmapCharRec ch121 = new BitmapCharRec(6,7,1,2,5,ch121data);
+
+/* char: 0x78 'x' */
+
+static final byte[] ch120data = {
+(byte) 0xd8,(byte) 0x50,(byte) 0x20,(byte) 0x50,(byte) 0xd8,
+};
+
+static final BitmapCharRec ch120 = new BitmapCharRec(5,5,0,0,6,ch120data);
+
+/* char: 0x77 'w' */
+
+static final byte[] ch119data = {
+(byte) 0x28,(byte) 0x6c,(byte) 0x54,(byte) 0x92,(byte) 0xdb,
+};
+
+static final BitmapCharRec ch119 = new BitmapCharRec(8,5,0,0,8,ch119data);
+
+/* char: 0x76 'v' */
+
+static final byte[] ch118data = {
+(byte) 0x20,(byte) 0x60,(byte) 0x50,(byte) 0x90,(byte) 0xd8,
+};
+
+static final BitmapCharRec ch118 = new BitmapCharRec(5,5,0,0,5,ch118data);
+
+/* char: 0x75 'u' */
+
+static final byte[] ch117data = {
+(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,
+};
+
+static final BitmapCharRec ch117 = new BitmapCharRec(5,5,0,0,5,ch117data);
+
+/* char: 0x74 't' */
+
+static final byte[] ch116data = {
+(byte) 0x30,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch116 = new BitmapCharRec(4,6,0,0,4,ch116data);
+
+/* char: 0x73 's' */
+
+static final byte[] ch115data = {
+(byte) 0xe0,(byte) 0x20,(byte) 0x60,(byte) 0x80,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch115 = new BitmapCharRec(3,5,0,0,4,ch115data);
+
+/* char: 0x72 'r' */
+
+static final byte[] ch114data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x60,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch114 = new BitmapCharRec(3,5,0,0,4,ch114data);
+
+/* char: 0x71 'q' */
+
+static final byte[] ch113data = {
+(byte) 0x38,(byte) 0x10,(byte) 0x70,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x70,
+};
+
+static final BitmapCharRec ch113 = new BitmapCharRec(5,7,0,2,5,ch113data);
+
+/* char: 0x70 'p' */
+
+static final byte[] ch112data = {
+(byte) 0xc0,(byte) 0x80,(byte) 0xe0,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch112 = new BitmapCharRec(4,7,0,2,5,ch112data);
+
+/* char: 0x6f 'o' */
+
+static final byte[] ch111data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch111 = new BitmapCharRec(4,5,0,0,5,ch111data);
+
+/* char: 0x6e 'n' */
+
+static final byte[] ch110data = {
+(byte) 0xd8,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch110 = new BitmapCharRec(5,5,0,0,5,ch110data);
+
+/* char: 0x6d 'm' */
+
+static final byte[] ch109data = {
+(byte) 0xdb,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0xec,
+};
+
+static final BitmapCharRec ch109 = new BitmapCharRec(8,5,0,0,8,ch109data);
+
+/* char: 0x6c 'l' */
+
+static final byte[] ch108data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch108 = new BitmapCharRec(3,7,0,0,4,ch108data);
+
+/* char: 0x6b 'k' */
+
+static final byte[] ch107data = {
+(byte) 0x98,(byte) 0x90,(byte) 0xe0,(byte) 0xa0,(byte) 0x90,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch107 = new BitmapCharRec(5,7,0,0,5,ch107data);
+
+/* char: 0x6a 'j' */
+
+static final byte[] ch106data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch106 = new BitmapCharRec(2,9,0,2,3,ch106data);
+
+/* char: 0x69 'i' */
+
+static final byte[] ch105data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch105 = new BitmapCharRec(2,7,0,0,3,ch105data);
+
+/* char: 0x68 'h' */
+
+static final byte[] ch104data = {
+(byte) 0xd8,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0xe0,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch104 = new BitmapCharRec(5,7,0,0,5,ch104data);
+
+/* char: 0x67 'g' */
+
+static final byte[] ch103data = {
+(byte) 0xe0,(byte) 0x90,(byte) 0x60,(byte) 0x40,(byte) 0xa0,(byte) 0xa0,(byte) 0x70,
+};
+
+static final BitmapCharRec ch103 = new BitmapCharRec(4,7,0,2,5,ch103data);
+
+/* char: 0x66 'f' */
+
+static final byte[] ch102data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,(byte) 0x40,(byte) 0x30,
+};
+
+static final BitmapCharRec ch102 = new BitmapCharRec(4,7,0,0,4,ch102data);
+
+/* char: 0x65 'e' */
+
+static final byte[] ch101data = {
+(byte) 0x60,(byte) 0x80,(byte) 0xc0,(byte) 0xa0,(byte) 0x60,
+};
+
+static final BitmapCharRec ch101 = new BitmapCharRec(3,5,0,0,4,ch101data);
+
+/* char: 0x64 'd' */
+
+static final byte[] ch100data = {
+(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x70,(byte) 0x10,(byte) 0x30,
+};
+
+static final BitmapCharRec ch100 = new BitmapCharRec(5,7,0,0,5,ch100data);
+
+/* char: 0x63 'c' */
+
+static final byte[] ch99data = {
+(byte) 0x60,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x60,
+};
+
+static final BitmapCharRec ch99 = new BitmapCharRec(3,5,0,0,4,ch99data);
+
+/* char: 0x62 'b' */
+
+static final byte[] ch98data = {
+(byte) 0xe0,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0xe0,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch98 = new BitmapCharRec(4,7,0,0,5,ch98data);
+
+/* char: 0x61 'a' */
+
+static final byte[] ch97data = {
+(byte) 0xe0,(byte) 0xa0,(byte) 0x60,(byte) 0x20,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch97 = new BitmapCharRec(3,5,0,0,4,ch97data);
+
+/* char: 0x60 '`' */
+
+static final byte[] ch96data = {
+(byte) 0xc0,(byte) 0x80,
+};
+
+static final BitmapCharRec ch96 = new BitmapCharRec(2,2,0,-5,3,ch96data);
+
+/* char: 0x5f '_' */
+
+static final byte[] ch95data = {
+(byte) 0xf8,
+};
+
+static final BitmapCharRec ch95 = new BitmapCharRec(5,1,0,3,5,ch95data);
+
+/* char: 0x5e '^' */
+
+static final byte[] ch94data = {
+(byte) 0xa0,(byte) 0xa0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch94 = new BitmapCharRec(3,3,-1,-4,5,ch94data);
+
+/* char: 0x5d ']' */
+
+static final byte[] ch93data = {
+(byte) 0xc0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch93 = new BitmapCharRec(2,9,0,2,3,ch93data);
+
+/* char: 0x5c '\' */
+
+static final byte[] ch92data = {
+(byte) 0x20,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch92 = new BitmapCharRec(3,7,0,0,3,ch92data);
+
+/* char: 0x5b '[' */
+
+static final byte[] ch91data = {
+(byte) 0xc0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch91 = new BitmapCharRec(2,9,0,2,3,ch91data);
+
+/* char: 0x5a 'Z' */
+
+static final byte[] ch90data = {
+(byte) 0xf8,(byte) 0x88,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x88,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch90 = new BitmapCharRec(5,7,0,0,6,ch90data);
+
+/* char: 0x59 'Y' */
+
+static final byte[] ch89data = {
+(byte) 0x38,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x28,(byte) 0x44,(byte) 0xee,
+};
+
+static final BitmapCharRec ch89 = new BitmapCharRec(7,7,0,0,8,ch89data);
+
+/* char: 0x58 'X' */
+
+static final byte[] ch88data = {
+(byte) 0xee,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x28,(byte) 0x44,(byte) 0xee,
+};
+
+static final BitmapCharRec ch88 = new BitmapCharRec(7,7,0,0,8,ch88data);
+
+/* char: 0x57 'W' */
+
+static final byte[] ch87data = {
+(byte) 0x22,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0x55,(byte) 0x0,(byte) 0x55,(byte) 0x0,(byte) 0xc9,(byte) 0x80,(byte) 0x88,(byte) 0x80,(byte) 0xdd,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch87 = new BitmapCharRec(10,7,0,0,10,ch87data);
+
+/* char: 0x56 'V' */
+
+static final byte[] ch86data = {
+(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x28,(byte) 0x6c,(byte) 0x44,(byte) 0xee,
+};
+
+static final BitmapCharRec ch86 = new BitmapCharRec(7,7,0,0,8,ch86data);
+
+/* char: 0x55 'U' */
+
+static final byte[] ch85data = {
+(byte) 0x38,(byte) 0x6c,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0xee,
+};
+
+static final BitmapCharRec ch85 = new BitmapCharRec(7,7,0,0,8,ch85data);
+
+/* char: 0x54 'T' */
+
+static final byte[] ch84data = {
+(byte) 0x70,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xa8,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch84 = new BitmapCharRec(5,7,0,0,6,ch84data);
+
+/* char: 0x53 'S' */
+
+static final byte[] ch83data = {
+(byte) 0xe0,(byte) 0x90,(byte) 0x10,(byte) 0x60,(byte) 0xc0,(byte) 0x90,(byte) 0x70,
+};
+
+static final BitmapCharRec ch83 = new BitmapCharRec(4,7,0,0,5,ch83data);
+
+/* char: 0x52 'R' */
+
+static final byte[] ch82data = {
+(byte) 0xec,(byte) 0x48,(byte) 0x50,(byte) 0x70,(byte) 0x48,(byte) 0x48,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch82 = new BitmapCharRec(6,7,0,0,7,ch82data);
+
+/* char: 0x51 'Q' */
+
+static final byte[] ch81data = {
+(byte) 0xc,(byte) 0x18,(byte) 0x70,(byte) 0xcc,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xcc,(byte) 0x78,
+};
+
+static final BitmapCharRec ch81 = new BitmapCharRec(6,9,0,2,7,ch81data);
+
+/* char: 0x50 'P' */
+
+static final byte[] ch80data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x70,(byte) 0x48,(byte) 0x48,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch80 = new BitmapCharRec(5,7,0,0,6,ch80data);
+
+/* char: 0x4f 'O' */
+
+static final byte[] ch79data = {
+(byte) 0x78,(byte) 0xcc,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xcc,(byte) 0x78,
+};
+
+static final BitmapCharRec ch79 = new BitmapCharRec(6,7,0,0,7,ch79data);
+
+/* char: 0x4e 'N' */
+
+static final byte[] ch78data = {
+(byte) 0xe4,(byte) 0x4c,(byte) 0x4c,(byte) 0x54,(byte) 0x54,(byte) 0x64,(byte) 0xee,
+};
+
+static final BitmapCharRec ch78 = new BitmapCharRec(7,7,0,0,8,ch78data);
+
+/* char: 0x4d 'M' */
+
+static final byte[] ch77data = {
+(byte) 0xeb,(byte) 0x80,(byte) 0x49,(byte) 0x0,(byte) 0x55,(byte) 0x0,(byte) 0x55,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0xe3,(byte) 0x80,
+};
+
+static final BitmapCharRec ch77 = new BitmapCharRec(9,7,0,0,10,ch77data);
+
+/* char: 0x4c 'L' */
+
+static final byte[] ch76data = {
+(byte) 0xf8,(byte) 0x48,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch76 = new BitmapCharRec(5,7,0,0,6,ch76data);
+
+/* char: 0x4b 'K' */
+
+static final byte[] ch75data = {
+(byte) 0xec,(byte) 0x48,(byte) 0x50,(byte) 0x60,(byte) 0x50,(byte) 0x48,(byte) 0xec,
+};
+
+static final BitmapCharRec ch75 = new BitmapCharRec(6,7,0,0,7,ch75data);
+
+/* char: 0x4a 'J' */
+
+static final byte[] ch74data = {
+(byte) 0xc0,(byte) 0xa0,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x70,
+};
+
+static final BitmapCharRec ch74 = new BitmapCharRec(4,7,0,0,4,ch74data);
+
+/* char: 0x49 'I' */
+
+static final byte[] ch73data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch73 = new BitmapCharRec(3,7,0,0,4,ch73data);
+
+/* char: 0x48 'H' */
+
+static final byte[] ch72data = {
+(byte) 0xee,(byte) 0x44,(byte) 0x44,(byte) 0x7c,(byte) 0x44,(byte) 0x44,(byte) 0xee,
+};
+
+static final BitmapCharRec ch72 = new BitmapCharRec(7,7,0,0,8,ch72data);
+
+/* char: 0x47 'G' */
+
+static final byte[] ch71data = {
+(byte) 0x78,(byte) 0xc4,(byte) 0x84,(byte) 0x9c,(byte) 0x80,(byte) 0xc4,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch71 = new BitmapCharRec(6,7,0,0,7,ch71data);
+
+/* char: 0x46 'F' */
+
+static final byte[] ch70data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x70,(byte) 0x40,(byte) 0x48,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch70 = new BitmapCharRec(5,7,0,0,6,ch70data);
+
+/* char: 0x45 'E' */
+
+static final byte[] ch69data = {
+(byte) 0xf8,(byte) 0x48,(byte) 0x40,(byte) 0x70,(byte) 0x40,(byte) 0x48,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch69 = new BitmapCharRec(5,7,0,0,6,ch69data);
+
+/* char: 0x44 'D' */
+
+static final byte[] ch68data = {
+(byte) 0xf8,(byte) 0x4c,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0x4c,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch68 = new BitmapCharRec(6,7,0,0,7,ch68data);
+
+/* char: 0x43 'C' */
+
+static final byte[] ch67data = {
+(byte) 0x78,(byte) 0xc4,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xc4,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch67 = new BitmapCharRec(6,7,0,0,7,ch67data);
+
+/* char: 0x42 'B' */
+
+static final byte[] ch66data = {
+(byte) 0xf0,(byte) 0x48,(byte) 0x48,(byte) 0x70,(byte) 0x48,(byte) 0x48,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch66 = new BitmapCharRec(5,7,0,0,6,ch66data);
+
+/* char: 0x41 'A' */
+
+static final byte[] ch65data = {
+(byte) 0xee,(byte) 0x44,(byte) 0x7c,(byte) 0x28,(byte) 0x28,(byte) 0x38,(byte) 0x10,
+};
+
+static final BitmapCharRec ch65 = new BitmapCharRec(7,7,0,0,8,ch65data);
+
+/* char: 0x40 '@' */
+
+static final byte[] ch64data = {
+(byte) 0x3e,(byte) 0x40,(byte) 0x92,(byte) 0xad,(byte) 0xa5,(byte) 0xa5,(byte) 0x9d,(byte) 0x42,(byte) 0x3c,
+};
+
+static final BitmapCharRec ch64 = new BitmapCharRec(8,9,0,2,9,ch64data);
+
+/* char: 0x3f '?' */
+
+static final byte[] ch63data = {
+(byte) 0x40,(byte) 0x0,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0xa0,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch63 = new BitmapCharRec(3,7,0,0,4,ch63data);
+
+/* char: 0x3e '>' */
+
+static final byte[] ch62data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch62 = new BitmapCharRec(3,5,0,0,5,ch62data);
+
+/* char: 0x3d '=' */
+
+static final byte[] ch61data = {
+(byte) 0xf8,(byte) 0x0,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch61 = new BitmapCharRec(5,3,0,-1,6,ch61data);
+
+/* char: 0x3c '<' */
+
+static final byte[] ch60data = {
+(byte) 0x20,(byte) 0x40,(byte) 0x80,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch60 = new BitmapCharRec(3,5,-1,0,5,ch60data);
+
+/* char: 0x3b ';' */
+
+static final byte[] ch59data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x80,
+};
+
+static final BitmapCharRec ch59 = new BitmapCharRec(1,7,-1,2,3,ch59data);
+
+/* char: 0x3a ':' */
+
+static final byte[] ch58data = {
+(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x80,
+};
+
+static final BitmapCharRec ch58 = new BitmapCharRec(1,5,-1,0,3,ch58data);
+
+/* char: 0x39 '9' */
+
+static final byte[] ch57data = {
+(byte) 0xc0,(byte) 0x20,(byte) 0x70,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch57 = new BitmapCharRec(4,7,0,0,5,ch57data);
+
+/* char: 0x38 '8' */
+
+static final byte[] ch56data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch56 = new BitmapCharRec(4,7,0,0,5,ch56data);
+
+/* char: 0x37 '7' */
+
+static final byte[] ch55data = {
+(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x90,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch55 = new BitmapCharRec(4,7,0,0,5,ch55data);
+
+/* char: 0x36 '6' */
+
+static final byte[] ch54data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0xe0,(byte) 0x40,(byte) 0x30,
+};
+
+static final BitmapCharRec ch54 = new BitmapCharRec(4,7,0,0,5,ch54data);
+
+/* char: 0x35 '5' */
+
+static final byte[] ch53data = {
+(byte) 0xe0,(byte) 0x90,(byte) 0x10,(byte) 0x10,(byte) 0xe0,(byte) 0x40,(byte) 0x70,
+};
+
+static final BitmapCharRec ch53 = new BitmapCharRec(4,7,0,0,5,ch53data);
+
+/* char: 0x34 '4' */
+
+static final byte[] ch52data = {
+(byte) 0x10,(byte) 0x10,(byte) 0xf8,(byte) 0x90,(byte) 0x50,(byte) 0x30,(byte) 0x10,
+};
+
+static final BitmapCharRec ch52 = new BitmapCharRec(5,7,0,0,5,ch52data);
+
+/* char: 0x33 '3' */
+
+static final byte[] ch51data = {
+(byte) 0xe0,(byte) 0x10,(byte) 0x10,(byte) 0x60,(byte) 0x10,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch51 = new BitmapCharRec(4,7,0,0,5,ch51data);
+
+/* char: 0x32 '2' */
+
+static final byte[] ch50data = {
+(byte) 0xf0,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x10,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch50 = new BitmapCharRec(4,7,0,0,5,ch50data);
+
+/* char: 0x31 '1' */
+
+static final byte[] ch49data = {
+(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x40,
+};
+
+static final BitmapCharRec ch49 = new BitmapCharRec(3,7,-1,0,5,ch49data);
+
+/* char: 0x30 '0' */
+
+static final byte[] ch48data = {
+(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x60,
+};
+
+static final BitmapCharRec ch48 = new BitmapCharRec(4,7,0,0,5,ch48data);
+
+/* char: 0x2f '/' */
+
+static final byte[] ch47data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,
+};
+
+static final BitmapCharRec ch47 = new BitmapCharRec(3,7,0,0,3,ch47data);
+
+/* char: 0x2e '.' */
+
+static final byte[] ch46data = {
+(byte) 0x80,
+};
+
+static final BitmapCharRec ch46 = new BitmapCharRec(1,1,-1,0,3,ch46data);
+
+/* char: 0x2d '-' */
+
+static final byte[] ch45data = {
+(byte) 0xf0,
+};
+
+static final BitmapCharRec ch45 = new BitmapCharRec(4,1,-1,-2,7,ch45data);
+
+/* char: 0x2c ',' */
+
+static final byte[] ch44data = {
+(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch44 = new BitmapCharRec(1,3,-1,2,3,ch44data);
+
+/* char: 0x2b '+' */
+
+static final byte[] ch43data = {
+(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x20,
+};
+
+static final BitmapCharRec ch43 = new BitmapCharRec(5,5,0,0,6,ch43data);
+
+/* char: 0x2a '*' */
+
+static final byte[] ch42data = {
+(byte) 0xa0,(byte) 0x40,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch42 = new BitmapCharRec(3,3,0,-4,5,ch42data);
+
+/* char: 0x29 ')' */
+
+static final byte[] ch41data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch41 = new BitmapCharRec(3,9,0,2,4,ch41data);
+
+/* char: 0x28 '(' */
+
+static final byte[] ch40data = {
+(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,
+};
+
+static final BitmapCharRec ch40 = new BitmapCharRec(3,9,0,2,4,ch40data);
+
+/* char: 0x27 ''' */
+
+static final byte[] ch39data = {
+(byte) 0x40,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch39 = new BitmapCharRec(2,2,0,-5,3,ch39data);
+
+/* char: 0x26 '&' */
+
+static final byte[] ch38data = {
+(byte) 0x76,(byte) 0x8d,(byte) 0x98,(byte) 0x74,(byte) 0x6e,(byte) 0x50,(byte) 0x30,
+};
+
+static final BitmapCharRec ch38 = new BitmapCharRec(8,7,0,0,8,ch38data);
+
+/* char: 0x25 '%' */
+
+static final byte[] ch37data = {
+(byte) 0x44,(byte) 0x2a,(byte) 0x2a,(byte) 0x56,(byte) 0xa8,(byte) 0xa4,(byte) 0x7e,
+};
+
+static final BitmapCharRec ch37 = new BitmapCharRec(7,7,0,0,8,ch37data);
+
+/* char: 0x24 '$' */
+
+static final byte[] ch36data = {
+(byte) 0x20,(byte) 0xe0,(byte) 0x90,(byte) 0x10,(byte) 0x60,(byte) 0x80,(byte) 0x90,(byte) 0x70,(byte) 0x20,
+};
+
+static final BitmapCharRec ch36 = new BitmapCharRec(4,9,0,1,5,ch36data);
+
+/* char: 0x23 '#' */
+
+static final byte[] ch35data = {
+(byte) 0x50,(byte) 0x50,(byte) 0xf8,(byte) 0x50,(byte) 0xf8,(byte) 0x50,(byte) 0x50,
+};
+
+static final BitmapCharRec ch35 = new BitmapCharRec(5,7,0,0,5,ch35data);
+
+/* char: 0x22 '"' */
+
+static final byte[] ch34data = {
+(byte) 0xa0,(byte) 0xa0,
+};
+
+static final BitmapCharRec ch34 = new BitmapCharRec(3,2,0,-5,4,ch34data);
+
+/* char: 0x21 '!' */
+
+static final byte[] ch33data = {
+(byte) 0x80,(byte) 0x0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
+};
+
+static final BitmapCharRec ch33 = new BitmapCharRec(1,7,-1,0,3,ch33data);
+
+/* char: 0x20 ' ' */
+
+static final BitmapCharRec ch32 = new BitmapCharRec(0,0,0,0,2,null);
+
+static final BitmapCharRec[] chars = {
+ch32,
+ch33,
+ch34,
+ch35,
+ch36,
+ch37,
+ch38,
+ch39,
+ch40,
+ch41,
+ch42,
+ch43,
+ch44,
+ch45,
+ch46,
+ch47,
+ch48,
+ch49,
+ch50,
+ch51,
+ch52,
+ch53,
+ch54,
+ch55,
+ch56,
+ch57,
+ch58,
+ch59,
+ch60,
+ch61,
+ch62,
+ch63,
+ch64,
+ch65,
+ch66,
+ch67,
+ch68,
+ch69,
+ch70,
+ch71,
+ch72,
+ch73,
+ch74,
+ch75,
+ch76,
+ch77,
+ch78,
+ch79,
+ch80,
+ch81,
+ch82,
+ch83,
+ch84,
+ch85,
+ch86,
+ch87,
+ch88,
+ch89,
+ch90,
+ch91,
+ch92,
+ch93,
+ch94,
+ch95,
+ch96,
+ch97,
+ch98,
+ch99,
+ch100,
+ch101,
+ch102,
+ch103,
+ch104,
+ch105,
+ch106,
+ch107,
+ch108,
+ch109,
+ch110,
+ch111,
+ch112,
+ch113,
+ch114,
+ch115,
+ch116,
+ch117,
+ch118,
+ch119,
+ch120,
+ch121,
+ch122,
+ch123,
+ch124,
+ch125,
+ch126,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+ch160,
+ch161,
+ch162,
+ch163,
+ch164,
+ch165,
+ch166,
+ch167,
+ch168,
+ch169,
+ch170,
+ch171,
+ch172,
+ch173,
+ch174,
+ch175,
+ch176,
+ch177,
+ch178,
+ch179,
+ch180,
+ch181,
+ch182,
+ch183,
+ch184,
+ch185,
+ch186,
+ch187,
+ch188,
+ch189,
+ch190,
+ch191,
+ch192,
+ch193,
+ch194,
+ch195,
+ch196,
+ch197,
+ch198,
+ch199,
+ch200,
+ch201,
+ch202,
+ch203,
+ch204,
+ch205,
+ch206,
+ch207,
+ch208,
+ch209,
+ch210,
+ch211,
+ch212,
+ch213,
+ch214,
+ch215,
+ch216,
+ch217,
+ch218,
+ch219,
+ch220,
+ch221,
+ch222,
+ch223,
+ch224,
+ch225,
+ch226,
+ch227,
+ch228,
+ch229,
+ch230,
+ch231,
+ch232,
+ch233,
+ch234,
+ch235,
+ch236,
+ch237,
+ch238,
+ch239,
+ch240,
+ch241,
+ch242,
+ch243,
+ch244,
+ch245,
+ch246,
+ch247,
+ch248,
+ch249,
+ch250,
+ch251,
+ch252,
+ch253,
+ch254,
+ch255,
+};
+
+ public static final BitmapFontRec glutBitmapTimesRoman10 = new BitmapFontRec("-adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1",
+ 224,
+ 32,
+ chars);
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTBitmapTimesRoman24.java b/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTBitmapTimesRoman24.java
new file mode 100644
index 000000000..073e6e673
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTBitmapTimesRoman24.java
@@ -0,0 +1,2080 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.util.gl2;
+
+class GLUTBitmapTimesRoman24 {
+
+/* GENERATED FILE -- DO NOT MODIFY */
+
+/* char: 0xff */
+
+static final byte[] ch255data = {
+(byte) 0xe0,(byte) 0x0,(byte) 0xf0,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x4,(byte) 0x0,(byte) 0xe,(byte) 0x0,(byte) 0xe,(byte) 0x0,
+(byte) 0x1a,(byte) 0x0,(byte) 0x19,(byte) 0x0,(byte) 0x19,(byte) 0x0,(byte) 0x31,(byte) 0x0,(byte) 0x30,(byte) 0x80,(byte) 0x30,(byte) 0x80,(byte) 0x60,(byte) 0x80,(byte) 0x60,(byte) 0xc0,
+(byte) 0xf1,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x33,(byte) 0x0,
+};
+
+static final BitmapCharRec ch255 = new BitmapCharRec(11,21,0,5,11,ch255data);
+
+/* char: 0xfe */
+
+static final byte[] ch254data = {
+(byte) 0xf0,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x6e,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,
+(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,
+(byte) 0x6e,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0xe0,(byte) 0x0,
+};
+
+static final BitmapCharRec ch254 = new BitmapCharRec(10,22,-1,5,12,ch254data);
+
+/* char: 0xfd */
+
+static final byte[] ch253data = {
+(byte) 0xe0,(byte) 0x0,(byte) 0xf0,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x4,(byte) 0x0,(byte) 0xe,(byte) 0x0,(byte) 0xe,(byte) 0x0,
+(byte) 0x1a,(byte) 0x0,(byte) 0x19,(byte) 0x0,(byte) 0x19,(byte) 0x0,(byte) 0x31,(byte) 0x0,(byte) 0x30,(byte) 0x80,(byte) 0x30,(byte) 0x80,(byte) 0x60,(byte) 0x80,(byte) 0x60,(byte) 0xc0,
+(byte) 0xf1,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x3,(byte) 0x80,(byte) 0x1,(byte) 0x80,
+};
+
+static final BitmapCharRec ch253 = new BitmapCharRec(11,22,0,5,11,ch253data);
+
+/* char: 0xfc */
+
+static final byte[] ch252data = {
+(byte) 0x1c,(byte) 0xe0,(byte) 0x3e,(byte) 0xc0,(byte) 0x71,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,
+(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xe1,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x33,(byte) 0x0,
+};
+
+static final BitmapCharRec ch252 = new BitmapCharRec(11,16,-1,0,13,ch252data);
+
+/* char: 0xfb */
+
+static final byte[] ch251data = {
+(byte) 0x1c,(byte) 0xe0,(byte) 0x3e,(byte) 0xc0,(byte) 0x71,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,
+(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xe1,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x21,(byte) 0x0,(byte) 0x12,(byte) 0x0,(byte) 0x1e,(byte) 0x0,
+(byte) 0xc,(byte) 0x0,
+};
+
+static final BitmapCharRec ch251 = new BitmapCharRec(11,17,-1,0,13,ch251data);
+
+/* char: 0xfa */
+
+static final byte[] ch250data = {
+(byte) 0x1c,(byte) 0xe0,(byte) 0x3e,(byte) 0xc0,(byte) 0x71,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,
+(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xe1,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x3,(byte) 0x80,
+(byte) 0x1,(byte) 0x80,
+};
+
+static final BitmapCharRec ch250 = new BitmapCharRec(11,17,-1,0,13,ch250data);
+
+/* char: 0xf9 */
+
+static final byte[] ch249data = {
+(byte) 0x1c,(byte) 0xe0,(byte) 0x3e,(byte) 0xc0,(byte) 0x71,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,
+(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xe1,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x2,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x38,(byte) 0x0,
+(byte) 0x30,(byte) 0x0,
+};
+
+static final BitmapCharRec ch249 = new BitmapCharRec(11,17,-1,0,13,ch249data);
+
+/* char: 0xf8 */
+
+static final byte[] ch248data = {
+(byte) 0xc0,(byte) 0x0,(byte) 0xde,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0x71,(byte) 0x80,(byte) 0xd0,(byte) 0xc0,(byte) 0xd8,(byte) 0xc0,(byte) 0xc8,(byte) 0xc0,(byte) 0xcc,(byte) 0xc0,
+(byte) 0xc4,(byte) 0xc0,(byte) 0xc6,(byte) 0xc0,(byte) 0x63,(byte) 0x80,(byte) 0x73,(byte) 0x80,(byte) 0x1e,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch248 = new BitmapCharRec(10,14,-1,1,12,ch248data);
+
+/* char: 0xf7 */
+
+static final byte[] ch247data = {
+(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xff,(byte) 0xf0,(byte) 0xff,(byte) 0xf0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,
+(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+};
+
+static final BitmapCharRec ch247 = new BitmapCharRec(12,10,-1,-2,14,ch247data);
+
+/* char: 0xf6 */
+
+static final byte[] ch246data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xc0,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,(byte) 0x1e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x33,(byte) 0x0,
+};
+
+static final BitmapCharRec ch246 = new BitmapCharRec(10,16,-1,0,12,ch246data);
+
+/* char: 0xf5 */
+
+static final byte[] ch245data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xc0,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,(byte) 0x1e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x27,(byte) 0x0,(byte) 0x1c,(byte) 0x80,
+};
+
+static final BitmapCharRec ch245 = new BitmapCharRec(10,16,-1,0,12,ch245data);
+
+/* char: 0xf4 */
+
+static final byte[] ch244data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xc0,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,(byte) 0x1e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x21,(byte) 0x0,(byte) 0x12,(byte) 0x0,(byte) 0x1e,(byte) 0x0,
+(byte) 0xc,(byte) 0x0,
+};
+
+static final BitmapCharRec ch244 = new BitmapCharRec(10,17,-1,0,12,ch244data);
+
+/* char: 0xf3 */
+
+static final byte[] ch243data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xc0,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,(byte) 0x1e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x3,(byte) 0x80,
+(byte) 0x1,(byte) 0x80,
+};
+
+static final BitmapCharRec ch243 = new BitmapCharRec(10,17,-1,0,12,ch243data);
+
+/* char: 0xf2 */
+
+static final byte[] ch242data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xc0,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,(byte) 0x1e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x2,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x38,(byte) 0x0,
+(byte) 0x30,(byte) 0x0,
+};
+
+static final BitmapCharRec ch242 = new BitmapCharRec(10,17,-1,0,12,ch242data);
+
+/* char: 0xf1 */
+
+static final byte[] ch241data = {
+(byte) 0xf1,(byte) 0xe0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,
+(byte) 0x60,(byte) 0xc0,(byte) 0x71,(byte) 0xc0,(byte) 0x6f,(byte) 0x80,(byte) 0xe7,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x27,(byte) 0x0,(byte) 0x1c,(byte) 0x80,
+};
+
+static final BitmapCharRec ch241 = new BitmapCharRec(11,16,-1,0,13,ch241data);
+
+/* char: 0xf0 */
+
+static final byte[] ch240data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xc0,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,(byte) 0x1f,(byte) 0x0,(byte) 0xc6,(byte) 0x0,(byte) 0x3c,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0x71,(byte) 0x80,
+(byte) 0xc0,(byte) 0x0,
+};
+
+static final BitmapCharRec ch240 = new BitmapCharRec(10,17,-1,0,12,ch240data);
+
+/* char: 0xef */
+
+static final byte[] ch239data = {
+(byte) 0x78,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x70,(byte) 0x0,(byte) 0x0,(byte) 0xcc,(byte) 0xcc,
+};
+
+static final BitmapCharRec ch239 = new BitmapCharRec(6,16,0,0,6,ch239data);
+
+/* char: 0xee */
+
+static final byte[] ch238data = {
+(byte) 0x78,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x70,(byte) 0x0,(byte) 0x84,(byte) 0x48,(byte) 0x78,
+(byte) 0x30,
+};
+
+static final BitmapCharRec ch238 = new BitmapCharRec(6,17,0,0,6,ch238data);
+
+/* char: 0xed */
+
+static final byte[] ch237data = {
+(byte) 0xf0,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0xe0,(byte) 0x0,(byte) 0x80,(byte) 0x60,(byte) 0x38,
+(byte) 0x18,
+};
+
+static final BitmapCharRec ch237 = new BitmapCharRec(5,17,-1,0,6,ch237data);
+
+/* char: 0xec */
+
+static final byte[] ch236data = {
+(byte) 0x78,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x70,(byte) 0x0,(byte) 0x8,(byte) 0x30,(byte) 0xe0,
+(byte) 0xc0,
+};
+
+static final BitmapCharRec ch236 = new BitmapCharRec(5,17,0,0,6,ch236data);
+
+/* char: 0xeb */
+
+static final byte[] ch235data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x70,(byte) 0x80,(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x80,
+(byte) 0xc1,(byte) 0x80,(byte) 0x41,(byte) 0x80,(byte) 0x63,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x33,(byte) 0x0,
+};
+
+static final BitmapCharRec ch235 = new BitmapCharRec(9,16,-1,0,11,ch235data);
+
+/* char: 0xea */
+
+static final byte[] ch234data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x70,(byte) 0x80,(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x80,
+(byte) 0xc1,(byte) 0x80,(byte) 0x41,(byte) 0x80,(byte) 0x63,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x21,(byte) 0x0,(byte) 0x12,(byte) 0x0,(byte) 0x1e,(byte) 0x0,
+(byte) 0xc,(byte) 0x0,
+};
+
+static final BitmapCharRec ch234 = new BitmapCharRec(9,17,-1,0,11,ch234data);
+
+/* char: 0xe9 */
+
+static final byte[] ch233data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x70,(byte) 0x80,(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x80,
+(byte) 0xc1,(byte) 0x80,(byte) 0x41,(byte) 0x80,(byte) 0x63,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x10,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x7,(byte) 0x0,
+(byte) 0x3,(byte) 0x0,
+};
+
+static final BitmapCharRec ch233 = new BitmapCharRec(9,17,-1,0,11,ch233data);
+
+/* char: 0xe8 */
+
+static final byte[] ch232data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x70,(byte) 0x80,(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x80,
+(byte) 0xc1,(byte) 0x80,(byte) 0x41,(byte) 0x80,(byte) 0x63,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x4,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x70,(byte) 0x0,
+(byte) 0x60,(byte) 0x0,
+};
+
+static final BitmapCharRec ch232 = new BitmapCharRec(9,17,-1,0,11,ch232data);
+
+/* char: 0xe7 */
+
+static final byte[] ch231data = {
+(byte) 0x3c,(byte) 0x0,(byte) 0x66,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,
+(byte) 0x70,(byte) 0x80,(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x41,(byte) 0x80,
+(byte) 0x63,(byte) 0x80,(byte) 0x1f,(byte) 0x0,
+};
+
+static final BitmapCharRec ch231 = new BitmapCharRec(9,18,-1,6,11,ch231data);
+
+/* char: 0xe6 */
+
+static final byte[] ch230data = {
+(byte) 0x70,(byte) 0xf0,(byte) 0xfb,(byte) 0xf8,(byte) 0xc7,(byte) 0x84,(byte) 0xc3,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x3b,(byte) 0x0,(byte) 0xf,(byte) 0xfc,
+(byte) 0x3,(byte) 0xc,(byte) 0x63,(byte) 0xc,(byte) 0x67,(byte) 0x98,(byte) 0x3c,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch230 = new BitmapCharRec(14,12,-1,0,16,ch230data);
+
+/* char: 0xe5 */
+
+static final byte[] ch229data = {
+(byte) 0x71,(byte) 0x80,(byte) 0xfb,(byte) 0x0,(byte) 0xc7,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x3b,(byte) 0x0,(byte) 0xf,(byte) 0x0,
+(byte) 0x3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x67,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x1c,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0x22,(byte) 0x0,
+(byte) 0x1c,(byte) 0x0,
+};
+
+static final BitmapCharRec ch229 = new BitmapCharRec(9,17,-1,0,11,ch229data);
+
+/* char: 0xe4 */
+
+static final byte[] ch228data = {
+(byte) 0x71,(byte) 0x80,(byte) 0xfb,(byte) 0x0,(byte) 0xc7,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x3b,(byte) 0x0,(byte) 0xf,(byte) 0x0,
+(byte) 0x3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x67,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x66,(byte) 0x0,(byte) 0x66,(byte) 0x0,
+};
+
+static final BitmapCharRec ch228 = new BitmapCharRec(9,16,-1,0,11,ch228data);
+
+/* char: 0xe3 */
+
+static final byte[] ch227data = {
+(byte) 0x71,(byte) 0x80,(byte) 0xfb,(byte) 0x0,(byte) 0xc7,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x3b,(byte) 0x0,(byte) 0xf,(byte) 0x0,
+(byte) 0x3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x67,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x5c,(byte) 0x0,(byte) 0x3a,(byte) 0x0,
+};
+
+static final BitmapCharRec ch227 = new BitmapCharRec(9,16,-1,0,11,ch227data);
+
+/* char: 0xe2 */
+
+static final byte[] ch226data = {
+(byte) 0x71,(byte) 0x80,(byte) 0xfb,(byte) 0x0,(byte) 0xc7,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x3b,(byte) 0x0,(byte) 0xf,(byte) 0x0,
+(byte) 0x3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x67,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x42,(byte) 0x0,(byte) 0x24,(byte) 0x0,(byte) 0x3c,(byte) 0x0,
+(byte) 0x18,(byte) 0x0,
+};
+
+static final BitmapCharRec ch226 = new BitmapCharRec(9,17,-1,0,11,ch226data);
+
+/* char: 0xe1 */
+
+static final byte[] ch225data = {
+(byte) 0x71,(byte) 0x80,(byte) 0xfb,(byte) 0x0,(byte) 0xc7,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x3b,(byte) 0x0,(byte) 0xf,(byte) 0x0,
+(byte) 0x3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x67,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x10,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x7,(byte) 0x0,
+(byte) 0x3,(byte) 0x0,
+};
+
+static final BitmapCharRec ch225 = new BitmapCharRec(9,17,-1,0,11,ch225data);
+
+/* char: 0xe0 */
+
+static final byte[] ch224data = {
+(byte) 0x71,(byte) 0x80,(byte) 0xfb,(byte) 0x0,(byte) 0xc7,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x3b,(byte) 0x0,(byte) 0xf,(byte) 0x0,
+(byte) 0x3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x67,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x4,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x70,(byte) 0x0,
+(byte) 0x60,(byte) 0x0,
+};
+
+static final BitmapCharRec ch224 = new BitmapCharRec(9,17,-1,0,11,ch224data);
+
+/* char: 0xdf */
+
+static final byte[] ch223data = {
+(byte) 0xe7,(byte) 0x0,(byte) 0x6c,(byte) 0x80,(byte) 0x6c,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x61,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x63,(byte) 0x80,
+(byte) 0x67,(byte) 0x0,(byte) 0x6c,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x33,(byte) 0x0,
+(byte) 0x1e,(byte) 0x0,
+};
+
+static final BitmapCharRec ch223 = new BitmapCharRec(10,17,-1,0,12,ch223data);
+
+/* char: 0xde */
+
+static final byte[] ch222data = {
+(byte) 0xfc,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0x70,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x18,
+(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x70,(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,
+(byte) 0xfc,(byte) 0x0,
+};
+
+static final BitmapCharRec ch222 = new BitmapCharRec(13,17,-1,0,15,ch222data);
+
+/* char: 0xdd */
+
+static final byte[] ch221data = {
+(byte) 0x7,(byte) 0xe0,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x3,(byte) 0xc0,
+(byte) 0x3,(byte) 0x40,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0x20,(byte) 0xc,(byte) 0x30,(byte) 0x1c,(byte) 0x10,(byte) 0x18,(byte) 0x18,(byte) 0x38,(byte) 0x8,(byte) 0x30,(byte) 0xc,
+(byte) 0xfc,(byte) 0x3f,(byte) 0x0,(byte) 0x0,(byte) 0x1,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x70,(byte) 0x0,(byte) 0x30,
+};
+
+static final BitmapCharRec ch221 = new BitmapCharRec(16,22,0,0,16,ch221data);
+
+/* char: 0xdc */
+
+static final byte[] ch220data = {
+(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x30,(byte) 0x18,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,
+(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,
+(byte) 0xfc,(byte) 0x1f,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x6,(byte) 0x30,(byte) 0x6,(byte) 0x30,
+};
+
+static final BitmapCharRec ch220 = new BitmapCharRec(16,21,-1,0,18,ch220data);
+
+/* char: 0xdb */
+
+static final byte[] ch219data = {
+(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x30,(byte) 0x18,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,
+(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,
+(byte) 0xfc,(byte) 0x1f,(byte) 0x0,(byte) 0x0,(byte) 0x8,(byte) 0x10,(byte) 0x6,(byte) 0x60,(byte) 0x3,(byte) 0xc0,(byte) 0x1,(byte) 0x80,
+};
+
+static final BitmapCharRec ch219 = new BitmapCharRec(16,22,-1,0,18,ch219data);
+
+/* char: 0xda */
+
+static final byte[] ch218data = {
+(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x30,(byte) 0x18,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,
+(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,
+(byte) 0xfc,(byte) 0x1f,(byte) 0x0,(byte) 0x0,(byte) 0x1,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x70,(byte) 0x0,(byte) 0x30,
+};
+
+static final BitmapCharRec ch218 = new BitmapCharRec(16,22,-1,0,18,ch218data);
+
+/* char: 0xd9 */
+
+static final byte[] ch217data = {
+(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x30,(byte) 0x18,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,
+(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,
+(byte) 0xfc,(byte) 0x1f,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x40,(byte) 0x1,(byte) 0x80,(byte) 0x7,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+};
+
+static final BitmapCharRec ch217 = new BitmapCharRec(16,22,-1,0,18,ch217data);
+
+/* char: 0xd8 */
+
+static final byte[] ch216data = {
+(byte) 0x20,(byte) 0x0,(byte) 0x27,(byte) 0xe0,(byte) 0x1c,(byte) 0x38,(byte) 0x38,(byte) 0x1c,(byte) 0x68,(byte) 0x6,(byte) 0x64,(byte) 0x6,(byte) 0xc2,(byte) 0x3,(byte) 0xc2,(byte) 0x3,
+(byte) 0xc1,(byte) 0x3,(byte) 0xc1,(byte) 0x3,(byte) 0xc0,(byte) 0x83,(byte) 0xc0,(byte) 0x83,(byte) 0xc0,(byte) 0x43,(byte) 0x60,(byte) 0x46,(byte) 0x60,(byte) 0x26,(byte) 0x38,(byte) 0x1c,
+(byte) 0x1c,(byte) 0x38,(byte) 0x7,(byte) 0xe4,(byte) 0x0,(byte) 0x4,
+};
+
+static final BitmapCharRec ch216 = new BitmapCharRec(16,19,-1,1,18,ch216data);
+
+/* char: 0xd7 */
+
+static final byte[] ch215data = {
+(byte) 0x80,(byte) 0x40,(byte) 0xc0,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x33,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0x33,(byte) 0x0,
+(byte) 0x61,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0x80,(byte) 0x40,
+};
+
+static final BitmapCharRec ch215 = new BitmapCharRec(10,11,-2,-1,14,ch215data);
+
+/* char: 0xd6 */
+
+static final byte[] ch214data = {
+(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x38,(byte) 0x38,(byte) 0x1c,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,
+(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0x38,(byte) 0x1c,(byte) 0x1c,(byte) 0x38,
+(byte) 0x7,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0x60,
+};
+
+static final BitmapCharRec ch214 = new BitmapCharRec(16,21,-1,0,18,ch214data);
+
+/* char: 0xd5 */
+
+static final byte[] ch213data = {
+(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x38,(byte) 0x38,(byte) 0x1c,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,
+(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0x38,(byte) 0x1c,(byte) 0x1c,(byte) 0x38,
+(byte) 0x7,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x4,(byte) 0xe0,(byte) 0x3,(byte) 0x90,
+};
+
+static final BitmapCharRec ch213 = new BitmapCharRec(16,21,-1,0,18,ch213data);
+
+/* char: 0xd4 */
+
+static final byte[] ch212data = {
+(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x38,(byte) 0x38,(byte) 0x1c,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,
+(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0x38,(byte) 0x1c,(byte) 0x1c,(byte) 0x38,
+(byte) 0x7,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x8,(byte) 0x10,(byte) 0x6,(byte) 0x60,(byte) 0x3,(byte) 0xc0,(byte) 0x1,(byte) 0x80,
+};
+
+static final BitmapCharRec ch212 = new BitmapCharRec(16,22,-1,0,18,ch212data);
+
+/* char: 0xd3 */
+
+static final byte[] ch211data = {
+(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x38,(byte) 0x38,(byte) 0x1c,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,
+(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0x38,(byte) 0x1c,(byte) 0x1c,(byte) 0x38,
+(byte) 0x7,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x1,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x70,(byte) 0x0,(byte) 0x30,
+};
+
+static final BitmapCharRec ch211 = new BitmapCharRec(16,22,-1,0,18,ch211data);
+
+/* char: 0xd2 */
+
+static final byte[] ch210data = {
+(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x38,(byte) 0x38,(byte) 0x1c,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,
+(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0x38,(byte) 0x1c,(byte) 0x1c,(byte) 0x38,
+(byte) 0x7,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x40,(byte) 0x1,(byte) 0x80,(byte) 0x7,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+};
+
+static final BitmapCharRec ch210 = new BitmapCharRec(16,22,-1,0,18,ch210data);
+
+/* char: 0xd1 */
+
+static final byte[] ch209data = {
+(byte) 0xf8,(byte) 0xc,(byte) 0x20,(byte) 0x1c,(byte) 0x20,(byte) 0x1c,(byte) 0x20,(byte) 0x34,(byte) 0x20,(byte) 0x64,(byte) 0x20,(byte) 0x64,(byte) 0x20,(byte) 0xc4,(byte) 0x21,(byte) 0x84,
+(byte) 0x21,(byte) 0x84,(byte) 0x23,(byte) 0x4,(byte) 0x26,(byte) 0x4,(byte) 0x26,(byte) 0x4,(byte) 0x2c,(byte) 0x4,(byte) 0x38,(byte) 0x4,(byte) 0x38,(byte) 0x4,(byte) 0x30,(byte) 0x4,
+(byte) 0xf0,(byte) 0x1f,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x4,(byte) 0xe0,(byte) 0x3,(byte) 0x90,
+};
+
+static final BitmapCharRec ch209 = new BitmapCharRec(16,21,-1,0,18,ch209data);
+
+/* char: 0xd0 */
+
+static final byte[] ch208data = {
+(byte) 0x7f,(byte) 0xe0,(byte) 0x18,(byte) 0x38,(byte) 0x18,(byte) 0x1c,(byte) 0x18,(byte) 0x6,(byte) 0x18,(byte) 0x6,(byte) 0x18,(byte) 0x3,(byte) 0x18,(byte) 0x3,(byte) 0x18,(byte) 0x3,
+(byte) 0xff,(byte) 0x3,(byte) 0x18,(byte) 0x3,(byte) 0x18,(byte) 0x3,(byte) 0x18,(byte) 0x3,(byte) 0x18,(byte) 0x6,(byte) 0x18,(byte) 0x6,(byte) 0x18,(byte) 0x1c,(byte) 0x18,(byte) 0x38,
+(byte) 0x7f,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch208 = new BitmapCharRec(16,17,0,0,17,ch208data);
+
+/* char: 0xcf */
+
+static final byte[] ch207data = {
+(byte) 0xfc,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,
+(byte) 0xfc,(byte) 0x0,(byte) 0x0,(byte) 0xcc,(byte) 0xcc,
+};
+
+static final BitmapCharRec ch207 = new BitmapCharRec(6,21,-1,0,8,ch207data);
+
+/* char: 0xce */
+
+static final byte[] ch206data = {
+(byte) 0x7e,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,
+(byte) 0x7e,(byte) 0x0,(byte) 0x81,(byte) 0x66,(byte) 0x3c,(byte) 0x18,
+};
+
+static final BitmapCharRec ch206 = new BitmapCharRec(8,22,-1,0,8,ch206data);
+
+/* char: 0xcd */
+
+static final byte[] ch205data = {
+(byte) 0xfc,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,
+(byte) 0xfc,(byte) 0x0,(byte) 0x40,(byte) 0x30,(byte) 0x1c,(byte) 0xc,
+};
+
+static final BitmapCharRec ch205 = new BitmapCharRec(6,22,-1,0,8,ch205data);
+
+/* char: 0xcc */
+
+static final byte[] ch204data = {
+(byte) 0xfc,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,
+(byte) 0xfc,(byte) 0x0,(byte) 0x8,(byte) 0x30,(byte) 0xe0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch204 = new BitmapCharRec(6,22,-1,0,8,ch204data);
+
+/* char: 0xcb */
+
+static final byte[] ch203data = {
+(byte) 0xff,(byte) 0xf8,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x40,
+(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x30,
+(byte) 0xff,(byte) 0xf0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,
+};
+
+static final BitmapCharRec ch203 = new BitmapCharRec(13,21,-1,0,15,ch203data);
+
+/* char: 0xca */
+
+static final byte[] ch202data = {
+(byte) 0xff,(byte) 0xf8,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x40,
+(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x30,
+(byte) 0xff,(byte) 0xf0,(byte) 0x0,(byte) 0x0,(byte) 0x10,(byte) 0x20,(byte) 0xc,(byte) 0xc0,(byte) 0x7,(byte) 0x80,(byte) 0x3,(byte) 0x0,
+};
+
+static final BitmapCharRec ch202 = new BitmapCharRec(13,22,-1,0,15,ch202data);
+
+/* char: 0xc9 */
+
+static final byte[] ch201data = {
+(byte) 0xff,(byte) 0xf8,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x40,
+(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x30,
+(byte) 0xff,(byte) 0xf0,(byte) 0x0,(byte) 0x0,(byte) 0x4,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch201 = new BitmapCharRec(13,22,-1,0,15,ch201data);
+
+/* char: 0xc8 */
+
+static final byte[] ch200data = {
+(byte) 0xff,(byte) 0xf8,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x40,
+(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x30,
+(byte) 0xff,(byte) 0xf0,(byte) 0x0,(byte) 0x0,(byte) 0x1,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x1c,(byte) 0x0,(byte) 0x18,(byte) 0x0,
+};
+
+static final BitmapCharRec ch200 = new BitmapCharRec(13,22,-1,0,15,ch200data);
+
+/* char: 0xc7 */
+
+static final byte[] ch199data = {
+(byte) 0x7,(byte) 0x80,(byte) 0xc,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0x0,(byte) 0x1,(byte) 0x0,(byte) 0x7,(byte) 0xe0,(byte) 0x1e,(byte) 0x38,
+(byte) 0x38,(byte) 0x8,(byte) 0x60,(byte) 0x4,(byte) 0x60,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,
+(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x60,(byte) 0x4,(byte) 0x60,(byte) 0x4,(byte) 0x38,(byte) 0xc,(byte) 0x1c,(byte) 0x3c,(byte) 0x7,(byte) 0xe4,
+};
+
+static final BitmapCharRec ch199 = new BitmapCharRec(14,23,-1,6,16,ch199data);
+
+/* char: 0xc6 */
+
+static final byte[] ch198data = {
+(byte) 0xf9,(byte) 0xff,(byte) 0xf0,(byte) 0x30,(byte) 0x60,(byte) 0x30,(byte) 0x10,(byte) 0x60,(byte) 0x10,(byte) 0x10,(byte) 0x60,(byte) 0x10,(byte) 0x18,(byte) 0x60,(byte) 0x0,(byte) 0x8,
+(byte) 0x60,(byte) 0x0,(byte) 0xf,(byte) 0xe0,(byte) 0x80,(byte) 0xc,(byte) 0x60,(byte) 0x80,(byte) 0x4,(byte) 0x7f,(byte) 0x80,(byte) 0x4,(byte) 0x60,(byte) 0x80,(byte) 0x6,(byte) 0x60,
+(byte) 0x80,(byte) 0x2,(byte) 0x60,(byte) 0x0,(byte) 0x2,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0x60,(byte) 0x20,(byte) 0x1,(byte) 0x60,(byte) 0x20,(byte) 0x1,(byte) 0xe0,(byte) 0x60,
+(byte) 0x3,(byte) 0xff,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch198 = new BitmapCharRec(20,17,0,0,21,ch198data);
+
+/* char: 0xc5 */
+
+static final byte[] ch197data = {
+(byte) 0xfc,(byte) 0x1f,(byte) 0x80,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0xc,(byte) 0x0,(byte) 0x18,(byte) 0xc,(byte) 0x0,(byte) 0x8,
+(byte) 0xc,(byte) 0x0,(byte) 0xf,(byte) 0xf8,(byte) 0x0,(byte) 0xc,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x30,(byte) 0x0,(byte) 0x6,(byte) 0x30,
+(byte) 0x0,(byte) 0x2,(byte) 0x30,(byte) 0x0,(byte) 0x2,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,
+(byte) 0x0,(byte) 0x80,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,(byte) 0x2,(byte) 0x20,(byte) 0x0,(byte) 0x2,(byte) 0x20,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,
+};
+
+static final BitmapCharRec ch197 = new BitmapCharRec(17,21,0,0,17,ch197data);
+
+/* char: 0xc4 */
+
+static final byte[] ch196data = {
+(byte) 0xfc,(byte) 0x1f,(byte) 0x80,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0xc,(byte) 0x0,(byte) 0x18,(byte) 0xc,(byte) 0x0,(byte) 0x8,
+(byte) 0xc,(byte) 0x0,(byte) 0xf,(byte) 0xf8,(byte) 0x0,(byte) 0xc,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x30,(byte) 0x0,(byte) 0x6,(byte) 0x30,
+(byte) 0x0,(byte) 0x2,(byte) 0x30,(byte) 0x0,(byte) 0x2,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,
+(byte) 0x0,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x6,(byte) 0x30,(byte) 0x0,(byte) 0x6,(byte) 0x30,(byte) 0x0,
+};
+
+static final BitmapCharRec ch196 = new BitmapCharRec(17,21,0,0,17,ch196data);
+
+/* char: 0xc3 */
+
+static final byte[] ch195data = {
+(byte) 0xfc,(byte) 0x1f,(byte) 0x80,(byte) 0x30,(byte) 0x7,(byte) 0x0,(byte) 0x10,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0xc,(byte) 0x0,(byte) 0x18,(byte) 0xc,(byte) 0x0,(byte) 0x8,
+(byte) 0xc,(byte) 0x0,(byte) 0xf,(byte) 0xf8,(byte) 0x0,(byte) 0xc,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x30,(byte) 0x0,(byte) 0x6,(byte) 0x30,
+(byte) 0x0,(byte) 0x2,(byte) 0x30,(byte) 0x0,(byte) 0x2,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,
+(byte) 0x0,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x4,(byte) 0xe0,(byte) 0x0,(byte) 0x3,(byte) 0x90,(byte) 0x0,
+};
+
+static final BitmapCharRec ch195 = new BitmapCharRec(17,21,0,0,17,ch195data);
+
+/* char: 0xc2 */
+
+static final byte[] ch194data = {
+(byte) 0xfc,(byte) 0x1f,(byte) 0x80,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0xc,(byte) 0x0,(byte) 0x18,(byte) 0xc,(byte) 0x0,(byte) 0x8,
+(byte) 0xc,(byte) 0x0,(byte) 0xf,(byte) 0xf8,(byte) 0x0,(byte) 0xc,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x30,(byte) 0x0,(byte) 0x6,(byte) 0x30,
+(byte) 0x0,(byte) 0x2,(byte) 0x30,(byte) 0x0,(byte) 0x2,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,
+(byte) 0x0,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x8,(byte) 0x10,(byte) 0x0,(byte) 0x6,(byte) 0x60,(byte) 0x0,(byte) 0x3,(byte) 0xc0,(byte) 0x0,(byte) 0x1,
+(byte) 0x80,(byte) 0x0,
+};
+
+static final BitmapCharRec ch194 = new BitmapCharRec(17,22,0,0,17,ch194data);
+
+/* char: 0xc1 */
+
+static final byte[] ch193data = {
+(byte) 0xfc,(byte) 0x1f,(byte) 0x80,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0xc,(byte) 0x0,(byte) 0x18,(byte) 0xc,(byte) 0x0,(byte) 0x8,
+(byte) 0xc,(byte) 0x0,(byte) 0xf,(byte) 0xf8,(byte) 0x0,(byte) 0xc,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x30,(byte) 0x0,(byte) 0x6,(byte) 0x30,
+(byte) 0x0,(byte) 0x2,(byte) 0x30,(byte) 0x0,(byte) 0x2,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,
+(byte) 0x0,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x1,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x70,(byte) 0x0,(byte) 0x0,
+(byte) 0x30,(byte) 0x0,
+};
+
+static final BitmapCharRec ch193 = new BitmapCharRec(17,22,0,0,17,ch193data);
+
+/* char: 0xc0 */
+
+static final byte[] ch192data = {
+(byte) 0xfc,(byte) 0x1f,(byte) 0x80,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0xc,(byte) 0x0,(byte) 0x18,(byte) 0xc,(byte) 0x0,(byte) 0x8,
+(byte) 0xc,(byte) 0x0,(byte) 0xf,(byte) 0xf8,(byte) 0x0,(byte) 0xc,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x30,(byte) 0x0,(byte) 0x6,(byte) 0x30,
+(byte) 0x0,(byte) 0x2,(byte) 0x30,(byte) 0x0,(byte) 0x2,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,
+(byte) 0x0,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x20,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x3,(byte) 0x80,(byte) 0x0,(byte) 0x3,
+(byte) 0x0,(byte) 0x0,
+};
+
+static final BitmapCharRec ch192 = new BitmapCharRec(17,22,0,0,17,ch192data);
+
+/* char: 0xbf */
+
+static final byte[] ch191data = {
+(byte) 0x3e,(byte) 0x63,(byte) 0xc1,(byte) 0xc3,(byte) 0xc3,(byte) 0xe0,(byte) 0x70,(byte) 0x30,(byte) 0x38,(byte) 0x18,(byte) 0x18,(byte) 0x8,(byte) 0x8,(byte) 0x0,(byte) 0x0,(byte) 0xc,
+(byte) 0xc,
+};
+
+static final BitmapCharRec ch191 = new BitmapCharRec(8,17,-1,5,11,ch191data);
+
+/* char: 0xbe */
+
+static final byte[] ch190data = {
+(byte) 0x18,(byte) 0x2,(byte) 0x0,(byte) 0x8,(byte) 0x2,(byte) 0x0,(byte) 0xc,(byte) 0x7f,(byte) 0x80,(byte) 0x4,(byte) 0x22,(byte) 0x0,(byte) 0x6,(byte) 0x32,(byte) 0x0,(byte) 0x3,
+(byte) 0x12,(byte) 0x0,(byte) 0x1,(byte) 0xa,(byte) 0x0,(byte) 0x71,(byte) 0x8e,(byte) 0x0,(byte) 0x88,(byte) 0x86,(byte) 0x0,(byte) 0x8c,(byte) 0xc2,(byte) 0x0,(byte) 0xc,(byte) 0x60,
+(byte) 0x0,(byte) 0x8,(byte) 0x20,(byte) 0x0,(byte) 0x30,(byte) 0x30,(byte) 0x0,(byte) 0x8,(byte) 0x10,(byte) 0x0,(byte) 0x8c,(byte) 0x18,(byte) 0x0,(byte) 0x4c,(byte) 0xc,(byte) 0x0,
+(byte) 0x38,(byte) 0x4,(byte) 0x0,
+};
+
+static final BitmapCharRec ch190 = new BitmapCharRec(17,17,0,0,18,ch190data);
+
+/* char: 0xbd */
+
+static final byte[] ch189data = {
+(byte) 0x30,(byte) 0x7e,(byte) 0x10,(byte) 0x22,(byte) 0x18,(byte) 0x10,(byte) 0x8,(byte) 0x18,(byte) 0xc,(byte) 0x8,(byte) 0x6,(byte) 0x4,(byte) 0x2,(byte) 0x6,(byte) 0xfb,(byte) 0x46,
+(byte) 0x21,(byte) 0x26,(byte) 0x21,(byte) 0x9c,(byte) 0x20,(byte) 0xc0,(byte) 0x20,(byte) 0x40,(byte) 0x20,(byte) 0x60,(byte) 0x20,(byte) 0x20,(byte) 0xa0,(byte) 0x30,(byte) 0x60,(byte) 0x18,
+(byte) 0x20,(byte) 0x8,
+};
+
+static final BitmapCharRec ch189 = new BitmapCharRec(15,17,-1,0,18,ch189data);
+
+/* char: 0xbc */
+
+static final byte[] ch188data = {
+(byte) 0x30,(byte) 0x4,(byte) 0x10,(byte) 0x4,(byte) 0x18,(byte) 0xff,(byte) 0x8,(byte) 0x44,(byte) 0xc,(byte) 0x64,(byte) 0x6,(byte) 0x24,(byte) 0x2,(byte) 0x14,(byte) 0xfb,(byte) 0x1c,
+(byte) 0x21,(byte) 0xc,(byte) 0x21,(byte) 0x84,(byte) 0x20,(byte) 0xc0,(byte) 0x20,(byte) 0x40,(byte) 0x20,(byte) 0x60,(byte) 0x20,(byte) 0x20,(byte) 0xa0,(byte) 0x30,(byte) 0x60,(byte) 0x18,
+(byte) 0x20,(byte) 0x8,
+};
+
+static final BitmapCharRec ch188 = new BitmapCharRec(16,17,-1,0,18,ch188data);
+
+/* char: 0xbb */
+
+static final byte[] ch187data = {
+(byte) 0x88,(byte) 0x0,(byte) 0xcc,(byte) 0x0,(byte) 0x66,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0x33,(byte) 0x0,(byte) 0x66,(byte) 0x0,
+(byte) 0xcc,(byte) 0x0,(byte) 0x88,(byte) 0x0,
+};
+
+static final BitmapCharRec ch187 = new BitmapCharRec(9,10,-2,-1,12,ch187data);
+
+/* char: 0xba */
+
+static final byte[] ch186data = {
+(byte) 0xfc,(byte) 0x0,(byte) 0x78,(byte) 0xcc,(byte) 0xcc,(byte) 0xcc,(byte) 0xcc,(byte) 0xcc,(byte) 0x78,
+};
+
+static final BitmapCharRec ch186 = new BitmapCharRec(6,9,-1,-8,8,ch186data);
+
+/* char: 0xb9 */
+
+static final byte[] ch185data = {
+(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xa0,(byte) 0x60,(byte) 0x20,
+};
+
+static final BitmapCharRec ch185 = new BitmapCharRec(5,10,-1,-7,7,ch185data);
+
+/* char: 0xb8 */
+
+static final byte[] ch184data = {
+(byte) 0x78,(byte) 0xcc,(byte) 0xc,(byte) 0x3c,(byte) 0x30,(byte) 0x10,
+};
+
+static final BitmapCharRec ch184 = new BitmapCharRec(6,6,-1,6,8,ch184data);
+
+/* char: 0xb7 */
+
+static final byte[] ch183data = {
+(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch183 = new BitmapCharRec(2,2,-2,-6,6,ch183data);
+
+/* char: 0xb6 */
+
+static final byte[] ch182data = {
+(byte) 0x9,(byte) 0x0,(byte) 0x9,(byte) 0x0,(byte) 0x9,(byte) 0x0,(byte) 0x9,(byte) 0x0,(byte) 0x9,(byte) 0x0,(byte) 0x9,(byte) 0x0,(byte) 0x9,(byte) 0x0,(byte) 0x9,(byte) 0x0,
+(byte) 0x9,(byte) 0x0,(byte) 0x9,(byte) 0x0,(byte) 0x9,(byte) 0x0,(byte) 0x19,(byte) 0x0,(byte) 0x39,(byte) 0x0,(byte) 0x79,(byte) 0x0,(byte) 0x79,(byte) 0x0,(byte) 0xf9,(byte) 0x0,
+(byte) 0xf9,(byte) 0x0,(byte) 0xf9,(byte) 0x0,(byte) 0x79,(byte) 0x0,(byte) 0x79,(byte) 0x0,(byte) 0x39,(byte) 0x0,(byte) 0x1f,(byte) 0x80,
+};
+
+static final BitmapCharRec ch182 = new BitmapCharRec(9,22,-1,5,11,ch182data);
+
+/* char: 0xb5 */
+
+static final byte[] ch181data = {
+(byte) 0x40,(byte) 0x0,(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x40,(byte) 0x0,(byte) 0x40,(byte) 0x0,(byte) 0x5c,(byte) 0xe0,(byte) 0x7e,(byte) 0xc0,(byte) 0x71,(byte) 0xc0,
+(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,
+(byte) 0xe1,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch181 = new BitmapCharRec(11,17,-1,5,13,ch181data);
+
+/* char: 0xb4 */
+
+static final byte[] ch180data = {
+(byte) 0x80,(byte) 0x60,(byte) 0x38,(byte) 0x18,
+};
+
+static final BitmapCharRec ch180 = new BitmapCharRec(5,4,-2,-13,8,ch180data);
+
+/* char: 0xb3 */
+
+static final byte[] ch179data = {
+(byte) 0x70,(byte) 0x88,(byte) 0x8c,(byte) 0xc,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x8c,(byte) 0x4c,(byte) 0x38,
+};
+
+static final BitmapCharRec ch179 = new BitmapCharRec(6,10,0,-7,7,ch179data);
+
+/* char: 0xb2 */
+
+static final byte[] ch178data = {
+(byte) 0xfc,(byte) 0x44,(byte) 0x20,(byte) 0x30,(byte) 0x10,(byte) 0x8,(byte) 0xc,(byte) 0x8c,(byte) 0x4c,(byte) 0x38,
+};
+
+static final BitmapCharRec ch178 = new BitmapCharRec(6,10,0,-7,7,ch178data);
+
+/* char: 0xb1 */
+
+static final byte[] ch177data = {
+(byte) 0xff,(byte) 0xf0,(byte) 0xff,(byte) 0xf0,(byte) 0x0,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+(byte) 0xff,(byte) 0xf0,(byte) 0xff,(byte) 0xf0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+};
+
+static final BitmapCharRec ch177 = new BitmapCharRec(12,15,-1,0,14,ch177data);
+
+/* char: 0xb0 */
+
+static final byte[] ch176data = {
+(byte) 0x38,(byte) 0x44,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x38,
+};
+
+static final BitmapCharRec ch176 = new BitmapCharRec(7,7,-1,-10,9,ch176data);
+
+/* char: 0xaf */
+
+static final byte[] ch175data = {
+(byte) 0xfc,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch175 = new BitmapCharRec(6,2,-1,-14,8,ch175data);
+
+/* char: 0xae */
+
+static final byte[] ch174data = {
+(byte) 0x7,(byte) 0xf0,(byte) 0x0,(byte) 0x1c,(byte) 0x1c,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x60,(byte) 0x3,(byte) 0x0,(byte) 0x47,(byte) 0x19,(byte) 0x0,(byte) 0xc2,
+(byte) 0x31,(byte) 0x80,(byte) 0x82,(byte) 0x20,(byte) 0x80,(byte) 0x82,(byte) 0x40,(byte) 0x80,(byte) 0x83,(byte) 0xe0,(byte) 0x80,(byte) 0x82,(byte) 0x30,(byte) 0x80,(byte) 0x82,(byte) 0x10,
+(byte) 0x80,(byte) 0xc2,(byte) 0x11,(byte) 0x80,(byte) 0x42,(byte) 0x31,(byte) 0x0,(byte) 0x67,(byte) 0xe3,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x1c,(byte) 0x1c,(byte) 0x0,
+(byte) 0x7,(byte) 0xf0,(byte) 0x0,
+};
+
+static final BitmapCharRec ch174 = new BitmapCharRec(17,17,-1,0,19,ch174data);
+
+/* char: 0xad */
+
+static final byte[] ch173data = {
+(byte) 0xfe,(byte) 0xfe,
+};
+
+static final BitmapCharRec ch173 = new BitmapCharRec(7,2,-1,-5,9,ch173data);
+
+/* char: 0xac */
+
+static final byte[] ch172data = {
+(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0xff,(byte) 0xf0,(byte) 0xff,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch172 = new BitmapCharRec(12,7,-1,-3,14,ch172data);
+
+/* char: 0xab */
+
+static final byte[] ch171data = {
+(byte) 0x8,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0x33,(byte) 0x0,(byte) 0x66,(byte) 0x0,(byte) 0xcc,(byte) 0x0,(byte) 0xcc,(byte) 0x0,(byte) 0x66,(byte) 0x0,(byte) 0x33,(byte) 0x0,
+(byte) 0x19,(byte) 0x80,(byte) 0x8,(byte) 0x80,
+};
+
+static final BitmapCharRec ch171 = new BitmapCharRec(9,10,-2,-1,13,ch171data);
+
+/* char: 0xaa */
+
+static final byte[] ch170data = {
+(byte) 0x7e,(byte) 0x0,(byte) 0x76,(byte) 0xcc,(byte) 0xcc,(byte) 0x7c,(byte) 0xc,(byte) 0xcc,(byte) 0x78,
+};
+
+static final BitmapCharRec ch170 = new BitmapCharRec(7,9,0,-8,8,ch170data);
+
+/* char: 0xa9 */
+
+static final byte[] ch169data = {
+(byte) 0x7,(byte) 0xf0,(byte) 0x0,(byte) 0x1c,(byte) 0x1c,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x61,(byte) 0xc3,(byte) 0x0,(byte) 0x47,(byte) 0x71,(byte) 0x0,(byte) 0xc4,
+(byte) 0x19,(byte) 0x80,(byte) 0x8c,(byte) 0x0,(byte) 0x80,(byte) 0x88,(byte) 0x0,(byte) 0x80,(byte) 0x88,(byte) 0x0,(byte) 0x80,(byte) 0x88,(byte) 0x0,(byte) 0x80,(byte) 0x8c,(byte) 0x0,
+(byte) 0x80,(byte) 0xc4,(byte) 0x19,(byte) 0x80,(byte) 0x47,(byte) 0x31,(byte) 0x0,(byte) 0x61,(byte) 0xe3,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x1c,(byte) 0x1c,(byte) 0x0,
+(byte) 0x7,(byte) 0xf0,(byte) 0x0,
+};
+
+static final BitmapCharRec ch169 = new BitmapCharRec(17,17,-1,0,19,ch169data);
+
+/* char: 0xa8 */
+
+static final byte[] ch168data = {
+(byte) 0xcc,(byte) 0xcc,
+};
+
+static final BitmapCharRec ch168 = new BitmapCharRec(6,2,-1,-14,8,ch168data);
+
+/* char: 0xa7 */
+
+static final byte[] ch167data = {
+(byte) 0x38,(byte) 0x64,(byte) 0x62,(byte) 0x6,(byte) 0xe,(byte) 0x1c,(byte) 0x38,(byte) 0x74,(byte) 0xe2,(byte) 0xc3,(byte) 0x83,(byte) 0x87,(byte) 0x4e,(byte) 0x3c,(byte) 0x38,(byte) 0x70,
+(byte) 0x60,(byte) 0x46,(byte) 0x26,(byte) 0x1c,
+};
+
+static final BitmapCharRec ch167 = new BitmapCharRec(8,20,-2,2,12,ch167data);
+
+/* char: 0xa6 */
+
+static final byte[] ch166data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xc0,
+};
+
+static final BitmapCharRec ch166 = new BitmapCharRec(2,17,-2,0,6,ch166data);
+
+/* char: 0xa5 */
+
+static final byte[] ch165data = {
+(byte) 0xf,(byte) 0xc0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x1f,(byte) 0xe0,(byte) 0x3,(byte) 0x0,(byte) 0x1f,(byte) 0xe0,
+(byte) 0x3,(byte) 0x0,(byte) 0x7,(byte) 0x80,(byte) 0xc,(byte) 0x80,(byte) 0xc,(byte) 0xc0,(byte) 0x18,(byte) 0x40,(byte) 0x18,(byte) 0x60,(byte) 0x30,(byte) 0x20,(byte) 0x70,(byte) 0x30,
+(byte) 0xf8,(byte) 0x7c,
+};
+
+static final BitmapCharRec ch165 = new BitmapCharRec(14,17,0,0,14,ch165data);
+
+/* char: 0xa4 */
+
+static final byte[] ch164data = {
+(byte) 0xc0,(byte) 0x60,(byte) 0xee,(byte) 0xe0,(byte) 0x7f,(byte) 0xc0,(byte) 0x31,(byte) 0x80,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,
+(byte) 0x31,(byte) 0x80,(byte) 0x7f,(byte) 0xc0,(byte) 0xee,(byte) 0xe0,(byte) 0xc0,(byte) 0x60,
+};
+
+static final BitmapCharRec ch164 = new BitmapCharRec(11,12,-1,-3,13,ch164data);
+
+/* char: 0xa3 */
+
+static final byte[] ch163data = {
+(byte) 0xe7,(byte) 0x80,(byte) 0xbe,(byte) 0xc0,(byte) 0x78,(byte) 0x40,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,
+(byte) 0x30,(byte) 0x0,(byte) 0xfc,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x31,(byte) 0x80,(byte) 0x19,(byte) 0x80,
+(byte) 0xf,(byte) 0x0,
+};
+
+static final BitmapCharRec ch163 = new BitmapCharRec(10,17,-1,0,12,ch163data);
+
+/* char: 0xa2 */
+
+static final byte[] ch162data = {
+(byte) 0x40,(byte) 0x0,(byte) 0x40,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x70,(byte) 0x80,(byte) 0xd0,(byte) 0x0,(byte) 0xc8,(byte) 0x0,(byte) 0xc8,(byte) 0x0,
+(byte) 0xc8,(byte) 0x0,(byte) 0xc4,(byte) 0x0,(byte) 0xc4,(byte) 0x0,(byte) 0x43,(byte) 0x80,(byte) 0x63,(byte) 0x80,(byte) 0x1f,(byte) 0x0,(byte) 0x1,(byte) 0x0,(byte) 0x1,(byte) 0x0,
+};
+
+static final BitmapCharRec ch162 = new BitmapCharRec(9,16,-1,2,12,ch162data);
+
+/* char: 0xa1 */
+
+static final byte[] ch161data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,
+(byte) 0xc0,
+};
+
+static final BitmapCharRec ch161 = new BitmapCharRec(2,17,-4,5,8,ch161data);
+
+/* char: 0xa0 */
+
+static final BitmapCharRec ch160 = new BitmapCharRec(0,0,0,0,6,null);
+
+/* char: 0x7e '~' */
+
+static final byte[] ch126data = {
+(byte) 0x83,(byte) 0x80,(byte) 0xc7,(byte) 0xc0,(byte) 0x7c,(byte) 0x60,(byte) 0x38,(byte) 0x20,
+};
+
+static final BitmapCharRec ch126 = new BitmapCharRec(11,4,-1,-5,13,ch126data);
+
+/* char: 0x7d '}' */
+
+static final byte[] ch125data = {
+(byte) 0xe0,(byte) 0x30,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x8,(byte) 0xc,(byte) 0x4,(byte) 0x3,(byte) 0x4,(byte) 0xc,(byte) 0x8,(byte) 0x18,
+(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x30,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch125 = new BitmapCharRec(8,22,-1,5,10,ch125data);
+
+/* char: 0x7c '|' */
+
+static final byte[] ch124data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xc0,
+};
+
+static final BitmapCharRec ch124 = new BitmapCharRec(2,17,-2,0,6,ch124data);
+
+/* char: 0x7b '{' */
+
+static final byte[] ch123data = {
+(byte) 0x7,(byte) 0xc,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x10,(byte) 0x30,(byte) 0x20,(byte) 0xc0,(byte) 0x20,(byte) 0x30,(byte) 0x10,(byte) 0x18,
+(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0xc,(byte) 0x7,
+};
+
+static final BitmapCharRec ch123 = new BitmapCharRec(8,22,-1,5,10,ch123data);
+
+/* char: 0x7a 'z' */
+
+static final byte[] ch122data = {
+(byte) 0xff,(byte) 0xc3,(byte) 0x61,(byte) 0x70,(byte) 0x30,(byte) 0x38,(byte) 0x18,(byte) 0x1c,(byte) 0xe,(byte) 0x86,(byte) 0xc3,(byte) 0xff,
+};
+
+static final BitmapCharRec ch122 = new BitmapCharRec(8,12,-1,0,10,ch122data);
+
+/* char: 0x79 'y' */
+
+static final byte[] ch121data = {
+(byte) 0xe0,(byte) 0x0,(byte) 0xf0,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x4,(byte) 0x0,(byte) 0xe,(byte) 0x0,(byte) 0xe,(byte) 0x0,
+(byte) 0x1a,(byte) 0x0,(byte) 0x19,(byte) 0x0,(byte) 0x19,(byte) 0x0,(byte) 0x31,(byte) 0x0,(byte) 0x30,(byte) 0x80,(byte) 0x30,(byte) 0x80,(byte) 0x60,(byte) 0x80,(byte) 0x60,(byte) 0xc0,
+(byte) 0xf1,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch121 = new BitmapCharRec(11,17,0,5,11,ch121data);
+
+/* char: 0x78 'x' */
+
+static final byte[] ch120data = {
+(byte) 0xf1,(byte) 0xe0,(byte) 0x60,(byte) 0xc0,(byte) 0x21,(byte) 0x80,(byte) 0x33,(byte) 0x80,(byte) 0x1b,(byte) 0x0,(byte) 0xe,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x1a,(byte) 0x0,
+(byte) 0x39,(byte) 0x0,(byte) 0x31,(byte) 0x80,(byte) 0x60,(byte) 0xc0,(byte) 0xf1,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch120 = new BitmapCharRec(11,12,-1,0,13,ch120data);
+
+/* char: 0x77 'w' */
+
+static final byte[] ch119data = {
+(byte) 0x4,(byte) 0x10,(byte) 0x0,(byte) 0xe,(byte) 0x38,(byte) 0x0,(byte) 0xe,(byte) 0x38,(byte) 0x0,(byte) 0x1a,(byte) 0x28,(byte) 0x0,(byte) 0x1a,(byte) 0x64,(byte) 0x0,(byte) 0x19,
+(byte) 0x64,(byte) 0x0,(byte) 0x31,(byte) 0x64,(byte) 0x0,(byte) 0x30,(byte) 0xc2,(byte) 0x0,(byte) 0x30,(byte) 0xc2,(byte) 0x0,(byte) 0x60,(byte) 0xc2,(byte) 0x0,(byte) 0x60,(byte) 0xc3,
+(byte) 0x0,(byte) 0xf1,(byte) 0xe7,(byte) 0x80,
+};
+
+static final BitmapCharRec ch119 = new BitmapCharRec(17,12,0,0,17,ch119data);
+
+/* char: 0x76 'v' */
+
+static final byte[] ch118data = {
+(byte) 0x4,(byte) 0x0,(byte) 0xe,(byte) 0x0,(byte) 0xe,(byte) 0x0,(byte) 0x1a,(byte) 0x0,(byte) 0x19,(byte) 0x0,(byte) 0x19,(byte) 0x0,(byte) 0x31,(byte) 0x0,(byte) 0x30,(byte) 0x80,
+(byte) 0x30,(byte) 0x80,(byte) 0x60,(byte) 0x80,(byte) 0x60,(byte) 0xc0,(byte) 0xf1,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch118 = new BitmapCharRec(11,12,0,0,11,ch118data);
+
+/* char: 0x75 'u' */
+
+static final byte[] ch117data = {
+(byte) 0x1c,(byte) 0xe0,(byte) 0x3e,(byte) 0xc0,(byte) 0x71,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,
+(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xe1,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch117 = new BitmapCharRec(11,12,-1,0,13,ch117data);
+
+/* char: 0x74 't' */
+
+static final byte[] ch116data = {
+(byte) 0x1c,(byte) 0x32,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0xfe,(byte) 0x70,(byte) 0x30,(byte) 0x10,
+};
+
+static final BitmapCharRec ch116 = new BitmapCharRec(7,15,0,0,7,ch116data);
+
+/* char: 0x73 's' */
+
+static final byte[] ch115data = {
+(byte) 0xf8,(byte) 0xc6,(byte) 0x83,(byte) 0x3,(byte) 0x7,(byte) 0x1e,(byte) 0x7c,(byte) 0x70,(byte) 0xe0,(byte) 0xc2,(byte) 0x66,(byte) 0x3e,
+};
+
+static final BitmapCharRec ch115 = new BitmapCharRec(8,12,-1,0,10,ch115data);
+
+/* char: 0x72 'r' */
+
+static final byte[] ch114data = {
+(byte) 0xf0,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x76,(byte) 0x6e,(byte) 0xe6,
+};
+
+static final BitmapCharRec ch114 = new BitmapCharRec(7,12,-1,0,8,ch114data);
+
+/* char: 0x71 'q' */
+
+static final byte[] ch113data = {
+(byte) 0x3,(byte) 0xc0,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1d,(byte) 0x80,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,
+(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,
+(byte) 0x1d,(byte) 0x80,
+};
+
+static final BitmapCharRec ch113 = new BitmapCharRec(10,17,-1,5,12,ch113data);
+
+/* char: 0x70 'p' */
+
+static final byte[] ch112data = {
+(byte) 0xf0,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x6e,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,
+(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,
+(byte) 0xee,(byte) 0x0,
+};
+
+static final BitmapCharRec ch112 = new BitmapCharRec(10,17,-1,5,12,ch112data);
+
+/* char: 0x6f 'o' */
+
+static final byte[] ch111data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xc0,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,(byte) 0x1e,(byte) 0x0,
+};
+
+static final BitmapCharRec ch111 = new BitmapCharRec(10,12,-1,0,12,ch111data);
+
+/* char: 0x6e 'n' */
+
+static final byte[] ch110data = {
+(byte) 0xf1,(byte) 0xe0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,
+(byte) 0x60,(byte) 0xc0,(byte) 0x71,(byte) 0xc0,(byte) 0x6f,(byte) 0x80,(byte) 0xe7,(byte) 0x0,
+};
+
+static final BitmapCharRec ch110 = new BitmapCharRec(11,12,-1,0,13,ch110data);
+
+/* char: 0x6d 'm' */
+
+static final byte[] ch109data = {
+(byte) 0xf1,(byte) 0xe3,(byte) 0xc0,(byte) 0x60,(byte) 0xc1,(byte) 0x80,(byte) 0x60,(byte) 0xc1,(byte) 0x80,(byte) 0x60,(byte) 0xc1,(byte) 0x80,(byte) 0x60,(byte) 0xc1,(byte) 0x80,(byte) 0x60,
+(byte) 0xc1,(byte) 0x80,(byte) 0x60,(byte) 0xc1,(byte) 0x80,(byte) 0x60,(byte) 0xc1,(byte) 0x80,(byte) 0x60,(byte) 0xc1,(byte) 0x80,(byte) 0x71,(byte) 0xe3,(byte) 0x80,(byte) 0x6f,(byte) 0x9f,
+(byte) 0x0,(byte) 0xe7,(byte) 0xe,(byte) 0x0,
+};
+
+static final BitmapCharRec ch109 = new BitmapCharRec(18,12,-1,0,20,ch109data);
+
+/* char: 0x6c 'l' */
+
+static final byte[] ch108data = {
+(byte) 0xf0,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,
+(byte) 0xe0,
+};
+
+static final BitmapCharRec ch108 = new BitmapCharRec(4,17,-1,0,6,ch108data);
+
+/* char: 0x6b 'k' */
+
+static final byte[] ch107data = {
+(byte) 0xf3,(byte) 0xe0,(byte) 0x61,(byte) 0xc0,(byte) 0x63,(byte) 0x80,(byte) 0x67,(byte) 0x0,(byte) 0x6e,(byte) 0x0,(byte) 0x6c,(byte) 0x0,(byte) 0x78,(byte) 0x0,(byte) 0x68,(byte) 0x0,
+(byte) 0x64,(byte) 0x0,(byte) 0x66,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x67,(byte) 0xc0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,
+(byte) 0xe0,(byte) 0x0,
+};
+
+static final BitmapCharRec ch107 = new BitmapCharRec(11,17,-1,0,12,ch107data);
+
+/* char: 0x6a 'j' */
+
+static final byte[] ch106data = {
+(byte) 0xc0,(byte) 0xe0,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,
+(byte) 0x70,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x30,(byte) 0x30,
+};
+
+static final BitmapCharRec ch106 = new BitmapCharRec(4,22,0,5,6,ch106data);
+
+/* char: 0x69 'i' */
+
+static final byte[] ch105data = {
+(byte) 0xf0,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x60,
+(byte) 0x60,
+};
+
+static final BitmapCharRec ch105 = new BitmapCharRec(4,17,-1,0,6,ch105data);
+
+/* char: 0x68 'h' */
+
+static final byte[] ch104data = {
+(byte) 0xf1,(byte) 0xe0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,
+(byte) 0x60,(byte) 0xc0,(byte) 0x71,(byte) 0xc0,(byte) 0x6f,(byte) 0x80,(byte) 0x67,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,
+(byte) 0xe0,(byte) 0x0,
+};
+
+static final BitmapCharRec ch104 = new BitmapCharRec(11,17,-1,0,13,ch104data);
+
+/* char: 0x67 'g' */
+
+static final byte[] ch103data = {
+(byte) 0x3f,(byte) 0x0,(byte) 0xf1,(byte) 0xc0,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x20,(byte) 0x60,(byte) 0x60,(byte) 0x3f,(byte) 0xc0,(byte) 0x7f,(byte) 0x0,(byte) 0x60,(byte) 0x0,
+(byte) 0x30,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x33,(byte) 0x0,
+(byte) 0x1f,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch103 = new BitmapCharRec(11,17,-1,5,12,ch103data);
+
+/* char: 0x66 'f' */
+
+static final byte[] ch102data = {
+(byte) 0x78,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0xfe,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x16,
+(byte) 0xe,
+};
+
+static final BitmapCharRec ch102 = new BitmapCharRec(7,17,0,0,7,ch102data);
+
+/* char: 0x65 'e' */
+
+static final byte[] ch101data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x70,(byte) 0x80,(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x80,
+(byte) 0xc1,(byte) 0x80,(byte) 0x41,(byte) 0x80,(byte) 0x63,(byte) 0x0,(byte) 0x1e,(byte) 0x0,
+};
+
+static final BitmapCharRec ch101 = new BitmapCharRec(9,12,-1,0,11,ch101data);
+
+/* char: 0x64 'd' */
+
+static final byte[] ch100data = {
+(byte) 0x1e,(byte) 0xc0,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,
+(byte) 0xc1,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,(byte) 0x1d,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,
+(byte) 0x3,(byte) 0x80,
+};
+
+static final BitmapCharRec ch100 = new BitmapCharRec(10,17,-1,0,12,ch100data);
+
+/* char: 0x63 'c' */
+
+static final byte[] ch99data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x70,(byte) 0x80,(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,
+(byte) 0xc0,(byte) 0x0,(byte) 0x41,(byte) 0x80,(byte) 0x63,(byte) 0x80,(byte) 0x1f,(byte) 0x0,
+};
+
+static final BitmapCharRec ch99 = new BitmapCharRec(9,12,-1,0,11,ch99data);
+
+/* char: 0x62 'b' */
+
+static final byte[] ch98data = {
+(byte) 0x5e,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,
+(byte) 0x60,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,(byte) 0x6e,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,
+(byte) 0xe0,(byte) 0x0,
+};
+
+static final BitmapCharRec ch98 = new BitmapCharRec(10,17,-1,0,12,ch98data);
+
+/* char: 0x61 'a' */
+
+static final byte[] ch97data = {
+(byte) 0x71,(byte) 0x80,(byte) 0xfb,(byte) 0x0,(byte) 0xc7,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x3b,(byte) 0x0,(byte) 0xf,(byte) 0x0,
+(byte) 0x3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x67,(byte) 0x0,(byte) 0x3e,(byte) 0x0,
+};
+
+static final BitmapCharRec ch97 = new BitmapCharRec(9,12,-1,0,11,ch97data);
+
+/* char: 0x60 '`' */
+
+static final byte[] ch96data = {
+(byte) 0x60,(byte) 0xe0,(byte) 0x80,(byte) 0xc0,(byte) 0x60,
+};
+
+static final BitmapCharRec ch96 = new BitmapCharRec(3,5,-2,-12,7,ch96data);
+
+/* char: 0x5f '_' */
+
+static final byte[] ch95data = {
+(byte) 0xff,(byte) 0xf8,(byte) 0xff,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch95 = new BitmapCharRec(13,2,0,5,13,ch95data);
+
+/* char: 0x5e '^' */
+
+static final byte[] ch94data = {
+(byte) 0x80,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x41,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0x36,(byte) 0x0,(byte) 0x14,(byte) 0x0,(byte) 0x1c,(byte) 0x0,
+(byte) 0x8,(byte) 0x0,
+};
+
+static final BitmapCharRec ch94 = new BitmapCharRec(9,9,-1,-8,11,ch94data);
+
+/* char: 0x5d ']' */
+
+static final byte[] ch93data = {
+(byte) 0xf8,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,
+(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch93 = new BitmapCharRec(5,21,-1,4,8,ch93data);
+
+/* char: 0x5c '\' */
+
+static final byte[] ch92data = {
+(byte) 0x6,(byte) 0x6,(byte) 0x4,(byte) 0xc,(byte) 0xc,(byte) 0x8,(byte) 0x18,(byte) 0x18,(byte) 0x10,(byte) 0x30,(byte) 0x30,(byte) 0x20,(byte) 0x60,(byte) 0x60,(byte) 0x40,(byte) 0xc0,
+(byte) 0xc0,
+};
+
+static final BitmapCharRec ch92 = new BitmapCharRec(7,17,0,0,7,ch92data);
+
+/* char: 0x5b '[' */
+
+static final byte[] ch91data = {
+(byte) 0xf8,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch91 = new BitmapCharRec(5,21,-2,4,8,ch91data);
+
+/* char: 0x5a 'Z' */
+
+static final byte[] ch90data = {
+(byte) 0xff,(byte) 0xf8,(byte) 0xe0,(byte) 0x18,(byte) 0x70,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x38,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x1c,(byte) 0x0,(byte) 0xe,(byte) 0x0,
+(byte) 0x6,(byte) 0x0,(byte) 0x7,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x80,(byte) 0x1,(byte) 0xc0,(byte) 0x80,(byte) 0xc0,(byte) 0x80,(byte) 0xe0,(byte) 0xc0,(byte) 0x70,
+(byte) 0xff,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch90 = new BitmapCharRec(13,17,-1,0,15,ch90data);
+
+/* char: 0x59 'Y' */
+
+static final byte[] ch89data = {
+(byte) 0x7,(byte) 0xe0,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x3,(byte) 0xc0,
+(byte) 0x3,(byte) 0x40,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0x20,(byte) 0xc,(byte) 0x30,(byte) 0x1c,(byte) 0x10,(byte) 0x18,(byte) 0x18,(byte) 0x38,(byte) 0x8,(byte) 0x30,(byte) 0xc,
+(byte) 0xfc,(byte) 0x3f,
+};
+
+static final BitmapCharRec ch89 = new BitmapCharRec(16,17,0,0,16,ch89data);
+
+/* char: 0x58 'X' */
+
+static final byte[] ch88data = {
+(byte) 0xfc,(byte) 0xf,(byte) 0xc0,(byte) 0x30,(byte) 0x3,(byte) 0x80,(byte) 0x18,(byte) 0x7,(byte) 0x0,(byte) 0x8,(byte) 0xe,(byte) 0x0,(byte) 0x4,(byte) 0xc,(byte) 0x0,(byte) 0x6,
+(byte) 0x18,(byte) 0x0,(byte) 0x2,(byte) 0x38,(byte) 0x0,(byte) 0x1,(byte) 0x70,(byte) 0x0,(byte) 0x0,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x1,(byte) 0xc0,
+(byte) 0x0,(byte) 0x3,(byte) 0xa0,(byte) 0x0,(byte) 0x3,(byte) 0x10,(byte) 0x0,(byte) 0x6,(byte) 0x8,(byte) 0x0,(byte) 0xe,(byte) 0xc,(byte) 0x0,(byte) 0x1c,(byte) 0x6,(byte) 0x0,
+(byte) 0x7e,(byte) 0xf,(byte) 0x80,
+};
+
+static final BitmapCharRec ch88 = new BitmapCharRec(18,17,0,0,18,ch88data);
+
+/* char: 0x57 'W' */
+
+static final byte[] ch87data = {
+(byte) 0x1,(byte) 0x83,(byte) 0x0,(byte) 0x1,(byte) 0x83,(byte) 0x0,(byte) 0x1,(byte) 0x83,(byte) 0x80,(byte) 0x3,(byte) 0x87,(byte) 0x80,(byte) 0x3,(byte) 0x46,(byte) 0x80,(byte) 0x3,
+(byte) 0x46,(byte) 0xc0,(byte) 0x6,(byte) 0x46,(byte) 0x40,(byte) 0x6,(byte) 0x4c,(byte) 0x40,(byte) 0x6,(byte) 0x4c,(byte) 0x60,(byte) 0xc,(byte) 0x2c,(byte) 0x60,(byte) 0xc,(byte) 0x2c,
+(byte) 0x20,(byte) 0x18,(byte) 0x2c,(byte) 0x20,(byte) 0x18,(byte) 0x18,(byte) 0x30,(byte) 0x18,(byte) 0x18,(byte) 0x10,(byte) 0x30,(byte) 0x18,(byte) 0x10,(byte) 0x30,(byte) 0x18,(byte) 0x18,
+(byte) 0xfc,(byte) 0x7e,(byte) 0x7e,
+};
+
+static final BitmapCharRec ch87 = new BitmapCharRec(23,17,0,0,23,ch87data);
+
+/* char: 0x56 'V' */
+
+static final byte[] ch86data = {
+(byte) 0x1,(byte) 0x80,(byte) 0x0,(byte) 0x1,(byte) 0x80,(byte) 0x0,(byte) 0x1,(byte) 0x80,(byte) 0x0,(byte) 0x3,(byte) 0xc0,(byte) 0x0,(byte) 0x3,(byte) 0x40,(byte) 0x0,(byte) 0x3,
+(byte) 0x60,(byte) 0x0,(byte) 0x6,(byte) 0x20,(byte) 0x0,(byte) 0x6,(byte) 0x20,(byte) 0x0,(byte) 0x6,(byte) 0x30,(byte) 0x0,(byte) 0xc,(byte) 0x10,(byte) 0x0,(byte) 0xc,(byte) 0x18,
+(byte) 0x0,(byte) 0x18,(byte) 0x8,(byte) 0x0,(byte) 0x18,(byte) 0x8,(byte) 0x0,(byte) 0x18,(byte) 0xc,(byte) 0x0,(byte) 0x30,(byte) 0x4,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,
+(byte) 0xfc,(byte) 0x1f,(byte) 0x80,
+};
+
+static final BitmapCharRec ch86 = new BitmapCharRec(17,17,0,0,17,ch86data);
+
+/* char: 0x55 'U' */
+
+static final byte[] ch85data = {
+(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x30,(byte) 0x18,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,
+(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,
+(byte) 0xfc,(byte) 0x1f,
+};
+
+static final BitmapCharRec ch85 = new BitmapCharRec(16,17,-1,0,18,ch85data);
+
+/* char: 0x54 'T' */
+
+static final byte[] ch84data = {
+(byte) 0xf,(byte) 0xc0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,
+(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x83,(byte) 0x4,(byte) 0x83,(byte) 0x4,(byte) 0xc3,(byte) 0xc,
+(byte) 0xff,(byte) 0xfc,
+};
+
+static final BitmapCharRec ch84 = new BitmapCharRec(14,17,-1,0,16,ch84data);
+
+/* char: 0x53 'S' */
+
+static final byte[] ch83data = {
+(byte) 0x9e,(byte) 0x0,(byte) 0xf1,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0x80,(byte) 0x60,(byte) 0x80,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0xe0,(byte) 0x3,(byte) 0xc0,
+(byte) 0xf,(byte) 0x80,(byte) 0x1e,(byte) 0x0,(byte) 0x78,(byte) 0x0,(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x40,(byte) 0xc0,(byte) 0x40,(byte) 0xc0,(byte) 0xc0,(byte) 0x63,(byte) 0xc0,
+(byte) 0x1e,(byte) 0x40,
+};
+
+static final BitmapCharRec ch83 = new BitmapCharRec(11,17,-1,0,13,ch83data);
+
+/* char: 0x52 'R' */
+
+static final byte[] ch82data = {
+(byte) 0xfc,(byte) 0x1e,(byte) 0x30,(byte) 0x1c,(byte) 0x30,(byte) 0x38,(byte) 0x30,(byte) 0x70,(byte) 0x30,(byte) 0x60,(byte) 0x30,(byte) 0xc0,(byte) 0x31,(byte) 0xc0,(byte) 0x33,(byte) 0x80,
+(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0x70,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x38,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x38,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x70,
+(byte) 0xff,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch82 = new BitmapCharRec(15,17,-1,0,16,ch82data);
+
+/* char: 0x51 'Q' */
+
+static final byte[] ch81data = {
+(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x38,(byte) 0x0,(byte) 0x70,(byte) 0x0,(byte) 0xe0,(byte) 0x1,(byte) 0xc0,(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x38,(byte) 0x38,(byte) 0x1c,
+(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,
+(byte) 0xc0,(byte) 0x3,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0x38,(byte) 0x1c,(byte) 0x1c,(byte) 0x38,(byte) 0x7,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch81 = new BitmapCharRec(16,22,-1,5,18,ch81data);
+
+/* char: 0x50 'P' */
+
+static final byte[] ch80data = {
+(byte) 0xfc,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,
+(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0x70,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x70,
+(byte) 0xff,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch80 = new BitmapCharRec(13,17,-1,0,15,ch80data);
+
+/* char: 0x4f 'O' */
+
+static final byte[] ch79data = {
+(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x38,(byte) 0x38,(byte) 0x1c,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,
+(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0x38,(byte) 0x1c,(byte) 0x1c,(byte) 0x38,
+(byte) 0x7,(byte) 0xe0,
+};
+
+static final BitmapCharRec ch79 = new BitmapCharRec(16,17,-1,0,18,ch79data);
+
+/* char: 0x4e 'N' */
+
+static final byte[] ch78data = {
+(byte) 0xf8,(byte) 0xc,(byte) 0x20,(byte) 0x1c,(byte) 0x20,(byte) 0x1c,(byte) 0x20,(byte) 0x34,(byte) 0x20,(byte) 0x64,(byte) 0x20,(byte) 0x64,(byte) 0x20,(byte) 0xc4,(byte) 0x21,(byte) 0x84,
+(byte) 0x21,(byte) 0x84,(byte) 0x23,(byte) 0x4,(byte) 0x26,(byte) 0x4,(byte) 0x26,(byte) 0x4,(byte) 0x2c,(byte) 0x4,(byte) 0x38,(byte) 0x4,(byte) 0x38,(byte) 0x4,(byte) 0x30,(byte) 0x4,
+(byte) 0xf0,(byte) 0x1f,
+};
+
+static final BitmapCharRec ch78 = new BitmapCharRec(16,17,-1,0,18,ch78data);
+
+/* char: 0x4d 'M' */
+
+static final byte[] ch77data = {
+(byte) 0xf8,(byte) 0x21,(byte) 0xf8,(byte) 0x20,(byte) 0x60,(byte) 0x60,(byte) 0x20,(byte) 0x60,(byte) 0x60,(byte) 0x20,(byte) 0xd0,(byte) 0x60,(byte) 0x20,(byte) 0xd0,(byte) 0x60,(byte) 0x21,
+(byte) 0x88,(byte) 0x60,(byte) 0x21,(byte) 0x88,(byte) 0x60,(byte) 0x23,(byte) 0x8,(byte) 0x60,(byte) 0x23,(byte) 0x4,(byte) 0x60,(byte) 0x26,(byte) 0x4,(byte) 0x60,(byte) 0x26,(byte) 0x2,
+(byte) 0x60,(byte) 0x2c,(byte) 0x2,(byte) 0x60,(byte) 0x2c,(byte) 0x2,(byte) 0x60,(byte) 0x38,(byte) 0x1,(byte) 0x60,(byte) 0x38,(byte) 0x1,(byte) 0x60,(byte) 0x30,(byte) 0x0,(byte) 0xe0,
+(byte) 0xf0,(byte) 0x0,(byte) 0xf8,
+};
+
+static final BitmapCharRec ch77 = new BitmapCharRec(21,17,-1,0,22,ch77data);
+
+/* char: 0x4c 'L' */
+
+static final byte[] ch76data = {
+(byte) 0xff,(byte) 0xf8,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,
+(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,
+(byte) 0xfc,(byte) 0x0,
+};
+
+static final BitmapCharRec ch76 = new BitmapCharRec(13,17,-1,0,14,ch76data);
+
+/* char: 0x4b 'K' */
+
+static final byte[] ch75data = {
+(byte) 0xfc,(byte) 0x1f,(byte) 0x30,(byte) 0xe,(byte) 0x30,(byte) 0x1c,(byte) 0x30,(byte) 0x38,(byte) 0x30,(byte) 0x70,(byte) 0x30,(byte) 0xe0,(byte) 0x31,(byte) 0xc0,(byte) 0x33,(byte) 0x80,
+(byte) 0x3f,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x31,(byte) 0x80,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0x60,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x18,
+(byte) 0xfc,(byte) 0x7e,
+};
+
+static final BitmapCharRec ch75 = new BitmapCharRec(16,17,-1,0,17,ch75data);
+
+/* char: 0x4a 'J' */
+
+static final byte[] ch74data = {
+(byte) 0x78,(byte) 0x0,(byte) 0xcc,(byte) 0x0,(byte) 0xc6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+(byte) 0x1f,(byte) 0x80,
+};
+
+static final BitmapCharRec ch74 = new BitmapCharRec(9,17,-1,0,11,ch74data);
+
+/* char: 0x49 'I' */
+
+static final byte[] ch73data = {
+(byte) 0xfc,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,
+(byte) 0xfc,
+};
+
+static final BitmapCharRec ch73 = new BitmapCharRec(6,17,-1,0,8,ch73data);
+
+/* char: 0x48 'H' */
+
+static final byte[] ch72data = {
+(byte) 0xfc,(byte) 0x1f,(byte) 0x80,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x30,
+(byte) 0x6,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x3f,(byte) 0xfe,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x30,(byte) 0x6,
+(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,
+(byte) 0xfc,(byte) 0x1f,(byte) 0x80,
+};
+
+static final BitmapCharRec ch72 = new BitmapCharRec(17,17,-1,0,19,ch72data);
+
+/* char: 0x47 'G' */
+
+static final byte[] ch71data = {
+(byte) 0x7,(byte) 0xe0,(byte) 0x1e,(byte) 0x38,(byte) 0x38,(byte) 0x1c,(byte) 0x60,(byte) 0xc,(byte) 0x60,(byte) 0xc,(byte) 0xc0,(byte) 0xc,(byte) 0xc0,(byte) 0xc,(byte) 0xc0,(byte) 0x3f,
+(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x60,(byte) 0x4,(byte) 0x60,(byte) 0x4,(byte) 0x38,(byte) 0xc,(byte) 0x1c,(byte) 0x3c,
+(byte) 0x7,(byte) 0xe4,
+};
+
+static final BitmapCharRec ch71 = new BitmapCharRec(16,17,-1,0,18,ch71data);
+
+/* char: 0x46 'F' */
+
+static final byte[] ch70data = {
+(byte) 0xfc,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x20,(byte) 0x30,(byte) 0x20,
+(byte) 0x3f,(byte) 0xe0,(byte) 0x30,(byte) 0x20,(byte) 0x30,(byte) 0x20,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x30,
+(byte) 0xff,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch70 = new BitmapCharRec(12,17,-1,0,14,ch70data);
+
+/* char: 0x45 'E' */
+
+static final byte[] ch69data = {
+(byte) 0xff,(byte) 0xf8,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x40,
+(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x30,
+(byte) 0xff,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch69 = new BitmapCharRec(13,17,-1,0,15,ch69data);
+
+/* char: 0x44 'D' */
+
+static final byte[] ch68data = {
+(byte) 0xff,(byte) 0xc0,(byte) 0x30,(byte) 0x70,(byte) 0x30,(byte) 0x38,(byte) 0x30,(byte) 0xc,(byte) 0x30,(byte) 0xc,(byte) 0x30,(byte) 0x6,(byte) 0x30,(byte) 0x6,(byte) 0x30,(byte) 0x6,
+(byte) 0x30,(byte) 0x6,(byte) 0x30,(byte) 0x6,(byte) 0x30,(byte) 0x6,(byte) 0x30,(byte) 0x6,(byte) 0x30,(byte) 0xc,(byte) 0x30,(byte) 0xc,(byte) 0x30,(byte) 0x38,(byte) 0x30,(byte) 0x70,
+(byte) 0xff,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch68 = new BitmapCharRec(15,17,-1,0,17,ch68data);
+
+/* char: 0x43 'C' */
+
+static final byte[] ch67data = {
+(byte) 0x7,(byte) 0xe0,(byte) 0x1e,(byte) 0x38,(byte) 0x38,(byte) 0x8,(byte) 0x60,(byte) 0x4,(byte) 0x60,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,
+(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x60,(byte) 0x4,(byte) 0x60,(byte) 0x4,(byte) 0x38,(byte) 0xc,(byte) 0x1c,(byte) 0x3c,
+(byte) 0x7,(byte) 0xe4,
+};
+
+static final BitmapCharRec ch67 = new BitmapCharRec(14,17,-1,0,16,ch67data);
+
+/* char: 0x42 'B' */
+
+static final byte[] ch66data = {
+(byte) 0xff,(byte) 0xe0,(byte) 0x30,(byte) 0x78,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0xc,(byte) 0x30,(byte) 0xc,(byte) 0x30,(byte) 0xc,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x38,
+(byte) 0x3f,(byte) 0xe0,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x70,
+(byte) 0xff,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch66 = new BitmapCharRec(14,17,-1,0,16,ch66data);
+
+/* char: 0x41 'A' */
+
+static final byte[] ch65data = {
+(byte) 0xfc,(byte) 0x1f,(byte) 0x80,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0xc,(byte) 0x0,(byte) 0x18,(byte) 0xc,(byte) 0x0,(byte) 0x8,
+(byte) 0xc,(byte) 0x0,(byte) 0xf,(byte) 0xf8,(byte) 0x0,(byte) 0xc,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x30,(byte) 0x0,(byte) 0x6,(byte) 0x30,
+(byte) 0x0,(byte) 0x2,(byte) 0x30,(byte) 0x0,(byte) 0x2,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,
+(byte) 0x0,(byte) 0x80,(byte) 0x0,
+};
+
+static final BitmapCharRec ch65 = new BitmapCharRec(17,17,0,0,17,ch65data);
+
+/* char: 0x40 '@' */
+
+static final byte[] ch64data = {
+(byte) 0x3,(byte) 0xf0,(byte) 0x0,(byte) 0xe,(byte) 0xc,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x0,(byte) 0x61,(byte) 0xde,(byte) 0x0,(byte) 0x63,
+(byte) 0x7b,(byte) 0x0,(byte) 0xc6,(byte) 0x39,(byte) 0x80,(byte) 0xc6,(byte) 0x18,(byte) 0x80,(byte) 0xc6,(byte) 0x18,(byte) 0xc0,(byte) 0xc6,(byte) 0x18,(byte) 0x40,(byte) 0xc6,(byte) 0xc,
+(byte) 0x40,(byte) 0xc3,(byte) 0xc,(byte) 0x40,(byte) 0xc3,(byte) 0x8c,(byte) 0x40,(byte) 0xe1,(byte) 0xfc,(byte) 0x40,(byte) 0x60,(byte) 0xec,(byte) 0xc0,(byte) 0x70,(byte) 0x0,(byte) 0x80,
+(byte) 0x38,(byte) 0x1,(byte) 0x80,(byte) 0x1c,(byte) 0x3,(byte) 0x0,(byte) 0xf,(byte) 0xe,(byte) 0x0,(byte) 0x3,(byte) 0xf8,(byte) 0x0,
+};
+
+static final BitmapCharRec ch64 = new BitmapCharRec(18,20,-2,3,22,ch64data);
+
+/* char: 0x3f '?' */
+
+static final byte[] ch63data = {
+(byte) 0x30,(byte) 0x30,(byte) 0x0,(byte) 0x0,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x18,(byte) 0x18,(byte) 0xc,(byte) 0xe,(byte) 0x7,(byte) 0xc3,(byte) 0xc3,(byte) 0x83,(byte) 0xc6,
+(byte) 0x7c,
+};
+
+static final BitmapCharRec ch63 = new BitmapCharRec(8,17,-2,0,11,ch63data);
+
+/* char: 0x3e '>' */
+
+static final byte[] ch62data = {
+(byte) 0xc0,(byte) 0x0,(byte) 0x70,(byte) 0x0,(byte) 0x1c,(byte) 0x0,(byte) 0x7,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,(byte) 0x60,(byte) 0x1,(byte) 0xc0,(byte) 0x7,(byte) 0x0,
+(byte) 0x1c,(byte) 0x0,(byte) 0x70,(byte) 0x0,(byte) 0xc0,(byte) 0x0,
+};
+
+static final BitmapCharRec ch62 = new BitmapCharRec(11,11,-1,-1,13,ch62data);
+
+/* char: 0x3d '=' */
+
+static final byte[] ch61data = {
+(byte) 0xff,(byte) 0xf0,(byte) 0xff,(byte) 0xf0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xff,(byte) 0xf0,(byte) 0xff,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch61 = new BitmapCharRec(12,6,-1,-4,14,ch61data);
+
+/* char: 0x3c '<' */
+
+static final byte[] ch60data = {
+(byte) 0x0,(byte) 0x60,(byte) 0x1,(byte) 0xc0,(byte) 0x7,(byte) 0x0,(byte) 0x1c,(byte) 0x0,(byte) 0x70,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x70,(byte) 0x0,(byte) 0x1c,(byte) 0x0,
+(byte) 0x7,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,(byte) 0x60,
+};
+
+static final BitmapCharRec ch60 = new BitmapCharRec(11,11,-1,-1,13,ch60data);
+
+/* char: 0x3b ';' */
+
+static final byte[] ch59data = {
+(byte) 0xc0,(byte) 0x60,(byte) 0x20,(byte) 0xe0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch59 = new BitmapCharRec(3,14,-2,3,7,ch59data);
+
+/* char: 0x3a ':' */
+
+static final byte[] ch58data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch58 = new BitmapCharRec(2,11,-2,0,6,ch58data);
+
+/* char: 0x39 '9' */
+
+static final byte[] ch57data = {
+(byte) 0xf0,(byte) 0x0,(byte) 0x1c,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1d,(byte) 0x80,(byte) 0x73,(byte) 0xc0,
+(byte) 0x61,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc1,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x77,(byte) 0x80,
+(byte) 0x1e,(byte) 0x0,
+};
+
+static final BitmapCharRec ch57 = new BitmapCharRec(10,17,-1,0,12,ch57data);
+
+/* char: 0x38 '8' */
+
+static final byte[] ch56data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0xe1,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x41,(byte) 0xc0,(byte) 0x61,(byte) 0x80,
+(byte) 0x37,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x33,(byte) 0x0,
+(byte) 0x1e,(byte) 0x0,
+};
+
+static final BitmapCharRec ch56 = new BitmapCharRec(10,17,-1,0,12,ch56data);
+
+/* char: 0x37 '7' */
+
+static final byte[] ch55data = {
+(byte) 0x18,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x4,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+(byte) 0x2,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x1,(byte) 0x0,(byte) 0x1,(byte) 0x80,(byte) 0x81,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0xff,(byte) 0xc0,
+(byte) 0x7f,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch55 = new BitmapCharRec(10,17,-1,0,12,ch55data);
+
+/* char: 0x36 '6' */
+
+static final byte[] ch54data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x7b,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xe0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xc1,(byte) 0x80,(byte) 0xf3,(byte) 0x80,(byte) 0xee,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x70,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0xe,(byte) 0x0,
+(byte) 0x3,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch54 = new BitmapCharRec(10,17,-1,0,12,ch54data);
+
+/* char: 0x35 '5' */
+
+static final byte[] ch53data = {
+(byte) 0x7e,(byte) 0x0,(byte) 0xe3,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x1,(byte) 0xc0,
+(byte) 0x3,(byte) 0x80,(byte) 0xf,(byte) 0x80,(byte) 0x7e,(byte) 0x0,(byte) 0x78,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x20,(byte) 0x0,(byte) 0x20,(byte) 0x0,(byte) 0x1f,(byte) 0x80,
+(byte) 0x1f,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch53 = new BitmapCharRec(10,17,-1,0,12,ch53data);
+
+/* char: 0x34 '4' */
+
+static final byte[] ch52data = {
+(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0xff,(byte) 0xc0,(byte) 0xff,(byte) 0xc0,(byte) 0xc3,(byte) 0x0,(byte) 0x43,(byte) 0x0,
+(byte) 0x63,(byte) 0x0,(byte) 0x23,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x13,(byte) 0x0,(byte) 0x1b,(byte) 0x0,(byte) 0xb,(byte) 0x0,(byte) 0x7,(byte) 0x0,(byte) 0x7,(byte) 0x0,
+(byte) 0x3,(byte) 0x0,
+};
+
+static final BitmapCharRec ch52 = new BitmapCharRec(10,17,-1,0,12,ch52data);
+
+/* char: 0x33 '3' */
+
+static final byte[] ch51data = {
+(byte) 0x78,(byte) 0x0,(byte) 0xe6,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0x1,(byte) 0x0,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x3,(byte) 0x80,
+(byte) 0x7,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x83,(byte) 0x0,(byte) 0x83,(byte) 0x0,(byte) 0x47,(byte) 0x0,(byte) 0x7e,(byte) 0x0,
+(byte) 0x1c,(byte) 0x0,
+};
+
+static final BitmapCharRec ch51 = new BitmapCharRec(9,17,-1,0,12,ch51data);
+
+/* char: 0x32 '2' */
+
+static final byte[] ch50data = {
+(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0xc0,(byte) 0x60,(byte) 0x40,(byte) 0x30,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x4,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x81,(byte) 0x80,(byte) 0x81,(byte) 0x80,(byte) 0x43,(byte) 0x80,(byte) 0x7f,(byte) 0x0,
+(byte) 0x1c,(byte) 0x0,
+};
+
+static final BitmapCharRec ch50 = new BitmapCharRec(10,17,-1,0,12,ch50data);
+
+/* char: 0x31 '1' */
+
+static final byte[] ch49data = {
+(byte) 0xff,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x78,(byte) 0x18,
+(byte) 0x8,
+};
+
+static final BitmapCharRec ch49 = new BitmapCharRec(8,17,-2,0,12,ch49data);
+
+/* char: 0x30 '0' */
+
+static final byte[] ch48data = {
+(byte) 0x1e,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xe1,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x33,(byte) 0x0,
+(byte) 0x1e,(byte) 0x0,
+};
+
+static final BitmapCharRec ch48 = new BitmapCharRec(10,17,-1,0,12,ch48data);
+
+/* char: 0x2f '/' */
+
+static final byte[] ch47data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x60,(byte) 0x60,(byte) 0x20,(byte) 0x30,(byte) 0x30,(byte) 0x10,(byte) 0x18,(byte) 0x18,(byte) 0x8,(byte) 0xc,(byte) 0xc,(byte) 0x4,(byte) 0x6,
+(byte) 0x6,(byte) 0x3,(byte) 0x3,(byte) 0x3,
+};
+
+static final BitmapCharRec ch47 = new BitmapCharRec(8,20,1,3,7,ch47data);
+
+/* char: 0x2e '.' */
+
+static final byte[] ch46data = {
+(byte) 0xc0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch46 = new BitmapCharRec(2,2,-2,0,6,ch46data);
+
+/* char: 0x2d '-' */
+
+static final byte[] ch45data = {
+(byte) 0xff,(byte) 0xf0,(byte) 0xff,(byte) 0xf0,
+};
+
+static final BitmapCharRec ch45 = new BitmapCharRec(12,2,-1,-6,14,ch45data);
+
+/* char: 0x2c ',' */
+
+static final byte[] ch44data = {
+(byte) 0xc0,(byte) 0x60,(byte) 0x20,(byte) 0xe0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch44 = new BitmapCharRec(3,5,-2,3,7,ch44data);
+
+/* char: 0x2b '+' */
+
+static final byte[] ch43data = {
+(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0xff,(byte) 0xf0,(byte) 0xff,(byte) 0xf0,(byte) 0x6,(byte) 0x0,
+(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,
+};
+
+static final BitmapCharRec ch43 = new BitmapCharRec(12,12,-1,-1,14,ch43data);
+
+/* char: 0x2a '*' */
+
+static final byte[] ch42data = {
+(byte) 0x8,(byte) 0x0,(byte) 0x1c,(byte) 0x0,(byte) 0xc9,(byte) 0x80,(byte) 0xeb,(byte) 0x80,(byte) 0x1c,(byte) 0x0,(byte) 0xeb,(byte) 0x80,(byte) 0xc9,(byte) 0x80,(byte) 0x1c,(byte) 0x0,
+(byte) 0x8,(byte) 0x0,
+};
+
+static final BitmapCharRec ch42 = new BitmapCharRec(9,9,-2,-8,12,ch42data);
+
+/* char: 0x29 ')' */
+
+static final byte[] ch41data = {
+(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x30,(byte) 0x10,(byte) 0x18,(byte) 0x18,(byte) 0xc,(byte) 0xc,(byte) 0xc,(byte) 0xc,(byte) 0xc,(byte) 0xc,(byte) 0xc,(byte) 0xc,(byte) 0x18,
+(byte) 0x18,(byte) 0x10,(byte) 0x30,(byte) 0x20,(byte) 0x40,(byte) 0x80,
+};
+
+static final BitmapCharRec ch41 = new BitmapCharRec(6,22,-1,5,8,ch41data);
+
+/* char: 0x28 '(' */
+
+static final byte[] ch40data = {
+(byte) 0x4,(byte) 0x8,(byte) 0x10,(byte) 0x30,(byte) 0x20,(byte) 0x60,(byte) 0x60,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x60,
+(byte) 0x60,(byte) 0x20,(byte) 0x30,(byte) 0x10,(byte) 0x8,(byte) 0x4,
+};
+
+static final BitmapCharRec ch40 = new BitmapCharRec(6,22,-1,5,8,ch40data);
+
+/* char: 0x27 ''' */
+
+static final byte[] ch39data = {
+(byte) 0xc0,(byte) 0x60,(byte) 0x20,(byte) 0xe0,(byte) 0xc0,
+};
+
+static final BitmapCharRec ch39 = new BitmapCharRec(3,5,-3,-12,8,ch39data);
+
+/* char: 0x26 '&' */
+
+static final byte[] ch38data = {
+(byte) 0x3c,(byte) 0x3c,(byte) 0x7f,(byte) 0x7e,(byte) 0xe1,(byte) 0xe1,(byte) 0xc0,(byte) 0xc0,(byte) 0xc1,(byte) 0xc0,(byte) 0xc1,(byte) 0xa0,(byte) 0x63,(byte) 0x20,(byte) 0x37,(byte) 0x10,
+(byte) 0x1e,(byte) 0x18,(byte) 0xe,(byte) 0x3e,(byte) 0xf,(byte) 0x0,(byte) 0x1d,(byte) 0x80,(byte) 0x18,(byte) 0xc0,(byte) 0x18,(byte) 0x40,(byte) 0x18,(byte) 0x40,(byte) 0xc,(byte) 0xc0,
+(byte) 0x7,(byte) 0x80,
+};
+
+static final BitmapCharRec ch38 = new BitmapCharRec(16,17,-1,0,18,ch38data);
+
+/* char: 0x25 '%' */
+
+static final byte[] ch37data = {
+(byte) 0x30,(byte) 0x3c,(byte) 0x0,(byte) 0x18,(byte) 0x72,(byte) 0x0,(byte) 0xc,(byte) 0x61,(byte) 0x0,(byte) 0x4,(byte) 0x60,(byte) 0x80,(byte) 0x6,(byte) 0x60,(byte) 0x80,(byte) 0x3,
+(byte) 0x30,(byte) 0x80,(byte) 0x1,(byte) 0x19,(byte) 0x80,(byte) 0x1,(byte) 0x8f,(byte) 0x0,(byte) 0x78,(byte) 0xc0,(byte) 0x0,(byte) 0xe4,(byte) 0x40,(byte) 0x0,(byte) 0xc2,(byte) 0x60,
+(byte) 0x0,(byte) 0xc1,(byte) 0x30,(byte) 0x0,(byte) 0xc1,(byte) 0x10,(byte) 0x0,(byte) 0x61,(byte) 0x18,(byte) 0x0,(byte) 0x33,(byte) 0xfc,(byte) 0x0,(byte) 0x1e,(byte) 0xc,(byte) 0x0,
+};
+
+static final BitmapCharRec ch37 = new BitmapCharRec(17,16,-1,0,19,ch37data);
+
+/* char: 0x24 '$' */
+
+static final byte[] ch36data = {
+(byte) 0x4,(byte) 0x0,(byte) 0x4,(byte) 0x0,(byte) 0x3f,(byte) 0x0,(byte) 0xe5,(byte) 0xc0,(byte) 0xc4,(byte) 0xc0,(byte) 0x84,(byte) 0x60,(byte) 0x84,(byte) 0x60,(byte) 0x4,(byte) 0x60,
+(byte) 0x4,(byte) 0xe0,(byte) 0x7,(byte) 0xc0,(byte) 0x7,(byte) 0x80,(byte) 0x1e,(byte) 0x0,(byte) 0x3c,(byte) 0x0,(byte) 0x74,(byte) 0x0,(byte) 0x64,(byte) 0x0,(byte) 0x64,(byte) 0x20,
+(byte) 0x64,(byte) 0x60,(byte) 0x34,(byte) 0xe0,(byte) 0x1f,(byte) 0x80,(byte) 0x4,(byte) 0x0,(byte) 0x4,(byte) 0x0,
+};
+
+static final BitmapCharRec ch36 = new BitmapCharRec(11,21,0,2,12,ch36data);
+
+/* char: 0x23 '#' */
+
+static final byte[] ch35data = {
+(byte) 0x22,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0xff,(byte) 0xc0,(byte) 0xff,(byte) 0xc0,(byte) 0x11,(byte) 0x0,
+(byte) 0x11,(byte) 0x0,(byte) 0x11,(byte) 0x0,(byte) 0x7f,(byte) 0xe0,(byte) 0x7f,(byte) 0xe0,(byte) 0x8,(byte) 0x80,(byte) 0x8,(byte) 0x80,(byte) 0x8,(byte) 0x80,(byte) 0x8,(byte) 0x80,
+(byte) 0x8,(byte) 0x80,
+};
+
+static final BitmapCharRec ch35 = new BitmapCharRec(11,17,-1,0,13,ch35data);
+
+/* char: 0x22 '"' */
+
+static final byte[] ch34data = {
+(byte) 0x88,(byte) 0xcc,(byte) 0xcc,(byte) 0xcc,(byte) 0xcc,
+};
+
+static final BitmapCharRec ch34 = new BitmapCharRec(6,5,-1,-12,10,ch34data);
+
+/* char: 0x21 '!' */
+
+static final byte[] ch33data = {
+(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
+(byte) 0xc0,
+};
+
+static final BitmapCharRec ch33 = new BitmapCharRec(2,17,-3,0,8,ch33data);
+
+/* char: 0x20 ' ' */
+
+static final BitmapCharRec ch32 = new BitmapCharRec(0,0,0,0,6,null);
+
+static final BitmapCharRec[] chars = {
+ch32,
+ch33,
+ch34,
+ch35,
+ch36,
+ch37,
+ch38,
+ch39,
+ch40,
+ch41,
+ch42,
+ch43,
+ch44,
+ch45,
+ch46,
+ch47,
+ch48,
+ch49,
+ch50,
+ch51,
+ch52,
+ch53,
+ch54,
+ch55,
+ch56,
+ch57,
+ch58,
+ch59,
+ch60,
+ch61,
+ch62,
+ch63,
+ch64,
+ch65,
+ch66,
+ch67,
+ch68,
+ch69,
+ch70,
+ch71,
+ch72,
+ch73,
+ch74,
+ch75,
+ch76,
+ch77,
+ch78,
+ch79,
+ch80,
+ch81,
+ch82,
+ch83,
+ch84,
+ch85,
+ch86,
+ch87,
+ch88,
+ch89,
+ch90,
+ch91,
+ch92,
+ch93,
+ch94,
+ch95,
+ch96,
+ch97,
+ch98,
+ch99,
+ch100,
+ch101,
+ch102,
+ch103,
+ch104,
+ch105,
+ch106,
+ch107,
+ch108,
+ch109,
+ch110,
+ch111,
+ch112,
+ch113,
+ch114,
+ch115,
+ch116,
+ch117,
+ch118,
+ch119,
+ch120,
+ch121,
+ch122,
+ch123,
+ch124,
+ch125,
+ch126,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+null,
+ch160,
+ch161,
+ch162,
+ch163,
+ch164,
+ch165,
+ch166,
+ch167,
+ch168,
+ch169,
+ch170,
+ch171,
+ch172,
+ch173,
+ch174,
+ch175,
+ch176,
+ch177,
+ch178,
+ch179,
+ch180,
+ch181,
+ch182,
+ch183,
+ch184,
+ch185,
+ch186,
+ch187,
+ch188,
+ch189,
+ch190,
+ch191,
+ch192,
+ch193,
+ch194,
+ch195,
+ch196,
+ch197,
+ch198,
+ch199,
+ch200,
+ch201,
+ch202,
+ch203,
+ch204,
+ch205,
+ch206,
+ch207,
+ch208,
+ch209,
+ch210,
+ch211,
+ch212,
+ch213,
+ch214,
+ch215,
+ch216,
+ch217,
+ch218,
+ch219,
+ch220,
+ch221,
+ch222,
+ch223,
+ch224,
+ch225,
+ch226,
+ch227,
+ch228,
+ch229,
+ch230,
+ch231,
+ch232,
+ch233,
+ch234,
+ch235,
+ch236,
+ch237,
+ch238,
+ch239,
+ch240,
+ch241,
+ch242,
+ch243,
+ch244,
+ch245,
+ch246,
+ch247,
+ch248,
+ch249,
+ch250,
+ch251,
+ch252,
+ch253,
+ch254,
+ch255,
+};
+
+ public static final BitmapFontRec glutBitmapTimesRoman24 = new BitmapFontRec("-adobe-times-medium-r-normal--24-240-75-75-p-124-iso8859-1",
+ 224,
+ 32,
+ chars);
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTStrokeMonoRoman.java b/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTStrokeMonoRoman.java
new file mode 100644
index 000000000..b8296924e
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTStrokeMonoRoman.java
@@ -0,0 +1,2491 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.util.gl2;
+
+class GLUTStrokeMonoRoman {
+
+/* GENERATED FILE -- DO NOT MODIFY */
+
+/* char: 33 '!' */
+
+static final CoordRec char33_stroke0[] = {
+ new CoordRec((float) 52.381, (float) 100 ),
+ new CoordRec((float) 52.381, (float) 33.3333 ),
+};
+
+static final CoordRec char33_stroke1[] = {
+ new CoordRec((float) 52.381, (float) 9.5238 ),
+ new CoordRec((float) 47.6191, (float) 4.7619 ),
+ new CoordRec((float) 52.381, (float) 0 ),
+ new CoordRec((float) 57.1429, (float) 4.7619 ),
+ new CoordRec((float) 52.381, (float) 9.5238 ),
+};
+
+static final StrokeRec char33[] = {
+ new StrokeRec( 2, char33_stroke0 ),
+ new StrokeRec( 5, char33_stroke1 ),
+};
+
+/* char: 34 '"' */
+
+static final CoordRec char34_stroke0[] = {
+ new CoordRec((float) 33.3334, (float) 100 ),
+ new CoordRec((float) 33.3334, (float) 66.6667 ),
+};
+
+static final CoordRec char34_stroke1[] = {
+ new CoordRec((float) 71.4286, (float) 100 ),
+ new CoordRec((float) 71.4286, (float) 66.6667 ),
+};
+
+static final StrokeRec char34[] = {
+ new StrokeRec( 2, char34_stroke0 ),
+ new StrokeRec( 2, char34_stroke1 ),
+};
+
+/* char: 35 '#' */
+
+static final CoordRec char35_stroke0[] = {
+ new CoordRec((float) 54.7619, (float) 119.048 ),
+ new CoordRec((float) 21.4286, (float) -33.3333 ),
+};
+
+static final CoordRec char35_stroke1[] = {
+ new CoordRec((float) 83.3334, (float) 119.048 ),
+ new CoordRec((float) 50, (float) -33.3333 ),
+};
+
+static final CoordRec char35_stroke2[] = {
+ new CoordRec((float) 21.4286, (float) 57.1429 ),
+ new CoordRec((float) 88.0952, (float) 57.1429 ),
+};
+
+static final CoordRec char35_stroke3[] = {
+ new CoordRec((float) 16.6667, (float) 28.5714 ),
+ new CoordRec((float) 83.3334, (float) 28.5714 ),
+};
+
+static final StrokeRec char35[] = {
+ new StrokeRec( 2, char35_stroke0 ),
+ new StrokeRec( 2, char35_stroke1 ),
+ new StrokeRec( 2, char35_stroke2 ),
+ new StrokeRec( 2, char35_stroke3 ),
+};
+
+/* char: 36 '$' */
+
+static final CoordRec char36_stroke0[] = {
+ new CoordRec((float) 42.8571, (float) 119.048 ),
+ new CoordRec((float) 42.8571, (float) -19.0476 ),
+};
+
+static final CoordRec char36_stroke1[] = {
+ new CoordRec((float) 61.9047, (float) 119.048 ),
+ new CoordRec((float) 61.9047, (float) -19.0476 ),
+};
+
+static final CoordRec char36_stroke2[] = {
+ new CoordRec((float) 85.7143, (float) 85.7143 ),
+ new CoordRec((float) 76.1905, (float) 95.2381 ),
+ new CoordRec((float) 61.9047, (float) 100 ),
+ new CoordRec((float) 42.8571, (float) 100 ),
+ new CoordRec((float) 28.5714, (float) 95.2381 ),
+ new CoordRec((float) 19.0476, (float) 85.7143 ),
+ new CoordRec((float) 19.0476, (float) 76.1905 ),
+ new CoordRec((float) 23.8095, (float) 66.6667 ),
+ new CoordRec((float) 28.5714, (float) 61.9048 ),
+ new CoordRec((float) 38.0952, (float) 57.1429 ),
+ new CoordRec((float) 66.6666, (float) 47.619 ),
+ new CoordRec((float) 76.1905, (float) 42.8571 ),
+ new CoordRec((float) 80.9524, (float) 38.0952 ),
+ new CoordRec((float) 85.7143, (float) 28.5714 ),
+ new CoordRec((float) 85.7143, (float) 14.2857 ),
+ new CoordRec((float) 76.1905, (float) 4.7619 ),
+ new CoordRec((float) 61.9047, (float) 0 ),
+ new CoordRec((float) 42.8571, (float) 0 ),
+ new CoordRec((float) 28.5714, (float) 4.7619 ),
+ new CoordRec((float) 19.0476, (float) 14.2857 ),
+};
+
+static final StrokeRec char36[] = {
+ new StrokeRec( 2, char36_stroke0 ),
+ new StrokeRec( 2, char36_stroke1 ),
+ new StrokeRec( 20, char36_stroke2 ),
+};
+
+/* char: 37 '%' */
+
+static final CoordRec char37_stroke0[] = {
+ new CoordRec((float) 95.2381, (float) 100 ),
+ new CoordRec((float) 9.5238, (float) 0 ),
+};
+
+static final CoordRec char37_stroke1[] = {
+ new CoordRec((float) 33.3333, (float) 100 ),
+ new CoordRec((float) 42.8571, (float) 90.4762 ),
+ new CoordRec((float) 42.8571, (float) 80.9524 ),
+ new CoordRec((float) 38.0952, (float) 71.4286 ),
+ new CoordRec((float) 28.5714, (float) 66.6667 ),
+ new CoordRec((float) 19.0476, (float) 66.6667 ),
+ new CoordRec((float) 9.5238, (float) 76.1905 ),
+ new CoordRec((float) 9.5238, (float) 85.7143 ),
+ new CoordRec((float) 14.2857, (float) 95.2381 ),
+ new CoordRec((float) 23.8095, (float) 100 ),
+ new CoordRec((float) 33.3333, (float) 100 ),
+ new CoordRec((float) 42.8571, (float) 95.2381 ),
+ new CoordRec((float) 57.1428, (float) 90.4762 ),
+ new CoordRec((float) 71.4286, (float) 90.4762 ),
+ new CoordRec((float) 85.7143, (float) 95.2381 ),
+ new CoordRec((float) 95.2381, (float) 100 ),
+};
+
+static final CoordRec char37_stroke2[] = {
+ new CoordRec((float) 76.1905, (float) 33.3333 ),
+ new CoordRec((float) 66.6667, (float) 28.5714 ),
+ new CoordRec((float) 61.9048, (float) 19.0476 ),
+ new CoordRec((float) 61.9048, (float) 9.5238 ),
+ new CoordRec((float) 71.4286, (float) 0 ),
+ new CoordRec((float) 80.9524, (float) 0 ),
+ new CoordRec((float) 90.4762, (float) 4.7619 ),
+ new CoordRec((float) 95.2381, (float) 14.2857 ),
+ new CoordRec((float) 95.2381, (float) 23.8095 ),
+ new CoordRec((float) 85.7143, (float) 33.3333 ),
+ new CoordRec((float) 76.1905, (float) 33.3333 ),
+};
+
+static final StrokeRec char37[] = {
+ new StrokeRec( 2, char37_stroke0 ),
+ new StrokeRec( 16, char37_stroke1 ),
+ new StrokeRec( 11, char37_stroke2 ),
+};
+
+/* char: 38 '&' */
+
+static final CoordRec char38_stroke0[] = {
+ new CoordRec((float) 100, (float) 57.1429 ),
+ new CoordRec((float) 100, (float) 61.9048 ),
+ new CoordRec((float) 95.2381, (float) 66.6667 ),
+ new CoordRec((float) 90.4762, (float) 66.6667 ),
+ new CoordRec((float) 85.7143, (float) 61.9048 ),
+ new CoordRec((float) 80.9524, (float) 52.381 ),
+ new CoordRec((float) 71.4286, (float) 28.5714 ),
+ new CoordRec((float) 61.9048, (float) 14.2857 ),
+ new CoordRec((float) 52.3809, (float) 4.7619 ),
+ new CoordRec((float) 42.8571, (float) 0 ),
+ new CoordRec((float) 23.8095, (float) 0 ),
+ new CoordRec((float) 14.2857, (float) 4.7619 ),
+ new CoordRec((float) 9.5238, (float) 9.5238 ),
+ new CoordRec((float) 4.7619, (float) 19.0476 ),
+ new CoordRec((float) 4.7619, (float) 28.5714 ),
+ new CoordRec((float) 9.5238, (float) 38.0952 ),
+ new CoordRec((float) 14.2857, (float) 42.8571 ),
+ new CoordRec((float) 47.619, (float) 61.9048 ),
+ new CoordRec((float) 52.3809, (float) 66.6667 ),
+ new CoordRec((float) 57.1429, (float) 76.1905 ),
+ new CoordRec((float) 57.1429, (float) 85.7143 ),
+ new CoordRec((float) 52.3809, (float) 95.2381 ),
+ new CoordRec((float) 42.8571, (float) 100 ),
+ new CoordRec((float) 33.3333, (float) 95.2381 ),
+ new CoordRec((float) 28.5714, (float) 85.7143 ),
+ new CoordRec((float) 28.5714, (float) 76.1905 ),
+ new CoordRec((float) 33.3333, (float) 61.9048 ),
+ new CoordRec((float) 42.8571, (float) 47.619 ),
+ new CoordRec((float) 66.6667, (float) 14.2857 ),
+ new CoordRec((float) 76.1905, (float) 4.7619 ),
+ new CoordRec((float) 85.7143, (float) 0 ),
+ new CoordRec((float) 95.2381, (float) 0 ),
+ new CoordRec((float) 100, (float) 4.7619 ),
+ new CoordRec((float) 100, (float) 9.5238 ),
+};
+
+static final StrokeRec char38[] = {
+ new StrokeRec( 34, char38_stroke0 ),
+};
+
+/* char: 39 ''' */
+
+static final CoordRec char39_stroke0[] = {
+ new CoordRec((float) 52.381, (float) 100 ),
+ new CoordRec((float) 52.381, (float) 66.6667 ),
+};
+
+static final StrokeRec char39[] = {
+ new StrokeRec( 2, char39_stroke0 ),
+};
+
+/* char: 40 '(' */
+
+static final CoordRec char40_stroke0[] = {
+ new CoordRec((float) 69.0476, (float) 119.048 ),
+ new CoordRec((float) 59.5238, (float) 109.524 ),
+ new CoordRec((float) 50, (float) 95.2381 ),
+ new CoordRec((float) 40.4762, (float) 76.1905 ),
+ new CoordRec((float) 35.7143, (float) 52.381 ),
+ new CoordRec((float) 35.7143, (float) 33.3333 ),
+ new CoordRec((float) 40.4762, (float) 9.5238 ),
+ new CoordRec((float) 50, (float) -9.5238 ),
+ new CoordRec((float) 59.5238, (float) -23.8095 ),
+ new CoordRec((float) 69.0476, (float) -33.3333 ),
+};
+
+static final StrokeRec char40[] = {
+ new StrokeRec( 10, char40_stroke0 ),
+};
+
+/* char: 41 ')' */
+
+static final CoordRec char41_stroke0[] = {
+ new CoordRec((float) 35.7143, (float) 119.048 ),
+ new CoordRec((float) 45.2381, (float) 109.524 ),
+ new CoordRec((float) 54.7619, (float) 95.2381 ),
+ new CoordRec((float) 64.2857, (float) 76.1905 ),
+ new CoordRec((float) 69.0476, (float) 52.381 ),
+ new CoordRec((float) 69.0476, (float) 33.3333 ),
+ new CoordRec((float) 64.2857, (float) 9.5238 ),
+ new CoordRec((float) 54.7619, (float) -9.5238 ),
+ new CoordRec((float) 45.2381, (float) -23.8095 ),
+ new CoordRec((float) 35.7143, (float) -33.3333 ),
+};
+
+static final StrokeRec char41[] = {
+ new StrokeRec( 10, char41_stroke0 ),
+};
+
+/* char: 42 '*' */
+
+static final CoordRec char42_stroke0[] = {
+ new CoordRec((float) 52.381, (float) 71.4286 ),
+ new CoordRec((float) 52.381, (float) 14.2857 ),
+};
+
+static final CoordRec char42_stroke1[] = {
+ new CoordRec((float) 28.5715, (float) 57.1429 ),
+ new CoordRec((float) 76.1905, (float) 28.5714 ),
+};
+
+static final CoordRec char42_stroke2[] = {
+ new CoordRec((float) 76.1905, (float) 57.1429 ),
+ new CoordRec((float) 28.5715, (float) 28.5714 ),
+};
+
+static final StrokeRec char42[] = {
+ new StrokeRec( 2, char42_stroke0 ),
+ new StrokeRec( 2, char42_stroke1 ),
+ new StrokeRec( 2, char42_stroke2 ),
+};
+
+/* char: 43 '+' */
+
+static final CoordRec char43_stroke0[] = {
+ new CoordRec((float) 52.3809, (float) 85.7143 ),
+ new CoordRec((float) 52.3809, (float) 0 ),
+};
+
+static final CoordRec char43_stroke1[] = {
+ new CoordRec((float) 9.5238, (float) 42.8571 ),
+ new CoordRec((float) 95.2381, (float) 42.8571 ),
+};
+
+static final StrokeRec char43[] = {
+ new StrokeRec( 2, char43_stroke0 ),
+ new StrokeRec( 2, char43_stroke1 ),
+};
+
+/* char: 44 ',' */
+
+static final CoordRec char44_stroke0[] = {
+ new CoordRec((float) 57.1429, (float) 4.7619 ),
+ new CoordRec((float) 52.381, (float) 0 ),
+ new CoordRec((float) 47.6191, (float) 4.7619 ),
+ new CoordRec((float) 52.381, (float) 9.5238 ),
+ new CoordRec((float) 57.1429, (float) 4.7619 ),
+ new CoordRec((float) 57.1429, (float) -4.7619 ),
+ new CoordRec((float) 52.381, (float) -14.2857 ),
+ new CoordRec((float) 47.6191, (float) -19.0476 ),
+};
+
+static final StrokeRec char44[] = {
+ new StrokeRec( 8, char44_stroke0 ),
+};
+
+/* char: 45 '-' */
+
+static final CoordRec char45_stroke0[] = {
+ new CoordRec((float) 9.5238, (float) 42.8571 ),
+ new CoordRec((float) 95.2381, (float) 42.8571 ),
+};
+
+static final StrokeRec char45[] = {
+ new StrokeRec( 2, char45_stroke0 ),
+};
+
+/* char: 46 '.' */
+
+static final CoordRec char46_stroke0[] = {
+ new CoordRec((float) 52.381, (float) 9.5238 ),
+ new CoordRec((float) 47.6191, (float) 4.7619 ),
+ new CoordRec((float) 52.381, (float) 0 ),
+ new CoordRec((float) 57.1429, (float) 4.7619 ),
+ new CoordRec((float) 52.381, (float) 9.5238 ),
+};
+
+static final StrokeRec char46[] = {
+ new StrokeRec( 5, char46_stroke0 ),
+};
+
+/* char: 47 '/' */
+
+static final CoordRec char47_stroke0[] = {
+ new CoordRec((float) 19.0476, (float) -14.2857 ),
+ new CoordRec((float) 85.7143, (float) 100 ),
+};
+
+static final StrokeRec char47[] = {
+ new StrokeRec( 2, char47_stroke0 ),
+};
+
+/* char: 48 '0' */
+
+static final CoordRec char48_stroke0[] = {
+ new CoordRec((float) 47.619, (float) 100 ),
+ new CoordRec((float) 33.3333, (float) 95.2381 ),
+ new CoordRec((float) 23.8095, (float) 80.9524 ),
+ new CoordRec((float) 19.0476, (float) 57.1429 ),
+ new CoordRec((float) 19.0476, (float) 42.8571 ),
+ new CoordRec((float) 23.8095, (float) 19.0476 ),
+ new CoordRec((float) 33.3333, (float) 4.7619 ),
+ new CoordRec((float) 47.619, (float) 0 ),
+ new CoordRec((float) 57.1428, (float) 0 ),
+ new CoordRec((float) 71.4286, (float) 4.7619 ),
+ new CoordRec((float) 80.9524, (float) 19.0476 ),
+ new CoordRec((float) 85.7143, (float) 42.8571 ),
+ new CoordRec((float) 85.7143, (float) 57.1429 ),
+ new CoordRec((float) 80.9524, (float) 80.9524 ),
+ new CoordRec((float) 71.4286, (float) 95.2381 ),
+ new CoordRec((float) 57.1428, (float) 100 ),
+ new CoordRec((float) 47.619, (float) 100 ),
+};
+
+static final StrokeRec char48[] = {
+ new StrokeRec( 17, char48_stroke0 ),
+};
+
+/* char: 49 '1' */
+
+static final CoordRec char49_stroke0[] = {
+ new CoordRec((float) 40.4762, (float) 80.9524 ),
+ new CoordRec((float) 50, (float) 85.7143 ),
+ new CoordRec((float) 64.2857, (float) 100 ),
+ new CoordRec((float) 64.2857, (float) 0 ),
+};
+
+static final StrokeRec char49[] = {
+ new StrokeRec( 4, char49_stroke0 ),
+};
+
+/* char: 50 '2' */
+
+static final CoordRec char50_stroke0[] = {
+ new CoordRec((float) 23.8095, (float) 76.1905 ),
+ new CoordRec((float) 23.8095, (float) 80.9524 ),
+ new CoordRec((float) 28.5714, (float) 90.4762 ),
+ new CoordRec((float) 33.3333, (float) 95.2381 ),
+ new CoordRec((float) 42.8571, (float) 100 ),
+ new CoordRec((float) 61.9047, (float) 100 ),
+ new CoordRec((float) 71.4286, (float) 95.2381 ),
+ new CoordRec((float) 76.1905, (float) 90.4762 ),
+ new CoordRec((float) 80.9524, (float) 80.9524 ),
+ new CoordRec((float) 80.9524, (float) 71.4286 ),
+ new CoordRec((float) 76.1905, (float) 61.9048 ),
+ new CoordRec((float) 66.6666, (float) 47.619 ),
+ new CoordRec((float) 19.0476, (float) 0 ),
+ new CoordRec((float) 85.7143, (float) 0 ),
+};
+
+static final StrokeRec char50[] = {
+ new StrokeRec( 14, char50_stroke0 ),
+};
+
+/* char: 51 '3' */
+
+static final CoordRec char51_stroke0[] = {
+ new CoordRec((float) 28.5714, (float) 100 ),
+ new CoordRec((float) 80.9524, (float) 100 ),
+ new CoordRec((float) 52.3809, (float) 61.9048 ),
+ new CoordRec((float) 66.6666, (float) 61.9048 ),
+ new CoordRec((float) 76.1905, (float) 57.1429 ),
+ new CoordRec((float) 80.9524, (float) 52.381 ),
+ new CoordRec((float) 85.7143, (float) 38.0952 ),
+ new CoordRec((float) 85.7143, (float) 28.5714 ),
+ new CoordRec((float) 80.9524, (float) 14.2857 ),
+ new CoordRec((float) 71.4286, (float) 4.7619 ),
+ new CoordRec((float) 57.1428, (float) 0 ),
+ new CoordRec((float) 42.8571, (float) 0 ),
+ new CoordRec((float) 28.5714, (float) 4.7619 ),
+ new CoordRec((float) 23.8095, (float) 9.5238 ),
+ new CoordRec((float) 19.0476, (float) 19.0476 ),
+};
+
+static final StrokeRec char51[] = {
+ new StrokeRec( 15, char51_stroke0 ),
+};
+
+/* char: 52 '4' */
+
+static final CoordRec char52_stroke0[] = {
+ new CoordRec((float) 64.2857, (float) 100 ),
+ new CoordRec((float) 16.6667, (float) 33.3333 ),
+ new CoordRec((float) 88.0952, (float) 33.3333 ),
+};
+
+static final CoordRec char52_stroke1[] = {
+ new CoordRec((float) 64.2857, (float) 100 ),
+ new CoordRec((float) 64.2857, (float) 0 ),
+};
+
+static final StrokeRec char52[] = {
+ new StrokeRec( 3, char52_stroke0 ),
+ new StrokeRec( 2, char52_stroke1 ),
+};
+
+/* char: 53 '5' */
+
+static final CoordRec char53_stroke0[] = {
+ new CoordRec((float) 76.1905, (float) 100 ),
+ new CoordRec((float) 28.5714, (float) 100 ),
+ new CoordRec((float) 23.8095, (float) 57.1429 ),
+ new CoordRec((float) 28.5714, (float) 61.9048 ),
+ new CoordRec((float) 42.8571, (float) 66.6667 ),
+ new CoordRec((float) 57.1428, (float) 66.6667 ),
+ new CoordRec((float) 71.4286, (float) 61.9048 ),
+ new CoordRec((float) 80.9524, (float) 52.381 ),
+ new CoordRec((float) 85.7143, (float) 38.0952 ),
+ new CoordRec((float) 85.7143, (float) 28.5714 ),
+ new CoordRec((float) 80.9524, (float) 14.2857 ),
+ new CoordRec((float) 71.4286, (float) 4.7619 ),
+ new CoordRec((float) 57.1428, (float) 0 ),
+ new CoordRec((float) 42.8571, (float) 0 ),
+ new CoordRec((float) 28.5714, (float) 4.7619 ),
+ new CoordRec((float) 23.8095, (float) 9.5238 ),
+ new CoordRec((float) 19.0476, (float) 19.0476 ),
+};
+
+static final StrokeRec char53[] = {
+ new StrokeRec( 17, char53_stroke0 ),
+};
+
+/* char: 54 '6' */
+
+static final CoordRec char54_stroke0[] = {
+ new CoordRec((float) 78.5714, (float) 85.7143 ),
+ new CoordRec((float) 73.8096, (float) 95.2381 ),
+ new CoordRec((float) 59.5238, (float) 100 ),
+ new CoordRec((float) 50, (float) 100 ),
+ new CoordRec((float) 35.7143, (float) 95.2381 ),
+ new CoordRec((float) 26.1905, (float) 80.9524 ),
+ new CoordRec((float) 21.4286, (float) 57.1429 ),
+ new CoordRec((float) 21.4286, (float) 33.3333 ),
+ new CoordRec((float) 26.1905, (float) 14.2857 ),
+ new CoordRec((float) 35.7143, (float) 4.7619 ),
+ new CoordRec((float) 50, (float) 0 ),
+ new CoordRec((float) 54.7619, (float) 0 ),
+ new CoordRec((float) 69.0476, (float) 4.7619 ),
+ new CoordRec((float) 78.5714, (float) 14.2857 ),
+ new CoordRec((float) 83.3334, (float) 28.5714 ),
+ new CoordRec((float) 83.3334, (float) 33.3333 ),
+ new CoordRec((float) 78.5714, (float) 47.619 ),
+ new CoordRec((float) 69.0476, (float) 57.1429 ),
+ new CoordRec((float) 54.7619, (float) 61.9048 ),
+ new CoordRec((float) 50, (float) 61.9048 ),
+ new CoordRec((float) 35.7143, (float) 57.1429 ),
+ new CoordRec((float) 26.1905, (float) 47.619 ),
+ new CoordRec((float) 21.4286, (float) 33.3333 ),
+};
+
+static final StrokeRec char54[] = {
+ new StrokeRec( 23, char54_stroke0 ),
+};
+
+/* char: 55 '7' */
+
+static final CoordRec char55_stroke0[] = {
+ new CoordRec((float) 85.7143, (float) 100 ),
+ new CoordRec((float) 38.0952, (float) 0 ),
+};
+
+static final CoordRec char55_stroke1[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 85.7143, (float) 100 ),
+};
+
+static final StrokeRec char55[] = {
+ new StrokeRec( 2, char55_stroke0 ),
+ new StrokeRec( 2, char55_stroke1 ),
+};
+
+/* char: 56 '8' */
+
+static final CoordRec char56_stroke0[] = {
+ new CoordRec((float) 42.8571, (float) 100 ),
+ new CoordRec((float) 28.5714, (float) 95.2381 ),
+ new CoordRec((float) 23.8095, (float) 85.7143 ),
+ new CoordRec((float) 23.8095, (float) 76.1905 ),
+ new CoordRec((float) 28.5714, (float) 66.6667 ),
+ new CoordRec((float) 38.0952, (float) 61.9048 ),
+ new CoordRec((float) 57.1428, (float) 57.1429 ),
+ new CoordRec((float) 71.4286, (float) 52.381 ),
+ new CoordRec((float) 80.9524, (float) 42.8571 ),
+ new CoordRec((float) 85.7143, (float) 33.3333 ),
+ new CoordRec((float) 85.7143, (float) 19.0476 ),
+ new CoordRec((float) 80.9524, (float) 9.5238 ),
+ new CoordRec((float) 76.1905, (float) 4.7619 ),
+ new CoordRec((float) 61.9047, (float) 0 ),
+ new CoordRec((float) 42.8571, (float) 0 ),
+ new CoordRec((float) 28.5714, (float) 4.7619 ),
+ new CoordRec((float) 23.8095, (float) 9.5238 ),
+ new CoordRec((float) 19.0476, (float) 19.0476 ),
+ new CoordRec((float) 19.0476, (float) 33.3333 ),
+ new CoordRec((float) 23.8095, (float) 42.8571 ),
+ new CoordRec((float) 33.3333, (float) 52.381 ),
+ new CoordRec((float) 47.619, (float) 57.1429 ),
+ new CoordRec((float) 66.6666, (float) 61.9048 ),
+ new CoordRec((float) 76.1905, (float) 66.6667 ),
+ new CoordRec((float) 80.9524, (float) 76.1905 ),
+ new CoordRec((float) 80.9524, (float) 85.7143 ),
+ new CoordRec((float) 76.1905, (float) 95.2381 ),
+ new CoordRec((float) 61.9047, (float) 100 ),
+ new CoordRec((float) 42.8571, (float) 100 ),
+};
+
+static final StrokeRec char56[] = {
+ new StrokeRec( 29, char56_stroke0 ),
+};
+
+/* char: 57 '9' */
+
+static final CoordRec char57_stroke0[] = {
+ new CoordRec((float) 83.3334, (float) 66.6667 ),
+ new CoordRec((float) 78.5714, (float) 52.381 ),
+ new CoordRec((float) 69.0476, (float) 42.8571 ),
+ new CoordRec((float) 54.7619, (float) 38.0952 ),
+ new CoordRec((float) 50, (float) 38.0952 ),
+ new CoordRec((float) 35.7143, (float) 42.8571 ),
+ new CoordRec((float) 26.1905, (float) 52.381 ),
+ new CoordRec((float) 21.4286, (float) 66.6667 ),
+ new CoordRec((float) 21.4286, (float) 71.4286 ),
+ new CoordRec((float) 26.1905, (float) 85.7143 ),
+ new CoordRec((float) 35.7143, (float) 95.2381 ),
+ new CoordRec((float) 50, (float) 100 ),
+ new CoordRec((float) 54.7619, (float) 100 ),
+ new CoordRec((float) 69.0476, (float) 95.2381 ),
+ new CoordRec((float) 78.5714, (float) 85.7143 ),
+ new CoordRec((float) 83.3334, (float) 66.6667 ),
+ new CoordRec((float) 83.3334, (float) 42.8571 ),
+ new CoordRec((float) 78.5714, (float) 19.0476 ),
+ new CoordRec((float) 69.0476, (float) 4.7619 ),
+ new CoordRec((float) 54.7619, (float) 0 ),
+ new CoordRec((float) 45.2381, (float) 0 ),
+ new CoordRec((float) 30.9524, (float) 4.7619 ),
+ new CoordRec((float) 26.1905, (float) 14.2857 ),
+};
+
+static final StrokeRec char57[] = {
+ new StrokeRec( 23, char57_stroke0 ),
+};
+
+/* char: 58 ':' */
+
+static final CoordRec char58_stroke0[] = {
+ new CoordRec((float) 52.381, (float) 66.6667 ),
+ new CoordRec((float) 47.6191, (float) 61.9048 ),
+ new CoordRec((float) 52.381, (float) 57.1429 ),
+ new CoordRec((float) 57.1429, (float) 61.9048 ),
+ new CoordRec((float) 52.381, (float) 66.6667 ),
+};
+
+static final CoordRec char58_stroke1[] = {
+ new CoordRec((float) 52.381, (float) 9.5238 ),
+ new CoordRec((float) 47.6191, (float) 4.7619 ),
+ new CoordRec((float) 52.381, (float) 0 ),
+ new CoordRec((float) 57.1429, (float) 4.7619 ),
+ new CoordRec((float) 52.381, (float) 9.5238 ),
+};
+
+static final StrokeRec char58[] = {
+ new StrokeRec( 5, char58_stroke0 ),
+ new StrokeRec( 5, char58_stroke1 ),
+};
+
+/* char: 59 ';' */
+
+static final CoordRec char59_stroke0[] = {
+ new CoordRec((float) 52.381, (float) 66.6667 ),
+ new CoordRec((float) 47.6191, (float) 61.9048 ),
+ new CoordRec((float) 52.381, (float) 57.1429 ),
+ new CoordRec((float) 57.1429, (float) 61.9048 ),
+ new CoordRec((float) 52.381, (float) 66.6667 ),
+};
+
+static final CoordRec char59_stroke1[] = {
+ new CoordRec((float) 57.1429, (float) 4.7619 ),
+ new CoordRec((float) 52.381, (float) 0 ),
+ new CoordRec((float) 47.6191, (float) 4.7619 ),
+ new CoordRec((float) 52.381, (float) 9.5238 ),
+ new CoordRec((float) 57.1429, (float) 4.7619 ),
+ new CoordRec((float) 57.1429, (float) -4.7619 ),
+ new CoordRec((float) 52.381, (float) -14.2857 ),
+ new CoordRec((float) 47.6191, (float) -19.0476 ),
+};
+
+static final StrokeRec char59[] = {
+ new StrokeRec( 5, char59_stroke0 ),
+ new StrokeRec( 8, char59_stroke1 ),
+};
+
+/* char: 60 '<' */
+
+static final CoordRec char60_stroke0[] = {
+ new CoordRec((float) 90.4762, (float) 85.7143 ),
+ new CoordRec((float) 14.2857, (float) 42.8571 ),
+ new CoordRec((float) 90.4762, (float) 0 ),
+};
+
+static final StrokeRec char60[] = {
+ new StrokeRec( 3, char60_stroke0 ),
+};
+
+/* char: 61 '=' */
+
+static final CoordRec char61_stroke0[] = {
+ new CoordRec((float) 9.5238, (float) 57.1429 ),
+ new CoordRec((float) 95.2381, (float) 57.1429 ),
+};
+
+static final CoordRec char61_stroke1[] = {
+ new CoordRec((float) 9.5238, (float) 28.5714 ),
+ new CoordRec((float) 95.2381, (float) 28.5714 ),
+};
+
+static final StrokeRec char61[] = {
+ new StrokeRec( 2, char61_stroke0 ),
+ new StrokeRec( 2, char61_stroke1 ),
+};
+
+/* char: 62 '>' */
+
+static final CoordRec char62_stroke0[] = {
+ new CoordRec((float) 14.2857, (float) 85.7143 ),
+ new CoordRec((float) 90.4762, (float) 42.8571 ),
+ new CoordRec((float) 14.2857, (float) 0 ),
+};
+
+static final StrokeRec char62[] = {
+ new StrokeRec( 3, char62_stroke0 ),
+};
+
+/* char: 63 '?' */
+
+static final CoordRec char63_stroke0[] = {
+ new CoordRec((float) 23.8095, (float) 76.1905 ),
+ new CoordRec((float) 23.8095, (float) 80.9524 ),
+ new CoordRec((float) 28.5714, (float) 90.4762 ),
+ new CoordRec((float) 33.3333, (float) 95.2381 ),
+ new CoordRec((float) 42.8571, (float) 100 ),
+ new CoordRec((float) 61.9047, (float) 100 ),
+ new CoordRec((float) 71.4285, (float) 95.2381 ),
+ new CoordRec((float) 76.1905, (float) 90.4762 ),
+ new CoordRec((float) 80.9524, (float) 80.9524 ),
+ new CoordRec((float) 80.9524, (float) 71.4286 ),
+ new CoordRec((float) 76.1905, (float) 61.9048 ),
+ new CoordRec((float) 71.4285, (float) 57.1429 ),
+ new CoordRec((float) 52.3809, (float) 47.619 ),
+ new CoordRec((float) 52.3809, (float) 33.3333 ),
+};
+
+static final CoordRec char63_stroke1[] = {
+ new CoordRec((float) 52.3809, (float) 9.5238 ),
+ new CoordRec((float) 47.619, (float) 4.7619 ),
+ new CoordRec((float) 52.3809, (float) 0 ),
+ new CoordRec((float) 57.1428, (float) 4.7619 ),
+ new CoordRec((float) 52.3809, (float) 9.5238 ),
+};
+
+static final StrokeRec char63[] = {
+ new StrokeRec( 14, char63_stroke0 ),
+ new StrokeRec( 5, char63_stroke1 ),
+};
+
+/* char: 64 '@' */
+
+static final CoordRec char64_stroke0[] = {
+ new CoordRec((float) 64.2857, (float) 52.381 ),
+ new CoordRec((float) 54.7619, (float) 57.1429 ),
+ new CoordRec((float) 45.2381, (float) 57.1429 ),
+ new CoordRec((float) 40.4762, (float) 47.619 ),
+ new CoordRec((float) 40.4762, (float) 42.8571 ),
+ new CoordRec((float) 45.2381, (float) 33.3333 ),
+ new CoordRec((float) 54.7619, (float) 33.3333 ),
+ new CoordRec((float) 64.2857, (float) 38.0952 ),
+};
+
+static final CoordRec char64_stroke1[] = {
+ new CoordRec((float) 64.2857, (float) 57.1429 ),
+ new CoordRec((float) 64.2857, (float) 38.0952 ),
+ new CoordRec((float) 69.0476, (float) 33.3333 ),
+ new CoordRec((float) 78.5714, (float) 33.3333 ),
+ new CoordRec((float) 83.3334, (float) 42.8571 ),
+ new CoordRec((float) 83.3334, (float) 47.619 ),
+ new CoordRec((float) 78.5714, (float) 61.9048 ),
+ new CoordRec((float) 69.0476, (float) 71.4286 ),
+ new CoordRec((float) 54.7619, (float) 76.1905 ),
+ new CoordRec((float) 50, (float) 76.1905 ),
+ new CoordRec((float) 35.7143, (float) 71.4286 ),
+ new CoordRec((float) 26.1905, (float) 61.9048 ),
+ new CoordRec((float) 21.4286, (float) 47.619 ),
+ new CoordRec((float) 21.4286, (float) 42.8571 ),
+ new CoordRec((float) 26.1905, (float) 28.5714 ),
+ new CoordRec((float) 35.7143, (float) 19.0476 ),
+ new CoordRec((float) 50, (float) 14.2857 ),
+ new CoordRec((float) 54.7619, (float) 14.2857 ),
+ new CoordRec((float) 69.0476, (float) 19.0476 ),
+};
+
+static final StrokeRec char64[] = {
+ new StrokeRec( 8, char64_stroke0 ),
+ new StrokeRec( 19, char64_stroke1 ),
+};
+
+/* char: 65 'A' */
+
+static final CoordRec char65_stroke0[] = {
+ new CoordRec((float) 52.3809, (float) 100 ),
+ new CoordRec((float) 14.2857, (float) 0 ),
+};
+
+static final CoordRec char65_stroke1[] = {
+ new CoordRec((float) 52.3809, (float) 100 ),
+ new CoordRec((float) 90.4762, (float) 0 ),
+};
+
+static final CoordRec char65_stroke2[] = {
+ new CoordRec((float) 28.5714, (float) 33.3333 ),
+ new CoordRec((float) 76.1905, (float) 33.3333 ),
+};
+
+static final StrokeRec char65[] = {
+ new StrokeRec( 2, char65_stroke0 ),
+ new StrokeRec( 2, char65_stroke1 ),
+ new StrokeRec( 2, char65_stroke2 ),
+};
+
+/* char: 66 'B' */
+
+static final CoordRec char66_stroke0[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 19.0476, (float) 0 ),
+};
+
+static final CoordRec char66_stroke1[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 61.9047, (float) 100 ),
+ new CoordRec((float) 76.1905, (float) 95.2381 ),
+ new CoordRec((float) 80.9524, (float) 90.4762 ),
+ new CoordRec((float) 85.7143, (float) 80.9524 ),
+ new CoordRec((float) 85.7143, (float) 71.4286 ),
+ new CoordRec((float) 80.9524, (float) 61.9048 ),
+ new CoordRec((float) 76.1905, (float) 57.1429 ),
+ new CoordRec((float) 61.9047, (float) 52.381 ),
+};
+
+static final CoordRec char66_stroke2[] = {
+ new CoordRec((float) 19.0476, (float) 52.381 ),
+ new CoordRec((float) 61.9047, (float) 52.381 ),
+ new CoordRec((float) 76.1905, (float) 47.619 ),
+ new CoordRec((float) 80.9524, (float) 42.8571 ),
+ new CoordRec((float) 85.7143, (float) 33.3333 ),
+ new CoordRec((float) 85.7143, (float) 19.0476 ),
+ new CoordRec((float) 80.9524, (float) 9.5238 ),
+ new CoordRec((float) 76.1905, (float) 4.7619 ),
+ new CoordRec((float) 61.9047, (float) 0 ),
+ new CoordRec((float) 19.0476, (float) 0 ),
+};
+
+static final StrokeRec char66[] = {
+ new StrokeRec( 2, char66_stroke0 ),
+ new StrokeRec( 9, char66_stroke1 ),
+ new StrokeRec( 10, char66_stroke2 ),
+};
+
+/* char: 67 'C' */
+
+static final CoordRec char67_stroke0[] = {
+ new CoordRec((float) 88.0952, (float) 76.1905 ),
+ new CoordRec((float) 83.3334, (float) 85.7143 ),
+ new CoordRec((float) 73.8096, (float) 95.2381 ),
+ new CoordRec((float) 64.2857, (float) 100 ),
+ new CoordRec((float) 45.2381, (float) 100 ),
+ new CoordRec((float) 35.7143, (float) 95.2381 ),
+ new CoordRec((float) 26.1905, (float) 85.7143 ),
+ new CoordRec((float) 21.4286, (float) 76.1905 ),
+ new CoordRec((float) 16.6667, (float) 61.9048 ),
+ new CoordRec((float) 16.6667, (float) 38.0952 ),
+ new CoordRec((float) 21.4286, (float) 23.8095 ),
+ new CoordRec((float) 26.1905, (float) 14.2857 ),
+ new CoordRec((float) 35.7143, (float) 4.7619 ),
+ new CoordRec((float) 45.2381, (float) 0 ),
+ new CoordRec((float) 64.2857, (float) 0 ),
+ new CoordRec((float) 73.8096, (float) 4.7619 ),
+ new CoordRec((float) 83.3334, (float) 14.2857 ),
+ new CoordRec((float) 88.0952, (float) 23.8095 ),
+};
+
+static final StrokeRec char67[] = {
+ new StrokeRec( 18, char67_stroke0 ),
+};
+
+/* char: 68 'D' */
+
+static final CoordRec char68_stroke0[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 19.0476, (float) 0 ),
+};
+
+static final CoordRec char68_stroke1[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 52.3809, (float) 100 ),
+ new CoordRec((float) 66.6666, (float) 95.2381 ),
+ new CoordRec((float) 76.1905, (float) 85.7143 ),
+ new CoordRec((float) 80.9524, (float) 76.1905 ),
+ new CoordRec((float) 85.7143, (float) 61.9048 ),
+ new CoordRec((float) 85.7143, (float) 38.0952 ),
+ new CoordRec((float) 80.9524, (float) 23.8095 ),
+ new CoordRec((float) 76.1905, (float) 14.2857 ),
+ new CoordRec((float) 66.6666, (float) 4.7619 ),
+ new CoordRec((float) 52.3809, (float) 0 ),
+ new CoordRec((float) 19.0476, (float) 0 ),
+};
+
+static final StrokeRec char68[] = {
+ new StrokeRec( 2, char68_stroke0 ),
+ new StrokeRec( 12, char68_stroke1 ),
+};
+
+/* char: 69 'E' */
+
+static final CoordRec char69_stroke0[] = {
+ new CoordRec((float) 21.4286, (float) 100 ),
+ new CoordRec((float) 21.4286, (float) 0 ),
+};
+
+static final CoordRec char69_stroke1[] = {
+ new CoordRec((float) 21.4286, (float) 100 ),
+ new CoordRec((float) 83.3334, (float) 100 ),
+};
+
+static final CoordRec char69_stroke2[] = {
+ new CoordRec((float) 21.4286, (float) 52.381 ),
+ new CoordRec((float) 59.5238, (float) 52.381 ),
+};
+
+static final CoordRec char69_stroke3[] = {
+ new CoordRec((float) 21.4286, (float) 0 ),
+ new CoordRec((float) 83.3334, (float) 0 ),
+};
+
+static final StrokeRec char69[] = {
+ new StrokeRec( 2, char69_stroke0 ),
+ new StrokeRec( 2, char69_stroke1 ),
+ new StrokeRec( 2, char69_stroke2 ),
+ new StrokeRec( 2, char69_stroke3 ),
+};
+
+/* char: 70 'F' */
+
+static final CoordRec char70_stroke0[] = {
+ new CoordRec((float) 21.4286, (float) 100 ),
+ new CoordRec((float) 21.4286, (float) 0 ),
+};
+
+static final CoordRec char70_stroke1[] = {
+ new CoordRec((float) 21.4286, (float) 100 ),
+ new CoordRec((float) 83.3334, (float) 100 ),
+};
+
+static final CoordRec char70_stroke2[] = {
+ new CoordRec((float) 21.4286, (float) 52.381 ),
+ new CoordRec((float) 59.5238, (float) 52.381 ),
+};
+
+static final StrokeRec char70[] = {
+ new StrokeRec( 2, char70_stroke0 ),
+ new StrokeRec( 2, char70_stroke1 ),
+ new StrokeRec( 2, char70_stroke2 ),
+};
+
+/* char: 71 'G' */
+
+static final CoordRec char71_stroke0[] = {
+ new CoordRec((float) 88.0952, (float) 76.1905 ),
+ new CoordRec((float) 83.3334, (float) 85.7143 ),
+ new CoordRec((float) 73.8096, (float) 95.2381 ),
+ new CoordRec((float) 64.2857, (float) 100 ),
+ new CoordRec((float) 45.2381, (float) 100 ),
+ new CoordRec((float) 35.7143, (float) 95.2381 ),
+ new CoordRec((float) 26.1905, (float) 85.7143 ),
+ new CoordRec((float) 21.4286, (float) 76.1905 ),
+ new CoordRec((float) 16.6667, (float) 61.9048 ),
+ new CoordRec((float) 16.6667, (float) 38.0952 ),
+ new CoordRec((float) 21.4286, (float) 23.8095 ),
+ new CoordRec((float) 26.1905, (float) 14.2857 ),
+ new CoordRec((float) 35.7143, (float) 4.7619 ),
+ new CoordRec((float) 45.2381, (float) 0 ),
+ new CoordRec((float) 64.2857, (float) 0 ),
+ new CoordRec((float) 73.8096, (float) 4.7619 ),
+ new CoordRec((float) 83.3334, (float) 14.2857 ),
+ new CoordRec((float) 88.0952, (float) 23.8095 ),
+ new CoordRec((float) 88.0952, (float) 38.0952 ),
+};
+
+static final CoordRec char71_stroke1[] = {
+ new CoordRec((float) 64.2857, (float) 38.0952 ),
+ new CoordRec((float) 88.0952, (float) 38.0952 ),
+};
+
+static final StrokeRec char71[] = {
+ new StrokeRec( 19, char71_stroke0 ),
+ new StrokeRec( 2, char71_stroke1 ),
+};
+
+/* char: 72 'H' */
+
+static final CoordRec char72_stroke0[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 19.0476, (float) 0 ),
+};
+
+static final CoordRec char72_stroke1[] = {
+ new CoordRec((float) 85.7143, (float) 100 ),
+ new CoordRec((float) 85.7143, (float) 0 ),
+};
+
+static final CoordRec char72_stroke2[] = {
+ new CoordRec((float) 19.0476, (float) 52.381 ),
+ new CoordRec((float) 85.7143, (float) 52.381 ),
+};
+
+static final StrokeRec char72[] = {
+ new StrokeRec( 2, char72_stroke0 ),
+ new StrokeRec( 2, char72_stroke1 ),
+ new StrokeRec( 2, char72_stroke2 ),
+};
+
+/* char: 73 'I' */
+
+static final CoordRec char73_stroke0[] = {
+ new CoordRec((float) 52.381, (float) 100 ),
+ new CoordRec((float) 52.381, (float) 0 ),
+};
+
+static final StrokeRec char73[] = {
+ new StrokeRec( 2, char73_stroke0 ),
+};
+
+/* char: 74 'J' */
+
+static final CoordRec char74_stroke0[] = {
+ new CoordRec((float) 76.1905, (float) 100 ),
+ new CoordRec((float) 76.1905, (float) 23.8095 ),
+ new CoordRec((float) 71.4286, (float) 9.5238 ),
+ new CoordRec((float) 66.6667, (float) 4.7619 ),
+ new CoordRec((float) 57.1429, (float) 0 ),
+ new CoordRec((float) 47.6191, (float) 0 ),
+ new CoordRec((float) 38.0953, (float) 4.7619 ),
+ new CoordRec((float) 33.3334, (float) 9.5238 ),
+ new CoordRec((float) 28.5715, (float) 23.8095 ),
+ new CoordRec((float) 28.5715, (float) 33.3333 ),
+};
+
+static final StrokeRec char74[] = {
+ new StrokeRec( 10, char74_stroke0 ),
+};
+
+/* char: 75 'K' */
+
+static final CoordRec char75_stroke0[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 19.0476, (float) 0 ),
+};
+
+static final CoordRec char75_stroke1[] = {
+ new CoordRec((float) 85.7143, (float) 100 ),
+ new CoordRec((float) 19.0476, (float) 33.3333 ),
+};
+
+static final CoordRec char75_stroke2[] = {
+ new CoordRec((float) 42.8571, (float) 57.1429 ),
+ new CoordRec((float) 85.7143, (float) 0 ),
+};
+
+static final StrokeRec char75[] = {
+ new StrokeRec( 2, char75_stroke0 ),
+ new StrokeRec( 2, char75_stroke1 ),
+ new StrokeRec( 2, char75_stroke2 ),
+};
+
+/* char: 76 'L' */
+
+static final CoordRec char76_stroke0[] = {
+ new CoordRec((float) 23.8095, (float) 100 ),
+ new CoordRec((float) 23.8095, (float) 0 ),
+};
+
+static final CoordRec char76_stroke1[] = {
+ new CoordRec((float) 23.8095, (float) 0 ),
+ new CoordRec((float) 80.9524, (float) 0 ),
+};
+
+static final StrokeRec char76[] = {
+ new StrokeRec( 2, char76_stroke0 ),
+ new StrokeRec( 2, char76_stroke1 ),
+};
+
+/* char: 77 'M' */
+
+static final CoordRec char77_stroke0[] = {
+ new CoordRec((float) 14.2857, (float) 100 ),
+ new CoordRec((float) 14.2857, (float) 0 ),
+};
+
+static final CoordRec char77_stroke1[] = {
+ new CoordRec((float) 14.2857, (float) 100 ),
+ new CoordRec((float) 52.3809, (float) 0 ),
+};
+
+static final CoordRec char77_stroke2[] = {
+ new CoordRec((float) 90.4762, (float) 100 ),
+ new CoordRec((float) 52.3809, (float) 0 ),
+};
+
+static final CoordRec char77_stroke3[] = {
+ new CoordRec((float) 90.4762, (float) 100 ),
+ new CoordRec((float) 90.4762, (float) 0 ),
+};
+
+static final StrokeRec char77[] = {
+ new StrokeRec( 2, char77_stroke0 ),
+ new StrokeRec( 2, char77_stroke1 ),
+ new StrokeRec( 2, char77_stroke2 ),
+ new StrokeRec( 2, char77_stroke3 ),
+};
+
+/* char: 78 'N' */
+
+static final CoordRec char78_stroke0[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 19.0476, (float) 0 ),
+};
+
+static final CoordRec char78_stroke1[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 85.7143, (float) 0 ),
+};
+
+static final CoordRec char78_stroke2[] = {
+ new CoordRec((float) 85.7143, (float) 100 ),
+ new CoordRec((float) 85.7143, (float) 0 ),
+};
+
+static final StrokeRec char78[] = {
+ new StrokeRec( 2, char78_stroke0 ),
+ new StrokeRec( 2, char78_stroke1 ),
+ new StrokeRec( 2, char78_stroke2 ),
+};
+
+/* char: 79 'O' */
+
+static final CoordRec char79_stroke0[] = {
+ new CoordRec((float) 42.8571, (float) 100 ),
+ new CoordRec((float) 33.3333, (float) 95.2381 ),
+ new CoordRec((float) 23.8095, (float) 85.7143 ),
+ new CoordRec((float) 19.0476, (float) 76.1905 ),
+ new CoordRec((float) 14.2857, (float) 61.9048 ),
+ new CoordRec((float) 14.2857, (float) 38.0952 ),
+ new CoordRec((float) 19.0476, (float) 23.8095 ),
+ new CoordRec((float) 23.8095, (float) 14.2857 ),
+ new CoordRec((float) 33.3333, (float) 4.7619 ),
+ new CoordRec((float) 42.8571, (float) 0 ),
+ new CoordRec((float) 61.9047, (float) 0 ),
+ new CoordRec((float) 71.4286, (float) 4.7619 ),
+ new CoordRec((float) 80.9524, (float) 14.2857 ),
+ new CoordRec((float) 85.7143, (float) 23.8095 ),
+ new CoordRec((float) 90.4762, (float) 38.0952 ),
+ new CoordRec((float) 90.4762, (float) 61.9048 ),
+ new CoordRec((float) 85.7143, (float) 76.1905 ),
+ new CoordRec((float) 80.9524, (float) 85.7143 ),
+ new CoordRec((float) 71.4286, (float) 95.2381 ),
+ new CoordRec((float) 61.9047, (float) 100 ),
+ new CoordRec((float) 42.8571, (float) 100 ),
+};
+
+static final StrokeRec char79[] = {
+ new StrokeRec( 21, char79_stroke0 ),
+};
+
+/* char: 80 'P' */
+
+static final CoordRec char80_stroke0[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 19.0476, (float) 0 ),
+};
+
+static final CoordRec char80_stroke1[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 61.9047, (float) 100 ),
+ new CoordRec((float) 76.1905, (float) 95.2381 ),
+ new CoordRec((float) 80.9524, (float) 90.4762 ),
+ new CoordRec((float) 85.7143, (float) 80.9524 ),
+ new CoordRec((float) 85.7143, (float) 66.6667 ),
+ new CoordRec((float) 80.9524, (float) 57.1429 ),
+ new CoordRec((float) 76.1905, (float) 52.381 ),
+ new CoordRec((float) 61.9047, (float) 47.619 ),
+ new CoordRec((float) 19.0476, (float) 47.619 ),
+};
+
+static final StrokeRec char80[] = {
+ new StrokeRec( 2, char80_stroke0 ),
+ new StrokeRec( 10, char80_stroke1 ),
+};
+
+/* char: 81 'Q' */
+
+static final CoordRec char81_stroke0[] = {
+ new CoordRec((float) 42.8571, (float) 100 ),
+ new CoordRec((float) 33.3333, (float) 95.2381 ),
+ new CoordRec((float) 23.8095, (float) 85.7143 ),
+ new CoordRec((float) 19.0476, (float) 76.1905 ),
+ new CoordRec((float) 14.2857, (float) 61.9048 ),
+ new CoordRec((float) 14.2857, (float) 38.0952 ),
+ new CoordRec((float) 19.0476, (float) 23.8095 ),
+ new CoordRec((float) 23.8095, (float) 14.2857 ),
+ new CoordRec((float) 33.3333, (float) 4.7619 ),
+ new CoordRec((float) 42.8571, (float) 0 ),
+ new CoordRec((float) 61.9047, (float) 0 ),
+ new CoordRec((float) 71.4286, (float) 4.7619 ),
+ new CoordRec((float) 80.9524, (float) 14.2857 ),
+ new CoordRec((float) 85.7143, (float) 23.8095 ),
+ new CoordRec((float) 90.4762, (float) 38.0952 ),
+ new CoordRec((float) 90.4762, (float) 61.9048 ),
+ new CoordRec((float) 85.7143, (float) 76.1905 ),
+ new CoordRec((float) 80.9524, (float) 85.7143 ),
+ new CoordRec((float) 71.4286, (float) 95.2381 ),
+ new CoordRec((float) 61.9047, (float) 100 ),
+ new CoordRec((float) 42.8571, (float) 100 ),
+};
+
+static final CoordRec char81_stroke1[] = {
+ new CoordRec((float) 57.1428, (float) 19.0476 ),
+ new CoordRec((float) 85.7143, (float) -9.5238 ),
+};
+
+static final StrokeRec char81[] = {
+ new StrokeRec( 21, char81_stroke0 ),
+ new StrokeRec( 2, char81_stroke1 ),
+};
+
+/* char: 82 'R' */
+
+static final CoordRec char82_stroke0[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 19.0476, (float) 0 ),
+};
+
+static final CoordRec char82_stroke1[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 61.9047, (float) 100 ),
+ new CoordRec((float) 76.1905, (float) 95.2381 ),
+ new CoordRec((float) 80.9524, (float) 90.4762 ),
+ new CoordRec((float) 85.7143, (float) 80.9524 ),
+ new CoordRec((float) 85.7143, (float) 71.4286 ),
+ new CoordRec((float) 80.9524, (float) 61.9048 ),
+ new CoordRec((float) 76.1905, (float) 57.1429 ),
+ new CoordRec((float) 61.9047, (float) 52.381 ),
+ new CoordRec((float) 19.0476, (float) 52.381 ),
+};
+
+static final CoordRec char82_stroke2[] = {
+ new CoordRec((float) 52.3809, (float) 52.381 ),
+ new CoordRec((float) 85.7143, (float) 0 ),
+};
+
+static final StrokeRec char82[] = {
+ new StrokeRec( 2, char82_stroke0 ),
+ new StrokeRec( 10, char82_stroke1 ),
+ new StrokeRec( 2, char82_stroke2 ),
+};
+
+/* char: 83 'S' */
+
+static final CoordRec char83_stroke0[] = {
+ new CoordRec((float) 85.7143, (float) 85.7143 ),
+ new CoordRec((float) 76.1905, (float) 95.2381 ),
+ new CoordRec((float) 61.9047, (float) 100 ),
+ new CoordRec((float) 42.8571, (float) 100 ),
+ new CoordRec((float) 28.5714, (float) 95.2381 ),
+ new CoordRec((float) 19.0476, (float) 85.7143 ),
+ new CoordRec((float) 19.0476, (float) 76.1905 ),
+ new CoordRec((float) 23.8095, (float) 66.6667 ),
+ new CoordRec((float) 28.5714, (float) 61.9048 ),
+ new CoordRec((float) 38.0952, (float) 57.1429 ),
+ new CoordRec((float) 66.6666, (float) 47.619 ),
+ new CoordRec((float) 76.1905, (float) 42.8571 ),
+ new CoordRec((float) 80.9524, (float) 38.0952 ),
+ new CoordRec((float) 85.7143, (float) 28.5714 ),
+ new CoordRec((float) 85.7143, (float) 14.2857 ),
+ new CoordRec((float) 76.1905, (float) 4.7619 ),
+ new CoordRec((float) 61.9047, (float) 0 ),
+ new CoordRec((float) 42.8571, (float) 0 ),
+ new CoordRec((float) 28.5714, (float) 4.7619 ),
+ new CoordRec((float) 19.0476, (float) 14.2857 ),
+};
+
+static final StrokeRec char83[] = {
+ new StrokeRec( 20, char83_stroke0 ),
+};
+
+/* char: 84 'T' */
+
+static final CoordRec char84_stroke0[] = {
+ new CoordRec((float) 52.3809, (float) 100 ),
+ new CoordRec((float) 52.3809, (float) 0 ),
+};
+
+static final CoordRec char84_stroke1[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 85.7143, (float) 100 ),
+};
+
+static final StrokeRec char84[] = {
+ new StrokeRec( 2, char84_stroke0 ),
+ new StrokeRec( 2, char84_stroke1 ),
+};
+
+/* char: 85 'U' */
+
+static final CoordRec char85_stroke0[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 19.0476, (float) 28.5714 ),
+ new CoordRec((float) 23.8095, (float) 14.2857 ),
+ new CoordRec((float) 33.3333, (float) 4.7619 ),
+ new CoordRec((float) 47.619, (float) 0 ),
+ new CoordRec((float) 57.1428, (float) 0 ),
+ new CoordRec((float) 71.4286, (float) 4.7619 ),
+ new CoordRec((float) 80.9524, (float) 14.2857 ),
+ new CoordRec((float) 85.7143, (float) 28.5714 ),
+ new CoordRec((float) 85.7143, (float) 100 ),
+};
+
+static final StrokeRec char85[] = {
+ new StrokeRec( 10, char85_stroke0 ),
+};
+
+/* char: 86 'V' */
+
+static final CoordRec char86_stroke0[] = {
+ new CoordRec((float) 14.2857, (float) 100 ),
+ new CoordRec((float) 52.3809, (float) 0 ),
+};
+
+static final CoordRec char86_stroke1[] = {
+ new CoordRec((float) 90.4762, (float) 100 ),
+ new CoordRec((float) 52.3809, (float) 0 ),
+};
+
+static final StrokeRec char86[] = {
+ new StrokeRec( 2, char86_stroke0 ),
+ new StrokeRec( 2, char86_stroke1 ),
+};
+
+/* char: 87 'W' */
+
+static final CoordRec char87_stroke0[] = {
+ new CoordRec((float) 4.7619, (float) 100 ),
+ new CoordRec((float) 28.5714, (float) 0 ),
+};
+
+static final CoordRec char87_stroke1[] = {
+ new CoordRec((float) 52.3809, (float) 100 ),
+ new CoordRec((float) 28.5714, (float) 0 ),
+};
+
+static final CoordRec char87_stroke2[] = {
+ new CoordRec((float) 52.3809, (float) 100 ),
+ new CoordRec((float) 76.1905, (float) 0 ),
+};
+
+static final CoordRec char87_stroke3[] = {
+ new CoordRec((float) 100, (float) 100 ),
+ new CoordRec((float) 76.1905, (float) 0 ),
+};
+
+static final StrokeRec char87[] = {
+ new StrokeRec( 2, char87_stroke0 ),
+ new StrokeRec( 2, char87_stroke1 ),
+ new StrokeRec( 2, char87_stroke2 ),
+ new StrokeRec( 2, char87_stroke3 ),
+};
+
+/* char: 88 'X' */
+
+static final CoordRec char88_stroke0[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 85.7143, (float) 0 ),
+};
+
+static final CoordRec char88_stroke1[] = {
+ new CoordRec((float) 85.7143, (float) 100 ),
+ new CoordRec((float) 19.0476, (float) 0 ),
+};
+
+static final StrokeRec char88[] = {
+ new StrokeRec( 2, char88_stroke0 ),
+ new StrokeRec( 2, char88_stroke1 ),
+};
+
+/* char: 89 'Y' */
+
+static final CoordRec char89_stroke0[] = {
+ new CoordRec((float) 14.2857, (float) 100 ),
+ new CoordRec((float) 52.3809, (float) 52.381 ),
+ new CoordRec((float) 52.3809, (float) 0 ),
+};
+
+static final CoordRec char89_stroke1[] = {
+ new CoordRec((float) 90.4762, (float) 100 ),
+ new CoordRec((float) 52.3809, (float) 52.381 ),
+};
+
+static final StrokeRec char89[] = {
+ new StrokeRec( 3, char89_stroke0 ),
+ new StrokeRec( 2, char89_stroke1 ),
+};
+
+/* char: 90 'Z' */
+
+static final CoordRec char90_stroke0[] = {
+ new CoordRec((float) 85.7143, (float) 100 ),
+ new CoordRec((float) 19.0476, (float) 0 ),
+};
+
+static final CoordRec char90_stroke1[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 85.7143, (float) 100 ),
+};
+
+static final CoordRec char90_stroke2[] = {
+ new CoordRec((float) 19.0476, (float) 0 ),
+ new CoordRec((float) 85.7143, (float) 0 ),
+};
+
+static final StrokeRec char90[] = {
+ new StrokeRec( 2, char90_stroke0 ),
+ new StrokeRec( 2, char90_stroke1 ),
+ new StrokeRec( 2, char90_stroke2 ),
+};
+
+/* char: 91 '[' */
+
+static final CoordRec char91_stroke0[] = {
+ new CoordRec((float) 35.7143, (float) 119.048 ),
+ new CoordRec((float) 35.7143, (float) -33.3333 ),
+};
+
+static final CoordRec char91_stroke1[] = {
+ new CoordRec((float) 40.4762, (float) 119.048 ),
+ new CoordRec((float) 40.4762, (float) -33.3333 ),
+};
+
+static final CoordRec char91_stroke2[] = {
+ new CoordRec((float) 35.7143, (float) 119.048 ),
+ new CoordRec((float) 69.0476, (float) 119.048 ),
+};
+
+static final CoordRec char91_stroke3[] = {
+ new CoordRec((float) 35.7143, (float) -33.3333 ),
+ new CoordRec((float) 69.0476, (float) -33.3333 ),
+};
+
+static final StrokeRec char91[] = {
+ new StrokeRec( 2, char91_stroke0 ),
+ new StrokeRec( 2, char91_stroke1 ),
+ new StrokeRec( 2, char91_stroke2 ),
+ new StrokeRec( 2, char91_stroke3 ),
+};
+
+/* char: 92 '\' */
+
+static final CoordRec char92_stroke0[] = {
+ new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 85.7143, (float) -14.2857 ),
+};
+
+static final StrokeRec char92[] = {
+ new StrokeRec( 2, char92_stroke0 ),
+};
+
+/* char: 93 ']' */
+
+static final CoordRec char93_stroke0[] = {
+ new CoordRec((float) 64.2857, (float) 119.048 ),
+ new CoordRec((float) 64.2857, (float) -33.3333 ),
+};
+
+static final CoordRec char93_stroke1[] = {
+ new CoordRec((float) 69.0476, (float) 119.048 ),
+ new CoordRec((float) 69.0476, (float) -33.3333 ),
+};
+
+static final CoordRec char93_stroke2[] = {
+ new CoordRec((float) 35.7143, (float) 119.048 ),
+ new CoordRec((float) 69.0476, (float) 119.048 ),
+};
+
+static final CoordRec char93_stroke3[] = {
+ new CoordRec((float) 35.7143, (float) -33.3333 ),
+ new CoordRec((float) 69.0476, (float) -33.3333 ),
+};
+
+static final StrokeRec char93[] = {
+ new StrokeRec( 2, char93_stroke0 ),
+ new StrokeRec( 2, char93_stroke1 ),
+ new StrokeRec( 2, char93_stroke2 ),
+ new StrokeRec( 2, char93_stroke3 ),
+};
+
+/* char: 94 '^' */
+
+static final CoordRec char94_stroke0[] = {
+ new CoordRec((float) 52.3809, (float) 109.524 ),
+ new CoordRec((float) 14.2857, (float) 42.8571 ),
+};
+
+static final CoordRec char94_stroke1[] = {
+ new CoordRec((float) 52.3809, (float) 109.524 ),
+ new CoordRec((float) 90.4762, (float) 42.8571 ),
+};
+
+static final StrokeRec char94[] = {
+ new StrokeRec( 2, char94_stroke0 ),
+ new StrokeRec( 2, char94_stroke1 ),
+};
+
+/* char: 95 '_' */
+
+static final CoordRec char95_stroke0[] = {
+ new CoordRec((float) 0, (float) -33.3333 ),
+ new CoordRec((float) 104.762, (float) -33.3333 ),
+ new CoordRec((float) 104.762, (float) -28.5714 ),
+ new CoordRec((float) 0, (float) -28.5714 ),
+ new CoordRec((float) 0, (float) -33.3333 ),
+};
+
+static final StrokeRec char95[] = {
+ new StrokeRec( 5, char95_stroke0 ),
+};
+
+/* char: 96 '`' */
+
+static final CoordRec char96_stroke0[] = {
+ new CoordRec((float) 42.8572, (float) 100 ),
+ new CoordRec((float) 66.6667, (float) 71.4286 ),
+};
+
+static final CoordRec char96_stroke1[] = {
+ new CoordRec((float) 42.8572, (float) 100 ),
+ new CoordRec((float) 38.0953, (float) 95.2381 ),
+ new CoordRec((float) 66.6667, (float) 71.4286 ),
+};
+
+static final StrokeRec char96[] = {
+ new StrokeRec( 2, char96_stroke0 ),
+ new StrokeRec( 3, char96_stroke1 ),
+};
+
+/* char: 97 'a' */
+
+static final CoordRec char97_stroke0[] = {
+ new CoordRec((float) 80.9524, (float) 66.6667 ),
+ new CoordRec((float) 80.9524, (float) 0 ),
+};
+
+static final CoordRec char97_stroke1[] = {
+ new CoordRec((float) 80.9524, (float) 52.381 ),
+ new CoordRec((float) 71.4285, (float) 61.9048 ),
+ new CoordRec((float) 61.9047, (float) 66.6667 ),
+ new CoordRec((float) 47.619, (float) 66.6667 ),
+ new CoordRec((float) 38.0952, (float) 61.9048 ),
+ new CoordRec((float) 28.5714, (float) 52.381 ),
+ new CoordRec((float) 23.8095, (float) 38.0952 ),
+ new CoordRec((float) 23.8095, (float) 28.5714 ),
+ new CoordRec((float) 28.5714, (float) 14.2857 ),
+ new CoordRec((float) 38.0952, (float) 4.7619 ),
+ new CoordRec((float) 47.619, (float) 0 ),
+ new CoordRec((float) 61.9047, (float) 0 ),
+ new CoordRec((float) 71.4285, (float) 4.7619 ),
+ new CoordRec((float) 80.9524, (float) 14.2857 ),
+};
+
+static final StrokeRec char97[] = {
+ new StrokeRec( 2, char97_stroke0 ),
+ new StrokeRec( 14, char97_stroke1 ),
+};
+
+/* char: 98 'b' */
+
+static final CoordRec char98_stroke0[] = {
+ new CoordRec((float) 23.8095, (float) 100 ),
+ new CoordRec((float) 23.8095, (float) 0 ),
+};
+
+static final CoordRec char98_stroke1[] = {
+ new CoordRec((float) 23.8095, (float) 52.381 ),
+ new CoordRec((float) 33.3333, (float) 61.9048 ),
+ new CoordRec((float) 42.8571, (float) 66.6667 ),
+ new CoordRec((float) 57.1428, (float) 66.6667 ),
+ new CoordRec((float) 66.6666, (float) 61.9048 ),
+ new CoordRec((float) 76.1905, (float) 52.381 ),
+ new CoordRec((float) 80.9524, (float) 38.0952 ),
+ new CoordRec((float) 80.9524, (float) 28.5714 ),
+ new CoordRec((float) 76.1905, (float) 14.2857 ),
+ new CoordRec((float) 66.6666, (float) 4.7619 ),
+ new CoordRec((float) 57.1428, (float) 0 ),
+ new CoordRec((float) 42.8571, (float) 0 ),
+ new CoordRec((float) 33.3333, (float) 4.7619 ),
+ new CoordRec((float) 23.8095, (float) 14.2857 ),
+};
+
+static final StrokeRec char98[] = {
+ new StrokeRec( 2, char98_stroke0 ),
+ new StrokeRec( 14, char98_stroke1 ),
+};
+
+/* char: 99 'c' */
+
+static final CoordRec char99_stroke0[] = {
+ new CoordRec((float) 80.9524, (float) 52.381 ),
+ new CoordRec((float) 71.4285, (float) 61.9048 ),
+ new CoordRec((float) 61.9047, (float) 66.6667 ),
+ new CoordRec((float) 47.619, (float) 66.6667 ),
+ new CoordRec((float) 38.0952, (float) 61.9048 ),
+ new CoordRec((float) 28.5714, (float) 52.381 ),
+ new CoordRec((float) 23.8095, (float) 38.0952 ),
+ new CoordRec((float) 23.8095, (float) 28.5714 ),
+ new CoordRec((float) 28.5714, (float) 14.2857 ),
+ new CoordRec((float) 38.0952, (float) 4.7619 ),
+ new CoordRec((float) 47.619, (float) 0 ),
+ new CoordRec((float) 61.9047, (float) 0 ),
+ new CoordRec((float) 71.4285, (float) 4.7619 ),
+ new CoordRec((float) 80.9524, (float) 14.2857 ),
+};
+
+static final StrokeRec char99[] = {
+ new StrokeRec( 14, char99_stroke0 ),
+};
+
+/* char: 100 'd' */
+
+static final CoordRec char100_stroke0[] = {
+ new CoordRec((float) 80.9524, (float) 100 ),
+ new CoordRec((float) 80.9524, (float) 0 ),
+};
+
+static final CoordRec char100_stroke1[] = {
+ new CoordRec((float) 80.9524, (float) 52.381 ),
+ new CoordRec((float) 71.4285, (float) 61.9048 ),
+ new CoordRec((float) 61.9047, (float) 66.6667 ),
+ new CoordRec((float) 47.619, (float) 66.6667 ),
+ new CoordRec((float) 38.0952, (float) 61.9048 ),
+ new CoordRec((float) 28.5714, (float) 52.381 ),
+ new CoordRec((float) 23.8095, (float) 38.0952 ),
+ new CoordRec((float) 23.8095, (float) 28.5714 ),
+ new CoordRec((float) 28.5714, (float) 14.2857 ),
+ new CoordRec((float) 38.0952, (float) 4.7619 ),
+ new CoordRec((float) 47.619, (float) 0 ),
+ new CoordRec((float) 61.9047, (float) 0 ),
+ new CoordRec((float) 71.4285, (float) 4.7619 ),
+ new CoordRec((float) 80.9524, (float) 14.2857 ),
+};
+
+static final StrokeRec char100[] = {
+ new StrokeRec( 2, char100_stroke0 ),
+ new StrokeRec( 14, char100_stroke1 ),
+};
+
+/* char: 101 'e' */
+
+static final CoordRec char101_stroke0[] = {
+ new CoordRec((float) 23.8095, (float) 38.0952 ),
+ new CoordRec((float) 80.9524, (float) 38.0952 ),
+ new CoordRec((float) 80.9524, (float) 47.619 ),
+ new CoordRec((float) 76.1905, (float) 57.1429 ),
+ new CoordRec((float) 71.4285, (float) 61.9048 ),
+ new CoordRec((float) 61.9047, (float) 66.6667 ),
+ new CoordRec((float) 47.619, (float) 66.6667 ),
+ new CoordRec((float) 38.0952, (float) 61.9048 ),
+ new CoordRec((float) 28.5714, (float) 52.381 ),
+ new CoordRec((float) 23.8095, (float) 38.0952 ),
+ new CoordRec((float) 23.8095, (float) 28.5714 ),
+ new CoordRec((float) 28.5714, (float) 14.2857 ),
+ new CoordRec((float) 38.0952, (float) 4.7619 ),
+ new CoordRec((float) 47.619, (float) 0 ),
+ new CoordRec((float) 61.9047, (float) 0 ),
+ new CoordRec((float) 71.4285, (float) 4.7619 ),
+ new CoordRec((float) 80.9524, (float) 14.2857 ),
+};
+
+static final StrokeRec char101[] = {
+ new StrokeRec( 17, char101_stroke0 ),
+};
+
+/* char: 102 'f' */
+
+static final CoordRec char102_stroke0[] = {
+ new CoordRec((float) 71.4286, (float) 100 ),
+ new CoordRec((float) 61.9048, (float) 100 ),
+ new CoordRec((float) 52.381, (float) 95.2381 ),
+ new CoordRec((float) 47.6191, (float) 80.9524 ),
+ new CoordRec((float) 47.6191, (float) 0 ),
+};
+
+static final CoordRec char102_stroke1[] = {
+ new CoordRec((float) 33.3334, (float) 66.6667 ),
+ new CoordRec((float) 66.6667, (float) 66.6667 ),
+};
+
+static final StrokeRec char102[] = {
+ new StrokeRec( 5, char102_stroke0 ),
+ new StrokeRec( 2, char102_stroke1 ),
+};
+
+/* char: 103 'g' */
+
+static final CoordRec char103_stroke0[] = {
+ new CoordRec((float) 80.9524, (float) 66.6667 ),
+ new CoordRec((float) 80.9524, (float) -9.5238 ),
+ new CoordRec((float) 76.1905, (float) -23.8095 ),
+ new CoordRec((float) 71.4285, (float) -28.5714 ),
+ new CoordRec((float) 61.9047, (float) -33.3333 ),
+ new CoordRec((float) 47.619, (float) -33.3333 ),
+ new CoordRec((float) 38.0952, (float) -28.5714 ),
+};
+
+static final CoordRec char103_stroke1[] = {
+ new CoordRec((float) 80.9524, (float) 52.381 ),
+ new CoordRec((float) 71.4285, (float) 61.9048 ),
+ new CoordRec((float) 61.9047, (float) 66.6667 ),
+ new CoordRec((float) 47.619, (float) 66.6667 ),
+ new CoordRec((float) 38.0952, (float) 61.9048 ),
+ new CoordRec((float) 28.5714, (float) 52.381 ),
+ new CoordRec((float) 23.8095, (float) 38.0952 ),
+ new CoordRec((float) 23.8095, (float) 28.5714 ),
+ new CoordRec((float) 28.5714, (float) 14.2857 ),
+ new CoordRec((float) 38.0952, (float) 4.7619 ),
+ new CoordRec((float) 47.619, (float) 0 ),
+ new CoordRec((float) 61.9047, (float) 0 ),
+ new CoordRec((float) 71.4285, (float) 4.7619 ),
+ new CoordRec((float) 80.9524, (float) 14.2857 ),
+};
+
+static final StrokeRec char103[] = {
+ new StrokeRec( 7, char103_stroke0 ),
+ new StrokeRec( 14, char103_stroke1 ),
+};
+
+/* char: 104 'h' */
+
+static final CoordRec char104_stroke0[] = {
+ new CoordRec((float) 26.1905, (float) 100 ),
+ new CoordRec((float) 26.1905, (float) 0 ),
+};
+
+static final CoordRec char104_stroke1[] = {
+ new CoordRec((float) 26.1905, (float) 47.619 ),
+ new CoordRec((float) 40.4762, (float) 61.9048 ),
+ new CoordRec((float) 50, (float) 66.6667 ),
+ new CoordRec((float) 64.2857, (float) 66.6667 ),
+ new CoordRec((float) 73.8095, (float) 61.9048 ),
+ new CoordRec((float) 78.5715, (float) 47.619 ),
+ new CoordRec((float) 78.5715, (float) 0 ),
+};
+
+static final StrokeRec char104[] = {
+ new StrokeRec( 2, char104_stroke0 ),
+ new StrokeRec( 7, char104_stroke1 ),
+};
+
+/* char: 105 'i' */
+
+static final CoordRec char105_stroke0[] = {
+ new CoordRec((float) 47.6191, (float) 100 ),
+ new CoordRec((float) 52.381, (float) 95.2381 ),
+ new CoordRec((float) 57.1429, (float) 100 ),
+ new CoordRec((float) 52.381, (float) 104.762 ),
+ new CoordRec((float) 47.6191, (float) 100 ),
+};
+
+static final CoordRec char105_stroke1[] = {
+ new CoordRec((float) 52.381, (float) 66.6667 ),
+ new CoordRec((float) 52.381, (float) 0 ),
+};
+
+static final StrokeRec char105[] = {
+ new StrokeRec( 5, char105_stroke0 ),
+ new StrokeRec( 2, char105_stroke1 ),
+};
+
+/* char: 106 'j' */
+
+static final CoordRec char106_stroke0[] = {
+ new CoordRec((float) 57.1429, (float) 100 ),
+ new CoordRec((float) 61.9048, (float) 95.2381 ),
+ new CoordRec((float) 66.6667, (float) 100 ),
+ new CoordRec((float) 61.9048, (float) 104.762 ),
+ new CoordRec((float) 57.1429, (float) 100 ),
+};
+
+static final CoordRec char106_stroke1[] = {
+ new CoordRec((float) 61.9048, (float) 66.6667 ),
+ new CoordRec((float) 61.9048, (float) -14.2857 ),
+ new CoordRec((float) 57.1429, (float) -28.5714 ),
+ new CoordRec((float) 47.6191, (float) -33.3333 ),
+ new CoordRec((float) 38.0953, (float) -33.3333 ),
+};
+
+static final StrokeRec char106[] = {
+ new StrokeRec( 5, char106_stroke0 ),
+ new StrokeRec( 5, char106_stroke1 ),
+};
+
+/* char: 107 'k' */
+
+static final CoordRec char107_stroke0[] = {
+ new CoordRec((float) 26.1905, (float) 100 ),
+ new CoordRec((float) 26.1905, (float) 0 ),
+};
+
+static final CoordRec char107_stroke1[] = {
+ new CoordRec((float) 73.8095, (float) 66.6667 ),
+ new CoordRec((float) 26.1905, (float) 19.0476 ),
+};
+
+static final CoordRec char107_stroke2[] = {
+ new CoordRec((float) 45.2381, (float) 38.0952 ),
+ new CoordRec((float) 78.5715, (float) 0 ),
+};
+
+static final StrokeRec char107[] = {
+ new StrokeRec( 2, char107_stroke0 ),
+ new StrokeRec( 2, char107_stroke1 ),
+ new StrokeRec( 2, char107_stroke2 ),
+};
+
+/* char: 108 'l' */
+
+static final CoordRec char108_stroke0[] = {
+ new CoordRec((float) 52.381, (float) 100 ),
+ new CoordRec((float) 52.381, (float) 0 ),
+};
+
+static final StrokeRec char108[] = {
+ new StrokeRec( 2, char108_stroke0 ),
+};
+
+/* char: 109 'm' */
+
+static final CoordRec char109_stroke0[] = {
+ new CoordRec((float) 0, (float) 66.6667 ),
+ new CoordRec((float) 0, (float) 0 ),
+};
+
+static final CoordRec char109_stroke1[] = {
+ new CoordRec((float) 0, (float) 47.619 ),
+ new CoordRec((float) 14.2857, (float) 61.9048 ),
+ new CoordRec((float) 23.8095, (float) 66.6667 ),
+ new CoordRec((float) 38.0952, (float) 66.6667 ),
+ new CoordRec((float) 47.619, (float) 61.9048 ),
+ new CoordRec((float) 52.381, (float) 47.619 ),
+ new CoordRec((float) 52.381, (float) 0 ),
+};
+
+static final CoordRec char109_stroke2[] = {
+ new CoordRec((float) 52.381, (float) 47.619 ),
+ new CoordRec((float) 66.6667, (float) 61.9048 ),
+ new CoordRec((float) 76.1905, (float) 66.6667 ),
+ new CoordRec((float) 90.4762, (float) 66.6667 ),
+ new CoordRec((float) 100, (float) 61.9048 ),
+ new CoordRec((float) 104.762, (float) 47.619 ),
+ new CoordRec((float) 104.762, (float) 0 ),
+};
+
+static final StrokeRec char109[] = {
+ new StrokeRec( 2, char109_stroke0 ),
+ new StrokeRec( 7, char109_stroke1 ),
+ new StrokeRec( 7, char109_stroke2 ),
+};
+
+/* char: 110 'n' */
+
+static final CoordRec char110_stroke0[] = {
+ new CoordRec((float) 26.1905, (float) 66.6667 ),
+ new CoordRec((float) 26.1905, (float) 0 ),
+};
+
+static final CoordRec char110_stroke1[] = {
+ new CoordRec((float) 26.1905, (float) 47.619 ),
+ new CoordRec((float) 40.4762, (float) 61.9048 ),
+ new CoordRec((float) 50, (float) 66.6667 ),
+ new CoordRec((float) 64.2857, (float) 66.6667 ),
+ new CoordRec((float) 73.8095, (float) 61.9048 ),
+ new CoordRec((float) 78.5715, (float) 47.619 ),
+ new CoordRec((float) 78.5715, (float) 0 ),
+};
+
+static final StrokeRec char110[] = {
+ new StrokeRec( 2, char110_stroke0 ),
+ new StrokeRec( 7, char110_stroke1 ),
+};
+
+/* char: 111 'o' */
+
+static final CoordRec char111_stroke0[] = {
+ new CoordRec((float) 45.2381, (float) 66.6667 ),
+ new CoordRec((float) 35.7143, (float) 61.9048 ),
+ new CoordRec((float) 26.1905, (float) 52.381 ),
+ new CoordRec((float) 21.4286, (float) 38.0952 ),
+ new CoordRec((float) 21.4286, (float) 28.5714 ),
+ new CoordRec((float) 26.1905, (float) 14.2857 ),
+ new CoordRec((float) 35.7143, (float) 4.7619 ),
+ new CoordRec((float) 45.2381, (float) 0 ),
+ new CoordRec((float) 59.5238, (float) 0 ),
+ new CoordRec((float) 69.0476, (float) 4.7619 ),
+ new CoordRec((float) 78.5714, (float) 14.2857 ),
+ new CoordRec((float) 83.3334, (float) 28.5714 ),
+ new CoordRec((float) 83.3334, (float) 38.0952 ),
+ new CoordRec((float) 78.5714, (float) 52.381 ),
+ new CoordRec((float) 69.0476, (float) 61.9048 ),
+ new CoordRec((float) 59.5238, (float) 66.6667 ),
+ new CoordRec((float) 45.2381, (float) 66.6667 ),
+};
+
+static final StrokeRec char111[] = {
+ new StrokeRec( 17, char111_stroke0 ),
+};
+
+/* char: 112 'p' */
+
+static final CoordRec char112_stroke0[] = {
+ new CoordRec((float) 23.8095, (float) 66.6667 ),
+ new CoordRec((float) 23.8095, (float) -33.3333 ),
+};
+
+static final CoordRec char112_stroke1[] = {
+ new CoordRec((float) 23.8095, (float) 52.381 ),
+ new CoordRec((float) 33.3333, (float) 61.9048 ),
+ new CoordRec((float) 42.8571, (float) 66.6667 ),
+ new CoordRec((float) 57.1428, (float) 66.6667 ),
+ new CoordRec((float) 66.6666, (float) 61.9048 ),
+ new CoordRec((float) 76.1905, (float) 52.381 ),
+ new CoordRec((float) 80.9524, (float) 38.0952 ),
+ new CoordRec((float) 80.9524, (float) 28.5714 ),
+ new CoordRec((float) 76.1905, (float) 14.2857 ),
+ new CoordRec((float) 66.6666, (float) 4.7619 ),
+ new CoordRec((float) 57.1428, (float) 0 ),
+ new CoordRec((float) 42.8571, (float) 0 ),
+ new CoordRec((float) 33.3333, (float) 4.7619 ),
+ new CoordRec((float) 23.8095, (float) 14.2857 ),
+};
+
+static final StrokeRec char112[] = {
+ new StrokeRec( 2, char112_stroke0 ),
+ new StrokeRec( 14, char112_stroke1 ),
+};
+
+/* char: 113 'q' */
+
+static final CoordRec char113_stroke0[] = {
+ new CoordRec((float) 80.9524, (float) 66.6667 ),
+ new CoordRec((float) 80.9524, (float) -33.3333 ),
+};
+
+static final CoordRec char113_stroke1[] = {
+ new CoordRec((float) 80.9524, (float) 52.381 ),
+ new CoordRec((float) 71.4285, (float) 61.9048 ),
+ new CoordRec((float) 61.9047, (float) 66.6667 ),
+ new CoordRec((float) 47.619, (float) 66.6667 ),
+ new CoordRec((float) 38.0952, (float) 61.9048 ),
+ new CoordRec((float) 28.5714, (float) 52.381 ),
+ new CoordRec((float) 23.8095, (float) 38.0952 ),
+ new CoordRec((float) 23.8095, (float) 28.5714 ),
+ new CoordRec((float) 28.5714, (float) 14.2857 ),
+ new CoordRec((float) 38.0952, (float) 4.7619 ),
+ new CoordRec((float) 47.619, (float) 0 ),
+ new CoordRec((float) 61.9047, (float) 0 ),
+ new CoordRec((float) 71.4285, (float) 4.7619 ),
+ new CoordRec((float) 80.9524, (float) 14.2857 ),
+};
+
+static final StrokeRec char113[] = {
+ new StrokeRec( 2, char113_stroke0 ),
+ new StrokeRec( 14, char113_stroke1 ),
+};
+
+/* char: 114 'r' */
+
+static final CoordRec char114_stroke0[] = {
+ new CoordRec((float) 33.3334, (float) 66.6667 ),
+ new CoordRec((float) 33.3334, (float) 0 ),
+};
+
+static final CoordRec char114_stroke1[] = {
+ new CoordRec((float) 33.3334, (float) 38.0952 ),
+ new CoordRec((float) 38.0953, (float) 52.381 ),
+ new CoordRec((float) 47.6191, (float) 61.9048 ),
+ new CoordRec((float) 57.1429, (float) 66.6667 ),
+ new CoordRec((float) 71.4286, (float) 66.6667 ),
+};
+
+static final StrokeRec char114[] = {
+ new StrokeRec( 2, char114_stroke0 ),
+ new StrokeRec( 5, char114_stroke1 ),
+};
+
+/* char: 115 's' */
+
+static final CoordRec char115_stroke0[] = {
+ new CoordRec((float) 78.5715, (float) 52.381 ),
+ new CoordRec((float) 73.8095, (float) 61.9048 ),
+ new CoordRec((float) 59.5238, (float) 66.6667 ),
+ new CoordRec((float) 45.2381, (float) 66.6667 ),
+ new CoordRec((float) 30.9524, (float) 61.9048 ),
+ new CoordRec((float) 26.1905, (float) 52.381 ),
+ new CoordRec((float) 30.9524, (float) 42.8571 ),
+ new CoordRec((float) 40.4762, (float) 38.0952 ),
+ new CoordRec((float) 64.2857, (float) 33.3333 ),
+ new CoordRec((float) 73.8095, (float) 28.5714 ),
+ new CoordRec((float) 78.5715, (float) 19.0476 ),
+ new CoordRec((float) 78.5715, (float) 14.2857 ),
+ new CoordRec((float) 73.8095, (float) 4.7619 ),
+ new CoordRec((float) 59.5238, (float) 0 ),
+ new CoordRec((float) 45.2381, (float) 0 ),
+ new CoordRec((float) 30.9524, (float) 4.7619 ),
+ new CoordRec((float) 26.1905, (float) 14.2857 ),
+};
+
+static final StrokeRec char115[] = {
+ new StrokeRec( 17, char115_stroke0 ),
+};
+
+/* char: 116 't' */
+
+static final CoordRec char116_stroke0[] = {
+ new CoordRec((float) 47.6191, (float) 100 ),
+ new CoordRec((float) 47.6191, (float) 19.0476 ),
+ new CoordRec((float) 52.381, (float) 4.7619 ),
+ new CoordRec((float) 61.9048, (float) 0 ),
+ new CoordRec((float) 71.4286, (float) 0 ),
+};
+
+static final CoordRec char116_stroke1[] = {
+ new CoordRec((float) 33.3334, (float) 66.6667 ),
+ new CoordRec((float) 66.6667, (float) 66.6667 ),
+};
+
+static final StrokeRec char116[] = {
+ new StrokeRec( 5, char116_stroke0 ),
+ new StrokeRec( 2, char116_stroke1 ),
+};
+
+/* char: 117 'u' */
+
+static final CoordRec char117_stroke0[] = {
+ new CoordRec((float) 26.1905, (float) 66.6667 ),
+ new CoordRec((float) 26.1905, (float) 19.0476 ),
+ new CoordRec((float) 30.9524, (float) 4.7619 ),
+ new CoordRec((float) 40.4762, (float) 0 ),
+ new CoordRec((float) 54.7619, (float) 0 ),
+ new CoordRec((float) 64.2857, (float) 4.7619 ),
+ new CoordRec((float) 78.5715, (float) 19.0476 ),
+};
+
+static final CoordRec char117_stroke1[] = {
+ new CoordRec((float) 78.5715, (float) 66.6667 ),
+ new CoordRec((float) 78.5715, (float) 0 ),
+};
+
+static final StrokeRec char117[] = {
+ new StrokeRec( 7, char117_stroke0 ),
+ new StrokeRec( 2, char117_stroke1 ),
+};
+
+/* char: 118 'v' */
+
+static final CoordRec char118_stroke0[] = {
+ new CoordRec((float) 23.8095, (float) 66.6667 ),
+ new CoordRec((float) 52.3809, (float) 0 ),
+};
+
+static final CoordRec char118_stroke1[] = {
+ new CoordRec((float) 80.9524, (float) 66.6667 ),
+ new CoordRec((float) 52.3809, (float) 0 ),
+};
+
+static final StrokeRec char118[] = {
+ new StrokeRec( 2, char118_stroke0 ),
+ new StrokeRec( 2, char118_stroke1 ),
+};
+
+/* char: 119 'w' */
+
+static final CoordRec char119_stroke0[] = {
+ new CoordRec((float) 14.2857, (float) 66.6667 ),
+ new CoordRec((float) 33.3333, (float) 0 ),
+};
+
+static final CoordRec char119_stroke1[] = {
+ new CoordRec((float) 52.3809, (float) 66.6667 ),
+ new CoordRec((float) 33.3333, (float) 0 ),
+};
+
+static final CoordRec char119_stroke2[] = {
+ new CoordRec((float) 52.3809, (float) 66.6667 ),
+ new CoordRec((float) 71.4286, (float) 0 ),
+};
+
+static final CoordRec char119_stroke3[] = {
+ new CoordRec((float) 90.4762, (float) 66.6667 ),
+ new CoordRec((float) 71.4286, (float) 0 ),
+};
+
+static final StrokeRec char119[] = {
+ new StrokeRec( 2, char119_stroke0 ),
+ new StrokeRec( 2, char119_stroke1 ),
+ new StrokeRec( 2, char119_stroke2 ),
+ new StrokeRec( 2, char119_stroke3 ),
+};
+
+/* char: 120 'x' */
+
+static final CoordRec char120_stroke0[] = {
+ new CoordRec((float) 26.1905, (float) 66.6667 ),
+ new CoordRec((float) 78.5715, (float) 0 ),
+};
+
+static final CoordRec char120_stroke1[] = {
+ new CoordRec((float) 78.5715, (float) 66.6667 ),
+ new CoordRec((float) 26.1905, (float) 0 ),
+};
+
+static final StrokeRec char120[] = {
+ new StrokeRec( 2, char120_stroke0 ),
+ new StrokeRec( 2, char120_stroke1 ),
+};
+
+/* char: 121 'y' */
+
+static final CoordRec char121_stroke0[] = {
+ new CoordRec((float) 26.1905, (float) 66.6667 ),
+ new CoordRec((float) 54.7619, (float) 0 ),
+};
+
+static final CoordRec char121_stroke1[] = {
+ new CoordRec((float) 83.3334, (float) 66.6667 ),
+ new CoordRec((float) 54.7619, (float) 0 ),
+ new CoordRec((float) 45.2381, (float) -19.0476 ),
+ new CoordRec((float) 35.7143, (float) -28.5714 ),
+ new CoordRec((float) 26.1905, (float) -33.3333 ),
+ new CoordRec((float) 21.4286, (float) -33.3333 ),
+};
+
+static final StrokeRec char121[] = {
+ new StrokeRec( 2, char121_stroke0 ),
+ new StrokeRec( 6, char121_stroke1 ),
+};
+
+/* char: 122 'z' */
+
+static final CoordRec char122_stroke0[] = {
+ new CoordRec((float) 78.5715, (float) 66.6667 ),
+ new CoordRec((float) 26.1905, (float) 0 ),
+};
+
+static final CoordRec char122_stroke1[] = {
+ new CoordRec((float) 26.1905, (float) 66.6667 ),
+ new CoordRec((float) 78.5715, (float) 66.6667 ),
+};
+
+static final CoordRec char122_stroke2[] = {
+ new CoordRec((float) 26.1905, (float) 0 ),
+ new CoordRec((float) 78.5715, (float) 0 ),
+};
+
+static final StrokeRec char122[] = {
+ new StrokeRec( 2, char122_stroke0 ),
+ new StrokeRec( 2, char122_stroke1 ),
+ new StrokeRec( 2, char122_stroke2 ),
+};
+
+/* char: 123 '{' */
+
+static final CoordRec char123_stroke0[] = {
+ new CoordRec((float) 64.2857, (float) 119.048 ),
+ new CoordRec((float) 54.7619, (float) 114.286 ),
+ new CoordRec((float) 50, (float) 109.524 ),
+ new CoordRec((float) 45.2381, (float) 100 ),
+ new CoordRec((float) 45.2381, (float) 90.4762 ),
+ new CoordRec((float) 50, (float) 80.9524 ),
+ new CoordRec((float) 54.7619, (float) 76.1905 ),
+ new CoordRec((float) 59.5238, (float) 66.6667 ),
+ new CoordRec((float) 59.5238, (float) 57.1429 ),
+ new CoordRec((float) 50, (float) 47.619 ),
+};
+
+static final CoordRec char123_stroke1[] = {
+ new CoordRec((float) 54.7619, (float) 114.286 ),
+ new CoordRec((float) 50, (float) 104.762 ),
+ new CoordRec((float) 50, (float) 95.2381 ),
+ new CoordRec((float) 54.7619, (float) 85.7143 ),
+ new CoordRec((float) 59.5238, (float) 80.9524 ),
+ new CoordRec((float) 64.2857, (float) 71.4286 ),
+ new CoordRec((float) 64.2857, (float) 61.9048 ),
+ new CoordRec((float) 59.5238, (float) 52.381 ),
+ new CoordRec((float) 40.4762, (float) 42.8571 ),
+ new CoordRec((float) 59.5238, (float) 33.3333 ),
+ new CoordRec((float) 64.2857, (float) 23.8095 ),
+ new CoordRec((float) 64.2857, (float) 14.2857 ),
+ new CoordRec((float) 59.5238, (float) 4.7619 ),
+ new CoordRec((float) 54.7619, (float) 0 ),
+ new CoordRec((float) 50, (float) -9.5238 ),
+ new CoordRec((float) 50, (float) -19.0476 ),
+ new CoordRec((float) 54.7619, (float) -28.5714 ),
+};
+
+static final CoordRec char123_stroke2[] = {
+ new CoordRec((float) 50, (float) 38.0952 ),
+ new CoordRec((float) 59.5238, (float) 28.5714 ),
+ new CoordRec((float) 59.5238, (float) 19.0476 ),
+ new CoordRec((float) 54.7619, (float) 9.5238 ),
+ new CoordRec((float) 50, (float) 4.7619 ),
+ new CoordRec((float) 45.2381, (float) -4.7619 ),
+ new CoordRec((float) 45.2381, (float) -14.2857 ),
+ new CoordRec((float) 50, (float) -23.8095 ),
+ new CoordRec((float) 54.7619, (float) -28.5714 ),
+ new CoordRec((float) 64.2857, (float) -33.3333 ),
+};
+
+static final StrokeRec char123[] = {
+ new StrokeRec( 10, char123_stroke0 ),
+ new StrokeRec( 17, char123_stroke1 ),
+ new StrokeRec( 10, char123_stroke2 ),
+};
+
+/* char: 124 '|' */
+
+static final CoordRec char124_stroke0[] = {
+ new CoordRec((float) 52.381, (float) 119.048 ),
+ new CoordRec((float) 52.381, (float) -33.3333 ),
+};
+
+static final StrokeRec char124[] = {
+ new StrokeRec( 2, char124_stroke0 ),
+};
+
+/* char: 125 '}' */
+
+static final CoordRec char125_stroke0[] = {
+ new CoordRec((float) 40.4762, (float) 119.048 ),
+ new CoordRec((float) 50, (float) 114.286 ),
+ new CoordRec((float) 54.7619, (float) 109.524 ),
+ new CoordRec((float) 59.5238, (float) 100 ),
+ new CoordRec((float) 59.5238, (float) 90.4762 ),
+ new CoordRec((float) 54.7619, (float) 80.9524 ),
+ new CoordRec((float) 50, (float) 76.1905 ),
+ new CoordRec((float) 45.2381, (float) 66.6667 ),
+ new CoordRec((float) 45.2381, (float) 57.1429 ),
+ new CoordRec((float) 54.7619, (float) 47.619 ),
+};
+
+static final CoordRec char125_stroke1[] = {
+ new CoordRec((float) 50, (float) 114.286 ),
+ new CoordRec((float) 54.7619, (float) 104.762 ),
+ new CoordRec((float) 54.7619, (float) 95.2381 ),
+ new CoordRec((float) 50, (float) 85.7143 ),
+ new CoordRec((float) 45.2381, (float) 80.9524 ),
+ new CoordRec((float) 40.4762, (float) 71.4286 ),
+ new CoordRec((float) 40.4762, (float) 61.9048 ),
+ new CoordRec((float) 45.2381, (float) 52.381 ),
+ new CoordRec((float) 64.2857, (float) 42.8571 ),
+ new CoordRec((float) 45.2381, (float) 33.3333 ),
+ new CoordRec((float) 40.4762, (float) 23.8095 ),
+ new CoordRec((float) 40.4762, (float) 14.2857 ),
+ new CoordRec((float) 45.2381, (float) 4.7619 ),
+ new CoordRec((float) 50, (float) 0 ),
+ new CoordRec((float) 54.7619, (float) -9.5238 ),
+ new CoordRec((float) 54.7619, (float) -19.0476 ),
+ new CoordRec((float) 50, (float) -28.5714 ),
+};
+
+static final CoordRec char125_stroke2[] = {
+ new CoordRec((float) 54.7619, (float) 38.0952 ),
+ new CoordRec((float) 45.2381, (float) 28.5714 ),
+ new CoordRec((float) 45.2381, (float) 19.0476 ),
+ new CoordRec((float) 50, (float) 9.5238 ),
+ new CoordRec((float) 54.7619, (float) 4.7619 ),
+ new CoordRec((float) 59.5238, (float) -4.7619 ),
+ new CoordRec((float) 59.5238, (float) -14.2857 ),
+ new CoordRec((float) 54.7619, (float) -23.8095 ),
+ new CoordRec((float) 50, (float) -28.5714 ),
+ new CoordRec((float) 40.4762, (float) -33.3333 ),
+};
+
+static final StrokeRec char125[] = {
+ new StrokeRec( 10, char125_stroke0 ),
+ new StrokeRec( 17, char125_stroke1 ),
+ new StrokeRec( 10, char125_stroke2 ),
+};
+
+/* char: 126 '~' */
+
+static final CoordRec char126_stroke0[] = {
+ new CoordRec((float) 9.5238, (float) 28.5714 ),
+ new CoordRec((float) 9.5238, (float) 38.0952 ),
+ new CoordRec((float) 14.2857, (float) 52.381 ),
+ new CoordRec((float) 23.8095, (float) 57.1429 ),
+ new CoordRec((float) 33.3333, (float) 57.1429 ),
+ new CoordRec((float) 42.8571, (float) 52.381 ),
+ new CoordRec((float) 61.9048, (float) 38.0952 ),
+ new CoordRec((float) 71.4286, (float) 33.3333 ),
+ new CoordRec((float) 80.9524, (float) 33.3333 ),
+ new CoordRec((float) 90.4762, (float) 38.0952 ),
+ new CoordRec((float) 95.2381, (float) 47.619 ),
+};
+
+static final CoordRec char126_stroke1[] = {
+ new CoordRec((float) 9.5238, (float) 38.0952 ),
+ new CoordRec((float) 14.2857, (float) 47.619 ),
+ new CoordRec((float) 23.8095, (float) 52.381 ),
+ new CoordRec((float) 33.3333, (float) 52.381 ),
+ new CoordRec((float) 42.8571, (float) 47.619 ),
+ new CoordRec((float) 61.9048, (float) 33.3333 ),
+ new CoordRec((float) 71.4286, (float) 28.5714 ),
+ new CoordRec((float) 80.9524, (float) 28.5714 ),
+ new CoordRec((float) 90.4762, (float) 33.3333 ),
+ new CoordRec((float) 95.2381, (float) 47.619 ),
+ new CoordRec((float) 95.2381, (float) 57.1429 ),
+};
+
+static final StrokeRec char126[] = {
+ new StrokeRec( 11, char126_stroke0 ),
+ new StrokeRec( 11, char126_stroke1 ),
+};
+
+/* char: 127 */
+
+static final CoordRec char127_stroke0[] = {
+ new CoordRec((float) 71.4286, (float) 100 ),
+ new CoordRec((float) 33.3333, (float) -33.3333 ),
+};
+
+static final CoordRec char127_stroke1[] = {
+ new CoordRec((float) 47.619, (float) 66.6667 ),
+ new CoordRec((float) 33.3333, (float) 61.9048 ),
+ new CoordRec((float) 23.8095, (float) 52.381 ),
+ new CoordRec((float) 19.0476, (float) 38.0952 ),
+ new CoordRec((float) 19.0476, (float) 23.8095 ),
+ new CoordRec((float) 23.8095, (float) 14.2857 ),
+ new CoordRec((float) 33.3333, (float) 4.7619 ),
+ new CoordRec((float) 47.619, (float) 0 ),
+ new CoordRec((float) 57.1428, (float) 0 ),
+ new CoordRec((float) 71.4286, (float) 4.7619 ),
+ new CoordRec((float) 80.9524, (float) 14.2857 ),
+ new CoordRec((float) 85.7143, (float) 28.5714 ),
+ new CoordRec((float) 85.7143, (float) 42.8571 ),
+ new CoordRec((float) 80.9524, (float) 52.381 ),
+ new CoordRec((float) 71.4286, (float) 61.9048 ),
+ new CoordRec((float) 57.1428, (float) 66.6667 ),
+ new CoordRec((float) 47.619, (float) 66.6667 ),
+};
+
+static final StrokeRec char127[] = {
+ new StrokeRec( 2, char127_stroke0 ),
+ new StrokeRec( 17, char127_stroke1 ),
+};
+
+static final StrokeCharRec chars[] = {
+ new StrokeCharRec(0, /* char0 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char1 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char2 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char3 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char4 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char5 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char6 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char7 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char8 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char9 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char10 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char11 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char12 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char13 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char14 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char15 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char16 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char17 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char18 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char19 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char20 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char21 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char22 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char23 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char24 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char25 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char26 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char27 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char28 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char29 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char30 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char31 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec(0, /* char32 */ null, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char33, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char34, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(4, char35, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(3, char36, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(3, char37, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char38, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char39, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char40, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char41, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(3, char42, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char43, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char44, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char45, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char46, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char47, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char48, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char49, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char50, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char51, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char52, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char53, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char54, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char55, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char56, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char57, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char58, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char59, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char60, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char61, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char62, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char63, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char64, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(3, char65, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(3, char66, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char67, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char68, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(4, char69, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(3, char70, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char71, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(3, char72, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char73, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char74, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(3, char75, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char76, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(4, char77, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(3, char78, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char79, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char80, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char81, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(3, char82, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char83, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char84, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char85, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char86, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(4, char87, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char88, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char89, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(3, char90, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(4, char91, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char92, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(4, char93, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char94, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char95, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char96, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char97, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char98, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char99, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char100, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char101, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char102, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char103, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char104, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char105, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char106, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(3, char107, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char108, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(3, char109, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char110, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char111, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char112, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char113, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char114, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char115, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char116, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char117, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char118, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(4, char119, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char120, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char121, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(3, char122, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(3, char123, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(1, char124, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(3, char125, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char126, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec(2, char127, (float) 52.381, (float) 104.762 ),
+};
+
+public static final StrokeFontRec glutStrokeMonoRoman = new StrokeFontRec( "Roman", 128, chars, (float) 119.048, (float) -33.3333 );
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTStrokeRoman.java b/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTStrokeRoman.java
new file mode 100644
index 000000000..94fa1c4fd
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTStrokeRoman.java
@@ -0,0 +1,2491 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.util.gl2;
+
+class GLUTStrokeRoman {
+
+/* GENERATED FILE -- DO NOT MODIFY */
+
+/* char: 33 '!' */
+
+static final CoordRec char33_stroke0[] = {
+ new CoordRec((float) 13.3819, (float) 100),
+ new CoordRec((float) 13.3819, (float) 33.3333),
+};
+
+static final CoordRec char33_stroke1[] = {
+ new CoordRec((float) 13.3819, (float) 9.5238),
+ new CoordRec((float) 8.62, (float) 4.7619),
+ new CoordRec((float) 13.3819, (float) 0),
+ new CoordRec((float) 18.1438, (float) 4.7619),
+ new CoordRec((float) 13.3819, (float) 9.5238),
+};
+
+static final StrokeRec char33[] = {
+ new StrokeRec(2, char33_stroke0),
+ new StrokeRec(5, char33_stroke1),
+};
+
+/* char: 34 '"' */
+
+static final CoordRec char34_stroke0[] = {
+ new CoordRec((float) 4.02, (float) 100),
+ new CoordRec((float) 4.02, (float) 66.6667),
+};
+
+static final CoordRec char34_stroke1[] = {
+ new CoordRec((float) 42.1152, (float) 100),
+ new CoordRec((float) 42.1152, (float) 66.6667),
+};
+
+static final StrokeRec char34[] = {
+ new StrokeRec(2, char34_stroke0),
+ new StrokeRec(2, char34_stroke1),
+};
+
+/* char: 35 '#' */
+
+static final CoordRec char35_stroke0[] = {
+ new CoordRec((float) 41.2952, (float) 119.048),
+ new CoordRec((float) 7.9619, (float) -33.3333),
+};
+
+static final CoordRec char35_stroke1[] = {
+ new CoordRec((float) 69.8667, (float) 119.048),
+ new CoordRec((float) 36.5333, (float) -33.3333),
+};
+
+static final CoordRec char35_stroke2[] = {
+ new CoordRec((float) 7.9619, (float) 57.1429),
+ new CoordRec((float) 74.6286, (float) 57.1429),
+};
+
+static final CoordRec char35_stroke3[] = {
+ new CoordRec((float) 3.2, (float) 28.5714),
+ new CoordRec((float) 69.8667, (float) 28.5714),
+};
+
+static final StrokeRec char35[] = {
+ new StrokeRec(2, char35_stroke0),
+ new StrokeRec(2, char35_stroke1),
+ new StrokeRec(2, char35_stroke2),
+ new StrokeRec(2, char35_stroke3),
+};
+
+/* char: 36 '$' */
+
+static final CoordRec char36_stroke0[] = {
+ new CoordRec((float) 28.6295, (float) 119.048),
+ new CoordRec((float) 28.6295, (float) -19.0476),
+};
+
+static final CoordRec char36_stroke1[] = {
+ new CoordRec((float) 47.6771, (float) 119.048),
+ new CoordRec((float) 47.6771, (float) -19.0476),
+};
+
+static final CoordRec char36_stroke2[] = {
+ new CoordRec((float) 71.4867, (float) 85.7143),
+ new CoordRec((float) 61.9629, (float) 95.2381),
+ new CoordRec((float) 47.6771, (float) 100),
+ new CoordRec((float) 28.6295, (float) 100),
+ new CoordRec((float) 14.3438, (float) 95.2381),
+ new CoordRec((float) 4.82, (float) 85.7143),
+ new CoordRec((float) 4.82, (float) 76.1905),
+ new CoordRec((float) 9.5819, (float) 66.6667),
+ new CoordRec((float) 14.3438, (float) 61.9048),
+ new CoordRec((float) 23.8676, (float) 57.1429),
+ new CoordRec((float) 52.439, (float) 47.619),
+ new CoordRec((float) 61.9629, (float) 42.8571),
+ new CoordRec((float) 66.7248, (float) 38.0952),
+ new CoordRec((float) 71.4867, (float) 28.5714),
+ new CoordRec((float) 71.4867, (float) 14.2857),
+ new CoordRec((float) 61.9629, (float) 4.7619),
+ new CoordRec((float) 47.6771, (float) 0),
+ new CoordRec((float) 28.6295, (float) 0),
+ new CoordRec((float) 14.3438, (float) 4.7619),
+ new CoordRec((float) 4.82, (float) 14.2857),
+};
+
+static final StrokeRec char36[] = {
+ new StrokeRec(2, char36_stroke0),
+ new StrokeRec(2, char36_stroke1),
+ new StrokeRec(20, char36_stroke2),
+};
+
+/* char: 37 '%' */
+
+static final CoordRec char37_stroke0[] = {
+ new CoordRec((float) 92.0743, (float) 100),
+ new CoordRec((float) 6.36, (float) 0),
+};
+
+static final CoordRec char37_stroke1[] = {
+ new CoordRec((float) 30.1695, (float) 100),
+ new CoordRec((float) 39.6933, (float) 90.4762),
+ new CoordRec((float) 39.6933, (float) 80.9524),
+ new CoordRec((float) 34.9314, (float) 71.4286),
+ new CoordRec((float) 25.4076, (float) 66.6667),
+ new CoordRec((float) 15.8838, (float) 66.6667),
+ new CoordRec((float) 6.36, (float) 76.1905),
+ new CoordRec((float) 6.36, (float) 85.7143),
+ new CoordRec((float) 11.1219, (float) 95.2381),
+ new CoordRec((float) 20.6457, (float) 100),
+ new CoordRec((float) 30.1695, (float) 100),
+ new CoordRec((float) 39.6933, (float) 95.2381),
+ new CoordRec((float) 53.979, (float) 90.4762),
+ new CoordRec((float) 68.2648, (float) 90.4762),
+ new CoordRec((float) 82.5505, (float) 95.2381),
+ new CoordRec((float) 92.0743, (float) 100),
+};
+
+static final CoordRec char37_stroke2[] = {
+ new CoordRec((float) 73.0267, (float) 33.3333),
+ new CoordRec((float) 63.5029, (float) 28.5714),
+ new CoordRec((float) 58.741, (float) 19.0476),
+ new CoordRec((float) 58.741, (float) 9.5238),
+ new CoordRec((float) 68.2648, (float) 0),
+ new CoordRec((float) 77.7886, (float) 0),
+ new CoordRec((float) 87.3124, (float) 4.7619),
+ new CoordRec((float) 92.0743, (float) 14.2857),
+ new CoordRec((float) 92.0743, (float) 23.8095),
+ new CoordRec((float) 82.5505, (float) 33.3333),
+ new CoordRec((float) 73.0267, (float) 33.3333),
+};
+
+static final StrokeRec char37[] = {
+ new StrokeRec(2, char37_stroke0),
+ new StrokeRec(16, char37_stroke1),
+ new StrokeRec(11, char37_stroke2),
+};
+
+/* char: 38 '&' */
+
+static final CoordRec char38_stroke0[] = {
+ new CoordRec((float) 101.218, (float) 57.1429),
+ new CoordRec((float) 101.218, (float) 61.9048),
+ new CoordRec((float) 96.4562, (float) 66.6667),
+ new CoordRec((float) 91.6943, (float) 66.6667),
+ new CoordRec((float) 86.9324, (float) 61.9048),
+ new CoordRec((float) 82.1705, (float) 52.381),
+ new CoordRec((float) 72.6467, (float) 28.5714),
+ new CoordRec((float) 63.1229, (float) 14.2857),
+ new CoordRec((float) 53.599, (float) 4.7619),
+ new CoordRec((float) 44.0752, (float) 0),
+ new CoordRec((float) 25.0276, (float) 0),
+ new CoordRec((float) 15.5038, (float) 4.7619),
+ new CoordRec((float) 10.7419, (float) 9.5238),
+ new CoordRec((float) 5.98, (float) 19.0476),
+ new CoordRec((float) 5.98, (float) 28.5714),
+ new CoordRec((float) 10.7419, (float) 38.0952),
+ new CoordRec((float) 15.5038, (float) 42.8571),
+ new CoordRec((float) 48.8371, (float) 61.9048),
+ new CoordRec((float) 53.599, (float) 66.6667),
+ new CoordRec((float) 58.361, (float) 76.1905),
+ new CoordRec((float) 58.361, (float) 85.7143),
+ new CoordRec((float) 53.599, (float) 95.2381),
+ new CoordRec((float) 44.0752, (float) 100),
+ new CoordRec((float) 34.5514, (float) 95.2381),
+ new CoordRec((float) 29.7895, (float) 85.7143),
+ new CoordRec((float) 29.7895, (float) 76.1905),
+ new CoordRec((float) 34.5514, (float) 61.9048),
+ new CoordRec((float) 44.0752, (float) 47.619),
+ new CoordRec((float) 67.8848, (float) 14.2857),
+ new CoordRec((float) 77.4086, (float) 4.7619),
+ new CoordRec((float) 86.9324, (float) 0),
+ new CoordRec((float) 96.4562, (float) 0),
+ new CoordRec((float) 101.218, (float) 4.7619),
+ new CoordRec((float) 101.218, (float) 9.5238),
+};
+
+static final StrokeRec char38[] = {
+ new StrokeRec(34, char38_stroke0),
+};
+
+/* char: 39 ''' */
+
+static final CoordRec char39_stroke0[] = {
+ new CoordRec((float) 4.44, (float) 100),
+ new CoordRec((float) 4.44, (float) 66.6667),
+};
+
+static final StrokeRec char39[] = {
+ new StrokeRec(2, char39_stroke0),
+};
+
+/* char: 40 '(' */
+
+static final CoordRec char40_stroke0[] = {
+ new CoordRec((float) 40.9133, (float) 119.048),
+ new CoordRec((float) 31.3895, (float) 109.524),
+ new CoordRec((float) 21.8657, (float) 95.2381),
+ new CoordRec((float) 12.3419, (float) 76.1905),
+ new CoordRec((float) 7.58, (float) 52.381),
+ new CoordRec((float) 7.58, (float) 33.3333),
+ new CoordRec((float) 12.3419, (float) 9.5238),
+ new CoordRec((float) 21.8657, (float) -9.5238),
+ new CoordRec((float) 31.3895, (float) -23.8095),
+ new CoordRec((float) 40.9133, (float) -33.3333),
+};
+
+static final StrokeRec char40[] = {
+ new StrokeRec(10, char40_stroke0),
+};
+
+/* char: 41 ')' */
+
+static final CoordRec char41_stroke0[] = {
+ new CoordRec((float) 5.28, (float) 119.048),
+ new CoordRec((float) 14.8038, (float) 109.524),
+ new CoordRec((float) 24.3276, (float) 95.2381),
+ new CoordRec((float) 33.8514, (float) 76.1905),
+ new CoordRec((float) 38.6133, (float) 52.381),
+ new CoordRec((float) 38.6133, (float) 33.3333),
+ new CoordRec((float) 33.8514, (float) 9.5238),
+ new CoordRec((float) 24.3276, (float) -9.5238),
+ new CoordRec((float) 14.8038, (float) -23.8095),
+ new CoordRec((float) 5.28, (float) -33.3333),
+};
+
+static final StrokeRec char41[] = {
+ new StrokeRec(10, char41_stroke0),
+};
+
+/* char: 42 '*' */
+
+static final CoordRec char42_stroke0[] = {
+ new CoordRec((float) 30.7695, (float) 71.4286),
+ new CoordRec((float) 30.7695, (float) 14.2857),
+};
+
+static final CoordRec char42_stroke1[] = {
+ new CoordRec((float) 6.96, (float) 57.1429),
+ new CoordRec((float) 54.579, (float) 28.5714),
+};
+
+static final CoordRec char42_stroke2[] = {
+ new CoordRec((float) 54.579, (float) 57.1429),
+ new CoordRec((float) 6.96, (float) 28.5714),
+};
+
+static final StrokeRec char42[] = {
+ new StrokeRec(2, char42_stroke0),
+ new StrokeRec(2, char42_stroke1),
+ new StrokeRec(2, char42_stroke2),
+};
+
+/* char: 43 '+' */
+
+static final CoordRec char43_stroke0[] = {
+ new CoordRec((float) 48.8371, (float) 85.7143),
+ new CoordRec((float) 48.8371, (float) 0),
+};
+
+static final CoordRec char43_stroke1[] = {
+ new CoordRec((float) 5.98, (float) 42.8571),
+ new CoordRec((float) 91.6943, (float) 42.8571),
+};
+
+static final StrokeRec char43[] = {
+ new StrokeRec(2, char43_stroke0),
+ new StrokeRec(2, char43_stroke1),
+};
+
+/* char: 44 ',' */
+
+static final CoordRec char44_stroke0[] = {
+ new CoordRec((float) 18.2838, (float) 4.7619),
+ new CoordRec((float) 13.5219, (float) 0),
+ new CoordRec((float) 8.76, (float) 4.7619),
+ new CoordRec((float) 13.5219, (float) 9.5238),
+ new CoordRec((float) 18.2838, (float) 4.7619),
+ new CoordRec((float) 18.2838, (float) -4.7619),
+ new CoordRec((float) 13.5219, (float) -14.2857),
+ new CoordRec((float) 8.76, (float) -19.0476),
+};
+
+static final StrokeRec char44[] = {
+ new StrokeRec(8, char44_stroke0),
+};
+
+/* char: 45 '-' */
+
+static final CoordRec char45_stroke0[] = {
+ new CoordRec((float) 7.38, (float) 42.8571),
+ new CoordRec((float) 93.0943, (float) 42.8571),
+};
+
+static final StrokeRec char45[] = {
+ new StrokeRec(2, char45_stroke0),
+};
+
+/* char: 46 '.' */
+
+static final CoordRec char46_stroke0[] = {
+ new CoordRec((float) 13.1019, (float) 9.5238),
+ new CoordRec((float) 8.34, (float) 4.7619),
+ new CoordRec((float) 13.1019, (float) 0),
+ new CoordRec((float) 17.8638, (float) 4.7619),
+ new CoordRec((float) 13.1019, (float) 9.5238),
+};
+
+static final StrokeRec char46[] = {
+ new StrokeRec(5, char46_stroke0),
+};
+
+/* char: 47 '/' */
+
+static final CoordRec char47_stroke0[] = {
+ new CoordRec((float) 7.24, (float) -14.2857),
+ new CoordRec((float) 73.9067, (float) 100),
+};
+
+static final StrokeRec char47[] = {
+ new StrokeRec(2, char47_stroke0),
+};
+
+/* char: 48 '0' */
+
+static final CoordRec char48_stroke0[] = {
+ new CoordRec((float) 33.5514, (float) 100),
+ new CoordRec((float) 19.2657, (float) 95.2381),
+ new CoordRec((float) 9.7419, (float) 80.9524),
+ new CoordRec((float) 4.98, (float) 57.1429),
+ new CoordRec((float) 4.98, (float) 42.8571),
+ new CoordRec((float) 9.7419, (float) 19.0476),
+ new CoordRec((float) 19.2657, (float) 4.7619),
+ new CoordRec((float) 33.5514, (float) 0),
+ new CoordRec((float) 43.0752, (float) 0),
+ new CoordRec((float) 57.361, (float) 4.7619),
+ new CoordRec((float) 66.8848, (float) 19.0476),
+ new CoordRec((float) 71.6467, (float) 42.8571),
+ new CoordRec((float) 71.6467, (float) 57.1429),
+ new CoordRec((float) 66.8848, (float) 80.9524),
+ new CoordRec((float) 57.361, (float) 95.2381),
+ new CoordRec((float) 43.0752, (float) 100),
+ new CoordRec((float) 33.5514, (float) 100),
+};
+
+static final StrokeRec char48[] = {
+ new StrokeRec(17, char48_stroke0),
+};
+
+/* char: 49 '1' */
+
+static final CoordRec char49_stroke0[] = {
+ new CoordRec((float) 11.82, (float) 80.9524),
+ new CoordRec((float) 21.3438, (float) 85.7143),
+ new CoordRec((float) 35.6295, (float) 100),
+ new CoordRec((float) 35.6295, (float) 0),
+};
+
+static final StrokeRec char49[] = {
+ new StrokeRec(4, char49_stroke0),
+};
+
+/* char: 50 '2' */
+
+static final CoordRec char50_stroke0[] = {
+ new CoordRec((float) 10.1819, (float) 76.1905),
+ new CoordRec((float) 10.1819, (float) 80.9524),
+ new CoordRec((float) 14.9438, (float) 90.4762),
+ new CoordRec((float) 19.7057, (float) 95.2381),
+ new CoordRec((float) 29.2295, (float) 100),
+ new CoordRec((float) 48.2771, (float) 100),
+ new CoordRec((float) 57.801, (float) 95.2381),
+ new CoordRec((float) 62.5629, (float) 90.4762),
+ new CoordRec((float) 67.3248, (float) 80.9524),
+ new CoordRec((float) 67.3248, (float) 71.4286),
+ new CoordRec((float) 62.5629, (float) 61.9048),
+ new CoordRec((float) 53.039, (float) 47.619),
+ new CoordRec((float) 5.42, (float) 0),
+ new CoordRec((float) 72.0867, (float) 0),
+};
+
+static final StrokeRec char50[] = {
+ new StrokeRec(14, char50_stroke0),
+};
+
+/* char: 51 '3' */
+
+static final CoordRec char51_stroke0[] = {
+ new CoordRec((float) 14.5238, (float) 100),
+ new CoordRec((float) 66.9048, (float) 100),
+ new CoordRec((float) 38.3333, (float) 61.9048),
+ new CoordRec((float) 52.619, (float) 61.9048),
+ new CoordRec((float) 62.1429, (float) 57.1429),
+ new CoordRec((float) 66.9048, (float) 52.381),
+ new CoordRec((float) 71.6667, (float) 38.0952),
+ new CoordRec((float) 71.6667, (float) 28.5714),
+ new CoordRec((float) 66.9048, (float) 14.2857),
+ new CoordRec((float) 57.381, (float) 4.7619),
+ new CoordRec((float) 43.0952, (float) 0),
+ new CoordRec((float) 28.8095, (float) 0),
+ new CoordRec((float) 14.5238, (float) 4.7619),
+ new CoordRec((float) 9.7619, (float) 9.5238),
+ new CoordRec((float) 5, (float) 19.0476),
+};
+
+static final StrokeRec char51[] = {
+ new StrokeRec(15, char51_stroke0),
+};
+
+/* char: 52 '4' */
+
+static final CoordRec char52_stroke0[] = {
+ new CoordRec((float) 51.499, (float) 100),
+ new CoordRec((float) 3.88, (float) 33.3333),
+ new CoordRec((float) 75.3086, (float) 33.3333),
+};
+
+static final CoordRec char52_stroke1[] = {
+ new CoordRec((float) 51.499, (float) 100),
+ new CoordRec((float) 51.499, (float) 0),
+};
+
+static final StrokeRec char52[] = {
+ new StrokeRec(3, char52_stroke0),
+ new StrokeRec(2, char52_stroke1),
+};
+
+/* char: 53 '5' */
+
+static final CoordRec char53_stroke0[] = {
+ new CoordRec((float) 62.0029, (float) 100),
+ new CoordRec((float) 14.3838, (float) 100),
+ new CoordRec((float) 9.6219, (float) 57.1429),
+ new CoordRec((float) 14.3838, (float) 61.9048),
+ new CoordRec((float) 28.6695, (float) 66.6667),
+ new CoordRec((float) 42.9552, (float) 66.6667),
+ new CoordRec((float) 57.241, (float) 61.9048),
+ new CoordRec((float) 66.7648, (float) 52.381),
+ new CoordRec((float) 71.5267, (float) 38.0952),
+ new CoordRec((float) 71.5267, (float) 28.5714),
+ new CoordRec((float) 66.7648, (float) 14.2857),
+ new CoordRec((float) 57.241, (float) 4.7619),
+ new CoordRec((float) 42.9552, (float) 0),
+ new CoordRec((float) 28.6695, (float) 0),
+ new CoordRec((float) 14.3838, (float) 4.7619),
+ new CoordRec((float) 9.6219, (float) 9.5238),
+ new CoordRec((float) 4.86, (float) 19.0476),
+};
+
+static final StrokeRec char53[] = {
+ new StrokeRec(17, char53_stroke0),
+};
+
+/* char: 54 '6' */
+
+static final CoordRec char54_stroke0[] = {
+ new CoordRec((float) 62.7229, (float) 85.7143),
+ new CoordRec((float) 57.961, (float) 95.2381),
+ new CoordRec((float) 43.6752, (float) 100),
+ new CoordRec((float) 34.1514, (float) 100),
+ new CoordRec((float) 19.8657, (float) 95.2381),
+ new CoordRec((float) 10.3419, (float) 80.9524),
+ new CoordRec((float) 5.58, (float) 57.1429),
+ new CoordRec((float) 5.58, (float) 33.3333),
+ new CoordRec((float) 10.3419, (float) 14.2857),
+ new CoordRec((float) 19.8657, (float) 4.7619),
+ new CoordRec((float) 34.1514, (float) 0),
+ new CoordRec((float) 38.9133, (float) 0),
+ new CoordRec((float) 53.199, (float) 4.7619),
+ new CoordRec((float) 62.7229, (float) 14.2857),
+ new CoordRec((float) 67.4848, (float) 28.5714),
+ new CoordRec((float) 67.4848, (float) 33.3333),
+ new CoordRec((float) 62.7229, (float) 47.619),
+ new CoordRec((float) 53.199, (float) 57.1429),
+ new CoordRec((float) 38.9133, (float) 61.9048),
+ new CoordRec((float) 34.1514, (float) 61.9048),
+ new CoordRec((float) 19.8657, (float) 57.1429),
+ new CoordRec((float) 10.3419, (float) 47.619),
+ new CoordRec((float) 5.58, (float) 33.3333),
+};
+
+static final StrokeRec char54[] = {
+ new StrokeRec(23, char54_stroke0),
+};
+
+/* char: 55 '7' */
+
+static final CoordRec char55_stroke0[] = {
+ new CoordRec((float) 72.2267, (float) 100),
+ new CoordRec((float) 24.6076, (float) 0),
+};
+
+static final CoordRec char55_stroke1[] = {
+ new CoordRec((float) 5.56, (float) 100),
+ new CoordRec((float) 72.2267, (float) 100),
+};
+
+static final StrokeRec char55[] = {
+ new StrokeRec(2, char55_stroke0),
+ new StrokeRec(2, char55_stroke1),
+};
+
+/* char: 56 '8' */
+
+static final CoordRec char56_stroke0[] = {
+ new CoordRec((float) 29.4095, (float) 100),
+ new CoordRec((float) 15.1238, (float) 95.2381),
+ new CoordRec((float) 10.3619, (float) 85.7143),
+ new CoordRec((float) 10.3619, (float) 76.1905),
+ new CoordRec((float) 15.1238, (float) 66.6667),
+ new CoordRec((float) 24.6476, (float) 61.9048),
+ new CoordRec((float) 43.6952, (float) 57.1429),
+ new CoordRec((float) 57.981, (float) 52.381),
+ new CoordRec((float) 67.5048, (float) 42.8571),
+ new CoordRec((float) 72.2667, (float) 33.3333),
+ new CoordRec((float) 72.2667, (float) 19.0476),
+ new CoordRec((float) 67.5048, (float) 9.5238),
+ new CoordRec((float) 62.7429, (float) 4.7619),
+ new CoordRec((float) 48.4571, (float) 0),
+ new CoordRec((float) 29.4095, (float) 0),
+ new CoordRec((float) 15.1238, (float) 4.7619),
+ new CoordRec((float) 10.3619, (float) 9.5238),
+ new CoordRec((float) 5.6, (float) 19.0476),
+ new CoordRec((float) 5.6, (float) 33.3333),
+ new CoordRec((float) 10.3619, (float) 42.8571),
+ new CoordRec((float) 19.8857, (float) 52.381),
+ new CoordRec((float) 34.1714, (float) 57.1429),
+ new CoordRec((float) 53.219, (float) 61.9048),
+ new CoordRec((float) 62.7429, (float) 66.6667),
+ new CoordRec((float) 67.5048, (float) 76.1905),
+ new CoordRec((float) 67.5048, (float) 85.7143),
+ new CoordRec((float) 62.7429, (float) 95.2381),
+ new CoordRec((float) 48.4571, (float) 100),
+ new CoordRec((float) 29.4095, (float) 100),
+};
+
+static final StrokeRec char56[] = {
+ new StrokeRec(29, char56_stroke0),
+};
+
+/* char: 57 '9' */
+
+static final CoordRec char57_stroke0[] = {
+ new CoordRec((float) 68.5048, (float) 66.6667),
+ new CoordRec((float) 63.7429, (float) 52.381),
+ new CoordRec((float) 54.219, (float) 42.8571),
+ new CoordRec((float) 39.9333, (float) 38.0952),
+ new CoordRec((float) 35.1714, (float) 38.0952),
+ new CoordRec((float) 20.8857, (float) 42.8571),
+ new CoordRec((float) 11.3619, (float) 52.381),
+ new CoordRec((float) 6.6, (float) 66.6667),
+ new CoordRec((float) 6.6, (float) 71.4286),
+ new CoordRec((float) 11.3619, (float) 85.7143),
+ new CoordRec((float) 20.8857, (float) 95.2381),
+ new CoordRec((float) 35.1714, (float) 100),
+ new CoordRec((float) 39.9333, (float) 100),
+ new CoordRec((float) 54.219, (float) 95.2381),
+ new CoordRec((float) 63.7429, (float) 85.7143),
+ new CoordRec((float) 68.5048, (float) 66.6667),
+ new CoordRec((float) 68.5048, (float) 42.8571),
+ new CoordRec((float) 63.7429, (float) 19.0476),
+ new CoordRec((float) 54.219, (float) 4.7619),
+ new CoordRec((float) 39.9333, (float) 0),
+ new CoordRec((float) 30.4095, (float) 0),
+ new CoordRec((float) 16.1238, (float) 4.7619),
+ new CoordRec((float) 11.3619, (float) 14.2857),
+};
+
+static final StrokeRec char57[] = {
+ new StrokeRec(23, char57_stroke0),
+};
+
+/* char: 58 ':' */
+
+static final CoordRec char58_stroke0[] = {
+ new CoordRec((float) 14.0819, (float) 66.6667),
+ new CoordRec((float) 9.32, (float) 61.9048),
+ new CoordRec((float) 14.0819, (float) 57.1429),
+ new CoordRec((float) 18.8438, (float) 61.9048),
+ new CoordRec((float) 14.0819, (float) 66.6667),
+};
+
+static final CoordRec char58_stroke1[] = {
+ new CoordRec((float) 14.0819, (float) 9.5238),
+ new CoordRec((float) 9.32, (float) 4.7619),
+ new CoordRec((float) 14.0819, (float) 0),
+ new CoordRec((float) 18.8438, (float) 4.7619),
+ new CoordRec((float) 14.0819, (float) 9.5238),
+};
+
+static final StrokeRec char58[] = {
+ new StrokeRec(5, char58_stroke0),
+ new StrokeRec(5, char58_stroke1),
+};
+
+/* char: 59 ';' */
+
+static final CoordRec char59_stroke0[] = {
+ new CoordRec((float) 12.9619, (float) 66.6667),
+ new CoordRec((float) 8.2, (float) 61.9048),
+ new CoordRec((float) 12.9619, (float) 57.1429),
+ new CoordRec((float) 17.7238, (float) 61.9048),
+ new CoordRec((float) 12.9619, (float) 66.6667),
+};
+
+static final CoordRec char59_stroke1[] = {
+ new CoordRec((float) 17.7238, (float) 4.7619),
+ new CoordRec((float) 12.9619, (float) 0),
+ new CoordRec((float) 8.2, (float) 4.7619),
+ new CoordRec((float) 12.9619, (float) 9.5238),
+ new CoordRec((float) 17.7238, (float) 4.7619),
+ new CoordRec((float) 17.7238, (float) -4.7619),
+ new CoordRec((float) 12.9619, (float) -14.2857),
+ new CoordRec((float) 8.2, (float) -19.0476),
+};
+
+static final StrokeRec char59[] = {
+ new StrokeRec(5, char59_stroke0),
+ new StrokeRec(8, char59_stroke1),
+};
+
+/* char: 60 '<' */
+
+static final CoordRec char60_stroke0[] = {
+ new CoordRec((float) 79.2505, (float) 85.7143),
+ new CoordRec((float) 3.06, (float) 42.8571),
+ new CoordRec((float) 79.2505, (float) 0),
+};
+
+static final StrokeRec char60[] = {
+ new StrokeRec(3, char60_stroke0),
+};
+
+/* char: 61 '=' */
+
+static final CoordRec char61_stroke0[] = {
+ new CoordRec((float) 5.7, (float) 57.1429),
+ new CoordRec((float) 91.4143, (float) 57.1429),
+};
+
+static final CoordRec char61_stroke1[] = {
+ new CoordRec((float) 5.7, (float) 28.5714),
+ new CoordRec((float) 91.4143, (float) 28.5714),
+};
+
+static final StrokeRec char61[] = {
+ new StrokeRec(2, char61_stroke0),
+ new StrokeRec(2, char61_stroke1),
+};
+
+/* char: 62 '>' */
+
+static final CoordRec char62_stroke0[] = {
+ new CoordRec((float) 2.78, (float) 85.7143),
+ new CoordRec((float) 78.9705, (float) 42.8571),
+ new CoordRec((float) 2.78, (float) 0),
+};
+
+static final StrokeRec char62[] = {
+ new StrokeRec(3, char62_stroke0),
+};
+
+/* char: 63 '?' */
+
+static final CoordRec char63_stroke0[] = {
+ new CoordRec((float) 8.42, (float) 76.1905),
+ new CoordRec((float) 8.42, (float) 80.9524),
+ new CoordRec((float) 13.1819, (float) 90.4762),
+ new CoordRec((float) 17.9438, (float) 95.2381),
+ new CoordRec((float) 27.4676, (float) 100),
+ new CoordRec((float) 46.5152, (float) 100),
+ new CoordRec((float) 56.039, (float) 95.2381),
+ new CoordRec((float) 60.801, (float) 90.4762),
+ new CoordRec((float) 65.5629, (float) 80.9524),
+ new CoordRec((float) 65.5629, (float) 71.4286),
+ new CoordRec((float) 60.801, (float) 61.9048),
+ new CoordRec((float) 56.039, (float) 57.1429),
+ new CoordRec((float) 36.9914, (float) 47.619),
+ new CoordRec((float) 36.9914, (float) 33.3333),
+};
+
+static final CoordRec char63_stroke1[] = {
+ new CoordRec((float) 36.9914, (float) 9.5238),
+ new CoordRec((float) 32.2295, (float) 4.7619),
+ new CoordRec((float) 36.9914, (float) 0),
+ new CoordRec((float) 41.7533, (float) 4.7619),
+ new CoordRec((float) 36.9914, (float) 9.5238),
+};
+
+static final StrokeRec char63[] = {
+ new StrokeRec(14, char63_stroke0),
+ new StrokeRec(5, char63_stroke1),
+};
+
+/* char: 64 '@' */
+
+static final CoordRec char64_stroke0[] = {
+ new CoordRec((float) 49.2171, (float) 52.381),
+ new CoordRec((float) 39.6933, (float) 57.1429),
+ new CoordRec((float) 30.1695, (float) 57.1429),
+ new CoordRec((float) 25.4076, (float) 47.619),
+ new CoordRec((float) 25.4076, (float) 42.8571),
+ new CoordRec((float) 30.1695, (float) 33.3333),
+ new CoordRec((float) 39.6933, (float) 33.3333),
+ new CoordRec((float) 49.2171, (float) 38.0952),
+};
+
+static final CoordRec char64_stroke1[] = {
+ new CoordRec((float) 49.2171, (float) 57.1429),
+ new CoordRec((float) 49.2171, (float) 38.0952),
+ new CoordRec((float) 53.979, (float) 33.3333),
+ new CoordRec((float) 63.5029, (float) 33.3333),
+ new CoordRec((float) 68.2648, (float) 42.8571),
+ new CoordRec((float) 68.2648, (float) 47.619),
+ new CoordRec((float) 63.5029, (float) 61.9048),
+ new CoordRec((float) 53.979, (float) 71.4286),
+ new CoordRec((float) 39.6933, (float) 76.1905),
+ new CoordRec((float) 34.9314, (float) 76.1905),
+ new CoordRec((float) 20.6457, (float) 71.4286),
+ new CoordRec((float) 11.1219, (float) 61.9048),
+ new CoordRec((float) 6.36, (float) 47.619),
+ new CoordRec((float) 6.36, (float) 42.8571),
+ new CoordRec((float) 11.1219, (float) 28.5714),
+ new CoordRec((float) 20.6457, (float) 19.0476),
+ new CoordRec((float) 34.9314, (float) 14.2857),
+ new CoordRec((float) 39.6933, (float) 14.2857),
+ new CoordRec((float) 53.979, (float) 19.0476),
+};
+
+static final StrokeRec char64[] = {
+ new StrokeRec(8, char64_stroke0),
+ new StrokeRec(19, char64_stroke1),
+};
+
+/* char: 65 'A' */
+
+static final CoordRec char65_stroke0[] = {
+ new CoordRec((float) 40.5952, (float) 100),
+ new CoordRec((float) 2.5, (float) 0),
+};
+
+static final CoordRec char65_stroke1[] = {
+ new CoordRec((float) 40.5952, (float) 100),
+ new CoordRec((float) 78.6905, (float) 0),
+};
+
+static final CoordRec char65_stroke2[] = {
+ new CoordRec((float) 16.7857, (float) 33.3333),
+ new CoordRec((float) 64.4048, (float) 33.3333),
+};
+
+static final StrokeRec char65[] = {
+ new StrokeRec(2, char65_stroke0),
+ new StrokeRec(2, char65_stroke1),
+ new StrokeRec(2, char65_stroke2),
+};
+
+/* char: 66 'B' */
+
+static final CoordRec char66_stroke0[] = {
+ new CoordRec((float) 11.42, (float) 100),
+ new CoordRec((float) 11.42, (float) 0),
+};
+
+static final CoordRec char66_stroke1[] = {
+ new CoordRec((float) 11.42, (float) 100),
+ new CoordRec((float) 54.2771, (float) 100),
+ new CoordRec((float) 68.5629, (float) 95.2381),
+ new CoordRec((float) 73.3248, (float) 90.4762),
+ new CoordRec((float) 78.0867, (float) 80.9524),
+ new CoordRec((float) 78.0867, (float) 71.4286),
+ new CoordRec((float) 73.3248, (float) 61.9048),
+ new CoordRec((float) 68.5629, (float) 57.1429),
+ new CoordRec((float) 54.2771, (float) 52.381),
+};
+
+static final CoordRec char66_stroke2[] = {
+ new CoordRec((float) 11.42, (float) 52.381),
+ new CoordRec((float) 54.2771, (float) 52.381),
+ new CoordRec((float) 68.5629, (float) 47.619),
+ new CoordRec((float) 73.3248, (float) 42.8571),
+ new CoordRec((float) 78.0867, (float) 33.3333),
+ new CoordRec((float) 78.0867, (float) 19.0476),
+ new CoordRec((float) 73.3248, (float) 9.5238),
+ new CoordRec((float) 68.5629, (float) 4.7619),
+ new CoordRec((float) 54.2771, (float) 0),
+ new CoordRec((float) 11.42, (float) 0),
+};
+
+static final StrokeRec char66[] = {
+ new StrokeRec(2, char66_stroke0),
+ new StrokeRec(9, char66_stroke1),
+ new StrokeRec(10, char66_stroke2),
+};
+
+/* char: 67 'C' */
+
+static final CoordRec char67_stroke0[] = {
+ new CoordRec((float) 78.0886, (float) 76.1905),
+ new CoordRec((float) 73.3267, (float) 85.7143),
+ new CoordRec((float) 63.8029, (float) 95.2381),
+ new CoordRec((float) 54.279, (float) 100),
+ new CoordRec((float) 35.2314, (float) 100),
+ new CoordRec((float) 25.7076, (float) 95.2381),
+ new CoordRec((float) 16.1838, (float) 85.7143),
+ new CoordRec((float) 11.4219, (float) 76.1905),
+ new CoordRec((float) 6.66, (float) 61.9048),
+ new CoordRec((float) 6.66, (float) 38.0952),
+ new CoordRec((float) 11.4219, (float) 23.8095),
+ new CoordRec((float) 16.1838, (float) 14.2857),
+ new CoordRec((float) 25.7076, (float) 4.7619),
+ new CoordRec((float) 35.2314, (float) 0),
+ new CoordRec((float) 54.279, (float) 0),
+ new CoordRec((float) 63.8029, (float) 4.7619),
+ new CoordRec((float) 73.3267, (float) 14.2857),
+ new CoordRec((float) 78.0886, (float) 23.8095),
+};
+
+static final StrokeRec char67[] = {
+ new StrokeRec(18, char67_stroke0),
+};
+
+/* char: 68 'D' */
+
+static final CoordRec char68_stroke0[] = {
+ new CoordRec((float) 11.96, (float) 100),
+ new CoordRec((float) 11.96, (float) 0),
+};
+
+static final CoordRec char68_stroke1[] = {
+ new CoordRec((float) 11.96, (float) 100),
+ new CoordRec((float) 45.2933, (float) 100),
+ new CoordRec((float) 59.579, (float) 95.2381),
+ new CoordRec((float) 69.1029, (float) 85.7143),
+ new CoordRec((float) 73.8648, (float) 76.1905),
+ new CoordRec((float) 78.6267, (float) 61.9048),
+ new CoordRec((float) 78.6267, (float) 38.0952),
+ new CoordRec((float) 73.8648, (float) 23.8095),
+ new CoordRec((float) 69.1029, (float) 14.2857),
+ new CoordRec((float) 59.579, (float) 4.7619),
+ new CoordRec((float) 45.2933, (float) 0),
+ new CoordRec((float) 11.96, (float) 0),
+};
+
+static final StrokeRec char68[] = {
+ new StrokeRec(2, char68_stroke0),
+ new StrokeRec(12, char68_stroke1),
+};
+
+/* char: 69 'E' */
+
+static final CoordRec char69_stroke0[] = {
+ new CoordRec((float) 11.42, (float) 100),
+ new CoordRec((float) 11.42, (float) 0),
+};
+
+static final CoordRec char69_stroke1[] = {
+ new CoordRec((float) 11.42, (float) 100),
+ new CoordRec((float) 73.3248, (float) 100),
+};
+
+static final CoordRec char69_stroke2[] = {
+ new CoordRec((float) 11.42, (float) 52.381),
+ new CoordRec((float) 49.5152, (float) 52.381),
+};
+
+static final CoordRec char69_stroke3[] = {
+ new CoordRec((float) 11.42, (float) 0),
+ new CoordRec((float) 73.3248, (float) 0),
+};
+
+static final StrokeRec char69[] = {
+ new StrokeRec(2, char69_stroke0),
+ new StrokeRec(2, char69_stroke1),
+ new StrokeRec(2, char69_stroke2),
+ new StrokeRec(2, char69_stroke3),
+};
+
+/* char: 70 'F' */
+
+static final CoordRec char70_stroke0[] = {
+ new CoordRec((float) 11.42, (float) 100),
+ new CoordRec((float) 11.42, (float) 0),
+};
+
+static final CoordRec char70_stroke1[] = {
+ new CoordRec((float) 11.42, (float) 100),
+ new CoordRec((float) 73.3248, (float) 100),
+};
+
+static final CoordRec char70_stroke2[] = {
+ new CoordRec((float) 11.42, (float) 52.381),
+ new CoordRec((float) 49.5152, (float) 52.381),
+};
+
+static final StrokeRec char70[] = {
+ new StrokeRec(2, char70_stroke0),
+ new StrokeRec(2, char70_stroke1),
+ new StrokeRec(2, char70_stroke2),
+};
+
+/* char: 71 'G' */
+
+static final CoordRec char71_stroke0[] = {
+ new CoordRec((float) 78.4886, (float) 76.1905),
+ new CoordRec((float) 73.7267, (float) 85.7143),
+ new CoordRec((float) 64.2029, (float) 95.2381),
+ new CoordRec((float) 54.679, (float) 100),
+ new CoordRec((float) 35.6314, (float) 100),
+ new CoordRec((float) 26.1076, (float) 95.2381),
+ new CoordRec((float) 16.5838, (float) 85.7143),
+ new CoordRec((float) 11.8219, (float) 76.1905),
+ new CoordRec((float) 7.06, (float) 61.9048),
+ new CoordRec((float) 7.06, (float) 38.0952),
+ new CoordRec((float) 11.8219, (float) 23.8095),
+ new CoordRec((float) 16.5838, (float) 14.2857),
+ new CoordRec((float) 26.1076, (float) 4.7619),
+ new CoordRec((float) 35.6314, (float) 0),
+ new CoordRec((float) 54.679, (float) 0),
+ new CoordRec((float) 64.2029, (float) 4.7619),
+ new CoordRec((float) 73.7267, (float) 14.2857),
+ new CoordRec((float) 78.4886, (float) 23.8095),
+ new CoordRec((float) 78.4886, (float) 38.0952),
+};
+
+static final CoordRec char71_stroke1[] = {
+ new CoordRec((float) 54.679, (float) 38.0952),
+ new CoordRec((float) 78.4886, (float) 38.0952),
+};
+
+static final StrokeRec char71[] = {
+ new StrokeRec(19, char71_stroke0),
+ new StrokeRec(2, char71_stroke1),
+};
+
+/* char: 72 'H' */
+
+static final CoordRec char72_stroke0[] = {
+ new CoordRec((float) 11.42, (float) 100),
+ new CoordRec((float) 11.42, (float) 0),
+};
+
+static final CoordRec char72_stroke1[] = {
+ new CoordRec((float) 78.0867, (float) 100),
+ new CoordRec((float) 78.0867, (float) 0),
+};
+
+static final CoordRec char72_stroke2[] = {
+ new CoordRec((float) 11.42, (float) 52.381),
+ new CoordRec((float) 78.0867, (float) 52.381),
+};
+
+static final StrokeRec char72[] = {
+ new StrokeRec(2, char72_stroke0),
+ new StrokeRec(2, char72_stroke1),
+ new StrokeRec(2, char72_stroke2),
+};
+
+/* char: 73 'I' */
+
+static final CoordRec char73_stroke0[] = {
+ new CoordRec((float) 10.86, (float) 100),
+ new CoordRec((float) 10.86, (float) 0),
+};
+
+static final StrokeRec char73[] = {
+ new StrokeRec(2, char73_stroke0),
+};
+
+/* char: 74 'J' */
+
+static final CoordRec char74_stroke0[] = {
+ new CoordRec((float) 50.119, (float) 100),
+ new CoordRec((float) 50.119, (float) 23.8095),
+ new CoordRec((float) 45.3571, (float) 9.5238),
+ new CoordRec((float) 40.5952, (float) 4.7619),
+ new CoordRec((float) 31.0714, (float) 0),
+ new CoordRec((float) 21.5476, (float) 0),
+ new CoordRec((float) 12.0238, (float) 4.7619),
+ new CoordRec((float) 7.2619, (float) 9.5238),
+ new CoordRec((float) 2.5, (float) 23.8095),
+ new CoordRec((float) 2.5, (float) 33.3333),
+};
+
+static final StrokeRec char74[] = {
+ new StrokeRec(10, char74_stroke0),
+};
+
+/* char: 75 'K' */
+
+static final CoordRec char75_stroke0[] = {
+ new CoordRec((float) 11.28, (float) 100),
+ new CoordRec((float) 11.28, (float) 0),
+};
+
+static final CoordRec char75_stroke1[] = {
+ new CoordRec((float) 77.9467, (float) 100),
+ new CoordRec((float) 11.28, (float) 33.3333),
+};
+
+static final CoordRec char75_stroke2[] = {
+ new CoordRec((float) 35.0895, (float) 57.1429),
+ new CoordRec((float) 77.9467, (float) 0),
+};
+
+static final StrokeRec char75[] = {
+ new StrokeRec(2, char75_stroke0),
+ new StrokeRec(2, char75_stroke1),
+ new StrokeRec(2, char75_stroke2),
+};
+
+/* char: 76 'L' */
+
+static final CoordRec char76_stroke0[] = {
+ new CoordRec((float) 11.68, (float) 100),
+ new CoordRec((float) 11.68, (float) 0),
+};
+
+static final CoordRec char76_stroke1[] = {
+ new CoordRec((float) 11.68, (float) 0),
+ new CoordRec((float) 68.8229, (float) 0),
+};
+
+static final StrokeRec char76[] = {
+ new StrokeRec(2, char76_stroke0),
+ new StrokeRec(2, char76_stroke1),
+};
+
+/* char: 77 'M' */
+
+static final CoordRec char77_stroke0[] = {
+ new CoordRec((float) 10.86, (float) 100),
+ new CoordRec((float) 10.86, (float) 0),
+};
+
+static final CoordRec char77_stroke1[] = {
+ new CoordRec((float) 10.86, (float) 100),
+ new CoordRec((float) 48.9552, (float) 0),
+};
+
+static final CoordRec char77_stroke2[] = {
+ new CoordRec((float) 87.0505, (float) 100),
+ new CoordRec((float) 48.9552, (float) 0),
+};
+
+static final CoordRec char77_stroke3[] = {
+ new CoordRec((float) 87.0505, (float) 100),
+ new CoordRec((float) 87.0505, (float) 0),
+};
+
+static final StrokeRec char77[] = {
+ new StrokeRec(2, char77_stroke0),
+ new StrokeRec(2, char77_stroke1),
+ new StrokeRec(2, char77_stroke2),
+ new StrokeRec(2, char77_stroke3),
+};
+
+/* char: 78 'N' */
+
+static final CoordRec char78_stroke0[] = {
+ new CoordRec((float) 11.14, (float) 100),
+ new CoordRec((float) 11.14, (float) 0),
+};
+
+static final CoordRec char78_stroke1[] = {
+ new CoordRec((float) 11.14, (float) 100),
+ new CoordRec((float) 77.8067, (float) 0),
+};
+
+static final CoordRec char78_stroke2[] = {
+ new CoordRec((float) 77.8067, (float) 100),
+ new CoordRec((float) 77.8067, (float) 0),
+};
+
+static final StrokeRec char78[] = {
+ new StrokeRec(2, char78_stroke0),
+ new StrokeRec(2, char78_stroke1),
+ new StrokeRec(2, char78_stroke2),
+};
+
+/* char: 79 'O' */
+
+static final CoordRec char79_stroke0[] = {
+ new CoordRec((float) 34.8114, (float) 100),
+ new CoordRec((float) 25.2876, (float) 95.2381),
+ new CoordRec((float) 15.7638, (float) 85.7143),
+ new CoordRec((float) 11.0019, (float) 76.1905),
+ new CoordRec((float) 6.24, (float) 61.9048),
+ new CoordRec((float) 6.24, (float) 38.0952),
+ new CoordRec((float) 11.0019, (float) 23.8095),
+ new CoordRec((float) 15.7638, (float) 14.2857),
+ new CoordRec((float) 25.2876, (float) 4.7619),
+ new CoordRec((float) 34.8114, (float) 0),
+ new CoordRec((float) 53.859, (float) 0),
+ new CoordRec((float) 63.3829, (float) 4.7619),
+ new CoordRec((float) 72.9067, (float) 14.2857),
+ new CoordRec((float) 77.6686, (float) 23.8095),
+ new CoordRec((float) 82.4305, (float) 38.0952),
+ new CoordRec((float) 82.4305, (float) 61.9048),
+ new CoordRec((float) 77.6686, (float) 76.1905),
+ new CoordRec((float) 72.9067, (float) 85.7143),
+ new CoordRec((float) 63.3829, (float) 95.2381),
+ new CoordRec((float) 53.859, (float) 100),
+ new CoordRec((float) 34.8114, (float) 100),
+};
+
+static final StrokeRec char79[] = {
+ new StrokeRec(21, char79_stroke0),
+};
+
+/* char: 80 'P' */
+
+static final CoordRec char80_stroke0[] = {
+ new CoordRec((float) 12.1, (float) 100),
+ new CoordRec((float) 12.1, (float) 0),
+};
+
+static final CoordRec char80_stroke1[] = {
+ new CoordRec((float) 12.1, (float) 100),
+ new CoordRec((float) 54.9571, (float) 100),
+ new CoordRec((float) 69.2429, (float) 95.2381),
+ new CoordRec((float) 74.0048, (float) 90.4762),
+ new CoordRec((float) 78.7667, (float) 80.9524),
+ new CoordRec((float) 78.7667, (float) 66.6667),
+ new CoordRec((float) 74.0048, (float) 57.1429),
+ new CoordRec((float) 69.2429, (float) 52.381),
+ new CoordRec((float) 54.9571, (float) 47.619),
+ new CoordRec((float) 12.1, (float) 47.619),
+};
+
+static final StrokeRec char80[] = {
+ new StrokeRec(2, char80_stroke0),
+ new StrokeRec(10, char80_stroke1),
+};
+
+/* char: 81 'Q' */
+
+static final CoordRec char81_stroke0[] = {
+ new CoordRec((float) 33.8714, (float) 100),
+ new CoordRec((float) 24.3476, (float) 95.2381),
+ new CoordRec((float) 14.8238, (float) 85.7143),
+ new CoordRec((float) 10.0619, (float) 76.1905),
+ new CoordRec((float) 5.3, (float) 61.9048),
+ new CoordRec((float) 5.3, (float) 38.0952),
+ new CoordRec((float) 10.0619, (float) 23.8095),
+ new CoordRec((float) 14.8238, (float) 14.2857),
+ new CoordRec((float) 24.3476, (float) 4.7619),
+ new CoordRec((float) 33.8714, (float) 0),
+ new CoordRec((float) 52.919, (float) 0),
+ new CoordRec((float) 62.4429, (float) 4.7619),
+ new CoordRec((float) 71.9667, (float) 14.2857),
+ new CoordRec((float) 76.7286, (float) 23.8095),
+ new CoordRec((float) 81.4905, (float) 38.0952),
+ new CoordRec((float) 81.4905, (float) 61.9048),
+ new CoordRec((float) 76.7286, (float) 76.1905),
+ new CoordRec((float) 71.9667, (float) 85.7143),
+ new CoordRec((float) 62.4429, (float) 95.2381),
+ new CoordRec((float) 52.919, (float) 100),
+ new CoordRec((float) 33.8714, (float) 100),
+};
+
+static final CoordRec char81_stroke1[] = {
+ new CoordRec((float) 48.1571, (float) 19.0476),
+ new CoordRec((float) 76.7286, (float) -9.5238),
+};
+
+static final StrokeRec char81[] = {
+ new StrokeRec(21, char81_stroke0),
+ new StrokeRec(2, char81_stroke1),
+};
+
+/* char: 82 'R' */
+
+static final CoordRec char82_stroke0[] = {
+ new CoordRec((float) 11.68, (float) 100),
+ new CoordRec((float) 11.68, (float) 0),
+};
+
+static final CoordRec char82_stroke1[] = {
+ new CoordRec((float) 11.68, (float) 100),
+ new CoordRec((float) 54.5371, (float) 100),
+ new CoordRec((float) 68.8229, (float) 95.2381),
+ new CoordRec((float) 73.5848, (float) 90.4762),
+ new CoordRec((float) 78.3467, (float) 80.9524),
+ new CoordRec((float) 78.3467, (float) 71.4286),
+ new CoordRec((float) 73.5848, (float) 61.9048),
+ new CoordRec((float) 68.8229, (float) 57.1429),
+ new CoordRec((float) 54.5371, (float) 52.381),
+ new CoordRec((float) 11.68, (float) 52.381),
+};
+
+static final CoordRec char82_stroke2[] = {
+ new CoordRec((float) 45.0133, (float) 52.381),
+ new CoordRec((float) 78.3467, (float) 0),
+};
+
+static final StrokeRec char82[] = {
+ new StrokeRec(2, char82_stroke0),
+ new StrokeRec(10, char82_stroke1),
+ new StrokeRec(2, char82_stroke2),
+};
+
+/* char: 83 'S' */
+
+static final CoordRec char83_stroke0[] = {
+ new CoordRec((float) 74.6667, (float) 85.7143),
+ new CoordRec((float) 65.1429, (float) 95.2381),
+ new CoordRec((float) 50.8571, (float) 100),
+ new CoordRec((float) 31.8095, (float) 100),
+ new CoordRec((float) 17.5238, (float) 95.2381),
+ new CoordRec((float) 8, (float) 85.7143),
+ new CoordRec((float) 8, (float) 76.1905),
+ new CoordRec((float) 12.7619, (float) 66.6667),
+ new CoordRec((float) 17.5238, (float) 61.9048),
+ new CoordRec((float) 27.0476, (float) 57.1429),
+ new CoordRec((float) 55.619, (float) 47.619),
+ new CoordRec((float) 65.1429, (float) 42.8571),
+ new CoordRec((float) 69.9048, (float) 38.0952),
+ new CoordRec((float) 74.6667, (float) 28.5714),
+ new CoordRec((float) 74.6667, (float) 14.2857),
+ new CoordRec((float) 65.1429, (float) 4.7619),
+ new CoordRec((float) 50.8571, (float) 0),
+ new CoordRec((float) 31.8095, (float) 0),
+ new CoordRec((float) 17.5238, (float) 4.7619),
+ new CoordRec((float) 8, (float) 14.2857),
+};
+
+static final StrokeRec char83[] = {
+ new StrokeRec(20, char83_stroke0),
+};
+
+/* char: 84 'T' */
+
+static final CoordRec char84_stroke0[] = {
+ new CoordRec((float) 35.6933, (float) 100),
+ new CoordRec((float) 35.6933, (float) 0),
+};
+
+static final CoordRec char84_stroke1[] = {
+ new CoordRec((float) 2.36, (float) 100),
+ new CoordRec((float) 69.0267, (float) 100),
+};
+
+static final StrokeRec char84[] = {
+ new StrokeRec(2, char84_stroke0),
+ new StrokeRec(2, char84_stroke1),
+};
+
+/* char: 85 'U' */
+
+static final CoordRec char85_stroke0[] = {
+ new CoordRec((float) 11.54, (float) 100),
+ new CoordRec((float) 11.54, (float) 28.5714),
+ new CoordRec((float) 16.3019, (float) 14.2857),
+ new CoordRec((float) 25.8257, (float) 4.7619),
+ new CoordRec((float) 40.1114, (float) 0),
+ new CoordRec((float) 49.6352, (float) 0),
+ new CoordRec((float) 63.921, (float) 4.7619),
+ new CoordRec((float) 73.4448, (float) 14.2857),
+ new CoordRec((float) 78.2067, (float) 28.5714),
+ new CoordRec((float) 78.2067, (float) 100),
+};
+
+static final StrokeRec char85[] = {
+ new StrokeRec(10, char85_stroke0),
+};
+
+/* char: 86 'V' */
+
+static final CoordRec char86_stroke0[] = {
+ new CoordRec((float) 2.36, (float) 100),
+ new CoordRec((float) 40.4552, (float) 0),
+};
+
+static final CoordRec char86_stroke1[] = {
+ new CoordRec((float) 78.5505, (float) 100),
+ new CoordRec((float) 40.4552, (float) 0),
+};
+
+static final StrokeRec char86[] = {
+ new StrokeRec(2, char86_stroke0),
+ new StrokeRec(2, char86_stroke1),
+};
+
+/* char: 87 'W' */
+
+static final CoordRec char87_stroke0[] = {
+ new CoordRec((float) 2.22, (float) 100),
+ new CoordRec((float) 26.0295, (float) 0),
+};
+
+static final CoordRec char87_stroke1[] = {
+ new CoordRec((float) 49.839, (float) 100),
+ new CoordRec((float) 26.0295, (float) 0),
+};
+
+static final CoordRec char87_stroke2[] = {
+ new CoordRec((float) 49.839, (float) 100),
+ new CoordRec((float) 73.6486, (float) 0),
+};
+
+static final CoordRec char87_stroke3[] = {
+ new CoordRec((float) 97.4581, (float) 100),
+ new CoordRec((float) 73.6486, (float) 0),
+};
+
+static final StrokeRec char87[] = {
+ new StrokeRec(2, char87_stroke0),
+ new StrokeRec(2, char87_stroke1),
+ new StrokeRec(2, char87_stroke2),
+ new StrokeRec(2, char87_stroke3),
+};
+
+/* char: 88 'X' */
+
+static final CoordRec char88_stroke0[] = {
+ new CoordRec((float) 2.5, (float) 100),
+ new CoordRec((float) 69.1667, (float) 0),
+};
+
+static final CoordRec char88_stroke1[] = {
+ new CoordRec((float) 69.1667, (float) 100),
+ new CoordRec((float) 2.5, (float) 0),
+};
+
+static final StrokeRec char88[] = {
+ new StrokeRec(2, char88_stroke0),
+ new StrokeRec(2, char88_stroke1),
+};
+
+/* char: 89 'Y' */
+
+static final CoordRec char89_stroke0[] = {
+ new CoordRec((float) 1.52, (float) 100),
+ new CoordRec((float) 39.6152, (float) 52.381),
+ new CoordRec((float) 39.6152, (float) 0),
+};
+
+static final CoordRec char89_stroke1[] = {
+ new CoordRec((float) 77.7105, (float) 100),
+ new CoordRec((float) 39.6152, (float) 52.381),
+};
+
+static final StrokeRec char89[] = {
+ new StrokeRec(3, char89_stroke0),
+ new StrokeRec(2, char89_stroke1),
+};
+
+/* char: 90 'Z' */
+
+static final CoordRec char90_stroke0[] = {
+ new CoordRec((float) 69.1667, (float) 100),
+ new CoordRec((float) 2.5, (float) 0),
+};
+
+static final CoordRec char90_stroke1[] = {
+ new CoordRec((float) 2.5, (float) 100),
+ new CoordRec((float) 69.1667, (float) 100),
+};
+
+static final CoordRec char90_stroke2[] = {
+ new CoordRec((float) 2.5, (float) 0),
+ new CoordRec((float) 69.1667, (float) 0),
+};
+
+static final StrokeRec char90[] = {
+ new StrokeRec(2, char90_stroke0),
+ new StrokeRec(2, char90_stroke1),
+ new StrokeRec(2, char90_stroke2),
+};
+
+/* char: 91 '[' */
+
+static final CoordRec char91_stroke0[] = {
+ new CoordRec((float) 7.78, (float) 119.048),
+ new CoordRec((float) 7.78, (float) -33.3333),
+};
+
+static final CoordRec char91_stroke1[] = {
+ new CoordRec((float) 12.5419, (float) 119.048),
+ new CoordRec((float) 12.5419, (float) -33.3333),
+};
+
+static final CoordRec char91_stroke2[] = {
+ new CoordRec((float) 7.78, (float) 119.048),
+ new CoordRec((float) 41.1133, (float) 119.048),
+};
+
+static final CoordRec char91_stroke3[] = {
+ new CoordRec((float) 7.78, (float) -33.3333),
+ new CoordRec((float) 41.1133, (float) -33.3333),
+};
+
+static final StrokeRec char91[] = {
+ new StrokeRec(2, char91_stroke0),
+ new StrokeRec(2, char91_stroke1),
+ new StrokeRec(2, char91_stroke2),
+ new StrokeRec(2, char91_stroke3),
+};
+
+/* char: 92 '\' */
+
+static final CoordRec char92_stroke0[] = {
+ new CoordRec((float) 5.84, (float) 100),
+ new CoordRec((float) 72.5067, (float) -14.2857),
+};
+
+static final StrokeRec char92[] = {
+ new StrokeRec(2, char92_stroke0),
+};
+
+/* char: 93 ']' */
+
+static final CoordRec char93_stroke0[] = {
+ new CoordRec((float) 33.0114, (float) 119.048),
+ new CoordRec((float) 33.0114, (float) -33.3333),
+};
+
+static final CoordRec char93_stroke1[] = {
+ new CoordRec((float) 37.7733, (float) 119.048),
+ new CoordRec((float) 37.7733, (float) -33.3333),
+};
+
+static final CoordRec char93_stroke2[] = {
+ new CoordRec((float) 4.44, (float) 119.048),
+ new CoordRec((float) 37.7733, (float) 119.048),
+};
+
+static final CoordRec char93_stroke3[] = {
+ new CoordRec((float) 4.44, (float) -33.3333),
+ new CoordRec((float) 37.7733, (float) -33.3333),
+};
+
+static final StrokeRec char93[] = {
+ new StrokeRec(2, char93_stroke0),
+ new StrokeRec(2, char93_stroke1),
+ new StrokeRec(2, char93_stroke2),
+ new StrokeRec(2, char93_stroke3),
+};
+
+/* char: 94 '^' */
+
+static final CoordRec char94_stroke0[] = {
+ new CoordRec((float) 44.0752, (float) 109.524),
+ new CoordRec((float) 5.98, (float) 42.8571),
+};
+
+static final CoordRec char94_stroke1[] = {
+ new CoordRec((float) 44.0752, (float) 109.524),
+ new CoordRec((float) 82.1705, (float) 42.8571),
+};
+
+static final StrokeRec char94[] = {
+ new StrokeRec(2, char94_stroke0),
+ new StrokeRec(2, char94_stroke1),
+};
+
+/* char: 95 '_' */
+
+static final CoordRec char95_stroke0[] = {
+ new CoordRec((float)-1.1, (float) -33.3333),
+ new CoordRec((float) 103.662, (float) -33.3333),
+ new CoordRec((float) 103.662, (float) -28.5714),
+ new CoordRec((float)-1.1, (float) -28.5714),
+ new CoordRec((float)-1.1, (float) -33.3333),
+};
+
+static final StrokeRec char95[] = {
+ new StrokeRec(5, char95_stroke0),
+};
+
+/* char: 96 '`' */
+
+static final CoordRec char96_stroke0[] = {
+ new CoordRec((float) 33.0219, (float) 100),
+ new CoordRec((float) 56.8314, (float) 71.4286),
+};
+
+static final CoordRec char96_stroke1[] = {
+ new CoordRec((float) 33.0219, (float) 100),
+ new CoordRec((float) 28.26, (float) 95.2381),
+ new CoordRec((float) 56.8314, (float) 71.4286),
+};
+
+static final StrokeRec char96[] = {
+ new StrokeRec(2, char96_stroke0),
+ new StrokeRec(3, char96_stroke1),
+};
+
+/* char: 97 'a' */
+
+static final CoordRec char97_stroke0[] = {
+ new CoordRec((float) 63.8229, (float) 66.6667),
+ new CoordRec((float) 63.8229, (float) 0),
+};
+
+static final CoordRec char97_stroke1[] = {
+ new CoordRec((float) 63.8229, (float) 52.381),
+ new CoordRec((float) 54.299, (float) 61.9048),
+ new CoordRec((float) 44.7752, (float) 66.6667),
+ new CoordRec((float) 30.4895, (float) 66.6667),
+ new CoordRec((float) 20.9657, (float) 61.9048),
+ new CoordRec((float) 11.4419, (float) 52.381),
+ new CoordRec((float) 6.68, (float) 38.0952),
+ new CoordRec((float) 6.68, (float) 28.5714),
+ new CoordRec((float) 11.4419, (float) 14.2857),
+ new CoordRec((float) 20.9657, (float) 4.7619),
+ new CoordRec((float) 30.4895, (float) 0),
+ new CoordRec((float) 44.7752, (float) 0),
+ new CoordRec((float) 54.299, (float) 4.7619),
+ new CoordRec((float) 63.8229, (float) 14.2857),
+};
+
+static final StrokeRec char97[] = {
+ new StrokeRec(2, char97_stroke0),
+ new StrokeRec(14, char97_stroke1),
+};
+
+/* char: 98 'b' */
+
+static final CoordRec char98_stroke0[] = {
+ new CoordRec((float) 8.76, (float) 100),
+ new CoordRec((float) 8.76, (float) 0),
+};
+
+static final CoordRec char98_stroke1[] = {
+ new CoordRec((float) 8.76, (float) 52.381),
+ new CoordRec((float) 18.2838, (float) 61.9048),
+ new CoordRec((float) 27.8076, (float) 66.6667),
+ new CoordRec((float) 42.0933, (float) 66.6667),
+ new CoordRec((float) 51.6171, (float) 61.9048),
+ new CoordRec((float) 61.141, (float) 52.381),
+ new CoordRec((float) 65.9029, (float) 38.0952),
+ new CoordRec((float) 65.9029, (float) 28.5714),
+ new CoordRec((float) 61.141, (float) 14.2857),
+ new CoordRec((float) 51.6171, (float) 4.7619),
+ new CoordRec((float) 42.0933, (float) 0),
+ new CoordRec((float) 27.8076, (float) 0),
+ new CoordRec((float) 18.2838, (float) 4.7619),
+ new CoordRec((float) 8.76, (float) 14.2857),
+};
+
+static final StrokeRec char98[] = {
+ new StrokeRec(2, char98_stroke0),
+ new StrokeRec(14, char98_stroke1),
+};
+
+/* char: 99 'c' */
+
+static final CoordRec char99_stroke0[] = {
+ new CoordRec((float) 62.6629, (float) 52.381),
+ new CoordRec((float) 53.139, (float) 61.9048),
+ new CoordRec((float) 43.6152, (float) 66.6667),
+ new CoordRec((float) 29.3295, (float) 66.6667),
+ new CoordRec((float) 19.8057, (float) 61.9048),
+ new CoordRec((float) 10.2819, (float) 52.381),
+ new CoordRec((float) 5.52, (float) 38.0952),
+ new CoordRec((float) 5.52, (float) 28.5714),
+ new CoordRec((float) 10.2819, (float) 14.2857),
+ new CoordRec((float) 19.8057, (float) 4.7619),
+ new CoordRec((float) 29.3295, (float) 0),
+ new CoordRec((float) 43.6152, (float) 0),
+ new CoordRec((float) 53.139, (float) 4.7619),
+ new CoordRec((float) 62.6629, (float) 14.2857),
+};
+
+static final StrokeRec char99[] = {
+ new StrokeRec(14, char99_stroke0),
+};
+
+/* char: 100 'd' */
+
+static final CoordRec char100_stroke0[] = {
+ new CoordRec((float) 61.7829, (float) 100),
+ new CoordRec((float) 61.7829, (float) 0),
+};
+
+static final CoordRec char100_stroke1[] = {
+ new CoordRec((float) 61.7829, (float) 52.381),
+ new CoordRec((float) 52.259, (float) 61.9048),
+ new CoordRec((float) 42.7352, (float) 66.6667),
+ new CoordRec((float) 28.4495, (float) 66.6667),
+ new CoordRec((float) 18.9257, (float) 61.9048),
+ new CoordRec((float) 9.4019, (float) 52.381),
+ new CoordRec((float) 4.64, (float) 38.0952),
+ new CoordRec((float) 4.64, (float) 28.5714),
+ new CoordRec((float) 9.4019, (float) 14.2857),
+ new CoordRec((float) 18.9257, (float) 4.7619),
+ new CoordRec((float) 28.4495, (float) 0),
+ new CoordRec((float) 42.7352, (float) 0),
+ new CoordRec((float) 52.259, (float) 4.7619),
+ new CoordRec((float) 61.7829, (float) 14.2857),
+};
+
+static final StrokeRec char100[] = {
+ new StrokeRec(2, char100_stroke0),
+ new StrokeRec(14, char100_stroke1),
+};
+
+/* char: 101 'e' */
+
+static final CoordRec char101_stroke0[] = {
+ new CoordRec((float) 5.72, (float) 38.0952),
+ new CoordRec((float) 62.8629, (float) 38.0952),
+ new CoordRec((float) 62.8629, (float) 47.619),
+ new CoordRec((float) 58.101, (float) 57.1429),
+ new CoordRec((float) 53.339, (float) 61.9048),
+ new CoordRec((float) 43.8152, (float) 66.6667),
+ new CoordRec((float) 29.5295, (float) 66.6667),
+ new CoordRec((float) 20.0057, (float) 61.9048),
+ new CoordRec((float) 10.4819, (float) 52.381),
+ new CoordRec((float) 5.72, (float) 38.0952),
+ new CoordRec((float) 5.72, (float) 28.5714),
+ new CoordRec((float) 10.4819, (float) 14.2857),
+ new CoordRec((float) 20.0057, (float) 4.7619),
+ new CoordRec((float) 29.5295, (float) 0),
+ new CoordRec((float) 43.8152, (float) 0),
+ new CoordRec((float) 53.339, (float) 4.7619),
+ new CoordRec((float) 62.8629, (float) 14.2857),
+};
+
+static final StrokeRec char101[] = {
+ new StrokeRec(17, char101_stroke0),
+};
+
+/* char: 102 'f' */
+
+static final CoordRec char102_stroke0[] = {
+ new CoordRec((float) 38.7752, (float) 100),
+ new CoordRec((float) 29.2514, (float) 100),
+ new CoordRec((float) 19.7276, (float) 95.2381),
+ new CoordRec((float) 14.9657, (float) 80.9524),
+ new CoordRec((float) 14.9657, (float) 0),
+};
+
+static final CoordRec char102_stroke1[] = {
+ new CoordRec((float) 0.68, (float) 66.6667),
+ new CoordRec((float) 34.0133, (float) 66.6667),
+};
+
+static final StrokeRec char102[] = {
+ new StrokeRec(5, char102_stroke0),
+ new StrokeRec(2, char102_stroke1),
+};
+
+/* char: 103 'g' */
+
+static final CoordRec char103_stroke0[] = {
+ new CoordRec((float) 62.5029, (float) 66.6667),
+ new CoordRec((float) 62.5029, (float) -9.5238),
+ new CoordRec((float) 57.741, (float) -23.8095),
+ new CoordRec((float) 52.979, (float) -28.5714),
+ new CoordRec((float) 43.4552, (float) -33.3333),
+ new CoordRec((float) 29.1695, (float) -33.3333),
+ new CoordRec((float) 19.6457, (float) -28.5714),
+};
+
+static final CoordRec char103_stroke1[] = {
+ new CoordRec((float) 62.5029, (float) 52.381),
+ new CoordRec((float) 52.979, (float) 61.9048),
+ new CoordRec((float) 43.4552, (float) 66.6667),
+ new CoordRec((float) 29.1695, (float) 66.6667),
+ new CoordRec((float) 19.6457, (float) 61.9048),
+ new CoordRec((float) 10.1219, (float) 52.381),
+ new CoordRec((float) 5.36, (float) 38.0952),
+ new CoordRec((float) 5.36, (float) 28.5714),
+ new CoordRec((float) 10.1219, (float) 14.2857),
+ new CoordRec((float) 19.6457, (float) 4.7619),
+ new CoordRec((float) 29.1695, (float) 0),
+ new CoordRec((float) 43.4552, (float) 0),
+ new CoordRec((float) 52.979, (float) 4.7619),
+ new CoordRec((float) 62.5029, (float) 14.2857),
+};
+
+static final StrokeRec char103[] = {
+ new StrokeRec(7, char103_stroke0),
+ new StrokeRec(14, char103_stroke1),
+};
+
+/* char: 104 'h' */
+
+static final CoordRec char104_stroke0[] = {
+ new CoordRec((float) 9.6, (float) 100),
+ new CoordRec((float) 9.6, (float) 0),
+};
+
+static final CoordRec char104_stroke1[] = {
+ new CoordRec((float) 9.6, (float) 47.619),
+ new CoordRec((float) 23.8857, (float) 61.9048),
+ new CoordRec((float) 33.4095, (float) 66.6667),
+ new CoordRec((float) 47.6952, (float) 66.6667),
+ new CoordRec((float) 57.219, (float) 61.9048),
+ new CoordRec((float) 61.981, (float) 47.619),
+ new CoordRec((float) 61.981, (float) 0),
+};
+
+static final StrokeRec char104[] = {
+ new StrokeRec(2, char104_stroke0),
+ new StrokeRec(7, char104_stroke1),
+};
+
+/* char: 105 'i' */
+
+static final CoordRec char105_stroke0[] = {
+ new CoordRec((float) 10.02, (float) 100),
+ new CoordRec((float) 14.7819, (float) 95.2381),
+ new CoordRec((float) 19.5438, (float) 100),
+ new CoordRec((float) 14.7819, (float) 104.762),
+ new CoordRec((float) 10.02, (float) 100),
+};
+
+static final CoordRec char105_stroke1[] = {
+ new CoordRec((float) 14.7819, (float) 66.6667),
+ new CoordRec((float) 14.7819, (float) 0),
+};
+
+static final StrokeRec char105[] = {
+ new StrokeRec(5, char105_stroke0),
+ new StrokeRec(2, char105_stroke1),
+};
+
+/* char: 106 'j' */
+
+static final CoordRec char106_stroke0[] = {
+ new CoordRec((float) 17.3876, (float) 100),
+ new CoordRec((float) 22.1495, (float) 95.2381),
+ new CoordRec((float) 26.9114, (float) 100),
+ new CoordRec((float) 22.1495, (float) 104.762),
+ new CoordRec((float) 17.3876, (float) 100),
+};
+
+static final CoordRec char106_stroke1[] = {
+ new CoordRec((float) 22.1495, (float) 66.6667),
+ new CoordRec((float) 22.1495, (float) -14.2857),
+ new CoordRec((float) 17.3876, (float) -28.5714),
+ new CoordRec((float) 7.8638, (float) -33.3333),
+ new CoordRec((float)-1.66, (float) -33.3333),
+};
+
+static final StrokeRec char106[] = {
+ new StrokeRec(5, char106_stroke0),
+ new StrokeRec(5, char106_stroke1),
+};
+
+/* char: 107 'k' */
+
+static final CoordRec char107_stroke0[] = {
+ new CoordRec((float) 9.6, (float) 100),
+ new CoordRec((float) 9.6, (float) 0),
+};
+
+static final CoordRec char107_stroke1[] = {
+ new CoordRec((float) 57.219, (float) 66.6667),
+ new CoordRec((float) 9.6, (float) 19.0476),
+};
+
+static final CoordRec char107_stroke2[] = {
+ new CoordRec((float) 28.6476, (float) 38.0952),
+ new CoordRec((float) 61.981, (float) 0),
+};
+
+static final StrokeRec char107[] = {
+ new StrokeRec(2, char107_stroke0),
+ new StrokeRec(2, char107_stroke1),
+ new StrokeRec(2, char107_stroke2),
+};
+
+/* char: 108 'l' */
+
+static final CoordRec char108_stroke0[] = {
+ new CoordRec((float) 10.02, (float) 100),
+ new CoordRec((float) 10.02, (float) 0),
+};
+
+static final StrokeRec char108[] = {
+ new StrokeRec(2, char108_stroke0),
+};
+
+/* char: 109 'm' */
+
+static final CoordRec char109_stroke0[] = {
+ new CoordRec((float) 9.6, (float) 66.6667),
+ new CoordRec((float) 9.6, (float) 0),
+};
+
+static final CoordRec char109_stroke1[] = {
+ new CoordRec((float) 9.6, (float) 47.619),
+ new CoordRec((float) 23.8857, (float) 61.9048),
+ new CoordRec((float) 33.4095, (float) 66.6667),
+ new CoordRec((float) 47.6952, (float) 66.6667),
+ new CoordRec((float) 57.219, (float) 61.9048),
+ new CoordRec((float) 61.981, (float) 47.619),
+ new CoordRec((float) 61.981, (float) 0),
+};
+
+static final CoordRec char109_stroke2[] = {
+ new CoordRec((float) 61.981, (float) 47.619),
+ new CoordRec((float) 76.2667, (float) 61.9048),
+ new CoordRec((float) 85.7905, (float) 66.6667),
+ new CoordRec((float) 100.076, (float) 66.6667),
+ new CoordRec((float) 109.6, (float) 61.9048),
+ new CoordRec((float) 114.362, (float) 47.619),
+ new CoordRec((float) 114.362, (float) 0),
+};
+
+static final StrokeRec char109[] = {
+ new StrokeRec(2, char109_stroke0),
+ new StrokeRec(7, char109_stroke1),
+ new StrokeRec(7, char109_stroke2),
+};
+
+/* char: 110 'n' */
+
+static final CoordRec char110_stroke0[] = {
+ new CoordRec((float) 9.18, (float) 66.6667),
+ new CoordRec((float) 9.18, (float) 0),
+};
+
+static final CoordRec char110_stroke1[] = {
+ new CoordRec((float) 9.18, (float) 47.619),
+ new CoordRec((float) 23.4657, (float) 61.9048),
+ new CoordRec((float) 32.9895, (float) 66.6667),
+ new CoordRec((float) 47.2752, (float) 66.6667),
+ new CoordRec((float) 56.799, (float) 61.9048),
+ new CoordRec((float) 61.561, (float) 47.619),
+ new CoordRec((float) 61.561, (float) 0),
+};
+
+static final StrokeRec char110[] = {
+ new StrokeRec(2, char110_stroke0),
+ new StrokeRec(7, char110_stroke1),
+};
+
+/* char: 111 'o' */
+
+static final CoordRec char111_stroke0[] = {
+ new CoordRec((float) 28.7895, (float) 66.6667),
+ new CoordRec((float) 19.2657, (float) 61.9048),
+ new CoordRec((float) 9.7419, (float) 52.381),
+ new CoordRec((float) 4.98, (float) 38.0952),
+ new CoordRec((float) 4.98, (float) 28.5714),
+ new CoordRec((float) 9.7419, (float) 14.2857),
+ new CoordRec((float) 19.2657, (float) 4.7619),
+ new CoordRec((float) 28.7895, (float) 0),
+ new CoordRec((float) 43.0752, (float) 0),
+ new CoordRec((float) 52.599, (float) 4.7619),
+ new CoordRec((float) 62.1229, (float) 14.2857),
+ new CoordRec((float) 66.8848, (float) 28.5714),
+ new CoordRec((float) 66.8848, (float) 38.0952),
+ new CoordRec((float) 62.1229, (float) 52.381),
+ new CoordRec((float) 52.599, (float) 61.9048),
+ new CoordRec((float) 43.0752, (float) 66.6667),
+ new CoordRec((float) 28.7895, (float) 66.6667),
+};
+
+static final StrokeRec char111[] = {
+ new StrokeRec(17, char111_stroke0),
+};
+
+/* char: 112 'p' */
+
+static final CoordRec char112_stroke0[] = {
+ new CoordRec((float) 9.46, (float) 66.6667),
+ new CoordRec((float) 9.46, (float) -33.3333),
+};
+
+static final CoordRec char112_stroke1[] = {
+ new CoordRec((float) 9.46, (float) 52.381),
+ new CoordRec((float) 18.9838, (float) 61.9048),
+ new CoordRec((float) 28.5076, (float) 66.6667),
+ new CoordRec((float) 42.7933, (float) 66.6667),
+ new CoordRec((float) 52.3171, (float) 61.9048),
+ new CoordRec((float) 61.841, (float) 52.381),
+ new CoordRec((float) 66.6029, (float) 38.0952),
+ new CoordRec((float) 66.6029, (float) 28.5714),
+ new CoordRec((float) 61.841, (float) 14.2857),
+ new CoordRec((float) 52.3171, (float) 4.7619),
+ new CoordRec((float) 42.7933, (float) 0),
+ new CoordRec((float) 28.5076, (float) 0),
+ new CoordRec((float) 18.9838, (float) 4.7619),
+ new CoordRec((float) 9.46, (float) 14.2857),
+};
+
+static final StrokeRec char112[] = {
+ new StrokeRec(2, char112_stroke0),
+ new StrokeRec(14, char112_stroke1),
+};
+
+/* char: 113 'q' */
+
+static final CoordRec char113_stroke0[] = {
+ new CoordRec((float) 61.9829, (float) 66.6667),
+ new CoordRec((float) 61.9829, (float) -33.3333),
+};
+
+static final CoordRec char113_stroke1[] = {
+ new CoordRec((float) 61.9829, (float) 52.381),
+ new CoordRec((float) 52.459, (float) 61.9048),
+ new CoordRec((float) 42.9352, (float) 66.6667),
+ new CoordRec((float) 28.6495, (float) 66.6667),
+ new CoordRec((float) 19.1257, (float) 61.9048),
+ new CoordRec((float) 9.6019, (float) 52.381),
+ new CoordRec((float) 4.84, (float) 38.0952),
+ new CoordRec((float) 4.84, (float) 28.5714),
+ new CoordRec((float) 9.6019, (float) 14.2857),
+ new CoordRec((float) 19.1257, (float) 4.7619),
+ new CoordRec((float) 28.6495, (float) 0),
+ new CoordRec((float) 42.9352, (float) 0),
+ new CoordRec((float) 52.459, (float) 4.7619),
+ new CoordRec((float) 61.9829, (float) 14.2857),
+};
+
+static final StrokeRec char113[] = {
+ new StrokeRec(2, char113_stroke0),
+ new StrokeRec(14, char113_stroke1),
+};
+
+/* char: 114 'r' */
+
+static final CoordRec char114_stroke0[] = {
+ new CoordRec((float) 9.46, (float) 66.6667),
+ new CoordRec((float) 9.46, (float) 0),
+};
+
+static final CoordRec char114_stroke1[] = {
+ new CoordRec((float) 9.46, (float) 38.0952),
+ new CoordRec((float) 14.2219, (float) 52.381),
+ new CoordRec((float) 23.7457, (float) 61.9048),
+ new CoordRec((float) 33.2695, (float) 66.6667),
+ new CoordRec((float) 47.5552, (float) 66.6667),
+};
+
+static final StrokeRec char114[] = {
+ new StrokeRec(2, char114_stroke0),
+ new StrokeRec(5, char114_stroke1),
+};
+
+/* char: 115 's' */
+
+static final CoordRec char115_stroke0[] = {
+ new CoordRec((float) 57.081, (float) 52.381),
+ new CoordRec((float) 52.319, (float) 61.9048),
+ new CoordRec((float) 38.0333, (float) 66.6667),
+ new CoordRec((float) 23.7476, (float) 66.6667),
+ new CoordRec((float) 9.4619, (float) 61.9048),
+ new CoordRec((float) 4.7, (float) 52.381),
+ new CoordRec((float) 9.4619, (float) 42.8571),
+ new CoordRec((float) 18.9857, (float) 38.0952),
+ new CoordRec((float) 42.7952, (float) 33.3333),
+ new CoordRec((float) 52.319, (float) 28.5714),
+ new CoordRec((float) 57.081, (float) 19.0476),
+ new CoordRec((float) 57.081, (float) 14.2857),
+ new CoordRec((float) 52.319, (float) 4.7619),
+ new CoordRec((float) 38.0333, (float) 0),
+ new CoordRec((float) 23.7476, (float) 0),
+ new CoordRec((float) 9.4619, (float) 4.7619),
+ new CoordRec((float) 4.7, (float) 14.2857),
+};
+
+static final StrokeRec char115[] = {
+ new StrokeRec(17, char115_stroke0),
+};
+
+/* char: 116 't' */
+
+static final CoordRec char116_stroke0[] = {
+ new CoordRec((float) 14.8257, (float) 100),
+ new CoordRec((float) 14.8257, (float) 19.0476),
+ new CoordRec((float) 19.5876, (float) 4.7619),
+ new CoordRec((float) 29.1114, (float) 0),
+ new CoordRec((float) 38.6352, (float) 0),
+};
+
+static final CoordRec char116_stroke1[] = {
+ new CoordRec((float) 0.54, (float) 66.6667),
+ new CoordRec((float) 33.8733, (float) 66.6667),
+};
+
+static final StrokeRec char116[] = {
+ new StrokeRec(5, char116_stroke0),
+ new StrokeRec(2, char116_stroke1),
+};
+
+/* char: 117 'u' */
+
+static final CoordRec char117_stroke0[] = {
+ new CoordRec((float) 9.46, (float) 66.6667),
+ new CoordRec((float) 9.46, (float) 19.0476),
+ new CoordRec((float) 14.2219, (float) 4.7619),
+ new CoordRec((float) 23.7457, (float) 0),
+ new CoordRec((float) 38.0314, (float) 0),
+ new CoordRec((float) 47.5552, (float) 4.7619),
+ new CoordRec((float) 61.841, (float) 19.0476),
+};
+
+static final CoordRec char117_stroke1[] = {
+ new CoordRec((float) 61.841, (float) 66.6667),
+ new CoordRec((float) 61.841, (float) 0),
+};
+
+static final StrokeRec char117[] = {
+ new StrokeRec(7, char117_stroke0),
+ new StrokeRec(2, char117_stroke1),
+};
+
+/* char: 118 'v' */
+
+static final CoordRec char118_stroke0[] = {
+ new CoordRec((float) 1.8, (float) 66.6667),
+ new CoordRec((float) 30.3714, (float) 0),
+};
+
+static final CoordRec char118_stroke1[] = {
+ new CoordRec((float) 58.9429, (float) 66.6667),
+ new CoordRec((float) 30.3714, (float) 0),
+};
+
+static final StrokeRec char118[] = {
+ new StrokeRec(2, char118_stroke0),
+ new StrokeRec(2, char118_stroke1),
+};
+
+/* char: 119 'w' */
+
+static final CoordRec char119_stroke0[] = {
+ new CoordRec((float) 2.5, (float) 66.6667),
+ new CoordRec((float) 21.5476, (float) 0),
+};
+
+static final CoordRec char119_stroke1[] = {
+ new CoordRec((float) 40.5952, (float) 66.6667),
+ new CoordRec((float) 21.5476, (float) 0),
+};
+
+static final CoordRec char119_stroke2[] = {
+ new CoordRec((float) 40.5952, (float) 66.6667),
+ new CoordRec((float) 59.6429, (float) 0),
+};
+
+static final CoordRec char119_stroke3[] = {
+ new CoordRec((float) 78.6905, (float) 66.6667),
+ new CoordRec((float) 59.6429, (float) 0),
+};
+
+static final StrokeRec char119[] = {
+ new StrokeRec(2, char119_stroke0),
+ new StrokeRec(2, char119_stroke1),
+ new StrokeRec(2, char119_stroke2),
+ new StrokeRec(2, char119_stroke3),
+};
+
+/* char: 120 'x' */
+
+static final CoordRec char120_stroke0[] = {
+ new CoordRec((float) 1.66, (float) 66.6667),
+ new CoordRec((float) 54.041, (float) 0),
+};
+
+static final CoordRec char120_stroke1[] = {
+ new CoordRec((float) 54.041, (float) 66.6667),
+ new CoordRec((float) 1.66, (float) 0),
+};
+
+static final StrokeRec char120[] = {
+ new StrokeRec(2, char120_stroke0),
+ new StrokeRec(2, char120_stroke1),
+};
+
+/* char: 121 'y' */
+
+static final CoordRec char121_stroke0[] = {
+ new CoordRec((float) 6.5619, (float) 66.6667),
+ new CoordRec((float) 35.1333, (float) 0),
+};
+
+static final CoordRec char121_stroke1[] = {
+ new CoordRec((float) 63.7048, (float) 66.6667),
+ new CoordRec((float) 35.1333, (float) 0),
+ new CoordRec((float) 25.6095, (float) -19.0476),
+ new CoordRec((float) 16.0857, (float) -28.5714),
+ new CoordRec((float) 6.5619, (float) -33.3333),
+ new CoordRec((float) 1.8, (float) -33.3333),
+};
+
+static final StrokeRec char121[] = {
+ new StrokeRec(2, char121_stroke0),
+ new StrokeRec(6, char121_stroke1),
+};
+
+/* char: 122 'z' */
+
+static final CoordRec char122_stroke0[] = {
+ new CoordRec((float) 56.821, (float) 66.6667),
+ new CoordRec((float) 4.44, (float) 0),
+};
+
+static final CoordRec char122_stroke1[] = {
+ new CoordRec((float) 4.44, (float) 66.6667),
+ new CoordRec((float) 56.821, (float) 66.6667),
+};
+
+static final CoordRec char122_stroke2[] = {
+ new CoordRec((float) 4.44, (float) 0),
+ new CoordRec((float) 56.821, (float) 0),
+};
+
+static final StrokeRec char122[] = {
+ new StrokeRec(2, char122_stroke0),
+ new StrokeRec(2, char122_stroke1),
+ new StrokeRec(2, char122_stroke2),
+};
+
+/* char: 123 '{' */
+
+static final CoordRec char123_stroke0[] = {
+ new CoordRec((float) 31.1895, (float) 119.048),
+ new CoordRec((float) 21.6657, (float) 114.286),
+ new CoordRec((float) 16.9038, (float) 109.524),
+ new CoordRec((float) 12.1419, (float) 100),
+ new CoordRec((float) 12.1419, (float) 90.4762),
+ new CoordRec((float) 16.9038, (float) 80.9524),
+ new CoordRec((float) 21.6657, (float) 76.1905),
+ new CoordRec((float) 26.4276, (float) 66.6667),
+ new CoordRec((float) 26.4276, (float) 57.1429),
+ new CoordRec((float) 16.9038, (float) 47.619),
+};
+
+static final CoordRec char123_stroke1[] = {
+ new CoordRec((float) 21.6657, (float) 114.286),
+ new CoordRec((float) 16.9038, (float) 104.762),
+ new CoordRec((float) 16.9038, (float) 95.2381),
+ new CoordRec((float) 21.6657, (float) 85.7143),
+ new CoordRec((float) 26.4276, (float) 80.9524),
+ new CoordRec((float) 31.1895, (float) 71.4286),
+ new CoordRec((float) 31.1895, (float) 61.9048),
+ new CoordRec((float) 26.4276, (float) 52.381),
+ new CoordRec((float) 7.38, (float) 42.8571),
+ new CoordRec((float) 26.4276, (float) 33.3333),
+ new CoordRec((float) 31.1895, (float) 23.8095),
+ new CoordRec((float) 31.1895, (float) 14.2857),
+ new CoordRec((float) 26.4276, (float) 4.7619),
+ new CoordRec((float) 21.6657, (float) 0),
+ new CoordRec((float) 16.9038, (float) -9.5238),
+ new CoordRec((float) 16.9038, (float) -19.0476),
+ new CoordRec((float) 21.6657, (float) -28.5714),
+};
+
+static final CoordRec char123_stroke2[] = {
+ new CoordRec((float) 16.9038, (float) 38.0952),
+ new CoordRec((float) 26.4276, (float) 28.5714),
+ new CoordRec((float) 26.4276, (float) 19.0476),
+ new CoordRec((float) 21.6657, (float) 9.5238),
+ new CoordRec((float) 16.9038, (float) 4.7619),
+ new CoordRec((float) 12.1419, (float) -4.7619),
+ new CoordRec((float) 12.1419, (float) -14.2857),
+ new CoordRec((float) 16.9038, (float) -23.8095),
+ new CoordRec((float) 21.6657, (float) -28.5714),
+ new CoordRec((float) 31.1895, (float) -33.3333),
+};
+
+static final StrokeRec char123[] = {
+ new StrokeRec(10, char123_stroke0),
+ new StrokeRec(17, char123_stroke1),
+ new StrokeRec(10, char123_stroke2),
+};
+
+/* char: 124 '|' */
+
+static final CoordRec char124_stroke0[] = {
+ new CoordRec((float) 11.54, (float) 119.048),
+ new CoordRec((float) 11.54, (float) -33.3333),
+};
+
+static final StrokeRec char124[] = {
+ new StrokeRec(2, char124_stroke0),
+};
+
+/* char: 125 '}' */
+
+static final CoordRec char125_stroke0[] = {
+ new CoordRec((float) 9.18, (float) 119.048),
+ new CoordRec((float) 18.7038, (float) 114.286),
+ new CoordRec((float) 23.4657, (float) 109.524),
+ new CoordRec((float) 28.2276, (float) 100),
+ new CoordRec((float) 28.2276, (float) 90.4762),
+ new CoordRec((float) 23.4657, (float) 80.9524),
+ new CoordRec((float) 18.7038, (float) 76.1905),
+ new CoordRec((float) 13.9419, (float) 66.6667),
+ new CoordRec((float) 13.9419, (float) 57.1429),
+ new CoordRec((float) 23.4657, (float) 47.619),
+};
+
+static final CoordRec char125_stroke1[] = {
+ new CoordRec((float) 18.7038, (float) 114.286),
+ new CoordRec((float) 23.4657, (float) 104.762),
+ new CoordRec((float) 23.4657, (float) 95.2381),
+ new CoordRec((float) 18.7038, (float) 85.7143),
+ new CoordRec((float) 13.9419, (float) 80.9524),
+ new CoordRec((float) 9.18, (float) 71.4286),
+ new CoordRec((float) 9.18, (float) 61.9048),
+ new CoordRec((float) 13.9419, (float) 52.381),
+ new CoordRec((float) 32.9895, (float) 42.8571),
+ new CoordRec((float) 13.9419, (float) 33.3333),
+ new CoordRec((float) 9.18, (float) 23.8095),
+ new CoordRec((float) 9.18, (float) 14.2857),
+ new CoordRec((float) 13.9419, (float) 4.7619),
+ new CoordRec((float) 18.7038, (float) 0),
+ new CoordRec((float) 23.4657, (float) -9.5238),
+ new CoordRec((float) 23.4657, (float) -19.0476),
+ new CoordRec((float) 18.7038, (float) -28.5714),
+};
+
+static final CoordRec char125_stroke2[] = {
+ new CoordRec((float) 23.4657, (float) 38.0952),
+ new CoordRec((float) 13.9419, (float) 28.5714),
+ new CoordRec((float) 13.9419, (float) 19.0476),
+ new CoordRec((float) 18.7038, (float) 9.5238),
+ new CoordRec((float) 23.4657, (float) 4.7619),
+ new CoordRec((float) 28.2276, (float) -4.7619),
+ new CoordRec((float) 28.2276, (float) -14.2857),
+ new CoordRec((float) 23.4657, (float) -23.8095),
+ new CoordRec((float) 18.7038, (float) -28.5714),
+ new CoordRec((float) 9.18, (float) -33.3333),
+};
+
+static final StrokeRec char125[] = {
+ new StrokeRec(10, char125_stroke0),
+ new StrokeRec(17, char125_stroke1),
+ new StrokeRec(10, char125_stroke2),
+};
+
+/* char: 126 '~' */
+
+static final CoordRec char126_stroke0[] = {
+ new CoordRec((float) 2.92, (float) 28.5714),
+ new CoordRec((float) 2.92, (float) 38.0952),
+ new CoordRec((float) 7.6819, (float) 52.381),
+ new CoordRec((float) 17.2057, (float) 57.1429),
+ new CoordRec((float) 26.7295, (float) 57.1429),
+ new CoordRec((float) 36.2533, (float) 52.381),
+ new CoordRec((float) 55.301, (float) 38.0952),
+ new CoordRec((float) 64.8248, (float) 33.3333),
+ new CoordRec((float) 74.3486, (float) 33.3333),
+ new CoordRec((float) 83.8724, (float) 38.0952),
+ new CoordRec((float) 88.6343, (float) 47.619),
+};
+
+static final CoordRec char126_stroke1[] = {
+ new CoordRec((float) 2.92, (float) 38.0952),
+ new CoordRec((float) 7.6819, (float) 47.619),
+ new CoordRec((float) 17.2057, (float) 52.381),
+ new CoordRec((float) 26.7295, (float) 52.381),
+ new CoordRec((float) 36.2533, (float) 47.619),
+ new CoordRec((float) 55.301, (float) 33.3333),
+ new CoordRec((float) 64.8248, (float) 28.5714),
+ new CoordRec((float) 74.3486, (float) 28.5714),
+ new CoordRec((float) 83.8724, (float) 33.3333),
+ new CoordRec((float) 88.6343, (float) 47.619),
+ new CoordRec((float) 88.6343, (float) 57.1429),
+};
+
+static final StrokeRec char126[] = {
+ new StrokeRec(11, char126_stroke0),
+ new StrokeRec(11, char126_stroke1),
+};
+
+/* char: 127 */
+
+static final CoordRec char127_stroke0[] = {
+ new CoordRec((float) 52.381, (float) 100),
+ new CoordRec((float) 14.2857, (float) -33.3333),
+};
+
+static final CoordRec char127_stroke1[] = {
+ new CoordRec((float) 28.5714, (float) 66.6667),
+ new CoordRec((float) 14.2857, (float) 61.9048),
+ new CoordRec((float) 4.7619, (float) 52.381),
+ new CoordRec((float) 0, (float) 38.0952),
+ new CoordRec((float) 0, (float) 23.8095),
+ new CoordRec((float) 4.7619, (float) 14.2857),
+ new CoordRec((float) 14.2857, (float) 4.7619),
+ new CoordRec((float) 28.5714, (float) 0),
+ new CoordRec((float) 38.0952, (float) 0),
+ new CoordRec((float) 52.381, (float) 4.7619),
+ new CoordRec((float) 61.9048, (float) 14.2857),
+ new CoordRec((float) 66.6667, (float) 28.5714),
+ new CoordRec((float) 66.6667, (float) 42.8571),
+ new CoordRec((float) 61.9048, (float) 52.381),
+ new CoordRec((float) 52.381, (float) 61.9048),
+ new CoordRec((float) 38.0952, (float) 66.6667),
+ new CoordRec((float) 28.5714, (float) 66.6667),
+};
+
+static final StrokeRec char127[] = {
+ new StrokeRec(2, char127_stroke0),
+ new StrokeRec(17, char127_stroke1),
+};
+
+static final StrokeCharRec chars[] = {
+ new StrokeCharRec( 0, /* char0 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char1 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char2 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char3 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char4 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char5 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char6 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char7 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char8 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char9 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char10 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char11 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char12 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char13 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char14 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char15 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char16 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char17 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char18 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char19 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char20 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char21 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char22 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char23 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char24 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char25 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char26 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char27 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char28 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char29 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char30 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char31 */ null, (float) 0, (float) 0 ),
+ new StrokeCharRec( 0, /* char32 */ null, (float) 52.381, (float) 104.762 ),
+ new StrokeCharRec( 2, char33, (float) 13.3819, (float) 26.6238 ),
+ new StrokeCharRec( 2, char34, (float) 23.0676, (float) 51.4352 ),
+ new StrokeCharRec( 4, char35, (float) 36.5333, (float) 79.4886 ),
+ new StrokeCharRec( 3, char36, (float) 38.1533, (float) 76.2067 ),
+ new StrokeCharRec( 3, char37, (float) 49.2171, (float) 96.5743 ),
+ new StrokeCharRec( 1, char38, (float) 53.599, (float) 101.758 ),
+ new StrokeCharRec( 1, char39, (float) 4.44, (float) 13.62 ),
+ new StrokeCharRec( 1, char40, (float) 21.8657, (float) 47.1733 ),
+ new StrokeCharRec( 1, char41, (float) 24.3276, (float) 47.5333 ),
+ new StrokeCharRec( 3, char42, (float) 30.7695, (float) 59.439 ),
+ new StrokeCharRec( 2, char43, (float) 48.8371, (float) 97.2543 ),
+ new StrokeCharRec( 1, char44, (float) 13.5219, (float) 26.0638 ),
+ new StrokeCharRec( 1, char45, (float) 50.2371, (float) 100.754 ),
+ new StrokeCharRec( 1, char46, (float) 13.1019, (float) 26.4838 ),
+ new StrokeCharRec( 1, char47, (float) 40.5733, (float) 82.1067 ),
+ new StrokeCharRec( 1, char48, (float) 38.3133, (float) 77.0667 ),
+ new StrokeCharRec( 1, char49, (float) 30.8676, (float) 66.5295 ),
+ new StrokeCharRec( 1, char50, (float) 38.7533, (float) 77.6467 ),
+ new StrokeCharRec( 1, char51, (float) 38.3333, (float) 77.0467 ),
+ new StrokeCharRec( 2, char52, (float) 37.2133, (float) 80.1686 ),
+ new StrokeCharRec( 1, char53, (float) 38.1933, (float) 77.6867 ),
+ new StrokeCharRec( 1, char54, (float) 34.1514, (float) 73.8048 ),
+ new StrokeCharRec( 2, char55, (float) 38.8933, (float) 77.2267 ),
+ new StrokeCharRec( 1, char56, (float) 38.9333, (float) 77.6667 ),
+ new StrokeCharRec( 1, char57, (float) 39.9333, (float) 74.0648 ),
+ new StrokeCharRec( 2, char58, (float) 14.0819, (float) 26.2238 ),
+ new StrokeCharRec( 2, char59, (float) 12.9619, (float) 26.3038 ),
+ new StrokeCharRec( 1, char60, (float) 41.1552, (float) 81.6105 ),
+ new StrokeCharRec( 2, char61, (float) 48.5571, (float) 97.2543 ),
+ new StrokeCharRec( 1, char62, (float) 40.8752, (float) 81.6105 ),
+ new StrokeCharRec( 2, char63, (float) 36.9914, (float) 73.9029 ),
+ new StrokeCharRec( 2, char64, (float) 34.9314, (float) 74.3648 ),
+ new StrokeCharRec( 3, char65, (float) 40.5952, (float) 80.4905 ),
+ new StrokeCharRec( 3, char66, (float) 44.7533, (float) 83.6267 ),
+ new StrokeCharRec( 1, char67, (float) 39.9933, (float) 84.4886 ),
+ new StrokeCharRec( 2, char68, (float) 45.2933, (float) 85.2867 ),
+ new StrokeCharRec( 4, char69, (float) 39.9914, (float) 78.1848 ),
+ new StrokeCharRec( 3, char70, (float) 39.9914, (float) 78.7448 ),
+ new StrokeCharRec( 2, char71, (float) 40.3933, (float) 89.7686 ),
+ new StrokeCharRec( 3, char72, (float) 44.7533, (float) 89.0867 ),
+ new StrokeCharRec( 1, char73, (float) 10.86, (float) 21.3 ),
+ new StrokeCharRec( 1, char74, (float) 31.0714, (float) 59.999 ),
+ new StrokeCharRec( 3, char75, (float) 44.6133, (float) 79.3267 ),
+ new StrokeCharRec( 2, char76, (float) 40.2514, (float) 71.3229 ),
+ new StrokeCharRec( 4, char77, (float) 48.9552, (float) 97.2105 ),
+ new StrokeCharRec( 3, char78, (float) 44.4733, (float) 88.8067 ),
+ new StrokeCharRec( 1, char79, (float) 44.3352, (float) 88.8305 ),
+ new StrokeCharRec( 2, char80, (float) 45.4333, (float) 85.6667 ),
+ new StrokeCharRec( 2, char81, (float) 43.3952, (float) 88.0905 ),
+ new StrokeCharRec( 3, char82, (float) 45.0133, (float) 82.3667 ),
+ new StrokeCharRec( 1, char83, (float) 41.3333, (float) 80.8267 ),
+ new StrokeCharRec( 2, char84, (float) 35.6933, (float) 71.9467 ),
+ new StrokeCharRec( 1, char85, (float) 44.8733, (float) 89.4867 ),
+ new StrokeCharRec( 2, char86, (float) 40.4552, (float) 81.6105 ),
+ new StrokeCharRec( 4, char87, (float) 49.839, (float) 100.518 ),
+ new StrokeCharRec( 2, char88, (float) 35.8333, (float) 72.3667 ),
+ new StrokeCharRec( 2, char89, (float) 39.6152, (float) 79.6505 ),
+ new StrokeCharRec( 3, char90, (float) 35.8333, (float) 73.7467 ),
+ new StrokeCharRec( 4, char91, (float) 22.0657, (float) 46.1133 ),
+ new StrokeCharRec( 1, char92, (float) 39.1733, (float) 78.2067 ),
+ new StrokeCharRec( 4, char93, (float) 23.4876, (float) 46.3933 ),
+ new StrokeCharRec( 2, char94, (float) 44.0752, (float) 90.2305 ),
+ new StrokeCharRec( 1, char95, (float) 51.281, (float) 104.062 ),
+ new StrokeCharRec( 2, char96, (float) 42.5457, (float) 83.5714 ),
+ new StrokeCharRec( 2, char97, (float) 35.2514, (float) 66.6029 ),
+ new StrokeCharRec( 2, char98, (float) 37.3314, (float) 70.4629 ),
+ new StrokeCharRec( 1, char99, (float) 34.0914, (float) 68.9229 ),
+ new StrokeCharRec( 2, char100, (float) 33.2114, (float) 70.2629 ),
+ new StrokeCharRec( 1, char101, (float) 34.2914, (float) 68.5229 ),
+ new StrokeCharRec( 2, char102, (float) 14.9657, (float) 38.6552 ),
+ new StrokeCharRec( 2, char103, (float) 33.9314, (float) 70.9829 ),
+ new StrokeCharRec( 2, char104, (float) 33.4095, (float) 71.021 ),
+ new StrokeCharRec( 2, char105, (float) 14.7819, (float) 28.8638 ),
+ new StrokeCharRec( 2, char106, (float) 17.3876, (float) 36.2314 ),
+ new StrokeCharRec( 3, char107, (float) 33.4095, (float) 62.521 ),
+ new StrokeCharRec( 1, char108, (float) 10.02, (float) 19.34 ),
+ new StrokeCharRec( 3, char109, (float) 61.981, (float) 123.962 ),
+ new StrokeCharRec( 2, char110, (float) 32.9895, (float) 70.881 ),
+ new StrokeCharRec( 1, char111, (float) 33.5514, (float) 71.7448 ),
+ new StrokeCharRec( 2, char112, (float) 38.0314, (float) 70.8029 ),
+ new StrokeCharRec( 2, char113, (float) 33.4114, (float) 70.7429 ),
+ new StrokeCharRec( 2, char114, (float) 23.7457, (float) 49.4952 ),
+ new StrokeCharRec( 1, char115, (float) 28.5095, (float) 62.321 ),
+ new StrokeCharRec( 2, char116, (float) 14.8257, (float) 39.3152 ),
+ new StrokeCharRec( 2, char117, (float) 33.2695, (float) 71.161 ),
+ new StrokeCharRec( 2, char118, (float) 30.3714, (float) 60.6029 ),
+ new StrokeCharRec( 4, char119, (float) 40.5952, (float) 80.4905 ),
+ new StrokeCharRec( 2, char120, (float) 25.4695, (float) 56.401 ),
+ new StrokeCharRec( 2, char121, (float) 35.1333, (float) 66.0648 ),
+ new StrokeCharRec( 3, char122, (float) 28.2495, (float) 61.821 ),
+ new StrokeCharRec( 3, char123, (float) 21.6657, (float) 41.6295 ),
+ new StrokeCharRec( 1, char124, (float) 11.54, (float) 23.78 ),
+ new StrokeCharRec( 3, char125, (float) 18.7038, (float) 41.4695 ),
+ new StrokeCharRec( 2, char126, (float) 45.7771, (float) 91.2743 ),
+ new StrokeCharRec( 2, char127, (float) 33.3333, (float) 66.6667 ),
+};
+
+public static final StrokeFontRec glutStrokeRoman = new StrokeFontRec( "Roman", 128, chars, (float) 119.048, (float) -33.3333 );
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/gl2/StrokeCharRec.java b/src/jogl/classes/com/jogamp/opengl/util/gl2/StrokeCharRec.java
new file mode 100644
index 000000000..af3d538ae
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/gl2/StrokeCharRec.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.util.gl2;
+
+/* Copyright (c) Mark J. Kilgard, 1994, 1998. */
+
+/* This program is freely distributable without licensing fees
+ and is provided without guarantee or warrantee expressed or
+ implied. This program is -not- in the public domain. */
+
+class StrokeCharRec {
+ public int num_strokes;
+ public StrokeRec[] stroke;
+ public float center;
+ public float right;
+
+ public StrokeCharRec(int num_strokes,
+ StrokeRec[] stroke,
+ float center,
+ float right) {
+ this.num_strokes = num_strokes;
+ this.stroke = stroke;
+ this.center = center;
+ this.right = right;
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/gl2/StrokeFontRec.java b/src/jogl/classes/com/jogamp/opengl/util/gl2/StrokeFontRec.java
new file mode 100644
index 000000000..d3195f24d
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/gl2/StrokeFontRec.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.util.gl2;
+
+/* Copyright (c) Mark J. Kilgard, 1994, 1998. */
+
+/* This program is freely distributable without licensing fees
+ and is provided without guarantee or warrantee expressed or
+ implied. This program is -not- in the public domain. */
+
+class StrokeFontRec {
+ public String name;
+ public int num_chars;
+ public StrokeCharRec[] ch;
+ public float top;
+ public float bottom;
+
+ public StrokeFontRec(String name,
+ int num_chars,
+ StrokeCharRec[] ch,
+ float top,
+ float bottom) {
+ this.name = name;
+ this.num_chars = num_chars;
+ this.ch = ch;
+ this.top = top;
+ this.bottom = bottom;
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/gl2/StrokeRec.java b/src/jogl/classes/com/jogamp/opengl/util/gl2/StrokeRec.java
new file mode 100644
index 000000000..8796e8b08
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/gl2/StrokeRec.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.util.gl2;
+
+/* Copyright (c) Mark J. Kilgard, 1994, 1998. */
+
+/* This program is freely distributable without licensing fees
+ and is provided without guarantee or warrantee expressed or
+ implied. This program is -not- in the public domain. */
+
+class StrokeRec {
+ public int num_coords;
+ public CoordRec[] coord;
+
+ public StrokeRec(int num_coords,
+ CoordRec[] coord) {
+ this.num_coords = num_coords;
+ this.coord = coord;
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/gl2/TileRenderer.java b/src/jogl/classes/com/jogamp/opengl/util/gl2/TileRenderer.java
new file mode 100755
index 000000000..714c134d4
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/gl2/TileRenderer.java
@@ -0,0 +1,601 @@
+package com.jogamp.opengl.util.gl2;
+
+import java.awt.Dimension;
+import java.nio.Buffer;
+
+import javax.media.opengl.*;
+import javax.media.opengl.glu.*;
+import javax.media.opengl.glu.gl2.*;
+
+/**
+ * A fairly direct port of Brian Paul's tile rendering library, found
+ * at
+ * http://www.mesa3d.org/brianp/TR.html . I've java-fied it, but
+ * the functionality is the same.
+ *
+ * Original code Copyright (C) 1997-2005 Brian Paul. Licensed under
+ * BSD-compatible terms with permission of the author. See LICENSE.txt
+ * for license information.
+ *
+ * @author ryanm
+ */
+public class TileRenderer
+{
+ private static final int DEFAULT_TILE_WIDTH = 256;
+
+ private static final int DEFAULT_TILE_HEIGHT = 256;
+
+ private static final int DEFAULT_TILE_BORDER = 0;
+
+ //
+ // Enumeration flags for accessing variables
+ //
+ // @author ryanm
+ //
+
+ /**
+ * The width of a tile
+ */
+ public static final int TR_TILE_WIDTH = 0;
+ /**
+ * The height of a tile
+ */
+ public static final int TR_TILE_HEIGHT = 1;
+ /**
+ * The width of the border around the tiles
+ */
+ public static final int TR_TILE_BORDER = 2;
+ /**
+ * The width of the final image
+ */
+ public static final int TR_IMAGE_WIDTH = 3;
+ /**
+ * The height of the final image
+ */
+ public static final int TR_IMAGE_HEIGHT = 4;
+ /**
+ * The number of rows of tiles
+ */
+ public static final int TR_ROWS = 5;
+ /**
+ * The number of columns of tiles
+ */
+ public static final int TR_COLUMNS = 6;
+ /**
+ * The current row number
+ */
+ public static final int TR_CURRENT_ROW = 7;
+ /**
+ * The current column number
+ */
+ public static final int TR_CURRENT_COLUMN = 8;
+ /**
+ * The width of the current tile
+ */
+ public static final int TR_CURRENT_TILE_WIDTH = 9;
+ /**
+ * The height of the current tile
+ */
+ public static final int TR_CURRENT_TILE_HEIGHT = 10;
+ /**
+ * The order that the rows are traversed
+ */
+ public static final int TR_ROW_ORDER = 11;
+
+
+ /**
+ * Indicates we are traversing rows from the top to the bottom
+ */
+ public static final int TR_TOP_TO_BOTTOM = 1;
+
+ /**
+ * Indicates we are traversing rows from the bottom to the top
+ */
+ public static final int TR_BOTTOM_TO_TOP = 2;
+
+ /* Final image parameters */
+ private Dimension imageSize = new Dimension();
+
+ private int imageFormat, imageType;
+
+ private Buffer imageBuffer;
+
+ /* Tile parameters */
+ private Dimension tileSize = new Dimension();
+
+ private Dimension tileSizeNB = new Dimension();
+
+ private int tileBorder;
+
+ private int tileFormat, tileType;
+
+ private Buffer tileBuffer;
+
+ /* Projection parameters */
+ private boolean perspective;
+
+ private double left;
+
+ private double right;
+
+ private double bottom;
+
+ private double top;
+
+ private double near;
+
+ private double far;
+
+ /* Misc */
+ private int rowOrder;
+
+ private int rows, columns;
+
+ private int currentTile;
+
+ private int currentTileWidth, currentTileHeight;
+
+ private int currentRow, currentColumn;
+
+ private int[] viewportSave = new int[ 4 ];
+
+ /**
+ * Creates a new TileRenderer object
+ */
+ public TileRenderer()
+ {
+ tileSize.width = DEFAULT_TILE_WIDTH;
+ tileSize.height = DEFAULT_TILE_HEIGHT;
+ tileBorder = DEFAULT_TILE_BORDER;
+ rowOrder = TR_BOTTOM_TO_TOP;
+ currentTile = -1;
+ }
+
+ /**
+ * Sets up the number of rows and columns needed
+ */
+ private void setup()
+ {
+ columns = ( imageSize.width + tileSizeNB.width - 1 ) / tileSizeNB.width;
+ rows = ( imageSize.height + tileSizeNB.height - 1 ) / tileSizeNB.height;
+ currentTile = 0;
+
+ assert columns >= 0;
+ assert rows >= 0;
+ }
+
+ /**
+ * Sets the size of the tiles to use in rendering. The actual
+ * effective size of the tile depends on the border size, ie (
+ * width - 2*border ) * ( height - 2 * border )
+ *
+ * @param width
+ * The width of the tiles. Must not be larger than the GL
+ * context
+ * @param height
+ * The height of the tiles. Must not be larger than the
+ * GL context
+ * @param border
+ * The width of the borders on each tile. This is needed
+ * to avoid artifacts when rendering lines or points with
+ * thickness > 1.
+ */
+ public void setTileSize( int width, int height, int border )
+ {
+ assert ( border >= 0 );
+ assert ( width >= 1 );
+ assert ( height >= 1 );
+ assert ( width >= 2 * border );
+ assert ( height >= 2 * border );
+
+ tileBorder = border;
+ tileSize.width = width;
+ tileSize.height = height;
+ tileSizeNB.width = width - 2 * border;
+ tileSizeNB.height = height - 2 * border;
+ setup();
+ }
+
+ /**
+ * Specify a buffer the tiles to be copied to. This is not
+ * necessary for the creation of the final image, but useful if you
+ * want to inspect each tile in turn.
+ *
+ * @param format
+ * Interpreted as in glReadPixels
+ * @param type
+ * Interpreted as in glReadPixels
+ * @param image
+ * The buffer itself. Must be large enough to contain a
+ * tile, minus any borders
+ */
+ public void setTileBuffer( int format, int type, Buffer image )
+ {
+ tileFormat = format;
+ tileType = type;
+ tileBuffer = image;
+ }
+
+ /**
+ * Sets the desired size of the final image
+ *
+ * @param width
+ * The width of the final image
+ * @param height
+ * The height of the final image
+ */
+ public void setImageSize( int width, int height )
+ {
+ imageSize.width = width;
+ imageSize.height = height;
+ setup();
+ }
+
+ /**
+ * Sets the buffer in which to store the final image
+ *
+ * @param format
+ * Interpreted as in glReadPixels
+ * @param type
+ * Interpreted as in glReadPixels
+ * @param image
+ * the buffer itself, must be large enough to hold the
+ * final image
+ */
+ public void setImageBuffer( int format, int type, Buffer image )
+ {
+ imageFormat = format;
+ imageType = type;
+ imageBuffer = image;
+ }
+
+ /**
+ * Gets the parameters of this TileRenderer object
+ *
+ * @param param
+ * The parameter that is to be retrieved
+ * @return the value of the parameter
+ */
+ public int getParam( int param )
+ {
+ switch (param) {
+ case TR_TILE_WIDTH:
+ return tileSize.width;
+ case TR_TILE_HEIGHT:
+ return tileSize.height;
+ case TR_TILE_BORDER:
+ return tileBorder;
+ case TR_IMAGE_WIDTH:
+ return imageSize.width;
+ case TR_IMAGE_HEIGHT:
+ return imageSize.height;
+ case TR_ROWS:
+ return rows;
+ case TR_COLUMNS:
+ return columns;
+ case TR_CURRENT_ROW:
+ if( currentTile < 0 )
+ return -1;
+ else
+ return currentRow;
+ case TR_CURRENT_COLUMN:
+ if( currentTile < 0 )
+ return -1;
+ else
+ return currentColumn;
+ case TR_CURRENT_TILE_WIDTH:
+ return currentTileWidth;
+ case TR_CURRENT_TILE_HEIGHT:
+ return currentTileHeight;
+ case TR_ROW_ORDER:
+ return rowOrder;
+ default:
+ throw new IllegalArgumentException("Invalid enumerant as argument");
+ }
+ }
+
+ /**
+ * Sets the order of row traversal
+ *
+ * @param order
+ * The row traversal order, must be
+ * eitherTR_TOP_TO_BOTTOM or TR_BOTTOM_TO_TOP
+ */
+ public void setRowOrder( int order )
+ {
+ if (order == TR_TOP_TO_BOTTOM || order == TR_BOTTOM_TO_TOP) {
+ rowOrder = order;
+ } else {
+ throw new IllegalArgumentException("Must pass TR_TOP_TO_BOTTOM or TR_BOTTOM_TO_TOP");
+ }
+ }
+
+ /**
+ * Sets the context to use an orthographic projection. Must be
+ * called before rendering the first tile
+ *
+ * @param left
+ * As in glOrtho
+ * @param right
+ * As in glOrtho
+ * @param bottom
+ * As in glOrtho
+ * @param top
+ * As in glOrtho
+ * @param zNear
+ * As in glOrtho
+ * @param zFar
+ * As in glOrtho
+ */
+ public void trOrtho( double left, double right, double bottom, double top, double zNear,
+ double zFar )
+ {
+ this.perspective = false;
+ this.left = left;
+ this.right = right;
+ this.bottom = bottom;
+ this.top = top;
+ this.near = zNear;
+ this.far = zFar;
+ }
+
+ /**
+ * Sets the perspective projection frustrum. Must be called before
+ * rendering the first tile
+ *
+ * @param left
+ * As in glFrustrum
+ * @param right
+ * As in glFrustrum
+ * @param bottom
+ * As in glFrustrum
+ * @param top
+ * As in glFrustrum
+ * @param zNear
+ * As in glFrustrum
+ * @param zFar
+ * As in glFrustrum
+ */
+ public void trFrustum( double left, double right, double bottom, double top, double zNear,
+ double zFar )
+ {
+ this.perspective = true;
+ this.left = left;
+ this.right = right;
+ this.bottom = bottom;
+ this.top = top;
+ this.near = zNear;
+ this.far = zFar;
+ }
+
+ /**
+ * Convenient way to specify a perspective projection
+ *
+ * @param fovy
+ * As in gluPerspective
+ * @param aspect
+ * As in gluPerspective
+ * @param zNear
+ * As in gluPerspective
+ * @param zFar
+ * As in gluPerspective
+ */
+ public void trPerspective( double fovy, double aspect, double zNear, double zFar )
+ {
+ double xmin, xmax, ymin, ymax;
+ ymax = zNear * Math.tan( fovy * 3.14159265 / 360.0 );
+ ymin = -ymax;
+ xmin = ymin * aspect;
+ xmax = ymax * aspect;
+ trFrustum( xmin, xmax, ymin, ymax, zNear, zFar );
+ }
+
+ /**
+ * Begins rendering a tile. The projection matrix stack should be
+ * left alone after calling this
+ *
+ * @param gl
+ * The gl context
+ */
+ public void beginTile( GL2 gl )
+ {
+ if (currentTile <= 0) {
+ setup();
+ /*
+ * Save user's viewport, will be restored after last tile
+ * rendered
+ */
+ gl.glGetIntegerv( GL2.GL_VIEWPORT, viewportSave, 0 );
+ }
+
+ /* which tile (by row and column) we're about to render */
+ if (rowOrder == TR_BOTTOM_TO_TOP) {
+ currentRow = currentTile / columns;
+ currentColumn = currentTile % columns;
+ } else {
+ currentRow = rows - ( currentTile / columns ) - 1;
+ currentColumn = currentTile % columns;
+ }
+ assert ( currentRow < rows );
+ assert ( currentColumn < columns );
+
+ int border = tileBorder;
+
+ int th, tw;
+
+ /* Compute actual size of this tile with border */
+ if (currentRow < rows - 1) {
+ th = tileSize.height;
+ } else {
+ th = imageSize.height - ( rows - 1 ) * ( tileSizeNB.height ) + 2 * border;
+ }
+
+ if (currentColumn < columns - 1) {
+ tw = tileSize.width;
+ } else {
+ tw = imageSize.width - ( columns - 1 ) * ( tileSizeNB.width ) + 2 * border;
+ }
+
+ /* Save tile size, with border */
+ currentTileWidth = tw;
+ currentTileHeight = th;
+
+ gl.glViewport( 0, 0, tw, th );
+
+ /* save current matrix mode */
+ int[] matrixMode = new int[ 1 ];
+ gl.glGetIntegerv( GL2.GL_MATRIX_MODE, matrixMode, 0 );
+ gl.glMatrixMode( GL2.GL_PROJECTION );
+ gl.glLoadIdentity();
+
+ /* compute projection parameters */
+ double l =
+ left + ( right - left ) * ( currentColumn * tileSizeNB.width - border )
+ / imageSize.width;
+ double r = l + ( right - left ) * tw / imageSize.width;
+ double b =
+ bottom + ( top - bottom ) * ( currentRow * tileSizeNB.height - border )
+ / imageSize.height;
+ double t = b + ( top - bottom ) * th / imageSize.height;
+
+ if( perspective ) {
+ gl.glFrustum( l, r, b, t, near, far );
+ } else {
+ gl.glOrtho( l, r, b, t, near, far );
+ }
+
+ /* restore user's matrix mode */
+ gl.glMatrixMode( matrixMode[ 0 ] );
+ }
+
+ /**
+ * Must be called after rendering the scene
+ *
+ * @param gl
+ * the gl context
+ * @return true if there are more tiles to be rendered, false if
+ * the final image is complete
+ */
+ public boolean endTile( GL2 gl )
+ {
+ int[] prevRowLength = new int[ 1 ], prevSkipRows = new int[ 1 ], prevSkipPixels = new int[ 1 ], prevAlignment =
+ new int[ 1 ];
+
+ assert ( currentTile >= 0 );
+
+ // be sure OpenGL rendering is finished
+ gl.glFlush();
+
+ // save current glPixelStore values
+ gl.glGetIntegerv( GL2.GL_PACK_ROW_LENGTH, prevRowLength, 0 );
+ gl.glGetIntegerv( GL2.GL_PACK_SKIP_ROWS, prevSkipRows, 0 );
+ gl.glGetIntegerv( GL2.GL_PACK_SKIP_PIXELS, prevSkipPixels, 0 );
+ gl.glGetIntegerv( GL2.GL_PACK_ALIGNMENT, prevAlignment, 0 );
+
+ if( tileBuffer != null ) {
+ int srcX = tileBorder;
+ int srcY = tileBorder;
+ int srcWidth = tileSizeNB.width;
+ int srcHeight = tileSizeNB.height;
+ gl.glReadPixels( srcX, srcY, srcWidth, srcHeight, tileFormat, tileType, tileBuffer );
+ }
+
+ if( imageBuffer != null ) {
+ int srcX = tileBorder;
+ int srcY = tileBorder;
+ int srcWidth = currentTileWidth - 2 * tileBorder;
+ int srcHeight = currentTileHeight - 2 * tileBorder;
+ int destX = tileSizeNB.width * currentColumn;
+ int destY = tileSizeNB.height * currentRow;
+
+ /* setup pixel store for glReadPixels */
+ gl.glPixelStorei( GL2.GL_PACK_ROW_LENGTH, imageSize.width );
+ gl.glPixelStorei( GL2.GL_PACK_SKIP_ROWS, destY );
+ gl.glPixelStorei( GL2.GL_PACK_SKIP_PIXELS, destX );
+ gl.glPixelStorei( GL2.GL_PACK_ALIGNMENT, 1 );
+
+ /* read the tile into the final image */
+ gl.glReadPixels( srcX, srcY, srcWidth, srcHeight, imageFormat, imageType, imageBuffer );
+ }
+
+ /* restore previous glPixelStore values */
+ gl.glPixelStorei( GL2.GL_PACK_ROW_LENGTH, prevRowLength[ 0 ] );
+ gl.glPixelStorei( GL2.GL_PACK_SKIP_ROWS, prevSkipRows[ 0 ] );
+ gl.glPixelStorei( GL2.GL_PACK_SKIP_PIXELS, prevSkipPixels[ 0 ] );
+ gl.glPixelStorei( GL2.GL_PACK_ALIGNMENT, prevAlignment[ 0 ] );
+
+ /* increment tile counter, return 1 if more tiles left to render */
+ currentTile++;
+ if( currentTile >= rows * columns ) {
+ /* restore user's viewport */
+ gl.glViewport( viewportSave[ 0 ], viewportSave[ 1 ], viewportSave[ 2 ], viewportSave[ 3 ] );
+ currentTile = -1; /* all done */
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+ /**
+ * Tile rendering causes problems with using glRasterPos3f, so you
+ * should use this replacement instead
+ *
+ * @param x
+ * As in glRasterPos3f
+ * @param y
+ * As in glRasterPos3f
+ * @param z
+ * As in glRasterPos3f
+ * @param gl
+ * The gl context
+ * @param glu
+ * A GLUgl2 object
+ */
+ public void trRasterPos3f( float x, float y, float z, GL2 gl, GLUgl2 glu )
+ {
+ if (currentTile < 0) {
+ /* not doing tile rendering right now. Let OpenGL do this. */
+ gl.glRasterPos3f( x, y, z );
+ } else {
+ double[] modelview = new double[ 16 ], proj = new double[ 16 ];
+ int[] viewport = new int[ 4 ];
+ double[] win = new double[3];
+
+ /* Get modelview, projection and viewport */
+ gl.glGetDoublev( GL2.GL_MODELVIEW_MATRIX, modelview, 0 );
+ gl.glGetDoublev( GL2.GL_PROJECTION_MATRIX, proj, 0 );
+ viewport[ 0 ] = 0;
+ viewport[ 1 ] = 0;
+ viewport[ 2 ] = currentTileWidth;
+ viewport[ 3 ] = currentTileHeight;
+
+ /* Project object coord to window coordinate */
+ if( glu.gluProject( x, y, z, modelview, 0, proj, 0, viewport, 0, win, 0 ) ) {
+
+ /* set raster pos to window coord (0,0) */
+ gl.glMatrixMode( GL2.GL_MODELVIEW );
+ gl.glPushMatrix();
+ gl.glLoadIdentity();
+ gl.glMatrixMode( GL2.GL_PROJECTION );
+ gl.glPushMatrix();
+ gl.glLoadIdentity();
+ gl.glOrtho( 0.0, currentTileWidth, 0.0, currentTileHeight, 0.0, 1.0 );
+ gl.glRasterPos3d( 0.0, 0.0, -win[ 2 ] );
+
+ /*
+ * Now use empty bitmap to adjust raster position to
+ * (winX,winY)
+ */
+ {
+ byte[] bitmap = { 0 };
+ gl.glBitmap( 1, 1, 0.0f, 0.0f, ( float ) win[ 0 ], ( float ) win[ 1 ], bitmap , 0 );
+ }
+
+ /* restore original matrices */
+ gl.glPopMatrix(); /* proj */
+ gl.glMatrixMode( GL2.GL_MODELVIEW );
+ gl.glPopMatrix();
+ }
+ }
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/GLSLArrayHandler.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/GLSLArrayHandler.java
new file mode 100644
index 000000000..1119aa5ab
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/GLSLArrayHandler.java
@@ -0,0 +1,60 @@
+
+package com.jogamp.opengl.util.glsl;
+
+import javax.media.opengl.*;
+import javax.media.opengl.fixedfunc.*;
+import com.jogamp.opengl.util.*;
+import com.jogamp.opengl.util.glsl.ShaderState;
+import java.nio.*;
+
+public class GLSLArrayHandler implements GLArrayHandler {
+ private GLArrayDataEditable ad;
+
+ public GLSLArrayHandler(GLArrayDataEditable ad) {
+ this.ad = ad;
+ }
+
+ protected final void passVertexAttribPointer(GL2ES2 gl, ShaderState st) {
+ st.glVertexAttribPointer(gl, ad);
+ }
+
+ public void enableBuffer(GL gl, boolean enable) {
+ if(!gl.isGL2ES2()) {
+ throw new GLException("GLSLArrayHandler expects a GL2ES2 implementation");
+ }
+ GL2ES2 glsl = gl.getGL2ES2();
+ ShaderState st = ShaderState.getCurrent();
+ if(null==st) {
+ throw new GLException("No ShaderState current");
+ }
+
+ if(enable) {
+ st.glEnableVertexAttribArray(glsl, ad.getName());
+
+ Buffer buffer = ad.getBuffer();
+
+ if(ad.isVBO()) {
+ // always bind and refresh the VBO mgr,
+ // in case more than one gl*Pointer objects are in use
+ glsl.glBindBuffer(GL.GL_ARRAY_BUFFER, ad.getVBOName());
+ if(!ad.isBufferWritten()) {
+ if(null!=buffer) {
+ glsl.glBufferData(GL.GL_ARRAY_BUFFER, buffer.limit() * ad.getComponentSize(), buffer, ad.getBufferUsage());
+ }
+ ad.setBufferWritten(true);
+ }
+ passVertexAttribPointer(glsl, st);
+ } else if(null!=buffer) {
+ passVertexAttribPointer(glsl, st);
+ ad.setBufferWritten(true);
+ }
+ } else {
+ if(ad.isVBO()) {
+ glsl.glBindBuffer(GL.GL_ARRAY_BUFFER, 0);
+ }
+ st.glDisableVertexAttribArray(glsl, ad.getName());
+ }
+ }
+
+}
+
diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java
new file mode 100644
index 000000000..01b94d0d9
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java
@@ -0,0 +1,347 @@
+
+package com.jogamp.opengl.util.glsl;
+
+import javax.media.opengl.*;
+import com.jogamp.opengl.util.*;
+import com.jogamp.opengl.impl.Debug;
+
+import java.util.*;
+import java.nio.*;
+import java.io.*;
+import java.net.*;
+import java.security.*;
+
+public class ShaderCode {
+ public static final boolean DEBUG = Debug.debug("GLSLCode");
+ public static final boolean DEBUG_CODE = Debug.isPropertyDefined("jogl.debug.GLSLCode", true, AccessController.getContext());
+
+ public static final String SUFFIX_VERTEX_SOURCE = "vp" ;
+ public static final String SUFFIX_VERTEX_BINARY = "bvp" ;
+ public static final String SUFFIX_FRAGMENT_SOURCE = "fp" ;
+ public static final String SUFFIX_FRAGMENT_BINARY = "bfp" ;
+
+ public static final String SUB_PATH_NVIDIA = "nvidia" ;
+
+ public ShaderCode(int type, int number, String[][] source) {
+ switch (type) {
+ case GL2ES2.GL_VERTEX_SHADER:
+ case GL2ES2.GL_FRAGMENT_SHADER:
+ break;
+ default:
+ throw new GLException("Unknown shader type: "+type);
+ }
+ shaderSource = source;
+ shaderBinaryFormat = -1;
+ shaderBinary = null;
+ shaderType = type;
+ shader = BufferUtil.newIntBuffer(number);
+ id = getNextID();
+
+ if(DEBUG_CODE) {
+ System.out.println("Created: "+toString());
+ dumpShaderSource(System.out);
+ }
+ }
+
+ public ShaderCode(int type, int number, int binFormat, Buffer binary) {
+ switch (type) {
+ case GL2ES2.GL_VERTEX_SHADER:
+ case GL2ES2.GL_FRAGMENT_SHADER:
+ break;
+ default:
+ throw new GLException("Unknown shader type: "+type);
+ }
+ shaderSource = null;
+ shaderBinaryFormat = binFormat;
+ shaderBinary = binary;
+ shaderType = type;
+ shader = BufferUtil.newIntBuffer(number);
+ id = getNextID();
+ }
+
+ public static ShaderCode create(GL2ES2 gl, int type, int number, Class context, String[] sourceFiles) {
+ if(!ShaderUtil.isShaderCompilerAvailable(gl)) return null;
+
+ String[][] shaderSources = null;
+ if(null!=sourceFiles) {
+ shaderSources = new String[sourceFiles.length][1];
+ for(int i=0; null!=shaderSources && i
+
+ Negative coordinates and sizes are not supported, since they make
+ no sense in the context of the packer, which deals only with
+ positively sized regions.
+
+ This class contains a user data field for efficient hookup to
+ external data structures as well as enough other hooks to
+ efficiently plug into the rectangle packer. */
+
+public class Rect {
+ private int x;
+ private int y;
+ private int w;
+ private int h;
+
+ // The level we're currently installed in in the parent
+ // RectanglePacker, or null if not hooked in to the table yet
+ private Level level;
+
+ // The user's object this rectangle represents.
+ private Object userData;
+
+ // Used transiently during re-layout of the backing store (when
+ // there is no room left due either to fragmentation or just being
+ // out of space)
+ private Rect nextLocation;
+
+ public Rect() {
+ this(null);
+ }
+
+ public Rect(Object userData) {
+ this(0, 0, 0, 0, userData);
+ }
+
+ public Rect(int x, int y, int w, int h, Object userData) {
+ setPosition(x, y);
+ setSize(w, h);
+ setUserData(userData);
+ }
+
+ public int x() { return x; }
+ public int y() { return y; }
+ public int w() { return w; }
+ public int h() { return h; }
+ public Object getUserData() { return userData; }
+ public Rect getNextLocation() { return nextLocation; }
+
+ public void setPosition(int x, int y) {
+ if (x < 0)
+ throw new IllegalArgumentException("Negative x");
+ if (y < 0)
+ throw new IllegalArgumentException("Negative y");
+ this.x = x;
+ this.y = y;
+ }
+
+ public void setSize(int w, int h) throws IllegalArgumentException {
+ if (w < 0)
+ throw new IllegalArgumentException("Negative width");
+ if (h < 0)
+ throw new IllegalArgumentException("Negative height");
+ this.w = w;
+ this.h = h;
+ }
+
+ public void setUserData(Object obj) { userData = obj; }
+ public void setNextLocation(Rect nextLocation) { this.nextLocation = nextLocation; }
+
+ // Helpers for computations.
+
+ /** Returns the maximum x-coordinate contained within this
+ rectangle. Note that this returns a different result than Java
+ 2D's rectangles; for a rectangle of position (0, 0) and size (1,
+ 1) this will return 0, not 1. Returns -1 if the width of this
+ rectangle is 0. */
+ public int maxX() {
+ if (w() < 1)
+ return -1;
+ return x() + w() - 1;
+ }
+
+ /** Returns the maximum y-coordinate contained within this
+ rectangle. Note that this returns a different result than Java
+ 2D's rectangles; for a rectangle of position (0, 0) and size (1,
+ 1) this will return 0, not 1. Returns -1 if the height of this
+ rectangle is 0. */
+ public int maxY() {
+ if (h() < 1)
+ return -1;
+ return y() + h() - 1;
+ }
+
+ public boolean canContain(Rect other) {
+ return (w() >= other.w() &&
+ h() >= other.h());
+ }
+
+ public String toString() {
+ return "[Rect x: " + x() + " y: " + y() + " w: " + w() + " h: " + h() + "]";
+ }
+
+ // Unclear whether it's a good idea to override hashCode and equals
+ // for these objects
+ /*
+ public boolean equals(Object other) {
+ if (other == null || (!(other instanceof Rect))) {
+ return false;
+ }
+
+ Rect r = (Rect) other;
+ return (this.x() == r.x() &&
+ this.y() == r.y() &&
+ this.w() == r.w() &&
+ this.h() == r.h());
+ }
+
+ public int hashCode() {
+ return (x + y * 13 + w * 17 + h * 23);
+ }
+ */
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/packrect/RectVisitor.java b/src/jogl/classes/com/jogamp/opengl/util/packrect/RectVisitor.java
new file mode 100755
index 000000000..49cfc82e6
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/packrect/RectVisitor.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.util.packrect;
+
+/** Iteration construct without exposing the internals of the
+ RectanglePacker and without implementing a complex Iterator. */
+
+public interface RectVisitor {
+ public void visit(Rect rect);
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/packrect/RectanglePacker.java b/src/jogl/classes/com/jogamp/opengl/util/packrect/RectanglePacker.java
new file mode 100755
index 000000000..1496a04a6
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/packrect/RectanglePacker.java
@@ -0,0 +1,306 @@
+/*
+ * Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.util.packrect;
+
+import java.util.*;
+
+/** Packs rectangles supplied by the user (typically representing
+ image regions) into a larger backing store rectangle (typically
+ representing a large texture). Supports automatic compaction of
+ the space on the backing store, and automatic expansion of the
+ backing store, when necessary. */
+
+public class RectanglePacker {
+ private BackingStoreManager manager;
+ private Object backingStore;
+ private LevelSet levels;
+ private float EXPANSION_FACTOR = 0.5f;
+ private float SHRINK_FACTOR = 0.3f;
+
+ private int initialWidth;
+ private int initialHeight;
+
+ private int maxWidth = -1;
+ private int maxHeight = -1;
+
+ static class RectHComparator implements Comparator {
+ public int compare(Object o1, Object o2) {
+ Rect r1 = (Rect) o1;
+ Rect r2 = (Rect) o2;
+ return r2.h() - r1.h();
+ }
+
+ public boolean equals(Object obj) {
+ return this == obj;
+ }
+ }
+ private static final Comparator rectHComparator = new RectHComparator();
+
+ public RectanglePacker(BackingStoreManager manager,
+ int initialWidth,
+ int initialHeight) {
+ this.manager = manager;
+ levels = new LevelSet(initialWidth, initialHeight);
+ this.initialWidth = initialWidth;
+ this.initialHeight = initialHeight;
+ }
+
+ public Object getBackingStore() {
+ if (backingStore == null) {
+ backingStore = manager.allocateBackingStore(levels.w(), levels.h());
+ }
+
+ return backingStore;
+ }
+
+ /** Sets up a maximum width and height for the backing store. These
+ are optional and if not specified the backing store will grow as
+ necessary. Setting up a maximum width and height introduces the
+ possibility that additions will fail; these are handled with the
+ BackingStoreManager's allocationFailed notification. */
+ public void setMaxSize(int maxWidth, int maxHeight) {
+ this.maxWidth = maxWidth;
+ this.maxHeight = maxHeight;
+ }
+
+ /** Decides upon an (x, y) position for the given rectangle (leaving
+ its width and height unchanged) and places it on the backing
+ store. May provoke re-layout of other Rects already added. If
+ the BackingStoreManager does not support compaction, and {@link
+ BackingStoreManager#preExpand BackingStoreManager.preExpand}
+ does not clear enough space for the incoming rectangle, then
+ this method will throw a RuntimeException. */
+ public void add(Rect rect) throws RuntimeException {
+ // Allocate backing store if we don't have any yet
+ if (backingStore == null)
+ backingStore = manager.allocateBackingStore(levels.w(), levels.h());
+
+ int attemptNumber = 0;
+ boolean tryAgain = false;
+
+ do {
+ // Try to allocate
+ if (levels.add(rect))
+ return;
+
+ if (manager.canCompact()) {
+ // Try to allocate with horizontal compaction
+ if (levels.compactAndAdd(rect, backingStore, manager))
+ return;
+ // Let the manager have a chance at potentially evicting some entries
+ tryAgain = manager.preExpand(rect, attemptNumber++);
+ } else {
+ tryAgain = manager.additionFailed(rect, attemptNumber++);
+ }
+ } while (tryAgain);
+
+ if (!manager.canCompact()) {
+ throw new RuntimeException("BackingStoreManager does not support compaction or expansion, and didn't clear space for new rectangle");
+ }
+
+ compactImpl(rect);
+
+ // Retry the addition of the incoming rectangle
+ add(rect);
+ // Done
+ }
+
+ /** Removes the given rectangle from this RectanglePacker. */
+ public void remove(Rect rect) {
+ levels.remove(rect);
+ }
+
+ /** Visits all Rects contained in this RectanglePacker. */
+ public void visit(RectVisitor visitor) {
+ levels.visit(visitor);
+ }
+
+ /** Returns the vertical fragmentation ratio of this
+ RectanglePacker. This is defined as the ratio of the sum of the
+ heights of all completely empty Levels divided by the overall
+ used height of the LevelSet. A high vertical fragmentation ratio
+ indicates that it may be profitable to perform a compaction. */
+ public float verticalFragmentationRatio() {
+ return levels.verticalFragmentationRatio();
+ }
+
+ /** Forces a compaction cycle, which typically results in allocating
+ a new backing store and copying all entries to it. */
+ public void compact() {
+ compactImpl(null);
+ }
+
+ // The "cause" rect may be null
+ private void compactImpl(Rect cause) {
+ // Have to either expand, compact or both. Need to figure out what
+ // direction to go. Prefer to expand vertically. Expand
+ // horizontally only if rectangle being added is too wide. FIXME:
+ // may want to consider rebalancing the width and height to be
+ // more equal if it turns out we keep expanding in the vertical
+ // direction.
+ boolean done = false;
+ int newWidth = levels.w();
+ int newHeight = levels.h();
+ LevelSet nextLevelSet = null;
+ int attemptNumber = 0;
+ boolean needAdditionFailureNotification = false;
+
+ while (!done) {
+ if (cause != null) {
+ if (cause.w() > newWidth) {
+ newWidth = cause.w();
+ } else {
+ newHeight = (int) (newHeight * (1.0f + EXPANSION_FACTOR));
+ }
+ }
+
+ // Clamp to maximum values
+ needAdditionFailureNotification = false;
+ if (maxWidth > 0 && newWidth > maxWidth) {
+ newWidth = maxWidth;
+ needAdditionFailureNotification = true;
+ }
+ if (maxHeight > 0 && newHeight > maxHeight) {
+ newHeight = maxHeight;
+ needAdditionFailureNotification = true;
+ }
+
+ nextLevelSet = new LevelSet(newWidth, newHeight);
+
+ // Make copies of all existing rectangles
+ List/*
+
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java b/src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java
new file mode 100755
index 000000000..5ef96eeaf
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java
@@ -0,0 +1,1120 @@
+/*
+ * Copyright (c) 2005 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ */
+
+package com.jogamp.opengl.util.texture;
+
+import java.nio.*;
+import java.security.*;
+
+import javax.media.opengl.*;
+import javax.media.opengl.glu.*;
+import javax.media.nativewindow.NativeWindowFactory;
+import com.jogamp.opengl.impl.*;
+import com.jogamp.opengl.util.texture.*;
+import com.jogamp.opengl.util.texture.spi.*;
+
+/**
+ * Represents an OpenGL texture object. Contains convenience routines
+ * for enabling/disabling OpenGL texture state, binding this texture,
+ * and computing texture coordinates for both the entire image as well
+ * as a sub-image.
+ *
+ * Non-power-of-two restrictions
+ * One caveat in this approach is that certain texture wrap modes
+ * (e.g. Performance Tips
+ * Alpha premultiplication and blending
+ * Provides input and output facilities for both loading OpenGL
+ textures from disk and streams as well as writing textures already
+ in memory back to disk. The TextureIO class supports an arbitrary number of plug-in
+ readers and writers via TextureProviders and TextureWriters.
+ TextureProviders know how to produce TextureData objects from
+ files, InputStreams and URLs. TextureWriters know how to write
+ TextureData objects to disk in various file formats. The
+ TextureData class represents the raw data of the texture before it
+ has been converted to an OpenGL texture object. The Texture class
+ represents the OpenGL texture object and provides easy facilities
+ for using the texture. There are several built-in TextureProviders and TextureWriters
+ supplied with the TextureIO implementation. The most basic
+ provider uses the platform's Image I/O facilities to read in a
+ BufferedImage and convert it to a texture. This is the baseline
+ provider and is registered so that it is the last one consulted.
+ All others are asked first to open a given file. There are three other providers registered by default as of
+ the time of this writing. One handles SGI RGB (".sgi", ".rgb")
+ images from both files and streams. One handles DirectDraw Surface
+ (".dds") images read from files, though can not read these images
+ from streams. One handles Targa (".tga") images read from both
+ files and streams. These providers are executed in an arbitrary
+ order. Some of these providers require the file's suffix to either
+ be specified via the newTextureData methods or for the file to be
+ named with the appropriate suffix. In general a file suffix should
+ be provided to the newTexture and newTextureData methods if at all
+ possible. Note that additional TextureProviders, if reading images from
+ InputStreams, must use the mark()/reset() methods on InputStream
+ when probing for e.g. magic numbers at the head of the file to
+ make sure not to disturb the state of the InputStream for
+ downstream TextureProviders. There are analogous TextureWriters provided for writing
+ textures back to disk if desired. As of this writing, there are
+ four TextureWriters registered by default: one for Targa files,
+ one for SGI RGB files, one for DirectDraw surface (.dds) files,
+ and one for ImageIO-supplied formats such as .jpg and .png. Some
+ of these writers have certain limitations such as only being able
+ to write out textures stored in GL_RGB or GL_RGBA format. The DDS
+ writer supports fetching and writing to disk of texture data in
+ DXTn compressed format. Whether this will occur is dependent on
+ whether the texture's internal format is one of the DXTn
+ compressed formats and whether the target file is .dds format.
+*/
+
+public class TextureIO {
+ /** Constant which can be used as a file suffix to indicate a
+ DirectDraw Surface file. */
+ public static final String DDS = "dds";
+
+ /** Constant which can be used as a file suffix to indicate an SGI
+ RGB file. */
+ public static final String SGI = "sgi";
+
+ /** Constant which can be used as a file suffix to indicate an SGI
+ RGB file. */
+ public static final String SGI_RGB = "rgb";
+
+ /** Constant which can be used as a file suffix to indicate a GIF
+ file. */
+ public static final String GIF = "gif";
+
+ /** Constant which can be used as a file suffix to indicate a JPEG
+ file. */
+ public static final String JPG = "jpg";
+
+ /** Constant which can be used as a file suffix to indicate a PNG
+ file. */
+ public static final String PNG = "png";
+
+ /** Constant which can be used as a file suffix to indicate a Targa
+ file. */
+ public static final String TGA = "tga";
+
+ /** Constant which can be used as a file suffix to indicate a TIFF
+ file. */
+ public static final String TIFF = "tiff";
+
+ private static final boolean DEBUG = Debug.debug("TextureIO");
+
+ // For manually disabling the use of the texture rectangle
+ // extensions so you know the texture target is GL_TEXTURE_2D; this
+ // is useful for shader writers (thanks to Chris Campbell for this
+ // observation)
+ private static boolean texRectEnabled = true;
+
+ //----------------------------------------------------------------------
+ // methods that *do not* require a current context
+ // These methods assume RGB or RGBA textures.
+ // Some texture providers may not recognize the file format unless
+ // the fileSuffix is specified, so it is strongly recommended to
+ // specify it wherever it is known.
+ // Some texture providers may also only support one kind of input,
+ // i.e., reading from a file as opposed to a stream.
+
+ /**
+ * Creates a TextureData from the given file. Does no OpenGL work.
+ *
+ * @param glp the OpenGL Profile this texture data should be
+ * created for.
+ * @param file the file from which to read the texture data
+ * @param mipmap whether mipmaps should be produced for this
+ * texture either by autogenerating them or
+ * reading them from the file. Some file formats
+ * support multiple mipmaps in a single file in
+ * which case those mipmaps will be used rather
+ * than generating them.
+ * @param fileSuffix the suffix of the file name to be used as a
+ * hint of the file format to the underlying
+ * texture provider, or null if none and should be
+ * auto-detected (some texture providers do not
+ * support this)
+ * @return the texture data from the file, or null if none of the
+ * registered texture providers could read the file
+ * @throws IOException if an error occurred while reading the file
+ */
+ public static TextureData newTextureData(GLProfile glp, File file,
+ boolean mipmap,
+ String fileSuffix) throws IOException {
+ if (fileSuffix == null) {
+ fileSuffix = FileUtil.getFileSuffix(file);
+ }
+ return newTextureDataImpl(glp, file, 0, 0, mipmap, fileSuffix);
+ }
+
+ /**
+ * Creates a TextureData from the given stream. Does no OpenGL work.
+ *
+ * @param glp the OpenGL Profile this texture data should be
+ * created for.
+ * @param stream the stream from which to read the texture data
+ * @param mipmap whether mipmaps should be produced for this
+ * texture either by autogenerating them or
+ * reading them from the file. Some file formats
+ * support multiple mipmaps in a single file in
+ * which case those mipmaps will be used rather
+ * than generating them.
+ * @param fileSuffix the suffix of the file name to be used as a
+ * hint of the file format to the underlying
+ * texture provider, or null if none and should be
+ * auto-detected (some texture providers do not
+ * support this)
+ * @return the texture data from the stream, or null if none of the
+ * registered texture providers could read the stream
+ * @throws IOException if an error occurred while reading the stream
+ */
+ public static TextureData newTextureData(GLProfile glp, InputStream stream,
+ boolean mipmap,
+ String fileSuffix) throws IOException {
+ return newTextureDataImpl(glp, stream, 0, 0, mipmap, fileSuffix);
+ }
+
+ /**
+ * Creates a TextureData from the given URL. Does no OpenGL work.
+ *
+ * @param glp the OpenGL Profile this texture data should be
+ * created for.
+ * @param url the URL from which to read the texture data
+ * @param mipmap whether mipmaps should be produced for this
+ * texture either by autogenerating them or
+ * reading them from the file. Some file formats
+ * support multiple mipmaps in a single file in
+ * which case those mipmaps will be used rather
+ * than generating them.
+ * @param fileSuffix the suffix of the file name to be used as a
+ * hint of the file format to the underlying
+ * texture provider, or null if none and should be
+ * auto-detected (some texture providers do not
+ * support this)
+ * @return the texture data from the URL, or null if none of the
+ * registered texture providers could read the URL
+ * @throws IOException if an error occurred while reading the URL
+ */
+ public static TextureData newTextureData(GLProfile glp, URL url,
+ boolean mipmap,
+ String fileSuffix) throws IOException {
+ if (fileSuffix == null) {
+ fileSuffix = FileUtil.getFileSuffix(url.getPath());
+ }
+ return newTextureDataImpl(glp, url, 0, 0, mipmap, fileSuffix);
+ }
+
+ //----------------------------------------------------------------------
+ // These methods make no assumption about the OpenGL internal format
+ // or pixel format of the texture; they must be specified by the
+ // user. It is not allowed to supply 0 (indicating no preference)
+ // for either the internalFormat or the pixelFormat;
+ // IllegalArgumentException will be thrown in this case.
+
+ /**
+ * Creates a TextureData from the given file, using the specified
+ * OpenGL internal format and pixel format for the texture which
+ * will eventually result. The internalFormat and pixelFormat must
+ * be specified and may not be zero; to use default values, use the
+ * variant of this method which does not take these arguments. Does
+ * no OpenGL work.
+ *
+ * @param glp the OpenGL Profile this texture data should be
+ * created for.
+ * @param file the file from which to read the texture data
+ * @param internalFormat the OpenGL internal format of the texture
+ * which will eventually result from the TextureData
+ * @param pixelFormat the OpenGL pixel format of the texture
+ * which will eventually result from the TextureData
+ * @param mipmap whether mipmaps should be produced for this
+ * texture either by autogenerating them or
+ * reading them from the file. Some file formats
+ * support multiple mipmaps in a single file in
+ * which case those mipmaps will be used rather
+ * than generating them.
+ * @param fileSuffix the suffix of the file name to be used as a
+ * hint of the file format to the underlying
+ * texture provider, or null if none and should be
+ * auto-detected (some texture providers do not
+ * support this)
+ * @return the texture data from the file, or null if none of the
+ * registered texture providers could read the file
+ * @throws IllegalArgumentException if either internalFormat or
+ * pixelFormat was 0
+ * @throws IOException if an error occurred while reading the file
+ */
+ public static TextureData newTextureData(GLProfile glp, File file,
+ int internalFormat,
+ int pixelFormat,
+ boolean mipmap,
+ String fileSuffix) throws IOException, IllegalArgumentException {
+ if ((internalFormat == 0) || (pixelFormat == 0)) {
+ throw new IllegalArgumentException("internalFormat and pixelFormat must be non-zero");
+ }
+
+ if (fileSuffix == null) {
+ fileSuffix = FileUtil.getFileSuffix(file);
+ }
+
+ return newTextureDataImpl(glp, file, internalFormat, pixelFormat, mipmap, fileSuffix);
+ }
+
+ /**
+ * Creates a TextureData from the given stream, using the specified
+ * OpenGL internal format and pixel format for the texture which
+ * will eventually result. The internalFormat and pixelFormat must
+ * be specified and may not be zero; to use default values, use the
+ * variant of this method which does not take these arguments. Does
+ * no OpenGL work.
+ *
+ * @param glp the OpenGL Profile this texture data should be
+ * created for.
+ * @param stream the stream from which to read the texture data
+ * @param internalFormat the OpenGL internal format of the texture
+ * which will eventually result from the TextureData
+ * @param pixelFormat the OpenGL pixel format of the texture
+ * which will eventually result from the TextureData
+ * @param mipmap whether mipmaps should be produced for this
+ * texture either by autogenerating them or
+ * reading them from the file. Some file formats
+ * support multiple mipmaps in a single file in
+ * which case those mipmaps will be used rather
+ * than generating them.
+ * @param fileSuffix the suffix of the file name to be used as a
+ * hint of the file format to the underlying
+ * texture provider, or null if none and should be
+ * auto-detected (some texture providers do not
+ * support this)
+ * @return the texture data from the stream, or null if none of the
+ * registered texture providers could read the stream
+ * @throws IllegalArgumentException if either internalFormat or
+ * pixelFormat was 0
+ * @throws IOException if an error occurred while reading the stream
+ */
+ public static TextureData newTextureData(GLProfile glp, InputStream stream,
+ int internalFormat,
+ int pixelFormat,
+ boolean mipmap,
+ String fileSuffix) throws IOException, IllegalArgumentException {
+ if ((internalFormat == 0) || (pixelFormat == 0)) {
+ throw new IllegalArgumentException("internalFormat and pixelFormat must be non-zero");
+ }
+
+ return newTextureDataImpl(glp, stream, internalFormat, pixelFormat, mipmap, fileSuffix);
+ }
+
+ /**
+ * Creates a TextureData from the given URL, using the specified
+ * OpenGL internal format and pixel format for the texture which
+ * will eventually result. The internalFormat and pixelFormat must
+ * be specified and may not be zero; to use default values, use the
+ * variant of this method which does not take these arguments. Does
+ * no OpenGL work.
+ *
+ * @param glp the OpenGL Profile this texture data should be
+ * created for.
+ * @param url the URL from which to read the texture data
+ * @param internalFormat the OpenGL internal format of the texture
+ * which will eventually result from the TextureData
+ * @param pixelFormat the OpenGL pixel format of the texture
+ * which will eventually result from the TextureData
+ * @param mipmap whether mipmaps should be produced for this
+ * texture either by autogenerating them or
+ * reading them from the file. Some file formats
+ * support multiple mipmaps in a single file in
+ * which case those mipmaps will be used rather
+ * than generating them.
+ * @param fileSuffix the suffix of the file name to be used as a
+ * hint of the file format to the underlying
+ * texture provider, or null if none and should be
+ * auto-detected (some texture providers do not
+ * support this)
+ * @return the texture data from the URL, or null if none of the
+ * registered texture providers could read the URL
+ * @throws IllegalArgumentException if either internalFormat or
+ * pixelFormat was 0
+ * @throws IOException if an error occurred while reading the URL
+ */
+ public static TextureData newTextureData(GLProfile glp, URL url,
+ int internalFormat,
+ int pixelFormat,
+ boolean mipmap,
+ String fileSuffix) throws IOException, IllegalArgumentException {
+ if ((internalFormat == 0) || (pixelFormat == 0)) {
+ throw new IllegalArgumentException("internalFormat and pixelFormat must be non-zero");
+ }
+
+ if (fileSuffix == null) {
+ fileSuffix = FileUtil.getFileSuffix(url.getPath());
+ }
+
+ return newTextureDataImpl(glp, url, internalFormat, pixelFormat, mipmap, fileSuffix);
+ }
+
+ //----------------------------------------------------------------------
+ // methods that *do* require a current context
+ //
+
+ /**
+ * Creates an OpenGL texture object from the specified TextureData
+ * using the current OpenGL context.
+ *
+ * @param data the texture data to turn into an OpenGL texture
+ * @throws GLException if no OpenGL context is current or if an
+ * OpenGL error occurred
+ * @throws IllegalArgumentException if the passed TextureData was null
+ */
+ public static Texture newTexture(TextureData data) throws GLException, IllegalArgumentException {
+ if (data == null) {
+ throw new IllegalArgumentException("Null TextureData");
+ }
+ return new Texture(data);
+ }
+
+ /**
+ * Creates an OpenGL texture object from the specified file using
+ * the current OpenGL context.
+ *
+ * @param file the file from which to read the texture data
+ * @param mipmap whether mipmaps should be produced for this
+ * texture either by autogenerating them or
+ * reading them from the file. Some file formats
+ * support multiple mipmaps in a single file in
+ * which case those mipmaps will be used rather
+ * than generating them.
+ * @throws IOException if an error occurred while reading the file
+ * @throws GLException if no OpenGL context is current or if an
+ * OpenGL error occurred
+ */
+ public static Texture newTexture(File file, boolean mipmap) throws IOException, GLException {
+ GLProfile glp = GLContext.getCurrentGL().getGLProfile();
+ TextureData data = newTextureData(glp, file, mipmap, FileUtil.getFileSuffix(file));
+ Texture texture = newTexture(data);
+ data.flush();
+ return texture;
+ }
+
+ /**
+ * Creates an OpenGL texture object from the specified stream using
+ * the current OpenGL context.
+ *
+ * @param stream the stream from which to read the texture data
+ * @param mipmap whether mipmaps should be produced for this
+ * texture either by autogenerating them or
+ * reading them from the file. Some file formats
+ * support multiple mipmaps in a single file in
+ * which case those mipmaps will be used rather
+ * than generating them.
+ * @param fileSuffix the suffix of the file name to be used as a
+ * hint of the file format to the underlying
+ * texture provider, or null if none and should be
+ * auto-detected (some texture providers do not
+ * support this)
+ * @throws IOException if an error occurred while reading the stream
+ * @throws GLException if no OpenGL context is current or if an
+ * OpenGL error occurred
+ */
+ public static Texture newTexture(InputStream stream, boolean mipmap, String fileSuffix) throws IOException, GLException {
+ GLProfile glp = GLContext.getCurrentGL().getGLProfile();
+ TextureData data = newTextureData(glp, stream, mipmap, fileSuffix);
+ Texture texture = newTexture(data);
+ data.flush();
+ return texture;
+ }
+
+ /**
+ * Creates an OpenGL texture object from the specified URL using the
+ * current OpenGL context.
+ *
+ * @param url the URL from which to read the texture data
+ * @param mipmap whether mipmaps should be produced for this
+ * texture either by autogenerating them or
+ * reading them from the file. Some file formats
+ * support multiple mipmaps in a single file in
+ * which case those mipmaps will be used rather
+ * than generating them.
+ * @param fileSuffix the suffix of the file name to be used as a
+ * hint of the file format to the underlying
+ * texture provider, or null if none and should be
+ * auto-detected (some texture providers do not
+ * support this)
+ * @throws IOException if an error occurred while reading the URL
+ * @throws GLException if no OpenGL context is current or if an
+ * OpenGL error occurred
+ */
+ public static Texture newTexture(URL url, boolean mipmap, String fileSuffix) throws IOException, GLException {
+ if (fileSuffix == null) {
+ fileSuffix = FileUtil.getFileSuffix(url.getPath());
+ }
+ GLProfile glp = GLContext.getCurrentGL().getGLProfile();
+ TextureData data = newTextureData(glp, url, mipmap, fileSuffix);
+ Texture texture = newTexture(data);
+ data.flush();
+ return texture;
+ }
+
+ /**
+ * Creates an OpenGL texture object associated with the given OpenGL
+ * texture target using the current OpenGL context. The texture has
+ * no initial data. This is used, for example, to construct cube
+ * maps out of multiple TextureData objects.
+ *
+ * @param target the OpenGL target type, eg GL.GL_TEXTURE_2D,
+ * GL.GL_TEXTURE_RECTANGLE_ARB
+ *
+ * @throws GLException if no OpenGL context is current or if an
+ * OpenGL error occurred
+ */
+ public static Texture newTexture(int target) throws GLException {
+ return new Texture(target);
+ }
+
+ /**
+ * Wraps an OpenGL texture ID from an external library and allows
+ * some of the base methods from the Texture class, such as
+ * binding and querying of texture coordinates, to be used with
+ * it. Attempts to update such textures' contents will yield
+ * undefined results.
+ *
+ * @param textureID the OpenGL texture object to wrap
+ * @param target the OpenGL texture target, eg GL.GL_TEXTURE_2D,
+ * GL2.GL_TEXTURE_RECTANGLE
+ * @param texWidth the width of the texture in pixels
+ * @param texHeight the height of the texture in pixels
+ * @param imgWidth the width of the image within the texture in
+ * pixels (if the content is a sub-rectangle in the upper
+ * left corner); otherwise, pass in texWidth
+ * @param imgHeight the height of the image within the texture in
+ * pixels (if the content is a sub-rectangle in the upper
+ * left corner); otherwise, pass in texHeight
+ * @param mustFlipVertically indicates whether the texture
+ * coordinates must be flipped vertically
+ * in order to properly display the
+ * texture
+ */
+ public static Texture newTexture(int textureID,
+ int target,
+ int texWidth,
+ int texHeight,
+ int imgWidth,
+ int imgHeight,
+ boolean mustFlipVertically) {
+ return new Texture(textureID,
+ target,
+ texWidth,
+ texHeight,
+ imgWidth,
+ imgHeight,
+ mustFlipVertically);
+ }
+
+ /**
+ * Writes the given texture to a file. The type of the file is
+ * inferred from its suffix. An OpenGL context must be current in
+ * order to fetch the texture data back from the OpenGL pipeline.
+ * This method causes the specified Texture to be bound to the
+ * GL_TEXTURE_2D state. If no suitable writer for the requested file
+ * format was found, throws an IOException.
+ *
+ * Reasonable attempts are made to produce good results in the
+ * resulting images. The Targa, SGI and ImageIO writers produce
+ * results in the correct vertical orientation for those file
+ * formats. The DDS writer performs no vertical flip of the data,
+ * even in uncompressed mode. (It is impossible to perform such a
+ * vertical flip with compressed data.) Applications should keep
+ * this in mind when using this routine to save textures to disk for
+ * later re-loading.
+ *
+ * Any mipmaps for the specified texture are currently discarded
+ * when it is written to disk, regardless of whether the underlying
+ * file format supports multiple mipmaps in a given file.
+ *
+ * @throws IOException if an error occurred during writing or no
+ * suitable writer was found
+ * @throws GLException if no OpenGL context was current or an
+ * OpenGL-related error occurred
+ */
+ public static void write(Texture texture, File file) throws IOException, GLException {
+ if (texture.getTarget() != GL.GL_TEXTURE_2D) {
+ throw new GLException("Only GL_TEXTURE_2D textures are supported");
+ }
+
+ // First fetch the texture data
+ GL _gl = GLContext.getCurrentGL();
+ if (!_gl.isGL2()) {
+ throw new GLException("Only GL2 supports fetching compressed images, GL: " + _gl);
+ }
+ GL2 gl = _gl.getGL2();
+
+ texture.bind();
+ int internalFormat = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2.GL_TEXTURE_INTERNAL_FORMAT);
+ int width = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2.GL_TEXTURE_WIDTH);
+ int height = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2.GL_TEXTURE_HEIGHT);
+ int border = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2.GL_TEXTURE_BORDER);
+ TextureData data = null;
+ if (internalFormat == GL.GL_COMPRESSED_RGB_S3TC_DXT1_EXT ||
+ internalFormat == GL.GL_COMPRESSED_RGBA_S3TC_DXT1_EXT ||
+ internalFormat == GL.GL_COMPRESSED_RGBA_S3TC_DXT3_EXT ||
+ internalFormat == GL.GL_COMPRESSED_RGBA_S3TC_DXT5_EXT) {
+ // Fetch using glGetCompressedTexImage
+ int size = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2.GL_TEXTURE_COMPRESSED_IMAGE_SIZE);
+ ByteBuffer res = ByteBuffer.wrap(new byte[size]);
+ gl.glGetCompressedTexImage(GL.GL_TEXTURE_2D, 0, res);
+ data = new TextureData(gl.getGLProfile(), internalFormat, width, height, border, internalFormat, GL.GL_UNSIGNED_BYTE,
+ false, true, true, res, null);
+ } else {
+ int bytesPerPixel = 0;
+ int fetchedFormat = 0;
+ switch (internalFormat) {
+ case GL.GL_RGB:
+ case GL2.GL_BGR:
+ case GL.GL_RGB8:
+ bytesPerPixel = 3;
+ fetchedFormat = GL.GL_RGB;
+ break;
+ case GL.GL_RGBA:
+ case GL2.GL_BGRA:
+ case GL2.GL_ABGR_EXT:
+ case GL.GL_RGBA8:
+ bytesPerPixel = 4;
+ fetchedFormat = GL.GL_RGBA;
+ break;
+ default:
+ throw new IOException("Unsupported texture internal format 0x" + Integer.toHexString(internalFormat));
+ }
+
+ // Fetch using glGetTexImage
+ int packAlignment = glGetInteger(GL.GL_PACK_ALIGNMENT);
+ int packRowLength = glGetInteger(GL2.GL_PACK_ROW_LENGTH);
+ int packSkipRows = glGetInteger(GL2.GL_PACK_SKIP_ROWS);
+ int packSkipPixels = glGetInteger(GL2.GL_PACK_SKIP_PIXELS);
+ int packSwapBytes = glGetInteger(GL2.GL_PACK_SWAP_BYTES);
+
+ gl.glPixelStorei(GL.GL_PACK_ALIGNMENT, 1);
+ gl.glPixelStorei(GL2.GL_PACK_ROW_LENGTH, 0);
+ gl.glPixelStorei(GL2.GL_PACK_SKIP_ROWS, 0);
+ gl.glPixelStorei(GL2.GL_PACK_SKIP_PIXELS, 0);
+ gl.glPixelStorei(GL2.GL_PACK_SWAP_BYTES, 0);
+
+ ByteBuffer res = ByteBuffer.wrap(new byte[(width + (2 * border)) *
+ (height + (2 * border)) *
+ bytesPerPixel]);
+ if (DEBUG) {
+ System.out.println("Allocated buffer of size " + res.remaining() + " for fetched image (" +
+ ((fetchedFormat == GL.GL_RGB) ? "GL_RGB" : "GL_RGBA") + ")");
+ }
+ gl.glGetTexImage(GL.GL_TEXTURE_2D, 0, fetchedFormat, GL.GL_UNSIGNED_BYTE, res);
+
+ gl.glPixelStorei(GL.GL_PACK_ALIGNMENT, packAlignment);
+ gl.glPixelStorei(GL2.GL_PACK_ROW_LENGTH, packRowLength);
+ gl.glPixelStorei(GL2.GL_PACK_SKIP_ROWS, packSkipRows);
+ gl.glPixelStorei(GL2.GL_PACK_SKIP_PIXELS, packSkipPixels);
+ gl.glPixelStorei(GL2.GL_PACK_SWAP_BYTES, packSwapBytes);
+
+ data = new TextureData(gl.getGLProfile(), internalFormat, width, height, border, fetchedFormat, GL.GL_UNSIGNED_BYTE,
+ false, false, false, res, null);
+
+ if (DEBUG) {
+ System.out.println("data.getPixelFormat() = " +
+ ((data.getPixelFormat() == GL.GL_RGB) ? "GL_RGB" : "GL_RGBA"));
+ }
+ }
+
+ write(data, file);
+ }
+
+ public static void write(TextureData data, File file) throws IOException, GLException {
+ for (Iterator iter = textureWriters.iterator(); iter.hasNext(); ) {
+ TextureWriter writer = (TextureWriter) iter.next();
+ if (writer.write(file, data)) {
+ return;
+ }
+ }
+
+ throw new IOException("No suitable texture writer found for "+file.getAbsolutePath());
+ }
+
+ //----------------------------------------------------------------------
+ // SPI support
+ //
+
+ /** Adds a TextureProvider to support reading of a new file
+ format. */
+ public static void addTextureProvider(TextureProvider provider) {
+ // Must always add at the front so the ImageIO provider is last,
+ // so we don't accidentally use it instead of a user's possibly
+ // more optimal provider
+ textureProviders.add(0, provider);
+ }
+
+ /** Adds a TextureWriter to support writing of a new file
+ format. */
+ public static void addTextureWriter(TextureWriter writer) {
+ // Must always add at the front so the ImageIO writer is last,
+ // so we don't accidentally use it instead of a user's possibly
+ // more optimal writer
+ textureWriters.add(0, writer);
+ }
+
+ //---------------------------------------------------------------------------
+ // Global disabling of texture rectangle extension
+ //
+
+ /** Toggles the use of the GL_ARB_texture_rectangle extension by the
+ TextureIO classes. By default, on hardware supporting this
+ extension, the TextureIO classes may use the
+ GL_ARB_texture_rectangle extension for non-power-of-two
+ textures. (If the hardware supports the
+ GL_ARB_texture_non_power_of_two extension, that one is
+ preferred.) In some situations, for example when writing
+ shaders, it is advantageous to force the texture target to
+ always be GL_TEXTURE_2D in order to have one version of the
+ shader, even at the expense of texture memory in the case where
+ NPOT textures are not supported. This method allows the use of
+ the GL_ARB_texture_rectangle extension to be turned off globally
+ for this purpose. The default is that the use of the extension
+ is enabled. */
+ public static void setTexRectEnabled(boolean enabled) {
+ texRectEnabled = enabled;
+ }
+
+ /** Indicates whether the GL_ARB_texture_rectangle extension is
+ allowed to be used for non-power-of-two textures; see {@link
+ #setTexRectEnabled setTexRectEnabled}. */
+ public static boolean isTexRectEnabled() {
+ return texRectEnabled;
+ }
+
+ //----------------------------------------------------------------------
+ // Internals only below this point
+ //
+
+ private static List/* Provides input and output facilities for both loading OpenGL
+ textures from disk and streams as well as writing textures already
+ in memory back to disk. The TextureIO class supports an arbitrary number of plug-in
+ readers and writers via TextureProviders and TextureWriters.
+ TextureProviders know how to produce TextureData objects from
+ files, InputStreams and URLs. TextureWriters know how to write
+ TextureData objects to disk in various file formats. The
+ TextureData class represents the raw data of the texture before it
+ has been converted to an OpenGL texture object. The Texture class
+ represents the OpenGL texture object and provides easy facilities
+ for using the texture. There are several built-in TextureProviders and TextureWriters
+ supplied with the TextureIO implementation. The most basic
+ provider uses the platform's Image I/O facilities to read in a
+ BufferedImage and convert it to a texture. This is the baseline
+ provider and is registered so that it is the last one consulted.
+ All others are asked first to open a given file. There are three other providers registered by default as of
+ the time of this writing. One handles SGI RGB (".sgi", ".rgb")
+ images from both files and streams. One handles DirectDraw Surface
+ (".dds") images read from files, though can not read these images
+ from streams. One handles Targa (".tga") images read from both
+ files and streams. These providers are executed in an arbitrary
+ order. Some of these providers require the file's suffix to either
+ be specified via the newTextureData methods or for the file to be
+ named with the appropriate suffix. In general a file suffix should
+ be provided to the newTexture and newTextureData methods if at all
+ possible. Note that additional TextureProviders, if reading images from
+ InputStreams, must use the mark()/reset() methods on InputStream
+ when probing for e.g. magic numbers at the head of the file to
+ make sure not to disturb the state of the InputStream for
+ downstream TextureProviders. There are analogous TextureWriters provided for writing
+ textures back to disk if desired. As of this writing, there are
+ four TextureWriters registered by default: one for Targa files,
+ one for SGI RGB files, one for DirectDraw surface (.dds) files,
+ and one for ImageIO-supplied formats such as .jpg and .png. Some
+ of these writers have certain limitations such as only being able
+ to write out textures stored in GL_RGB or GL_RGBA format. The DDS
+ writer supports fetching and writing to disk of texture data in
+ DXTn compressed format. Whether this will occur is dependent on
+ whether the texture's internal format is one of the DXTn
+ compressed formats and whether the target file is .dds format.
+*/
+
+public class TextureIO {
+ /** Constant which can be used as a file suffix to indicate a
+ DirectDraw Surface file. */
+ public static final String DDS = "dds";
+
+ /** Constant which can be used as a file suffix to indicate an SGI
+ RGB file. */
+ public static final String SGI = "sgi";
+
+ /** Constant which can be used as a file suffix to indicate an SGI
+ RGB file. */
+ public static final String SGI_RGB = "rgb";
+
+ /** Constant which can be used as a file suffix to indicate a GIF
+ file. */
+ public static final String GIF = "gif";
+
+ /** Constant which can be used as a file suffix to indicate a JPEG
+ file. */
+ public static final String JPG = "jpg";
+
+ /** Constant which can be used as a file suffix to indicate a PNG
+ file. */
+ public static final String PNG = "png";
+
+ /** Constant which can be used as a file suffix to indicate a Targa
+ file. */
+ public static final String TGA = "tga";
+
+ /** Constant which can be used as a file suffix to indicate a TIFF
+ file. */
+ public static final String TIFF = "tiff";
+
+ private static final boolean DEBUG = Debug.debug("TextureIO");
+
+ // For manually disabling the use of the texture rectangle
+ // extensions so you know the texture target is GL_TEXTURE_2D; this
+ // is useful for shader writers (thanks to Chris Campbell for this
+ // observation)
+ private static boolean texRectEnabled = true;
+
+ //----------------------------------------------------------------------
+ // methods that *do not* require a current context
+ // These methods assume RGB or RGBA textures.
+ // Some texture providers may not recognize the file format unless
+ // the fileSuffix is specified, so it is strongly recommended to
+ // specify it wherever it is known.
+ // Some texture providers may also only support one kind of input,
+ // i.e., reading from a file as opposed to a stream.
+
+ /**
+ * Creates a TextureData from the given file. Does no OpenGL work.
+ *
+ * @param glp the OpenGL Profile this texture data should be
+ * created for.
+ * @param file the file from which to read the texture data
+ * @param mipmap whether mipmaps should be produced for this
+ * texture either by autogenerating them or
+ * reading them from the file. Some file formats
+ * support multiple mipmaps in a single file in
+ * which case those mipmaps will be used rather
+ * than generating them.
+ * @param fileSuffix the suffix of the file name to be used as a
+ * hint of the file format to the underlying
+ * texture provider, or null if none and should be
+ * auto-detected (some texture providers do not
+ * support this)
+ * @return the texture data from the file, or null if none of the
+ * registered texture providers could read the file
+ * @throws IOException if an error occurred while reading the file
+ */
+ public static TextureData newTextureData(GLProfile glp, File file,
+ boolean mipmap,
+ String fileSuffix) throws IOException {
+ if (fileSuffix == null) {
+ fileSuffix = FileUtil.getFileSuffix(file);
+ }
+ return newTextureDataImpl(glp, file, 0, 0, mipmap, fileSuffix);
+ }
+
+ /**
+ * Creates a TextureData from the given stream. Does no OpenGL work.
+ *
+ * @param glp the OpenGL Profile this texture data should be
+ * created for.
+ * @param stream the stream from which to read the texture data
+ * @param mipmap whether mipmaps should be produced for this
+ * texture either by autogenerating them or
+ * reading them from the file. Some file formats
+ * support multiple mipmaps in a single file in
+ * which case those mipmaps will be used rather
+ * than generating them.
+ * @param fileSuffix the suffix of the file name to be used as a
+ * hint of the file format to the underlying
+ * texture provider, or null if none and should be
+ * auto-detected (some texture providers do not
+ * support this)
+ * @return the texture data from the stream, or null if none of the
+ * registered texture providers could read the stream
+ * @throws IOException if an error occurred while reading the stream
+ */
+ public static TextureData newTextureData(GLProfile glp, InputStream stream,
+ boolean mipmap,
+ String fileSuffix) throws IOException {
+ return newTextureDataImpl(glp, stream, 0, 0, mipmap, fileSuffix);
+ }
+
+ /**
+ * Creates a TextureData from the given URL. Does no OpenGL work.
+ *
+ * @param glp the OpenGL Profile this texture data should be
+ * created for.
+ * @param url the URL from which to read the texture data
+ * @param mipmap whether mipmaps should be produced for this
+ * texture either by autogenerating them or
+ * reading them from the file. Some file formats
+ * support multiple mipmaps in a single file in
+ * which case those mipmaps will be used rather
+ * than generating them.
+ * @param fileSuffix the suffix of the file name to be used as a
+ * hint of the file format to the underlying
+ * texture provider, or null if none and should be
+ * auto-detected (some texture providers do not
+ * support this)
+ * @return the texture data from the URL, or null if none of the
+ * registered texture providers could read the URL
+ * @throws IOException if an error occurred while reading the URL
+ */
+ public static TextureData newTextureData(GLProfile glp, URL url,
+ boolean mipmap,
+ String fileSuffix) throws IOException {
+ if (fileSuffix == null) {
+ fileSuffix = FileUtil.getFileSuffix(url.getPath());
+ }
+ return newTextureDataImpl(glp, url, 0, 0, mipmap, fileSuffix);
+ }
+
+ //----------------------------------------------------------------------
+ // These methods make no assumption about the OpenGL internal format
+ // or pixel format of the texture; they must be specified by the
+ // user. It is not allowed to supply 0 (indicating no preference)
+ // for either the internalFormat or the pixelFormat;
+ // IllegalArgumentException will be thrown in this case.
+
+ /**
+ * Creates a TextureData from the given file, using the specified
+ * OpenGL internal format and pixel format for the texture which
+ * will eventually result. The internalFormat and pixelFormat must
+ * be specified and may not be zero; to use default values, use the
+ * variant of this method which does not take these arguments. Does
+ * no OpenGL work.
+ *
+ * @param glp the OpenGL Profile this texture data should be
+ * created for.
+ * @param file the file from which to read the texture data
+ * @param internalFormat the OpenGL internal format of the texture
+ * which will eventually result from the TextureData
+ * @param pixelFormat the OpenGL pixel format of the texture
+ * which will eventually result from the TextureData
+ * @param mipmap whether mipmaps should be produced for this
+ * texture either by autogenerating them or
+ * reading them from the file. Some file formats
+ * support multiple mipmaps in a single file in
+ * which case those mipmaps will be used rather
+ * than generating them.
+ * @param fileSuffix the suffix of the file name to be used as a
+ * hint of the file format to the underlying
+ * texture provider, or null if none and should be
+ * auto-detected (some texture providers do not
+ * support this)
+ * @return the texture data from the file, or null if none of the
+ * registered texture providers could read the file
+ * @throws IllegalArgumentException if either internalFormat or
+ * pixelFormat was 0
+ * @throws IOException if an error occurred while reading the file
+ */
+ public static TextureData newTextureData(GLProfile glp, File file,
+ int internalFormat,
+ int pixelFormat,
+ boolean mipmap,
+ String fileSuffix) throws IOException, IllegalArgumentException {
+ if ((internalFormat == 0) || (pixelFormat == 0)) {
+ throw new IllegalArgumentException("internalFormat and pixelFormat must be non-zero");
+ }
+
+ if (fileSuffix == null) {
+ fileSuffix = FileUtil.getFileSuffix(file);
+ }
+
+ return newTextureDataImpl(glp, file, internalFormat, pixelFormat, mipmap, fileSuffix);
+ }
+
+ /**
+ * Creates a TextureData from the given stream, using the specified
+ * OpenGL internal format and pixel format for the texture which
+ * will eventually result. The internalFormat and pixelFormat must
+ * be specified and may not be zero; to use default values, use the
+ * variant of this method which does not take these arguments. Does
+ * no OpenGL work.
+ *
+ * @param glp the OpenGL Profile this texture data should be
+ * created for.
+ * @param stream the stream from which to read the texture data
+ * @param internalFormat the OpenGL internal format of the texture
+ * which will eventually result from the TextureData
+ * @param pixelFormat the OpenGL pixel format of the texture
+ * which will eventually result from the TextureData
+ * @param mipmap whether mipmaps should be produced for this
+ * texture either by autogenerating them or
+ * reading them from the file. Some file formats
+ * support multiple mipmaps in a single file in
+ * which case those mipmaps will be used rather
+ * than generating them.
+ * @param fileSuffix the suffix of the file name to be used as a
+ * hint of the file format to the underlying
+ * texture provider, or null if none and should be
+ * auto-detected (some texture providers do not
+ * support this)
+ * @return the texture data from the stream, or null if none of the
+ * registered texture providers could read the stream
+ * @throws IllegalArgumentException if either internalFormat or
+ * pixelFormat was 0
+ * @throws IOException if an error occurred while reading the stream
+ */
+ public static TextureData newTextureData(GLProfile glp, InputStream stream,
+ int internalFormat,
+ int pixelFormat,
+ boolean mipmap,
+ String fileSuffix) throws IOException, IllegalArgumentException {
+ if ((internalFormat == 0) || (pixelFormat == 0)) {
+ throw new IllegalArgumentException("internalFormat and pixelFormat must be non-zero");
+ }
+
+ return newTextureDataImpl(glp, stream, internalFormat, pixelFormat, mipmap, fileSuffix);
+ }
+
+ /**
+ * Creates a TextureData from the given URL, using the specified
+ * OpenGL internal format and pixel format for the texture which
+ * will eventually result. The internalFormat and pixelFormat must
+ * be specified and may not be zero; to use default values, use the
+ * variant of this method which does not take these arguments. Does
+ * no OpenGL work.
+ *
+ * @param glp the OpenGL Profile this texture data should be
+ * created for.
+ * @param url the URL from which to read the texture data
+ * @param internalFormat the OpenGL internal format of the texture
+ * which will eventually result from the TextureData
+ * @param pixelFormat the OpenGL pixel format of the texture
+ * which will eventually result from the TextureData
+ * @param mipmap whether mipmaps should be produced for this
+ * texture either by autogenerating them or
+ * reading them from the file. Some file formats
+ * support multiple mipmaps in a single file in
+ * which case those mipmaps will be used rather
+ * than generating them.
+ * @param fileSuffix the suffix of the file name to be used as a
+ * hint of the file format to the underlying
+ * texture provider, or null if none and should be
+ * auto-detected (some texture providers do not
+ * support this)
+ * @return the texture data from the URL, or null if none of the
+ * registered texture providers could read the URL
+ * @throws IllegalArgumentException if either internalFormat or
+ * pixelFormat was 0
+ * @throws IOException if an error occurred while reading the URL
+ */
+ public static TextureData newTextureData(GLProfile glp, URL url,
+ int internalFormat,
+ int pixelFormat,
+ boolean mipmap,
+ String fileSuffix) throws IOException, IllegalArgumentException {
+ if ((internalFormat == 0) || (pixelFormat == 0)) {
+ throw new IllegalArgumentException("internalFormat and pixelFormat must be non-zero");
+ }
+
+ if (fileSuffix == null) {
+ fileSuffix = FileUtil.getFileSuffix(url.getPath());
+ }
+
+ return newTextureDataImpl(glp, url, internalFormat, pixelFormat, mipmap, fileSuffix);
+ }
+
+ //----------------------------------------------------------------------
+ // methods that *do* require a current context
+ //
+
+ /**
+ * Creates an OpenGL texture object from the specified TextureData
+ * using the current OpenGL context.
+ *
+ * @param data the texture data to turn into an OpenGL texture
+ * @throws GLException if no OpenGL context is current or if an
+ * OpenGL error occurred
+ * @throws IllegalArgumentException if the passed TextureData was null
+ */
+ public static Texture newTexture(TextureData data) throws GLException, IllegalArgumentException {
+ if (data == null) {
+ throw new IllegalArgumentException("Null TextureData");
+ }
+ return new Texture(data);
+ }
+
+ /**
+ * Creates an OpenGL texture object from the specified file using
+ * the current OpenGL context.
+ *
+ * @param file the file from which to read the texture data
+ * @param mipmap whether mipmaps should be produced for this
+ * texture either by autogenerating them or
+ * reading them from the file. Some file formats
+ * support multiple mipmaps in a single file in
+ * which case those mipmaps will be used rather
+ * than generating them.
+ * @throws IOException if an error occurred while reading the file
+ * @throws GLException if no OpenGL context is current or if an
+ * OpenGL error occurred
+ */
+ public static Texture newTexture(File file, boolean mipmap) throws IOException, GLException {
+ GLProfile glp = GLContext.getCurrentGL().getGLProfile();
+ TextureData data = newTextureData(glp, file, mipmap, FileUtil.getFileSuffix(file));
+ Texture texture = newTexture(data);
+ data.flush();
+ return texture;
+ }
+
+ /**
+ * Creates an OpenGL texture object from the specified stream using
+ * the current OpenGL context.
+ *
+ * @param stream the stream from which to read the texture data
+ * @param mipmap whether mipmaps should be produced for this
+ * texture either by autogenerating them or
+ * reading them from the file. Some file formats
+ * support multiple mipmaps in a single file in
+ * which case those mipmaps will be used rather
+ * than generating them.
+ * @param fileSuffix the suffix of the file name to be used as a
+ * hint of the file format to the underlying
+ * texture provider, or null if none and should be
+ * auto-detected (some texture providers do not
+ * support this)
+ * @throws IOException if an error occurred while reading the stream
+ * @throws GLException if no OpenGL context is current or if an
+ * OpenGL error occurred
+ */
+ public static Texture newTexture(InputStream stream, boolean mipmap, String fileSuffix) throws IOException, GLException {
+ GLProfile glp = GLContext.getCurrentGL().getGLProfile();
+ TextureData data = newTextureData(glp, stream, mipmap, fileSuffix);
+ Texture texture = newTexture(data);
+ data.flush();
+ return texture;
+ }
+
+ /**
+ * Creates an OpenGL texture object from the specified URL using the
+ * current OpenGL context.
+ *
+ * @param url the URL from which to read the texture data
+ * @param mipmap whether mipmaps should be produced for this
+ * texture either by autogenerating them or
+ * reading them from the file. Some file formats
+ * support multiple mipmaps in a single file in
+ * which case those mipmaps will be used rather
+ * than generating them.
+ * @param fileSuffix the suffix of the file name to be used as a
+ * hint of the file format to the underlying
+ * texture provider, or null if none and should be
+ * auto-detected (some texture providers do not
+ * support this)
+ * @throws IOException if an error occurred while reading the URL
+ * @throws GLException if no OpenGL context is current or if an
+ * OpenGL error occurred
+ */
+ public static Texture newTexture(URL url, boolean mipmap, String fileSuffix) throws IOException, GLException {
+ if (fileSuffix == null) {
+ fileSuffix = FileUtil.getFileSuffix(url.getPath());
+ }
+ GLProfile glp = GLContext.getCurrentGL().getGLProfile();
+ TextureData data = newTextureData(glp, url, mipmap, fileSuffix);
+ Texture texture = newTexture(data);
+ data.flush();
+ return texture;
+ }
+
+ /**
+ * Creates an OpenGL texture object associated with the given OpenGL
+ * texture target using the current OpenGL context. The texture has
+ * no initial data. This is used, for example, to construct cube
+ * maps out of multiple TextureData objects.
+ *
+ * @param target the OpenGL target type, eg GL.GL_TEXTURE_2D,
+ * GL.GL_TEXTURE_RECTANGLE_ARB
+ *
+ * @throws GLException if no OpenGL context is current or if an
+ * OpenGL error occurred
+ */
+ public static Texture newTexture(int target) throws GLException {
+ return new Texture(target);
+ }
+
+ /**
+ * Wraps an OpenGL texture ID from an external library and allows
+ * some of the base methods from the Texture class, such as
+ * binding and querying of texture coordinates, to be used with
+ * it. Attempts to update such textures' contents will yield
+ * undefined results.
+ *
+ * @param textureID the OpenGL texture object to wrap
+ * @param target the OpenGL texture target, eg GL.GL_TEXTURE_2D,
+ * GL2.GL_TEXTURE_RECTANGLE
+ * @param texWidth the width of the texture in pixels
+ * @param texHeight the height of the texture in pixels
+ * @param imgWidth the width of the image within the texture in
+ * pixels (if the content is a sub-rectangle in the upper
+ * left corner); otherwise, pass in texWidth
+ * @param imgHeight the height of the image within the texture in
+ * pixels (if the content is a sub-rectangle in the upper
+ * left corner); otherwise, pass in texHeight
+ * @param mustFlipVertically indicates whether the texture
+ * coordinates must be flipped vertically
+ * in order to properly display the
+ * texture
+ */
+ public static Texture newTexture(int textureID,
+ int target,
+ int texWidth,
+ int texHeight,
+ int imgWidth,
+ int imgHeight,
+ boolean mustFlipVertically) {
+ return new Texture(textureID,
+ target,
+ texWidth,
+ texHeight,
+ imgWidth,
+ imgHeight,
+ mustFlipVertically);
+ }
+
+ /**
+ * Writes the given texture to a file. The type of the file is
+ * inferred from its suffix. An OpenGL context must be current in
+ * order to fetch the texture data back from the OpenGL pipeline.
+ * This method causes the specified Texture to be bound to the
+ * GL_TEXTURE_2D state. If no suitable writer for the requested file
+ * format was found, throws an IOException.
+ *
+ * Reasonable attempts are made to produce good results in the
+ * resulting images. The Targa, SGI and ImageIO writers produce
+ * results in the correct vertical orientation for those file
+ * formats. The DDS writer performs no vertical flip of the data,
+ * even in uncompressed mode. (It is impossible to perform such a
+ * vertical flip with compressed data.) Applications should keep
+ * this in mind when using this routine to save textures to disk for
+ * later re-loading.
+ *
+ * Any mipmaps for the specified texture are currently discarded
+ * when it is written to disk, regardless of whether the underlying
+ * file format supports multiple mipmaps in a given file.
+ *
+ * @throws IOException if an error occurred during writing or no
+ * suitable writer was found
+ * @throws GLException if no OpenGL context was current or an
+ * OpenGL-related error occurred
+ */
+ public static void write(Texture texture, File file) throws IOException, GLException {
+ if (texture.getTarget() != GL.GL_TEXTURE_2D) {
+ throw new GLException("Only GL_TEXTURE_2D textures are supported");
+ }
+
+ // First fetch the texture data
+ GL _gl = GLContext.getCurrentGL();
+ if (!_gl.isGL2()) {
+ throw new GLException("Only GL2 supports fetching compressed images, GL: " + _gl);
+ }
+ GL2 gl = _gl.getGL2();
+
+ texture.bind();
+ int internalFormat = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2.GL_TEXTURE_INTERNAL_FORMAT);
+ int width = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2.GL_TEXTURE_WIDTH);
+ int height = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2.GL_TEXTURE_HEIGHT);
+ int border = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2.GL_TEXTURE_BORDER);
+ TextureData data = null;
+ if (internalFormat == GL.GL_COMPRESSED_RGB_S3TC_DXT1_EXT ||
+ internalFormat == GL.GL_COMPRESSED_RGBA_S3TC_DXT1_EXT ||
+ internalFormat == GL.GL_COMPRESSED_RGBA_S3TC_DXT3_EXT ||
+ internalFormat == GL.GL_COMPRESSED_RGBA_S3TC_DXT5_EXT) {
+ // Fetch using glGetCompressedTexImage
+ int size = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2.GL_TEXTURE_COMPRESSED_IMAGE_SIZE);
+ ByteBuffer res = ByteBuffer.allocate(size);
+ gl.glGetCompressedTexImage(GL.GL_TEXTURE_2D, 0, res);
+ data = new TextureData(gl.getGLProfile(), internalFormat, width, height, border, internalFormat, GL.GL_UNSIGNED_BYTE,
+ false, true, true, res, null);
+ } else {
+ int bytesPerPixel = 0;
+ int fetchedFormat = 0;
+ switch (internalFormat) {
+ case GL.GL_RGB:
+ case GL2.GL_BGR:
+ case GL.GL_RGB8:
+ bytesPerPixel = 3;
+ fetchedFormat = GL.GL_RGB;
+ break;
+ case GL.GL_RGBA:
+ case GL2.GL_BGRA:
+ case GL2.GL_ABGR_EXT:
+ case GL.GL_RGBA8:
+ bytesPerPixel = 4;
+ fetchedFormat = GL.GL_RGBA;
+ break;
+ default:
+ throw new IOException("Unsupported texture internal format 0x" + Integer.toHexString(internalFormat));
+ }
+
+ // Fetch using glGetTexImage
+ int packAlignment = glGetInteger(GL.GL_PACK_ALIGNMENT);
+ int packRowLength = glGetInteger(GL2.GL_PACK_ROW_LENGTH);
+ int packSkipRows = glGetInteger(GL2.GL_PACK_SKIP_ROWS);
+ int packSkipPixels = glGetInteger(GL2.GL_PACK_SKIP_PIXELS);
+ int packSwapBytes = glGetInteger(GL2.GL_PACK_SWAP_BYTES);
+
+ gl.glPixelStorei(GL.GL_PACK_ALIGNMENT, 1);
+ gl.glPixelStorei(GL2.GL_PACK_ROW_LENGTH, 0);
+ gl.glPixelStorei(GL2.GL_PACK_SKIP_ROWS, 0);
+ gl.glPixelStorei(GL2.GL_PACK_SKIP_PIXELS, 0);
+ gl.glPixelStorei(GL2.GL_PACK_SWAP_BYTES, 0);
+
+ ByteBuffer res = ByteBuffer.allocate((width + (2 * border)) *
+ (height + (2 * border)) *
+ bytesPerPixel);
+ if (DEBUG) {
+ System.out.println("Allocated buffer of size " + res.remaining() + " for fetched image (" +
+ ((fetchedFormat == GL.GL_RGB) ? "GL_RGB" : "GL_RGBA") + ")");
+ }
+ gl.glGetTexImage(GL.GL_TEXTURE_2D, 0, fetchedFormat, GL.GL_UNSIGNED_BYTE, res);
+
+ gl.glPixelStorei(GL.GL_PACK_ALIGNMENT, packAlignment);
+ gl.glPixelStorei(GL2.GL_PACK_ROW_LENGTH, packRowLength);
+ gl.glPixelStorei(GL2.GL_PACK_SKIP_ROWS, packSkipRows);
+ gl.glPixelStorei(GL2.GL_PACK_SKIP_PIXELS, packSkipPixels);
+ gl.glPixelStorei(GL2.GL_PACK_SWAP_BYTES, packSwapBytes);
+
+ data = new TextureData(gl.getGLProfile(), internalFormat, width, height, border, fetchedFormat, GL.GL_UNSIGNED_BYTE,
+ false, false, false, res, null);
+
+ if (DEBUG) {
+ System.out.println("data.getPixelFormat() = " +
+ ((data.getPixelFormat() == GL.GL_RGB) ? "GL_RGB" : "GL_RGBA"));
+ }
+ }
+
+ write(data, file);
+ }
+
+ public static void write(TextureData data, File file) throws IOException, GLException {
+ for (Iterator iter = textureWriters.iterator(); iter.hasNext(); ) {
+ TextureWriter writer = (TextureWriter) iter.next();
+ if (writer.write(file, data)) {
+ return;
+ }
+ }
+
+ throw new IOException("No suitable texture writer found for "+file.getAbsolutePath());
+ }
+
+ //----------------------------------------------------------------------
+ // SPI support
+ //
+
+ /** Adds a TextureProvider to support reading of a new file
+ format. */
+ public static void addTextureProvider(TextureProvider provider) {
+ // Must always add at the front so the ImageIO provider is last,
+ // so we don't accidentally use it instead of a user's possibly
+ // more optimal provider
+ textureProviders.add(0, provider);
+ }
+
+ /** Adds a TextureWriter to support writing of a new file
+ format. */
+ public static void addTextureWriter(TextureWriter writer) {
+ // Must always add at the front so the ImageIO writer is last,
+ // so we don't accidentally use it instead of a user's possibly
+ // more optimal writer
+ textureWriters.add(0, writer);
+ }
+
+ //---------------------------------------------------------------------------
+ // Global disabling of texture rectangle extension
+ //
+
+ /** Toggles the use of the GL_ARB_texture_rectangle extension by the
+ TextureIO classes. By default, on hardware supporting this
+ extension, the TextureIO classes may use the
+ GL_ARB_texture_rectangle extension for non-power-of-two
+ textures. (If the hardware supports the
+ GL_ARB_texture_non_power_of_two extension, that one is
+ preferred.) In some situations, for example when writing
+ shaders, it is advantageous to force the texture target to
+ always be GL_TEXTURE_2D in order to have one version of the
+ shader, even at the expense of texture memory in the case where
+ NPOT textures are not supported. This method allows the use of
+ the GL_ARB_texture_rectangle extension to be turned off globally
+ for this purpose. The default is that the use of the extension
+ is enabled. */
+ public static void setTexRectEnabled(boolean enabled) {
+ texRectEnabled = enabled;
+ }
+
+ /** Indicates whether the GL_ARB_texture_rectangle extension is
+ allowed to be used for non-power-of-two textures; see {@link
+ #setTexRectEnabled setTexRectEnabled}. */
+ public static boolean isTexRectEnabled() {
+ return texRectEnabled;
+ }
+
+ //----------------------------------------------------------------------
+ // Internals only below this point
+ //
+
+ private static List/*
+ *
+ * This is the sister class of the DataInputStream which allows
+ * for reading of java native datatypes from an input stream with
+ * the datatypes stored in big endian byte order.
+ *
+ * This class implements the minimum required and calls DataInputStream
+ * for some of the required methods for DataInput.
+ *
+ * Not all methods are implemented due to lack of immediatte requirement
+ * for that functionality. It is not clear if it is ever going to be
+ * functionally required to be able to read UTF data in a LittleEndianManner
+ *
+ * @author Robin Luiten
+ * @version 1.1 15/Dec/1997
+ */
+public class LEDataInputStream extends FilterInputStream implements DataInput
+{
+ /**
+ * To reuse some of the non endian dependent methods from
+ * DataInputStreams methods.
+ */
+ DataInputStream dataIn;
+
+ public LEDataInputStream(InputStream in)
+ {
+ super(in);
+ dataIn = new DataInputStream(in);
+ }
+
+ public void close() throws IOException
+ {
+ dataIn.close(); // better close as we create it.
+ // this will close underlying as well.
+ }
+
+ public synchronized final int read(byte b[]) throws IOException
+ {
+ return dataIn.read(b, 0, b.length);
+ }
+
+ public synchronized final int read(byte b[], int off, int len) throws IOException
+ {
+ int rl = dataIn.read(b, off, len);
+ return rl;
+ }
+
+ public final void readFully(byte b[]) throws IOException
+ {
+ dataIn.readFully(b, 0, b.length);
+ }
+
+ public final void readFully(byte b[], int off, int len) throws IOException
+ {
+ dataIn.readFully(b, off, len);
+ }
+
+ public final int skipBytes(int n) throws IOException
+ {
+ return dataIn.skipBytes(n);
+ }
+
+ public final boolean readBoolean() throws IOException
+ {
+ int ch = dataIn.read();
+ if (ch < 0)
+ throw new EOFException();
+ return (ch != 0);
+ }
+
+ public final byte readByte() throws IOException
+ {
+ int ch = dataIn.read();
+ if (ch < 0)
+ throw new EOFException();
+ return (byte)(ch);
+ }
+
+ public final int readUnsignedByte() throws IOException
+ {
+ int ch = dataIn.read();
+ if (ch < 0)
+ throw new EOFException();
+ return ch;
+ }
+
+ public final short readShort() throws IOException
+ {
+ int ch1 = dataIn.read();
+ int ch2 = dataIn.read();
+ if ((ch1 | ch2) < 0)
+ throw new EOFException();
+ return (short)((ch1 << 0) + (ch2 << 8));
+ }
+
+ public final int readUnsignedShort() throws IOException
+ {
+ int ch1 = dataIn.read();
+ int ch2 = dataIn.read();
+ if ((ch1 | ch2) < 0)
+ throw new EOFException();
+ return (ch1 << 0) + (ch2 << 8);
+ }
+
+ public final char readChar() throws IOException
+ {
+ int ch1 = dataIn.read();
+ int ch2 = dataIn.read();
+ if ((ch1 | ch2) < 0)
+ throw new EOFException();
+ return (char)((ch1 << 0) + (ch2 << 8));
+ }
+
+ public final int readInt() throws IOException
+ {
+ int ch1 = dataIn.read();
+ int ch2 = dataIn.read();
+ int ch3 = dataIn.read();
+ int ch4 = dataIn.read();
+ if ((ch1 | ch2 | ch3 | ch4) < 0)
+ throw new EOFException();
+ return ((ch1 << 0) + (ch2 << 8) + (ch3 << 16) + (ch4 << 24));
+ }
+
+ public final long readLong() throws IOException
+ {
+ int i1 = readInt();
+ int i2 = readInt();
+ return ((long)(i1) & 0xFFFFFFFFL) + (i2 << 32);
+ }
+
+ public final float readFloat() throws IOException
+ {
+ return Float.intBitsToFloat(readInt());
+ }
+
+ public final double readDouble() throws IOException
+ {
+ return Double.longBitsToDouble(readLong());
+ }
+
+ /**
+ * dont call this it is not implemented.
+ * @return empty new string
+ **/
+ public final String readLine() throws IOException
+ {
+ return new String();
+ }
+
+ /**
+ * dont call this it is not implemented
+ * @return empty new string
+ **/
+ public final String readUTF() throws IOException
+ {
+ return new String();
+ }
+
+ /**
+ * dont call this it is not implemented
+ * @return empty new string
+ **/
+ public final static String readUTF(DataInput in) throws IOException
+ {
+ return new String();
+ }
+}
+
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/LEDataOutputStream.java b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/LEDataOutputStream.java
new file mode 100755
index 000000000..e1e1ca924
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/LEDataOutputStream.java
@@ -0,0 +1,165 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.util.texture.spi;
+
+import java.io.DataOutput;
+import java.io.DataOutputStream;
+import java.io.FilterOutputStream;
+import java.io.OutputStream;
+import java.io.IOException;
+
+/**
+ * Little Endian Data Output Stream.
+ *
+ * This class implements an output stream filter to allow writing
+ * of java native datatypes to an output stream which has those
+ * native datatypes stored in a little endian byte order.
+ *
+ * This is the sister class of the DataOutputStream which allows
+ * for writing of java native datatypes to an output stream with
+ * the datatypes stored in big endian byte order.
+ *
+ * This class implements the minimum required and calls DataOutputStream
+ * for some of the required methods for DataOutput.
+ *
+ * Not all methods are implemented due to lack of immediate requirement
+ * for that functionality. It is not clear if it is ever going to be
+ * functionally required to be able to read UTF data in a LittleEndianManner
+ *
+ */
+public class LEDataOutputStream extends FilterOutputStream implements DataOutput
+{
+ /**
+ * To reuse some of the non endian dependent methods from
+ * DataOutputStream's methods.
+ */
+ DataOutputStream dataOut;
+
+ public LEDataOutputStream(OutputStream out)
+ {
+ super(out);
+ dataOut = new DataOutputStream(out);
+ }
+
+ public void close() throws IOException
+ {
+ dataOut.close(); // better close as we create it.
+ // this will close underlying as well.
+ }
+
+ public synchronized final void write(byte b[]) throws IOException
+ {
+ dataOut.write(b, 0, b.length);
+ }
+
+ public synchronized final void write(byte b[], int off, int len) throws IOException
+ {
+ dataOut.write(b, off, len);
+ }
+
+ public final void write(int b) throws IOException
+ {
+ dataOut.write(b);
+ }
+
+ public final void writeBoolean(boolean v) throws IOException
+ {
+ dataOut.writeBoolean(v);
+ }
+
+ public final void writeByte(int v) throws IOException
+ {
+ dataOut.writeByte(v);
+ }
+
+ /** Don't call this -- not implemented */
+ public final void writeBytes(String s) throws IOException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public final void writeChar(int v) throws IOException
+ {
+ dataOut.writeChar(((v >> 8) & 0xff) |
+ ((v & 0xff) << 8));
+ }
+
+ /** Don't call this -- not implemented */
+ public final void writeChars(String s) throws IOException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public final void writeDouble(double v) throws IOException
+ {
+ writeLong(Double.doubleToRawLongBits(v));
+ }
+
+ public final void writeFloat(float v) throws IOException
+ {
+ writeInt(Float.floatToRawIntBits(v));
+ }
+
+ public final void writeInt(int v) throws IOException
+ {
+ dataOut.writeInt((v >>> 24) |
+ ((v >>> 8) & 0xff00) |
+ ((v << 8) & 0x00ff00) |
+ (v << 24));
+ }
+
+ public final void writeLong(long v) throws IOException
+ {
+ writeInt((int) v);
+ writeInt((int) (v >>> 32));
+ }
+
+ public final void writeShort(int v) throws IOException
+ {
+ dataOut.writeShort(((v >> 8) & 0xff) |
+ ((v & 0xff) << 8));
+ }
+
+ /** Don't call this -- not implemented */
+ public final void writeUTF(String s) throws IOException
+ {
+ throw new UnsupportedOperationException();
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/NetPbmTextureWriter.java b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/NetPbmTextureWriter.java
new file mode 100644
index 000000000..499dce7fb
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/NetPbmTextureWriter.java
@@ -0,0 +1,169 @@
+/*
+ * Copyright (c) 2005 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.util.texture.spi;
+
+import java.io.*;
+import java.net.*;
+import java.nio.*;
+
+import javax.media.opengl.*;
+import com.jogamp.opengl.util.*;
+import com.jogamp.opengl.util.texture.*;
+import com.jogamp.opengl.util.texture.spi.*;
+
+public class NetPbmTextureWriter implements TextureWriter {
+ int magic;
+
+ public NetPbmTextureWriter() {
+ this(0); // auto
+ }
+
+ /**
+ * supported magic values are: Reads and writes SGI RGB/RGBA images. Written from Paul
+ Bourke's adaptation of the SGI
+ specification.
+ *
+ * Image decoder for image data stored in TGA file format.
+ * Currently only the original TGA file format is supported. This is
+ * because the new TGA format has data at the end of the file, getting
+ * to the end of a file in an InputStream orient environment presents
+ * several difficulties which are avoided at the moment.
+ *
+ *
+ *
+ * This is a simple decoder and is only setup to load a single image
+ * from the input stream
+ *
+ *
+ *
+ * @author Robin Luiten
+ * @author Kenneth Russell
+ * @version $Revision: 1768 $
+ */
+
+public class TGAImage {
+ private Header header;
+ private int format;
+ private int bpp;
+ private ByteBuffer data;
+
+ private TGAImage(Header header) {
+ this.header = header;
+ }
+
+ /**
+ * This class reads in all of the TGA image header in addition it also
+ * reads in the imageID field as it is convenient to handle that here.
+ *
+ * @author Robin Luiten
+ * @version 1.1
+ */
+ public static class Header {
+ /** Set of possible file format TGA types */
+ public final static int TYPE_NEW = 0;
+ public final static int TYPE_OLD = 1;
+ public final static int TYPE_UNK = 2; // cant rewind stream so unknown for now.
+
+ /** Set of possible image types in TGA file */
+ public final static int NO_IMAGE = 0; // no image data
+ public final static int UCOLORMAPPED = 1; // uncompressed color mapped image
+ public final static int UTRUECOLOR = 2; // uncompressed true color image
+ public final static int UBLACKWHITE = 3; // uncompressed black and white image
+ public final static int COLORMAPPED = 9; // compressed color mapped image
+ public final static int TRUECOLOR = 10; // compressed true color image
+ public final static int BLACKWHITE = 11; // compressed black and white image
+
+ /** Field image descriptor bitfield values definitions */
+ public final static int ID_ATTRIBPERPIXEL = 0xF;
+ public final static int ID_RIGHTTOLEFT = 0x10;
+ public final static int ID_TOPTOBOTTOM = 0x20;
+ public final static int ID_INTERLEAVE = 0xC0;
+
+ /** Field image descriptor / interleave values */
+ public final static int I_NOTINTERLEAVED = 0;
+ public final static int I_TWOWAY = 1;
+ public final static int I_FOURWAY = 2;
+
+ /** Type of this TGA file format */
+ private int tgaType;
+
+ /** initial TGA image data fields */
+ private int idLength; // byte value
+ private int colorMapType; // byte value
+ private int imageType; // byte value
+
+ /** TGA image colour map fields */
+ private int firstEntryIndex;
+ private int colorMapLength;
+ private byte colorMapEntrySize;
+
+ /** TGA image specification fields */
+ private int xOrigin;
+ private int yOrigin;
+ private int width;
+ private int height;
+ private byte pixelDepth;
+ private byte imageDescriptor;
+
+ private byte[] imageIDbuf;
+ private String imageID;
+
+ // For construction from user data
+ Header() {
+ tgaType = TYPE_OLD; // dont try and get footer.
+ }
+
+ Header(LEDataInputStream in) throws IOException {
+ int ret;
+
+ tgaType = TYPE_OLD; // dont try and get footer.
+
+ // initial header fields
+ idLength = in.readUnsignedByte();
+ colorMapType = in.readUnsignedByte();
+ imageType = in.readUnsignedByte();
+
+ // color map header fields
+ firstEntryIndex = in.readUnsignedShort();
+ colorMapLength = in.readUnsignedShort();
+ colorMapEntrySize = in.readByte();
+
+ // TGA image specification fields
+ xOrigin = in.readUnsignedShort();
+ yOrigin = in.readUnsignedShort();
+ width = in.readUnsignedShort();
+ height = in.readUnsignedShort();
+ pixelDepth = in.readByte();
+ imageDescriptor = in.readByte();
+
+ if (idLength > 0) {
+ imageIDbuf = new byte[idLength];
+ in.read(imageIDbuf, 0, idLength);
+ imageID = new String(imageIDbuf, "US-ASCII");
+ }
+ }
+
+ public int tgaType() { return tgaType; }
+
+ /** initial TGA image data fields */
+ public int idLength() { return idLength; }
+ public int colorMapType() { return colorMapType; }
+ public int imageType() { return imageType; }
+
+ /** TGA image colour map fields */
+ public int firstEntryIndex() { return firstEntryIndex; }
+ public int colorMapLength() { return colorMapLength; }
+ public byte colorMapEntrySize() { return colorMapEntrySize; }
+
+ /** TGA image specification fields */
+ public int xOrigin() { return xOrigin; }
+ public int yOrigin() { return yOrigin; }
+ public int width() { return width; }
+ public int height() { return height; }
+ public byte pixelDepth() { return pixelDepth; }
+ public byte imageDescriptor() { return imageDescriptor; }
+
+ /** bitfields in imageDescriptor */
+ public byte attribPerPixel() { return (byte)(imageDescriptor & ID_ATTRIBPERPIXEL); }
+ public boolean rightToLeft() { return ((imageDescriptor & ID_RIGHTTOLEFT) != 0); }
+ public boolean topToBottom() { return ((imageDescriptor & ID_TOPTOBOTTOM) != 0); }
+ public byte interleave() { return (byte)((imageDescriptor & ID_INTERLEAVE) >> 6); }
+
+ public byte[] imageIDbuf() { return imageIDbuf; }
+ public String imageID() { return imageID; }
+
+ public String toString() {
+ return "TGA Header " +
+ " id length: " + idLength +
+ " color map type: "+ colorMapType +
+ " image type: "+ imageType +
+ " first entry index: " + firstEntryIndex +
+ " color map length: " + colorMapLength +
+ " color map entry size: " + colorMapEntrySize +
+ " x Origin: " + xOrigin +
+ " y Origin: " + yOrigin +
+ " width: "+ width +
+ " height: "+ height +
+ " pixel depth: "+ pixelDepth +
+ " image descriptor: "+ imageDescriptor +
+ (imageIDbuf == null ? "" : (" ID String: " + imageID));
+ }
+
+ public int size() { return 18 + idLength; }
+
+ private void write(LEDataOutputStream output) throws IOException {
+ output.write(idLength);
+ output.write(colorMapType);
+ output.write(imageType);
+ output.writeShort(firstEntryIndex);
+ output.writeShort(colorMapLength);
+ output.write(colorMapEntrySize);
+ output.writeShort(xOrigin);
+ output.writeShort(yOrigin);
+ output.writeShort(width);
+ output.writeShort(height);
+ output.write(pixelDepth);
+ output.write(imageDescriptor);
+ if (idLength > 0) {
+ try {
+ byte[] chars = imageID.getBytes("US-ASCII");
+ output.write(chars);
+ } catch (UnsupportedEncodingException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Identifies the image type of the tga image data and loads
+ * it into the JimiImage structure. This was taken from the
+ * prototype and modified for the new Jimi structure
+ */
+ private void decodeImage(LEDataInputStream dIn) throws IOException {
+ switch (header.imageType()) {
+ case Header.UCOLORMAPPED:
+ throw new IOException("TGADecoder Uncompressed Colormapped images not supported");
+
+ case Header.UTRUECOLOR: // pixelDepth 15, 16, 24 and 32
+ switch (header.pixelDepth) {
+ case 16:
+ throw new IOException("TGADecoder Compressed 16-bit True Color images not supported");
+
+ case 24:
+ case 32:
+ decodeRGBImageU24_32(dIn);
+ break;
+ }
+ break;
+
+ case Header.UBLACKWHITE:
+ throw new IOException("TGADecoder Uncompressed Grayscale images not supported");
+
+ case Header.COLORMAPPED:
+ throw new IOException("TGADecoder Compressed Colormapped images not supported");
+
+ case Header.TRUECOLOR:
+ throw new IOException("TGADecoder Compressed True Color images not supported");
+
+ case Header.BLACKWHITE:
+ throw new IOException("TGADecoder Compressed Grayscale images not supported");
+ }
+ }
+
+ /**
+ * This assumes that the body is for a 24 bit or 32 bit for a
+ * RGB or ARGB image respectively.
+ */
+ private void decodeRGBImageU24_32(LEDataInputStream dIn) throws IOException {
+ int i; // row index
+ int j; // column index
+ int y; // output row index
+ int raw; // index through the raw input buffer
+ int rawWidth = header.width() * (header.pixelDepth() / 8);
+ byte[] rawBuf = new byte[rawWidth];
+ byte[] tmpData = new byte[rawWidth * header.height()];
+
+ for (i = 0; i < header.height(); ++i) {
+ dIn.readFully(rawBuf, 0, rawWidth);
+
+ if (header.topToBottom())
+ y = header.height - i - 1; // range 0 to (header.height - 1)
+ else
+ y = i;
+
+ System.arraycopy(rawBuf, 0, tmpData, y * rawWidth, rawBuf.length);
+ }
+
+ GL gl = GLContext.getCurrentGL();
+ if (header.pixelDepth() == 24) {
+ bpp=3;
+ if(gl.isGL2()) {
+ format = GL2.GL_BGR;
+ } else {
+ format = GL.GL_RGB;
+ swapBGR(tmpData, rawWidth, header.height(), bpp);
+ }
+ } else {
+ assert header.pixelDepth() == 32;
+ bpp=4;
+
+ if(gl.isGL2()) {
+ format = GL2.GL_BGRA;
+ } else {
+ format = GL.GL_RGBA;
+ swapBGR(tmpData, rawWidth, header.height(), bpp);
+ }
+ }
+
+ data = ByteBuffer.wrap(tmpData);
+ }
+
+ private static void swapBGR(byte[] data, int bWidth, int height, int bpp) {
+ byte r,b;
+ int k;
+ for(int i=0; i
+ *
+ * Image decoder for image data stored in TGA file format.
+ * Currently only the original TGA file format is supported. This is
+ * because the new TGA format has data at the end of the file, getting
+ * to the end of a file in an InputStream orient environment presents
+ * several difficulties which are avoided at the moment.
+ *
+ *
+ *
+ * This is a simple decoder and is only setup to load a single image
+ * from the input stream
+ *
+ *
+ *
+ * @author Robin Luiten
+ * @author Kenneth Russell
+ * @version $Revision: 1768 $
+ */
+
+public class TGAImage {
+ private Header header;
+ private int format;
+ private int bpp;
+ private ByteBuffer data;
+
+ private TGAImage(Header header) {
+ this.header = header;
+ }
+
+ /**
+ * This class reads in all of the TGA image header in addition it also
+ * reads in the imageID field as it is convenient to handle that here.
+ *
+ * @author Robin Luiten
+ * @version 1.1
+ */
+ public static class Header {
+ /** Set of possible file format TGA types */
+ public final static int TYPE_NEW = 0;
+ public final static int TYPE_OLD = 1;
+ public final static int TYPE_UNK = 2; // cant rewind stream so unknown for now.
+
+ /** Set of possible image types in TGA file */
+ public final static int NO_IMAGE = 0; // no image data
+ public final static int UCOLORMAPPED = 1; // uncompressed color mapped image
+ public final static int UTRUECOLOR = 2; // uncompressed true color image
+ public final static int UBLACKWHITE = 3; // uncompressed black and white image
+ public final static int COLORMAPPED = 9; // compressed color mapped image
+ public final static int TRUECOLOR = 10; // compressed true color image
+ public final static int BLACKWHITE = 11; // compressed black and white image
+
+ /** Field image descriptor bitfield values definitions */
+ public final static int ID_ATTRIBPERPIXEL = 0xF;
+ public final static int ID_RIGHTTOLEFT = 0x10;
+ public final static int ID_TOPTOBOTTOM = 0x20;
+ public final static int ID_INTERLEAVE = 0xC0;
+
+ /** Field image descriptor / interleave values */
+ public final static int I_NOTINTERLEAVED = 0;
+ public final static int I_TWOWAY = 1;
+ public final static int I_FOURWAY = 2;
+
+ /** Type of this TGA file format */
+ private int tgaType;
+
+ /** initial TGA image data fields */
+ private int idLength; // byte value
+ private int colorMapType; // byte value
+ private int imageType; // byte value
+
+ /** TGA image colour map fields */
+ private int firstEntryIndex;
+ private int colorMapLength;
+ private byte colorMapEntrySize;
+
+ /** TGA image specification fields */
+ private int xOrigin;
+ private int yOrigin;
+ private int width;
+ private int height;
+ private byte pixelDepth;
+ private byte imageDescriptor;
+
+ private byte[] imageIDbuf;
+ private String imageID;
+
+ // For construction from user data
+ Header() {
+ tgaType = TYPE_OLD; // dont try and get footer.
+ }
+
+ Header(LEDataInputStream in) throws IOException {
+ int ret;
+
+ tgaType = TYPE_OLD; // dont try and get footer.
+
+ // initial header fields
+ idLength = in.readUnsignedByte();
+ colorMapType = in.readUnsignedByte();
+ imageType = in.readUnsignedByte();
+
+ // color map header fields
+ firstEntryIndex = in.readUnsignedShort();
+ colorMapLength = in.readUnsignedShort();
+ colorMapEntrySize = in.readByte();
+
+ // TGA image specification fields
+ xOrigin = in.readUnsignedShort();
+ yOrigin = in.readUnsignedShort();
+ width = in.readUnsignedShort();
+ height = in.readUnsignedShort();
+ pixelDepth = in.readByte();
+ imageDescriptor = in.readByte();
+
+ if (idLength > 0) {
+ imageIDbuf = new byte[idLength];
+ in.read(imageIDbuf, 0, idLength);
+ imageID = new String(imageIDbuf, "US-ASCII");
+ }
+ }
+
+ public int tgaType() { return tgaType; }
+
+ /** initial TGA image data fields */
+ public int idLength() { return idLength; }
+ public int colorMapType() { return colorMapType; }
+ public int imageType() { return imageType; }
+
+ /** TGA image colour map fields */
+ public int firstEntryIndex() { return firstEntryIndex; }
+ public int colorMapLength() { return colorMapLength; }
+ public byte colorMapEntrySize() { return colorMapEntrySize; }
+
+ /** TGA image specification fields */
+ public int xOrigin() { return xOrigin; }
+ public int yOrigin() { return yOrigin; }
+ public int width() { return width; }
+ public int height() { return height; }
+ public byte pixelDepth() { return pixelDepth; }
+ public byte imageDescriptor() { return imageDescriptor; }
+
+ /** bitfields in imageDescriptor */
+ public byte attribPerPixel() { return (byte)(imageDescriptor & ID_ATTRIBPERPIXEL); }
+ public boolean rightToLeft() { return ((imageDescriptor & ID_RIGHTTOLEFT) != 0); }
+ public boolean topToBottom() { return ((imageDescriptor & ID_TOPTOBOTTOM) != 0); }
+ public byte interleave() { return (byte)((imageDescriptor & ID_INTERLEAVE) >> 6); }
+
+ public byte[] imageIDbuf() { return imageIDbuf; }
+ public String imageID() { return imageID; }
+
+ public String toString() {
+ return "TGA Header " +
+ " id length: " + idLength +
+ " color map type: "+ colorMapType +
+ " image type: "+ imageType +
+ " first entry index: " + firstEntryIndex +
+ " color map length: " + colorMapLength +
+ " color map entry size: " + colorMapEntrySize +
+ " x Origin: " + xOrigin +
+ " y Origin: " + yOrigin +
+ " width: "+ width +
+ " height: "+ height +
+ " pixel depth: "+ pixelDepth +
+ " image descriptor: "+ imageDescriptor +
+ (imageIDbuf == null ? "" : (" ID String: " + imageID));
+ }
+
+ public int size() { return 18 + idLength; }
+
+ // buf must be in little-endian byte order
+ private void write(ByteBuffer buf) {
+ buf.put((byte) idLength);
+ buf.put((byte) colorMapType);
+ buf.put((byte) imageType);
+ buf.putShort((short) firstEntryIndex);
+ buf.putShort((short) colorMapLength);
+ buf.put((byte) colorMapEntrySize);
+ buf.putShort((short) xOrigin);
+ buf.putShort((short) yOrigin);
+ buf.putShort((short) width);
+ buf.putShort((short) height);
+ buf.put((byte) pixelDepth);
+ buf.put((byte) imageDescriptor);
+ if (idLength > 0) {
+ try {
+ byte[] chars = imageID.getBytes("US-ASCII");
+ buf.put(chars);
+ } catch (UnsupportedEncodingException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Identifies the image type of the tga image data and loads
+ * it into the JimiImage structure. This was taken from the
+ * prototype and modified for the new Jimi structure
+ */
+ private void decodeImage(LEDataInputStream dIn) throws IOException {
+ switch (header.imageType()) {
+ case Header.UCOLORMAPPED:
+ throw new IOException("TGADecoder Uncompressed Colormapped images not supported");
+
+ case Header.UTRUECOLOR: // pixelDepth 15, 16, 24 and 32
+ switch (header.pixelDepth) {
+ case 16:
+ throw new IOException("TGADecoder Compressed 16-bit True Color images not supported");
+
+ case 24:
+ case 32:
+ decodeRGBImageU24_32(dIn);
+ break;
+ }
+ break;
+
+ case Header.UBLACKWHITE:
+ throw new IOException("TGADecoder Uncompressed Grayscale images not supported");
+
+ case Header.COLORMAPPED:
+ throw new IOException("TGADecoder Compressed Colormapped images not supported");
+
+ case Header.TRUECOLOR:
+ throw new IOException("TGADecoder Compressed True Color images not supported");
+
+ case Header.BLACKWHITE:
+ throw new IOException("TGADecoder Compressed Grayscale images not supported");
+ }
+ }
+
+ /**
+ * This assumes that the body is for a 24 bit or 32 bit for a
+ * RGB or ARGB image respectively.
+ */
+ private void decodeRGBImageU24_32(LEDataInputStream dIn) throws IOException {
+ int i; // row index
+ int j; // column index
+ int y; // output row index
+ int raw; // index through the raw input buffer
+ int rawWidth = header.width() * (header.pixelDepth() / 8);
+ byte[] rawBuf = new byte[rawWidth];
+ byte[] tmpData = new byte[rawWidth * header.height()];
+
+ for (i = 0; i < header.height(); ++i) {
+ dIn.readFully(rawBuf, 0, rawWidth);
+
+ if (header.topToBottom())
+ y = header.height - i - 1; // range 0 to (header.height - 1)
+ else
+ y = i;
+
+ System.arraycopy(rawBuf, 0, tmpData, y * rawWidth, rawBuf.length);
+ }
+
+ GL gl = GLContext.getCurrentGL();
+ if (header.pixelDepth() == 24) {
+ bpp=3;
+ if(gl.isGL2()) {
+ format = GL2.GL_BGR;
+ } else {
+ format = GL.GL_RGB;
+ swapBGR(tmpData, rawWidth, header.height(), bpp);
+ }
+ } else {
+ assert header.pixelDepth() == 32;
+ bpp=4;
+
+ if(gl.isGL2()) {
+ format = GL2.GL_BGRA;
+ } else {
+ format = GL.GL_RGBA;
+ swapBGR(tmpData, rawWidth, header.height(), bpp);
+ }
+ }
+
+ data = ByteBuffer.wrap(tmpData);
+ }
+
+ private static void swapBGR(byte[] data, int bWidth, int height, int bpp) {
+ byte r,b;
+ int k;
+ for(int i=0; i An Animator can be attached to one or more {@link
- GLAutoDrawable}s to drive their display() methods in a loop. The Animator class creates a background thread in which the
- calls to
-
- Thanks to the LWJGL project for illustrating how to access gamma
- control on the various platforms.
-*/
-
-public class Gamma {
- private Gamma() {}
-
- /**
- * Sets the gamma, brightness, and contrast of the current main
- * display. This functionality is not available on all platforms and
- * graphics hardware. Returns true if the settings were successfully
- * changed, false if not. This method may return false for some
- * values of the incoming arguments even on hardware which does
- * support the underlying functionality.
- *
- * If this method returns true, the display settings will
- * automatically be reset to their original values upon JVM exit
- * (assuming the JVM does not crash); if the user wishes to change
- * the display settings back to normal ahead of time, use {@link
- * #resetDisplayGamma resetDisplayGamma}(). It is recommended to
- * call {@link #resetDisplayGamma resetDisplayGamma} before calling
- * e.g.
- *
- * This method may be called multiple times during the application's
- * execution, but calling {@link #resetDisplayGamma
- * resetDisplayGamma} will only reset the settings to the values
- * before the first call to this method.
- *
- * @param gamma The gamma value, typically > 1.0 (default values
- * vary, but typically roughly 1.0)
- * @param brightness The brightness value between -1.0 and 1.0,
- * inclusive (default values vary, but typically 0)
- * @param contrast The contrast, greater than 0.0 (default values
- * vary, but typically 1)
- * @return true if gamma settings were successfully changed, false
- * if not
- * @throws IllegalArgumentException if any of the parameters were
- * out-of-bounds
- */
- public static boolean setDisplayGamma(GL gl, float gamma, float brightness, float contrast) throws IllegalArgumentException {
- return GLDrawableFactoryImpl.getFactoryImpl(gl.getContext().getGLDrawable().getGLProfile()).setDisplayGamma(gamma, brightness, contrast);
- }
-
- /**
- * Resets the gamma, brightness and contrast values for the primary
- * display to their original values before {@link #setDisplayGamma
- * setDisplayGamma} was called the first time. {@link
- * #setDisplayGamma setDisplayGamma} must be called before calling
- * this method or an unspecified exception will be thrown. While it
- * is not explicitly required that this method be called before
- * exiting, calling it is recommended because of the inevitable
- * unspecified behavior during JVM teardown.
- */
- public static void resetDisplayGamma(GL gl) {
- GLDrawableFactoryImpl.getFactoryImpl(gl.getContext().getGLDrawable().getGLProfile()).resetDisplayGamma();
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/ImmModeSink.java b/src/jogl/classes/com/sun/opengl/util/ImmModeSink.java
deleted file mode 100644
index 65c676f4a..000000000
--- a/src/jogl/classes/com/sun/opengl/util/ImmModeSink.java
+++ /dev/null
@@ -1,974 +0,0 @@
-
-package com.sun.opengl.util;
-
-import javax.media.opengl.*;
-import javax.media.opengl.fixedfunc.*;
-import com.sun.nativewindow.impl.NWReflection;
-import java.nio.*;
-import java.util.Iterator;
-import java.util.ArrayList;
-
-public class ImmModeSink {
-
- public static final boolean DEBUG_BEGIN_END = false;
- public static final boolean DEBUG_DRAW = false;
-
- // public static final int GL_QUADS = 0x0007; // Needs data manipulation
- public static final int GL_QUAD_STRIP = 0x0008;
- public static final int GL_POLYGON = 0x0009;
-
- /**
- * Uses a GL2ES1, or ES2 fixed function emulation immediate mode sink
- */
- public static ImmModeSink createFixed(GL gl, int glBufferUsage, int initialSize,
- int vComps, int vDataType,
- int cComps, int cDataType,
- int nComps, int nDataType,
- int tComps, int tDataType) {
- return new ImmModeSink(gl, glBufferUsage, initialSize,
- vComps, vDataType, cComps, cDataType, nComps, nDataType, tComps, tDataType, false);
- }
-
- /**
- * Uses a GL2ES2 GLSL shader immediate mode sink.
- * To issue the draw() command,
- * a ShaderState must be current, using ShaderState.glUseProgram().
- *
- * @see #draw(GL, boolean)
- * @see javax.media.opengl.glsl.ShaderState#glUseProgram(GL2ES2, boolean)
- * @see javax.media.opengl.glsl.ShaderState#getCurrent()
- */
- public static ImmModeSink createGLSL(GL gl, int glBufferUsage, int initialSize,
- int vComps, int vDataType,
- int cComps, int cDataType,
- int nComps, int nDataType,
- int tComps, int tDataType) {
- return new ImmModeSink(gl, glBufferUsage, initialSize,
- vComps, vDataType, cComps, cDataType, nComps, nDataType, tComps, tDataType, true);
- }
-
- public static boolean usesVBO() { return vboUsage; }
-
- public static void setVBOUsage(boolean v) { vboUsage = v; }
-
- public void destroy(GL gl) {
- destroyList(gl);
-
- vboSet.destroy(gl);
- }
-
- public void reset() {
- reset(null);
- }
-
- public void reset(GL gl) {
- destroyList(gl);
- vboSet.reset(gl);
- }
-
- public String toString() {
- StringBuffer sb = new StringBuffer("ImmModeSink[");
- sb.append(",\n\tVBO list: "+vboSetList.size()+" [");
- for(Iterator i=vboSetList.iterator(); i.hasNext() ; ) {
- sb.append("\n\t");
- sb.append( (VBOSet)i.next() );
- }
- if(vboSetList.size()>0) {
- sb.append("\n\t],\nVBO current: NOP]");
- } else {
- sb.append("\n\t],\nVBO current: \n");
- sb.append(vboSet);
- sb.append("\n]");
- }
- return sb.toString();
- }
-
- public void draw(GL gl, boolean disableBufferAfterDraw) {
- if(DEBUG_DRAW) {
- Exception e = new Exception("ImmModeSink.draw(disableBufferAfterDraw: "+disableBufferAfterDraw+"):\n\t"+this);
- e.printStackTrace();
- }
- int n=0;
- for(Iterator i=vboSetList.iterator(); i.hasNext() ; n++) {
- ((VBOSet)i.next()).draw(gl, null, disableBufferAfterDraw, n);
- }
- }
-
- public void draw(GL gl, Buffer indices, boolean disableBufferAfterDraw) {
- if(DEBUG_DRAW) {
- Exception e = new Exception("ImmModeSink.draw(disableBufferAfterDraw: "+disableBufferAfterDraw+"):\n\t"+this);
- e.printStackTrace();
- }
- int n=0;
- for(Iterator i=vboSetList.iterator(); i.hasNext() ; n++) {
- ((VBOSet)i.next()).draw(gl, indices, disableBufferAfterDraw, n);
- }
- }
-
- public void glBegin(int mode) {
- if(DEBUG_BEGIN_END) {
- Exception e = new Exception("ImmModeSink.glBegin("+vboSet.mode+"):\n\t"+this);
- e.printStackTrace();
- }
- vboSet.modeOrig = mode;
- switch(mode) {
- // Needs data manipulation ..
- //case GL_QUADS:
- // mode=GL.GL_LINES;
- // break;
- case GL_QUAD_STRIP:
- mode=GL.GL_TRIANGLE_STRIP;
- break;
- case GL_POLYGON:
- mode=GL.GL_LINES;
- break;
- }
- vboSet.mode = mode;
- vboSet.checkSeal(false);
- }
-
- public final void glEnd(GL gl) {
- glEnd(gl, null, true);
- }
-
- public void glEnd(GL gl, boolean immediateDraw) {
- glEnd(gl, null, immediateDraw);
- }
-
- public final void glEnd(GL gl, Buffer indices) {
- glEnd(gl, indices, true);
- }
-
- private void glEnd(GL gl, Buffer indices, boolean immediateDraw) {
- if(DEBUG_BEGIN_END) {
- Exception e = new Exception("ImmModeSink START glEnd(immediate: "+immediateDraw+"):\n\t"+this);
- e.printStackTrace();
- }
- if(immediateDraw) {
- vboSet.seal(gl, true);
- vboSet.draw(gl, indices, true, -1);
- reset(gl);
- } else {
- vboSet.seal(gl, true);
- vboSet.enableBuffer(gl, false);
- vboSetList.add(vboSet);
- vboSet = vboSet.regenerate();
- }
- }
-
- public void glVertexv(Buffer v) {
- vboSet.glVertexv(v);
- }
- public void glNormalv(Buffer v) {
- vboSet.glNormalv(v);
- }
- public void glColorv(Buffer v) {
- vboSet.glColorv(v);
- }
- public void glTexCoordv(Buffer v) {
- vboSet.glTexCoordv(v);
- }
-
- public final void glVertex2f(float x, float y) {
- vboSet.glVertex2f(x,y);
- }
-
- public final void glVertex3f(float x, float y, float z) {
- vboSet.glVertex3f(x,y,z);
- }
-
- public final void glNormal3f(float x, float y, float z) {
- vboSet.glNormal3f(x,y,z);
- }
-
- public final void glColor3f(float x, float y, float z) {
- vboSet.glColor3f(x,y,z);
- }
-
- public final void glColor4f(float x, float y, float z, float a) {
- vboSet.glColor4f(x,y,z, a);
- }
-
- public final void glTexCoord2f(float x, float y) {
- vboSet.glTexCoord2f(x,y);
- }
-
- public final void glTexCoord3f(float x, float y, float z) {
- vboSet.glTexCoord3f(x,y,z);
- }
-
- public final void glVertex2s(short x, short y) {
- vboSet.glVertex2s(x,y);
- }
-
- public final void glVertex3s(short x, short y, short z) {
- vboSet.glVertex3s(x,y,z);
- }
-
- public final void glNormal3s(short x, short y, short z) {
- vboSet.glNormal3s(x,y,z);
- }
-
- public final void glColor3s(short x, short y, short z) {
- vboSet.glColor3s(x,y,z);
- }
-
- public final void glColor4s(short x, short y, short z, short a) {
- vboSet.glColor4s(x,y,z,a);
- }
-
- public final void glTexCoord2s(short x, short y) {
- vboSet.glTexCoord2s(x,y);
- }
-
- public final void glTexCoord3s(short x, short y, short z) {
- vboSet.glTexCoord3s(x,y,z);
- }
-
- public final void glVertex2b(byte x, byte y) {
- vboSet.glVertex2b(x,y);
- }
-
- public final void glVertex3b(byte x, byte y, byte z) {
- vboSet.glVertex3b(x,y,z);
- }
-
- public final void glNormal3b(byte x, byte y, byte z) {
- vboSet.glNormal3b(x,y,z);
- }
-
- public final void glColor3b(byte x, byte y, byte z) {
- vboSet.glColor3b(x,y,z);
- }
-
- public final void glColor4b(byte x, byte y, byte z, byte a) {
- vboSet.glColor4b(x,y,z,a);
- }
-
- public final void glTexCoord2b(byte x, byte y) {
- vboSet.glTexCoord2b(x,y);
- }
-
- public final void glTexCoord3b(byte x, byte y, byte z) {
- vboSet.glTexCoord3b(x,y,z);
- }
-
- protected ImmModeSink(GL gl, int glBufferUsage, int initialSize,
- int vComps, int vDataType,
- int cComps, int cDataType,
- int nComps, int nDataType,
- int tComps, int tDataType, boolean useGLSL) {
- if(useGLSL && !gl.hasGLSL()) {
- throw new GLException("ImmModeSink GLSL usage not supported: "+gl);
- }
- vboSet = new VBOSet(gl, glBufferUsage, initialSize,
- vComps, vDataType, cComps, cDataType, nComps, nDataType, tComps, tDataType, useGLSL);
- this.vboSetList = new ArrayList();
- }
-
- private void destroyList(GL gl) {
- for(Iterator i=vboSetList.iterator(); i.hasNext() ; ) {
- ((VBOSet)i.next()).destroy(gl);
- }
- vboSetList.clear();
- }
-
- private VBOSet vboSet;
- private ArrayList vboSetList;
- private static boolean vboUsage = true;
-
- protected static class VBOSet {
- protected VBOSet (GL gl, int glBufferUsage, int initialSize,
- int vComps, int vDataType,
- int cComps, int cDataType,
- int nComps, int nDataType,
- int tComps, int tDataType, boolean useGLSL) {
- this.gl=gl;
- this.glBufferUsage=glBufferUsage;
- this.initialSize=initialSize;
- this.vDataType=vDataType;
- this.vComps=vComps;
- this.cDataType=cDataType;
- this.cComps=cComps;
- this.nDataType=nDataType;
- this.nComps=nComps;
- this.tDataType=tDataType;
- this.tComps=tComps;
- this.useGLSL=useGLSL;
-
- allocateBuffer(initialSize);
- rewind();
-
- this.sealed=false;
- this.sealedGL=false;
- this.mode = -1;
- this.modeOrig = -1;
- this.bufferEnabled=false;
- this.bufferWritten=false;
- }
-
- protected final VBOSet regenerate() {
- return new VBOSet(gl, glBufferUsage, initialSize,
- vComps, vDataType, cComps, cDataType, nComps, nDataType, tComps, tDataType, useGLSL);
- }
-
- protected void checkSeal(boolean test) throws GLException {
- if(mode<0) {
- throw new GLException("No mode set yet, call glBegin(mode) first:\n\t"+this);
- }
- if(sealed!=test) {
- if(test) {
- throw new GLException("Not Sealed yet, call glEnd() first:\n\t"+this);
- } else {
- throw new GLException("Already Sealed, can't modify VBO after glEnd():\n\t"+this);
- }
- }
- }
-
- protected void draw(GL gl, Buffer indices, boolean disableBufferAfterDraw, int i)
- {
- if(DEBUG_DRAW) {
- Exception e = new Exception("ImmModeSink.draw["+i+"](disableBufferAfterDraw: "+disableBufferAfterDraw+"):\n\t"+this);
- e.printStackTrace();
- }
- enableBuffer(gl, true);
-
- if (buffer!=null) {
- GL2ES1 glf = gl.getGL2ES1();
-
- if(null==indices) {
- glf.glDrawArrays(mode, 0, count);
- } else {
- Class clazz = indices.getClass();
- int type=-1;
- if(NWReflection.instanceOf(clazz, ByteBuffer.class.getName())) {
- type = GL.GL_UNSIGNED_BYTE;
- } else if(NWReflection.instanceOf(clazz, ShortBuffer.class.getName())) {
- type = GL.GL_UNSIGNED_SHORT;
- }
- if(0>type) {
- throw new GLException("Given Buffer Class not supported: "+clazz+", should be ubyte or ushort:\n\t"+this);
- }
- glf.glDrawElements(mode, indices.remaining(), type, indices);
- // GL2: gl.glDrawRangeElements(mode, 0, indices.remaining()-1, indices.remaining(), type, indices);
- }
- }
-
- if(disableBufferAfterDraw) {
- enableBuffer(gl, false);
- }
- }
-
- public void glVertexv(Buffer v) {
- checkSeal(false);
- BufferUtil.put(vertexArray, v);
- }
- public void glNormalv(Buffer v) {
- checkSeal(false);
- BufferUtil.put(normalArray, v);
- }
- public void glColorv(Buffer v) {
- checkSeal(false);
- BufferUtil.put(colorArray, v);
- }
- public void glTexCoordv(Buffer v) {
- checkSeal(false);
- BufferUtil.put(textCoordArray, v);
- }
-
- public void glVertex2b(byte x, byte y) {
- checkSeal(false);
- growBufferIfNecessary(VERTEX, 2);
- if(vComps>0)
- BufferUtil.putb(vertexArray, x);
- if(vComps>1)
- BufferUtil.putb(vertexArray, y);
- padding(VERTEX, vComps-2);
- }
- public void glVertex3b(byte x, byte y, byte z) {
- checkSeal(false);
- growBufferIfNecessary(VERTEX, 3);
- if(vComps>0)
- BufferUtil.putb(vertexArray, x);
- if(vComps>1)
- BufferUtil.putb(vertexArray, y);
- if(vComps>2)
- BufferUtil.putb(vertexArray, z);
- padding(VERTEX, vComps-3);
- }
- public void glVertex2s(short x, short y) {
- checkSeal(false);
- growBufferIfNecessary(VERTEX, 2);
- if(vComps>0)
- BufferUtil.puts(vertexArray, x);
- if(vComps>1)
- BufferUtil.puts(vertexArray, y);
- padding(VERTEX, vComps-2);
- }
- public void glVertex3s(short x, short y, short z) {
- checkSeal(false);
- growBufferIfNecessary(VERTEX, 3);
- if(vComps>0)
- BufferUtil.puts(vertexArray, x);
- if(vComps>1)
- BufferUtil.puts(vertexArray, y);
- if(vComps>2)
- BufferUtil.puts(vertexArray, z);
- padding(VERTEX, vComps-3);
- }
- public void glVertex2f(float x, float y) {
- checkSeal(false);
- growBufferIfNecessary(VERTEX, 2);
- if(vComps>0)
- BufferUtil.putf(vertexArray, x);
- if(vComps>1)
- BufferUtil.putf(vertexArray, y);
- padding(VERTEX, vComps-2);
- }
- public void glVertex3f(float x, float y, float z) {
- checkSeal(false);
- growBufferIfNecessary(VERTEX, 3);
- if(vComps>0)
- BufferUtil.putf(vertexArray, x);
- if(vComps>1)
- BufferUtil.putf(vertexArray, y);
- if(vComps>2)
- BufferUtil.putf(vertexArray, z);
- padding(VERTEX, vComps-3);
- }
-
- public void glNormal3b(byte x, byte y, byte z) {
- checkSeal(false);
- growBufferIfNecessary(NORMAL, 3);
- if(nComps>0)
- BufferUtil.putb(normalArray, x);
- if(nComps>1)
- BufferUtil.putb(normalArray, y);
- if(nComps>2)
- BufferUtil.putb(normalArray, z);
- padding(NORMAL, nComps-3);
- }
- public void glNormal3s(short x, short y, short z) {
- checkSeal(false);
- growBufferIfNecessary(NORMAL, 3);
- if(nComps>0)
- BufferUtil.puts(normalArray, x);
- if(nComps>1)
- BufferUtil.puts(normalArray, y);
- if(nComps>2)
- BufferUtil.puts(normalArray, z);
- padding(NORMAL, nComps-3);
- }
- public void glNormal3f(float x, float y, float z) {
- checkSeal(false);
- growBufferIfNecessary(NORMAL, 3);
- if(nComps>0)
- BufferUtil.putf(normalArray, x);
- if(nComps>1)
- BufferUtil.putf(normalArray, y);
- if(nComps>2)
- BufferUtil.putf(normalArray, z);
- padding(NORMAL, nComps-3);
- }
-
- public void glColor3b(byte r, byte g, byte b) {
- checkSeal(false);
- growBufferIfNecessary(COLOR, 3);
- if(cComps>0)
- BufferUtil.putb(colorArray, r);
- if(cComps>1)
- BufferUtil.putb(colorArray, g);
- if(cComps>2)
- BufferUtil.putb(colorArray, b);
- padding(COLOR, cComps-3);
- }
- public void glColor4b(byte r, byte g, byte b, byte a) {
- checkSeal(false);
- growBufferIfNecessary(COLOR, 4);
- if(cComps>0)
- BufferUtil.putb(colorArray, r);
- if(cComps>1)
- BufferUtil.putb(colorArray, g);
- if(cComps>2)
- BufferUtil.putb(colorArray, b);
- if(cComps>3)
- BufferUtil.putb(colorArray, a);
- padding(COLOR, cComps-4);
- }
- public void glColor3s(short r, short g, short b) {
- checkSeal(false);
- growBufferIfNecessary(COLOR, 3);
- if(cComps>0)
- BufferUtil.puts(colorArray, r);
- if(cComps>1)
- BufferUtil.puts(colorArray, g);
- if(cComps>2)
- BufferUtil.puts(colorArray, b);
- padding(COLOR, cComps-3);
- }
- public void glColor4s(short r, short g, short b, short a) {
- checkSeal(false);
- growBufferIfNecessary(COLOR, 4);
- if(cComps>0)
- BufferUtil.puts(colorArray, r);
- if(cComps>1)
- BufferUtil.puts(colorArray, g);
- if(cComps>2)
- BufferUtil.puts(colorArray, b);
- if(cComps>3)
- BufferUtil.puts(colorArray, a);
- padding(COLOR, cComps-4);
- }
- public void glColor3f(float r, float g, float b) {
- checkSeal(false);
- growBufferIfNecessary(COLOR, 3);
- if(cComps>0)
- BufferUtil.putf(colorArray, r);
- if(cComps>1)
- BufferUtil.putf(colorArray, g);
- if(cComps>2)
- BufferUtil.putf(colorArray, b);
- padding(COLOR, cComps-3);
- }
- public void glColor4f(float r, float g, float b, float a) {
- checkSeal(false);
- growBufferIfNecessary(COLOR, 4);
- if(cComps>0)
- BufferUtil.putf(colorArray, r);
- if(cComps>1)
- BufferUtil.putf(colorArray, g);
- if(cComps>2)
- BufferUtil.putf(colorArray, b);
- if(cComps>3)
- BufferUtil.putf(colorArray, a);
- padding(COLOR, cComps-4);
- }
-
- public void glTexCoord2b(byte x, byte y) {
- checkSeal(false);
- growBufferIfNecessary(TEXTCOORD, 2);
- if(tComps>0)
- BufferUtil.putb(textCoordArray, x);
- if(tComps>1)
- BufferUtil.putb(textCoordArray, y);
- padding(TEXTCOORD, tComps-2);
- }
- public void glTexCoord3b(byte x, byte y, byte z) {
- checkSeal(false);
- growBufferIfNecessary(TEXTCOORD, 3);
- if(tComps>0)
- BufferUtil.putb(textCoordArray, x);
- if(tComps>1)
- BufferUtil.putb(textCoordArray, y);
- if(tComps>2)
- BufferUtil.putb(textCoordArray, z);
- padding(TEXTCOORD, tComps-3);
- }
- public void glTexCoord2s(short x, short y) {
- checkSeal(false);
- growBufferIfNecessary(TEXTCOORD, 2);
- if(tComps>0)
- BufferUtil.puts(textCoordArray, x);
- if(tComps>1)
- BufferUtil.puts(textCoordArray, y);
- padding(TEXTCOORD, tComps-2);
- }
- public void glTexCoord3s(short x, short y, short z) {
- checkSeal(false);
- growBufferIfNecessary(TEXTCOORD, 3);
- if(tComps>0)
- BufferUtil.puts(textCoordArray, x);
- if(tComps>1)
- BufferUtil.puts(textCoordArray, y);
- if(tComps>2)
- BufferUtil.puts(textCoordArray, z);
- padding(TEXTCOORD, tComps-3);
- }
- public void glTexCoord2f(float x, float y) {
- checkSeal(false);
- growBufferIfNecessary(TEXTCOORD, 2);
- if(tComps>0)
- BufferUtil.putf(textCoordArray, x);
- if(tComps>1)
- BufferUtil.putf(textCoordArray, y);
- padding(TEXTCOORD, tComps-2);
- }
- public void glTexCoord3f(float x, float y, float z) {
- checkSeal(false);
- growBufferIfNecessary(TEXTCOORD, 3);
- if(tComps>0)
- BufferUtil.putf(textCoordArray, x);
- if(tComps>1)
- BufferUtil.putf(textCoordArray, y);
- if(tComps>2)
- BufferUtil.putf(textCoordArray, z);
- padding(TEXTCOORD, tComps-3);
- }
-
- public void rewind() {
- if(null!=vertexArray) {
- vertexArray.rewind();
- }
- if(null!=colorArray) {
- colorArray.rewind();
- }
- if(null!=normalArray) {
- normalArray.rewind();
- }
- if(null!=textCoordArray) {
- textCoordArray.rewind();
- }
- }
-
- public void destroy(GL gl) {
- reset(gl);
-
- vertexArray=null; colorArray=null; normalArray=null; textCoordArray=null;
- vArrayData=null; cArrayData=null; nArrayData=null; tArrayData=null;
- buffer=null;
- bSize=0; count=0;
- }
-
- public void reset(GL gl) {
- enableBuffer(gl, false);
- reset();
- }
-
- public void reset() {
- if(buffer!=null) {
- buffer.clear();
- }
- rewind();
-
- this.mode = -1;
- this.modeOrig = -1;
- this.sealed=false;
- this.bufferEnabled=false;
- this.bufferWritten=false;
- }
-
- public void seal(GL glObj, boolean seal)
- {
- seal(seal);
- if(sealedGL==seal) return;
- sealedGL = seal;
- GL gl = glObj.getGL();
- if(seal) {
- if(vboUsage && vboName==0) {
- int[] tmp = new int[1];
- gl.glGenBuffers(1, tmp, 0);
- vboName = tmp[0];
- }
- if(null!=vArrayData)
- vArrayData.setVBOName(vboName);
- if(null!=cArrayData)
- cArrayData.setVBOName(vboName);
- if(null!=nArrayData)
- nArrayData.setVBOName(vboName);
- if(null!=tArrayData)
- tArrayData.setVBOName(vboName);
- enableBuffer(gl, true);
- } else {
- enableBuffer(gl, false);
- }
- }
-
- public void seal(boolean seal)
- {
- if(sealed==seal) return;
- sealed = seal;
- if(seal) {
- bufferWritten=false;
- }
- }
-
- public void enableBuffer(GL gl, boolean enable) {
- /* if(enableBufferAlways && enable) {
- bufferEnabled = false;
- } */
- if( bufferEnabled != enable && count>0 ) {
- if(enable) {
- checkSeal(true);
- }
- if(useGLSL) {
- enableBufferGLSL(gl, enable);
- } else {
- enableBufferFixed(gl, enable);
- }
- bufferEnabled = enable;
- }
- }
-
- public void enableBufferFixed(GL gl, boolean enable) {
- GL2ES1 glf = gl.getGL2ES1();
-
- if(enable) {
- gl.glBindBuffer(GL.GL_ARRAY_BUFFER, vboName);
-
- if(!bufferWritten) {
- gl.glBufferData(GL.GL_ARRAY_BUFFER, buffer.limit(), buffer, GL.GL_STATIC_DRAW);
- bufferWritten=true;
- }
-
- if(vComps>0) {
- glf.glEnableClientState(glf.GL_VERTEX_ARRAY);
- glf.glVertexPointer(vArrayData);
- }
- if(cComps>0) {
- glf.glEnableClientState(glf.GL_COLOR_ARRAY);
- glf.glColorPointer(cArrayData);
- }
- if(nComps>0) {
- glf.glEnableClientState(glf.GL_NORMAL_ARRAY);
- glf.glNormalPointer(nArrayData);
- }
- if(tComps>0) {
- glf.glEnableClientState(glf.GL_TEXTURE_COORD_ARRAY);
- glf.glTexCoordPointer(tArrayData);
- }
-
- gl.glBindBuffer(GL.GL_ARRAY_BUFFER, 0);
- } else {
- if(vComps>0) {
- glf.glDisableClientState(glf.GL_VERTEX_ARRAY);
- }
- if(cComps>0) {
- glf.glDisableClientState(glf.GL_COLOR_ARRAY);
- }
- if(nComps>0) {
- glf.glDisableClientState(glf.GL_NORMAL_ARRAY);
- }
- if(tComps>0) {
- glf.glDisableClientState(glf.GL_TEXTURE_COORD_ARRAY);
- }
- }
- }
-
- public void enableBufferGLSL(GL gl, boolean enable) {
- GL2ES2 glsl = gl.getGL2ES2();
- com.sun.opengl.util.glsl.ShaderState st = com.sun.opengl.util.glsl.ShaderState.getCurrent();
- if(null==st) {
- throw new GLException("No ShaderState current");
- }
-
- if(enable) {
- glsl.glBindBuffer(GL.GL_ARRAY_BUFFER, vboName);
-
- if(!bufferWritten) {
- glsl.glBufferData(GL.GL_ARRAY_BUFFER, buffer.limit(), buffer, GL.GL_STATIC_DRAW);
- bufferWritten=true;
- }
-
- if(vComps>0) {
- st.glEnableVertexAttribArray(glsl, vArrayData.getName());
- st.glVertexAttribPointer(glsl, vArrayData);
- }
- if(cComps>0) {
- st.glEnableVertexAttribArray(glsl, cArrayData.getName());
- st.glVertexAttribPointer(glsl, cArrayData);
- }
- if(nComps>0) {
- st.glEnableVertexAttribArray(glsl, nArrayData.getName());
- st.glVertexAttribPointer(glsl, nArrayData);
- }
- if(tComps>0) {
- st.glEnableVertexAttribArray(glsl, tArrayData.getName());
- st.glVertexAttribPointer(glsl, tArrayData);
- }
-
- glsl.glBindBuffer(GL.GL_ARRAY_BUFFER, 0);
- } else {
- if(vComps>0) {
- st.glDisableVertexAttribArray(glsl, vArrayData.getName());
- }
- if(cComps>0) {
- st.glDisableVertexAttribArray(glsl, cArrayData.getName());
- }
- if(nComps>0) {
- st.glDisableVertexAttribArray(glsl, nArrayData.getName());
- }
- if(tComps>0) {
- st.glDisableVertexAttribArray(glsl, tArrayData.getName());
- }
- }
- }
-
- public String toString() {
- return "VBOSet[mode "+mode+
- ", modeOrig "+modeOrig+
- ", sealed "+sealed+
- ", bufferEnabled "+bufferEnabled+
- ", bufferWritten "+bufferWritten+
- ",\n\t"+vArrayData+
- ",\n\t"+cArrayData+
- ",\n\t"+nArrayData+
- ",\n\t"+tArrayData+
- "]";
- }
-
- // non public matters
-
- protected void allocateBuffer(int elements) {
- int vWidth = vComps * BufferUtil.sizeOfGLType(vDataType);
- int cWidth = cComps * BufferUtil.sizeOfGLType(cDataType);
- int nWidth = nComps * BufferUtil.sizeOfGLType(nDataType);
- int tWidth = tComps * BufferUtil.sizeOfGLType(tDataType);
-
- count = elements;
- bSize = count * ( vWidth + cWidth + nWidth + tWidth ) ;
-
- buffer = BufferUtil.newByteBuffer(bSize);
-
- int pos = 0;
- int size= count * vWidth ;
- if(size>0) {
- vertexArray = BufferUtil.sliceGLBuffer(buffer, pos, size, vDataType);
- } else {
- vertexArray = null;
- }
- vOffset = pos;
- pos+=size;
-
- size= count * cWidth ;
- if(size>0) {
- colorArray = BufferUtil.sliceGLBuffer(buffer, pos, size, cDataType);
- } else {
- colorArray = null;
- }
- cOffset = pos;
- pos+=size;
-
- size= count * nWidth ;
- if(size>0) {
- normalArray = BufferUtil.sliceGLBuffer(buffer, pos, size, nDataType);
- } else {
- normalArray = null;
- }
- nOffset = pos;
- pos+=size;
-
- size= count * tWidth ;
- if(size>0) {
- textCoordArray = BufferUtil.sliceGLBuffer(buffer, pos, size, tDataType);
- } else {
- textCoordArray = null;
- }
- tOffset = pos;
- pos+=size;
-
- buffer.position(pos);
- buffer.flip();
-
- if(vComps>0) {
- vArrayData = GLArrayDataWrapper.createFixed(gl, GLPointerFunc.GL_VERTEX_ARRAY, vComps, vDataType, false,
- 0, vertexArray, 0, vOffset);
- } else {
- vArrayData = null;
- }
- if(cComps>0) {
- cArrayData = GLArrayDataWrapper.createFixed(gl, GLPointerFunc.GL_COLOR_ARRAY, cComps, cDataType, false,
- 0, colorArray, 0, cOffset);
- } else {
- cArrayData = null;
- }
- if(nComps>0) {
- nArrayData = GLArrayDataWrapper.createFixed(gl, GLPointerFunc.GL_NORMAL_ARRAY, nComps, nDataType, false,
- 0, normalArray, 0, nOffset);
- } else {
- nArrayData = null;
- }
- if(tComps>0) {
- tArrayData = GLArrayDataWrapper.createFixed(gl, GLPointerFunc.GL_TEXTURE_COORD_ARRAY, tComps, tDataType, false,
- 0, textCoordArray, 0, tOffset);
- } else {
- tArrayData = null;
- }
-
- }
-
- protected final boolean growBufferIfNecessary(int type, int spare) {
- if(buffer==null || count < spare) {
- growBuffer(type, initialSize);
- return true;
- }
- return false;
- }
-
- protected final void growBuffer(int type, int additional) {
- if(sealed || 0==additional) return;
-
- // save olde values ..
- Buffer _vertexArray=vertexArray, _colorArray=colorArray, _normalArray=normalArray, _textCoordArray=textCoordArray;
- ByteBuffer _buffer = buffer;
-
- allocateBuffer(count+additional);
-
- if(null!=_vertexArray) {
- _vertexArray.flip();
- BufferUtil.put(vertexArray, _vertexArray);
- }
- if(null!=_colorArray) {
- _colorArray.flip();
- BufferUtil.put(colorArray, _colorArray);
- }
- if(null!=_normalArray) {
- _normalArray.flip();
- BufferUtil.put(normalArray, _normalArray);
- }
- if(null!=_textCoordArray) {
- _textCoordArray.flip();
- BufferUtil.put(textCoordArray, _textCoordArray);
- }
- }
-
- protected void padding(int type, int fill) {
- if ( sealed ) return;
-
- Buffer dest = null;
-
- switch (type) {
- case VERTEX:
- dest = vertexArray;
- break;
- case COLOR:
- dest = colorArray;
- break;
- case NORMAL:
- dest = normalArray;
- break;
- case TEXTCOORD:
- dest = textCoordArray;
- break;
- }
-
- if ( null==dest ) return;
-
- while((fill--)>0) {
- BufferUtil.putb(dest, (byte)0);
- }
- }
-
- protected int mode, modeOrig;
- protected int glBufferUsage, initialSize;
-
- protected ByteBuffer buffer;
- protected int bSize, count, vboName;
-
- public static final int VERTEX = 0;
- public static final int COLOR = 1;
- public static final int NORMAL = 2;
- public static final int TEXTCOORD = 3;
-
- protected int vOffset, cOffset, nOffset, tOffset;
- protected int vComps, cComps, nComps, tComps;
- protected int vDataType, cDataType, nDataType, tDataType;
- protected Buffer vertexArray, colorArray, normalArray, textCoordArray;
- protected GLArrayDataWrapper vArrayData, cArrayData, nArrayData, tArrayData;
-
- protected boolean sealed, sealedGL, useGLSL;
- protected boolean bufferEnabled, bufferWritten;
- protected GL gl;
- }
-
-}
-
diff --git a/src/jogl/classes/com/sun/opengl/util/Locator.java b/src/jogl/classes/com/sun/opengl/util/Locator.java
deleted file mode 100644
index 06cd50ce8..000000000
--- a/src/jogl/classes/com/sun/opengl/util/Locator.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.sun.opengl.util;
-
-import java.util.*;
-import java.nio.*;
-import java.io.*;
-import java.net.*;
-
-/** Utilities for dealing with resources. */
-
-public class Locator {
- private Locator() {}
-
- /**
- * Locates the resource using 'getResource(String path, ClassLoader cl)',
- * with this context ClassLoader and the path as is,
- * as well with the context's package name path plus the path.
- *
- * @see #getResource(String, ClassLoader)
- */
- public static URL getResource(Class context, String path) {
- ClassLoader contextCL = (null!=context)?context.getClassLoader():null;
- URL url = getResource(path, contextCL);
- if (url == null && null!=context) {
- // Try again by scoping the path within the class's package
- String className = context.getName().replace('.', '/');
- int lastSlash = className.lastIndexOf('/');
- if (lastSlash >= 0) {
- String tmpPath = className.substring(0, lastSlash + 1) + path;
- url = getResource(tmpPath, contextCL);
- }
- }
- return url;
- }
-
- /**
- * Locates the resource using the ClassLoader's facility,
- * the absolute URL and absolute file.
- *
- * @see ClassLoader#getResource(String)
- * @see ClassLoader#getSystemResource(String)
- * @see URL#URL(String)
- * @see File#File(String)
- */
- public static URL getResource(String path, ClassLoader cl) {
- URL url = null;
- if (cl != null) {
- url = cl.getResource(path);
- } else {
- url = ClassLoader.getSystemResource(path);
- }
- if(!urlExists(url)) {
- url = null;
- try {
- url = new URL(path);
- } catch (MalformedURLException e) { }
- }
- if(!urlExists(url)) {
- url = null;
- try {
- File file = new File(path);
- if(file.exists()) {
- url = file.toURL();
- }
- } catch (MalformedURLException e) {}
- }
- return url;
- }
-
- /**
- * Generates a path for the 'relativeFile' relative to the 'absoluteFileLocation'
- */
- public static String getRelativeOf(String absoluteFileLocation, String relativeFile) {
- File file = new File(absoluteFileLocation);
- file = file.getParentFile();
- while (file != null && relativeFile.startsWith("../")) {
- file = file.getParentFile();
- relativeFile = relativeFile.substring(3);
- }
- if (file != null) {
- String res = new File(file, relativeFile).getPath();
- // Handle things on Windows
- return res.replace('\\', '/');
- } else {
- return relativeFile;
- }
- }
-
- /**
- * Returns true, if the url exists,
- * trying to open a connection.
- */
- public static boolean urlExists(URL url) {
- boolean v = false;
- if(null!=url) {
- try {
- URLConnection uc = url.openConnection();
- v = true;
- } catch (IOException ioe) { }
- }
- return v;
- }
-
-}
-
diff --git a/src/jogl/classes/com/sun/opengl/util/PMVMatrix.java b/src/jogl/classes/com/sun/opengl/util/PMVMatrix.java
deleted file mode 100755
index 4211e893b..000000000
--- a/src/jogl/classes/com/sun/opengl/util/PMVMatrix.java
+++ /dev/null
@@ -1,685 +0,0 @@
-/*
- * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.sun.opengl.util;
-
-import com.sun.opengl.impl.ProjectFloat;
-
-import java.nio.*;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.media.opengl.*;
-import javax.media.opengl.fixedfunc.GLMatrixFunc;
-
-public class PMVMatrix implements GLMatrixFunc {
-
- public PMVMatrix() {
- projectFloat = new ProjectFloat();
-
- matrixIdent = BufferUtil.newFloatBuffer(1*16);
- projectFloat.gluMakeIdentityf(matrixIdent);
- matrixIdent.rewind();
-
- // T Texture
- // P Projection
- // Mv ModelView
- // Mvi Modelview-Inverse
- // Mvit Modelview-Inverse-Transpose
- // Pmv P * Mv
- matrixTPMvMvitPmv = BufferUtil.newFloatBuffer(6*16); // grouping T + P + Mv + Mvi + Mvit + Pmv
- matrixPMvMvitPmv = slice(matrixTPMvMvitPmv, 1*16, 5*16); // grouping P + Mv + Mvi + Mvit + Pmv
- matrixT = slice(matrixTPMvMvitPmv, 0*16, 1*16); // T
- matrixPMvMvit = slice(matrixTPMvMvitPmv, 1*16, 4*16); // grouping P + Mv + Mvi + Mvit
- matrixPMvMvi = slice(matrixTPMvMvitPmv, 1*16, 3*16); // grouping P + Mv + Mvi
- matrixPMv = slice(matrixTPMvMvitPmv, 1*16, 2*16); // grouping P + Mv
- matrixP = slice(matrixTPMvMvitPmv, 1*16, 1*16); // P
- matrixMv = slice(matrixTPMvMvitPmv, 2*16, 1*16); // Mv
- matrixMvi = slice(matrixTPMvMvitPmv, 3*16, 1*16); // Mvi
- matrixMvit = slice(matrixTPMvMvitPmv, 4*16, 1*16); // Mvit
- matrixPmv = slice(matrixTPMvMvitPmv, 5*16, 1*16); // Pmv
- matrixTPMvMvitPmv.rewind();
-
- matrixMvit3 = BufferUtil.newFloatBuffer(3*3);
-
- localBuf = BufferUtil.newFloatBuffer(6*16);
-
- matrixMult=slice(localBuf, 0*16, 16);
-
- matrixTrans=slice(localBuf, 1*16, 16);
- projectFloat.gluMakeIdentityf(matrixTrans);
-
- matrixRot=slice(localBuf, 2*16, 16);
- projectFloat.gluMakeIdentityf(matrixRot);
-
- matrixScale=slice(localBuf, 3*16, 16);
- projectFloat.gluMakeIdentityf(matrixScale);
-
- matrixOrtho=slice(localBuf, 4*16, 16);
- projectFloat.gluMakeIdentityf(matrixOrtho);
-
- matrixFrustum=slice(localBuf, 5*16, 16);
- projectFloat.gluMakeZero(matrixFrustum);
-
- vec3f=new float[3];
-
- matrixPStack = new ArrayList();
- matrixMvStack= new ArrayList();
-
- // default values and mode
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
- glMatrixMode(GL.GL_TEXTURE);
- glLoadIdentity();
- setDirty();
- }
-
- public void destroy() {
- if(null!=projectFloat) {
- projectFloat.destroy(); projectFloat=null;
- }
-
- if(null!=matrixIdent) {
- matrixIdent.clear(); matrixIdent=null;
- }
- if(null!=matrixTPMvMvitPmv) {
- matrixTPMvMvitPmv.clear(); matrixTPMvMvitPmv=null;
- }
- if(null!=matrixMvit3) {
- matrixMvit3.clear(); matrixMvit3=null;
- }
- if(null!=localBuf) {
- localBuf.clear(); localBuf=null;
- }
-
- if(null!=matrixPStack) {
- matrixPStack.clear(); matrixPStack=null;
- }
- vec3f=null;
- if(null!=matrixMvStack) {
- matrixMvStack.clear(); matrixMvStack=null;
- }
- if(null!=matrixPStack) {
- matrixPStack.clear(); matrixPStack=null;
- }
- if(null!=matrixTStack) {
- matrixTStack.clear(); matrixTStack=null;
- }
-
- matrixTPMvMvitPmv=null; matrixPMvMvit=null; matrixPMvMvitPmv=null; matrixPMvMvi=null; matrixPMv=null;
- matrixP=null; matrixT=null; matrixMv=null; matrixMvi=null; matrixMvit=null; matrixPmv=null;
- matrixMult=null; matrixTrans=null; matrixRot=null; matrixScale=null; matrixOrtho=null; matrixFrustum=null;
- }
-
- private static FloatBuffer slice(FloatBuffer buf, int pos, int len) {
- buf.position(pos);
- buf.limit(pos + len);
- return buf.slice();
- }
-
- public static final boolean isMatrixModeName(final int matrixModeName) {
- switch(matrixModeName) {
- case GL_MODELVIEW_MATRIX:
- case GL_PROJECTION_MATRIX:
- case GL_TEXTURE_MATRIX:
- return true;
- }
- return false;
- }
-
- public static final int matrixModeName2MatrixGetName(final int matrixModeName) {
- switch(matrixModeName) {
- case GL_MODELVIEW:
- return GL_MODELVIEW_MATRIX;
- case GL_PROJECTION:
- return GL_PROJECTION_MATRIX;
- case GL.GL_TEXTURE:
- return GL_TEXTURE_MATRIX;
- default:
- throw new GLException("unsupported matrixName: "+matrixModeName);
- }
- }
-
- public static final boolean isMatrixGetName(final int matrixGetName) {
- switch(matrixGetName) {
- case GL_MATRIX_MODE:
- case GL_MODELVIEW_MATRIX:
- case GL_PROJECTION_MATRIX:
- case GL_TEXTURE_MATRIX:
- return true;
- }
- return false;
- }
-
- public static final int matrixGetName2MatrixModeName(final int matrixGetName) {
- switch(matrixGetName) {
- case GL_MODELVIEW_MATRIX:
- return GL_MODELVIEW;
- case GL_PROJECTION_MATRIX:
- return GL_PROJECTION;
- case GL_TEXTURE_MATRIX:
- return GL.GL_TEXTURE;
- default:
- throw new GLException("unsupported matrixGetName: "+matrixGetName);
- }
- }
-
- public void setDirty() {
- modified = DIRTY_MODELVIEW | DIRTY_PROJECTION | DIRTY_TEXTURE ;
- matrixMode = GL_MODELVIEW;
- }
-
- public int getDirtyBits() {
- return modified;
- }
-
- public boolean isDirty(final int matrixName) {
- boolean res;
- switch(matrixName) {
- case GL_MODELVIEW:
- res = (modified&DIRTY_MODELVIEW)!=0 ;
- break;
- case GL_PROJECTION:
- res = (modified&DIRTY_PROJECTION)!=0 ;
- break;
- case GL.GL_TEXTURE:
- res = (modified&DIRTY_TEXTURE)!=0 ;
- break;
- default:
- throw new GLException("unsupported matrixName: "+matrixName);
- }
- return res;
- }
-
- public boolean isDirty() {
- return modified!=0;
- }
-
- public boolean update() {
- // if(0==modified) return false;
-
- // int res = modified;
- int res = DIRTY_MODELVIEW | DIRTY_PROJECTION ;
- if( (res&DIRTY_MODELVIEW)!=0 ) {
- setMviMvit();
- }
- if( (res&DIRTY_MODELVIEW)!=0 || (res&DIRTY_PROJECTION)!=0 ) {
- glMultMatrixf(matrixP, matrixMv, matrixPmv);
- }
- modified=0;
- return res!=0;
- }
-
- public final int glGetMatrixMode() {
- return matrixMode;
- }
-
- public final FloatBuffer glGetTMatrixf() {
- return matrixT;
- }
-
- public final FloatBuffer glGetPMatrixf() {
- return matrixP;
- }
-
- public final FloatBuffer glGetMvMatrixf() {
- return matrixMv;
- }
-
- public final FloatBuffer glGetPMvMvitPmvMatrixf() {
- return matrixPMvMvitPmv;
- }
-
- public final FloatBuffer glGetPMvMvitMatrixf() {
- return matrixPMvMvit;
- }
-
- public final FloatBuffer glGetPMvMviMatrixf() {
- return matrixPMvMvi;
- }
-
- public final FloatBuffer glGetPMvMatrixf() {
- return matrixPMv;
- }
-
- public final FloatBuffer glGetMviMatrixf() {
- return matrixMvi;
- }
-
- public final FloatBuffer glGetPmvMatrixf() {
- return matrixPmv;
- }
-
- public final FloatBuffer glGetNormalMatrixf() {
- return matrixMvit3;
- }
-
- /*
- * @return the current matrix
- */
- public final FloatBuffer glGetMatrixf() {
- return glGetMatrixf(matrixMode);
- }
-
- /**
- * @param pname GL_MODELVIEW, GL_PROJECTION or GL.GL_TEXTURE
- * @return the given matrix
- */
- public final FloatBuffer glGetMatrixf(final int matrixName) {
- if(matrixName==GL_MODELVIEW) {
- return matrixMv;
- } else if(matrixName==GL_PROJECTION) {
- return matrixP;
- } else if(matrixName==GL.GL_TEXTURE) {
- return matrixT;
- } else {
- throw new GLException("unsupported matrixName: "+matrixName);
- }
- }
-
- public final void gluPerspective(final float fovy, final float aspect, final float zNear, final float zFar) {
- float top=(float)Math.tan(fovy*((float)Math.PI)/360.0f)*zNear;
- float bottom=-1.0f*top;
- float left=aspect*bottom;
- float right=aspect*top;
- glFrustumf(left, right, bottom, top, zNear, zFar);
- }
-
- public static final void glMultMatrixf(final FloatBuffer a, final FloatBuffer b, FloatBuffer p) {
- for (int i = 0; i < 4; i++) {
- final float ai0=a.get(i+0*4), ai1=a.get(i+1*4), ai2=a.get(i+2*4), ai3=a.get(i+3*4);
- p.put(i+0*4 , ai0 * b.get(0+0*4) + ai1 * b.get(1+0*4) + ai2 * b.get(2+0*4) + ai3 * b.get(3+0*4) );
- p.put(i+1*4 , ai0 * b.get(0+1*4) + ai1 * b.get(1+1*4) + ai2 * b.get(2+1*4) + ai3 * b.get(3+1*4) );
- p.put(i+2*4 , ai0 * b.get(0+2*4) + ai1 * b.get(1+2*4) + ai2 * b.get(2+2*4) + ai3 * b.get(3+2*4) );
- p.put(i+3*4 , ai0 * b.get(0+3*4) + ai1 * b.get(1+3*4) + ai2 * b.get(2+3*4) + ai3 * b.get(3+3*4) );
- }
- }
- public static final void glMultMatrixf(final FloatBuffer a, final float[] b, int b_off, FloatBuffer p) {
- for (int i = 0; i < 4; i++) {
- final float ai0=a.get(i+0*4), ai1=a.get(i+1*4), ai2=a.get(i+2*4), ai3=a.get(i+3*4);
- p.put(i+0*4 , ai0 * b[b_off+0+0*4] + ai1 * b[b_off+1+0*4] + ai2 * b[b_off+2+0*4] + ai3 * b[b_off+3+0*4] );
- p.put(i+1*4 , ai0 * b[b_off+0+1*4] + ai1 * b[b_off+1+1*4] + ai2 * b[b_off+2+1*4] + ai3 * b[b_off+3+1*4] );
- p.put(i+2*4 , ai0 * b[b_off+0+2*4] + ai1 * b[b_off+1+2*4] + ai2 * b[b_off+2+2*4] + ai3 * b[b_off+3+2*4] );
- p.put(i+3*4 , ai0 * b[b_off+0+3*4] + ai1 * b[b_off+1+3*4] + ai2 * b[b_off+2+3*4] + ai3 * b[b_off+3+3*4] );
- }
- }
-
- //
- // MatrixIf
- //
-
- public void glMatrixMode(final int matrixName) {
- switch(matrixName) {
- case GL_MODELVIEW:
- case GL_PROJECTION:
- case GL.GL_TEXTURE:
- break;
- default:
- throw new GLException("unsupported matrixName: "+matrixName);
- }
- matrixMode = matrixName;
- }
-
- public void glGetFloatv(int matrixGetName, FloatBuffer params) {
- int pos = params.position();
- if(matrixGetName==GL_MATRIX_MODE) {
- params.put((float)matrixMode);
- } else {
- FloatBuffer matrix = glGetMatrixf(matrixGetName2MatrixModeName(matrixGetName));
- params.put(matrix);
- matrix.rewind();
- }
- params.position(pos);
- }
- public void glGetFloatv(int matrixGetName, float[] params, int params_offset) {
- if(matrixGetName==GL_MATRIX_MODE) {
- params[params_offset]=(float)matrixMode;
- } else {
- FloatBuffer matrix = glGetMatrixf(matrixGetName2MatrixModeName(matrixGetName));
- matrix.get(params, params_offset, 16);
- matrix.rewind();
- }
- }
- public void glGetIntegerv(int pname, IntBuffer params) {
- int pos = params.position();
- if(pname==GL_MATRIX_MODE) {
- params.put(matrixMode);
- } else {
- throw new GLException("unsupported pname: "+pname);
- }
- params.position(pos);
- }
- public void glGetIntegerv(int pname, int[] params, int params_offset) {
- if(pname==GL_MATRIX_MODE) {
- params[params_offset]=matrixMode;
- } else {
- throw new GLException("unsupported pname: "+pname);
- }
- }
-
- public final void glLoadMatrixf(final float[] values, final int offset) {
- int len = values.length-offset;
- if(matrixMode==GL_MODELVIEW) {
- matrixMv.clear();
- matrixMv.put(values, offset, len);
- matrixMv.rewind();
- modified |= DIRTY_MODELVIEW ;
- } else if(matrixMode==GL_PROJECTION) {
- matrixP.clear();
- matrixP.put(values, offset, len);
- matrixP.rewind();
- modified |= DIRTY_PROJECTION ;
- } else if(matrixMode==GL.GL_TEXTURE) {
- matrixT.clear();
- matrixT.put(values, offset, len);
- matrixT.rewind();
- modified |= DIRTY_TEXTURE ;
- }
- }
-
- public final void glLoadMatrixf(java.nio.FloatBuffer m) {
- int spos = m.position();
- if(matrixMode==GL_MODELVIEW) {
- matrixMv.clear();
- matrixMv.put(m);
- matrixMv.rewind();
- modified |= DIRTY_MODELVIEW ;
- } else if(matrixMode==GL_PROJECTION) {
- matrixP.clear();
- matrixP.put(m);
- matrixP.rewind();
- modified |= DIRTY_PROJECTION ;
- } else if(matrixMode==GL.GL_TEXTURE) {
- matrixT.clear();
- matrixT.put(m);
- matrixT.rewind();
- modified |= DIRTY_TEXTURE ;
- }
- m.position(spos);
- }
-
- public final void glPopMatrix() {
- float[] stackEntry=null;
- if(matrixMode==GL_MODELVIEW) {
- stackEntry = (float[])matrixMvStack.remove(0);
- } else if(matrixMode==GL_PROJECTION) {
- stackEntry = (float[])matrixPStack.remove(0);
- } else if(matrixMode==GL.GL_TEXTURE) {
- stackEntry = (float[])matrixTStack.remove(0);
- }
- glLoadMatrixf(stackEntry, 0);
- }
-
- public final void glPushMatrix() {
- float[] stackEntry = new float[1*16];
- if(matrixMode==GL_MODELVIEW) {
- matrixMv.get(stackEntry);
- matrixMv.rewind();
- matrixMvStack.add(0, stackEntry);
- } else if(matrixMode==GL_PROJECTION) {
- matrixP.get(stackEntry);
- matrixP.rewind();
- matrixPStack.add(0, stackEntry);
- } else if(matrixMode==GL.GL_TEXTURE) {
- matrixT.get(stackEntry);
- matrixT.rewind();
- matrixTStack.add(0, stackEntry);
- }
- }
-
- public final void glLoadIdentity() {
- if(matrixMode==GL_MODELVIEW) {
- matrixMv.clear();
- matrixMv.put(matrixIdent);
- matrixMv.rewind();
- matrixIdent.rewind();
- modified |= DIRTY_MODELVIEW ;
- } else if(matrixMode==GL_PROJECTION) {
- matrixP.clear();
- matrixP.put(matrixIdent);
- matrixP.rewind();
- matrixIdent.rewind();
- modified |= DIRTY_PROJECTION ;
- } else if(matrixMode==GL.GL_TEXTURE) {
- matrixT.clear();
- matrixT.put(matrixIdent);
- matrixT.rewind();
- matrixIdent.rewind();
- modified |= DIRTY_TEXTURE ;
- }
- }
-
- public final void glMultMatrixf(final FloatBuffer m) {
- if(matrixMode==GL_MODELVIEW) {
- glMultMatrixf(matrixMv, m, matrixMult);
- matrixMv.clear();
- matrixMv.put(matrixMult);
- matrixMv.rewind();
- modified |= DIRTY_MODELVIEW ;
- } else if(matrixMode==GL_PROJECTION) {
- glMultMatrixf(matrixP, m, matrixMult);
- matrixP.clear();
- matrixP.put(matrixMult);
- matrixP.rewind();
- modified |= DIRTY_PROJECTION ;
- } else if(matrixMode==GL.GL_TEXTURE) {
- glMultMatrixf(matrixT, m, matrixMult);
- matrixT.clear();
- matrixT.put(matrixMult);
- matrixT.rewind();
- modified |= DIRTY_TEXTURE ;
- }
- matrixMult.rewind();
- }
-
- public void glMultMatrixf(float[] m, int m_offset) {
- if(matrixMode==GL_MODELVIEW) {
- glMultMatrixf(matrixMv, m, m_offset, matrixMult);
- matrixMv.clear();
- matrixMv.put(matrixMult);
- matrixMv.rewind();
- modified |= DIRTY_MODELVIEW ;
- } else if(matrixMode==GL_PROJECTION) {
- glMultMatrixf(matrixP, m, m_offset, matrixMult);
- matrixP.clear();
- matrixP.put(matrixMult);
- matrixP.rewind();
- modified |= DIRTY_PROJECTION ;
- } else if(matrixMode==GL.GL_TEXTURE) {
- glMultMatrixf(matrixT, m, m_offset, matrixMult);
- matrixT.clear();
- matrixT.put(matrixMult);
- matrixT.rewind();
- modified |= DIRTY_TEXTURE ;
- }
- matrixMult.rewind();
- }
-
- public final void glTranslatef(final float x, final float y, final float z) {
- // Translation matrix:
- // 1 0 0 x
- // 0 1 0 y
- // 0 0 1 z
- // 0 0 0 1
- matrixTrans.put(0+4*3, x);
- matrixTrans.put(1+4*3, y);
- matrixTrans.put(2+4*3, z);
- glMultMatrixf(matrixTrans);
- }
-
- public final void glRotatef(final float angdeg, float x, float y, float z) {
- float angrad = angdeg * (float) Math.PI / 180;
- float c = (float)Math.cos(angrad);
- float ic= 1.0f - c;
- float s = (float)Math.sin(angrad);
-
- vec3f[0]=x; vec3f[1]=y; vec3f[2]=z;
- projectFloat.normalize(vec3f);
- x = vec3f[0]; y = vec3f[1]; z = vec3f[2];
-
- // Rotation matrix:
- // xx(1−c)+c xy(1−c)+zs xz(1−c)-ys 0
- // xy(1−c)-zs yy(1−c)+c yz(1−c)+xs 0
- // xz(1−c)+ys yz(1−c)-xs zz(1−c)+c 0
- // 0 0 0 1
- float xy = x*y;
- float xz = x*z;
- float xs = x*s;
- float ys = y*s;
- float yz = y*z;
- float zs = z*s;
- matrixRot.put(0*4+0, x*x*ic+c);
- matrixRot.put(0*4+1, xy*ic+zs);
- matrixRot.put(0*4+2, xz*ic-ys);
-
- matrixRot.put(1*4+0, xy*ic-zs);
- matrixRot.put(1*4+1, y*y*ic+c);
- matrixRot.put(1*4+2, yz*ic+xs);
-
- matrixRot.put(2*4+0, xz*ic+ys);
- matrixRot.put(2*4+1, yz*ic-xs);
- matrixRot.put(2*4+2, z*z*ic+c);
-
- glMultMatrixf(matrixRot);
- }
-
- public final void glScalef(final float x, final float y, final float z) {
- // Scale matrix:
- // x 0 0 0
- // 0 y 0 0
- // 0 0 z 0
- // 0 0 0 1
- matrixScale.put(0+4*0, x);
- matrixScale.put(1+4*1, y);
- matrixScale.put(2+4*2, z);
-
- glMultMatrixf(matrixScale);
- }
-
- public final void glOrthof(final float left, final float right, final float bottom, final float top, final float zNear, final float zFar) {
- // Ortho matrix:
- // 2/dx 0 0 tx
- // 0 2/dy 0 ty
- // 0 0 2/dz tz
- // 0 0 0 1
- float dx=right-left;
- float dy=top-bottom;
- float dz=zFar-zNear;
- float tx=-1.0f*(right+left)/dx;
- float ty=-1.0f*(top+bottom)/dy;
- float tz=-1.0f*(zFar+zNear)/dz;
-
- matrixOrtho.put(0+4*0, 2.0f/dx);
- matrixOrtho.put(1+4*1, 2.0f/dy);
- matrixOrtho.put(2+4*2, -2.0f/dz);
- matrixOrtho.put(0+4*3, tx);
- matrixOrtho.put(1+4*3, ty);
- matrixOrtho.put(2+4*3, tz);
-
- glMultMatrixf(matrixOrtho);
- }
-
- public final void glFrustumf(final float left, final float right, final float bottom, final float top, final float zNear, final float zFar) {
- if(zNear<=0.0f||zFar<0.0f) {
- throw new GLException("GL_INVALID_VALUE: zNear and zFar must be positive, and zNear>0");
- }
- if(left==right || top==bottom) {
- throw new GLException("GL_INVALID_VALUE: top,bottom and left,right must not be equal");
- }
- // Frustum matrix:
- // 2*zNear/dx 0 A 0
- // 0 2*zNear/dy B 0
- // 0 0 C D
- // 0 0 −1 0
- float zNear2 = 2.0f*zNear;
- float dx=right-left;
- float dy=top-bottom;
- float dz=zFar-zNear;
- float A=(right+left)/dx;
- float B=(top+bottom)/dy;
- float C=-1.0f*(zFar+zNear)/dz;
- float D=-2.0f*(zFar*zNear)/dz;
-
- matrixFrustum.put(0+4*0, zNear2/dx);
- matrixFrustum.put(1+4*1, zNear2/dy);
- matrixFrustum.put(2+4*2, C);
-
- matrixFrustum.put(0+4*2, A);
- matrixFrustum.put(1+4*2, B);
-
- matrixFrustum.put(2+4*3, D);
- matrixFrustum.put(3+4*2, -1.0f);
-
- glMultMatrixf(matrixFrustum);
- }
-
- //
- // private
- //
-
- private final void setMviMvit() {
- if(!projectFloat.gluInvertMatrixf(matrixMv, matrixMvi)) {
- throw new GLException("Invalid source Mv matrix, can't compute inverse");
- }
-
- // transpose matrix
- for (int i = 0; i < 4; i++) {
- for (int j = 0; j < 4; j++) {
- matrixMvit.put(j+i*4, matrixMvi.get(i+j*4));
- }
- }
-
- // fetch 3x3
- for (int i = 0; i < 3; i++) {
- for (int j = 0; j < 3; j++) {
- matrixMvit3.put(i+j*3, matrixMvit.get(i+j*4));
- }
- }
- }
-
- protected FloatBuffer matrixIdent;
- protected FloatBuffer matrixTPMvMvitPmv, matrixPMvMvit, matrixPMvMvitPmv, matrixPMvMvi, matrixPMv, matrixP, matrixT, matrixMv, matrixMvi, matrixMvit, matrixPmv;
- protected FloatBuffer matrixMvit3;
- protected FloatBuffer localBuf, matrixMult, matrixTrans, matrixRot, matrixScale, matrixOrtho, matrixFrustum;
- protected float[] vec3f;
- protected List/*FloatBuffer*/ matrixTStack, matrixPStack, matrixMvStack;
- protected int matrixMode = GL_MODELVIEW;
- protected int modified = 0;
- protected ProjectFloat projectFloat;
-
- public static final int DIRTY_MODELVIEW = 1 << 0;
- public static final int DIRTY_PROJECTION = 1 << 1;
- public static final int DIRTY_TEXTURE = 1 << 2;
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/StreamUtil.java b/src/jogl/classes/com/sun/opengl/util/StreamUtil.java
deleted file mode 100755
index 8ad731743..000000000
--- a/src/jogl/classes/com/sun/opengl/util/StreamUtil.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.util;
-
-import java.io.*;
-import java.nio.*;
-
-/** Utilities for dealing with streams. */
-
-public class StreamUtil {
- private StreamUtil() {}
-
- public static byte[] readAll2Array(InputStream stream) throws IOException {
- BytesRead bytesRead = readAllImpl(stream);
- byte[] data = bytesRead.data;
- if (bytesRead.payloadLen != data.length) {
- data = new byte[bytesRead.payloadLen];
- System.arraycopy(bytesRead.data, 0, data, 0, bytesRead.payloadLen);
- }
- return data;
- }
-
- public static ByteBuffer readAll2Buffer(InputStream stream) throws IOException {
- BytesRead bytesRead = readAllImpl(stream);
- return BufferUtil.newByteBuffer(bytesRead.data, 0, bytesRead.payloadLen);
- }
-
- private static BytesRead readAllImpl(InputStream stream) throws IOException {
- // FIXME: Shall we do this here ?
- if( !(stream instanceof BufferedInputStream) ) {
- stream = new BufferedInputStream(stream);
- }
- int avail = stream.available();
- byte[] data = new byte[avail];
- int numRead = 0;
- int pos = 0;
- do {
- if (pos + avail > data.length) {
- byte[] newData = new byte[pos + avail];
- System.arraycopy(data, 0, newData, 0, pos);
- data = newData;
- }
- numRead = stream.read(data, pos, avail);
- if (numRead >= 0) {
- pos += numRead;
- }
- avail = stream.available();
- } while (avail > 0 && numRead >= 0);
-
- return new BytesRead(pos, data);
- }
-
- private static class BytesRead {
- BytesRead(int payloadLen, byte[] data) {
- this.payloadLen=payloadLen;
- this.data=data;
- }
- int payloadLen;
- byte[] data;
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/TGAWriter.java b/src/jogl/classes/com/sun/opengl/util/TGAWriter.java
deleted file mode 100755
index c5b1041a0..000000000
--- a/src/jogl/classes/com/sun/opengl/util/TGAWriter.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (c) 2005 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- */
-
-package com.sun.opengl.util;
-
-import java.io.*;
-import java.nio.*;
-import java.nio.channels.*;
-
-/**
- * Utility class which helps take fast screenshots of OpenGL rendering
- * results into Targa-format files. Used by the {@link
- * com.sun.opengl.util.gl2.Screenshot Screenshot} class; can also be used
- * in conjunction with the {@link com.sun.opengl.util.gl2.TileRenderer
- * TileRenderer} class.
- */
-
-public class TGAWriter {
- private static final int TARGA_HEADER_SIZE = 18;
-
- private FileChannel ch;
- private ByteBuffer buf;
-
- /** Constructor for the TGAWriter. */
- public TGAWriter() {
- }
-
- /**
- * Opens the specified Targa file for writing, overwriting any
- * existing file, and sets up the header of the file expecting the
- * data to be filled in before closing it.
- *
- * @param file the file to write containing the screenshot
- * @param width the width of the current drawable
- * @param height the height of the current drawable
- * @param alpha whether the alpha channel should be saved. If true,
- * requires GL_EXT_abgr extension to be present.
- *
- * @throws IOException if an I/O error occurred while writing the
- * file
- */
- public void open(File file,
- int width,
- int height,
- boolean alpha) throws IOException {
- RandomAccessFile out = new RandomAccessFile(file, "rw");
- ch = out.getChannel();
- int pixelSize = (alpha ? 32 : 24);
- int numChannels = (alpha ? 4 : 3);
-
- int fileLength = TARGA_HEADER_SIZE + width * height * numChannels;
- out.setLength(fileLength);
- MappedByteBuffer image = ch.map(FileChannel.MapMode.READ_WRITE, 0, fileLength);
-
- // write the TARGA header
- image.put(0, (byte) 0).put(1, (byte) 0);
- image.put(2, (byte) 2); // uncompressed type
- image.put(12, (byte) (width & 0xFF)); // width
- image.put(13, (byte) (width >> 8)); // width
- image.put(14, (byte) (height & 0xFF)); // height
- image.put(15, (byte) (height >> 8)); // height
- image.put(16, (byte) pixelSize); // pixel size
-
- // go to image data position
- image.position(TARGA_HEADER_SIZE);
- // jogl needs a sliced buffer
- buf = image.slice();
- }
-
- /**
- * Returns the ByteBuffer corresponding to the data for the image.
- * This must be filled in with data in either BGR or BGRA format
- * depending on whether an alpha channel was specified during
- * open().
- */
- public ByteBuffer getImageData() {
- return buf;
- }
-
- public void close() throws IOException {
- // close the file channel
- ch.close();
- buf = null;
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/awt/ImageUtil.java b/src/jogl/classes/com/sun/opengl/util/awt/ImageUtil.java
deleted file mode 100755
index 534ab444d..000000000
--- a/src/jogl/classes/com/sun/opengl/util/awt/ImageUtil.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (c) 2005 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.util.awt;
-
-import java.awt.*;
-import java.awt.image.*;
-
-/** Utilities for dealing with images. */
-
-public class ImageUtil {
- private ImageUtil() {}
-
- /** Flips the supplied BufferedImage vertically. This is often a
- necessary conversion step to display a Java2D image correctly
- with OpenGL and vice versa. */
- public static void flipImageVertically(BufferedImage image) {
- WritableRaster raster = image.getRaster();
- Object scanline1 = null;
- Object scanline2 = null;
-
- for (int i = 0; i < image.getHeight() / 2; i++) {
- scanline1 = raster.getDataElements(0, i, image.getWidth(), 1, scanline1);
- scanline2 = raster.getDataElements(0, image.getHeight() - i - 1, image.getWidth(), 1, scanline2);
- raster.setDataElements(0, i, image.getWidth(), 1, scanline2);
- raster.setDataElements(0, image.getHeight() - i - 1, image.getWidth(), 1, scanline1);
- }
- }
-
- /**
- * Creates a
- *
- * No alpha channel is written with this variant.
- *
- * @param file the file to write containing the screenshot
- * @param width the width of the current drawable
- * @param height the height of the current drawable
- *
- * @throws GLException if an OpenGL context was not current or
- * another OpenGL-related error occurred
- * @throws IOException if an I/O error occurred while writing the
- * file
- */
- public static void writeToTargaFile(File file,
- int width,
- int height) throws GLException, IOException {
- writeToTargaFile(file, width, height, false);
- }
-
- /**
- * Takes a fast screenshot of the current OpenGL drawable to a Targa
- * file. Requires the OpenGL context for the desired drawable to be
- * current. Takes the screenshot from the last assigned read buffer,
- * or the OpenGL default read buffer if none has been specified by
- * the user (GL_FRONT for single-buffered configurations and GL_BACK
- * for double-buffered configurations). This is the fastest
- * mechanism for taking a screenshot of an application. Contributed
- * by Carsten Weisse of Bytonic Software (http://bytonic.de/).
- *
- * @param file the file to write containing the screenshot
- * @param width the width of the current drawable
- * @param height the height of the current drawable
- * @param alpha whether the alpha channel should be saved. If true,
- * requires GL_EXT_abgr extension to be present.
- *
- * @throws GLException if an OpenGL context was not current or
- * another OpenGL-related error occurred
- * @throws IOException if an I/O error occurred while writing the
- * file
- */
- public static void writeToTargaFile(File file,
- int width,
- int height,
- boolean alpha) throws GLException, IOException {
- writeToTargaFile(file, 0, 0, width, height, alpha);
- }
-
- /**
- * Takes a fast screenshot of the current OpenGL drawable to a Targa
- * file. Requires the OpenGL context for the desired drawable to be
- * current. Takes the screenshot from the last assigned read buffer,
- * or the OpenGL default read buffer if none has been specified by
- * the user (GL_FRONT for single-buffered configurations and GL_BACK
- * for double-buffered configurations). This is the fastest
- * mechanism for taking a screenshot of an application. Contributed
- * by Carsten Weisse of Bytonic Software (http://bytonic.de/).
- *
- * @param file the file to write containing the screenshot
- * @param x the starting x coordinate of the screenshot, measured from the lower-left
- * @param y the starting y coordinate of the screenshot, measured from the lower-left
- * @param width the width of the desired screenshot area
- * @param height the height of the desired screenshot area
- * @param alpha whether the alpha channel should be saved. If true,
- * requires GL_EXT_abgr extension to be present.
- *
- * @throws GLException if an OpenGL context was not current or
- * another OpenGL-related error occurred
- * @throws IOException if an I/O error occurred while writing the
- * file
- */
- public static void writeToTargaFile(File file,
- int x,
- int y,
- int width,
- int height,
- boolean alpha) throws GLException, IOException {
- if (alpha) {
- checkExtABGR();
- }
-
- TGAWriter writer = new TGAWriter();
- writer.open(file, width, height, alpha);
- ByteBuffer bgr = writer.getImageData();
-
- GL2 gl = GLUgl2.getCurrentGL2();
-
- // Set up pixel storage modes
- PixelStorageModes psm = new PixelStorageModes();
- psm.save(gl);
-
- int readbackType = (alpha ? GL2.GL_ABGR_EXT : GL2.GL_BGR);
-
- // read the BGR values into the image buffer
- gl.glReadPixels(x, y, width, height, readbackType,
- GL2.GL_UNSIGNED_BYTE, bgr);
-
- // Restore pixel storage modes
- psm.restore(gl);
-
- // close the file
- writer.close();
- }
-
- /**
- * Takes a screenshot of the current OpenGL drawable to a
- * BufferedImage. Requires the OpenGL context for the desired
- * drawable to be current. Takes the screenshot from the last
- * assigned read buffer, or the OpenGL default read buffer if none
- * has been specified by the user (GL_FRONT for single-buffered
- * configurations and GL_BACK for double-buffered configurations).
- * Note that the scanlines of the resulting image are flipped
- * vertically in order to correctly match the OpenGL contents, which
- * takes time and is therefore not as fast as the Targa screenshot
- * function.
- *
- * No alpha channel is read back with this variant.
- *
- * @param width the width of the current drawable
- * @param height the height of the current drawable
- *
- * @throws GLException if an OpenGL context was not current or
- * another OpenGL-related error occurred
- */
- public static BufferedImage readToBufferedImage(int width,
- int height) throws GLException {
- return readToBufferedImage(width, height, false);
- }
-
- /**
- * Takes a screenshot of the current OpenGL drawable to a
- * BufferedImage. Requires the OpenGL context for the desired
- * drawable to be current. Takes the screenshot from the last
- * assigned read buffer, or the OpenGL default read buffer if none
- * has been specified by the user (GL_FRONT for single-buffered
- * configurations and GL_BACK for double-buffered configurations).
- * Note that the scanlines of the resulting image are flipped
- * vertically in order to correctly match the OpenGL contents, which
- * takes time and is therefore not as fast as the Targa screenshot
- * function.
- *
- * @param width the width of the current drawable
- * @param height the height of the current drawable
- * @param alpha whether the alpha channel should be read back. If
- * true, requires GL_EXT_abgr extension to be present.
- *
- * @throws GLException if an OpenGL context was not current or
- * another OpenGL-related error occurred
- */
- public static BufferedImage readToBufferedImage(int width,
- int height,
- boolean alpha) throws GLException {
- return readToBufferedImage(0, 0, width, height, alpha);
- }
-
- /**
- * Takes a screenshot of the current OpenGL drawable to a
- * BufferedImage. Requires the OpenGL context for the desired
- * drawable to be current. Takes the screenshot from the last
- * assigned read buffer, or the OpenGL default read buffer if none
- * has been specified by the user (GL_FRONT for single-buffered
- * configurations and GL_BACK for double-buffered configurations).
- * Note that the scanlines of the resulting image are flipped
- * vertically in order to correctly match the OpenGL contents, which
- * takes time and is therefore not as fast as the Targa screenshot
- * function.
- *
- * @param x the starting x coordinate of the screenshot, measured from the lower-left
- * @param y the starting y coordinate of the screenshot, measured from the lower-left
- * @param width the width of the desired screenshot area
- * @param height the height of the desired screenshot area
- * @param alpha whether the alpha channel should be read back. If
- * true, requires GL_EXT_abgr extension to be present.
- *
- * @throws GLException if an OpenGL context was not current or
- * another OpenGL-related error occurred
- */
- public static BufferedImage readToBufferedImage(int x,
- int y,
- int width,
- int height,
- boolean alpha) throws GLException {
- int bufImgType = (alpha ? BufferedImage.TYPE_4BYTE_ABGR : BufferedImage.TYPE_3BYTE_BGR);
- int readbackType = (alpha ? GL2.GL_ABGR_EXT : GL2.GL_BGR);
-
- if (alpha) {
- checkExtABGR();
- }
-
- // Allocate necessary storage
- BufferedImage image = new BufferedImage(width, height, bufImgType);
-
- GL2 gl = GLUgl2.getCurrentGL2();
-
- // Set up pixel storage modes
- PixelStorageModes psm = new PixelStorageModes();
- psm.save(gl);
-
- // read the BGR values into the image
- gl.glReadPixels(x, y, width, height, readbackType,
- GL2.GL_UNSIGNED_BYTE,
- ByteBuffer.wrap(((DataBufferByte) image.getRaster().getDataBuffer()).getData()));
-
- // Restore pixel storage modes
- psm.restore(gl);
-
- // Must flip BufferedImage vertically for correct results
- ImageUtil.flipImageVertically(image);
- return image;
- }
-
- /**
- * Takes a screenshot of the current OpenGL drawable to the
- * specified file on disk using the ImageIO package. Requires the
- * OpenGL context for the desired drawable to be current. Takes the
- * screenshot from the last assigned read buffer, or the OpenGL
- * default read buffer if none has been specified by the user
- * (GL_FRONT for single-buffered configurations and GL_BACK for
- * double-buffered configurations). This is not the fastest
- * mechanism for taking a screenshot but may be more convenient than
- * others for getting images for consumption by other packages. The
- * file format is inferred from the suffix of the given file.
- *
- * No alpha channel is saved with this variant.
- *
- * @param file the file to write containing the screenshot
- * @param width the width of the current drawable
- * @param height the height of the current drawable
- *
- * @throws GLException if an OpenGL context was not current or
- * another OpenGL-related error occurred
- *
- * @throws IOException if an I/O error occurred or if the file could
- * not be written to disk due to the requested file format being
- * unsupported by ImageIO
- */
- public static void writeToFile(File file,
- int width,
- int height) throws IOException, GLException {
- writeToFile(file, width, height, false);
- }
-
- /**
- * Takes a screenshot of the current OpenGL drawable to the
- * specified file on disk using the ImageIO package. Requires the
- * OpenGL context for the desired drawable to be current. Takes the
- * screenshot from the last assigned read buffer, or the OpenGL
- * default read buffer if none has been specified by the user
- * (GL_FRONT for single-buffered configurations and GL_BACK for
- * double-buffered configurations). This is not the fastest
- * mechanism for taking a screenshot but may be more convenient than
- * others for getting images for consumption by other packages. The
- * file format is inferred from the suffix of the given file.
- *
- * Note that some file formats, in particular JPEG, can not handle
- * an alpha channel properly. If the "alpha" argument is specified
- * as true for such a file format it will be silently ignored.
- *
- * @param file the file to write containing the screenshot
- * @param width the width of the current drawable
- * @param height the height of the current drawable
- * @param alpha whether an alpha channel should be saved. If true,
- * requires GL_EXT_abgr extension to be present.
- *
- * @throws GLException if an OpenGL context was not current or
- * another OpenGL-related error occurred
- *
- * @throws IOException if an I/O error occurred or if the file could
- * not be written to disk due to the requested file format being
- * unsupported by ImageIO
- */
- public static void writeToFile(File file,
- int width,
- int height,
- boolean alpha) throws IOException, GLException {
- writeToFile(file, 0, 0, width, height, alpha);
- }
-
- /**
- * Takes a screenshot of the current OpenGL drawable to the
- * specified file on disk using the ImageIO package. Requires the
- * OpenGL context for the desired drawable to be current. Takes the
- * screenshot from the last assigned read buffer, or the OpenGL
- * default read buffer if none has been specified by the user
- * (GL_FRONT for single-buffered configurations and GL_BACK for
- * double-buffered configurations). This is not the fastest
- * mechanism for taking a screenshot but may be more convenient than
- * others for getting images for consumption by other packages. The
- * file format is inferred from the suffix of the given file.
- *
- * Note that some file formats, in particular JPEG, can not handle
- * an alpha channel properly. If the "alpha" argument is specified
- * as true for such a file format it will be silently ignored.
- *
- * @param file the file to write containing the screenshot
- * @param x the starting x coordinate of the screenshot, measured from the lower-left
- * @param y the starting y coordinate of the screenshot, measured from the lower-left
- * @param width the width of the current drawable
- * @param height the height of the current drawable
- * @param alpha whether an alpha channel should be saved. If true,
- * requires GL_EXT_abgr extension to be present.
- *
- * @throws GLException if an OpenGL context was not current or
- * another OpenGL-related error occurred
- *
- * @throws IOException if an I/O error occurred or if the file could
- * not be written to disk due to the requested file format being
- * unsupported by ImageIO
- */
- public static void writeToFile(File file,
- int x,
- int y,
- int width,
- int height,
- boolean alpha) throws IOException, GLException {
- String fileSuffix = FileUtil.getFileSuffix(file);
- if (alpha && (fileSuffix.equals("jpg") || fileSuffix.equals("jpeg"))) {
- // JPEGs can't deal properly with alpha channels
- alpha = false;
- }
-
- BufferedImage image = readToBufferedImage(x, y, width, height, alpha);
- if (!ImageIO.write(image, fileSuffix, file)) {
- throw new IOException("Unsupported file format " + fileSuffix);
- }
- }
-
- private static int glGetInteger(GL2 gl, int pname, int[] tmp) {
- gl.glGetIntegerv(pname, tmp, 0);
- return tmp[0];
- }
-
- private static void checkExtABGR() {
- GL2 gl = GLUgl2.getCurrentGL2();
- if (!gl.isExtensionAvailable("GL_EXT_abgr")) {
- throw new IllegalArgumentException("Saving alpha channel requires GL_EXT_abgr");
- }
- }
-
- static class PixelStorageModes {
- int packAlignment;
- int packRowLength;
- int packSkipRows;
- int packSkipPixels;
- int packSwapBytes;
- int[] tmp = new int[1];
-
- void save(GL2 gl) {
- packAlignment = glGetInteger(gl, GL2.GL_PACK_ALIGNMENT, tmp);
- packRowLength = glGetInteger(gl, GL2.GL_PACK_ROW_LENGTH, tmp);
- packSkipRows = glGetInteger(gl, GL2.GL_PACK_SKIP_ROWS, tmp);
- packSkipPixels = glGetInteger(gl, GL2.GL_PACK_SKIP_PIXELS, tmp);
- packSwapBytes = glGetInteger(gl, GL2.GL_PACK_SWAP_BYTES, tmp);
-
- gl.glPixelStorei(GL2.GL_PACK_ALIGNMENT, 1);
- gl.glPixelStorei(GL2.GL_PACK_ROW_LENGTH, 0);
- gl.glPixelStorei(GL2.GL_PACK_SKIP_ROWS, 0);
- gl.glPixelStorei(GL2.GL_PACK_SKIP_PIXELS, 0);
- gl.glPixelStorei(GL2.GL_PACK_SWAP_BYTES, 0);
- }
-
- void restore(GL2 gl) {
- gl.glPixelStorei(GL2.GL_PACK_ALIGNMENT, packAlignment);
- gl.glPixelStorei(GL2.GL_PACK_ROW_LENGTH, packRowLength);
- gl.glPixelStorei(GL2.GL_PACK_SKIP_ROWS, packSkipRows);
- gl.glPixelStorei(GL2.GL_PACK_SKIP_PIXELS, packSkipPixels);
- gl.glPixelStorei(GL2.GL_PACK_SWAP_BYTES, packSwapBytes);
- }
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/awt/TextRenderer.java b/src/jogl/classes/com/sun/opengl/util/awt/TextRenderer.java
deleted file mode 100755
index 059ead63d..000000000
--- a/src/jogl/classes/com/sun/opengl/util/awt/TextRenderer.java
+++ /dev/null
@@ -1,1951 +0,0 @@
-/*
- * Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-package com.sun.opengl.util.awt;
-
-import com.sun.opengl.impl.Debug;
-import com.sun.opengl.util.*;
-import com.sun.opengl.util.packrect.*;
-import com.sun.opengl.util.texture.*;
-import com.sun.opengl.util.texture.awt.*;
-
-import java.awt.AlphaComposite;
-import java.awt.Color;
-import java.awt.Composite;
-
-// For debugging purposes
-import java.awt.EventQueue;
-import java.awt.Font;
-import java.awt.Frame;
-import java.awt.Graphics2D;
-import java.awt.Image;
-import java.awt.Point;
-import java.awt.RenderingHints;
-import java.awt.event.*;
-import java.awt.font.*;
-import java.awt.geom.*;
-
-import java.nio.*;
-
-import java.text.*;
-
-import java.util.*;
-
-import javax.media.opengl.*;
-import javax.media.opengl.glu.*;
-import javax.media.opengl.glu.gl2.*;
-import javax.media.opengl.awt.*;
-
-
-/** Renders bitmapped Java 2D text into an OpenGL window with high
- performance, full Unicode support, and a simple API. Performs
- appropriate caching of text rendering results in an OpenGL texture
- internally to avoid repeated font rasterization. The caching is
- completely automatic, does not require any user intervention, and
- has no visible controls in the public API.
-
- Using the {@link TextRenderer TextRenderer} is simple. Add a
- " In the {@link javax.media.opengl.GLEventListener#display display} method of your
- {@link javax.media.opengl.GLEventListener GLEventListener}, add:
-
-
- Note that the TextRenderer may cause the vertex and texture
- coordinate array buffer bindings to change, or to be unbound. This
- is important to note if you are using Vertex Buffer Objects (VBOs)
- in your application.
-
- Internally, the renderer uses a rectangle packing algorithm to
- pack both glyphs and full Strings' rendering results (which are
- variable size) onto a larger OpenGL texture. The internal backing
- store is maintained using a {@link
- com.sun.opengl.util.awt.TextureRenderer TextureRenderer}. A least
- recently used (LRU) algorithm is used to discard previously
- rendered strings; the specific algorithm is undefined, but is
- currently implemented by flushing unused Strings' rendering
- results every few hundred rendering cycles, where a rendering
- cycle is defined as a pair of calls to {@link #beginRendering
- beginRendering} / {@link #endRendering endRendering}.
-
- @author John Burkey
- @author Kenneth Russell
-*/
-public class TextRenderer {
- private static final boolean DEBUG = Debug.debug("TextRenderer");
-
- // These are occasionally useful for more in-depth debugging
- private static final boolean DISABLE_GLYPH_CACHE = false;
- private static final boolean DRAW_BBOXES = false;
-
- static final int kSize = 256;
-
- // Every certain number of render cycles, flush the strings which
- // haven't been used recently
- private static final int CYCLES_PER_FLUSH = 100;
-
- // The amount of vertical dead space on the backing store before we
- // force a compaction
- private static final float MAX_VERTICAL_FRAGMENTATION = 0.7f;
- static final int kQuadsPerBuffer = 100;
- static final int kCoordsPerVertVerts = 3;
- static final int kCoordsPerVertTex = 2;
- static final int kVertsPerQuad = 4;
- static final int kTotalBufferSizeVerts = kQuadsPerBuffer * kVertsPerQuad;
- static final int kTotalBufferSizeCoordsVerts = kQuadsPerBuffer * kVertsPerQuad * kCoordsPerVertVerts;
- static final int kTotalBufferSizeCoordsTex = kQuadsPerBuffer * kVertsPerQuad * kCoordsPerVertTex;
- static final int kTotalBufferSizeBytesVerts = kTotalBufferSizeCoordsVerts * 4;
- static final int kTotalBufferSizeBytesTex = kTotalBufferSizeCoordsTex * 4;
- static final int kSizeInBytes_OneVertices_VertexData = kCoordsPerVertVerts * 4;
- static final int kSizeInBytes_OneVertices_TexData = kCoordsPerVertTex * 4;
- private Font font;
- private boolean antialiased;
- private boolean useFractionalMetrics;
-
- // Whether we're attempting to use automatic mipmap generation support
- private boolean mipmap;
- private RectanglePacker packer;
- private boolean haveMaxSize;
- private RenderDelegate renderDelegate;
- private TextureRenderer cachedBackingStore;
- private Graphics2D cachedGraphics;
- private FontRenderContext cachedFontRenderContext;
- private Map /*
-
- Glyphs need to be able to re-upload themselves to the backing
- store on demand as we go along in the render sequence.
- */
-
- class Glyph {
- // If this Glyph represents an individual unicode glyph, this
- // is its unicode ID. If it represents a String, this is -1.
- private int unicodeID;
- // If the above field isn't -1, then these fields are used.
- // The glyph code in the font
- private int glyphCode;
- // The GlyphProducer which created us
- private GlyphProducer producer;
- // The advance of this glyph
- private float advance;
- // The GlyphVector for this single character; this is passed
- // in during construction but cleared during the upload
- // process
- private GlyphVector singleUnicodeGlyphVector;
- // The rectangle of this glyph on the backing store, or null
- // if it has been cleared due to space pressure
- private Rect glyphRectForTextureMapping;
- // If this Glyph represents a String, this is the sequence of
- // characters
- private String str;
- // Whether we need a valid advance when rendering this string
- // (i.e., whether it has other single glyphs coming after it)
- private boolean needAdvance;
-
- // Creates a Glyph representing an individual Unicode character
- public Glyph(int unicodeID,
- int glyphCode,
- float advance,
- GlyphVector singleUnicodeGlyphVector,
- GlyphProducer producer) {
- this.unicodeID = unicodeID;
- this.glyphCode = glyphCode;
- this.advance = advance;
- this.singleUnicodeGlyphVector = singleUnicodeGlyphVector;
- this.producer = producer;
- }
-
- // Creates a Glyph representing a sequence of characters, with
- // an indication of whether additional single glyphs are being
- // rendered after it
- public Glyph(String str, boolean needAdvance) {
- this.str = str;
- this.needAdvance = needAdvance;
- }
-
- /** Returns this glyph's unicode ID */
- public int getUnicodeID() {
- return unicodeID;
- }
-
- /** Returns this glyph's (font-specific) glyph code */
- public int getGlyphCode() {
- return glyphCode;
- }
-
- /** Returns the advance for this glyph */
- public float getAdvance() {
- return advance;
- }
-
- /** Draws this glyph and returns the (x) advance for this glyph */
- public float draw3D(float inX, float inY, float z, float scaleFactor) {
- if (str != null) {
- draw3D_ROBUST(str, inX, inY, z, scaleFactor);
- if (!needAdvance) {
- return 0;
- }
- // Compute and return the advance for this string
- GlyphVector gv = font.createGlyphVector(getFontRenderContext(), str);
- float totalAdvance = 0;
- for (int i = 0; i < gv.getNumGlyphs(); i++) {
- totalAdvance += gv.getGlyphMetrics(i).getAdvance();
- }
- return totalAdvance;
- }
-
- // This is the code path taken for individual glyphs
- if (glyphRectForTextureMapping == null) {
- upload();
- }
-
- try {
- if (mPipelinedQuadRenderer == null) {
- mPipelinedQuadRenderer = new Pipelined_QuadRenderer();
- }
-
- TextureRenderer renderer = getBackingStore();
- // Handles case where NPOT texture is used for backing store
- TextureCoords wholeImageTexCoords = renderer.getTexture().getImageTexCoords();
- float xScale = wholeImageTexCoords.right();
- float yScale = wholeImageTexCoords.bottom();
-
- Rect rect = glyphRectForTextureMapping;
- TextData data = (TextData) rect.getUserData();
- data.markUsed();
-
- Rectangle2D origRect = data.origRect();
-
- float x = inX - (scaleFactor * data.origOriginX());
- float y = inY - (scaleFactor * ((float) origRect.getHeight() - data.origOriginY()));
-
- int texturex = rect.x() + (data.origin().x - data.origOriginX());
- int texturey = renderer.getHeight() - rect.y() - (int) origRect.getHeight() -
- (data.origin().y - data.origOriginY());
- int width = (int) origRect.getWidth();
- int height = (int) origRect.getHeight();
-
- float tx1 = xScale * (float) texturex / (float) renderer.getWidth();
- float ty1 = yScale * (1.0f -
- ((float) texturey / (float) renderer.getHeight()));
- float tx2 = xScale * (float) (texturex + width) / (float) renderer.getWidth();
- float ty2 = yScale * (1.0f -
- ((float) (texturey + height) / (float) renderer.getHeight()));
-
- mPipelinedQuadRenderer.glTexCoord2f(tx1, ty1);
- mPipelinedQuadRenderer.glVertex3f(x, y, z);
- mPipelinedQuadRenderer.glTexCoord2f(tx2, ty1);
- mPipelinedQuadRenderer.glVertex3f(x + (width * scaleFactor), y,
- z);
- mPipelinedQuadRenderer.glTexCoord2f(tx2, ty2);
- mPipelinedQuadRenderer.glVertex3f(x + (width * scaleFactor),
- y + (height * scaleFactor), z);
- mPipelinedQuadRenderer.glTexCoord2f(tx1, ty2);
- mPipelinedQuadRenderer.glVertex3f(x,
- y + (height * scaleFactor), z);
- } catch (Exception e) {
- e.printStackTrace();
- }
- return advance;
- }
-
- /** Notifies this glyph that it's been cleared out of the cache */
- public void clear() {
- glyphRectForTextureMapping = null;
- }
-
- private void upload() {
- GlyphVector gv = getGlyphVector();
- Rectangle2D origBBox = preNormalize(renderDelegate.getBounds(gv, getFontRenderContext()));
- Rectangle2D bbox = normalize(origBBox);
- Point origin = new Point((int) -bbox.getMinX(),
- (int) -bbox.getMinY());
- Rect rect = new Rect(0, 0, (int) bbox.getWidth(),
- (int) bbox.getHeight(),
- new TextData(null, origin, origBBox, unicodeID));
- packer.add(rect);
- glyphRectForTextureMapping = rect;
- Graphics2D g = getGraphics2D();
- // OK, should now have an (x, y) for this rectangle; rasterize
- // the glyph
- int strx = rect.x() + origin.x;
- int stry = rect.y() + origin.y;
-
- // Clear out the area we're going to draw into
- g.setComposite(AlphaComposite.Clear);
- g.fillRect(rect.x(), rect.y(), rect.w(), rect.h());
- g.setComposite(AlphaComposite.Src);
-
- // Draw the string
- renderDelegate.drawGlyphVector(g, gv, strx, stry);
-
- if (DRAW_BBOXES) {
- TextData data = (TextData) rect.getUserData();
- // Draw a bounding box on the backing store
- g.drawRect(strx - data.origOriginX(),
- stry - data.origOriginY(),
- (int) data.origRect().getWidth(),
- (int) data.origRect().getHeight());
- g.drawRect(strx - data.origin().x,
- stry - data.origin().y,
- rect.w(),
- rect.h());
- }
-
- // Mark this region of the TextureRenderer as dirty
- getBackingStore().markDirty(rect.x(), rect.y(), rect.w(),
- rect.h());
- // Re-register ourselves with our producer
- producer.register(this);
- }
-
- private GlyphVector getGlyphVector() {
- GlyphVector gv = singleUnicodeGlyphVector;
- if (gv != null) {
- singleUnicodeGlyphVector = null; // Don't need this anymore
- return gv;
- }
- singleUnicode[0] = (char) unicodeID;
- return font.createGlyphVector(getFontRenderContext(), singleUnicode);
- }
- }
-
- class GlyphProducer {
- final int undefined = -2;
- FontRenderContext fontRenderContext;
- List/*
-
- Each component ranges from 0.0f - 1.0f. The alpha component, if
- used, does not need to be premultiplied into the color channels
- as described in the documentation for {@link
- com.sun.opengl.util.texture.Texture Texture}, although
- premultiplied colors are used internally. The default color is
- opaque white.
-
- @param r the red component of the new color
- @param g the green component of the new color
- @param b the blue component of the new color
- @param a the alpha component of the new color, 0.0f = completely
- transparent, 1.0f = completely opaque
- @throws GLException If an OpenGL context is not current when this method is called
- */
- public void setColor(float r, float g, float b, float a) throws GLException {
- GL2 gl = GLContext.getCurrentGL().getGL2();
- this.r = r * a;
- this.g = g * a;
- this.b = b * a;
- this.a = a;
-
- gl.glColor4f(this.r, this.g, this.b, this.a);
- }
-
- private float[] compArray;
- /** Changes the current color of this TextureRenderer to the
- supplied one. The default color is opaque white. See {@link
- #setColor(float,float,float,float) setColor} for more details.
-
- @param color the new color to use for rendering
- @throws GLException If an OpenGL context is not current when this method is called
- */
- public void setColor(Color color) throws GLException {
- // Get color's RGBA components as floats in the range [0,1].
- if (compArray == null) {
- compArray = new float[4];
- }
- color.getRGBComponents(compArray);
- setColor(compArray[0], compArray[1], compArray[2], compArray[3]);
- }
-
- /** Draws an orthographically projected rectangle containing all of
- the underlying texture to the specified location on the
- screen. All (x, y) coordinates are specified relative to the
- lower left corner of either the texture image or the current
- OpenGL drawable. This method is equivalent to
-
-
- Copyright (c) Mark J. Kilgard, 1994, 1997.
-
- (c) Copyright 1993, Silicon Graphics, Inc.
-
- ALL RIGHTS RESERVED
-
- Permission to use, copy, modify, and distribute this software
- for any purpose and without fee is hereby granted, provided
- that the above copyright notice appear in all copies and that
- both the copyright notice and this permission notice appear in
- supporting documentation, and that the name of Silicon
- Graphics, Inc. not be used in advertising or publicity
- pertaining to distribution of the software without specific,
- written prior permission.
-
- THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU
- "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR
- OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
- MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO
- EVENT SHALL SILICON GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE
- ELSE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT OR
- CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER,
- INCLUDING WITHOUT LIMITATION, LOSS OF PROFIT, LOSS OF USE,
- SAVINGS OR REVENUE, OR THE CLAIMS OF THIRD PARTIES, WHETHER OR
- NOT SILICON GRAPHICS, INC. HAS BEEN ADVISED OF THE POSSIBILITY
- OF SUCH LOSS, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- ARISING OUT OF OR IN CONNECTION WITH THE POSSESSION, USE OR
- PERFORMANCE OF THIS SOFTWARE.
-
- US Government Users Restricted Rights
-
- Use, duplication, or disclosure by the Government is subject to
- restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
- (c)(1)(ii) of the Rights in Technical Data and Computer
- Software clause at DFARS 252.227-7013 and/or in similar or
- successor clauses in the FAR or the DOD or NASA FAR
- Supplement. Unpublished-- rights reserved under the copyright
- laws of the United States. Contractor/manufacturer is Silicon
- Graphics, Inc., 2011 N. Shoreline Blvd., Mountain View, CA
- 94039-7311.
-
- OpenGL(TM) is a trademark of Silicon Graphics, Inc.
-*/
-
-public class GLUT {
- public static final int STROKE_ROMAN = 0;
- public static final int STROKE_MONO_ROMAN = 1;
- public static final int BITMAP_9_BY_15 = 2;
- public static final int BITMAP_8_BY_13 = 3;
- public static final int BITMAP_TIMES_ROMAN_10 = 4;
- public static final int BITMAP_TIMES_ROMAN_24 = 5;
- public static final int BITMAP_HELVETICA_10 = 6;
- public static final int BITMAP_HELVETICA_12 = 7;
- public static final int BITMAP_HELVETICA_18 = 8;
-
- private GLUgl2 glu = new GLUgl2();
-
- //----------------------------------------------------------------------
- // Shapes
- //
-
- public void glutWireSphere(double radius, int slices, int stacks) {
- quadObjInit(glu);
- glu.gluQuadricDrawStyle(quadObj, GLU.GLU_LINE);
- glu.gluQuadricNormals(quadObj, GLU.GLU_SMOOTH);
- /* If we ever changed/used the texture or orientation state
- of quadObj, we'd need to change it to the defaults here
- with gluQuadricTexture and/or gluQuadricOrientation. */
- glu.gluSphere(quadObj, radius, slices, stacks);
- }
-
- public void glutSolidSphere(double radius, int slices, int stacks) {
- quadObjInit(glu);
- glu.gluQuadricDrawStyle(quadObj, GLU.GLU_FILL);
- glu.gluQuadricNormals(quadObj, GLU.GLU_SMOOTH);
- /* If we ever changed/used the texture or orientation state
- of quadObj, we'd need to change it to the defaults here
- with gluQuadricTexture and/or gluQuadricOrientation. */
- glu.gluSphere(quadObj, radius, slices, stacks);
- }
-
- public void glutWireCone(double base, double height,
- int slices, int stacks) {
- quadObjInit(glu);
- glu.gluQuadricDrawStyle(quadObj, GLU.GLU_LINE);
- glu.gluQuadricNormals(quadObj, GLU.GLU_SMOOTH);
- /* If we ever changed/used the texture or orientation state
- of quadObj, we'd need to change it to the defaults here
- with gluQuadricTexture and/or gluQuadricOrientation. */
- glu.gluCylinder(quadObj, base, 0.0, height, slices, stacks);
- }
-
- public void glutSolidCone(double base, double height,
- int slices, int stacks) {
- quadObjInit(glu);
- glu.gluQuadricDrawStyle(quadObj, GLU.GLU_FILL);
- glu.gluQuadricNormals(quadObj, GLU.GLU_SMOOTH);
- /* If we ever changed/used the texture or orientation state
- of quadObj, we'd need to change it to the defaults here
- with gluQuadricTexture and/or gluQuadricOrientation. */
- glu.gluCylinder(quadObj, base, 0.0, height, slices, stacks);
- }
-
- public void glutWireCylinder(double radius, double height, int slices, int stacks) {
- quadObjInit(glu);
- glu.gluQuadricDrawStyle(quadObj, GLU.GLU_LINE);
- glu.gluQuadricNormals(quadObj, GLU.GLU_SMOOTH);
- /* If we ever changed/used the texture or orientation state
- of quadObj, we'd need to change it to the defaults here
- with gluQuadricTexture and/or gluQuadricOrientation. */
- glu.gluCylinder(quadObj, radius, radius, height, slices, stacks);
- }
-
- public void glutSolidCylinder(double radius, double height, int slices, int stacks) {
- GL2 gl = GLUgl2.getCurrentGL2();
-
- // Prepare table of points for drawing end caps
- double [] x = new double[slices];
- double [] y = new double[slices];
- double angleDelta = Math.PI * 2 / slices;
- double angle = 0;
- for (int i = 0 ; i < slices ; i ++) {
- angle = i * angleDelta;
- x[i] = Math.cos(angle) * radius;
- y[i] = Math.sin(angle) * radius;
- }
-
- // Draw bottom cap
- gl.glBegin(GL2.GL_TRIANGLE_FAN);
- gl.glNormal3d(0,0,-1);
- gl.glVertex3d(0,0,0);
- for (int i = 0 ; i < slices ; i ++) {
- gl.glVertex3d(x[i], y[i], 0);
- }
- gl.glVertex3d(x[0], y[0], 0);
- gl.glEnd();
-
- // Draw top cap
- gl.glBegin(GL2.GL_TRIANGLE_FAN);
- gl.glNormal3d(0,0,1);
- gl.glVertex3d(0,0,height);
- for (int i = 0 ; i < slices ; i ++) {
- gl.glVertex3d(x[i], y[i], height);
- }
- gl.glVertex3d(x[0], y[0], height);
- gl.glEnd();
-
- // Draw walls
- quadObjInit(glu);
- glu.gluQuadricDrawStyle(quadObj, GLU.GLU_FILL);
- glu.gluQuadricNormals(quadObj, GLU.GLU_SMOOTH);
- /* If we ever changed/used the texture or orientation state
- of quadObj, we'd need to change it to the defaults here
- with gluQuadricTexture and/or gluQuadricOrientation. */
- glu.gluCylinder(quadObj, radius, radius, height, slices, stacks);
- }
-
- public void glutWireCube(float size) {
- drawBox(GLUgl2.getCurrentGL2(), size, GL2.GL_LINE_LOOP);
- }
-
- public void glutSolidCube(float size) {
- drawBox(GLUgl2.getCurrentGL2(), size, GL2.GL_QUADS);
- }
-
- public void glutWireTorus(double innerRadius, double outerRadius,
- int nsides, int rings) {
- GL2 gl = GLUgl2.getCurrentGL2();
- gl.glPushAttrib(GL2.GL_POLYGON_BIT);
- gl.glPolygonMode(GL2.GL_FRONT_AND_BACK, GL2.GL_LINE);
- doughnut(gl, innerRadius, outerRadius, nsides, rings);
- gl.glPopAttrib();
- }
-
- public void glutSolidTorus(double innerRadius, double outerRadius,
- int nsides, int rings) {
- doughnut(GLUgl2.getCurrentGL2(), innerRadius, outerRadius, nsides, rings);
- }
-
- public void glutWireDodecahedron() {
- dodecahedron(GLUgl2.getCurrentGL2(), GL2.GL_LINE_LOOP);
- }
-
- public void glutSolidDodecahedron() {
- dodecahedron(GLUgl2.getCurrentGL2(), GL2.GL_TRIANGLE_FAN);
- }
-
- public void glutWireOctahedron() {
- octahedron(GLUgl2.getCurrentGL2(), GL2.GL_LINE_LOOP);
- }
-
- public void glutSolidOctahedron() {
- octahedron(GLUgl2.getCurrentGL2(), GL2.GL_TRIANGLES);
- }
-
- public void glutWireIcosahedron() {
- icosahedron(GLUgl2.getCurrentGL2(), GL2.GL_LINE_LOOP);
- }
-
- public void glutSolidIcosahedron() {
- icosahedron(GLUgl2.getCurrentGL2(), GL2.GL_TRIANGLES);
- }
-
- public void glutWireTetrahedron() {
- tetrahedron(GLUgl2.getCurrentGL2(), GL2.GL_LINE_LOOP);
- }
-
- public void glutSolidTetrahedron() {
- tetrahedron(GLUgl2.getCurrentGL2(), GL2.GL_TRIANGLES);
- }
-
-/**
- * Renders the teapot as a solid shape of the specified size. The teapot is
- * created in a way that replicates the C GLUT implementation.
- *
- * @param scale
- * the factor by which to scale the teapot
- */
- public void glutSolidTeapot(double scale) {
- glutSolidTeapot(scale, true);
- }
-
- /**
- * Renders the teapot as a solid shape of the specified size. The teapot can
- * either be created in a way that is backward-compatible with the standard
- * C glut library (i.e. broken), or in a more pleasing way (i.e. with
- * surfaces whose front-faces point outwards and standing on the z=0 plane,
- * instead of the y=-1 plane). Both surface normals and texture coordinates
- * for the teapot are generated. The teapot is generated with OpenGL
- * evaluators.
- *
- * @param scale
- * the factor by which to scale the teapot
- * @param cStyle
- * whether to create the teapot in exactly the same way as in the C
- * implementation of GLUT
- */
- public void glutSolidTeapot(double scale, boolean cStyle) {
- teapot(GLUgl2.getCurrentGL2(), 14, scale, GL2.GL_FILL, cStyle);
- }
-
- /**
- * Renders the teapot as a wireframe shape of the specified size. The teapot
- * is created in a way that replicates the C GLUT implementation.
- *
- * @param scale
- * the factor by which to scale the teapot
- */
- public void glutWireTeapot(double scale) {
- glutWireTeapot(scale, true);
- }
-
- /**
- * Renders the teapot as a wireframe shape of the specified size. The teapot
- * can either be created in a way that is backward-compatible with the
- * standard C glut library (i.e. broken), or in a more pleasing way (i.e.
- * with surfaces whose front-faces point outwards and standing on the z=0
- * plane, instead of the y=-1 plane). Both surface normals and texture
- * coordinates for the teapot are generated. The teapot is generated with
- * OpenGL evaluators.
- *
- * @param scale
- * the factor by which to scale the teapot
- * @param cStyle
- * whether to create the teapot in exactly the same way as in the C
- * implementation of GLUT
- */
- public void glutWireTeapot(double scale, boolean cStyle) {
- teapot(GLUgl2.getCurrentGL2(), 10, scale, GL2.GL_LINE, cStyle);
- }
-
- //----------------------------------------------------------------------
- // Fonts
- //
-
- public void glutBitmapCharacter(int font, char character) {
- GL2 gl = GLUgl2.getCurrentGL2();
- int[] swapbytes = new int[1];
- int[] lsbfirst = new int[1];
- int[] rowlength = new int[1];
- int[] skiprows = new int[1];
- int[] skippixels = new int[1];
- int[] alignment = new int[1];
- beginBitmap(gl,
- swapbytes,
- lsbfirst,
- rowlength,
- skiprows,
- skippixels,
- alignment);
- bitmapCharacterImpl(gl, font, character);
- endBitmap(gl,
- swapbytes,
- lsbfirst,
- rowlength,
- skiprows,
- skippixels,
- alignment);
- }
-
- public void glutBitmapString (int font, String string) {
- GL2 gl = GLUgl2.getCurrentGL2();
- int[] swapbytes = new int[1];
- int[] lsbfirst = new int[1];
- int[] rowlength = new int[1];
- int[] skiprows = new int[1];
- int[] skippixels = new int[1];
- int[] alignment = new int[1];
- beginBitmap(gl,
- swapbytes,
- lsbfirst,
- rowlength,
- skiprows,
- skippixels,
- alignment);
- int len = string.length();
- for (int i = 0; i < len; i++) {
- bitmapCharacterImpl(gl, font, string.charAt(i));
- }
- endBitmap(gl,
- swapbytes,
- lsbfirst,
- rowlength,
- skiprows,
- skippixels,
- alignment);
- }
-
- public int glutBitmapWidth (int font, char character) {
- BitmapFontRec fontinfo = getBitmapFont(font);
- int c = character & 0xFFFF;
- if (c < fontinfo.first || c >= fontinfo.first + fontinfo.num_chars)
- return 0;
- BitmapCharRec ch = fontinfo.ch[c - fontinfo.first];
- if (ch != null)
- return (int) ch.advance;
- else
- return 0;
- }
-
- public void glutStrokeCharacter(int font, char character) {
- GL2 gl = GLUgl2.getCurrentGL2();
- StrokeFontRec fontinfo = getStrokeFont(font);
- int c = character & 0xFFFF;
- if (c < 0 || c >= fontinfo.num_chars)
- return;
- StrokeCharRec ch = fontinfo.ch[c];
- if (ch != null) {
- for (int i = 0; i < ch.num_strokes; i++) {
- StrokeRec stroke = ch.stroke[i];
- gl.glBegin(GL2.GL_LINE_STRIP);
- for (int j = 0; j < stroke.num_coords; j++) {
- CoordRec coord = stroke.coord[j];
- gl.glVertex2f(coord.x, coord.y);
- }
- gl.glEnd();
- }
- gl.glTranslatef(ch.right, 0.0f, 0.0f);
- }
- }
-
- public void glutStrokeString(int font, String string) {
- GL2 gl = GLUgl2.getCurrentGL2();
- StrokeFontRec fontinfo = getStrokeFont(font);
- int len = string.length();
- for (int pos = 0; pos < len; pos++) {
- int c = string.charAt(pos) & 0xFFFF;
- if (c < 0 || c >= fontinfo.num_chars)
- continue;
- StrokeCharRec ch = fontinfo.ch[c];
- if (ch != null) {
- for (int i = 0; i < ch.num_strokes; i++) {
- StrokeRec stroke = ch.stroke[i];
- gl.glBegin(GL2.GL_LINE_STRIP);
- for (int j = 0; j < stroke.num_coords; j++) {
- CoordRec coord = stroke.coord[j];
- gl.glVertex2f(coord.x, coord.y);
- }
- gl.glEnd();
- }
- gl.glTranslatef(ch.right, 0.0f, 0.0f);
- }
- }
- }
-
- public int glutStrokeWidth (int font, char character) {
- return (int) glutStrokeWidthf(font, character);
- }
-
- public float glutStrokeWidthf (int font, char character) {
- StrokeFontRec fontinfo = getStrokeFont(font);
- int c = character & 0xFFFF;
- if (c < 0 || c >= fontinfo.num_chars)
- return 0;
- StrokeCharRec ch = fontinfo.ch[c];
- if (ch != null)
- return ch.right;
- else
- return 0;
- }
-
- public int glutBitmapLength (int font, String string) {
- BitmapFontRec fontinfo = getBitmapFont(font);
- int length = 0;
- int len = string.length();
- for (int pos = 0; pos < len; pos++) {
- int c = string.charAt(pos) & 0xFFFF;
- if (c >= fontinfo.first && c < fontinfo.first + fontinfo.num_chars) {
- BitmapCharRec ch = fontinfo.ch[c - fontinfo.first];
- if (ch != null)
- length += ch.advance;
- }
- }
- return length;
- }
-
- public int glutStrokeLength (int font, String string) {
- return (int) glutStrokeLengthf(font, string);
- }
-
- public float glutStrokeLengthf (int font, String string) {
- StrokeFontRec fontinfo = getStrokeFont(font);
- float length = 0;
- int len = string.length();
- for (int i = 0; i < len; i++) {
- char c = string.charAt(i);
- if (c >= 0 && c < fontinfo.num_chars) {
- StrokeCharRec ch = fontinfo.ch[c];
- if (ch != null)
- length += ch.right;
- }
- }
- return length;
- }
-
- /**
- This function draws a wireframe dodecahedron whose
- facets are rhombic and
- whose vertices are at unit radius.
- No facet lies normal to any coordinate axes.
- The polyhedron is centered at the origin.
- */
- public void glutWireRhombicDodecahedron() {
- GL2 gl = GLUgl2.getCurrentGL2();
- for( int i = 0; i < 12; i++ ) {
- gl.glBegin( GL2.GL_LINE_LOOP );
- gl.glNormal3dv( rdod_n[ i ],0 );
- gl.glVertex3dv( rdod_r[ rdod_v[ i ][ 0 ] ],0 );
- gl.glVertex3dv( rdod_r[ rdod_v[ i ][ 1 ] ],0 );
- gl.glVertex3dv( rdod_r[ rdod_v[ i ][ 2 ] ],0 );
- gl.glVertex3dv( rdod_r[ rdod_v[ i ][ 3 ] ],0 );
- gl.glEnd( );
- }
- }
-
- /**
- This function draws a solid-shaded dodecahedron
- whose facets are rhombic and
- whose vertices are at unit radius.
- No facet lies normal to any coordinate axes.
- The polyhedron is centered at the origin.
- */
- public void glutSolidRhombicDodecahedron() {
- GL2 gl = GLUgl2.getCurrentGL2();
- gl.glBegin( GL2.GL_QUADS );
- for( int i = 0; i < 12; i++ ) {
- gl.glNormal3dv( rdod_n[ i ],0 );
- gl.glVertex3dv( rdod_r[ rdod_v[ i ][ 0 ] ],0 );
- gl.glVertex3dv( rdod_r[ rdod_v[ i ][ 1 ] ],0 );
- gl.glVertex3dv( rdod_r[ rdod_v[ i ][ 2 ] ],0 );
- gl.glVertex3dv( rdod_r[ rdod_v[ i ][ 3 ] ],0 );
- }
- gl.glEnd( );
- }
-
- //----------------------------------------------------------------------
- // Internals only below this point
- //
-
- //----------------------------------------------------------------------
- // Shape implementation
- //
-
- private GLUquadric quadObj;
- private void quadObjInit(GLUgl2 glu) {
- if (quadObj == null) {
- quadObj = glu.gluNewQuadric();
- }
- if (quadObj == null) {
- throw new GLException("Out of memory");
- }
- }
-
- private static void doughnut(GL2 gl, double r, double R, int nsides, int rings) {
- int i, j;
- float theta, phi, theta1;
- float cosTheta, sinTheta;
- float cosTheta1, sinTheta1;
- float ringDelta, sideDelta;
-
- ringDelta = (float) (2.0 * Math.PI / rings);
- sideDelta = (float) (2.0 * Math.PI / nsides);
-
- theta = 0.0f;
- cosTheta = 1.0f;
- sinTheta = 0.0f;
- for (i = rings - 1; i >= 0; i--) {
- theta1 = theta + ringDelta;
- cosTheta1 = (float) Math.cos(theta1);
- sinTheta1 = (float) Math.sin(theta1);
- gl.glBegin(GL2.GL_QUAD_STRIP);
- phi = 0.0f;
- for (j = nsides; j >= 0; j--) {
- float cosPhi, sinPhi, dist;
-
- phi += sideDelta;
- cosPhi = (float) Math.cos(phi);
- sinPhi = (float) Math.sin(phi);
- dist = (float) (R + r * cosPhi);
-
- gl.glNormal3f(cosTheta1 * cosPhi, -sinTheta1 * cosPhi, sinPhi);
- gl.glVertex3f(cosTheta1 * dist, -sinTheta1 * dist, (float) r * sinPhi);
- gl.glNormal3f(cosTheta * cosPhi, -sinTheta * cosPhi, sinPhi);
- gl.glVertex3f(cosTheta * dist, -sinTheta * dist, (float) r * sinPhi);
- }
- gl.glEnd();
- theta = theta1;
- cosTheta = cosTheta1;
- sinTheta = sinTheta1;
- }
- }
-
- private static float[][] boxVertices;
- private static final float[][] boxNormals = {
- {-1.0f, 0.0f, 0.0f},
- {0.0f, 1.0f, 0.0f},
- {1.0f, 0.0f, 0.0f},
- {0.0f, -1.0f, 0.0f},
- {0.0f, 0.0f, 1.0f},
- {0.0f, 0.0f, -1.0f}
- };
- private static final int[][] boxFaces = {
- {0, 1, 2, 3},
- {3, 2, 6, 7},
- {7, 6, 5, 4},
- {4, 5, 1, 0},
- {5, 6, 2, 1},
- {7, 4, 0, 3}
- };
- private void drawBox(GL2 gl, float size, int type) {
- if (boxVertices == null) {
- float[][] v = new float[8][];
- for (int i = 0; i < 8; i++) {
- v[i] = new float[3];
- }
- v[0][0] = v[1][0] = v[2][0] = v[3][0] = -0.5f;
- v[4][0] = v[5][0] = v[6][0] = v[7][0] = 0.5f;
- v[0][1] = v[1][1] = v[4][1] = v[5][1] = -0.5f;
- v[2][1] = v[3][1] = v[6][1] = v[7][1] = 0.5f;
- v[0][2] = v[3][2] = v[4][2] = v[7][2] = -0.5f;
- v[1][2] = v[2][2] = v[5][2] = v[6][2] = 0.5f;
- boxVertices = v;
- }
- float[][] v = boxVertices;
- float[][] n = boxNormals;
- int[][] faces = boxFaces;
- for (int i = 5; i >= 0; i--) {
- gl.glBegin(type);
- gl.glNormal3fv(n[i], 0);
- float[] vt = v[faces[i][0]];
- gl.glVertex3f(vt[0] * size, vt[1] * size, vt[2] * size);
- vt = v[faces[i][1]];
- gl.glVertex3f(vt[0] * size, vt[1] * size, vt[2] * size);
- vt = v[faces[i][2]];
- gl.glVertex3f(vt[0] * size, vt[1] * size, vt[2] * size);
- vt = v[faces[i][3]];
- gl.glVertex3f(vt[0] * size, vt[1] * size, vt[2] * size);
- gl.glEnd();
- }
- }
-
- private float[][] dodec;
-
- private void initDodecahedron() {
- dodec = new float[20][];
- for (int i = 0; i < dodec.length; i++) {
- dodec[i] = new float[3];
- }
-
- float alpha, beta;
-
- alpha = (float) Math.sqrt(2.0f / (3.0f + Math.sqrt(5.0)));
- beta = 1.0f + (float) Math.sqrt(6.0 / (3.0 + Math.sqrt(5.0)) -
- 2.0 + 2.0 * Math.sqrt(2.0 / (3.0 + Math.sqrt(5.0))));
- dodec[0][0] = -alpha; dodec[0][1] = 0; dodec[0][2] = beta;
- dodec[1][0] = alpha; dodec[1][1] = 0; dodec[1][2] = beta;
- dodec[2][0] = -1; dodec[2][1] = -1; dodec[2][2] = -1;
- dodec[3][0] = -1; dodec[3][1] = -1; dodec[3][2] = 1;
- dodec[4][0] = -1; dodec[4][1] = 1; dodec[4][2] = -1;
- dodec[5][0] = -1; dodec[5][1] = 1; dodec[5][2] = 1;
- dodec[6][0] = 1; dodec[6][1] = -1; dodec[6][2] = -1;
- dodec[7][0] = 1; dodec[7][1] = -1; dodec[7][2] = 1;
- dodec[8][0] = 1; dodec[8][1] = 1; dodec[8][2] = -1;
- dodec[9][0] = 1; dodec[9][1] = 1; dodec[9][2] = 1;
- dodec[10][0] = beta; dodec[10][1] = alpha; dodec[10][2] = 0;
- dodec[11][0] = beta; dodec[11][1] = -alpha; dodec[11][2] = 0;
- dodec[12][0] = -beta; dodec[12][1] = alpha; dodec[12][2] = 0;
- dodec[13][0] = -beta; dodec[13][1] = -alpha; dodec[13][2] = 0;
- dodec[14][0] = -alpha; dodec[14][1] = 0; dodec[14][2] = -beta;
- dodec[15][0] = alpha; dodec[15][1] = 0; dodec[15][2] = -beta;
- dodec[16][0] = 0; dodec[16][1] = beta; dodec[16][2] = alpha;
- dodec[17][0] = 0; dodec[17][1] = beta; dodec[17][2] = -alpha;
- dodec[18][0] = 0; dodec[18][1] = -beta; dodec[18][2] = alpha;
- dodec[19][0] = 0; dodec[19][1] = -beta; dodec[19][2] = -alpha;
- }
-
- private static void diff3(float[] a, float[] b, float[] c) {
- c[0] = a[0] - b[0];
- c[1] = a[1] - b[1];
- c[2] = a[2] - b[2];
- }
-
- private static void crossprod(float[] v1, float[] v2, float[] prod) {
- float[] p = new float[3]; /* in case prod == v1 or v2 */
-
- p[0] = v1[1] * v2[2] - v2[1] * v1[2];
- p[1] = v1[2] * v2[0] - v2[2] * v1[0];
- p[2] = v1[0] * v2[1] - v2[0] * v1[1];
- prod[0] = p[0];
- prod[1] = p[1];
- prod[2] = p[2];
- }
-
- private static void normalize(float[] v) {
- float d;
-
- d = (float) Math.sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
- if (d == 0.0) {
- v[0] = d = 1.0f;
- }
- d = 1 / d;
- v[0] *= d;
- v[1] *= d;
- v[2] *= d;
- }
-
- private void pentagon(GL2 gl, int a, int b, int c, int d, int e, int shadeType) {
- float[] n0 = new float[3];
- float[] d1 = new float[3];
- float[] d2 = new float[3];
-
- diff3(dodec[a], dodec[b], d1);
- diff3(dodec[b], dodec[c], d2);
- crossprod(d1, d2, n0);
- normalize(n0);
-
- gl.glBegin(shadeType);
- gl.glNormal3fv(n0, 0);
- gl.glVertex3fv(dodec[a], 0);
- gl.glVertex3fv(dodec[b], 0);
- gl.glVertex3fv(dodec[c], 0);
- gl.glVertex3fv(dodec[d], 0);
- gl.glVertex3fv(dodec[e], 0);
- gl.glEnd();
- }
-
- private void dodecahedron(GL2 gl, int type) {
- if (dodec == null) {
- initDodecahedron();
- }
- pentagon(gl, 0, 1, 9, 16, 5, type);
- pentagon(gl, 1, 0, 3, 18, 7, type);
- pentagon(gl, 1, 7, 11, 10, 9, type);
- pentagon(gl, 11, 7, 18, 19, 6, type);
- pentagon(gl, 8, 17, 16, 9, 10, type);
- pentagon(gl, 2, 14, 15, 6, 19, type);
- pentagon(gl, 2, 13, 12, 4, 14, type);
- pentagon(gl, 2, 19, 18, 3, 13, type);
- pentagon(gl, 3, 0, 5, 12, 13, type);
- pentagon(gl, 6, 15, 8, 10, 11, type);
- pentagon(gl, 4, 17, 8, 15, 14, type);
- pentagon(gl, 4, 12, 5, 16, 17, type);
- }
-
- private static void recorditem(GL2 gl, float[] n1, float[] n2, float[] n3, int shadeType) {
- float[] q0 = new float[3];
- float[] q1 = new float[3];
-
- diff3(n1, n2, q0);
- diff3(n2, n3, q1);
- crossprod(q0, q1, q1);
- normalize(q1);
-
- gl.glBegin(shadeType);
- gl.glNormal3fv(q1, 0);
- gl.glVertex3fv(n1, 0);
- gl.glVertex3fv(n2, 0);
- gl.glVertex3fv(n3, 0);
- gl.glEnd();
- }
-
- private static void subdivide(GL2 gl, float[] v0, float[] v1, float[] v2, int shadeType) {
- int depth;
- float[] w0 = new float[3];
- float[] w1 = new float[3];
- float[] w2 = new float[3];
- float l;
- int i, j, k, n;
-
- depth = 1;
- for (i = 0; i < depth; i++) {
- for (j = 0; i + j < depth; j++) {
- k = depth - i - j;
- for (n = 0; n < 3; n++) {
- w0[n] = (i * v0[n] + j * v1[n] + k * v2[n]) / depth;
- w1[n] = ((i + 1) * v0[n] + j * v1[n] + (k - 1) * v2[n])
- / depth;
- w2[n] = (i * v0[n] + (j + 1) * v1[n] + (k - 1) * v2[n])
- / depth;
- }
- l = (float) Math.sqrt(w0[0] * w0[0] + w0[1] * w0[1] + w0[2] * w0[2]);
- w0[0] /= l;
- w0[1] /= l;
- w0[2] /= l;
- l = (float) Math.sqrt(w1[0] * w1[0] + w1[1] * w1[1] + w1[2] * w1[2]);
- w1[0] /= l;
- w1[1] /= l;
- w1[2] /= l;
- l = (float) Math.sqrt(w2[0] * w2[0] + w2[1] * w2[1] + w2[2] * w2[2]);
- w2[0] /= l;
- w2[1] /= l;
- w2[2] /= l;
- recorditem(gl, w1, w0, w2, shadeType);
- }
- }
- }
-
- private static void drawtriangle(GL2 gl, int i, float[][] data, int[][] ndx, int shadeType) {
- float[] x0 = data[ndx[i][0]];
- float[] x1 = data[ndx[i][1]];
- float[] x2 = data[ndx[i][2]];
- subdivide(gl, x0, x1, x2, shadeType);
- }
-
- /* octahedron data: The octahedron produced is centered at the
- origin and has radius 1.0 */
- private static final float[][] odata =
- {
- {1.0f, 0.0f, 0.0f},
- {-1.0f, 0.0f, 0.0f},
- {0.0f, 1.0f, 0.0f},
- {0.0f, -1.0f, 0.0f},
- {0.0f, 0.0f, 1.0f},
- {0.0f, 0.0f, -1.0f}
- };
-
- private static final int[][] ondex =
- {
- {0, 4, 2},
- {1, 2, 4},
- {0, 3, 4},
- {1, 4, 3},
- {0, 2, 5},
- {1, 5, 2},
- {0, 5, 3},
- {1, 3, 5}
- };
-
- private static void octahedron(GL2 gl, int shadeType) {
- int i;
-
- for (i = 7; i >= 0; i--) {
- drawtriangle(gl, i, odata, ondex, shadeType);
- }
- }
-
- /* icosahedron data: These numbers are rigged to make an
- icosahedron of radius 1.0 */
-
- private static final float X = .525731112119133606f;
- private static final float Z = .850650808352039932f;
-
- private static final float[][] idata =
- {
- {-X, 0, Z},
- {X, 0, Z},
- {-X, 0, -Z},
- {X, 0, -Z},
- {0, Z, X},
- {0, Z, -X},
- {0, -Z, X},
- {0, -Z, -X},
- {Z, X, 0},
- {-Z, X, 0},
- {Z, -X, 0},
- {-Z, -X, 0}
- };
-
- private static final int[][] index =
- {
- {0, 4, 1},
- {0, 9, 4},
- {9, 5, 4},
- {4, 5, 8},
- {4, 8, 1},
- {8, 10, 1},
- {8, 3, 10},
- {5, 3, 8},
- {5, 2, 3},
- {2, 7, 3},
- {7, 10, 3},
- {7, 6, 10},
- {7, 11, 6},
- {11, 0, 6},
- {0, 1, 6},
- {6, 1, 10},
- {9, 0, 11},
- {9, 11, 2},
- {9, 2, 5},
- {7, 2, 11},
- };
-
- private static void icosahedron(GL2 gl, int shadeType) {
- int i;
-
- for (i = 19; i >= 0; i--) {
- drawtriangle(gl, i, idata, index, shadeType);
- }
- }
-
- /* rhombic dodecahedron data: */
-
- private static final double rdod_r[][] =
- {
- { 0.0, 0.0, 1.0 },
- { 0.707106781187, 0.000000000000, 0.5 },
- { 0.000000000000, 0.707106781187, 0.5 },
- { -0.707106781187, 0.000000000000, 0.5 },
- { 0.000000000000, -0.707106781187, 0.5 },
- { 0.707106781187, 0.707106781187, 0.0 },
- { -0.707106781187, 0.707106781187, 0.0 },
- { -0.707106781187, -0.707106781187, 0.0 },
- { 0.707106781187, -0.707106781187, 0.0 },
- { 0.707106781187, 0.000000000000, -0.5 },
- { 0.000000000000, 0.707106781187, -0.5 },
- { -0.707106781187, 0.000000000000, -0.5 },
- { 0.000000000000, -0.707106781187, -0.5 },
- { 0.0, 0.0, -1.0 }
- };
-
- private static final int rdod_v[][] =
- {
- { 0, 1, 5, 2 },
- { 0, 2, 6, 3 },
- { 0, 3, 7, 4 },
- { 0, 4, 8, 1 },
- { 5, 10, 6, 2 },
- { 6, 11, 7, 3 },
- { 7, 12, 8, 4 },
- { 8, 9, 5, 1 },
- { 5, 9, 13, 10 },
- { 6, 10, 13, 11 },
- { 7, 11, 13, 12 },
- { 8, 12, 13, 9 }
- };
-
- private static final double rdod_n[][] =
- {
- { 0.353553390594, 0.353553390594, 0.5 },
- { -0.353553390594, 0.353553390594, 0.5 },
- { -0.353553390594, -0.353553390594, 0.5 },
- { 0.353553390594, -0.353553390594, 0.5 },
- { 0.000000000000, 1.000000000000, 0.0 },
- { -1.000000000000, 0.000000000000, 0.0 },
- { 0.000000000000, -1.000000000000, 0.0 },
- { 1.000000000000, 0.000000000000, 0.0 },
- { 0.353553390594, 0.353553390594, -0.5 },
- { -0.353553390594, 0.353553390594, -0.5 },
- { -0.353553390594, -0.353553390594, -0.5 },
- { 0.353553390594, -0.353553390594, -0.5 }
- };
-
- /* tetrahedron data: */
-
- private static final float T = 1.73205080756887729f;
-
- private static final float[][] tdata =
- {
- {T, T, T},
- {T, -T, -T},
- {-T, T, -T},
- {-T, -T, T}
- };
-
- private static final int[][] tndex =
- {
- {0, 1, 3},
- {2, 1, 0},
- {3, 2, 0},
- {1, 2, 3}
- };
-
- private static final void tetrahedron(GL2 gl, int shadeType) {
- for (int i = 3; i >= 0; i--)
- drawtriangle(gl, i, tdata, tndex, shadeType);
- }
-
- // Teapot implementation (a modified port of glut_teapot.c)
- //
- // Rim, body, lid, and bottom data must be reflected in x and
- // y; handle and spout data across the y axis only.
- private static final int[][] teapotPatchData = {
- /* rim */
- {102, 103, 104, 105, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15},
- /* body */
- {12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27},
- {24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40},
- /* lid */
- {96, 96, 96, 96, 97, 98, 99, 100, 101, 101, 101, 101, 0, 1, 2, 3,},
- {0, 1, 2, 3, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117},
- /* bottom */
- {118, 118, 118, 118, 124, 122, 119, 121, 123, 126, 125, 120, 40, 39, 38, 37},
- /* handle */
- {41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56},
- {53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 28, 65, 66, 67},
- /* spout */
- {68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83},
- {80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95}
- };
- private static final float[][] teapotCPData = {
- {0.2f, 0f, 2.7f},
- {0.2f, -0.112f, 2.7f},
- {0.112f, -0.2f, 2.7f},
- {0f, -0.2f, 2.7f},
- {1.3375f, 0f, 2.53125f},
- {1.3375f, -0.749f, 2.53125f},
- {0.749f, -1.3375f, 2.53125f},
- {0f, -1.3375f, 2.53125f},
- {1.4375f, 0f, 2.53125f},
- {1.4375f, -0.805f, 2.53125f},
- {0.805f, -1.4375f, 2.53125f},
- {0f, -1.4375f, 2.53125f},
- {1.5f, 0f, 2.4f},
- {1.5f, -0.84f, 2.4f},
- {0.84f, -1.5f, 2.4f},
- {0f, -1.5f, 2.4f},
- {1.75f, 0f, 1.875f},
- {1.75f, -0.98f, 1.875f},
- {0.98f, -1.75f, 1.875f},
- {0f, -1.75f, 1.875f},
- {2f, 0f, 1.35f},
- {2f, -1.12f, 1.35f},
- {1.12f, -2f, 1.35f},
- {0f, -2f, 1.35f},
- {2f, 0f, 0.9f},
- {2f, -1.12f, 0.9f},
- {1.12f, -2f, 0.9f},
- {0f, -2f, 0.9f},
- {-2f, 0f, 0.9f},
- {2f, 0f, 0.45f},
- {2f, -1.12f, 0.45f},
- {1.12f, -2f, 0.45f},
- {0f, -2f, 0.45f},
- {1.5f, 0f, 0.225f},
- {1.5f, -0.84f, 0.225f},
- {0.84f, -1.5f, 0.225f},
- {0f, -1.5f, 0.225f},
- {1.5f, 0f, 0.15f},
- {1.5f, -0.84f, 0.15f},
- {0.84f, -1.5f, 0.15f},
- {0f, -1.5f, 0.15f},
- {-1.6f, 0f, 2.025f},
- {-1.6f, -0.3f, 2.025f},
- {-1.5f, -0.3f, 2.25f},
- {-1.5f, 0f, 2.25f},
- {-2.3f, 0f, 2.025f},
- {-2.3f, -0.3f, 2.025f},
- {-2.5f, -0.3f, 2.25f},
- {-2.5f, 0f, 2.25f},
- {-2.7f, 0f, 2.025f},
- {-2.7f, -0.3f, 2.025f},
- {-3f, -0.3f, 2.25f},
- {-3f, 0f, 2.25f},
- {-2.7f, 0f, 1.8f},
- {-2.7f, -0.3f, 1.8f},
- {-3f, -0.3f, 1.8f},
- {-3f, 0f, 1.8f},
- {-2.7f, 0f, 1.575f},
- {-2.7f, -0.3f, 1.575f},
- {-3f, -0.3f, 1.35f},
- {-3f, 0f, 1.35f},
- {-2.5f, 0f, 1.125f},
- {-2.5f, -0.3f, 1.125f},
- {-2.65f, -0.3f, 0.9375f},
- {-2.65f, 0f, 0.9375f},
- {-2f, -0.3f, 0.9f},
- {-1.9f, -0.3f, 0.6f},
- {-1.9f, 0f, 0.6f},
- {1.7f, 0f, 1.425f},
- {1.7f, -0.66f, 1.425f},
- {1.7f, -0.66f, 0.6f},
- {1.7f, 0f, 0.6f},
- {2.6f, 0f, 1.425f},
- {2.6f, -0.66f, 1.425f},
- {3.1f, -0.66f, 0.825f},
- {3.1f, 0f, 0.825f},
- {2.3f, 0f, 2.1f},
- {2.3f, -0.25f, 2.1f},
- {2.4f, -0.25f, 2.025f},
- {2.4f, 0f, 2.025f},
- {2.7f, 0f, 2.4f},
- {2.7f, -0.25f, 2.4f},
- {3.3f, -0.25f, 2.4f},
- {3.3f, 0f, 2.4f},
- {2.8f, 0f, 2.475f},
- {2.8f, -0.25f, 2.475f},
- {3.525f, -0.25f, 2.49375f},
- {3.525f, 0f, 2.49375f},
- {2.9f, 0f, 2.475f},
- {2.9f, -0.15f, 2.475f},
- {3.45f, -0.15f, 2.5125f},
- {3.45f, 0f, 2.5125f},
- {2.8f, 0f, 2.4f},
- {2.8f, -0.15f, 2.4f},
- {3.2f, -0.15f, 2.4f},
- {3.2f, 0f, 2.4f},
- {0f, 0f, 3.15f},
- {0.8f, 0f, 3.15f},
- {0.8f, -0.45f, 3.15f},
- {0.45f, -0.8f, 3.15f},
- {0f, -0.8f, 3.15f},
- {0f, 0f, 2.85f},
- {1.4f, 0f, 2.4f},
- {1.4f, -0.784f, 2.4f},
- {0.784f, -1.4f, 2.4f},
- {0f, -1.4f, 2.4f},
- {0.4f, 0f, 2.55f},
- {0.4f, -0.224f, 2.55f},
- {0.224f, -0.4f, 2.55f},
- {0f, -0.4f, 2.55f},
- {1.3f, 0f, 2.55f},
- {1.3f, -0.728f, 2.55f},
- {0.728f, -1.3f, 2.55f},
- {0f, -1.3f, 2.55f},
- {1.3f, 0f, 2.4f},
- {1.3f, -0.728f, 2.4f},
- {0.728f, -1.3f, 2.4f},
- {0f, -1.3f, 2.4f},
- {0f, 0f, 0f},
- {1.425f, -0.798f, 0f},
- {1.5f, 0f, 0.075f},
- {1.425f, 0f, 0f},
- {0.798f, -1.425f, 0f},
- {0f, -1.5f, 0.075f},
- {0f, -1.425f, 0f},
- {1.5f, -0.84f, 0.075f},
- {0.84f, -1.5f, 0.075f}
- };
- // Since GL2.glMap2f expects a packed array of floats, we must convert
- // from a 3-dimensional array to a 1-dimensional array
- private static final float[] teapotTex = {
- 0, 0, 1, 0, 0, 1, 1, 1
- };
-
- private static void teapot(GL2 gl,
- int grid,
- double scale,
- int type,
- boolean backCompatible)
- {
- // As mentioned above, GL2.glMap2f expects a packed array of floats
- float[] p = new float[4*4*3];
- float[] q = new float[4*4*3];
- float[] r = new float[4*4*3];
- float[] s = new float[4*4*3];
- int i, j, k, l;
-
- gl.glPushAttrib(GL2.GL_ENABLE_BIT | GL2.GL_EVAL_BIT | GL2.GL_POLYGON_BIT);
- gl.glEnable(GL2.GL_AUTO_NORMAL);
- gl.glEnable(GL2.GL_NORMALIZE);
- gl.glEnable(GL2.GL_MAP2_VERTEX_3);
- gl.glEnable(GL2.GL_MAP2_TEXTURE_COORD_2);
- gl.glPushMatrix();
- if (!backCompatible) {
- // The time has come to have the teapot no longer be inside out
- gl.glFrontFace(GL2.GL_CW);
- gl.glScaled(0.5*scale, 0.5*scale, 0.5*scale);
- } else {
- // We want the teapot in it's backward compatible position and
- // orientation
- gl.glRotatef(270.0f, 1, 0, 0);
- gl.glScalef((float)(0.5 * scale),
- (float)(0.5 * scale),
- (float)(0.5 * scale));
- gl.glTranslatef(0.0f, 0.0f, -1.5f);
- }
- for (i = 0; i < 10; i++) {
- for (j = 0; j < 4; j++) {
- for (k = 0; k < 4; k++) {
- for (l = 0; l < 3; l++) {
- p[(j*4+k)*3+l] = teapotCPData[teapotPatchData[i][j * 4 + k]][l];
- q[(j*4+k)*3+l] =
- teapotCPData[teapotPatchData[i][j * 4 + (3 - k)]][l];
- if (l == 1)
- q[(j*4+k)*3+l] *= -1.0;
- if (i < 6) {
- r[(j*4+k)*3+l] =
- teapotCPData[teapotPatchData[i][j * 4 + (3 - k)]][l];
- if (l == 0)
- r[(j*4+k)*3+l] *= -1.0;
- s[(j*4+k)*3+l] = teapotCPData[teapotPatchData[i][j * 4 + k]][l];
- if (l == 0)
- s[(j*4+k)*3+l] *= -1.0;
- if (l == 1)
- s[(j*4+k)*3+l] *= -1.0;
- }
- }
- }
- }
- gl.glMap2f(GL2.GL_MAP2_TEXTURE_COORD_2, 0, 1, 2, 2, 0, 1, 4, 2, teapotTex, 0);
- gl.glMap2f(GL2.GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, p, 0);
- gl.glMapGrid2f(grid, 0.0f, 1.0f, grid, 0.0f, 1.0f);
- evaluateTeapotMesh(gl, grid, type, i, !backCompatible);
- gl.glMap2f(GL2.GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, q, 0);
- evaluateTeapotMesh(gl, grid, type, i, !backCompatible);
- if (i < 6) {
- gl.glMap2f(GL2.GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, r, 0);
- evaluateTeapotMesh(gl, grid, type, i, !backCompatible);
- gl.glMap2f(GL2.GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, s, 0);
- evaluateTeapotMesh(gl, grid, type, i, !backCompatible);
- }
- }
- gl.glPopMatrix();
- gl.glPopAttrib();
- }
-
- private static void evaluateTeapotMesh(GL2 gl,
- int grid,
- int type,
- int partNum,
- boolean repairSingularities)
- {
- if (repairSingularities && (partNum == 5 || partNum == 3)) {
- // Instead of using evaluators that give bad results at singularities,
- // evaluate by hand
- gl.glPolygonMode(GL2.GL_FRONT_AND_BACK, type);
- for (int nv = 0; nv < grid; nv++) {
- if (nv == 0) {
- // Draw a small triangle-fan to fill the hole
- gl.glDisable(GL2.GL_AUTO_NORMAL);
- gl.glNormal3f(0, 0, partNum == 3 ? 1 : -1);
- gl.glBegin(GL2.GL_TRIANGLE_FAN);
- {
- gl.glEvalCoord2f(0, 0);
- // Note that we draw in clock-wise order to match the evaluator
- // method
- for (int nu = 0; nu <= grid; nu++)
- {
- gl.glEvalCoord2f(nu / (float)grid, (1f / grid) / (float)grid);
- }
- }
- gl.glEnd();
- gl.glEnable(GL2.GL_AUTO_NORMAL);
- }
- // Draw the rest of the piece as an evaluated quad-strip
- gl.glBegin(GL2.GL_QUAD_STRIP);
- {
- // Note that we draw in clock-wise order to match the evaluator method
- for (int nu = grid; nu >= 0; nu--) {
- gl.glEvalCoord2f(nu / (float)grid, (nv + 1) / (float)grid);
- gl.glEvalCoord2f(nu / (float)grid, Math.max(nv, 1f / grid)
- / (float)grid);
- }
- }
- gl.glEnd();
- }
- } else {
- gl.glEvalMesh2(type, 0, grid, 0, grid);
- }
- }
-
- //----------------------------------------------------------------------
- // Font implementation
- //
-
- private static void bitmapCharacterImpl(GL2 gl, int font, char cin) {
- BitmapFontRec fontinfo = getBitmapFont(font);
- int c = cin & 0xFFFF;
- if (c < fontinfo.first ||
- c >= fontinfo.first + fontinfo.num_chars)
- return;
- BitmapCharRec ch = fontinfo.ch[c - fontinfo.first];
- if (ch != null) {
- gl.glBitmap(ch.width, ch.height, ch.xorig, ch.yorig,
- ch.advance, 0, ch.bitmap, 0);
- }
- }
-
- private static final BitmapFontRec[] bitmapFonts = new BitmapFontRec[9];
- private static final StrokeFontRec[] strokeFonts = new StrokeFontRec[9];
-
- private static BitmapFontRec getBitmapFont(int font) {
- BitmapFontRec rec = bitmapFonts[font];
- if (rec == null) {
- switch (font) {
- case BITMAP_9_BY_15:
- rec = GLUTBitmap9x15.glutBitmap9By15;
- break;
- case BITMAP_8_BY_13:
- rec = GLUTBitmap8x13.glutBitmap8By13;
- break;
- case BITMAP_TIMES_ROMAN_10:
- rec = GLUTBitmapTimesRoman10.glutBitmapTimesRoman10;
- break;
- case BITMAP_TIMES_ROMAN_24:
- rec = GLUTBitmapTimesRoman24.glutBitmapTimesRoman24;
- break;
- case BITMAP_HELVETICA_10:
- rec = GLUTBitmapHelvetica10.glutBitmapHelvetica10;
- break;
- case BITMAP_HELVETICA_12:
- rec = GLUTBitmapHelvetica12.glutBitmapHelvetica12;
- break;
- case BITMAP_HELVETICA_18:
- rec = GLUTBitmapHelvetica18.glutBitmapHelvetica18;
- break;
- default:
- throw new GLException("Unknown bitmap font number " + font);
- }
- bitmapFonts[font] = rec;
- }
- return rec;
- }
-
- private static StrokeFontRec getStrokeFont(int font) {
- StrokeFontRec rec = strokeFonts[font];
- if (rec == null) {
- switch (font) {
- case STROKE_ROMAN:
- rec = GLUTStrokeRoman.glutStrokeRoman;
- break;
- case STROKE_MONO_ROMAN:
- rec = GLUTStrokeMonoRoman.glutStrokeMonoRoman;
- break;
- default:
- throw new GLException("Unknown stroke font number " + font);
- }
- }
- return rec;
- }
-
- private static void beginBitmap(GL2 gl,
- int[] swapbytes,
- int[] lsbfirst,
- int[] rowlength,
- int[] skiprows,
- int[] skippixels,
- int[] alignment) {
- gl.glGetIntegerv(GL2.GL_UNPACK_SWAP_BYTES, swapbytes, 0);
- gl.glGetIntegerv(GL2.GL_UNPACK_LSB_FIRST, lsbfirst, 0);
- gl.glGetIntegerv(GL2.GL_UNPACK_ROW_LENGTH, rowlength, 0);
- gl.glGetIntegerv(GL2.GL_UNPACK_SKIP_ROWS, skiprows, 0);
- gl.glGetIntegerv(GL2.GL_UNPACK_SKIP_PIXELS, skippixels, 0);
- gl.glGetIntegerv(GL2.GL_UNPACK_ALIGNMENT, alignment, 0);
- /* Little endian machines (DEC Alpha for example) could
- benefit from setting GL_UNPACK_LSB_FIRST to GL_TRUE
- instead of GL_FALSE, but this would require changing the
- generated bitmaps too. */
- gl.glPixelStorei(GL2.GL_UNPACK_SWAP_BYTES, GL2.GL_FALSE);
- gl.glPixelStorei(GL2.GL_UNPACK_LSB_FIRST, GL2.GL_FALSE);
- gl.glPixelStorei(GL2.GL_UNPACK_ROW_LENGTH, 0);
- gl.glPixelStorei(GL2.GL_UNPACK_SKIP_ROWS, 0);
- gl.glPixelStorei(GL2.GL_UNPACK_SKIP_PIXELS, 0);
- gl.glPixelStorei(GL2.GL_UNPACK_ALIGNMENT, 1);
- }
-
- private static void endBitmap(GL2 gl,
- int[] swapbytes,
- int[] lsbfirst,
- int[] rowlength,
- int[] skiprows,
- int[] skippixels,
- int[] alignment) {
- /* Restore saved modes. */
- gl.glPixelStorei(GL2.GL_UNPACK_SWAP_BYTES, swapbytes[0]);
- gl.glPixelStorei(GL2.GL_UNPACK_LSB_FIRST, lsbfirst[0]);
- gl.glPixelStorei(GL2.GL_UNPACK_ROW_LENGTH, rowlength[0]);
- gl.glPixelStorei(GL2.GL_UNPACK_SKIP_ROWS, skiprows[0]);
- gl.glPixelStorei(GL2.GL_UNPACK_SKIP_PIXELS, skippixels[0]);
- gl.glPixelStorei(GL2.GL_UNPACK_ALIGNMENT, alignment[0]);
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/gl2/GLUTBitmap8x13.java b/src/jogl/classes/com/sun/opengl/util/gl2/GLUTBitmap8x13.java
deleted file mode 100644
index b6e5c425a..000000000
--- a/src/jogl/classes/com/sun/opengl/util/gl2/GLUTBitmap8x13.java
+++ /dev/null
@@ -1,2078 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.util.gl2;
-
-class GLUTBitmap8x13 {
-
-/* GENERATED FILE -- DO NOT MODIFY */
-
-
-static final BitmapCharRec ch0 = new BitmapCharRec(0,0,0,0,8,null);
-
-static final BitmapCharRec ch32 = new BitmapCharRec(0,0,0,0,8,null);
-
-static final BitmapCharRec ch127 = new BitmapCharRec(0,0,0,0,8,null);
-
-static final BitmapCharRec ch160 = new BitmapCharRec(0,0,0,0,8,null);
-
-/* char: 0xff */
-
-static final byte[] ch255data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x4,(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x0,(byte) 0x48,(byte) 0x48,
-};
-
-static final BitmapCharRec ch255 = new BitmapCharRec(6,12,-1,2,8,ch255data);
-
-/* char: 0xfe */
-
-static final byte[] ch254data = {
-(byte) 0x80,(byte) 0x80,(byte) 0xb8,(byte) 0xc4,(byte) 0x84,(byte) 0x84,(byte) 0xc4,(byte) 0xb8,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch254 = new BitmapCharRec(6,10,-1,2,8,ch254data);
-
-/* char: 0xfd */
-
-static final byte[] ch253data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x4,(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x0,(byte) 0x20,(byte) 0x10,
-};
-
-static final BitmapCharRec ch253 = new BitmapCharRec(6,12,-1,2,8,ch253data);
-
-/* char: 0xfc */
-
-static final byte[] ch252data = {
-(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x0,(byte) 0x0,(byte) 0x48,(byte) 0x48,
-};
-
-static final BitmapCharRec ch252 = new BitmapCharRec(6,10,-1,0,8,ch252data);
-
-/* char: 0xfb */
-
-static final byte[] ch251data = {
-(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x0,(byte) 0x0,(byte) 0x48,(byte) 0x30,
-};
-
-static final BitmapCharRec ch251 = new BitmapCharRec(6,10,-1,0,8,ch251data);
-
-/* char: 0xfa */
-
-static final byte[] ch250data = {
-(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x0,(byte) 0x0,(byte) 0x20,(byte) 0x10,
-};
-
-static final BitmapCharRec ch250 = new BitmapCharRec(6,10,-1,0,8,ch250data);
-
-/* char: 0xf9 */
-
-static final byte[] ch249data = {
-(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x0,(byte) 0x0,(byte) 0x10,(byte) 0x20,
-};
-
-static final BitmapCharRec ch249 = new BitmapCharRec(6,10,-1,0,8,ch249data);
-
-/* char: 0xf8 */
-
-static final byte[] ch248data = {
-(byte) 0x80,(byte) 0x78,(byte) 0xc4,(byte) 0xa4,(byte) 0x94,(byte) 0x8c,(byte) 0x78,(byte) 0x4,
-};
-
-static final BitmapCharRec ch248 = new BitmapCharRec(6,8,-1,1,8,ch248data);
-
-/* char: 0xf7 */
-
-static final byte[] ch247data = {
-(byte) 0x20,(byte) 0x20,(byte) 0x0,(byte) 0xf8,(byte) 0x0,(byte) 0x20,(byte) 0x20,
-};
-
-static final BitmapCharRec ch247 = new BitmapCharRec(5,7,-1,-1,8,ch247data);
-
-/* char: 0xf6 */
-
-static final byte[] ch246data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x48,(byte) 0x48,
-};
-
-static final BitmapCharRec ch246 = new BitmapCharRec(6,10,-1,0,8,ch246data);
-
-/* char: 0xf5 */
-
-static final byte[] ch245data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x50,(byte) 0x28,
-};
-
-static final BitmapCharRec ch245 = new BitmapCharRec(6,10,-1,0,8,ch245data);
-
-/* char: 0xf4 */
-
-static final byte[] ch244data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x48,(byte) 0x30,
-};
-
-static final BitmapCharRec ch244 = new BitmapCharRec(6,10,-1,0,8,ch244data);
-
-/* char: 0xf3 */
-
-static final byte[] ch243data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x20,(byte) 0x10,
-};
-
-static final BitmapCharRec ch243 = new BitmapCharRec(6,10,-1,0,8,ch243data);
-
-/* char: 0xf2 */
-
-static final byte[] ch242data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x10,(byte) 0x20,
-};
-
-static final BitmapCharRec ch242 = new BitmapCharRec(6,10,-1,0,8,ch242data);
-
-/* char: 0xf1 */
-
-static final byte[] ch241data = {
-(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xc4,(byte) 0xb8,(byte) 0x0,(byte) 0x0,(byte) 0x50,(byte) 0x28,
-};
-
-static final BitmapCharRec ch241 = new BitmapCharRec(6,10,-1,0,8,ch241data);
-
-/* char: 0xf0 */
-
-static final byte[] ch240data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x8,(byte) 0x50,(byte) 0x30,(byte) 0x48,
-};
-
-static final BitmapCharRec ch240 = new BitmapCharRec(6,10,-1,0,8,ch240data);
-
-/* char: 0xef */
-
-static final byte[] ch239data = {
-(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x60,(byte) 0x0,(byte) 0x0,(byte) 0x50,(byte) 0x50,
-};
-
-static final BitmapCharRec ch239 = new BitmapCharRec(5,10,-1,0,8,ch239data);
-
-/* char: 0xee */
-
-static final byte[] ch238data = {
-(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x60,(byte) 0x0,(byte) 0x0,(byte) 0x90,(byte) 0x60,
-};
-
-static final BitmapCharRec ch238 = new BitmapCharRec(5,10,-1,0,8,ch238data);
-
-/* char: 0xed */
-
-static final byte[] ch237data = {
-(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x60,(byte) 0x0,(byte) 0x0,(byte) 0x40,(byte) 0x20,
-};
-
-static final BitmapCharRec ch237 = new BitmapCharRec(5,10,-1,0,8,ch237data);
-
-/* char: 0xec */
-
-static final byte[] ch236data = {
-(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x60,(byte) 0x0,(byte) 0x0,(byte) 0x20,(byte) 0x40,
-};
-
-static final BitmapCharRec ch236 = new BitmapCharRec(5,10,-1,0,8,ch236data);
-
-/* char: 0xeb */
-
-static final byte[] ch235data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x80,(byte) 0xfc,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x48,(byte) 0x48,
-};
-
-static final BitmapCharRec ch235 = new BitmapCharRec(6,10,-1,0,8,ch235data);
-
-/* char: 0xea */
-
-static final byte[] ch234data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x80,(byte) 0xfc,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x48,(byte) 0x30,
-};
-
-static final BitmapCharRec ch234 = new BitmapCharRec(6,10,-1,0,8,ch234data);
-
-/* char: 0xe9 */
-
-static final byte[] ch233data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x80,(byte) 0xfc,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x20,(byte) 0x10,
-};
-
-static final BitmapCharRec ch233 = new BitmapCharRec(6,10,-1,0,8,ch233data);
-
-/* char: 0xe8 */
-
-static final byte[] ch232data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x80,(byte) 0xfc,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x10,(byte) 0x20,
-};
-
-static final BitmapCharRec ch232 = new BitmapCharRec(6,10,-1,0,8,ch232data);
-
-/* char: 0xe7 */
-
-static final byte[] ch231data = {
-(byte) 0x20,(byte) 0x10,(byte) 0x78,(byte) 0x84,(byte) 0x80,(byte) 0x80,(byte) 0x84,(byte) 0x78,
-};
-
-static final BitmapCharRec ch231 = new BitmapCharRec(6,8,-1,2,8,ch231data);
-
-/* char: 0xe6 */
-
-static final byte[] ch230data = {
-(byte) 0x6c,(byte) 0x92,(byte) 0x90,(byte) 0x7c,(byte) 0x12,(byte) 0x6c,
-};
-
-static final BitmapCharRec ch230 = new BitmapCharRec(7,6,0,0,8,ch230data);
-
-/* char: 0xe5 */
-
-static final byte[] ch229data = {
-(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x7c,(byte) 0x4,(byte) 0x78,(byte) 0x0,(byte) 0x30,(byte) 0x48,(byte) 0x30,
-};
-
-static final BitmapCharRec ch229 = new BitmapCharRec(6,10,-1,0,8,ch229data);
-
-/* char: 0xe4 */
-
-static final byte[] ch228data = {
-(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x7c,(byte) 0x4,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x48,(byte) 0x48,
-};
-
-static final BitmapCharRec ch228 = new BitmapCharRec(6,10,-1,0,8,ch228data);
-
-/* char: 0xe3 */
-
-static final byte[] ch227data = {
-(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x7c,(byte) 0x4,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x50,(byte) 0x28,
-};
-
-static final BitmapCharRec ch227 = new BitmapCharRec(6,10,-1,0,8,ch227data);
-
-/* char: 0xe2 */
-
-static final byte[] ch226data = {
-(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x7c,(byte) 0x4,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x48,(byte) 0x30,
-};
-
-static final BitmapCharRec ch226 = new BitmapCharRec(6,10,-1,0,8,ch226data);
-
-/* char: 0xe1 */
-
-static final byte[] ch225data = {
-(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x7c,(byte) 0x4,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x20,(byte) 0x10,
-};
-
-static final BitmapCharRec ch225 = new BitmapCharRec(6,10,-1,0,8,ch225data);
-
-/* char: 0xe0 */
-
-static final byte[] ch224data = {
-(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x7c,(byte) 0x4,(byte) 0x78,(byte) 0x0,(byte) 0x0,(byte) 0x10,(byte) 0x20,
-};
-
-static final BitmapCharRec ch224 = new BitmapCharRec(6,10,-1,0,8,ch224data);
-
-/* char: 0xdf */
-
-static final byte[] ch223data = {
-(byte) 0x80,(byte) 0xb8,(byte) 0xc4,(byte) 0x84,(byte) 0x84,(byte) 0xf8,(byte) 0x84,(byte) 0x84,(byte) 0x78,
-};
-
-static final BitmapCharRec ch223 = new BitmapCharRec(6,9,-1,1,8,ch223data);
-
-/* char: 0xde */
-
-static final byte[] ch222data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xf8,(byte) 0x80,
-};
-
-static final BitmapCharRec ch222 = new BitmapCharRec(6,9,-1,0,8,ch222data);
-
-/* char: 0xdd */
-
-static final byte[] ch221data = {
-(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x50,(byte) 0x88,(byte) 0x88,(byte) 0x0,(byte) 0x20,(byte) 0x10,
-};
-
-static final BitmapCharRec ch221 = new BitmapCharRec(5,10,-1,0,8,ch221data);
-
-/* char: 0xdc */
-
-static final byte[] ch220data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x48,(byte) 0x48,
-};
-
-static final BitmapCharRec ch220 = new BitmapCharRec(6,10,-1,0,8,ch220data);
-
-/* char: 0xdb */
-
-static final byte[] ch219data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x48,(byte) 0x30,
-};
-
-static final BitmapCharRec ch219 = new BitmapCharRec(6,10,-1,0,8,ch219data);
-
-/* char: 0xda */
-
-static final byte[] ch218data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x20,(byte) 0x10,
-};
-
-static final BitmapCharRec ch218 = new BitmapCharRec(6,10,-1,0,8,ch218data);
-
-/* char: 0xd9 */
-
-static final byte[] ch217data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x10,(byte) 0x20,
-};
-
-static final BitmapCharRec ch217 = new BitmapCharRec(6,10,-1,0,8,ch217data);
-
-/* char: 0xd8 */
-
-static final byte[] ch216data = {
-(byte) 0x80,(byte) 0x78,(byte) 0xc4,(byte) 0xa4,(byte) 0xa4,(byte) 0xa4,(byte) 0x94,(byte) 0x94,(byte) 0x8c,(byte) 0x78,(byte) 0x4,
-};
-
-static final BitmapCharRec ch216 = new BitmapCharRec(6,11,-1,1,8,ch216data);
-
-/* char: 0xd7 */
-
-static final byte[] ch215data = {
-(byte) 0x84,(byte) 0x48,(byte) 0x30,(byte) 0x30,(byte) 0x48,(byte) 0x84,
-};
-
-static final BitmapCharRec ch215 = new BitmapCharRec(6,6,-1,-1,8,ch215data);
-
-/* char: 0xd6 */
-
-static final byte[] ch214data = {
-(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x28,(byte) 0x28,
-};
-
-static final BitmapCharRec ch214 = new BitmapCharRec(7,10,0,0,8,ch214data);
-
-/* char: 0xd5 */
-
-static final byte[] ch213data = {
-(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x28,(byte) 0x14,
-};
-
-static final BitmapCharRec ch213 = new BitmapCharRec(7,10,0,0,8,ch213data);
-
-/* char: 0xd4 */
-
-static final byte[] ch212data = {
-(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x24,(byte) 0x18,
-};
-
-static final BitmapCharRec ch212 = new BitmapCharRec(7,10,0,0,8,ch212data);
-
-/* char: 0xd3 */
-
-static final byte[] ch211data = {
-(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x10,(byte) 0x8,
-};
-
-static final BitmapCharRec ch211 = new BitmapCharRec(7,10,0,0,8,ch211data);
-
-/* char: 0xd2 */
-
-static final byte[] ch210data = {
-(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x8,(byte) 0x10,
-};
-
-static final BitmapCharRec ch210 = new BitmapCharRec(7,10,0,0,8,ch210data);
-
-/* char: 0xd1 */
-
-static final byte[] ch209data = {
-(byte) 0x82,(byte) 0x86,(byte) 0x8a,(byte) 0x92,(byte) 0xa2,(byte) 0xc2,(byte) 0x82,(byte) 0x0,(byte) 0x28,(byte) 0x14,
-};
-
-static final BitmapCharRec ch209 = new BitmapCharRec(7,10,0,0,8,ch209data);
-
-/* char: 0xd0 */
-
-static final byte[] ch208data = {
-(byte) 0xfc,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0xe2,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0xfc,
-};
-
-static final BitmapCharRec ch208 = new BitmapCharRec(7,9,0,0,8,ch208data);
-
-/* char: 0xcf */
-
-static final byte[] ch207data = {
-(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x0,(byte) 0x50,(byte) 0x50,
-};
-
-static final BitmapCharRec ch207 = new BitmapCharRec(5,10,-1,0,8,ch207data);
-
-/* char: 0xce */
-
-static final byte[] ch206data = {
-(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x0,(byte) 0x48,(byte) 0x30,
-};
-
-static final BitmapCharRec ch206 = new BitmapCharRec(5,10,-1,0,8,ch206data);
-
-/* char: 0xcd */
-
-static final byte[] ch205data = {
-(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x0,(byte) 0x20,(byte) 0x10,
-};
-
-static final BitmapCharRec ch205 = new BitmapCharRec(5,10,-1,0,8,ch205data);
-
-/* char: 0xcc */
-
-static final byte[] ch204data = {
-(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x0,(byte) 0x10,(byte) 0x20,
-};
-
-static final BitmapCharRec ch204 = new BitmapCharRec(5,10,-1,0,8,ch204data);
-
-/* char: 0xcb */
-
-static final byte[] ch203data = {
-(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x0,(byte) 0x48,(byte) 0x48,
-};
-
-static final BitmapCharRec ch203 = new BitmapCharRec(6,10,-1,0,8,ch203data);
-
-/* char: 0xca */
-
-static final byte[] ch202data = {
-(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x0,(byte) 0x48,(byte) 0x30,
-};
-
-static final BitmapCharRec ch202 = new BitmapCharRec(6,10,-1,0,8,ch202data);
-
-/* char: 0xc9 */
-
-static final byte[] ch201data = {
-(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x0,(byte) 0x20,(byte) 0x10,
-};
-
-static final BitmapCharRec ch201 = new BitmapCharRec(6,10,-1,0,8,ch201data);
-
-/* char: 0xc8 */
-
-static final byte[] ch200data = {
-(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x0,(byte) 0x10,(byte) 0x20,
-};
-
-static final BitmapCharRec ch200 = new BitmapCharRec(6,10,-1,0,8,ch200data);
-
-/* char: 0xc7 */
-
-static final byte[] ch199data = {
-(byte) 0x20,(byte) 0x10,(byte) 0x78,(byte) 0x84,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x84,(byte) 0x78,
-};
-
-static final BitmapCharRec ch199 = new BitmapCharRec(6,11,-1,2,8,ch199data);
-
-/* char: 0xc6 */
-
-static final byte[] ch198data = {
-(byte) 0x9e,(byte) 0x90,(byte) 0x90,(byte) 0xf0,(byte) 0x9c,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x6e,
-};
-
-static final BitmapCharRec ch198 = new BitmapCharRec(7,9,0,0,8,ch198data);
-
-/* char: 0xc5 */
-
-static final byte[] ch197data = {
-(byte) 0x84,(byte) 0x84,(byte) 0xfc,(byte) 0x84,(byte) 0x84,(byte) 0x48,(byte) 0x30,(byte) 0x30,(byte) 0x48,(byte) 0x30,
-};
-
-static final BitmapCharRec ch197 = new BitmapCharRec(6,10,-1,0,8,ch197data);
-
-/* char: 0xc4 */
-
-static final byte[] ch196data = {
-(byte) 0x84,(byte) 0x84,(byte) 0xfc,(byte) 0x84,(byte) 0x84,(byte) 0x48,(byte) 0x30,(byte) 0x0,(byte) 0x48,(byte) 0x48,
-};
-
-static final BitmapCharRec ch196 = new BitmapCharRec(6,10,-1,0,8,ch196data);
-
-/* char: 0xc3 */
-
-static final byte[] ch195data = {
-(byte) 0x84,(byte) 0x84,(byte) 0xfc,(byte) 0x84,(byte) 0x84,(byte) 0x48,(byte) 0x30,(byte) 0x0,(byte) 0x50,(byte) 0x28,
-};
-
-static final BitmapCharRec ch195 = new BitmapCharRec(6,10,-1,0,8,ch195data);
-
-/* char: 0xc2 */
-
-static final byte[] ch194data = {
-(byte) 0x84,(byte) 0x84,(byte) 0xfc,(byte) 0x84,(byte) 0x84,(byte) 0x48,(byte) 0x30,(byte) 0x0,(byte) 0x48,(byte) 0x30,
-};
-
-static final BitmapCharRec ch194 = new BitmapCharRec(6,10,-1,0,8,ch194data);
-
-/* char: 0xc1 */
-
-static final byte[] ch193data = {
-(byte) 0x84,(byte) 0x84,(byte) 0xfc,(byte) 0x84,(byte) 0x84,(byte) 0x48,(byte) 0x30,(byte) 0x0,(byte) 0x20,(byte) 0x10,
-};
-
-static final BitmapCharRec ch193 = new BitmapCharRec(6,10,-1,0,8,ch193data);
-
-/* char: 0xc0 */
-
-static final byte[] ch192data = {
-(byte) 0x84,(byte) 0x84,(byte) 0xfc,(byte) 0x84,(byte) 0x84,(byte) 0x48,(byte) 0x30,(byte) 0x0,(byte) 0x10,(byte) 0x20,
-};
-
-static final BitmapCharRec ch192 = new BitmapCharRec(6,10,-1,0,8,ch192data);
-
-/* char: 0xbf */
-
-static final byte[] ch191data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x0,(byte) 0x20,
-};
-
-static final BitmapCharRec ch191 = new BitmapCharRec(6,9,-1,0,8,ch191data);
-
-/* char: 0xbe */
-
-static final byte[] ch190data = {
-(byte) 0x6,(byte) 0x1a,(byte) 0x12,(byte) 0xa,(byte) 0x66,(byte) 0x92,(byte) 0x10,(byte) 0x20,(byte) 0x90,(byte) 0x60,
-};
-
-static final BitmapCharRec ch190 = new BitmapCharRec(7,10,0,0,8,ch190data);
-
-/* char: 0xbd */
-
-static final byte[] ch189data = {
-(byte) 0x1e,(byte) 0x10,(byte) 0xc,(byte) 0x2,(byte) 0xf2,(byte) 0x4c,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch189 = new BitmapCharRec(7,10,0,0,8,ch189data);
-
-/* char: 0xbc */
-
-static final byte[] ch188data = {
-(byte) 0x6,(byte) 0x1a,(byte) 0x12,(byte) 0xa,(byte) 0xe6,(byte) 0x42,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch188 = new BitmapCharRec(7,10,0,0,8,ch188data);
-
-/* char: 0xbb */
-
-static final byte[] ch187data = {
-(byte) 0x90,(byte) 0x48,(byte) 0x24,(byte) 0x12,(byte) 0x24,(byte) 0x48,(byte) 0x90,
-};
-
-static final BitmapCharRec ch187 = new BitmapCharRec(7,7,0,-1,8,ch187data);
-
-/* char: 0xba */
-
-static final byte[] ch186data = {
-(byte) 0xf0,(byte) 0x0,(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x60,
-};
-
-static final BitmapCharRec ch186 = new BitmapCharRec(4,6,-1,-3,8,ch186data);
-
-/* char: 0xb9 */
-
-static final byte[] ch185data = {
-(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch185 = new BitmapCharRec(3,6,-1,-4,8,ch185data);
-
-/* char: 0xb8 */
-
-static final byte[] ch184data = {
-(byte) 0xc0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch184 = new BitmapCharRec(2,2,-3,2,8,ch184data);
-
-/* char: 0xb7 */
-
-static final byte[] ch183data = {
-(byte) 0xc0,
-};
-
-static final BitmapCharRec ch183 = new BitmapCharRec(2,1,-3,-4,8,ch183data);
-
-/* char: 0xb6 */
-
-static final byte[] ch182data = {
-(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x68,(byte) 0xe8,(byte) 0xe8,(byte) 0xe8,(byte) 0x7c,
-};
-
-static final BitmapCharRec ch182 = new BitmapCharRec(6,9,-1,0,8,ch182data);
-
-/* char: 0xb5 */
-
-static final byte[] ch181data = {
-(byte) 0x80,(byte) 0xb4,(byte) 0xcc,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,
-};
-
-static final BitmapCharRec ch181 = new BitmapCharRec(6,7,-1,1,8,ch181data);
-
-/* char: 0xb4 */
-
-static final byte[] ch180data = {
-(byte) 0x80,(byte) 0x40,
-};
-
-static final BitmapCharRec ch180 = new BitmapCharRec(2,2,-3,-8,8,ch180data);
-
-/* char: 0xb3 */
-
-static final byte[] ch179data = {
-(byte) 0x60,(byte) 0x90,(byte) 0x10,(byte) 0x20,(byte) 0x90,(byte) 0x60,
-};
-
-static final BitmapCharRec ch179 = new BitmapCharRec(4,6,-1,-4,8,ch179data);
-
-/* char: 0xb2 */
-
-static final byte[] ch178data = {
-(byte) 0xf0,(byte) 0x80,(byte) 0x60,(byte) 0x10,(byte) 0x90,(byte) 0x60,
-};
-
-static final BitmapCharRec ch178 = new BitmapCharRec(4,6,-1,-4,8,ch178data);
-
-/* char: 0xb1 */
-
-static final byte[] ch177data = {
-(byte) 0xf8,(byte) 0x0,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x20,
-};
-
-static final BitmapCharRec ch177 = new BitmapCharRec(5,7,-1,-1,8,ch177data);
-
-/* char: 0xb0 */
-
-static final byte[] ch176data = {
-(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x60,
-};
-
-static final BitmapCharRec ch176 = new BitmapCharRec(4,4,-2,-5,8,ch176data);
-
-/* char: 0xaf */
-
-static final byte[] ch175data = {
-(byte) 0xfc,
-};
-
-static final BitmapCharRec ch175 = new BitmapCharRec(6,1,-1,-8,8,ch175data);
-
-/* char: 0xae */
-
-static final byte[] ch174data = {
-(byte) 0x38,(byte) 0x44,(byte) 0xaa,(byte) 0xb2,(byte) 0xaa,(byte) 0xaa,(byte) 0x92,(byte) 0x44,(byte) 0x38,
-};
-
-static final BitmapCharRec ch174 = new BitmapCharRec(7,9,0,-1,8,ch174data);
-
-/* char: 0xad */
-
-static final byte[] ch173data = {
-(byte) 0xfc,
-};
-
-static final BitmapCharRec ch173 = new BitmapCharRec(6,1,-1,-4,8,ch173data);
-
-/* char: 0xac */
-
-static final byte[] ch172data = {
-(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0xfc,
-};
-
-static final BitmapCharRec ch172 = new BitmapCharRec(6,4,-1,-1,8,ch172data);
-
-/* char: 0xab */
-
-static final byte[] ch171data = {
-(byte) 0x12,(byte) 0x24,(byte) 0x48,(byte) 0x90,(byte) 0x48,(byte) 0x24,(byte) 0x12,
-};
-
-static final BitmapCharRec ch171 = new BitmapCharRec(7,7,0,-1,8,ch171data);
-
-/* char: 0xaa */
-
-static final byte[] ch170data = {
-(byte) 0xf8,(byte) 0x0,(byte) 0x78,(byte) 0x88,(byte) 0x78,(byte) 0x8,(byte) 0x70,
-};
-
-static final BitmapCharRec ch170 = new BitmapCharRec(5,7,-1,-2,8,ch170data);
-
-/* char: 0xa9 */
-
-static final byte[] ch169data = {
-(byte) 0x38,(byte) 0x44,(byte) 0x92,(byte) 0xaa,(byte) 0xa2,(byte) 0xaa,(byte) 0x92,(byte) 0x44,(byte) 0x38,
-};
-
-static final BitmapCharRec ch169 = new BitmapCharRec(7,9,0,-1,8,ch169data);
-
-/* char: 0xa8 */
-
-static final byte[] ch168data = {
-(byte) 0xd8,
-};
-
-static final BitmapCharRec ch168 = new BitmapCharRec(5,1,-1,-8,8,ch168data);
-
-/* char: 0xa7 */
-
-static final byte[] ch167data = {
-(byte) 0x60,(byte) 0x90,(byte) 0x10,(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x60,(byte) 0x80,(byte) 0x90,(byte) 0x60,
-};
-
-static final BitmapCharRec ch167 = new BitmapCharRec(4,10,-2,0,8,ch167data);
-
-/* char: 0xa6 */
-
-static final byte[] ch166data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch166 = new BitmapCharRec(1,9,-3,0,8,ch166data);
-
-/* char: 0xa5 */
-
-static final byte[] ch165data = {
-(byte) 0x10,(byte) 0x10,(byte) 0x7c,(byte) 0x10,(byte) 0x7c,(byte) 0x28,(byte) 0x44,(byte) 0x82,(byte) 0x82,
-};
-
-static final BitmapCharRec ch165 = new BitmapCharRec(7,9,0,0,8,ch165data);
-
-/* char: 0xa4 */
-
-static final byte[] ch164data = {
-(byte) 0x84,(byte) 0x78,(byte) 0x48,(byte) 0x48,(byte) 0x78,(byte) 0x84,
-};
-
-static final BitmapCharRec ch164 = new BitmapCharRec(6,6,-1,-1,8,ch164data);
-
-/* char: 0xa3 */
-
-static final byte[] ch163data = {
-(byte) 0xdc,(byte) 0x62,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x70,(byte) 0x20,(byte) 0x22,(byte) 0x1c,
-};
-
-static final BitmapCharRec ch163 = new BitmapCharRec(7,9,0,0,8,ch163data);
-
-/* char: 0xa2 */
-
-static final byte[] ch162data = {
-(byte) 0x20,(byte) 0x70,(byte) 0xa8,(byte) 0xa0,(byte) 0xa0,(byte) 0xa8,(byte) 0x70,(byte) 0x20,
-};
-
-static final BitmapCharRec ch162 = new BitmapCharRec(5,8,-1,-1,8,ch162data);
-
-/* char: 0xa1 */
-
-static final byte[] ch161data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,
-};
-
-static final BitmapCharRec ch161 = new BitmapCharRec(1,9,-3,0,8,ch161data);
-
-/* char: 0x7e '~' */
-
-static final byte[] ch126data = {
-(byte) 0x90,(byte) 0xa8,(byte) 0x48,
-};
-
-static final BitmapCharRec ch126 = new BitmapCharRec(5,3,-1,-6,8,ch126data);
-
-/* char: 0x7d '}' */
-
-static final byte[] ch125data = {
-(byte) 0xe0,(byte) 0x10,(byte) 0x10,(byte) 0x20,(byte) 0x18,(byte) 0x20,(byte) 0x10,(byte) 0x10,(byte) 0xe0,
-};
-
-static final BitmapCharRec ch125 = new BitmapCharRec(5,9,-1,0,8,ch125data);
-
-/* char: 0x7c '|' */
-
-static final byte[] ch124data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch124 = new BitmapCharRec(1,9,-3,0,8,ch124data);
-
-/* char: 0x7b '{' */
-
-static final byte[] ch123data = {
-(byte) 0x38,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0xc0,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x38,
-};
-
-static final BitmapCharRec ch123 = new BitmapCharRec(5,9,-2,0,8,ch123data);
-
-/* char: 0x7a 'z' */
-
-static final byte[] ch122data = {
-(byte) 0xfc,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0xfc,
-};
-
-static final BitmapCharRec ch122 = new BitmapCharRec(6,6,-1,0,8,ch122data);
-
-/* char: 0x79 'y' */
-
-static final byte[] ch121data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x4,(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x84,(byte) 0x84,
-};
-
-static final BitmapCharRec ch121 = new BitmapCharRec(6,8,-1,2,8,ch121data);
-
-/* char: 0x78 'x' */
-
-static final byte[] ch120data = {
-(byte) 0x84,(byte) 0x48,(byte) 0x30,(byte) 0x30,(byte) 0x48,(byte) 0x84,
-};
-
-static final BitmapCharRec ch120 = new BitmapCharRec(6,6,-1,0,8,ch120data);
-
-/* char: 0x77 'w' */
-
-static final byte[] ch119data = {
-(byte) 0x44,(byte) 0xaa,(byte) 0x92,(byte) 0x92,(byte) 0x82,(byte) 0x82,
-};
-
-static final BitmapCharRec ch119 = new BitmapCharRec(7,6,0,0,8,ch119data);
-
-/* char: 0x76 'v' */
-
-static final byte[] ch118data = {
-(byte) 0x20,(byte) 0x50,(byte) 0x50,(byte) 0x88,(byte) 0x88,(byte) 0x88,
-};
-
-static final BitmapCharRec ch118 = new BitmapCharRec(5,6,-1,0,8,ch118data);
-
-/* char: 0x75 'u' */
-
-static final byte[] ch117data = {
-(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,
-};
-
-static final BitmapCharRec ch117 = new BitmapCharRec(6,6,-1,0,8,ch117data);
-
-/* char: 0x74 't' */
-
-static final byte[] ch116data = {
-(byte) 0x38,(byte) 0x44,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xf8,(byte) 0x40,(byte) 0x40,
-};
-
-static final BitmapCharRec ch116 = new BitmapCharRec(6,8,-1,0,8,ch116data);
-
-/* char: 0x73 's' */
-
-static final byte[] ch115data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x18,(byte) 0x60,(byte) 0x84,(byte) 0x78,
-};
-
-static final BitmapCharRec ch115 = new BitmapCharRec(6,6,-1,0,8,ch115data);
-
-/* char: 0x72 'r' */
-
-static final byte[] ch114data = {
-(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x44,(byte) 0xb8,
-};
-
-static final BitmapCharRec ch114 = new BitmapCharRec(6,6,-1,0,8,ch114data);
-
-/* char: 0x71 'q' */
-
-static final byte[] ch113data = {
-(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x8c,(byte) 0x74,
-};
-
-static final BitmapCharRec ch113 = new BitmapCharRec(6,8,-1,2,8,ch113data);
-
-/* char: 0x70 'p' */
-
-static final byte[] ch112data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xb8,(byte) 0xc4,(byte) 0x84,(byte) 0xc4,(byte) 0xb8,
-};
-
-static final BitmapCharRec ch112 = new BitmapCharRec(6,8,-1,2,8,ch112data);
-
-/* char: 0x6f 'o' */
-
-static final byte[] ch111data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,
-};
-
-static final BitmapCharRec ch111 = new BitmapCharRec(6,6,-1,0,8,ch111data);
-
-/* char: 0x6e 'n' */
-
-static final byte[] ch110data = {
-(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xc4,(byte) 0xb8,
-};
-
-static final BitmapCharRec ch110 = new BitmapCharRec(6,6,-1,0,8,ch110data);
-
-/* char: 0x6d 'm' */
-
-static final byte[] ch109data = {
-(byte) 0x82,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0xec,
-};
-
-static final BitmapCharRec ch109 = new BitmapCharRec(7,6,0,0,8,ch109data);
-
-/* char: 0x6c 'l' */
-
-static final byte[] ch108data = {
-(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x60,
-};
-
-static final BitmapCharRec ch108 = new BitmapCharRec(5,9,-1,0,8,ch108data);
-
-/* char: 0x6b 'k' */
-
-static final byte[] ch107data = {
-(byte) 0x84,(byte) 0x88,(byte) 0x90,(byte) 0xe0,(byte) 0x90,(byte) 0x88,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch107 = new BitmapCharRec(6,9,-1,0,8,ch107data);
-
-/* char: 0x6a 'j' */
-
-static final byte[] ch106data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x18,(byte) 0x0,(byte) 0x8,
-};
-
-static final BitmapCharRec ch106 = new BitmapCharRec(5,10,-1,2,8,ch106data);
-
-/* char: 0x69 'i' */
-
-static final byte[] ch105data = {
-(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x60,(byte) 0x0,(byte) 0x20,
-};
-
-static final BitmapCharRec ch105 = new BitmapCharRec(5,8,-1,0,8,ch105data);
-
-/* char: 0x68 'h' */
-
-static final byte[] ch104data = {
-(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xc4,(byte) 0xb8,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch104 = new BitmapCharRec(6,9,-1,0,8,ch104data);
-
-/* char: 0x67 'g' */
-
-static final byte[] ch103data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x78,(byte) 0x80,(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x74,
-};
-
-static final BitmapCharRec ch103 = new BitmapCharRec(6,8,-1,2,8,ch103data);
-
-/* char: 0x66 'f' */
-
-static final byte[] ch102data = {
-(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xf8,(byte) 0x40,(byte) 0x40,(byte) 0x44,(byte) 0x38,
-};
-
-static final BitmapCharRec ch102 = new BitmapCharRec(6,9,-1,0,8,ch102data);
-
-/* char: 0x65 'e' */
-
-static final byte[] ch101data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x80,(byte) 0xfc,(byte) 0x84,(byte) 0x78,
-};
-
-static final BitmapCharRec ch101 = new BitmapCharRec(6,6,-1,0,8,ch101data);
-
-/* char: 0x64 'd' */
-
-static final byte[] ch100data = {
-(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x84,(byte) 0x8c,(byte) 0x74,(byte) 0x4,(byte) 0x4,(byte) 0x4,
-};
-
-static final BitmapCharRec ch100 = new BitmapCharRec(6,9,-1,0,8,ch100data);
-
-/* char: 0x63 'c' */
-
-static final byte[] ch99data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x80,(byte) 0x80,(byte) 0x84,(byte) 0x78,
-};
-
-static final BitmapCharRec ch99 = new BitmapCharRec(6,6,-1,0,8,ch99data);
-
-/* char: 0x62 'b' */
-
-static final byte[] ch98data = {
-(byte) 0xb8,(byte) 0xc4,(byte) 0x84,(byte) 0x84,(byte) 0xc4,(byte) 0xb8,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch98 = new BitmapCharRec(6,9,-1,0,8,ch98data);
-
-/* char: 0x61 'a' */
-
-static final byte[] ch97data = {
-(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x7c,(byte) 0x4,(byte) 0x78,
-};
-
-static final BitmapCharRec ch97 = new BitmapCharRec(6,6,-1,0,8,ch97data);
-
-/* char: 0x60 '`' */
-
-static final byte[] ch96data = {
-(byte) 0x10,(byte) 0x60,(byte) 0xe0,
-};
-
-static final BitmapCharRec ch96 = new BitmapCharRec(4,3,-2,-6,8,ch96data);
-
-/* char: 0x5f '_' */
-
-static final byte[] ch95data = {
-(byte) 0xfe,
-};
-
-static final BitmapCharRec ch95 = new BitmapCharRec(7,1,0,1,8,ch95data);
-
-/* char: 0x5e '^' */
-
-static final byte[] ch94data = {
-(byte) 0x88,(byte) 0x50,(byte) 0x20,
-};
-
-static final BitmapCharRec ch94 = new BitmapCharRec(5,3,-1,-6,8,ch94data);
-
-/* char: 0x5d ']' */
-
-static final byte[] ch93data = {
-(byte) 0xf0,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xf0,
-};
-
-static final BitmapCharRec ch93 = new BitmapCharRec(4,9,-1,0,8,ch93data);
-
-/* char: 0x5c '\' */
-
-static final byte[] ch92data = {
-(byte) 0x2,(byte) 0x2,(byte) 0x4,(byte) 0x8,(byte) 0x10,(byte) 0x20,(byte) 0x40,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch92 = new BitmapCharRec(7,9,0,0,8,ch92data);
-
-/* char: 0x5b '[' */
-
-static final byte[] ch91data = {
-(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf0,
-};
-
-static final BitmapCharRec ch91 = new BitmapCharRec(4,9,-2,0,8,ch91data);
-
-/* char: 0x5a 'Z' */
-
-static final byte[] ch90data = {
-(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0x4,(byte) 0xfc,
-};
-
-static final BitmapCharRec ch90 = new BitmapCharRec(6,9,-1,0,8,ch90data);
-
-/* char: 0x59 'Y' */
-
-static final byte[] ch89data = {
-(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x44,(byte) 0x82,(byte) 0x82,
-};
-
-static final BitmapCharRec ch89 = new BitmapCharRec(7,9,0,0,8,ch89data);
-
-/* char: 0x58 'X' */
-
-static final byte[] ch88data = {
-(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x28,(byte) 0x44,(byte) 0x82,(byte) 0x82,
-};
-
-static final BitmapCharRec ch88 = new BitmapCharRec(7,9,0,0,8,ch88data);
-
-/* char: 0x57 'W' */
-
-static final byte[] ch87data = {
-(byte) 0x44,(byte) 0xaa,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,
-};
-
-static final BitmapCharRec ch87 = new BitmapCharRec(7,9,0,0,8,ch87data);
-
-/* char: 0x56 'V' */
-
-static final byte[] ch86data = {
-(byte) 0x10,(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0x82,(byte) 0x82,
-};
-
-static final BitmapCharRec ch86 = new BitmapCharRec(7,9,0,0,8,ch86data);
-
-/* char: 0x55 'U' */
-
-static final byte[] ch85data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,
-};
-
-static final BitmapCharRec ch85 = new BitmapCharRec(6,9,-1,0,8,ch85data);
-
-/* char: 0x54 'T' */
-
-static final byte[] ch84data = {
-(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xfe,
-};
-
-static final BitmapCharRec ch84 = new BitmapCharRec(7,9,0,0,8,ch84data);
-
-/* char: 0x53 'S' */
-
-static final byte[] ch83data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x4,(byte) 0x4,(byte) 0x78,(byte) 0x80,(byte) 0x80,(byte) 0x84,(byte) 0x78,
-};
-
-static final BitmapCharRec ch83 = new BitmapCharRec(6,9,-1,0,8,ch83data);
-
-/* char: 0x52 'R' */
-
-static final byte[] ch82data = {
-(byte) 0x84,(byte) 0x88,(byte) 0x90,(byte) 0xa0,(byte) 0xf8,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch82 = new BitmapCharRec(6,9,-1,0,8,ch82data);
-
-/* char: 0x51 'Q' */
-
-static final byte[] ch81data = {
-(byte) 0x4,(byte) 0x78,(byte) 0x94,(byte) 0xa4,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,
-};
-
-static final BitmapCharRec ch81 = new BitmapCharRec(6,10,-1,1,8,ch81data);
-
-/* char: 0x50 'P' */
-
-static final byte[] ch80data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch80 = new BitmapCharRec(6,9,-1,0,8,ch80data);
-
-/* char: 0x4f 'O' */
-
-static final byte[] ch79data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,
-};
-
-static final BitmapCharRec ch79 = new BitmapCharRec(6,9,-1,0,8,ch79data);
-
-/* char: 0x4e 'N' */
-
-static final byte[] ch78data = {
-(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x8c,(byte) 0x94,(byte) 0xa4,(byte) 0xc4,(byte) 0x84,(byte) 0x84,
-};
-
-static final BitmapCharRec ch78 = new BitmapCharRec(6,9,-1,0,8,ch78data);
-
-/* char: 0x4d 'M' */
-
-static final byte[] ch77data = {
-(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x92,(byte) 0x92,(byte) 0xaa,(byte) 0xc6,(byte) 0x82,(byte) 0x82,
-};
-
-static final BitmapCharRec ch77 = new BitmapCharRec(7,9,0,0,8,ch77data);
-
-/* char: 0x4c 'L' */
-
-static final byte[] ch76data = {
-(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch76 = new BitmapCharRec(6,9,-1,0,8,ch76data);
-
-/* char: 0x4b 'K' */
-
-static final byte[] ch75data = {
-(byte) 0x84,(byte) 0x88,(byte) 0x90,(byte) 0xa0,(byte) 0xc0,(byte) 0xa0,(byte) 0x90,(byte) 0x88,(byte) 0x84,
-};
-
-static final BitmapCharRec ch75 = new BitmapCharRec(6,9,-1,0,8,ch75data);
-
-/* char: 0x4a 'J' */
-
-static final byte[] ch74data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x3c,
-};
-
-static final BitmapCharRec ch74 = new BitmapCharRec(6,9,-1,0,8,ch74data);
-
-/* char: 0x49 'I' */
-
-static final byte[] ch73data = {
-(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch73 = new BitmapCharRec(5,9,-1,0,8,ch73data);
-
-/* char: 0x48 'H' */
-
-static final byte[] ch72data = {
-(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xfc,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,
-};
-
-static final BitmapCharRec ch72 = new BitmapCharRec(6,9,-1,0,8,ch72data);
-
-/* char: 0x47 'G' */
-
-static final byte[] ch71data = {
-(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x9c,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x84,(byte) 0x78,
-};
-
-static final BitmapCharRec ch71 = new BitmapCharRec(6,9,-1,0,8,ch71data);
-
-/* char: 0x46 'F' */
-
-static final byte[] ch70data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,
-};
-
-static final BitmapCharRec ch70 = new BitmapCharRec(6,9,-1,0,8,ch70data);
-
-/* char: 0x45 'E' */
-
-static final byte[] ch69data = {
-(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,
-};
-
-static final BitmapCharRec ch69 = new BitmapCharRec(6,9,-1,0,8,ch69data);
-
-/* char: 0x44 'D' */
-
-static final byte[] ch68data = {
-(byte) 0xfc,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0xfc,
-};
-
-static final BitmapCharRec ch68 = new BitmapCharRec(7,9,0,0,8,ch68data);
-
-/* char: 0x43 'C' */
-
-static final byte[] ch67data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x84,(byte) 0x78,
-};
-
-static final BitmapCharRec ch67 = new BitmapCharRec(6,9,-1,0,8,ch67data);
-
-/* char: 0x42 'B' */
-
-static final byte[] ch66data = {
-(byte) 0xfc,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x7c,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0xfc,
-};
-
-static final BitmapCharRec ch66 = new BitmapCharRec(7,9,0,0,8,ch66data);
-
-/* char: 0x41 'A' */
-
-static final byte[] ch65data = {
-(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xfc,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x48,(byte) 0x30,
-};
-
-static final BitmapCharRec ch65 = new BitmapCharRec(6,9,-1,0,8,ch65data);
-
-/* char: 0x40 '@' */
-
-static final byte[] ch64data = {
-(byte) 0x78,(byte) 0x80,(byte) 0x94,(byte) 0xac,(byte) 0xa4,(byte) 0x9c,(byte) 0x84,(byte) 0x84,(byte) 0x78,
-};
-
-static final BitmapCharRec ch64 = new BitmapCharRec(6,9,-1,0,8,ch64data);
-
-/* char: 0x3f '?' */
-
-static final byte[] ch63data = {
-(byte) 0x10,(byte) 0x0,(byte) 0x10,(byte) 0x10,(byte) 0x8,(byte) 0x4,(byte) 0x84,(byte) 0x84,(byte) 0x78,
-};
-
-static final BitmapCharRec ch63 = new BitmapCharRec(6,9,-1,0,8,ch63data);
-
-/* char: 0x3e '>' */
-
-static final byte[] ch62data = {
-(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0x10,(byte) 0x20,(byte) 0x40,(byte) 0x80,
-};
-
-static final BitmapCharRec ch62 = new BitmapCharRec(5,9,-1,0,8,ch62data);
-
-/* char: 0x3d '=' */
-
-static final byte[] ch61data = {
-(byte) 0xfc,(byte) 0x0,(byte) 0x0,(byte) 0xfc,
-};
-
-static final BitmapCharRec ch61 = new BitmapCharRec(6,4,-1,-2,8,ch61data);
-
-/* char: 0x3c '<' */
-
-static final byte[] ch60data = {
-(byte) 0x8,(byte) 0x10,(byte) 0x20,(byte) 0x40,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,
-};
-
-static final BitmapCharRec ch60 = new BitmapCharRec(5,9,-2,0,8,ch60data);
-
-/* char: 0x3b ';' */
-
-static final byte[] ch59data = {
-(byte) 0x80,(byte) 0x60,(byte) 0x70,(byte) 0x0,(byte) 0x0,(byte) 0x20,(byte) 0x70,(byte) 0x20,
-};
-
-static final BitmapCharRec ch59 = new BitmapCharRec(4,8,-1,1,8,ch59data);
-
-/* char: 0x3a ':' */
-
-static final byte[] ch58data = {
-(byte) 0x40,(byte) 0xe0,(byte) 0x40,(byte) 0x0,(byte) 0x0,(byte) 0x40,(byte) 0xe0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch58 = new BitmapCharRec(3,8,-2,1,8,ch58data);
-
-/* char: 0x39 '9' */
-
-static final byte[] ch57data = {
-(byte) 0x70,(byte) 0x8,(byte) 0x4,(byte) 0x4,(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x84,(byte) 0x78,
-};
-
-static final BitmapCharRec ch57 = new BitmapCharRec(6,9,-1,0,8,ch57data);
-
-/* char: 0x38 '8' */
-
-static final byte[] ch56data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,
-};
-
-static final BitmapCharRec ch56 = new BitmapCharRec(6,9,-1,0,8,ch56data);
-
-/* char: 0x37 '7' */
-
-static final byte[] ch55data = {
-(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x10,(byte) 0x10,(byte) 0x8,(byte) 0x4,(byte) 0xfc,
-};
-
-static final BitmapCharRec ch55 = new BitmapCharRec(6,9,-1,0,8,ch55data);
-
-/* char: 0x36 '6' */
-
-static final byte[] ch54data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0xc4,(byte) 0xb8,(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x38,
-};
-
-static final BitmapCharRec ch54 = new BitmapCharRec(6,9,-1,0,8,ch54data);
-
-/* char: 0x35 '5' */
-
-static final byte[] ch53data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x4,(byte) 0x4,(byte) 0xc4,(byte) 0xb8,(byte) 0x80,(byte) 0x80,(byte) 0xfc,
-};
-
-static final BitmapCharRec ch53 = new BitmapCharRec(6,9,-1,0,8,ch53data);
-
-/* char: 0x34 '4' */
-
-static final byte[] ch52data = {
-(byte) 0x8,(byte) 0x8,(byte) 0xfc,(byte) 0x88,(byte) 0x88,(byte) 0x48,(byte) 0x28,(byte) 0x18,(byte) 0x8,
-};
-
-static final BitmapCharRec ch52 = new BitmapCharRec(6,9,-1,0,8,ch52data);
-
-/* char: 0x33 '3' */
-
-static final byte[] ch51data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x4,(byte) 0x4,(byte) 0x38,(byte) 0x10,(byte) 0x8,(byte) 0x4,(byte) 0xfc,
-};
-
-static final BitmapCharRec ch51 = new BitmapCharRec(6,9,-1,0,8,ch51data);
-
-/* char: 0x32 '2' */
-
-static final byte[] ch50data = {
-(byte) 0xfc,(byte) 0x80,(byte) 0x40,(byte) 0x30,(byte) 0x8,(byte) 0x4,(byte) 0x84,(byte) 0x84,(byte) 0x78,
-};
-
-static final BitmapCharRec ch50 = new BitmapCharRec(6,9,-1,0,8,ch50data);
-
-/* char: 0x31 '1' */
-
-static final byte[] ch49data = {
-(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xa0,(byte) 0x60,(byte) 0x20,
-};
-
-static final BitmapCharRec ch49 = new BitmapCharRec(5,9,-1,0,8,ch49data);
-
-/* char: 0x30 '0' */
-
-static final byte[] ch48data = {
-(byte) 0x30,(byte) 0x48,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x48,(byte) 0x30,
-};
-
-static final BitmapCharRec ch48 = new BitmapCharRec(6,9,-1,0,8,ch48data);
-
-/* char: 0x2f '/' */
-
-static final byte[] ch47data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0x4,(byte) 0x2,(byte) 0x2,
-};
-
-static final BitmapCharRec ch47 = new BitmapCharRec(7,9,0,0,8,ch47data);
-
-/* char: 0x2e '.' */
-
-static final byte[] ch46data = {
-(byte) 0x40,(byte) 0xe0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch46 = new BitmapCharRec(3,3,-2,1,8,ch46data);
-
-/* char: 0x2d '-' */
-
-static final byte[] ch45data = {
-(byte) 0xfc,
-};
-
-static final BitmapCharRec ch45 = new BitmapCharRec(6,1,-1,-4,8,ch45data);
-
-/* char: 0x2c ',' */
-
-static final byte[] ch44data = {
-(byte) 0x80,(byte) 0x60,(byte) 0x70,
-};
-
-static final BitmapCharRec ch44 = new BitmapCharRec(4,3,-1,1,8,ch44data);
-
-/* char: 0x2b '+' */
-
-static final byte[] ch43data = {
-(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x20,
-};
-
-static final BitmapCharRec ch43 = new BitmapCharRec(5,5,-1,-2,8,ch43data);
-
-/* char: 0x2a '*' */
-
-static final byte[] ch42data = {
-(byte) 0x48,(byte) 0x30,(byte) 0xfc,(byte) 0x30,(byte) 0x48,
-};
-
-static final BitmapCharRec ch42 = new BitmapCharRec(6,5,-1,-2,8,ch42data);
-
-/* char: 0x29 ')' */
-
-static final byte[] ch41data = {
-(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,
-};
-
-static final BitmapCharRec ch41 = new BitmapCharRec(3,9,-2,0,8,ch41data);
-
-/* char: 0x28 '(' */
-
-static final byte[] ch40data = {
-(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,
-};
-
-static final BitmapCharRec ch40 = new BitmapCharRec(3,9,-3,0,8,ch40data);
-
-/* char: 0x27 ''' */
-
-static final byte[] ch39data = {
-(byte) 0x80,(byte) 0x60,(byte) 0x70,
-};
-
-static final BitmapCharRec ch39 = new BitmapCharRec(4,3,-1,-6,8,ch39data);
-
-/* char: 0x26 '&' */
-
-static final byte[] ch38data = {
-(byte) 0x74,(byte) 0x88,(byte) 0x94,(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x60,
-};
-
-static final BitmapCharRec ch38 = new BitmapCharRec(6,7,-1,0,8,ch38data);
-
-/* char: 0x25 '%' */
-
-static final byte[] ch37data = {
-(byte) 0x88,(byte) 0x54,(byte) 0x48,(byte) 0x20,(byte) 0x10,(byte) 0x10,(byte) 0x48,(byte) 0xa4,(byte) 0x44,
-};
-
-static final BitmapCharRec ch37 = new BitmapCharRec(6,9,-1,0,8,ch37data);
-
-/* char: 0x24 '$' */
-
-static final byte[] ch36data = {
-(byte) 0x20,(byte) 0xf0,(byte) 0x28,(byte) 0x70,(byte) 0xa0,(byte) 0x78,(byte) 0x20,
-};
-
-static final BitmapCharRec ch36 = new BitmapCharRec(5,7,-1,-1,8,ch36data);
-
-/* char: 0x23 '#' */
-
-static final byte[] ch35data = {
-(byte) 0x48,(byte) 0x48,(byte) 0xfc,(byte) 0x48,(byte) 0xfc,(byte) 0x48,(byte) 0x48,
-};
-
-static final BitmapCharRec ch35 = new BitmapCharRec(6,7,-1,-1,8,ch35data);
-
-/* char: 0x22 '"' */
-
-static final byte[] ch34data = {
-(byte) 0x90,(byte) 0x90,(byte) 0x90,
-};
-
-static final BitmapCharRec ch34 = new BitmapCharRec(4,3,-2,-6,8,ch34data);
-
-/* char: 0x21 '!' */
-
-static final byte[] ch33data = {
-(byte) 0x80,(byte) 0x0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch33 = new BitmapCharRec(1,9,-3,0,8,ch33data);
-
-/* char: 0x1f */
-
-static final byte[] ch31data = {
-(byte) 0x80,
-};
-
-static final BitmapCharRec ch31 = new BitmapCharRec(1,1,-3,-3,8,ch31data);
-
-/* char: 0x1e */
-
-static final byte[] ch30data = {
-(byte) 0xdc,(byte) 0x62,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x70,(byte) 0x20,(byte) 0x22,(byte) 0x1c,
-};
-
-static final BitmapCharRec ch30 = new BitmapCharRec(7,9,0,0,8,ch30data);
-
-/* char: 0x1d */
-
-static final byte[] ch29data = {
-(byte) 0x80,(byte) 0x40,(byte) 0xfe,(byte) 0x10,(byte) 0xfe,(byte) 0x4,(byte) 0x2,
-};
-
-static final BitmapCharRec ch29 = new BitmapCharRec(7,7,0,0,8,ch29data);
-
-/* char: 0x1c */
-
-static final byte[] ch28data = {
-(byte) 0x88,(byte) 0x48,(byte) 0x48,(byte) 0x48,(byte) 0x48,(byte) 0xfc,
-};
-
-static final BitmapCharRec ch28 = new BitmapCharRec(6,6,-1,0,8,ch28data);
-
-/* char: 0x1b */
-
-static final byte[] ch27data = {
-(byte) 0xfe,(byte) 0x80,(byte) 0x20,(byte) 0x8,(byte) 0x2,(byte) 0x8,(byte) 0x20,(byte) 0x80,
-};
-
-static final BitmapCharRec ch27 = new BitmapCharRec(7,8,0,0,8,ch27data);
-
-/* char: 0x1a */
-
-static final byte[] ch26data = {
-(byte) 0xfe,(byte) 0x2,(byte) 0x8,(byte) 0x20,(byte) 0x80,(byte) 0x20,(byte) 0x8,(byte) 0x2,
-};
-
-static final BitmapCharRec ch26 = new BitmapCharRec(7,8,0,0,8,ch26data);
-
-/* char: 0x19 */
-
-static final byte[] ch25data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch25 = new BitmapCharRec(1,13,-3,2,8,ch25data);
-
-/* char: 0x18 */
-
-static final byte[] ch24data = {
-(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xff,
-};
-
-static final BitmapCharRec ch24 = new BitmapCharRec(8,6,0,2,8,ch24data);
-
-/* char: 0x17 */
-
-static final byte[] ch23data = {
-(byte) 0xff,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,
-};
-
-static final BitmapCharRec ch23 = new BitmapCharRec(8,8,0,-3,8,ch23data);
-
-/* char: 0x16 */
-
-static final byte[] ch22data = {
-(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xf0,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,
-};
-
-static final BitmapCharRec ch22 = new BitmapCharRec(4,13,0,2,8,ch22data);
-
-/* char: 0x15 */
-
-static final byte[] ch21data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch21 = new BitmapCharRec(5,13,-3,2,8,ch21data);
-
-/* char: 0x14 */
-
-static final byte[] ch20data = {
-(byte) 0xff,
-};
-
-static final BitmapCharRec ch20 = new BitmapCharRec(8,1,0,1,8,ch20data);
-
-/* char: 0x13 */
-
-static final byte[] ch19data = {
-(byte) 0xff,
-};
-
-static final BitmapCharRec ch19 = new BitmapCharRec(8,1,0,-1,8,ch19data);
-
-/* char: 0x12 */
-
-static final byte[] ch18data = {
-(byte) 0xff,
-};
-
-static final BitmapCharRec ch18 = new BitmapCharRec(8,1,0,-3,8,ch18data);
-
-/* char: 0x11 */
-
-static final byte[] ch17data = {
-(byte) 0xff,
-};
-
-static final BitmapCharRec ch17 = new BitmapCharRec(8,1,0,-5,8,ch17data);
-
-/* char: 0x10 */
-
-static final byte[] ch16data = {
-(byte) 0xff,
-};
-
-static final BitmapCharRec ch16 = new BitmapCharRec(8,1,0,-7,8,ch16data);
-
-/* char: 0xf */
-
-static final byte[] ch15data = {
-(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xff,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,
-};
-
-static final BitmapCharRec ch15 = new BitmapCharRec(8,13,0,2,8,ch15data);
-
-/* char: 0xe */
-
-static final byte[] ch14data = {
-(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch14 = new BitmapCharRec(5,8,-3,-3,8,ch14data);
-
-/* char: 0xd */
-
-static final byte[] ch13data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch13 = new BitmapCharRec(5,6,-3,2,8,ch13data);
-
-/* char: 0xc */
-
-static final byte[] ch12data = {
-(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xf0,
-};
-
-static final BitmapCharRec ch12 = new BitmapCharRec(4,6,0,2,8,ch12data);
-
-/* char: 0xb */
-
-static final byte[] ch11data = {
-(byte) 0xf0,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,
-};
-
-static final BitmapCharRec ch11 = new BitmapCharRec(4,8,0,-3,8,ch11data);
-
-/* char: 0xa */
-
-static final byte[] ch10data = {
-(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x3e,(byte) 0x20,(byte) 0x50,(byte) 0x88,(byte) 0x88,
-};
-
-static final BitmapCharRec ch10 = new BitmapCharRec(7,9,0,2,8,ch10data);
-
-/* char: 0x9 */
-
-static final byte[] ch9data = {
-(byte) 0x3e,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x88,(byte) 0x98,(byte) 0xa8,(byte) 0xc8,(byte) 0x88,
-};
-
-static final BitmapCharRec ch9 = new BitmapCharRec(7,9,0,2,8,ch9data);
-
-/* char: 0x8 */
-
-static final byte[] ch8data = {
-(byte) 0xfe,(byte) 0x10,(byte) 0x10,(byte) 0xfe,(byte) 0x10,(byte) 0x10,
-};
-
-static final BitmapCharRec ch8 = new BitmapCharRec(7,6,0,0,8,ch8data);
-
-/* char: 0x7 */
-
-static final byte[] ch7data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x70,
-};
-
-static final BitmapCharRec ch7 = new BitmapCharRec(5,4,-1,-5,8,ch7data);
-
-/* char: 0x6 */
-
-static final byte[] ch6data = {
-(byte) 0x20,(byte) 0x20,(byte) 0x3c,(byte) 0x20,(byte) 0x3e,(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch6 = new BitmapCharRec(7,9,0,2,8,ch6data);
-
-/* char: 0x5 */
-
-static final byte[] ch5data = {
-(byte) 0x22,(byte) 0x22,(byte) 0x3c,(byte) 0x22,(byte) 0x3c,(byte) 0x78,(byte) 0x80,(byte) 0x80,(byte) 0x78,
-};
-
-static final BitmapCharRec ch5 = new BitmapCharRec(7,9,0,2,8,ch5data);
-
-/* char: 0x4 */
-
-static final byte[] ch4data = {
-(byte) 0x10,(byte) 0x10,(byte) 0x1c,(byte) 0x10,(byte) 0x9e,(byte) 0x80,(byte) 0xe0,(byte) 0x80,(byte) 0xf0,
-};
-
-static final BitmapCharRec ch4 = new BitmapCharRec(7,9,0,2,8,ch4data);
-
-/* char: 0x3 */
-
-static final byte[] ch3data = {
-(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x3e,(byte) 0x88,(byte) 0x88,(byte) 0xf8,(byte) 0x88,(byte) 0x88,
-};
-
-static final BitmapCharRec ch3 = new BitmapCharRec(7,9,0,2,8,ch3data);
-
-/* char: 0x2 */
-
-static final byte[] ch2data = {
-(byte) 0x55,(byte) 0xaa,(byte) 0x55,(byte) 0xaa,(byte) 0x55,(byte) 0xaa,(byte) 0x55,(byte) 0xaa,(byte) 0x55,(byte) 0xaa,(byte) 0x55,(byte) 0xaa,
-};
-
-static final BitmapCharRec ch2 = new BitmapCharRec(8,12,0,2,8,ch2data);
-
-/* char: 0x1 */
-
-static final byte[] ch1data = {
-(byte) 0x10,(byte) 0x38,(byte) 0x7c,(byte) 0xfe,(byte) 0x7c,(byte) 0x38,(byte) 0x10,
-};
-
-static final BitmapCharRec ch1 = new BitmapCharRec(7,7,0,-1,8,ch1data);
-
-static final BitmapCharRec[] chars = {
-ch0,
-ch1,
-ch2,
-ch3,
-ch4,
-ch5,
-ch6,
-ch7,
-ch8,
-ch9,
-ch10,
-ch11,
-ch12,
-ch13,
-ch14,
-ch15,
-ch16,
-ch17,
-ch18,
-ch19,
-ch20,
-ch21,
-ch22,
-ch23,
-ch24,
-ch25,
-ch26,
-ch27,
-ch28,
-ch29,
-ch30,
-ch31,
-ch32,
-ch33,
-ch34,
-ch35,
-ch36,
-ch37,
-ch38,
-ch39,
-ch40,
-ch41,
-ch42,
-ch43,
-ch44,
-ch45,
-ch46,
-ch47,
-ch48,
-ch49,
-ch50,
-ch51,
-ch52,
-ch53,
-ch54,
-ch55,
-ch56,
-ch57,
-ch58,
-ch59,
-ch60,
-ch61,
-ch62,
-ch63,
-ch64,
-ch65,
-ch66,
-ch67,
-ch68,
-ch69,
-ch70,
-ch71,
-ch72,
-ch73,
-ch74,
-ch75,
-ch76,
-ch77,
-ch78,
-ch79,
-ch80,
-ch81,
-ch82,
-ch83,
-ch84,
-ch85,
-ch86,
-ch87,
-ch88,
-ch89,
-ch90,
-ch91,
-ch92,
-ch93,
-ch94,
-ch95,
-ch96,
-ch97,
-ch98,
-ch99,
-ch100,
-ch101,
-ch102,
-ch103,
-ch104,
-ch105,
-ch106,
-ch107,
-ch108,
-ch109,
-ch110,
-ch111,
-ch112,
-ch113,
-ch114,
-ch115,
-ch116,
-ch117,
-ch118,
-ch119,
-ch120,
-ch121,
-ch122,
-ch123,
-ch124,
-ch125,
-ch126,
-ch127,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-ch160,
-ch161,
-ch162,
-ch163,
-ch164,
-ch165,
-ch166,
-ch167,
-ch168,
-ch169,
-ch170,
-ch171,
-ch172,
-ch173,
-ch174,
-ch175,
-ch176,
-ch177,
-ch178,
-ch179,
-ch180,
-ch181,
-ch182,
-ch183,
-ch184,
-ch185,
-ch186,
-ch187,
-ch188,
-ch189,
-ch190,
-ch191,
-ch192,
-ch193,
-ch194,
-ch195,
-ch196,
-ch197,
-ch198,
-ch199,
-ch200,
-ch201,
-ch202,
-ch203,
-ch204,
-ch205,
-ch206,
-ch207,
-ch208,
-ch209,
-ch210,
-ch211,
-ch212,
-ch213,
-ch214,
-ch215,
-ch216,
-ch217,
-ch218,
-ch219,
-ch220,
-ch221,
-ch222,
-ch223,
-ch224,
-ch225,
-ch226,
-ch227,
-ch228,
-ch229,
-ch230,
-ch231,
-ch232,
-ch233,
-ch234,
-ch235,
-ch236,
-ch237,
-ch238,
-ch239,
-ch240,
-ch241,
-ch242,
-ch243,
-ch244,
-ch245,
-ch246,
-ch247,
-ch248,
-ch249,
-ch250,
-ch251,
-ch252,
-ch253,
-ch254,
-ch255,
-};
-
- public static final BitmapFontRec glutBitmap8By13 = new BitmapFontRec("-misc-fixed-medium-r-normal--13-120-75-75-C-80-iso8859-1",
- 256,
- 0,
- chars);
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/gl2/GLUTBitmap9x15.java b/src/jogl/classes/com/sun/opengl/util/gl2/GLUTBitmap9x15.java
deleted file mode 100644
index bba9a8fc5..000000000
--- a/src/jogl/classes/com/sun/opengl/util/gl2/GLUTBitmap9x15.java
+++ /dev/null
@@ -1,2079 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.util.gl2;
-
-class GLUTBitmap9x15 {
-
-/* GENERATED FILE -- DO NOT MODIFY */
-
-static final BitmapCharRec ch0 = new BitmapCharRec(0,0,0,0,9,null);
-
-static final BitmapCharRec ch32 = new BitmapCharRec(0,0,0,0,9,null);
-
-static final BitmapCharRec ch127 = new BitmapCharRec(0,0,0,0,9,null);
-
-static final BitmapCharRec ch160 = new BitmapCharRec(0,0,0,0,9,null);
-
-/* char: 0xff */
-
-static final byte[] ch255data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x4,(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x0,(byte) 0x28,(byte) 0x28,
-};
-
-static final BitmapCharRec ch255 = new BitmapCharRec(6,14,-1,3,9,ch255data);
-
-/* char: 0xfe */
-
-static final byte[] ch254data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xbc,(byte) 0xc2,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xc2,(byte) 0xbc,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch254 = new BitmapCharRec(7,12,-1,3,9,ch254data);
-
-/* char: 0xfd */
-
-static final byte[] ch253data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x4,(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x0,(byte) 0x30,(byte) 0x8,
-};
-
-static final BitmapCharRec ch253 = new BitmapCharRec(6,14,-1,3,9,ch253data);
-
-/* char: 0xfc */
-
-static final byte[] ch252data = {
-(byte) 0x7a,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x0,(byte) 0x28,(byte) 0x28,
-};
-
-static final BitmapCharRec ch252 = new BitmapCharRec(7,11,-1,0,9,ch252data);
-
-/* char: 0xfb */
-
-static final byte[] ch251data = {
-(byte) 0x7a,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x0,(byte) 0x44,(byte) 0x38,
-};
-
-static final BitmapCharRec ch251 = new BitmapCharRec(7,11,-1,0,9,ch251data);
-
-/* char: 0xfa */
-
-static final byte[] ch250data = {
-(byte) 0x7a,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x0,(byte) 0x30,(byte) 0x8,
-};
-
-static final BitmapCharRec ch250 = new BitmapCharRec(7,11,-1,0,9,ch250data);
-
-/* char: 0xf9 */
-
-static final byte[] ch249data = {
-(byte) 0x7a,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x0,(byte) 0x18,(byte) 0x20,
-};
-
-static final BitmapCharRec ch249 = new BitmapCharRec(7,11,-1,0,9,ch249data);
-
-/* char: 0xf8 */
-
-static final byte[] ch248data = {
-(byte) 0x80,(byte) 0x7c,(byte) 0xa2,(byte) 0xa2,(byte) 0x92,(byte) 0x8a,(byte) 0x8a,(byte) 0x7c,(byte) 0x2,
-};
-
-static final BitmapCharRec ch248 = new BitmapCharRec(7,9,-1,1,9,ch248data);
-
-/* char: 0xf7 */
-
-static final byte[] ch247data = {
-(byte) 0x10,(byte) 0x38,(byte) 0x10,(byte) 0x0,(byte) 0xfe,(byte) 0x0,(byte) 0x10,(byte) 0x38,(byte) 0x10,
-};
-
-static final BitmapCharRec ch247 = new BitmapCharRec(7,9,-1,0,9,ch247data);
-
-/* char: 0xf6 */
-
-static final byte[] ch246data = {
-(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x28,(byte) 0x28,
-};
-
-static final BitmapCharRec ch246 = new BitmapCharRec(7,11,-1,0,9,ch246data);
-
-/* char: 0xf5 */
-
-static final byte[] ch245data = {
-(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x50,(byte) 0x28,
-};
-
-static final BitmapCharRec ch245 = new BitmapCharRec(7,11,-1,0,9,ch245data);
-
-/* char: 0xf4 */
-
-static final byte[] ch244data = {
-(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x44,(byte) 0x38,
-};
-
-static final BitmapCharRec ch244 = new BitmapCharRec(7,11,-1,0,9,ch244data);
-
-/* char: 0xf3 */
-
-static final byte[] ch243data = {
-(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x30,(byte) 0x8,
-};
-
-static final BitmapCharRec ch243 = new BitmapCharRec(7,11,-1,0,9,ch243data);
-
-/* char: 0xf2 */
-
-static final byte[] ch242data = {
-(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x18,(byte) 0x20,
-};
-
-static final BitmapCharRec ch242 = new BitmapCharRec(7,11,-1,0,9,ch242data);
-
-/* char: 0xf1 */
-
-static final byte[] ch241data = {
-(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xc2,(byte) 0xbc,(byte) 0x0,(byte) 0x0,(byte) 0x50,(byte) 0x28,
-};
-
-static final BitmapCharRec ch241 = new BitmapCharRec(7,11,-1,0,9,ch241data);
-
-/* char: 0xf0 */
-
-static final byte[] ch240data = {
-(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x8,(byte) 0x50,(byte) 0x30,(byte) 0x48,
-};
-
-static final BitmapCharRec ch240 = new BitmapCharRec(7,11,-1,0,9,ch240data);
-
-/* char: 0xef */
-
-static final byte[] ch239data = {
-(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x50,(byte) 0x50,
-};
-
-static final BitmapCharRec ch239 = new BitmapCharRec(5,11,-2,0,9,ch239data);
-
-/* char: 0xee */
-
-static final byte[] ch238data = {
-(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x90,(byte) 0x60,
-};
-
-static final BitmapCharRec ch238 = new BitmapCharRec(5,11,-2,0,9,ch238data);
-
-/* char: 0xed */
-
-static final byte[] ch237data = {
-(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x60,(byte) 0x10,
-};
-
-static final BitmapCharRec ch237 = new BitmapCharRec(5,11,-2,0,9,ch237data);
-
-/* char: 0xec */
-
-static final byte[] ch236data = {
-(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x30,(byte) 0x40,
-};
-
-static final BitmapCharRec ch236 = new BitmapCharRec(5,11,-2,0,9,ch236data);
-
-/* char: 0xeb */
-
-static final byte[] ch235data = {
-(byte) 0x7c,(byte) 0x80,(byte) 0x80,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x28,(byte) 0x28,
-};
-
-static final BitmapCharRec ch235 = new BitmapCharRec(7,11,-1,0,9,ch235data);
-
-/* char: 0xea */
-
-static final byte[] ch234data = {
-(byte) 0x7c,(byte) 0x80,(byte) 0x80,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x44,(byte) 0x38,
-};
-
-static final BitmapCharRec ch234 = new BitmapCharRec(7,11,-1,0,9,ch234data);
-
-/* char: 0xe9 */
-
-static final byte[] ch233data = {
-(byte) 0x7c,(byte) 0x80,(byte) 0x80,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x30,(byte) 0x8,
-};
-
-static final BitmapCharRec ch233 = new BitmapCharRec(7,11,-1,0,9,ch233data);
-
-/* char: 0xe8 */
-
-static final byte[] ch232data = {
-(byte) 0x7c,(byte) 0x80,(byte) 0x80,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x18,(byte) 0x20,
-};
-
-static final BitmapCharRec ch232 = new BitmapCharRec(7,11,-1,0,9,ch232data);
-
-/* char: 0xe7 */
-
-static final byte[] ch231data = {
-(byte) 0x30,(byte) 0x48,(byte) 0x18,(byte) 0x7c,(byte) 0x82,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x82,(byte) 0x7c,
-};
-
-static final BitmapCharRec ch231 = new BitmapCharRec(7,10,-1,3,9,ch231data);
-
-/* char: 0xe6 */
-
-static final byte[] ch230data = {
-(byte) 0x6e,(byte) 0x92,(byte) 0x90,(byte) 0x7c,(byte) 0x12,(byte) 0x92,(byte) 0x6c,
-};
-
-static final BitmapCharRec ch230 = new BitmapCharRec(7,7,-1,0,9,ch230data);
-
-/* char: 0xe5 */
-
-static final byte[] ch229data = {
-(byte) 0x7a,(byte) 0x86,(byte) 0x82,(byte) 0x7e,(byte) 0x2,(byte) 0x2,(byte) 0x7c,(byte) 0x0,(byte) 0x18,(byte) 0x24,(byte) 0x18,
-};
-
-static final BitmapCharRec ch229 = new BitmapCharRec(7,11,-1,0,9,ch229data);
-
-/* char: 0xe4 */
-
-static final byte[] ch228data = {
-(byte) 0x7a,(byte) 0x86,(byte) 0x82,(byte) 0x7e,(byte) 0x2,(byte) 0x2,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x28,(byte) 0x28,
-};
-
-static final BitmapCharRec ch228 = new BitmapCharRec(7,11,-1,0,9,ch228data);
-
-/* char: 0xe3 */
-
-static final byte[] ch227data = {
-(byte) 0x7a,(byte) 0x86,(byte) 0x82,(byte) 0x7e,(byte) 0x2,(byte) 0x2,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x50,(byte) 0x28,
-};
-
-static final BitmapCharRec ch227 = new BitmapCharRec(7,11,-1,0,9,ch227data);
-
-/* char: 0xe2 */
-
-static final byte[] ch226data = {
-(byte) 0x7a,(byte) 0x86,(byte) 0x82,(byte) 0x7e,(byte) 0x2,(byte) 0x2,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x44,(byte) 0x38,
-};
-
-static final BitmapCharRec ch226 = new BitmapCharRec(7,11,-1,0,9,ch226data);
-
-/* char: 0xe1 */
-
-static final byte[] ch225data = {
-(byte) 0x7a,(byte) 0x86,(byte) 0x82,(byte) 0x7e,(byte) 0x2,(byte) 0x2,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x30,(byte) 0x8,
-};
-
-static final BitmapCharRec ch225 = new BitmapCharRec(7,11,-1,0,9,ch225data);
-
-/* char: 0xe0 */
-
-static final byte[] ch224data = {
-(byte) 0x7a,(byte) 0x86,(byte) 0x82,(byte) 0x7e,(byte) 0x2,(byte) 0x2,(byte) 0x7c,(byte) 0x0,(byte) 0x0,(byte) 0x18,(byte) 0x20,
-};
-
-static final BitmapCharRec ch224 = new BitmapCharRec(7,11,-1,0,9,ch224data);
-
-/* char: 0xdf */
-
-static final byte[] ch223data = {
-(byte) 0x80,(byte) 0xbc,(byte) 0xc2,(byte) 0x82,(byte) 0x82,(byte) 0xfc,(byte) 0x82,(byte) 0x82,(byte) 0x7c,
-};
-
-static final BitmapCharRec ch223 = new BitmapCharRec(7,9,-1,1,9,ch223data);
-
-/* char: 0xde */
-
-static final byte[] ch222data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfc,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch222 = new BitmapCharRec(7,10,-1,0,9,ch222data);
-
-/* char: 0xdd */
-
-static final byte[] ch221data = {
-(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x44,(byte) 0x82,(byte) 0x82,(byte) 0x0,(byte) 0x30,(byte) 0x8,
-};
-
-static final BitmapCharRec ch221 = new BitmapCharRec(7,11,-1,0,9,ch221data);
-
-/* char: 0xdc */
-
-static final byte[] ch220data = {
-(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x0,(byte) 0x28,(byte) 0x28,
-};
-
-static final BitmapCharRec ch220 = new BitmapCharRec(7,11,-1,0,9,ch220data);
-
-/* char: 0xdb */
-
-static final byte[] ch219data = {
-(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x0,(byte) 0x44,(byte) 0x38,
-};
-
-static final BitmapCharRec ch219 = new BitmapCharRec(7,11,-1,0,9,ch219data);
-
-/* char: 0xda */
-
-static final byte[] ch218data = {
-(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x0,(byte) 0x30,(byte) 0x8,
-};
-
-static final BitmapCharRec ch218 = new BitmapCharRec(7,11,-1,0,9,ch218data);
-
-/* char: 0xd9 */
-
-static final byte[] ch217data = {
-(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x0,(byte) 0x18,(byte) 0x20,
-};
-
-static final BitmapCharRec ch217 = new BitmapCharRec(7,11,-1,0,9,ch217data);
-
-/* char: 0xd8 */
-
-static final byte[] ch216data = {
-(byte) 0x80,(byte) 0x7c,(byte) 0xc2,(byte) 0xa2,(byte) 0xa2,(byte) 0x92,(byte) 0x92,(byte) 0x8a,(byte) 0x8a,(byte) 0x86,(byte) 0x7c,(byte) 0x2,
-};
-
-static final BitmapCharRec ch216 = new BitmapCharRec(7,12,-1,1,9,ch216data);
-
-/* char: 0xd7 */
-
-static final byte[] ch215data = {
-(byte) 0x82,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x28,(byte) 0x44,(byte) 0x82,
-};
-
-static final BitmapCharRec ch215 = new BitmapCharRec(7,7,-1,-1,9,ch215data);
-
-/* char: 0xd6 */
-
-static final byte[] ch214data = {
-(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x28,(byte) 0x28,
-};
-
-static final BitmapCharRec ch214 = new BitmapCharRec(7,11,-1,0,9,ch214data);
-
-/* char: 0xd5 */
-
-static final byte[] ch213data = {
-(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x50,(byte) 0x28,
-};
-
-static final BitmapCharRec ch213 = new BitmapCharRec(7,11,-1,0,9,ch213data);
-
-/* char: 0xd4 */
-
-static final byte[] ch212data = {
-(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x44,(byte) 0x38,
-};
-
-static final BitmapCharRec ch212 = new BitmapCharRec(7,11,-1,0,9,ch212data);
-
-/* char: 0xd3 */
-
-static final byte[] ch211data = {
-(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x30,(byte) 0x8,
-};
-
-static final BitmapCharRec ch211 = new BitmapCharRec(7,11,-1,0,9,ch211data);
-
-/* char: 0xd2 */
-
-static final byte[] ch210data = {
-(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x0,(byte) 0x18,(byte) 0x20,
-};
-
-static final BitmapCharRec ch210 = new BitmapCharRec(7,11,-1,0,9,ch210data);
-
-/* char: 0xd1 */
-
-static final byte[] ch209data = {
-(byte) 0x82,(byte) 0x86,(byte) 0x8a,(byte) 0x92,(byte) 0x92,(byte) 0xa2,(byte) 0xc2,(byte) 0x82,(byte) 0x0,(byte) 0x50,(byte) 0x28,
-};
-
-static final BitmapCharRec ch209 = new BitmapCharRec(7,11,-1,0,9,ch209data);
-
-/* char: 0xd0 */
-
-static final byte[] ch208data = {
-(byte) 0xfc,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0xf2,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0xfc,
-};
-
-static final BitmapCharRec ch208 = new BitmapCharRec(7,10,-1,0,9,ch208data);
-
-/* char: 0xcf */
-
-static final byte[] ch207data = {
-(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x0,(byte) 0x50,(byte) 0x50,
-};
-
-static final BitmapCharRec ch207 = new BitmapCharRec(5,11,-2,0,9,ch207data);
-
-/* char: 0xce */
-
-static final byte[] ch206data = {
-(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x0,(byte) 0x88,(byte) 0x70,
-};
-
-static final BitmapCharRec ch206 = new BitmapCharRec(5,11,-2,0,9,ch206data);
-
-/* char: 0xcd */
-
-static final byte[] ch205data = {
-(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x0,(byte) 0x60,(byte) 0x10,
-};
-
-static final BitmapCharRec ch205 = new BitmapCharRec(5,11,-2,0,9,ch205data);
-
-/* char: 0xcc */
-
-static final byte[] ch204data = {
-(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x0,(byte) 0x30,(byte) 0x40,
-};
-
-static final BitmapCharRec ch204 = new BitmapCharRec(5,11,-2,0,9,ch204data);
-
-/* char: 0xcb */
-
-static final byte[] ch203data = {
-(byte) 0xfe,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x78,(byte) 0x40,(byte) 0x40,(byte) 0xfe,(byte) 0x0,(byte) 0x28,(byte) 0x28,
-};
-
-static final BitmapCharRec ch203 = new BitmapCharRec(7,11,-1,0,9,ch203data);
-
-/* char: 0xca */
-
-static final byte[] ch202data = {
-(byte) 0xfe,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x78,(byte) 0x40,(byte) 0x40,(byte) 0xfe,(byte) 0x0,(byte) 0x44,(byte) 0x38,
-};
-
-static final BitmapCharRec ch202 = new BitmapCharRec(7,11,-1,0,9,ch202data);
-
-/* char: 0xc9 */
-
-static final byte[] ch201data = {
-(byte) 0xfe,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x78,(byte) 0x40,(byte) 0x40,(byte) 0xfe,(byte) 0x0,(byte) 0x30,(byte) 0x8,
-};
-
-static final BitmapCharRec ch201 = new BitmapCharRec(7,11,-1,0,9,ch201data);
-
-/* char: 0xc8 */
-
-static final byte[] ch200data = {
-(byte) 0xfe,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x78,(byte) 0x40,(byte) 0x40,(byte) 0xfe,(byte) 0x0,(byte) 0x18,(byte) 0x20,
-};
-
-static final BitmapCharRec ch200 = new BitmapCharRec(7,11,-1,0,9,ch200data);
-
-/* char: 0xc7 */
-
-static final byte[] ch199data = {
-(byte) 0x30,(byte) 0x48,(byte) 0x18,(byte) 0x7c,(byte) 0x82,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x82,(byte) 0x7c,
-};
-
-static final BitmapCharRec ch199 = new BitmapCharRec(7,13,-1,3,9,ch199data);
-
-/* char: 0xc6 */
-
-static final byte[] ch198data = {
-(byte) 0x9e,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0xfc,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x6e,
-};
-
-static final BitmapCharRec ch198 = new BitmapCharRec(7,10,-1,0,9,ch198data);
-
-/* char: 0xc5 */
-
-static final byte[] ch197data = {
-(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x38,(byte) 0x10,(byte) 0x28,(byte) 0x10,
-};
-
-static final BitmapCharRec ch197 = new BitmapCharRec(7,11,-1,0,9,ch197data);
-
-/* char: 0xc4 */
-
-static final byte[] ch196data = {
-(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x38,(byte) 0x0,(byte) 0x28,(byte) 0x28,
-};
-
-static final BitmapCharRec ch196 = new BitmapCharRec(7,11,-1,0,9,ch196data);
-
-/* char: 0xc3 */
-
-static final byte[] ch195data = {
-(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x38,(byte) 0x0,(byte) 0x50,(byte) 0x28,
-};
-
-static final BitmapCharRec ch195 = new BitmapCharRec(7,11,-1,0,9,ch195data);
-
-/* char: 0xc2 */
-
-static final byte[] ch194data = {
-(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x38,(byte) 0x0,(byte) 0x44,(byte) 0x38,
-};
-
-static final BitmapCharRec ch194 = new BitmapCharRec(7,11,-1,0,9,ch194data);
-
-/* char: 0xc1 */
-
-static final byte[] ch193data = {
-(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x38,(byte) 0x0,(byte) 0x30,(byte) 0x8,
-};
-
-static final BitmapCharRec ch193 = new BitmapCharRec(7,11,-1,0,9,ch193data);
-
-/* char: 0xc0 */
-
-static final byte[] ch192data = {
-(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x38,(byte) 0x0,(byte) 0x18,(byte) 0x20,
-};
-
-static final BitmapCharRec ch192 = new BitmapCharRec(7,11,-1,0,9,ch192data);
-
-/* char: 0xbf */
-
-static final byte[] ch191data = {
-(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x10,(byte) 0x0,(byte) 0x10,
-};
-
-static final BitmapCharRec ch191 = new BitmapCharRec(7,10,-1,0,9,ch191data);
-
-/* char: 0xbe */
-
-static final byte[] ch190data = {
-(byte) 0x6,(byte) 0x1a,(byte) 0x12,(byte) 0xa,(byte) 0x66,(byte) 0x92,(byte) 0x10,(byte) 0x20,(byte) 0x90,(byte) 0x60,
-};
-
-static final BitmapCharRec ch190 = new BitmapCharRec(7,10,-1,0,9,ch190data);
-
-/* char: 0xbd */
-
-static final byte[] ch189data = {
-(byte) 0x1e,(byte) 0x10,(byte) 0xc,(byte) 0x2,(byte) 0xf2,(byte) 0x4c,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch189 = new BitmapCharRec(7,10,-1,0,9,ch189data);
-
-/* char: 0xbc */
-
-static final byte[] ch188data = {
-(byte) 0x6,(byte) 0x1a,(byte) 0x12,(byte) 0xa,(byte) 0xe6,(byte) 0x42,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch188 = new BitmapCharRec(7,10,-1,0,9,ch188data);
-
-/* char: 0xbb */
-
-static final byte[] ch187data = {
-(byte) 0x90,(byte) 0x48,(byte) 0x24,(byte) 0x12,(byte) 0x12,(byte) 0x24,(byte) 0x48,(byte) 0x90,
-};
-
-static final BitmapCharRec ch187 = new BitmapCharRec(7,8,-1,-1,9,ch187data);
-
-/* char: 0xba */
-
-static final byte[] ch186data = {
-(byte) 0xf8,(byte) 0x0,(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x70,
-};
-
-static final BitmapCharRec ch186 = new BitmapCharRec(5,6,-1,-5,9,ch186data);
-
-/* char: 0xb9 */
-
-static final byte[] ch185data = {
-(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch185 = new BitmapCharRec(3,6,-1,-4,9,ch185data);
-
-/* char: 0xb8 */
-
-static final byte[] ch184data = {
-(byte) 0x60,(byte) 0x90,(byte) 0x30,
-};
-
-static final BitmapCharRec ch184 = new BitmapCharRec(4,3,-2,3,9,ch184data);
-
-/* char: 0xb7 */
-
-static final byte[] ch183data = {
-(byte) 0xc0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch183 = new BitmapCharRec(2,2,-4,-4,9,ch183data);
-
-/* char: 0xb6 */
-
-static final byte[] ch182data = {
-(byte) 0xa,(byte) 0xa,(byte) 0xa,(byte) 0xa,(byte) 0xa,(byte) 0x7a,(byte) 0x8a,(byte) 0x8a,(byte) 0x8a,(byte) 0x7e,
-};
-
-static final BitmapCharRec ch182 = new BitmapCharRec(7,10,-1,0,9,ch182data);
-
-/* char: 0xb5 */
-
-static final byte[] ch181data = {
-(byte) 0x80,(byte) 0x80,(byte) 0xba,(byte) 0xc6,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,
-};
-
-static final BitmapCharRec ch181 = new BitmapCharRec(7,9,-1,2,9,ch181data);
-
-/* char: 0xb4 */
-
-static final byte[] ch180data = {
-(byte) 0xc0,(byte) 0x20,
-};
-
-static final BitmapCharRec ch180 = new BitmapCharRec(3,2,-3,-9,9,ch180data);
-
-/* char: 0xb3 */
-
-static final byte[] ch179data = {
-(byte) 0x60,(byte) 0x90,(byte) 0x10,(byte) 0x20,(byte) 0x90,(byte) 0x60,
-};
-
-static final BitmapCharRec ch179 = new BitmapCharRec(4,6,-1,-4,9,ch179data);
-
-/* char: 0xb2 */
-
-static final byte[] ch178data = {
-(byte) 0xf0,(byte) 0x80,(byte) 0x60,(byte) 0x10,(byte) 0x90,(byte) 0x60,
-};
-
-static final BitmapCharRec ch178 = new BitmapCharRec(4,6,-1,-4,9,ch178data);
-
-/* char: 0xb1 */
-
-static final byte[] ch177data = {
-(byte) 0xfe,(byte) 0x0,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xfe,(byte) 0x10,(byte) 0x10,(byte) 0x10,
-};
-
-static final BitmapCharRec ch177 = new BitmapCharRec(7,9,-1,-1,9,ch177data);
-
-/* char: 0xb0 */
-
-static final byte[] ch176data = {
-(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x60,
-};
-
-static final BitmapCharRec ch176 = new BitmapCharRec(4,4,-3,-6,9,ch176data);
-
-/* char: 0xaf */
-
-static final byte[] ch175data = {
-(byte) 0xfc,
-};
-
-static final BitmapCharRec ch175 = new BitmapCharRec(6,1,-1,-9,9,ch175data);
-
-/* char: 0xae */
-
-static final byte[] ch174data = {
-(byte) 0x3c,(byte) 0x42,(byte) 0xa5,(byte) 0xa9,(byte) 0xbd,(byte) 0xa5,(byte) 0xb9,(byte) 0x42,(byte) 0x3c,
-};
-
-static final BitmapCharRec ch174 = new BitmapCharRec(8,9,0,-1,9,ch174data);
-
-/* char: 0xad */
-
-static final byte[] ch173data = {
-(byte) 0xfc,
-};
-
-static final BitmapCharRec ch173 = new BitmapCharRec(6,1,-1,-4,9,ch173data);
-
-/* char: 0xac */
-
-static final byte[] ch172data = {
-(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0xfc,
-};
-
-static final BitmapCharRec ch172 = new BitmapCharRec(6,4,-1,-2,9,ch172data);
-
-/* char: 0xab */
-
-static final byte[] ch171data = {
-(byte) 0x12,(byte) 0x24,(byte) 0x48,(byte) 0x90,(byte) 0x90,(byte) 0x48,(byte) 0x24,(byte) 0x12,
-};
-
-static final BitmapCharRec ch171 = new BitmapCharRec(7,8,-1,-1,9,ch171data);
-
-/* char: 0xaa */
-
-static final byte[] ch170data = {
-(byte) 0xf8,(byte) 0x0,(byte) 0x78,(byte) 0x90,(byte) 0x70,(byte) 0x90,(byte) 0x60,
-};
-
-static final BitmapCharRec ch170 = new BitmapCharRec(5,7,-3,-3,9,ch170data);
-
-/* char: 0xa9 */
-
-static final byte[] ch169data = {
-(byte) 0x3c,(byte) 0x42,(byte) 0x99,(byte) 0xa5,(byte) 0xa1,(byte) 0xa5,(byte) 0x99,(byte) 0x42,(byte) 0x3c,
-};
-
-static final BitmapCharRec ch169 = new BitmapCharRec(8,9,0,-1,9,ch169data);
-
-/* char: 0xa8 */
-
-static final byte[] ch168data = {
-(byte) 0xa0,(byte) 0xa0,
-};
-
-static final BitmapCharRec ch168 = new BitmapCharRec(3,2,-3,-9,9,ch168data);
-
-/* char: 0xa7 */
-
-static final byte[] ch167data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x8,(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x80,(byte) 0x88,(byte) 0x70,
-};
-
-static final BitmapCharRec ch167 = new BitmapCharRec(5,11,-2,1,9,ch167data);
-
-/* char: 0xa6 */
-
-static final byte[] ch166data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch166 = new BitmapCharRec(1,11,-4,1,9,ch166data);
-
-/* char: 0xa5 */
-
-static final byte[] ch165data = {
-(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x7c,(byte) 0x10,(byte) 0x7c,(byte) 0x28,(byte) 0x44,(byte) 0x82,(byte) 0x82,
-};
-
-static final BitmapCharRec ch165 = new BitmapCharRec(7,10,-1,0,9,ch165data);
-
-/* char: 0xa4 */
-
-static final byte[] ch164data = {
-(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x44,(byte) 0x7c,(byte) 0x82,
-};
-
-static final BitmapCharRec ch164 = new BitmapCharRec(7,6,-1,-3,9,ch164data);
-
-/* char: 0xa3 */
-
-static final byte[] ch163data = {
-(byte) 0x5c,(byte) 0xa2,(byte) 0x60,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x22,(byte) 0x1c,
-};
-
-static final BitmapCharRec ch163 = new BitmapCharRec(7,10,-1,0,9,ch163data);
-
-/* char: 0xa2 */
-
-static final byte[] ch162data = {
-(byte) 0x40,(byte) 0x78,(byte) 0xa4,(byte) 0xa0,(byte) 0x90,(byte) 0x94,(byte) 0x78,(byte) 0x8,
-};
-
-static final BitmapCharRec ch162 = new BitmapCharRec(6,8,-1,0,9,ch162data);
-
-/* char: 0xa1 */
-
-static final byte[] ch161data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch161 = new BitmapCharRec(1,11,-4,0,9,ch161data);
-
-/* char: 0x7e '~' */
-
-static final byte[] ch126data = {
-(byte) 0x8c,(byte) 0x92,(byte) 0x62,
-};
-
-static final BitmapCharRec ch126 = new BitmapCharRec(7,3,-1,-7,9,ch126data);
-
-/* char: 0x7d '}' */
-
-static final byte[] ch125data = {
-(byte) 0xe0,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x20,(byte) 0x18,(byte) 0x18,(byte) 0x20,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xe0,
-};
-
-static final BitmapCharRec ch125 = new BitmapCharRec(5,12,-1,1,9,ch125data);
-
-/* char: 0x7c '|' */
-
-static final byte[] ch124data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch124 = new BitmapCharRec(1,12,-4,1,9,ch124data);
-
-/* char: 0x7b '{' */
-
-static final byte[] ch123data = {
-(byte) 0x38,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0xc0,(byte) 0xc0,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x38,
-};
-
-static final BitmapCharRec ch123 = new BitmapCharRec(5,12,-3,1,9,ch123data);
-
-/* char: 0x7a 'z' */
-
-static final byte[] ch122data = {
-(byte) 0xfe,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0x4,(byte) 0xfe,
-};
-
-static final BitmapCharRec ch122 = new BitmapCharRec(7,7,-1,0,9,ch122data);
-
-/* char: 0x79 'y' */
-
-static final byte[] ch121data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x4,(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,
-};
-
-static final BitmapCharRec ch121 = new BitmapCharRec(6,10,-1,3,9,ch121data);
-
-/* char: 0x78 'x' */
-
-static final byte[] ch120data = {
-(byte) 0x82,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x28,(byte) 0x44,(byte) 0x82,
-};
-
-static final BitmapCharRec ch120 = new BitmapCharRec(7,7,-1,0,9,ch120data);
-
-/* char: 0x77 'w' */
-
-static final byte[] ch119data = {
-(byte) 0x44,(byte) 0xaa,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0x82,(byte) 0x82,
-};
-
-static final BitmapCharRec ch119 = new BitmapCharRec(7,7,-1,0,9,ch119data);
-
-/* char: 0x76 'v' */
-
-static final byte[] ch118data = {
-(byte) 0x10,(byte) 0x28,(byte) 0x28,(byte) 0x44,(byte) 0x44,(byte) 0x82,(byte) 0x82,
-};
-
-static final BitmapCharRec ch118 = new BitmapCharRec(7,7,-1,0,9,ch118data);
-
-/* char: 0x75 'u' */
-
-static final byte[] ch117data = {
-(byte) 0x7a,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,
-};
-
-static final BitmapCharRec ch117 = new BitmapCharRec(7,7,-1,0,9,ch117data);
-
-/* char: 0x74 't' */
-
-static final byte[] ch116data = {
-(byte) 0x1c,(byte) 0x22,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xfc,(byte) 0x20,(byte) 0x20,
-};
-
-static final BitmapCharRec ch116 = new BitmapCharRec(7,9,-1,0,9,ch116data);
-
-/* char: 0x73 's' */
-
-static final byte[] ch115data = {
-(byte) 0x7c,(byte) 0x82,(byte) 0x2,(byte) 0x7c,(byte) 0x80,(byte) 0x82,(byte) 0x7c,
-};
-
-static final BitmapCharRec ch115 = new BitmapCharRec(7,7,-1,0,9,ch115data);
-
-/* char: 0x72 'r' */
-
-static final byte[] ch114data = {
-(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x42,(byte) 0x62,(byte) 0x9c,
-};
-
-static final BitmapCharRec ch114 = new BitmapCharRec(7,7,-1,0,9,ch114data);
-
-/* char: 0x71 'q' */
-
-static final byte[] ch113data = {
-(byte) 0x2,(byte) 0x2,(byte) 0x2,(byte) 0x7a,(byte) 0x86,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x86,(byte) 0x7a,
-};
-
-static final BitmapCharRec ch113 = new BitmapCharRec(7,10,-1,3,9,ch113data);
-
-/* char: 0x70 'p' */
-
-static final byte[] ch112data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xbc,(byte) 0xc2,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xc2,(byte) 0xbc,
-};
-
-static final BitmapCharRec ch112 = new BitmapCharRec(7,10,-1,3,9,ch112data);
-
-/* char: 0x6f 'o' */
-
-static final byte[] ch111data = {
-(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,
-};
-
-static final BitmapCharRec ch111 = new BitmapCharRec(7,7,-1,0,9,ch111data);
-
-/* char: 0x6e 'n' */
-
-static final byte[] ch110data = {
-(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xc2,(byte) 0xbc,
-};
-
-static final BitmapCharRec ch110 = new BitmapCharRec(7,7,-1,0,9,ch110data);
-
-/* char: 0x6d 'm' */
-
-static final byte[] ch109data = {
-(byte) 0x82,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0xec,
-};
-
-static final BitmapCharRec ch109 = new BitmapCharRec(7,7,-1,0,9,ch109data);
-
-/* char: 0x6c 'l' */
-
-static final byte[] ch108data = {
-(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xe0,
-};
-
-static final BitmapCharRec ch108 = new BitmapCharRec(5,10,-2,0,9,ch108data);
-
-/* char: 0x6b 'k' */
-
-static final byte[] ch107data = {
-(byte) 0x82,(byte) 0x8c,(byte) 0xb0,(byte) 0xc0,(byte) 0xb0,(byte) 0x8c,(byte) 0x82,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch107 = new BitmapCharRec(7,10,-1,0,9,ch107data);
-
-/* char: 0x6a 'j' */
-
-static final byte[] ch106data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0x1c,(byte) 0x0,(byte) 0x0,(byte) 0xc,
-};
-
-static final BitmapCharRec ch106 = new BitmapCharRec(6,13,-1,3,9,ch106data);
-
-/* char: 0x69 'i' */
-
-static final byte[] ch105data = {
-(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x60,
-};
-
-static final BitmapCharRec ch105 = new BitmapCharRec(5,10,-2,0,9,ch105data);
-
-/* char: 0x68 'h' */
-
-static final byte[] ch104data = {
-(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xc2,(byte) 0xbc,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch104 = new BitmapCharRec(7,10,-1,0,9,ch104data);
-
-/* char: 0x67 'g' */
-
-static final byte[] ch103data = {
-(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x80,(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x7a,
-};
-
-static final BitmapCharRec ch103 = new BitmapCharRec(7,10,-1,3,9,ch103data);
-
-/* char: 0x66 'f' */
-
-static final byte[] ch102data = {
-(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x22,(byte) 0x22,(byte) 0x1c,
-};
-
-static final BitmapCharRec ch102 = new BitmapCharRec(7,10,-1,0,9,ch102data);
-
-/* char: 0x65 'e' */
-
-static final byte[] ch101data = {
-(byte) 0x7c,(byte) 0x80,(byte) 0x80,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x7c,
-};
-
-static final BitmapCharRec ch101 = new BitmapCharRec(7,7,-1,0,9,ch101data);
-
-/* char: 0x64 'd' */
-
-static final byte[] ch100data = {
-(byte) 0x7a,(byte) 0x86,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x86,(byte) 0x7a,(byte) 0x2,(byte) 0x2,(byte) 0x2,
-};
-
-static final BitmapCharRec ch100 = new BitmapCharRec(7,10,-1,0,9,ch100data);
-
-/* char: 0x63 'c' */
-
-static final byte[] ch99data = {
-(byte) 0x7c,(byte) 0x82,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x82,(byte) 0x7c,
-};
-
-static final BitmapCharRec ch99 = new BitmapCharRec(7,7,-1,0,9,ch99data);
-
-/* char: 0x62 'b' */
-
-static final byte[] ch98data = {
-(byte) 0xbc,(byte) 0xc2,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xc2,(byte) 0xbc,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch98 = new BitmapCharRec(7,10,-1,0,9,ch98data);
-
-/* char: 0x61 'a' */
-
-static final byte[] ch97data = {
-(byte) 0x7a,(byte) 0x86,(byte) 0x82,(byte) 0x7e,(byte) 0x2,(byte) 0x2,(byte) 0x7c,
-};
-
-static final BitmapCharRec ch97 = new BitmapCharRec(7,7,-1,0,9,ch97data);
-
-/* char: 0x60 '`' */
-
-static final byte[] ch96data = {
-(byte) 0x10,(byte) 0x20,(byte) 0x40,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch96 = new BitmapCharRec(4,4,-3,-6,9,ch96data);
-
-/* char: 0x5f '_' */
-
-static final byte[] ch95data = {
-(byte) 0xff,
-};
-
-static final BitmapCharRec ch95 = new BitmapCharRec(8,1,0,1,9,ch95data);
-
-/* char: 0x5e '^' */
-
-static final byte[] ch94data = {
-(byte) 0x82,(byte) 0x44,(byte) 0x28,(byte) 0x10,
-};
-
-static final BitmapCharRec ch94 = new BitmapCharRec(7,4,-1,-6,9,ch94data);
-
-/* char: 0x5d ']' */
-
-static final byte[] ch93data = {
-(byte) 0xf0,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xf0,
-};
-
-static final BitmapCharRec ch93 = new BitmapCharRec(4,12,-2,1,9,ch93data);
-
-/* char: 0x5c '\' */
-
-static final byte[] ch92data = {
-(byte) 0x2,(byte) 0x4,(byte) 0x4,(byte) 0x8,(byte) 0x10,(byte) 0x10,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,
-};
-
-static final BitmapCharRec ch92 = new BitmapCharRec(7,10,-1,0,9,ch92data);
-
-/* char: 0x5b '[' */
-
-static final byte[] ch91data = {
-(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf0,
-};
-
-static final BitmapCharRec ch91 = new BitmapCharRec(4,12,-3,1,9,ch91data);
-
-/* char: 0x5a 'Z' */
-
-static final byte[] ch90data = {
-(byte) 0xfe,(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0x4,(byte) 0x2,(byte) 0xfe,
-};
-
-static final BitmapCharRec ch90 = new BitmapCharRec(7,10,-1,0,9,ch90data);
-
-/* char: 0x59 'Y' */
-
-static final byte[] ch89data = {
-(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x44,(byte) 0x82,(byte) 0x82,
-};
-
-static final BitmapCharRec ch89 = new BitmapCharRec(7,10,-1,0,9,ch89data);
-
-/* char: 0x58 'X' */
-
-static final byte[] ch88data = {
-(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x44,(byte) 0x82,(byte) 0x82,
-};
-
-static final BitmapCharRec ch88 = new BitmapCharRec(7,10,-1,0,9,ch88data);
-
-/* char: 0x57 'W' */
-
-static final byte[] ch87data = {
-(byte) 0x44,(byte) 0xaa,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,
-};
-
-static final BitmapCharRec ch87 = new BitmapCharRec(7,10,-1,0,9,ch87data);
-
-/* char: 0x56 'V' */
-
-static final byte[] ch86data = {
-(byte) 0x10,(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0x82,(byte) 0x82,(byte) 0x82,
-};
-
-static final BitmapCharRec ch86 = new BitmapCharRec(7,10,-1,0,9,ch86data);
-
-/* char: 0x55 'U' */
-
-static final byte[] ch85data = {
-(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,
-};
-
-static final BitmapCharRec ch85 = new BitmapCharRec(7,10,-1,0,9,ch85data);
-
-/* char: 0x54 'T' */
-
-static final byte[] ch84data = {
-(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xfe,
-};
-
-static final BitmapCharRec ch84 = new BitmapCharRec(7,10,-1,0,9,ch84data);
-
-/* char: 0x53 'S' */
-
-static final byte[] ch83data = {
-(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x2,(byte) 0xc,(byte) 0x70,(byte) 0x80,(byte) 0x82,(byte) 0x82,(byte) 0x7c,
-};
-
-static final BitmapCharRec ch83 = new BitmapCharRec(7,10,-1,0,9,ch83data);
-
-/* char: 0x52 'R' */
-
-static final byte[] ch82data = {
-(byte) 0x82,(byte) 0x82,(byte) 0x84,(byte) 0x88,(byte) 0x90,(byte) 0xfc,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfc,
-};
-
-static final BitmapCharRec ch82 = new BitmapCharRec(7,10,-1,0,9,ch82data);
-
-/* char: 0x51 'Q' */
-
-static final byte[] ch81data = {
-(byte) 0x6,(byte) 0x8,(byte) 0x7c,(byte) 0x92,(byte) 0xa2,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,
-};
-
-static final BitmapCharRec ch81 = new BitmapCharRec(7,12,-1,2,9,ch81data);
-
-/* char: 0x50 'P' */
-
-static final byte[] ch80data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfc,
-};
-
-static final BitmapCharRec ch80 = new BitmapCharRec(7,10,-1,0,9,ch80data);
-
-/* char: 0x4f 'O' */
-
-static final byte[] ch79data = {
-(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,
-};
-
-static final BitmapCharRec ch79 = new BitmapCharRec(7,10,-1,0,9,ch79data);
-
-/* char: 0x4e 'N' */
-
-static final byte[] ch78data = {
-(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x86,(byte) 0x8a,(byte) 0x92,(byte) 0xa2,(byte) 0xc2,(byte) 0x82,(byte) 0x82,
-};
-
-static final BitmapCharRec ch78 = new BitmapCharRec(7,10,-1,0,9,ch78data);
-
-/* char: 0x4d 'M' */
-
-static final byte[] ch77data = {
-(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x92,(byte) 0x92,(byte) 0xaa,(byte) 0xaa,(byte) 0xc6,(byte) 0x82,(byte) 0x82,
-};
-
-static final BitmapCharRec ch77 = new BitmapCharRec(7,10,-1,0,9,ch77data);
-
-/* char: 0x4c 'L' */
-
-static final byte[] ch76data = {
-(byte) 0xfe,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch76 = new BitmapCharRec(7,10,-1,0,9,ch76data);
-
-/* char: 0x4b 'K' */
-
-static final byte[] ch75data = {
-(byte) 0x82,(byte) 0x84,(byte) 0x88,(byte) 0x90,(byte) 0xa0,(byte) 0xe0,(byte) 0x90,(byte) 0x88,(byte) 0x84,(byte) 0x82,
-};
-
-static final BitmapCharRec ch75 = new BitmapCharRec(7,10,-1,0,9,ch75data);
-
-/* char: 0x4a 'J' */
-
-static final byte[] ch74data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0x1e,
-};
-
-static final BitmapCharRec ch74 = new BitmapCharRec(7,10,-1,0,9,ch74data);
-
-/* char: 0x49 'I' */
-
-static final byte[] ch73data = {
-(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch73 = new BitmapCharRec(5,10,-2,0,9,ch73data);
-
-/* char: 0x48 'H' */
-
-static final byte[] ch72data = {
-(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,
-};
-
-static final BitmapCharRec ch72 = new BitmapCharRec(7,10,-1,0,9,ch72data);
-
-/* char: 0x47 'G' */
-
-static final byte[] ch71data = {
-(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x8e,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x82,(byte) 0x7c,
-};
-
-static final BitmapCharRec ch71 = new BitmapCharRec(7,10,-1,0,9,ch71data);
-
-/* char: 0x46 'F' */
-
-static final byte[] ch70data = {
-(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x78,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xfe,
-};
-
-static final BitmapCharRec ch70 = new BitmapCharRec(7,10,-1,0,9,ch70data);
-
-/* char: 0x45 'E' */
-
-static final byte[] ch69data = {
-(byte) 0xfe,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x78,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xfe,
-};
-
-static final BitmapCharRec ch69 = new BitmapCharRec(7,10,-1,0,9,ch69data);
-
-/* char: 0x44 'D' */
-
-static final byte[] ch68data = {
-(byte) 0xfc,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0xfc,
-};
-
-static final BitmapCharRec ch68 = new BitmapCharRec(7,10,-1,0,9,ch68data);
-
-/* char: 0x43 'C' */
-
-static final byte[] ch67data = {
-(byte) 0x7c,(byte) 0x82,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x82,(byte) 0x7c,
-};
-
-static final BitmapCharRec ch67 = new BitmapCharRec(7,10,-1,0,9,ch67data);
-
-/* char: 0x42 'B' */
-
-static final byte[] ch66data = {
-(byte) 0xfc,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0x7c,(byte) 0x42,(byte) 0x42,(byte) 0x42,(byte) 0xfc,
-};
-
-static final BitmapCharRec ch66 = new BitmapCharRec(7,10,-1,0,9,ch66data);
-
-/* char: 0x41 'A' */
-
-static final byte[] ch65data = {
-(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x28,(byte) 0x10,
-};
-
-static final BitmapCharRec ch65 = new BitmapCharRec(7,10,-1,0,9,ch65data);
-
-/* char: 0x40 '@' */
-
-static final byte[] ch64data = {
-(byte) 0x7c,(byte) 0x80,(byte) 0x80,(byte) 0x9a,(byte) 0xa6,(byte) 0xa2,(byte) 0x9e,(byte) 0x82,(byte) 0x82,(byte) 0x7c,
-};
-
-static final BitmapCharRec ch64 = new BitmapCharRec(7,10,-1,0,9,ch64data);
-
-/* char: 0x3f '?' */
-
-static final byte[] ch63data = {
-(byte) 0x10,(byte) 0x0,(byte) 0x10,(byte) 0x10,(byte) 0x8,(byte) 0x4,(byte) 0x2,(byte) 0x82,(byte) 0x82,(byte) 0x7c,
-};
-
-static final BitmapCharRec ch63 = new BitmapCharRec(7,10,-1,0,9,ch63data);
-
-/* char: 0x3e '>' */
-
-static final byte[] ch62data = {
-(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0x8,(byte) 0x10,(byte) 0x20,(byte) 0x40,(byte) 0x80,
-};
-
-static final BitmapCharRec ch62 = new BitmapCharRec(5,10,-2,0,9,ch62data);
-
-/* char: 0x3d '=' */
-
-static final byte[] ch61data = {
-(byte) 0xfe,(byte) 0x0,(byte) 0x0,(byte) 0xfe,
-};
-
-static final BitmapCharRec ch61 = new BitmapCharRec(7,4,-1,-2,9,ch61data);
-
-/* char: 0x3c '<' */
-
-static final byte[] ch60data = {
-(byte) 0x8,(byte) 0x10,(byte) 0x20,(byte) 0x40,(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,
-};
-
-static final BitmapCharRec ch60 = new BitmapCharRec(5,10,-2,0,9,ch60data);
-
-/* char: 0x3b ';' */
-
-static final byte[] ch59data = {
-(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch59 = new BitmapCharRec(2,10,-4,3,9,ch59data);
-
-/* char: 0x3a ':' */
-
-static final byte[] ch58data = {
-(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch58 = new BitmapCharRec(2,7,-4,0,9,ch58data);
-
-/* char: 0x39 '9' */
-
-static final byte[] ch57data = {
-(byte) 0x78,(byte) 0x4,(byte) 0x2,(byte) 0x2,(byte) 0x7a,(byte) 0x86,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,
-};
-
-static final BitmapCharRec ch57 = new BitmapCharRec(7,10,-1,0,9,ch57data);
-
-/* char: 0x38 '8' */
-
-static final byte[] ch56data = {
-(byte) 0x38,(byte) 0x44,(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x38,(byte) 0x44,(byte) 0x82,(byte) 0x44,(byte) 0x38,
-};
-
-static final BitmapCharRec ch56 = new BitmapCharRec(7,10,-1,0,9,ch56data);
-
-/* char: 0x37 '7' */
-
-static final byte[] ch55data = {
-(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0x4,(byte) 0x2,(byte) 0x2,(byte) 0xfe,
-};
-
-static final BitmapCharRec ch55 = new BitmapCharRec(7,10,-1,0,9,ch55data);
-
-/* char: 0x36 '6' */
-
-static final byte[] ch54data = {
-(byte) 0x7c,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xc2,(byte) 0xbc,(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x3c,
-};
-
-static final BitmapCharRec ch54 = new BitmapCharRec(7,10,-1,0,9,ch54data);
-
-/* char: 0x35 '5' */
-
-static final byte[] ch53data = {
-(byte) 0x7c,(byte) 0x82,(byte) 0x2,(byte) 0x2,(byte) 0x2,(byte) 0xc2,(byte) 0xbc,(byte) 0x80,(byte) 0x80,(byte) 0xfe,
-};
-
-static final BitmapCharRec ch53 = new BitmapCharRec(7,10,-1,0,9,ch53data);
-
-/* char: 0x34 '4' */
-
-static final byte[] ch52data = {
-(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0xfe,(byte) 0x84,(byte) 0x44,(byte) 0x24,(byte) 0x14,(byte) 0xc,(byte) 0x4,
-};
-
-static final BitmapCharRec ch52 = new BitmapCharRec(7,10,-1,0,9,ch52data);
-
-/* char: 0x33 '3' */
-
-static final byte[] ch51data = {
-(byte) 0x7c,(byte) 0x82,(byte) 0x2,(byte) 0x2,(byte) 0x2,(byte) 0x1c,(byte) 0x8,(byte) 0x4,(byte) 0x2,(byte) 0xfe,
-};
-
-static final BitmapCharRec ch51 = new BitmapCharRec(7,10,-1,0,9,ch51data);
-
-/* char: 0x32 '2' */
-
-static final byte[] ch50data = {
-(byte) 0xfe,(byte) 0x80,(byte) 0x40,(byte) 0x30,(byte) 0x8,(byte) 0x4,(byte) 0x2,(byte) 0x82,(byte) 0x82,(byte) 0x7c,
-};
-
-static final BitmapCharRec ch50 = new BitmapCharRec(7,10,-1,0,9,ch50data);
-
-/* char: 0x31 '1' */
-
-static final byte[] ch49data = {
-(byte) 0xfe,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x90,(byte) 0x50,(byte) 0x30,(byte) 0x10,
-};
-
-static final BitmapCharRec ch49 = new BitmapCharRec(7,10,-1,0,9,ch49data);
-
-/* char: 0x30 '0' */
-
-static final byte[] ch48data = {
-(byte) 0x38,(byte) 0x44,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x38,
-};
-
-static final BitmapCharRec ch48 = new BitmapCharRec(7,10,-1,0,9,ch48data);
-
-/* char: 0x2f '/' */
-
-static final byte[] ch47data = {
-(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x10,(byte) 0x8,(byte) 0x4,(byte) 0x4,(byte) 0x2,
-};
-
-static final BitmapCharRec ch47 = new BitmapCharRec(7,10,-1,0,9,ch47data);
-
-/* char: 0x2e '.' */
-
-static final byte[] ch46data = {
-(byte) 0xc0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch46 = new BitmapCharRec(2,2,-4,0,9,ch46data);
-
-/* char: 0x2d '-' */
-
-static final byte[] ch45data = {
-(byte) 0xfe,
-};
-
-static final BitmapCharRec ch45 = new BitmapCharRec(7,1,-1,-4,9,ch45data);
-
-/* char: 0x2c ',' */
-
-static final byte[] ch44data = {
-(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch44 = new BitmapCharRec(2,5,-4,3,9,ch44data);
-
-/* char: 0x2b '+' */
-
-static final byte[] ch43data = {
-(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xfe,(byte) 0x10,(byte) 0x10,(byte) 0x10,
-};
-
-static final BitmapCharRec ch43 = new BitmapCharRec(7,7,-1,-1,9,ch43data);
-
-/* char: 0x2a '*' */
-
-static final byte[] ch42data = {
-(byte) 0x10,(byte) 0x92,(byte) 0x54,(byte) 0x38,(byte) 0x54,(byte) 0x92,(byte) 0x10,
-};
-
-static final BitmapCharRec ch42 = new BitmapCharRec(7,7,-1,-1,9,ch42data);
-
-/* char: 0x29 ')' */
-
-static final byte[] ch41data = {
-(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,
-};
-
-static final BitmapCharRec ch41 = new BitmapCharRec(3,12,-3,1,9,ch41data);
-
-/* char: 0x28 '(' */
-
-static final byte[] ch40data = {
-(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,
-};
-
-static final BitmapCharRec ch40 = new BitmapCharRec(3,12,-3,1,9,ch40data);
-
-/* char: 0x27 ''' */
-
-static final byte[] ch39data = {
-(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x30,
-};
-
-static final BitmapCharRec ch39 = new BitmapCharRec(4,4,-3,-6,9,ch39data);
-
-/* char: 0x26 '&' */
-
-static final byte[] ch38data = {
-(byte) 0x62,(byte) 0x94,(byte) 0x88,(byte) 0x94,(byte) 0x62,(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x60,
-};
-
-static final BitmapCharRec ch38 = new BitmapCharRec(7,10,-1,0,9,ch38data);
-
-/* char: 0x25 '%' */
-
-static final byte[] ch37data = {
-(byte) 0x84,(byte) 0x4a,(byte) 0x4a,(byte) 0x24,(byte) 0x10,(byte) 0x10,(byte) 0x48,(byte) 0xa4,(byte) 0xa4,(byte) 0x42,
-};
-
-static final BitmapCharRec ch37 = new BitmapCharRec(7,10,-1,0,9,ch37data);
-
-/* char: 0x24 '$' */
-
-static final byte[] ch36data = {
-(byte) 0x10,(byte) 0x7c,(byte) 0x92,(byte) 0x12,(byte) 0x12,(byte) 0x14,(byte) 0x38,(byte) 0x50,(byte) 0x90,(byte) 0x92,(byte) 0x7c,(byte) 0x10,
-};
-
-static final BitmapCharRec ch36 = new BitmapCharRec(7,12,-1,1,9,ch36data);
-
-/* char: 0x23 '#' */
-
-static final byte[] ch35data = {
-(byte) 0x48,(byte) 0x48,(byte) 0xfc,(byte) 0x48,(byte) 0x48,(byte) 0xfc,(byte) 0x48,(byte) 0x48,
-};
-
-static final BitmapCharRec ch35 = new BitmapCharRec(6,8,-1,-1,9,ch35data);
-
-/* char: 0x22 '"' */
-
-static final byte[] ch34data = {
-(byte) 0x90,(byte) 0x90,(byte) 0x90,
-};
-
-static final BitmapCharRec ch34 = new BitmapCharRec(4,3,-3,-7,9,ch34data);
-
-/* char: 0x21 '!' */
-
-static final byte[] ch33data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch33 = new BitmapCharRec(1,11,-4,0,9,ch33data);
-
-/* char: 0x1f */
-
-static final byte[] ch31data = {
-(byte) 0xc0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch31 = new BitmapCharRec(2,2,-4,-2,9,ch31data);
-
-/* char: 0x1e */
-
-static final byte[] ch30data = {
-(byte) 0x5c,(byte) 0xa2,(byte) 0x60,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x22,(byte) 0x1c,
-};
-
-static final BitmapCharRec ch30 = new BitmapCharRec(7,10,-1,0,9,ch30data);
-
-/* char: 0x1d */
-
-static final byte[] ch29data = {
-(byte) 0x80,(byte) 0x40,(byte) 0xfe,(byte) 0x10,(byte) 0xfe,(byte) 0x4,(byte) 0x2,
-};
-
-static final BitmapCharRec ch29 = new BitmapCharRec(7,7,-1,0,9,ch29data);
-
-/* char: 0x1c */
-
-static final byte[] ch28data = {
-(byte) 0x44,(byte) 0x24,(byte) 0x24,(byte) 0x24,(byte) 0x24,(byte) 0x24,(byte) 0xfe,
-};
-
-static final BitmapCharRec ch28 = new BitmapCharRec(7,7,-1,0,9,ch28data);
-
-/* char: 0x1b */
-
-static final byte[] ch27data = {
-(byte) 0xfe,(byte) 0x0,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0x8,(byte) 0x10,(byte) 0x20,(byte) 0x40,(byte) 0x80,
-};
-
-static final BitmapCharRec ch27 = new BitmapCharRec(7,12,-1,2,9,ch27data);
-
-/* char: 0x1a */
-
-static final byte[] ch26data = {
-(byte) 0xfc,(byte) 0x0,(byte) 0x4,(byte) 0x8,(byte) 0x10,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0x4,
-};
-
-static final BitmapCharRec ch26 = new BitmapCharRec(6,12,-2,2,9,ch26data);
-
-/* char: 0x19 */
-
-static final byte[] ch25data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch25 = new BitmapCharRec(1,15,-4,3,9,ch25data);
-
-/* char: 0x18 */
-
-static final byte[] ch24data = {
-(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0xff,(byte) 0x80,
-};
-
-static final BitmapCharRec ch24 = new BitmapCharRec(9,7,0,3,9,ch24data);
-
-/* char: 0x17 */
-
-static final byte[] ch23data = {
-(byte) 0xff,(byte) 0x80,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,
-(byte) 0x8,(byte) 0x0,
-};
-
-static final BitmapCharRec ch23 = new BitmapCharRec(9,9,0,-3,9,ch23data);
-
-/* char: 0x16 */
-
-static final byte[] ch22data = {
-(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0xf8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,
-};
-
-static final BitmapCharRec ch22 = new BitmapCharRec(5,15,0,3,9,ch22data);
-
-/* char: 0x15 */
-
-static final byte[] ch21data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch21 = new BitmapCharRec(5,15,-4,3,9,ch21data);
-
-/* char: 0x14 */
-
-static final byte[] ch20data = {
-(byte) 0xff,(byte) 0x80,
-};
-
-static final BitmapCharRec ch20 = new BitmapCharRec(9,1,0,1,9,ch20data);
-
-/* char: 0x13 */
-
-static final byte[] ch19data = {
-(byte) 0xff,(byte) 0x80,
-};
-
-static final BitmapCharRec ch19 = new BitmapCharRec(9,1,0,-1,9,ch19data);
-
-/* char: 0x12 */
-
-static final byte[] ch18data = {
-(byte) 0xff,(byte) 0x80,
-};
-
-static final BitmapCharRec ch18 = new BitmapCharRec(9,1,0,-3,9,ch18data);
-
-/* char: 0x11 */
-
-static final byte[] ch17data = {
-(byte) 0xff,(byte) 0x80,
-};
-
-static final BitmapCharRec ch17 = new BitmapCharRec(9,1,0,-5,9,ch17data);
-
-/* char: 0x10 */
-
-static final byte[] ch16data = {
-(byte) 0xff,(byte) 0x80,
-};
-
-static final BitmapCharRec ch16 = new BitmapCharRec(9,1,0,-7,9,ch16data);
-
-/* char: 0xf */
-
-static final byte[] ch15data = {
-(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0x8,(byte) 0x0,
-(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,
-};
-
-static final BitmapCharRec ch15 = new BitmapCharRec(9,15,0,3,9,ch15data);
-
-/* char: 0xe */
-
-static final byte[] ch14data = {
-(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch14 = new BitmapCharRec(5,9,-4,-3,9,ch14data);
-
-/* char: 0xd */
-
-static final byte[] ch13data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch13 = new BitmapCharRec(5,7,-4,3,9,ch13data);
-
-/* char: 0xc */
-
-static final byte[] ch12data = {
-(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch12 = new BitmapCharRec(5,7,0,3,9,ch12data);
-
-/* char: 0xb */
-
-static final byte[] ch11data = {
-(byte) 0xf8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,
-};
-
-static final BitmapCharRec ch11 = new BitmapCharRec(5,9,0,-3,9,ch11data);
-
-/* char: 0xa */
-
-static final byte[] ch10data = {
-(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x3e,(byte) 0x0,(byte) 0x20,(byte) 0x50,(byte) 0x88,(byte) 0x88,
-};
-
-static final BitmapCharRec ch10 = new BitmapCharRec(7,10,-1,2,9,ch10data);
-
-/* char: 0x9 */
-
-static final byte[] ch9data = {
-(byte) 0x3e,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x88,(byte) 0x98,(byte) 0xa8,(byte) 0xc8,(byte) 0x88,
-};
-
-static final BitmapCharRec ch9 = new BitmapCharRec(7,10,-1,2,9,ch9data);
-
-/* char: 0x8 */
-
-static final byte[] ch8data = {
-(byte) 0xfe,(byte) 0x10,(byte) 0x10,(byte) 0xfe,(byte) 0x10,(byte) 0x10,
-};
-
-static final BitmapCharRec ch8 = new BitmapCharRec(7,6,-1,0,9,ch8data);
-
-/* char: 0x7 */
-
-static final byte[] ch7data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x70,
-};
-
-static final BitmapCharRec ch7 = new BitmapCharRec(5,4,-2,-6,9,ch7data);
-
-/* char: 0x6 */
-
-static final byte[] ch6data = {
-(byte) 0x20,(byte) 0x20,(byte) 0x3c,(byte) 0x20,(byte) 0x3e,(byte) 0x0,(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch6 = new BitmapCharRec(7,10,-1,2,9,ch6data);
-
-/* char: 0x5 */
-
-static final byte[] ch5data = {
-(byte) 0x22,(byte) 0x22,(byte) 0x3c,(byte) 0x22,(byte) 0x3c,(byte) 0x0,(byte) 0x78,(byte) 0x80,(byte) 0x80,(byte) 0x78,
-};
-
-static final BitmapCharRec ch5 = new BitmapCharRec(7,10,-1,2,9,ch5data);
-
-/* char: 0x4 */
-
-static final byte[] ch4data = {
-(byte) 0x10,(byte) 0x10,(byte) 0x1c,(byte) 0x10,(byte) 0x1e,(byte) 0x80,(byte) 0x80,(byte) 0xe0,(byte) 0x80,(byte) 0xf0,
-};
-
-static final BitmapCharRec ch4 = new BitmapCharRec(7,10,-1,2,9,ch4data);
-
-/* char: 0x3 */
-
-static final byte[] ch3data = {
-(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x3e,(byte) 0x0,(byte) 0x88,(byte) 0x88,(byte) 0xf8,(byte) 0x88,(byte) 0x88,
-};
-
-static final BitmapCharRec ch3 = new BitmapCharRec(7,10,-1,2,9,ch3data);
-
-/* char: 0x2 */
-
-static final byte[] ch2data = {
-(byte) 0x55,(byte) 0xaa,(byte) 0x55,(byte) 0xaa,(byte) 0x55,(byte) 0xaa,(byte) 0x55,(byte) 0xaa,(byte) 0x55,(byte) 0xaa,(byte) 0x55,(byte) 0xaa,(byte) 0x55,(byte) 0xaa,
-};
-
-static final BitmapCharRec ch2 = new BitmapCharRec(8,14,0,3,9,ch2data);
-
-/* char: 0x1 */
-
-static final byte[] ch1data = {
-(byte) 0x10,(byte) 0x38,(byte) 0x7c,(byte) 0xfe,(byte) 0x7c,(byte) 0x38,(byte) 0x10,
-};
-
-static final BitmapCharRec ch1 = new BitmapCharRec(7,7,-1,0,9,ch1data);
-
-static final BitmapCharRec[] chars = {
-ch0,
-ch1,
-ch2,
-ch3,
-ch4,
-ch5,
-ch6,
-ch7,
-ch8,
-ch9,
-ch10,
-ch11,
-ch12,
-ch13,
-ch14,
-ch15,
-ch16,
-ch17,
-ch18,
-ch19,
-ch20,
-ch21,
-ch22,
-ch23,
-ch24,
-ch25,
-ch26,
-ch27,
-ch28,
-ch29,
-ch30,
-ch31,
-ch32,
-ch33,
-ch34,
-ch35,
-ch36,
-ch37,
-ch38,
-ch39,
-ch40,
-ch41,
-ch42,
-ch43,
-ch44,
-ch45,
-ch46,
-ch47,
-ch48,
-ch49,
-ch50,
-ch51,
-ch52,
-ch53,
-ch54,
-ch55,
-ch56,
-ch57,
-ch58,
-ch59,
-ch60,
-ch61,
-ch62,
-ch63,
-ch64,
-ch65,
-ch66,
-ch67,
-ch68,
-ch69,
-ch70,
-ch71,
-ch72,
-ch73,
-ch74,
-ch75,
-ch76,
-ch77,
-ch78,
-ch79,
-ch80,
-ch81,
-ch82,
-ch83,
-ch84,
-ch85,
-ch86,
-ch87,
-ch88,
-ch89,
-ch90,
-ch91,
-ch92,
-ch93,
-ch94,
-ch95,
-ch96,
-ch97,
-ch98,
-ch99,
-ch100,
-ch101,
-ch102,
-ch103,
-ch104,
-ch105,
-ch106,
-ch107,
-ch108,
-ch109,
-ch110,
-ch111,
-ch112,
-ch113,
-ch114,
-ch115,
-ch116,
-ch117,
-ch118,
-ch119,
-ch120,
-ch121,
-ch122,
-ch123,
-ch124,
-ch125,
-ch126,
-ch127,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-ch160,
-ch161,
-ch162,
-ch163,
-ch164,
-ch165,
-ch166,
-ch167,
-ch168,
-ch169,
-ch170,
-ch171,
-ch172,
-ch173,
-ch174,
-ch175,
-ch176,
-ch177,
-ch178,
-ch179,
-ch180,
-ch181,
-ch182,
-ch183,
-ch184,
-ch185,
-ch186,
-ch187,
-ch188,
-ch189,
-ch190,
-ch191,
-ch192,
-ch193,
-ch194,
-ch195,
-ch196,
-ch197,
-ch198,
-ch199,
-ch200,
-ch201,
-ch202,
-ch203,
-ch204,
-ch205,
-ch206,
-ch207,
-ch208,
-ch209,
-ch210,
-ch211,
-ch212,
-ch213,
-ch214,
-ch215,
-ch216,
-ch217,
-ch218,
-ch219,
-ch220,
-ch221,
-ch222,
-ch223,
-ch224,
-ch225,
-ch226,
-ch227,
-ch228,
-ch229,
-ch230,
-ch231,
-ch232,
-ch233,
-ch234,
-ch235,
-ch236,
-ch237,
-ch238,
-ch239,
-ch240,
-ch241,
-ch242,
-ch243,
-ch244,
-ch245,
-ch246,
-ch247,
-ch248,
-ch249,
-ch250,
-ch251,
-ch252,
-ch253,
-ch254,
-ch255,
-};
-
- public static final BitmapFontRec glutBitmap9By15 = new BitmapFontRec("-misc-fixed-medium-r-normal--15-140-75-75-C-90-iso8859-1",
- 256,
- 0,
- chars);
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/gl2/GLUTBitmapHelvetica10.java b/src/jogl/classes/com/sun/opengl/util/gl2/GLUTBitmapHelvetica10.java
deleted file mode 100644
index cca045ffa..000000000
--- a/src/jogl/classes/com/sun/opengl/util/gl2/GLUTBitmapHelvetica10.java
+++ /dev/null
@@ -1,1798 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.util.gl2;
-
-class GLUTBitmapHelvetica10 {
-
-/* GENERATED FILE -- DO NOT MODIFY */
-
-/* char: 0xff */
-
-static final byte[] ch255data = {
-(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x60,(byte) 0xa0,(byte) 0xa0,(byte) 0x90,(byte) 0x90,(byte) 0x0,(byte) 0x50,
-};
-
-static final BitmapCharRec ch255 = new BitmapCharRec(4,10,0,2,5,ch255data);
-
-/* char: 0xfe */
-
-static final byte[] ch254data = {
-(byte) 0x80,(byte) 0x80,(byte) 0xb0,(byte) 0xc8,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch254 = new BitmapCharRec(5,10,0,2,6,ch254data);
-
-/* char: 0xfd */
-
-static final byte[] ch253data = {
-(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x60,(byte) 0xa0,(byte) 0xa0,(byte) 0x90,(byte) 0x90,(byte) 0x0,(byte) 0x20,(byte) 0x10,
-};
-
-static final BitmapCharRec ch253 = new BitmapCharRec(4,11,0,2,5,ch253data);
-
-/* char: 0xfc */
-
-static final byte[] ch252data = {
-(byte) 0x70,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x0,(byte) 0x50,
-};
-
-static final BitmapCharRec ch252 = new BitmapCharRec(4,8,0,0,5,ch252data);
-
-/* char: 0xfb */
-
-static final byte[] ch251data = {
-(byte) 0x70,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x0,(byte) 0x50,(byte) 0x20,
-};
-
-static final BitmapCharRec ch251 = new BitmapCharRec(4,9,0,0,5,ch251data);
-
-/* char: 0xfa */
-
-static final byte[] ch250data = {
-(byte) 0x70,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x0,(byte) 0x40,(byte) 0x20,
-};
-
-static final BitmapCharRec ch250 = new BitmapCharRec(4,9,0,0,5,ch250data);
-
-/* char: 0xf9 */
-
-static final byte[] ch249data = {
-(byte) 0x70,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x0,(byte) 0x20,(byte) 0x40,
-};
-
-static final BitmapCharRec ch249 = new BitmapCharRec(4,9,0,0,5,ch249data);
-
-/* char: 0xf8 */
-
-static final byte[] ch248data = {
-(byte) 0x70,(byte) 0x88,(byte) 0xc8,(byte) 0xa8,(byte) 0x98,(byte) 0x74,
-};
-
-static final BitmapCharRec ch248 = new BitmapCharRec(6,6,0,0,6,ch248data);
-
-/* char: 0xf7 */
-
-static final byte[] ch247data = {
-(byte) 0x20,(byte) 0x0,(byte) 0xf8,(byte) 0x0,(byte) 0x20,
-};
-
-static final BitmapCharRec ch247 = new BitmapCharRec(5,5,0,-1,6,ch247data);
-
-/* char: 0xf6 */
-
-static final byte[] ch246data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x50,
-};
-
-static final BitmapCharRec ch246 = new BitmapCharRec(5,8,0,0,6,ch246data);
-
-/* char: 0xf5 */
-
-static final byte[] ch245data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x50,(byte) 0x28,
-};
-
-static final BitmapCharRec ch245 = new BitmapCharRec(5,9,0,0,6,ch245data);
-
-/* char: 0xf4 */
-
-static final byte[] ch244data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x50,(byte) 0x20,
-};
-
-static final BitmapCharRec ch244 = new BitmapCharRec(5,9,0,0,6,ch244data);
-
-/* char: 0xf3 */
-
-static final byte[] ch243data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x20,(byte) 0x10,
-};
-
-static final BitmapCharRec ch243 = new BitmapCharRec(5,9,0,0,6,ch243data);
-
-/* char: 0xf2 */
-
-static final byte[] ch242data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x20,(byte) 0x40,
-};
-
-static final BitmapCharRec ch242 = new BitmapCharRec(5,9,0,0,6,ch242data);
-
-/* char: 0xf1 */
-
-static final byte[] ch241data = {
-(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0xe0,(byte) 0x0,(byte) 0xa0,(byte) 0x50,
-};
-
-static final BitmapCharRec ch241 = new BitmapCharRec(4,9,0,0,5,ch241data);
-
-/* char: 0xf0 */
-
-static final byte[] ch240data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x78,(byte) 0x90,(byte) 0x60,(byte) 0x50,
-};
-
-static final BitmapCharRec ch240 = new BitmapCharRec(5,9,0,0,6,ch240data);
-
-/* char: 0xef */
-
-static final byte[] ch239data = {
-(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0xa0,
-};
-
-static final BitmapCharRec ch239 = new BitmapCharRec(3,8,0,0,2,ch239data);
-
-/* char: 0xee */
-
-static final byte[] ch238data = {
-(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0xa0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch238 = new BitmapCharRec(3,9,1,0,2,ch238data);
-
-/* char: 0xed */
-
-static final byte[] ch237data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,(byte) 0x40,
-};
-
-static final BitmapCharRec ch237 = new BitmapCharRec(2,9,0,0,2,ch237data);
-
-/* char: 0xec */
-
-static final byte[] ch236data = {
-(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0x40,(byte) 0x80,
-};
-
-static final BitmapCharRec ch236 = new BitmapCharRec(2,9,1,0,2,ch236data);
-
-/* char: 0xeb */
-
-static final byte[] ch235data = {
-(byte) 0x60,(byte) 0x90,(byte) 0x80,(byte) 0xf0,(byte) 0x90,(byte) 0x60,(byte) 0x0,(byte) 0x50,
-};
-
-static final BitmapCharRec ch235 = new BitmapCharRec(4,8,0,0,5,ch235data);
-
-/* char: 0xea */
-
-static final byte[] ch234data = {
-(byte) 0x60,(byte) 0x90,(byte) 0x80,(byte) 0xf0,(byte) 0x90,(byte) 0x60,(byte) 0x0,(byte) 0x50,(byte) 0x20,
-};
-
-static final BitmapCharRec ch234 = new BitmapCharRec(4,9,0,0,5,ch234data);
-
-/* char: 0xe9 */
-
-static final byte[] ch233data = {
-(byte) 0x60,(byte) 0x90,(byte) 0x80,(byte) 0xf0,(byte) 0x90,(byte) 0x60,(byte) 0x0,(byte) 0x40,(byte) 0x20,
-};
-
-static final BitmapCharRec ch233 = new BitmapCharRec(4,9,0,0,5,ch233data);
-
-/* char: 0xe8 */
-
-static final byte[] ch232data = {
-(byte) 0x60,(byte) 0x90,(byte) 0x80,(byte) 0xf0,(byte) 0x90,(byte) 0x60,(byte) 0x0,(byte) 0x20,(byte) 0x40,
-};
-
-static final BitmapCharRec ch232 = new BitmapCharRec(4,9,0,0,5,ch232data);
-
-/* char: 0xe7 */
-
-static final byte[] ch231data = {
-(byte) 0x60,(byte) 0x20,(byte) 0x60,(byte) 0x90,(byte) 0x80,(byte) 0x80,(byte) 0x90,(byte) 0x60,
-};
-
-static final BitmapCharRec ch231 = new BitmapCharRec(4,8,0,2,5,ch231data);
-
-/* char: 0xe6 */
-
-static final byte[] ch230data = {
-(byte) 0x6c,(byte) 0x92,(byte) 0x90,(byte) 0x7e,(byte) 0x12,(byte) 0xec,
-};
-
-static final BitmapCharRec ch230 = new BitmapCharRec(7,6,0,0,8,ch230data);
-
-/* char: 0xe5 */
-
-static final byte[] ch229data = {
-(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x70,(byte) 0x10,(byte) 0xe0,(byte) 0x20,(byte) 0x50,(byte) 0x20,
-};
-
-static final BitmapCharRec ch229 = new BitmapCharRec(5,9,0,0,5,ch229data);
-
-/* char: 0xe4 */
-
-static final byte[] ch228data = {
-(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x70,(byte) 0x10,(byte) 0xe0,(byte) 0x0,(byte) 0x50,
-};
-
-static final BitmapCharRec ch228 = new BitmapCharRec(5,8,0,0,5,ch228data);
-
-/* char: 0xe3 */
-
-static final byte[] ch227data = {
-(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x70,(byte) 0x10,(byte) 0xe0,(byte) 0x0,(byte) 0xa0,(byte) 0x50,
-};
-
-static final BitmapCharRec ch227 = new BitmapCharRec(5,9,0,0,5,ch227data);
-
-/* char: 0xe2 */
-
-static final byte[] ch226data = {
-(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x70,(byte) 0x10,(byte) 0xe0,(byte) 0x0,(byte) 0x50,(byte) 0x20,
-};
-
-static final BitmapCharRec ch226 = new BitmapCharRec(5,9,0,0,5,ch226data);
-
-/* char: 0xe1 */
-
-static final byte[] ch225data = {
-(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x70,(byte) 0x10,(byte) 0xe0,(byte) 0x0,(byte) 0x20,(byte) 0x10,
-};
-
-static final BitmapCharRec ch225 = new BitmapCharRec(5,9,0,0,5,ch225data);
-
-/* char: 0xe0 */
-
-static final byte[] ch224data = {
-(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x70,(byte) 0x10,(byte) 0xe0,(byte) 0x0,(byte) 0x20,(byte) 0x40,
-};
-
-static final BitmapCharRec ch224 = new BitmapCharRec(5,9,0,0,5,ch224data);
-
-/* char: 0xdf */
-
-static final byte[] ch223data = {
-(byte) 0xa0,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0xa0,(byte) 0x90,(byte) 0x90,(byte) 0x60,
-};
-
-static final BitmapCharRec ch223 = new BitmapCharRec(4,8,0,0,5,ch223data);
-
-/* char: 0xde */
-
-static final byte[] ch222data = {
-(byte) 0x80,(byte) 0x80,(byte) 0xf0,(byte) 0x88,(byte) 0x88,(byte) 0xf0,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch222 = new BitmapCharRec(5,8,-1,0,7,ch222data);
-
-/* char: 0xdd */
-
-static final byte[] ch221data = {
-(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x28,(byte) 0x44,(byte) 0x44,(byte) 0x82,(byte) 0x0,(byte) 0x10,(byte) 0x8,
-};
-
-static final BitmapCharRec ch221 = new BitmapCharRec(7,11,0,0,7,ch221data);
-
-/* char: 0xdc */
-
-static final byte[] ch220data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x48,
-};
-
-static final BitmapCharRec ch220 = new BitmapCharRec(6,10,-1,0,8,ch220data);
-
-/* char: 0xdb */
-
-static final byte[] ch219data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x28,(byte) 0x10,
-};
-
-static final BitmapCharRec ch219 = new BitmapCharRec(6,11,-1,0,8,ch219data);
-
-/* char: 0xda */
-
-static final byte[] ch218data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x20,(byte) 0x10,
-};
-
-static final BitmapCharRec ch218 = new BitmapCharRec(6,11,-1,0,8,ch218data);
-
-/* char: 0xd9 */
-
-static final byte[] ch217data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x10,(byte) 0x20,
-};
-
-static final BitmapCharRec ch217 = new BitmapCharRec(6,11,-1,0,8,ch217data);
-
-/* char: 0xd8 */
-
-static final byte[] ch216data = {
-(byte) 0x80,(byte) 0x78,(byte) 0xc4,(byte) 0xa4,(byte) 0xa4,(byte) 0x94,(byte) 0x94,(byte) 0x8c,(byte) 0x78,(byte) 0x4,
-};
-
-static final BitmapCharRec ch216 = new BitmapCharRec(6,10,-1,1,8,ch216data);
-
-/* char: 0xd7 */
-
-static final byte[] ch215data = {
-(byte) 0x88,(byte) 0x50,(byte) 0x20,(byte) 0x50,(byte) 0x88,
-};
-
-static final BitmapCharRec ch215 = new BitmapCharRec(5,5,0,-1,6,ch215data);
-
-/* char: 0xd6 */
-
-static final byte[] ch214data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x48,
-};
-
-static final BitmapCharRec ch214 = new BitmapCharRec(6,10,-1,0,8,ch214data);
-
-/* char: 0xd5 */
-
-static final byte[] ch213data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x50,(byte) 0x28,
-};
-
-static final BitmapCharRec ch213 = new BitmapCharRec(6,11,-1,0,8,ch213data);
-
-/* char: 0xd4 */
-
-static final byte[] ch212data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x28,(byte) 0x10,
-};
-
-static final BitmapCharRec ch212 = new BitmapCharRec(6,11,-1,0,8,ch212data);
-
-/* char: 0xd3 */
-
-static final byte[] ch211data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x10,(byte) 0x8,
-};
-
-static final BitmapCharRec ch211 = new BitmapCharRec(6,11,-1,0,8,ch211data);
-
-/* char: 0xd2 */
-
-static final byte[] ch210data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,(byte) 0x0,(byte) 0x10,(byte) 0x20,
-};
-
-static final BitmapCharRec ch210 = new BitmapCharRec(6,11,-1,0,8,ch210data);
-
-/* char: 0xd1 */
-
-static final byte[] ch209data = {
-(byte) 0x8c,(byte) 0x8c,(byte) 0x94,(byte) 0x94,(byte) 0xa4,(byte) 0xa4,(byte) 0xc4,(byte) 0xc4,(byte) 0x0,(byte) 0x50,(byte) 0x28,
-};
-
-static final BitmapCharRec ch209 = new BitmapCharRec(6,11,-1,0,8,ch209data);
-
-/* char: 0xd0 */
-
-static final byte[] ch208data = {
-(byte) 0x78,(byte) 0x44,(byte) 0x42,(byte) 0x42,(byte) 0xf2,(byte) 0x42,(byte) 0x44,(byte) 0x78,
-};
-
-static final BitmapCharRec ch208 = new BitmapCharRec(7,8,0,0,8,ch208data);
-
-/* char: 0xcf */
-
-static final byte[] ch207data = {
-(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0xa0,
-};
-
-static final BitmapCharRec ch207 = new BitmapCharRec(3,10,0,0,3,ch207data);
-
-/* char: 0xce */
-
-static final byte[] ch206data = {
-(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0xa0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch206 = new BitmapCharRec(3,11,0,0,3,ch206data);
-
-/* char: 0xcd */
-
-static final byte[] ch205data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,(byte) 0x40,
-};
-
-static final BitmapCharRec ch205 = new BitmapCharRec(2,11,-1,0,3,ch205data);
-
-/* char: 0xcc */
-
-static final byte[] ch204data = {
-(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0x40,(byte) 0x80,
-};
-
-static final BitmapCharRec ch204 = new BitmapCharRec(2,11,0,0,3,ch204data);
-
-/* char: 0xcb */
-
-static final byte[] ch203data = {
-(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x0,(byte) 0x50,
-};
-
-static final BitmapCharRec ch203 = new BitmapCharRec(5,10,-1,0,7,ch203data);
-
-/* char: 0xca */
-
-static final byte[] ch202data = {
-(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x0,(byte) 0x50,(byte) 0x20,
-};
-
-static final BitmapCharRec ch202 = new BitmapCharRec(5,11,-1,0,7,ch202data);
-
-/* char: 0xc9 */
-
-static final byte[] ch201data = {
-(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x0,(byte) 0x20,(byte) 0x10,
-};
-
-static final BitmapCharRec ch201 = new BitmapCharRec(5,11,-1,0,7,ch201data);
-
-/* char: 0xc8 */
-
-static final byte[] ch200data = {
-(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x0,(byte) 0x20,(byte) 0x40,
-};
-
-static final BitmapCharRec ch200 = new BitmapCharRec(5,11,-1,0,7,ch200data);
-
-/* char: 0xc7 */
-
-static final byte[] ch199data = {
-(byte) 0x30,(byte) 0x10,(byte) 0x78,(byte) 0x84,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x84,(byte) 0x78,
-};
-
-static final BitmapCharRec ch199 = new BitmapCharRec(6,10,-1,2,8,ch199data);
-
-/* char: 0xc6 */
-
-static final byte[] ch198data = {
-(byte) 0x8f,(byte) 0x80,(byte) 0x88,(byte) 0x0,(byte) 0x78,(byte) 0x0,(byte) 0x48,(byte) 0x0,(byte) 0x2f,(byte) 0x80,(byte) 0x28,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x1f,(byte) 0x80,
-};
-
-static final BitmapCharRec ch198 = new BitmapCharRec(9,8,0,0,10,ch198data);
-
-/* char: 0xc5 */
-
-static final byte[] ch197data = {
-(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x28,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x10,
-};
-
-static final BitmapCharRec ch197 = new BitmapCharRec(7,11,0,0,7,ch197data);
-
-/* char: 0xc4 */
-
-static final byte[] ch196data = {
-(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x28,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x0,(byte) 0x28,
-};
-
-static final BitmapCharRec ch196 = new BitmapCharRec(7,10,0,0,7,ch196data);
-
-/* char: 0xc3 */
-
-static final byte[] ch195data = {
-(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x28,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x0,(byte) 0x28,(byte) 0x14,
-};
-
-static final BitmapCharRec ch195 = new BitmapCharRec(7,11,0,0,7,ch195data);
-
-/* char: 0xc2 */
-
-static final byte[] ch194data = {
-(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x28,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x0,(byte) 0x28,(byte) 0x10,
-};
-
-static final BitmapCharRec ch194 = new BitmapCharRec(7,11,0,0,7,ch194data);
-
-/* char: 0xc1 */
-
-static final byte[] ch193data = {
-(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x28,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x0,(byte) 0x10,(byte) 0x8,
-};
-
-static final BitmapCharRec ch193 = new BitmapCharRec(7,11,0,0,7,ch193data);
-
-/* char: 0xc0 */
-
-static final byte[] ch192data = {
-(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x28,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x0,(byte) 0x10,(byte) 0x20,
-};
-
-static final BitmapCharRec ch192 = new BitmapCharRec(7,11,0,0,7,ch192data);
-
-/* char: 0xbf */
-
-static final byte[] ch191data = {
-(byte) 0x60,(byte) 0x90,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x0,(byte) 0x20,
-};
-
-static final BitmapCharRec ch191 = new BitmapCharRec(4,8,-1,2,6,ch191data);
-
-/* char: 0xbe */
-
-static final byte[] ch190data = {
-(byte) 0x21,(byte) 0x0,(byte) 0x17,(byte) 0x80,(byte) 0x13,(byte) 0x0,(byte) 0x9,(byte) 0x0,(byte) 0xc8,(byte) 0x0,(byte) 0x24,(byte) 0x0,(byte) 0x44,(byte) 0x0,(byte) 0xe2,(byte) 0x0,
-};
-
-static final BitmapCharRec ch190 = new BitmapCharRec(9,8,0,0,9,ch190data);
-
-/* char: 0xbd */
-
-static final byte[] ch189data = {
-(byte) 0x27,(byte) 0x12,(byte) 0x15,(byte) 0xb,(byte) 0x48,(byte) 0x44,(byte) 0xc4,(byte) 0x42,
-};
-
-static final BitmapCharRec ch189 = new BitmapCharRec(8,8,0,0,9,ch189data);
-
-/* char: 0xbc */
-
-static final byte[] ch188data = {
-(byte) 0x21,(byte) 0x0,(byte) 0x17,(byte) 0x80,(byte) 0x13,(byte) 0x0,(byte) 0x9,(byte) 0x0,(byte) 0x48,(byte) 0x0,(byte) 0x44,(byte) 0x0,(byte) 0xc4,(byte) 0x0,(byte) 0x42,(byte) 0x0,
-};
-
-static final BitmapCharRec ch188 = new BitmapCharRec(9,8,0,0,9,ch188data);
-
-/* char: 0xbb */
-
-static final byte[] ch187data = {
-(byte) 0xa0,(byte) 0x50,(byte) 0x28,(byte) 0x50,(byte) 0xa0,
-};
-
-static final BitmapCharRec ch187 = new BitmapCharRec(5,5,0,0,6,ch187data);
-
-/* char: 0xba */
-
-static final byte[] ch186data = {
-(byte) 0xe0,(byte) 0x0,(byte) 0xe0,(byte) 0xa0,(byte) 0xe0,
-};
-
-static final BitmapCharRec ch186 = new BitmapCharRec(3,5,0,-3,4,ch186data);
-
-/* char: 0xb9 */
-
-static final byte[] ch185data = {
-(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch185 = new BitmapCharRec(2,4,0,-3,3,ch185data);
-
-/* char: 0xb8 */
-
-static final byte[] ch184data = {
-(byte) 0xc0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch184 = new BitmapCharRec(2,2,0,2,3,ch184data);
-
-/* char: 0xb7 */
-
-static final byte[] ch183data = {
-(byte) 0xc0,
-};
-
-static final BitmapCharRec ch183 = new BitmapCharRec(2,1,0,-3,3,ch183data);
-
-/* char: 0xb6 */
-
-static final byte[] ch182data = {
-(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x68,(byte) 0xe8,(byte) 0xe8,(byte) 0xe8,(byte) 0x7c,
-};
-
-static final BitmapCharRec ch182 = new BitmapCharRec(6,10,0,2,6,ch182data);
-
-/* char: 0xb5 */
-
-static final byte[] ch181data = {
-(byte) 0x80,(byte) 0x80,(byte) 0xf0,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,
-};
-
-static final BitmapCharRec ch181 = new BitmapCharRec(4,8,0,2,5,ch181data);
-
-/* char: 0xb4 */
-
-static final byte[] ch180data = {
-(byte) 0x80,(byte) 0x40,
-};
-
-static final BitmapCharRec ch180 = new BitmapCharRec(2,2,0,-6,3,ch180data);
-
-/* char: 0xb3 */
-
-static final byte[] ch179data = {
-(byte) 0xc0,(byte) 0x20,(byte) 0x40,(byte) 0xe0,
-};
-
-static final BitmapCharRec ch179 = new BitmapCharRec(3,4,0,-3,3,ch179data);
-
-/* char: 0xb2 */
-
-static final byte[] ch178data = {
-(byte) 0xe0,(byte) 0x40,(byte) 0xa0,(byte) 0x60,
-};
-
-static final BitmapCharRec ch178 = new BitmapCharRec(3,4,0,-3,3,ch178data);
-
-/* char: 0xb1 */
-
-static final byte[] ch177data = {
-(byte) 0xf8,(byte) 0x0,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x20,
-};
-
-static final BitmapCharRec ch177 = new BitmapCharRec(5,7,0,0,6,ch177data);
-
-/* char: 0xb0 */
-
-static final byte[] ch176data = {
-(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x60,
-};
-
-static final BitmapCharRec ch176 = new BitmapCharRec(4,4,0,-3,4,ch176data);
-
-/* char: 0xaf */
-
-static final byte[] ch175data = {
-(byte) 0xe0,
-};
-
-static final BitmapCharRec ch175 = new BitmapCharRec(3,1,0,-7,3,ch175data);
-
-/* char: 0xae */
-
-static final byte[] ch174data = {
-(byte) 0x38,(byte) 0x44,(byte) 0xaa,(byte) 0xb2,(byte) 0xba,(byte) 0x44,(byte) 0x38,
-};
-
-static final BitmapCharRec ch174 = new BitmapCharRec(7,7,-1,0,9,ch174data);
-
-/* char: 0xad */
-
-static final byte[] ch173data = {
-(byte) 0xe0,
-};
-
-static final BitmapCharRec ch173 = new BitmapCharRec(3,1,0,-3,4,ch173data);
-
-/* char: 0xac */
-
-static final byte[] ch172data = {
-(byte) 0x8,(byte) 0x8,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch172 = new BitmapCharRec(5,3,-1,-2,7,ch172data);
-
-/* char: 0xab */
-
-static final byte[] ch171data = {
-(byte) 0x28,(byte) 0x50,(byte) 0xa0,(byte) 0x50,(byte) 0x28,
-};
-
-static final BitmapCharRec ch171 = new BitmapCharRec(5,5,0,0,6,ch171data);
-
-/* char: 0xaa */
-
-static final byte[] ch170data = {
-(byte) 0xe0,(byte) 0x0,(byte) 0xa0,(byte) 0x20,(byte) 0xe0,
-};
-
-static final BitmapCharRec ch170 = new BitmapCharRec(3,5,0,-3,4,ch170data);
-
-/* char: 0xa9 */
-
-static final byte[] ch169data = {
-(byte) 0x38,(byte) 0x44,(byte) 0x9a,(byte) 0xa2,(byte) 0x9a,(byte) 0x44,(byte) 0x38,
-};
-
-static final BitmapCharRec ch169 = new BitmapCharRec(7,7,-1,0,9,ch169data);
-
-/* char: 0xa8 */
-
-static final byte[] ch168data = {
-(byte) 0xa0,
-};
-
-static final BitmapCharRec ch168 = new BitmapCharRec(3,1,0,-7,3,ch168data);
-
-/* char: 0xa7 */
-
-static final byte[] ch167data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x18,(byte) 0x70,(byte) 0xc8,(byte) 0x98,(byte) 0x70,(byte) 0xc0,(byte) 0x88,(byte) 0x70,
-};
-
-static final BitmapCharRec ch167 = new BitmapCharRec(5,10,0,2,6,ch167data);
-
-/* char: 0xa6 */
-
-static final byte[] ch166data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch166 = new BitmapCharRec(1,10,-1,2,3,ch166data);
-
-/* char: 0xa5 */
-
-static final byte[] ch165data = {
-(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0xf8,(byte) 0x50,(byte) 0x50,(byte) 0x88,(byte) 0x88,
-};
-
-static final BitmapCharRec ch165 = new BitmapCharRec(5,8,0,0,6,ch165data);
-
-/* char: 0xa4 */
-
-static final byte[] ch164data = {
-(byte) 0x90,(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x60,(byte) 0x90,
-};
-
-static final BitmapCharRec ch164 = new BitmapCharRec(4,6,0,-1,5,ch164data);
-
-/* char: 0xa3 */
-
-static final byte[] ch163data = {
-(byte) 0xb0,(byte) 0x48,(byte) 0x40,(byte) 0x40,(byte) 0xe0,(byte) 0x40,(byte) 0x48,(byte) 0x30,
-};
-
-static final BitmapCharRec ch163 = new BitmapCharRec(5,8,0,0,6,ch163data);
-
-/* char: 0xa2 */
-
-static final byte[] ch162data = {
-(byte) 0x40,(byte) 0x70,(byte) 0xa8,(byte) 0xa0,(byte) 0xa0,(byte) 0xa8,(byte) 0x70,(byte) 0x10,
-};
-
-static final BitmapCharRec ch162 = new BitmapCharRec(5,8,0,1,6,ch162data);
-
-/* char: 0xa1 */
-
-static final byte[] ch161data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,
-};
-
-static final BitmapCharRec ch161 = new BitmapCharRec(1,8,-1,2,3,ch161data);
-
-/* char: 0xa0 */
-
-static final BitmapCharRec ch160 = new BitmapCharRec(0,0,0,0,3,null);
-
-/* char: 0x7e '~' */
-
-static final byte[] ch126data = {
-(byte) 0x98,(byte) 0x64,
-};
-
-static final BitmapCharRec ch126 = new BitmapCharRec(6,2,0,-3,7,ch126data);
-
-/* char: 0x7d '}' */
-
-static final byte[] ch125data = {
-(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x80,
-};
-
-static final BitmapCharRec ch125 = new BitmapCharRec(3,10,0,2,3,ch125data);
-
-/* char: 0x7c '|' */
-
-static final byte[] ch124data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch124 = new BitmapCharRec(1,10,-1,2,3,ch124data);
-
-/* char: 0x7b '{' */
-
-static final byte[] ch123data = {
-(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x20,
-};
-
-static final BitmapCharRec ch123 = new BitmapCharRec(3,10,0,2,3,ch123data);
-
-/* char: 0x7a 'z' */
-
-static final byte[] ch122data = {
-(byte) 0xf0,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0xf0,
-};
-
-static final BitmapCharRec ch122 = new BitmapCharRec(4,6,0,0,5,ch122data);
-
-/* char: 0x79 'y' */
-
-static final byte[] ch121data = {
-(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x60,(byte) 0xa0,(byte) 0xa0,(byte) 0x90,(byte) 0x90,
-};
-
-static final BitmapCharRec ch121 = new BitmapCharRec(4,8,0,2,5,ch121data);
-
-/* char: 0x78 'x' */
-
-static final byte[] ch120data = {
-(byte) 0x88,(byte) 0x88,(byte) 0x50,(byte) 0x20,(byte) 0x50,(byte) 0x88,
-};
-
-static final BitmapCharRec ch120 = new BitmapCharRec(5,6,0,0,6,ch120data);
-
-/* char: 0x77 'w' */
-
-static final byte[] ch119data = {
-(byte) 0x28,(byte) 0x28,(byte) 0x54,(byte) 0x54,(byte) 0x92,(byte) 0x92,
-};
-
-static final BitmapCharRec ch119 = new BitmapCharRec(7,6,0,0,8,ch119data);
-
-/* char: 0x76 'v' */
-
-static final byte[] ch118data = {
-(byte) 0x20,(byte) 0x20,(byte) 0x50,(byte) 0x50,(byte) 0x88,(byte) 0x88,
-};
-
-static final BitmapCharRec ch118 = new BitmapCharRec(5,6,0,0,6,ch118data);
-
-/* char: 0x75 'u' */
-
-static final byte[] ch117data = {
-(byte) 0x70,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,
-};
-
-static final BitmapCharRec ch117 = new BitmapCharRec(4,6,0,0,5,ch117data);
-
-/* char: 0x74 't' */
-
-static final byte[] ch116data = {
-(byte) 0x60,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,(byte) 0x40,(byte) 0x40,
-};
-
-static final BitmapCharRec ch116 = new BitmapCharRec(3,8,0,0,4,ch116data);
-
-/* char: 0x73 's' */
-
-static final byte[] ch115data = {
-(byte) 0x60,(byte) 0x90,(byte) 0x10,(byte) 0x60,(byte) 0x90,(byte) 0x60,
-};
-
-static final BitmapCharRec ch115 = new BitmapCharRec(4,6,0,0,5,ch115data);
-
-/* char: 0x72 'r' */
-
-static final byte[] ch114data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xc0,(byte) 0xa0,
-};
-
-static final BitmapCharRec ch114 = new BitmapCharRec(3,6,0,0,4,ch114data);
-
-/* char: 0x71 'q' */
-
-static final byte[] ch113data = {
-(byte) 0x8,(byte) 0x8,(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x98,(byte) 0x68,
-};
-
-static final BitmapCharRec ch113 = new BitmapCharRec(5,8,0,2,6,ch113data);
-
-/* char: 0x70 'p' */
-
-static final byte[] ch112data = {
-(byte) 0x80,(byte) 0x80,(byte) 0xb0,(byte) 0xc8,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,
-};
-
-static final BitmapCharRec ch112 = new BitmapCharRec(5,8,0,2,6,ch112data);
-
-/* char: 0x6f 'o' */
-
-static final byte[] ch111data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,
-};
-
-static final BitmapCharRec ch111 = new BitmapCharRec(5,6,0,0,6,ch111data);
-
-/* char: 0x6e 'n' */
-
-static final byte[] ch110data = {
-(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,
-};
-
-static final BitmapCharRec ch110 = new BitmapCharRec(5,6,0,0,6,ch110data);
-
-/* char: 0x6d 'm' */
-
-static final byte[] ch109data = {
-(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0xec,
-};
-
-static final BitmapCharRec ch109 = new BitmapCharRec(7,6,0,0,8,ch109data);
-
-/* char: 0x6c 'l' */
-
-static final byte[] ch108data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch108 = new BitmapCharRec(1,8,0,0,2,ch108data);
-
-/* char: 0x6b 'k' */
-
-static final byte[] ch107data = {
-(byte) 0x90,(byte) 0x90,(byte) 0xa0,(byte) 0xc0,(byte) 0xa0,(byte) 0x90,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch107 = new BitmapCharRec(4,8,0,0,5,ch107data);
-
-/* char: 0x6a 'j' */
-
-static final byte[] ch106data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,
-};
-
-static final BitmapCharRec ch106 = new BitmapCharRec(1,9,0,1,2,ch106data);
-
-/* char: 0x69 'i' */
-
-static final byte[] ch105data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,
-};
-
-static final BitmapCharRec ch105 = new BitmapCharRec(1,8,0,0,2,ch105data);
-
-/* char: 0x68 'h' */
-
-static final byte[] ch104data = {
-(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch104 = new BitmapCharRec(5,8,0,0,6,ch104data);
-
-/* char: 0x67 'g' */
-
-static final byte[] ch103data = {
-(byte) 0x70,(byte) 0x8,(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x98,(byte) 0x68,
-};
-
-static final BitmapCharRec ch103 = new BitmapCharRec(5,8,0,2,6,ch103data);
-
-/* char: 0x66 'f' */
-
-static final byte[] ch102data = {
-(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,(byte) 0x40,(byte) 0x30,
-};
-
-static final BitmapCharRec ch102 = new BitmapCharRec(4,8,0,0,4,ch102data);
-
-/* char: 0x65 'e' */
-
-static final byte[] ch101data = {
-(byte) 0x60,(byte) 0x90,(byte) 0x80,(byte) 0xf0,(byte) 0x90,(byte) 0x60,
-};
-
-static final BitmapCharRec ch101 = new BitmapCharRec(4,6,0,0,5,ch101data);
-
-/* char: 0x64 'd' */
-
-static final byte[] ch100data = {
-(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x98,(byte) 0x68,(byte) 0x8,(byte) 0x8,
-};
-
-static final BitmapCharRec ch100 = new BitmapCharRec(5,8,0,0,6,ch100data);
-
-/* char: 0x63 'c' */
-
-static final byte[] ch99data = {
-(byte) 0x60,(byte) 0x90,(byte) 0x80,(byte) 0x80,(byte) 0x90,(byte) 0x60,
-};
-
-static final BitmapCharRec ch99 = new BitmapCharRec(4,6,0,0,5,ch99data);
-
-/* char: 0x62 'b' */
-
-static final byte[] ch98data = {
-(byte) 0xb0,(byte) 0xc8,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch98 = new BitmapCharRec(5,8,0,0,6,ch98data);
-
-/* char: 0x61 'a' */
-
-static final byte[] ch97data = {
-(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x70,(byte) 0x10,(byte) 0xe0,
-};
-
-static final BitmapCharRec ch97 = new BitmapCharRec(5,6,0,0,5,ch97data);
-
-/* char: 0x60 '`' */
-
-static final byte[] ch96data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x40,
-};
-
-static final BitmapCharRec ch96 = new BitmapCharRec(2,3,0,-5,3,ch96data);
-
-/* char: 0x5f '_' */
-
-static final byte[] ch95data = {
-(byte) 0xfc,
-};
-
-static final BitmapCharRec ch95 = new BitmapCharRec(6,1,0,2,6,ch95data);
-
-/* char: 0x5e '^' */
-
-static final byte[] ch94data = {
-(byte) 0x88,(byte) 0x50,(byte) 0x50,(byte) 0x20,(byte) 0x20,
-};
-
-static final BitmapCharRec ch94 = new BitmapCharRec(5,5,0,-3,6,ch94data);
-
-/* char: 0x5d ']' */
-
-static final byte[] ch93data = {
-(byte) 0xc0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch93 = new BitmapCharRec(2,10,0,2,3,ch93data);
-
-/* char: 0x5c '\' */
-
-static final byte[] ch92data = {
-(byte) 0x20,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch92 = new BitmapCharRec(3,8,0,0,3,ch92data);
-
-/* char: 0x5b '[' */
-
-static final byte[] ch91data = {
-(byte) 0xc0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch91 = new BitmapCharRec(2,10,-1,2,3,ch91data);
-
-/* char: 0x5a 'Z' */
-
-static final byte[] ch90data = {
-(byte) 0xf8,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch90 = new BitmapCharRec(5,8,-1,0,7,ch90data);
-
-/* char: 0x59 'Y' */
-
-static final byte[] ch89data = {
-(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x28,(byte) 0x44,(byte) 0x44,(byte) 0x82,
-};
-
-static final BitmapCharRec ch89 = new BitmapCharRec(7,8,0,0,7,ch89data);
-
-/* char: 0x58 'X' */
-
-static final byte[] ch88data = {
-(byte) 0x88,(byte) 0x88,(byte) 0x50,(byte) 0x50,(byte) 0x20,(byte) 0x50,(byte) 0x88,(byte) 0x88,
-};
-
-static final BitmapCharRec ch88 = new BitmapCharRec(5,8,-1,0,7,ch88data);
-
-/* char: 0x57 'W' */
-
-static final byte[] ch87data = {
-(byte) 0x22,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0x55,(byte) 0x0,(byte) 0x49,(byte) 0x0,(byte) 0x49,(byte) 0x0,(byte) 0x88,(byte) 0x80,(byte) 0x88,(byte) 0x80,
-};
-
-static final BitmapCharRec ch87 = new BitmapCharRec(9,8,0,0,9,ch87data);
-
-/* char: 0x56 'V' */
-
-static final byte[] ch86data = {
-(byte) 0x10,(byte) 0x28,(byte) 0x28,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0x82,(byte) 0x82,
-};
-
-static final BitmapCharRec ch86 = new BitmapCharRec(7,8,0,0,7,ch86data);
-
-/* char: 0x55 'U' */
-
-static final byte[] ch85data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,
-};
-
-static final BitmapCharRec ch85 = new BitmapCharRec(6,8,-1,0,8,ch85data);
-
-/* char: 0x54 'T' */
-
-static final byte[] ch84data = {
-(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch84 = new BitmapCharRec(5,8,0,0,5,ch84data);
-
-/* char: 0x53 'S' */
-
-static final byte[] ch83data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x8,(byte) 0x70,(byte) 0x80,(byte) 0x88,(byte) 0x70,
-};
-
-static final BitmapCharRec ch83 = new BitmapCharRec(5,8,-1,0,7,ch83data);
-
-/* char: 0x52 'R' */
-
-static final byte[] ch82data = {
-(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xf0,(byte) 0x88,(byte) 0x88,(byte) 0xf0,
-};
-
-static final BitmapCharRec ch82 = new BitmapCharRec(5,8,-1,0,7,ch82data);
-
-/* char: 0x51 'Q' */
-
-static final byte[] ch81data = {
-(byte) 0x2,(byte) 0x7c,(byte) 0x8c,(byte) 0x94,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,
-};
-
-static final BitmapCharRec ch81 = new BitmapCharRec(7,9,-1,1,8,ch81data);
-
-/* char: 0x50 'P' */
-
-static final byte[] ch80data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf0,(byte) 0x88,(byte) 0x88,(byte) 0xf0,
-};
-
-static final BitmapCharRec ch80 = new BitmapCharRec(5,8,-1,0,7,ch80data);
-
-/* char: 0x4f 'O' */
-
-static final byte[] ch79data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x78,
-};
-
-static final BitmapCharRec ch79 = new BitmapCharRec(6,8,-1,0,8,ch79data);
-
-/* char: 0x4e 'N' */
-
-static final byte[] ch78data = {
-(byte) 0x8c,(byte) 0x8c,(byte) 0x94,(byte) 0x94,(byte) 0xa4,(byte) 0xa4,(byte) 0xc4,(byte) 0xc4,
-};
-
-static final BitmapCharRec ch78 = new BitmapCharRec(6,8,-1,0,8,ch78data);
-
-/* char: 0x4d 'M' */
-
-static final byte[] ch77data = {
-(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0xaa,(byte) 0xaa,(byte) 0xc6,(byte) 0xc6,(byte) 0x82,
-};
-
-static final BitmapCharRec ch77 = new BitmapCharRec(7,8,-1,0,9,ch77data);
-
-/* char: 0x4c 'L' */
-
-static final byte[] ch76data = {
-(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch76 = new BitmapCharRec(4,8,-1,0,6,ch76data);
-
-/* char: 0x4b 'K' */
-
-static final byte[] ch75data = {
-(byte) 0x88,(byte) 0x88,(byte) 0x90,(byte) 0x90,(byte) 0xe0,(byte) 0xa0,(byte) 0x90,(byte) 0x88,
-};
-
-static final BitmapCharRec ch75 = new BitmapCharRec(5,8,-1,0,7,ch75data);
-
-/* char: 0x4a 'J' */
-
-static final byte[] ch74data = {
-(byte) 0x60,(byte) 0x90,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,
-};
-
-static final BitmapCharRec ch74 = new BitmapCharRec(4,8,0,0,5,ch74data);
-
-/* char: 0x49 'I' */
-
-static final byte[] ch73data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch73 = new BitmapCharRec(1,8,-1,0,3,ch73data);
-
-/* char: 0x48 'H' */
-
-static final byte[] ch72data = {
-(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xfc,(byte) 0x84,(byte) 0x84,(byte) 0x84,
-};
-
-static final BitmapCharRec ch72 = new BitmapCharRec(6,8,-1,0,8,ch72data);
-
-/* char: 0x47 'G' */
-
-static final byte[] ch71data = {
-(byte) 0x74,(byte) 0x8c,(byte) 0x84,(byte) 0x8c,(byte) 0x80,(byte) 0x80,(byte) 0x84,(byte) 0x78,
-};
-
-static final BitmapCharRec ch71 = new BitmapCharRec(6,8,-1,0,8,ch71data);
-
-/* char: 0x46 'F' */
-
-static final byte[] ch70data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch70 = new BitmapCharRec(5,8,-1,0,6,ch70data);
-
-/* char: 0x45 'E' */
-
-static final byte[] ch69data = {
-(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch69 = new BitmapCharRec(5,8,-1,0,7,ch69data);
-
-/* char: 0x44 'D' */
-
-static final byte[] ch68data = {
-(byte) 0xf0,(byte) 0x88,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x88,(byte) 0xf0,
-};
-
-static final BitmapCharRec ch68 = new BitmapCharRec(6,8,-1,0,8,ch68data);
-
-/* char: 0x43 'C' */
-
-static final byte[] ch67data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x84,(byte) 0x78,
-};
-
-static final BitmapCharRec ch67 = new BitmapCharRec(6,8,-1,0,8,ch67data);
-
-/* char: 0x42 'B' */
-
-static final byte[] ch66data = {
-(byte) 0xf0,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xf0,(byte) 0x88,(byte) 0x88,(byte) 0xf0,
-};
-
-static final BitmapCharRec ch66 = new BitmapCharRec(5,8,-1,0,7,ch66data);
-
-/* char: 0x41 'A' */
-
-static final byte[] ch65data = {
-(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x28,(byte) 0x28,(byte) 0x10,(byte) 0x10,
-};
-
-static final BitmapCharRec ch65 = new BitmapCharRec(7,8,0,0,7,ch65data);
-
-/* char: 0x40 '@' */
-
-static final byte[] ch64data = {
-(byte) 0x3e,(byte) 0x0,(byte) 0x40,(byte) 0x0,(byte) 0x9b,(byte) 0x0,(byte) 0xa4,(byte) 0x80,(byte) 0xa4,(byte) 0x80,(byte) 0xa2,(byte) 0x40,(byte) 0x92,(byte) 0x40,(byte) 0x4d,(byte) 0x40,
-(byte) 0x20,(byte) 0x80,(byte) 0x1f,(byte) 0x0,
-};
-
-static final BitmapCharRec ch64 = new BitmapCharRec(10,10,0,2,11,ch64data);
-
-/* char: 0x3f '?' */
-
-static final byte[] ch63data = {
-(byte) 0x40,(byte) 0x0,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x90,(byte) 0x60,
-};
-
-static final BitmapCharRec ch63 = new BitmapCharRec(4,8,-1,0,6,ch63data);
-
-/* char: 0x3e '>' */
-
-static final byte[] ch62data = {
-(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x40,(byte) 0x80,
-};
-
-static final BitmapCharRec ch62 = new BitmapCharRec(3,5,-1,-1,6,ch62data);
-
-/* char: 0x3d '=' */
-
-static final byte[] ch61data = {
-(byte) 0xf0,(byte) 0x0,(byte) 0xf0,
-};
-
-static final BitmapCharRec ch61 = new BitmapCharRec(4,3,0,-2,5,ch61data);
-
-/* char: 0x3c '<' */
-
-static final byte[] ch60data = {
-(byte) 0x20,(byte) 0x40,(byte) 0x80,(byte) 0x40,(byte) 0x20,
-};
-
-static final BitmapCharRec ch60 = new BitmapCharRec(3,5,-1,-1,6,ch60data);
-
-/* char: 0x3b ';' */
-
-static final byte[] ch59data = {
-(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch59 = new BitmapCharRec(2,8,0,2,3,ch59data);
-
-/* char: 0x3a ':' */
-
-static final byte[] ch58data = {
-(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x80,
-};
-
-static final BitmapCharRec ch58 = new BitmapCharRec(1,6,-1,0,3,ch58data);
-
-/* char: 0x39 '9' */
-
-static final byte[] ch57data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x8,(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x70,
-};
-
-static final BitmapCharRec ch57 = new BitmapCharRec(5,8,0,0,6,ch57data);
-
-/* char: 0x38 '8' */
-
-static final byte[] ch56data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x70,
-};
-
-static final BitmapCharRec ch56 = new BitmapCharRec(5,8,0,0,6,ch56data);
-
-/* char: 0x37 '7' */
-
-static final byte[] ch55data = {
-(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x10,(byte) 0x10,(byte) 0x8,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch55 = new BitmapCharRec(5,8,0,0,6,ch55data);
-
-/* char: 0x36 '6' */
-
-static final byte[] ch54data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,(byte) 0x80,(byte) 0x88,(byte) 0x70,
-};
-
-static final BitmapCharRec ch54 = new BitmapCharRec(5,8,0,0,6,ch54data);
-
-/* char: 0x35 '5' */
-
-static final byte[] ch53data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x8,(byte) 0x8,(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch53 = new BitmapCharRec(5,8,0,0,6,ch53data);
-
-/* char: 0x34 '4' */
-
-static final byte[] ch52data = {
-(byte) 0x10,(byte) 0x10,(byte) 0xf8,(byte) 0x90,(byte) 0x50,(byte) 0x50,(byte) 0x30,(byte) 0x10,
-};
-
-static final BitmapCharRec ch52 = new BitmapCharRec(5,8,0,0,6,ch52data);
-
-/* char: 0x33 '3' */
-
-static final byte[] ch51data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x8,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x88,(byte) 0x70,
-};
-
-static final BitmapCharRec ch51 = new BitmapCharRec(5,8,0,0,6,ch51data);
-
-/* char: 0x32 '2' */
-
-static final byte[] ch50data = {
-(byte) 0xf8,(byte) 0x80,(byte) 0x40,(byte) 0x30,(byte) 0x8,(byte) 0x8,(byte) 0x88,(byte) 0x70,
-};
-
-static final BitmapCharRec ch50 = new BitmapCharRec(5,8,0,0,6,ch50data);
-
-/* char: 0x31 '1' */
-
-static final byte[] ch49data = {
-(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch49 = new BitmapCharRec(2,8,-1,0,6,ch49data);
-
-/* char: 0x30 '0' */
-
-static final byte[] ch48data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,
-};
-
-static final BitmapCharRec ch48 = new BitmapCharRec(5,8,0,0,6,ch48data);
-
-/* char: 0x2f '/' */
-
-static final byte[] ch47data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,
-};
-
-static final BitmapCharRec ch47 = new BitmapCharRec(3,8,0,0,3,ch47data);
-
-/* char: 0x2e '.' */
-
-static final byte[] ch46data = {
-(byte) 0x80,
-};
-
-static final BitmapCharRec ch46 = new BitmapCharRec(1,1,-1,0,3,ch46data);
-
-/* char: 0x2d '-' */
-
-static final byte[] ch45data = {
-(byte) 0xf8,
-};
-
-static final BitmapCharRec ch45 = new BitmapCharRec(5,1,-1,-3,7,ch45data);
-
-/* char: 0x2c ',' */
-
-static final byte[] ch44data = {
-(byte) 0x80,(byte) 0x40,(byte) 0x40,
-};
-
-static final BitmapCharRec ch44 = new BitmapCharRec(2,3,0,2,3,ch44data);
-
-/* char: 0x2b '+' */
-
-static final byte[] ch43data = {
-(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x20,
-};
-
-static final BitmapCharRec ch43 = new BitmapCharRec(5,5,0,-1,6,ch43data);
-
-/* char: 0x2a '*' */
-
-static final byte[] ch42data = {
-(byte) 0xa0,(byte) 0x40,(byte) 0xa0,
-};
-
-static final BitmapCharRec ch42 = new BitmapCharRec(3,3,0,-5,4,ch42data);
-
-/* char: 0x29 ')' */
-
-static final byte[] ch41data = {
-(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,
-};
-
-static final BitmapCharRec ch41 = new BitmapCharRec(3,10,-1,2,4,ch41data);
-
-/* char: 0x28 '(' */
-
-static final byte[] ch40data = {
-(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,
-};
-
-static final BitmapCharRec ch40 = new BitmapCharRec(3,10,0,2,4,ch40data);
-
-/* char: 0x27 ''' */
-
-static final byte[] ch39data = {
-(byte) 0x80,(byte) 0x40,(byte) 0x40,
-};
-
-static final BitmapCharRec ch39 = new BitmapCharRec(2,3,-1,-5,3,ch39data);
-
-/* char: 0x26 '&' */
-
-static final byte[] ch38data = {
-(byte) 0x64,(byte) 0x98,(byte) 0x98,(byte) 0xa4,(byte) 0x60,(byte) 0x50,(byte) 0x50,(byte) 0x20,
-};
-
-static final BitmapCharRec ch38 = new BitmapCharRec(6,8,-1,0,8,ch38data);
-
-/* char: 0x25 '%' */
-
-static final byte[] ch37data = {
-(byte) 0x26,(byte) 0x29,(byte) 0x16,(byte) 0x10,(byte) 0x8,(byte) 0x68,(byte) 0x94,(byte) 0x64,
-};
-
-static final BitmapCharRec ch37 = new BitmapCharRec(8,8,0,0,9,ch37data);
-
-/* char: 0x24 '$' */
-
-static final byte[] ch36data = {
-(byte) 0x20,(byte) 0x70,(byte) 0xa8,(byte) 0x28,(byte) 0x70,(byte) 0xa0,(byte) 0xa8,(byte) 0x70,(byte) 0x20,
-};
-
-static final BitmapCharRec ch36 = new BitmapCharRec(5,9,0,1,6,ch36data);
-
-/* char: 0x23 '#' */
-
-static final byte[] ch35data = {
-(byte) 0x50,(byte) 0x50,(byte) 0xf8,(byte) 0x28,(byte) 0x7c,(byte) 0x28,(byte) 0x28,
-};
-
-static final BitmapCharRec ch35 = new BitmapCharRec(6,7,0,0,6,ch35data);
-
-/* char: 0x22 '"' */
-
-static final byte[] ch34data = {
-(byte) 0xa0,(byte) 0xa0,
-};
-
-static final BitmapCharRec ch34 = new BitmapCharRec(3,2,-1,-6,4,ch34data);
-
-/* char: 0x21 '!' */
-
-static final byte[] ch33data = {
-(byte) 0x80,(byte) 0x0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch33 = new BitmapCharRec(1,8,-1,0,3,ch33data);
-
-/* char: 0x20 ' ' */
-
-static final BitmapCharRec ch32 = new BitmapCharRec(0,0,0,0,3,null);
-
-static final BitmapCharRec[] chars = {
-ch32,
-ch33,
-ch34,
-ch35,
-ch36,
-ch37,
-ch38,
-ch39,
-ch40,
-ch41,
-ch42,
-ch43,
-ch44,
-ch45,
-ch46,
-ch47,
-ch48,
-ch49,
-ch50,
-ch51,
-ch52,
-ch53,
-ch54,
-ch55,
-ch56,
-ch57,
-ch58,
-ch59,
-ch60,
-ch61,
-ch62,
-ch63,
-ch64,
-ch65,
-ch66,
-ch67,
-ch68,
-ch69,
-ch70,
-ch71,
-ch72,
-ch73,
-ch74,
-ch75,
-ch76,
-ch77,
-ch78,
-ch79,
-ch80,
-ch81,
-ch82,
-ch83,
-ch84,
-ch85,
-ch86,
-ch87,
-ch88,
-ch89,
-ch90,
-ch91,
-ch92,
-ch93,
-ch94,
-ch95,
-ch96,
-ch97,
-ch98,
-ch99,
-ch100,
-ch101,
-ch102,
-ch103,
-ch104,
-ch105,
-ch106,
-ch107,
-ch108,
-ch109,
-ch110,
-ch111,
-ch112,
-ch113,
-ch114,
-ch115,
-ch116,
-ch117,
-ch118,
-ch119,
-ch120,
-ch121,
-ch122,
-ch123,
-ch124,
-ch125,
-ch126,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-ch160,
-ch161,
-ch162,
-ch163,
-ch164,
-ch165,
-ch166,
-ch167,
-ch168,
-ch169,
-ch170,
-ch171,
-ch172,
-ch173,
-ch174,
-ch175,
-ch176,
-ch177,
-ch178,
-ch179,
-ch180,
-ch181,
-ch182,
-ch183,
-ch184,
-ch185,
-ch186,
-ch187,
-ch188,
-ch189,
-ch190,
-ch191,
-ch192,
-ch193,
-ch194,
-ch195,
-ch196,
-ch197,
-ch198,
-ch199,
-ch200,
-ch201,
-ch202,
-ch203,
-ch204,
-ch205,
-ch206,
-ch207,
-ch208,
-ch209,
-ch210,
-ch211,
-ch212,
-ch213,
-ch214,
-ch215,
-ch216,
-ch217,
-ch218,
-ch219,
-ch220,
-ch221,
-ch222,
-ch223,
-ch224,
-ch225,
-ch226,
-ch227,
-ch228,
-ch229,
-ch230,
-ch231,
-ch232,
-ch233,
-ch234,
-ch235,
-ch236,
-ch237,
-ch238,
-ch239,
-ch240,
-ch241,
-ch242,
-ch243,
-ch244,
-ch245,
-ch246,
-ch247,
-ch248,
-ch249,
-ch250,
-ch251,
-ch252,
-ch253,
-ch254,
-ch255,
-};
-
- public static final BitmapFontRec glutBitmapHelvetica10 = new BitmapFontRec("-adobe-helvetica-medium-r-normal--10-100-75-75-p-56-iso8859-1",
- 224,
- 32,
- chars);
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/gl2/GLUTBitmapHelvetica12.java b/src/jogl/classes/com/sun/opengl/util/gl2/GLUTBitmapHelvetica12.java
deleted file mode 100644
index b73c82fa9..000000000
--- a/src/jogl/classes/com/sun/opengl/util/gl2/GLUTBitmapHelvetica12.java
+++ /dev/null
@@ -1,1808 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.util.gl2;
-
-class GLUTBitmapHelvetica12 {
-
-/* GENERATED FILE -- DO NOT MODIFY */
-
-/* char: 0xff */
-
-static final byte[] ch255data = {
-(byte) 0xc0,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x30,(byte) 0x50,(byte) 0x50,(byte) 0x48,(byte) 0x88,(byte) 0x88,(byte) 0x0,(byte) 0x50,
-};
-
-static final BitmapCharRec ch255 = new BitmapCharRec(5,12,-1,3,7,ch255data);
-
-/* char: 0xfe */
-
-static final byte[] ch254data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xb0,(byte) 0xc8,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch254 = new BitmapCharRec(5,12,-1,3,7,ch254data);
-
-/* char: 0xfd */
-
-static final byte[] ch253data = {
-(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x50,(byte) 0x50,(byte) 0x90,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x0,(byte) 0x20,(byte) 0x10,
-};
-
-static final BitmapCharRec ch253 = new BitmapCharRec(5,13,-1,3,7,ch253data);
-
-/* char: 0xfc */
-
-static final byte[] ch252data = {
-(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x0,(byte) 0x50,
-};
-
-static final BitmapCharRec ch252 = new BitmapCharRec(5,9,-1,0,7,ch252data);
-
-/* char: 0xfb */
-
-static final byte[] ch251data = {
-(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x0,(byte) 0x50,(byte) 0x20,
-};
-
-static final BitmapCharRec ch251 = new BitmapCharRec(5,10,-1,0,7,ch251data);
-
-/* char: 0xfa */
-
-static final byte[] ch250data = {
-(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x0,(byte) 0x20,(byte) 0x10,
-};
-
-static final BitmapCharRec ch250 = new BitmapCharRec(5,10,-1,0,7,ch250data);
-
-/* char: 0xf9 */
-
-static final byte[] ch249data = {
-(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x0,(byte) 0x20,(byte) 0x40,
-};
-
-static final BitmapCharRec ch249 = new BitmapCharRec(5,10,-1,0,7,ch249data);
-
-/* char: 0xf8 */
-
-static final byte[] ch248data = {
-(byte) 0xb8,(byte) 0x44,(byte) 0x64,(byte) 0x54,(byte) 0x4c,(byte) 0x44,(byte) 0x3a,
-};
-
-static final BitmapCharRec ch248 = new BitmapCharRec(7,7,0,0,7,ch248data);
-
-/* char: 0xf7 */
-
-static final byte[] ch247data = {
-(byte) 0x20,(byte) 0x0,(byte) 0xf8,(byte) 0x0,(byte) 0x20,
-};
-
-static final BitmapCharRec ch247 = new BitmapCharRec(5,5,-1,-1,7,ch247data);
-
-/* char: 0xf6 */
-
-static final byte[] ch246data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x50,
-};
-
-static final BitmapCharRec ch246 = new BitmapCharRec(5,9,-1,0,7,ch246data);
-
-/* char: 0xf5 */
-
-static final byte[] ch245data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x50,(byte) 0x28,
-};
-
-static final BitmapCharRec ch245 = new BitmapCharRec(5,10,-1,0,7,ch245data);
-
-/* char: 0xf4 */
-
-static final byte[] ch244data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x50,(byte) 0x20,
-};
-
-static final BitmapCharRec ch244 = new BitmapCharRec(5,10,-1,0,7,ch244data);
-
-/* char: 0xf3 */
-
-static final byte[] ch243data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x20,(byte) 0x10,
-};
-
-static final BitmapCharRec ch243 = new BitmapCharRec(5,10,-1,0,7,ch243data);
-
-/* char: 0xf2 */
-
-static final byte[] ch242data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x20,(byte) 0x40,
-};
-
-static final BitmapCharRec ch242 = new BitmapCharRec(5,10,-1,0,7,ch242data);
-
-/* char: 0xf1 */
-
-static final byte[] ch241data = {
-(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,(byte) 0x0,(byte) 0x50,(byte) 0x28,
-};
-
-static final BitmapCharRec ch241 = new BitmapCharRec(5,10,-1,0,7,ch241data);
-
-/* char: 0xf0 */
-
-static final byte[] ch240data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x78,(byte) 0x8,(byte) 0x50,(byte) 0x30,(byte) 0x68,
-};
-
-static final BitmapCharRec ch240 = new BitmapCharRec(5,10,-1,0,7,ch240data);
-
-/* char: 0xef */
-
-static final byte[] ch239data = {
-(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0xa0,
-};
-
-static final BitmapCharRec ch239 = new BitmapCharRec(3,9,0,0,3,ch239data);
-
-/* char: 0xee */
-
-static final byte[] ch238data = {
-(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0xa0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch238 = new BitmapCharRec(3,10,0,0,3,ch238data);
-
-/* char: 0xed */
-
-static final byte[] ch237data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,(byte) 0x40,
-};
-
-static final BitmapCharRec ch237 = new BitmapCharRec(2,10,-1,0,3,ch237data);
-
-/* char: 0xec */
-
-static final byte[] ch236data = {
-(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0x40,(byte) 0x80,
-};
-
-static final BitmapCharRec ch236 = new BitmapCharRec(2,10,0,0,3,ch236data);
-
-/* char: 0xeb */
-
-static final byte[] ch235data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x80,(byte) 0xf8,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x50,
-};
-
-static final BitmapCharRec ch235 = new BitmapCharRec(5,9,-1,0,7,ch235data);
-
-/* char: 0xea */
-
-static final byte[] ch234data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x80,(byte) 0xf8,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x50,(byte) 0x20,
-};
-
-static final BitmapCharRec ch234 = new BitmapCharRec(5,10,-1,0,7,ch234data);
-
-/* char: 0xe9 */
-
-static final byte[] ch233data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x80,(byte) 0xf8,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x20,(byte) 0x10,
-};
-
-static final BitmapCharRec ch233 = new BitmapCharRec(5,10,-1,0,7,ch233data);
-
-/* char: 0xe8 */
-
-static final byte[] ch232data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x80,(byte) 0xf8,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x20,(byte) 0x40,
-};
-
-static final BitmapCharRec ch232 = new BitmapCharRec(5,10,-1,0,7,ch232data);
-
-/* char: 0xe7 */
-
-static final byte[] ch231data = {
-(byte) 0x60,(byte) 0x10,(byte) 0x20,(byte) 0x70,(byte) 0x88,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x88,(byte) 0x70,
-};
-
-static final BitmapCharRec ch231 = new BitmapCharRec(5,10,-1,3,7,ch231data);
-
-/* char: 0xe6 */
-
-static final byte[] ch230data = {
-(byte) 0x77,(byte) 0x0,(byte) 0x88,(byte) 0x80,(byte) 0x88,(byte) 0x0,(byte) 0x7f,(byte) 0x80,(byte) 0x8,(byte) 0x80,(byte) 0x88,(byte) 0x80,(byte) 0x77,(byte) 0x0,
-};
-
-static final BitmapCharRec ch230 = new BitmapCharRec(9,7,-1,0,11,ch230data);
-
-/* char: 0xe5 */
-
-static final byte[] ch229data = {
-(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x78,(byte) 0x8,(byte) 0x88,(byte) 0x70,(byte) 0x30,(byte) 0x48,(byte) 0x30,
-};
-
-static final BitmapCharRec ch229 = new BitmapCharRec(6,10,-1,0,7,ch229data);
-
-/* char: 0xe4 */
-
-static final byte[] ch228data = {
-(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x78,(byte) 0x8,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x50,
-};
-
-static final BitmapCharRec ch228 = new BitmapCharRec(6,9,-1,0,7,ch228data);
-
-/* char: 0xe3 */
-
-static final byte[] ch227data = {
-(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x78,(byte) 0x8,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x50,(byte) 0x28,
-};
-
-static final BitmapCharRec ch227 = new BitmapCharRec(6,10,-1,0,7,ch227data);
-
-/* char: 0xe2 */
-
-static final byte[] ch226data = {
-(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x78,(byte) 0x8,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x50,(byte) 0x20,
-};
-
-static final BitmapCharRec ch226 = new BitmapCharRec(6,10,-1,0,7,ch226data);
-
-/* char: 0xe1 */
-
-static final byte[] ch225data = {
-(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x78,(byte) 0x8,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x20,(byte) 0x10,
-};
-
-static final BitmapCharRec ch225 = new BitmapCharRec(6,10,-1,0,7,ch225data);
-
-/* char: 0xe0 */
-
-static final byte[] ch224data = {
-(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x78,(byte) 0x8,(byte) 0x88,(byte) 0x70,(byte) 0x0,(byte) 0x10,(byte) 0x20,
-};
-
-static final BitmapCharRec ch224 = new BitmapCharRec(6,10,-1,0,7,ch224data);
-
-/* char: 0xdf */
-
-static final byte[] ch223data = {
-(byte) 0xb0,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xb0,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,
-};
-
-static final BitmapCharRec ch223 = new BitmapCharRec(5,9,-1,0,7,ch223data);
-
-/* char: 0xde */
-
-static final byte[] ch222data = {
-(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xf8,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch222 = new BitmapCharRec(6,9,-1,0,8,ch222data);
-
-/* char: 0xdd */
-
-static final byte[] ch221data = {
-(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x44,(byte) 0x44,(byte) 0x82,(byte) 0x82,(byte) 0x0,(byte) 0x10,(byte) 0x8,
-};
-
-static final BitmapCharRec ch221 = new BitmapCharRec(7,12,-1,0,9,ch221data);
-
-/* char: 0xdc */
-
-static final byte[] ch220data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x48,
-};
-
-static final BitmapCharRec ch220 = new BitmapCharRec(6,11,-1,0,8,ch220data);
-
-/* char: 0xdb */
-
-static final byte[] ch219data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x28,(byte) 0x10,
-};
-
-static final BitmapCharRec ch219 = new BitmapCharRec(6,12,-1,0,8,ch219data);
-
-/* char: 0xda */
-
-static final byte[] ch218data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x10,(byte) 0x8,
-};
-
-static final BitmapCharRec ch218 = new BitmapCharRec(6,12,-1,0,8,ch218data);
-
-/* char: 0xd9 */
-
-static final byte[] ch217data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x0,(byte) 0x10,(byte) 0x20,
-};
-
-static final BitmapCharRec ch217 = new BitmapCharRec(6,12,-1,0,8,ch217data);
-
-/* char: 0xd8 */
-
-static final byte[] ch216data = {
-(byte) 0x80,(byte) 0x0,(byte) 0x5e,(byte) 0x0,(byte) 0x21,(byte) 0x0,(byte) 0x50,(byte) 0x80,(byte) 0x48,(byte) 0x80,(byte) 0x44,(byte) 0x80,(byte) 0x44,(byte) 0x80,(byte) 0x42,(byte) 0x80,
-(byte) 0x21,(byte) 0x0,(byte) 0x1e,(byte) 0x80,(byte) 0x0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch216 = new BitmapCharRec(10,11,0,1,10,ch216data);
-
-/* char: 0xd7 */
-
-static final byte[] ch215data = {
-(byte) 0x88,(byte) 0x50,(byte) 0x20,(byte) 0x50,(byte) 0x88,
-};
-
-static final BitmapCharRec ch215 = new BitmapCharRec(5,5,-1,-1,7,ch215data);
-
-/* char: 0xd6 */
-
-static final byte[] ch214data = {
-(byte) 0x3c,(byte) 0x42,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x42,(byte) 0x3c,(byte) 0x0,(byte) 0x24,
-};
-
-static final BitmapCharRec ch214 = new BitmapCharRec(8,11,-1,0,10,ch214data);
-
-/* char: 0xd5 */
-
-static final byte[] ch213data = {
-(byte) 0x3c,(byte) 0x42,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x42,(byte) 0x3c,(byte) 0x0,(byte) 0x28,(byte) 0x14,
-};
-
-static final BitmapCharRec ch213 = new BitmapCharRec(8,12,-1,0,10,ch213data);
-
-/* char: 0xd4 */
-
-static final byte[] ch212data = {
-(byte) 0x3c,(byte) 0x42,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x42,(byte) 0x3c,(byte) 0x0,(byte) 0x14,(byte) 0x8,
-};
-
-static final BitmapCharRec ch212 = new BitmapCharRec(8,12,-1,0,10,ch212data);
-
-/* char: 0xd3 */
-
-static final byte[] ch211data = {
-(byte) 0x3c,(byte) 0x42,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x42,(byte) 0x3c,(byte) 0x0,(byte) 0x8,(byte) 0x4,
-};
-
-static final BitmapCharRec ch211 = new BitmapCharRec(8,12,-1,0,10,ch211data);
-
-/* char: 0xd2 */
-
-static final byte[] ch210data = {
-(byte) 0x3c,(byte) 0x42,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x42,(byte) 0x3c,(byte) 0x0,(byte) 0x8,(byte) 0x10,
-};
-
-static final BitmapCharRec ch210 = new BitmapCharRec(8,12,-1,0,10,ch210data);
-
-/* char: 0xd1 */
-
-static final byte[] ch209data = {
-(byte) 0x82,(byte) 0x86,(byte) 0x8a,(byte) 0x8a,(byte) 0x92,(byte) 0xa2,(byte) 0xa2,(byte) 0xc2,(byte) 0x82,(byte) 0x0,(byte) 0x28,(byte) 0x14,
-};
-
-static final BitmapCharRec ch209 = new BitmapCharRec(7,12,-1,0,9,ch209data);
-
-/* char: 0xd0 */
-
-static final byte[] ch208data = {
-(byte) 0x7c,(byte) 0x42,(byte) 0x41,(byte) 0x41,(byte) 0xf1,(byte) 0x41,(byte) 0x41,(byte) 0x42,(byte) 0x7c,
-};
-
-static final BitmapCharRec ch208 = new BitmapCharRec(8,9,0,0,9,ch208data);
-
-/* char: 0xcf */
-
-static final byte[] ch207data = {
-(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0xa0,
-};
-
-static final BitmapCharRec ch207 = new BitmapCharRec(3,11,0,0,3,ch207data);
-
-/* char: 0xce */
-
-static final byte[] ch206data = {
-(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0xa0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch206 = new BitmapCharRec(3,12,0,0,3,ch206data);
-
-/* char: 0xcd */
-
-static final byte[] ch205data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,(byte) 0x40,
-};
-
-static final BitmapCharRec ch205 = new BitmapCharRec(2,12,-1,0,3,ch205data);
-
-/* char: 0xcc */
-
-static final byte[] ch204data = {
-(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0x40,(byte) 0x80,
-};
-
-static final BitmapCharRec ch204 = new BitmapCharRec(2,12,0,0,3,ch204data);
-
-/* char: 0xcb */
-
-static final byte[] ch203data = {
-(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x0,(byte) 0x28,
-};
-
-static final BitmapCharRec ch203 = new BitmapCharRec(6,11,-1,0,8,ch203data);
-
-/* char: 0xca */
-
-static final byte[] ch202data = {
-(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x0,(byte) 0x28,(byte) 0x10,
-};
-
-static final BitmapCharRec ch202 = new BitmapCharRec(6,12,-1,0,8,ch202data);
-
-/* char: 0xc9 */
-
-static final byte[] ch201data = {
-(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x0,(byte) 0x10,(byte) 0x8,
-};
-
-static final BitmapCharRec ch201 = new BitmapCharRec(6,12,-1,0,8,ch201data);
-
-/* char: 0xc8 */
-
-static final byte[] ch200data = {
-(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x0,(byte) 0x10,(byte) 0x20,
-};
-
-static final BitmapCharRec ch200 = new BitmapCharRec(6,12,-1,0,8,ch200data);
-
-/* char: 0xc7 */
-
-static final byte[] ch199data = {
-(byte) 0x30,(byte) 0x8,(byte) 0x8,(byte) 0x3c,(byte) 0x42,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x42,(byte) 0x3c,
-};
-
-static final BitmapCharRec ch199 = new BitmapCharRec(7,12,-1,3,9,ch199data);
-
-/* char: 0xc6 */
-
-static final byte[] ch198data = {
-(byte) 0x8f,(byte) 0x80,(byte) 0x88,(byte) 0x0,(byte) 0x88,(byte) 0x0,(byte) 0x78,(byte) 0x0,(byte) 0x4f,(byte) 0x80,(byte) 0x48,(byte) 0x0,(byte) 0x28,(byte) 0x0,(byte) 0x28,(byte) 0x0,
-(byte) 0x1f,(byte) 0x80,
-};
-
-static final BitmapCharRec ch198 = new BitmapCharRec(9,9,-1,0,11,ch198data);
-
-/* char: 0xc5 */
-
-static final byte[] ch197data = {
-(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x10,
-};
-
-static final BitmapCharRec ch197 = new BitmapCharRec(7,12,-1,0,9,ch197data);
-
-/* char: 0xc4 */
-
-static final byte[] ch196data = {
-(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x0,(byte) 0x28,
-};
-
-static final BitmapCharRec ch196 = new BitmapCharRec(7,11,-1,0,9,ch196data);
-
-/* char: 0xc3 */
-
-static final byte[] ch195data = {
-(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x0,(byte) 0x28,(byte) 0x14,
-};
-
-static final BitmapCharRec ch195 = new BitmapCharRec(7,12,-1,0,9,ch195data);
-
-/* char: 0xc2 */
-
-static final byte[] ch194data = {
-(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x0,(byte) 0x28,(byte) 0x10,
-};
-
-static final BitmapCharRec ch194 = new BitmapCharRec(7,12,-1,0,9,ch194data);
-
-/* char: 0xc1 */
-
-static final byte[] ch193data = {
-(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x0,(byte) 0x10,(byte) 0x8,
-};
-
-static final BitmapCharRec ch193 = new BitmapCharRec(7,12,-1,0,9,ch193data);
-
-/* char: 0xc0 */
-
-static final byte[] ch192data = {
-(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x10,(byte) 0x0,(byte) 0x10,(byte) 0x20,
-};
-
-static final BitmapCharRec ch192 = new BitmapCharRec(7,12,-1,0,9,ch192data);
-
-/* char: 0xbf */
-
-static final byte[] ch191data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x0,(byte) 0x20,
-};
-
-static final BitmapCharRec ch191 = new BitmapCharRec(5,9,-1,3,7,ch191data);
-
-/* char: 0xbe */
-
-static final byte[] ch190data = {
-(byte) 0x21,(byte) 0x0,(byte) 0x17,(byte) 0x80,(byte) 0x15,(byte) 0x0,(byte) 0xb,(byte) 0x0,(byte) 0xc9,(byte) 0x0,(byte) 0x24,(byte) 0x0,(byte) 0x44,(byte) 0x0,(byte) 0x22,(byte) 0x0,
-(byte) 0xe1,(byte) 0x0,
-};
-
-static final BitmapCharRec ch190 = new BitmapCharRec(9,9,0,0,10,ch190data);
-
-/* char: 0xbd */
-
-static final byte[] ch189data = {
-(byte) 0x47,(byte) 0x80,(byte) 0x22,(byte) 0x0,(byte) 0x11,(byte) 0x0,(byte) 0x14,(byte) 0x80,(byte) 0x4b,(byte) 0x0,(byte) 0x48,(byte) 0x0,(byte) 0x44,(byte) 0x0,(byte) 0xc2,(byte) 0x0,
-(byte) 0x41,(byte) 0x0,
-};
-
-static final BitmapCharRec ch189 = new BitmapCharRec(9,9,0,0,10,ch189data);
-
-/* char: 0xbc */
-
-static final byte[] ch188data = {
-(byte) 0x41,(byte) 0x0,(byte) 0x27,(byte) 0x80,(byte) 0x15,(byte) 0x0,(byte) 0x13,(byte) 0x0,(byte) 0x49,(byte) 0x0,(byte) 0x44,(byte) 0x0,(byte) 0x44,(byte) 0x0,(byte) 0xc2,(byte) 0x0,
-(byte) 0x41,(byte) 0x0,
-};
-
-static final BitmapCharRec ch188 = new BitmapCharRec(9,9,0,0,10,ch188data);
-
-/* char: 0xbb */
-
-static final byte[] ch187data = {
-(byte) 0xa0,(byte) 0x50,(byte) 0x28,(byte) 0x50,(byte) 0xa0,
-};
-
-static final BitmapCharRec ch187 = new BitmapCharRec(5,5,-1,-1,7,ch187data);
-
-/* char: 0xba */
-
-static final byte[] ch186data = {
-(byte) 0xe0,(byte) 0x0,(byte) 0xe0,(byte) 0xa0,(byte) 0xe0,
-};
-
-static final BitmapCharRec ch186 = new BitmapCharRec(3,5,-1,-4,5,ch186data);
-
-/* char: 0xb9 */
-
-static final byte[] ch185data = {
-(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch185 = new BitmapCharRec(2,5,-1,-3,4,ch185data);
-
-/* char: 0xb8 */
-
-static final byte[] ch184data = {
-(byte) 0xc0,(byte) 0x20,(byte) 0x20,(byte) 0x40,
-};
-
-static final BitmapCharRec ch184 = new BitmapCharRec(3,4,0,3,3,ch184data);
-
-/* char: 0xb7 */
-
-static final byte[] ch183data = {
-(byte) 0x80,
-};
-
-static final BitmapCharRec ch183 = new BitmapCharRec(1,1,-1,-3,3,ch183data);
-
-/* char: 0xb6 */
-
-static final byte[] ch182data = {
-(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x68,(byte) 0xe8,(byte) 0xe8,(byte) 0xe8,(byte) 0x68,(byte) 0x3c,
-};
-
-static final BitmapCharRec ch182 = new BitmapCharRec(6,12,0,3,7,ch182data);
-
-/* char: 0xb5 */
-
-static final byte[] ch181data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xe8,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,
-};
-
-static final BitmapCharRec ch181 = new BitmapCharRec(5,10,-1,3,7,ch181data);
-
-/* char: 0xb4 */
-
-static final byte[] ch180data = {
-(byte) 0x80,(byte) 0x40,
-};
-
-static final BitmapCharRec ch180 = new BitmapCharRec(2,2,0,-8,2,ch180data);
-
-/* char: 0xb3 */
-
-static final byte[] ch179data = {
-(byte) 0xc0,(byte) 0x20,(byte) 0x40,(byte) 0x20,(byte) 0xe0,
-};
-
-static final BitmapCharRec ch179 = new BitmapCharRec(3,5,0,-3,4,ch179data);
-
-/* char: 0xb2 */
-
-static final byte[] ch178data = {
-(byte) 0xf0,(byte) 0x40,(byte) 0x20,(byte) 0x90,(byte) 0x60,
-};
-
-static final BitmapCharRec ch178 = new BitmapCharRec(4,5,0,-3,4,ch178data);
-
-/* char: 0xb1 */
-
-static final byte[] ch177data = {
-(byte) 0xf8,(byte) 0x0,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x20,
-};
-
-static final BitmapCharRec ch177 = new BitmapCharRec(5,7,-1,0,7,ch177data);
-
-/* char: 0xb0 */
-
-static final byte[] ch176data = {
-(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x60,
-};
-
-static final BitmapCharRec ch176 = new BitmapCharRec(4,4,0,-4,5,ch176data);
-
-/* char: 0xaf */
-
-static final byte[] ch175data = {
-(byte) 0xf0,
-};
-
-static final BitmapCharRec ch175 = new BitmapCharRec(4,1,0,-8,4,ch175data);
-
-/* char: 0xae */
-
-static final byte[] ch174data = {
-(byte) 0x3e,(byte) 0x0,(byte) 0x41,(byte) 0x0,(byte) 0x94,(byte) 0x80,(byte) 0x94,(byte) 0x80,(byte) 0x98,(byte) 0x80,(byte) 0x94,(byte) 0x80,(byte) 0x9c,(byte) 0x80,(byte) 0x41,(byte) 0x0,
-(byte) 0x3e,(byte) 0x0,
-};
-
-static final BitmapCharRec ch174 = new BitmapCharRec(9,9,-1,0,11,ch174data);
-
-/* char: 0xad */
-
-static final byte[] ch173data = {
-(byte) 0xf0,
-};
-
-static final BitmapCharRec ch173 = new BitmapCharRec(4,1,0,-3,5,ch173data);
-
-/* char: 0xac */
-
-static final byte[] ch172data = {
-(byte) 0x4,(byte) 0x4,(byte) 0x4,(byte) 0xfc,
-};
-
-static final BitmapCharRec ch172 = new BitmapCharRec(6,4,-1,-2,8,ch172data);
-
-/* char: 0xab */
-
-static final byte[] ch171data = {
-(byte) 0x28,(byte) 0x50,(byte) 0xa0,(byte) 0x50,(byte) 0x28,
-};
-
-static final BitmapCharRec ch171 = new BitmapCharRec(5,5,-1,-1,7,ch171data);
-
-/* char: 0xaa */
-
-static final byte[] ch170data = {
-(byte) 0xe0,(byte) 0x0,(byte) 0xa0,(byte) 0x20,(byte) 0xe0,
-};
-
-static final BitmapCharRec ch170 = new BitmapCharRec(3,5,-1,-4,5,ch170data);
-
-/* char: 0xa9 */
-
-static final byte[] ch169data = {
-(byte) 0x3e,(byte) 0x0,(byte) 0x41,(byte) 0x0,(byte) 0x9c,(byte) 0x80,(byte) 0xa2,(byte) 0x80,(byte) 0xa0,(byte) 0x80,(byte) 0xa2,(byte) 0x80,(byte) 0x9c,(byte) 0x80,(byte) 0x41,(byte) 0x0,
-(byte) 0x3e,(byte) 0x0,
-};
-
-static final BitmapCharRec ch169 = new BitmapCharRec(9,9,-1,0,11,ch169data);
-
-/* char: 0xa8 */
-
-static final byte[] ch168data = {
-(byte) 0xa0,
-};
-
-static final BitmapCharRec ch168 = new BitmapCharRec(3,1,0,-8,3,ch168data);
-
-/* char: 0xa7 */
-
-static final byte[] ch167data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x8,(byte) 0x30,(byte) 0x48,(byte) 0x88,(byte) 0x88,(byte) 0x90,(byte) 0x60,(byte) 0x80,(byte) 0x88,(byte) 0x70,
-};
-
-static final BitmapCharRec ch167 = new BitmapCharRec(5,12,0,3,6,ch167data);
-
-/* char: 0xa6 */
-
-static final byte[] ch166data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch166 = new BitmapCharRec(1,11,-1,2,3,ch166data);
-
-/* char: 0xa5 */
-
-static final byte[] ch165data = {
-(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x50,(byte) 0x88,(byte) 0x88,
-};
-
-static final BitmapCharRec ch165 = new BitmapCharRec(5,9,-1,0,7,ch165data);
-
-/* char: 0xa4 */
-
-static final byte[] ch164data = {
-(byte) 0x84,(byte) 0x78,(byte) 0x48,(byte) 0x48,(byte) 0x78,(byte) 0x84,
-};
-
-static final BitmapCharRec ch164 = new BitmapCharRec(6,6,0,-1,7,ch164data);
-
-/* char: 0xa3 */
-
-static final byte[] ch163data = {
-(byte) 0xb0,(byte) 0x48,(byte) 0x20,(byte) 0x20,(byte) 0xf0,(byte) 0x40,(byte) 0x40,(byte) 0x48,(byte) 0x30,
-};
-
-static final BitmapCharRec ch163 = new BitmapCharRec(5,9,-1,0,7,ch163data);
-
-/* char: 0xa2 */
-
-static final byte[] ch162data = {
-(byte) 0x40,(byte) 0x70,(byte) 0xc8,(byte) 0xa0,(byte) 0xa0,(byte) 0xa0,(byte) 0xa8,(byte) 0x70,(byte) 0x10,
-};
-
-static final BitmapCharRec ch162 = new BitmapCharRec(5,9,-1,1,7,ch162data);
-
-/* char: 0xa1 */
-
-static final byte[] ch161data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,
-};
-
-static final BitmapCharRec ch161 = new BitmapCharRec(1,10,-1,3,3,ch161data);
-
-/* char: 0xa0 */
-
-static final BitmapCharRec ch160 = new BitmapCharRec(0,0,0,0,4,null);
-
-/* char: 0x7e '~' */
-
-static final byte[] ch126data = {
-(byte) 0x98,(byte) 0x64,
-};
-
-static final BitmapCharRec ch126 = new BitmapCharRec(6,2,0,-3,7,ch126data);
-
-/* char: 0x7d '}' */
-
-static final byte[] ch125data = {
-(byte) 0xc0,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x10,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch125 = new BitmapCharRec(4,12,0,3,4,ch125data);
-
-/* char: 0x7c '|' */
-
-static final byte[] ch124data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch124 = new BitmapCharRec(1,12,-1,3,3,ch124data);
-
-/* char: 0x7b '{' */
-
-static final byte[] ch123data = {
-(byte) 0x30,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x30,
-};
-
-static final BitmapCharRec ch123 = new BitmapCharRec(4,12,0,3,4,ch123data);
-
-/* char: 0x7a 'z' */
-
-static final byte[] ch122data = {
-(byte) 0xf0,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0xf0,
-};
-
-static final BitmapCharRec ch122 = new BitmapCharRec(4,7,-1,0,6,ch122data);
-
-/* char: 0x79 'y' */
-
-static final byte[] ch121data = {
-(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x50,(byte) 0x50,(byte) 0x90,(byte) 0x88,(byte) 0x88,(byte) 0x88,
-};
-
-static final BitmapCharRec ch121 = new BitmapCharRec(5,10,-1,3,7,ch121data);
-
-/* char: 0x78 'x' */
-
-static final byte[] ch120data = {
-(byte) 0x84,(byte) 0x84,(byte) 0x48,(byte) 0x30,(byte) 0x30,(byte) 0x48,(byte) 0x84,
-};
-
-static final BitmapCharRec ch120 = new BitmapCharRec(6,7,0,0,6,ch120data);
-
-/* char: 0x77 'w' */
-
-static final byte[] ch119data = {
-(byte) 0x22,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0x55,(byte) 0x0,(byte) 0x49,(byte) 0x0,(byte) 0x49,(byte) 0x0,(byte) 0x88,(byte) 0x80,(byte) 0x88,(byte) 0x80,
-};
-
-static final BitmapCharRec ch119 = new BitmapCharRec(9,7,0,0,9,ch119data);
-
-/* char: 0x76 'v' */
-
-static final byte[] ch118data = {
-(byte) 0x20,(byte) 0x20,(byte) 0x50,(byte) 0x50,(byte) 0x88,(byte) 0x88,(byte) 0x88,
-};
-
-static final BitmapCharRec ch118 = new BitmapCharRec(5,7,-1,0,7,ch118data);
-
-/* char: 0x75 'u' */
-
-static final byte[] ch117data = {
-(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,
-};
-
-static final BitmapCharRec ch117 = new BitmapCharRec(5,7,-1,0,7,ch117data);
-
-/* char: 0x74 't' */
-
-static final byte[] ch116data = {
-(byte) 0x60,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,(byte) 0x40,(byte) 0x40,
-};
-
-static final BitmapCharRec ch116 = new BitmapCharRec(3,9,0,0,3,ch116data);
-
-/* char: 0x73 's' */
-
-static final byte[] ch115data = {
-(byte) 0x60,(byte) 0x90,(byte) 0x10,(byte) 0x60,(byte) 0x80,(byte) 0x90,(byte) 0x60,
-};
-
-static final BitmapCharRec ch115 = new BitmapCharRec(4,7,-1,0,6,ch115data);
-
-/* char: 0x72 'r' */
-
-static final byte[] ch114data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xc0,(byte) 0xa0,
-};
-
-static final BitmapCharRec ch114 = new BitmapCharRec(3,7,-1,0,4,ch114data);
-
-/* char: 0x71 'q' */
-
-static final byte[] ch113data = {
-(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x98,(byte) 0x68,
-};
-
-static final BitmapCharRec ch113 = new BitmapCharRec(5,10,-1,3,7,ch113data);
-
-/* char: 0x70 'p' */
-
-static final byte[] ch112data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xb0,(byte) 0xc8,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,
-};
-
-static final BitmapCharRec ch112 = new BitmapCharRec(5,10,-1,3,7,ch112data);
-
-/* char: 0x6f 'o' */
-
-static final byte[] ch111data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,
-};
-
-static final BitmapCharRec ch111 = new BitmapCharRec(5,7,-1,0,7,ch111data);
-
-/* char: 0x6e 'n' */
-
-static final byte[] ch110data = {
-(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,
-};
-
-static final BitmapCharRec ch110 = new BitmapCharRec(5,7,-1,0,7,ch110data);
-
-/* char: 0x6d 'm' */
-
-static final byte[] ch109data = {
-(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0xda,(byte) 0xa4,
-};
-
-static final BitmapCharRec ch109 = new BitmapCharRec(7,7,-1,0,9,ch109data);
-
-/* char: 0x6c 'l' */
-
-static final byte[] ch108data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch108 = new BitmapCharRec(1,9,-1,0,3,ch108data);
-
-/* char: 0x6b 'k' */
-
-static final byte[] ch107data = {
-(byte) 0x88,(byte) 0x90,(byte) 0xa0,(byte) 0xc0,(byte) 0xc0,(byte) 0xa0,(byte) 0x90,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch107 = new BitmapCharRec(5,9,-1,0,6,ch107data);
-
-/* char: 0x6a 'j' */
-
-static final byte[] ch106data = {
-(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch106 = new BitmapCharRec(2,12,0,3,3,ch106data);
-
-/* char: 0x69 'i' */
-
-static final byte[] ch105data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,
-};
-
-static final BitmapCharRec ch105 = new BitmapCharRec(1,9,-1,0,3,ch105data);
-
-/* char: 0x68 'h' */
-
-static final byte[] ch104data = {
-(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch104 = new BitmapCharRec(5,9,-1,0,7,ch104data);
-
-/* char: 0x67 'g' */
-
-static final byte[] ch103data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x8,(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x98,(byte) 0x68,
-};
-
-static final BitmapCharRec ch103 = new BitmapCharRec(5,10,-1,3,7,ch103data);
-
-/* char: 0x66 'f' */
-
-static final byte[] ch102data = {
-(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,(byte) 0x40,(byte) 0x30,
-};
-
-static final BitmapCharRec ch102 = new BitmapCharRec(4,9,0,0,3,ch102data);
-
-/* char: 0x65 'e' */
-
-static final byte[] ch101data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x80,(byte) 0xf8,(byte) 0x88,(byte) 0x88,(byte) 0x70,
-};
-
-static final BitmapCharRec ch101 = new BitmapCharRec(5,7,-1,0,7,ch101data);
-
-/* char: 0x64 'd' */
-
-static final byte[] ch100data = {
-(byte) 0x68,(byte) 0x98,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x98,(byte) 0x68,(byte) 0x8,(byte) 0x8,
-};
-
-static final BitmapCharRec ch100 = new BitmapCharRec(5,9,-1,0,7,ch100data);
-
-/* char: 0x63 'c' */
-
-static final byte[] ch99data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x88,(byte) 0x70,
-};
-
-static final BitmapCharRec ch99 = new BitmapCharRec(5,7,-1,0,7,ch99data);
-
-/* char: 0x62 'b' */
-
-static final byte[] ch98data = {
-(byte) 0xb0,(byte) 0xc8,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch98 = new BitmapCharRec(5,9,-1,0,7,ch98data);
-
-/* char: 0x61 'a' */
-
-static final byte[] ch97data = {
-(byte) 0x74,(byte) 0x88,(byte) 0x88,(byte) 0x78,(byte) 0x8,(byte) 0x88,(byte) 0x70,
-};
-
-static final BitmapCharRec ch97 = new BitmapCharRec(6,7,-1,0,7,ch97data);
-
-/* char: 0x60 '`' */
-
-static final byte[] ch96data = {
-(byte) 0xc0,(byte) 0x80,(byte) 0x40,
-};
-
-static final BitmapCharRec ch96 = new BitmapCharRec(2,3,0,-6,3,ch96data);
-
-/* char: 0x5f '_' */
-
-static final byte[] ch95data = {
-(byte) 0xfe,
-};
-
-static final BitmapCharRec ch95 = new BitmapCharRec(7,1,0,2,7,ch95data);
-
-/* char: 0x5e '^' */
-
-static final byte[] ch94data = {
-(byte) 0x88,(byte) 0x50,(byte) 0x20,
-};
-
-static final BitmapCharRec ch94 = new BitmapCharRec(5,3,0,-5,6,ch94data);
-
-/* char: 0x5d ']' */
-
-static final byte[] ch93data = {
-(byte) 0xc0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch93 = new BitmapCharRec(2,12,0,3,3,ch93data);
-
-/* char: 0x5c '\' */
-
-static final byte[] ch92data = {
-(byte) 0x10,(byte) 0x10,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch92 = new BitmapCharRec(4,9,0,0,4,ch92data);
-
-/* char: 0x5b '[' */
-
-static final byte[] ch91data = {
-(byte) 0xc0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch91 = new BitmapCharRec(2,12,-1,3,3,ch91data);
-
-/* char: 0x5a 'Z' */
-
-static final byte[] ch90data = {
-(byte) 0xfe,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0x4,(byte) 0x2,(byte) 0xfe,
-};
-
-static final BitmapCharRec ch90 = new BitmapCharRec(7,9,-1,0,9,ch90data);
-
-/* char: 0x59 'Y' */
-
-static final byte[] ch89data = {
-(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x44,(byte) 0x44,(byte) 0x82,(byte) 0x82,
-};
-
-static final BitmapCharRec ch89 = new BitmapCharRec(7,9,-1,0,9,ch89data);
-
-/* char: 0x58 'X' */
-
-static final byte[] ch88data = {
-(byte) 0x82,(byte) 0x44,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x28,(byte) 0x44,(byte) 0x44,(byte) 0x82,
-};
-
-static final BitmapCharRec ch88 = new BitmapCharRec(7,9,-1,0,9,ch88data);
-
-/* char: 0x57 'W' */
-
-static final byte[] ch87data = {
-(byte) 0x22,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0x55,(byte) 0x0,(byte) 0x55,(byte) 0x0,(byte) 0x49,(byte) 0x0,(byte) 0x88,(byte) 0x80,(byte) 0x88,(byte) 0x80,
-(byte) 0x88,(byte) 0x80,
-};
-
-static final BitmapCharRec ch87 = new BitmapCharRec(9,9,-1,0,11,ch87data);
-
-/* char: 0x56 'V' */
-
-static final byte[] ch86data = {
-(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x28,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0x82,(byte) 0x82,
-};
-
-static final BitmapCharRec ch86 = new BitmapCharRec(7,9,-1,0,9,ch86data);
-
-/* char: 0x55 'U' */
-
-static final byte[] ch85data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x84,
-};
-
-static final BitmapCharRec ch85 = new BitmapCharRec(6,9,-1,0,8,ch85data);
-
-/* char: 0x54 'T' */
-
-static final byte[] ch84data = {
-(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0xfe,
-};
-
-static final BitmapCharRec ch84 = new BitmapCharRec(7,9,0,0,7,ch84data);
-
-/* char: 0x53 'S' */
-
-static final byte[] ch83data = {
-(byte) 0x78,(byte) 0x84,(byte) 0x84,(byte) 0x4,(byte) 0x18,(byte) 0x60,(byte) 0x80,(byte) 0x84,(byte) 0x78,
-};
-
-static final BitmapCharRec ch83 = new BitmapCharRec(6,9,-1,0,8,ch83data);
-
-/* char: 0x52 'R' */
-
-static final byte[] ch82data = {
-(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0x88,(byte) 0xf8,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch82 = new BitmapCharRec(6,9,-1,0,8,ch82data);
-
-/* char: 0x51 'Q' */
-
-static final byte[] ch81data = {
-(byte) 0x3d,(byte) 0x42,(byte) 0x85,(byte) 0x89,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x42,(byte) 0x3c,
-};
-
-static final BitmapCharRec ch81 = new BitmapCharRec(8,9,-1,0,10,ch81data);
-
-/* char: 0x50 'P' */
-
-static final byte[] ch80data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch80 = new BitmapCharRec(6,9,-1,0,8,ch80data);
-
-/* char: 0x4f 'O' */
-
-static final byte[] ch79data = {
-(byte) 0x3c,(byte) 0x42,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x81,(byte) 0x42,(byte) 0x3c,
-};
-
-static final BitmapCharRec ch79 = new BitmapCharRec(8,9,-1,0,10,ch79data);
-
-/* char: 0x4e 'N' */
-
-static final byte[] ch78data = {
-(byte) 0x82,(byte) 0x86,(byte) 0x8a,(byte) 0x8a,(byte) 0x92,(byte) 0xa2,(byte) 0xa2,(byte) 0xc2,(byte) 0x82,
-};
-
-static final BitmapCharRec ch78 = new BitmapCharRec(7,9,-1,0,9,ch78data);
-
-/* char: 0x4d 'M' */
-
-static final byte[] ch77data = {
-(byte) 0x88,(byte) 0x80,(byte) 0x88,(byte) 0x80,(byte) 0x94,(byte) 0x80,(byte) 0x94,(byte) 0x80,(byte) 0xa2,(byte) 0x80,(byte) 0xa2,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,
-(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch77 = new BitmapCharRec(9,9,-1,0,11,ch77data);
-
-/* char: 0x4c 'L' */
-
-static final byte[] ch76data = {
-(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch76 = new BitmapCharRec(5,9,-1,0,7,ch76data);
-
-/* char: 0x4b 'K' */
-
-static final byte[] ch75data = {
-(byte) 0x82,(byte) 0x84,(byte) 0x88,(byte) 0x90,(byte) 0xe0,(byte) 0xa0,(byte) 0x90,(byte) 0x88,(byte) 0x84,
-};
-
-static final BitmapCharRec ch75 = new BitmapCharRec(7,9,-1,0,8,ch75data);
-
-/* char: 0x4a 'J' */
-
-static final byte[] ch74data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,(byte) 0x8,
-};
-
-static final BitmapCharRec ch74 = new BitmapCharRec(5,9,-1,0,7,ch74data);
-
-/* char: 0x49 'I' */
-
-static final byte[] ch73data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch73 = new BitmapCharRec(1,9,-1,0,3,ch73data);
-
-/* char: 0x48 'H' */
-
-static final byte[] ch72data = {
-(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0xfe,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,
-};
-
-static final BitmapCharRec ch72 = new BitmapCharRec(7,9,-1,0,9,ch72data);
-
-/* char: 0x47 'G' */
-
-static final byte[] ch71data = {
-(byte) 0x3a,(byte) 0x46,(byte) 0x82,(byte) 0x82,(byte) 0x8e,(byte) 0x80,(byte) 0x80,(byte) 0x42,(byte) 0x3c,
-};
-
-static final BitmapCharRec ch71 = new BitmapCharRec(7,9,-1,0,9,ch71data);
-
-/* char: 0x46 'F' */
-
-static final byte[] ch70data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,
-};
-
-static final BitmapCharRec ch70 = new BitmapCharRec(6,9,-1,0,8,ch70data);
-
-/* char: 0x45 'E' */
-
-static final byte[] ch69data = {
-(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xfc,
-};
-
-static final BitmapCharRec ch69 = new BitmapCharRec(6,9,-1,0,8,ch69data);
-
-/* char: 0x44 'D' */
-
-static final byte[] ch68data = {
-(byte) 0xf8,(byte) 0x84,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x84,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch68 = new BitmapCharRec(7,9,-1,0,9,ch68data);
-
-/* char: 0x43 'C' */
-
-static final byte[] ch67data = {
-(byte) 0x3c,(byte) 0x42,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x42,(byte) 0x3c,
-};
-
-static final BitmapCharRec ch67 = new BitmapCharRec(7,9,-1,0,9,ch67data);
-
-/* char: 0x42 'B' */
-
-static final byte[] ch66data = {
-(byte) 0xf8,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xf8,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch66 = new BitmapCharRec(6,9,-1,0,8,ch66data);
-
-/* char: 0x41 'A' */
-
-static final byte[] ch65data = {
-(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x7c,(byte) 0x44,(byte) 0x44,(byte) 0x28,(byte) 0x28,(byte) 0x10,
-};
-
-static final BitmapCharRec ch65 = new BitmapCharRec(7,9,-1,0,9,ch65data);
-
-/* char: 0x40 '@' */
-
-static final byte[] ch64data = {
-(byte) 0x3e,(byte) 0x0,(byte) 0x40,(byte) 0x0,(byte) 0x9b,(byte) 0x0,(byte) 0xa6,(byte) 0x80,(byte) 0xa2,(byte) 0x40,(byte) 0xa2,(byte) 0x40,(byte) 0x92,(byte) 0x40,(byte) 0x4d,(byte) 0x40,
-(byte) 0x60,(byte) 0x80,(byte) 0x1f,(byte) 0x0,
-};
-
-static final BitmapCharRec ch64 = new BitmapCharRec(10,10,-1,1,12,ch64data);
-
-/* char: 0x3f '?' */
-
-static final byte[] ch63data = {
-(byte) 0x20,(byte) 0x0,(byte) 0x20,(byte) 0x20,(byte) 0x10,(byte) 0x10,(byte) 0x88,(byte) 0x88,(byte) 0x70,
-};
-
-static final BitmapCharRec ch63 = new BitmapCharRec(5,9,-1,0,7,ch63data);
-
-/* char: 0x3e '>' */
-
-static final byte[] ch62data = {
-(byte) 0xc0,(byte) 0x30,(byte) 0xc,(byte) 0x30,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch62 = new BitmapCharRec(6,5,-1,-1,7,ch62data);
-
-/* char: 0x3d '=' */
-
-static final byte[] ch61data = {
-(byte) 0xf8,(byte) 0x0,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch61 = new BitmapCharRec(5,3,-1,-2,7,ch61data);
-
-/* char: 0x3c '<' */
-
-static final byte[] ch60data = {
-(byte) 0xc,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc,
-};
-
-static final BitmapCharRec ch60 = new BitmapCharRec(6,5,0,-1,7,ch60data);
-
-/* char: 0x3b ';' */
-
-static final byte[] ch59data = {
-(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch59 = new BitmapCharRec(2,8,0,2,3,ch59data);
-
-/* char: 0x3a ':' */
-
-static final byte[] ch58data = {
-(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x80,
-};
-
-static final BitmapCharRec ch58 = new BitmapCharRec(1,6,-1,0,3,ch58data);
-
-/* char: 0x39 '9' */
-
-static final byte[] ch57data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x8,(byte) 0x8,(byte) 0x78,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,
-};
-
-static final BitmapCharRec ch57 = new BitmapCharRec(5,9,-1,0,7,ch57data);
-
-/* char: 0x38 '8' */
-
-static final byte[] ch56data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x70,
-};
-
-static final BitmapCharRec ch56 = new BitmapCharRec(5,9,-1,0,7,ch56data);
-
-/* char: 0x37 '7' */
-
-static final byte[] ch55data = {
-(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x10,(byte) 0x10,(byte) 0x8,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch55 = new BitmapCharRec(5,9,-1,0,7,ch55data);
-
-/* char: 0x36 '6' */
-
-static final byte[] ch54data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0xc8,(byte) 0xb0,(byte) 0x80,(byte) 0x88,(byte) 0x70,
-};
-
-static final BitmapCharRec ch54 = new BitmapCharRec(5,9,-1,0,7,ch54data);
-
-/* char: 0x35 '5' */
-
-static final byte[] ch53data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x8,(byte) 0x8,(byte) 0xf0,(byte) 0x80,(byte) 0x80,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch53 = new BitmapCharRec(5,9,-1,0,7,ch53data);
-
-/* char: 0x34 '4' */
-
-static final byte[] ch52data = {
-(byte) 0x8,(byte) 0x8,(byte) 0xfc,(byte) 0x88,(byte) 0x48,(byte) 0x28,(byte) 0x28,(byte) 0x18,(byte) 0x8,
-};
-
-static final BitmapCharRec ch52 = new BitmapCharRec(6,9,0,0,7,ch52data);
-
-/* char: 0x33 '3' */
-
-static final byte[] ch51data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x8,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x88,(byte) 0x70,
-};
-
-static final BitmapCharRec ch51 = new BitmapCharRec(5,9,-1,0,7,ch51data);
-
-/* char: 0x32 '2' */
-
-static final byte[] ch50data = {
-(byte) 0xf8,(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x8,(byte) 0x88,(byte) 0x70,
-};
-
-static final BitmapCharRec ch50 = new BitmapCharRec(5,9,-1,0,7,ch50data);
-
-/* char: 0x31 '1' */
-
-static final byte[] ch49data = {
-(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xe0,(byte) 0x20,
-};
-
-static final BitmapCharRec ch49 = new BitmapCharRec(3,9,-1,0,7,ch49data);
-
-/* char: 0x30 '0' */
-
-static final byte[] ch48data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x88,(byte) 0x70,
-};
-
-static final BitmapCharRec ch48 = new BitmapCharRec(5,9,-1,0,7,ch48data);
-
-/* char: 0x2f '/' */
-
-static final byte[] ch47data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x10,(byte) 0x10,
-};
-
-static final BitmapCharRec ch47 = new BitmapCharRec(4,9,0,0,4,ch47data);
-
-/* char: 0x2e '.' */
-
-static final byte[] ch46data = {
-(byte) 0x80,
-};
-
-static final BitmapCharRec ch46 = new BitmapCharRec(1,1,-1,0,3,ch46data);
-
-/* char: 0x2d '-' */
-
-static final byte[] ch45data = {
-(byte) 0xf8,
-};
-
-static final BitmapCharRec ch45 = new BitmapCharRec(5,1,-1,-3,8,ch45data);
-
-/* char: 0x2c ',' */
-
-static final byte[] ch44data = {
-(byte) 0x80,(byte) 0x40,(byte) 0x40,
-};
-
-static final BitmapCharRec ch44 = new BitmapCharRec(2,3,-1,2,4,ch44data);
-
-/* char: 0x2b '+' */
-
-static final byte[] ch43data = {
-(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x20,
-};
-
-static final BitmapCharRec ch43 = new BitmapCharRec(5,5,-1,-1,7,ch43data);
-
-/* char: 0x2a '*' */
-
-static final byte[] ch42data = {
-(byte) 0xa0,(byte) 0x40,(byte) 0xa0,
-};
-
-static final BitmapCharRec ch42 = new BitmapCharRec(3,3,-1,-6,5,ch42data);
-
-/* char: 0x29 ')' */
-
-static final byte[] ch41data = {
-(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,
-};
-
-static final BitmapCharRec ch41 = new BitmapCharRec(3,12,0,3,4,ch41data);
-
-/* char: 0x28 '(' */
-
-static final byte[] ch40data = {
-(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,
-};
-
-static final BitmapCharRec ch40 = new BitmapCharRec(3,12,-1,3,4,ch40data);
-
-/* char: 0x27 ''' */
-
-static final byte[] ch39data = {
-(byte) 0x80,(byte) 0x40,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch39 = new BitmapCharRec(2,3,-1,-6,3,ch39data);
-
-/* char: 0x26 '&' */
-
-static final byte[] ch38data = {
-(byte) 0x72,(byte) 0x8c,(byte) 0x84,(byte) 0x8a,(byte) 0x50,(byte) 0x30,(byte) 0x48,(byte) 0x48,(byte) 0x30,
-};
-
-static final BitmapCharRec ch38 = new BitmapCharRec(7,9,-1,0,9,ch38data);
-
-/* char: 0x25 '%' */
-
-static final byte[] ch37data = {
-(byte) 0x23,(byte) 0x0,(byte) 0x14,(byte) 0x80,(byte) 0x14,(byte) 0x80,(byte) 0x13,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x68,(byte) 0x0,(byte) 0x94,(byte) 0x0,(byte) 0x94,(byte) 0x0,
-(byte) 0x62,(byte) 0x0,
-};
-
-static final BitmapCharRec ch37 = new BitmapCharRec(9,9,-1,0,11,ch37data);
-
-/* char: 0x24 '$' */
-
-static final byte[] ch36data = {
-(byte) 0x20,(byte) 0x70,(byte) 0xa8,(byte) 0xa8,(byte) 0x28,(byte) 0x70,(byte) 0xa0,(byte) 0xa8,(byte) 0x70,(byte) 0x20,
-};
-
-static final BitmapCharRec ch36 = new BitmapCharRec(5,10,-1,1,7,ch36data);
-
-/* char: 0x23 '#' */
-
-static final byte[] ch35data = {
-(byte) 0x50,(byte) 0x50,(byte) 0x50,(byte) 0xfc,(byte) 0x28,(byte) 0xfc,(byte) 0x28,(byte) 0x28,
-};
-
-static final BitmapCharRec ch35 = new BitmapCharRec(6,8,0,0,7,ch35data);
-
-/* char: 0x22 '"' */
-
-static final byte[] ch34data = {
-(byte) 0xa0,(byte) 0xa0,(byte) 0xa0,
-};
-
-static final BitmapCharRec ch34 = new BitmapCharRec(3,3,-1,-6,5,ch34data);
-
-/* char: 0x21 '!' */
-
-static final byte[] ch33data = {
-(byte) 0x80,(byte) 0x0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch33 = new BitmapCharRec(1,9,-1,0,3,ch33data);
-
-/* char: 0x20 ' ' */
-
-static final BitmapCharRec ch32 = new BitmapCharRec(0,0,0,0,4,null);
-
-static final BitmapCharRec[] chars = {
-ch32,
-ch33,
-ch34,
-ch35,
-ch36,
-ch37,
-ch38,
-ch39,
-ch40,
-ch41,
-ch42,
-ch43,
-ch44,
-ch45,
-ch46,
-ch47,
-ch48,
-ch49,
-ch50,
-ch51,
-ch52,
-ch53,
-ch54,
-ch55,
-ch56,
-ch57,
-ch58,
-ch59,
-ch60,
-ch61,
-ch62,
-ch63,
-ch64,
-ch65,
-ch66,
-ch67,
-ch68,
-ch69,
-ch70,
-ch71,
-ch72,
-ch73,
-ch74,
-ch75,
-ch76,
-ch77,
-ch78,
-ch79,
-ch80,
-ch81,
-ch82,
-ch83,
-ch84,
-ch85,
-ch86,
-ch87,
-ch88,
-ch89,
-ch90,
-ch91,
-ch92,
-ch93,
-ch94,
-ch95,
-ch96,
-ch97,
-ch98,
-ch99,
-ch100,
-ch101,
-ch102,
-ch103,
-ch104,
-ch105,
-ch106,
-ch107,
-ch108,
-ch109,
-ch110,
-ch111,
-ch112,
-ch113,
-ch114,
-ch115,
-ch116,
-ch117,
-ch118,
-ch119,
-ch120,
-ch121,
-ch122,
-ch123,
-ch124,
-ch125,
-ch126,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-ch160,
-ch161,
-ch162,
-ch163,
-ch164,
-ch165,
-ch166,
-ch167,
-ch168,
-ch169,
-ch170,
-ch171,
-ch172,
-ch173,
-ch174,
-ch175,
-ch176,
-ch177,
-ch178,
-ch179,
-ch180,
-ch181,
-ch182,
-ch183,
-ch184,
-ch185,
-ch186,
-ch187,
-ch188,
-ch189,
-ch190,
-ch191,
-ch192,
-ch193,
-ch194,
-ch195,
-ch196,
-ch197,
-ch198,
-ch199,
-ch200,
-ch201,
-ch202,
-ch203,
-ch204,
-ch205,
-ch206,
-ch207,
-ch208,
-ch209,
-ch210,
-ch211,
-ch212,
-ch213,
-ch214,
-ch215,
-ch216,
-ch217,
-ch218,
-ch219,
-ch220,
-ch221,
-ch222,
-ch223,
-ch224,
-ch225,
-ch226,
-ch227,
-ch228,
-ch229,
-ch230,
-ch231,
-ch232,
-ch233,
-ch234,
-ch235,
-ch236,
-ch237,
-ch238,
-ch239,
-ch240,
-ch241,
-ch242,
-ch243,
-ch244,
-ch245,
-ch246,
-ch247,
-ch248,
-ch249,
-ch250,
-ch251,
-ch252,
-ch253,
-ch254,
-ch255,
-};
-
- public static final BitmapFontRec glutBitmapHelvetica12 = new BitmapFontRec("-adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1",
- 224,
- 32,
- chars);
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/gl2/GLUTBitmapHelvetica18.java b/src/jogl/classes/com/sun/opengl/util/gl2/GLUTBitmapHelvetica18.java
deleted file mode 100644
index cf34a6d25..000000000
--- a/src/jogl/classes/com/sun/opengl/util/gl2/GLUTBitmapHelvetica18.java
+++ /dev/null
@@ -1,1917 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.util.gl2;
-
-class GLUTBitmapHelvetica18 {
-
-/* GENERATED FILE -- DO NOT MODIFY */
-
-/* char: 0xff */
-
-static final byte[] ch255data = {
-(byte) 0x70,(byte) 0x70,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x3c,(byte) 0x24,(byte) 0x66,(byte) 0x66,(byte) 0x66,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0x0,(byte) 0x66,
-(byte) 0x66,
-};
-
-static final BitmapCharRec ch255 = new BitmapCharRec(8,17,-1,4,10,ch255data);
-
-/* char: 0xfe */
-
-static final byte[] ch254data = {
-(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xde,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xe3,(byte) 0x0,(byte) 0xc1,(byte) 0x80,
-(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xe3,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xde,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,
-(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,
-};
-
-static final BitmapCharRec ch254 = new BitmapCharRec(9,18,-1,4,11,ch254data);
-
-/* char: 0xfd */
-
-static final byte[] ch253data = {
-(byte) 0x70,(byte) 0x70,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x3c,(byte) 0x24,(byte) 0x66,(byte) 0x66,(byte) 0x66,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0x0,(byte) 0x18,
-(byte) 0xc,(byte) 0x6,
-};
-
-static final BitmapCharRec ch253 = new BitmapCharRec(8,18,-1,4,10,ch253data);
-
-/* char: 0xfc */
-
-static final byte[] ch252data = {
-(byte) 0x73,(byte) 0xfb,(byte) 0xc7,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0x0,(byte) 0x66,(byte) 0x66,
-};
-
-static final BitmapCharRec ch252 = new BitmapCharRec(8,13,-1,0,10,ch252data);
-
-/* char: 0xfb */
-
-static final byte[] ch251data = {
-(byte) 0x73,(byte) 0xfb,(byte) 0xc7,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0x0,(byte) 0x66,(byte) 0x3c,(byte) 0x18,
-};
-
-static final BitmapCharRec ch251 = new BitmapCharRec(8,14,-1,0,10,ch251data);
-
-/* char: 0xfa */
-
-static final byte[] ch250data = {
-(byte) 0x73,(byte) 0xfb,(byte) 0xc7,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0x0,(byte) 0x18,(byte) 0xc,(byte) 0x6,
-};
-
-static final BitmapCharRec ch250 = new BitmapCharRec(8,14,-1,0,10,ch250data);
-
-/* char: 0xf9 */
-
-static final byte[] ch249data = {
-(byte) 0x73,(byte) 0xfb,(byte) 0xc7,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0x0,(byte) 0xc,(byte) 0x18,(byte) 0x30,
-};
-
-static final BitmapCharRec ch249 = new BitmapCharRec(8,14,-1,0,10,ch249data);
-
-/* char: 0xf8 */
-
-static final byte[] ch248data = {
-(byte) 0xce,(byte) 0x0,(byte) 0x7f,(byte) 0x80,(byte) 0x31,(byte) 0x80,(byte) 0x78,(byte) 0xc0,(byte) 0x6c,(byte) 0xc0,(byte) 0x66,(byte) 0xc0,(byte) 0x63,(byte) 0xc0,(byte) 0x31,(byte) 0x80,
-(byte) 0x3f,(byte) 0xc0,(byte) 0xe,(byte) 0x60,
-};
-
-static final BitmapCharRec ch248 = new BitmapCharRec(11,10,0,0,11,ch248data);
-
-/* char: 0xf7 */
-
-static final byte[] ch247data = {
-(byte) 0x18,(byte) 0x18,(byte) 0x0,(byte) 0xff,(byte) 0xff,(byte) 0x0,(byte) 0x18,(byte) 0x18,
-};
-
-static final BitmapCharRec ch247 = new BitmapCharRec(8,8,-1,-1,10,ch247data);
-
-/* char: 0xf6 */
-
-static final byte[] ch246data = {
-(byte) 0x3e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x63,(byte) 0x0,
-(byte) 0x7f,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x36,(byte) 0x0,(byte) 0x36,(byte) 0x0,
-};
-
-static final BitmapCharRec ch246 = new BitmapCharRec(9,13,-1,0,11,ch246data);
-
-/* char: 0xf5 */
-
-static final byte[] ch245data = {
-(byte) 0x3e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x63,(byte) 0x0,
-(byte) 0x7f,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x26,(byte) 0x0,(byte) 0x2d,(byte) 0x0,(byte) 0x19,(byte) 0x0,
-};
-
-static final BitmapCharRec ch245 = new BitmapCharRec(9,14,-1,0,11,ch245data);
-
-/* char: 0xf4 */
-
-static final byte[] ch244data = {
-(byte) 0x3e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x63,(byte) 0x0,
-(byte) 0x7f,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0xc,(byte) 0x0,
-};
-
-static final BitmapCharRec ch244 = new BitmapCharRec(9,14,-1,0,11,ch244data);
-
-/* char: 0xf3 */
-
-static final byte[] ch243data = {
-(byte) 0x3e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x63,(byte) 0x0,
-(byte) 0x7f,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x6,(byte) 0x0,
-};
-
-static final BitmapCharRec ch243 = new BitmapCharRec(9,14,-1,0,11,ch243data);
-
-/* char: 0xf2 */
-
-static final byte[] ch242data = {
-(byte) 0x3e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x63,(byte) 0x0,
-(byte) 0x7f,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x30,(byte) 0x0,
-};
-
-static final BitmapCharRec ch242 = new BitmapCharRec(9,14,-1,0,11,ch242data);
-
-/* char: 0xf1 */
-
-static final byte[] ch241data = {
-(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xe3,(byte) 0xdf,(byte) 0xce,(byte) 0x0,(byte) 0x4c,(byte) 0x5a,(byte) 0x32,
-};
-
-static final BitmapCharRec ch241 = new BitmapCharRec(8,14,-1,0,10,ch241data);
-
-/* char: 0xf0 */
-
-static final byte[] ch240data = {
-(byte) 0x3e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x63,(byte) 0x0,
-(byte) 0x7f,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x4c,(byte) 0x0,(byte) 0x38,(byte) 0x0,(byte) 0x36,(byte) 0x0,(byte) 0x60,(byte) 0x0,
-};
-
-static final BitmapCharRec ch240 = new BitmapCharRec(9,14,-1,0,11,ch240data);
-
-/* char: 0xef */
-
-static final byte[] ch239data = {
-(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x0,(byte) 0xd8,(byte) 0xd8,
-};
-
-static final BitmapCharRec ch239 = new BitmapCharRec(5,13,0,0,4,ch239data);
-
-/* char: 0xee */
-
-static final byte[] ch238data = {
-(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x0,(byte) 0xcc,(byte) 0x78,(byte) 0x30,
-};
-
-static final BitmapCharRec ch238 = new BitmapCharRec(6,14,1,0,4,ch238data);
-
-/* char: 0xed */
-
-static final byte[] ch237data = {
-(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x0,(byte) 0xc0,(byte) 0x60,(byte) 0x30,
-};
-
-static final BitmapCharRec ch237 = new BitmapCharRec(4,14,0,0,4,ch237data);
-
-/* char: 0xec */
-
-static final byte[] ch236data = {
-(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x0,(byte) 0x30,(byte) 0x60,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch236 = new BitmapCharRec(4,14,0,0,4,ch236data);
-
-/* char: 0xeb */
-
-static final byte[] ch235data = {
-(byte) 0x3c,(byte) 0x7f,(byte) 0xe3,(byte) 0xc0,(byte) 0xc0,(byte) 0xff,(byte) 0xc3,(byte) 0xc3,(byte) 0x7e,(byte) 0x3c,(byte) 0x0,(byte) 0x36,(byte) 0x36,
-};
-
-static final BitmapCharRec ch235 = new BitmapCharRec(8,13,-1,0,10,ch235data);
-
-/* char: 0xea */
-
-static final byte[] ch234data = {
-(byte) 0x3c,(byte) 0x7f,(byte) 0xe3,(byte) 0xc0,(byte) 0xc0,(byte) 0xff,(byte) 0xc3,(byte) 0xc3,(byte) 0x7e,(byte) 0x3c,(byte) 0x0,(byte) 0x66,(byte) 0x3c,(byte) 0x18,
-};
-
-static final BitmapCharRec ch234 = new BitmapCharRec(8,14,-1,0,10,ch234data);
-
-/* char: 0xe9 */
-
-static final byte[] ch233data = {
-(byte) 0x3c,(byte) 0x7f,(byte) 0xe3,(byte) 0xc0,(byte) 0xc0,(byte) 0xff,(byte) 0xc3,(byte) 0xc3,(byte) 0x7e,(byte) 0x3c,(byte) 0x0,(byte) 0x18,(byte) 0xc,(byte) 0x6,
-};
-
-static final BitmapCharRec ch233 = new BitmapCharRec(8,14,-1,0,10,ch233data);
-
-/* char: 0xe8 */
-
-static final byte[] ch232data = {
-(byte) 0x3c,(byte) 0x7f,(byte) 0xe3,(byte) 0xc0,(byte) 0xc0,(byte) 0xff,(byte) 0xc3,(byte) 0xc3,(byte) 0x7e,(byte) 0x3c,(byte) 0x0,(byte) 0x18,(byte) 0x30,(byte) 0x60,
-};
-
-static final BitmapCharRec ch232 = new BitmapCharRec(8,14,-1,0,10,ch232data);
-
-/* char: 0xe7 */
-
-static final byte[] ch231data = {
-(byte) 0x78,(byte) 0x6c,(byte) 0xc,(byte) 0x38,(byte) 0x3e,(byte) 0x7f,(byte) 0x63,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x63,(byte) 0x7f,(byte) 0x3e,
-};
-
-static final BitmapCharRec ch231 = new BitmapCharRec(8,14,-1,4,10,ch231data);
-
-/* char: 0xe6 */
-
-static final byte[] ch230data = {
-(byte) 0x75,(byte) 0xe0,(byte) 0xef,(byte) 0xf8,(byte) 0xc7,(byte) 0x18,(byte) 0xc6,(byte) 0x0,(byte) 0xe6,(byte) 0x0,(byte) 0x7f,(byte) 0xf8,(byte) 0xe,(byte) 0x18,(byte) 0xc6,(byte) 0x18,
-(byte) 0xef,(byte) 0xf0,(byte) 0x7d,(byte) 0xe0,
-};
-
-static final BitmapCharRec ch230 = new BitmapCharRec(13,10,-1,0,15,ch230data);
-
-/* char: 0xe5 */
-
-static final byte[] ch229data = {
-(byte) 0x76,(byte) 0xee,(byte) 0xc6,(byte) 0xc6,(byte) 0xe6,(byte) 0x7e,(byte) 0xe,(byte) 0xc6,(byte) 0xee,(byte) 0x7c,(byte) 0x38,(byte) 0x6c,(byte) 0x6c,(byte) 0x38,
-};
-
-static final BitmapCharRec ch229 = new BitmapCharRec(7,14,-1,0,9,ch229data);
-
-/* char: 0xe4 */
-
-static final byte[] ch228data = {
-(byte) 0x76,(byte) 0xee,(byte) 0xc6,(byte) 0xc6,(byte) 0xe6,(byte) 0x7e,(byte) 0xe,(byte) 0xc6,(byte) 0xee,(byte) 0x7c,(byte) 0x0,(byte) 0x6c,(byte) 0x6c,
-};
-
-static final BitmapCharRec ch228 = new BitmapCharRec(7,13,-1,0,9,ch228data);
-
-/* char: 0xe3 */
-
-static final byte[] ch227data = {
-(byte) 0x76,(byte) 0xee,(byte) 0xc6,(byte) 0xc6,(byte) 0xe6,(byte) 0x7e,(byte) 0xe,(byte) 0xc6,(byte) 0xee,(byte) 0x7c,(byte) 0x0,(byte) 0x4c,(byte) 0x5a,(byte) 0x32,
-};
-
-static final BitmapCharRec ch227 = new BitmapCharRec(7,14,-1,0,9,ch227data);
-
-/* char: 0xe2 */
-
-static final byte[] ch226data = {
-(byte) 0x76,(byte) 0xee,(byte) 0xc6,(byte) 0xc6,(byte) 0xe6,(byte) 0x7e,(byte) 0xe,(byte) 0xc6,(byte) 0xee,(byte) 0x7c,(byte) 0x0,(byte) 0x66,(byte) 0x3c,(byte) 0x18,
-};
-
-static final BitmapCharRec ch226 = new BitmapCharRec(7,14,-1,0,9,ch226data);
-
-/* char: 0xe1 */
-
-static final byte[] ch225data = {
-(byte) 0x76,(byte) 0xee,(byte) 0xc6,(byte) 0xc6,(byte) 0xe6,(byte) 0x7e,(byte) 0xe,(byte) 0xc6,(byte) 0xee,(byte) 0x7c,(byte) 0x0,(byte) 0x30,(byte) 0x18,(byte) 0xc,
-};
-
-static final BitmapCharRec ch225 = new BitmapCharRec(7,14,-1,0,9,ch225data);
-
-/* char: 0xe0 */
-
-static final byte[] ch224data = {
-(byte) 0x76,(byte) 0xee,(byte) 0xc6,(byte) 0xc6,(byte) 0xe6,(byte) 0x7e,(byte) 0xe,(byte) 0xc6,(byte) 0xee,(byte) 0x7c,(byte) 0x0,(byte) 0x18,(byte) 0x30,(byte) 0x60,
-};
-
-static final BitmapCharRec ch224 = new BitmapCharRec(7,14,-1,0,9,ch224data);
-
-/* char: 0xdf */
-
-static final byte[] ch223data = {
-(byte) 0xdc,(byte) 0xde,(byte) 0xc6,(byte) 0xc6,(byte) 0xc6,(byte) 0xc6,(byte) 0xdc,(byte) 0xdc,(byte) 0xc6,(byte) 0xc6,(byte) 0xc6,(byte) 0xc6,(byte) 0x7c,(byte) 0x38,
-};
-
-static final BitmapCharRec ch223 = new BitmapCharRec(7,14,-1,0,9,ch223data);
-
-/* char: 0xde */
-
-static final byte[] ch222data = {
-(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0xc1,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
-(byte) 0xc1,(byte) 0xc0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,
-};
-
-static final BitmapCharRec ch222 = new BitmapCharRec(10,14,-1,0,12,ch222data);
-
-/* char: 0xdd */
-
-static final byte[] ch221data = {
-(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x19,(byte) 0x80,
-(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0x0,(byte) 0x0,(byte) 0x6,(byte) 0x0,
-(byte) 0x3,(byte) 0x0,(byte) 0x1,(byte) 0x80,
-};
-
-static final BitmapCharRec ch221 = new BitmapCharRec(12,18,-1,0,14,ch221data);
-
-/* char: 0xdc */
-
-static final byte[] ch220data = {
-(byte) 0x1f,(byte) 0x0,(byte) 0x7f,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,
-(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0x0,(byte) 0x0,(byte) 0x19,(byte) 0x80,
-(byte) 0x19,(byte) 0x80,
-};
-
-static final BitmapCharRec ch220 = new BitmapCharRec(11,17,-1,0,13,ch220data);
-
-/* char: 0xdb */
-
-static final byte[] ch219data = {
-(byte) 0x1f,(byte) 0x0,(byte) 0x7f,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,
-(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0x0,(byte) 0x0,(byte) 0x19,(byte) 0x80,
-(byte) 0xf,(byte) 0x0,(byte) 0x6,(byte) 0x0,
-};
-
-static final BitmapCharRec ch219 = new BitmapCharRec(11,18,-1,0,13,ch219data);
-
-/* char: 0xda */
-
-static final byte[] ch218data = {
-(byte) 0x1f,(byte) 0x0,(byte) 0x7f,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,
-(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0x0,(byte) 0x0,(byte) 0xc,(byte) 0x0,
-(byte) 0x6,(byte) 0x0,(byte) 0x3,(byte) 0x0,
-};
-
-static final BitmapCharRec ch218 = new BitmapCharRec(11,18,-1,0,13,ch218data);
-
-/* char: 0xd9 */
-
-static final byte[] ch217data = {
-(byte) 0x1f,(byte) 0x0,(byte) 0x7f,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,
-(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0x0,(byte) 0x0,(byte) 0x6,(byte) 0x0,
-(byte) 0xc,(byte) 0x0,(byte) 0x18,(byte) 0x0,
-};
-
-static final BitmapCharRec ch217 = new BitmapCharRec(11,18,-1,0,13,ch217data);
-
-/* char: 0xd8 */
-
-static final byte[] ch216data = {
-(byte) 0xc7,(byte) 0xc0,(byte) 0xff,(byte) 0xf0,(byte) 0x78,(byte) 0x38,(byte) 0x38,(byte) 0x18,(byte) 0x6c,(byte) 0x1c,(byte) 0x6e,(byte) 0xc,(byte) 0x67,(byte) 0xc,(byte) 0x63,(byte) 0x8c,
-(byte) 0x61,(byte) 0xcc,(byte) 0x70,(byte) 0xdc,(byte) 0x30,(byte) 0x78,(byte) 0x38,(byte) 0x38,(byte) 0x1f,(byte) 0xfc,(byte) 0x7,(byte) 0xcc,
-};
-
-static final BitmapCharRec ch216 = new BitmapCharRec(14,14,0,0,15,ch216data);
-
-/* char: 0xd7 */
-
-static final byte[] ch215data = {
-(byte) 0xc0,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x33,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x61,(byte) 0x80,
-(byte) 0xc0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch215 = new BitmapCharRec(10,9,0,0,10,ch215data);
-
-/* char: 0xd6 */
-
-static final byte[] ch214data = {
-(byte) 0xf,(byte) 0x80,(byte) 0x3f,(byte) 0xe0,(byte) 0x70,(byte) 0x70,(byte) 0x60,(byte) 0x30,(byte) 0xe0,(byte) 0x38,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,
-(byte) 0xc0,(byte) 0x18,(byte) 0xe0,(byte) 0x38,(byte) 0x60,(byte) 0x30,(byte) 0x70,(byte) 0x70,(byte) 0x3f,(byte) 0xe0,(byte) 0xf,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0xd,(byte) 0x80,
-(byte) 0xd,(byte) 0x80,
-};
-
-static final BitmapCharRec ch214 = new BitmapCharRec(13,17,-1,0,15,ch214data);
-
-/* char: 0xd5 */
-
-static final byte[] ch213data = {
-(byte) 0xf,(byte) 0x80,(byte) 0x3f,(byte) 0xe0,(byte) 0x70,(byte) 0x70,(byte) 0x60,(byte) 0x30,(byte) 0xe0,(byte) 0x38,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,
-(byte) 0xc0,(byte) 0x18,(byte) 0xe0,(byte) 0x38,(byte) 0x60,(byte) 0x30,(byte) 0x70,(byte) 0x70,(byte) 0x3f,(byte) 0xe0,(byte) 0xf,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x9,(byte) 0x80,
-(byte) 0xb,(byte) 0x40,(byte) 0x6,(byte) 0x40,
-};
-
-static final BitmapCharRec ch213 = new BitmapCharRec(13,18,-1,0,15,ch213data);
-
-/* char: 0xd4 */
-
-static final byte[] ch212data = {
-(byte) 0xf,(byte) 0x80,(byte) 0x3f,(byte) 0xe0,(byte) 0x70,(byte) 0x70,(byte) 0x60,(byte) 0x30,(byte) 0xe0,(byte) 0x38,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,
-(byte) 0xc0,(byte) 0x18,(byte) 0xe0,(byte) 0x38,(byte) 0x60,(byte) 0x30,(byte) 0x70,(byte) 0x70,(byte) 0x3f,(byte) 0xe0,(byte) 0xf,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0xc,(byte) 0xc0,
-(byte) 0x7,(byte) 0x80,(byte) 0x3,(byte) 0x0,
-};
-
-static final BitmapCharRec ch212 = new BitmapCharRec(13,18,-1,0,15,ch212data);
-
-/* char: 0xd3 */
-
-static final byte[] ch211data = {
-(byte) 0xf,(byte) 0x80,(byte) 0x3f,(byte) 0xe0,(byte) 0x70,(byte) 0x70,(byte) 0x60,(byte) 0x30,(byte) 0xe0,(byte) 0x38,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,
-(byte) 0xc0,(byte) 0x18,(byte) 0xe0,(byte) 0x38,(byte) 0x60,(byte) 0x30,(byte) 0x70,(byte) 0x70,(byte) 0x3f,(byte) 0xe0,(byte) 0xf,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x3,(byte) 0x0,
-(byte) 0x1,(byte) 0x80,(byte) 0x0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch211 = new BitmapCharRec(13,18,-1,0,15,ch211data);
-
-/* char: 0xd2 */
-
-static final byte[] ch210data = {
-(byte) 0xf,(byte) 0x80,(byte) 0x3f,(byte) 0xe0,(byte) 0x70,(byte) 0x70,(byte) 0x60,(byte) 0x30,(byte) 0xe0,(byte) 0x38,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,
-(byte) 0xc0,(byte) 0x18,(byte) 0xe0,(byte) 0x38,(byte) 0x60,(byte) 0x30,(byte) 0x70,(byte) 0x70,(byte) 0x3f,(byte) 0xe0,(byte) 0xf,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x3,(byte) 0x0,
-(byte) 0x6,(byte) 0x0,(byte) 0xc,(byte) 0x0,
-};
-
-static final BitmapCharRec ch210 = new BitmapCharRec(13,18,-1,0,15,ch210data);
-
-/* char: 0xd1 */
-
-static final byte[] ch209data = {
-(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xe0,(byte) 0xc1,(byte) 0xe0,(byte) 0xc1,(byte) 0xe0,(byte) 0xc3,(byte) 0x60,(byte) 0xc6,(byte) 0x60,(byte) 0xc6,(byte) 0x60,(byte) 0xcc,(byte) 0x60,
-(byte) 0xcc,(byte) 0x60,(byte) 0xd8,(byte) 0x60,(byte) 0xd8,(byte) 0x60,(byte) 0xf0,(byte) 0x60,(byte) 0xe0,(byte) 0x60,(byte) 0xe0,(byte) 0x60,(byte) 0x0,(byte) 0x0,(byte) 0x13,(byte) 0x0,
-(byte) 0x16,(byte) 0x80,(byte) 0xc,(byte) 0x80,
-};
-
-static final BitmapCharRec ch209 = new BitmapCharRec(11,18,-1,0,13,ch209data);
-
-/* char: 0xd0 */
-
-static final byte[] ch208data = {
-(byte) 0x7f,(byte) 0x80,(byte) 0x7f,(byte) 0xc0,(byte) 0x60,(byte) 0xe0,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x30,(byte) 0x60,(byte) 0x30,(byte) 0xfc,(byte) 0x30,(byte) 0xfc,(byte) 0x30,
-(byte) 0x60,(byte) 0x30,(byte) 0x60,(byte) 0x30,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0xe0,(byte) 0x7f,(byte) 0xc0,(byte) 0x7f,(byte) 0x80,
-};
-
-static final BitmapCharRec ch208 = new BitmapCharRec(12,14,0,0,13,ch208data);
-
-/* char: 0xcf */
-
-static final byte[] ch207data = {
-(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x0,(byte) 0xcc,
-(byte) 0xcc,
-};
-
-static final BitmapCharRec ch207 = new BitmapCharRec(6,17,0,0,6,ch207data);
-
-/* char: 0xce */
-
-static final byte[] ch206data = {
-(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x0,(byte) 0xcc,
-(byte) 0x78,(byte) 0x30,
-};
-
-static final BitmapCharRec ch206 = new BitmapCharRec(6,18,0,0,6,ch206data);
-
-/* char: 0xcd */
-
-static final byte[] ch205data = {
-(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,
-(byte) 0x60,(byte) 0x30,
-};
-
-static final BitmapCharRec ch205 = new BitmapCharRec(4,18,-2,0,6,ch205data);
-
-/* char: 0xcc */
-
-static final byte[] ch204data = {
-(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x0,(byte) 0x30,
-(byte) 0x60,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch204 = new BitmapCharRec(4,18,0,0,6,ch204data);
-
-/* char: 0xcb */
-
-static final byte[] ch203data = {
-(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xff,(byte) 0x0,
-(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x33,(byte) 0x0,
-(byte) 0x33,(byte) 0x0,
-};
-
-static final BitmapCharRec ch203 = new BitmapCharRec(9,17,-1,0,11,ch203data);
-
-/* char: 0xca */
-
-static final byte[] ch202data = {
-(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xff,(byte) 0x0,
-(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x33,(byte) 0x0,
-(byte) 0x1e,(byte) 0x0,(byte) 0xc,(byte) 0x0,
-};
-
-static final BitmapCharRec ch202 = new BitmapCharRec(9,18,-1,0,11,ch202data);
-
-/* char: 0xc9 */
-
-static final byte[] ch201data = {
-(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xff,(byte) 0x0,
-(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0xc,(byte) 0x0,
-(byte) 0x6,(byte) 0x0,(byte) 0x3,(byte) 0x0,
-};
-
-static final BitmapCharRec ch201 = new BitmapCharRec(9,18,-1,0,11,ch201data);
-
-/* char: 0xc8 */
-
-static final byte[] ch200data = {
-(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xff,(byte) 0x0,
-(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0xc,(byte) 0x0,
-(byte) 0x18,(byte) 0x0,(byte) 0x30,(byte) 0x0,
-};
-
-static final BitmapCharRec ch200 = new BitmapCharRec(9,18,-1,0,11,ch200data);
-
-/* char: 0xc7 */
-
-static final byte[] ch199data = {
-(byte) 0x1e,(byte) 0x0,(byte) 0x1b,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0xe,(byte) 0x0,(byte) 0xf,(byte) 0x80,(byte) 0x3f,(byte) 0xe0,(byte) 0x70,(byte) 0x70,(byte) 0x60,(byte) 0x30,
-(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xe0,(byte) 0x0,(byte) 0x60,(byte) 0x30,(byte) 0x70,(byte) 0x70,
-(byte) 0x3f,(byte) 0xe0,(byte) 0xf,(byte) 0x80,
-};
-
-static final BitmapCharRec ch199 = new BitmapCharRec(12,18,-1,4,14,ch199data);
-
-/* char: 0xc6 */
-
-static final byte[] ch198data = {
-(byte) 0xc1,(byte) 0xff,(byte) 0xc1,(byte) 0xff,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x7f,(byte) 0x80,(byte) 0x3f,(byte) 0x80,(byte) 0x31,(byte) 0xfe,(byte) 0x31,(byte) 0xfe,
-(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0xd,(byte) 0x80,(byte) 0xd,(byte) 0x80,(byte) 0x7,(byte) 0xff,(byte) 0x7,(byte) 0xff,
-};
-
-static final BitmapCharRec ch198 = new BitmapCharRec(16,14,-1,0,18,ch198data);
-
-/* char: 0xc5 */
-
-static final byte[] ch197data = {
-(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x7f,(byte) 0xe0,(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,
-(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0xf,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x19,(byte) 0x80,
-(byte) 0x19,(byte) 0x80,(byte) 0xf,(byte) 0x0,
-};
-
-static final BitmapCharRec ch197 = new BitmapCharRec(12,18,0,0,12,ch197data);
-
-/* char: 0xc4 */
-
-static final byte[] ch196data = {
-(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x7f,(byte) 0xe0,(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,
-(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0xf,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x19,(byte) 0x80,
-(byte) 0x19,(byte) 0x80,
-};
-
-static final BitmapCharRec ch196 = new BitmapCharRec(12,17,0,0,12,ch196data);
-
-/* char: 0xc3 */
-
-static final byte[] ch195data = {
-(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x7f,(byte) 0xe0,(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,
-(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0xf,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x13,(byte) 0x0,
-(byte) 0x16,(byte) 0x80,(byte) 0xc,(byte) 0x80,
-};
-
-static final BitmapCharRec ch195 = new BitmapCharRec(12,18,0,0,12,ch195data);
-
-/* char: 0xc2 */
-
-static final byte[] ch194data = {
-(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x7f,(byte) 0xe0,(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,
-(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0xf,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x19,(byte) 0x80,
-(byte) 0xf,(byte) 0x0,(byte) 0x6,(byte) 0x0,
-};
-
-static final BitmapCharRec ch194 = new BitmapCharRec(12,18,0,0,12,ch194data);
-
-/* char: 0xc1 */
-
-static final byte[] ch193data = {
-(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x7f,(byte) 0xe0,(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,
-(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0xf,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x6,(byte) 0x0,
-(byte) 0x3,(byte) 0x0,(byte) 0x1,(byte) 0x80,
-};
-
-static final BitmapCharRec ch193 = new BitmapCharRec(12,18,0,0,12,ch193data);
-
-/* char: 0xc0 */
-
-static final byte[] ch192data = {
-(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x7f,(byte) 0xe0,(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,
-(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0xf,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x6,(byte) 0x0,
-(byte) 0xc,(byte) 0x0,(byte) 0x18,(byte) 0x0,
-};
-
-static final BitmapCharRec ch192 = new BitmapCharRec(12,18,0,0,12,ch192data);
-
-/* char: 0xbf */
-
-static final byte[] ch191data = {
-(byte) 0x7c,(byte) 0xfe,(byte) 0xc6,(byte) 0xc6,(byte) 0xe0,(byte) 0x70,(byte) 0x38,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x0,(byte) 0x0,(byte) 0x18,(byte) 0x18,
-};
-
-static final BitmapCharRec ch191 = new BitmapCharRec(7,14,-1,4,10,ch191data);
-
-/* char: 0xbe */
-
-static final byte[] ch190data = {
-(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0xc,(byte) 0xfc,(byte) 0x6,(byte) 0xd8,(byte) 0x6,(byte) 0x78,(byte) 0x73,(byte) 0x38,(byte) 0xf9,(byte) 0x18,(byte) 0x99,(byte) 0x88,
-(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x98,(byte) 0x60,(byte) 0xf8,(byte) 0x30,(byte) 0x70,(byte) 0x30,
-};
-
-static final BitmapCharRec ch190 = new BitmapCharRec(14,13,0,0,15,ch190data);
-
-/* char: 0xbd */
-
-static final byte[] ch189data = {
-(byte) 0x30,(byte) 0xf8,(byte) 0x30,(byte) 0xf8,(byte) 0x18,(byte) 0x60,(byte) 0xc,(byte) 0x30,(byte) 0xc,(byte) 0x18,(byte) 0x66,(byte) 0x98,(byte) 0x62,(byte) 0xf8,(byte) 0x63,(byte) 0x70,
-(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xe0,(byte) 0xc0,(byte) 0xe0,(byte) 0x60,(byte) 0x60,(byte) 0x60,
-};
-
-static final BitmapCharRec ch189 = new BitmapCharRec(13,13,-1,0,15,ch189data);
-
-/* char: 0xbc */
-
-static final byte[] ch188data = {
-(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x19,(byte) 0xf8,(byte) 0xd,(byte) 0xb0,(byte) 0xc,(byte) 0xf0,(byte) 0x66,(byte) 0x70,(byte) 0x62,(byte) 0x30,(byte) 0x63,(byte) 0x10,
-(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xe0,(byte) 0xc0,(byte) 0xe0,(byte) 0x60,(byte) 0x60,(byte) 0x60,
-};
-
-static final BitmapCharRec ch188 = new BitmapCharRec(13,13,-1,0,15,ch188data);
-
-/* char: 0xbb */
-
-static final byte[] ch187data = {
-(byte) 0x90,(byte) 0xd8,(byte) 0x6c,(byte) 0x36,(byte) 0x36,(byte) 0x6c,(byte) 0xd8,(byte) 0x90,
-};
-
-static final BitmapCharRec ch187 = new BitmapCharRec(7,8,-1,-1,9,ch187data);
-
-/* char: 0xba */
-
-static final byte[] ch186data = {
-(byte) 0xf8,(byte) 0x0,(byte) 0x70,(byte) 0xd8,(byte) 0x88,(byte) 0x88,(byte) 0xd8,(byte) 0x70,
-};
-
-static final BitmapCharRec ch186 = new BitmapCharRec(5,8,-1,-6,7,ch186data);
-
-/* char: 0xb9 */
-
-static final byte[] ch185data = {
-(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0xe0,(byte) 0xe0,(byte) 0x60,
-};
-
-static final BitmapCharRec ch185 = new BitmapCharRec(3,8,-1,-5,6,ch185data);
-
-/* char: 0xb8 */
-
-static final byte[] ch184data = {
-(byte) 0xf0,(byte) 0xd8,(byte) 0x18,(byte) 0x70,(byte) 0x60,
-};
-
-static final BitmapCharRec ch184 = new BitmapCharRec(5,5,0,4,5,ch184data);
-
-/* char: 0xb7 */
-
-static final byte[] ch183data = {
-(byte) 0xc0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch183 = new BitmapCharRec(2,2,-1,-4,4,ch183data);
-
-/* char: 0xb6 */
-
-static final byte[] ch182data = {
-(byte) 0x12,(byte) 0x12,(byte) 0x12,(byte) 0x12,(byte) 0x12,(byte) 0x12,(byte) 0x12,(byte) 0x12,(byte) 0x12,(byte) 0x12,(byte) 0x32,(byte) 0x72,(byte) 0xf2,(byte) 0xf2,(byte) 0xf2,(byte) 0xf2,
-(byte) 0x72,(byte) 0x3f,
-};
-
-static final BitmapCharRec ch182 = new BitmapCharRec(8,18,-1,4,10,ch182data);
-
-/* char: 0xb5 */
-
-static final byte[] ch181data = {
-(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xdb,(byte) 0xff,(byte) 0xe7,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,
-};
-
-static final BitmapCharRec ch181 = new BitmapCharRec(8,14,-1,4,10,ch181data);
-
-/* char: 0xb4 */
-
-static final byte[] ch180data = {
-(byte) 0xc0,(byte) 0x60,(byte) 0x30,
-};
-
-static final BitmapCharRec ch180 = new BitmapCharRec(4,3,0,-11,4,ch180data);
-
-/* char: 0xb3 */
-
-static final byte[] ch179data = {
-(byte) 0x70,(byte) 0xf8,(byte) 0x98,(byte) 0x30,(byte) 0x30,(byte) 0x98,(byte) 0xf8,(byte) 0x70,
-};
-
-static final BitmapCharRec ch179 = new BitmapCharRec(5,8,0,-5,6,ch179data);
-
-/* char: 0xb2 */
-
-static final byte[] ch178data = {
-(byte) 0xf8,(byte) 0xf8,(byte) 0x60,(byte) 0x30,(byte) 0x18,(byte) 0x98,(byte) 0xf8,(byte) 0x70,
-};
-
-static final BitmapCharRec ch178 = new BitmapCharRec(5,8,0,-5,6,ch178data);
-
-/* char: 0xb1 */
-
-static final byte[] ch177data = {
-(byte) 0xff,(byte) 0xff,(byte) 0x0,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0xff,(byte) 0xff,(byte) 0x18,(byte) 0x18,(byte) 0x18,
-};
-
-static final BitmapCharRec ch177 = new BitmapCharRec(8,11,-1,0,10,ch177data);
-
-/* char: 0xb0 */
-
-static final byte[] ch176data = {
-(byte) 0x70,(byte) 0xd8,(byte) 0x88,(byte) 0xd8,(byte) 0x70,
-};
-
-static final BitmapCharRec ch176 = new BitmapCharRec(5,5,-1,-8,7,ch176data);
-
-/* char: 0xaf */
-
-static final byte[] ch175data = {
-(byte) 0xf8,
-};
-
-static final BitmapCharRec ch175 = new BitmapCharRec(5,1,0,-12,5,ch175data);
-
-/* char: 0xae */
-
-static final byte[] ch174data = {
-(byte) 0xf,(byte) 0x80,(byte) 0x30,(byte) 0x60,(byte) 0x40,(byte) 0x10,(byte) 0x48,(byte) 0x50,(byte) 0x88,(byte) 0x88,(byte) 0x89,(byte) 0x8,(byte) 0x8f,(byte) 0x88,(byte) 0x88,(byte) 0x48,
-(byte) 0x88,(byte) 0x48,(byte) 0x4f,(byte) 0x90,(byte) 0x40,(byte) 0x10,(byte) 0x30,(byte) 0x60,(byte) 0xf,(byte) 0x80,
-};
-
-static final BitmapCharRec ch174 = new BitmapCharRec(13,13,-1,0,14,ch174data);
-
-/* char: 0xad */
-
-static final byte[] ch173data = {
-(byte) 0xf8,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch173 = new BitmapCharRec(5,2,-1,-4,7,ch173data);
-
-/* char: 0xac */
-
-static final byte[] ch172data = {
-(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,
-};
-
-static final BitmapCharRec ch172 = new BitmapCharRec(9,5,-1,-3,11,ch172data);
-
-/* char: 0xab */
-
-static final byte[] ch171data = {
-(byte) 0x12,(byte) 0x36,(byte) 0x6c,(byte) 0xd8,(byte) 0xd8,(byte) 0x6c,(byte) 0x36,(byte) 0x12,
-};
-
-static final BitmapCharRec ch171 = new BitmapCharRec(7,8,-1,-1,9,ch171data);
-
-/* char: 0xaa */
-
-static final byte[] ch170data = {
-(byte) 0xf8,(byte) 0x0,(byte) 0x68,(byte) 0xd8,(byte) 0x48,(byte) 0x38,(byte) 0xc8,(byte) 0x70,
-};
-
-static final BitmapCharRec ch170 = new BitmapCharRec(5,8,-1,-6,7,ch170data);
-
-/* char: 0xa9 */
-
-static final byte[] ch169data = {
-(byte) 0xf,(byte) 0x80,(byte) 0x30,(byte) 0x60,(byte) 0x40,(byte) 0x10,(byte) 0x47,(byte) 0x10,(byte) 0x88,(byte) 0x88,(byte) 0x90,(byte) 0x8,(byte) 0x90,(byte) 0x8,(byte) 0x90,(byte) 0x8,
-(byte) 0x88,(byte) 0x88,(byte) 0x47,(byte) 0x10,(byte) 0x40,(byte) 0x10,(byte) 0x30,(byte) 0x60,(byte) 0xf,(byte) 0x80,
-};
-
-static final BitmapCharRec ch169 = new BitmapCharRec(13,13,-1,0,15,ch169data);
-
-/* char: 0xa8 */
-
-static final byte[] ch168data = {
-(byte) 0xd8,(byte) 0xd8,
-};
-
-static final BitmapCharRec ch168 = new BitmapCharRec(5,2,0,-11,6,ch168data);
-
-/* char: 0xa7 */
-
-static final byte[] ch167data = {
-(byte) 0x3c,(byte) 0x7e,(byte) 0xc3,(byte) 0xc3,(byte) 0x7,(byte) 0xe,(byte) 0x3e,(byte) 0x73,(byte) 0xe3,(byte) 0xc3,(byte) 0xc7,(byte) 0x6e,(byte) 0x7c,(byte) 0xf0,(byte) 0xc3,(byte) 0xc3,
-(byte) 0x7e,(byte) 0x3c,
-};
-
-static final BitmapCharRec ch167 = new BitmapCharRec(8,18,-1,4,10,ch167data);
-
-/* char: 0xa6 */
-
-static final byte[] ch166data = {
-(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
-(byte) 0xc0,
-};
-
-static final BitmapCharRec ch166 = new BitmapCharRec(2,17,-1,3,4,ch166data);
-
-/* char: 0xa5 */
-
-static final byte[] ch165data = {
-(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0xff,(byte) 0x18,(byte) 0xff,(byte) 0x3c,(byte) 0x66,(byte) 0x66,(byte) 0x66,(byte) 0xc3,(byte) 0xc3,
-};
-
-static final BitmapCharRec ch165 = new BitmapCharRec(8,13,-1,0,10,ch165data);
-
-/* char: 0xa4 */
-
-static final byte[] ch164data = {
-(byte) 0xc3,(byte) 0xff,(byte) 0x66,(byte) 0x66,(byte) 0x66,(byte) 0xff,(byte) 0xc3,
-};
-
-static final BitmapCharRec ch164 = new BitmapCharRec(8,7,-1,-3,10,ch164data);
-
-/* char: 0xa3 */
-
-static final byte[] ch163data = {
-(byte) 0xdf,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0x60,(byte) 0x80,(byte) 0x30,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x7e,(byte) 0x0,(byte) 0x30,(byte) 0x0,
-(byte) 0x60,(byte) 0x0,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x3f,(byte) 0x0,(byte) 0x1e,(byte) 0x0,
-};
-
-static final BitmapCharRec ch163 = new BitmapCharRec(9,13,0,0,10,ch163data);
-
-/* char: 0xa2 */
-
-static final byte[] ch162data = {
-(byte) 0x10,(byte) 0x10,(byte) 0x3e,(byte) 0x7f,(byte) 0x6b,(byte) 0xc8,(byte) 0xc8,(byte) 0xc8,(byte) 0xc8,(byte) 0x6b,(byte) 0x7f,(byte) 0x3e,(byte) 0x4,(byte) 0x4,
-};
-
-static final BitmapCharRec ch162 = new BitmapCharRec(8,14,-1,2,10,ch162data);
-
-/* char: 0xa1 */
-
-static final byte[] ch161data = {
-(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch161 = new BitmapCharRec(2,14,-2,4,6,ch161data);
-
-/* char: 0xa0 */
-
-static final BitmapCharRec ch160 = new BitmapCharRec(0,0,0,0,5,null);
-
-/* char: 0x7e '~' */
-
-static final byte[] ch126data = {
-(byte) 0xcc,(byte) 0x7e,(byte) 0x33,
-};
-
-static final BitmapCharRec ch126 = new BitmapCharRec(8,3,-1,-4,10,ch126data);
-
-/* char: 0x7d '}' */
-
-static final byte[] ch125data = {
-(byte) 0xc0,(byte) 0x60,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x18,(byte) 0xc,(byte) 0x18,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,
-(byte) 0x60,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch125 = new BitmapCharRec(6,18,0,4,6,ch125data);
-
-/* char: 0x7c '|' */
-
-static final byte[] ch124data = {
-(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
-(byte) 0xc0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch124 = new BitmapCharRec(2,18,-1,4,4,ch124data);
-
-/* char: 0x7b '{' */
-
-static final byte[] ch123data = {
-(byte) 0xc,(byte) 0x18,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,
-(byte) 0x18,(byte) 0xc,
-};
-
-static final BitmapCharRec ch123 = new BitmapCharRec(6,18,0,4,6,ch123data);
-
-/* char: 0x7a 'z' */
-
-static final byte[] ch122data = {
-(byte) 0xfe,(byte) 0xfe,(byte) 0xc0,(byte) 0x60,(byte) 0x30,(byte) 0x18,(byte) 0xc,(byte) 0x6,(byte) 0xfe,(byte) 0xfe,
-};
-
-static final BitmapCharRec ch122 = new BitmapCharRec(7,10,-1,0,9,ch122data);
-
-/* char: 0x79 'y' */
-
-static final byte[] ch121data = {
-(byte) 0x70,(byte) 0x70,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x3c,(byte) 0x24,(byte) 0x66,(byte) 0x66,(byte) 0x66,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,
-};
-
-static final BitmapCharRec ch121 = new BitmapCharRec(8,14,-1,4,10,ch121data);
-
-/* char: 0x78 'x' */
-
-static final byte[] ch120data = {
-(byte) 0xc3,(byte) 0xe7,(byte) 0x66,(byte) 0x3c,(byte) 0x18,(byte) 0x18,(byte) 0x3c,(byte) 0x66,(byte) 0xe7,(byte) 0xc3,
-};
-
-static final BitmapCharRec ch120 = new BitmapCharRec(8,10,-1,0,10,ch120data);
-
-/* char: 0x77 'w' */
-
-static final byte[] ch119data = {
-(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0x39,(byte) 0xc0,(byte) 0x29,(byte) 0x40,(byte) 0x69,(byte) 0x60,(byte) 0x66,(byte) 0x60,(byte) 0x66,(byte) 0x60,(byte) 0xc6,(byte) 0x30,
-(byte) 0xc6,(byte) 0x30,(byte) 0xc6,(byte) 0x30,
-};
-
-static final BitmapCharRec ch119 = new BitmapCharRec(12,10,-1,0,14,ch119data);
-
-/* char: 0x76 'v' */
-
-static final byte[] ch118data = {
-(byte) 0x18,(byte) 0x18,(byte) 0x3c,(byte) 0x24,(byte) 0x66,(byte) 0x66,(byte) 0x66,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,
-};
-
-static final BitmapCharRec ch118 = new BitmapCharRec(8,10,-1,0,10,ch118data);
-
-/* char: 0x75 'u' */
-
-static final byte[] ch117data = {
-(byte) 0x73,(byte) 0xfb,(byte) 0xc7,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,
-};
-
-static final BitmapCharRec ch117 = new BitmapCharRec(8,10,-1,0,10,ch117data);
-
-/* char: 0x74 't' */
-
-static final byte[] ch116data = {
-(byte) 0x18,(byte) 0x38,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0xfc,(byte) 0xfc,(byte) 0x30,(byte) 0x30,(byte) 0x30,
-};
-
-static final BitmapCharRec ch116 = new BitmapCharRec(6,13,0,0,6,ch116data);
-
-/* char: 0x73 's' */
-
-static final byte[] ch115data = {
-(byte) 0x78,(byte) 0xfc,(byte) 0xc6,(byte) 0x6,(byte) 0x3e,(byte) 0xfc,(byte) 0xc0,(byte) 0xc6,(byte) 0x7e,(byte) 0x3c,
-};
-
-static final BitmapCharRec ch115 = new BitmapCharRec(7,10,-1,0,9,ch115data);
-
-/* char: 0x72 'r' */
-
-static final byte[] ch114data = {
-(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xe0,(byte) 0xd8,(byte) 0xd8,
-};
-
-static final BitmapCharRec ch114 = new BitmapCharRec(5,10,-1,0,6,ch114data);
-
-/* char: 0x71 'q' */
-
-static final byte[] ch113data = {
-(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x3d,(byte) 0x80,(byte) 0x7f,(byte) 0x80,(byte) 0x63,(byte) 0x80,(byte) 0xc1,(byte) 0x80,
-(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x63,(byte) 0x80,(byte) 0x7f,(byte) 0x80,(byte) 0x3d,(byte) 0x80,
-};
-
-static final BitmapCharRec ch113 = new BitmapCharRec(9,14,-1,4,11,ch113data);
-
-/* char: 0x70 'p' */
-
-static final byte[] ch112data = {
-(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xde,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xe3,(byte) 0x0,(byte) 0xc1,(byte) 0x80,
-(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xe3,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xde,(byte) 0x0,
-};
-
-static final BitmapCharRec ch112 = new BitmapCharRec(9,14,-1,4,11,ch112data);
-
-/* char: 0x6f 'o' */
-
-static final byte[] ch111data = {
-(byte) 0x3e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x63,(byte) 0x0,
-(byte) 0x7f,(byte) 0x0,(byte) 0x3e,(byte) 0x0,
-};
-
-static final BitmapCharRec ch111 = new BitmapCharRec(9,10,-1,0,11,ch111data);
-
-/* char: 0x6e 'n' */
-
-static final byte[] ch110data = {
-(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xe3,(byte) 0xdf,(byte) 0xce,
-};
-
-static final BitmapCharRec ch110 = new BitmapCharRec(8,10,-1,0,10,ch110data);
-
-/* char: 0x6d 'm' */
-
-static final byte[] ch109data = {
-(byte) 0xc6,(byte) 0x30,(byte) 0xc6,(byte) 0x30,(byte) 0xc6,(byte) 0x30,(byte) 0xc6,(byte) 0x30,(byte) 0xc6,(byte) 0x30,(byte) 0xc6,(byte) 0x30,(byte) 0xc6,(byte) 0x30,(byte) 0xe7,(byte) 0x30,
-(byte) 0xde,(byte) 0xf0,(byte) 0xcc,(byte) 0x60,
-};
-
-static final BitmapCharRec ch109 = new BitmapCharRec(12,10,-1,0,14,ch109data);
-
-/* char: 0x6c 'l' */
-
-static final byte[] ch108data = {
-(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch108 = new BitmapCharRec(2,14,-1,0,4,ch108data);
-
-/* char: 0x6b 'k' */
-
-static final byte[] ch107data = {
-(byte) 0xc7,(byte) 0xc6,(byte) 0xce,(byte) 0xcc,(byte) 0xd8,(byte) 0xf8,(byte) 0xf0,(byte) 0xd8,(byte) 0xcc,(byte) 0xc6,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch107 = new BitmapCharRec(8,14,-1,0,9,ch107data);
-
-/* char: 0x6a 'j' */
-
-static final byte[] ch106data = {
-(byte) 0xe0,(byte) 0xf0,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x0,(byte) 0x0,
-(byte) 0x30,(byte) 0x30,
-};
-
-static final BitmapCharRec ch106 = new BitmapCharRec(4,18,1,4,4,ch106data);
-
-/* char: 0x69 'i' */
-
-static final byte[] ch105data = {
-(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch105 = new BitmapCharRec(2,14,-1,0,4,ch105data);
-
-/* char: 0x68 'h' */
-
-static final byte[] ch104data = {
-(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xe3,(byte) 0xdf,(byte) 0xce,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch104 = new BitmapCharRec(8,14,-1,0,10,ch104data);
-
-/* char: 0x67 'g' */
-
-static final byte[] ch103data = {
-(byte) 0x1c,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x1,(byte) 0x80,(byte) 0x3d,(byte) 0x80,(byte) 0x7f,(byte) 0x80,(byte) 0x63,(byte) 0x80,(byte) 0xc1,(byte) 0x80,
-(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x7f,(byte) 0x80,(byte) 0x3d,(byte) 0x80,
-};
-
-static final BitmapCharRec ch103 = new BitmapCharRec(9,14,-1,4,11,ch103data);
-
-/* char: 0x66 'f' */
-
-static final byte[] ch102data = {
-(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0xfc,(byte) 0xfc,(byte) 0x30,(byte) 0x30,(byte) 0x3c,(byte) 0x1c,
-};
-
-static final BitmapCharRec ch102 = new BitmapCharRec(6,14,0,0,6,ch102data);
-
-/* char: 0x65 'e' */
-
-static final byte[] ch101data = {
-(byte) 0x3c,(byte) 0x7f,(byte) 0xe3,(byte) 0xc0,(byte) 0xc0,(byte) 0xff,(byte) 0xc3,(byte) 0xc3,(byte) 0x7e,(byte) 0x3c,
-};
-
-static final BitmapCharRec ch101 = new BitmapCharRec(8,10,-1,0,10,ch101data);
-
-/* char: 0x64 'd' */
-
-static final byte[] ch100data = {
-(byte) 0x3d,(byte) 0x80,(byte) 0x7f,(byte) 0x80,(byte) 0x63,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x63,(byte) 0x80,
-(byte) 0x7f,(byte) 0x80,(byte) 0x3d,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,
-};
-
-static final BitmapCharRec ch100 = new BitmapCharRec(9,14,-1,0,11,ch100data);
-
-/* char: 0x63 'c' */
-
-static final byte[] ch99data = {
-(byte) 0x3e,(byte) 0x7f,(byte) 0x63,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x63,(byte) 0x7f,(byte) 0x3e,
-};
-
-static final BitmapCharRec ch99 = new BitmapCharRec(8,10,-1,0,10,ch99data);
-
-/* char: 0x62 'b' */
-
-static final byte[] ch98data = {
-(byte) 0xde,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xe3,(byte) 0x0,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xe3,(byte) 0x0,
-(byte) 0xff,(byte) 0x0,(byte) 0xde,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,
-};
-
-static final BitmapCharRec ch98 = new BitmapCharRec(9,14,-1,0,11,ch98data);
-
-/* char: 0x61 'a' */
-
-static final byte[] ch97data = {
-(byte) 0x76,(byte) 0xee,(byte) 0xc6,(byte) 0xc6,(byte) 0xe6,(byte) 0x7e,(byte) 0xe,(byte) 0xc6,(byte) 0xee,(byte) 0x7c,
-};
-
-static final BitmapCharRec ch97 = new BitmapCharRec(7,10,-1,0,9,ch97data);
-
-/* char: 0x60 '`' */
-
-static final byte[] ch96data = {
-(byte) 0xc0,(byte) 0xc0,(byte) 0x80,(byte) 0x80,(byte) 0x40,
-};
-
-static final BitmapCharRec ch96 = new BitmapCharRec(2,5,-1,-9,4,ch96data);
-
-/* char: 0x5f '_' */
-
-static final byte[] ch95data = {
-(byte) 0xff,(byte) 0xc0,(byte) 0xff,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch95 = new BitmapCharRec(10,2,0,4,10,ch95data);
-
-/* char: 0x5e '^' */
-
-static final byte[] ch94data = {
-(byte) 0x82,(byte) 0xc6,(byte) 0x6c,(byte) 0x38,(byte) 0x10,
-};
-
-static final BitmapCharRec ch94 = new BitmapCharRec(7,5,-1,-8,9,ch94data);
-
-/* char: 0x5d ']' */
-
-static final byte[] ch93data = {
-(byte) 0xf0,(byte) 0xf0,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,
-(byte) 0xf0,(byte) 0xf0,
-};
-
-static final BitmapCharRec ch93 = new BitmapCharRec(4,18,0,4,5,ch93data);
-
-/* char: 0x5c '\' */
-
-static final byte[] ch92data = {
-(byte) 0x18,(byte) 0x18,(byte) 0x10,(byte) 0x10,(byte) 0x30,(byte) 0x30,(byte) 0x20,(byte) 0x20,(byte) 0x60,(byte) 0x60,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch92 = new BitmapCharRec(5,14,0,0,5,ch92data);
-
-/* char: 0x5b '[' */
-
-static final byte[] ch91data = {
-(byte) 0xf0,(byte) 0xf0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
-(byte) 0xf0,(byte) 0xf0,
-};
-
-static final BitmapCharRec ch91 = new BitmapCharRec(4,18,-1,4,5,ch91data);
-
-/* char: 0x5a 'Z' */
-
-static final byte[] ch90data = {
-(byte) 0xff,(byte) 0xc0,(byte) 0xff,(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x1c,(byte) 0x0,(byte) 0xc,(byte) 0x0,
-(byte) 0x6,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x1,(byte) 0x80,(byte) 0x0,(byte) 0xc0,(byte) 0xff,(byte) 0xc0,(byte) 0xff,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch90 = new BitmapCharRec(10,14,-1,0,12,ch90data);
-
-/* char: 0x59 'Y' */
-
-static final byte[] ch89data = {
-(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x19,(byte) 0x80,
-(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,
-};
-
-static final BitmapCharRec ch89 = new BitmapCharRec(12,14,-1,0,14,ch89data);
-
-/* char: 0x58 'X' */
-
-static final byte[] ch88data = {
-(byte) 0xc0,(byte) 0x60,(byte) 0xe0,(byte) 0xe0,(byte) 0x60,(byte) 0xc0,(byte) 0x71,(byte) 0xc0,(byte) 0x31,(byte) 0x80,(byte) 0x1b,(byte) 0x0,(byte) 0xe,(byte) 0x0,(byte) 0xe,(byte) 0x0,
-(byte) 0x1b,(byte) 0x0,(byte) 0x31,(byte) 0x80,(byte) 0x71,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xe0,(byte) 0xe0,(byte) 0xc0,(byte) 0x60,
-};
-
-static final BitmapCharRec ch88 = new BitmapCharRec(11,14,-1,0,13,ch88data);
-
-/* char: 0x57 'W' */
-
-static final byte[] ch87data = {
-(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x1c,(byte) 0x38,(byte) 0x34,(byte) 0x2c,(byte) 0x36,(byte) 0x6c,(byte) 0x36,(byte) 0x6c,(byte) 0x66,(byte) 0x66,(byte) 0x66,(byte) 0x66,
-(byte) 0x62,(byte) 0x46,(byte) 0x63,(byte) 0xc6,(byte) 0xc3,(byte) 0xc3,(byte) 0xc1,(byte) 0x83,(byte) 0xc1,(byte) 0x83,(byte) 0xc1,(byte) 0x83,
-};
-
-static final BitmapCharRec ch87 = new BitmapCharRec(16,14,-1,0,18,ch87data);
-
-/* char: 0x56 'V' */
-
-static final byte[] ch86data = {
-(byte) 0x6,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,
-(byte) 0x30,(byte) 0xc0,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,
-};
-
-static final BitmapCharRec ch86 = new BitmapCharRec(12,14,-1,0,14,ch86data);
-
-/* char: 0x55 'U' */
-
-static final byte[] ch85data = {
-(byte) 0x1f,(byte) 0x0,(byte) 0x7f,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,
-(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,
-};
-
-static final BitmapCharRec ch85 = new BitmapCharRec(11,14,-1,0,13,ch85data);
-
-/* char: 0x54 'T' */
-
-static final byte[] ch84data = {
-(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,
-(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0xff,(byte) 0xc0,(byte) 0xff,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch84 = new BitmapCharRec(10,14,-1,0,12,ch84data);
-
-/* char: 0x53 'S' */
-
-static final byte[] ch83data = {
-(byte) 0x3f,(byte) 0x0,(byte) 0x7f,(byte) 0xc0,(byte) 0xe0,(byte) 0xe0,(byte) 0xc0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0xe0,(byte) 0x3,(byte) 0xc0,(byte) 0x1f,(byte) 0x0,
-(byte) 0x7c,(byte) 0x0,(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x60,(byte) 0xe0,(byte) 0xe0,(byte) 0x7f,(byte) 0xc0,(byte) 0x1f,(byte) 0x0,
-};
-
-static final BitmapCharRec ch83 = new BitmapCharRec(11,14,-1,0,13,ch83data);
-
-/* char: 0x52 'R' */
-
-static final byte[] ch82data = {
-(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xff,(byte) 0x0,(byte) 0xff,(byte) 0x80,
-(byte) 0xc1,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc1,(byte) 0xc0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x0,
-};
-
-static final BitmapCharRec ch82 = new BitmapCharRec(10,14,-1,0,12,ch82data);
-
-/* char: 0x51 'Q' */
-
-static final byte[] ch81data = {
-(byte) 0x0,(byte) 0x30,(byte) 0xf,(byte) 0xb0,(byte) 0x3f,(byte) 0xe0,(byte) 0x70,(byte) 0xf0,(byte) 0x61,(byte) 0xb0,(byte) 0xe1,(byte) 0xb8,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,
-(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,(byte) 0xe0,(byte) 0x38,(byte) 0x60,(byte) 0x30,(byte) 0x70,(byte) 0x70,(byte) 0x3f,(byte) 0xe0,(byte) 0xf,(byte) 0x80,
-};
-
-static final BitmapCharRec ch81 = new BitmapCharRec(13,15,-1,1,15,ch81data);
-
-/* char: 0x50 'P' */
-
-static final byte[] ch80data = {
-(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xff,(byte) 0x80,
-(byte) 0xc1,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc1,(byte) 0xc0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x0,
-};
-
-static final BitmapCharRec ch80 = new BitmapCharRec(10,14,-1,0,12,ch80data);
-
-/* char: 0x4f 'O' */
-
-static final byte[] ch79data = {
-(byte) 0xf,(byte) 0x80,(byte) 0x3f,(byte) 0xe0,(byte) 0x70,(byte) 0x70,(byte) 0x60,(byte) 0x30,(byte) 0xe0,(byte) 0x38,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,(byte) 0xc0,(byte) 0x18,
-(byte) 0xc0,(byte) 0x18,(byte) 0xe0,(byte) 0x38,(byte) 0x60,(byte) 0x30,(byte) 0x70,(byte) 0x70,(byte) 0x3f,(byte) 0xe0,(byte) 0xf,(byte) 0x80,
-};
-
-static final BitmapCharRec ch79 = new BitmapCharRec(13,14,-1,0,15,ch79data);
-
-/* char: 0x4e 'N' */
-
-static final byte[] ch78data = {
-(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xe0,(byte) 0xc1,(byte) 0xe0,(byte) 0xc1,(byte) 0xe0,(byte) 0xc3,(byte) 0x60,(byte) 0xc6,(byte) 0x60,(byte) 0xc6,(byte) 0x60,(byte) 0xcc,(byte) 0x60,
-(byte) 0xcc,(byte) 0x60,(byte) 0xd8,(byte) 0x60,(byte) 0xf0,(byte) 0x60,(byte) 0xf0,(byte) 0x60,(byte) 0xe0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,
-};
-
-static final BitmapCharRec ch78 = new BitmapCharRec(11,14,-1,0,13,ch78data);
-
-/* char: 0x4d 'M' */
-
-static final byte[] ch77data = {
-(byte) 0xc3,(byte) 0xc,(byte) 0xc3,(byte) 0xc,(byte) 0xc7,(byte) 0x8c,(byte) 0xc4,(byte) 0x8c,(byte) 0xcc,(byte) 0xcc,(byte) 0xcc,(byte) 0xcc,(byte) 0xd8,(byte) 0x6c,(byte) 0xd8,(byte) 0x6c,
-(byte) 0xf0,(byte) 0x3c,(byte) 0xf0,(byte) 0x3c,(byte) 0xe0,(byte) 0x1c,(byte) 0xe0,(byte) 0x1c,(byte) 0xc0,(byte) 0xc,(byte) 0xc0,(byte) 0xc,
-};
-
-static final BitmapCharRec ch77 = new BitmapCharRec(14,14,-1,0,16,ch77data);
-
-/* char: 0x4c 'L' */
-
-static final byte[] ch76data = {
-(byte) 0xff,(byte) 0xff,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch76 = new BitmapCharRec(8,14,-1,0,10,ch76data);
-
-/* char: 0x4b 'K' */
-
-static final byte[] ch75data = {
-(byte) 0xc0,(byte) 0x70,(byte) 0xc0,(byte) 0xe0,(byte) 0xc1,(byte) 0xc0,(byte) 0xc3,(byte) 0x80,(byte) 0xc7,(byte) 0x0,(byte) 0xce,(byte) 0x0,(byte) 0xfc,(byte) 0x0,(byte) 0xf8,(byte) 0x0,
-(byte) 0xdc,(byte) 0x0,(byte) 0xce,(byte) 0x0,(byte) 0xc7,(byte) 0x0,(byte) 0xc3,(byte) 0x80,(byte) 0xc1,(byte) 0xc0,(byte) 0xc0,(byte) 0xe0,
-};
-
-static final BitmapCharRec ch75 = new BitmapCharRec(12,14,-1,0,13,ch75data);
-
-/* char: 0x4a 'J' */
-
-static final byte[] ch74data = {
-(byte) 0x3c,(byte) 0x7e,(byte) 0xe7,(byte) 0xc3,(byte) 0xc3,(byte) 0x3,(byte) 0x3,(byte) 0x3,(byte) 0x3,(byte) 0x3,(byte) 0x3,(byte) 0x3,(byte) 0x3,(byte) 0x3,
-};
-
-static final BitmapCharRec ch74 = new BitmapCharRec(8,14,-1,0,10,ch74data);
-
-/* char: 0x49 'I' */
-
-static final byte[] ch73data = {
-(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch73 = new BitmapCharRec(2,14,-2,0,6,ch73data);
-
-/* char: 0x48 'H' */
-
-static final byte[] ch72data = {
-(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xff,(byte) 0xe0,(byte) 0xff,(byte) 0xe0,
-(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,
-};
-
-static final BitmapCharRec ch72 = new BitmapCharRec(11,14,-1,0,13,ch72data);
-
-/* char: 0x47 'G' */
-
-static final byte[] ch71data = {
-(byte) 0xf,(byte) 0xb0,(byte) 0x3f,(byte) 0xf0,(byte) 0x70,(byte) 0x70,(byte) 0x60,(byte) 0x30,(byte) 0xe0,(byte) 0x30,(byte) 0xc1,(byte) 0xf0,(byte) 0xc1,(byte) 0xf0,(byte) 0xc0,(byte) 0x0,
-(byte) 0xc0,(byte) 0x0,(byte) 0xe0,(byte) 0x30,(byte) 0x60,(byte) 0x30,(byte) 0x70,(byte) 0x70,(byte) 0x3f,(byte) 0xe0,(byte) 0xf,(byte) 0x80,
-};
-
-static final BitmapCharRec ch71 = new BitmapCharRec(12,14,-1,0,14,ch71data);
-
-/* char: 0x46 'F' */
-
-static final byte[] ch70data = {
-(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xff,(byte) 0x0,
-(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,
-};
-
-static final BitmapCharRec ch70 = new BitmapCharRec(9,14,-1,0,11,ch70data);
-
-/* char: 0x45 'E' */
-
-static final byte[] ch69data = {
-(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x0,(byte) 0xff,(byte) 0x0,
-(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,
-};
-
-static final BitmapCharRec ch69 = new BitmapCharRec(9,14,-1,0,11,ch69data);
-
-/* char: 0x44 'D' */
-
-static final byte[] ch68data = {
-(byte) 0xff,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0xc1,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,
-(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xc0,(byte) 0xc1,(byte) 0xc0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x0,
-};
-
-static final BitmapCharRec ch68 = new BitmapCharRec(11,14,-1,0,13,ch68data);
-
-/* char: 0x43 'C' */
-
-static final byte[] ch67data = {
-(byte) 0xf,(byte) 0x80,(byte) 0x3f,(byte) 0xe0,(byte) 0x70,(byte) 0x70,(byte) 0x60,(byte) 0x30,(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,
-(byte) 0xc0,(byte) 0x0,(byte) 0xe0,(byte) 0x0,(byte) 0x60,(byte) 0x30,(byte) 0x70,(byte) 0x70,(byte) 0x3f,(byte) 0xe0,(byte) 0xf,(byte) 0x80,
-};
-
-static final BitmapCharRec ch67 = new BitmapCharRec(12,14,-1,0,14,ch67data);
-
-/* char: 0x42 'B' */
-
-static final byte[] ch66data = {
-(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0xc0,(byte) 0xc0,(byte) 0xe0,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xe0,(byte) 0xff,(byte) 0xc0,(byte) 0xff,(byte) 0x80,
-(byte) 0xc1,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc1,(byte) 0xc0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x0,
-};
-
-static final BitmapCharRec ch66 = new BitmapCharRec(11,14,-1,0,13,ch66data);
-
-/* char: 0x41 'A' */
-
-static final byte[] ch65data = {
-(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x7f,(byte) 0xe0,(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0xc0,
-(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0xf,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,
-};
-
-static final BitmapCharRec ch65 = new BitmapCharRec(12,14,0,0,12,ch65data);
-
-/* char: 0x40 '@' */
-
-static final byte[] ch64data = {
-(byte) 0x7,(byte) 0xe0,(byte) 0x1f,(byte) 0xf0,(byte) 0x38,(byte) 0x0,(byte) 0x70,(byte) 0x0,(byte) 0x67,(byte) 0x70,(byte) 0xcf,(byte) 0xf8,(byte) 0xcc,(byte) 0xcc,(byte) 0xcc,(byte) 0x66,
-(byte) 0xcc,(byte) 0x66,(byte) 0xcc,(byte) 0x63,(byte) 0xc6,(byte) 0x33,(byte) 0x67,(byte) 0x73,(byte) 0x63,(byte) 0xb3,(byte) 0x30,(byte) 0x6,(byte) 0x1c,(byte) 0xe,(byte) 0xf,(byte) 0xfc,
-(byte) 0x3,(byte) 0xf0,
-};
-
-static final BitmapCharRec ch64 = new BitmapCharRec(16,17,-1,3,18,ch64data);
-
-/* char: 0x3f '?' */
-
-static final byte[] ch63data = {
-(byte) 0x30,(byte) 0x30,(byte) 0x0,(byte) 0x0,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x38,(byte) 0x1c,(byte) 0xe,(byte) 0xc6,(byte) 0xc6,(byte) 0xfe,(byte) 0x7c,
-};
-
-static final BitmapCharRec ch63 = new BitmapCharRec(7,14,-1,0,10,ch63data);
-
-/* char: 0x3e '>' */
-
-static final byte[] ch62data = {
-(byte) 0xc0,(byte) 0xf0,(byte) 0x3c,(byte) 0xe,(byte) 0x3,(byte) 0xe,(byte) 0x3c,(byte) 0xf0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch62 = new BitmapCharRec(8,9,-1,0,10,ch62data);
-
-/* char: 0x3d '=' */
-
-static final byte[] ch61data = {
-(byte) 0xfe,(byte) 0xfe,(byte) 0x0,(byte) 0x0,(byte) 0xfe,(byte) 0xfe,
-};
-
-static final BitmapCharRec ch61 = new BitmapCharRec(7,6,-2,-2,11,ch61data);
-
-/* char: 0x3c '<' */
-
-static final byte[] ch60data = {
-(byte) 0x3,(byte) 0xf,(byte) 0x3c,(byte) 0x70,(byte) 0xc0,(byte) 0x70,(byte) 0x3c,(byte) 0xf,(byte) 0x3,
-};
-
-static final BitmapCharRec ch60 = new BitmapCharRec(8,9,-1,0,10,ch60data);
-
-/* char: 0x3b ';' */
-
-static final byte[] ch59data = {
-(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch59 = new BitmapCharRec(2,13,-1,3,5,ch59data);
-
-/* char: 0x3a ':' */
-
-static final byte[] ch58data = {
-(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch58 = new BitmapCharRec(2,10,-1,0,5,ch58data);
-
-/* char: 0x39 '9' */
-
-static final byte[] ch57data = {
-(byte) 0x7c,(byte) 0xfe,(byte) 0xc6,(byte) 0x3,(byte) 0x3,(byte) 0x3b,(byte) 0x7f,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc7,(byte) 0x7e,(byte) 0x3c,
-};
-
-static final BitmapCharRec ch57 = new BitmapCharRec(8,13,-1,0,10,ch57data);
-
-/* char: 0x38 '8' */
-
-static final byte[] ch56data = {
-(byte) 0x3c,(byte) 0x7e,(byte) 0xe7,(byte) 0xc3,(byte) 0xc3,(byte) 0x66,(byte) 0x7e,(byte) 0x66,(byte) 0xc3,(byte) 0xc3,(byte) 0xe7,(byte) 0x7e,(byte) 0x3c,
-};
-
-static final BitmapCharRec ch56 = new BitmapCharRec(8,13,-1,0,10,ch56data);
-
-/* char: 0x37 '7' */
-
-static final byte[] ch55data = {
-(byte) 0x60,(byte) 0x60,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x18,(byte) 0x18,(byte) 0xc,(byte) 0xc,(byte) 0x6,(byte) 0x3,(byte) 0xff,(byte) 0xff,
-};
-
-static final BitmapCharRec ch55 = new BitmapCharRec(8,13,-1,0,10,ch55data);
-
-/* char: 0x36 '6' */
-
-static final byte[] ch54data = {
-(byte) 0x3c,(byte) 0x7e,(byte) 0xe3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xfe,(byte) 0xdc,(byte) 0xc0,(byte) 0xc0,(byte) 0x63,(byte) 0x7f,(byte) 0x3c,
-};
-
-static final BitmapCharRec ch54 = new BitmapCharRec(8,13,-1,0,10,ch54data);
-
-/* char: 0x35 '5' */
-
-static final byte[] ch53data = {
-(byte) 0x7c,(byte) 0xfe,(byte) 0xc7,(byte) 0xc3,(byte) 0x3,(byte) 0x3,(byte) 0xc7,(byte) 0xfe,(byte) 0xfc,(byte) 0xc0,(byte) 0xc0,(byte) 0xfe,(byte) 0xfe,
-};
-
-static final BitmapCharRec ch53 = new BitmapCharRec(8,13,-1,0,10,ch53data);
-
-/* char: 0x34 '4' */
-
-static final byte[] ch52data = {
-(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0xc3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x33,(byte) 0x0,
-(byte) 0x33,(byte) 0x0,(byte) 0x1b,(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x7,(byte) 0x0,(byte) 0x3,(byte) 0x0,
-};
-
-static final BitmapCharRec ch52 = new BitmapCharRec(9,13,-1,0,10,ch52data);
-
-/* char: 0x33 '3' */
-
-static final byte[] ch51data = {
-(byte) 0x3c,(byte) 0x7e,(byte) 0xc7,(byte) 0xc3,(byte) 0x3,(byte) 0x7,(byte) 0x1e,(byte) 0x1c,(byte) 0x6,(byte) 0xc3,(byte) 0xc3,(byte) 0x7e,(byte) 0x3c,
-};
-
-static final BitmapCharRec ch51 = new BitmapCharRec(8,13,-1,0,10,ch51data);
-
-/* char: 0x32 '2' */
-
-static final byte[] ch50data = {
-(byte) 0xff,(byte) 0xff,(byte) 0xc0,(byte) 0xe0,(byte) 0x70,(byte) 0x38,(byte) 0x1c,(byte) 0xe,(byte) 0x7,(byte) 0x3,(byte) 0xc3,(byte) 0xfe,(byte) 0x3c,
-};
-
-static final BitmapCharRec ch50 = new BitmapCharRec(8,13,-1,0,10,ch50data);
-
-/* char: 0x31 '1' */
-
-static final byte[] ch49data = {
-(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0xf8,(byte) 0xf8,(byte) 0x18,
-};
-
-static final BitmapCharRec ch49 = new BitmapCharRec(5,13,-2,0,10,ch49data);
-
-/* char: 0x30 '0' */
-
-static final byte[] ch48data = {
-(byte) 0x3c,(byte) 0x7e,(byte) 0x66,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0xc3,(byte) 0x66,(byte) 0x7e,(byte) 0x3c,
-};
-
-static final BitmapCharRec ch48 = new BitmapCharRec(8,13,-1,0,10,ch48data);
-
-/* char: 0x2f '/' */
-
-static final byte[] ch47data = {
-(byte) 0xc0,(byte) 0xc0,(byte) 0x40,(byte) 0x40,(byte) 0x60,(byte) 0x60,(byte) 0x20,(byte) 0x20,(byte) 0x30,(byte) 0x30,(byte) 0x10,(byte) 0x10,(byte) 0x18,(byte) 0x18,
-};
-
-static final BitmapCharRec ch47 = new BitmapCharRec(5,14,0,0,5,ch47data);
-
-/* char: 0x2e '.' */
-
-static final byte[] ch46data = {
-(byte) 0xc0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch46 = new BitmapCharRec(2,2,-1,0,5,ch46data);
-
-/* char: 0x2d '-' */
-
-static final byte[] ch45data = {
-(byte) 0xff,(byte) 0xff,
-};
-
-static final BitmapCharRec ch45 = new BitmapCharRec(8,2,-1,-4,11,ch45data);
-
-/* char: 0x2c ',' */
-
-static final byte[] ch44data = {
-(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch44 = new BitmapCharRec(2,5,-1,3,5,ch44data);
-
-/* char: 0x2b '+' */
-
-static final byte[] ch43data = {
-(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0xff,(byte) 0xff,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,
-};
-
-static final BitmapCharRec ch43 = new BitmapCharRec(8,10,-1,0,10,ch43data);
-
-/* char: 0x2a '*' */
-
-static final byte[] ch42data = {
-(byte) 0x88,(byte) 0x70,(byte) 0x70,(byte) 0xf8,(byte) 0x20,(byte) 0x20,
-};
-
-static final BitmapCharRec ch42 = new BitmapCharRec(5,6,-1,-8,7,ch42data);
-
-/* char: 0x29 ')' */
-
-static final byte[] ch41data = {
-(byte) 0x80,(byte) 0xc0,(byte) 0x60,(byte) 0x60,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x60,(byte) 0x60,
-(byte) 0xc0,(byte) 0x80,
-};
-
-static final BitmapCharRec ch41 = new BitmapCharRec(4,18,-1,4,6,ch41data);
-
-/* char: 0x28 '(' */
-
-static final byte[] ch40data = {
-(byte) 0x10,(byte) 0x30,(byte) 0x60,(byte) 0x60,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x60,(byte) 0x60,
-(byte) 0x30,(byte) 0x10,
-};
-
-static final BitmapCharRec ch40 = new BitmapCharRec(4,18,-1,4,6,ch40data);
-
-/* char: 0x27 ''' */
-
-static final byte[] ch39data = {
-(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch39 = new BitmapCharRec(2,5,-1,-9,4,ch39data);
-
-/* char: 0x26 '&' */
-
-static final byte[] ch38data = {
-(byte) 0x3c,(byte) 0x70,(byte) 0x7e,(byte) 0xe0,(byte) 0xe7,(byte) 0xc0,(byte) 0xc3,(byte) 0x80,(byte) 0xc3,(byte) 0xc0,(byte) 0xc6,(byte) 0xc0,(byte) 0xee,(byte) 0xc0,(byte) 0x7c,(byte) 0x0,
-(byte) 0x3c,(byte) 0x0,(byte) 0x66,(byte) 0x0,(byte) 0x66,(byte) 0x0,(byte) 0x7e,(byte) 0x0,(byte) 0x3c,(byte) 0x0,
-};
-
-static final BitmapCharRec ch38 = new BitmapCharRec(12,13,-1,0,13,ch38data);
-
-/* char: 0x25 '%' */
-
-static final byte[] ch37data = {
-(byte) 0x18,(byte) 0x78,(byte) 0x18,(byte) 0xfc,(byte) 0xc,(byte) 0xcc,(byte) 0xc,(byte) 0xcc,(byte) 0x6,(byte) 0xfc,(byte) 0x6,(byte) 0x78,(byte) 0x3,(byte) 0x0,(byte) 0x7b,(byte) 0x0,
-(byte) 0xfd,(byte) 0x80,(byte) 0xcd,(byte) 0x80,(byte) 0xcc,(byte) 0xc0,(byte) 0xfc,(byte) 0xc0,(byte) 0x78,(byte) 0x60,
-};
-
-static final BitmapCharRec ch37 = new BitmapCharRec(14,13,-1,0,16,ch37data);
-
-/* char: 0x24 '$' */
-
-static final byte[] ch36data = {
-(byte) 0x8,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0xeb,(byte) 0x80,(byte) 0xc9,(byte) 0x80,(byte) 0x9,(byte) 0x80,(byte) 0xf,(byte) 0x0,
-(byte) 0x3e,(byte) 0x0,(byte) 0x78,(byte) 0x0,(byte) 0xe8,(byte) 0x0,(byte) 0xc8,(byte) 0x0,(byte) 0xcb,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x8,(byte) 0x0,
-};
-
-static final BitmapCharRec ch36 = new BitmapCharRec(9,16,-1,2,10,ch36data);
-
-/* char: 0x23 '#' */
-
-static final byte[] ch35data = {
-(byte) 0x24,(byte) 0x0,(byte) 0x24,(byte) 0x0,(byte) 0x24,(byte) 0x0,(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0x80,(byte) 0x12,(byte) 0x0,(byte) 0x12,(byte) 0x0,(byte) 0x12,(byte) 0x0,
-(byte) 0x7f,(byte) 0xc0,(byte) 0x7f,(byte) 0xc0,(byte) 0x9,(byte) 0x0,(byte) 0x9,(byte) 0x0,(byte) 0x9,(byte) 0x0,
-};
-
-static final BitmapCharRec ch35 = new BitmapCharRec(10,13,0,0,10,ch35data);
-
-/* char: 0x22 '"' */
-
-static final byte[] ch34data = {
-(byte) 0x90,(byte) 0x90,(byte) 0xd8,(byte) 0xd8,(byte) 0xd8,
-};
-
-static final BitmapCharRec ch34 = new BitmapCharRec(5,5,0,-9,5,ch34data);
-
-/* char: 0x21 '!' */
-
-static final byte[] ch33data = {
-(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x80,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch33 = new BitmapCharRec(2,14,-2,0,6,ch33data);
-
-/* char: 0x20 ' ' */
-
-static final BitmapCharRec ch32 = new BitmapCharRec(0,0,0,0,5,null);
-
-static final BitmapCharRec[] chars = {
-ch32,
-ch33,
-ch34,
-ch35,
-ch36,
-ch37,
-ch38,
-ch39,
-ch40,
-ch41,
-ch42,
-ch43,
-ch44,
-ch45,
-ch46,
-ch47,
-ch48,
-ch49,
-ch50,
-ch51,
-ch52,
-ch53,
-ch54,
-ch55,
-ch56,
-ch57,
-ch58,
-ch59,
-ch60,
-ch61,
-ch62,
-ch63,
-ch64,
-ch65,
-ch66,
-ch67,
-ch68,
-ch69,
-ch70,
-ch71,
-ch72,
-ch73,
-ch74,
-ch75,
-ch76,
-ch77,
-ch78,
-ch79,
-ch80,
-ch81,
-ch82,
-ch83,
-ch84,
-ch85,
-ch86,
-ch87,
-ch88,
-ch89,
-ch90,
-ch91,
-ch92,
-ch93,
-ch94,
-ch95,
-ch96,
-ch97,
-ch98,
-ch99,
-ch100,
-ch101,
-ch102,
-ch103,
-ch104,
-ch105,
-ch106,
-ch107,
-ch108,
-ch109,
-ch110,
-ch111,
-ch112,
-ch113,
-ch114,
-ch115,
-ch116,
-ch117,
-ch118,
-ch119,
-ch120,
-ch121,
-ch122,
-ch123,
-ch124,
-ch125,
-ch126,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-ch160,
-ch161,
-ch162,
-ch163,
-ch164,
-ch165,
-ch166,
-ch167,
-ch168,
-ch169,
-ch170,
-ch171,
-ch172,
-ch173,
-ch174,
-ch175,
-ch176,
-ch177,
-ch178,
-ch179,
-ch180,
-ch181,
-ch182,
-ch183,
-ch184,
-ch185,
-ch186,
-ch187,
-ch188,
-ch189,
-ch190,
-ch191,
-ch192,
-ch193,
-ch194,
-ch195,
-ch196,
-ch197,
-ch198,
-ch199,
-ch200,
-ch201,
-ch202,
-ch203,
-ch204,
-ch205,
-ch206,
-ch207,
-ch208,
-ch209,
-ch210,
-ch211,
-ch212,
-ch213,
-ch214,
-ch215,
-ch216,
-ch217,
-ch218,
-ch219,
-ch220,
-ch221,
-ch222,
-ch223,
-ch224,
-ch225,
-ch226,
-ch227,
-ch228,
-ch229,
-ch230,
-ch231,
-ch232,
-ch233,
-ch234,
-ch235,
-ch236,
-ch237,
-ch238,
-ch239,
-ch240,
-ch241,
-ch242,
-ch243,
-ch244,
-ch245,
-ch246,
-ch247,
-ch248,
-ch249,
-ch250,
-ch251,
-ch252,
-ch253,
-ch254,
-ch255,
-};
-
- public static final BitmapFontRec glutBitmapHelvetica18 = new BitmapFontRec("-adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1",
- 224,
- 32,
- chars);
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/gl2/GLUTBitmapTimesRoman10.java b/src/jogl/classes/com/sun/opengl/util/gl2/GLUTBitmapTimesRoman10.java
deleted file mode 100644
index 32699863f..000000000
--- a/src/jogl/classes/com/sun/opengl/util/gl2/GLUTBitmapTimesRoman10.java
+++ /dev/null
@@ -1,1797 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.util.gl2;
-
-class GLUTBitmapTimesRoman10 {
-
-/* GENERATED FILE -- DO NOT MODIFY */
-
-/* char: 0xff */
-
-static final byte[] ch255data = {
-(byte) 0x80,(byte) 0xc0,(byte) 0x40,(byte) 0x60,(byte) 0xa0,(byte) 0x90,(byte) 0xb8,(byte) 0x0,(byte) 0xa0,
-};
-
-static final BitmapCharRec ch255 = new BitmapCharRec(5,9,0,2,5,ch255data);
-
-/* char: 0xfe */
-
-static final byte[] ch254data = {
-(byte) 0xc0,(byte) 0x80,(byte) 0xe0,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0xe0,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch254 = new BitmapCharRec(4,9,0,2,5,ch254data);
-
-/* char: 0xfd */
-
-static final byte[] ch253data = {
-(byte) 0x80,(byte) 0xc0,(byte) 0x40,(byte) 0x60,(byte) 0xa0,(byte) 0x90,(byte) 0xb8,(byte) 0x0,(byte) 0x20,(byte) 0x10,
-};
-
-static final BitmapCharRec ch253 = new BitmapCharRec(5,10,0,2,5,ch253data);
-
-/* char: 0xfc */
-
-static final byte[] ch252data = {
-(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x0,(byte) 0x50,
-};
-
-static final BitmapCharRec ch252 = new BitmapCharRec(5,7,0,0,5,ch252data);
-
-/* char: 0xfb */
-
-static final byte[] ch251data = {
-(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x0,(byte) 0x50,(byte) 0x20,
-};
-
-static final BitmapCharRec ch251 = new BitmapCharRec(5,8,0,0,5,ch251data);
-
-/* char: 0xfa */
-
-static final byte[] ch250data = {
-(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x0,(byte) 0x40,(byte) 0x20,
-};
-
-static final BitmapCharRec ch250 = new BitmapCharRec(5,8,0,0,5,ch250data);
-
-/* char: 0xf9 */
-
-static final byte[] ch249data = {
-(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x0,(byte) 0x20,(byte) 0x40,
-};
-
-static final BitmapCharRec ch249 = new BitmapCharRec(5,8,0,0,5,ch249data);
-
-/* char: 0xf8 */
-
-static final byte[] ch248data = {
-(byte) 0x80,(byte) 0x70,(byte) 0x48,(byte) 0x48,(byte) 0x48,(byte) 0x38,(byte) 0x4,
-};
-
-static final BitmapCharRec ch248 = new BitmapCharRec(6,7,1,1,5,ch248data);
-
-/* char: 0xf7 */
-
-static final byte[] ch247data = {
-(byte) 0x20,(byte) 0x0,(byte) 0xf8,(byte) 0x0,(byte) 0x20,
-};
-
-static final BitmapCharRec ch247 = new BitmapCharRec(5,5,0,0,6,ch247data);
-
-/* char: 0xf6 */
-
-static final byte[] ch246data = {
-(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x60,(byte) 0x0,(byte) 0xa0,
-};
-
-static final BitmapCharRec ch246 = new BitmapCharRec(4,7,0,0,5,ch246data);
-
-/* char: 0xf5 */
-
-static final byte[] ch245data = {
-(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x60,(byte) 0x0,(byte) 0xa0,(byte) 0x50,
-};
-
-static final BitmapCharRec ch245 = new BitmapCharRec(4,8,0,0,5,ch245data);
-
-/* char: 0xf4 */
-
-static final byte[] ch244data = {
-(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x60,(byte) 0x0,(byte) 0xa0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch244 = new BitmapCharRec(4,8,0,0,5,ch244data);
-
-/* char: 0xf3 */
-
-static final byte[] ch243data = {
-(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x60,(byte) 0x0,(byte) 0x40,(byte) 0x20,
-};
-
-static final BitmapCharRec ch243 = new BitmapCharRec(4,8,0,0,5,ch243data);
-
-/* char: 0xf2 */
-
-static final byte[] ch242data = {
-(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x60,(byte) 0x0,(byte) 0x20,(byte) 0x40,
-};
-
-static final BitmapCharRec ch242 = new BitmapCharRec(4,8,0,0,5,ch242data);
-
-/* char: 0xf1 */
-
-static final byte[] ch241data = {
-(byte) 0xd8,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0xe0,(byte) 0x0,(byte) 0xa0,(byte) 0x50,
-};
-
-static final BitmapCharRec ch241 = new BitmapCharRec(5,8,0,0,5,ch241data);
-
-/* char: 0xf0 */
-
-static final byte[] ch240data = {
-(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x70,(byte) 0xa0,(byte) 0x70,(byte) 0x40,
-};
-
-static final BitmapCharRec ch240 = new BitmapCharRec(4,8,0,0,5,ch240data);
-
-/* char: 0xef */
-
-static final byte[] ch239data = {
-(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x0,(byte) 0xa0,
-};
-
-static final BitmapCharRec ch239 = new BitmapCharRec(3,7,0,0,4,ch239data);
-
-/* char: 0xee */
-
-static final byte[] ch238data = {
-(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x0,(byte) 0xa0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch238 = new BitmapCharRec(3,8,0,0,4,ch238data);
-
-/* char: 0xed */
-
-static final byte[] ch237data = {
-(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x0,(byte) 0x40,(byte) 0x20,
-};
-
-static final BitmapCharRec ch237 = new BitmapCharRec(3,8,0,0,4,ch237data);
-
-/* char: 0xec */
-
-static final byte[] ch236data = {
-(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x0,(byte) 0x40,(byte) 0x80,
-};
-
-static final BitmapCharRec ch236 = new BitmapCharRec(3,8,0,0,4,ch236data);
-
-/* char: 0xeb */
-
-static final byte[] ch235data = {
-(byte) 0x60,(byte) 0x80,(byte) 0xc0,(byte) 0xa0,(byte) 0x60,(byte) 0x0,(byte) 0xa0,
-};
-
-static final BitmapCharRec ch235 = new BitmapCharRec(3,7,0,0,4,ch235data);
-
-/* char: 0xea */
-
-static final byte[] ch234data = {
-(byte) 0x60,(byte) 0x80,(byte) 0xc0,(byte) 0xa0,(byte) 0x60,(byte) 0x0,(byte) 0xa0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch234 = new BitmapCharRec(3,8,0,0,4,ch234data);
-
-/* char: 0xe9 */
-
-static final byte[] ch233data = {
-(byte) 0x60,(byte) 0x80,(byte) 0xc0,(byte) 0xa0,(byte) 0x60,(byte) 0x0,(byte) 0x40,(byte) 0x20,
-};
-
-static final BitmapCharRec ch233 = new BitmapCharRec(3,8,0,0,4,ch233data);
-
-/* char: 0xe8 */
-
-static final byte[] ch232data = {
-(byte) 0x60,(byte) 0x80,(byte) 0xc0,(byte) 0xa0,(byte) 0x60,(byte) 0x0,(byte) 0x40,(byte) 0x80,
-};
-
-static final BitmapCharRec ch232 = new BitmapCharRec(3,8,0,0,4,ch232data);
-
-/* char: 0xe7 */
-
-static final byte[] ch231data = {
-(byte) 0xc0,(byte) 0x20,(byte) 0x40,(byte) 0x60,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x60,
-};
-
-static final BitmapCharRec ch231 = new BitmapCharRec(3,8,0,3,4,ch231data);
-
-/* char: 0xe6 */
-
-static final byte[] ch230data = {
-(byte) 0xd8,(byte) 0xa0,(byte) 0x70,(byte) 0x28,(byte) 0xd8,
-};
-
-static final BitmapCharRec ch230 = new BitmapCharRec(5,5,0,0,6,ch230data);
-
-/* char: 0xe5 */
-
-static final byte[] ch229data = {
-(byte) 0xe0,(byte) 0xa0,(byte) 0x60,(byte) 0x20,(byte) 0xc0,(byte) 0x40,(byte) 0xa0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch229 = new BitmapCharRec(3,8,0,0,4,ch229data);
-
-/* char: 0xe4 */
-
-static final byte[] ch228data = {
-(byte) 0xe0,(byte) 0xa0,(byte) 0x60,(byte) 0x20,(byte) 0xc0,(byte) 0x0,(byte) 0xa0,
-};
-
-static final BitmapCharRec ch228 = new BitmapCharRec(3,7,0,0,4,ch228data);
-
-/* char: 0xe3 */
-
-static final byte[] ch227data = {
-(byte) 0xe0,(byte) 0xa0,(byte) 0x60,(byte) 0x20,(byte) 0xc0,(byte) 0x0,(byte) 0xa0,(byte) 0x50,
-};
-
-static final BitmapCharRec ch227 = new BitmapCharRec(4,8,0,0,4,ch227data);
-
-/* char: 0xe2 */
-
-static final byte[] ch226data = {
-(byte) 0xe0,(byte) 0xa0,(byte) 0x60,(byte) 0x20,(byte) 0xc0,(byte) 0x0,(byte) 0xa0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch226 = new BitmapCharRec(3,8,0,0,4,ch226data);
-
-/* char: 0xe1 */
-
-static final byte[] ch225data = {
-(byte) 0xe0,(byte) 0xa0,(byte) 0x60,(byte) 0x20,(byte) 0xc0,(byte) 0x0,(byte) 0x40,(byte) 0x20,
-};
-
-static final BitmapCharRec ch225 = new BitmapCharRec(3,8,0,0,4,ch225data);
-
-/* char: 0xe0 */
-
-static final byte[] ch224data = {
-(byte) 0xe0,(byte) 0xa0,(byte) 0x60,(byte) 0x20,(byte) 0xc0,(byte) 0x0,(byte) 0x40,(byte) 0x80,
-};
-
-static final BitmapCharRec ch224 = new BitmapCharRec(3,8,0,0,4,ch224data);
-
-/* char: 0xdf */
-
-static final byte[] ch223data = {
-(byte) 0xe0,(byte) 0x50,(byte) 0x50,(byte) 0x60,(byte) 0x50,(byte) 0x50,(byte) 0x20,
-};
-
-static final BitmapCharRec ch223 = new BitmapCharRec(4,7,0,0,5,ch223data);
-
-/* char: 0xde */
-
-static final byte[] ch222data = {
-(byte) 0xe0,(byte) 0x40,(byte) 0x70,(byte) 0x48,(byte) 0x70,(byte) 0x40,(byte) 0xe0,
-};
-
-static final BitmapCharRec ch222 = new BitmapCharRec(5,7,0,0,6,ch222data);
-
-/* char: 0xdd */
-
-static final byte[] ch221data = {
-(byte) 0x38,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x28,(byte) 0x44,(byte) 0xee,(byte) 0x0,(byte) 0x10,(byte) 0x8,
-};
-
-static final BitmapCharRec ch221 = new BitmapCharRec(7,10,0,0,8,ch221data);
-
-/* char: 0xdc */
-
-static final byte[] ch220data = {
-(byte) 0x38,(byte) 0x6c,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0xee,(byte) 0x0,(byte) 0x28,
-};
-
-static final BitmapCharRec ch220 = new BitmapCharRec(7,9,0,0,8,ch220data);
-
-/* char: 0xdb */
-
-static final byte[] ch219data = {
-(byte) 0x38,(byte) 0x6c,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0xee,(byte) 0x0,(byte) 0x28,(byte) 0x10,
-};
-
-static final BitmapCharRec ch219 = new BitmapCharRec(7,10,0,0,8,ch219data);
-
-/* char: 0xda */
-
-static final byte[] ch218data = {
-(byte) 0x38,(byte) 0x6c,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0xee,(byte) 0x0,(byte) 0x10,(byte) 0x8,
-};
-
-static final BitmapCharRec ch218 = new BitmapCharRec(7,10,0,0,8,ch218data);
-
-/* char: 0xd9 */
-
-static final byte[] ch217data = {
-(byte) 0x38,(byte) 0x6c,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0xee,(byte) 0x0,(byte) 0x10,(byte) 0x20,
-};
-
-static final BitmapCharRec ch217 = new BitmapCharRec(7,10,0,0,8,ch217data);
-
-/* char: 0xd8 */
-
-static final byte[] ch216data = {
-(byte) 0x80,(byte) 0x7c,(byte) 0x66,(byte) 0x52,(byte) 0x52,(byte) 0x4a,(byte) 0x66,(byte) 0x3e,(byte) 0x1,
-};
-
-static final BitmapCharRec ch216 = new BitmapCharRec(8,9,0,1,8,ch216data);
-
-/* char: 0xd7 */
-
-static final byte[] ch215data = {
-(byte) 0x88,(byte) 0x50,(byte) 0x20,(byte) 0x50,(byte) 0x88,
-};
-
-static final BitmapCharRec ch215 = new BitmapCharRec(5,5,0,0,6,ch215data);
-
-/* char: 0xd6 */
-
-static final byte[] ch214data = {
-(byte) 0x78,(byte) 0xcc,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xcc,(byte) 0x78,(byte) 0x0,(byte) 0x50,
-};
-
-static final BitmapCharRec ch214 = new BitmapCharRec(6,9,0,0,7,ch214data);
-
-/* char: 0xd5 */
-
-static final byte[] ch213data = {
-(byte) 0x78,(byte) 0xcc,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xcc,(byte) 0x78,(byte) 0x0,(byte) 0x50,(byte) 0x28,
-};
-
-static final BitmapCharRec ch213 = new BitmapCharRec(6,10,0,0,7,ch213data);
-
-/* char: 0xd4 */
-
-static final byte[] ch212data = {
-(byte) 0x78,(byte) 0xcc,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xcc,(byte) 0x78,(byte) 0x0,(byte) 0x50,(byte) 0x20,
-};
-
-static final BitmapCharRec ch212 = new BitmapCharRec(6,10,0,0,7,ch212data);
-
-/* char: 0xd3 */
-
-static final byte[] ch211data = {
-(byte) 0x78,(byte) 0xcc,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xcc,(byte) 0x78,(byte) 0x0,(byte) 0x10,(byte) 0x8,
-};
-
-static final BitmapCharRec ch211 = new BitmapCharRec(6,10,0,0,7,ch211data);
-
-/* char: 0xd2 */
-
-static final byte[] ch210data = {
-(byte) 0x78,(byte) 0xcc,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xcc,(byte) 0x78,(byte) 0x0,(byte) 0x20,(byte) 0x40,
-};
-
-static final BitmapCharRec ch210 = new BitmapCharRec(6,10,0,0,7,ch210data);
-
-/* char: 0xd1 */
-
-static final byte[] ch209data = {
-(byte) 0xe4,(byte) 0x4c,(byte) 0x4c,(byte) 0x54,(byte) 0x54,(byte) 0x64,(byte) 0xee,(byte) 0x0,(byte) 0x50,(byte) 0x28,
-};
-
-static final BitmapCharRec ch209 = new BitmapCharRec(7,10,0,0,8,ch209data);
-
-/* char: 0xd0 */
-
-static final byte[] ch208data = {
-(byte) 0xf8,(byte) 0x4c,(byte) 0x44,(byte) 0xe4,(byte) 0x44,(byte) 0x4c,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch208 = new BitmapCharRec(6,7,0,0,7,ch208data);
-
-/* char: 0xcf */
-
-static final byte[] ch207data = {
-(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,(byte) 0x0,(byte) 0xa0,
-};
-
-static final BitmapCharRec ch207 = new BitmapCharRec(3,9,0,0,4,ch207data);
-
-/* char: 0xce */
-
-static final byte[] ch206data = {
-(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,(byte) 0x0,(byte) 0xa0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch206 = new BitmapCharRec(3,10,0,0,4,ch206data);
-
-/* char: 0xcd */
-
-static final byte[] ch205data = {
-(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,(byte) 0x0,(byte) 0x40,(byte) 0x20,
-};
-
-static final BitmapCharRec ch205 = new BitmapCharRec(3,10,0,0,4,ch205data);
-
-/* char: 0xcc */
-
-static final byte[] ch204data = {
-(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,(byte) 0x0,(byte) 0x40,(byte) 0x80,
-};
-
-static final BitmapCharRec ch204 = new BitmapCharRec(3,10,0,0,4,ch204data);
-
-/* char: 0xcb */
-
-static final byte[] ch203data = {
-(byte) 0xf8,(byte) 0x48,(byte) 0x40,(byte) 0x70,(byte) 0x40,(byte) 0x48,(byte) 0xf8,(byte) 0x0,(byte) 0x50,
-};
-
-static final BitmapCharRec ch203 = new BitmapCharRec(5,9,0,0,6,ch203data);
-
-/* char: 0xca */
-
-static final byte[] ch202data = {
-(byte) 0xf8,(byte) 0x48,(byte) 0x40,(byte) 0x70,(byte) 0x40,(byte) 0x48,(byte) 0xf8,(byte) 0x0,(byte) 0x50,(byte) 0x20,
-};
-
-static final BitmapCharRec ch202 = new BitmapCharRec(5,10,0,0,6,ch202data);
-
-/* char: 0xc9 */
-
-static final byte[] ch201data = {
-(byte) 0xf8,(byte) 0x48,(byte) 0x40,(byte) 0x70,(byte) 0x40,(byte) 0x48,(byte) 0xf8,(byte) 0x0,(byte) 0x20,(byte) 0x10,
-};
-
-static final BitmapCharRec ch201 = new BitmapCharRec(5,10,0,0,6,ch201data);
-
-/* char: 0xc8 */
-
-static final byte[] ch200data = {
-(byte) 0xf8,(byte) 0x48,(byte) 0x40,(byte) 0x70,(byte) 0x40,(byte) 0x48,(byte) 0xf8,(byte) 0x0,(byte) 0x20,(byte) 0x40,
-};
-
-static final BitmapCharRec ch200 = new BitmapCharRec(5,10,0,0,6,ch200data);
-
-/* char: 0xc7 */
-
-static final byte[] ch199data = {
-(byte) 0x60,(byte) 0x10,(byte) 0x20,(byte) 0x78,(byte) 0xc4,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xc4,(byte) 0x7c,
-};
-
-static final BitmapCharRec ch199 = new BitmapCharRec(6,10,0,3,7,ch199data);
-
-/* char: 0xc6 */
-
-static final byte[] ch198data = {
-(byte) 0xef,(byte) 0x49,(byte) 0x78,(byte) 0x2e,(byte) 0x28,(byte) 0x39,(byte) 0x1f,
-};
-
-static final BitmapCharRec ch198 = new BitmapCharRec(8,7,0,0,9,ch198data);
-
-/* char: 0xc5 */
-
-static final byte[] ch197data = {
-(byte) 0xee,(byte) 0x44,(byte) 0x7c,(byte) 0x28,(byte) 0x28,(byte) 0x38,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x10,
-};
-
-static final BitmapCharRec ch197 = new BitmapCharRec(7,10,0,0,8,ch197data);
-
-/* char: 0xc4 */
-
-static final byte[] ch196data = {
-(byte) 0xee,(byte) 0x44,(byte) 0x7c,(byte) 0x28,(byte) 0x28,(byte) 0x38,(byte) 0x10,(byte) 0x0,(byte) 0x28,
-};
-
-static final BitmapCharRec ch196 = new BitmapCharRec(7,9,0,0,8,ch196data);
-
-/* char: 0xc3 */
-
-static final byte[] ch195data = {
-(byte) 0xee,(byte) 0x44,(byte) 0x7c,(byte) 0x28,(byte) 0x28,(byte) 0x38,(byte) 0x10,(byte) 0x0,(byte) 0x28,(byte) 0x14,
-};
-
-static final BitmapCharRec ch195 = new BitmapCharRec(7,10,0,0,8,ch195data);
-
-/* char: 0xc2 */
-
-static final byte[] ch194data = {
-(byte) 0xee,(byte) 0x44,(byte) 0x7c,(byte) 0x28,(byte) 0x28,(byte) 0x38,(byte) 0x10,(byte) 0x0,(byte) 0x28,(byte) 0x10,
-};
-
-static final BitmapCharRec ch194 = new BitmapCharRec(7,10,0,0,8,ch194data);
-
-/* char: 0xc1 */
-
-static final byte[] ch193data = {
-(byte) 0xee,(byte) 0x44,(byte) 0x7c,(byte) 0x28,(byte) 0x28,(byte) 0x38,(byte) 0x10,(byte) 0x0,(byte) 0x10,(byte) 0x8,
-};
-
-static final BitmapCharRec ch193 = new BitmapCharRec(7,10,0,0,8,ch193data);
-
-/* char: 0xc0 */
-
-static final byte[] ch192data = {
-(byte) 0xee,(byte) 0x44,(byte) 0x7c,(byte) 0x28,(byte) 0x28,(byte) 0x38,(byte) 0x10,(byte) 0x0,(byte) 0x10,(byte) 0x20,
-};
-
-static final BitmapCharRec ch192 = new BitmapCharRec(7,10,0,0,8,ch192data);
-
-/* char: 0xbf */
-
-static final byte[] ch191data = {
-(byte) 0xe0,(byte) 0xa0,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch191 = new BitmapCharRec(3,7,0,2,4,ch191data);
-
-/* char: 0xbe */
-
-static final byte[] ch190data = {
-(byte) 0x44,(byte) 0x3e,(byte) 0x2c,(byte) 0xd4,(byte) 0x28,(byte) 0x48,(byte) 0xe4,
-};
-
-static final BitmapCharRec ch190 = new BitmapCharRec(7,7,0,0,8,ch190data);
-
-/* char: 0xbd */
-
-static final byte[] ch189data = {
-(byte) 0x4e,(byte) 0x24,(byte) 0x2a,(byte) 0xf6,(byte) 0x48,(byte) 0xc8,(byte) 0x44,
-};
-
-static final BitmapCharRec ch189 = new BitmapCharRec(7,7,0,0,8,ch189data);
-
-/* char: 0xbc */
-
-static final byte[] ch188data = {
-(byte) 0x44,(byte) 0x3e,(byte) 0x2c,(byte) 0xf4,(byte) 0x48,(byte) 0xc8,(byte) 0x44,
-};
-
-static final BitmapCharRec ch188 = new BitmapCharRec(7,7,0,0,8,ch188data);
-
-/* char: 0xbb */
-
-static final byte[] ch187data = {
-(byte) 0xa0,(byte) 0x50,(byte) 0x50,(byte) 0xa0,
-};
-
-static final BitmapCharRec ch187 = new BitmapCharRec(4,4,0,-1,5,ch187data);
-
-/* char: 0xba */
-
-static final byte[] ch186data = {
-(byte) 0xe0,(byte) 0x0,(byte) 0x40,(byte) 0xa0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch186 = new BitmapCharRec(3,5,0,-2,4,ch186data);
-
-/* char: 0xb9 */
-
-static final byte[] ch185data = {
-(byte) 0xe0,(byte) 0x40,(byte) 0xc0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch185 = new BitmapCharRec(3,4,0,-3,3,ch185data);
-
-/* char: 0xb8 */
-
-static final byte[] ch184data = {
-(byte) 0xc0,(byte) 0x20,(byte) 0x40,
-};
-
-static final BitmapCharRec ch184 = new BitmapCharRec(3,3,0,3,4,ch184data);
-
-/* char: 0xb7 */
-
-static final byte[] ch183data = {
-(byte) 0x80,
-};
-
-static final BitmapCharRec ch183 = new BitmapCharRec(1,1,0,-2,2,ch183data);
-
-/* char: 0xb6 */
-
-static final byte[] ch182data = {
-(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x28,(byte) 0x68,(byte) 0xe8,(byte) 0xe8,(byte) 0xe8,(byte) 0x7c,
-};
-
-static final BitmapCharRec ch182 = new BitmapCharRec(6,9,0,2,6,ch182data);
-
-/* char: 0xb5 */
-
-static final byte[] ch181data = {
-(byte) 0x80,(byte) 0x80,(byte) 0xe8,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,
-};
-
-static final BitmapCharRec ch181 = new BitmapCharRec(5,7,0,2,5,ch181data);
-
-/* char: 0xb4 */
-
-static final byte[] ch180data = {
-(byte) 0x80,(byte) 0x40,
-};
-
-static final BitmapCharRec ch180 = new BitmapCharRec(2,2,0,-5,3,ch180data);
-
-/* char: 0xb3 */
-
-static final byte[] ch179data = {
-(byte) 0xc0,(byte) 0x20,(byte) 0x40,(byte) 0xe0,
-};
-
-static final BitmapCharRec ch179 = new BitmapCharRec(3,4,0,-3,3,ch179data);
-
-/* char: 0xb2 */
-
-static final byte[] ch178data = {
-(byte) 0xe0,(byte) 0x40,(byte) 0xa0,(byte) 0x60,
-};
-
-static final BitmapCharRec ch178 = new BitmapCharRec(3,4,0,-3,3,ch178data);
-
-/* char: 0xb1 */
-
-static final byte[] ch177data = {
-(byte) 0xf8,(byte) 0x0,(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x20,
-};
-
-static final BitmapCharRec ch177 = new BitmapCharRec(5,7,0,0,6,ch177data);
-
-/* char: 0xb0 */
-
-static final byte[] ch176data = {
-(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x60,
-};
-
-static final BitmapCharRec ch176 = new BitmapCharRec(4,4,0,-3,4,ch176data);
-
-/* char: 0xaf */
-
-static final byte[] ch175data = {
-(byte) 0xe0,
-};
-
-static final BitmapCharRec ch175 = new BitmapCharRec(3,1,0,-6,4,ch175data);
-
-/* char: 0xae */
-
-static final byte[] ch174data = {
-(byte) 0x38,(byte) 0x44,(byte) 0xaa,(byte) 0xb2,(byte) 0xba,(byte) 0x44,(byte) 0x38,
-};
-
-static final BitmapCharRec ch174 = new BitmapCharRec(7,7,-1,0,9,ch174data);
-
-/* char: 0xad */
-
-static final byte[] ch173data = {
-(byte) 0xe0,
-};
-
-static final BitmapCharRec ch173 = new BitmapCharRec(3,1,0,-2,4,ch173data);
-
-/* char: 0xac */
-
-static final byte[] ch172data = {
-(byte) 0x8,(byte) 0x8,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch172 = new BitmapCharRec(5,3,-1,-1,7,ch172data);
-
-/* char: 0xab */
-
-static final byte[] ch171data = {
-(byte) 0x50,(byte) 0xa0,(byte) 0xa0,(byte) 0x50,
-};
-
-static final BitmapCharRec ch171 = new BitmapCharRec(4,4,0,-1,5,ch171data);
-
-/* char: 0xaa */
-
-static final byte[] ch170data = {
-(byte) 0xe0,(byte) 0x0,(byte) 0xa0,(byte) 0x20,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch170 = new BitmapCharRec(3,5,0,-2,4,ch170data);
-
-/* char: 0xa9 */
-
-static final byte[] ch169data = {
-(byte) 0x38,(byte) 0x44,(byte) 0x9a,(byte) 0xa2,(byte) 0x9a,(byte) 0x44,(byte) 0x38,
-};
-
-static final BitmapCharRec ch169 = new BitmapCharRec(7,7,-1,0,9,ch169data);
-
-/* char: 0xa8 */
-
-static final byte[] ch168data = {
-(byte) 0xa0,
-};
-
-static final BitmapCharRec ch168 = new BitmapCharRec(3,1,-1,-6,5,ch168data);
-
-/* char: 0xa7 */
-
-static final byte[] ch167data = {
-(byte) 0xe0,(byte) 0x90,(byte) 0x20,(byte) 0x50,(byte) 0x90,(byte) 0xa0,(byte) 0x40,(byte) 0x90,(byte) 0x70,
-};
-
-static final BitmapCharRec ch167 = new BitmapCharRec(4,9,0,1,5,ch167data);
-
-/* char: 0xa6 */
-
-static final byte[] ch166data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch166 = new BitmapCharRec(1,7,0,0,2,ch166data);
-
-/* char: 0xa5 */
-
-static final byte[] ch165data = {
-(byte) 0x70,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0xd8,(byte) 0x50,(byte) 0x88,
-};
-
-static final BitmapCharRec ch165 = new BitmapCharRec(5,7,0,0,5,ch165data);
-
-/* char: 0xa4 */
-
-static final byte[] ch164data = {
-(byte) 0x88,(byte) 0x70,(byte) 0x50,(byte) 0x50,(byte) 0x70,(byte) 0x88,
-};
-
-static final BitmapCharRec ch164 = new BitmapCharRec(5,6,0,-1,5,ch164data);
-
-/* char: 0xa3 */
-
-static final byte[] ch163data = {
-(byte) 0xf0,(byte) 0xc8,(byte) 0x40,(byte) 0xe0,(byte) 0x40,(byte) 0x50,(byte) 0x30,
-};
-
-static final BitmapCharRec ch163 = new BitmapCharRec(5,7,0,0,5,ch163data);
-
-/* char: 0xa2 */
-
-static final byte[] ch162data = {
-(byte) 0x80,(byte) 0xe0,(byte) 0x90,(byte) 0x80,(byte) 0x90,(byte) 0x70,(byte) 0x10,
-};
-
-static final BitmapCharRec ch162 = new BitmapCharRec(4,7,0,1,5,ch162data);
-
-/* char: 0xa1 */
-
-static final byte[] ch161data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x80,
-};
-
-static final BitmapCharRec ch161 = new BitmapCharRec(1,7,-1,2,3,ch161data);
-
-/* char: 0xa0 */
-
-static final BitmapCharRec ch160 = new BitmapCharRec(0,0,0,0,2,null);
-
-/* char: 0x7e '~' */
-
-static final byte[] ch126data = {
-(byte) 0x98,(byte) 0x64,
-};
-
-static final BitmapCharRec ch126 = new BitmapCharRec(6,2,0,-2,7,ch126data);
-
-/* char: 0x7d '}' */
-
-static final byte[] ch125data = {
-(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x80,
-};
-
-static final BitmapCharRec ch125 = new BitmapCharRec(3,9,0,2,4,ch125data);
-
-/* char: 0x7c '|' */
-
-static final byte[] ch124data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch124 = new BitmapCharRec(1,9,0,2,2,ch124data);
-
-/* char: 0x7b '{' */
-
-static final byte[] ch123data = {
-(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x20,
-};
-
-static final BitmapCharRec ch123 = new BitmapCharRec(3,9,0,2,4,ch123data);
-
-/* char: 0x7a 'z' */
-
-static final byte[] ch122data = {
-(byte) 0xf0,(byte) 0x90,(byte) 0x40,(byte) 0x20,(byte) 0xf0,
-};
-
-static final BitmapCharRec ch122 = new BitmapCharRec(4,5,0,0,5,ch122data);
-
-/* char: 0x79 'y' */
-
-static final byte[] ch121data = {
-(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x30,(byte) 0x50,(byte) 0x48,(byte) 0xdc,
-};
-
-static final BitmapCharRec ch121 = new BitmapCharRec(6,7,1,2,5,ch121data);
-
-/* char: 0x78 'x' */
-
-static final byte[] ch120data = {
-(byte) 0xd8,(byte) 0x50,(byte) 0x20,(byte) 0x50,(byte) 0xd8,
-};
-
-static final BitmapCharRec ch120 = new BitmapCharRec(5,5,0,0,6,ch120data);
-
-/* char: 0x77 'w' */
-
-static final byte[] ch119data = {
-(byte) 0x28,(byte) 0x6c,(byte) 0x54,(byte) 0x92,(byte) 0xdb,
-};
-
-static final BitmapCharRec ch119 = new BitmapCharRec(8,5,0,0,8,ch119data);
-
-/* char: 0x76 'v' */
-
-static final byte[] ch118data = {
-(byte) 0x20,(byte) 0x60,(byte) 0x50,(byte) 0x90,(byte) 0xd8,
-};
-
-static final BitmapCharRec ch118 = new BitmapCharRec(5,5,0,0,5,ch118data);
-
-/* char: 0x75 'u' */
-
-static final byte[] ch117data = {
-(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,
-};
-
-static final BitmapCharRec ch117 = new BitmapCharRec(5,5,0,0,5,ch117data);
-
-/* char: 0x74 't' */
-
-static final byte[] ch116data = {
-(byte) 0x30,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch116 = new BitmapCharRec(4,6,0,0,4,ch116data);
-
-/* char: 0x73 's' */
-
-static final byte[] ch115data = {
-(byte) 0xe0,(byte) 0x20,(byte) 0x60,(byte) 0x80,(byte) 0xe0,
-};
-
-static final BitmapCharRec ch115 = new BitmapCharRec(3,5,0,0,4,ch115data);
-
-/* char: 0x72 'r' */
-
-static final byte[] ch114data = {
-(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x60,(byte) 0xa0,
-};
-
-static final BitmapCharRec ch114 = new BitmapCharRec(3,5,0,0,4,ch114data);
-
-/* char: 0x71 'q' */
-
-static final byte[] ch113data = {
-(byte) 0x38,(byte) 0x10,(byte) 0x70,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x70,
-};
-
-static final BitmapCharRec ch113 = new BitmapCharRec(5,7,0,2,5,ch113data);
-
-/* char: 0x70 'p' */
-
-static final byte[] ch112data = {
-(byte) 0xc0,(byte) 0x80,(byte) 0xe0,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0xe0,
-};
-
-static final BitmapCharRec ch112 = new BitmapCharRec(4,7,0,2,5,ch112data);
-
-/* char: 0x6f 'o' */
-
-static final byte[] ch111data = {
-(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x60,
-};
-
-static final BitmapCharRec ch111 = new BitmapCharRec(4,5,0,0,5,ch111data);
-
-/* char: 0x6e 'n' */
-
-static final byte[] ch110data = {
-(byte) 0xd8,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0xe0,
-};
-
-static final BitmapCharRec ch110 = new BitmapCharRec(5,5,0,0,5,ch110data);
-
-/* char: 0x6d 'm' */
-
-static final byte[] ch109data = {
-(byte) 0xdb,(byte) 0x92,(byte) 0x92,(byte) 0x92,(byte) 0xec,
-};
-
-static final BitmapCharRec ch109 = new BitmapCharRec(8,5,0,0,8,ch109data);
-
-/* char: 0x6c 'l' */
-
-static final byte[] ch108data = {
-(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch108 = new BitmapCharRec(3,7,0,0,4,ch108data);
-
-/* char: 0x6b 'k' */
-
-static final byte[] ch107data = {
-(byte) 0x98,(byte) 0x90,(byte) 0xe0,(byte) 0xa0,(byte) 0x90,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch107 = new BitmapCharRec(5,7,0,0,5,ch107data);
-
-/* char: 0x6a 'j' */
-
-static final byte[] ch106data = {
-(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch106 = new BitmapCharRec(2,9,0,2,3,ch106data);
-
-/* char: 0x69 'i' */
-
-static final byte[] ch105data = {
-(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch105 = new BitmapCharRec(2,7,0,0,3,ch105data);
-
-/* char: 0x68 'h' */
-
-static final byte[] ch104data = {
-(byte) 0xd8,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0xe0,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch104 = new BitmapCharRec(5,7,0,0,5,ch104data);
-
-/* char: 0x67 'g' */
-
-static final byte[] ch103data = {
-(byte) 0xe0,(byte) 0x90,(byte) 0x60,(byte) 0x40,(byte) 0xa0,(byte) 0xa0,(byte) 0x70,
-};
-
-static final BitmapCharRec ch103 = new BitmapCharRec(4,7,0,2,5,ch103data);
-
-/* char: 0x66 'f' */
-
-static final byte[] ch102data = {
-(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,(byte) 0x40,(byte) 0x30,
-};
-
-static final BitmapCharRec ch102 = new BitmapCharRec(4,7,0,0,4,ch102data);
-
-/* char: 0x65 'e' */
-
-static final byte[] ch101data = {
-(byte) 0x60,(byte) 0x80,(byte) 0xc0,(byte) 0xa0,(byte) 0x60,
-};
-
-static final BitmapCharRec ch101 = new BitmapCharRec(3,5,0,0,4,ch101data);
-
-/* char: 0x64 'd' */
-
-static final byte[] ch100data = {
-(byte) 0x68,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x70,(byte) 0x10,(byte) 0x30,
-};
-
-static final BitmapCharRec ch100 = new BitmapCharRec(5,7,0,0,5,ch100data);
-
-/* char: 0x63 'c' */
-
-static final byte[] ch99data = {
-(byte) 0x60,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x60,
-};
-
-static final BitmapCharRec ch99 = new BitmapCharRec(3,5,0,0,4,ch99data);
-
-/* char: 0x62 'b' */
-
-static final byte[] ch98data = {
-(byte) 0xe0,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0xe0,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch98 = new BitmapCharRec(4,7,0,0,5,ch98data);
-
-/* char: 0x61 'a' */
-
-static final byte[] ch97data = {
-(byte) 0xe0,(byte) 0xa0,(byte) 0x60,(byte) 0x20,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch97 = new BitmapCharRec(3,5,0,0,4,ch97data);
-
-/* char: 0x60 '`' */
-
-static final byte[] ch96data = {
-(byte) 0xc0,(byte) 0x80,
-};
-
-static final BitmapCharRec ch96 = new BitmapCharRec(2,2,0,-5,3,ch96data);
-
-/* char: 0x5f '_' */
-
-static final byte[] ch95data = {
-(byte) 0xf8,
-};
-
-static final BitmapCharRec ch95 = new BitmapCharRec(5,1,0,3,5,ch95data);
-
-/* char: 0x5e '^' */
-
-static final byte[] ch94data = {
-(byte) 0xa0,(byte) 0xa0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch94 = new BitmapCharRec(3,3,-1,-4,5,ch94data);
-
-/* char: 0x5d ']' */
-
-static final byte[] ch93data = {
-(byte) 0xc0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch93 = new BitmapCharRec(2,9,0,2,3,ch93data);
-
-/* char: 0x5c '\' */
-
-static final byte[] ch92data = {
-(byte) 0x20,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch92 = new BitmapCharRec(3,7,0,0,3,ch92data);
-
-/* char: 0x5b '[' */
-
-static final byte[] ch91data = {
-(byte) 0xc0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch91 = new BitmapCharRec(2,9,0,2,3,ch91data);
-
-/* char: 0x5a 'Z' */
-
-static final byte[] ch90data = {
-(byte) 0xf8,(byte) 0x88,(byte) 0x40,(byte) 0x20,(byte) 0x10,(byte) 0x88,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch90 = new BitmapCharRec(5,7,0,0,6,ch90data);
-
-/* char: 0x59 'Y' */
-
-static final byte[] ch89data = {
-(byte) 0x38,(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x28,(byte) 0x44,(byte) 0xee,
-};
-
-static final BitmapCharRec ch89 = new BitmapCharRec(7,7,0,0,8,ch89data);
-
-/* char: 0x58 'X' */
-
-static final byte[] ch88data = {
-(byte) 0xee,(byte) 0x44,(byte) 0x28,(byte) 0x10,(byte) 0x28,(byte) 0x44,(byte) 0xee,
-};
-
-static final BitmapCharRec ch88 = new BitmapCharRec(7,7,0,0,8,ch88data);
-
-/* char: 0x57 'W' */
-
-static final byte[] ch87data = {
-(byte) 0x22,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0x55,(byte) 0x0,(byte) 0x55,(byte) 0x0,(byte) 0xc9,(byte) 0x80,(byte) 0x88,(byte) 0x80,(byte) 0xdd,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch87 = new BitmapCharRec(10,7,0,0,10,ch87data);
-
-/* char: 0x56 'V' */
-
-static final byte[] ch86data = {
-(byte) 0x10,(byte) 0x10,(byte) 0x28,(byte) 0x28,(byte) 0x6c,(byte) 0x44,(byte) 0xee,
-};
-
-static final BitmapCharRec ch86 = new BitmapCharRec(7,7,0,0,8,ch86data);
-
-/* char: 0x55 'U' */
-
-static final byte[] ch85data = {
-(byte) 0x38,(byte) 0x6c,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0xee,
-};
-
-static final BitmapCharRec ch85 = new BitmapCharRec(7,7,0,0,8,ch85data);
-
-/* char: 0x54 'T' */
-
-static final byte[] ch84data = {
-(byte) 0x70,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xa8,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch84 = new BitmapCharRec(5,7,0,0,6,ch84data);
-
-/* char: 0x53 'S' */
-
-static final byte[] ch83data = {
-(byte) 0xe0,(byte) 0x90,(byte) 0x10,(byte) 0x60,(byte) 0xc0,(byte) 0x90,(byte) 0x70,
-};
-
-static final BitmapCharRec ch83 = new BitmapCharRec(4,7,0,0,5,ch83data);
-
-/* char: 0x52 'R' */
-
-static final byte[] ch82data = {
-(byte) 0xec,(byte) 0x48,(byte) 0x50,(byte) 0x70,(byte) 0x48,(byte) 0x48,(byte) 0xf0,
-};
-
-static final BitmapCharRec ch82 = new BitmapCharRec(6,7,0,0,7,ch82data);
-
-/* char: 0x51 'Q' */
-
-static final byte[] ch81data = {
-(byte) 0xc,(byte) 0x18,(byte) 0x70,(byte) 0xcc,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xcc,(byte) 0x78,
-};
-
-static final BitmapCharRec ch81 = new BitmapCharRec(6,9,0,2,7,ch81data);
-
-/* char: 0x50 'P' */
-
-static final byte[] ch80data = {
-(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x70,(byte) 0x48,(byte) 0x48,(byte) 0xf0,
-};
-
-static final BitmapCharRec ch80 = new BitmapCharRec(5,7,0,0,6,ch80data);
-
-/* char: 0x4f 'O' */
-
-static final byte[] ch79data = {
-(byte) 0x78,(byte) 0xcc,(byte) 0x84,(byte) 0x84,(byte) 0x84,(byte) 0xcc,(byte) 0x78,
-};
-
-static final BitmapCharRec ch79 = new BitmapCharRec(6,7,0,0,7,ch79data);
-
-/* char: 0x4e 'N' */
-
-static final byte[] ch78data = {
-(byte) 0xe4,(byte) 0x4c,(byte) 0x4c,(byte) 0x54,(byte) 0x54,(byte) 0x64,(byte) 0xee,
-};
-
-static final BitmapCharRec ch78 = new BitmapCharRec(7,7,0,0,8,ch78data);
-
-/* char: 0x4d 'M' */
-
-static final byte[] ch77data = {
-(byte) 0xeb,(byte) 0x80,(byte) 0x49,(byte) 0x0,(byte) 0x55,(byte) 0x0,(byte) 0x55,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0xe3,(byte) 0x80,
-};
-
-static final BitmapCharRec ch77 = new BitmapCharRec(9,7,0,0,10,ch77data);
-
-/* char: 0x4c 'L' */
-
-static final byte[] ch76data = {
-(byte) 0xf8,(byte) 0x48,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,
-};
-
-static final BitmapCharRec ch76 = new BitmapCharRec(5,7,0,0,6,ch76data);
-
-/* char: 0x4b 'K' */
-
-static final byte[] ch75data = {
-(byte) 0xec,(byte) 0x48,(byte) 0x50,(byte) 0x60,(byte) 0x50,(byte) 0x48,(byte) 0xec,
-};
-
-static final BitmapCharRec ch75 = new BitmapCharRec(6,7,0,0,7,ch75data);
-
-/* char: 0x4a 'J' */
-
-static final byte[] ch74data = {
-(byte) 0xc0,(byte) 0xa0,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x70,
-};
-
-static final BitmapCharRec ch74 = new BitmapCharRec(4,7,0,0,4,ch74data);
-
-/* char: 0x49 'I' */
-
-static final byte[] ch73data = {
-(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xe0,
-};
-
-static final BitmapCharRec ch73 = new BitmapCharRec(3,7,0,0,4,ch73data);
-
-/* char: 0x48 'H' */
-
-static final byte[] ch72data = {
-(byte) 0xee,(byte) 0x44,(byte) 0x44,(byte) 0x7c,(byte) 0x44,(byte) 0x44,(byte) 0xee,
-};
-
-static final BitmapCharRec ch72 = new BitmapCharRec(7,7,0,0,8,ch72data);
-
-/* char: 0x47 'G' */
-
-static final byte[] ch71data = {
-(byte) 0x78,(byte) 0xc4,(byte) 0x84,(byte) 0x9c,(byte) 0x80,(byte) 0xc4,(byte) 0x7c,
-};
-
-static final BitmapCharRec ch71 = new BitmapCharRec(6,7,0,0,7,ch71data);
-
-/* char: 0x46 'F' */
-
-static final byte[] ch70data = {
-(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x70,(byte) 0x40,(byte) 0x48,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch70 = new BitmapCharRec(5,7,0,0,6,ch70data);
-
-/* char: 0x45 'E' */
-
-static final byte[] ch69data = {
-(byte) 0xf8,(byte) 0x48,(byte) 0x40,(byte) 0x70,(byte) 0x40,(byte) 0x48,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch69 = new BitmapCharRec(5,7,0,0,6,ch69data);
-
-/* char: 0x44 'D' */
-
-static final byte[] ch68data = {
-(byte) 0xf8,(byte) 0x4c,(byte) 0x44,(byte) 0x44,(byte) 0x44,(byte) 0x4c,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch68 = new BitmapCharRec(6,7,0,0,7,ch68data);
-
-/* char: 0x43 'C' */
-
-static final byte[] ch67data = {
-(byte) 0x78,(byte) 0xc4,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0xc4,(byte) 0x7c,
-};
-
-static final BitmapCharRec ch67 = new BitmapCharRec(6,7,0,0,7,ch67data);
-
-/* char: 0x42 'B' */
-
-static final byte[] ch66data = {
-(byte) 0xf0,(byte) 0x48,(byte) 0x48,(byte) 0x70,(byte) 0x48,(byte) 0x48,(byte) 0xf0,
-};
-
-static final BitmapCharRec ch66 = new BitmapCharRec(5,7,0,0,6,ch66data);
-
-/* char: 0x41 'A' */
-
-static final byte[] ch65data = {
-(byte) 0xee,(byte) 0x44,(byte) 0x7c,(byte) 0x28,(byte) 0x28,(byte) 0x38,(byte) 0x10,
-};
-
-static final BitmapCharRec ch65 = new BitmapCharRec(7,7,0,0,8,ch65data);
-
-/* char: 0x40 '@' */
-
-static final byte[] ch64data = {
-(byte) 0x3e,(byte) 0x40,(byte) 0x92,(byte) 0xad,(byte) 0xa5,(byte) 0xa5,(byte) 0x9d,(byte) 0x42,(byte) 0x3c,
-};
-
-static final BitmapCharRec ch64 = new BitmapCharRec(8,9,0,2,9,ch64data);
-
-/* char: 0x3f '?' */
-
-static final byte[] ch63data = {
-(byte) 0x40,(byte) 0x0,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0xa0,(byte) 0xe0,
-};
-
-static final BitmapCharRec ch63 = new BitmapCharRec(3,7,0,0,4,ch63data);
-
-/* char: 0x3e '>' */
-
-static final byte[] ch62data = {
-(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x40,(byte) 0x80,
-};
-
-static final BitmapCharRec ch62 = new BitmapCharRec(3,5,0,0,5,ch62data);
-
-/* char: 0x3d '=' */
-
-static final byte[] ch61data = {
-(byte) 0xf8,(byte) 0x0,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch61 = new BitmapCharRec(5,3,0,-1,6,ch61data);
-
-/* char: 0x3c '<' */
-
-static final byte[] ch60data = {
-(byte) 0x20,(byte) 0x40,(byte) 0x80,(byte) 0x40,(byte) 0x20,
-};
-
-static final BitmapCharRec ch60 = new BitmapCharRec(3,5,-1,0,5,ch60data);
-
-/* char: 0x3b ';' */
-
-static final byte[] ch59data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x80,
-};
-
-static final BitmapCharRec ch59 = new BitmapCharRec(1,7,-1,2,3,ch59data);
-
-/* char: 0x3a ':' */
-
-static final byte[] ch58data = {
-(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x80,
-};
-
-static final BitmapCharRec ch58 = new BitmapCharRec(1,5,-1,0,3,ch58data);
-
-/* char: 0x39 '9' */
-
-static final byte[] ch57data = {
-(byte) 0xc0,(byte) 0x20,(byte) 0x70,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x60,
-};
-
-static final BitmapCharRec ch57 = new BitmapCharRec(4,7,0,0,5,ch57data);
-
-/* char: 0x38 '8' */
-
-static final byte[] ch56data = {
-(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x60,
-};
-
-static final BitmapCharRec ch56 = new BitmapCharRec(4,7,0,0,5,ch56data);
-
-/* char: 0x37 '7' */
-
-static final byte[] ch55data = {
-(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x90,(byte) 0xf0,
-};
-
-static final BitmapCharRec ch55 = new BitmapCharRec(4,7,0,0,5,ch55data);
-
-/* char: 0x36 '6' */
-
-static final byte[] ch54data = {
-(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0xe0,(byte) 0x40,(byte) 0x30,
-};
-
-static final BitmapCharRec ch54 = new BitmapCharRec(4,7,0,0,5,ch54data);
-
-/* char: 0x35 '5' */
-
-static final byte[] ch53data = {
-(byte) 0xe0,(byte) 0x90,(byte) 0x10,(byte) 0x10,(byte) 0xe0,(byte) 0x40,(byte) 0x70,
-};
-
-static final BitmapCharRec ch53 = new BitmapCharRec(4,7,0,0,5,ch53data);
-
-/* char: 0x34 '4' */
-
-static final byte[] ch52data = {
-(byte) 0x10,(byte) 0x10,(byte) 0xf8,(byte) 0x90,(byte) 0x50,(byte) 0x30,(byte) 0x10,
-};
-
-static final BitmapCharRec ch52 = new BitmapCharRec(5,7,0,0,5,ch52data);
-
-/* char: 0x33 '3' */
-
-static final byte[] ch51data = {
-(byte) 0xe0,(byte) 0x10,(byte) 0x10,(byte) 0x60,(byte) 0x10,(byte) 0x90,(byte) 0x60,
-};
-
-static final BitmapCharRec ch51 = new BitmapCharRec(4,7,0,0,5,ch51data);
-
-/* char: 0x32 '2' */
-
-static final byte[] ch50data = {
-(byte) 0xf0,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x10,(byte) 0x90,(byte) 0x60,
-};
-
-static final BitmapCharRec ch50 = new BitmapCharRec(4,7,0,0,5,ch50data);
-
-/* char: 0x31 '1' */
-
-static final byte[] ch49data = {
-(byte) 0xe0,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0xc0,(byte) 0x40,
-};
-
-static final BitmapCharRec ch49 = new BitmapCharRec(3,7,-1,0,5,ch49data);
-
-/* char: 0x30 '0' */
-
-static final byte[] ch48data = {
-(byte) 0x60,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x90,(byte) 0x60,
-};
-
-static final BitmapCharRec ch48 = new BitmapCharRec(4,7,0,0,5,ch48data);
-
-/* char: 0x2f '/' */
-
-static final byte[] ch47data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,
-};
-
-static final BitmapCharRec ch47 = new BitmapCharRec(3,7,0,0,3,ch47data);
-
-/* char: 0x2e '.' */
-
-static final byte[] ch46data = {
-(byte) 0x80,
-};
-
-static final BitmapCharRec ch46 = new BitmapCharRec(1,1,-1,0,3,ch46data);
-
-/* char: 0x2d '-' */
-
-static final byte[] ch45data = {
-(byte) 0xf0,
-};
-
-static final BitmapCharRec ch45 = new BitmapCharRec(4,1,-1,-2,7,ch45data);
-
-/* char: 0x2c ',' */
-
-static final byte[] ch44data = {
-(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch44 = new BitmapCharRec(1,3,-1,2,3,ch44data);
-
-/* char: 0x2b '+' */
-
-static final byte[] ch43data = {
-(byte) 0x20,(byte) 0x20,(byte) 0xf8,(byte) 0x20,(byte) 0x20,
-};
-
-static final BitmapCharRec ch43 = new BitmapCharRec(5,5,0,0,6,ch43data);
-
-/* char: 0x2a '*' */
-
-static final byte[] ch42data = {
-(byte) 0xa0,(byte) 0x40,(byte) 0xa0,
-};
-
-static final BitmapCharRec ch42 = new BitmapCharRec(3,3,0,-4,5,ch42data);
-
-/* char: 0x29 ')' */
-
-static final byte[] ch41data = {
-(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,
-};
-
-static final BitmapCharRec ch41 = new BitmapCharRec(3,9,0,2,4,ch41data);
-
-/* char: 0x28 '(' */
-
-static final byte[] ch40data = {
-(byte) 0x20,(byte) 0x40,(byte) 0x40,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x40,(byte) 0x40,(byte) 0x20,
-};
-
-static final BitmapCharRec ch40 = new BitmapCharRec(3,9,0,2,4,ch40data);
-
-/* char: 0x27 ''' */
-
-static final byte[] ch39data = {
-(byte) 0x40,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch39 = new BitmapCharRec(2,2,0,-5,3,ch39data);
-
-/* char: 0x26 '&' */
-
-static final byte[] ch38data = {
-(byte) 0x76,(byte) 0x8d,(byte) 0x98,(byte) 0x74,(byte) 0x6e,(byte) 0x50,(byte) 0x30,
-};
-
-static final BitmapCharRec ch38 = new BitmapCharRec(8,7,0,0,8,ch38data);
-
-/* char: 0x25 '%' */
-
-static final byte[] ch37data = {
-(byte) 0x44,(byte) 0x2a,(byte) 0x2a,(byte) 0x56,(byte) 0xa8,(byte) 0xa4,(byte) 0x7e,
-};
-
-static final BitmapCharRec ch37 = new BitmapCharRec(7,7,0,0,8,ch37data);
-
-/* char: 0x24 '$' */
-
-static final byte[] ch36data = {
-(byte) 0x20,(byte) 0xe0,(byte) 0x90,(byte) 0x10,(byte) 0x60,(byte) 0x80,(byte) 0x90,(byte) 0x70,(byte) 0x20,
-};
-
-static final BitmapCharRec ch36 = new BitmapCharRec(4,9,0,1,5,ch36data);
-
-/* char: 0x23 '#' */
-
-static final byte[] ch35data = {
-(byte) 0x50,(byte) 0x50,(byte) 0xf8,(byte) 0x50,(byte) 0xf8,(byte) 0x50,(byte) 0x50,
-};
-
-static final BitmapCharRec ch35 = new BitmapCharRec(5,7,0,0,5,ch35data);
-
-/* char: 0x22 '"' */
-
-static final byte[] ch34data = {
-(byte) 0xa0,(byte) 0xa0,
-};
-
-static final BitmapCharRec ch34 = new BitmapCharRec(3,2,0,-5,4,ch34data);
-
-/* char: 0x21 '!' */
-
-static final byte[] ch33data = {
-(byte) 0x80,(byte) 0x0,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,(byte) 0x80,
-};
-
-static final BitmapCharRec ch33 = new BitmapCharRec(1,7,-1,0,3,ch33data);
-
-/* char: 0x20 ' ' */
-
-static final BitmapCharRec ch32 = new BitmapCharRec(0,0,0,0,2,null);
-
-static final BitmapCharRec[] chars = {
-ch32,
-ch33,
-ch34,
-ch35,
-ch36,
-ch37,
-ch38,
-ch39,
-ch40,
-ch41,
-ch42,
-ch43,
-ch44,
-ch45,
-ch46,
-ch47,
-ch48,
-ch49,
-ch50,
-ch51,
-ch52,
-ch53,
-ch54,
-ch55,
-ch56,
-ch57,
-ch58,
-ch59,
-ch60,
-ch61,
-ch62,
-ch63,
-ch64,
-ch65,
-ch66,
-ch67,
-ch68,
-ch69,
-ch70,
-ch71,
-ch72,
-ch73,
-ch74,
-ch75,
-ch76,
-ch77,
-ch78,
-ch79,
-ch80,
-ch81,
-ch82,
-ch83,
-ch84,
-ch85,
-ch86,
-ch87,
-ch88,
-ch89,
-ch90,
-ch91,
-ch92,
-ch93,
-ch94,
-ch95,
-ch96,
-ch97,
-ch98,
-ch99,
-ch100,
-ch101,
-ch102,
-ch103,
-ch104,
-ch105,
-ch106,
-ch107,
-ch108,
-ch109,
-ch110,
-ch111,
-ch112,
-ch113,
-ch114,
-ch115,
-ch116,
-ch117,
-ch118,
-ch119,
-ch120,
-ch121,
-ch122,
-ch123,
-ch124,
-ch125,
-ch126,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-ch160,
-ch161,
-ch162,
-ch163,
-ch164,
-ch165,
-ch166,
-ch167,
-ch168,
-ch169,
-ch170,
-ch171,
-ch172,
-ch173,
-ch174,
-ch175,
-ch176,
-ch177,
-ch178,
-ch179,
-ch180,
-ch181,
-ch182,
-ch183,
-ch184,
-ch185,
-ch186,
-ch187,
-ch188,
-ch189,
-ch190,
-ch191,
-ch192,
-ch193,
-ch194,
-ch195,
-ch196,
-ch197,
-ch198,
-ch199,
-ch200,
-ch201,
-ch202,
-ch203,
-ch204,
-ch205,
-ch206,
-ch207,
-ch208,
-ch209,
-ch210,
-ch211,
-ch212,
-ch213,
-ch214,
-ch215,
-ch216,
-ch217,
-ch218,
-ch219,
-ch220,
-ch221,
-ch222,
-ch223,
-ch224,
-ch225,
-ch226,
-ch227,
-ch228,
-ch229,
-ch230,
-ch231,
-ch232,
-ch233,
-ch234,
-ch235,
-ch236,
-ch237,
-ch238,
-ch239,
-ch240,
-ch241,
-ch242,
-ch243,
-ch244,
-ch245,
-ch246,
-ch247,
-ch248,
-ch249,
-ch250,
-ch251,
-ch252,
-ch253,
-ch254,
-ch255,
-};
-
- public static final BitmapFontRec glutBitmapTimesRoman10 = new BitmapFontRec("-adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1",
- 224,
- 32,
- chars);
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/gl2/GLUTBitmapTimesRoman24.java b/src/jogl/classes/com/sun/opengl/util/gl2/GLUTBitmapTimesRoman24.java
deleted file mode 100644
index 36fb76c66..000000000
--- a/src/jogl/classes/com/sun/opengl/util/gl2/GLUTBitmapTimesRoman24.java
+++ /dev/null
@@ -1,2080 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.util.gl2;
-
-class GLUTBitmapTimesRoman24 {
-
-/* GENERATED FILE -- DO NOT MODIFY */
-
-/* char: 0xff */
-
-static final byte[] ch255data = {
-(byte) 0xe0,(byte) 0x0,(byte) 0xf0,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x4,(byte) 0x0,(byte) 0xe,(byte) 0x0,(byte) 0xe,(byte) 0x0,
-(byte) 0x1a,(byte) 0x0,(byte) 0x19,(byte) 0x0,(byte) 0x19,(byte) 0x0,(byte) 0x31,(byte) 0x0,(byte) 0x30,(byte) 0x80,(byte) 0x30,(byte) 0x80,(byte) 0x60,(byte) 0x80,(byte) 0x60,(byte) 0xc0,
-(byte) 0xf1,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x33,(byte) 0x0,
-};
-
-static final BitmapCharRec ch255 = new BitmapCharRec(11,21,0,5,11,ch255data);
-
-/* char: 0xfe */
-
-static final byte[] ch254data = {
-(byte) 0xf0,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x6e,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,
-(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,
-(byte) 0x6e,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0xe0,(byte) 0x0,
-};
-
-static final BitmapCharRec ch254 = new BitmapCharRec(10,22,-1,5,12,ch254data);
-
-/* char: 0xfd */
-
-static final byte[] ch253data = {
-(byte) 0xe0,(byte) 0x0,(byte) 0xf0,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x4,(byte) 0x0,(byte) 0xe,(byte) 0x0,(byte) 0xe,(byte) 0x0,
-(byte) 0x1a,(byte) 0x0,(byte) 0x19,(byte) 0x0,(byte) 0x19,(byte) 0x0,(byte) 0x31,(byte) 0x0,(byte) 0x30,(byte) 0x80,(byte) 0x30,(byte) 0x80,(byte) 0x60,(byte) 0x80,(byte) 0x60,(byte) 0xc0,
-(byte) 0xf1,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x3,(byte) 0x80,(byte) 0x1,(byte) 0x80,
-};
-
-static final BitmapCharRec ch253 = new BitmapCharRec(11,22,0,5,11,ch253data);
-
-/* char: 0xfc */
-
-static final byte[] ch252data = {
-(byte) 0x1c,(byte) 0xe0,(byte) 0x3e,(byte) 0xc0,(byte) 0x71,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,
-(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xe1,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x33,(byte) 0x0,
-};
-
-static final BitmapCharRec ch252 = new BitmapCharRec(11,16,-1,0,13,ch252data);
-
-/* char: 0xfb */
-
-static final byte[] ch251data = {
-(byte) 0x1c,(byte) 0xe0,(byte) 0x3e,(byte) 0xc0,(byte) 0x71,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,
-(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xe1,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x21,(byte) 0x0,(byte) 0x12,(byte) 0x0,(byte) 0x1e,(byte) 0x0,
-(byte) 0xc,(byte) 0x0,
-};
-
-static final BitmapCharRec ch251 = new BitmapCharRec(11,17,-1,0,13,ch251data);
-
-/* char: 0xfa */
-
-static final byte[] ch250data = {
-(byte) 0x1c,(byte) 0xe0,(byte) 0x3e,(byte) 0xc0,(byte) 0x71,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,
-(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xe1,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x3,(byte) 0x80,
-(byte) 0x1,(byte) 0x80,
-};
-
-static final BitmapCharRec ch250 = new BitmapCharRec(11,17,-1,0,13,ch250data);
-
-/* char: 0xf9 */
-
-static final byte[] ch249data = {
-(byte) 0x1c,(byte) 0xe0,(byte) 0x3e,(byte) 0xc0,(byte) 0x71,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,
-(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xe1,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x2,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x38,(byte) 0x0,
-(byte) 0x30,(byte) 0x0,
-};
-
-static final BitmapCharRec ch249 = new BitmapCharRec(11,17,-1,0,13,ch249data);
-
-/* char: 0xf8 */
-
-static final byte[] ch248data = {
-(byte) 0xc0,(byte) 0x0,(byte) 0xde,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0x71,(byte) 0x80,(byte) 0xd0,(byte) 0xc0,(byte) 0xd8,(byte) 0xc0,(byte) 0xc8,(byte) 0xc0,(byte) 0xcc,(byte) 0xc0,
-(byte) 0xc4,(byte) 0xc0,(byte) 0xc6,(byte) 0xc0,(byte) 0x63,(byte) 0x80,(byte) 0x73,(byte) 0x80,(byte) 0x1e,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch248 = new BitmapCharRec(10,14,-1,1,12,ch248data);
-
-/* char: 0xf7 */
-
-static final byte[] ch247data = {
-(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xff,(byte) 0xf0,(byte) 0xff,(byte) 0xf0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,
-(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,
-};
-
-static final BitmapCharRec ch247 = new BitmapCharRec(12,10,-1,-2,14,ch247data);
-
-/* char: 0xf6 */
-
-static final byte[] ch246data = {
-(byte) 0x1e,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
-(byte) 0xc0,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,(byte) 0x1e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x33,(byte) 0x0,
-};
-
-static final BitmapCharRec ch246 = new BitmapCharRec(10,16,-1,0,12,ch246data);
-
-/* char: 0xf5 */
-
-static final byte[] ch245data = {
-(byte) 0x1e,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
-(byte) 0xc0,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,(byte) 0x1e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x27,(byte) 0x0,(byte) 0x1c,(byte) 0x80,
-};
-
-static final BitmapCharRec ch245 = new BitmapCharRec(10,16,-1,0,12,ch245data);
-
-/* char: 0xf4 */
-
-static final byte[] ch244data = {
-(byte) 0x1e,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
-(byte) 0xc0,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,(byte) 0x1e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x21,(byte) 0x0,(byte) 0x12,(byte) 0x0,(byte) 0x1e,(byte) 0x0,
-(byte) 0xc,(byte) 0x0,
-};
-
-static final BitmapCharRec ch244 = new BitmapCharRec(10,17,-1,0,12,ch244data);
-
-/* char: 0xf3 */
-
-static final byte[] ch243data = {
-(byte) 0x1e,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
-(byte) 0xc0,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,(byte) 0x1e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x3,(byte) 0x80,
-(byte) 0x1,(byte) 0x80,
-};
-
-static final BitmapCharRec ch243 = new BitmapCharRec(10,17,-1,0,12,ch243data);
-
-/* char: 0xf2 */
-
-static final byte[] ch242data = {
-(byte) 0x1e,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
-(byte) 0xc0,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,(byte) 0x1e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x2,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x38,(byte) 0x0,
-(byte) 0x30,(byte) 0x0,
-};
-
-static final BitmapCharRec ch242 = new BitmapCharRec(10,17,-1,0,12,ch242data);
-
-/* char: 0xf1 */
-
-static final byte[] ch241data = {
-(byte) 0xf1,(byte) 0xe0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,
-(byte) 0x60,(byte) 0xc0,(byte) 0x71,(byte) 0xc0,(byte) 0x6f,(byte) 0x80,(byte) 0xe7,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x27,(byte) 0x0,(byte) 0x1c,(byte) 0x80,
-};
-
-static final BitmapCharRec ch241 = new BitmapCharRec(11,16,-1,0,13,ch241data);
-
-/* char: 0xf0 */
-
-static final byte[] ch240data = {
-(byte) 0x1e,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
-(byte) 0xc0,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,(byte) 0x1f,(byte) 0x0,(byte) 0xc6,(byte) 0x0,(byte) 0x3c,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0x71,(byte) 0x80,
-(byte) 0xc0,(byte) 0x0,
-};
-
-static final BitmapCharRec ch240 = new BitmapCharRec(10,17,-1,0,12,ch240data);
-
-/* char: 0xef */
-
-static final byte[] ch239data = {
-(byte) 0x78,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x70,(byte) 0x0,(byte) 0x0,(byte) 0xcc,(byte) 0xcc,
-};
-
-static final BitmapCharRec ch239 = new BitmapCharRec(6,16,0,0,6,ch239data);
-
-/* char: 0xee */
-
-static final byte[] ch238data = {
-(byte) 0x78,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x70,(byte) 0x0,(byte) 0x84,(byte) 0x48,(byte) 0x78,
-(byte) 0x30,
-};
-
-static final BitmapCharRec ch238 = new BitmapCharRec(6,17,0,0,6,ch238data);
-
-/* char: 0xed */
-
-static final byte[] ch237data = {
-(byte) 0xf0,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0xe0,(byte) 0x0,(byte) 0x80,(byte) 0x60,(byte) 0x38,
-(byte) 0x18,
-};
-
-static final BitmapCharRec ch237 = new BitmapCharRec(5,17,-1,0,6,ch237data);
-
-/* char: 0xec */
-
-static final byte[] ch236data = {
-(byte) 0x78,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x70,(byte) 0x0,(byte) 0x8,(byte) 0x30,(byte) 0xe0,
-(byte) 0xc0,
-};
-
-static final BitmapCharRec ch236 = new BitmapCharRec(5,17,0,0,6,ch236data);
-
-/* char: 0xeb */
-
-static final byte[] ch235data = {
-(byte) 0x1e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x70,(byte) 0x80,(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x80,
-(byte) 0xc1,(byte) 0x80,(byte) 0x41,(byte) 0x80,(byte) 0x63,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x33,(byte) 0x0,
-};
-
-static final BitmapCharRec ch235 = new BitmapCharRec(9,16,-1,0,11,ch235data);
-
-/* char: 0xea */
-
-static final byte[] ch234data = {
-(byte) 0x1e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x70,(byte) 0x80,(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x80,
-(byte) 0xc1,(byte) 0x80,(byte) 0x41,(byte) 0x80,(byte) 0x63,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x21,(byte) 0x0,(byte) 0x12,(byte) 0x0,(byte) 0x1e,(byte) 0x0,
-(byte) 0xc,(byte) 0x0,
-};
-
-static final BitmapCharRec ch234 = new BitmapCharRec(9,17,-1,0,11,ch234data);
-
-/* char: 0xe9 */
-
-static final byte[] ch233data = {
-(byte) 0x1e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x70,(byte) 0x80,(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x80,
-(byte) 0xc1,(byte) 0x80,(byte) 0x41,(byte) 0x80,(byte) 0x63,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x10,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x7,(byte) 0x0,
-(byte) 0x3,(byte) 0x0,
-};
-
-static final BitmapCharRec ch233 = new BitmapCharRec(9,17,-1,0,11,ch233data);
-
-/* char: 0xe8 */
-
-static final byte[] ch232data = {
-(byte) 0x1e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x70,(byte) 0x80,(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x80,
-(byte) 0xc1,(byte) 0x80,(byte) 0x41,(byte) 0x80,(byte) 0x63,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x4,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x70,(byte) 0x0,
-(byte) 0x60,(byte) 0x0,
-};
-
-static final BitmapCharRec ch232 = new BitmapCharRec(9,17,-1,0,11,ch232data);
-
-/* char: 0xe7 */
-
-static final byte[] ch231data = {
-(byte) 0x3c,(byte) 0x0,(byte) 0x66,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,
-(byte) 0x70,(byte) 0x80,(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x41,(byte) 0x80,
-(byte) 0x63,(byte) 0x80,(byte) 0x1f,(byte) 0x0,
-};
-
-static final BitmapCharRec ch231 = new BitmapCharRec(9,18,-1,6,11,ch231data);
-
-/* char: 0xe6 */
-
-static final byte[] ch230data = {
-(byte) 0x70,(byte) 0xf0,(byte) 0xfb,(byte) 0xf8,(byte) 0xc7,(byte) 0x84,(byte) 0xc3,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x3b,(byte) 0x0,(byte) 0xf,(byte) 0xfc,
-(byte) 0x3,(byte) 0xc,(byte) 0x63,(byte) 0xc,(byte) 0x67,(byte) 0x98,(byte) 0x3c,(byte) 0xf0,
-};
-
-static final BitmapCharRec ch230 = new BitmapCharRec(14,12,-1,0,16,ch230data);
-
-/* char: 0xe5 */
-
-static final byte[] ch229data = {
-(byte) 0x71,(byte) 0x80,(byte) 0xfb,(byte) 0x0,(byte) 0xc7,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x3b,(byte) 0x0,(byte) 0xf,(byte) 0x0,
-(byte) 0x3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x67,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x1c,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0x22,(byte) 0x0,
-(byte) 0x1c,(byte) 0x0,
-};
-
-static final BitmapCharRec ch229 = new BitmapCharRec(9,17,-1,0,11,ch229data);
-
-/* char: 0xe4 */
-
-static final byte[] ch228data = {
-(byte) 0x71,(byte) 0x80,(byte) 0xfb,(byte) 0x0,(byte) 0xc7,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x3b,(byte) 0x0,(byte) 0xf,(byte) 0x0,
-(byte) 0x3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x67,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x66,(byte) 0x0,(byte) 0x66,(byte) 0x0,
-};
-
-static final BitmapCharRec ch228 = new BitmapCharRec(9,16,-1,0,11,ch228data);
-
-/* char: 0xe3 */
-
-static final byte[] ch227data = {
-(byte) 0x71,(byte) 0x80,(byte) 0xfb,(byte) 0x0,(byte) 0xc7,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x3b,(byte) 0x0,(byte) 0xf,(byte) 0x0,
-(byte) 0x3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x67,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x5c,(byte) 0x0,(byte) 0x3a,(byte) 0x0,
-};
-
-static final BitmapCharRec ch227 = new BitmapCharRec(9,16,-1,0,11,ch227data);
-
-/* char: 0xe2 */
-
-static final byte[] ch226data = {
-(byte) 0x71,(byte) 0x80,(byte) 0xfb,(byte) 0x0,(byte) 0xc7,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x3b,(byte) 0x0,(byte) 0xf,(byte) 0x0,
-(byte) 0x3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x67,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x42,(byte) 0x0,(byte) 0x24,(byte) 0x0,(byte) 0x3c,(byte) 0x0,
-(byte) 0x18,(byte) 0x0,
-};
-
-static final BitmapCharRec ch226 = new BitmapCharRec(9,17,-1,0,11,ch226data);
-
-/* char: 0xe1 */
-
-static final byte[] ch225data = {
-(byte) 0x71,(byte) 0x80,(byte) 0xfb,(byte) 0x0,(byte) 0xc7,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x3b,(byte) 0x0,(byte) 0xf,(byte) 0x0,
-(byte) 0x3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x67,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x10,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x7,(byte) 0x0,
-(byte) 0x3,(byte) 0x0,
-};
-
-static final BitmapCharRec ch225 = new BitmapCharRec(9,17,-1,0,11,ch225data);
-
-/* char: 0xe0 */
-
-static final byte[] ch224data = {
-(byte) 0x71,(byte) 0x80,(byte) 0xfb,(byte) 0x0,(byte) 0xc7,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x3b,(byte) 0x0,(byte) 0xf,(byte) 0x0,
-(byte) 0x3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x67,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x4,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x70,(byte) 0x0,
-(byte) 0x60,(byte) 0x0,
-};
-
-static final BitmapCharRec ch224 = new BitmapCharRec(9,17,-1,0,11,ch224data);
-
-/* char: 0xdf */
-
-static final byte[] ch223data = {
-(byte) 0xe7,(byte) 0x0,(byte) 0x6c,(byte) 0x80,(byte) 0x6c,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x61,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x63,(byte) 0x80,
-(byte) 0x67,(byte) 0x0,(byte) 0x6c,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x33,(byte) 0x0,
-(byte) 0x1e,(byte) 0x0,
-};
-
-static final BitmapCharRec ch223 = new BitmapCharRec(10,17,-1,0,12,ch223data);
-
-/* char: 0xde */
-
-static final byte[] ch222data = {
-(byte) 0xfc,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0x70,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x18,
-(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x70,(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,
-(byte) 0xfc,(byte) 0x0,
-};
-
-static final BitmapCharRec ch222 = new BitmapCharRec(13,17,-1,0,15,ch222data);
-
-/* char: 0xdd */
-
-static final byte[] ch221data = {
-(byte) 0x7,(byte) 0xe0,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x3,(byte) 0xc0,
-(byte) 0x3,(byte) 0x40,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0x20,(byte) 0xc,(byte) 0x30,(byte) 0x1c,(byte) 0x10,(byte) 0x18,(byte) 0x18,(byte) 0x38,(byte) 0x8,(byte) 0x30,(byte) 0xc,
-(byte) 0xfc,(byte) 0x3f,(byte) 0x0,(byte) 0x0,(byte) 0x1,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x70,(byte) 0x0,(byte) 0x30,
-};
-
-static final BitmapCharRec ch221 = new BitmapCharRec(16,22,0,0,16,ch221data);
-
-/* char: 0xdc */
-
-static final byte[] ch220data = {
-(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x30,(byte) 0x18,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,
-(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,
-(byte) 0xfc,(byte) 0x1f,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x6,(byte) 0x30,(byte) 0x6,(byte) 0x30,
-};
-
-static final BitmapCharRec ch220 = new BitmapCharRec(16,21,-1,0,18,ch220data);
-
-/* char: 0xdb */
-
-static final byte[] ch219data = {
-(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x30,(byte) 0x18,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,
-(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,
-(byte) 0xfc,(byte) 0x1f,(byte) 0x0,(byte) 0x0,(byte) 0x8,(byte) 0x10,(byte) 0x6,(byte) 0x60,(byte) 0x3,(byte) 0xc0,(byte) 0x1,(byte) 0x80,
-};
-
-static final BitmapCharRec ch219 = new BitmapCharRec(16,22,-1,0,18,ch219data);
-
-/* char: 0xda */
-
-static final byte[] ch218data = {
-(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x30,(byte) 0x18,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,
-(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,
-(byte) 0xfc,(byte) 0x1f,(byte) 0x0,(byte) 0x0,(byte) 0x1,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x70,(byte) 0x0,(byte) 0x30,
-};
-
-static final BitmapCharRec ch218 = new BitmapCharRec(16,22,-1,0,18,ch218data);
-
-/* char: 0xd9 */
-
-static final byte[] ch217data = {
-(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x30,(byte) 0x18,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,
-(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,
-(byte) 0xfc,(byte) 0x1f,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x40,(byte) 0x1,(byte) 0x80,(byte) 0x7,(byte) 0x0,(byte) 0x6,(byte) 0x0,
-};
-
-static final BitmapCharRec ch217 = new BitmapCharRec(16,22,-1,0,18,ch217data);
-
-/* char: 0xd8 */
-
-static final byte[] ch216data = {
-(byte) 0x20,(byte) 0x0,(byte) 0x27,(byte) 0xe0,(byte) 0x1c,(byte) 0x38,(byte) 0x38,(byte) 0x1c,(byte) 0x68,(byte) 0x6,(byte) 0x64,(byte) 0x6,(byte) 0xc2,(byte) 0x3,(byte) 0xc2,(byte) 0x3,
-(byte) 0xc1,(byte) 0x3,(byte) 0xc1,(byte) 0x3,(byte) 0xc0,(byte) 0x83,(byte) 0xc0,(byte) 0x83,(byte) 0xc0,(byte) 0x43,(byte) 0x60,(byte) 0x46,(byte) 0x60,(byte) 0x26,(byte) 0x38,(byte) 0x1c,
-(byte) 0x1c,(byte) 0x38,(byte) 0x7,(byte) 0xe4,(byte) 0x0,(byte) 0x4,
-};
-
-static final BitmapCharRec ch216 = new BitmapCharRec(16,19,-1,1,18,ch216data);
-
-/* char: 0xd7 */
-
-static final byte[] ch215data = {
-(byte) 0x80,(byte) 0x40,(byte) 0xc0,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x33,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0x33,(byte) 0x0,
-(byte) 0x61,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0x80,(byte) 0x40,
-};
-
-static final BitmapCharRec ch215 = new BitmapCharRec(10,11,-2,-1,14,ch215data);
-
-/* char: 0xd6 */
-
-static final byte[] ch214data = {
-(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x38,(byte) 0x38,(byte) 0x1c,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,
-(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0x38,(byte) 0x1c,(byte) 0x1c,(byte) 0x38,
-(byte) 0x7,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0x60,
-};
-
-static final BitmapCharRec ch214 = new BitmapCharRec(16,21,-1,0,18,ch214data);
-
-/* char: 0xd5 */
-
-static final byte[] ch213data = {
-(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x38,(byte) 0x38,(byte) 0x1c,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,
-(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0x38,(byte) 0x1c,(byte) 0x1c,(byte) 0x38,
-(byte) 0x7,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x4,(byte) 0xe0,(byte) 0x3,(byte) 0x90,
-};
-
-static final BitmapCharRec ch213 = new BitmapCharRec(16,21,-1,0,18,ch213data);
-
-/* char: 0xd4 */
-
-static final byte[] ch212data = {
-(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x38,(byte) 0x38,(byte) 0x1c,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,
-(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0x38,(byte) 0x1c,(byte) 0x1c,(byte) 0x38,
-(byte) 0x7,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x8,(byte) 0x10,(byte) 0x6,(byte) 0x60,(byte) 0x3,(byte) 0xc0,(byte) 0x1,(byte) 0x80,
-};
-
-static final BitmapCharRec ch212 = new BitmapCharRec(16,22,-1,0,18,ch212data);
-
-/* char: 0xd3 */
-
-static final byte[] ch211data = {
-(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x38,(byte) 0x38,(byte) 0x1c,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,
-(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0x38,(byte) 0x1c,(byte) 0x1c,(byte) 0x38,
-(byte) 0x7,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x1,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x70,(byte) 0x0,(byte) 0x30,
-};
-
-static final BitmapCharRec ch211 = new BitmapCharRec(16,22,-1,0,18,ch211data);
-
-/* char: 0xd2 */
-
-static final byte[] ch210data = {
-(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x38,(byte) 0x38,(byte) 0x1c,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,
-(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0x38,(byte) 0x1c,(byte) 0x1c,(byte) 0x38,
-(byte) 0x7,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x40,(byte) 0x1,(byte) 0x80,(byte) 0x7,(byte) 0x0,(byte) 0x6,(byte) 0x0,
-};
-
-static final BitmapCharRec ch210 = new BitmapCharRec(16,22,-1,0,18,ch210data);
-
-/* char: 0xd1 */
-
-static final byte[] ch209data = {
-(byte) 0xf8,(byte) 0xc,(byte) 0x20,(byte) 0x1c,(byte) 0x20,(byte) 0x1c,(byte) 0x20,(byte) 0x34,(byte) 0x20,(byte) 0x64,(byte) 0x20,(byte) 0x64,(byte) 0x20,(byte) 0xc4,(byte) 0x21,(byte) 0x84,
-(byte) 0x21,(byte) 0x84,(byte) 0x23,(byte) 0x4,(byte) 0x26,(byte) 0x4,(byte) 0x26,(byte) 0x4,(byte) 0x2c,(byte) 0x4,(byte) 0x38,(byte) 0x4,(byte) 0x38,(byte) 0x4,(byte) 0x30,(byte) 0x4,
-(byte) 0xf0,(byte) 0x1f,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x4,(byte) 0xe0,(byte) 0x3,(byte) 0x90,
-};
-
-static final BitmapCharRec ch209 = new BitmapCharRec(16,21,-1,0,18,ch209data);
-
-/* char: 0xd0 */
-
-static final byte[] ch208data = {
-(byte) 0x7f,(byte) 0xe0,(byte) 0x18,(byte) 0x38,(byte) 0x18,(byte) 0x1c,(byte) 0x18,(byte) 0x6,(byte) 0x18,(byte) 0x6,(byte) 0x18,(byte) 0x3,(byte) 0x18,(byte) 0x3,(byte) 0x18,(byte) 0x3,
-(byte) 0xff,(byte) 0x3,(byte) 0x18,(byte) 0x3,(byte) 0x18,(byte) 0x3,(byte) 0x18,(byte) 0x3,(byte) 0x18,(byte) 0x6,(byte) 0x18,(byte) 0x6,(byte) 0x18,(byte) 0x1c,(byte) 0x18,(byte) 0x38,
-(byte) 0x7f,(byte) 0xe0,
-};
-
-static final BitmapCharRec ch208 = new BitmapCharRec(16,17,0,0,17,ch208data);
-
-/* char: 0xcf */
-
-static final byte[] ch207data = {
-(byte) 0xfc,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,
-(byte) 0xfc,(byte) 0x0,(byte) 0x0,(byte) 0xcc,(byte) 0xcc,
-};
-
-static final BitmapCharRec ch207 = new BitmapCharRec(6,21,-1,0,8,ch207data);
-
-/* char: 0xce */
-
-static final byte[] ch206data = {
-(byte) 0x7e,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,
-(byte) 0x7e,(byte) 0x0,(byte) 0x81,(byte) 0x66,(byte) 0x3c,(byte) 0x18,
-};
-
-static final BitmapCharRec ch206 = new BitmapCharRec(8,22,-1,0,8,ch206data);
-
-/* char: 0xcd */
-
-static final byte[] ch205data = {
-(byte) 0xfc,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,
-(byte) 0xfc,(byte) 0x0,(byte) 0x40,(byte) 0x30,(byte) 0x1c,(byte) 0xc,
-};
-
-static final BitmapCharRec ch205 = new BitmapCharRec(6,22,-1,0,8,ch205data);
-
-/* char: 0xcc */
-
-static final byte[] ch204data = {
-(byte) 0xfc,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,
-(byte) 0xfc,(byte) 0x0,(byte) 0x8,(byte) 0x30,(byte) 0xe0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch204 = new BitmapCharRec(6,22,-1,0,8,ch204data);
-
-/* char: 0xcb */
-
-static final byte[] ch203data = {
-(byte) 0xff,(byte) 0xf8,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x40,
-(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x30,
-(byte) 0xff,(byte) 0xf0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,
-};
-
-static final BitmapCharRec ch203 = new BitmapCharRec(13,21,-1,0,15,ch203data);
-
-/* char: 0xca */
-
-static final byte[] ch202data = {
-(byte) 0xff,(byte) 0xf8,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x40,
-(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x30,
-(byte) 0xff,(byte) 0xf0,(byte) 0x0,(byte) 0x0,(byte) 0x10,(byte) 0x20,(byte) 0xc,(byte) 0xc0,(byte) 0x7,(byte) 0x80,(byte) 0x3,(byte) 0x0,
-};
-
-static final BitmapCharRec ch202 = new BitmapCharRec(13,22,-1,0,15,ch202data);
-
-/* char: 0xc9 */
-
-static final byte[] ch201data = {
-(byte) 0xff,(byte) 0xf8,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x40,
-(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x30,
-(byte) 0xff,(byte) 0xf0,(byte) 0x0,(byte) 0x0,(byte) 0x4,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch201 = new BitmapCharRec(13,22,-1,0,15,ch201data);
-
-/* char: 0xc8 */
-
-static final byte[] ch200data = {
-(byte) 0xff,(byte) 0xf8,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x40,
-(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x30,
-(byte) 0xff,(byte) 0xf0,(byte) 0x0,(byte) 0x0,(byte) 0x1,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x1c,(byte) 0x0,(byte) 0x18,(byte) 0x0,
-};
-
-static final BitmapCharRec ch200 = new BitmapCharRec(13,22,-1,0,15,ch200data);
-
-/* char: 0xc7 */
-
-static final byte[] ch199data = {
-(byte) 0x7,(byte) 0x80,(byte) 0xc,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0x0,(byte) 0x1,(byte) 0x0,(byte) 0x7,(byte) 0xe0,(byte) 0x1e,(byte) 0x38,
-(byte) 0x38,(byte) 0x8,(byte) 0x60,(byte) 0x4,(byte) 0x60,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,
-(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x60,(byte) 0x4,(byte) 0x60,(byte) 0x4,(byte) 0x38,(byte) 0xc,(byte) 0x1c,(byte) 0x3c,(byte) 0x7,(byte) 0xe4,
-};
-
-static final BitmapCharRec ch199 = new BitmapCharRec(14,23,-1,6,16,ch199data);
-
-/* char: 0xc6 */
-
-static final byte[] ch198data = {
-(byte) 0xf9,(byte) 0xff,(byte) 0xf0,(byte) 0x30,(byte) 0x60,(byte) 0x30,(byte) 0x10,(byte) 0x60,(byte) 0x10,(byte) 0x10,(byte) 0x60,(byte) 0x10,(byte) 0x18,(byte) 0x60,(byte) 0x0,(byte) 0x8,
-(byte) 0x60,(byte) 0x0,(byte) 0xf,(byte) 0xe0,(byte) 0x80,(byte) 0xc,(byte) 0x60,(byte) 0x80,(byte) 0x4,(byte) 0x7f,(byte) 0x80,(byte) 0x4,(byte) 0x60,(byte) 0x80,(byte) 0x6,(byte) 0x60,
-(byte) 0x80,(byte) 0x2,(byte) 0x60,(byte) 0x0,(byte) 0x2,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0x60,(byte) 0x20,(byte) 0x1,(byte) 0x60,(byte) 0x20,(byte) 0x1,(byte) 0xe0,(byte) 0x60,
-(byte) 0x3,(byte) 0xff,(byte) 0xe0,
-};
-
-static final BitmapCharRec ch198 = new BitmapCharRec(20,17,0,0,21,ch198data);
-
-/* char: 0xc5 */
-
-static final byte[] ch197data = {
-(byte) 0xfc,(byte) 0x1f,(byte) 0x80,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0xc,(byte) 0x0,(byte) 0x18,(byte) 0xc,(byte) 0x0,(byte) 0x8,
-(byte) 0xc,(byte) 0x0,(byte) 0xf,(byte) 0xf8,(byte) 0x0,(byte) 0xc,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x30,(byte) 0x0,(byte) 0x6,(byte) 0x30,
-(byte) 0x0,(byte) 0x2,(byte) 0x30,(byte) 0x0,(byte) 0x2,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,
-(byte) 0x0,(byte) 0x80,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,(byte) 0x2,(byte) 0x20,(byte) 0x0,(byte) 0x2,(byte) 0x20,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,
-};
-
-static final BitmapCharRec ch197 = new BitmapCharRec(17,21,0,0,17,ch197data);
-
-/* char: 0xc4 */
-
-static final byte[] ch196data = {
-(byte) 0xfc,(byte) 0x1f,(byte) 0x80,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0xc,(byte) 0x0,(byte) 0x18,(byte) 0xc,(byte) 0x0,(byte) 0x8,
-(byte) 0xc,(byte) 0x0,(byte) 0xf,(byte) 0xf8,(byte) 0x0,(byte) 0xc,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x30,(byte) 0x0,(byte) 0x6,(byte) 0x30,
-(byte) 0x0,(byte) 0x2,(byte) 0x30,(byte) 0x0,(byte) 0x2,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,
-(byte) 0x0,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x6,(byte) 0x30,(byte) 0x0,(byte) 0x6,(byte) 0x30,(byte) 0x0,
-};
-
-static final BitmapCharRec ch196 = new BitmapCharRec(17,21,0,0,17,ch196data);
-
-/* char: 0xc3 */
-
-static final byte[] ch195data = {
-(byte) 0xfc,(byte) 0x1f,(byte) 0x80,(byte) 0x30,(byte) 0x7,(byte) 0x0,(byte) 0x10,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0xc,(byte) 0x0,(byte) 0x18,(byte) 0xc,(byte) 0x0,(byte) 0x8,
-(byte) 0xc,(byte) 0x0,(byte) 0xf,(byte) 0xf8,(byte) 0x0,(byte) 0xc,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x30,(byte) 0x0,(byte) 0x6,(byte) 0x30,
-(byte) 0x0,(byte) 0x2,(byte) 0x30,(byte) 0x0,(byte) 0x2,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,
-(byte) 0x0,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x4,(byte) 0xe0,(byte) 0x0,(byte) 0x3,(byte) 0x90,(byte) 0x0,
-};
-
-static final BitmapCharRec ch195 = new BitmapCharRec(17,21,0,0,17,ch195data);
-
-/* char: 0xc2 */
-
-static final byte[] ch194data = {
-(byte) 0xfc,(byte) 0x1f,(byte) 0x80,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0xc,(byte) 0x0,(byte) 0x18,(byte) 0xc,(byte) 0x0,(byte) 0x8,
-(byte) 0xc,(byte) 0x0,(byte) 0xf,(byte) 0xf8,(byte) 0x0,(byte) 0xc,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x30,(byte) 0x0,(byte) 0x6,(byte) 0x30,
-(byte) 0x0,(byte) 0x2,(byte) 0x30,(byte) 0x0,(byte) 0x2,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,
-(byte) 0x0,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x8,(byte) 0x10,(byte) 0x0,(byte) 0x6,(byte) 0x60,(byte) 0x0,(byte) 0x3,(byte) 0xc0,(byte) 0x0,(byte) 0x1,
-(byte) 0x80,(byte) 0x0,
-};
-
-static final BitmapCharRec ch194 = new BitmapCharRec(17,22,0,0,17,ch194data);
-
-/* char: 0xc1 */
-
-static final byte[] ch193data = {
-(byte) 0xfc,(byte) 0x1f,(byte) 0x80,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0xc,(byte) 0x0,(byte) 0x18,(byte) 0xc,(byte) 0x0,(byte) 0x8,
-(byte) 0xc,(byte) 0x0,(byte) 0xf,(byte) 0xf8,(byte) 0x0,(byte) 0xc,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x30,(byte) 0x0,(byte) 0x6,(byte) 0x30,
-(byte) 0x0,(byte) 0x2,(byte) 0x30,(byte) 0x0,(byte) 0x2,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,
-(byte) 0x0,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x1,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x70,(byte) 0x0,(byte) 0x0,
-(byte) 0x30,(byte) 0x0,
-};
-
-static final BitmapCharRec ch193 = new BitmapCharRec(17,22,0,0,17,ch193data);
-
-/* char: 0xc0 */
-
-static final byte[] ch192data = {
-(byte) 0xfc,(byte) 0x1f,(byte) 0x80,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0xc,(byte) 0x0,(byte) 0x18,(byte) 0xc,(byte) 0x0,(byte) 0x8,
-(byte) 0xc,(byte) 0x0,(byte) 0xf,(byte) 0xf8,(byte) 0x0,(byte) 0xc,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x30,(byte) 0x0,(byte) 0x6,(byte) 0x30,
-(byte) 0x0,(byte) 0x2,(byte) 0x30,(byte) 0x0,(byte) 0x2,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,
-(byte) 0x0,(byte) 0x80,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x20,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x3,(byte) 0x80,(byte) 0x0,(byte) 0x3,
-(byte) 0x0,(byte) 0x0,
-};
-
-static final BitmapCharRec ch192 = new BitmapCharRec(17,22,0,0,17,ch192data);
-
-/* char: 0xbf */
-
-static final byte[] ch191data = {
-(byte) 0x3e,(byte) 0x63,(byte) 0xc1,(byte) 0xc3,(byte) 0xc3,(byte) 0xe0,(byte) 0x70,(byte) 0x30,(byte) 0x38,(byte) 0x18,(byte) 0x18,(byte) 0x8,(byte) 0x8,(byte) 0x0,(byte) 0x0,(byte) 0xc,
-(byte) 0xc,
-};
-
-static final BitmapCharRec ch191 = new BitmapCharRec(8,17,-1,5,11,ch191data);
-
-/* char: 0xbe */
-
-static final byte[] ch190data = {
-(byte) 0x18,(byte) 0x2,(byte) 0x0,(byte) 0x8,(byte) 0x2,(byte) 0x0,(byte) 0xc,(byte) 0x7f,(byte) 0x80,(byte) 0x4,(byte) 0x22,(byte) 0x0,(byte) 0x6,(byte) 0x32,(byte) 0x0,(byte) 0x3,
-(byte) 0x12,(byte) 0x0,(byte) 0x1,(byte) 0xa,(byte) 0x0,(byte) 0x71,(byte) 0x8e,(byte) 0x0,(byte) 0x88,(byte) 0x86,(byte) 0x0,(byte) 0x8c,(byte) 0xc2,(byte) 0x0,(byte) 0xc,(byte) 0x60,
-(byte) 0x0,(byte) 0x8,(byte) 0x20,(byte) 0x0,(byte) 0x30,(byte) 0x30,(byte) 0x0,(byte) 0x8,(byte) 0x10,(byte) 0x0,(byte) 0x8c,(byte) 0x18,(byte) 0x0,(byte) 0x4c,(byte) 0xc,(byte) 0x0,
-(byte) 0x38,(byte) 0x4,(byte) 0x0,
-};
-
-static final BitmapCharRec ch190 = new BitmapCharRec(17,17,0,0,18,ch190data);
-
-/* char: 0xbd */
-
-static final byte[] ch189data = {
-(byte) 0x30,(byte) 0x7e,(byte) 0x10,(byte) 0x22,(byte) 0x18,(byte) 0x10,(byte) 0x8,(byte) 0x18,(byte) 0xc,(byte) 0x8,(byte) 0x6,(byte) 0x4,(byte) 0x2,(byte) 0x6,(byte) 0xfb,(byte) 0x46,
-(byte) 0x21,(byte) 0x26,(byte) 0x21,(byte) 0x9c,(byte) 0x20,(byte) 0xc0,(byte) 0x20,(byte) 0x40,(byte) 0x20,(byte) 0x60,(byte) 0x20,(byte) 0x20,(byte) 0xa0,(byte) 0x30,(byte) 0x60,(byte) 0x18,
-(byte) 0x20,(byte) 0x8,
-};
-
-static final BitmapCharRec ch189 = new BitmapCharRec(15,17,-1,0,18,ch189data);
-
-/* char: 0xbc */
-
-static final byte[] ch188data = {
-(byte) 0x30,(byte) 0x4,(byte) 0x10,(byte) 0x4,(byte) 0x18,(byte) 0xff,(byte) 0x8,(byte) 0x44,(byte) 0xc,(byte) 0x64,(byte) 0x6,(byte) 0x24,(byte) 0x2,(byte) 0x14,(byte) 0xfb,(byte) 0x1c,
-(byte) 0x21,(byte) 0xc,(byte) 0x21,(byte) 0x84,(byte) 0x20,(byte) 0xc0,(byte) 0x20,(byte) 0x40,(byte) 0x20,(byte) 0x60,(byte) 0x20,(byte) 0x20,(byte) 0xa0,(byte) 0x30,(byte) 0x60,(byte) 0x18,
-(byte) 0x20,(byte) 0x8,
-};
-
-static final BitmapCharRec ch188 = new BitmapCharRec(16,17,-1,0,18,ch188data);
-
-/* char: 0xbb */
-
-static final byte[] ch187data = {
-(byte) 0x88,(byte) 0x0,(byte) 0xcc,(byte) 0x0,(byte) 0x66,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x19,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0x33,(byte) 0x0,(byte) 0x66,(byte) 0x0,
-(byte) 0xcc,(byte) 0x0,(byte) 0x88,(byte) 0x0,
-};
-
-static final BitmapCharRec ch187 = new BitmapCharRec(9,10,-2,-1,12,ch187data);
-
-/* char: 0xba */
-
-static final byte[] ch186data = {
-(byte) 0xfc,(byte) 0x0,(byte) 0x78,(byte) 0xcc,(byte) 0xcc,(byte) 0xcc,(byte) 0xcc,(byte) 0xcc,(byte) 0x78,
-};
-
-static final BitmapCharRec ch186 = new BitmapCharRec(6,9,-1,-8,8,ch186data);
-
-/* char: 0xb9 */
-
-static final byte[] ch185data = {
-(byte) 0xf8,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0x20,(byte) 0xa0,(byte) 0x60,(byte) 0x20,
-};
-
-static final BitmapCharRec ch185 = new BitmapCharRec(5,10,-1,-7,7,ch185data);
-
-/* char: 0xb8 */
-
-static final byte[] ch184data = {
-(byte) 0x78,(byte) 0xcc,(byte) 0xc,(byte) 0x3c,(byte) 0x30,(byte) 0x10,
-};
-
-static final BitmapCharRec ch184 = new BitmapCharRec(6,6,-1,6,8,ch184data);
-
-/* char: 0xb7 */
-
-static final byte[] ch183data = {
-(byte) 0xc0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch183 = new BitmapCharRec(2,2,-2,-6,6,ch183data);
-
-/* char: 0xb6 */
-
-static final byte[] ch182data = {
-(byte) 0x9,(byte) 0x0,(byte) 0x9,(byte) 0x0,(byte) 0x9,(byte) 0x0,(byte) 0x9,(byte) 0x0,(byte) 0x9,(byte) 0x0,(byte) 0x9,(byte) 0x0,(byte) 0x9,(byte) 0x0,(byte) 0x9,(byte) 0x0,
-(byte) 0x9,(byte) 0x0,(byte) 0x9,(byte) 0x0,(byte) 0x9,(byte) 0x0,(byte) 0x19,(byte) 0x0,(byte) 0x39,(byte) 0x0,(byte) 0x79,(byte) 0x0,(byte) 0x79,(byte) 0x0,(byte) 0xf9,(byte) 0x0,
-(byte) 0xf9,(byte) 0x0,(byte) 0xf9,(byte) 0x0,(byte) 0x79,(byte) 0x0,(byte) 0x79,(byte) 0x0,(byte) 0x39,(byte) 0x0,(byte) 0x1f,(byte) 0x80,
-};
-
-static final BitmapCharRec ch182 = new BitmapCharRec(9,22,-1,5,11,ch182data);
-
-/* char: 0xb5 */
-
-static final byte[] ch181data = {
-(byte) 0x40,(byte) 0x0,(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x40,(byte) 0x0,(byte) 0x40,(byte) 0x0,(byte) 0x5c,(byte) 0xe0,(byte) 0x7e,(byte) 0xc0,(byte) 0x71,(byte) 0xc0,
-(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,
-(byte) 0xe1,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch181 = new BitmapCharRec(11,17,-1,5,13,ch181data);
-
-/* char: 0xb4 */
-
-static final byte[] ch180data = {
-(byte) 0x80,(byte) 0x60,(byte) 0x38,(byte) 0x18,
-};
-
-static final BitmapCharRec ch180 = new BitmapCharRec(5,4,-2,-13,8,ch180data);
-
-/* char: 0xb3 */
-
-static final byte[] ch179data = {
-(byte) 0x70,(byte) 0x88,(byte) 0x8c,(byte) 0xc,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x8c,(byte) 0x4c,(byte) 0x38,
-};
-
-static final BitmapCharRec ch179 = new BitmapCharRec(6,10,0,-7,7,ch179data);
-
-/* char: 0xb2 */
-
-static final byte[] ch178data = {
-(byte) 0xfc,(byte) 0x44,(byte) 0x20,(byte) 0x30,(byte) 0x10,(byte) 0x8,(byte) 0xc,(byte) 0x8c,(byte) 0x4c,(byte) 0x38,
-};
-
-static final BitmapCharRec ch178 = new BitmapCharRec(6,10,0,-7,7,ch178data);
-
-/* char: 0xb1 */
-
-static final byte[] ch177data = {
-(byte) 0xff,(byte) 0xf0,(byte) 0xff,(byte) 0xf0,(byte) 0x0,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,
-(byte) 0xff,(byte) 0xf0,(byte) 0xff,(byte) 0xf0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,
-};
-
-static final BitmapCharRec ch177 = new BitmapCharRec(12,15,-1,0,14,ch177data);
-
-/* char: 0xb0 */
-
-static final byte[] ch176data = {
-(byte) 0x38,(byte) 0x44,(byte) 0x82,(byte) 0x82,(byte) 0x82,(byte) 0x44,(byte) 0x38,
-};
-
-static final BitmapCharRec ch176 = new BitmapCharRec(7,7,-1,-10,9,ch176data);
-
-/* char: 0xaf */
-
-static final byte[] ch175data = {
-(byte) 0xfc,(byte) 0xfc,
-};
-
-static final BitmapCharRec ch175 = new BitmapCharRec(6,2,-1,-14,8,ch175data);
-
-/* char: 0xae */
-
-static final byte[] ch174data = {
-(byte) 0x7,(byte) 0xf0,(byte) 0x0,(byte) 0x1c,(byte) 0x1c,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x60,(byte) 0x3,(byte) 0x0,(byte) 0x47,(byte) 0x19,(byte) 0x0,(byte) 0xc2,
-(byte) 0x31,(byte) 0x80,(byte) 0x82,(byte) 0x20,(byte) 0x80,(byte) 0x82,(byte) 0x40,(byte) 0x80,(byte) 0x83,(byte) 0xe0,(byte) 0x80,(byte) 0x82,(byte) 0x30,(byte) 0x80,(byte) 0x82,(byte) 0x10,
-(byte) 0x80,(byte) 0xc2,(byte) 0x11,(byte) 0x80,(byte) 0x42,(byte) 0x31,(byte) 0x0,(byte) 0x67,(byte) 0xe3,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x1c,(byte) 0x1c,(byte) 0x0,
-(byte) 0x7,(byte) 0xf0,(byte) 0x0,
-};
-
-static final BitmapCharRec ch174 = new BitmapCharRec(17,17,-1,0,19,ch174data);
-
-/* char: 0xad */
-
-static final byte[] ch173data = {
-(byte) 0xfe,(byte) 0xfe,
-};
-
-static final BitmapCharRec ch173 = new BitmapCharRec(7,2,-1,-5,9,ch173data);
-
-/* char: 0xac */
-
-static final byte[] ch172data = {
-(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0xff,(byte) 0xf0,(byte) 0xff,(byte) 0xf0,
-};
-
-static final BitmapCharRec ch172 = new BitmapCharRec(12,7,-1,-3,14,ch172data);
-
-/* char: 0xab */
-
-static final byte[] ch171data = {
-(byte) 0x8,(byte) 0x80,(byte) 0x19,(byte) 0x80,(byte) 0x33,(byte) 0x0,(byte) 0x66,(byte) 0x0,(byte) 0xcc,(byte) 0x0,(byte) 0xcc,(byte) 0x0,(byte) 0x66,(byte) 0x0,(byte) 0x33,(byte) 0x0,
-(byte) 0x19,(byte) 0x80,(byte) 0x8,(byte) 0x80,
-};
-
-static final BitmapCharRec ch171 = new BitmapCharRec(9,10,-2,-1,13,ch171data);
-
-/* char: 0xaa */
-
-static final byte[] ch170data = {
-(byte) 0x7e,(byte) 0x0,(byte) 0x76,(byte) 0xcc,(byte) 0xcc,(byte) 0x7c,(byte) 0xc,(byte) 0xcc,(byte) 0x78,
-};
-
-static final BitmapCharRec ch170 = new BitmapCharRec(7,9,0,-8,8,ch170data);
-
-/* char: 0xa9 */
-
-static final byte[] ch169data = {
-(byte) 0x7,(byte) 0xf0,(byte) 0x0,(byte) 0x1c,(byte) 0x1c,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x61,(byte) 0xc3,(byte) 0x0,(byte) 0x47,(byte) 0x71,(byte) 0x0,(byte) 0xc4,
-(byte) 0x19,(byte) 0x80,(byte) 0x8c,(byte) 0x0,(byte) 0x80,(byte) 0x88,(byte) 0x0,(byte) 0x80,(byte) 0x88,(byte) 0x0,(byte) 0x80,(byte) 0x88,(byte) 0x0,(byte) 0x80,(byte) 0x8c,(byte) 0x0,
-(byte) 0x80,(byte) 0xc4,(byte) 0x19,(byte) 0x80,(byte) 0x47,(byte) 0x31,(byte) 0x0,(byte) 0x61,(byte) 0xe3,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x1c,(byte) 0x1c,(byte) 0x0,
-(byte) 0x7,(byte) 0xf0,(byte) 0x0,
-};
-
-static final BitmapCharRec ch169 = new BitmapCharRec(17,17,-1,0,19,ch169data);
-
-/* char: 0xa8 */
-
-static final byte[] ch168data = {
-(byte) 0xcc,(byte) 0xcc,
-};
-
-static final BitmapCharRec ch168 = new BitmapCharRec(6,2,-1,-14,8,ch168data);
-
-/* char: 0xa7 */
-
-static final byte[] ch167data = {
-(byte) 0x38,(byte) 0x64,(byte) 0x62,(byte) 0x6,(byte) 0xe,(byte) 0x1c,(byte) 0x38,(byte) 0x74,(byte) 0xe2,(byte) 0xc3,(byte) 0x83,(byte) 0x87,(byte) 0x4e,(byte) 0x3c,(byte) 0x38,(byte) 0x70,
-(byte) 0x60,(byte) 0x46,(byte) 0x26,(byte) 0x1c,
-};
-
-static final BitmapCharRec ch167 = new BitmapCharRec(8,20,-2,2,12,ch167data);
-
-/* char: 0xa6 */
-
-static final byte[] ch166data = {
-(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
-(byte) 0xc0,
-};
-
-static final BitmapCharRec ch166 = new BitmapCharRec(2,17,-2,0,6,ch166data);
-
-/* char: 0xa5 */
-
-static final byte[] ch165data = {
-(byte) 0xf,(byte) 0xc0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x1f,(byte) 0xe0,(byte) 0x3,(byte) 0x0,(byte) 0x1f,(byte) 0xe0,
-(byte) 0x3,(byte) 0x0,(byte) 0x7,(byte) 0x80,(byte) 0xc,(byte) 0x80,(byte) 0xc,(byte) 0xc0,(byte) 0x18,(byte) 0x40,(byte) 0x18,(byte) 0x60,(byte) 0x30,(byte) 0x20,(byte) 0x70,(byte) 0x30,
-(byte) 0xf8,(byte) 0x7c,
-};
-
-static final BitmapCharRec ch165 = new BitmapCharRec(14,17,0,0,14,ch165data);
-
-/* char: 0xa4 */
-
-static final byte[] ch164data = {
-(byte) 0xc0,(byte) 0x60,(byte) 0xee,(byte) 0xe0,(byte) 0x7f,(byte) 0xc0,(byte) 0x31,(byte) 0x80,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,
-(byte) 0x31,(byte) 0x80,(byte) 0x7f,(byte) 0xc0,(byte) 0xee,(byte) 0xe0,(byte) 0xc0,(byte) 0x60,
-};
-
-static final BitmapCharRec ch164 = new BitmapCharRec(11,12,-1,-3,13,ch164data);
-
-/* char: 0xa3 */
-
-static final byte[] ch163data = {
-(byte) 0xe7,(byte) 0x80,(byte) 0xbe,(byte) 0xc0,(byte) 0x78,(byte) 0x40,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,
-(byte) 0x30,(byte) 0x0,(byte) 0xfc,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x31,(byte) 0x80,(byte) 0x19,(byte) 0x80,
-(byte) 0xf,(byte) 0x0,
-};
-
-static final BitmapCharRec ch163 = new BitmapCharRec(10,17,-1,0,12,ch163data);
-
-/* char: 0xa2 */
-
-static final byte[] ch162data = {
-(byte) 0x40,(byte) 0x0,(byte) 0x40,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x70,(byte) 0x80,(byte) 0xd0,(byte) 0x0,(byte) 0xc8,(byte) 0x0,(byte) 0xc8,(byte) 0x0,
-(byte) 0xc8,(byte) 0x0,(byte) 0xc4,(byte) 0x0,(byte) 0xc4,(byte) 0x0,(byte) 0x43,(byte) 0x80,(byte) 0x63,(byte) 0x80,(byte) 0x1f,(byte) 0x0,(byte) 0x1,(byte) 0x0,(byte) 0x1,(byte) 0x0,
-};
-
-static final BitmapCharRec ch162 = new BitmapCharRec(9,16,-1,2,12,ch162data);
-
-/* char: 0xa1 */
-
-static final byte[] ch161data = {
-(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,
-(byte) 0xc0,
-};
-
-static final BitmapCharRec ch161 = new BitmapCharRec(2,17,-4,5,8,ch161data);
-
-/* char: 0xa0 */
-
-static final BitmapCharRec ch160 = new BitmapCharRec(0,0,0,0,6,null);
-
-/* char: 0x7e '~' */
-
-static final byte[] ch126data = {
-(byte) 0x83,(byte) 0x80,(byte) 0xc7,(byte) 0xc0,(byte) 0x7c,(byte) 0x60,(byte) 0x38,(byte) 0x20,
-};
-
-static final BitmapCharRec ch126 = new BitmapCharRec(11,4,-1,-5,13,ch126data);
-
-/* char: 0x7d '}' */
-
-static final byte[] ch125data = {
-(byte) 0xe0,(byte) 0x30,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x8,(byte) 0xc,(byte) 0x4,(byte) 0x3,(byte) 0x4,(byte) 0xc,(byte) 0x8,(byte) 0x18,
-(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x30,(byte) 0xe0,
-};
-
-static final BitmapCharRec ch125 = new BitmapCharRec(8,22,-1,5,10,ch125data);
-
-/* char: 0x7c '|' */
-
-static final byte[] ch124data = {
-(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
-(byte) 0xc0,
-};
-
-static final BitmapCharRec ch124 = new BitmapCharRec(2,17,-2,0,6,ch124data);
-
-/* char: 0x7b '{' */
-
-static final byte[] ch123data = {
-(byte) 0x7,(byte) 0xc,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x10,(byte) 0x30,(byte) 0x20,(byte) 0xc0,(byte) 0x20,(byte) 0x30,(byte) 0x10,(byte) 0x18,
-(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0xc,(byte) 0x7,
-};
-
-static final BitmapCharRec ch123 = new BitmapCharRec(8,22,-1,5,10,ch123data);
-
-/* char: 0x7a 'z' */
-
-static final byte[] ch122data = {
-(byte) 0xff,(byte) 0xc3,(byte) 0x61,(byte) 0x70,(byte) 0x30,(byte) 0x38,(byte) 0x18,(byte) 0x1c,(byte) 0xe,(byte) 0x86,(byte) 0xc3,(byte) 0xff,
-};
-
-static final BitmapCharRec ch122 = new BitmapCharRec(8,12,-1,0,10,ch122data);
-
-/* char: 0x79 'y' */
-
-static final byte[] ch121data = {
-(byte) 0xe0,(byte) 0x0,(byte) 0xf0,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x8,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x4,(byte) 0x0,(byte) 0xe,(byte) 0x0,(byte) 0xe,(byte) 0x0,
-(byte) 0x1a,(byte) 0x0,(byte) 0x19,(byte) 0x0,(byte) 0x19,(byte) 0x0,(byte) 0x31,(byte) 0x0,(byte) 0x30,(byte) 0x80,(byte) 0x30,(byte) 0x80,(byte) 0x60,(byte) 0x80,(byte) 0x60,(byte) 0xc0,
-(byte) 0xf1,(byte) 0xe0,
-};
-
-static final BitmapCharRec ch121 = new BitmapCharRec(11,17,0,5,11,ch121data);
-
-/* char: 0x78 'x' */
-
-static final byte[] ch120data = {
-(byte) 0xf1,(byte) 0xe0,(byte) 0x60,(byte) 0xc0,(byte) 0x21,(byte) 0x80,(byte) 0x33,(byte) 0x80,(byte) 0x1b,(byte) 0x0,(byte) 0xe,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x1a,(byte) 0x0,
-(byte) 0x39,(byte) 0x0,(byte) 0x31,(byte) 0x80,(byte) 0x60,(byte) 0xc0,(byte) 0xf1,(byte) 0xe0,
-};
-
-static final BitmapCharRec ch120 = new BitmapCharRec(11,12,-1,0,13,ch120data);
-
-/* char: 0x77 'w' */
-
-static final byte[] ch119data = {
-(byte) 0x4,(byte) 0x10,(byte) 0x0,(byte) 0xe,(byte) 0x38,(byte) 0x0,(byte) 0xe,(byte) 0x38,(byte) 0x0,(byte) 0x1a,(byte) 0x28,(byte) 0x0,(byte) 0x1a,(byte) 0x64,(byte) 0x0,(byte) 0x19,
-(byte) 0x64,(byte) 0x0,(byte) 0x31,(byte) 0x64,(byte) 0x0,(byte) 0x30,(byte) 0xc2,(byte) 0x0,(byte) 0x30,(byte) 0xc2,(byte) 0x0,(byte) 0x60,(byte) 0xc2,(byte) 0x0,(byte) 0x60,(byte) 0xc3,
-(byte) 0x0,(byte) 0xf1,(byte) 0xe7,(byte) 0x80,
-};
-
-static final BitmapCharRec ch119 = new BitmapCharRec(17,12,0,0,17,ch119data);
-
-/* char: 0x76 'v' */
-
-static final byte[] ch118data = {
-(byte) 0x4,(byte) 0x0,(byte) 0xe,(byte) 0x0,(byte) 0xe,(byte) 0x0,(byte) 0x1a,(byte) 0x0,(byte) 0x19,(byte) 0x0,(byte) 0x19,(byte) 0x0,(byte) 0x31,(byte) 0x0,(byte) 0x30,(byte) 0x80,
-(byte) 0x30,(byte) 0x80,(byte) 0x60,(byte) 0x80,(byte) 0x60,(byte) 0xc0,(byte) 0xf1,(byte) 0xe0,
-};
-
-static final BitmapCharRec ch118 = new BitmapCharRec(11,12,0,0,11,ch118data);
-
-/* char: 0x75 'u' */
-
-static final byte[] ch117data = {
-(byte) 0x1c,(byte) 0xe0,(byte) 0x3e,(byte) 0xc0,(byte) 0x71,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,
-(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0xe1,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch117 = new BitmapCharRec(11,12,-1,0,13,ch117data);
-
-/* char: 0x74 't' */
-
-static final byte[] ch116data = {
-(byte) 0x1c,(byte) 0x32,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0xfe,(byte) 0x70,(byte) 0x30,(byte) 0x10,
-};
-
-static final BitmapCharRec ch116 = new BitmapCharRec(7,15,0,0,7,ch116data);
-
-/* char: 0x73 's' */
-
-static final byte[] ch115data = {
-(byte) 0xf8,(byte) 0xc6,(byte) 0x83,(byte) 0x3,(byte) 0x7,(byte) 0x1e,(byte) 0x7c,(byte) 0x70,(byte) 0xe0,(byte) 0xc2,(byte) 0x66,(byte) 0x3e,
-};
-
-static final BitmapCharRec ch115 = new BitmapCharRec(8,12,-1,0,10,ch115data);
-
-/* char: 0x72 'r' */
-
-static final byte[] ch114data = {
-(byte) 0xf0,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x76,(byte) 0x6e,(byte) 0xe6,
-};
-
-static final BitmapCharRec ch114 = new BitmapCharRec(7,12,-1,0,8,ch114data);
-
-/* char: 0x71 'q' */
-
-static final byte[] ch113data = {
-(byte) 0x3,(byte) 0xc0,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1d,(byte) 0x80,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,
-(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,
-(byte) 0x1d,(byte) 0x80,
-};
-
-static final BitmapCharRec ch113 = new BitmapCharRec(10,17,-1,5,12,ch113data);
-
-/* char: 0x70 'p' */
-
-static final byte[] ch112data = {
-(byte) 0xf0,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x6e,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,
-(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,
-(byte) 0xee,(byte) 0x0,
-};
-
-static final BitmapCharRec ch112 = new BitmapCharRec(10,17,-1,5,12,ch112data);
-
-/* char: 0x6f 'o' */
-
-static final byte[] ch111data = {
-(byte) 0x1e,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
-(byte) 0xc0,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,(byte) 0x1e,(byte) 0x0,
-};
-
-static final BitmapCharRec ch111 = new BitmapCharRec(10,12,-1,0,12,ch111data);
-
-/* char: 0x6e 'n' */
-
-static final byte[] ch110data = {
-(byte) 0xf1,(byte) 0xe0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,
-(byte) 0x60,(byte) 0xc0,(byte) 0x71,(byte) 0xc0,(byte) 0x6f,(byte) 0x80,(byte) 0xe7,(byte) 0x0,
-};
-
-static final BitmapCharRec ch110 = new BitmapCharRec(11,12,-1,0,13,ch110data);
-
-/* char: 0x6d 'm' */
-
-static final byte[] ch109data = {
-(byte) 0xf1,(byte) 0xe3,(byte) 0xc0,(byte) 0x60,(byte) 0xc1,(byte) 0x80,(byte) 0x60,(byte) 0xc1,(byte) 0x80,(byte) 0x60,(byte) 0xc1,(byte) 0x80,(byte) 0x60,(byte) 0xc1,(byte) 0x80,(byte) 0x60,
-(byte) 0xc1,(byte) 0x80,(byte) 0x60,(byte) 0xc1,(byte) 0x80,(byte) 0x60,(byte) 0xc1,(byte) 0x80,(byte) 0x60,(byte) 0xc1,(byte) 0x80,(byte) 0x71,(byte) 0xe3,(byte) 0x80,(byte) 0x6f,(byte) 0x9f,
-(byte) 0x0,(byte) 0xe7,(byte) 0xe,(byte) 0x0,
-};
-
-static final BitmapCharRec ch109 = new BitmapCharRec(18,12,-1,0,20,ch109data);
-
-/* char: 0x6c 'l' */
-
-static final byte[] ch108data = {
-(byte) 0xf0,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,
-(byte) 0xe0,
-};
-
-static final BitmapCharRec ch108 = new BitmapCharRec(4,17,-1,0,6,ch108data);
-
-/* char: 0x6b 'k' */
-
-static final byte[] ch107data = {
-(byte) 0xf3,(byte) 0xe0,(byte) 0x61,(byte) 0xc0,(byte) 0x63,(byte) 0x80,(byte) 0x67,(byte) 0x0,(byte) 0x6e,(byte) 0x0,(byte) 0x6c,(byte) 0x0,(byte) 0x78,(byte) 0x0,(byte) 0x68,(byte) 0x0,
-(byte) 0x64,(byte) 0x0,(byte) 0x66,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x67,(byte) 0xc0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,
-(byte) 0xe0,(byte) 0x0,
-};
-
-static final BitmapCharRec ch107 = new BitmapCharRec(11,17,-1,0,12,ch107data);
-
-/* char: 0x6a 'j' */
-
-static final byte[] ch106data = {
-(byte) 0xc0,(byte) 0xe0,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,
-(byte) 0x70,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x30,(byte) 0x30,
-};
-
-static final BitmapCharRec ch106 = new BitmapCharRec(4,22,0,5,6,ch106data);
-
-/* char: 0x69 'i' */
-
-static final byte[] ch105data = {
-(byte) 0xf0,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0x60,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x60,
-(byte) 0x60,
-};
-
-static final BitmapCharRec ch105 = new BitmapCharRec(4,17,-1,0,6,ch105data);
-
-/* char: 0x68 'h' */
-
-static final byte[] ch104data = {
-(byte) 0xf1,(byte) 0xe0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,
-(byte) 0x60,(byte) 0xc0,(byte) 0x71,(byte) 0xc0,(byte) 0x6f,(byte) 0x80,(byte) 0x67,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,
-(byte) 0xe0,(byte) 0x0,
-};
-
-static final BitmapCharRec ch104 = new BitmapCharRec(11,17,-1,0,13,ch104data);
-
-/* char: 0x67 'g' */
-
-static final byte[] ch103data = {
-(byte) 0x3f,(byte) 0x0,(byte) 0xf1,(byte) 0xc0,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x20,(byte) 0x60,(byte) 0x60,(byte) 0x3f,(byte) 0xc0,(byte) 0x7f,(byte) 0x0,(byte) 0x60,(byte) 0x0,
-(byte) 0x30,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x33,(byte) 0x0,
-(byte) 0x1f,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch103 = new BitmapCharRec(11,17,-1,5,12,ch103data);
-
-/* char: 0x66 'f' */
-
-static final byte[] ch102data = {
-(byte) 0x78,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0xfe,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x16,
-(byte) 0xe,
-};
-
-static final BitmapCharRec ch102 = new BitmapCharRec(7,17,0,0,7,ch102data);
-
-/* char: 0x65 'e' */
-
-static final byte[] ch101data = {
-(byte) 0x1e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x70,(byte) 0x80,(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xff,(byte) 0x80,
-(byte) 0xc1,(byte) 0x80,(byte) 0x41,(byte) 0x80,(byte) 0x63,(byte) 0x0,(byte) 0x1e,(byte) 0x0,
-};
-
-static final BitmapCharRec ch101 = new BitmapCharRec(9,12,-1,0,11,ch101data);
-
-/* char: 0x64 'd' */
-
-static final byte[] ch100data = {
-(byte) 0x1e,(byte) 0xc0,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0xc1,(byte) 0x80,
-(byte) 0xc1,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,(byte) 0x1d,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,
-(byte) 0x3,(byte) 0x80,
-};
-
-static final BitmapCharRec ch100 = new BitmapCharRec(10,17,-1,0,12,ch100data);
-
-/* char: 0x63 'c' */
-
-static final byte[] ch99data = {
-(byte) 0x1e,(byte) 0x0,(byte) 0x7f,(byte) 0x0,(byte) 0x70,(byte) 0x80,(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,
-(byte) 0xc0,(byte) 0x0,(byte) 0x41,(byte) 0x80,(byte) 0x63,(byte) 0x80,(byte) 0x1f,(byte) 0x0,
-};
-
-static final BitmapCharRec ch99 = new BitmapCharRec(9,12,-1,0,11,ch99data);
-
-/* char: 0x62 'b' */
-
-static final byte[] ch98data = {
-(byte) 0x5e,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,(byte) 0x60,(byte) 0xc0,
-(byte) 0x60,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x73,(byte) 0x80,(byte) 0x6e,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,
-(byte) 0xe0,(byte) 0x0,
-};
-
-static final BitmapCharRec ch98 = new BitmapCharRec(10,17,-1,0,12,ch98data);
-
-/* char: 0x61 'a' */
-
-static final byte[] ch97data = {
-(byte) 0x71,(byte) 0x80,(byte) 0xfb,(byte) 0x0,(byte) 0xc7,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x3b,(byte) 0x0,(byte) 0xf,(byte) 0x0,
-(byte) 0x3,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x67,(byte) 0x0,(byte) 0x3e,(byte) 0x0,
-};
-
-static final BitmapCharRec ch97 = new BitmapCharRec(9,12,-1,0,11,ch97data);
-
-/* char: 0x60 '`' */
-
-static final byte[] ch96data = {
-(byte) 0x60,(byte) 0xe0,(byte) 0x80,(byte) 0xc0,(byte) 0x60,
-};
-
-static final BitmapCharRec ch96 = new BitmapCharRec(3,5,-2,-12,7,ch96data);
-
-/* char: 0x5f '_' */
-
-static final byte[] ch95data = {
-(byte) 0xff,(byte) 0xf8,(byte) 0xff,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch95 = new BitmapCharRec(13,2,0,5,13,ch95data);
-
-/* char: 0x5e '^' */
-
-static final byte[] ch94data = {
-(byte) 0x80,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x41,(byte) 0x0,(byte) 0x63,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0x36,(byte) 0x0,(byte) 0x14,(byte) 0x0,(byte) 0x1c,(byte) 0x0,
-(byte) 0x8,(byte) 0x0,
-};
-
-static final BitmapCharRec ch94 = new BitmapCharRec(9,9,-1,-8,11,ch94data);
-
-/* char: 0x5d ']' */
-
-static final byte[] ch93data = {
-(byte) 0xf8,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,
-(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch93 = new BitmapCharRec(5,21,-1,4,8,ch93data);
-
-/* char: 0x5c '\' */
-
-static final byte[] ch92data = {
-(byte) 0x6,(byte) 0x6,(byte) 0x4,(byte) 0xc,(byte) 0xc,(byte) 0x8,(byte) 0x18,(byte) 0x18,(byte) 0x10,(byte) 0x30,(byte) 0x30,(byte) 0x20,(byte) 0x60,(byte) 0x60,(byte) 0x40,(byte) 0xc0,
-(byte) 0xc0,
-};
-
-static final BitmapCharRec ch92 = new BitmapCharRec(7,17,0,0,7,ch92data);
-
-/* char: 0x5b '[' */
-
-static final byte[] ch91data = {
-(byte) 0xf8,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
-(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch91 = new BitmapCharRec(5,21,-2,4,8,ch91data);
-
-/* char: 0x5a 'Z' */
-
-static final byte[] ch90data = {
-(byte) 0xff,(byte) 0xf8,(byte) 0xe0,(byte) 0x18,(byte) 0x70,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x38,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x1c,(byte) 0x0,(byte) 0xe,(byte) 0x0,
-(byte) 0x6,(byte) 0x0,(byte) 0x7,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x80,(byte) 0x1,(byte) 0xc0,(byte) 0x80,(byte) 0xc0,(byte) 0x80,(byte) 0xe0,(byte) 0xc0,(byte) 0x70,
-(byte) 0xff,(byte) 0xf0,
-};
-
-static final BitmapCharRec ch90 = new BitmapCharRec(13,17,-1,0,15,ch90data);
-
-/* char: 0x59 'Y' */
-
-static final byte[] ch89data = {
-(byte) 0x7,(byte) 0xe0,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x3,(byte) 0xc0,
-(byte) 0x3,(byte) 0x40,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0x20,(byte) 0xc,(byte) 0x30,(byte) 0x1c,(byte) 0x10,(byte) 0x18,(byte) 0x18,(byte) 0x38,(byte) 0x8,(byte) 0x30,(byte) 0xc,
-(byte) 0xfc,(byte) 0x3f,
-};
-
-static final BitmapCharRec ch89 = new BitmapCharRec(16,17,0,0,16,ch89data);
-
-/* char: 0x58 'X' */
-
-static final byte[] ch88data = {
-(byte) 0xfc,(byte) 0xf,(byte) 0xc0,(byte) 0x30,(byte) 0x3,(byte) 0x80,(byte) 0x18,(byte) 0x7,(byte) 0x0,(byte) 0x8,(byte) 0xe,(byte) 0x0,(byte) 0x4,(byte) 0xc,(byte) 0x0,(byte) 0x6,
-(byte) 0x18,(byte) 0x0,(byte) 0x2,(byte) 0x38,(byte) 0x0,(byte) 0x1,(byte) 0x70,(byte) 0x0,(byte) 0x0,(byte) 0xe0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x1,(byte) 0xc0,
-(byte) 0x0,(byte) 0x3,(byte) 0xa0,(byte) 0x0,(byte) 0x3,(byte) 0x10,(byte) 0x0,(byte) 0x6,(byte) 0x8,(byte) 0x0,(byte) 0xe,(byte) 0xc,(byte) 0x0,(byte) 0x1c,(byte) 0x6,(byte) 0x0,
-(byte) 0x7e,(byte) 0xf,(byte) 0x80,
-};
-
-static final BitmapCharRec ch88 = new BitmapCharRec(18,17,0,0,18,ch88data);
-
-/* char: 0x57 'W' */
-
-static final byte[] ch87data = {
-(byte) 0x1,(byte) 0x83,(byte) 0x0,(byte) 0x1,(byte) 0x83,(byte) 0x0,(byte) 0x1,(byte) 0x83,(byte) 0x80,(byte) 0x3,(byte) 0x87,(byte) 0x80,(byte) 0x3,(byte) 0x46,(byte) 0x80,(byte) 0x3,
-(byte) 0x46,(byte) 0xc0,(byte) 0x6,(byte) 0x46,(byte) 0x40,(byte) 0x6,(byte) 0x4c,(byte) 0x40,(byte) 0x6,(byte) 0x4c,(byte) 0x60,(byte) 0xc,(byte) 0x2c,(byte) 0x60,(byte) 0xc,(byte) 0x2c,
-(byte) 0x20,(byte) 0x18,(byte) 0x2c,(byte) 0x20,(byte) 0x18,(byte) 0x18,(byte) 0x30,(byte) 0x18,(byte) 0x18,(byte) 0x10,(byte) 0x30,(byte) 0x18,(byte) 0x10,(byte) 0x30,(byte) 0x18,(byte) 0x18,
-(byte) 0xfc,(byte) 0x7e,(byte) 0x7e,
-};
-
-static final BitmapCharRec ch87 = new BitmapCharRec(23,17,0,0,23,ch87data);
-
-/* char: 0x56 'V' */
-
-static final byte[] ch86data = {
-(byte) 0x1,(byte) 0x80,(byte) 0x0,(byte) 0x1,(byte) 0x80,(byte) 0x0,(byte) 0x1,(byte) 0x80,(byte) 0x0,(byte) 0x3,(byte) 0xc0,(byte) 0x0,(byte) 0x3,(byte) 0x40,(byte) 0x0,(byte) 0x3,
-(byte) 0x60,(byte) 0x0,(byte) 0x6,(byte) 0x20,(byte) 0x0,(byte) 0x6,(byte) 0x20,(byte) 0x0,(byte) 0x6,(byte) 0x30,(byte) 0x0,(byte) 0xc,(byte) 0x10,(byte) 0x0,(byte) 0xc,(byte) 0x18,
-(byte) 0x0,(byte) 0x18,(byte) 0x8,(byte) 0x0,(byte) 0x18,(byte) 0x8,(byte) 0x0,(byte) 0x18,(byte) 0xc,(byte) 0x0,(byte) 0x30,(byte) 0x4,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,
-(byte) 0xfc,(byte) 0x1f,(byte) 0x80,
-};
-
-static final BitmapCharRec ch86 = new BitmapCharRec(17,17,0,0,17,ch86data);
-
-/* char: 0x55 'U' */
-
-static final byte[] ch85data = {
-(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x30,(byte) 0x18,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,
-(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,(byte) 0x30,(byte) 0x4,
-(byte) 0xfc,(byte) 0x1f,
-};
-
-static final BitmapCharRec ch85 = new BitmapCharRec(16,17,-1,0,18,ch85data);
-
-/* char: 0x54 'T' */
-
-static final byte[] ch84data = {
-(byte) 0xf,(byte) 0xc0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,
-(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x83,(byte) 0x4,(byte) 0x83,(byte) 0x4,(byte) 0xc3,(byte) 0xc,
-(byte) 0xff,(byte) 0xfc,
-};
-
-static final BitmapCharRec ch84 = new BitmapCharRec(14,17,-1,0,16,ch84data);
-
-/* char: 0x53 'S' */
-
-static final byte[] ch83data = {
-(byte) 0x9e,(byte) 0x0,(byte) 0xf1,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0x80,(byte) 0x60,(byte) 0x80,(byte) 0x60,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0xe0,(byte) 0x3,(byte) 0xc0,
-(byte) 0xf,(byte) 0x80,(byte) 0x1e,(byte) 0x0,(byte) 0x78,(byte) 0x0,(byte) 0xe0,(byte) 0x0,(byte) 0xc0,(byte) 0x40,(byte) 0xc0,(byte) 0x40,(byte) 0xc0,(byte) 0xc0,(byte) 0x63,(byte) 0xc0,
-(byte) 0x1e,(byte) 0x40,
-};
-
-static final BitmapCharRec ch83 = new BitmapCharRec(11,17,-1,0,13,ch83data);
-
-/* char: 0x52 'R' */
-
-static final byte[] ch82data = {
-(byte) 0xfc,(byte) 0x1e,(byte) 0x30,(byte) 0x1c,(byte) 0x30,(byte) 0x38,(byte) 0x30,(byte) 0x70,(byte) 0x30,(byte) 0x60,(byte) 0x30,(byte) 0xc0,(byte) 0x31,(byte) 0xc0,(byte) 0x33,(byte) 0x80,
-(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0x70,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x38,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x38,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x70,
-(byte) 0xff,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch82 = new BitmapCharRec(15,17,-1,0,16,ch82data);
-
-/* char: 0x51 'Q' */
-
-static final byte[] ch81data = {
-(byte) 0x0,(byte) 0xf,(byte) 0x0,(byte) 0x38,(byte) 0x0,(byte) 0x70,(byte) 0x0,(byte) 0xe0,(byte) 0x1,(byte) 0xc0,(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x38,(byte) 0x38,(byte) 0x1c,
-(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,
-(byte) 0xc0,(byte) 0x3,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0x38,(byte) 0x1c,(byte) 0x1c,(byte) 0x38,(byte) 0x7,(byte) 0xe0,
-};
-
-static final BitmapCharRec ch81 = new BitmapCharRec(16,22,-1,5,18,ch81data);
-
-/* char: 0x50 'P' */
-
-static final byte[] ch80data = {
-(byte) 0xfc,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,
-(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0x70,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x70,
-(byte) 0xff,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch80 = new BitmapCharRec(13,17,-1,0,15,ch80data);
-
-/* char: 0x4f 'O' */
-
-static final byte[] ch79data = {
-(byte) 0x7,(byte) 0xe0,(byte) 0x1c,(byte) 0x38,(byte) 0x38,(byte) 0x1c,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,
-(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0xc0,(byte) 0x3,(byte) 0x60,(byte) 0x6,(byte) 0x60,(byte) 0x6,(byte) 0x38,(byte) 0x1c,(byte) 0x1c,(byte) 0x38,
-(byte) 0x7,(byte) 0xe0,
-};
-
-static final BitmapCharRec ch79 = new BitmapCharRec(16,17,-1,0,18,ch79data);
-
-/* char: 0x4e 'N' */
-
-static final byte[] ch78data = {
-(byte) 0xf8,(byte) 0xc,(byte) 0x20,(byte) 0x1c,(byte) 0x20,(byte) 0x1c,(byte) 0x20,(byte) 0x34,(byte) 0x20,(byte) 0x64,(byte) 0x20,(byte) 0x64,(byte) 0x20,(byte) 0xc4,(byte) 0x21,(byte) 0x84,
-(byte) 0x21,(byte) 0x84,(byte) 0x23,(byte) 0x4,(byte) 0x26,(byte) 0x4,(byte) 0x26,(byte) 0x4,(byte) 0x2c,(byte) 0x4,(byte) 0x38,(byte) 0x4,(byte) 0x38,(byte) 0x4,(byte) 0x30,(byte) 0x4,
-(byte) 0xf0,(byte) 0x1f,
-};
-
-static final BitmapCharRec ch78 = new BitmapCharRec(16,17,-1,0,18,ch78data);
-
-/* char: 0x4d 'M' */
-
-static final byte[] ch77data = {
-(byte) 0xf8,(byte) 0x21,(byte) 0xf8,(byte) 0x20,(byte) 0x60,(byte) 0x60,(byte) 0x20,(byte) 0x60,(byte) 0x60,(byte) 0x20,(byte) 0xd0,(byte) 0x60,(byte) 0x20,(byte) 0xd0,(byte) 0x60,(byte) 0x21,
-(byte) 0x88,(byte) 0x60,(byte) 0x21,(byte) 0x88,(byte) 0x60,(byte) 0x23,(byte) 0x8,(byte) 0x60,(byte) 0x23,(byte) 0x4,(byte) 0x60,(byte) 0x26,(byte) 0x4,(byte) 0x60,(byte) 0x26,(byte) 0x2,
-(byte) 0x60,(byte) 0x2c,(byte) 0x2,(byte) 0x60,(byte) 0x2c,(byte) 0x2,(byte) 0x60,(byte) 0x38,(byte) 0x1,(byte) 0x60,(byte) 0x38,(byte) 0x1,(byte) 0x60,(byte) 0x30,(byte) 0x0,(byte) 0xe0,
-(byte) 0xf0,(byte) 0x0,(byte) 0xf8,
-};
-
-static final BitmapCharRec ch77 = new BitmapCharRec(21,17,-1,0,22,ch77data);
-
-/* char: 0x4c 'L' */
-
-static final byte[] ch76data = {
-(byte) 0xff,(byte) 0xf8,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,
-(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,
-(byte) 0xfc,(byte) 0x0,
-};
-
-static final BitmapCharRec ch76 = new BitmapCharRec(13,17,-1,0,14,ch76data);
-
-/* char: 0x4b 'K' */
-
-static final byte[] ch75data = {
-(byte) 0xfc,(byte) 0x1f,(byte) 0x30,(byte) 0xe,(byte) 0x30,(byte) 0x1c,(byte) 0x30,(byte) 0x38,(byte) 0x30,(byte) 0x70,(byte) 0x30,(byte) 0xe0,(byte) 0x31,(byte) 0xc0,(byte) 0x33,(byte) 0x80,
-(byte) 0x3f,(byte) 0x0,(byte) 0x3e,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x31,(byte) 0x80,(byte) 0x30,(byte) 0xc0,(byte) 0x30,(byte) 0x60,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x18,
-(byte) 0xfc,(byte) 0x7e,
-};
-
-static final BitmapCharRec ch75 = new BitmapCharRec(16,17,-1,0,17,ch75data);
-
-/* char: 0x4a 'J' */
-
-static final byte[] ch74data = {
-(byte) 0x78,(byte) 0x0,(byte) 0xcc,(byte) 0x0,(byte) 0xc6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,
-(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,
-(byte) 0x1f,(byte) 0x80,
-};
-
-static final BitmapCharRec ch74 = new BitmapCharRec(9,17,-1,0,11,ch74data);
-
-/* char: 0x49 'I' */
-
-static final byte[] ch73data = {
-(byte) 0xfc,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x30,
-(byte) 0xfc,
-};
-
-static final BitmapCharRec ch73 = new BitmapCharRec(6,17,-1,0,8,ch73data);
-
-/* char: 0x48 'H' */
-
-static final byte[] ch72data = {
-(byte) 0xfc,(byte) 0x1f,(byte) 0x80,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x30,
-(byte) 0x6,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x3f,(byte) 0xfe,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x30,(byte) 0x6,
-(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x30,(byte) 0x6,(byte) 0x0,
-(byte) 0xfc,(byte) 0x1f,(byte) 0x80,
-};
-
-static final BitmapCharRec ch72 = new BitmapCharRec(17,17,-1,0,19,ch72data);
-
-/* char: 0x47 'G' */
-
-static final byte[] ch71data = {
-(byte) 0x7,(byte) 0xe0,(byte) 0x1e,(byte) 0x38,(byte) 0x38,(byte) 0x1c,(byte) 0x60,(byte) 0xc,(byte) 0x60,(byte) 0xc,(byte) 0xc0,(byte) 0xc,(byte) 0xc0,(byte) 0xc,(byte) 0xc0,(byte) 0x3f,
-(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x60,(byte) 0x4,(byte) 0x60,(byte) 0x4,(byte) 0x38,(byte) 0xc,(byte) 0x1c,(byte) 0x3c,
-(byte) 0x7,(byte) 0xe4,
-};
-
-static final BitmapCharRec ch71 = new BitmapCharRec(16,17,-1,0,18,ch71data);
-
-/* char: 0x46 'F' */
-
-static final byte[] ch70data = {
-(byte) 0xfc,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x20,(byte) 0x30,(byte) 0x20,
-(byte) 0x3f,(byte) 0xe0,(byte) 0x30,(byte) 0x20,(byte) 0x30,(byte) 0x20,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x30,
-(byte) 0xff,(byte) 0xf0,
-};
-
-static final BitmapCharRec ch70 = new BitmapCharRec(12,17,-1,0,14,ch70data);
-
-/* char: 0x45 'E' */
-
-static final byte[] ch69data = {
-(byte) 0xff,(byte) 0xf8,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x8,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x40,
-(byte) 0x3f,(byte) 0xc0,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x10,(byte) 0x30,(byte) 0x30,
-(byte) 0xff,(byte) 0xf0,
-};
-
-static final BitmapCharRec ch69 = new BitmapCharRec(13,17,-1,0,15,ch69data);
-
-/* char: 0x44 'D' */
-
-static final byte[] ch68data = {
-(byte) 0xff,(byte) 0xc0,(byte) 0x30,(byte) 0x70,(byte) 0x30,(byte) 0x38,(byte) 0x30,(byte) 0xc,(byte) 0x30,(byte) 0xc,(byte) 0x30,(byte) 0x6,(byte) 0x30,(byte) 0x6,(byte) 0x30,(byte) 0x6,
-(byte) 0x30,(byte) 0x6,(byte) 0x30,(byte) 0x6,(byte) 0x30,(byte) 0x6,(byte) 0x30,(byte) 0x6,(byte) 0x30,(byte) 0xc,(byte) 0x30,(byte) 0xc,(byte) 0x30,(byte) 0x38,(byte) 0x30,(byte) 0x70,
-(byte) 0xff,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch68 = new BitmapCharRec(15,17,-1,0,17,ch68data);
-
-/* char: 0x43 'C' */
-
-static final byte[] ch67data = {
-(byte) 0x7,(byte) 0xe0,(byte) 0x1e,(byte) 0x38,(byte) 0x38,(byte) 0x8,(byte) 0x60,(byte) 0x4,(byte) 0x60,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,
-(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x60,(byte) 0x4,(byte) 0x60,(byte) 0x4,(byte) 0x38,(byte) 0xc,(byte) 0x1c,(byte) 0x3c,
-(byte) 0x7,(byte) 0xe4,
-};
-
-static final BitmapCharRec ch67 = new BitmapCharRec(14,17,-1,0,16,ch67data);
-
-/* char: 0x42 'B' */
-
-static final byte[] ch66data = {
-(byte) 0xff,(byte) 0xe0,(byte) 0x30,(byte) 0x78,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0xc,(byte) 0x30,(byte) 0xc,(byte) 0x30,(byte) 0xc,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x38,
-(byte) 0x3f,(byte) 0xe0,(byte) 0x30,(byte) 0x40,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x18,(byte) 0x30,(byte) 0x30,(byte) 0x30,(byte) 0x70,
-(byte) 0xff,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch66 = new BitmapCharRec(14,17,-1,0,16,ch66data);
-
-/* char: 0x41 'A' */
-
-static final byte[] ch65data = {
-(byte) 0xfc,(byte) 0x1f,(byte) 0x80,(byte) 0x30,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0x6,(byte) 0x0,(byte) 0x10,(byte) 0xc,(byte) 0x0,(byte) 0x18,(byte) 0xc,(byte) 0x0,(byte) 0x8,
-(byte) 0xc,(byte) 0x0,(byte) 0xf,(byte) 0xf8,(byte) 0x0,(byte) 0xc,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x18,(byte) 0x0,(byte) 0x4,(byte) 0x30,(byte) 0x0,(byte) 0x6,(byte) 0x30,
-(byte) 0x0,(byte) 0x2,(byte) 0x30,(byte) 0x0,(byte) 0x2,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0x60,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,
-(byte) 0x0,(byte) 0x80,(byte) 0x0,
-};
-
-static final BitmapCharRec ch65 = new BitmapCharRec(17,17,0,0,17,ch65data);
-
-/* char: 0x40 '@' */
-
-static final byte[] ch64data = {
-(byte) 0x3,(byte) 0xf0,(byte) 0x0,(byte) 0xe,(byte) 0xc,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x0,(byte) 0x61,(byte) 0xde,(byte) 0x0,(byte) 0x63,
-(byte) 0x7b,(byte) 0x0,(byte) 0xc6,(byte) 0x39,(byte) 0x80,(byte) 0xc6,(byte) 0x18,(byte) 0x80,(byte) 0xc6,(byte) 0x18,(byte) 0xc0,(byte) 0xc6,(byte) 0x18,(byte) 0x40,(byte) 0xc6,(byte) 0xc,
-(byte) 0x40,(byte) 0xc3,(byte) 0xc,(byte) 0x40,(byte) 0xc3,(byte) 0x8c,(byte) 0x40,(byte) 0xe1,(byte) 0xfc,(byte) 0x40,(byte) 0x60,(byte) 0xec,(byte) 0xc0,(byte) 0x70,(byte) 0x0,(byte) 0x80,
-(byte) 0x38,(byte) 0x1,(byte) 0x80,(byte) 0x1c,(byte) 0x3,(byte) 0x0,(byte) 0xf,(byte) 0xe,(byte) 0x0,(byte) 0x3,(byte) 0xf8,(byte) 0x0,
-};
-
-static final BitmapCharRec ch64 = new BitmapCharRec(18,20,-2,3,22,ch64data);
-
-/* char: 0x3f '?' */
-
-static final byte[] ch63data = {
-(byte) 0x30,(byte) 0x30,(byte) 0x0,(byte) 0x0,(byte) 0x10,(byte) 0x10,(byte) 0x10,(byte) 0x18,(byte) 0x18,(byte) 0xc,(byte) 0xe,(byte) 0x7,(byte) 0xc3,(byte) 0xc3,(byte) 0x83,(byte) 0xc6,
-(byte) 0x7c,
-};
-
-static final BitmapCharRec ch63 = new BitmapCharRec(8,17,-2,0,11,ch63data);
-
-/* char: 0x3e '>' */
-
-static final byte[] ch62data = {
-(byte) 0xc0,(byte) 0x0,(byte) 0x70,(byte) 0x0,(byte) 0x1c,(byte) 0x0,(byte) 0x7,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,(byte) 0x60,(byte) 0x1,(byte) 0xc0,(byte) 0x7,(byte) 0x0,
-(byte) 0x1c,(byte) 0x0,(byte) 0x70,(byte) 0x0,(byte) 0xc0,(byte) 0x0,
-};
-
-static final BitmapCharRec ch62 = new BitmapCharRec(11,11,-1,-1,13,ch62data);
-
-/* char: 0x3d '=' */
-
-static final byte[] ch61data = {
-(byte) 0xff,(byte) 0xf0,(byte) 0xff,(byte) 0xf0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xff,(byte) 0xf0,(byte) 0xff,(byte) 0xf0,
-};
-
-static final BitmapCharRec ch61 = new BitmapCharRec(12,6,-1,-4,14,ch61data);
-
-/* char: 0x3c '<' */
-
-static final byte[] ch60data = {
-(byte) 0x0,(byte) 0x60,(byte) 0x1,(byte) 0xc0,(byte) 0x7,(byte) 0x0,(byte) 0x1c,(byte) 0x0,(byte) 0x70,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0x70,(byte) 0x0,(byte) 0x1c,(byte) 0x0,
-(byte) 0x7,(byte) 0x0,(byte) 0x1,(byte) 0xc0,(byte) 0x0,(byte) 0x60,
-};
-
-static final BitmapCharRec ch60 = new BitmapCharRec(11,11,-1,-1,13,ch60data);
-
-/* char: 0x3b ';' */
-
-static final byte[] ch59data = {
-(byte) 0xc0,(byte) 0x60,(byte) 0x20,(byte) 0xe0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch59 = new BitmapCharRec(3,14,-2,3,7,ch59data);
-
-/* char: 0x3a ':' */
-
-static final byte[] ch58data = {
-(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch58 = new BitmapCharRec(2,11,-2,0,6,ch58data);
-
-/* char: 0x39 '9' */
-
-static final byte[] ch57data = {
-(byte) 0xf0,(byte) 0x0,(byte) 0x1c,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1d,(byte) 0x80,(byte) 0x73,(byte) 0xc0,
-(byte) 0x61,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc1,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x77,(byte) 0x80,
-(byte) 0x1e,(byte) 0x0,
-};
-
-static final BitmapCharRec ch57 = new BitmapCharRec(10,17,-1,0,12,ch57data);
-
-/* char: 0x38 '8' */
-
-static final byte[] ch56data = {
-(byte) 0x1e,(byte) 0x0,(byte) 0x73,(byte) 0x80,(byte) 0xe1,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x41,(byte) 0xc0,(byte) 0x61,(byte) 0x80,
-(byte) 0x37,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x33,(byte) 0x0,
-(byte) 0x1e,(byte) 0x0,
-};
-
-static final BitmapCharRec ch56 = new BitmapCharRec(10,17,-1,0,12,ch56data);
-
-/* char: 0x37 '7' */
-
-static final byte[] ch55data = {
-(byte) 0x18,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x4,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,
-(byte) 0x2,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x1,(byte) 0x0,(byte) 0x1,(byte) 0x80,(byte) 0x81,(byte) 0x80,(byte) 0xc0,(byte) 0xc0,(byte) 0xff,(byte) 0xc0,
-(byte) 0x7f,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch55 = new BitmapCharRec(10,17,-1,0,12,ch55data);
-
-/* char: 0x36 '6' */
-
-static final byte[] ch54data = {
-(byte) 0x1e,(byte) 0x0,(byte) 0x7b,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xe0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
-(byte) 0xc1,(byte) 0x80,(byte) 0xf3,(byte) 0x80,(byte) 0xee,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x70,(byte) 0x0,(byte) 0x30,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0xe,(byte) 0x0,
-(byte) 0x3,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch54 = new BitmapCharRec(10,17,-1,0,12,ch54data);
-
-/* char: 0x35 '5' */
-
-static final byte[] ch53data = {
-(byte) 0x7e,(byte) 0x0,(byte) 0xe3,(byte) 0x80,(byte) 0xc1,(byte) 0x80,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x0,(byte) 0xc0,(byte) 0x1,(byte) 0xc0,
-(byte) 0x3,(byte) 0x80,(byte) 0xf,(byte) 0x80,(byte) 0x7e,(byte) 0x0,(byte) 0x78,(byte) 0x0,(byte) 0x60,(byte) 0x0,(byte) 0x20,(byte) 0x0,(byte) 0x20,(byte) 0x0,(byte) 0x1f,(byte) 0x80,
-(byte) 0x1f,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch53 = new BitmapCharRec(10,17,-1,0,12,ch53data);
-
-/* char: 0x34 '4' */
-
-static final byte[] ch52data = {
-(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0xff,(byte) 0xc0,(byte) 0xff,(byte) 0xc0,(byte) 0xc3,(byte) 0x0,(byte) 0x43,(byte) 0x0,
-(byte) 0x63,(byte) 0x0,(byte) 0x23,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x13,(byte) 0x0,(byte) 0x1b,(byte) 0x0,(byte) 0xb,(byte) 0x0,(byte) 0x7,(byte) 0x0,(byte) 0x7,(byte) 0x0,
-(byte) 0x3,(byte) 0x0,
-};
-
-static final BitmapCharRec ch52 = new BitmapCharRec(10,17,-1,0,12,ch52data);
-
-/* char: 0x33 '3' */
-
-static final byte[] ch51data = {
-(byte) 0x78,(byte) 0x0,(byte) 0xe6,(byte) 0x0,(byte) 0xc3,(byte) 0x0,(byte) 0x1,(byte) 0x0,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x3,(byte) 0x80,
-(byte) 0x7,(byte) 0x0,(byte) 0x1e,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x83,(byte) 0x0,(byte) 0x83,(byte) 0x0,(byte) 0x47,(byte) 0x0,(byte) 0x7e,(byte) 0x0,
-(byte) 0x1c,(byte) 0x0,
-};
-
-static final BitmapCharRec ch51 = new BitmapCharRec(9,17,-1,0,12,ch51data);
-
-/* char: 0x32 '2' */
-
-static final byte[] ch50data = {
-(byte) 0xff,(byte) 0x80,(byte) 0xff,(byte) 0xc0,(byte) 0x60,(byte) 0x40,(byte) 0x30,(byte) 0x0,(byte) 0x18,(byte) 0x0,(byte) 0xc,(byte) 0x0,(byte) 0x4,(byte) 0x0,(byte) 0x6,(byte) 0x0,
-(byte) 0x3,(byte) 0x0,(byte) 0x3,(byte) 0x0,(byte) 0x1,(byte) 0x80,(byte) 0x1,(byte) 0x80,(byte) 0x81,(byte) 0x80,(byte) 0x81,(byte) 0x80,(byte) 0x43,(byte) 0x80,(byte) 0x7f,(byte) 0x0,
-(byte) 0x1c,(byte) 0x0,
-};
-
-static final BitmapCharRec ch50 = new BitmapCharRec(10,17,-1,0,12,ch50data);
-
-/* char: 0x31 '1' */
-
-static final byte[] ch49data = {
-(byte) 0xff,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x18,(byte) 0x78,(byte) 0x18,
-(byte) 0x8,
-};
-
-static final BitmapCharRec ch49 = new BitmapCharRec(8,17,-2,0,12,ch49data);
-
-/* char: 0x30 '0' */
-
-static final byte[] ch48data = {
-(byte) 0x1e,(byte) 0x0,(byte) 0x33,(byte) 0x0,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0xe1,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
-(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x61,(byte) 0x80,(byte) 0x61,(byte) 0x80,(byte) 0x33,(byte) 0x0,
-(byte) 0x1e,(byte) 0x0,
-};
-
-static final BitmapCharRec ch48 = new BitmapCharRec(10,17,-1,0,12,ch48data);
-
-/* char: 0x2f '/' */
-
-static final byte[] ch47data = {
-(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x60,(byte) 0x60,(byte) 0x20,(byte) 0x30,(byte) 0x30,(byte) 0x10,(byte) 0x18,(byte) 0x18,(byte) 0x8,(byte) 0xc,(byte) 0xc,(byte) 0x4,(byte) 0x6,
-(byte) 0x6,(byte) 0x3,(byte) 0x3,(byte) 0x3,
-};
-
-static final BitmapCharRec ch47 = new BitmapCharRec(8,20,1,3,7,ch47data);
-
-/* char: 0x2e '.' */
-
-static final byte[] ch46data = {
-(byte) 0xc0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch46 = new BitmapCharRec(2,2,-2,0,6,ch46data);
-
-/* char: 0x2d '-' */
-
-static final byte[] ch45data = {
-(byte) 0xff,(byte) 0xf0,(byte) 0xff,(byte) 0xf0,
-};
-
-static final BitmapCharRec ch45 = new BitmapCharRec(12,2,-1,-6,14,ch45data);
-
-/* char: 0x2c ',' */
-
-static final byte[] ch44data = {
-(byte) 0xc0,(byte) 0x60,(byte) 0x20,(byte) 0xe0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch44 = new BitmapCharRec(3,5,-2,3,7,ch44data);
-
-/* char: 0x2b '+' */
-
-static final byte[] ch43data = {
-(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0xff,(byte) 0xf0,(byte) 0xff,(byte) 0xf0,(byte) 0x6,(byte) 0x0,
-(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,(byte) 0x6,(byte) 0x0,
-};
-
-static final BitmapCharRec ch43 = new BitmapCharRec(12,12,-1,-1,14,ch43data);
-
-/* char: 0x2a '*' */
-
-static final byte[] ch42data = {
-(byte) 0x8,(byte) 0x0,(byte) 0x1c,(byte) 0x0,(byte) 0xc9,(byte) 0x80,(byte) 0xeb,(byte) 0x80,(byte) 0x1c,(byte) 0x0,(byte) 0xeb,(byte) 0x80,(byte) 0xc9,(byte) 0x80,(byte) 0x1c,(byte) 0x0,
-(byte) 0x8,(byte) 0x0,
-};
-
-static final BitmapCharRec ch42 = new BitmapCharRec(9,9,-2,-8,12,ch42data);
-
-/* char: 0x29 ')' */
-
-static final byte[] ch41data = {
-(byte) 0x80,(byte) 0x40,(byte) 0x20,(byte) 0x30,(byte) 0x10,(byte) 0x18,(byte) 0x18,(byte) 0xc,(byte) 0xc,(byte) 0xc,(byte) 0xc,(byte) 0xc,(byte) 0xc,(byte) 0xc,(byte) 0xc,(byte) 0x18,
-(byte) 0x18,(byte) 0x10,(byte) 0x30,(byte) 0x20,(byte) 0x40,(byte) 0x80,
-};
-
-static final BitmapCharRec ch41 = new BitmapCharRec(6,22,-1,5,8,ch41data);
-
-/* char: 0x28 '(' */
-
-static final byte[] ch40data = {
-(byte) 0x4,(byte) 0x8,(byte) 0x10,(byte) 0x30,(byte) 0x20,(byte) 0x60,(byte) 0x60,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0x60,
-(byte) 0x60,(byte) 0x20,(byte) 0x30,(byte) 0x10,(byte) 0x8,(byte) 0x4,
-};
-
-static final BitmapCharRec ch40 = new BitmapCharRec(6,22,-1,5,8,ch40data);
-
-/* char: 0x27 ''' */
-
-static final byte[] ch39data = {
-(byte) 0xc0,(byte) 0x60,(byte) 0x20,(byte) 0xe0,(byte) 0xc0,
-};
-
-static final BitmapCharRec ch39 = new BitmapCharRec(3,5,-3,-12,8,ch39data);
-
-/* char: 0x26 '&' */
-
-static final byte[] ch38data = {
-(byte) 0x3c,(byte) 0x3c,(byte) 0x7f,(byte) 0x7e,(byte) 0xe1,(byte) 0xe1,(byte) 0xc0,(byte) 0xc0,(byte) 0xc1,(byte) 0xc0,(byte) 0xc1,(byte) 0xa0,(byte) 0x63,(byte) 0x20,(byte) 0x37,(byte) 0x10,
-(byte) 0x1e,(byte) 0x18,(byte) 0xe,(byte) 0x3e,(byte) 0xf,(byte) 0x0,(byte) 0x1d,(byte) 0x80,(byte) 0x18,(byte) 0xc0,(byte) 0x18,(byte) 0x40,(byte) 0x18,(byte) 0x40,(byte) 0xc,(byte) 0xc0,
-(byte) 0x7,(byte) 0x80,
-};
-
-static final BitmapCharRec ch38 = new BitmapCharRec(16,17,-1,0,18,ch38data);
-
-/* char: 0x25 '%' */
-
-static final byte[] ch37data = {
-(byte) 0x30,(byte) 0x3c,(byte) 0x0,(byte) 0x18,(byte) 0x72,(byte) 0x0,(byte) 0xc,(byte) 0x61,(byte) 0x0,(byte) 0x4,(byte) 0x60,(byte) 0x80,(byte) 0x6,(byte) 0x60,(byte) 0x80,(byte) 0x3,
-(byte) 0x30,(byte) 0x80,(byte) 0x1,(byte) 0x19,(byte) 0x80,(byte) 0x1,(byte) 0x8f,(byte) 0x0,(byte) 0x78,(byte) 0xc0,(byte) 0x0,(byte) 0xe4,(byte) 0x40,(byte) 0x0,(byte) 0xc2,(byte) 0x60,
-(byte) 0x0,(byte) 0xc1,(byte) 0x30,(byte) 0x0,(byte) 0xc1,(byte) 0x10,(byte) 0x0,(byte) 0x61,(byte) 0x18,(byte) 0x0,(byte) 0x33,(byte) 0xfc,(byte) 0x0,(byte) 0x1e,(byte) 0xc,(byte) 0x0,
-};
-
-static final BitmapCharRec ch37 = new BitmapCharRec(17,16,-1,0,19,ch37data);
-
-/* char: 0x24 '$' */
-
-static final byte[] ch36data = {
-(byte) 0x4,(byte) 0x0,(byte) 0x4,(byte) 0x0,(byte) 0x3f,(byte) 0x0,(byte) 0xe5,(byte) 0xc0,(byte) 0xc4,(byte) 0xc0,(byte) 0x84,(byte) 0x60,(byte) 0x84,(byte) 0x60,(byte) 0x4,(byte) 0x60,
-(byte) 0x4,(byte) 0xe0,(byte) 0x7,(byte) 0xc0,(byte) 0x7,(byte) 0x80,(byte) 0x1e,(byte) 0x0,(byte) 0x3c,(byte) 0x0,(byte) 0x74,(byte) 0x0,(byte) 0x64,(byte) 0x0,(byte) 0x64,(byte) 0x20,
-(byte) 0x64,(byte) 0x60,(byte) 0x34,(byte) 0xe0,(byte) 0x1f,(byte) 0x80,(byte) 0x4,(byte) 0x0,(byte) 0x4,(byte) 0x0,
-};
-
-static final BitmapCharRec ch36 = new BitmapCharRec(11,21,0,2,12,ch36data);
-
-/* char: 0x23 '#' */
-
-static final byte[] ch35data = {
-(byte) 0x22,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0x22,(byte) 0x0,(byte) 0xff,(byte) 0xc0,(byte) 0xff,(byte) 0xc0,(byte) 0x11,(byte) 0x0,
-(byte) 0x11,(byte) 0x0,(byte) 0x11,(byte) 0x0,(byte) 0x7f,(byte) 0xe0,(byte) 0x7f,(byte) 0xe0,(byte) 0x8,(byte) 0x80,(byte) 0x8,(byte) 0x80,(byte) 0x8,(byte) 0x80,(byte) 0x8,(byte) 0x80,
-(byte) 0x8,(byte) 0x80,
-};
-
-static final BitmapCharRec ch35 = new BitmapCharRec(11,17,-1,0,13,ch35data);
-
-/* char: 0x22 '"' */
-
-static final byte[] ch34data = {
-(byte) 0x88,(byte) 0xcc,(byte) 0xcc,(byte) 0xcc,(byte) 0xcc,
-};
-
-static final BitmapCharRec ch34 = new BitmapCharRec(6,5,-1,-12,10,ch34data);
-
-/* char: 0x21 '!' */
-
-static final byte[] ch33data = {
-(byte) 0xc0,(byte) 0xc0,(byte) 0x0,(byte) 0x0,(byte) 0x0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,(byte) 0xc0,
-(byte) 0xc0,
-};
-
-static final BitmapCharRec ch33 = new BitmapCharRec(2,17,-3,0,8,ch33data);
-
-/* char: 0x20 ' ' */
-
-static final BitmapCharRec ch32 = new BitmapCharRec(0,0,0,0,6,null);
-
-static final BitmapCharRec[] chars = {
-ch32,
-ch33,
-ch34,
-ch35,
-ch36,
-ch37,
-ch38,
-ch39,
-ch40,
-ch41,
-ch42,
-ch43,
-ch44,
-ch45,
-ch46,
-ch47,
-ch48,
-ch49,
-ch50,
-ch51,
-ch52,
-ch53,
-ch54,
-ch55,
-ch56,
-ch57,
-ch58,
-ch59,
-ch60,
-ch61,
-ch62,
-ch63,
-ch64,
-ch65,
-ch66,
-ch67,
-ch68,
-ch69,
-ch70,
-ch71,
-ch72,
-ch73,
-ch74,
-ch75,
-ch76,
-ch77,
-ch78,
-ch79,
-ch80,
-ch81,
-ch82,
-ch83,
-ch84,
-ch85,
-ch86,
-ch87,
-ch88,
-ch89,
-ch90,
-ch91,
-ch92,
-ch93,
-ch94,
-ch95,
-ch96,
-ch97,
-ch98,
-ch99,
-ch100,
-ch101,
-ch102,
-ch103,
-ch104,
-ch105,
-ch106,
-ch107,
-ch108,
-ch109,
-ch110,
-ch111,
-ch112,
-ch113,
-ch114,
-ch115,
-ch116,
-ch117,
-ch118,
-ch119,
-ch120,
-ch121,
-ch122,
-ch123,
-ch124,
-ch125,
-ch126,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-null,
-ch160,
-ch161,
-ch162,
-ch163,
-ch164,
-ch165,
-ch166,
-ch167,
-ch168,
-ch169,
-ch170,
-ch171,
-ch172,
-ch173,
-ch174,
-ch175,
-ch176,
-ch177,
-ch178,
-ch179,
-ch180,
-ch181,
-ch182,
-ch183,
-ch184,
-ch185,
-ch186,
-ch187,
-ch188,
-ch189,
-ch190,
-ch191,
-ch192,
-ch193,
-ch194,
-ch195,
-ch196,
-ch197,
-ch198,
-ch199,
-ch200,
-ch201,
-ch202,
-ch203,
-ch204,
-ch205,
-ch206,
-ch207,
-ch208,
-ch209,
-ch210,
-ch211,
-ch212,
-ch213,
-ch214,
-ch215,
-ch216,
-ch217,
-ch218,
-ch219,
-ch220,
-ch221,
-ch222,
-ch223,
-ch224,
-ch225,
-ch226,
-ch227,
-ch228,
-ch229,
-ch230,
-ch231,
-ch232,
-ch233,
-ch234,
-ch235,
-ch236,
-ch237,
-ch238,
-ch239,
-ch240,
-ch241,
-ch242,
-ch243,
-ch244,
-ch245,
-ch246,
-ch247,
-ch248,
-ch249,
-ch250,
-ch251,
-ch252,
-ch253,
-ch254,
-ch255,
-};
-
- public static final BitmapFontRec glutBitmapTimesRoman24 = new BitmapFontRec("-adobe-times-medium-r-normal--24-240-75-75-p-124-iso8859-1",
- 224,
- 32,
- chars);
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/gl2/GLUTStrokeMonoRoman.java b/src/jogl/classes/com/sun/opengl/util/gl2/GLUTStrokeMonoRoman.java
deleted file mode 100644
index 79e4b70f8..000000000
--- a/src/jogl/classes/com/sun/opengl/util/gl2/GLUTStrokeMonoRoman.java
+++ /dev/null
@@ -1,2491 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.util.gl2;
-
-class GLUTStrokeMonoRoman {
-
-/* GENERATED FILE -- DO NOT MODIFY */
-
-/* char: 33 '!' */
-
-static final CoordRec char33_stroke0[] = {
- new CoordRec((float) 52.381, (float) 100 ),
- new CoordRec((float) 52.381, (float) 33.3333 ),
-};
-
-static final CoordRec char33_stroke1[] = {
- new CoordRec((float) 52.381, (float) 9.5238 ),
- new CoordRec((float) 47.6191, (float) 4.7619 ),
- new CoordRec((float) 52.381, (float) 0 ),
- new CoordRec((float) 57.1429, (float) 4.7619 ),
- new CoordRec((float) 52.381, (float) 9.5238 ),
-};
-
-static final StrokeRec char33[] = {
- new StrokeRec( 2, char33_stroke0 ),
- new StrokeRec( 5, char33_stroke1 ),
-};
-
-/* char: 34 '"' */
-
-static final CoordRec char34_stroke0[] = {
- new CoordRec((float) 33.3334, (float) 100 ),
- new CoordRec((float) 33.3334, (float) 66.6667 ),
-};
-
-static final CoordRec char34_stroke1[] = {
- new CoordRec((float) 71.4286, (float) 100 ),
- new CoordRec((float) 71.4286, (float) 66.6667 ),
-};
-
-static final StrokeRec char34[] = {
- new StrokeRec( 2, char34_stroke0 ),
- new StrokeRec( 2, char34_stroke1 ),
-};
-
-/* char: 35 '#' */
-
-static final CoordRec char35_stroke0[] = {
- new CoordRec((float) 54.7619, (float) 119.048 ),
- new CoordRec((float) 21.4286, (float) -33.3333 ),
-};
-
-static final CoordRec char35_stroke1[] = {
- new CoordRec((float) 83.3334, (float) 119.048 ),
- new CoordRec((float) 50, (float) -33.3333 ),
-};
-
-static final CoordRec char35_stroke2[] = {
- new CoordRec((float) 21.4286, (float) 57.1429 ),
- new CoordRec((float) 88.0952, (float) 57.1429 ),
-};
-
-static final CoordRec char35_stroke3[] = {
- new CoordRec((float) 16.6667, (float) 28.5714 ),
- new CoordRec((float) 83.3334, (float) 28.5714 ),
-};
-
-static final StrokeRec char35[] = {
- new StrokeRec( 2, char35_stroke0 ),
- new StrokeRec( 2, char35_stroke1 ),
- new StrokeRec( 2, char35_stroke2 ),
- new StrokeRec( 2, char35_stroke3 ),
-};
-
-/* char: 36 '$' */
-
-static final CoordRec char36_stroke0[] = {
- new CoordRec((float) 42.8571, (float) 119.048 ),
- new CoordRec((float) 42.8571, (float) -19.0476 ),
-};
-
-static final CoordRec char36_stroke1[] = {
- new CoordRec((float) 61.9047, (float) 119.048 ),
- new CoordRec((float) 61.9047, (float) -19.0476 ),
-};
-
-static final CoordRec char36_stroke2[] = {
- new CoordRec((float) 85.7143, (float) 85.7143 ),
- new CoordRec((float) 76.1905, (float) 95.2381 ),
- new CoordRec((float) 61.9047, (float) 100 ),
- new CoordRec((float) 42.8571, (float) 100 ),
- new CoordRec((float) 28.5714, (float) 95.2381 ),
- new CoordRec((float) 19.0476, (float) 85.7143 ),
- new CoordRec((float) 19.0476, (float) 76.1905 ),
- new CoordRec((float) 23.8095, (float) 66.6667 ),
- new CoordRec((float) 28.5714, (float) 61.9048 ),
- new CoordRec((float) 38.0952, (float) 57.1429 ),
- new CoordRec((float) 66.6666, (float) 47.619 ),
- new CoordRec((float) 76.1905, (float) 42.8571 ),
- new CoordRec((float) 80.9524, (float) 38.0952 ),
- new CoordRec((float) 85.7143, (float) 28.5714 ),
- new CoordRec((float) 85.7143, (float) 14.2857 ),
- new CoordRec((float) 76.1905, (float) 4.7619 ),
- new CoordRec((float) 61.9047, (float) 0 ),
- new CoordRec((float) 42.8571, (float) 0 ),
- new CoordRec((float) 28.5714, (float) 4.7619 ),
- new CoordRec((float) 19.0476, (float) 14.2857 ),
-};
-
-static final StrokeRec char36[] = {
- new StrokeRec( 2, char36_stroke0 ),
- new StrokeRec( 2, char36_stroke1 ),
- new StrokeRec( 20, char36_stroke2 ),
-};
-
-/* char: 37 '%' */
-
-static final CoordRec char37_stroke0[] = {
- new CoordRec((float) 95.2381, (float) 100 ),
- new CoordRec((float) 9.5238, (float) 0 ),
-};
-
-static final CoordRec char37_stroke1[] = {
- new CoordRec((float) 33.3333, (float) 100 ),
- new CoordRec((float) 42.8571, (float) 90.4762 ),
- new CoordRec((float) 42.8571, (float) 80.9524 ),
- new CoordRec((float) 38.0952, (float) 71.4286 ),
- new CoordRec((float) 28.5714, (float) 66.6667 ),
- new CoordRec((float) 19.0476, (float) 66.6667 ),
- new CoordRec((float) 9.5238, (float) 76.1905 ),
- new CoordRec((float) 9.5238, (float) 85.7143 ),
- new CoordRec((float) 14.2857, (float) 95.2381 ),
- new CoordRec((float) 23.8095, (float) 100 ),
- new CoordRec((float) 33.3333, (float) 100 ),
- new CoordRec((float) 42.8571, (float) 95.2381 ),
- new CoordRec((float) 57.1428, (float) 90.4762 ),
- new CoordRec((float) 71.4286, (float) 90.4762 ),
- new CoordRec((float) 85.7143, (float) 95.2381 ),
- new CoordRec((float) 95.2381, (float) 100 ),
-};
-
-static final CoordRec char37_stroke2[] = {
- new CoordRec((float) 76.1905, (float) 33.3333 ),
- new CoordRec((float) 66.6667, (float) 28.5714 ),
- new CoordRec((float) 61.9048, (float) 19.0476 ),
- new CoordRec((float) 61.9048, (float) 9.5238 ),
- new CoordRec((float) 71.4286, (float) 0 ),
- new CoordRec((float) 80.9524, (float) 0 ),
- new CoordRec((float) 90.4762, (float) 4.7619 ),
- new CoordRec((float) 95.2381, (float) 14.2857 ),
- new CoordRec((float) 95.2381, (float) 23.8095 ),
- new CoordRec((float) 85.7143, (float) 33.3333 ),
- new CoordRec((float) 76.1905, (float) 33.3333 ),
-};
-
-static final StrokeRec char37[] = {
- new StrokeRec( 2, char37_stroke0 ),
- new StrokeRec( 16, char37_stroke1 ),
- new StrokeRec( 11, char37_stroke2 ),
-};
-
-/* char: 38 '&' */
-
-static final CoordRec char38_stroke0[] = {
- new CoordRec((float) 100, (float) 57.1429 ),
- new CoordRec((float) 100, (float) 61.9048 ),
- new CoordRec((float) 95.2381, (float) 66.6667 ),
- new CoordRec((float) 90.4762, (float) 66.6667 ),
- new CoordRec((float) 85.7143, (float) 61.9048 ),
- new CoordRec((float) 80.9524, (float) 52.381 ),
- new CoordRec((float) 71.4286, (float) 28.5714 ),
- new CoordRec((float) 61.9048, (float) 14.2857 ),
- new CoordRec((float) 52.3809, (float) 4.7619 ),
- new CoordRec((float) 42.8571, (float) 0 ),
- new CoordRec((float) 23.8095, (float) 0 ),
- new CoordRec((float) 14.2857, (float) 4.7619 ),
- new CoordRec((float) 9.5238, (float) 9.5238 ),
- new CoordRec((float) 4.7619, (float) 19.0476 ),
- new CoordRec((float) 4.7619, (float) 28.5714 ),
- new CoordRec((float) 9.5238, (float) 38.0952 ),
- new CoordRec((float) 14.2857, (float) 42.8571 ),
- new CoordRec((float) 47.619, (float) 61.9048 ),
- new CoordRec((float) 52.3809, (float) 66.6667 ),
- new CoordRec((float) 57.1429, (float) 76.1905 ),
- new CoordRec((float) 57.1429, (float) 85.7143 ),
- new CoordRec((float) 52.3809, (float) 95.2381 ),
- new CoordRec((float) 42.8571, (float) 100 ),
- new CoordRec((float) 33.3333, (float) 95.2381 ),
- new CoordRec((float) 28.5714, (float) 85.7143 ),
- new CoordRec((float) 28.5714, (float) 76.1905 ),
- new CoordRec((float) 33.3333, (float) 61.9048 ),
- new CoordRec((float) 42.8571, (float) 47.619 ),
- new CoordRec((float) 66.6667, (float) 14.2857 ),
- new CoordRec((float) 76.1905, (float) 4.7619 ),
- new CoordRec((float) 85.7143, (float) 0 ),
- new CoordRec((float) 95.2381, (float) 0 ),
- new CoordRec((float) 100, (float) 4.7619 ),
- new CoordRec((float) 100, (float) 9.5238 ),
-};
-
-static final StrokeRec char38[] = {
- new StrokeRec( 34, char38_stroke0 ),
-};
-
-/* char: 39 ''' */
-
-static final CoordRec char39_stroke0[] = {
- new CoordRec((float) 52.381, (float) 100 ),
- new CoordRec((float) 52.381, (float) 66.6667 ),
-};
-
-static final StrokeRec char39[] = {
- new StrokeRec( 2, char39_stroke0 ),
-};
-
-/* char: 40 '(' */
-
-static final CoordRec char40_stroke0[] = {
- new CoordRec((float) 69.0476, (float) 119.048 ),
- new CoordRec((float) 59.5238, (float) 109.524 ),
- new CoordRec((float) 50, (float) 95.2381 ),
- new CoordRec((float) 40.4762, (float) 76.1905 ),
- new CoordRec((float) 35.7143, (float) 52.381 ),
- new CoordRec((float) 35.7143, (float) 33.3333 ),
- new CoordRec((float) 40.4762, (float) 9.5238 ),
- new CoordRec((float) 50, (float) -9.5238 ),
- new CoordRec((float) 59.5238, (float) -23.8095 ),
- new CoordRec((float) 69.0476, (float) -33.3333 ),
-};
-
-static final StrokeRec char40[] = {
- new StrokeRec( 10, char40_stroke0 ),
-};
-
-/* char: 41 ')' */
-
-static final CoordRec char41_stroke0[] = {
- new CoordRec((float) 35.7143, (float) 119.048 ),
- new CoordRec((float) 45.2381, (float) 109.524 ),
- new CoordRec((float) 54.7619, (float) 95.2381 ),
- new CoordRec((float) 64.2857, (float) 76.1905 ),
- new CoordRec((float) 69.0476, (float) 52.381 ),
- new CoordRec((float) 69.0476, (float) 33.3333 ),
- new CoordRec((float) 64.2857, (float) 9.5238 ),
- new CoordRec((float) 54.7619, (float) -9.5238 ),
- new CoordRec((float) 45.2381, (float) -23.8095 ),
- new CoordRec((float) 35.7143, (float) -33.3333 ),
-};
-
-static final StrokeRec char41[] = {
- new StrokeRec( 10, char41_stroke0 ),
-};
-
-/* char: 42 '*' */
-
-static final CoordRec char42_stroke0[] = {
- new CoordRec((float) 52.381, (float) 71.4286 ),
- new CoordRec((float) 52.381, (float) 14.2857 ),
-};
-
-static final CoordRec char42_stroke1[] = {
- new CoordRec((float) 28.5715, (float) 57.1429 ),
- new CoordRec((float) 76.1905, (float) 28.5714 ),
-};
-
-static final CoordRec char42_stroke2[] = {
- new CoordRec((float) 76.1905, (float) 57.1429 ),
- new CoordRec((float) 28.5715, (float) 28.5714 ),
-};
-
-static final StrokeRec char42[] = {
- new StrokeRec( 2, char42_stroke0 ),
- new StrokeRec( 2, char42_stroke1 ),
- new StrokeRec( 2, char42_stroke2 ),
-};
-
-/* char: 43 '+' */
-
-static final CoordRec char43_stroke0[] = {
- new CoordRec((float) 52.3809, (float) 85.7143 ),
- new CoordRec((float) 52.3809, (float) 0 ),
-};
-
-static final CoordRec char43_stroke1[] = {
- new CoordRec((float) 9.5238, (float) 42.8571 ),
- new CoordRec((float) 95.2381, (float) 42.8571 ),
-};
-
-static final StrokeRec char43[] = {
- new StrokeRec( 2, char43_stroke0 ),
- new StrokeRec( 2, char43_stroke1 ),
-};
-
-/* char: 44 ',' */
-
-static final CoordRec char44_stroke0[] = {
- new CoordRec((float) 57.1429, (float) 4.7619 ),
- new CoordRec((float) 52.381, (float) 0 ),
- new CoordRec((float) 47.6191, (float) 4.7619 ),
- new CoordRec((float) 52.381, (float) 9.5238 ),
- new CoordRec((float) 57.1429, (float) 4.7619 ),
- new CoordRec((float) 57.1429, (float) -4.7619 ),
- new CoordRec((float) 52.381, (float) -14.2857 ),
- new CoordRec((float) 47.6191, (float) -19.0476 ),
-};
-
-static final StrokeRec char44[] = {
- new StrokeRec( 8, char44_stroke0 ),
-};
-
-/* char: 45 '-' */
-
-static final CoordRec char45_stroke0[] = {
- new CoordRec((float) 9.5238, (float) 42.8571 ),
- new CoordRec((float) 95.2381, (float) 42.8571 ),
-};
-
-static final StrokeRec char45[] = {
- new StrokeRec( 2, char45_stroke0 ),
-};
-
-/* char: 46 '.' */
-
-static final CoordRec char46_stroke0[] = {
- new CoordRec((float) 52.381, (float) 9.5238 ),
- new CoordRec((float) 47.6191, (float) 4.7619 ),
- new CoordRec((float) 52.381, (float) 0 ),
- new CoordRec((float) 57.1429, (float) 4.7619 ),
- new CoordRec((float) 52.381, (float) 9.5238 ),
-};
-
-static final StrokeRec char46[] = {
- new StrokeRec( 5, char46_stroke0 ),
-};
-
-/* char: 47 '/' */
-
-static final CoordRec char47_stroke0[] = {
- new CoordRec((float) 19.0476, (float) -14.2857 ),
- new CoordRec((float) 85.7143, (float) 100 ),
-};
-
-static final StrokeRec char47[] = {
- new StrokeRec( 2, char47_stroke0 ),
-};
-
-/* char: 48 '0' */
-
-static final CoordRec char48_stroke0[] = {
- new CoordRec((float) 47.619, (float) 100 ),
- new CoordRec((float) 33.3333, (float) 95.2381 ),
- new CoordRec((float) 23.8095, (float) 80.9524 ),
- new CoordRec((float) 19.0476, (float) 57.1429 ),
- new CoordRec((float) 19.0476, (float) 42.8571 ),
- new CoordRec((float) 23.8095, (float) 19.0476 ),
- new CoordRec((float) 33.3333, (float) 4.7619 ),
- new CoordRec((float) 47.619, (float) 0 ),
- new CoordRec((float) 57.1428, (float) 0 ),
- new CoordRec((float) 71.4286, (float) 4.7619 ),
- new CoordRec((float) 80.9524, (float) 19.0476 ),
- new CoordRec((float) 85.7143, (float) 42.8571 ),
- new CoordRec((float) 85.7143, (float) 57.1429 ),
- new CoordRec((float) 80.9524, (float) 80.9524 ),
- new CoordRec((float) 71.4286, (float) 95.2381 ),
- new CoordRec((float) 57.1428, (float) 100 ),
- new CoordRec((float) 47.619, (float) 100 ),
-};
-
-static final StrokeRec char48[] = {
- new StrokeRec( 17, char48_stroke0 ),
-};
-
-/* char: 49 '1' */
-
-static final CoordRec char49_stroke0[] = {
- new CoordRec((float) 40.4762, (float) 80.9524 ),
- new CoordRec((float) 50, (float) 85.7143 ),
- new CoordRec((float) 64.2857, (float) 100 ),
- new CoordRec((float) 64.2857, (float) 0 ),
-};
-
-static final StrokeRec char49[] = {
- new StrokeRec( 4, char49_stroke0 ),
-};
-
-/* char: 50 '2' */
-
-static final CoordRec char50_stroke0[] = {
- new CoordRec((float) 23.8095, (float) 76.1905 ),
- new CoordRec((float) 23.8095, (float) 80.9524 ),
- new CoordRec((float) 28.5714, (float) 90.4762 ),
- new CoordRec((float) 33.3333, (float) 95.2381 ),
- new CoordRec((float) 42.8571, (float) 100 ),
- new CoordRec((float) 61.9047, (float) 100 ),
- new CoordRec((float) 71.4286, (float) 95.2381 ),
- new CoordRec((float) 76.1905, (float) 90.4762 ),
- new CoordRec((float) 80.9524, (float) 80.9524 ),
- new CoordRec((float) 80.9524, (float) 71.4286 ),
- new CoordRec((float) 76.1905, (float) 61.9048 ),
- new CoordRec((float) 66.6666, (float) 47.619 ),
- new CoordRec((float) 19.0476, (float) 0 ),
- new CoordRec((float) 85.7143, (float) 0 ),
-};
-
-static final StrokeRec char50[] = {
- new StrokeRec( 14, char50_stroke0 ),
-};
-
-/* char: 51 '3' */
-
-static final CoordRec char51_stroke0[] = {
- new CoordRec((float) 28.5714, (float) 100 ),
- new CoordRec((float) 80.9524, (float) 100 ),
- new CoordRec((float) 52.3809, (float) 61.9048 ),
- new CoordRec((float) 66.6666, (float) 61.9048 ),
- new CoordRec((float) 76.1905, (float) 57.1429 ),
- new CoordRec((float) 80.9524, (float) 52.381 ),
- new CoordRec((float) 85.7143, (float) 38.0952 ),
- new CoordRec((float) 85.7143, (float) 28.5714 ),
- new CoordRec((float) 80.9524, (float) 14.2857 ),
- new CoordRec((float) 71.4286, (float) 4.7619 ),
- new CoordRec((float) 57.1428, (float) 0 ),
- new CoordRec((float) 42.8571, (float) 0 ),
- new CoordRec((float) 28.5714, (float) 4.7619 ),
- new CoordRec((float) 23.8095, (float) 9.5238 ),
- new CoordRec((float) 19.0476, (float) 19.0476 ),
-};
-
-static final StrokeRec char51[] = {
- new StrokeRec( 15, char51_stroke0 ),
-};
-
-/* char: 52 '4' */
-
-static final CoordRec char52_stroke0[] = {
- new CoordRec((float) 64.2857, (float) 100 ),
- new CoordRec((float) 16.6667, (float) 33.3333 ),
- new CoordRec((float) 88.0952, (float) 33.3333 ),
-};
-
-static final CoordRec char52_stroke1[] = {
- new CoordRec((float) 64.2857, (float) 100 ),
- new CoordRec((float) 64.2857, (float) 0 ),
-};
-
-static final StrokeRec char52[] = {
- new StrokeRec( 3, char52_stroke0 ),
- new StrokeRec( 2, char52_stroke1 ),
-};
-
-/* char: 53 '5' */
-
-static final CoordRec char53_stroke0[] = {
- new CoordRec((float) 76.1905, (float) 100 ),
- new CoordRec((float) 28.5714, (float) 100 ),
- new CoordRec((float) 23.8095, (float) 57.1429 ),
- new CoordRec((float) 28.5714, (float) 61.9048 ),
- new CoordRec((float) 42.8571, (float) 66.6667 ),
- new CoordRec((float) 57.1428, (float) 66.6667 ),
- new CoordRec((float) 71.4286, (float) 61.9048 ),
- new CoordRec((float) 80.9524, (float) 52.381 ),
- new CoordRec((float) 85.7143, (float) 38.0952 ),
- new CoordRec((float) 85.7143, (float) 28.5714 ),
- new CoordRec((float) 80.9524, (float) 14.2857 ),
- new CoordRec((float) 71.4286, (float) 4.7619 ),
- new CoordRec((float) 57.1428, (float) 0 ),
- new CoordRec((float) 42.8571, (float) 0 ),
- new CoordRec((float) 28.5714, (float) 4.7619 ),
- new CoordRec((float) 23.8095, (float) 9.5238 ),
- new CoordRec((float) 19.0476, (float) 19.0476 ),
-};
-
-static final StrokeRec char53[] = {
- new StrokeRec( 17, char53_stroke0 ),
-};
-
-/* char: 54 '6' */
-
-static final CoordRec char54_stroke0[] = {
- new CoordRec((float) 78.5714, (float) 85.7143 ),
- new CoordRec((float) 73.8096, (float) 95.2381 ),
- new CoordRec((float) 59.5238, (float) 100 ),
- new CoordRec((float) 50, (float) 100 ),
- new CoordRec((float) 35.7143, (float) 95.2381 ),
- new CoordRec((float) 26.1905, (float) 80.9524 ),
- new CoordRec((float) 21.4286, (float) 57.1429 ),
- new CoordRec((float) 21.4286, (float) 33.3333 ),
- new CoordRec((float) 26.1905, (float) 14.2857 ),
- new CoordRec((float) 35.7143, (float) 4.7619 ),
- new CoordRec((float) 50, (float) 0 ),
- new CoordRec((float) 54.7619, (float) 0 ),
- new CoordRec((float) 69.0476, (float) 4.7619 ),
- new CoordRec((float) 78.5714, (float) 14.2857 ),
- new CoordRec((float) 83.3334, (float) 28.5714 ),
- new CoordRec((float) 83.3334, (float) 33.3333 ),
- new CoordRec((float) 78.5714, (float) 47.619 ),
- new CoordRec((float) 69.0476, (float) 57.1429 ),
- new CoordRec((float) 54.7619, (float) 61.9048 ),
- new CoordRec((float) 50, (float) 61.9048 ),
- new CoordRec((float) 35.7143, (float) 57.1429 ),
- new CoordRec((float) 26.1905, (float) 47.619 ),
- new CoordRec((float) 21.4286, (float) 33.3333 ),
-};
-
-static final StrokeRec char54[] = {
- new StrokeRec( 23, char54_stroke0 ),
-};
-
-/* char: 55 '7' */
-
-static final CoordRec char55_stroke0[] = {
- new CoordRec((float) 85.7143, (float) 100 ),
- new CoordRec((float) 38.0952, (float) 0 ),
-};
-
-static final CoordRec char55_stroke1[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 85.7143, (float) 100 ),
-};
-
-static final StrokeRec char55[] = {
- new StrokeRec( 2, char55_stroke0 ),
- new StrokeRec( 2, char55_stroke1 ),
-};
-
-/* char: 56 '8' */
-
-static final CoordRec char56_stroke0[] = {
- new CoordRec((float) 42.8571, (float) 100 ),
- new CoordRec((float) 28.5714, (float) 95.2381 ),
- new CoordRec((float) 23.8095, (float) 85.7143 ),
- new CoordRec((float) 23.8095, (float) 76.1905 ),
- new CoordRec((float) 28.5714, (float) 66.6667 ),
- new CoordRec((float) 38.0952, (float) 61.9048 ),
- new CoordRec((float) 57.1428, (float) 57.1429 ),
- new CoordRec((float) 71.4286, (float) 52.381 ),
- new CoordRec((float) 80.9524, (float) 42.8571 ),
- new CoordRec((float) 85.7143, (float) 33.3333 ),
- new CoordRec((float) 85.7143, (float) 19.0476 ),
- new CoordRec((float) 80.9524, (float) 9.5238 ),
- new CoordRec((float) 76.1905, (float) 4.7619 ),
- new CoordRec((float) 61.9047, (float) 0 ),
- new CoordRec((float) 42.8571, (float) 0 ),
- new CoordRec((float) 28.5714, (float) 4.7619 ),
- new CoordRec((float) 23.8095, (float) 9.5238 ),
- new CoordRec((float) 19.0476, (float) 19.0476 ),
- new CoordRec((float) 19.0476, (float) 33.3333 ),
- new CoordRec((float) 23.8095, (float) 42.8571 ),
- new CoordRec((float) 33.3333, (float) 52.381 ),
- new CoordRec((float) 47.619, (float) 57.1429 ),
- new CoordRec((float) 66.6666, (float) 61.9048 ),
- new CoordRec((float) 76.1905, (float) 66.6667 ),
- new CoordRec((float) 80.9524, (float) 76.1905 ),
- new CoordRec((float) 80.9524, (float) 85.7143 ),
- new CoordRec((float) 76.1905, (float) 95.2381 ),
- new CoordRec((float) 61.9047, (float) 100 ),
- new CoordRec((float) 42.8571, (float) 100 ),
-};
-
-static final StrokeRec char56[] = {
- new StrokeRec( 29, char56_stroke0 ),
-};
-
-/* char: 57 '9' */
-
-static final CoordRec char57_stroke0[] = {
- new CoordRec((float) 83.3334, (float) 66.6667 ),
- new CoordRec((float) 78.5714, (float) 52.381 ),
- new CoordRec((float) 69.0476, (float) 42.8571 ),
- new CoordRec((float) 54.7619, (float) 38.0952 ),
- new CoordRec((float) 50, (float) 38.0952 ),
- new CoordRec((float) 35.7143, (float) 42.8571 ),
- new CoordRec((float) 26.1905, (float) 52.381 ),
- new CoordRec((float) 21.4286, (float) 66.6667 ),
- new CoordRec((float) 21.4286, (float) 71.4286 ),
- new CoordRec((float) 26.1905, (float) 85.7143 ),
- new CoordRec((float) 35.7143, (float) 95.2381 ),
- new CoordRec((float) 50, (float) 100 ),
- new CoordRec((float) 54.7619, (float) 100 ),
- new CoordRec((float) 69.0476, (float) 95.2381 ),
- new CoordRec((float) 78.5714, (float) 85.7143 ),
- new CoordRec((float) 83.3334, (float) 66.6667 ),
- new CoordRec((float) 83.3334, (float) 42.8571 ),
- new CoordRec((float) 78.5714, (float) 19.0476 ),
- new CoordRec((float) 69.0476, (float) 4.7619 ),
- new CoordRec((float) 54.7619, (float) 0 ),
- new CoordRec((float) 45.2381, (float) 0 ),
- new CoordRec((float) 30.9524, (float) 4.7619 ),
- new CoordRec((float) 26.1905, (float) 14.2857 ),
-};
-
-static final StrokeRec char57[] = {
- new StrokeRec( 23, char57_stroke0 ),
-};
-
-/* char: 58 ':' */
-
-static final CoordRec char58_stroke0[] = {
- new CoordRec((float) 52.381, (float) 66.6667 ),
- new CoordRec((float) 47.6191, (float) 61.9048 ),
- new CoordRec((float) 52.381, (float) 57.1429 ),
- new CoordRec((float) 57.1429, (float) 61.9048 ),
- new CoordRec((float) 52.381, (float) 66.6667 ),
-};
-
-static final CoordRec char58_stroke1[] = {
- new CoordRec((float) 52.381, (float) 9.5238 ),
- new CoordRec((float) 47.6191, (float) 4.7619 ),
- new CoordRec((float) 52.381, (float) 0 ),
- new CoordRec((float) 57.1429, (float) 4.7619 ),
- new CoordRec((float) 52.381, (float) 9.5238 ),
-};
-
-static final StrokeRec char58[] = {
- new StrokeRec( 5, char58_stroke0 ),
- new StrokeRec( 5, char58_stroke1 ),
-};
-
-/* char: 59 ';' */
-
-static final CoordRec char59_stroke0[] = {
- new CoordRec((float) 52.381, (float) 66.6667 ),
- new CoordRec((float) 47.6191, (float) 61.9048 ),
- new CoordRec((float) 52.381, (float) 57.1429 ),
- new CoordRec((float) 57.1429, (float) 61.9048 ),
- new CoordRec((float) 52.381, (float) 66.6667 ),
-};
-
-static final CoordRec char59_stroke1[] = {
- new CoordRec((float) 57.1429, (float) 4.7619 ),
- new CoordRec((float) 52.381, (float) 0 ),
- new CoordRec((float) 47.6191, (float) 4.7619 ),
- new CoordRec((float) 52.381, (float) 9.5238 ),
- new CoordRec((float) 57.1429, (float) 4.7619 ),
- new CoordRec((float) 57.1429, (float) -4.7619 ),
- new CoordRec((float) 52.381, (float) -14.2857 ),
- new CoordRec((float) 47.6191, (float) -19.0476 ),
-};
-
-static final StrokeRec char59[] = {
- new StrokeRec( 5, char59_stroke0 ),
- new StrokeRec( 8, char59_stroke1 ),
-};
-
-/* char: 60 '<' */
-
-static final CoordRec char60_stroke0[] = {
- new CoordRec((float) 90.4762, (float) 85.7143 ),
- new CoordRec((float) 14.2857, (float) 42.8571 ),
- new CoordRec((float) 90.4762, (float) 0 ),
-};
-
-static final StrokeRec char60[] = {
- new StrokeRec( 3, char60_stroke0 ),
-};
-
-/* char: 61 '=' */
-
-static final CoordRec char61_stroke0[] = {
- new CoordRec((float) 9.5238, (float) 57.1429 ),
- new CoordRec((float) 95.2381, (float) 57.1429 ),
-};
-
-static final CoordRec char61_stroke1[] = {
- new CoordRec((float) 9.5238, (float) 28.5714 ),
- new CoordRec((float) 95.2381, (float) 28.5714 ),
-};
-
-static final StrokeRec char61[] = {
- new StrokeRec( 2, char61_stroke0 ),
- new StrokeRec( 2, char61_stroke1 ),
-};
-
-/* char: 62 '>' */
-
-static final CoordRec char62_stroke0[] = {
- new CoordRec((float) 14.2857, (float) 85.7143 ),
- new CoordRec((float) 90.4762, (float) 42.8571 ),
- new CoordRec((float) 14.2857, (float) 0 ),
-};
-
-static final StrokeRec char62[] = {
- new StrokeRec( 3, char62_stroke0 ),
-};
-
-/* char: 63 '?' */
-
-static final CoordRec char63_stroke0[] = {
- new CoordRec((float) 23.8095, (float) 76.1905 ),
- new CoordRec((float) 23.8095, (float) 80.9524 ),
- new CoordRec((float) 28.5714, (float) 90.4762 ),
- new CoordRec((float) 33.3333, (float) 95.2381 ),
- new CoordRec((float) 42.8571, (float) 100 ),
- new CoordRec((float) 61.9047, (float) 100 ),
- new CoordRec((float) 71.4285, (float) 95.2381 ),
- new CoordRec((float) 76.1905, (float) 90.4762 ),
- new CoordRec((float) 80.9524, (float) 80.9524 ),
- new CoordRec((float) 80.9524, (float) 71.4286 ),
- new CoordRec((float) 76.1905, (float) 61.9048 ),
- new CoordRec((float) 71.4285, (float) 57.1429 ),
- new CoordRec((float) 52.3809, (float) 47.619 ),
- new CoordRec((float) 52.3809, (float) 33.3333 ),
-};
-
-static final CoordRec char63_stroke1[] = {
- new CoordRec((float) 52.3809, (float) 9.5238 ),
- new CoordRec((float) 47.619, (float) 4.7619 ),
- new CoordRec((float) 52.3809, (float) 0 ),
- new CoordRec((float) 57.1428, (float) 4.7619 ),
- new CoordRec((float) 52.3809, (float) 9.5238 ),
-};
-
-static final StrokeRec char63[] = {
- new StrokeRec( 14, char63_stroke0 ),
- new StrokeRec( 5, char63_stroke1 ),
-};
-
-/* char: 64 '@' */
-
-static final CoordRec char64_stroke0[] = {
- new CoordRec((float) 64.2857, (float) 52.381 ),
- new CoordRec((float) 54.7619, (float) 57.1429 ),
- new CoordRec((float) 45.2381, (float) 57.1429 ),
- new CoordRec((float) 40.4762, (float) 47.619 ),
- new CoordRec((float) 40.4762, (float) 42.8571 ),
- new CoordRec((float) 45.2381, (float) 33.3333 ),
- new CoordRec((float) 54.7619, (float) 33.3333 ),
- new CoordRec((float) 64.2857, (float) 38.0952 ),
-};
-
-static final CoordRec char64_stroke1[] = {
- new CoordRec((float) 64.2857, (float) 57.1429 ),
- new CoordRec((float) 64.2857, (float) 38.0952 ),
- new CoordRec((float) 69.0476, (float) 33.3333 ),
- new CoordRec((float) 78.5714, (float) 33.3333 ),
- new CoordRec((float) 83.3334, (float) 42.8571 ),
- new CoordRec((float) 83.3334, (float) 47.619 ),
- new CoordRec((float) 78.5714, (float) 61.9048 ),
- new CoordRec((float) 69.0476, (float) 71.4286 ),
- new CoordRec((float) 54.7619, (float) 76.1905 ),
- new CoordRec((float) 50, (float) 76.1905 ),
- new CoordRec((float) 35.7143, (float) 71.4286 ),
- new CoordRec((float) 26.1905, (float) 61.9048 ),
- new CoordRec((float) 21.4286, (float) 47.619 ),
- new CoordRec((float) 21.4286, (float) 42.8571 ),
- new CoordRec((float) 26.1905, (float) 28.5714 ),
- new CoordRec((float) 35.7143, (float) 19.0476 ),
- new CoordRec((float) 50, (float) 14.2857 ),
- new CoordRec((float) 54.7619, (float) 14.2857 ),
- new CoordRec((float) 69.0476, (float) 19.0476 ),
-};
-
-static final StrokeRec char64[] = {
- new StrokeRec( 8, char64_stroke0 ),
- new StrokeRec( 19, char64_stroke1 ),
-};
-
-/* char: 65 'A' */
-
-static final CoordRec char65_stroke0[] = {
- new CoordRec((float) 52.3809, (float) 100 ),
- new CoordRec((float) 14.2857, (float) 0 ),
-};
-
-static final CoordRec char65_stroke1[] = {
- new CoordRec((float) 52.3809, (float) 100 ),
- new CoordRec((float) 90.4762, (float) 0 ),
-};
-
-static final CoordRec char65_stroke2[] = {
- new CoordRec((float) 28.5714, (float) 33.3333 ),
- new CoordRec((float) 76.1905, (float) 33.3333 ),
-};
-
-static final StrokeRec char65[] = {
- new StrokeRec( 2, char65_stroke0 ),
- new StrokeRec( 2, char65_stroke1 ),
- new StrokeRec( 2, char65_stroke2 ),
-};
-
-/* char: 66 'B' */
-
-static final CoordRec char66_stroke0[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 19.0476, (float) 0 ),
-};
-
-static final CoordRec char66_stroke1[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 61.9047, (float) 100 ),
- new CoordRec((float) 76.1905, (float) 95.2381 ),
- new CoordRec((float) 80.9524, (float) 90.4762 ),
- new CoordRec((float) 85.7143, (float) 80.9524 ),
- new CoordRec((float) 85.7143, (float) 71.4286 ),
- new CoordRec((float) 80.9524, (float) 61.9048 ),
- new CoordRec((float) 76.1905, (float) 57.1429 ),
- new CoordRec((float) 61.9047, (float) 52.381 ),
-};
-
-static final CoordRec char66_stroke2[] = {
- new CoordRec((float) 19.0476, (float) 52.381 ),
- new CoordRec((float) 61.9047, (float) 52.381 ),
- new CoordRec((float) 76.1905, (float) 47.619 ),
- new CoordRec((float) 80.9524, (float) 42.8571 ),
- new CoordRec((float) 85.7143, (float) 33.3333 ),
- new CoordRec((float) 85.7143, (float) 19.0476 ),
- new CoordRec((float) 80.9524, (float) 9.5238 ),
- new CoordRec((float) 76.1905, (float) 4.7619 ),
- new CoordRec((float) 61.9047, (float) 0 ),
- new CoordRec((float) 19.0476, (float) 0 ),
-};
-
-static final StrokeRec char66[] = {
- new StrokeRec( 2, char66_stroke0 ),
- new StrokeRec( 9, char66_stroke1 ),
- new StrokeRec( 10, char66_stroke2 ),
-};
-
-/* char: 67 'C' */
-
-static final CoordRec char67_stroke0[] = {
- new CoordRec((float) 88.0952, (float) 76.1905 ),
- new CoordRec((float) 83.3334, (float) 85.7143 ),
- new CoordRec((float) 73.8096, (float) 95.2381 ),
- new CoordRec((float) 64.2857, (float) 100 ),
- new CoordRec((float) 45.2381, (float) 100 ),
- new CoordRec((float) 35.7143, (float) 95.2381 ),
- new CoordRec((float) 26.1905, (float) 85.7143 ),
- new CoordRec((float) 21.4286, (float) 76.1905 ),
- new CoordRec((float) 16.6667, (float) 61.9048 ),
- new CoordRec((float) 16.6667, (float) 38.0952 ),
- new CoordRec((float) 21.4286, (float) 23.8095 ),
- new CoordRec((float) 26.1905, (float) 14.2857 ),
- new CoordRec((float) 35.7143, (float) 4.7619 ),
- new CoordRec((float) 45.2381, (float) 0 ),
- new CoordRec((float) 64.2857, (float) 0 ),
- new CoordRec((float) 73.8096, (float) 4.7619 ),
- new CoordRec((float) 83.3334, (float) 14.2857 ),
- new CoordRec((float) 88.0952, (float) 23.8095 ),
-};
-
-static final StrokeRec char67[] = {
- new StrokeRec( 18, char67_stroke0 ),
-};
-
-/* char: 68 'D' */
-
-static final CoordRec char68_stroke0[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 19.0476, (float) 0 ),
-};
-
-static final CoordRec char68_stroke1[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 52.3809, (float) 100 ),
- new CoordRec((float) 66.6666, (float) 95.2381 ),
- new CoordRec((float) 76.1905, (float) 85.7143 ),
- new CoordRec((float) 80.9524, (float) 76.1905 ),
- new CoordRec((float) 85.7143, (float) 61.9048 ),
- new CoordRec((float) 85.7143, (float) 38.0952 ),
- new CoordRec((float) 80.9524, (float) 23.8095 ),
- new CoordRec((float) 76.1905, (float) 14.2857 ),
- new CoordRec((float) 66.6666, (float) 4.7619 ),
- new CoordRec((float) 52.3809, (float) 0 ),
- new CoordRec((float) 19.0476, (float) 0 ),
-};
-
-static final StrokeRec char68[] = {
- new StrokeRec( 2, char68_stroke0 ),
- new StrokeRec( 12, char68_stroke1 ),
-};
-
-/* char: 69 'E' */
-
-static final CoordRec char69_stroke0[] = {
- new CoordRec((float) 21.4286, (float) 100 ),
- new CoordRec((float) 21.4286, (float) 0 ),
-};
-
-static final CoordRec char69_stroke1[] = {
- new CoordRec((float) 21.4286, (float) 100 ),
- new CoordRec((float) 83.3334, (float) 100 ),
-};
-
-static final CoordRec char69_stroke2[] = {
- new CoordRec((float) 21.4286, (float) 52.381 ),
- new CoordRec((float) 59.5238, (float) 52.381 ),
-};
-
-static final CoordRec char69_stroke3[] = {
- new CoordRec((float) 21.4286, (float) 0 ),
- new CoordRec((float) 83.3334, (float) 0 ),
-};
-
-static final StrokeRec char69[] = {
- new StrokeRec( 2, char69_stroke0 ),
- new StrokeRec( 2, char69_stroke1 ),
- new StrokeRec( 2, char69_stroke2 ),
- new StrokeRec( 2, char69_stroke3 ),
-};
-
-/* char: 70 'F' */
-
-static final CoordRec char70_stroke0[] = {
- new CoordRec((float) 21.4286, (float) 100 ),
- new CoordRec((float) 21.4286, (float) 0 ),
-};
-
-static final CoordRec char70_stroke1[] = {
- new CoordRec((float) 21.4286, (float) 100 ),
- new CoordRec((float) 83.3334, (float) 100 ),
-};
-
-static final CoordRec char70_stroke2[] = {
- new CoordRec((float) 21.4286, (float) 52.381 ),
- new CoordRec((float) 59.5238, (float) 52.381 ),
-};
-
-static final StrokeRec char70[] = {
- new StrokeRec( 2, char70_stroke0 ),
- new StrokeRec( 2, char70_stroke1 ),
- new StrokeRec( 2, char70_stroke2 ),
-};
-
-/* char: 71 'G' */
-
-static final CoordRec char71_stroke0[] = {
- new CoordRec((float) 88.0952, (float) 76.1905 ),
- new CoordRec((float) 83.3334, (float) 85.7143 ),
- new CoordRec((float) 73.8096, (float) 95.2381 ),
- new CoordRec((float) 64.2857, (float) 100 ),
- new CoordRec((float) 45.2381, (float) 100 ),
- new CoordRec((float) 35.7143, (float) 95.2381 ),
- new CoordRec((float) 26.1905, (float) 85.7143 ),
- new CoordRec((float) 21.4286, (float) 76.1905 ),
- new CoordRec((float) 16.6667, (float) 61.9048 ),
- new CoordRec((float) 16.6667, (float) 38.0952 ),
- new CoordRec((float) 21.4286, (float) 23.8095 ),
- new CoordRec((float) 26.1905, (float) 14.2857 ),
- new CoordRec((float) 35.7143, (float) 4.7619 ),
- new CoordRec((float) 45.2381, (float) 0 ),
- new CoordRec((float) 64.2857, (float) 0 ),
- new CoordRec((float) 73.8096, (float) 4.7619 ),
- new CoordRec((float) 83.3334, (float) 14.2857 ),
- new CoordRec((float) 88.0952, (float) 23.8095 ),
- new CoordRec((float) 88.0952, (float) 38.0952 ),
-};
-
-static final CoordRec char71_stroke1[] = {
- new CoordRec((float) 64.2857, (float) 38.0952 ),
- new CoordRec((float) 88.0952, (float) 38.0952 ),
-};
-
-static final StrokeRec char71[] = {
- new StrokeRec( 19, char71_stroke0 ),
- new StrokeRec( 2, char71_stroke1 ),
-};
-
-/* char: 72 'H' */
-
-static final CoordRec char72_stroke0[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 19.0476, (float) 0 ),
-};
-
-static final CoordRec char72_stroke1[] = {
- new CoordRec((float) 85.7143, (float) 100 ),
- new CoordRec((float) 85.7143, (float) 0 ),
-};
-
-static final CoordRec char72_stroke2[] = {
- new CoordRec((float) 19.0476, (float) 52.381 ),
- new CoordRec((float) 85.7143, (float) 52.381 ),
-};
-
-static final StrokeRec char72[] = {
- new StrokeRec( 2, char72_stroke0 ),
- new StrokeRec( 2, char72_stroke1 ),
- new StrokeRec( 2, char72_stroke2 ),
-};
-
-/* char: 73 'I' */
-
-static final CoordRec char73_stroke0[] = {
- new CoordRec((float) 52.381, (float) 100 ),
- new CoordRec((float) 52.381, (float) 0 ),
-};
-
-static final StrokeRec char73[] = {
- new StrokeRec( 2, char73_stroke0 ),
-};
-
-/* char: 74 'J' */
-
-static final CoordRec char74_stroke0[] = {
- new CoordRec((float) 76.1905, (float) 100 ),
- new CoordRec((float) 76.1905, (float) 23.8095 ),
- new CoordRec((float) 71.4286, (float) 9.5238 ),
- new CoordRec((float) 66.6667, (float) 4.7619 ),
- new CoordRec((float) 57.1429, (float) 0 ),
- new CoordRec((float) 47.6191, (float) 0 ),
- new CoordRec((float) 38.0953, (float) 4.7619 ),
- new CoordRec((float) 33.3334, (float) 9.5238 ),
- new CoordRec((float) 28.5715, (float) 23.8095 ),
- new CoordRec((float) 28.5715, (float) 33.3333 ),
-};
-
-static final StrokeRec char74[] = {
- new StrokeRec( 10, char74_stroke0 ),
-};
-
-/* char: 75 'K' */
-
-static final CoordRec char75_stroke0[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 19.0476, (float) 0 ),
-};
-
-static final CoordRec char75_stroke1[] = {
- new CoordRec((float) 85.7143, (float) 100 ),
- new CoordRec((float) 19.0476, (float) 33.3333 ),
-};
-
-static final CoordRec char75_stroke2[] = {
- new CoordRec((float) 42.8571, (float) 57.1429 ),
- new CoordRec((float) 85.7143, (float) 0 ),
-};
-
-static final StrokeRec char75[] = {
- new StrokeRec( 2, char75_stroke0 ),
- new StrokeRec( 2, char75_stroke1 ),
- new StrokeRec( 2, char75_stroke2 ),
-};
-
-/* char: 76 'L' */
-
-static final CoordRec char76_stroke0[] = {
- new CoordRec((float) 23.8095, (float) 100 ),
- new CoordRec((float) 23.8095, (float) 0 ),
-};
-
-static final CoordRec char76_stroke1[] = {
- new CoordRec((float) 23.8095, (float) 0 ),
- new CoordRec((float) 80.9524, (float) 0 ),
-};
-
-static final StrokeRec char76[] = {
- new StrokeRec( 2, char76_stroke0 ),
- new StrokeRec( 2, char76_stroke1 ),
-};
-
-/* char: 77 'M' */
-
-static final CoordRec char77_stroke0[] = {
- new CoordRec((float) 14.2857, (float) 100 ),
- new CoordRec((float) 14.2857, (float) 0 ),
-};
-
-static final CoordRec char77_stroke1[] = {
- new CoordRec((float) 14.2857, (float) 100 ),
- new CoordRec((float) 52.3809, (float) 0 ),
-};
-
-static final CoordRec char77_stroke2[] = {
- new CoordRec((float) 90.4762, (float) 100 ),
- new CoordRec((float) 52.3809, (float) 0 ),
-};
-
-static final CoordRec char77_stroke3[] = {
- new CoordRec((float) 90.4762, (float) 100 ),
- new CoordRec((float) 90.4762, (float) 0 ),
-};
-
-static final StrokeRec char77[] = {
- new StrokeRec( 2, char77_stroke0 ),
- new StrokeRec( 2, char77_stroke1 ),
- new StrokeRec( 2, char77_stroke2 ),
- new StrokeRec( 2, char77_stroke3 ),
-};
-
-/* char: 78 'N' */
-
-static final CoordRec char78_stroke0[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 19.0476, (float) 0 ),
-};
-
-static final CoordRec char78_stroke1[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 85.7143, (float) 0 ),
-};
-
-static final CoordRec char78_stroke2[] = {
- new CoordRec((float) 85.7143, (float) 100 ),
- new CoordRec((float) 85.7143, (float) 0 ),
-};
-
-static final StrokeRec char78[] = {
- new StrokeRec( 2, char78_stroke0 ),
- new StrokeRec( 2, char78_stroke1 ),
- new StrokeRec( 2, char78_stroke2 ),
-};
-
-/* char: 79 'O' */
-
-static final CoordRec char79_stroke0[] = {
- new CoordRec((float) 42.8571, (float) 100 ),
- new CoordRec((float) 33.3333, (float) 95.2381 ),
- new CoordRec((float) 23.8095, (float) 85.7143 ),
- new CoordRec((float) 19.0476, (float) 76.1905 ),
- new CoordRec((float) 14.2857, (float) 61.9048 ),
- new CoordRec((float) 14.2857, (float) 38.0952 ),
- new CoordRec((float) 19.0476, (float) 23.8095 ),
- new CoordRec((float) 23.8095, (float) 14.2857 ),
- new CoordRec((float) 33.3333, (float) 4.7619 ),
- new CoordRec((float) 42.8571, (float) 0 ),
- new CoordRec((float) 61.9047, (float) 0 ),
- new CoordRec((float) 71.4286, (float) 4.7619 ),
- new CoordRec((float) 80.9524, (float) 14.2857 ),
- new CoordRec((float) 85.7143, (float) 23.8095 ),
- new CoordRec((float) 90.4762, (float) 38.0952 ),
- new CoordRec((float) 90.4762, (float) 61.9048 ),
- new CoordRec((float) 85.7143, (float) 76.1905 ),
- new CoordRec((float) 80.9524, (float) 85.7143 ),
- new CoordRec((float) 71.4286, (float) 95.2381 ),
- new CoordRec((float) 61.9047, (float) 100 ),
- new CoordRec((float) 42.8571, (float) 100 ),
-};
-
-static final StrokeRec char79[] = {
- new StrokeRec( 21, char79_stroke0 ),
-};
-
-/* char: 80 'P' */
-
-static final CoordRec char80_stroke0[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 19.0476, (float) 0 ),
-};
-
-static final CoordRec char80_stroke1[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 61.9047, (float) 100 ),
- new CoordRec((float) 76.1905, (float) 95.2381 ),
- new CoordRec((float) 80.9524, (float) 90.4762 ),
- new CoordRec((float) 85.7143, (float) 80.9524 ),
- new CoordRec((float) 85.7143, (float) 66.6667 ),
- new CoordRec((float) 80.9524, (float) 57.1429 ),
- new CoordRec((float) 76.1905, (float) 52.381 ),
- new CoordRec((float) 61.9047, (float) 47.619 ),
- new CoordRec((float) 19.0476, (float) 47.619 ),
-};
-
-static final StrokeRec char80[] = {
- new StrokeRec( 2, char80_stroke0 ),
- new StrokeRec( 10, char80_stroke1 ),
-};
-
-/* char: 81 'Q' */
-
-static final CoordRec char81_stroke0[] = {
- new CoordRec((float) 42.8571, (float) 100 ),
- new CoordRec((float) 33.3333, (float) 95.2381 ),
- new CoordRec((float) 23.8095, (float) 85.7143 ),
- new CoordRec((float) 19.0476, (float) 76.1905 ),
- new CoordRec((float) 14.2857, (float) 61.9048 ),
- new CoordRec((float) 14.2857, (float) 38.0952 ),
- new CoordRec((float) 19.0476, (float) 23.8095 ),
- new CoordRec((float) 23.8095, (float) 14.2857 ),
- new CoordRec((float) 33.3333, (float) 4.7619 ),
- new CoordRec((float) 42.8571, (float) 0 ),
- new CoordRec((float) 61.9047, (float) 0 ),
- new CoordRec((float) 71.4286, (float) 4.7619 ),
- new CoordRec((float) 80.9524, (float) 14.2857 ),
- new CoordRec((float) 85.7143, (float) 23.8095 ),
- new CoordRec((float) 90.4762, (float) 38.0952 ),
- new CoordRec((float) 90.4762, (float) 61.9048 ),
- new CoordRec((float) 85.7143, (float) 76.1905 ),
- new CoordRec((float) 80.9524, (float) 85.7143 ),
- new CoordRec((float) 71.4286, (float) 95.2381 ),
- new CoordRec((float) 61.9047, (float) 100 ),
- new CoordRec((float) 42.8571, (float) 100 ),
-};
-
-static final CoordRec char81_stroke1[] = {
- new CoordRec((float) 57.1428, (float) 19.0476 ),
- new CoordRec((float) 85.7143, (float) -9.5238 ),
-};
-
-static final StrokeRec char81[] = {
- new StrokeRec( 21, char81_stroke0 ),
- new StrokeRec( 2, char81_stroke1 ),
-};
-
-/* char: 82 'R' */
-
-static final CoordRec char82_stroke0[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 19.0476, (float) 0 ),
-};
-
-static final CoordRec char82_stroke1[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 61.9047, (float) 100 ),
- new CoordRec((float) 76.1905, (float) 95.2381 ),
- new CoordRec((float) 80.9524, (float) 90.4762 ),
- new CoordRec((float) 85.7143, (float) 80.9524 ),
- new CoordRec((float) 85.7143, (float) 71.4286 ),
- new CoordRec((float) 80.9524, (float) 61.9048 ),
- new CoordRec((float) 76.1905, (float) 57.1429 ),
- new CoordRec((float) 61.9047, (float) 52.381 ),
- new CoordRec((float) 19.0476, (float) 52.381 ),
-};
-
-static final CoordRec char82_stroke2[] = {
- new CoordRec((float) 52.3809, (float) 52.381 ),
- new CoordRec((float) 85.7143, (float) 0 ),
-};
-
-static final StrokeRec char82[] = {
- new StrokeRec( 2, char82_stroke0 ),
- new StrokeRec( 10, char82_stroke1 ),
- new StrokeRec( 2, char82_stroke2 ),
-};
-
-/* char: 83 'S' */
-
-static final CoordRec char83_stroke0[] = {
- new CoordRec((float) 85.7143, (float) 85.7143 ),
- new CoordRec((float) 76.1905, (float) 95.2381 ),
- new CoordRec((float) 61.9047, (float) 100 ),
- new CoordRec((float) 42.8571, (float) 100 ),
- new CoordRec((float) 28.5714, (float) 95.2381 ),
- new CoordRec((float) 19.0476, (float) 85.7143 ),
- new CoordRec((float) 19.0476, (float) 76.1905 ),
- new CoordRec((float) 23.8095, (float) 66.6667 ),
- new CoordRec((float) 28.5714, (float) 61.9048 ),
- new CoordRec((float) 38.0952, (float) 57.1429 ),
- new CoordRec((float) 66.6666, (float) 47.619 ),
- new CoordRec((float) 76.1905, (float) 42.8571 ),
- new CoordRec((float) 80.9524, (float) 38.0952 ),
- new CoordRec((float) 85.7143, (float) 28.5714 ),
- new CoordRec((float) 85.7143, (float) 14.2857 ),
- new CoordRec((float) 76.1905, (float) 4.7619 ),
- new CoordRec((float) 61.9047, (float) 0 ),
- new CoordRec((float) 42.8571, (float) 0 ),
- new CoordRec((float) 28.5714, (float) 4.7619 ),
- new CoordRec((float) 19.0476, (float) 14.2857 ),
-};
-
-static final StrokeRec char83[] = {
- new StrokeRec( 20, char83_stroke0 ),
-};
-
-/* char: 84 'T' */
-
-static final CoordRec char84_stroke0[] = {
- new CoordRec((float) 52.3809, (float) 100 ),
- new CoordRec((float) 52.3809, (float) 0 ),
-};
-
-static final CoordRec char84_stroke1[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 85.7143, (float) 100 ),
-};
-
-static final StrokeRec char84[] = {
- new StrokeRec( 2, char84_stroke0 ),
- new StrokeRec( 2, char84_stroke1 ),
-};
-
-/* char: 85 'U' */
-
-static final CoordRec char85_stroke0[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 19.0476, (float) 28.5714 ),
- new CoordRec((float) 23.8095, (float) 14.2857 ),
- new CoordRec((float) 33.3333, (float) 4.7619 ),
- new CoordRec((float) 47.619, (float) 0 ),
- new CoordRec((float) 57.1428, (float) 0 ),
- new CoordRec((float) 71.4286, (float) 4.7619 ),
- new CoordRec((float) 80.9524, (float) 14.2857 ),
- new CoordRec((float) 85.7143, (float) 28.5714 ),
- new CoordRec((float) 85.7143, (float) 100 ),
-};
-
-static final StrokeRec char85[] = {
- new StrokeRec( 10, char85_stroke0 ),
-};
-
-/* char: 86 'V' */
-
-static final CoordRec char86_stroke0[] = {
- new CoordRec((float) 14.2857, (float) 100 ),
- new CoordRec((float) 52.3809, (float) 0 ),
-};
-
-static final CoordRec char86_stroke1[] = {
- new CoordRec((float) 90.4762, (float) 100 ),
- new CoordRec((float) 52.3809, (float) 0 ),
-};
-
-static final StrokeRec char86[] = {
- new StrokeRec( 2, char86_stroke0 ),
- new StrokeRec( 2, char86_stroke1 ),
-};
-
-/* char: 87 'W' */
-
-static final CoordRec char87_stroke0[] = {
- new CoordRec((float) 4.7619, (float) 100 ),
- new CoordRec((float) 28.5714, (float) 0 ),
-};
-
-static final CoordRec char87_stroke1[] = {
- new CoordRec((float) 52.3809, (float) 100 ),
- new CoordRec((float) 28.5714, (float) 0 ),
-};
-
-static final CoordRec char87_stroke2[] = {
- new CoordRec((float) 52.3809, (float) 100 ),
- new CoordRec((float) 76.1905, (float) 0 ),
-};
-
-static final CoordRec char87_stroke3[] = {
- new CoordRec((float) 100, (float) 100 ),
- new CoordRec((float) 76.1905, (float) 0 ),
-};
-
-static final StrokeRec char87[] = {
- new StrokeRec( 2, char87_stroke0 ),
- new StrokeRec( 2, char87_stroke1 ),
- new StrokeRec( 2, char87_stroke2 ),
- new StrokeRec( 2, char87_stroke3 ),
-};
-
-/* char: 88 'X' */
-
-static final CoordRec char88_stroke0[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 85.7143, (float) 0 ),
-};
-
-static final CoordRec char88_stroke1[] = {
- new CoordRec((float) 85.7143, (float) 100 ),
- new CoordRec((float) 19.0476, (float) 0 ),
-};
-
-static final StrokeRec char88[] = {
- new StrokeRec( 2, char88_stroke0 ),
- new StrokeRec( 2, char88_stroke1 ),
-};
-
-/* char: 89 'Y' */
-
-static final CoordRec char89_stroke0[] = {
- new CoordRec((float) 14.2857, (float) 100 ),
- new CoordRec((float) 52.3809, (float) 52.381 ),
- new CoordRec((float) 52.3809, (float) 0 ),
-};
-
-static final CoordRec char89_stroke1[] = {
- new CoordRec((float) 90.4762, (float) 100 ),
- new CoordRec((float) 52.3809, (float) 52.381 ),
-};
-
-static final StrokeRec char89[] = {
- new StrokeRec( 3, char89_stroke0 ),
- new StrokeRec( 2, char89_stroke1 ),
-};
-
-/* char: 90 'Z' */
-
-static final CoordRec char90_stroke0[] = {
- new CoordRec((float) 85.7143, (float) 100 ),
- new CoordRec((float) 19.0476, (float) 0 ),
-};
-
-static final CoordRec char90_stroke1[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 85.7143, (float) 100 ),
-};
-
-static final CoordRec char90_stroke2[] = {
- new CoordRec((float) 19.0476, (float) 0 ),
- new CoordRec((float) 85.7143, (float) 0 ),
-};
-
-static final StrokeRec char90[] = {
- new StrokeRec( 2, char90_stroke0 ),
- new StrokeRec( 2, char90_stroke1 ),
- new StrokeRec( 2, char90_stroke2 ),
-};
-
-/* char: 91 '[' */
-
-static final CoordRec char91_stroke0[] = {
- new CoordRec((float) 35.7143, (float) 119.048 ),
- new CoordRec((float) 35.7143, (float) -33.3333 ),
-};
-
-static final CoordRec char91_stroke1[] = {
- new CoordRec((float) 40.4762, (float) 119.048 ),
- new CoordRec((float) 40.4762, (float) -33.3333 ),
-};
-
-static final CoordRec char91_stroke2[] = {
- new CoordRec((float) 35.7143, (float) 119.048 ),
- new CoordRec((float) 69.0476, (float) 119.048 ),
-};
-
-static final CoordRec char91_stroke3[] = {
- new CoordRec((float) 35.7143, (float) -33.3333 ),
- new CoordRec((float) 69.0476, (float) -33.3333 ),
-};
-
-static final StrokeRec char91[] = {
- new StrokeRec( 2, char91_stroke0 ),
- new StrokeRec( 2, char91_stroke1 ),
- new StrokeRec( 2, char91_stroke2 ),
- new StrokeRec( 2, char91_stroke3 ),
-};
-
-/* char: 92 '\' */
-
-static final CoordRec char92_stroke0[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 85.7143, (float) -14.2857 ),
-};
-
-static final StrokeRec char92[] = {
- new StrokeRec( 2, char92_stroke0 ),
-};
-
-/* char: 93 ']' */
-
-static final CoordRec char93_stroke0[] = {
- new CoordRec((float) 64.2857, (float) 119.048 ),
- new CoordRec((float) 64.2857, (float) -33.3333 ),
-};
-
-static final CoordRec char93_stroke1[] = {
- new CoordRec((float) 69.0476, (float) 119.048 ),
- new CoordRec((float) 69.0476, (float) -33.3333 ),
-};
-
-static final CoordRec char93_stroke2[] = {
- new CoordRec((float) 35.7143, (float) 119.048 ),
- new CoordRec((float) 69.0476, (float) 119.048 ),
-};
-
-static final CoordRec char93_stroke3[] = {
- new CoordRec((float) 35.7143, (float) -33.3333 ),
- new CoordRec((float) 69.0476, (float) -33.3333 ),
-};
-
-static final StrokeRec char93[] = {
- new StrokeRec( 2, char93_stroke0 ),
- new StrokeRec( 2, char93_stroke1 ),
- new StrokeRec( 2, char93_stroke2 ),
- new StrokeRec( 2, char93_stroke3 ),
-};
-
-/* char: 94 '^' */
-
-static final CoordRec char94_stroke0[] = {
- new CoordRec((float) 52.3809, (float) 109.524 ),
- new CoordRec((float) 14.2857, (float) 42.8571 ),
-};
-
-static final CoordRec char94_stroke1[] = {
- new CoordRec((float) 52.3809, (float) 109.524 ),
- new CoordRec((float) 90.4762, (float) 42.8571 ),
-};
-
-static final StrokeRec char94[] = {
- new StrokeRec( 2, char94_stroke0 ),
- new StrokeRec( 2, char94_stroke1 ),
-};
-
-/* char: 95 '_' */
-
-static final CoordRec char95_stroke0[] = {
- new CoordRec((float) 0, (float) -33.3333 ),
- new CoordRec((float) 104.762, (float) -33.3333 ),
- new CoordRec((float) 104.762, (float) -28.5714 ),
- new CoordRec((float) 0, (float) -28.5714 ),
- new CoordRec((float) 0, (float) -33.3333 ),
-};
-
-static final StrokeRec char95[] = {
- new StrokeRec( 5, char95_stroke0 ),
-};
-
-/* char: 96 '`' */
-
-static final CoordRec char96_stroke0[] = {
- new CoordRec((float) 42.8572, (float) 100 ),
- new CoordRec((float) 66.6667, (float) 71.4286 ),
-};
-
-static final CoordRec char96_stroke1[] = {
- new CoordRec((float) 42.8572, (float) 100 ),
- new CoordRec((float) 38.0953, (float) 95.2381 ),
- new CoordRec((float) 66.6667, (float) 71.4286 ),
-};
-
-static final StrokeRec char96[] = {
- new StrokeRec( 2, char96_stroke0 ),
- new StrokeRec( 3, char96_stroke1 ),
-};
-
-/* char: 97 'a' */
-
-static final CoordRec char97_stroke0[] = {
- new CoordRec((float) 80.9524, (float) 66.6667 ),
- new CoordRec((float) 80.9524, (float) 0 ),
-};
-
-static final CoordRec char97_stroke1[] = {
- new CoordRec((float) 80.9524, (float) 52.381 ),
- new CoordRec((float) 71.4285, (float) 61.9048 ),
- new CoordRec((float) 61.9047, (float) 66.6667 ),
- new CoordRec((float) 47.619, (float) 66.6667 ),
- new CoordRec((float) 38.0952, (float) 61.9048 ),
- new CoordRec((float) 28.5714, (float) 52.381 ),
- new CoordRec((float) 23.8095, (float) 38.0952 ),
- new CoordRec((float) 23.8095, (float) 28.5714 ),
- new CoordRec((float) 28.5714, (float) 14.2857 ),
- new CoordRec((float) 38.0952, (float) 4.7619 ),
- new CoordRec((float) 47.619, (float) 0 ),
- new CoordRec((float) 61.9047, (float) 0 ),
- new CoordRec((float) 71.4285, (float) 4.7619 ),
- new CoordRec((float) 80.9524, (float) 14.2857 ),
-};
-
-static final StrokeRec char97[] = {
- new StrokeRec( 2, char97_stroke0 ),
- new StrokeRec( 14, char97_stroke1 ),
-};
-
-/* char: 98 'b' */
-
-static final CoordRec char98_stroke0[] = {
- new CoordRec((float) 23.8095, (float) 100 ),
- new CoordRec((float) 23.8095, (float) 0 ),
-};
-
-static final CoordRec char98_stroke1[] = {
- new CoordRec((float) 23.8095, (float) 52.381 ),
- new CoordRec((float) 33.3333, (float) 61.9048 ),
- new CoordRec((float) 42.8571, (float) 66.6667 ),
- new CoordRec((float) 57.1428, (float) 66.6667 ),
- new CoordRec((float) 66.6666, (float) 61.9048 ),
- new CoordRec((float) 76.1905, (float) 52.381 ),
- new CoordRec((float) 80.9524, (float) 38.0952 ),
- new CoordRec((float) 80.9524, (float) 28.5714 ),
- new CoordRec((float) 76.1905, (float) 14.2857 ),
- new CoordRec((float) 66.6666, (float) 4.7619 ),
- new CoordRec((float) 57.1428, (float) 0 ),
- new CoordRec((float) 42.8571, (float) 0 ),
- new CoordRec((float) 33.3333, (float) 4.7619 ),
- new CoordRec((float) 23.8095, (float) 14.2857 ),
-};
-
-static final StrokeRec char98[] = {
- new StrokeRec( 2, char98_stroke0 ),
- new StrokeRec( 14, char98_stroke1 ),
-};
-
-/* char: 99 'c' */
-
-static final CoordRec char99_stroke0[] = {
- new CoordRec((float) 80.9524, (float) 52.381 ),
- new CoordRec((float) 71.4285, (float) 61.9048 ),
- new CoordRec((float) 61.9047, (float) 66.6667 ),
- new CoordRec((float) 47.619, (float) 66.6667 ),
- new CoordRec((float) 38.0952, (float) 61.9048 ),
- new CoordRec((float) 28.5714, (float) 52.381 ),
- new CoordRec((float) 23.8095, (float) 38.0952 ),
- new CoordRec((float) 23.8095, (float) 28.5714 ),
- new CoordRec((float) 28.5714, (float) 14.2857 ),
- new CoordRec((float) 38.0952, (float) 4.7619 ),
- new CoordRec((float) 47.619, (float) 0 ),
- new CoordRec((float) 61.9047, (float) 0 ),
- new CoordRec((float) 71.4285, (float) 4.7619 ),
- new CoordRec((float) 80.9524, (float) 14.2857 ),
-};
-
-static final StrokeRec char99[] = {
- new StrokeRec( 14, char99_stroke0 ),
-};
-
-/* char: 100 'd' */
-
-static final CoordRec char100_stroke0[] = {
- new CoordRec((float) 80.9524, (float) 100 ),
- new CoordRec((float) 80.9524, (float) 0 ),
-};
-
-static final CoordRec char100_stroke1[] = {
- new CoordRec((float) 80.9524, (float) 52.381 ),
- new CoordRec((float) 71.4285, (float) 61.9048 ),
- new CoordRec((float) 61.9047, (float) 66.6667 ),
- new CoordRec((float) 47.619, (float) 66.6667 ),
- new CoordRec((float) 38.0952, (float) 61.9048 ),
- new CoordRec((float) 28.5714, (float) 52.381 ),
- new CoordRec((float) 23.8095, (float) 38.0952 ),
- new CoordRec((float) 23.8095, (float) 28.5714 ),
- new CoordRec((float) 28.5714, (float) 14.2857 ),
- new CoordRec((float) 38.0952, (float) 4.7619 ),
- new CoordRec((float) 47.619, (float) 0 ),
- new CoordRec((float) 61.9047, (float) 0 ),
- new CoordRec((float) 71.4285, (float) 4.7619 ),
- new CoordRec((float) 80.9524, (float) 14.2857 ),
-};
-
-static final StrokeRec char100[] = {
- new StrokeRec( 2, char100_stroke0 ),
- new StrokeRec( 14, char100_stroke1 ),
-};
-
-/* char: 101 'e' */
-
-static final CoordRec char101_stroke0[] = {
- new CoordRec((float) 23.8095, (float) 38.0952 ),
- new CoordRec((float) 80.9524, (float) 38.0952 ),
- new CoordRec((float) 80.9524, (float) 47.619 ),
- new CoordRec((float) 76.1905, (float) 57.1429 ),
- new CoordRec((float) 71.4285, (float) 61.9048 ),
- new CoordRec((float) 61.9047, (float) 66.6667 ),
- new CoordRec((float) 47.619, (float) 66.6667 ),
- new CoordRec((float) 38.0952, (float) 61.9048 ),
- new CoordRec((float) 28.5714, (float) 52.381 ),
- new CoordRec((float) 23.8095, (float) 38.0952 ),
- new CoordRec((float) 23.8095, (float) 28.5714 ),
- new CoordRec((float) 28.5714, (float) 14.2857 ),
- new CoordRec((float) 38.0952, (float) 4.7619 ),
- new CoordRec((float) 47.619, (float) 0 ),
- new CoordRec((float) 61.9047, (float) 0 ),
- new CoordRec((float) 71.4285, (float) 4.7619 ),
- new CoordRec((float) 80.9524, (float) 14.2857 ),
-};
-
-static final StrokeRec char101[] = {
- new StrokeRec( 17, char101_stroke0 ),
-};
-
-/* char: 102 'f' */
-
-static final CoordRec char102_stroke0[] = {
- new CoordRec((float) 71.4286, (float) 100 ),
- new CoordRec((float) 61.9048, (float) 100 ),
- new CoordRec((float) 52.381, (float) 95.2381 ),
- new CoordRec((float) 47.6191, (float) 80.9524 ),
- new CoordRec((float) 47.6191, (float) 0 ),
-};
-
-static final CoordRec char102_stroke1[] = {
- new CoordRec((float) 33.3334, (float) 66.6667 ),
- new CoordRec((float) 66.6667, (float) 66.6667 ),
-};
-
-static final StrokeRec char102[] = {
- new StrokeRec( 5, char102_stroke0 ),
- new StrokeRec( 2, char102_stroke1 ),
-};
-
-/* char: 103 'g' */
-
-static final CoordRec char103_stroke0[] = {
- new CoordRec((float) 80.9524, (float) 66.6667 ),
- new CoordRec((float) 80.9524, (float) -9.5238 ),
- new CoordRec((float) 76.1905, (float) -23.8095 ),
- new CoordRec((float) 71.4285, (float) -28.5714 ),
- new CoordRec((float) 61.9047, (float) -33.3333 ),
- new CoordRec((float) 47.619, (float) -33.3333 ),
- new CoordRec((float) 38.0952, (float) -28.5714 ),
-};
-
-static final CoordRec char103_stroke1[] = {
- new CoordRec((float) 80.9524, (float) 52.381 ),
- new CoordRec((float) 71.4285, (float) 61.9048 ),
- new CoordRec((float) 61.9047, (float) 66.6667 ),
- new CoordRec((float) 47.619, (float) 66.6667 ),
- new CoordRec((float) 38.0952, (float) 61.9048 ),
- new CoordRec((float) 28.5714, (float) 52.381 ),
- new CoordRec((float) 23.8095, (float) 38.0952 ),
- new CoordRec((float) 23.8095, (float) 28.5714 ),
- new CoordRec((float) 28.5714, (float) 14.2857 ),
- new CoordRec((float) 38.0952, (float) 4.7619 ),
- new CoordRec((float) 47.619, (float) 0 ),
- new CoordRec((float) 61.9047, (float) 0 ),
- new CoordRec((float) 71.4285, (float) 4.7619 ),
- new CoordRec((float) 80.9524, (float) 14.2857 ),
-};
-
-static final StrokeRec char103[] = {
- new StrokeRec( 7, char103_stroke0 ),
- new StrokeRec( 14, char103_stroke1 ),
-};
-
-/* char: 104 'h' */
-
-static final CoordRec char104_stroke0[] = {
- new CoordRec((float) 26.1905, (float) 100 ),
- new CoordRec((float) 26.1905, (float) 0 ),
-};
-
-static final CoordRec char104_stroke1[] = {
- new CoordRec((float) 26.1905, (float) 47.619 ),
- new CoordRec((float) 40.4762, (float) 61.9048 ),
- new CoordRec((float) 50, (float) 66.6667 ),
- new CoordRec((float) 64.2857, (float) 66.6667 ),
- new CoordRec((float) 73.8095, (float) 61.9048 ),
- new CoordRec((float) 78.5715, (float) 47.619 ),
- new CoordRec((float) 78.5715, (float) 0 ),
-};
-
-static final StrokeRec char104[] = {
- new StrokeRec( 2, char104_stroke0 ),
- new StrokeRec( 7, char104_stroke1 ),
-};
-
-/* char: 105 'i' */
-
-static final CoordRec char105_stroke0[] = {
- new CoordRec((float) 47.6191, (float) 100 ),
- new CoordRec((float) 52.381, (float) 95.2381 ),
- new CoordRec((float) 57.1429, (float) 100 ),
- new CoordRec((float) 52.381, (float) 104.762 ),
- new CoordRec((float) 47.6191, (float) 100 ),
-};
-
-static final CoordRec char105_stroke1[] = {
- new CoordRec((float) 52.381, (float) 66.6667 ),
- new CoordRec((float) 52.381, (float) 0 ),
-};
-
-static final StrokeRec char105[] = {
- new StrokeRec( 5, char105_stroke0 ),
- new StrokeRec( 2, char105_stroke1 ),
-};
-
-/* char: 106 'j' */
-
-static final CoordRec char106_stroke0[] = {
- new CoordRec((float) 57.1429, (float) 100 ),
- new CoordRec((float) 61.9048, (float) 95.2381 ),
- new CoordRec((float) 66.6667, (float) 100 ),
- new CoordRec((float) 61.9048, (float) 104.762 ),
- new CoordRec((float) 57.1429, (float) 100 ),
-};
-
-static final CoordRec char106_stroke1[] = {
- new CoordRec((float) 61.9048, (float) 66.6667 ),
- new CoordRec((float) 61.9048, (float) -14.2857 ),
- new CoordRec((float) 57.1429, (float) -28.5714 ),
- new CoordRec((float) 47.6191, (float) -33.3333 ),
- new CoordRec((float) 38.0953, (float) -33.3333 ),
-};
-
-static final StrokeRec char106[] = {
- new StrokeRec( 5, char106_stroke0 ),
- new StrokeRec( 5, char106_stroke1 ),
-};
-
-/* char: 107 'k' */
-
-static final CoordRec char107_stroke0[] = {
- new CoordRec((float) 26.1905, (float) 100 ),
- new CoordRec((float) 26.1905, (float) 0 ),
-};
-
-static final CoordRec char107_stroke1[] = {
- new CoordRec((float) 73.8095, (float) 66.6667 ),
- new CoordRec((float) 26.1905, (float) 19.0476 ),
-};
-
-static final CoordRec char107_stroke2[] = {
- new CoordRec((float) 45.2381, (float) 38.0952 ),
- new CoordRec((float) 78.5715, (float) 0 ),
-};
-
-static final StrokeRec char107[] = {
- new StrokeRec( 2, char107_stroke0 ),
- new StrokeRec( 2, char107_stroke1 ),
- new StrokeRec( 2, char107_stroke2 ),
-};
-
-/* char: 108 'l' */
-
-static final CoordRec char108_stroke0[] = {
- new CoordRec((float) 52.381, (float) 100 ),
- new CoordRec((float) 52.381, (float) 0 ),
-};
-
-static final StrokeRec char108[] = {
- new StrokeRec( 2, char108_stroke0 ),
-};
-
-/* char: 109 'm' */
-
-static final CoordRec char109_stroke0[] = {
- new CoordRec((float) 0, (float) 66.6667 ),
- new CoordRec((float) 0, (float) 0 ),
-};
-
-static final CoordRec char109_stroke1[] = {
- new CoordRec((float) 0, (float) 47.619 ),
- new CoordRec((float) 14.2857, (float) 61.9048 ),
- new CoordRec((float) 23.8095, (float) 66.6667 ),
- new CoordRec((float) 38.0952, (float) 66.6667 ),
- new CoordRec((float) 47.619, (float) 61.9048 ),
- new CoordRec((float) 52.381, (float) 47.619 ),
- new CoordRec((float) 52.381, (float) 0 ),
-};
-
-static final CoordRec char109_stroke2[] = {
- new CoordRec((float) 52.381, (float) 47.619 ),
- new CoordRec((float) 66.6667, (float) 61.9048 ),
- new CoordRec((float) 76.1905, (float) 66.6667 ),
- new CoordRec((float) 90.4762, (float) 66.6667 ),
- new CoordRec((float) 100, (float) 61.9048 ),
- new CoordRec((float) 104.762, (float) 47.619 ),
- new CoordRec((float) 104.762, (float) 0 ),
-};
-
-static final StrokeRec char109[] = {
- new StrokeRec( 2, char109_stroke0 ),
- new StrokeRec( 7, char109_stroke1 ),
- new StrokeRec( 7, char109_stroke2 ),
-};
-
-/* char: 110 'n' */
-
-static final CoordRec char110_stroke0[] = {
- new CoordRec((float) 26.1905, (float) 66.6667 ),
- new CoordRec((float) 26.1905, (float) 0 ),
-};
-
-static final CoordRec char110_stroke1[] = {
- new CoordRec((float) 26.1905, (float) 47.619 ),
- new CoordRec((float) 40.4762, (float) 61.9048 ),
- new CoordRec((float) 50, (float) 66.6667 ),
- new CoordRec((float) 64.2857, (float) 66.6667 ),
- new CoordRec((float) 73.8095, (float) 61.9048 ),
- new CoordRec((float) 78.5715, (float) 47.619 ),
- new CoordRec((float) 78.5715, (float) 0 ),
-};
-
-static final StrokeRec char110[] = {
- new StrokeRec( 2, char110_stroke0 ),
- new StrokeRec( 7, char110_stroke1 ),
-};
-
-/* char: 111 'o' */
-
-static final CoordRec char111_stroke0[] = {
- new CoordRec((float) 45.2381, (float) 66.6667 ),
- new CoordRec((float) 35.7143, (float) 61.9048 ),
- new CoordRec((float) 26.1905, (float) 52.381 ),
- new CoordRec((float) 21.4286, (float) 38.0952 ),
- new CoordRec((float) 21.4286, (float) 28.5714 ),
- new CoordRec((float) 26.1905, (float) 14.2857 ),
- new CoordRec((float) 35.7143, (float) 4.7619 ),
- new CoordRec((float) 45.2381, (float) 0 ),
- new CoordRec((float) 59.5238, (float) 0 ),
- new CoordRec((float) 69.0476, (float) 4.7619 ),
- new CoordRec((float) 78.5714, (float) 14.2857 ),
- new CoordRec((float) 83.3334, (float) 28.5714 ),
- new CoordRec((float) 83.3334, (float) 38.0952 ),
- new CoordRec((float) 78.5714, (float) 52.381 ),
- new CoordRec((float) 69.0476, (float) 61.9048 ),
- new CoordRec((float) 59.5238, (float) 66.6667 ),
- new CoordRec((float) 45.2381, (float) 66.6667 ),
-};
-
-static final StrokeRec char111[] = {
- new StrokeRec( 17, char111_stroke0 ),
-};
-
-/* char: 112 'p' */
-
-static final CoordRec char112_stroke0[] = {
- new CoordRec((float) 23.8095, (float) 66.6667 ),
- new CoordRec((float) 23.8095, (float) -33.3333 ),
-};
-
-static final CoordRec char112_stroke1[] = {
- new CoordRec((float) 23.8095, (float) 52.381 ),
- new CoordRec((float) 33.3333, (float) 61.9048 ),
- new CoordRec((float) 42.8571, (float) 66.6667 ),
- new CoordRec((float) 57.1428, (float) 66.6667 ),
- new CoordRec((float) 66.6666, (float) 61.9048 ),
- new CoordRec((float) 76.1905, (float) 52.381 ),
- new CoordRec((float) 80.9524, (float) 38.0952 ),
- new CoordRec((float) 80.9524, (float) 28.5714 ),
- new CoordRec((float) 76.1905, (float) 14.2857 ),
- new CoordRec((float) 66.6666, (float) 4.7619 ),
- new CoordRec((float) 57.1428, (float) 0 ),
- new CoordRec((float) 42.8571, (float) 0 ),
- new CoordRec((float) 33.3333, (float) 4.7619 ),
- new CoordRec((float) 23.8095, (float) 14.2857 ),
-};
-
-static final StrokeRec char112[] = {
- new StrokeRec( 2, char112_stroke0 ),
- new StrokeRec( 14, char112_stroke1 ),
-};
-
-/* char: 113 'q' */
-
-static final CoordRec char113_stroke0[] = {
- new CoordRec((float) 80.9524, (float) 66.6667 ),
- new CoordRec((float) 80.9524, (float) -33.3333 ),
-};
-
-static final CoordRec char113_stroke1[] = {
- new CoordRec((float) 80.9524, (float) 52.381 ),
- new CoordRec((float) 71.4285, (float) 61.9048 ),
- new CoordRec((float) 61.9047, (float) 66.6667 ),
- new CoordRec((float) 47.619, (float) 66.6667 ),
- new CoordRec((float) 38.0952, (float) 61.9048 ),
- new CoordRec((float) 28.5714, (float) 52.381 ),
- new CoordRec((float) 23.8095, (float) 38.0952 ),
- new CoordRec((float) 23.8095, (float) 28.5714 ),
- new CoordRec((float) 28.5714, (float) 14.2857 ),
- new CoordRec((float) 38.0952, (float) 4.7619 ),
- new CoordRec((float) 47.619, (float) 0 ),
- new CoordRec((float) 61.9047, (float) 0 ),
- new CoordRec((float) 71.4285, (float) 4.7619 ),
- new CoordRec((float) 80.9524, (float) 14.2857 ),
-};
-
-static final StrokeRec char113[] = {
- new StrokeRec( 2, char113_stroke0 ),
- new StrokeRec( 14, char113_stroke1 ),
-};
-
-/* char: 114 'r' */
-
-static final CoordRec char114_stroke0[] = {
- new CoordRec((float) 33.3334, (float) 66.6667 ),
- new CoordRec((float) 33.3334, (float) 0 ),
-};
-
-static final CoordRec char114_stroke1[] = {
- new CoordRec((float) 33.3334, (float) 38.0952 ),
- new CoordRec((float) 38.0953, (float) 52.381 ),
- new CoordRec((float) 47.6191, (float) 61.9048 ),
- new CoordRec((float) 57.1429, (float) 66.6667 ),
- new CoordRec((float) 71.4286, (float) 66.6667 ),
-};
-
-static final StrokeRec char114[] = {
- new StrokeRec( 2, char114_stroke0 ),
- new StrokeRec( 5, char114_stroke1 ),
-};
-
-/* char: 115 's' */
-
-static final CoordRec char115_stroke0[] = {
- new CoordRec((float) 78.5715, (float) 52.381 ),
- new CoordRec((float) 73.8095, (float) 61.9048 ),
- new CoordRec((float) 59.5238, (float) 66.6667 ),
- new CoordRec((float) 45.2381, (float) 66.6667 ),
- new CoordRec((float) 30.9524, (float) 61.9048 ),
- new CoordRec((float) 26.1905, (float) 52.381 ),
- new CoordRec((float) 30.9524, (float) 42.8571 ),
- new CoordRec((float) 40.4762, (float) 38.0952 ),
- new CoordRec((float) 64.2857, (float) 33.3333 ),
- new CoordRec((float) 73.8095, (float) 28.5714 ),
- new CoordRec((float) 78.5715, (float) 19.0476 ),
- new CoordRec((float) 78.5715, (float) 14.2857 ),
- new CoordRec((float) 73.8095, (float) 4.7619 ),
- new CoordRec((float) 59.5238, (float) 0 ),
- new CoordRec((float) 45.2381, (float) 0 ),
- new CoordRec((float) 30.9524, (float) 4.7619 ),
- new CoordRec((float) 26.1905, (float) 14.2857 ),
-};
-
-static final StrokeRec char115[] = {
- new StrokeRec( 17, char115_stroke0 ),
-};
-
-/* char: 116 't' */
-
-static final CoordRec char116_stroke0[] = {
- new CoordRec((float) 47.6191, (float) 100 ),
- new CoordRec((float) 47.6191, (float) 19.0476 ),
- new CoordRec((float) 52.381, (float) 4.7619 ),
- new CoordRec((float) 61.9048, (float) 0 ),
- new CoordRec((float) 71.4286, (float) 0 ),
-};
-
-static final CoordRec char116_stroke1[] = {
- new CoordRec((float) 33.3334, (float) 66.6667 ),
- new CoordRec((float) 66.6667, (float) 66.6667 ),
-};
-
-static final StrokeRec char116[] = {
- new StrokeRec( 5, char116_stroke0 ),
- new StrokeRec( 2, char116_stroke1 ),
-};
-
-/* char: 117 'u' */
-
-static final CoordRec char117_stroke0[] = {
- new CoordRec((float) 26.1905, (float) 66.6667 ),
- new CoordRec((float) 26.1905, (float) 19.0476 ),
- new CoordRec((float) 30.9524, (float) 4.7619 ),
- new CoordRec((float) 40.4762, (float) 0 ),
- new CoordRec((float) 54.7619, (float) 0 ),
- new CoordRec((float) 64.2857, (float) 4.7619 ),
- new CoordRec((float) 78.5715, (float) 19.0476 ),
-};
-
-static final CoordRec char117_stroke1[] = {
- new CoordRec((float) 78.5715, (float) 66.6667 ),
- new CoordRec((float) 78.5715, (float) 0 ),
-};
-
-static final StrokeRec char117[] = {
- new StrokeRec( 7, char117_stroke0 ),
- new StrokeRec( 2, char117_stroke1 ),
-};
-
-/* char: 118 'v' */
-
-static final CoordRec char118_stroke0[] = {
- new CoordRec((float) 23.8095, (float) 66.6667 ),
- new CoordRec((float) 52.3809, (float) 0 ),
-};
-
-static final CoordRec char118_stroke1[] = {
- new CoordRec((float) 80.9524, (float) 66.6667 ),
- new CoordRec((float) 52.3809, (float) 0 ),
-};
-
-static final StrokeRec char118[] = {
- new StrokeRec( 2, char118_stroke0 ),
- new StrokeRec( 2, char118_stroke1 ),
-};
-
-/* char: 119 'w' */
-
-static final CoordRec char119_stroke0[] = {
- new CoordRec((float) 14.2857, (float) 66.6667 ),
- new CoordRec((float) 33.3333, (float) 0 ),
-};
-
-static final CoordRec char119_stroke1[] = {
- new CoordRec((float) 52.3809, (float) 66.6667 ),
- new CoordRec((float) 33.3333, (float) 0 ),
-};
-
-static final CoordRec char119_stroke2[] = {
- new CoordRec((float) 52.3809, (float) 66.6667 ),
- new CoordRec((float) 71.4286, (float) 0 ),
-};
-
-static final CoordRec char119_stroke3[] = {
- new CoordRec((float) 90.4762, (float) 66.6667 ),
- new CoordRec((float) 71.4286, (float) 0 ),
-};
-
-static final StrokeRec char119[] = {
- new StrokeRec( 2, char119_stroke0 ),
- new StrokeRec( 2, char119_stroke1 ),
- new StrokeRec( 2, char119_stroke2 ),
- new StrokeRec( 2, char119_stroke3 ),
-};
-
-/* char: 120 'x' */
-
-static final CoordRec char120_stroke0[] = {
- new CoordRec((float) 26.1905, (float) 66.6667 ),
- new CoordRec((float) 78.5715, (float) 0 ),
-};
-
-static final CoordRec char120_stroke1[] = {
- new CoordRec((float) 78.5715, (float) 66.6667 ),
- new CoordRec((float) 26.1905, (float) 0 ),
-};
-
-static final StrokeRec char120[] = {
- new StrokeRec( 2, char120_stroke0 ),
- new StrokeRec( 2, char120_stroke1 ),
-};
-
-/* char: 121 'y' */
-
-static final CoordRec char121_stroke0[] = {
- new CoordRec((float) 26.1905, (float) 66.6667 ),
- new CoordRec((float) 54.7619, (float) 0 ),
-};
-
-static final CoordRec char121_stroke1[] = {
- new CoordRec((float) 83.3334, (float) 66.6667 ),
- new CoordRec((float) 54.7619, (float) 0 ),
- new CoordRec((float) 45.2381, (float) -19.0476 ),
- new CoordRec((float) 35.7143, (float) -28.5714 ),
- new CoordRec((float) 26.1905, (float) -33.3333 ),
- new CoordRec((float) 21.4286, (float) -33.3333 ),
-};
-
-static final StrokeRec char121[] = {
- new StrokeRec( 2, char121_stroke0 ),
- new StrokeRec( 6, char121_stroke1 ),
-};
-
-/* char: 122 'z' */
-
-static final CoordRec char122_stroke0[] = {
- new CoordRec((float) 78.5715, (float) 66.6667 ),
- new CoordRec((float) 26.1905, (float) 0 ),
-};
-
-static final CoordRec char122_stroke1[] = {
- new CoordRec((float) 26.1905, (float) 66.6667 ),
- new CoordRec((float) 78.5715, (float) 66.6667 ),
-};
-
-static final CoordRec char122_stroke2[] = {
- new CoordRec((float) 26.1905, (float) 0 ),
- new CoordRec((float) 78.5715, (float) 0 ),
-};
-
-static final StrokeRec char122[] = {
- new StrokeRec( 2, char122_stroke0 ),
- new StrokeRec( 2, char122_stroke1 ),
- new StrokeRec( 2, char122_stroke2 ),
-};
-
-/* char: 123 '{' */
-
-static final CoordRec char123_stroke0[] = {
- new CoordRec((float) 64.2857, (float) 119.048 ),
- new CoordRec((float) 54.7619, (float) 114.286 ),
- new CoordRec((float) 50, (float) 109.524 ),
- new CoordRec((float) 45.2381, (float) 100 ),
- new CoordRec((float) 45.2381, (float) 90.4762 ),
- new CoordRec((float) 50, (float) 80.9524 ),
- new CoordRec((float) 54.7619, (float) 76.1905 ),
- new CoordRec((float) 59.5238, (float) 66.6667 ),
- new CoordRec((float) 59.5238, (float) 57.1429 ),
- new CoordRec((float) 50, (float) 47.619 ),
-};
-
-static final CoordRec char123_stroke1[] = {
- new CoordRec((float) 54.7619, (float) 114.286 ),
- new CoordRec((float) 50, (float) 104.762 ),
- new CoordRec((float) 50, (float) 95.2381 ),
- new CoordRec((float) 54.7619, (float) 85.7143 ),
- new CoordRec((float) 59.5238, (float) 80.9524 ),
- new CoordRec((float) 64.2857, (float) 71.4286 ),
- new CoordRec((float) 64.2857, (float) 61.9048 ),
- new CoordRec((float) 59.5238, (float) 52.381 ),
- new CoordRec((float) 40.4762, (float) 42.8571 ),
- new CoordRec((float) 59.5238, (float) 33.3333 ),
- new CoordRec((float) 64.2857, (float) 23.8095 ),
- new CoordRec((float) 64.2857, (float) 14.2857 ),
- new CoordRec((float) 59.5238, (float) 4.7619 ),
- new CoordRec((float) 54.7619, (float) 0 ),
- new CoordRec((float) 50, (float) -9.5238 ),
- new CoordRec((float) 50, (float) -19.0476 ),
- new CoordRec((float) 54.7619, (float) -28.5714 ),
-};
-
-static final CoordRec char123_stroke2[] = {
- new CoordRec((float) 50, (float) 38.0952 ),
- new CoordRec((float) 59.5238, (float) 28.5714 ),
- new CoordRec((float) 59.5238, (float) 19.0476 ),
- new CoordRec((float) 54.7619, (float) 9.5238 ),
- new CoordRec((float) 50, (float) 4.7619 ),
- new CoordRec((float) 45.2381, (float) -4.7619 ),
- new CoordRec((float) 45.2381, (float) -14.2857 ),
- new CoordRec((float) 50, (float) -23.8095 ),
- new CoordRec((float) 54.7619, (float) -28.5714 ),
- new CoordRec((float) 64.2857, (float) -33.3333 ),
-};
-
-static final StrokeRec char123[] = {
- new StrokeRec( 10, char123_stroke0 ),
- new StrokeRec( 17, char123_stroke1 ),
- new StrokeRec( 10, char123_stroke2 ),
-};
-
-/* char: 124 '|' */
-
-static final CoordRec char124_stroke0[] = {
- new CoordRec((float) 52.381, (float) 119.048 ),
- new CoordRec((float) 52.381, (float) -33.3333 ),
-};
-
-static final StrokeRec char124[] = {
- new StrokeRec( 2, char124_stroke0 ),
-};
-
-/* char: 125 '}' */
-
-static final CoordRec char125_stroke0[] = {
- new CoordRec((float) 40.4762, (float) 119.048 ),
- new CoordRec((float) 50, (float) 114.286 ),
- new CoordRec((float) 54.7619, (float) 109.524 ),
- new CoordRec((float) 59.5238, (float) 100 ),
- new CoordRec((float) 59.5238, (float) 90.4762 ),
- new CoordRec((float) 54.7619, (float) 80.9524 ),
- new CoordRec((float) 50, (float) 76.1905 ),
- new CoordRec((float) 45.2381, (float) 66.6667 ),
- new CoordRec((float) 45.2381, (float) 57.1429 ),
- new CoordRec((float) 54.7619, (float) 47.619 ),
-};
-
-static final CoordRec char125_stroke1[] = {
- new CoordRec((float) 50, (float) 114.286 ),
- new CoordRec((float) 54.7619, (float) 104.762 ),
- new CoordRec((float) 54.7619, (float) 95.2381 ),
- new CoordRec((float) 50, (float) 85.7143 ),
- new CoordRec((float) 45.2381, (float) 80.9524 ),
- new CoordRec((float) 40.4762, (float) 71.4286 ),
- new CoordRec((float) 40.4762, (float) 61.9048 ),
- new CoordRec((float) 45.2381, (float) 52.381 ),
- new CoordRec((float) 64.2857, (float) 42.8571 ),
- new CoordRec((float) 45.2381, (float) 33.3333 ),
- new CoordRec((float) 40.4762, (float) 23.8095 ),
- new CoordRec((float) 40.4762, (float) 14.2857 ),
- new CoordRec((float) 45.2381, (float) 4.7619 ),
- new CoordRec((float) 50, (float) 0 ),
- new CoordRec((float) 54.7619, (float) -9.5238 ),
- new CoordRec((float) 54.7619, (float) -19.0476 ),
- new CoordRec((float) 50, (float) -28.5714 ),
-};
-
-static final CoordRec char125_stroke2[] = {
- new CoordRec((float) 54.7619, (float) 38.0952 ),
- new CoordRec((float) 45.2381, (float) 28.5714 ),
- new CoordRec((float) 45.2381, (float) 19.0476 ),
- new CoordRec((float) 50, (float) 9.5238 ),
- new CoordRec((float) 54.7619, (float) 4.7619 ),
- new CoordRec((float) 59.5238, (float) -4.7619 ),
- new CoordRec((float) 59.5238, (float) -14.2857 ),
- new CoordRec((float) 54.7619, (float) -23.8095 ),
- new CoordRec((float) 50, (float) -28.5714 ),
- new CoordRec((float) 40.4762, (float) -33.3333 ),
-};
-
-static final StrokeRec char125[] = {
- new StrokeRec( 10, char125_stroke0 ),
- new StrokeRec( 17, char125_stroke1 ),
- new StrokeRec( 10, char125_stroke2 ),
-};
-
-/* char: 126 '~' */
-
-static final CoordRec char126_stroke0[] = {
- new CoordRec((float) 9.5238, (float) 28.5714 ),
- new CoordRec((float) 9.5238, (float) 38.0952 ),
- new CoordRec((float) 14.2857, (float) 52.381 ),
- new CoordRec((float) 23.8095, (float) 57.1429 ),
- new CoordRec((float) 33.3333, (float) 57.1429 ),
- new CoordRec((float) 42.8571, (float) 52.381 ),
- new CoordRec((float) 61.9048, (float) 38.0952 ),
- new CoordRec((float) 71.4286, (float) 33.3333 ),
- new CoordRec((float) 80.9524, (float) 33.3333 ),
- new CoordRec((float) 90.4762, (float) 38.0952 ),
- new CoordRec((float) 95.2381, (float) 47.619 ),
-};
-
-static final CoordRec char126_stroke1[] = {
- new CoordRec((float) 9.5238, (float) 38.0952 ),
- new CoordRec((float) 14.2857, (float) 47.619 ),
- new CoordRec((float) 23.8095, (float) 52.381 ),
- new CoordRec((float) 33.3333, (float) 52.381 ),
- new CoordRec((float) 42.8571, (float) 47.619 ),
- new CoordRec((float) 61.9048, (float) 33.3333 ),
- new CoordRec((float) 71.4286, (float) 28.5714 ),
- new CoordRec((float) 80.9524, (float) 28.5714 ),
- new CoordRec((float) 90.4762, (float) 33.3333 ),
- new CoordRec((float) 95.2381, (float) 47.619 ),
- new CoordRec((float) 95.2381, (float) 57.1429 ),
-};
-
-static final StrokeRec char126[] = {
- new StrokeRec( 11, char126_stroke0 ),
- new StrokeRec( 11, char126_stroke1 ),
-};
-
-/* char: 127 */
-
-static final CoordRec char127_stroke0[] = {
- new CoordRec((float) 71.4286, (float) 100 ),
- new CoordRec((float) 33.3333, (float) -33.3333 ),
-};
-
-static final CoordRec char127_stroke1[] = {
- new CoordRec((float) 47.619, (float) 66.6667 ),
- new CoordRec((float) 33.3333, (float) 61.9048 ),
- new CoordRec((float) 23.8095, (float) 52.381 ),
- new CoordRec((float) 19.0476, (float) 38.0952 ),
- new CoordRec((float) 19.0476, (float) 23.8095 ),
- new CoordRec((float) 23.8095, (float) 14.2857 ),
- new CoordRec((float) 33.3333, (float) 4.7619 ),
- new CoordRec((float) 47.619, (float) 0 ),
- new CoordRec((float) 57.1428, (float) 0 ),
- new CoordRec((float) 71.4286, (float) 4.7619 ),
- new CoordRec((float) 80.9524, (float) 14.2857 ),
- new CoordRec((float) 85.7143, (float) 28.5714 ),
- new CoordRec((float) 85.7143, (float) 42.8571 ),
- new CoordRec((float) 80.9524, (float) 52.381 ),
- new CoordRec((float) 71.4286, (float) 61.9048 ),
- new CoordRec((float) 57.1428, (float) 66.6667 ),
- new CoordRec((float) 47.619, (float) 66.6667 ),
-};
-
-static final StrokeRec char127[] = {
- new StrokeRec( 2, char127_stroke0 ),
- new StrokeRec( 17, char127_stroke1 ),
-};
-
-static final StrokeCharRec chars[] = {
- new StrokeCharRec(0, /* char0 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec(0, /* char1 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec(0, /* char2 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec(0, /* char3 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec(0, /* char4 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec(0, /* char5 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec(0, /* char6 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec(0, /* char7 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec(0, /* char8 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec(0, /* char9 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec(0, /* char10 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec(0, /* char11 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec(0, /* char12 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec(0, /* char13 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec(0, /* char14 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec(0, /* char15 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec(0, /* char16 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec(0, /* char17 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec(0, /* char18 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec(0, /* char19 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec(0, /* char20 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec(0, /* char21 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec(0, /* char22 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec(0, /* char23 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec(0, /* char24 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec(0, /* char25 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec(0, /* char26 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec(0, /* char27 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec(0, /* char28 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec(0, /* char29 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec(0, /* char30 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec(0, /* char31 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec(0, /* char32 */ null, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char33, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char34, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(4, char35, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(3, char36, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(3, char37, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(1, char38, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(1, char39, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(1, char40, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(1, char41, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(3, char42, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char43, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(1, char44, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(1, char45, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(1, char46, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(1, char47, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(1, char48, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(1, char49, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(1, char50, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(1, char51, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char52, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(1, char53, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(1, char54, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char55, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(1, char56, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(1, char57, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char58, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char59, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(1, char60, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char61, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(1, char62, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char63, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char64, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(3, char65, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(3, char66, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(1, char67, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char68, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(4, char69, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(3, char70, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char71, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(3, char72, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(1, char73, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(1, char74, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(3, char75, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char76, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(4, char77, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(3, char78, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(1, char79, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char80, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char81, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(3, char82, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(1, char83, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char84, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(1, char85, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char86, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(4, char87, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char88, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char89, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(3, char90, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(4, char91, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(1, char92, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(4, char93, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char94, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(1, char95, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char96, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char97, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char98, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(1, char99, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char100, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(1, char101, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char102, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char103, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char104, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char105, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char106, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(3, char107, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(1, char108, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(3, char109, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char110, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(1, char111, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char112, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char113, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char114, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(1, char115, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char116, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char117, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char118, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(4, char119, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char120, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char121, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(3, char122, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(3, char123, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(1, char124, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(3, char125, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char126, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec(2, char127, (float) 52.381, (float) 104.762 ),
-};
-
-public static final StrokeFontRec glutStrokeMonoRoman = new StrokeFontRec( "Roman", 128, chars, (float) 119.048, (float) -33.3333 );
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/gl2/GLUTStrokeRoman.java b/src/jogl/classes/com/sun/opengl/util/gl2/GLUTStrokeRoman.java
deleted file mode 100644
index e960f155a..000000000
--- a/src/jogl/classes/com/sun/opengl/util/gl2/GLUTStrokeRoman.java
+++ /dev/null
@@ -1,2491 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.util.gl2;
-
-class GLUTStrokeRoman {
-
-/* GENERATED FILE -- DO NOT MODIFY */
-
-/* char: 33 '!' */
-
-static final CoordRec char33_stroke0[] = {
- new CoordRec((float) 13.3819, (float) 100),
- new CoordRec((float) 13.3819, (float) 33.3333),
-};
-
-static final CoordRec char33_stroke1[] = {
- new CoordRec((float) 13.3819, (float) 9.5238),
- new CoordRec((float) 8.62, (float) 4.7619),
- new CoordRec((float) 13.3819, (float) 0),
- new CoordRec((float) 18.1438, (float) 4.7619),
- new CoordRec((float) 13.3819, (float) 9.5238),
-};
-
-static final StrokeRec char33[] = {
- new StrokeRec(2, char33_stroke0),
- new StrokeRec(5, char33_stroke1),
-};
-
-/* char: 34 '"' */
-
-static final CoordRec char34_stroke0[] = {
- new CoordRec((float) 4.02, (float) 100),
- new CoordRec((float) 4.02, (float) 66.6667),
-};
-
-static final CoordRec char34_stroke1[] = {
- new CoordRec((float) 42.1152, (float) 100),
- new CoordRec((float) 42.1152, (float) 66.6667),
-};
-
-static final StrokeRec char34[] = {
- new StrokeRec(2, char34_stroke0),
- new StrokeRec(2, char34_stroke1),
-};
-
-/* char: 35 '#' */
-
-static final CoordRec char35_stroke0[] = {
- new CoordRec((float) 41.2952, (float) 119.048),
- new CoordRec((float) 7.9619, (float) -33.3333),
-};
-
-static final CoordRec char35_stroke1[] = {
- new CoordRec((float) 69.8667, (float) 119.048),
- new CoordRec((float) 36.5333, (float) -33.3333),
-};
-
-static final CoordRec char35_stroke2[] = {
- new CoordRec((float) 7.9619, (float) 57.1429),
- new CoordRec((float) 74.6286, (float) 57.1429),
-};
-
-static final CoordRec char35_stroke3[] = {
- new CoordRec((float) 3.2, (float) 28.5714),
- new CoordRec((float) 69.8667, (float) 28.5714),
-};
-
-static final StrokeRec char35[] = {
- new StrokeRec(2, char35_stroke0),
- new StrokeRec(2, char35_stroke1),
- new StrokeRec(2, char35_stroke2),
- new StrokeRec(2, char35_stroke3),
-};
-
-/* char: 36 '$' */
-
-static final CoordRec char36_stroke0[] = {
- new CoordRec((float) 28.6295, (float) 119.048),
- new CoordRec((float) 28.6295, (float) -19.0476),
-};
-
-static final CoordRec char36_stroke1[] = {
- new CoordRec((float) 47.6771, (float) 119.048),
- new CoordRec((float) 47.6771, (float) -19.0476),
-};
-
-static final CoordRec char36_stroke2[] = {
- new CoordRec((float) 71.4867, (float) 85.7143),
- new CoordRec((float) 61.9629, (float) 95.2381),
- new CoordRec((float) 47.6771, (float) 100),
- new CoordRec((float) 28.6295, (float) 100),
- new CoordRec((float) 14.3438, (float) 95.2381),
- new CoordRec((float) 4.82, (float) 85.7143),
- new CoordRec((float) 4.82, (float) 76.1905),
- new CoordRec((float) 9.5819, (float) 66.6667),
- new CoordRec((float) 14.3438, (float) 61.9048),
- new CoordRec((float) 23.8676, (float) 57.1429),
- new CoordRec((float) 52.439, (float) 47.619),
- new CoordRec((float) 61.9629, (float) 42.8571),
- new CoordRec((float) 66.7248, (float) 38.0952),
- new CoordRec((float) 71.4867, (float) 28.5714),
- new CoordRec((float) 71.4867, (float) 14.2857),
- new CoordRec((float) 61.9629, (float) 4.7619),
- new CoordRec((float) 47.6771, (float) 0),
- new CoordRec((float) 28.6295, (float) 0),
- new CoordRec((float) 14.3438, (float) 4.7619),
- new CoordRec((float) 4.82, (float) 14.2857),
-};
-
-static final StrokeRec char36[] = {
- new StrokeRec(2, char36_stroke0),
- new StrokeRec(2, char36_stroke1),
- new StrokeRec(20, char36_stroke2),
-};
-
-/* char: 37 '%' */
-
-static final CoordRec char37_stroke0[] = {
- new CoordRec((float) 92.0743, (float) 100),
- new CoordRec((float) 6.36, (float) 0),
-};
-
-static final CoordRec char37_stroke1[] = {
- new CoordRec((float) 30.1695, (float) 100),
- new CoordRec((float) 39.6933, (float) 90.4762),
- new CoordRec((float) 39.6933, (float) 80.9524),
- new CoordRec((float) 34.9314, (float) 71.4286),
- new CoordRec((float) 25.4076, (float) 66.6667),
- new CoordRec((float) 15.8838, (float) 66.6667),
- new CoordRec((float) 6.36, (float) 76.1905),
- new CoordRec((float) 6.36, (float) 85.7143),
- new CoordRec((float) 11.1219, (float) 95.2381),
- new CoordRec((float) 20.6457, (float) 100),
- new CoordRec((float) 30.1695, (float) 100),
- new CoordRec((float) 39.6933, (float) 95.2381),
- new CoordRec((float) 53.979, (float) 90.4762),
- new CoordRec((float) 68.2648, (float) 90.4762),
- new CoordRec((float) 82.5505, (float) 95.2381),
- new CoordRec((float) 92.0743, (float) 100),
-};
-
-static final CoordRec char37_stroke2[] = {
- new CoordRec((float) 73.0267, (float) 33.3333),
- new CoordRec((float) 63.5029, (float) 28.5714),
- new CoordRec((float) 58.741, (float) 19.0476),
- new CoordRec((float) 58.741, (float) 9.5238),
- new CoordRec((float) 68.2648, (float) 0),
- new CoordRec((float) 77.7886, (float) 0),
- new CoordRec((float) 87.3124, (float) 4.7619),
- new CoordRec((float) 92.0743, (float) 14.2857),
- new CoordRec((float) 92.0743, (float) 23.8095),
- new CoordRec((float) 82.5505, (float) 33.3333),
- new CoordRec((float) 73.0267, (float) 33.3333),
-};
-
-static final StrokeRec char37[] = {
- new StrokeRec(2, char37_stroke0),
- new StrokeRec(16, char37_stroke1),
- new StrokeRec(11, char37_stroke2),
-};
-
-/* char: 38 '&' */
-
-static final CoordRec char38_stroke0[] = {
- new CoordRec((float) 101.218, (float) 57.1429),
- new CoordRec((float) 101.218, (float) 61.9048),
- new CoordRec((float) 96.4562, (float) 66.6667),
- new CoordRec((float) 91.6943, (float) 66.6667),
- new CoordRec((float) 86.9324, (float) 61.9048),
- new CoordRec((float) 82.1705, (float) 52.381),
- new CoordRec((float) 72.6467, (float) 28.5714),
- new CoordRec((float) 63.1229, (float) 14.2857),
- new CoordRec((float) 53.599, (float) 4.7619),
- new CoordRec((float) 44.0752, (float) 0),
- new CoordRec((float) 25.0276, (float) 0),
- new CoordRec((float) 15.5038, (float) 4.7619),
- new CoordRec((float) 10.7419, (float) 9.5238),
- new CoordRec((float) 5.98, (float) 19.0476),
- new CoordRec((float) 5.98, (float) 28.5714),
- new CoordRec((float) 10.7419, (float) 38.0952),
- new CoordRec((float) 15.5038, (float) 42.8571),
- new CoordRec((float) 48.8371, (float) 61.9048),
- new CoordRec((float) 53.599, (float) 66.6667),
- new CoordRec((float) 58.361, (float) 76.1905),
- new CoordRec((float) 58.361, (float) 85.7143),
- new CoordRec((float) 53.599, (float) 95.2381),
- new CoordRec((float) 44.0752, (float) 100),
- new CoordRec((float) 34.5514, (float) 95.2381),
- new CoordRec((float) 29.7895, (float) 85.7143),
- new CoordRec((float) 29.7895, (float) 76.1905),
- new CoordRec((float) 34.5514, (float) 61.9048),
- new CoordRec((float) 44.0752, (float) 47.619),
- new CoordRec((float) 67.8848, (float) 14.2857),
- new CoordRec((float) 77.4086, (float) 4.7619),
- new CoordRec((float) 86.9324, (float) 0),
- new CoordRec((float) 96.4562, (float) 0),
- new CoordRec((float) 101.218, (float) 4.7619),
- new CoordRec((float) 101.218, (float) 9.5238),
-};
-
-static final StrokeRec char38[] = {
- new StrokeRec(34, char38_stroke0),
-};
-
-/* char: 39 ''' */
-
-static final CoordRec char39_stroke0[] = {
- new CoordRec((float) 4.44, (float) 100),
- new CoordRec((float) 4.44, (float) 66.6667),
-};
-
-static final StrokeRec char39[] = {
- new StrokeRec(2, char39_stroke0),
-};
-
-/* char: 40 '(' */
-
-static final CoordRec char40_stroke0[] = {
- new CoordRec((float) 40.9133, (float) 119.048),
- new CoordRec((float) 31.3895, (float) 109.524),
- new CoordRec((float) 21.8657, (float) 95.2381),
- new CoordRec((float) 12.3419, (float) 76.1905),
- new CoordRec((float) 7.58, (float) 52.381),
- new CoordRec((float) 7.58, (float) 33.3333),
- new CoordRec((float) 12.3419, (float) 9.5238),
- new CoordRec((float) 21.8657, (float) -9.5238),
- new CoordRec((float) 31.3895, (float) -23.8095),
- new CoordRec((float) 40.9133, (float) -33.3333),
-};
-
-static final StrokeRec char40[] = {
- new StrokeRec(10, char40_stroke0),
-};
-
-/* char: 41 ')' */
-
-static final CoordRec char41_stroke0[] = {
- new CoordRec((float) 5.28, (float) 119.048),
- new CoordRec((float) 14.8038, (float) 109.524),
- new CoordRec((float) 24.3276, (float) 95.2381),
- new CoordRec((float) 33.8514, (float) 76.1905),
- new CoordRec((float) 38.6133, (float) 52.381),
- new CoordRec((float) 38.6133, (float) 33.3333),
- new CoordRec((float) 33.8514, (float) 9.5238),
- new CoordRec((float) 24.3276, (float) -9.5238),
- new CoordRec((float) 14.8038, (float) -23.8095),
- new CoordRec((float) 5.28, (float) -33.3333),
-};
-
-static final StrokeRec char41[] = {
- new StrokeRec(10, char41_stroke0),
-};
-
-/* char: 42 '*' */
-
-static final CoordRec char42_stroke0[] = {
- new CoordRec((float) 30.7695, (float) 71.4286),
- new CoordRec((float) 30.7695, (float) 14.2857),
-};
-
-static final CoordRec char42_stroke1[] = {
- new CoordRec((float) 6.96, (float) 57.1429),
- new CoordRec((float) 54.579, (float) 28.5714),
-};
-
-static final CoordRec char42_stroke2[] = {
- new CoordRec((float) 54.579, (float) 57.1429),
- new CoordRec((float) 6.96, (float) 28.5714),
-};
-
-static final StrokeRec char42[] = {
- new StrokeRec(2, char42_stroke0),
- new StrokeRec(2, char42_stroke1),
- new StrokeRec(2, char42_stroke2),
-};
-
-/* char: 43 '+' */
-
-static final CoordRec char43_stroke0[] = {
- new CoordRec((float) 48.8371, (float) 85.7143),
- new CoordRec((float) 48.8371, (float) 0),
-};
-
-static final CoordRec char43_stroke1[] = {
- new CoordRec((float) 5.98, (float) 42.8571),
- new CoordRec((float) 91.6943, (float) 42.8571),
-};
-
-static final StrokeRec char43[] = {
- new StrokeRec(2, char43_stroke0),
- new StrokeRec(2, char43_stroke1),
-};
-
-/* char: 44 ',' */
-
-static final CoordRec char44_stroke0[] = {
- new CoordRec((float) 18.2838, (float) 4.7619),
- new CoordRec((float) 13.5219, (float) 0),
- new CoordRec((float) 8.76, (float) 4.7619),
- new CoordRec((float) 13.5219, (float) 9.5238),
- new CoordRec((float) 18.2838, (float) 4.7619),
- new CoordRec((float) 18.2838, (float) -4.7619),
- new CoordRec((float) 13.5219, (float) -14.2857),
- new CoordRec((float) 8.76, (float) -19.0476),
-};
-
-static final StrokeRec char44[] = {
- new StrokeRec(8, char44_stroke0),
-};
-
-/* char: 45 '-' */
-
-static final CoordRec char45_stroke0[] = {
- new CoordRec((float) 7.38, (float) 42.8571),
- new CoordRec((float) 93.0943, (float) 42.8571),
-};
-
-static final StrokeRec char45[] = {
- new StrokeRec(2, char45_stroke0),
-};
-
-/* char: 46 '.' */
-
-static final CoordRec char46_stroke0[] = {
- new CoordRec((float) 13.1019, (float) 9.5238),
- new CoordRec((float) 8.34, (float) 4.7619),
- new CoordRec((float) 13.1019, (float) 0),
- new CoordRec((float) 17.8638, (float) 4.7619),
- new CoordRec((float) 13.1019, (float) 9.5238),
-};
-
-static final StrokeRec char46[] = {
- new StrokeRec(5, char46_stroke0),
-};
-
-/* char: 47 '/' */
-
-static final CoordRec char47_stroke0[] = {
- new CoordRec((float) 7.24, (float) -14.2857),
- new CoordRec((float) 73.9067, (float) 100),
-};
-
-static final StrokeRec char47[] = {
- new StrokeRec(2, char47_stroke0),
-};
-
-/* char: 48 '0' */
-
-static final CoordRec char48_stroke0[] = {
- new CoordRec((float) 33.5514, (float) 100),
- new CoordRec((float) 19.2657, (float) 95.2381),
- new CoordRec((float) 9.7419, (float) 80.9524),
- new CoordRec((float) 4.98, (float) 57.1429),
- new CoordRec((float) 4.98, (float) 42.8571),
- new CoordRec((float) 9.7419, (float) 19.0476),
- new CoordRec((float) 19.2657, (float) 4.7619),
- new CoordRec((float) 33.5514, (float) 0),
- new CoordRec((float) 43.0752, (float) 0),
- new CoordRec((float) 57.361, (float) 4.7619),
- new CoordRec((float) 66.8848, (float) 19.0476),
- new CoordRec((float) 71.6467, (float) 42.8571),
- new CoordRec((float) 71.6467, (float) 57.1429),
- new CoordRec((float) 66.8848, (float) 80.9524),
- new CoordRec((float) 57.361, (float) 95.2381),
- new CoordRec((float) 43.0752, (float) 100),
- new CoordRec((float) 33.5514, (float) 100),
-};
-
-static final StrokeRec char48[] = {
- new StrokeRec(17, char48_stroke0),
-};
-
-/* char: 49 '1' */
-
-static final CoordRec char49_stroke0[] = {
- new CoordRec((float) 11.82, (float) 80.9524),
- new CoordRec((float) 21.3438, (float) 85.7143),
- new CoordRec((float) 35.6295, (float) 100),
- new CoordRec((float) 35.6295, (float) 0),
-};
-
-static final StrokeRec char49[] = {
- new StrokeRec(4, char49_stroke0),
-};
-
-/* char: 50 '2' */
-
-static final CoordRec char50_stroke0[] = {
- new CoordRec((float) 10.1819, (float) 76.1905),
- new CoordRec((float) 10.1819, (float) 80.9524),
- new CoordRec((float) 14.9438, (float) 90.4762),
- new CoordRec((float) 19.7057, (float) 95.2381),
- new CoordRec((float) 29.2295, (float) 100),
- new CoordRec((float) 48.2771, (float) 100),
- new CoordRec((float) 57.801, (float) 95.2381),
- new CoordRec((float) 62.5629, (float) 90.4762),
- new CoordRec((float) 67.3248, (float) 80.9524),
- new CoordRec((float) 67.3248, (float) 71.4286),
- new CoordRec((float) 62.5629, (float) 61.9048),
- new CoordRec((float) 53.039, (float) 47.619),
- new CoordRec((float) 5.42, (float) 0),
- new CoordRec((float) 72.0867, (float) 0),
-};
-
-static final StrokeRec char50[] = {
- new StrokeRec(14, char50_stroke0),
-};
-
-/* char: 51 '3' */
-
-static final CoordRec char51_stroke0[] = {
- new CoordRec((float) 14.5238, (float) 100),
- new CoordRec((float) 66.9048, (float) 100),
- new CoordRec((float) 38.3333, (float) 61.9048),
- new CoordRec((float) 52.619, (float) 61.9048),
- new CoordRec((float) 62.1429, (float) 57.1429),
- new CoordRec((float) 66.9048, (float) 52.381),
- new CoordRec((float) 71.6667, (float) 38.0952),
- new CoordRec((float) 71.6667, (float) 28.5714),
- new CoordRec((float) 66.9048, (float) 14.2857),
- new CoordRec((float) 57.381, (float) 4.7619),
- new CoordRec((float) 43.0952, (float) 0),
- new CoordRec((float) 28.8095, (float) 0),
- new CoordRec((float) 14.5238, (float) 4.7619),
- new CoordRec((float) 9.7619, (float) 9.5238),
- new CoordRec((float) 5, (float) 19.0476),
-};
-
-static final StrokeRec char51[] = {
- new StrokeRec(15, char51_stroke0),
-};
-
-/* char: 52 '4' */
-
-static final CoordRec char52_stroke0[] = {
- new CoordRec((float) 51.499, (float) 100),
- new CoordRec((float) 3.88, (float) 33.3333),
- new CoordRec((float) 75.3086, (float) 33.3333),
-};
-
-static final CoordRec char52_stroke1[] = {
- new CoordRec((float) 51.499, (float) 100),
- new CoordRec((float) 51.499, (float) 0),
-};
-
-static final StrokeRec char52[] = {
- new StrokeRec(3, char52_stroke0),
- new StrokeRec(2, char52_stroke1),
-};
-
-/* char: 53 '5' */
-
-static final CoordRec char53_stroke0[] = {
- new CoordRec((float) 62.0029, (float) 100),
- new CoordRec((float) 14.3838, (float) 100),
- new CoordRec((float) 9.6219, (float) 57.1429),
- new CoordRec((float) 14.3838, (float) 61.9048),
- new CoordRec((float) 28.6695, (float) 66.6667),
- new CoordRec((float) 42.9552, (float) 66.6667),
- new CoordRec((float) 57.241, (float) 61.9048),
- new CoordRec((float) 66.7648, (float) 52.381),
- new CoordRec((float) 71.5267, (float) 38.0952),
- new CoordRec((float) 71.5267, (float) 28.5714),
- new CoordRec((float) 66.7648, (float) 14.2857),
- new CoordRec((float) 57.241, (float) 4.7619),
- new CoordRec((float) 42.9552, (float) 0),
- new CoordRec((float) 28.6695, (float) 0),
- new CoordRec((float) 14.3838, (float) 4.7619),
- new CoordRec((float) 9.6219, (float) 9.5238),
- new CoordRec((float) 4.86, (float) 19.0476),
-};
-
-static final StrokeRec char53[] = {
- new StrokeRec(17, char53_stroke0),
-};
-
-/* char: 54 '6' */
-
-static final CoordRec char54_stroke0[] = {
- new CoordRec((float) 62.7229, (float) 85.7143),
- new CoordRec((float) 57.961, (float) 95.2381),
- new CoordRec((float) 43.6752, (float) 100),
- new CoordRec((float) 34.1514, (float) 100),
- new CoordRec((float) 19.8657, (float) 95.2381),
- new CoordRec((float) 10.3419, (float) 80.9524),
- new CoordRec((float) 5.58, (float) 57.1429),
- new CoordRec((float) 5.58, (float) 33.3333),
- new CoordRec((float) 10.3419, (float) 14.2857),
- new CoordRec((float) 19.8657, (float) 4.7619),
- new CoordRec((float) 34.1514, (float) 0),
- new CoordRec((float) 38.9133, (float) 0),
- new CoordRec((float) 53.199, (float) 4.7619),
- new CoordRec((float) 62.7229, (float) 14.2857),
- new CoordRec((float) 67.4848, (float) 28.5714),
- new CoordRec((float) 67.4848, (float) 33.3333),
- new CoordRec((float) 62.7229, (float) 47.619),
- new CoordRec((float) 53.199, (float) 57.1429),
- new CoordRec((float) 38.9133, (float) 61.9048),
- new CoordRec((float) 34.1514, (float) 61.9048),
- new CoordRec((float) 19.8657, (float) 57.1429),
- new CoordRec((float) 10.3419, (float) 47.619),
- new CoordRec((float) 5.58, (float) 33.3333),
-};
-
-static final StrokeRec char54[] = {
- new StrokeRec(23, char54_stroke0),
-};
-
-/* char: 55 '7' */
-
-static final CoordRec char55_stroke0[] = {
- new CoordRec((float) 72.2267, (float) 100),
- new CoordRec((float) 24.6076, (float) 0),
-};
-
-static final CoordRec char55_stroke1[] = {
- new CoordRec((float) 5.56, (float) 100),
- new CoordRec((float) 72.2267, (float) 100),
-};
-
-static final StrokeRec char55[] = {
- new StrokeRec(2, char55_stroke0),
- new StrokeRec(2, char55_stroke1),
-};
-
-/* char: 56 '8' */
-
-static final CoordRec char56_stroke0[] = {
- new CoordRec((float) 29.4095, (float) 100),
- new CoordRec((float) 15.1238, (float) 95.2381),
- new CoordRec((float) 10.3619, (float) 85.7143),
- new CoordRec((float) 10.3619, (float) 76.1905),
- new CoordRec((float) 15.1238, (float) 66.6667),
- new CoordRec((float) 24.6476, (float) 61.9048),
- new CoordRec((float) 43.6952, (float) 57.1429),
- new CoordRec((float) 57.981, (float) 52.381),
- new CoordRec((float) 67.5048, (float) 42.8571),
- new CoordRec((float) 72.2667, (float) 33.3333),
- new CoordRec((float) 72.2667, (float) 19.0476),
- new CoordRec((float) 67.5048, (float) 9.5238),
- new CoordRec((float) 62.7429, (float) 4.7619),
- new CoordRec((float) 48.4571, (float) 0),
- new CoordRec((float) 29.4095, (float) 0),
- new CoordRec((float) 15.1238, (float) 4.7619),
- new CoordRec((float) 10.3619, (float) 9.5238),
- new CoordRec((float) 5.6, (float) 19.0476),
- new CoordRec((float) 5.6, (float) 33.3333),
- new CoordRec((float) 10.3619, (float) 42.8571),
- new CoordRec((float) 19.8857, (float) 52.381),
- new CoordRec((float) 34.1714, (float) 57.1429),
- new CoordRec((float) 53.219, (float) 61.9048),
- new CoordRec((float) 62.7429, (float) 66.6667),
- new CoordRec((float) 67.5048, (float) 76.1905),
- new CoordRec((float) 67.5048, (float) 85.7143),
- new CoordRec((float) 62.7429, (float) 95.2381),
- new CoordRec((float) 48.4571, (float) 100),
- new CoordRec((float) 29.4095, (float) 100),
-};
-
-static final StrokeRec char56[] = {
- new StrokeRec(29, char56_stroke0),
-};
-
-/* char: 57 '9' */
-
-static final CoordRec char57_stroke0[] = {
- new CoordRec((float) 68.5048, (float) 66.6667),
- new CoordRec((float) 63.7429, (float) 52.381),
- new CoordRec((float) 54.219, (float) 42.8571),
- new CoordRec((float) 39.9333, (float) 38.0952),
- new CoordRec((float) 35.1714, (float) 38.0952),
- new CoordRec((float) 20.8857, (float) 42.8571),
- new CoordRec((float) 11.3619, (float) 52.381),
- new CoordRec((float) 6.6, (float) 66.6667),
- new CoordRec((float) 6.6, (float) 71.4286),
- new CoordRec((float) 11.3619, (float) 85.7143),
- new CoordRec((float) 20.8857, (float) 95.2381),
- new CoordRec((float) 35.1714, (float) 100),
- new CoordRec((float) 39.9333, (float) 100),
- new CoordRec((float) 54.219, (float) 95.2381),
- new CoordRec((float) 63.7429, (float) 85.7143),
- new CoordRec((float) 68.5048, (float) 66.6667),
- new CoordRec((float) 68.5048, (float) 42.8571),
- new CoordRec((float) 63.7429, (float) 19.0476),
- new CoordRec((float) 54.219, (float) 4.7619),
- new CoordRec((float) 39.9333, (float) 0),
- new CoordRec((float) 30.4095, (float) 0),
- new CoordRec((float) 16.1238, (float) 4.7619),
- new CoordRec((float) 11.3619, (float) 14.2857),
-};
-
-static final StrokeRec char57[] = {
- new StrokeRec(23, char57_stroke0),
-};
-
-/* char: 58 ':' */
-
-static final CoordRec char58_stroke0[] = {
- new CoordRec((float) 14.0819, (float) 66.6667),
- new CoordRec((float) 9.32, (float) 61.9048),
- new CoordRec((float) 14.0819, (float) 57.1429),
- new CoordRec((float) 18.8438, (float) 61.9048),
- new CoordRec((float) 14.0819, (float) 66.6667),
-};
-
-static final CoordRec char58_stroke1[] = {
- new CoordRec((float) 14.0819, (float) 9.5238),
- new CoordRec((float) 9.32, (float) 4.7619),
- new CoordRec((float) 14.0819, (float) 0),
- new CoordRec((float) 18.8438, (float) 4.7619),
- new CoordRec((float) 14.0819, (float) 9.5238),
-};
-
-static final StrokeRec char58[] = {
- new StrokeRec(5, char58_stroke0),
- new StrokeRec(5, char58_stroke1),
-};
-
-/* char: 59 ';' */
-
-static final CoordRec char59_stroke0[] = {
- new CoordRec((float) 12.9619, (float) 66.6667),
- new CoordRec((float) 8.2, (float) 61.9048),
- new CoordRec((float) 12.9619, (float) 57.1429),
- new CoordRec((float) 17.7238, (float) 61.9048),
- new CoordRec((float) 12.9619, (float) 66.6667),
-};
-
-static final CoordRec char59_stroke1[] = {
- new CoordRec((float) 17.7238, (float) 4.7619),
- new CoordRec((float) 12.9619, (float) 0),
- new CoordRec((float) 8.2, (float) 4.7619),
- new CoordRec((float) 12.9619, (float) 9.5238),
- new CoordRec((float) 17.7238, (float) 4.7619),
- new CoordRec((float) 17.7238, (float) -4.7619),
- new CoordRec((float) 12.9619, (float) -14.2857),
- new CoordRec((float) 8.2, (float) -19.0476),
-};
-
-static final StrokeRec char59[] = {
- new StrokeRec(5, char59_stroke0),
- new StrokeRec(8, char59_stroke1),
-};
-
-/* char: 60 '<' */
-
-static final CoordRec char60_stroke0[] = {
- new CoordRec((float) 79.2505, (float) 85.7143),
- new CoordRec((float) 3.06, (float) 42.8571),
- new CoordRec((float) 79.2505, (float) 0),
-};
-
-static final StrokeRec char60[] = {
- new StrokeRec(3, char60_stroke0),
-};
-
-/* char: 61 '=' */
-
-static final CoordRec char61_stroke0[] = {
- new CoordRec((float) 5.7, (float) 57.1429),
- new CoordRec((float) 91.4143, (float) 57.1429),
-};
-
-static final CoordRec char61_stroke1[] = {
- new CoordRec((float) 5.7, (float) 28.5714),
- new CoordRec((float) 91.4143, (float) 28.5714),
-};
-
-static final StrokeRec char61[] = {
- new StrokeRec(2, char61_stroke0),
- new StrokeRec(2, char61_stroke1),
-};
-
-/* char: 62 '>' */
-
-static final CoordRec char62_stroke0[] = {
- new CoordRec((float) 2.78, (float) 85.7143),
- new CoordRec((float) 78.9705, (float) 42.8571),
- new CoordRec((float) 2.78, (float) 0),
-};
-
-static final StrokeRec char62[] = {
- new StrokeRec(3, char62_stroke0),
-};
-
-/* char: 63 '?' */
-
-static final CoordRec char63_stroke0[] = {
- new CoordRec((float) 8.42, (float) 76.1905),
- new CoordRec((float) 8.42, (float) 80.9524),
- new CoordRec((float) 13.1819, (float) 90.4762),
- new CoordRec((float) 17.9438, (float) 95.2381),
- new CoordRec((float) 27.4676, (float) 100),
- new CoordRec((float) 46.5152, (float) 100),
- new CoordRec((float) 56.039, (float) 95.2381),
- new CoordRec((float) 60.801, (float) 90.4762),
- new CoordRec((float) 65.5629, (float) 80.9524),
- new CoordRec((float) 65.5629, (float) 71.4286),
- new CoordRec((float) 60.801, (float) 61.9048),
- new CoordRec((float) 56.039, (float) 57.1429),
- new CoordRec((float) 36.9914, (float) 47.619),
- new CoordRec((float) 36.9914, (float) 33.3333),
-};
-
-static final CoordRec char63_stroke1[] = {
- new CoordRec((float) 36.9914, (float) 9.5238),
- new CoordRec((float) 32.2295, (float) 4.7619),
- new CoordRec((float) 36.9914, (float) 0),
- new CoordRec((float) 41.7533, (float) 4.7619),
- new CoordRec((float) 36.9914, (float) 9.5238),
-};
-
-static final StrokeRec char63[] = {
- new StrokeRec(14, char63_stroke0),
- new StrokeRec(5, char63_stroke1),
-};
-
-/* char: 64 '@' */
-
-static final CoordRec char64_stroke0[] = {
- new CoordRec((float) 49.2171, (float) 52.381),
- new CoordRec((float) 39.6933, (float) 57.1429),
- new CoordRec((float) 30.1695, (float) 57.1429),
- new CoordRec((float) 25.4076, (float) 47.619),
- new CoordRec((float) 25.4076, (float) 42.8571),
- new CoordRec((float) 30.1695, (float) 33.3333),
- new CoordRec((float) 39.6933, (float) 33.3333),
- new CoordRec((float) 49.2171, (float) 38.0952),
-};
-
-static final CoordRec char64_stroke1[] = {
- new CoordRec((float) 49.2171, (float) 57.1429),
- new CoordRec((float) 49.2171, (float) 38.0952),
- new CoordRec((float) 53.979, (float) 33.3333),
- new CoordRec((float) 63.5029, (float) 33.3333),
- new CoordRec((float) 68.2648, (float) 42.8571),
- new CoordRec((float) 68.2648, (float) 47.619),
- new CoordRec((float) 63.5029, (float) 61.9048),
- new CoordRec((float) 53.979, (float) 71.4286),
- new CoordRec((float) 39.6933, (float) 76.1905),
- new CoordRec((float) 34.9314, (float) 76.1905),
- new CoordRec((float) 20.6457, (float) 71.4286),
- new CoordRec((float) 11.1219, (float) 61.9048),
- new CoordRec((float) 6.36, (float) 47.619),
- new CoordRec((float) 6.36, (float) 42.8571),
- new CoordRec((float) 11.1219, (float) 28.5714),
- new CoordRec((float) 20.6457, (float) 19.0476),
- new CoordRec((float) 34.9314, (float) 14.2857),
- new CoordRec((float) 39.6933, (float) 14.2857),
- new CoordRec((float) 53.979, (float) 19.0476),
-};
-
-static final StrokeRec char64[] = {
- new StrokeRec(8, char64_stroke0),
- new StrokeRec(19, char64_stroke1),
-};
-
-/* char: 65 'A' */
-
-static final CoordRec char65_stroke0[] = {
- new CoordRec((float) 40.5952, (float) 100),
- new CoordRec((float) 2.5, (float) 0),
-};
-
-static final CoordRec char65_stroke1[] = {
- new CoordRec((float) 40.5952, (float) 100),
- new CoordRec((float) 78.6905, (float) 0),
-};
-
-static final CoordRec char65_stroke2[] = {
- new CoordRec((float) 16.7857, (float) 33.3333),
- new CoordRec((float) 64.4048, (float) 33.3333),
-};
-
-static final StrokeRec char65[] = {
- new StrokeRec(2, char65_stroke0),
- new StrokeRec(2, char65_stroke1),
- new StrokeRec(2, char65_stroke2),
-};
-
-/* char: 66 'B' */
-
-static final CoordRec char66_stroke0[] = {
- new CoordRec((float) 11.42, (float) 100),
- new CoordRec((float) 11.42, (float) 0),
-};
-
-static final CoordRec char66_stroke1[] = {
- new CoordRec((float) 11.42, (float) 100),
- new CoordRec((float) 54.2771, (float) 100),
- new CoordRec((float) 68.5629, (float) 95.2381),
- new CoordRec((float) 73.3248, (float) 90.4762),
- new CoordRec((float) 78.0867, (float) 80.9524),
- new CoordRec((float) 78.0867, (float) 71.4286),
- new CoordRec((float) 73.3248, (float) 61.9048),
- new CoordRec((float) 68.5629, (float) 57.1429),
- new CoordRec((float) 54.2771, (float) 52.381),
-};
-
-static final CoordRec char66_stroke2[] = {
- new CoordRec((float) 11.42, (float) 52.381),
- new CoordRec((float) 54.2771, (float) 52.381),
- new CoordRec((float) 68.5629, (float) 47.619),
- new CoordRec((float) 73.3248, (float) 42.8571),
- new CoordRec((float) 78.0867, (float) 33.3333),
- new CoordRec((float) 78.0867, (float) 19.0476),
- new CoordRec((float) 73.3248, (float) 9.5238),
- new CoordRec((float) 68.5629, (float) 4.7619),
- new CoordRec((float) 54.2771, (float) 0),
- new CoordRec((float) 11.42, (float) 0),
-};
-
-static final StrokeRec char66[] = {
- new StrokeRec(2, char66_stroke0),
- new StrokeRec(9, char66_stroke1),
- new StrokeRec(10, char66_stroke2),
-};
-
-/* char: 67 'C' */
-
-static final CoordRec char67_stroke0[] = {
- new CoordRec((float) 78.0886, (float) 76.1905),
- new CoordRec((float) 73.3267, (float) 85.7143),
- new CoordRec((float) 63.8029, (float) 95.2381),
- new CoordRec((float) 54.279, (float) 100),
- new CoordRec((float) 35.2314, (float) 100),
- new CoordRec((float) 25.7076, (float) 95.2381),
- new CoordRec((float) 16.1838, (float) 85.7143),
- new CoordRec((float) 11.4219, (float) 76.1905),
- new CoordRec((float) 6.66, (float) 61.9048),
- new CoordRec((float) 6.66, (float) 38.0952),
- new CoordRec((float) 11.4219, (float) 23.8095),
- new CoordRec((float) 16.1838, (float) 14.2857),
- new CoordRec((float) 25.7076, (float) 4.7619),
- new CoordRec((float) 35.2314, (float) 0),
- new CoordRec((float) 54.279, (float) 0),
- new CoordRec((float) 63.8029, (float) 4.7619),
- new CoordRec((float) 73.3267, (float) 14.2857),
- new CoordRec((float) 78.0886, (float) 23.8095),
-};
-
-static final StrokeRec char67[] = {
- new StrokeRec(18, char67_stroke0),
-};
-
-/* char: 68 'D' */
-
-static final CoordRec char68_stroke0[] = {
- new CoordRec((float) 11.96, (float) 100),
- new CoordRec((float) 11.96, (float) 0),
-};
-
-static final CoordRec char68_stroke1[] = {
- new CoordRec((float) 11.96, (float) 100),
- new CoordRec((float) 45.2933, (float) 100),
- new CoordRec((float) 59.579, (float) 95.2381),
- new CoordRec((float) 69.1029, (float) 85.7143),
- new CoordRec((float) 73.8648, (float) 76.1905),
- new CoordRec((float) 78.6267, (float) 61.9048),
- new CoordRec((float) 78.6267, (float) 38.0952),
- new CoordRec((float) 73.8648, (float) 23.8095),
- new CoordRec((float) 69.1029, (float) 14.2857),
- new CoordRec((float) 59.579, (float) 4.7619),
- new CoordRec((float) 45.2933, (float) 0),
- new CoordRec((float) 11.96, (float) 0),
-};
-
-static final StrokeRec char68[] = {
- new StrokeRec(2, char68_stroke0),
- new StrokeRec(12, char68_stroke1),
-};
-
-/* char: 69 'E' */
-
-static final CoordRec char69_stroke0[] = {
- new CoordRec((float) 11.42, (float) 100),
- new CoordRec((float) 11.42, (float) 0),
-};
-
-static final CoordRec char69_stroke1[] = {
- new CoordRec((float) 11.42, (float) 100),
- new CoordRec((float) 73.3248, (float) 100),
-};
-
-static final CoordRec char69_stroke2[] = {
- new CoordRec((float) 11.42, (float) 52.381),
- new CoordRec((float) 49.5152, (float) 52.381),
-};
-
-static final CoordRec char69_stroke3[] = {
- new CoordRec((float) 11.42, (float) 0),
- new CoordRec((float) 73.3248, (float) 0),
-};
-
-static final StrokeRec char69[] = {
- new StrokeRec(2, char69_stroke0),
- new StrokeRec(2, char69_stroke1),
- new StrokeRec(2, char69_stroke2),
- new StrokeRec(2, char69_stroke3),
-};
-
-/* char: 70 'F' */
-
-static final CoordRec char70_stroke0[] = {
- new CoordRec((float) 11.42, (float) 100),
- new CoordRec((float) 11.42, (float) 0),
-};
-
-static final CoordRec char70_stroke1[] = {
- new CoordRec((float) 11.42, (float) 100),
- new CoordRec((float) 73.3248, (float) 100),
-};
-
-static final CoordRec char70_stroke2[] = {
- new CoordRec((float) 11.42, (float) 52.381),
- new CoordRec((float) 49.5152, (float) 52.381),
-};
-
-static final StrokeRec char70[] = {
- new StrokeRec(2, char70_stroke0),
- new StrokeRec(2, char70_stroke1),
- new StrokeRec(2, char70_stroke2),
-};
-
-/* char: 71 'G' */
-
-static final CoordRec char71_stroke0[] = {
- new CoordRec((float) 78.4886, (float) 76.1905),
- new CoordRec((float) 73.7267, (float) 85.7143),
- new CoordRec((float) 64.2029, (float) 95.2381),
- new CoordRec((float) 54.679, (float) 100),
- new CoordRec((float) 35.6314, (float) 100),
- new CoordRec((float) 26.1076, (float) 95.2381),
- new CoordRec((float) 16.5838, (float) 85.7143),
- new CoordRec((float) 11.8219, (float) 76.1905),
- new CoordRec((float) 7.06, (float) 61.9048),
- new CoordRec((float) 7.06, (float) 38.0952),
- new CoordRec((float) 11.8219, (float) 23.8095),
- new CoordRec((float) 16.5838, (float) 14.2857),
- new CoordRec((float) 26.1076, (float) 4.7619),
- new CoordRec((float) 35.6314, (float) 0),
- new CoordRec((float) 54.679, (float) 0),
- new CoordRec((float) 64.2029, (float) 4.7619),
- new CoordRec((float) 73.7267, (float) 14.2857),
- new CoordRec((float) 78.4886, (float) 23.8095),
- new CoordRec((float) 78.4886, (float) 38.0952),
-};
-
-static final CoordRec char71_stroke1[] = {
- new CoordRec((float) 54.679, (float) 38.0952),
- new CoordRec((float) 78.4886, (float) 38.0952),
-};
-
-static final StrokeRec char71[] = {
- new StrokeRec(19, char71_stroke0),
- new StrokeRec(2, char71_stroke1),
-};
-
-/* char: 72 'H' */
-
-static final CoordRec char72_stroke0[] = {
- new CoordRec((float) 11.42, (float) 100),
- new CoordRec((float) 11.42, (float) 0),
-};
-
-static final CoordRec char72_stroke1[] = {
- new CoordRec((float) 78.0867, (float) 100),
- new CoordRec((float) 78.0867, (float) 0),
-};
-
-static final CoordRec char72_stroke2[] = {
- new CoordRec((float) 11.42, (float) 52.381),
- new CoordRec((float) 78.0867, (float) 52.381),
-};
-
-static final StrokeRec char72[] = {
- new StrokeRec(2, char72_stroke0),
- new StrokeRec(2, char72_stroke1),
- new StrokeRec(2, char72_stroke2),
-};
-
-/* char: 73 'I' */
-
-static final CoordRec char73_stroke0[] = {
- new CoordRec((float) 10.86, (float) 100),
- new CoordRec((float) 10.86, (float) 0),
-};
-
-static final StrokeRec char73[] = {
- new StrokeRec(2, char73_stroke0),
-};
-
-/* char: 74 'J' */
-
-static final CoordRec char74_stroke0[] = {
- new CoordRec((float) 50.119, (float) 100),
- new CoordRec((float) 50.119, (float) 23.8095),
- new CoordRec((float) 45.3571, (float) 9.5238),
- new CoordRec((float) 40.5952, (float) 4.7619),
- new CoordRec((float) 31.0714, (float) 0),
- new CoordRec((float) 21.5476, (float) 0),
- new CoordRec((float) 12.0238, (float) 4.7619),
- new CoordRec((float) 7.2619, (float) 9.5238),
- new CoordRec((float) 2.5, (float) 23.8095),
- new CoordRec((float) 2.5, (float) 33.3333),
-};
-
-static final StrokeRec char74[] = {
- new StrokeRec(10, char74_stroke0),
-};
-
-/* char: 75 'K' */
-
-static final CoordRec char75_stroke0[] = {
- new CoordRec((float) 11.28, (float) 100),
- new CoordRec((float) 11.28, (float) 0),
-};
-
-static final CoordRec char75_stroke1[] = {
- new CoordRec((float) 77.9467, (float) 100),
- new CoordRec((float) 11.28, (float) 33.3333),
-};
-
-static final CoordRec char75_stroke2[] = {
- new CoordRec((float) 35.0895, (float) 57.1429),
- new CoordRec((float) 77.9467, (float) 0),
-};
-
-static final StrokeRec char75[] = {
- new StrokeRec(2, char75_stroke0),
- new StrokeRec(2, char75_stroke1),
- new StrokeRec(2, char75_stroke2),
-};
-
-/* char: 76 'L' */
-
-static final CoordRec char76_stroke0[] = {
- new CoordRec((float) 11.68, (float) 100),
- new CoordRec((float) 11.68, (float) 0),
-};
-
-static final CoordRec char76_stroke1[] = {
- new CoordRec((float) 11.68, (float) 0),
- new CoordRec((float) 68.8229, (float) 0),
-};
-
-static final StrokeRec char76[] = {
- new StrokeRec(2, char76_stroke0),
- new StrokeRec(2, char76_stroke1),
-};
-
-/* char: 77 'M' */
-
-static final CoordRec char77_stroke0[] = {
- new CoordRec((float) 10.86, (float) 100),
- new CoordRec((float) 10.86, (float) 0),
-};
-
-static final CoordRec char77_stroke1[] = {
- new CoordRec((float) 10.86, (float) 100),
- new CoordRec((float) 48.9552, (float) 0),
-};
-
-static final CoordRec char77_stroke2[] = {
- new CoordRec((float) 87.0505, (float) 100),
- new CoordRec((float) 48.9552, (float) 0),
-};
-
-static final CoordRec char77_stroke3[] = {
- new CoordRec((float) 87.0505, (float) 100),
- new CoordRec((float) 87.0505, (float) 0),
-};
-
-static final StrokeRec char77[] = {
- new StrokeRec(2, char77_stroke0),
- new StrokeRec(2, char77_stroke1),
- new StrokeRec(2, char77_stroke2),
- new StrokeRec(2, char77_stroke3),
-};
-
-/* char: 78 'N' */
-
-static final CoordRec char78_stroke0[] = {
- new CoordRec((float) 11.14, (float) 100),
- new CoordRec((float) 11.14, (float) 0),
-};
-
-static final CoordRec char78_stroke1[] = {
- new CoordRec((float) 11.14, (float) 100),
- new CoordRec((float) 77.8067, (float) 0),
-};
-
-static final CoordRec char78_stroke2[] = {
- new CoordRec((float) 77.8067, (float) 100),
- new CoordRec((float) 77.8067, (float) 0),
-};
-
-static final StrokeRec char78[] = {
- new StrokeRec(2, char78_stroke0),
- new StrokeRec(2, char78_stroke1),
- new StrokeRec(2, char78_stroke2),
-};
-
-/* char: 79 'O' */
-
-static final CoordRec char79_stroke0[] = {
- new CoordRec((float) 34.8114, (float) 100),
- new CoordRec((float) 25.2876, (float) 95.2381),
- new CoordRec((float) 15.7638, (float) 85.7143),
- new CoordRec((float) 11.0019, (float) 76.1905),
- new CoordRec((float) 6.24, (float) 61.9048),
- new CoordRec((float) 6.24, (float) 38.0952),
- new CoordRec((float) 11.0019, (float) 23.8095),
- new CoordRec((float) 15.7638, (float) 14.2857),
- new CoordRec((float) 25.2876, (float) 4.7619),
- new CoordRec((float) 34.8114, (float) 0),
- new CoordRec((float) 53.859, (float) 0),
- new CoordRec((float) 63.3829, (float) 4.7619),
- new CoordRec((float) 72.9067, (float) 14.2857),
- new CoordRec((float) 77.6686, (float) 23.8095),
- new CoordRec((float) 82.4305, (float) 38.0952),
- new CoordRec((float) 82.4305, (float) 61.9048),
- new CoordRec((float) 77.6686, (float) 76.1905),
- new CoordRec((float) 72.9067, (float) 85.7143),
- new CoordRec((float) 63.3829, (float) 95.2381),
- new CoordRec((float) 53.859, (float) 100),
- new CoordRec((float) 34.8114, (float) 100),
-};
-
-static final StrokeRec char79[] = {
- new StrokeRec(21, char79_stroke0),
-};
-
-/* char: 80 'P' */
-
-static final CoordRec char80_stroke0[] = {
- new CoordRec((float) 12.1, (float) 100),
- new CoordRec((float) 12.1, (float) 0),
-};
-
-static final CoordRec char80_stroke1[] = {
- new CoordRec((float) 12.1, (float) 100),
- new CoordRec((float) 54.9571, (float) 100),
- new CoordRec((float) 69.2429, (float) 95.2381),
- new CoordRec((float) 74.0048, (float) 90.4762),
- new CoordRec((float) 78.7667, (float) 80.9524),
- new CoordRec((float) 78.7667, (float) 66.6667),
- new CoordRec((float) 74.0048, (float) 57.1429),
- new CoordRec((float) 69.2429, (float) 52.381),
- new CoordRec((float) 54.9571, (float) 47.619),
- new CoordRec((float) 12.1, (float) 47.619),
-};
-
-static final StrokeRec char80[] = {
- new StrokeRec(2, char80_stroke0),
- new StrokeRec(10, char80_stroke1),
-};
-
-/* char: 81 'Q' */
-
-static final CoordRec char81_stroke0[] = {
- new CoordRec((float) 33.8714, (float) 100),
- new CoordRec((float) 24.3476, (float) 95.2381),
- new CoordRec((float) 14.8238, (float) 85.7143),
- new CoordRec((float) 10.0619, (float) 76.1905),
- new CoordRec((float) 5.3, (float) 61.9048),
- new CoordRec((float) 5.3, (float) 38.0952),
- new CoordRec((float) 10.0619, (float) 23.8095),
- new CoordRec((float) 14.8238, (float) 14.2857),
- new CoordRec((float) 24.3476, (float) 4.7619),
- new CoordRec((float) 33.8714, (float) 0),
- new CoordRec((float) 52.919, (float) 0),
- new CoordRec((float) 62.4429, (float) 4.7619),
- new CoordRec((float) 71.9667, (float) 14.2857),
- new CoordRec((float) 76.7286, (float) 23.8095),
- new CoordRec((float) 81.4905, (float) 38.0952),
- new CoordRec((float) 81.4905, (float) 61.9048),
- new CoordRec((float) 76.7286, (float) 76.1905),
- new CoordRec((float) 71.9667, (float) 85.7143),
- new CoordRec((float) 62.4429, (float) 95.2381),
- new CoordRec((float) 52.919, (float) 100),
- new CoordRec((float) 33.8714, (float) 100),
-};
-
-static final CoordRec char81_stroke1[] = {
- new CoordRec((float) 48.1571, (float) 19.0476),
- new CoordRec((float) 76.7286, (float) -9.5238),
-};
-
-static final StrokeRec char81[] = {
- new StrokeRec(21, char81_stroke0),
- new StrokeRec(2, char81_stroke1),
-};
-
-/* char: 82 'R' */
-
-static final CoordRec char82_stroke0[] = {
- new CoordRec((float) 11.68, (float) 100),
- new CoordRec((float) 11.68, (float) 0),
-};
-
-static final CoordRec char82_stroke1[] = {
- new CoordRec((float) 11.68, (float) 100),
- new CoordRec((float) 54.5371, (float) 100),
- new CoordRec((float) 68.8229, (float) 95.2381),
- new CoordRec((float) 73.5848, (float) 90.4762),
- new CoordRec((float) 78.3467, (float) 80.9524),
- new CoordRec((float) 78.3467, (float) 71.4286),
- new CoordRec((float) 73.5848, (float) 61.9048),
- new CoordRec((float) 68.8229, (float) 57.1429),
- new CoordRec((float) 54.5371, (float) 52.381),
- new CoordRec((float) 11.68, (float) 52.381),
-};
-
-static final CoordRec char82_stroke2[] = {
- new CoordRec((float) 45.0133, (float) 52.381),
- new CoordRec((float) 78.3467, (float) 0),
-};
-
-static final StrokeRec char82[] = {
- new StrokeRec(2, char82_stroke0),
- new StrokeRec(10, char82_stroke1),
- new StrokeRec(2, char82_stroke2),
-};
-
-/* char: 83 'S' */
-
-static final CoordRec char83_stroke0[] = {
- new CoordRec((float) 74.6667, (float) 85.7143),
- new CoordRec((float) 65.1429, (float) 95.2381),
- new CoordRec((float) 50.8571, (float) 100),
- new CoordRec((float) 31.8095, (float) 100),
- new CoordRec((float) 17.5238, (float) 95.2381),
- new CoordRec((float) 8, (float) 85.7143),
- new CoordRec((float) 8, (float) 76.1905),
- new CoordRec((float) 12.7619, (float) 66.6667),
- new CoordRec((float) 17.5238, (float) 61.9048),
- new CoordRec((float) 27.0476, (float) 57.1429),
- new CoordRec((float) 55.619, (float) 47.619),
- new CoordRec((float) 65.1429, (float) 42.8571),
- new CoordRec((float) 69.9048, (float) 38.0952),
- new CoordRec((float) 74.6667, (float) 28.5714),
- new CoordRec((float) 74.6667, (float) 14.2857),
- new CoordRec((float) 65.1429, (float) 4.7619),
- new CoordRec((float) 50.8571, (float) 0),
- new CoordRec((float) 31.8095, (float) 0),
- new CoordRec((float) 17.5238, (float) 4.7619),
- new CoordRec((float) 8, (float) 14.2857),
-};
-
-static final StrokeRec char83[] = {
- new StrokeRec(20, char83_stroke0),
-};
-
-/* char: 84 'T' */
-
-static final CoordRec char84_stroke0[] = {
- new CoordRec((float) 35.6933, (float) 100),
- new CoordRec((float) 35.6933, (float) 0),
-};
-
-static final CoordRec char84_stroke1[] = {
- new CoordRec((float) 2.36, (float) 100),
- new CoordRec((float) 69.0267, (float) 100),
-};
-
-static final StrokeRec char84[] = {
- new StrokeRec(2, char84_stroke0),
- new StrokeRec(2, char84_stroke1),
-};
-
-/* char: 85 'U' */
-
-static final CoordRec char85_stroke0[] = {
- new CoordRec((float) 11.54, (float) 100),
- new CoordRec((float) 11.54, (float) 28.5714),
- new CoordRec((float) 16.3019, (float) 14.2857),
- new CoordRec((float) 25.8257, (float) 4.7619),
- new CoordRec((float) 40.1114, (float) 0),
- new CoordRec((float) 49.6352, (float) 0),
- new CoordRec((float) 63.921, (float) 4.7619),
- new CoordRec((float) 73.4448, (float) 14.2857),
- new CoordRec((float) 78.2067, (float) 28.5714),
- new CoordRec((float) 78.2067, (float) 100),
-};
-
-static final StrokeRec char85[] = {
- new StrokeRec(10, char85_stroke0),
-};
-
-/* char: 86 'V' */
-
-static final CoordRec char86_stroke0[] = {
- new CoordRec((float) 2.36, (float) 100),
- new CoordRec((float) 40.4552, (float) 0),
-};
-
-static final CoordRec char86_stroke1[] = {
- new CoordRec((float) 78.5505, (float) 100),
- new CoordRec((float) 40.4552, (float) 0),
-};
-
-static final StrokeRec char86[] = {
- new StrokeRec(2, char86_stroke0),
- new StrokeRec(2, char86_stroke1),
-};
-
-/* char: 87 'W' */
-
-static final CoordRec char87_stroke0[] = {
- new CoordRec((float) 2.22, (float) 100),
- new CoordRec((float) 26.0295, (float) 0),
-};
-
-static final CoordRec char87_stroke1[] = {
- new CoordRec((float) 49.839, (float) 100),
- new CoordRec((float) 26.0295, (float) 0),
-};
-
-static final CoordRec char87_stroke2[] = {
- new CoordRec((float) 49.839, (float) 100),
- new CoordRec((float) 73.6486, (float) 0),
-};
-
-static final CoordRec char87_stroke3[] = {
- new CoordRec((float) 97.4581, (float) 100),
- new CoordRec((float) 73.6486, (float) 0),
-};
-
-static final StrokeRec char87[] = {
- new StrokeRec(2, char87_stroke0),
- new StrokeRec(2, char87_stroke1),
- new StrokeRec(2, char87_stroke2),
- new StrokeRec(2, char87_stroke3),
-};
-
-/* char: 88 'X' */
-
-static final CoordRec char88_stroke0[] = {
- new CoordRec((float) 2.5, (float) 100),
- new CoordRec((float) 69.1667, (float) 0),
-};
-
-static final CoordRec char88_stroke1[] = {
- new CoordRec((float) 69.1667, (float) 100),
- new CoordRec((float) 2.5, (float) 0),
-};
-
-static final StrokeRec char88[] = {
- new StrokeRec(2, char88_stroke0),
- new StrokeRec(2, char88_stroke1),
-};
-
-/* char: 89 'Y' */
-
-static final CoordRec char89_stroke0[] = {
- new CoordRec((float) 1.52, (float) 100),
- new CoordRec((float) 39.6152, (float) 52.381),
- new CoordRec((float) 39.6152, (float) 0),
-};
-
-static final CoordRec char89_stroke1[] = {
- new CoordRec((float) 77.7105, (float) 100),
- new CoordRec((float) 39.6152, (float) 52.381),
-};
-
-static final StrokeRec char89[] = {
- new StrokeRec(3, char89_stroke0),
- new StrokeRec(2, char89_stroke1),
-};
-
-/* char: 90 'Z' */
-
-static final CoordRec char90_stroke0[] = {
- new CoordRec((float) 69.1667, (float) 100),
- new CoordRec((float) 2.5, (float) 0),
-};
-
-static final CoordRec char90_stroke1[] = {
- new CoordRec((float) 2.5, (float) 100),
- new CoordRec((float) 69.1667, (float) 100),
-};
-
-static final CoordRec char90_stroke2[] = {
- new CoordRec((float) 2.5, (float) 0),
- new CoordRec((float) 69.1667, (float) 0),
-};
-
-static final StrokeRec char90[] = {
- new StrokeRec(2, char90_stroke0),
- new StrokeRec(2, char90_stroke1),
- new StrokeRec(2, char90_stroke2),
-};
-
-/* char: 91 '[' */
-
-static final CoordRec char91_stroke0[] = {
- new CoordRec((float) 7.78, (float) 119.048),
- new CoordRec((float) 7.78, (float) -33.3333),
-};
-
-static final CoordRec char91_stroke1[] = {
- new CoordRec((float) 12.5419, (float) 119.048),
- new CoordRec((float) 12.5419, (float) -33.3333),
-};
-
-static final CoordRec char91_stroke2[] = {
- new CoordRec((float) 7.78, (float) 119.048),
- new CoordRec((float) 41.1133, (float) 119.048),
-};
-
-static final CoordRec char91_stroke3[] = {
- new CoordRec((float) 7.78, (float) -33.3333),
- new CoordRec((float) 41.1133, (float) -33.3333),
-};
-
-static final StrokeRec char91[] = {
- new StrokeRec(2, char91_stroke0),
- new StrokeRec(2, char91_stroke1),
- new StrokeRec(2, char91_stroke2),
- new StrokeRec(2, char91_stroke3),
-};
-
-/* char: 92 '\' */
-
-static final CoordRec char92_stroke0[] = {
- new CoordRec((float) 5.84, (float) 100),
- new CoordRec((float) 72.5067, (float) -14.2857),
-};
-
-static final StrokeRec char92[] = {
- new StrokeRec(2, char92_stroke0),
-};
-
-/* char: 93 ']' */
-
-static final CoordRec char93_stroke0[] = {
- new CoordRec((float) 33.0114, (float) 119.048),
- new CoordRec((float) 33.0114, (float) -33.3333),
-};
-
-static final CoordRec char93_stroke1[] = {
- new CoordRec((float) 37.7733, (float) 119.048),
- new CoordRec((float) 37.7733, (float) -33.3333),
-};
-
-static final CoordRec char93_stroke2[] = {
- new CoordRec((float) 4.44, (float) 119.048),
- new CoordRec((float) 37.7733, (float) 119.048),
-};
-
-static final CoordRec char93_stroke3[] = {
- new CoordRec((float) 4.44, (float) -33.3333),
- new CoordRec((float) 37.7733, (float) -33.3333),
-};
-
-static final StrokeRec char93[] = {
- new StrokeRec(2, char93_stroke0),
- new StrokeRec(2, char93_stroke1),
- new StrokeRec(2, char93_stroke2),
- new StrokeRec(2, char93_stroke3),
-};
-
-/* char: 94 '^' */
-
-static final CoordRec char94_stroke0[] = {
- new CoordRec((float) 44.0752, (float) 109.524),
- new CoordRec((float) 5.98, (float) 42.8571),
-};
-
-static final CoordRec char94_stroke1[] = {
- new CoordRec((float) 44.0752, (float) 109.524),
- new CoordRec((float) 82.1705, (float) 42.8571),
-};
-
-static final StrokeRec char94[] = {
- new StrokeRec(2, char94_stroke0),
- new StrokeRec(2, char94_stroke1),
-};
-
-/* char: 95 '_' */
-
-static final CoordRec char95_stroke0[] = {
- new CoordRec((float)-1.1, (float) -33.3333),
- new CoordRec((float) 103.662, (float) -33.3333),
- new CoordRec((float) 103.662, (float) -28.5714),
- new CoordRec((float)-1.1, (float) -28.5714),
- new CoordRec((float)-1.1, (float) -33.3333),
-};
-
-static final StrokeRec char95[] = {
- new StrokeRec(5, char95_stroke0),
-};
-
-/* char: 96 '`' */
-
-static final CoordRec char96_stroke0[] = {
- new CoordRec((float) 33.0219, (float) 100),
- new CoordRec((float) 56.8314, (float) 71.4286),
-};
-
-static final CoordRec char96_stroke1[] = {
- new CoordRec((float) 33.0219, (float) 100),
- new CoordRec((float) 28.26, (float) 95.2381),
- new CoordRec((float) 56.8314, (float) 71.4286),
-};
-
-static final StrokeRec char96[] = {
- new StrokeRec(2, char96_stroke0),
- new StrokeRec(3, char96_stroke1),
-};
-
-/* char: 97 'a' */
-
-static final CoordRec char97_stroke0[] = {
- new CoordRec((float) 63.8229, (float) 66.6667),
- new CoordRec((float) 63.8229, (float) 0),
-};
-
-static final CoordRec char97_stroke1[] = {
- new CoordRec((float) 63.8229, (float) 52.381),
- new CoordRec((float) 54.299, (float) 61.9048),
- new CoordRec((float) 44.7752, (float) 66.6667),
- new CoordRec((float) 30.4895, (float) 66.6667),
- new CoordRec((float) 20.9657, (float) 61.9048),
- new CoordRec((float) 11.4419, (float) 52.381),
- new CoordRec((float) 6.68, (float) 38.0952),
- new CoordRec((float) 6.68, (float) 28.5714),
- new CoordRec((float) 11.4419, (float) 14.2857),
- new CoordRec((float) 20.9657, (float) 4.7619),
- new CoordRec((float) 30.4895, (float) 0),
- new CoordRec((float) 44.7752, (float) 0),
- new CoordRec((float) 54.299, (float) 4.7619),
- new CoordRec((float) 63.8229, (float) 14.2857),
-};
-
-static final StrokeRec char97[] = {
- new StrokeRec(2, char97_stroke0),
- new StrokeRec(14, char97_stroke1),
-};
-
-/* char: 98 'b' */
-
-static final CoordRec char98_stroke0[] = {
- new CoordRec((float) 8.76, (float) 100),
- new CoordRec((float) 8.76, (float) 0),
-};
-
-static final CoordRec char98_stroke1[] = {
- new CoordRec((float) 8.76, (float) 52.381),
- new CoordRec((float) 18.2838, (float) 61.9048),
- new CoordRec((float) 27.8076, (float) 66.6667),
- new CoordRec((float) 42.0933, (float) 66.6667),
- new CoordRec((float) 51.6171, (float) 61.9048),
- new CoordRec((float) 61.141, (float) 52.381),
- new CoordRec((float) 65.9029, (float) 38.0952),
- new CoordRec((float) 65.9029, (float) 28.5714),
- new CoordRec((float) 61.141, (float) 14.2857),
- new CoordRec((float) 51.6171, (float) 4.7619),
- new CoordRec((float) 42.0933, (float) 0),
- new CoordRec((float) 27.8076, (float) 0),
- new CoordRec((float) 18.2838, (float) 4.7619),
- new CoordRec((float) 8.76, (float) 14.2857),
-};
-
-static final StrokeRec char98[] = {
- new StrokeRec(2, char98_stroke0),
- new StrokeRec(14, char98_stroke1),
-};
-
-/* char: 99 'c' */
-
-static final CoordRec char99_stroke0[] = {
- new CoordRec((float) 62.6629, (float) 52.381),
- new CoordRec((float) 53.139, (float) 61.9048),
- new CoordRec((float) 43.6152, (float) 66.6667),
- new CoordRec((float) 29.3295, (float) 66.6667),
- new CoordRec((float) 19.8057, (float) 61.9048),
- new CoordRec((float) 10.2819, (float) 52.381),
- new CoordRec((float) 5.52, (float) 38.0952),
- new CoordRec((float) 5.52, (float) 28.5714),
- new CoordRec((float) 10.2819, (float) 14.2857),
- new CoordRec((float) 19.8057, (float) 4.7619),
- new CoordRec((float) 29.3295, (float) 0),
- new CoordRec((float) 43.6152, (float) 0),
- new CoordRec((float) 53.139, (float) 4.7619),
- new CoordRec((float) 62.6629, (float) 14.2857),
-};
-
-static final StrokeRec char99[] = {
- new StrokeRec(14, char99_stroke0),
-};
-
-/* char: 100 'd' */
-
-static final CoordRec char100_stroke0[] = {
- new CoordRec((float) 61.7829, (float) 100),
- new CoordRec((float) 61.7829, (float) 0),
-};
-
-static final CoordRec char100_stroke1[] = {
- new CoordRec((float) 61.7829, (float) 52.381),
- new CoordRec((float) 52.259, (float) 61.9048),
- new CoordRec((float) 42.7352, (float) 66.6667),
- new CoordRec((float) 28.4495, (float) 66.6667),
- new CoordRec((float) 18.9257, (float) 61.9048),
- new CoordRec((float) 9.4019, (float) 52.381),
- new CoordRec((float) 4.64, (float) 38.0952),
- new CoordRec((float) 4.64, (float) 28.5714),
- new CoordRec((float) 9.4019, (float) 14.2857),
- new CoordRec((float) 18.9257, (float) 4.7619),
- new CoordRec((float) 28.4495, (float) 0),
- new CoordRec((float) 42.7352, (float) 0),
- new CoordRec((float) 52.259, (float) 4.7619),
- new CoordRec((float) 61.7829, (float) 14.2857),
-};
-
-static final StrokeRec char100[] = {
- new StrokeRec(2, char100_stroke0),
- new StrokeRec(14, char100_stroke1),
-};
-
-/* char: 101 'e' */
-
-static final CoordRec char101_stroke0[] = {
- new CoordRec((float) 5.72, (float) 38.0952),
- new CoordRec((float) 62.8629, (float) 38.0952),
- new CoordRec((float) 62.8629, (float) 47.619),
- new CoordRec((float) 58.101, (float) 57.1429),
- new CoordRec((float) 53.339, (float) 61.9048),
- new CoordRec((float) 43.8152, (float) 66.6667),
- new CoordRec((float) 29.5295, (float) 66.6667),
- new CoordRec((float) 20.0057, (float) 61.9048),
- new CoordRec((float) 10.4819, (float) 52.381),
- new CoordRec((float) 5.72, (float) 38.0952),
- new CoordRec((float) 5.72, (float) 28.5714),
- new CoordRec((float) 10.4819, (float) 14.2857),
- new CoordRec((float) 20.0057, (float) 4.7619),
- new CoordRec((float) 29.5295, (float) 0),
- new CoordRec((float) 43.8152, (float) 0),
- new CoordRec((float) 53.339, (float) 4.7619),
- new CoordRec((float) 62.8629, (float) 14.2857),
-};
-
-static final StrokeRec char101[] = {
- new StrokeRec(17, char101_stroke0),
-};
-
-/* char: 102 'f' */
-
-static final CoordRec char102_stroke0[] = {
- new CoordRec((float) 38.7752, (float) 100),
- new CoordRec((float) 29.2514, (float) 100),
- new CoordRec((float) 19.7276, (float) 95.2381),
- new CoordRec((float) 14.9657, (float) 80.9524),
- new CoordRec((float) 14.9657, (float) 0),
-};
-
-static final CoordRec char102_stroke1[] = {
- new CoordRec((float) 0.68, (float) 66.6667),
- new CoordRec((float) 34.0133, (float) 66.6667),
-};
-
-static final StrokeRec char102[] = {
- new StrokeRec(5, char102_stroke0),
- new StrokeRec(2, char102_stroke1),
-};
-
-/* char: 103 'g' */
-
-static final CoordRec char103_stroke0[] = {
- new CoordRec((float) 62.5029, (float) 66.6667),
- new CoordRec((float) 62.5029, (float) -9.5238),
- new CoordRec((float) 57.741, (float) -23.8095),
- new CoordRec((float) 52.979, (float) -28.5714),
- new CoordRec((float) 43.4552, (float) -33.3333),
- new CoordRec((float) 29.1695, (float) -33.3333),
- new CoordRec((float) 19.6457, (float) -28.5714),
-};
-
-static final CoordRec char103_stroke1[] = {
- new CoordRec((float) 62.5029, (float) 52.381),
- new CoordRec((float) 52.979, (float) 61.9048),
- new CoordRec((float) 43.4552, (float) 66.6667),
- new CoordRec((float) 29.1695, (float) 66.6667),
- new CoordRec((float) 19.6457, (float) 61.9048),
- new CoordRec((float) 10.1219, (float) 52.381),
- new CoordRec((float) 5.36, (float) 38.0952),
- new CoordRec((float) 5.36, (float) 28.5714),
- new CoordRec((float) 10.1219, (float) 14.2857),
- new CoordRec((float) 19.6457, (float) 4.7619),
- new CoordRec((float) 29.1695, (float) 0),
- new CoordRec((float) 43.4552, (float) 0),
- new CoordRec((float) 52.979, (float) 4.7619),
- new CoordRec((float) 62.5029, (float) 14.2857),
-};
-
-static final StrokeRec char103[] = {
- new StrokeRec(7, char103_stroke0),
- new StrokeRec(14, char103_stroke1),
-};
-
-/* char: 104 'h' */
-
-static final CoordRec char104_stroke0[] = {
- new CoordRec((float) 9.6, (float) 100),
- new CoordRec((float) 9.6, (float) 0),
-};
-
-static final CoordRec char104_stroke1[] = {
- new CoordRec((float) 9.6, (float) 47.619),
- new CoordRec((float) 23.8857, (float) 61.9048),
- new CoordRec((float) 33.4095, (float) 66.6667),
- new CoordRec((float) 47.6952, (float) 66.6667),
- new CoordRec((float) 57.219, (float) 61.9048),
- new CoordRec((float) 61.981, (float) 47.619),
- new CoordRec((float) 61.981, (float) 0),
-};
-
-static final StrokeRec char104[] = {
- new StrokeRec(2, char104_stroke0),
- new StrokeRec(7, char104_stroke1),
-};
-
-/* char: 105 'i' */
-
-static final CoordRec char105_stroke0[] = {
- new CoordRec((float) 10.02, (float) 100),
- new CoordRec((float) 14.7819, (float) 95.2381),
- new CoordRec((float) 19.5438, (float) 100),
- new CoordRec((float) 14.7819, (float) 104.762),
- new CoordRec((float) 10.02, (float) 100),
-};
-
-static final CoordRec char105_stroke1[] = {
- new CoordRec((float) 14.7819, (float) 66.6667),
- new CoordRec((float) 14.7819, (float) 0),
-};
-
-static final StrokeRec char105[] = {
- new StrokeRec(5, char105_stroke0),
- new StrokeRec(2, char105_stroke1),
-};
-
-/* char: 106 'j' */
-
-static final CoordRec char106_stroke0[] = {
- new CoordRec((float) 17.3876, (float) 100),
- new CoordRec((float) 22.1495, (float) 95.2381),
- new CoordRec((float) 26.9114, (float) 100),
- new CoordRec((float) 22.1495, (float) 104.762),
- new CoordRec((float) 17.3876, (float) 100),
-};
-
-static final CoordRec char106_stroke1[] = {
- new CoordRec((float) 22.1495, (float) 66.6667),
- new CoordRec((float) 22.1495, (float) -14.2857),
- new CoordRec((float) 17.3876, (float) -28.5714),
- new CoordRec((float) 7.8638, (float) -33.3333),
- new CoordRec((float)-1.66, (float) -33.3333),
-};
-
-static final StrokeRec char106[] = {
- new StrokeRec(5, char106_stroke0),
- new StrokeRec(5, char106_stroke1),
-};
-
-/* char: 107 'k' */
-
-static final CoordRec char107_stroke0[] = {
- new CoordRec((float) 9.6, (float) 100),
- new CoordRec((float) 9.6, (float) 0),
-};
-
-static final CoordRec char107_stroke1[] = {
- new CoordRec((float) 57.219, (float) 66.6667),
- new CoordRec((float) 9.6, (float) 19.0476),
-};
-
-static final CoordRec char107_stroke2[] = {
- new CoordRec((float) 28.6476, (float) 38.0952),
- new CoordRec((float) 61.981, (float) 0),
-};
-
-static final StrokeRec char107[] = {
- new StrokeRec(2, char107_stroke0),
- new StrokeRec(2, char107_stroke1),
- new StrokeRec(2, char107_stroke2),
-};
-
-/* char: 108 'l' */
-
-static final CoordRec char108_stroke0[] = {
- new CoordRec((float) 10.02, (float) 100),
- new CoordRec((float) 10.02, (float) 0),
-};
-
-static final StrokeRec char108[] = {
- new StrokeRec(2, char108_stroke0),
-};
-
-/* char: 109 'm' */
-
-static final CoordRec char109_stroke0[] = {
- new CoordRec((float) 9.6, (float) 66.6667),
- new CoordRec((float) 9.6, (float) 0),
-};
-
-static final CoordRec char109_stroke1[] = {
- new CoordRec((float) 9.6, (float) 47.619),
- new CoordRec((float) 23.8857, (float) 61.9048),
- new CoordRec((float) 33.4095, (float) 66.6667),
- new CoordRec((float) 47.6952, (float) 66.6667),
- new CoordRec((float) 57.219, (float) 61.9048),
- new CoordRec((float) 61.981, (float) 47.619),
- new CoordRec((float) 61.981, (float) 0),
-};
-
-static final CoordRec char109_stroke2[] = {
- new CoordRec((float) 61.981, (float) 47.619),
- new CoordRec((float) 76.2667, (float) 61.9048),
- new CoordRec((float) 85.7905, (float) 66.6667),
- new CoordRec((float) 100.076, (float) 66.6667),
- new CoordRec((float) 109.6, (float) 61.9048),
- new CoordRec((float) 114.362, (float) 47.619),
- new CoordRec((float) 114.362, (float) 0),
-};
-
-static final StrokeRec char109[] = {
- new StrokeRec(2, char109_stroke0),
- new StrokeRec(7, char109_stroke1),
- new StrokeRec(7, char109_stroke2),
-};
-
-/* char: 110 'n' */
-
-static final CoordRec char110_stroke0[] = {
- new CoordRec((float) 9.18, (float) 66.6667),
- new CoordRec((float) 9.18, (float) 0),
-};
-
-static final CoordRec char110_stroke1[] = {
- new CoordRec((float) 9.18, (float) 47.619),
- new CoordRec((float) 23.4657, (float) 61.9048),
- new CoordRec((float) 32.9895, (float) 66.6667),
- new CoordRec((float) 47.2752, (float) 66.6667),
- new CoordRec((float) 56.799, (float) 61.9048),
- new CoordRec((float) 61.561, (float) 47.619),
- new CoordRec((float) 61.561, (float) 0),
-};
-
-static final StrokeRec char110[] = {
- new StrokeRec(2, char110_stroke0),
- new StrokeRec(7, char110_stroke1),
-};
-
-/* char: 111 'o' */
-
-static final CoordRec char111_stroke0[] = {
- new CoordRec((float) 28.7895, (float) 66.6667),
- new CoordRec((float) 19.2657, (float) 61.9048),
- new CoordRec((float) 9.7419, (float) 52.381),
- new CoordRec((float) 4.98, (float) 38.0952),
- new CoordRec((float) 4.98, (float) 28.5714),
- new CoordRec((float) 9.7419, (float) 14.2857),
- new CoordRec((float) 19.2657, (float) 4.7619),
- new CoordRec((float) 28.7895, (float) 0),
- new CoordRec((float) 43.0752, (float) 0),
- new CoordRec((float) 52.599, (float) 4.7619),
- new CoordRec((float) 62.1229, (float) 14.2857),
- new CoordRec((float) 66.8848, (float) 28.5714),
- new CoordRec((float) 66.8848, (float) 38.0952),
- new CoordRec((float) 62.1229, (float) 52.381),
- new CoordRec((float) 52.599, (float) 61.9048),
- new CoordRec((float) 43.0752, (float) 66.6667),
- new CoordRec((float) 28.7895, (float) 66.6667),
-};
-
-static final StrokeRec char111[] = {
- new StrokeRec(17, char111_stroke0),
-};
-
-/* char: 112 'p' */
-
-static final CoordRec char112_stroke0[] = {
- new CoordRec((float) 9.46, (float) 66.6667),
- new CoordRec((float) 9.46, (float) -33.3333),
-};
-
-static final CoordRec char112_stroke1[] = {
- new CoordRec((float) 9.46, (float) 52.381),
- new CoordRec((float) 18.9838, (float) 61.9048),
- new CoordRec((float) 28.5076, (float) 66.6667),
- new CoordRec((float) 42.7933, (float) 66.6667),
- new CoordRec((float) 52.3171, (float) 61.9048),
- new CoordRec((float) 61.841, (float) 52.381),
- new CoordRec((float) 66.6029, (float) 38.0952),
- new CoordRec((float) 66.6029, (float) 28.5714),
- new CoordRec((float) 61.841, (float) 14.2857),
- new CoordRec((float) 52.3171, (float) 4.7619),
- new CoordRec((float) 42.7933, (float) 0),
- new CoordRec((float) 28.5076, (float) 0),
- new CoordRec((float) 18.9838, (float) 4.7619),
- new CoordRec((float) 9.46, (float) 14.2857),
-};
-
-static final StrokeRec char112[] = {
- new StrokeRec(2, char112_stroke0),
- new StrokeRec(14, char112_stroke1),
-};
-
-/* char: 113 'q' */
-
-static final CoordRec char113_stroke0[] = {
- new CoordRec((float) 61.9829, (float) 66.6667),
- new CoordRec((float) 61.9829, (float) -33.3333),
-};
-
-static final CoordRec char113_stroke1[] = {
- new CoordRec((float) 61.9829, (float) 52.381),
- new CoordRec((float) 52.459, (float) 61.9048),
- new CoordRec((float) 42.9352, (float) 66.6667),
- new CoordRec((float) 28.6495, (float) 66.6667),
- new CoordRec((float) 19.1257, (float) 61.9048),
- new CoordRec((float) 9.6019, (float) 52.381),
- new CoordRec((float) 4.84, (float) 38.0952),
- new CoordRec((float) 4.84, (float) 28.5714),
- new CoordRec((float) 9.6019, (float) 14.2857),
- new CoordRec((float) 19.1257, (float) 4.7619),
- new CoordRec((float) 28.6495, (float) 0),
- new CoordRec((float) 42.9352, (float) 0),
- new CoordRec((float) 52.459, (float) 4.7619),
- new CoordRec((float) 61.9829, (float) 14.2857),
-};
-
-static final StrokeRec char113[] = {
- new StrokeRec(2, char113_stroke0),
- new StrokeRec(14, char113_stroke1),
-};
-
-/* char: 114 'r' */
-
-static final CoordRec char114_stroke0[] = {
- new CoordRec((float) 9.46, (float) 66.6667),
- new CoordRec((float) 9.46, (float) 0),
-};
-
-static final CoordRec char114_stroke1[] = {
- new CoordRec((float) 9.46, (float) 38.0952),
- new CoordRec((float) 14.2219, (float) 52.381),
- new CoordRec((float) 23.7457, (float) 61.9048),
- new CoordRec((float) 33.2695, (float) 66.6667),
- new CoordRec((float) 47.5552, (float) 66.6667),
-};
-
-static final StrokeRec char114[] = {
- new StrokeRec(2, char114_stroke0),
- new StrokeRec(5, char114_stroke1),
-};
-
-/* char: 115 's' */
-
-static final CoordRec char115_stroke0[] = {
- new CoordRec((float) 57.081, (float) 52.381),
- new CoordRec((float) 52.319, (float) 61.9048),
- new CoordRec((float) 38.0333, (float) 66.6667),
- new CoordRec((float) 23.7476, (float) 66.6667),
- new CoordRec((float) 9.4619, (float) 61.9048),
- new CoordRec((float) 4.7, (float) 52.381),
- new CoordRec((float) 9.4619, (float) 42.8571),
- new CoordRec((float) 18.9857, (float) 38.0952),
- new CoordRec((float) 42.7952, (float) 33.3333),
- new CoordRec((float) 52.319, (float) 28.5714),
- new CoordRec((float) 57.081, (float) 19.0476),
- new CoordRec((float) 57.081, (float) 14.2857),
- new CoordRec((float) 52.319, (float) 4.7619),
- new CoordRec((float) 38.0333, (float) 0),
- new CoordRec((float) 23.7476, (float) 0),
- new CoordRec((float) 9.4619, (float) 4.7619),
- new CoordRec((float) 4.7, (float) 14.2857),
-};
-
-static final StrokeRec char115[] = {
- new StrokeRec(17, char115_stroke0),
-};
-
-/* char: 116 't' */
-
-static final CoordRec char116_stroke0[] = {
- new CoordRec((float) 14.8257, (float) 100),
- new CoordRec((float) 14.8257, (float) 19.0476),
- new CoordRec((float) 19.5876, (float) 4.7619),
- new CoordRec((float) 29.1114, (float) 0),
- new CoordRec((float) 38.6352, (float) 0),
-};
-
-static final CoordRec char116_stroke1[] = {
- new CoordRec((float) 0.54, (float) 66.6667),
- new CoordRec((float) 33.8733, (float) 66.6667),
-};
-
-static final StrokeRec char116[] = {
- new StrokeRec(5, char116_stroke0),
- new StrokeRec(2, char116_stroke1),
-};
-
-/* char: 117 'u' */
-
-static final CoordRec char117_stroke0[] = {
- new CoordRec((float) 9.46, (float) 66.6667),
- new CoordRec((float) 9.46, (float) 19.0476),
- new CoordRec((float) 14.2219, (float) 4.7619),
- new CoordRec((float) 23.7457, (float) 0),
- new CoordRec((float) 38.0314, (float) 0),
- new CoordRec((float) 47.5552, (float) 4.7619),
- new CoordRec((float) 61.841, (float) 19.0476),
-};
-
-static final CoordRec char117_stroke1[] = {
- new CoordRec((float) 61.841, (float) 66.6667),
- new CoordRec((float) 61.841, (float) 0),
-};
-
-static final StrokeRec char117[] = {
- new StrokeRec(7, char117_stroke0),
- new StrokeRec(2, char117_stroke1),
-};
-
-/* char: 118 'v' */
-
-static final CoordRec char118_stroke0[] = {
- new CoordRec((float) 1.8, (float) 66.6667),
- new CoordRec((float) 30.3714, (float) 0),
-};
-
-static final CoordRec char118_stroke1[] = {
- new CoordRec((float) 58.9429, (float) 66.6667),
- new CoordRec((float) 30.3714, (float) 0),
-};
-
-static final StrokeRec char118[] = {
- new StrokeRec(2, char118_stroke0),
- new StrokeRec(2, char118_stroke1),
-};
-
-/* char: 119 'w' */
-
-static final CoordRec char119_stroke0[] = {
- new CoordRec((float) 2.5, (float) 66.6667),
- new CoordRec((float) 21.5476, (float) 0),
-};
-
-static final CoordRec char119_stroke1[] = {
- new CoordRec((float) 40.5952, (float) 66.6667),
- new CoordRec((float) 21.5476, (float) 0),
-};
-
-static final CoordRec char119_stroke2[] = {
- new CoordRec((float) 40.5952, (float) 66.6667),
- new CoordRec((float) 59.6429, (float) 0),
-};
-
-static final CoordRec char119_stroke3[] = {
- new CoordRec((float) 78.6905, (float) 66.6667),
- new CoordRec((float) 59.6429, (float) 0),
-};
-
-static final StrokeRec char119[] = {
- new StrokeRec(2, char119_stroke0),
- new StrokeRec(2, char119_stroke1),
- new StrokeRec(2, char119_stroke2),
- new StrokeRec(2, char119_stroke3),
-};
-
-/* char: 120 'x' */
-
-static final CoordRec char120_stroke0[] = {
- new CoordRec((float) 1.66, (float) 66.6667),
- new CoordRec((float) 54.041, (float) 0),
-};
-
-static final CoordRec char120_stroke1[] = {
- new CoordRec((float) 54.041, (float) 66.6667),
- new CoordRec((float) 1.66, (float) 0),
-};
-
-static final StrokeRec char120[] = {
- new StrokeRec(2, char120_stroke0),
- new StrokeRec(2, char120_stroke1),
-};
-
-/* char: 121 'y' */
-
-static final CoordRec char121_stroke0[] = {
- new CoordRec((float) 6.5619, (float) 66.6667),
- new CoordRec((float) 35.1333, (float) 0),
-};
-
-static final CoordRec char121_stroke1[] = {
- new CoordRec((float) 63.7048, (float) 66.6667),
- new CoordRec((float) 35.1333, (float) 0),
- new CoordRec((float) 25.6095, (float) -19.0476),
- new CoordRec((float) 16.0857, (float) -28.5714),
- new CoordRec((float) 6.5619, (float) -33.3333),
- new CoordRec((float) 1.8, (float) -33.3333),
-};
-
-static final StrokeRec char121[] = {
- new StrokeRec(2, char121_stroke0),
- new StrokeRec(6, char121_stroke1),
-};
-
-/* char: 122 'z' */
-
-static final CoordRec char122_stroke0[] = {
- new CoordRec((float) 56.821, (float) 66.6667),
- new CoordRec((float) 4.44, (float) 0),
-};
-
-static final CoordRec char122_stroke1[] = {
- new CoordRec((float) 4.44, (float) 66.6667),
- new CoordRec((float) 56.821, (float) 66.6667),
-};
-
-static final CoordRec char122_stroke2[] = {
- new CoordRec((float) 4.44, (float) 0),
- new CoordRec((float) 56.821, (float) 0),
-};
-
-static final StrokeRec char122[] = {
- new StrokeRec(2, char122_stroke0),
- new StrokeRec(2, char122_stroke1),
- new StrokeRec(2, char122_stroke2),
-};
-
-/* char: 123 '{' */
-
-static final CoordRec char123_stroke0[] = {
- new CoordRec((float) 31.1895, (float) 119.048),
- new CoordRec((float) 21.6657, (float) 114.286),
- new CoordRec((float) 16.9038, (float) 109.524),
- new CoordRec((float) 12.1419, (float) 100),
- new CoordRec((float) 12.1419, (float) 90.4762),
- new CoordRec((float) 16.9038, (float) 80.9524),
- new CoordRec((float) 21.6657, (float) 76.1905),
- new CoordRec((float) 26.4276, (float) 66.6667),
- new CoordRec((float) 26.4276, (float) 57.1429),
- new CoordRec((float) 16.9038, (float) 47.619),
-};
-
-static final CoordRec char123_stroke1[] = {
- new CoordRec((float) 21.6657, (float) 114.286),
- new CoordRec((float) 16.9038, (float) 104.762),
- new CoordRec((float) 16.9038, (float) 95.2381),
- new CoordRec((float) 21.6657, (float) 85.7143),
- new CoordRec((float) 26.4276, (float) 80.9524),
- new CoordRec((float) 31.1895, (float) 71.4286),
- new CoordRec((float) 31.1895, (float) 61.9048),
- new CoordRec((float) 26.4276, (float) 52.381),
- new CoordRec((float) 7.38, (float) 42.8571),
- new CoordRec((float) 26.4276, (float) 33.3333),
- new CoordRec((float) 31.1895, (float) 23.8095),
- new CoordRec((float) 31.1895, (float) 14.2857),
- new CoordRec((float) 26.4276, (float) 4.7619),
- new CoordRec((float) 21.6657, (float) 0),
- new CoordRec((float) 16.9038, (float) -9.5238),
- new CoordRec((float) 16.9038, (float) -19.0476),
- new CoordRec((float) 21.6657, (float) -28.5714),
-};
-
-static final CoordRec char123_stroke2[] = {
- new CoordRec((float) 16.9038, (float) 38.0952),
- new CoordRec((float) 26.4276, (float) 28.5714),
- new CoordRec((float) 26.4276, (float) 19.0476),
- new CoordRec((float) 21.6657, (float) 9.5238),
- new CoordRec((float) 16.9038, (float) 4.7619),
- new CoordRec((float) 12.1419, (float) -4.7619),
- new CoordRec((float) 12.1419, (float) -14.2857),
- new CoordRec((float) 16.9038, (float) -23.8095),
- new CoordRec((float) 21.6657, (float) -28.5714),
- new CoordRec((float) 31.1895, (float) -33.3333),
-};
-
-static final StrokeRec char123[] = {
- new StrokeRec(10, char123_stroke0),
- new StrokeRec(17, char123_stroke1),
- new StrokeRec(10, char123_stroke2),
-};
-
-/* char: 124 '|' */
-
-static final CoordRec char124_stroke0[] = {
- new CoordRec((float) 11.54, (float) 119.048),
- new CoordRec((float) 11.54, (float) -33.3333),
-};
-
-static final StrokeRec char124[] = {
- new StrokeRec(2, char124_stroke0),
-};
-
-/* char: 125 '}' */
-
-static final CoordRec char125_stroke0[] = {
- new CoordRec((float) 9.18, (float) 119.048),
- new CoordRec((float) 18.7038, (float) 114.286),
- new CoordRec((float) 23.4657, (float) 109.524),
- new CoordRec((float) 28.2276, (float) 100),
- new CoordRec((float) 28.2276, (float) 90.4762),
- new CoordRec((float) 23.4657, (float) 80.9524),
- new CoordRec((float) 18.7038, (float) 76.1905),
- new CoordRec((float) 13.9419, (float) 66.6667),
- new CoordRec((float) 13.9419, (float) 57.1429),
- new CoordRec((float) 23.4657, (float) 47.619),
-};
-
-static final CoordRec char125_stroke1[] = {
- new CoordRec((float) 18.7038, (float) 114.286),
- new CoordRec((float) 23.4657, (float) 104.762),
- new CoordRec((float) 23.4657, (float) 95.2381),
- new CoordRec((float) 18.7038, (float) 85.7143),
- new CoordRec((float) 13.9419, (float) 80.9524),
- new CoordRec((float) 9.18, (float) 71.4286),
- new CoordRec((float) 9.18, (float) 61.9048),
- new CoordRec((float) 13.9419, (float) 52.381),
- new CoordRec((float) 32.9895, (float) 42.8571),
- new CoordRec((float) 13.9419, (float) 33.3333),
- new CoordRec((float) 9.18, (float) 23.8095),
- new CoordRec((float) 9.18, (float) 14.2857),
- new CoordRec((float) 13.9419, (float) 4.7619),
- new CoordRec((float) 18.7038, (float) 0),
- new CoordRec((float) 23.4657, (float) -9.5238),
- new CoordRec((float) 23.4657, (float) -19.0476),
- new CoordRec((float) 18.7038, (float) -28.5714),
-};
-
-static final CoordRec char125_stroke2[] = {
- new CoordRec((float) 23.4657, (float) 38.0952),
- new CoordRec((float) 13.9419, (float) 28.5714),
- new CoordRec((float) 13.9419, (float) 19.0476),
- new CoordRec((float) 18.7038, (float) 9.5238),
- new CoordRec((float) 23.4657, (float) 4.7619),
- new CoordRec((float) 28.2276, (float) -4.7619),
- new CoordRec((float) 28.2276, (float) -14.2857),
- new CoordRec((float) 23.4657, (float) -23.8095),
- new CoordRec((float) 18.7038, (float) -28.5714),
- new CoordRec((float) 9.18, (float) -33.3333),
-};
-
-static final StrokeRec char125[] = {
- new StrokeRec(10, char125_stroke0),
- new StrokeRec(17, char125_stroke1),
- new StrokeRec(10, char125_stroke2),
-};
-
-/* char: 126 '~' */
-
-static final CoordRec char126_stroke0[] = {
- new CoordRec((float) 2.92, (float) 28.5714),
- new CoordRec((float) 2.92, (float) 38.0952),
- new CoordRec((float) 7.6819, (float) 52.381),
- new CoordRec((float) 17.2057, (float) 57.1429),
- new CoordRec((float) 26.7295, (float) 57.1429),
- new CoordRec((float) 36.2533, (float) 52.381),
- new CoordRec((float) 55.301, (float) 38.0952),
- new CoordRec((float) 64.8248, (float) 33.3333),
- new CoordRec((float) 74.3486, (float) 33.3333),
- new CoordRec((float) 83.8724, (float) 38.0952),
- new CoordRec((float) 88.6343, (float) 47.619),
-};
-
-static final CoordRec char126_stroke1[] = {
- new CoordRec((float) 2.92, (float) 38.0952),
- new CoordRec((float) 7.6819, (float) 47.619),
- new CoordRec((float) 17.2057, (float) 52.381),
- new CoordRec((float) 26.7295, (float) 52.381),
- new CoordRec((float) 36.2533, (float) 47.619),
- new CoordRec((float) 55.301, (float) 33.3333),
- new CoordRec((float) 64.8248, (float) 28.5714),
- new CoordRec((float) 74.3486, (float) 28.5714),
- new CoordRec((float) 83.8724, (float) 33.3333),
- new CoordRec((float) 88.6343, (float) 47.619),
- new CoordRec((float) 88.6343, (float) 57.1429),
-};
-
-static final StrokeRec char126[] = {
- new StrokeRec(11, char126_stroke0),
- new StrokeRec(11, char126_stroke1),
-};
-
-/* char: 127 */
-
-static final CoordRec char127_stroke0[] = {
- new CoordRec((float) 52.381, (float) 100),
- new CoordRec((float) 14.2857, (float) -33.3333),
-};
-
-static final CoordRec char127_stroke1[] = {
- new CoordRec((float) 28.5714, (float) 66.6667),
- new CoordRec((float) 14.2857, (float) 61.9048),
- new CoordRec((float) 4.7619, (float) 52.381),
- new CoordRec((float) 0, (float) 38.0952),
- new CoordRec((float) 0, (float) 23.8095),
- new CoordRec((float) 4.7619, (float) 14.2857),
- new CoordRec((float) 14.2857, (float) 4.7619),
- new CoordRec((float) 28.5714, (float) 0),
- new CoordRec((float) 38.0952, (float) 0),
- new CoordRec((float) 52.381, (float) 4.7619),
- new CoordRec((float) 61.9048, (float) 14.2857),
- new CoordRec((float) 66.6667, (float) 28.5714),
- new CoordRec((float) 66.6667, (float) 42.8571),
- new CoordRec((float) 61.9048, (float) 52.381),
- new CoordRec((float) 52.381, (float) 61.9048),
- new CoordRec((float) 38.0952, (float) 66.6667),
- new CoordRec((float) 28.5714, (float) 66.6667),
-};
-
-static final StrokeRec char127[] = {
- new StrokeRec(2, char127_stroke0),
- new StrokeRec(17, char127_stroke1),
-};
-
-static final StrokeCharRec chars[] = {
- new StrokeCharRec( 0, /* char0 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec( 0, /* char1 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec( 0, /* char2 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec( 0, /* char3 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec( 0, /* char4 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec( 0, /* char5 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec( 0, /* char6 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec( 0, /* char7 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec( 0, /* char8 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec( 0, /* char9 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec( 0, /* char10 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec( 0, /* char11 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec( 0, /* char12 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec( 0, /* char13 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec( 0, /* char14 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec( 0, /* char15 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec( 0, /* char16 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec( 0, /* char17 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec( 0, /* char18 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec( 0, /* char19 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec( 0, /* char20 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec( 0, /* char21 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec( 0, /* char22 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec( 0, /* char23 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec( 0, /* char24 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec( 0, /* char25 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec( 0, /* char26 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec( 0, /* char27 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec( 0, /* char28 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec( 0, /* char29 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec( 0, /* char30 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec( 0, /* char31 */ null, (float) 0, (float) 0 ),
- new StrokeCharRec( 0, /* char32 */ null, (float) 52.381, (float) 104.762 ),
- new StrokeCharRec( 2, char33, (float) 13.3819, (float) 26.6238 ),
- new StrokeCharRec( 2, char34, (float) 23.0676, (float) 51.4352 ),
- new StrokeCharRec( 4, char35, (float) 36.5333, (float) 79.4886 ),
- new StrokeCharRec( 3, char36, (float) 38.1533, (float) 76.2067 ),
- new StrokeCharRec( 3, char37, (float) 49.2171, (float) 96.5743 ),
- new StrokeCharRec( 1, char38, (float) 53.599, (float) 101.758 ),
- new StrokeCharRec( 1, char39, (float) 4.44, (float) 13.62 ),
- new StrokeCharRec( 1, char40, (float) 21.8657, (float) 47.1733 ),
- new StrokeCharRec( 1, char41, (float) 24.3276, (float) 47.5333 ),
- new StrokeCharRec( 3, char42, (float) 30.7695, (float) 59.439 ),
- new StrokeCharRec( 2, char43, (float) 48.8371, (float) 97.2543 ),
- new StrokeCharRec( 1, char44, (float) 13.5219, (float) 26.0638 ),
- new StrokeCharRec( 1, char45, (float) 50.2371, (float) 100.754 ),
- new StrokeCharRec( 1, char46, (float) 13.1019, (float) 26.4838 ),
- new StrokeCharRec( 1, char47, (float) 40.5733, (float) 82.1067 ),
- new StrokeCharRec( 1, char48, (float) 38.3133, (float) 77.0667 ),
- new StrokeCharRec( 1, char49, (float) 30.8676, (float) 66.5295 ),
- new StrokeCharRec( 1, char50, (float) 38.7533, (float) 77.6467 ),
- new StrokeCharRec( 1, char51, (float) 38.3333, (float) 77.0467 ),
- new StrokeCharRec( 2, char52, (float) 37.2133, (float) 80.1686 ),
- new StrokeCharRec( 1, char53, (float) 38.1933, (float) 77.6867 ),
- new StrokeCharRec( 1, char54, (float) 34.1514, (float) 73.8048 ),
- new StrokeCharRec( 2, char55, (float) 38.8933, (float) 77.2267 ),
- new StrokeCharRec( 1, char56, (float) 38.9333, (float) 77.6667 ),
- new StrokeCharRec( 1, char57, (float) 39.9333, (float) 74.0648 ),
- new StrokeCharRec( 2, char58, (float) 14.0819, (float) 26.2238 ),
- new StrokeCharRec( 2, char59, (float) 12.9619, (float) 26.3038 ),
- new StrokeCharRec( 1, char60, (float) 41.1552, (float) 81.6105 ),
- new StrokeCharRec( 2, char61, (float) 48.5571, (float) 97.2543 ),
- new StrokeCharRec( 1, char62, (float) 40.8752, (float) 81.6105 ),
- new StrokeCharRec( 2, char63, (float) 36.9914, (float) 73.9029 ),
- new StrokeCharRec( 2, char64, (float) 34.9314, (float) 74.3648 ),
- new StrokeCharRec( 3, char65, (float) 40.5952, (float) 80.4905 ),
- new StrokeCharRec( 3, char66, (float) 44.7533, (float) 83.6267 ),
- new StrokeCharRec( 1, char67, (float) 39.9933, (float) 84.4886 ),
- new StrokeCharRec( 2, char68, (float) 45.2933, (float) 85.2867 ),
- new StrokeCharRec( 4, char69, (float) 39.9914, (float) 78.1848 ),
- new StrokeCharRec( 3, char70, (float) 39.9914, (float) 78.7448 ),
- new StrokeCharRec( 2, char71, (float) 40.3933, (float) 89.7686 ),
- new StrokeCharRec( 3, char72, (float) 44.7533, (float) 89.0867 ),
- new StrokeCharRec( 1, char73, (float) 10.86, (float) 21.3 ),
- new StrokeCharRec( 1, char74, (float) 31.0714, (float) 59.999 ),
- new StrokeCharRec( 3, char75, (float) 44.6133, (float) 79.3267 ),
- new StrokeCharRec( 2, char76, (float) 40.2514, (float) 71.3229 ),
- new StrokeCharRec( 4, char77, (float) 48.9552, (float) 97.2105 ),
- new StrokeCharRec( 3, char78, (float) 44.4733, (float) 88.8067 ),
- new StrokeCharRec( 1, char79, (float) 44.3352, (float) 88.8305 ),
- new StrokeCharRec( 2, char80, (float) 45.4333, (float) 85.6667 ),
- new StrokeCharRec( 2, char81, (float) 43.3952, (float) 88.0905 ),
- new StrokeCharRec( 3, char82, (float) 45.0133, (float) 82.3667 ),
- new StrokeCharRec( 1, char83, (float) 41.3333, (float) 80.8267 ),
- new StrokeCharRec( 2, char84, (float) 35.6933, (float) 71.9467 ),
- new StrokeCharRec( 1, char85, (float) 44.8733, (float) 89.4867 ),
- new StrokeCharRec( 2, char86, (float) 40.4552, (float) 81.6105 ),
- new StrokeCharRec( 4, char87, (float) 49.839, (float) 100.518 ),
- new StrokeCharRec( 2, char88, (float) 35.8333, (float) 72.3667 ),
- new StrokeCharRec( 2, char89, (float) 39.6152, (float) 79.6505 ),
- new StrokeCharRec( 3, char90, (float) 35.8333, (float) 73.7467 ),
- new StrokeCharRec( 4, char91, (float) 22.0657, (float) 46.1133 ),
- new StrokeCharRec( 1, char92, (float) 39.1733, (float) 78.2067 ),
- new StrokeCharRec( 4, char93, (float) 23.4876, (float) 46.3933 ),
- new StrokeCharRec( 2, char94, (float) 44.0752, (float) 90.2305 ),
- new StrokeCharRec( 1, char95, (float) 51.281, (float) 104.062 ),
- new StrokeCharRec( 2, char96, (float) 42.5457, (float) 83.5714 ),
- new StrokeCharRec( 2, char97, (float) 35.2514, (float) 66.6029 ),
- new StrokeCharRec( 2, char98, (float) 37.3314, (float) 70.4629 ),
- new StrokeCharRec( 1, char99, (float) 34.0914, (float) 68.9229 ),
- new StrokeCharRec( 2, char100, (float) 33.2114, (float) 70.2629 ),
- new StrokeCharRec( 1, char101, (float) 34.2914, (float) 68.5229 ),
- new StrokeCharRec( 2, char102, (float) 14.9657, (float) 38.6552 ),
- new StrokeCharRec( 2, char103, (float) 33.9314, (float) 70.9829 ),
- new StrokeCharRec( 2, char104, (float) 33.4095, (float) 71.021 ),
- new StrokeCharRec( 2, char105, (float) 14.7819, (float) 28.8638 ),
- new StrokeCharRec( 2, char106, (float) 17.3876, (float) 36.2314 ),
- new StrokeCharRec( 3, char107, (float) 33.4095, (float) 62.521 ),
- new StrokeCharRec( 1, char108, (float) 10.02, (float) 19.34 ),
- new StrokeCharRec( 3, char109, (float) 61.981, (float) 123.962 ),
- new StrokeCharRec( 2, char110, (float) 32.9895, (float) 70.881 ),
- new StrokeCharRec( 1, char111, (float) 33.5514, (float) 71.7448 ),
- new StrokeCharRec( 2, char112, (float) 38.0314, (float) 70.8029 ),
- new StrokeCharRec( 2, char113, (float) 33.4114, (float) 70.7429 ),
- new StrokeCharRec( 2, char114, (float) 23.7457, (float) 49.4952 ),
- new StrokeCharRec( 1, char115, (float) 28.5095, (float) 62.321 ),
- new StrokeCharRec( 2, char116, (float) 14.8257, (float) 39.3152 ),
- new StrokeCharRec( 2, char117, (float) 33.2695, (float) 71.161 ),
- new StrokeCharRec( 2, char118, (float) 30.3714, (float) 60.6029 ),
- new StrokeCharRec( 4, char119, (float) 40.5952, (float) 80.4905 ),
- new StrokeCharRec( 2, char120, (float) 25.4695, (float) 56.401 ),
- new StrokeCharRec( 2, char121, (float) 35.1333, (float) 66.0648 ),
- new StrokeCharRec( 3, char122, (float) 28.2495, (float) 61.821 ),
- new StrokeCharRec( 3, char123, (float) 21.6657, (float) 41.6295 ),
- new StrokeCharRec( 1, char124, (float) 11.54, (float) 23.78 ),
- new StrokeCharRec( 3, char125, (float) 18.7038, (float) 41.4695 ),
- new StrokeCharRec( 2, char126, (float) 45.7771, (float) 91.2743 ),
- new StrokeCharRec( 2, char127, (float) 33.3333, (float) 66.6667 ),
-};
-
-public static final StrokeFontRec glutStrokeRoman = new StrokeFontRec( "Roman", 128, chars, (float) 119.048, (float) -33.3333 );
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/gl2/StrokeCharRec.java b/src/jogl/classes/com/sun/opengl/util/gl2/StrokeCharRec.java
deleted file mode 100644
index 1d5d3de63..000000000
--- a/src/jogl/classes/com/sun/opengl/util/gl2/StrokeCharRec.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.util.gl2;
-
-/* Copyright (c) Mark J. Kilgard, 1994, 1998. */
-
-/* This program is freely distributable without licensing fees
- and is provided without guarantee or warrantee expressed or
- implied. This program is -not- in the public domain. */
-
-class StrokeCharRec {
- public int num_strokes;
- public StrokeRec[] stroke;
- public float center;
- public float right;
-
- public StrokeCharRec(int num_strokes,
- StrokeRec[] stroke,
- float center,
- float right) {
- this.num_strokes = num_strokes;
- this.stroke = stroke;
- this.center = center;
- this.right = right;
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/gl2/StrokeFontRec.java b/src/jogl/classes/com/sun/opengl/util/gl2/StrokeFontRec.java
deleted file mode 100644
index 0e6133a2d..000000000
--- a/src/jogl/classes/com/sun/opengl/util/gl2/StrokeFontRec.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.util.gl2;
-
-/* Copyright (c) Mark J. Kilgard, 1994, 1998. */
-
-/* This program is freely distributable without licensing fees
- and is provided without guarantee or warrantee expressed or
- implied. This program is -not- in the public domain. */
-
-class StrokeFontRec {
- public String name;
- public int num_chars;
- public StrokeCharRec[] ch;
- public float top;
- public float bottom;
-
- public StrokeFontRec(String name,
- int num_chars,
- StrokeCharRec[] ch,
- float top,
- float bottom) {
- this.name = name;
- this.num_chars = num_chars;
- this.ch = ch;
- this.top = top;
- this.bottom = bottom;
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/gl2/StrokeRec.java b/src/jogl/classes/com/sun/opengl/util/gl2/StrokeRec.java
deleted file mode 100644
index 91241ebc0..000000000
--- a/src/jogl/classes/com/sun/opengl/util/gl2/StrokeRec.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.util.gl2;
-
-/* Copyright (c) Mark J. Kilgard, 1994, 1998. */
-
-/* This program is freely distributable without licensing fees
- and is provided without guarantee or warrantee expressed or
- implied. This program is -not- in the public domain. */
-
-class StrokeRec {
- public int num_coords;
- public CoordRec[] coord;
-
- public StrokeRec(int num_coords,
- CoordRec[] coord) {
- this.num_coords = num_coords;
- this.coord = coord;
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/gl2/TileRenderer.java b/src/jogl/classes/com/sun/opengl/util/gl2/TileRenderer.java
deleted file mode 100755
index a446b0928..000000000
--- a/src/jogl/classes/com/sun/opengl/util/gl2/TileRenderer.java
+++ /dev/null
@@ -1,601 +0,0 @@
-package com.sun.opengl.util.gl2;
-
-import java.awt.Dimension;
-import java.nio.Buffer;
-
-import javax.media.opengl.*;
-import javax.media.opengl.glu.*;
-import javax.media.opengl.glu.gl2.*;
-
-/**
- * A fairly direct port of Brian Paul's tile rendering library, found
- * at
- * http://www.mesa3d.org/brianp/TR.html . I've java-fied it, but
- * the functionality is the same.
- *
- * Original code Copyright (C) 1997-2005 Brian Paul. Licensed under
- * BSD-compatible terms with permission of the author. See LICENSE.txt
- * for license information.
- *
- * @author ryanm
- */
-public class TileRenderer
-{
- private static final int DEFAULT_TILE_WIDTH = 256;
-
- private static final int DEFAULT_TILE_HEIGHT = 256;
-
- private static final int DEFAULT_TILE_BORDER = 0;
-
- //
- // Enumeration flags for accessing variables
- //
- // @author ryanm
- //
-
- /**
- * The width of a tile
- */
- public static final int TR_TILE_WIDTH = 0;
- /**
- * The height of a tile
- */
- public static final int TR_TILE_HEIGHT = 1;
- /**
- * The width of the border around the tiles
- */
- public static final int TR_TILE_BORDER = 2;
- /**
- * The width of the final image
- */
- public static final int TR_IMAGE_WIDTH = 3;
- /**
- * The height of the final image
- */
- public static final int TR_IMAGE_HEIGHT = 4;
- /**
- * The number of rows of tiles
- */
- public static final int TR_ROWS = 5;
- /**
- * The number of columns of tiles
- */
- public static final int TR_COLUMNS = 6;
- /**
- * The current row number
- */
- public static final int TR_CURRENT_ROW = 7;
- /**
- * The current column number
- */
- public static final int TR_CURRENT_COLUMN = 8;
- /**
- * The width of the current tile
- */
- public static final int TR_CURRENT_TILE_WIDTH = 9;
- /**
- * The height of the current tile
- */
- public static final int TR_CURRENT_TILE_HEIGHT = 10;
- /**
- * The order that the rows are traversed
- */
- public static final int TR_ROW_ORDER = 11;
-
-
- /**
- * Indicates we are traversing rows from the top to the bottom
- */
- public static final int TR_TOP_TO_BOTTOM = 1;
-
- /**
- * Indicates we are traversing rows from the bottom to the top
- */
- public static final int TR_BOTTOM_TO_TOP = 2;
-
- /* Final image parameters */
- private Dimension imageSize = new Dimension();
-
- private int imageFormat, imageType;
-
- private Buffer imageBuffer;
-
- /* Tile parameters */
- private Dimension tileSize = new Dimension();
-
- private Dimension tileSizeNB = new Dimension();
-
- private int tileBorder;
-
- private int tileFormat, tileType;
-
- private Buffer tileBuffer;
-
- /* Projection parameters */
- private boolean perspective;
-
- private double left;
-
- private double right;
-
- private double bottom;
-
- private double top;
-
- private double near;
-
- private double far;
-
- /* Misc */
- private int rowOrder;
-
- private int rows, columns;
-
- private int currentTile;
-
- private int currentTileWidth, currentTileHeight;
-
- private int currentRow, currentColumn;
-
- private int[] viewportSave = new int[ 4 ];
-
- /**
- * Creates a new TileRenderer object
- */
- public TileRenderer()
- {
- tileSize.width = DEFAULT_TILE_WIDTH;
- tileSize.height = DEFAULT_TILE_HEIGHT;
- tileBorder = DEFAULT_TILE_BORDER;
- rowOrder = TR_BOTTOM_TO_TOP;
- currentTile = -1;
- }
-
- /**
- * Sets up the number of rows and columns needed
- */
- private void setup()
- {
- columns = ( imageSize.width + tileSizeNB.width - 1 ) / tileSizeNB.width;
- rows = ( imageSize.height + tileSizeNB.height - 1 ) / tileSizeNB.height;
- currentTile = 0;
-
- assert columns >= 0;
- assert rows >= 0;
- }
-
- /**
- * Sets the size of the tiles to use in rendering. The actual
- * effective size of the tile depends on the border size, ie (
- * width - 2*border ) * ( height - 2 * border )
- *
- * @param width
- * The width of the tiles. Must not be larger than the GL
- * context
- * @param height
- * The height of the tiles. Must not be larger than the
- * GL context
- * @param border
- * The width of the borders on each tile. This is needed
- * to avoid artifacts when rendering lines or points with
- * thickness > 1.
- */
- public void setTileSize( int width, int height, int border )
- {
- assert ( border >= 0 );
- assert ( width >= 1 );
- assert ( height >= 1 );
- assert ( width >= 2 * border );
- assert ( height >= 2 * border );
-
- tileBorder = border;
- tileSize.width = width;
- tileSize.height = height;
- tileSizeNB.width = width - 2 * border;
- tileSizeNB.height = height - 2 * border;
- setup();
- }
-
- /**
- * Specify a buffer the tiles to be copied to. This is not
- * necessary for the creation of the final image, but useful if you
- * want to inspect each tile in turn.
- *
- * @param format
- * Interpreted as in glReadPixels
- * @param type
- * Interpreted as in glReadPixels
- * @param image
- * The buffer itself. Must be large enough to contain a
- * tile, minus any borders
- */
- public void setTileBuffer( int format, int type, Buffer image )
- {
- tileFormat = format;
- tileType = type;
- tileBuffer = image;
- }
-
- /**
- * Sets the desired size of the final image
- *
- * @param width
- * The width of the final image
- * @param height
- * The height of the final image
- */
- public void setImageSize( int width, int height )
- {
- imageSize.width = width;
- imageSize.height = height;
- setup();
- }
-
- /**
- * Sets the buffer in which to store the final image
- *
- * @param format
- * Interpreted as in glReadPixels
- * @param type
- * Interpreted as in glReadPixels
- * @param image
- * the buffer itself, must be large enough to hold the
- * final image
- */
- public void setImageBuffer( int format, int type, Buffer image )
- {
- imageFormat = format;
- imageType = type;
- imageBuffer = image;
- }
-
- /**
- * Gets the parameters of this TileRenderer object
- *
- * @param param
- * The parameter that is to be retrieved
- * @return the value of the parameter
- */
- public int getParam( int param )
- {
- switch (param) {
- case TR_TILE_WIDTH:
- return tileSize.width;
- case TR_TILE_HEIGHT:
- return tileSize.height;
- case TR_TILE_BORDER:
- return tileBorder;
- case TR_IMAGE_WIDTH:
- return imageSize.width;
- case TR_IMAGE_HEIGHT:
- return imageSize.height;
- case TR_ROWS:
- return rows;
- case TR_COLUMNS:
- return columns;
- case TR_CURRENT_ROW:
- if( currentTile < 0 )
- return -1;
- else
- return currentRow;
- case TR_CURRENT_COLUMN:
- if( currentTile < 0 )
- return -1;
- else
- return currentColumn;
- case TR_CURRENT_TILE_WIDTH:
- return currentTileWidth;
- case TR_CURRENT_TILE_HEIGHT:
- return currentTileHeight;
- case TR_ROW_ORDER:
- return rowOrder;
- default:
- throw new IllegalArgumentException("Invalid enumerant as argument");
- }
- }
-
- /**
- * Sets the order of row traversal
- *
- * @param order
- * The row traversal order, must be
- * eitherTR_TOP_TO_BOTTOM or TR_BOTTOM_TO_TOP
- */
- public void setRowOrder( int order )
- {
- if (order == TR_TOP_TO_BOTTOM || order == TR_BOTTOM_TO_TOP) {
- rowOrder = order;
- } else {
- throw new IllegalArgumentException("Must pass TR_TOP_TO_BOTTOM or TR_BOTTOM_TO_TOP");
- }
- }
-
- /**
- * Sets the context to use an orthographic projection. Must be
- * called before rendering the first tile
- *
- * @param left
- * As in glOrtho
- * @param right
- * As in glOrtho
- * @param bottom
- * As in glOrtho
- * @param top
- * As in glOrtho
- * @param zNear
- * As in glOrtho
- * @param zFar
- * As in glOrtho
- */
- public void trOrtho( double left, double right, double bottom, double top, double zNear,
- double zFar )
- {
- this.perspective = false;
- this.left = left;
- this.right = right;
- this.bottom = bottom;
- this.top = top;
- this.near = zNear;
- this.far = zFar;
- }
-
- /**
- * Sets the perspective projection frustrum. Must be called before
- * rendering the first tile
- *
- * @param left
- * As in glFrustrum
- * @param right
- * As in glFrustrum
- * @param bottom
- * As in glFrustrum
- * @param top
- * As in glFrustrum
- * @param zNear
- * As in glFrustrum
- * @param zFar
- * As in glFrustrum
- */
- public void trFrustum( double left, double right, double bottom, double top, double zNear,
- double zFar )
- {
- this.perspective = true;
- this.left = left;
- this.right = right;
- this.bottom = bottom;
- this.top = top;
- this.near = zNear;
- this.far = zFar;
- }
-
- /**
- * Convenient way to specify a perspective projection
- *
- * @param fovy
- * As in gluPerspective
- * @param aspect
- * As in gluPerspective
- * @param zNear
- * As in gluPerspective
- * @param zFar
- * As in gluPerspective
- */
- public void trPerspective( double fovy, double aspect, double zNear, double zFar )
- {
- double xmin, xmax, ymin, ymax;
- ymax = zNear * Math.tan( fovy * 3.14159265 / 360.0 );
- ymin = -ymax;
- xmin = ymin * aspect;
- xmax = ymax * aspect;
- trFrustum( xmin, xmax, ymin, ymax, zNear, zFar );
- }
-
- /**
- * Begins rendering a tile. The projection matrix stack should be
- * left alone after calling this
- *
- * @param gl
- * The gl context
- */
- public void beginTile( GL2 gl )
- {
- if (currentTile <= 0) {
- setup();
- /*
- * Save user's viewport, will be restored after last tile
- * rendered
- */
- gl.glGetIntegerv( GL2.GL_VIEWPORT, viewportSave, 0 );
- }
-
- /* which tile (by row and column) we're about to render */
- if (rowOrder == TR_BOTTOM_TO_TOP) {
- currentRow = currentTile / columns;
- currentColumn = currentTile % columns;
- } else {
- currentRow = rows - ( currentTile / columns ) - 1;
- currentColumn = currentTile % columns;
- }
- assert ( currentRow < rows );
- assert ( currentColumn < columns );
-
- int border = tileBorder;
-
- int th, tw;
-
- /* Compute actual size of this tile with border */
- if (currentRow < rows - 1) {
- th = tileSize.height;
- } else {
- th = imageSize.height - ( rows - 1 ) * ( tileSizeNB.height ) + 2 * border;
- }
-
- if (currentColumn < columns - 1) {
- tw = tileSize.width;
- } else {
- tw = imageSize.width - ( columns - 1 ) * ( tileSizeNB.width ) + 2 * border;
- }
-
- /* Save tile size, with border */
- currentTileWidth = tw;
- currentTileHeight = th;
-
- gl.glViewport( 0, 0, tw, th );
-
- /* save current matrix mode */
- int[] matrixMode = new int[ 1 ];
- gl.glGetIntegerv( GL2.GL_MATRIX_MODE, matrixMode, 0 );
- gl.glMatrixMode( GL2.GL_PROJECTION );
- gl.glLoadIdentity();
-
- /* compute projection parameters */
- double l =
- left + ( right - left ) * ( currentColumn * tileSizeNB.width - border )
- / imageSize.width;
- double r = l + ( right - left ) * tw / imageSize.width;
- double b =
- bottom + ( top - bottom ) * ( currentRow * tileSizeNB.height - border )
- / imageSize.height;
- double t = b + ( top - bottom ) * th / imageSize.height;
-
- if( perspective ) {
- gl.glFrustum( l, r, b, t, near, far );
- } else {
- gl.glOrtho( l, r, b, t, near, far );
- }
-
- /* restore user's matrix mode */
- gl.glMatrixMode( matrixMode[ 0 ] );
- }
-
- /**
- * Must be called after rendering the scene
- *
- * @param gl
- * the gl context
- * @return true if there are more tiles to be rendered, false if
- * the final image is complete
- */
- public boolean endTile( GL2 gl )
- {
- int[] prevRowLength = new int[ 1 ], prevSkipRows = new int[ 1 ], prevSkipPixels = new int[ 1 ], prevAlignment =
- new int[ 1 ];
-
- assert ( currentTile >= 0 );
-
- // be sure OpenGL rendering is finished
- gl.glFlush();
-
- // save current glPixelStore values
- gl.glGetIntegerv( GL2.GL_PACK_ROW_LENGTH, prevRowLength, 0 );
- gl.glGetIntegerv( GL2.GL_PACK_SKIP_ROWS, prevSkipRows, 0 );
- gl.glGetIntegerv( GL2.GL_PACK_SKIP_PIXELS, prevSkipPixels, 0 );
- gl.glGetIntegerv( GL2.GL_PACK_ALIGNMENT, prevAlignment, 0 );
-
- if( tileBuffer != null ) {
- int srcX = tileBorder;
- int srcY = tileBorder;
- int srcWidth = tileSizeNB.width;
- int srcHeight = tileSizeNB.height;
- gl.glReadPixels( srcX, srcY, srcWidth, srcHeight, tileFormat, tileType, tileBuffer );
- }
-
- if( imageBuffer != null ) {
- int srcX = tileBorder;
- int srcY = tileBorder;
- int srcWidth = currentTileWidth - 2 * tileBorder;
- int srcHeight = currentTileHeight - 2 * tileBorder;
- int destX = tileSizeNB.width * currentColumn;
- int destY = tileSizeNB.height * currentRow;
-
- /* setup pixel store for glReadPixels */
- gl.glPixelStorei( GL2.GL_PACK_ROW_LENGTH, imageSize.width );
- gl.glPixelStorei( GL2.GL_PACK_SKIP_ROWS, destY );
- gl.glPixelStorei( GL2.GL_PACK_SKIP_PIXELS, destX );
- gl.glPixelStorei( GL2.GL_PACK_ALIGNMENT, 1 );
-
- /* read the tile into the final image */
- gl.glReadPixels( srcX, srcY, srcWidth, srcHeight, imageFormat, imageType, imageBuffer );
- }
-
- /* restore previous glPixelStore values */
- gl.glPixelStorei( GL2.GL_PACK_ROW_LENGTH, prevRowLength[ 0 ] );
- gl.glPixelStorei( GL2.GL_PACK_SKIP_ROWS, prevSkipRows[ 0 ] );
- gl.glPixelStorei( GL2.GL_PACK_SKIP_PIXELS, prevSkipPixels[ 0 ] );
- gl.glPixelStorei( GL2.GL_PACK_ALIGNMENT, prevAlignment[ 0 ] );
-
- /* increment tile counter, return 1 if more tiles left to render */
- currentTile++;
- if( currentTile >= rows * columns ) {
- /* restore user's viewport */
- gl.glViewport( viewportSave[ 0 ], viewportSave[ 1 ], viewportSave[ 2 ], viewportSave[ 3 ] );
- currentTile = -1; /* all done */
- return false;
- } else {
- return true;
- }
- }
-
- /**
- * Tile rendering causes problems with using glRasterPos3f, so you
- * should use this replacement instead
- *
- * @param x
- * As in glRasterPos3f
- * @param y
- * As in glRasterPos3f
- * @param z
- * As in glRasterPos3f
- * @param gl
- * The gl context
- * @param glu
- * A GLUgl2 object
- */
- public void trRasterPos3f( float x, float y, float z, GL2 gl, GLUgl2 glu )
- {
- if (currentTile < 0) {
- /* not doing tile rendering right now. Let OpenGL do this. */
- gl.glRasterPos3f( x, y, z );
- } else {
- double[] modelview = new double[ 16 ], proj = new double[ 16 ];
- int[] viewport = new int[ 4 ];
- double[] win = new double[3];
-
- /* Get modelview, projection and viewport */
- gl.glGetDoublev( GL2.GL_MODELVIEW_MATRIX, modelview, 0 );
- gl.glGetDoublev( GL2.GL_PROJECTION_MATRIX, proj, 0 );
- viewport[ 0 ] = 0;
- viewport[ 1 ] = 0;
- viewport[ 2 ] = currentTileWidth;
- viewport[ 3 ] = currentTileHeight;
-
- /* Project object coord to window coordinate */
- if( glu.gluProject( x, y, z, modelview, 0, proj, 0, viewport, 0, win, 0 ) ) {
-
- /* set raster pos to window coord (0,0) */
- gl.glMatrixMode( GL2.GL_MODELVIEW );
- gl.glPushMatrix();
- gl.glLoadIdentity();
- gl.glMatrixMode( GL2.GL_PROJECTION );
- gl.glPushMatrix();
- gl.glLoadIdentity();
- gl.glOrtho( 0.0, currentTileWidth, 0.0, currentTileHeight, 0.0, 1.0 );
- gl.glRasterPos3d( 0.0, 0.0, -win[ 2 ] );
-
- /*
- * Now use empty bitmap to adjust raster position to
- * (winX,winY)
- */
- {
- byte[] bitmap = { 0 };
- gl.glBitmap( 1, 1, 0.0f, 0.0f, ( float ) win[ 0 ], ( float ) win[ 1 ], bitmap , 0 );
- }
-
- /* restore original matrices */
- gl.glPopMatrix(); /* proj */
- gl.glMatrixMode( GL2.GL_MODELVIEW );
- gl.glPopMatrix();
- }
- }
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/glsl/GLSLArrayHandler.java b/src/jogl/classes/com/sun/opengl/util/glsl/GLSLArrayHandler.java
deleted file mode 100644
index 1ef9874e4..000000000
--- a/src/jogl/classes/com/sun/opengl/util/glsl/GLSLArrayHandler.java
+++ /dev/null
@@ -1,60 +0,0 @@
-
-package com.sun.opengl.util.glsl;
-
-import javax.media.opengl.*;
-import javax.media.opengl.fixedfunc.*;
-import com.sun.opengl.util.*;
-import com.sun.opengl.util.glsl.ShaderState;
-import java.nio.*;
-
-public class GLSLArrayHandler implements GLArrayHandler {
- private GLArrayDataEditable ad;
-
- public GLSLArrayHandler(GLArrayDataEditable ad) {
- this.ad = ad;
- }
-
- protected final void passVertexAttribPointer(GL2ES2 gl, ShaderState st) {
- st.glVertexAttribPointer(gl, ad);
- }
-
- public void enableBuffer(GL gl, boolean enable) {
- if(!gl.isGL2ES2()) {
- throw new GLException("GLSLArrayHandler expects a GL2ES2 implementation");
- }
- GL2ES2 glsl = gl.getGL2ES2();
- ShaderState st = ShaderState.getCurrent();
- if(null==st) {
- throw new GLException("No ShaderState current");
- }
-
- if(enable) {
- st.glEnableVertexAttribArray(glsl, ad.getName());
-
- Buffer buffer = ad.getBuffer();
-
- if(ad.isVBO()) {
- // always bind and refresh the VBO mgr,
- // in case more than one gl*Pointer objects are in use
- glsl.glBindBuffer(GL.GL_ARRAY_BUFFER, ad.getVBOName());
- if(!ad.isBufferWritten()) {
- if(null!=buffer) {
- glsl.glBufferData(GL.GL_ARRAY_BUFFER, buffer.limit() * ad.getComponentSize(), buffer, ad.getBufferUsage());
- }
- ad.setBufferWritten(true);
- }
- passVertexAttribPointer(glsl, st);
- } else if(null!=buffer) {
- passVertexAttribPointer(glsl, st);
- ad.setBufferWritten(true);
- }
- } else {
- if(ad.isVBO()) {
- glsl.glBindBuffer(GL.GL_ARRAY_BUFFER, 0);
- }
- st.glDisableVertexAttribArray(glsl, ad.getName());
- }
- }
-
-}
-
diff --git a/src/jogl/classes/com/sun/opengl/util/glsl/ShaderCode.java b/src/jogl/classes/com/sun/opengl/util/glsl/ShaderCode.java
deleted file mode 100644
index 606d2e1b5..000000000
--- a/src/jogl/classes/com/sun/opengl/util/glsl/ShaderCode.java
+++ /dev/null
@@ -1,347 +0,0 @@
-
-package com.sun.opengl.util.glsl;
-
-import javax.media.opengl.*;
-import com.sun.opengl.util.*;
-import com.sun.opengl.impl.Debug;
-
-import java.util.*;
-import java.nio.*;
-import java.io.*;
-import java.net.*;
-import java.security.*;
-
-public class ShaderCode {
- public static final boolean DEBUG = Debug.debug("GLSLCode");
- public static final boolean DEBUG_CODE = Debug.isPropertyDefined("jogl.debug.GLSLCode", true, AccessController.getContext());
-
- public static final String SUFFIX_VERTEX_SOURCE = "vp" ;
- public static final String SUFFIX_VERTEX_BINARY = "bvp" ;
- public static final String SUFFIX_FRAGMENT_SOURCE = "fp" ;
- public static final String SUFFIX_FRAGMENT_BINARY = "bfp" ;
-
- public static final String SUB_PATH_NVIDIA = "nvidia" ;
-
- public ShaderCode(int type, int number, String[][] source) {
- switch (type) {
- case GL2ES2.GL_VERTEX_SHADER:
- case GL2ES2.GL_FRAGMENT_SHADER:
- break;
- default:
- throw new GLException("Unknown shader type: "+type);
- }
- shaderSource = source;
- shaderBinaryFormat = -1;
- shaderBinary = null;
- shaderType = type;
- shader = BufferUtil.newIntBuffer(number);
- id = getNextID();
-
- if(DEBUG_CODE) {
- System.out.println("Created: "+toString());
- dumpShaderSource(System.out);
- }
- }
-
- public ShaderCode(int type, int number, int binFormat, Buffer binary) {
- switch (type) {
- case GL2ES2.GL_VERTEX_SHADER:
- case GL2ES2.GL_FRAGMENT_SHADER:
- break;
- default:
- throw new GLException("Unknown shader type: "+type);
- }
- shaderSource = null;
- shaderBinaryFormat = binFormat;
- shaderBinary = binary;
- shaderType = type;
- shader = BufferUtil.newIntBuffer(number);
- id = getNextID();
- }
-
- public static ShaderCode create(GL2ES2 gl, int type, int number, Class context, String[] sourceFiles) {
- if(!ShaderUtil.isShaderCompilerAvailable(gl)) return null;
-
- String[][] shaderSources = null;
- if(null!=sourceFiles) {
- shaderSources = new String[sourceFiles.length][1];
- for(int i=0; null!=shaderSources && i
-
- Negative coordinates and sizes are not supported, since they make
- no sense in the context of the packer, which deals only with
- positively sized regions.
-
- This class contains a user data field for efficient hookup to
- external data structures as well as enough other hooks to
- efficiently plug into the rectangle packer. */
-
-public class Rect {
- private int x;
- private int y;
- private int w;
- private int h;
-
- // The level we're currently installed in in the parent
- // RectanglePacker, or null if not hooked in to the table yet
- private Level level;
-
- // The user's object this rectangle represents.
- private Object userData;
-
- // Used transiently during re-layout of the backing store (when
- // there is no room left due either to fragmentation or just being
- // out of space)
- private Rect nextLocation;
-
- public Rect() {
- this(null);
- }
-
- public Rect(Object userData) {
- this(0, 0, 0, 0, userData);
- }
-
- public Rect(int x, int y, int w, int h, Object userData) {
- setPosition(x, y);
- setSize(w, h);
- setUserData(userData);
- }
-
- public int x() { return x; }
- public int y() { return y; }
- public int w() { return w; }
- public int h() { return h; }
- public Object getUserData() { return userData; }
- public Rect getNextLocation() { return nextLocation; }
-
- public void setPosition(int x, int y) {
- if (x < 0)
- throw new IllegalArgumentException("Negative x");
- if (y < 0)
- throw new IllegalArgumentException("Negative y");
- this.x = x;
- this.y = y;
- }
-
- public void setSize(int w, int h) throws IllegalArgumentException {
- if (w < 0)
- throw new IllegalArgumentException("Negative width");
- if (h < 0)
- throw new IllegalArgumentException("Negative height");
- this.w = w;
- this.h = h;
- }
-
- public void setUserData(Object obj) { userData = obj; }
- public void setNextLocation(Rect nextLocation) { this.nextLocation = nextLocation; }
-
- // Helpers for computations.
-
- /** Returns the maximum x-coordinate contained within this
- rectangle. Note that this returns a different result than Java
- 2D's rectangles; for a rectangle of position (0, 0) and size (1,
- 1) this will return 0, not 1. Returns -1 if the width of this
- rectangle is 0. */
- public int maxX() {
- if (w() < 1)
- return -1;
- return x() + w() - 1;
- }
-
- /** Returns the maximum y-coordinate contained within this
- rectangle. Note that this returns a different result than Java
- 2D's rectangles; for a rectangle of position (0, 0) and size (1,
- 1) this will return 0, not 1. Returns -1 if the height of this
- rectangle is 0. */
- public int maxY() {
- if (h() < 1)
- return -1;
- return y() + h() - 1;
- }
-
- public boolean canContain(Rect other) {
- return (w() >= other.w() &&
- h() >= other.h());
- }
-
- public String toString() {
- return "[Rect x: " + x() + " y: " + y() + " w: " + w() + " h: " + h() + "]";
- }
-
- // Unclear whether it's a good idea to override hashCode and equals
- // for these objects
- /*
- public boolean equals(Object other) {
- if (other == null || (!(other instanceof Rect))) {
- return false;
- }
-
- Rect r = (Rect) other;
- return (this.x() == r.x() &&
- this.y() == r.y() &&
- this.w() == r.w() &&
- this.h() == r.h());
- }
-
- public int hashCode() {
- return (x + y * 13 + w * 17 + h * 23);
- }
- */
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/packrect/RectVisitor.java b/src/jogl/classes/com/sun/opengl/util/packrect/RectVisitor.java
deleted file mode 100755
index 8f395ed99..000000000
--- a/src/jogl/classes/com/sun/opengl/util/packrect/RectVisitor.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.util.packrect;
-
-/** Iteration construct without exposing the internals of the
- RectanglePacker and without implementing a complex Iterator. */
-
-public interface RectVisitor {
- public void visit(Rect rect);
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/packrect/RectanglePacker.java b/src/jogl/classes/com/sun/opengl/util/packrect/RectanglePacker.java
deleted file mode 100755
index 51e6842c0..000000000
--- a/src/jogl/classes/com/sun/opengl/util/packrect/RectanglePacker.java
+++ /dev/null
@@ -1,306 +0,0 @@
-/*
- * Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.util.packrect;
-
-import java.util.*;
-
-/** Packs rectangles supplied by the user (typically representing
- image regions) into a larger backing store rectangle (typically
- representing a large texture). Supports automatic compaction of
- the space on the backing store, and automatic expansion of the
- backing store, when necessary. */
-
-public class RectanglePacker {
- private BackingStoreManager manager;
- private Object backingStore;
- private LevelSet levels;
- private float EXPANSION_FACTOR = 0.5f;
- private float SHRINK_FACTOR = 0.3f;
-
- private int initialWidth;
- private int initialHeight;
-
- private int maxWidth = -1;
- private int maxHeight = -1;
-
- static class RectHComparator implements Comparator {
- public int compare(Object o1, Object o2) {
- Rect r1 = (Rect) o1;
- Rect r2 = (Rect) o2;
- return r2.h() - r1.h();
- }
-
- public boolean equals(Object obj) {
- return this == obj;
- }
- }
- private static final Comparator rectHComparator = new RectHComparator();
-
- public RectanglePacker(BackingStoreManager manager,
- int initialWidth,
- int initialHeight) {
- this.manager = manager;
- levels = new LevelSet(initialWidth, initialHeight);
- this.initialWidth = initialWidth;
- this.initialHeight = initialHeight;
- }
-
- public Object getBackingStore() {
- if (backingStore == null) {
- backingStore = manager.allocateBackingStore(levels.w(), levels.h());
- }
-
- return backingStore;
- }
-
- /** Sets up a maximum width and height for the backing store. These
- are optional and if not specified the backing store will grow as
- necessary. Setting up a maximum width and height introduces the
- possibility that additions will fail; these are handled with the
- BackingStoreManager's allocationFailed notification. */
- public void setMaxSize(int maxWidth, int maxHeight) {
- this.maxWidth = maxWidth;
- this.maxHeight = maxHeight;
- }
-
- /** Decides upon an (x, y) position for the given rectangle (leaving
- its width and height unchanged) and places it on the backing
- store. May provoke re-layout of other Rects already added. If
- the BackingStoreManager does not support compaction, and {@link
- BackingStoreManager#preExpand BackingStoreManager.preExpand}
- does not clear enough space for the incoming rectangle, then
- this method will throw a RuntimeException. */
- public void add(Rect rect) throws RuntimeException {
- // Allocate backing store if we don't have any yet
- if (backingStore == null)
- backingStore = manager.allocateBackingStore(levels.w(), levels.h());
-
- int attemptNumber = 0;
- boolean tryAgain = false;
-
- do {
- // Try to allocate
- if (levels.add(rect))
- return;
-
- if (manager.canCompact()) {
- // Try to allocate with horizontal compaction
- if (levels.compactAndAdd(rect, backingStore, manager))
- return;
- // Let the manager have a chance at potentially evicting some entries
- tryAgain = manager.preExpand(rect, attemptNumber++);
- } else {
- tryAgain = manager.additionFailed(rect, attemptNumber++);
- }
- } while (tryAgain);
-
- if (!manager.canCompact()) {
- throw new RuntimeException("BackingStoreManager does not support compaction or expansion, and didn't clear space for new rectangle");
- }
-
- compactImpl(rect);
-
- // Retry the addition of the incoming rectangle
- add(rect);
- // Done
- }
-
- /** Removes the given rectangle from this RectanglePacker. */
- public void remove(Rect rect) {
- levels.remove(rect);
- }
-
- /** Visits all Rects contained in this RectanglePacker. */
- public void visit(RectVisitor visitor) {
- levels.visit(visitor);
- }
-
- /** Returns the vertical fragmentation ratio of this
- RectanglePacker. This is defined as the ratio of the sum of the
- heights of all completely empty Levels divided by the overall
- used height of the LevelSet. A high vertical fragmentation ratio
- indicates that it may be profitable to perform a compaction. */
- public float verticalFragmentationRatio() {
- return levels.verticalFragmentationRatio();
- }
-
- /** Forces a compaction cycle, which typically results in allocating
- a new backing store and copying all entries to it. */
- public void compact() {
- compactImpl(null);
- }
-
- // The "cause" rect may be null
- private void compactImpl(Rect cause) {
- // Have to either expand, compact or both. Need to figure out what
- // direction to go. Prefer to expand vertically. Expand
- // horizontally only if rectangle being added is too wide. FIXME:
- // may want to consider rebalancing the width and height to be
- // more equal if it turns out we keep expanding in the vertical
- // direction.
- boolean done = false;
- int newWidth = levels.w();
- int newHeight = levels.h();
- LevelSet nextLevelSet = null;
- int attemptNumber = 0;
- boolean needAdditionFailureNotification = false;
-
- while (!done) {
- if (cause != null) {
- if (cause.w() > newWidth) {
- newWidth = cause.w();
- } else {
- newHeight = (int) (newHeight * (1.0f + EXPANSION_FACTOR));
- }
- }
-
- // Clamp to maximum values
- needAdditionFailureNotification = false;
- if (maxWidth > 0 && newWidth > maxWidth) {
- newWidth = maxWidth;
- needAdditionFailureNotification = true;
- }
- if (maxHeight > 0 && newHeight > maxHeight) {
- newHeight = maxHeight;
- needAdditionFailureNotification = true;
- }
-
- nextLevelSet = new LevelSet(newWidth, newHeight);
-
- // Make copies of all existing rectangles
- List/*
-
diff --git a/src/jogl/classes/com/sun/opengl/util/texture/Texture.java b/src/jogl/classes/com/sun/opengl/util/texture/Texture.java
deleted file mode 100755
index 3a2799cf3..000000000
--- a/src/jogl/classes/com/sun/opengl/util/texture/Texture.java
+++ /dev/null
@@ -1,1120 +0,0 @@
-/*
- * Copyright (c) 2005 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- */
-
-package com.sun.opengl.util.texture;
-
-import java.nio.*;
-import java.security.*;
-
-import javax.media.opengl.*;
-import javax.media.opengl.glu.*;
-import javax.media.nativewindow.NativeWindowFactory;
-import com.sun.opengl.impl.*;
-import com.sun.opengl.util.texture.*;
-import com.sun.opengl.util.texture.spi.*;
-
-/**
- * Represents an OpenGL texture object. Contains convenience routines
- * for enabling/disabling OpenGL texture state, binding this texture,
- * and computing texture coordinates for both the entire image as well
- * as a sub-image.
- *
- * Non-power-of-two restrictions
- * One caveat in this approach is that certain texture wrap modes
- * (e.g. Performance Tips
- * Alpha premultiplication and blending
- * Provides input and output facilities for both loading OpenGL
- textures from disk and streams as well as writing textures already
- in memory back to disk. The TextureIO class supports an arbitrary number of plug-in
- readers and writers via TextureProviders and TextureWriters.
- TextureProviders know how to produce TextureData objects from
- files, InputStreams and URLs. TextureWriters know how to write
- TextureData objects to disk in various file formats. The
- TextureData class represents the raw data of the texture before it
- has been converted to an OpenGL texture object. The Texture class
- represents the OpenGL texture object and provides easy facilities
- for using the texture. There are several built-in TextureProviders and TextureWriters
- supplied with the TextureIO implementation. The most basic
- provider uses the platform's Image I/O facilities to read in a
- BufferedImage and convert it to a texture. This is the baseline
- provider and is registered so that it is the last one consulted.
- All others are asked first to open a given file. There are three other providers registered by default as of
- the time of this writing. One handles SGI RGB (".sgi", ".rgb")
- images from both files and streams. One handles DirectDraw Surface
- (".dds") images read from files, though can not read these images
- from streams. One handles Targa (".tga") images read from both
- files and streams. These providers are executed in an arbitrary
- order. Some of these providers require the file's suffix to either
- be specified via the newTextureData methods or for the file to be
- named with the appropriate suffix. In general a file suffix should
- be provided to the newTexture and newTextureData methods if at all
- possible. Note that additional TextureProviders, if reading images from
- InputStreams, must use the mark()/reset() methods on InputStream
- when probing for e.g. magic numbers at the head of the file to
- make sure not to disturb the state of the InputStream for
- downstream TextureProviders. There are analogous TextureWriters provided for writing
- textures back to disk if desired. As of this writing, there are
- four TextureWriters registered by default: one for Targa files,
- one for SGI RGB files, one for DirectDraw surface (.dds) files,
- and one for ImageIO-supplied formats such as .jpg and .png. Some
- of these writers have certain limitations such as only being able
- to write out textures stored in GL_RGB or GL_RGBA format. The DDS
- writer supports fetching and writing to disk of texture data in
- DXTn compressed format. Whether this will occur is dependent on
- whether the texture's internal format is one of the DXTn
- compressed formats and whether the target file is .dds format.
-*/
-
-public class TextureIO {
- /** Constant which can be used as a file suffix to indicate a
- DirectDraw Surface file. */
- public static final String DDS = "dds";
-
- /** Constant which can be used as a file suffix to indicate an SGI
- RGB file. */
- public static final String SGI = "sgi";
-
- /** Constant which can be used as a file suffix to indicate an SGI
- RGB file. */
- public static final String SGI_RGB = "rgb";
-
- /** Constant which can be used as a file suffix to indicate a GIF
- file. */
- public static final String GIF = "gif";
-
- /** Constant which can be used as a file suffix to indicate a JPEG
- file. */
- public static final String JPG = "jpg";
-
- /** Constant which can be used as a file suffix to indicate a PNG
- file. */
- public static final String PNG = "png";
-
- /** Constant which can be used as a file suffix to indicate a Targa
- file. */
- public static final String TGA = "tga";
-
- /** Constant which can be used as a file suffix to indicate a TIFF
- file. */
- public static final String TIFF = "tiff";
-
- private static final boolean DEBUG = Debug.debug("TextureIO");
-
- // For manually disabling the use of the texture rectangle
- // extensions so you know the texture target is GL_TEXTURE_2D; this
- // is useful for shader writers (thanks to Chris Campbell for this
- // observation)
- private static boolean texRectEnabled = true;
-
- //----------------------------------------------------------------------
- // methods that *do not* require a current context
- // These methods assume RGB or RGBA textures.
- // Some texture providers may not recognize the file format unless
- // the fileSuffix is specified, so it is strongly recommended to
- // specify it wherever it is known.
- // Some texture providers may also only support one kind of input,
- // i.e., reading from a file as opposed to a stream.
-
- /**
- * Creates a TextureData from the given file. Does no OpenGL work.
- *
- * @param glp the OpenGL Profile this texture data should be
- * created for.
- * @param file the file from which to read the texture data
- * @param mipmap whether mipmaps should be produced for this
- * texture either by autogenerating them or
- * reading them from the file. Some file formats
- * support multiple mipmaps in a single file in
- * which case those mipmaps will be used rather
- * than generating them.
- * @param fileSuffix the suffix of the file name to be used as a
- * hint of the file format to the underlying
- * texture provider, or null if none and should be
- * auto-detected (some texture providers do not
- * support this)
- * @return the texture data from the file, or null if none of the
- * registered texture providers could read the file
- * @throws IOException if an error occurred while reading the file
- */
- public static TextureData newTextureData(GLProfile glp, File file,
- boolean mipmap,
- String fileSuffix) throws IOException {
- if (fileSuffix == null) {
- fileSuffix = FileUtil.getFileSuffix(file);
- }
- return newTextureDataImpl(glp, file, 0, 0, mipmap, fileSuffix);
- }
-
- /**
- * Creates a TextureData from the given stream. Does no OpenGL work.
- *
- * @param glp the OpenGL Profile this texture data should be
- * created for.
- * @param stream the stream from which to read the texture data
- * @param mipmap whether mipmaps should be produced for this
- * texture either by autogenerating them or
- * reading them from the file. Some file formats
- * support multiple mipmaps in a single file in
- * which case those mipmaps will be used rather
- * than generating them.
- * @param fileSuffix the suffix of the file name to be used as a
- * hint of the file format to the underlying
- * texture provider, or null if none and should be
- * auto-detected (some texture providers do not
- * support this)
- * @return the texture data from the stream, or null if none of the
- * registered texture providers could read the stream
- * @throws IOException if an error occurred while reading the stream
- */
- public static TextureData newTextureData(GLProfile glp, InputStream stream,
- boolean mipmap,
- String fileSuffix) throws IOException {
- return newTextureDataImpl(glp, stream, 0, 0, mipmap, fileSuffix);
- }
-
- /**
- * Creates a TextureData from the given URL. Does no OpenGL work.
- *
- * @param glp the OpenGL Profile this texture data should be
- * created for.
- * @param url the URL from which to read the texture data
- * @param mipmap whether mipmaps should be produced for this
- * texture either by autogenerating them or
- * reading them from the file. Some file formats
- * support multiple mipmaps in a single file in
- * which case those mipmaps will be used rather
- * than generating them.
- * @param fileSuffix the suffix of the file name to be used as a
- * hint of the file format to the underlying
- * texture provider, or null if none and should be
- * auto-detected (some texture providers do not
- * support this)
- * @return the texture data from the URL, or null if none of the
- * registered texture providers could read the URL
- * @throws IOException if an error occurred while reading the URL
- */
- public static TextureData newTextureData(GLProfile glp, URL url,
- boolean mipmap,
- String fileSuffix) throws IOException {
- if (fileSuffix == null) {
- fileSuffix = FileUtil.getFileSuffix(url.getPath());
- }
- return newTextureDataImpl(glp, url, 0, 0, mipmap, fileSuffix);
- }
-
- //----------------------------------------------------------------------
- // These methods make no assumption about the OpenGL internal format
- // or pixel format of the texture; they must be specified by the
- // user. It is not allowed to supply 0 (indicating no preference)
- // for either the internalFormat or the pixelFormat;
- // IllegalArgumentException will be thrown in this case.
-
- /**
- * Creates a TextureData from the given file, using the specified
- * OpenGL internal format and pixel format for the texture which
- * will eventually result. The internalFormat and pixelFormat must
- * be specified and may not be zero; to use default values, use the
- * variant of this method which does not take these arguments. Does
- * no OpenGL work.
- *
- * @param glp the OpenGL Profile this texture data should be
- * created for.
- * @param file the file from which to read the texture data
- * @param internalFormat the OpenGL internal format of the texture
- * which will eventually result from the TextureData
- * @param pixelFormat the OpenGL pixel format of the texture
- * which will eventually result from the TextureData
- * @param mipmap whether mipmaps should be produced for this
- * texture either by autogenerating them or
- * reading them from the file. Some file formats
- * support multiple mipmaps in a single file in
- * which case those mipmaps will be used rather
- * than generating them.
- * @param fileSuffix the suffix of the file name to be used as a
- * hint of the file format to the underlying
- * texture provider, or null if none and should be
- * auto-detected (some texture providers do not
- * support this)
- * @return the texture data from the file, or null if none of the
- * registered texture providers could read the file
- * @throws IllegalArgumentException if either internalFormat or
- * pixelFormat was 0
- * @throws IOException if an error occurred while reading the file
- */
- public static TextureData newTextureData(GLProfile glp, File file,
- int internalFormat,
- int pixelFormat,
- boolean mipmap,
- String fileSuffix) throws IOException, IllegalArgumentException {
- if ((internalFormat == 0) || (pixelFormat == 0)) {
- throw new IllegalArgumentException("internalFormat and pixelFormat must be non-zero");
- }
-
- if (fileSuffix == null) {
- fileSuffix = FileUtil.getFileSuffix(file);
- }
-
- return newTextureDataImpl(glp, file, internalFormat, pixelFormat, mipmap, fileSuffix);
- }
-
- /**
- * Creates a TextureData from the given stream, using the specified
- * OpenGL internal format and pixel format for the texture which
- * will eventually result. The internalFormat and pixelFormat must
- * be specified and may not be zero; to use default values, use the
- * variant of this method which does not take these arguments. Does
- * no OpenGL work.
- *
- * @param glp the OpenGL Profile this texture data should be
- * created for.
- * @param stream the stream from which to read the texture data
- * @param internalFormat the OpenGL internal format of the texture
- * which will eventually result from the TextureData
- * @param pixelFormat the OpenGL pixel format of the texture
- * which will eventually result from the TextureData
- * @param mipmap whether mipmaps should be produced for this
- * texture either by autogenerating them or
- * reading them from the file. Some file formats
- * support multiple mipmaps in a single file in
- * which case those mipmaps will be used rather
- * than generating them.
- * @param fileSuffix the suffix of the file name to be used as a
- * hint of the file format to the underlying
- * texture provider, or null if none and should be
- * auto-detected (some texture providers do not
- * support this)
- * @return the texture data from the stream, or null if none of the
- * registered texture providers could read the stream
- * @throws IllegalArgumentException if either internalFormat or
- * pixelFormat was 0
- * @throws IOException if an error occurred while reading the stream
- */
- public static TextureData newTextureData(GLProfile glp, InputStream stream,
- int internalFormat,
- int pixelFormat,
- boolean mipmap,
- String fileSuffix) throws IOException, IllegalArgumentException {
- if ((internalFormat == 0) || (pixelFormat == 0)) {
- throw new IllegalArgumentException("internalFormat and pixelFormat must be non-zero");
- }
-
- return newTextureDataImpl(glp, stream, internalFormat, pixelFormat, mipmap, fileSuffix);
- }
-
- /**
- * Creates a TextureData from the given URL, using the specified
- * OpenGL internal format and pixel format for the texture which
- * will eventually result. The internalFormat and pixelFormat must
- * be specified and may not be zero; to use default values, use the
- * variant of this method which does not take these arguments. Does
- * no OpenGL work.
- *
- * @param glp the OpenGL Profile this texture data should be
- * created for.
- * @param url the URL from which to read the texture data
- * @param internalFormat the OpenGL internal format of the texture
- * which will eventually result from the TextureData
- * @param pixelFormat the OpenGL pixel format of the texture
- * which will eventually result from the TextureData
- * @param mipmap whether mipmaps should be produced for this
- * texture either by autogenerating them or
- * reading them from the file. Some file formats
- * support multiple mipmaps in a single file in
- * which case those mipmaps will be used rather
- * than generating them.
- * @param fileSuffix the suffix of the file name to be used as a
- * hint of the file format to the underlying
- * texture provider, or null if none and should be
- * auto-detected (some texture providers do not
- * support this)
- * @return the texture data from the URL, or null if none of the
- * registered texture providers could read the URL
- * @throws IllegalArgumentException if either internalFormat or
- * pixelFormat was 0
- * @throws IOException if an error occurred while reading the URL
- */
- public static TextureData newTextureData(GLProfile glp, URL url,
- int internalFormat,
- int pixelFormat,
- boolean mipmap,
- String fileSuffix) throws IOException, IllegalArgumentException {
- if ((internalFormat == 0) || (pixelFormat == 0)) {
- throw new IllegalArgumentException("internalFormat and pixelFormat must be non-zero");
- }
-
- if (fileSuffix == null) {
- fileSuffix = FileUtil.getFileSuffix(url.getPath());
- }
-
- return newTextureDataImpl(glp, url, internalFormat, pixelFormat, mipmap, fileSuffix);
- }
-
- //----------------------------------------------------------------------
- // methods that *do* require a current context
- //
-
- /**
- * Creates an OpenGL texture object from the specified TextureData
- * using the current OpenGL context.
- *
- * @param data the texture data to turn into an OpenGL texture
- * @throws GLException if no OpenGL context is current or if an
- * OpenGL error occurred
- * @throws IllegalArgumentException if the passed TextureData was null
- */
- public static Texture newTexture(TextureData data) throws GLException, IllegalArgumentException {
- if (data == null) {
- throw new IllegalArgumentException("Null TextureData");
- }
- return new Texture(data);
- }
-
- /**
- * Creates an OpenGL texture object from the specified file using
- * the current OpenGL context.
- *
- * @param file the file from which to read the texture data
- * @param mipmap whether mipmaps should be produced for this
- * texture either by autogenerating them or
- * reading them from the file. Some file formats
- * support multiple mipmaps in a single file in
- * which case those mipmaps will be used rather
- * than generating them.
- * @throws IOException if an error occurred while reading the file
- * @throws GLException if no OpenGL context is current or if an
- * OpenGL error occurred
- */
- public static Texture newTexture(File file, boolean mipmap) throws IOException, GLException {
- GLProfile glp = GLContext.getCurrentGL().getGLProfile();
- TextureData data = newTextureData(glp, file, mipmap, FileUtil.getFileSuffix(file));
- Texture texture = newTexture(data);
- data.flush();
- return texture;
- }
-
- /**
- * Creates an OpenGL texture object from the specified stream using
- * the current OpenGL context.
- *
- * @param stream the stream from which to read the texture data
- * @param mipmap whether mipmaps should be produced for this
- * texture either by autogenerating them or
- * reading them from the file. Some file formats
- * support multiple mipmaps in a single file in
- * which case those mipmaps will be used rather
- * than generating them.
- * @param fileSuffix the suffix of the file name to be used as a
- * hint of the file format to the underlying
- * texture provider, or null if none and should be
- * auto-detected (some texture providers do not
- * support this)
- * @throws IOException if an error occurred while reading the stream
- * @throws GLException if no OpenGL context is current or if an
- * OpenGL error occurred
- */
- public static Texture newTexture(InputStream stream, boolean mipmap, String fileSuffix) throws IOException, GLException {
- GLProfile glp = GLContext.getCurrentGL().getGLProfile();
- TextureData data = newTextureData(glp, stream, mipmap, fileSuffix);
- Texture texture = newTexture(data);
- data.flush();
- return texture;
- }
-
- /**
- * Creates an OpenGL texture object from the specified URL using the
- * current OpenGL context.
- *
- * @param url the URL from which to read the texture data
- * @param mipmap whether mipmaps should be produced for this
- * texture either by autogenerating them or
- * reading them from the file. Some file formats
- * support multiple mipmaps in a single file in
- * which case those mipmaps will be used rather
- * than generating them.
- * @param fileSuffix the suffix of the file name to be used as a
- * hint of the file format to the underlying
- * texture provider, or null if none and should be
- * auto-detected (some texture providers do not
- * support this)
- * @throws IOException if an error occurred while reading the URL
- * @throws GLException if no OpenGL context is current or if an
- * OpenGL error occurred
- */
- public static Texture newTexture(URL url, boolean mipmap, String fileSuffix) throws IOException, GLException {
- if (fileSuffix == null) {
- fileSuffix = FileUtil.getFileSuffix(url.getPath());
- }
- GLProfile glp = GLContext.getCurrentGL().getGLProfile();
- TextureData data = newTextureData(glp, url, mipmap, fileSuffix);
- Texture texture = newTexture(data);
- data.flush();
- return texture;
- }
-
- /**
- * Creates an OpenGL texture object associated with the given OpenGL
- * texture target using the current OpenGL context. The texture has
- * no initial data. This is used, for example, to construct cube
- * maps out of multiple TextureData objects.
- *
- * @param target the OpenGL target type, eg GL.GL_TEXTURE_2D,
- * GL.GL_TEXTURE_RECTANGLE_ARB
- *
- * @throws GLException if no OpenGL context is current or if an
- * OpenGL error occurred
- */
- public static Texture newTexture(int target) throws GLException {
- return new Texture(target);
- }
-
- /**
- * Wraps an OpenGL texture ID from an external library and allows
- * some of the base methods from the Texture class, such as
- * binding and querying of texture coordinates, to be used with
- * it. Attempts to update such textures' contents will yield
- * undefined results.
- *
- * @param textureID the OpenGL texture object to wrap
- * @param target the OpenGL texture target, eg GL.GL_TEXTURE_2D,
- * GL2.GL_TEXTURE_RECTANGLE
- * @param texWidth the width of the texture in pixels
- * @param texHeight the height of the texture in pixels
- * @param imgWidth the width of the image within the texture in
- * pixels (if the content is a sub-rectangle in the upper
- * left corner); otherwise, pass in texWidth
- * @param imgHeight the height of the image within the texture in
- * pixels (if the content is a sub-rectangle in the upper
- * left corner); otherwise, pass in texHeight
- * @param mustFlipVertically indicates whether the texture
- * coordinates must be flipped vertically
- * in order to properly display the
- * texture
- */
- public static Texture newTexture(int textureID,
- int target,
- int texWidth,
- int texHeight,
- int imgWidth,
- int imgHeight,
- boolean mustFlipVertically) {
- return new Texture(textureID,
- target,
- texWidth,
- texHeight,
- imgWidth,
- imgHeight,
- mustFlipVertically);
- }
-
- /**
- * Writes the given texture to a file. The type of the file is
- * inferred from its suffix. An OpenGL context must be current in
- * order to fetch the texture data back from the OpenGL pipeline.
- * This method causes the specified Texture to be bound to the
- * GL_TEXTURE_2D state. If no suitable writer for the requested file
- * format was found, throws an IOException.
- *
- * Reasonable attempts are made to produce good results in the
- * resulting images. The Targa, SGI and ImageIO writers produce
- * results in the correct vertical orientation for those file
- * formats. The DDS writer performs no vertical flip of the data,
- * even in uncompressed mode. (It is impossible to perform such a
- * vertical flip with compressed data.) Applications should keep
- * this in mind when using this routine to save textures to disk for
- * later re-loading.
- *
- * Any mipmaps for the specified texture are currently discarded
- * when it is written to disk, regardless of whether the underlying
- * file format supports multiple mipmaps in a given file.
- *
- * @throws IOException if an error occurred during writing or no
- * suitable writer was found
- * @throws GLException if no OpenGL context was current or an
- * OpenGL-related error occurred
- */
- public static void write(Texture texture, File file) throws IOException, GLException {
- if (texture.getTarget() != GL.GL_TEXTURE_2D) {
- throw new GLException("Only GL_TEXTURE_2D textures are supported");
- }
-
- // First fetch the texture data
- GL _gl = GLContext.getCurrentGL();
- if (!_gl.isGL2()) {
- throw new GLException("Only GL2 supports fetching compressed images, GL: " + _gl);
- }
- GL2 gl = _gl.getGL2();
-
- texture.bind();
- int internalFormat = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2.GL_TEXTURE_INTERNAL_FORMAT);
- int width = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2.GL_TEXTURE_WIDTH);
- int height = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2.GL_TEXTURE_HEIGHT);
- int border = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2.GL_TEXTURE_BORDER);
- TextureData data = null;
- if (internalFormat == GL.GL_COMPRESSED_RGB_S3TC_DXT1_EXT ||
- internalFormat == GL.GL_COMPRESSED_RGBA_S3TC_DXT1_EXT ||
- internalFormat == GL.GL_COMPRESSED_RGBA_S3TC_DXT3_EXT ||
- internalFormat == GL.GL_COMPRESSED_RGBA_S3TC_DXT5_EXT) {
- // Fetch using glGetCompressedTexImage
- int size = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2.GL_TEXTURE_COMPRESSED_IMAGE_SIZE);
- ByteBuffer res = ByteBuffer.wrap(new byte[size]);
- gl.glGetCompressedTexImage(GL.GL_TEXTURE_2D, 0, res);
- data = new TextureData(gl.getGLProfile(), internalFormat, width, height, border, internalFormat, GL.GL_UNSIGNED_BYTE,
- false, true, true, res, null);
- } else {
- int bytesPerPixel = 0;
- int fetchedFormat = 0;
- switch (internalFormat) {
- case GL.GL_RGB:
- case GL2.GL_BGR:
- case GL.GL_RGB8:
- bytesPerPixel = 3;
- fetchedFormat = GL.GL_RGB;
- break;
- case GL.GL_RGBA:
- case GL2.GL_BGRA:
- case GL2.GL_ABGR_EXT:
- case GL.GL_RGBA8:
- bytesPerPixel = 4;
- fetchedFormat = GL.GL_RGBA;
- break;
- default:
- throw new IOException("Unsupported texture internal format 0x" + Integer.toHexString(internalFormat));
- }
-
- // Fetch using glGetTexImage
- int packAlignment = glGetInteger(GL.GL_PACK_ALIGNMENT);
- int packRowLength = glGetInteger(GL2.GL_PACK_ROW_LENGTH);
- int packSkipRows = glGetInteger(GL2.GL_PACK_SKIP_ROWS);
- int packSkipPixels = glGetInteger(GL2.GL_PACK_SKIP_PIXELS);
- int packSwapBytes = glGetInteger(GL2.GL_PACK_SWAP_BYTES);
-
- gl.glPixelStorei(GL.GL_PACK_ALIGNMENT, 1);
- gl.glPixelStorei(GL2.GL_PACK_ROW_LENGTH, 0);
- gl.glPixelStorei(GL2.GL_PACK_SKIP_ROWS, 0);
- gl.glPixelStorei(GL2.GL_PACK_SKIP_PIXELS, 0);
- gl.glPixelStorei(GL2.GL_PACK_SWAP_BYTES, 0);
-
- ByteBuffer res = ByteBuffer.wrap(new byte[(width + (2 * border)) *
- (height + (2 * border)) *
- bytesPerPixel]);
- if (DEBUG) {
- System.out.println("Allocated buffer of size " + res.remaining() + " for fetched image (" +
- ((fetchedFormat == GL.GL_RGB) ? "GL_RGB" : "GL_RGBA") + ")");
- }
- gl.glGetTexImage(GL.GL_TEXTURE_2D, 0, fetchedFormat, GL.GL_UNSIGNED_BYTE, res);
-
- gl.glPixelStorei(GL.GL_PACK_ALIGNMENT, packAlignment);
- gl.glPixelStorei(GL2.GL_PACK_ROW_LENGTH, packRowLength);
- gl.glPixelStorei(GL2.GL_PACK_SKIP_ROWS, packSkipRows);
- gl.glPixelStorei(GL2.GL_PACK_SKIP_PIXELS, packSkipPixels);
- gl.glPixelStorei(GL2.GL_PACK_SWAP_BYTES, packSwapBytes);
-
- data = new TextureData(gl.getGLProfile(), internalFormat, width, height, border, fetchedFormat, GL.GL_UNSIGNED_BYTE,
- false, false, false, res, null);
-
- if (DEBUG) {
- System.out.println("data.getPixelFormat() = " +
- ((data.getPixelFormat() == GL.GL_RGB) ? "GL_RGB" : "GL_RGBA"));
- }
- }
-
- write(data, file);
- }
-
- public static void write(TextureData data, File file) throws IOException, GLException {
- for (Iterator iter = textureWriters.iterator(); iter.hasNext(); ) {
- TextureWriter writer = (TextureWriter) iter.next();
- if (writer.write(file, data)) {
- return;
- }
- }
-
- throw new IOException("No suitable texture writer found for "+file.getAbsolutePath());
- }
-
- //----------------------------------------------------------------------
- // SPI support
- //
-
- /** Adds a TextureProvider to support reading of a new file
- format. */
- public static void addTextureProvider(TextureProvider provider) {
- // Must always add at the front so the ImageIO provider is last,
- // so we don't accidentally use it instead of a user's possibly
- // more optimal provider
- textureProviders.add(0, provider);
- }
-
- /** Adds a TextureWriter to support writing of a new file
- format. */
- public static void addTextureWriter(TextureWriter writer) {
- // Must always add at the front so the ImageIO writer is last,
- // so we don't accidentally use it instead of a user's possibly
- // more optimal writer
- textureWriters.add(0, writer);
- }
-
- //---------------------------------------------------------------------------
- // Global disabling of texture rectangle extension
- //
-
- /** Toggles the use of the GL_ARB_texture_rectangle extension by the
- TextureIO classes. By default, on hardware supporting this
- extension, the TextureIO classes may use the
- GL_ARB_texture_rectangle extension for non-power-of-two
- textures. (If the hardware supports the
- GL_ARB_texture_non_power_of_two extension, that one is
- preferred.) In some situations, for example when writing
- shaders, it is advantageous to force the texture target to
- always be GL_TEXTURE_2D in order to have one version of the
- shader, even at the expense of texture memory in the case where
- NPOT textures are not supported. This method allows the use of
- the GL_ARB_texture_rectangle extension to be turned off globally
- for this purpose. The default is that the use of the extension
- is enabled. */
- public static void setTexRectEnabled(boolean enabled) {
- texRectEnabled = enabled;
- }
-
- /** Indicates whether the GL_ARB_texture_rectangle extension is
- allowed to be used for non-power-of-two textures; see {@link
- #setTexRectEnabled setTexRectEnabled}. */
- public static boolean isTexRectEnabled() {
- return texRectEnabled;
- }
-
- //----------------------------------------------------------------------
- // Internals only below this point
- //
-
- private static List/* Provides input and output facilities for both loading OpenGL
- textures from disk and streams as well as writing textures already
- in memory back to disk. The TextureIO class supports an arbitrary number of plug-in
- readers and writers via TextureProviders and TextureWriters.
- TextureProviders know how to produce TextureData objects from
- files, InputStreams and URLs. TextureWriters know how to write
- TextureData objects to disk in various file formats. The
- TextureData class represents the raw data of the texture before it
- has been converted to an OpenGL texture object. The Texture class
- represents the OpenGL texture object and provides easy facilities
- for using the texture. There are several built-in TextureProviders and TextureWriters
- supplied with the TextureIO implementation. The most basic
- provider uses the platform's Image I/O facilities to read in a
- BufferedImage and convert it to a texture. This is the baseline
- provider and is registered so that it is the last one consulted.
- All others are asked first to open a given file. There are three other providers registered by default as of
- the time of this writing. One handles SGI RGB (".sgi", ".rgb")
- images from both files and streams. One handles DirectDraw Surface
- (".dds") images read from files, though can not read these images
- from streams. One handles Targa (".tga") images read from both
- files and streams. These providers are executed in an arbitrary
- order. Some of these providers require the file's suffix to either
- be specified via the newTextureData methods or for the file to be
- named with the appropriate suffix. In general a file suffix should
- be provided to the newTexture and newTextureData methods if at all
- possible. Note that additional TextureProviders, if reading images from
- InputStreams, must use the mark()/reset() methods on InputStream
- when probing for e.g. magic numbers at the head of the file to
- make sure not to disturb the state of the InputStream for
- downstream TextureProviders. There are analogous TextureWriters provided for writing
- textures back to disk if desired. As of this writing, there are
- four TextureWriters registered by default: one for Targa files,
- one for SGI RGB files, one for DirectDraw surface (.dds) files,
- and one for ImageIO-supplied formats such as .jpg and .png. Some
- of these writers have certain limitations such as only being able
- to write out textures stored in GL_RGB or GL_RGBA format. The DDS
- writer supports fetching and writing to disk of texture data in
- DXTn compressed format. Whether this will occur is dependent on
- whether the texture's internal format is one of the DXTn
- compressed formats and whether the target file is .dds format.
-*/
-
-public class TextureIO {
- /** Constant which can be used as a file suffix to indicate a
- DirectDraw Surface file. */
- public static final String DDS = "dds";
-
- /** Constant which can be used as a file suffix to indicate an SGI
- RGB file. */
- public static final String SGI = "sgi";
-
- /** Constant which can be used as a file suffix to indicate an SGI
- RGB file. */
- public static final String SGI_RGB = "rgb";
-
- /** Constant which can be used as a file suffix to indicate a GIF
- file. */
- public static final String GIF = "gif";
-
- /** Constant which can be used as a file suffix to indicate a JPEG
- file. */
- public static final String JPG = "jpg";
-
- /** Constant which can be used as a file suffix to indicate a PNG
- file. */
- public static final String PNG = "png";
-
- /** Constant which can be used as a file suffix to indicate a Targa
- file. */
- public static final String TGA = "tga";
-
- /** Constant which can be used as a file suffix to indicate a TIFF
- file. */
- public static final String TIFF = "tiff";
-
- private static final boolean DEBUG = Debug.debug("TextureIO");
-
- // For manually disabling the use of the texture rectangle
- // extensions so you know the texture target is GL_TEXTURE_2D; this
- // is useful for shader writers (thanks to Chris Campbell for this
- // observation)
- private static boolean texRectEnabled = true;
-
- //----------------------------------------------------------------------
- // methods that *do not* require a current context
- // These methods assume RGB or RGBA textures.
- // Some texture providers may not recognize the file format unless
- // the fileSuffix is specified, so it is strongly recommended to
- // specify it wherever it is known.
- // Some texture providers may also only support one kind of input,
- // i.e., reading from a file as opposed to a stream.
-
- /**
- * Creates a TextureData from the given file. Does no OpenGL work.
- *
- * @param glp the OpenGL Profile this texture data should be
- * created for.
- * @param file the file from which to read the texture data
- * @param mipmap whether mipmaps should be produced for this
- * texture either by autogenerating them or
- * reading them from the file. Some file formats
- * support multiple mipmaps in a single file in
- * which case those mipmaps will be used rather
- * than generating them.
- * @param fileSuffix the suffix of the file name to be used as a
- * hint of the file format to the underlying
- * texture provider, or null if none and should be
- * auto-detected (some texture providers do not
- * support this)
- * @return the texture data from the file, or null if none of the
- * registered texture providers could read the file
- * @throws IOException if an error occurred while reading the file
- */
- public static TextureData newTextureData(GLProfile glp, File file,
- boolean mipmap,
- String fileSuffix) throws IOException {
- if (fileSuffix == null) {
- fileSuffix = FileUtil.getFileSuffix(file);
- }
- return newTextureDataImpl(glp, file, 0, 0, mipmap, fileSuffix);
- }
-
- /**
- * Creates a TextureData from the given stream. Does no OpenGL work.
- *
- * @param glp the OpenGL Profile this texture data should be
- * created for.
- * @param stream the stream from which to read the texture data
- * @param mipmap whether mipmaps should be produced for this
- * texture either by autogenerating them or
- * reading them from the file. Some file formats
- * support multiple mipmaps in a single file in
- * which case those mipmaps will be used rather
- * than generating them.
- * @param fileSuffix the suffix of the file name to be used as a
- * hint of the file format to the underlying
- * texture provider, or null if none and should be
- * auto-detected (some texture providers do not
- * support this)
- * @return the texture data from the stream, or null if none of the
- * registered texture providers could read the stream
- * @throws IOException if an error occurred while reading the stream
- */
- public static TextureData newTextureData(GLProfile glp, InputStream stream,
- boolean mipmap,
- String fileSuffix) throws IOException {
- return newTextureDataImpl(glp, stream, 0, 0, mipmap, fileSuffix);
- }
-
- /**
- * Creates a TextureData from the given URL. Does no OpenGL work.
- *
- * @param glp the OpenGL Profile this texture data should be
- * created for.
- * @param url the URL from which to read the texture data
- * @param mipmap whether mipmaps should be produced for this
- * texture either by autogenerating them or
- * reading them from the file. Some file formats
- * support multiple mipmaps in a single file in
- * which case those mipmaps will be used rather
- * than generating them.
- * @param fileSuffix the suffix of the file name to be used as a
- * hint of the file format to the underlying
- * texture provider, or null if none and should be
- * auto-detected (some texture providers do not
- * support this)
- * @return the texture data from the URL, or null if none of the
- * registered texture providers could read the URL
- * @throws IOException if an error occurred while reading the URL
- */
- public static TextureData newTextureData(GLProfile glp, URL url,
- boolean mipmap,
- String fileSuffix) throws IOException {
- if (fileSuffix == null) {
- fileSuffix = FileUtil.getFileSuffix(url.getPath());
- }
- return newTextureDataImpl(glp, url, 0, 0, mipmap, fileSuffix);
- }
-
- //----------------------------------------------------------------------
- // These methods make no assumption about the OpenGL internal format
- // or pixel format of the texture; they must be specified by the
- // user. It is not allowed to supply 0 (indicating no preference)
- // for either the internalFormat or the pixelFormat;
- // IllegalArgumentException will be thrown in this case.
-
- /**
- * Creates a TextureData from the given file, using the specified
- * OpenGL internal format and pixel format for the texture which
- * will eventually result. The internalFormat and pixelFormat must
- * be specified and may not be zero; to use default values, use the
- * variant of this method which does not take these arguments. Does
- * no OpenGL work.
- *
- * @param glp the OpenGL Profile this texture data should be
- * created for.
- * @param file the file from which to read the texture data
- * @param internalFormat the OpenGL internal format of the texture
- * which will eventually result from the TextureData
- * @param pixelFormat the OpenGL pixel format of the texture
- * which will eventually result from the TextureData
- * @param mipmap whether mipmaps should be produced for this
- * texture either by autogenerating them or
- * reading them from the file. Some file formats
- * support multiple mipmaps in a single file in
- * which case those mipmaps will be used rather
- * than generating them.
- * @param fileSuffix the suffix of the file name to be used as a
- * hint of the file format to the underlying
- * texture provider, or null if none and should be
- * auto-detected (some texture providers do not
- * support this)
- * @return the texture data from the file, or null if none of the
- * registered texture providers could read the file
- * @throws IllegalArgumentException if either internalFormat or
- * pixelFormat was 0
- * @throws IOException if an error occurred while reading the file
- */
- public static TextureData newTextureData(GLProfile glp, File file,
- int internalFormat,
- int pixelFormat,
- boolean mipmap,
- String fileSuffix) throws IOException, IllegalArgumentException {
- if ((internalFormat == 0) || (pixelFormat == 0)) {
- throw new IllegalArgumentException("internalFormat and pixelFormat must be non-zero");
- }
-
- if (fileSuffix == null) {
- fileSuffix = FileUtil.getFileSuffix(file);
- }
-
- return newTextureDataImpl(glp, file, internalFormat, pixelFormat, mipmap, fileSuffix);
- }
-
- /**
- * Creates a TextureData from the given stream, using the specified
- * OpenGL internal format and pixel format for the texture which
- * will eventually result. The internalFormat and pixelFormat must
- * be specified and may not be zero; to use default values, use the
- * variant of this method which does not take these arguments. Does
- * no OpenGL work.
- *
- * @param glp the OpenGL Profile this texture data should be
- * created for.
- * @param stream the stream from which to read the texture data
- * @param internalFormat the OpenGL internal format of the texture
- * which will eventually result from the TextureData
- * @param pixelFormat the OpenGL pixel format of the texture
- * which will eventually result from the TextureData
- * @param mipmap whether mipmaps should be produced for this
- * texture either by autogenerating them or
- * reading them from the file. Some file formats
- * support multiple mipmaps in a single file in
- * which case those mipmaps will be used rather
- * than generating them.
- * @param fileSuffix the suffix of the file name to be used as a
- * hint of the file format to the underlying
- * texture provider, or null if none and should be
- * auto-detected (some texture providers do not
- * support this)
- * @return the texture data from the stream, or null if none of the
- * registered texture providers could read the stream
- * @throws IllegalArgumentException if either internalFormat or
- * pixelFormat was 0
- * @throws IOException if an error occurred while reading the stream
- */
- public static TextureData newTextureData(GLProfile glp, InputStream stream,
- int internalFormat,
- int pixelFormat,
- boolean mipmap,
- String fileSuffix) throws IOException, IllegalArgumentException {
- if ((internalFormat == 0) || (pixelFormat == 0)) {
- throw new IllegalArgumentException("internalFormat and pixelFormat must be non-zero");
- }
-
- return newTextureDataImpl(glp, stream, internalFormat, pixelFormat, mipmap, fileSuffix);
- }
-
- /**
- * Creates a TextureData from the given URL, using the specified
- * OpenGL internal format and pixel format for the texture which
- * will eventually result. The internalFormat and pixelFormat must
- * be specified and may not be zero; to use default values, use the
- * variant of this method which does not take these arguments. Does
- * no OpenGL work.
- *
- * @param glp the OpenGL Profile this texture data should be
- * created for.
- * @param url the URL from which to read the texture data
- * @param internalFormat the OpenGL internal format of the texture
- * which will eventually result from the TextureData
- * @param pixelFormat the OpenGL pixel format of the texture
- * which will eventually result from the TextureData
- * @param mipmap whether mipmaps should be produced for this
- * texture either by autogenerating them or
- * reading them from the file. Some file formats
- * support multiple mipmaps in a single file in
- * which case those mipmaps will be used rather
- * than generating them.
- * @param fileSuffix the suffix of the file name to be used as a
- * hint of the file format to the underlying
- * texture provider, or null if none and should be
- * auto-detected (some texture providers do not
- * support this)
- * @return the texture data from the URL, or null if none of the
- * registered texture providers could read the URL
- * @throws IllegalArgumentException if either internalFormat or
- * pixelFormat was 0
- * @throws IOException if an error occurred while reading the URL
- */
- public static TextureData newTextureData(GLProfile glp, URL url,
- int internalFormat,
- int pixelFormat,
- boolean mipmap,
- String fileSuffix) throws IOException, IllegalArgumentException {
- if ((internalFormat == 0) || (pixelFormat == 0)) {
- throw new IllegalArgumentException("internalFormat and pixelFormat must be non-zero");
- }
-
- if (fileSuffix == null) {
- fileSuffix = FileUtil.getFileSuffix(url.getPath());
- }
-
- return newTextureDataImpl(glp, url, internalFormat, pixelFormat, mipmap, fileSuffix);
- }
-
- //----------------------------------------------------------------------
- // methods that *do* require a current context
- //
-
- /**
- * Creates an OpenGL texture object from the specified TextureData
- * using the current OpenGL context.
- *
- * @param data the texture data to turn into an OpenGL texture
- * @throws GLException if no OpenGL context is current or if an
- * OpenGL error occurred
- * @throws IllegalArgumentException if the passed TextureData was null
- */
- public static Texture newTexture(TextureData data) throws GLException, IllegalArgumentException {
- if (data == null) {
- throw new IllegalArgumentException("Null TextureData");
- }
- return new Texture(data);
- }
-
- /**
- * Creates an OpenGL texture object from the specified file using
- * the current OpenGL context.
- *
- * @param file the file from which to read the texture data
- * @param mipmap whether mipmaps should be produced for this
- * texture either by autogenerating them or
- * reading them from the file. Some file formats
- * support multiple mipmaps in a single file in
- * which case those mipmaps will be used rather
- * than generating them.
- * @throws IOException if an error occurred while reading the file
- * @throws GLException if no OpenGL context is current or if an
- * OpenGL error occurred
- */
- public static Texture newTexture(File file, boolean mipmap) throws IOException, GLException {
- GLProfile glp = GLContext.getCurrentGL().getGLProfile();
- TextureData data = newTextureData(glp, file, mipmap, FileUtil.getFileSuffix(file));
- Texture texture = newTexture(data);
- data.flush();
- return texture;
- }
-
- /**
- * Creates an OpenGL texture object from the specified stream using
- * the current OpenGL context.
- *
- * @param stream the stream from which to read the texture data
- * @param mipmap whether mipmaps should be produced for this
- * texture either by autogenerating them or
- * reading them from the file. Some file formats
- * support multiple mipmaps in a single file in
- * which case those mipmaps will be used rather
- * than generating them.
- * @param fileSuffix the suffix of the file name to be used as a
- * hint of the file format to the underlying
- * texture provider, or null if none and should be
- * auto-detected (some texture providers do not
- * support this)
- * @throws IOException if an error occurred while reading the stream
- * @throws GLException if no OpenGL context is current or if an
- * OpenGL error occurred
- */
- public static Texture newTexture(InputStream stream, boolean mipmap, String fileSuffix) throws IOException, GLException {
- GLProfile glp = GLContext.getCurrentGL().getGLProfile();
- TextureData data = newTextureData(glp, stream, mipmap, fileSuffix);
- Texture texture = newTexture(data);
- data.flush();
- return texture;
- }
-
- /**
- * Creates an OpenGL texture object from the specified URL using the
- * current OpenGL context.
- *
- * @param url the URL from which to read the texture data
- * @param mipmap whether mipmaps should be produced for this
- * texture either by autogenerating them or
- * reading them from the file. Some file formats
- * support multiple mipmaps in a single file in
- * which case those mipmaps will be used rather
- * than generating them.
- * @param fileSuffix the suffix of the file name to be used as a
- * hint of the file format to the underlying
- * texture provider, or null if none and should be
- * auto-detected (some texture providers do not
- * support this)
- * @throws IOException if an error occurred while reading the URL
- * @throws GLException if no OpenGL context is current or if an
- * OpenGL error occurred
- */
- public static Texture newTexture(URL url, boolean mipmap, String fileSuffix) throws IOException, GLException {
- if (fileSuffix == null) {
- fileSuffix = FileUtil.getFileSuffix(url.getPath());
- }
- GLProfile glp = GLContext.getCurrentGL().getGLProfile();
- TextureData data = newTextureData(glp, url, mipmap, fileSuffix);
- Texture texture = newTexture(data);
- data.flush();
- return texture;
- }
-
- /**
- * Creates an OpenGL texture object associated with the given OpenGL
- * texture target using the current OpenGL context. The texture has
- * no initial data. This is used, for example, to construct cube
- * maps out of multiple TextureData objects.
- *
- * @param target the OpenGL target type, eg GL.GL_TEXTURE_2D,
- * GL.GL_TEXTURE_RECTANGLE_ARB
- *
- * @throws GLException if no OpenGL context is current or if an
- * OpenGL error occurred
- */
- public static Texture newTexture(int target) throws GLException {
- return new Texture(target);
- }
-
- /**
- * Wraps an OpenGL texture ID from an external library and allows
- * some of the base methods from the Texture class, such as
- * binding and querying of texture coordinates, to be used with
- * it. Attempts to update such textures' contents will yield
- * undefined results.
- *
- * @param textureID the OpenGL texture object to wrap
- * @param target the OpenGL texture target, eg GL.GL_TEXTURE_2D,
- * GL2.GL_TEXTURE_RECTANGLE
- * @param texWidth the width of the texture in pixels
- * @param texHeight the height of the texture in pixels
- * @param imgWidth the width of the image within the texture in
- * pixels (if the content is a sub-rectangle in the upper
- * left corner); otherwise, pass in texWidth
- * @param imgHeight the height of the image within the texture in
- * pixels (if the content is a sub-rectangle in the upper
- * left corner); otherwise, pass in texHeight
- * @param mustFlipVertically indicates whether the texture
- * coordinates must be flipped vertically
- * in order to properly display the
- * texture
- */
- public static Texture newTexture(int textureID,
- int target,
- int texWidth,
- int texHeight,
- int imgWidth,
- int imgHeight,
- boolean mustFlipVertically) {
- return new Texture(textureID,
- target,
- texWidth,
- texHeight,
- imgWidth,
- imgHeight,
- mustFlipVertically);
- }
-
- /**
- * Writes the given texture to a file. The type of the file is
- * inferred from its suffix. An OpenGL context must be current in
- * order to fetch the texture data back from the OpenGL pipeline.
- * This method causes the specified Texture to be bound to the
- * GL_TEXTURE_2D state. If no suitable writer for the requested file
- * format was found, throws an IOException.
- *
- * Reasonable attempts are made to produce good results in the
- * resulting images. The Targa, SGI and ImageIO writers produce
- * results in the correct vertical orientation for those file
- * formats. The DDS writer performs no vertical flip of the data,
- * even in uncompressed mode. (It is impossible to perform such a
- * vertical flip with compressed data.) Applications should keep
- * this in mind when using this routine to save textures to disk for
- * later re-loading.
- *
- * Any mipmaps for the specified texture are currently discarded
- * when it is written to disk, regardless of whether the underlying
- * file format supports multiple mipmaps in a given file.
- *
- * @throws IOException if an error occurred during writing or no
- * suitable writer was found
- * @throws GLException if no OpenGL context was current or an
- * OpenGL-related error occurred
- */
- public static void write(Texture texture, File file) throws IOException, GLException {
- if (texture.getTarget() != GL.GL_TEXTURE_2D) {
- throw new GLException("Only GL_TEXTURE_2D textures are supported");
- }
-
- // First fetch the texture data
- GL _gl = GLContext.getCurrentGL();
- if (!_gl.isGL2()) {
- throw new GLException("Only GL2 supports fetching compressed images, GL: " + _gl);
- }
- GL2 gl = _gl.getGL2();
-
- texture.bind();
- int internalFormat = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2.GL_TEXTURE_INTERNAL_FORMAT);
- int width = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2.GL_TEXTURE_WIDTH);
- int height = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2.GL_TEXTURE_HEIGHT);
- int border = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2.GL_TEXTURE_BORDER);
- TextureData data = null;
- if (internalFormat == GL.GL_COMPRESSED_RGB_S3TC_DXT1_EXT ||
- internalFormat == GL.GL_COMPRESSED_RGBA_S3TC_DXT1_EXT ||
- internalFormat == GL.GL_COMPRESSED_RGBA_S3TC_DXT3_EXT ||
- internalFormat == GL.GL_COMPRESSED_RGBA_S3TC_DXT5_EXT) {
- // Fetch using glGetCompressedTexImage
- int size = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2.GL_TEXTURE_COMPRESSED_IMAGE_SIZE);
- ByteBuffer res = ByteBuffer.allocate(size);
- gl.glGetCompressedTexImage(GL.GL_TEXTURE_2D, 0, res);
- data = new TextureData(gl.getGLProfile(), internalFormat, width, height, border, internalFormat, GL.GL_UNSIGNED_BYTE,
- false, true, true, res, null);
- } else {
- int bytesPerPixel = 0;
- int fetchedFormat = 0;
- switch (internalFormat) {
- case GL.GL_RGB:
- case GL2.GL_BGR:
- case GL.GL_RGB8:
- bytesPerPixel = 3;
- fetchedFormat = GL.GL_RGB;
- break;
- case GL.GL_RGBA:
- case GL2.GL_BGRA:
- case GL2.GL_ABGR_EXT:
- case GL.GL_RGBA8:
- bytesPerPixel = 4;
- fetchedFormat = GL.GL_RGBA;
- break;
- default:
- throw new IOException("Unsupported texture internal format 0x" + Integer.toHexString(internalFormat));
- }
-
- // Fetch using glGetTexImage
- int packAlignment = glGetInteger(GL.GL_PACK_ALIGNMENT);
- int packRowLength = glGetInteger(GL2.GL_PACK_ROW_LENGTH);
- int packSkipRows = glGetInteger(GL2.GL_PACK_SKIP_ROWS);
- int packSkipPixels = glGetInteger(GL2.GL_PACK_SKIP_PIXELS);
- int packSwapBytes = glGetInteger(GL2.GL_PACK_SWAP_BYTES);
-
- gl.glPixelStorei(GL.GL_PACK_ALIGNMENT, 1);
- gl.glPixelStorei(GL2.GL_PACK_ROW_LENGTH, 0);
- gl.glPixelStorei(GL2.GL_PACK_SKIP_ROWS, 0);
- gl.glPixelStorei(GL2.GL_PACK_SKIP_PIXELS, 0);
- gl.glPixelStorei(GL2.GL_PACK_SWAP_BYTES, 0);
-
- ByteBuffer res = ByteBuffer.allocate((width + (2 * border)) *
- (height + (2 * border)) *
- bytesPerPixel);
- if (DEBUG) {
- System.out.println("Allocated buffer of size " + res.remaining() + " for fetched image (" +
- ((fetchedFormat == GL.GL_RGB) ? "GL_RGB" : "GL_RGBA") + ")");
- }
- gl.glGetTexImage(GL.GL_TEXTURE_2D, 0, fetchedFormat, GL.GL_UNSIGNED_BYTE, res);
-
- gl.glPixelStorei(GL.GL_PACK_ALIGNMENT, packAlignment);
- gl.glPixelStorei(GL2.GL_PACK_ROW_LENGTH, packRowLength);
- gl.glPixelStorei(GL2.GL_PACK_SKIP_ROWS, packSkipRows);
- gl.glPixelStorei(GL2.GL_PACK_SKIP_PIXELS, packSkipPixels);
- gl.glPixelStorei(GL2.GL_PACK_SWAP_BYTES, packSwapBytes);
-
- data = new TextureData(gl.getGLProfile(), internalFormat, width, height, border, fetchedFormat, GL.GL_UNSIGNED_BYTE,
- false, false, false, res, null);
-
- if (DEBUG) {
- System.out.println("data.getPixelFormat() = " +
- ((data.getPixelFormat() == GL.GL_RGB) ? "GL_RGB" : "GL_RGBA"));
- }
- }
-
- write(data, file);
- }
-
- public static void write(TextureData data, File file) throws IOException, GLException {
- for (Iterator iter = textureWriters.iterator(); iter.hasNext(); ) {
- TextureWriter writer = (TextureWriter) iter.next();
- if (writer.write(file, data)) {
- return;
- }
- }
-
- throw new IOException("No suitable texture writer found for "+file.getAbsolutePath());
- }
-
- //----------------------------------------------------------------------
- // SPI support
- //
-
- /** Adds a TextureProvider to support reading of a new file
- format. */
- public static void addTextureProvider(TextureProvider provider) {
- // Must always add at the front so the ImageIO provider is last,
- // so we don't accidentally use it instead of a user's possibly
- // more optimal provider
- textureProviders.add(0, provider);
- }
-
- /** Adds a TextureWriter to support writing of a new file
- format. */
- public static void addTextureWriter(TextureWriter writer) {
- // Must always add at the front so the ImageIO writer is last,
- // so we don't accidentally use it instead of a user's possibly
- // more optimal writer
- textureWriters.add(0, writer);
- }
-
- //---------------------------------------------------------------------------
- // Global disabling of texture rectangle extension
- //
-
- /** Toggles the use of the GL_ARB_texture_rectangle extension by the
- TextureIO classes. By default, on hardware supporting this
- extension, the TextureIO classes may use the
- GL_ARB_texture_rectangle extension for non-power-of-two
- textures. (If the hardware supports the
- GL_ARB_texture_non_power_of_two extension, that one is
- preferred.) In some situations, for example when writing
- shaders, it is advantageous to force the texture target to
- always be GL_TEXTURE_2D in order to have one version of the
- shader, even at the expense of texture memory in the case where
- NPOT textures are not supported. This method allows the use of
- the GL_ARB_texture_rectangle extension to be turned off globally
- for this purpose. The default is that the use of the extension
- is enabled. */
- public static void setTexRectEnabled(boolean enabled) {
- texRectEnabled = enabled;
- }
-
- /** Indicates whether the GL_ARB_texture_rectangle extension is
- allowed to be used for non-power-of-two textures; see {@link
- #setTexRectEnabled setTexRectEnabled}. */
- public static boolean isTexRectEnabled() {
- return texRectEnabled;
- }
-
- //----------------------------------------------------------------------
- // Internals only below this point
- //
-
- private static List/*
- *
- * This is the sister class of the DataInputStream which allows
- * for reading of java native datatypes from an input stream with
- * the datatypes stored in big endian byte order.
- *
- * This class implements the minimum required and calls DataInputStream
- * for some of the required methods for DataInput.
- *
- * Not all methods are implemented due to lack of immediatte requirement
- * for that functionality. It is not clear if it is ever going to be
- * functionally required to be able to read UTF data in a LittleEndianManner
- *
- * @author Robin Luiten
- * @version 1.1 15/Dec/1997
- */
-public class LEDataInputStream extends FilterInputStream implements DataInput
-{
- /**
- * To reuse some of the non endian dependent methods from
- * DataInputStreams methods.
- */
- DataInputStream dataIn;
-
- public LEDataInputStream(InputStream in)
- {
- super(in);
- dataIn = new DataInputStream(in);
- }
-
- public void close() throws IOException
- {
- dataIn.close(); // better close as we create it.
- // this will close underlying as well.
- }
-
- public synchronized final int read(byte b[]) throws IOException
- {
- return dataIn.read(b, 0, b.length);
- }
-
- public synchronized final int read(byte b[], int off, int len) throws IOException
- {
- int rl = dataIn.read(b, off, len);
- return rl;
- }
-
- public final void readFully(byte b[]) throws IOException
- {
- dataIn.readFully(b, 0, b.length);
- }
-
- public final void readFully(byte b[], int off, int len) throws IOException
- {
- dataIn.readFully(b, off, len);
- }
-
- public final int skipBytes(int n) throws IOException
- {
- return dataIn.skipBytes(n);
- }
-
- public final boolean readBoolean() throws IOException
- {
- int ch = dataIn.read();
- if (ch < 0)
- throw new EOFException();
- return (ch != 0);
- }
-
- public final byte readByte() throws IOException
- {
- int ch = dataIn.read();
- if (ch < 0)
- throw new EOFException();
- return (byte)(ch);
- }
-
- public final int readUnsignedByte() throws IOException
- {
- int ch = dataIn.read();
- if (ch < 0)
- throw new EOFException();
- return ch;
- }
-
- public final short readShort() throws IOException
- {
- int ch1 = dataIn.read();
- int ch2 = dataIn.read();
- if ((ch1 | ch2) < 0)
- throw new EOFException();
- return (short)((ch1 << 0) + (ch2 << 8));
- }
-
- public final int readUnsignedShort() throws IOException
- {
- int ch1 = dataIn.read();
- int ch2 = dataIn.read();
- if ((ch1 | ch2) < 0)
- throw new EOFException();
- return (ch1 << 0) + (ch2 << 8);
- }
-
- public final char readChar() throws IOException
- {
- int ch1 = dataIn.read();
- int ch2 = dataIn.read();
- if ((ch1 | ch2) < 0)
- throw new EOFException();
- return (char)((ch1 << 0) + (ch2 << 8));
- }
-
- public final int readInt() throws IOException
- {
- int ch1 = dataIn.read();
- int ch2 = dataIn.read();
- int ch3 = dataIn.read();
- int ch4 = dataIn.read();
- if ((ch1 | ch2 | ch3 | ch4) < 0)
- throw new EOFException();
- return ((ch1 << 0) + (ch2 << 8) + (ch3 << 16) + (ch4 << 24));
- }
-
- public final long readLong() throws IOException
- {
- int i1 = readInt();
- int i2 = readInt();
- return ((long)(i1) & 0xFFFFFFFFL) + (i2 << 32);
- }
-
- public final float readFloat() throws IOException
- {
- return Float.intBitsToFloat(readInt());
- }
-
- public final double readDouble() throws IOException
- {
- return Double.longBitsToDouble(readLong());
- }
-
- /**
- * dont call this it is not implemented.
- * @return empty new string
- **/
- public final String readLine() throws IOException
- {
- return new String();
- }
-
- /**
- * dont call this it is not implemented
- * @return empty new string
- **/
- public final String readUTF() throws IOException
- {
- return new String();
- }
-
- /**
- * dont call this it is not implemented
- * @return empty new string
- **/
- public final static String readUTF(DataInput in) throws IOException
- {
- return new String();
- }
-}
-
diff --git a/src/jogl/classes/com/sun/opengl/util/texture/spi/LEDataOutputStream.java b/src/jogl/classes/com/sun/opengl/util/texture/spi/LEDataOutputStream.java
deleted file mode 100755
index 730ec0dbd..000000000
--- a/src/jogl/classes/com/sun/opengl/util/texture/spi/LEDataOutputStream.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.util.texture.spi;
-
-import java.io.DataOutput;
-import java.io.DataOutputStream;
-import java.io.FilterOutputStream;
-import java.io.OutputStream;
-import java.io.IOException;
-
-/**
- * Little Endian Data Output Stream.
- *
- * This class implements an output stream filter to allow writing
- * of java native datatypes to an output stream which has those
- * native datatypes stored in a little endian byte order.
- *
- * This is the sister class of the DataOutputStream which allows
- * for writing of java native datatypes to an output stream with
- * the datatypes stored in big endian byte order.
- *
- * This class implements the minimum required and calls DataOutputStream
- * for some of the required methods for DataOutput.
- *
- * Not all methods are implemented due to lack of immediate requirement
- * for that functionality. It is not clear if it is ever going to be
- * functionally required to be able to read UTF data in a LittleEndianManner
- *
- */
-public class LEDataOutputStream extends FilterOutputStream implements DataOutput
-{
- /**
- * To reuse some of the non endian dependent methods from
- * DataOutputStream's methods.
- */
- DataOutputStream dataOut;
-
- public LEDataOutputStream(OutputStream out)
- {
- super(out);
- dataOut = new DataOutputStream(out);
- }
-
- public void close() throws IOException
- {
- dataOut.close(); // better close as we create it.
- // this will close underlying as well.
- }
-
- public synchronized final void write(byte b[]) throws IOException
- {
- dataOut.write(b, 0, b.length);
- }
-
- public synchronized final void write(byte b[], int off, int len) throws IOException
- {
- dataOut.write(b, off, len);
- }
-
- public final void write(int b) throws IOException
- {
- dataOut.write(b);
- }
-
- public final void writeBoolean(boolean v) throws IOException
- {
- dataOut.writeBoolean(v);
- }
-
- public final void writeByte(int v) throws IOException
- {
- dataOut.writeByte(v);
- }
-
- /** Don't call this -- not implemented */
- public final void writeBytes(String s) throws IOException
- {
- throw new UnsupportedOperationException();
- }
-
- public final void writeChar(int v) throws IOException
- {
- dataOut.writeChar(((v >> 8) & 0xff) |
- ((v & 0xff) << 8));
- }
-
- /** Don't call this -- not implemented */
- public final void writeChars(String s) throws IOException
- {
- throw new UnsupportedOperationException();
- }
-
- public final void writeDouble(double v) throws IOException
- {
- writeLong(Double.doubleToRawLongBits(v));
- }
-
- public final void writeFloat(float v) throws IOException
- {
- writeInt(Float.floatToRawIntBits(v));
- }
-
- public final void writeInt(int v) throws IOException
- {
- dataOut.writeInt((v >>> 24) |
- ((v >>> 8) & 0xff00) |
- ((v << 8) & 0x00ff00) |
- (v << 24));
- }
-
- public final void writeLong(long v) throws IOException
- {
- writeInt((int) v);
- writeInt((int) (v >>> 32));
- }
-
- public final void writeShort(int v) throws IOException
- {
- dataOut.writeShort(((v >> 8) & 0xff) |
- ((v & 0xff) << 8));
- }
-
- /** Don't call this -- not implemented */
- public final void writeUTF(String s) throws IOException
- {
- throw new UnsupportedOperationException();
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/texture/spi/NetPbmTextureWriter.java b/src/jogl/classes/com/sun/opengl/util/texture/spi/NetPbmTextureWriter.java
deleted file mode 100644
index 18df1dc55..000000000
--- a/src/jogl/classes/com/sun/opengl/util/texture/spi/NetPbmTextureWriter.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright (c) 2005 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.util.texture.spi;
-
-import java.io.*;
-import java.net.*;
-import java.nio.*;
-
-import javax.media.opengl.*;
-import com.sun.opengl.util.*;
-import com.sun.opengl.util.texture.*;
-import com.sun.opengl.util.texture.spi.*;
-
-public class NetPbmTextureWriter implements TextureWriter {
- int magic;
-
- public NetPbmTextureWriter() {
- this(0); // auto
- }
-
- /**
- * supported magic values are: Reads and writes SGI RGB/RGBA images. Written from Paul
- Bourke's adaptation of the SGI
- specification.
- *
- * Image decoder for image data stored in TGA file format.
- * Currently only the original TGA file format is supported. This is
- * because the new TGA format has data at the end of the file, getting
- * to the end of a file in an InputStream orient environment presents
- * several difficulties which are avoided at the moment.
- *
- *
- *
- * This is a simple decoder and is only setup to load a single image
- * from the input stream
- *
- *
- *
- * @author Robin Luiten
- * @author Kenneth Russell
- * @version $Revision: 1768 $
- */
-
-public class TGAImage {
- private Header header;
- private int format;
- private int bpp;
- private ByteBuffer data;
-
- private TGAImage(Header header) {
- this.header = header;
- }
-
- /**
- * This class reads in all of the TGA image header in addition it also
- * reads in the imageID field as it is convenient to handle that here.
- *
- * @author Robin Luiten
- * @version 1.1
- */
- public static class Header {
- /** Set of possible file format TGA types */
- public final static int TYPE_NEW = 0;
- public final static int TYPE_OLD = 1;
- public final static int TYPE_UNK = 2; // cant rewind stream so unknown for now.
-
- /** Set of possible image types in TGA file */
- public final static int NO_IMAGE = 0; // no image data
- public final static int UCOLORMAPPED = 1; // uncompressed color mapped image
- public final static int UTRUECOLOR = 2; // uncompressed true color image
- public final static int UBLACKWHITE = 3; // uncompressed black and white image
- public final static int COLORMAPPED = 9; // compressed color mapped image
- public final static int TRUECOLOR = 10; // compressed true color image
- public final static int BLACKWHITE = 11; // compressed black and white image
-
- /** Field image descriptor bitfield values definitions */
- public final static int ID_ATTRIBPERPIXEL = 0xF;
- public final static int ID_RIGHTTOLEFT = 0x10;
- public final static int ID_TOPTOBOTTOM = 0x20;
- public final static int ID_INTERLEAVE = 0xC0;
-
- /** Field image descriptor / interleave values */
- public final static int I_NOTINTERLEAVED = 0;
- public final static int I_TWOWAY = 1;
- public final static int I_FOURWAY = 2;
-
- /** Type of this TGA file format */
- private int tgaType;
-
- /** initial TGA image data fields */
- private int idLength; // byte value
- private int colorMapType; // byte value
- private int imageType; // byte value
-
- /** TGA image colour map fields */
- private int firstEntryIndex;
- private int colorMapLength;
- private byte colorMapEntrySize;
-
- /** TGA image specification fields */
- private int xOrigin;
- private int yOrigin;
- private int width;
- private int height;
- private byte pixelDepth;
- private byte imageDescriptor;
-
- private byte[] imageIDbuf;
- private String imageID;
-
- // For construction from user data
- Header() {
- tgaType = TYPE_OLD; // dont try and get footer.
- }
-
- Header(LEDataInputStream in) throws IOException {
- int ret;
-
- tgaType = TYPE_OLD; // dont try and get footer.
-
- // initial header fields
- idLength = in.readUnsignedByte();
- colorMapType = in.readUnsignedByte();
- imageType = in.readUnsignedByte();
-
- // color map header fields
- firstEntryIndex = in.readUnsignedShort();
- colorMapLength = in.readUnsignedShort();
- colorMapEntrySize = in.readByte();
-
- // TGA image specification fields
- xOrigin = in.readUnsignedShort();
- yOrigin = in.readUnsignedShort();
- width = in.readUnsignedShort();
- height = in.readUnsignedShort();
- pixelDepth = in.readByte();
- imageDescriptor = in.readByte();
-
- if (idLength > 0) {
- imageIDbuf = new byte[idLength];
- in.read(imageIDbuf, 0, idLength);
- imageID = new String(imageIDbuf, "US-ASCII");
- }
- }
-
- public int tgaType() { return tgaType; }
-
- /** initial TGA image data fields */
- public int idLength() { return idLength; }
- public int colorMapType() { return colorMapType; }
- public int imageType() { return imageType; }
-
- /** TGA image colour map fields */
- public int firstEntryIndex() { return firstEntryIndex; }
- public int colorMapLength() { return colorMapLength; }
- public byte colorMapEntrySize() { return colorMapEntrySize; }
-
- /** TGA image specification fields */
- public int xOrigin() { return xOrigin; }
- public int yOrigin() { return yOrigin; }
- public int width() { return width; }
- public int height() { return height; }
- public byte pixelDepth() { return pixelDepth; }
- public byte imageDescriptor() { return imageDescriptor; }
-
- /** bitfields in imageDescriptor */
- public byte attribPerPixel() { return (byte)(imageDescriptor & ID_ATTRIBPERPIXEL); }
- public boolean rightToLeft() { return ((imageDescriptor & ID_RIGHTTOLEFT) != 0); }
- public boolean topToBottom() { return ((imageDescriptor & ID_TOPTOBOTTOM) != 0); }
- public byte interleave() { return (byte)((imageDescriptor & ID_INTERLEAVE) >> 6); }
-
- public byte[] imageIDbuf() { return imageIDbuf; }
- public String imageID() { return imageID; }
-
- public String toString() {
- return "TGA Header " +
- " id length: " + idLength +
- " color map type: "+ colorMapType +
- " image type: "+ imageType +
- " first entry index: " + firstEntryIndex +
- " color map length: " + colorMapLength +
- " color map entry size: " + colorMapEntrySize +
- " x Origin: " + xOrigin +
- " y Origin: " + yOrigin +
- " width: "+ width +
- " height: "+ height +
- " pixel depth: "+ pixelDepth +
- " image descriptor: "+ imageDescriptor +
- (imageIDbuf == null ? "" : (" ID String: " + imageID));
- }
-
- public int size() { return 18 + idLength; }
-
- private void write(LEDataOutputStream output) throws IOException {
- output.write(idLength);
- output.write(colorMapType);
- output.write(imageType);
- output.writeShort(firstEntryIndex);
- output.writeShort(colorMapLength);
- output.write(colorMapEntrySize);
- output.writeShort(xOrigin);
- output.writeShort(yOrigin);
- output.writeShort(width);
- output.writeShort(height);
- output.write(pixelDepth);
- output.write(imageDescriptor);
- if (idLength > 0) {
- try {
- byte[] chars = imageID.getBytes("US-ASCII");
- output.write(chars);
- } catch (UnsupportedEncodingException e) {
- throw new RuntimeException(e);
- }
- }
- }
- }
-
-
- /**
- * Identifies the image type of the tga image data and loads
- * it into the JimiImage structure. This was taken from the
- * prototype and modified for the new Jimi structure
- */
- private void decodeImage(LEDataInputStream dIn) throws IOException {
- switch (header.imageType()) {
- case Header.UCOLORMAPPED:
- throw new IOException("TGADecoder Uncompressed Colormapped images not supported");
-
- case Header.UTRUECOLOR: // pixelDepth 15, 16, 24 and 32
- switch (header.pixelDepth) {
- case 16:
- throw new IOException("TGADecoder Compressed 16-bit True Color images not supported");
-
- case 24:
- case 32:
- decodeRGBImageU24_32(dIn);
- break;
- }
- break;
-
- case Header.UBLACKWHITE:
- throw new IOException("TGADecoder Uncompressed Grayscale images not supported");
-
- case Header.COLORMAPPED:
- throw new IOException("TGADecoder Compressed Colormapped images not supported");
-
- case Header.TRUECOLOR:
- throw new IOException("TGADecoder Compressed True Color images not supported");
-
- case Header.BLACKWHITE:
- throw new IOException("TGADecoder Compressed Grayscale images not supported");
- }
- }
-
- /**
- * This assumes that the body is for a 24 bit or 32 bit for a
- * RGB or ARGB image respectively.
- */
- private void decodeRGBImageU24_32(LEDataInputStream dIn) throws IOException {
- int i; // row index
- int j; // column index
- int y; // output row index
- int raw; // index through the raw input buffer
- int rawWidth = header.width() * (header.pixelDepth() / 8);
- byte[] rawBuf = new byte[rawWidth];
- byte[] tmpData = new byte[rawWidth * header.height()];
-
- for (i = 0; i < header.height(); ++i) {
- dIn.readFully(rawBuf, 0, rawWidth);
-
- if (header.topToBottom())
- y = header.height - i - 1; // range 0 to (header.height - 1)
- else
- y = i;
-
- System.arraycopy(rawBuf, 0, tmpData, y * rawWidth, rawBuf.length);
- }
-
- GL gl = GLContext.getCurrentGL();
- if (header.pixelDepth() == 24) {
- bpp=3;
- if(gl.isGL2()) {
- format = GL2.GL_BGR;
- } else {
- format = GL.GL_RGB;
- swapBGR(tmpData, rawWidth, header.height(), bpp);
- }
- } else {
- assert header.pixelDepth() == 32;
- bpp=4;
-
- if(gl.isGL2()) {
- format = GL2.GL_BGRA;
- } else {
- format = GL.GL_RGBA;
- swapBGR(tmpData, rawWidth, header.height(), bpp);
- }
- }
-
- data = ByteBuffer.wrap(tmpData);
- }
-
- private static void swapBGR(byte[] data, int bWidth, int height, int bpp) {
- byte r,b;
- int k;
- for(int i=0; i
- *
- * Image decoder for image data stored in TGA file format.
- * Currently only the original TGA file format is supported. This is
- * because the new TGA format has data at the end of the file, getting
- * to the end of a file in an InputStream orient environment presents
- * several difficulties which are avoided at the moment.
- *
- *
- *
- * This is a simple decoder and is only setup to load a single image
- * from the input stream
- *
- *
- *
- * @author Robin Luiten
- * @author Kenneth Russell
- * @version $Revision: 1768 $
- */
-
-public class TGAImage {
- private Header header;
- private int format;
- private int bpp;
- private ByteBuffer data;
-
- private TGAImage(Header header) {
- this.header = header;
- }
-
- /**
- * This class reads in all of the TGA image header in addition it also
- * reads in the imageID field as it is convenient to handle that here.
- *
- * @author Robin Luiten
- * @version 1.1
- */
- public static class Header {
- /** Set of possible file format TGA types */
- public final static int TYPE_NEW = 0;
- public final static int TYPE_OLD = 1;
- public final static int TYPE_UNK = 2; // cant rewind stream so unknown for now.
-
- /** Set of possible image types in TGA file */
- public final static int NO_IMAGE = 0; // no image data
- public final static int UCOLORMAPPED = 1; // uncompressed color mapped image
- public final static int UTRUECOLOR = 2; // uncompressed true color image
- public final static int UBLACKWHITE = 3; // uncompressed black and white image
- public final static int COLORMAPPED = 9; // compressed color mapped image
- public final static int TRUECOLOR = 10; // compressed true color image
- public final static int BLACKWHITE = 11; // compressed black and white image
-
- /** Field image descriptor bitfield values definitions */
- public final static int ID_ATTRIBPERPIXEL = 0xF;
- public final static int ID_RIGHTTOLEFT = 0x10;
- public final static int ID_TOPTOBOTTOM = 0x20;
- public final static int ID_INTERLEAVE = 0xC0;
-
- /** Field image descriptor / interleave values */
- public final static int I_NOTINTERLEAVED = 0;
- public final static int I_TWOWAY = 1;
- public final static int I_FOURWAY = 2;
-
- /** Type of this TGA file format */
- private int tgaType;
-
- /** initial TGA image data fields */
- private int idLength; // byte value
- private int colorMapType; // byte value
- private int imageType; // byte value
-
- /** TGA image colour map fields */
- private int firstEntryIndex;
- private int colorMapLength;
- private byte colorMapEntrySize;
-
- /** TGA image specification fields */
- private int xOrigin;
- private int yOrigin;
- private int width;
- private int height;
- private byte pixelDepth;
- private byte imageDescriptor;
-
- private byte[] imageIDbuf;
- private String imageID;
-
- // For construction from user data
- Header() {
- tgaType = TYPE_OLD; // dont try and get footer.
- }
-
- Header(LEDataInputStream in) throws IOException {
- int ret;
-
- tgaType = TYPE_OLD; // dont try and get footer.
-
- // initial header fields
- idLength = in.readUnsignedByte();
- colorMapType = in.readUnsignedByte();
- imageType = in.readUnsignedByte();
-
- // color map header fields
- firstEntryIndex = in.readUnsignedShort();
- colorMapLength = in.readUnsignedShort();
- colorMapEntrySize = in.readByte();
-
- // TGA image specification fields
- xOrigin = in.readUnsignedShort();
- yOrigin = in.readUnsignedShort();
- width = in.readUnsignedShort();
- height = in.readUnsignedShort();
- pixelDepth = in.readByte();
- imageDescriptor = in.readByte();
-
- if (idLength > 0) {
- imageIDbuf = new byte[idLength];
- in.read(imageIDbuf, 0, idLength);
- imageID = new String(imageIDbuf, "US-ASCII");
- }
- }
-
- public int tgaType() { return tgaType; }
-
- /** initial TGA image data fields */
- public int idLength() { return idLength; }
- public int colorMapType() { return colorMapType; }
- public int imageType() { return imageType; }
-
- /** TGA image colour map fields */
- public int firstEntryIndex() { return firstEntryIndex; }
- public int colorMapLength() { return colorMapLength; }
- public byte colorMapEntrySize() { return colorMapEntrySize; }
-
- /** TGA image specification fields */
- public int xOrigin() { return xOrigin; }
- public int yOrigin() { return yOrigin; }
- public int width() { return width; }
- public int height() { return height; }
- public byte pixelDepth() { return pixelDepth; }
- public byte imageDescriptor() { return imageDescriptor; }
-
- /** bitfields in imageDescriptor */
- public byte attribPerPixel() { return (byte)(imageDescriptor & ID_ATTRIBPERPIXEL); }
- public boolean rightToLeft() { return ((imageDescriptor & ID_RIGHTTOLEFT) != 0); }
- public boolean topToBottom() { return ((imageDescriptor & ID_TOPTOBOTTOM) != 0); }
- public byte interleave() { return (byte)((imageDescriptor & ID_INTERLEAVE) >> 6); }
-
- public byte[] imageIDbuf() { return imageIDbuf; }
- public String imageID() { return imageID; }
-
- public String toString() {
- return "TGA Header " +
- " id length: " + idLength +
- " color map type: "+ colorMapType +
- " image type: "+ imageType +
- " first entry index: " + firstEntryIndex +
- " color map length: " + colorMapLength +
- " color map entry size: " + colorMapEntrySize +
- " x Origin: " + xOrigin +
- " y Origin: " + yOrigin +
- " width: "+ width +
- " height: "+ height +
- " pixel depth: "+ pixelDepth +
- " image descriptor: "+ imageDescriptor +
- (imageIDbuf == null ? "" : (" ID String: " + imageID));
- }
-
- public int size() { return 18 + idLength; }
-
- // buf must be in little-endian byte order
- private void write(ByteBuffer buf) {
- buf.put((byte) idLength);
- buf.put((byte) colorMapType);
- buf.put((byte) imageType);
- buf.putShort((short) firstEntryIndex);
- buf.putShort((short) colorMapLength);
- buf.put((byte) colorMapEntrySize);
- buf.putShort((short) xOrigin);
- buf.putShort((short) yOrigin);
- buf.putShort((short) width);
- buf.putShort((short) height);
- buf.put((byte) pixelDepth);
- buf.put((byte) imageDescriptor);
- if (idLength > 0) {
- try {
- byte[] chars = imageID.getBytes("US-ASCII");
- buf.put(chars);
- } catch (UnsupportedEncodingException e) {
- throw new RuntimeException(e);
- }
- }
- }
- }
-
-
- /**
- * Identifies the image type of the tga image data and loads
- * it into the JimiImage structure. This was taken from the
- * prototype and modified for the new Jimi structure
- */
- private void decodeImage(LEDataInputStream dIn) throws IOException {
- switch (header.imageType()) {
- case Header.UCOLORMAPPED:
- throw new IOException("TGADecoder Uncompressed Colormapped images not supported");
-
- case Header.UTRUECOLOR: // pixelDepth 15, 16, 24 and 32
- switch (header.pixelDepth) {
- case 16:
- throw new IOException("TGADecoder Compressed 16-bit True Color images not supported");
-
- case 24:
- case 32:
- decodeRGBImageU24_32(dIn);
- break;
- }
- break;
-
- case Header.UBLACKWHITE:
- throw new IOException("TGADecoder Uncompressed Grayscale images not supported");
-
- case Header.COLORMAPPED:
- throw new IOException("TGADecoder Compressed Colormapped images not supported");
-
- case Header.TRUECOLOR:
- throw new IOException("TGADecoder Compressed True Color images not supported");
-
- case Header.BLACKWHITE:
- throw new IOException("TGADecoder Compressed Grayscale images not supported");
- }
- }
-
- /**
- * This assumes that the body is for a 24 bit or 32 bit for a
- * RGB or ARGB image respectively.
- */
- private void decodeRGBImageU24_32(LEDataInputStream dIn) throws IOException {
- int i; // row index
- int j; // column index
- int y; // output row index
- int raw; // index through the raw input buffer
- int rawWidth = header.width() * (header.pixelDepth() / 8);
- byte[] rawBuf = new byte[rawWidth];
- byte[] tmpData = new byte[rawWidth * header.height()];
-
- for (i = 0; i < header.height(); ++i) {
- dIn.readFully(rawBuf, 0, rawWidth);
-
- if (header.topToBottom())
- y = header.height - i - 1; // range 0 to (header.height - 1)
- else
- y = i;
-
- System.arraycopy(rawBuf, 0, tmpData, y * rawWidth, rawBuf.length);
- }
-
- GL gl = GLContext.getCurrentGL();
- if (header.pixelDepth() == 24) {
- bpp=3;
- if(gl.isGL2()) {
- format = GL2.GL_BGR;
- } else {
- format = GL.GL_RGB;
- swapBGR(tmpData, rawWidth, header.height(), bpp);
- }
- } else {
- assert header.pixelDepth() == 32;
- bpp=4;
-
- if(gl.isGL2()) {
- format = GL2.GL_BGRA;
- } else {
- format = GL.GL_RGBA;
- swapBGR(tmpData, rawWidth, header.height(), bpp);
- }
- }
-
- data = ByteBuffer.wrap(tmpData);
- }
-
- private static void swapBGR(byte[] data, int bWidth, int height, int bpp) {
- byte r,b;
- int k;
- for(int i=0; i Provides a virtual machine- and operating system-independent
@@ -88,8 +87,8 @@ public abstract class GLDrawableFactory {
private static final GLDrawableFactory eglFactory;
private static final GLDrawableFactory nativeOSFactory;
private static final String nativeOSType;
- static final String macosxFactoryClassNameCGL = "com.sun.opengl.impl.macosx.cgl.MacOSXCGLDrawableFactory";
- static final String macosxFactoryClassNameAWTCGL = "com.sun.opengl.impl.macosx.cgl.awt.MacOSXAWTCGLDrawableFactory";
+ static final String macosxFactoryClassNameCGL = "com.jogamp.opengl.impl.macosx.cgl.MacOSXCGLDrawableFactory";
+ static final String macosxFactoryClassNameAWTCGL = "com.jogamp.opengl.impl.macosx.cgl.awt.MacOSXAWTCGLDrawableFactory";
/**
* Instantiate singleton factories if available, EGLES1, EGLES2 and the OS native ones.
@@ -97,7 +96,7 @@ public abstract class GLDrawableFactory {
static {
GLDrawableFactory tmp = null;
try {
- tmp = (GLDrawableFactory) NWReflection.createInstance("com.sun.opengl.impl.egl.EGLDrawableFactory");
+ tmp = (GLDrawableFactory) NWReflection.createInstance("com.jogamp.opengl.impl.egl.EGLDrawableFactory");
} catch (Throwable t) {
if (GLProfile.DEBUG) {
System.err.println("GLDrawableFactory.static - EGLDrawableFactory - not available");
@@ -114,9 +113,9 @@ public abstract class GLDrawableFactory {
factoryClassName = Debug.getProperty("jogl.gldrawablefactory.class.name", true, AccessController.getContext());
if (null == factoryClassName) {
if ( nativeOSType.equals(NativeWindowFactory.TYPE_X11) ) {
- factoryClassName = "com.sun.opengl.impl.x11.glx.X11GLXDrawableFactory";
+ factoryClassName = "com.jogamp.opengl.impl.x11.glx.X11GLXDrawableFactory";
} else if ( nativeOSType.equals(NativeWindowFactory.TYPE_WINDOWS) ) {
- factoryClassName = "com.sun.opengl.impl.windows.wgl.WindowsWGLDrawableFactory";
+ factoryClassName = "com.jogamp.opengl.impl.windows.wgl.WindowsWGLDrawableFactory";
} else if ( nativeOSType.equals(NativeWindowFactory.TYPE_MACOSX) ) {
if(NWReflection.isClassAvailable(macosxFactoryClassNameAWTCGL)) {
factoryClassName = macosxFactoryClassNameAWTCGL;
diff --git a/src/jogl/classes/javax/media/opengl/GLPipelineFactory.java b/src/jogl/classes/javax/media/opengl/GLPipelineFactory.java
index 63b50cb3c..352545849 100644
--- a/src/jogl/classes/javax/media/opengl/GLPipelineFactory.java
+++ b/src/jogl/classes/javax/media/opengl/GLPipelineFactory.java
@@ -39,7 +39,7 @@ package javax.media.opengl;
import java.lang.reflect.*;
import java.util.StringTokenizer;
-import com.sun.opengl.impl.*;
+import com.jogamp.opengl.impl.*;
/**
* Factory for pipelining GL instances
diff --git a/src/jogl/classes/javax/media/opengl/GLProfile.java b/src/jogl/classes/javax/media/opengl/GLProfile.java
index 69cdd3f24..6719a76a2 100644
--- a/src/jogl/classes/javax/media/opengl/GLProfile.java
+++ b/src/jogl/classes/javax/media/opengl/GLProfile.java
@@ -36,13 +36,15 @@
package javax.media.opengl;
-import javax.media.opengl.fixedfunc.*;
-import java.lang.reflect.*;
-import java.util.HashMap;
-import java.security.*;
-import com.sun.opengl.impl.*;
+import com.jogamp.opengl.impl.DRIHack;
+import com.jogamp.opengl.impl.Debug;
+import com.jogamp.opengl.impl.NativeLibLoader;
import com.sun.nativewindow.impl.NWReflection;
import com.sun.nativewindow.impl.jvm.JVMUtil;
+import java.util.HashMap;
+import java.security.AccessControlContext;
+import java.security.AccessController;
+import javax.media.opengl.fixedfunc.GLPointerFunc;
/**
* Specifies the the OpenGL profile.
@@ -192,17 +194,17 @@ public class GLProfile implements Cloneable {
private static final String getGLImplBaseClassName(String profileImpl) {
if(GL3bc.equals(profileImpl)) {
- return "com.sun.opengl.impl.gl3.GL3bc";
+ return "com.jogamp.opengl.impl.gl3.GL3bc";
} else if(GL3.equals(profileImpl)) {
- return "com.sun.opengl.impl.gl3.GL3";
+ return "com.jogamp.opengl.impl.gl3.GL3";
} else if(GL2.equals(profileImpl)) {
- return "com.sun.opengl.impl.gl2.GL2";
+ return "com.jogamp.opengl.impl.gl2.GL2";
} else if(GL2ES12.equals(profileImpl)) {
- return "com.sun.opengl.impl.gl2es12.GL2ES12";
+ return "com.jogamp.opengl.impl.gl2es12.GL2ES12";
} else if(GLES1.equals(profileImpl) || GL2ES1.equals(profileImpl)) {
- return "com.sun.opengl.impl.es1.GLES1";
+ return "com.jogamp.opengl.impl.es1.GLES1";
} else if(GLES2.equals(profileImpl) || GL2ES2.equals(profileImpl)) {
- return "com.sun.opengl.impl.es2.GLES2";
+ return "com.jogamp.opengl.impl.es2.GLES2";
} else {
throw new GLException("unsupported profile \"" + profileImpl + "\"");
}
@@ -715,22 +717,22 @@ public class GLProfile implements Cloneable {
}
// FIXME: check for real GL3 availability .. ?
- hasGL3bcImpl = hasDesktopGL && NWReflection.isClassAvailable("com.sun.opengl.impl.gl3.GL3bcImpl");
- hasGL3Impl = hasDesktopGL && NWReflection.isClassAvailable("com.sun.opengl.impl.gl3.GL3Impl");
- hasGL2Impl = hasDesktopGL && NWReflection.isClassAvailable("com.sun.opengl.impl.gl2.GL2Impl");
+ hasGL3bcImpl = hasDesktopGL && NWReflection.isClassAvailable("com.jogamp.opengl.impl.gl3.GL3bcImpl");
+ hasGL3Impl = hasDesktopGL && NWReflection.isClassAvailable("com.jogamp.opengl.impl.gl3.GL3Impl");
+ hasGL2Impl = hasDesktopGL && NWReflection.isClassAvailable("com.jogamp.opengl.impl.gl2.GL2Impl");
- hasGL2ES12Impl = hasDesktopGLES12 && NWReflection.isClassAvailable("com.sun.opengl.impl.gl2es12.GL2ES12Impl");
+ hasGL2ES12Impl = hasDesktopGLES12 && NWReflection.isClassAvailable("com.jogamp.opengl.impl.gl2es12.GL2ES12Impl");
boolean btest = false;
- boolean hasEGLDynLookup = NWReflection.isClassAvailable("com.sun.opengl.impl.egl.EGLDynamicLookupHelper");
+ boolean hasEGLDynLookup = NWReflection.isClassAvailable("com.jogamp.opengl.impl.egl.EGLDynamicLookupHelper");
boolean hasEGLDrawableFactory = false;
try {
if(hasEGLDynLookup) {
hasEGLDrawableFactory = null!=GLDrawableFactory.getFactoryImpl(GLES2);
btest = hasEGLDrawableFactory &&
- NWReflection.isClassAvailable("com.sun.opengl.impl.es2.GLES2Impl") &&
- null!=com.sun.opengl.impl.egl.EGLDynamicLookupHelper.getDynamicLookupHelper(2);
+ NWReflection.isClassAvailable("com.jogamp.opengl.impl.es2.GLES2Impl") &&
+ null!=com.jogamp.opengl.impl.egl.EGLDynamicLookupHelper.getDynamicLookupHelper(2);
}
} catch (Throwable t) {
if (DEBUG) {
@@ -744,8 +746,8 @@ public class GLProfile implements Cloneable {
try {
if(hasEGLDynLookup) {
btest = hasEGLDrawableFactory &&
- NWReflection.isClassAvailable("com.sun.opengl.impl.es1.GLES1Impl") &&
- null!=com.sun.opengl.impl.egl.EGLDynamicLookupHelper.getDynamicLookupHelper(1);
+ NWReflection.isClassAvailable("com.jogamp.opengl.impl.es1.GLES1Impl") &&
+ null!=com.jogamp.opengl.impl.egl.EGLDynamicLookupHelper.getDynamicLookupHelper(1);
}
} catch (Throwable t) {
if (DEBUG) {
diff --git a/src/jogl/classes/javax/media/opengl/Threading.java b/src/jogl/classes/javax/media/opengl/Threading.java
index fecf6c78b..e58792b8f 100755
--- a/src/jogl/classes/javax/media/opengl/Threading.java
+++ b/src/jogl/classes/javax/media/opengl/Threading.java
@@ -39,7 +39,7 @@
package javax.media.opengl;
-import com.sun.opengl.impl.*;
+import com.jogamp.opengl.impl.*;
/** This API provides access to the threading model for the implementation of
the classes in this package.
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
index 038d6d280..53e79b8d9 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
@@ -43,7 +43,7 @@ import javax.media.opengl.*;
import javax.media.nativewindow.*;
import javax.media.nativewindow.awt.*;
-import com.sun.opengl.impl.*;
+import com.jogamp.opengl.impl.*;
import java.awt.Canvas;
import java.awt.Color;
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
index e4758211e..43b2e1e1d 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
@@ -41,20 +41,17 @@ package javax.media.opengl.awt;
import javax.media.opengl.*;
import javax.media.nativewindow.*;
-import javax.media.nativewindow.awt.*;
import java.awt.*;
import java.awt.geom.*;
import java.awt.image.*;
import java.beans.*;
-import javax.swing.*;
import java.nio.*;
import java.security.*;
-import javax.swing.JComponent;
import javax.swing.JPanel;
-import com.sun.opengl.util.FBObject;
-import com.sun.opengl.impl.*;
-import com.sun.opengl.impl.awt.*;
+import com.jogamp.opengl.util.FBObject;
+import com.jogamp.opengl.impl.*;
+import com.jogamp.opengl.impl.awt.*;
// FIXME: Subclasses need to call resetGLFunctionAvailability() on their
// context whenever the displayChanged() function is called on their
@@ -1429,7 +1426,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable {
System.err.println("-- Created External Context: "+j2dContext);
}
if (DEBUG) {
- j2dContext.setGL(new DebugGL2(j2dContext.getGL().getGL2()));
+// j2dContext.setGL(new DebugGL2(j2dContext.getGL().getGL2()));
}
// Check to see whether we can support the requested
diff --git a/src/jogl/classes/javax/media/opengl/glu/GLUquadric.java b/src/jogl/classes/javax/media/opengl/glu/GLUquadric.java
index d5a7a11f3..49451a34b 100755
--- a/src/jogl/classes/javax/media/opengl/glu/GLUquadric.java
+++ b/src/jogl/classes/javax/media/opengl/glu/GLUquadric.java
@@ -1,7 +1,7 @@
package javax.media.opengl.glu;
import javax.media.opengl.GL;
-import com.sun.opengl.util.ImmModeSink;
+import com.jogamp.opengl.util.ImmModeSink;
/**
* Wrapper for a GLU quadric object.
diff --git a/src/jogl/classes/javax/media/opengl/glu/GLUtessellatorCallback.java b/src/jogl/classes/javax/media/opengl/glu/GLUtessellatorCallback.java
index 971991519..72ad68ceb 100755
--- a/src/jogl/classes/javax/media/opengl/glu/GLUtessellatorCallback.java
+++ b/src/jogl/classes/javax/media/opengl/glu/GLUtessellatorCallback.java
@@ -352,5 +352,5 @@ public interface GLUtessellatorCallback {
*/
public void errorData(int errnum, Object polygonData);
- //void mesh(com.sun.opengl.impl.tessellator.GLUmesh mesh);
+ //void mesh(com.jogamp.opengl.impl.tessellator.GLUmesh mesh);
}
diff --git a/src/jogl/classes/javax/media/opengl/glu/GLUtessellatorCallbackAdapter.java b/src/jogl/classes/javax/media/opengl/glu/GLUtessellatorCallbackAdapter.java
index 7845ac254..f380f4698 100755
--- a/src/jogl/classes/javax/media/opengl/glu/GLUtessellatorCallbackAdapter.java
+++ b/src/jogl/classes/javax/media/opengl/glu/GLUtessellatorCallbackAdapter.java
@@ -68,7 +68,7 @@ public class GLUtessellatorCallbackAdapter implements GLUtessellatorCallback {
public void edgeFlag(boolean boundaryEdge) {}
public void vertex(Object vertexData) {}
public void end() {}
-// public void mesh(com.sun.opengl.impl.tessellator.GLUmesh mesh) {}
+// public void mesh(com.jogamp.opengl.impl.tessellator.GLUmesh mesh) {}
public void error(int errnum) {}
public void combine(double[] coords, Object[] data,
float[] weight, Object[] outData) {}
--
cgit v1.2.3
From 6258a3e657cee513663fd50825b72b83aa878f6f Mon Sep 17 00:00:00 2001
From: Michael Bien
+ *
+ * There are at least two possible solutions. One would be to change
+ * the JOGL implementation to call through function pointers uniformly
+ * so that it does not need to link against libGL.so. This is
+ * possible, but requires changes to GlueGen and also is not really
+ * necessary in any other situation than with the DRI drivers. Another
+ * solution is to force the first load of libGL.so.1.2 to be done
+ * dynamically with RTLD_GLOBAL before libjogl.so is loaded and causes
+ * libGL.so.1.2 to be loaded again. The NativeLibrary class in the
+ * GlueGen runtime has this property, and we use it to implement this
+ * workaround.
+ */
+
+public class DRIHack {
+ private static final boolean DEBUG = Debug.debug("DRIHack");
+ private static boolean driHackNeeded;
+ private static NativeLibrary oglLib;
+
+ public static void begin() {
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ String os = Debug.getProperty("os.name", false).toLowerCase();
+ // Do DRI hack on all Linux distributions for best robustness
+ driHackNeeded =
+ (os.startsWith("linux") ||
+ new File("/usr/lib/dri").exists() ||
+ new File("/usr/X11R6/lib/modules/dri").exists());
+ // Allow manual overriding for now as a workaround for
+ // problems seen in some situations -- needs more investigation
+ if (Debug.getProperty("jogl.drihack.disable", true) != null) {
+ driHackNeeded = false;
+ }
+ return null;
+ }
+ });
+
+ if (driHackNeeded) {
+ if (DEBUG) {
+ System.err.println("Beginning DRI hack");
+ }
+
+ // Try a few different variants for best robustness
+ // In theory probably only the first is necessary
+ oglLib = NativeLibrary.open("libGL.so.1", null);
+ if (DEBUG && oglLib != null) System.err.println(" Found libGL.so.1");
+ if (oglLib == null) {
+ oglLib = NativeLibrary.open("/usr/lib/libGL.so.1", null);
+ if (DEBUG && oglLib != null) System.err.println(" Found /usr/lib/libGL.so.1");
+ }
+ }
+ }
+
+ public static void end() {
+ if (oglLib != null) {
+ if (DEBUG) {
+ System.err.println("Ending DRI hack");
+ }
+
+ oglLib.close();
+ oglLib = null;
+ }
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/Debug.java b/src/jogl/classes/com/jogamp/opengl/impl/Debug.java
new file mode 100644
index 000000000..82a5f2ff2
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/impl/Debug.java
@@ -0,0 +1,140 @@
+/*
+ * Copyright (c) 2003-2005 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.impl;
+
+import java.security.*;
+
+/** Helper routines for logging and debugging. */
+
+public class Debug {
+ // Some common properties
+ private static boolean verbose;
+ private static boolean debugAll;
+ private static AccessControlContext localACC;
+
+ static {
+ localACC=AccessController.getContext();
+ verbose = isPropertyDefined("jogl.verbose", true);
+ debugAll = isPropertyDefined("jogl.debug", true);
+ if (verbose) {
+ Package p = Package.getPackage("javax.media.opengl");
+ System.err.println("JOGL specification version " + p.getSpecificationVersion());
+ System.err.println("JOGL implementation version " + p.getImplementationVersion());
+ System.err.println("JOGL implementation vendor " + p.getImplementationVendor());
+ }
+ }
+
+ static int getIntProperty(final String property, final boolean jnlpAlias) {
+ return getIntProperty(property, jnlpAlias, localACC);
+ }
+
+ public static int getIntProperty(final String property, final boolean jnlpAlias, final AccessControlContext acc) {
+ int i=0;
+ try {
+ Integer iv = Integer.valueOf(Debug.getProperty(property, jnlpAlias, acc));
+ i = iv.intValue();
+ } catch (NumberFormatException nfe) {}
+ return i;
+ }
+
+ static boolean getBooleanProperty(final String property, final boolean jnlpAlias) {
+ return getBooleanProperty(property, jnlpAlias, localACC);
+ }
+
+ public static boolean getBooleanProperty(final String property, final boolean jnlpAlias, final AccessControlContext acc) {
+ Boolean b = Boolean.valueOf(Debug.getProperty(property, jnlpAlias, acc));
+ return b.booleanValue();
+ }
+
+ static boolean isPropertyDefined(final String property, final boolean jnlpAlias) {
+ return isPropertyDefined(property, jnlpAlias, localACC);
+ }
+
+ public static boolean isPropertyDefined(final String property, final boolean jnlpAlias, final AccessControlContext acc) {
+ return (Debug.getProperty(property, jnlpAlias, acc) != null) ? true : false;
+ }
+
+ static String getProperty(final String property, final boolean jnlpAlias) {
+ return getProperty(property, jnlpAlias, localACC);
+ }
+
+ public static String getProperty(final String property, final boolean jnlpAlias, final AccessControlContext acc) {
+ String s=null;
+ if(null!=acc && acc.equals(localACC)) {
+ s = (String) AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ String val=null;
+ try {
+ val = System.getProperty(property);
+ } catch (Exception e) {}
+ if(null==val && jnlpAlias && !property.startsWith(jnlp_prefix)) {
+ try {
+ val = System.getProperty(jnlp_prefix + property);
+ } catch (Exception e) {}
+ }
+ return val;
+ }
+ });
+ } else {
+ try {
+ s = System.getProperty(property);
+ } catch (Exception e) {}
+ if(null==s && jnlpAlias && !property.startsWith(jnlp_prefix)) {
+ try {
+ s = System.getProperty(jnlp_prefix + property);
+ } catch (Exception e) {}
+ }
+ }
+ return s;
+ }
+ public static final String jnlp_prefix = "jnlp." ;
+
+ public static boolean verbose() {
+ return verbose;
+ }
+
+ public static boolean debugAll() {
+ return debugAll;
+ }
+
+ public static boolean debug(String subcomponent) {
+ return debugAll() || isPropertyDefined("jogl.debug." + subcomponent, true);
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/ExtensionAvailabilityCache.java b/src/jogl/classes/com/jogamp/opengl/impl/ExtensionAvailabilityCache.java
new file mode 100644
index 000000000..f36c4f749
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/impl/ExtensionAvailabilityCache.java
@@ -0,0 +1,390 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.impl;
+
+import javax.media.opengl.*;
+import java.util.*;
+// FIXME: refactor Java SE dependencies
+//import java.util.regex.*;
+import java.lang.reflect.*;
+
+/**
+ * A utility object intended to be used by implementations to act as a cache
+ * of which OpenGL extensions are currently available on both the host machine
+ * and display.
+ */
+public final class ExtensionAvailabilityCache {
+ private static final boolean DEBUG = Debug.debug("ExtensionAvailabilityCache");
+ private static final boolean DEBUG_AVAILABILITY = Debug.isPropertyDefined("ExtensionAvailabilityCache", true);
+
+ ExtensionAvailabilityCache(GLContextImpl context)
+ {
+ this.context = context;
+ }
+
+ /**
+ * Flush the cache. The cache will be rebuilt lazily as calls to {@link
+ * #isExtensionAvailable(String)} are received.
+ */
+ public void flush()
+ {
+ if(DEBUG) {
+ System.out.println("ExtensionAvailabilityCache: Flush availability OpenGL "+majorVersion+"."+minorVersion);
+ }
+ availableExtensionCache.clear();
+ initialized = false;
+ majorVersion = 1;
+ minorVersion = 0;
+ }
+
+ /**
+ * Flush the cache and rebuild the cache.
+ */
+ public void reset() {
+ flush();
+ initAvailableExtensions();
+ }
+
+ public boolean isInitialized() {
+ return initialized && !availableExtensionCache.isEmpty() ;
+ }
+
+ public boolean isExtensionAvailable(String glExtensionName) {
+ initAvailableExtensions();
+ return availableExtensionCache.contains(mapGLExtensionName(glExtensionName));
+ }
+
+ public String getPlatformExtensionsString() {
+ initAvailableExtensions();
+ return glXExtensions;
+ }
+
+ public String getGLExtensions() {
+ initAvailableExtensions();
+ if(DEBUG) {
+ System.err.println("ExtensionAvailabilityCache: getGLExtensions() called");
+ }
+ return glExtensions;
+ }
+
+ public int getMajorVersion() {
+ initAvailableExtensions();
+ return majorVersion;
+ }
+
+ public int getMinorVersion() {
+ initAvailableExtensions();
+ return minorVersion;
+ }
+
+ private void initAvailableExtensions() {
+ // if hash is empty (meaning it was flushed), pre-cache it with the list
+ // of extensions that are in the GL_EXTENSIONS string
+ if (availableExtensionCache.isEmpty() || !initialized) {
+ GL gl = context.getGL();
+
+ if (DEBUG) {
+ System.err.println("ExtensionAvailabilityCache: Pre-caching init "+gl+", GL_VERSION "+gl.glGetString(GL.GL_VERSION));
+ }
+
+ // Set version
+ Version version = new Version(gl.glGetString(GL.GL_VERSION));
+ if (version.isValid()) {
+ majorVersion = version.getMajor();
+ minorVersion = version.getMinor();
+
+ if( !gl.isGL3() &&
+ ( majorVersion > 3 ||
+ ( majorVersion == 3 && minorVersion >= 1 ) ) ) {
+ // downsize version to 3.0 in case we are not using GL3 (3.1)
+ majorVersion = 3;
+ minorVersion = 0;
+ }
+ }
+
+ boolean useGetStringi = false;
+
+ if ( majorVersion > 3 ||
+ ( majorVersion == 3 && minorVersion >= 0 ) ||
+ gl.isGL3() ) {
+ if ( ! gl.isGL2GL3() ) {
+ if(DEBUG) {
+ System.err.println("ExtensionAvailabilityCache: GL >= 3.1 usage, but no GL2GL3 interface: "+gl.getClass().getName());
+ }
+ } else if ( ! gl.isFunctionAvailable("glGetStringi") ) {
+ if(DEBUG) {
+ System.err.println("ExtensionAvailabilityCache: GL >= 3.1 usage, but no glGetStringi");
+ }
+ } else {
+ useGetStringi = true;
+ }
+ }
+
+ if (DEBUG) {
+ System.err.println("ExtensionAvailabilityCache: Pre-caching extension availability OpenGL "+majorVersion+"."+minorVersion+
+ ", use "+ ( useGetStringi ? "glGetStringi" : "glGetString" ) );
+ }
+
+ StringBuffer sb = new StringBuffer();
+ if(useGetStringi) {
+ GL2GL3 gl2gl3 = gl.getGL2GL3();
+ int[] numExtensions = { 0 } ;
+ gl2gl3.glGetIntegerv(gl2gl3.GL_NUM_EXTENSIONS, numExtensions, 0);
+ for (int i = 0; i < numExtensions[0]; i++) {
+ sb.append(gl2gl3.glGetStringi(gl2gl3.GL_EXTENSIONS, i));
+ if(i < numExtensions[0]) {
+ sb.append(" ");
+ }
+ }
+ } else {
+ sb.append(gl.glGetString(GL.GL_EXTENSIONS));
+ }
+ glExtensions = sb.toString();
+ glXExtensions = context.getPlatformExtensionsString();
+
+ sb.append(" ");
+ sb.append(glXExtensions);
+
+ String allAvailableExtensions = sb.toString();
+ if (DEBUG_AVAILABILITY) {
+ System.err.println("ExtensionAvailabilityCache: Available extensions: " + allAvailableExtensions);
+ System.err.println("ExtensionAvailabilityCache: GL vendor: " + gl.glGetString(GL.GL_VENDOR));
+ }
+ StringTokenizer tok = new StringTokenizer(allAvailableExtensions);
+ while (tok.hasMoreTokens()) {
+ String availableExt = tok.nextToken().trim();
+ availableExt = availableExt.intern();
+ availableExtensionCache.add(availableExt);
+ if (DEBUG_AVAILABILITY) {
+ System.err.println("ExtensionAvailabilityCache: Available: " + availableExt);
+ }
+ }
+
+ // Put GL version strings in the table as well
+ // FIXME: this needs to be adjusted when the major rev changes
+ // beyond the known ones
+ int major = majorVersion;
+ int minor = minorVersion;
+ while (major > 0) {
+ while (minor >= 0) {
+ availableExtensionCache.add("GL_VERSION_" + major + "_" + minor);
+ if (DEBUG) {
+ System.err.println("ExtensionAvailabilityCache: Added GL_VERSION_" + major + "_" + minor + " to known extensions");
+ }
+ --minor;
+ }
+
+ switch (major) {
+ case 3:
+ if(gl.isGL3()) {
+ // GL3 is a GL 3.1 forward compatible context,
+ // hence no 2.0, 1.0 - 1.5 GL versions are supported.
+ major=0;
+ }
+ // Restart loop at version 2.1
+ minor = 1;
+ break;
+ case 2:
+ // Restart loop at version 1.5
+ minor = 5;
+ break;
+ case 1:
+ break;
+ }
+
+ --major;
+ }
+
+ // put a dummy var in here so that the cache is no longer empty even if
+ // no extensions are in the GL_EXTENSIONS string
+ availableExtensionCache.add("
+ *
+ * Instead we now try to track the sizes of allocated buffer objects.
+ * We watch calls to glBindBuffer to see which buffer is bound to
+ * which target and to glBufferData to see how large the buffer's
+ * allocated size is. When glMapBuffer is called, we consult our table
+ * of buffer sizes to see if we can return an answer without a glGet
+ * call.
+ *
+ * We share the GLBufferSizeTracker objects among all GLContexts for
+ * which sharing is enabled, because the namespace for buffer objects
+ * is the same for these contexts.
+ *
+ * Tracking the state of which buffer objects are bound is done in the
+ * GLBufferStateTracker and is not completely trivial. In the face of
+ * calls to glPushClientAttrib / glPopClientAttrib we currently punt
+ * and re-fetch the bound buffer object for the state in question;
+ * see, for example, glVertexPointer and the calls down to
+ * GLBufferStateTracker.getBoundBufferObject(). Note that we currently
+ * ignore new binding targets such as GL_TRANSFORM_FEEDBACK_BUFFER_NV;
+ * the fact that new binding targets may be added in the future makes
+ * it impossible to cache state for these new targets.
+ *
+ * Ignoring new binding targets, the primary situation in which we may
+ * not be able to return a cached answer is in the case of an error,
+ * where glBindBuffer may not have been called before trying to call
+ * glBufferData. Also, if external native code modifies a buffer
+ * object, we may return an incorrect answer. (FIXME: this case
+ * requires more thought, and perhaps stochastic and
+ * exponential-fallback checking. However, note that it can only occur
+ * in the face of external native code which requires that the
+ * application be signed anyway, so there is no security risk in this
+ * area.)
+ */
+
+public class GLBufferSizeTracker {
+ // Map from buffer names to sizes.
+ // Note: should probably have some way of shrinking this map, but
+ // can't just make it a WeakHashMap because nobody holds on to the
+ // keys; would have to always track creation and deletion of buffer
+ // objects, which is probably sub-optimal. The expected usage
+ // pattern of buffer objects indicates that the fact that this map
+ // never shrinks is probably not that bad.
+ private Map/*
+ *
+ * Note that because the enumerated value used for the binding of a
+ * buffer object (e.g. GL_ARRAY_BUFFER) is different than that used to
+ * query the binding using glGetIntegerv (e.g.
+ * GL_ARRAY_BUFFER_BINDING), then in the face of new binding targets
+ * being added to the GL (e.g. GL_TRANSFORM_FEEDBACK_BUFFER_NV) it is
+ * impossible to set up a query of the buffer object currently bound
+ * to a particular state. It turns out that for some uses, such as
+ * finding the size of the currently bound buffer, this doesn't
+ * matter, though of course without knowing the buffer object we can't
+ * re-associate the queried size with the buffer object ID.
+ *
+ * Because the namespace of buffer objects is the unsigned integers
+ * with 0 reserved by the GL, and because we have to be able to return
+ * both 0 and other integers as valid answers from
+ * getBoundBufferObject(), we need a second query, which is to ask
+ * whether we know the state of the binding for a given target. For
+ * "unknown" targets such as GL_TRANSFORM_FEEDBACK_BUFFER_NV we return
+ * false from this, but we also clear the valid bit and later refresh
+ * the binding state if glPushClientAttrib / glPopClientAttrib are
+ * called, since we don't want the complexity of tracking stacks of
+ * these attributes.
+ *
+ */
+
+public class GLBufferStateTracker {
+ private static final boolean DEBUG = Debug.debug("GLBufferStateTracker");
+
+ private static final Integer arrayBufferEnum = new Integer(GL.GL_ARRAY_BUFFER);
+ private static final Integer elementArrayBufferEnum = new Integer(GL.GL_ELEMENT_ARRAY_BUFFER);
+ private static final Integer pixelPackBufferEnum = new Integer(GL2.GL_PIXEL_PACK_BUFFER);
+ private static final Integer pixelUnpackBufferEnum = new Integer(GL2.GL_PIXEL_UNPACK_BUFFER);
+ private static final Integer zero = new Integer(0);
+
+ // Maps binding targets to buffer objects. A null value indicates
+ // that the binding is unknown. A zero value indicates that it is
+ // known that no buffer is bound to the target.
+ private Map/*
+ * Currently supported states: PixelStorei
+ */
+
+public class GLStateTracker {
+ private static final boolean DEBUG = Debug.debug("GLStateTracker");
+
+ private volatile boolean enabled = true;
+
+ private Map/*
+ *
+ * The {@link #ref ref} and {@link #unref unref} methods should be
+ * used during the creation and destruction of OpenGL contexts by JOGL
+ * in order to update the liveness of the objects being tracked. The
+ * various other methods should be called by the OpenGL binding in the
+ * various named methods.
+ */
+
+public class GLObjectTracker {
+ private static final boolean DEBUG = Debug.debug("GLObjectTracker");
+
+ //----------------------------------------------------------------------
+ // Adders
+ //
+
+ // glGenBuffers
+ public synchronized void addBuffers(int n, IntBuffer ids) {
+ add(getList(BUFFERS), n, ids);
+ }
+
+ // glGenBuffers
+ public synchronized void addBuffers(int n, int[] ids, int ids_offset) {
+ add(getList(BUFFERS), n, ids, ids_offset);
+ }
+
+ // glGenBuffersARB
+ public synchronized void addBuffersARB(int n, IntBuffer ids) {
+ add(getList(BUFFERS_ARB), n, ids);
+ }
+
+ // glGenBuffersARB
+ public synchronized void addBuffersARB(int n, int[] ids, int ids_offset) {
+ add(getList(BUFFERS_ARB), n, ids, ids_offset);
+ }
+
+ // glGenFencesAPPLE
+ public synchronized void addFencesAPPLE(int n, IntBuffer ids) {
+ add(getList(FENCES_APPLE), n, ids);
+ }
+
+ // glGenFencesAPPLE
+ public synchronized void addFencesAPPLE(int n, int[] ids, int ids_offset) {
+ add(getList(FENCES_APPLE), n, ids, ids_offset);
+ }
+
+ // glGenFencesNV
+ public synchronized void addFencesNV(int n, IntBuffer ids) {
+ add(getList(FENCES_NV), n, ids);
+ }
+
+ // glGenFencesNV
+ public synchronized void addFencesNV(int n, int[] ids, int ids_offset) {
+ add(getList(FENCES_NV), n, ids, ids_offset);
+ }
+
+ // glGenFragmentShadersATI
+ public synchronized void addFragmentShadersATI(int start, int n) {
+ add(getList(FRAGMENT_SHADERS_ATI), start, n);
+ }
+
+ // glGenFramebuffersEXT
+ public synchronized void addFramebuffersEXT(int n, IntBuffer ids) {
+ add(getList(FRAMEBUFFERS_EXT), n, ids);
+ }
+
+ // glGenFramebuffersEXT
+ public synchronized void addFramebuffersEXT(int n, int[] ids, int ids_offset) {
+ add(getList(FRAMEBUFFERS_EXT), n, ids, ids_offset);
+ }
+
+ // glGenLists
+ public synchronized void addLists(int start, int n) {
+ add(getList(LISTS), start, n);
+ }
+
+ // glGenOcclusionQueriesNV
+ public synchronized void addOcclusionQueriesNV(int n, IntBuffer ids) {
+ add(getList(OCCLUSION_QUERIES_NV), n, ids);
+ }
+
+ // glGenOcclusionQueriesNV
+ public synchronized void addOcclusionQueriesNV(int n, int[] ids, int ids_offset) {
+ add(getList(OCCLUSION_QUERIES_NV), n, ids, ids_offset);
+ }
+
+ // glCreateProgram
+ public synchronized void addProgramObject(int obj) {
+ add(getList(PROGRAM_OBJECTS), obj, 1);
+ }
+
+ // glCreateProgramObjectARB
+ public synchronized void addProgramObjectARB(int obj) {
+ add(getList(PROGRAM_AND_SHADER_OBJECTS_ARB), obj, 1);
+ }
+
+ // glGenProgramsARB
+ public synchronized void addProgramsARB(int n, IntBuffer ids) {
+ add(getList(PROGRAMS_ARB), n, ids);
+ }
+
+ // glGenProgramsARB
+ public synchronized void addProgramsARB(int n, int[] ids, int ids_offset) {
+ add(getList(PROGRAMS_ARB), n, ids, ids_offset);
+ }
+
+ // glGenProgramsNV
+ public synchronized void addProgramsNV(int n, IntBuffer ids) {
+ add(getList(PROGRAMS_NV), n, ids);
+ }
+
+ // glGenProgramsNV
+ public synchronized void addProgramsNV(int n, int[] ids, int ids_offset) {
+ add(getList(PROGRAMS_NV), n, ids, ids_offset);
+ }
+
+ // glGenQueries
+ public synchronized void addQueries(int n, IntBuffer ids) {
+ add(getList(QUERIES), n, ids);
+ }
+
+ // glGenQueries
+ public synchronized void addQueries(int n, int[] ids, int ids_offset) {
+ add(getList(QUERIES), n, ids, ids_offset);
+ }
+
+ // glGenQueriesARB
+ public synchronized void addQueriesARB(int n, IntBuffer ids) {
+ add(getList(QUERIES_ARB), n, ids);
+ }
+
+ // glGenQueriesARB
+ public synchronized void addQueriesARB(int n, int[] ids, int ids_offset) {
+ add(getList(QUERIES_ARB), n, ids, ids_offset);
+ }
+
+ // glGenRenderbuffersEXT
+ public synchronized void addRenderbuffersEXT(int n, IntBuffer ids) {
+ add(getList(RENDERBUFFERS_EXT), n, ids);
+ }
+
+ // glGenRenderbuffersEXT
+ public synchronized void addRenderbuffersEXT(int n, int[] ids, int ids_offset) {
+ add(getList(RENDERBUFFERS_EXT), n, ids, ids_offset);
+ }
+
+ // glCreateShader
+ public synchronized void addShaderObject(int obj) {
+ add(getList(SHADER_OBJECTS), obj, 1);
+ }
+
+ // glCreateShaderObjectARB
+ public synchronized void addShaderObjectARB(int obj) {
+ add(getList(PROGRAM_AND_SHADER_OBJECTS_ARB), obj, 1);
+ }
+
+ // glGenTextures
+ public synchronized void addTextures(int n, IntBuffer ids) {
+ add(getList(TEXTURES), n, ids);
+ }
+
+ // glGenTextures
+ public synchronized void addTextures(int n, int[] ids, int ids_offset) {
+ add(getList(TEXTURES), n, ids, ids_offset);
+ }
+
+ // glGenVertexArraysAPPLE
+ public synchronized void addVertexArraysAPPLE(int n, IntBuffer ids) {
+ add(getList(VERTEX_ARRAYS_APPLE), n, ids);
+ }
+
+ // glGenVertexArraysAPPLE
+ public synchronized void addVertexArraysAPPLE(int n, int[] ids, int ids_offset) {
+ add(getList(VERTEX_ARRAYS_APPLE), n, ids, ids_offset);
+ }
+
+ // glGenVertexShadersEXT
+ public synchronized void addVertexShadersEXT(int start, int n) {
+ add(getList(VERTEX_SHADERS_EXT), start, n);
+ }
+
+ //----------------------------------------------------------------------
+ // Removers
+ //
+
+ // glDeleteBuffers
+ public synchronized void removeBuffers(int n, IntBuffer ids) {
+ remove(getList(BUFFERS), n, ids);
+ }
+
+ // glDeleteBuffers
+ public synchronized void removeBuffers(int n, int[] ids, int ids_offset) {
+ remove(getList(BUFFERS), n, ids, ids_offset);
+ }
+
+ // glDeleteBuffersARB
+ public synchronized void removeBuffersARB(int n, IntBuffer ids) {
+ remove(getList(BUFFERS_ARB), n, ids);
+ }
+
+ // glDeleteBuffersARB
+ public synchronized void removeBuffersARB(int n, int[] ids, int ids_offset) {
+ remove(getList(BUFFERS_ARB), n, ids, ids_offset);
+ }
+
+ // glDeleteFencesAPPLE
+ public synchronized void removeFencesAPPLE(int n, IntBuffer ids) {
+ remove(getList(FENCES_APPLE), n, ids);
+ }
+
+ // glDeleteFencesAPPLE
+ public synchronized void removeFencesAPPLE(int n, int[] ids, int ids_offset) {
+ remove(getList(FENCES_APPLE), n, ids, ids_offset);
+ }
+
+ // glDeleteFencesNV
+ public synchronized void removeFencesNV(int n, IntBuffer ids) {
+ remove(getList(FENCES_NV), n, ids);
+ }
+
+ // glDeleteFencesNV
+ public synchronized void removeFencesNV(int n, int[] ids, int ids_offset) {
+ remove(getList(FENCES_NV), n, ids, ids_offset);
+ }
+
+ // glDeleteFragmentShaderATI
+ public synchronized void removeFragmentShaderATI(int obj) {
+ remove(getList(FRAGMENT_SHADERS_ATI), obj, 1);
+ }
+
+ // glDeleteFramebuffersEXT
+ public synchronized void removeFramebuffersEXT(int n, IntBuffer ids) {
+ remove(getList(FRAMEBUFFERS_EXT), n, ids);
+ }
+
+ // glDeleteFramebuffersEXT
+ public synchronized void removeFramebuffersEXT(int n, int[] ids, int ids_offset) {
+ remove(getList(FRAMEBUFFERS_EXT), n, ids, ids_offset);
+ }
+
+ // glDeleteLists
+ public synchronized void removeLists(int start, int n) {
+ remove(getList(LISTS), start, n);
+ }
+
+ // glDeleteOcclusionQueriesNV
+ public synchronized void removeOcclusionQueriesNV(int n, IntBuffer ids) {
+ remove(getList(OCCLUSION_QUERIES_NV), n, ids);
+ }
+
+ // glDeleteOcclusionQueriesNV
+ public synchronized void removeOcclusionQueriesNV(int n, int[] ids, int ids_offset) {
+ remove(getList(OCCLUSION_QUERIES_NV), n, ids, ids_offset);
+ }
+
+ // glDeleteProgram
+ public synchronized void removeProgramObject(int obj) {
+ remove(getList(PROGRAM_OBJECTS), obj, 1);
+ }
+
+ // glDeleteObjectARB
+ public synchronized void removeProgramOrShaderObjectARB(int obj) {
+ remove(getList(PROGRAM_AND_SHADER_OBJECTS_ARB), obj, 1);
+ }
+
+ // glDeleteProgramsARB
+ public synchronized void removeProgramsARB(int n, IntBuffer ids) {
+ remove(getList(PROGRAMS_ARB), n, ids);
+ }
+
+ // glDeleteProgramsARB
+ public synchronized void removeProgramsARB(int n, int[] ids, int ids_offset) {
+ remove(getList(PROGRAMS_ARB), n, ids, ids_offset);
+ }
+
+ // glDeleteProgramsNV
+ public synchronized void removeProgramsNV(int n, IntBuffer ids) {
+ remove(getList(PROGRAMS_NV), n, ids);
+ }
+
+ // glDeleteProgramsNV
+ public synchronized void removeProgramsNV(int n, int[] ids, int ids_offset) {
+ remove(getList(PROGRAMS_NV), n, ids, ids_offset);
+ }
+
+ // glDeleteQueries
+ public synchronized void removeQueries(int n, IntBuffer ids) {
+ remove(getList(QUERIES), n, ids);
+ }
+
+ // glDeleteQueries
+ public synchronized void removeQueries(int n, int[] ids, int ids_offset) {
+ remove(getList(QUERIES), n, ids, ids_offset);
+ }
+
+ // glDeleteQueriesARB
+ public synchronized void removeQueriesARB(int n, IntBuffer ids) {
+ remove(getList(QUERIES_ARB), n, ids);
+ }
+
+ // glDeleteQueriesARB
+ public synchronized void removeQueriesARB(int n, int[] ids, int ids_offset) {
+ remove(getList(QUERIES_ARB), n, ids, ids_offset);
+ }
+
+ // glDeleteRenderbuffersEXT
+ public synchronized void removeRenderbuffersEXT(int n, IntBuffer ids) {
+ remove(getList(RENDERBUFFERS_EXT), n, ids);
+ }
+
+ // glDeleteRenderbuffersEXT
+ public synchronized void removeRenderbuffersEXT(int n, int[] ids, int ids_offset) {
+ remove(getList(RENDERBUFFERS_EXT), n, ids, ids_offset);
+ }
+
+ // glDeleteShader
+ public synchronized void removeShaderObject(int obj) {
+ remove(getList(SHADER_OBJECTS), obj, 1);
+ }
+
+ // glDeleteTextures
+ public synchronized void removeTextures(int n, IntBuffer ids) {
+ remove(getList(TEXTURES), n, ids);
+ }
+
+ // glDeleteTextures
+ public synchronized void removeTextures(int n, int[] ids, int ids_offset) {
+ remove(getList(TEXTURES), n, ids, ids_offset);
+ }
+
+ // glDeleteVertexArraysAPPLE
+ public synchronized void removeVertexArraysAPPLE(int n, IntBuffer ids) {
+ remove(getList(VERTEX_ARRAYS_APPLE), n, ids);
+ }
+
+ // glDeleteVertexArraysAPPLE
+ public synchronized void removeVertexArraysAPPLE(int n, int[] ids, int ids_offset) {
+ remove(getList(VERTEX_ARRAYS_APPLE), n, ids, ids_offset);
+ }
+
+ // glDeleteVertexShaderEXT
+ public synchronized void removeVertexShaderEXT(int obj) {
+ remove(getList(VERTEX_SHADERS_EXT), obj, 1);
+ }
+
+ //----------------------------------------------------------------------
+ // Reference count maintenance and manual deletion
+ //
+
+ public synchronized void transferAll(GLObjectTracker other) {
+ for (int i = 0; i < lists.length; i++) {
+ getList(i).addAll(other.lists[i]);
+ if (other.lists[i] != null) {
+ other.lists[i].clear();
+ }
+ }
+ dirty = true;
+ }
+
+ public synchronized void ref() {
+ ++refCount;
+ }
+
+ public void unref(GLObjectTracker deletedObjectPool) {
+ boolean tryDelete = false;
+ synchronized (this) {
+ if (--refCount == 0) {
+ tryDelete = true;
+ }
+ }
+ if (tryDelete) {
+ // See whether we should try to do the work now or whether we
+ // have to postpone
+ GLContext cur = GLContext.getCurrent();
+ if ((cur != null) &&
+ (cur instanceof GLContextImpl)) {
+ GLContextImpl curImpl = (GLContextImpl) cur;
+ if (deletedObjectPool != null &&
+ deletedObjectPool == curImpl.getDeletedObjectTracker()) {
+ // Should be safe to delete these objects now
+ try {
+ delete((GL2)curImpl.getGL());
+ return;
+ } catch (GLException e) {
+ // Shouldn't happen, but if it does, transfer all objects
+ // to the deleted object pool hoping we can later clean
+ // them up
+ deletedObjectPool.transferAll(this);
+ throw(e);
+ }
+ }
+ }
+ // If we get here, we couldn't attempt to delete the objects
+ // right now; instead try to transfer them to the
+ // deletedObjectPool for later cleanup (FIXME: should consider
+ // throwing an exception if deletedObjectPool is null, since
+ // that shouldn't happen)
+ if (DEBUG) {
+ String s = null;
+ if (cur == null) {
+ s = "current context was null";
+ } else if (!(cur instanceof GLContextImpl)) {
+ s = "current context was not a GLContextImpl";
+ } else if (deletedObjectPool == null) {
+ s = "no current deletedObjectPool";
+ } else if (deletedObjectPool != ((GLContextImpl) cur).getDeletedObjectTracker()) {
+ s = "deletedObjectTracker didn't match";
+ if (((GLContextImpl) cur).getDeletedObjectTracker() == null) {
+ s += " (other was null)";
+ }
+ } else {
+ s = "unknown reason";
+ }
+ System.err.println("Deferred destruction of server-side OpenGL objects into " + deletedObjectPool + ": " + s);
+ }
+
+ if (deletedObjectPool != null) {
+ deletedObjectPool.transferAll(this);
+ }
+ }
+ }
+
+ public void clean(GL2 gl) {
+ if (dirty) {
+ try {
+ delete(gl);
+ dirty = false;
+ } catch (GLException e) {
+ // FIXME: not sure what to do here; probably a bad idea to be
+ // throwing exceptions during an otherwise-successful makeCurrent
+ }
+ }
+ }
+
+
+ //----------------------------------------------------------------------
+ // Internals only below this point
+ //
+
+ // Kinds of sharable server-side OpenGL objects this class tracks
+ private static final int BUFFERS = 0;
+ private static final int BUFFERS_ARB = 1;
+ private static final int FENCES_APPLE = 2;
+ private static final int FENCES_NV = 3;
+ private static final int FRAGMENT_SHADERS_ATI = 4;
+ private static final int FRAMEBUFFERS_EXT = 5;
+ private static final int LISTS = 6;
+ private static final int OCCLUSION_QUERIES_NV = 7;
+ private static final int PROGRAM_AND_SHADER_OBJECTS_ARB = 8;
+ private static final int PROGRAM_OBJECTS = 9;
+ private static final int PROGRAMS_ARB = 10;
+ private static final int PROGRAMS_NV = 11;
+ private static final int QUERIES = 12;
+ private static final int QUERIES_ARB = 13;
+ private static final int RENDERBUFFERS_EXT = 14;
+ private static final int SHADER_OBJECTS = 15;
+ private static final int TEXTURES = 16;
+ private static final int VERTEX_ARRAYS_APPLE = 17;
+ private static final int VERTEX_SHADERS_EXT = 18;
+ private static final int NUM_OBJECT_TYPES = 19;
+
+ static abstract class Deleter {
+ public abstract void delete(GL2 gl, int obj);
+ }
+
+ static class ObjectList {
+ private static final int MIN_CAPACITY = 4;
+
+ private int size;
+ private int capacity;
+ private int[] data;
+ private Deleter deleter;
+ private String name;
+
+ public ObjectList(Deleter deleter) {
+ this.deleter = deleter;
+ clear();
+ }
+
+ public void add(int obj) {
+ if (size == capacity) {
+ int newCapacity = 2 * capacity;
+ int[] newData = new int[newCapacity];
+ System.arraycopy(data, 0, newData, 0, size);
+ data = newData;
+ capacity = newCapacity;
+ }
+
+ data[size++] = obj;
+ }
+
+ public void addAll(ObjectList other) {
+ if (other == null) {
+ return;
+ }
+ for (int i = 0; i < other.size; i++) {
+ add(other.data[i]);
+ }
+ }
+
+ public boolean remove(int value) {
+ for (int i = 0; i < size; i++) {
+ if (data[i] == value) {
+ if (i < size - 1) {
+ System.arraycopy(data, i+1, data, i, size - i - 1);
+ }
+ --size;
+ if ((size < capacity / 4) &&
+ (capacity > MIN_CAPACITY)) {
+ int newCapacity = capacity / 4;
+ if (newCapacity < MIN_CAPACITY) {
+ newCapacity = MIN_CAPACITY;
+ }
+ int[] newData = new int[newCapacity];
+ System.arraycopy(data, 0, newData, 0, size);
+ data = newData;
+ capacity = newCapacity;
+ }
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public void setName(String name) {
+ if (DEBUG) {
+ this.name = name;
+ }
+ }
+
+ public void delete(GL2 gl) {
+ // Just in case we start throwing exceptions during deletion,
+ // make sure we make progress rather than going into an infinite
+ // loop
+ while (size > 0) {
+ int obj = data[size - 1];
+ --size;
+ if (DEBUG) {
+ System.err.println("Deleting server-side OpenGL object " + obj +
+ ((name != null) ? (" (" + name + ")") : ""));
+ }
+ deleter.delete(gl, obj);
+ }
+ }
+
+ public void clear() {
+ size = 0;
+ capacity = MIN_CAPACITY;
+ data = new int[capacity];
+ }
+ }
+
+ private ObjectList[] lists = new ObjectList[NUM_OBJECT_TYPES];
+ private int refCount;
+ private boolean dirty;
+
+ private void add(ObjectList list, int n, IntBuffer ids) {
+ int pos = ids.position();
+ for (int i = 0; i < n; i++) {
+ list.add(ids.get(pos + i));
+ }
+ }
+
+ private void add(ObjectList list, int n, int[] ids, int ids_offset) {
+ for (int i = 0; i < n; i++) {
+ list.add(ids[i + ids_offset]);
+ }
+ }
+
+ private void add(ObjectList list, int start, int n) {
+ for (int i = 0; i < n; i++) {
+ list.add(start + i);
+ }
+ }
+
+ private void remove(ObjectList list, int n, IntBuffer ids) {
+ int pos = ids.position();
+ for (int i = 0; i < n; i++) {
+ list.remove(ids.get(pos + i));
+ }
+ }
+
+ private void remove(ObjectList list, int n, int[] ids, int ids_offset) {
+ for (int i = 0; i < n; i++) {
+ list.remove(ids[i + ids_offset]);
+ }
+ }
+
+ private void remove(ObjectList list, int start, int n) {
+ for (int i = 0; i < n; i++) {
+ list.remove(start + i);
+ }
+ }
+
+ private ObjectList getList(int which) {
+ ObjectList list = lists[which];
+ if (list == null) {
+ Deleter deleter = null;
+ String name = null;
+ // Figure out which deleter we need
+ switch (which) {
+ case BUFFERS:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteBuffers(1, new int[] { obj }, 0);
+ }
+ };
+ name = "buffer";
+ break;
+ case BUFFERS_ARB:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteBuffersARB(1, new int[] { obj }, 0);
+ }
+ };
+ name = "ARB buffer";
+ break;
+ case FENCES_APPLE:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteFencesAPPLE(1, new int[] { obj }, 0);
+ }
+ };
+ name = "APPLE fence";
+ break;
+ case FENCES_NV:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteFencesNV(1, new int[] { obj }, 0);
+ }
+ };
+ name = "NV fence";
+ break;
+ case FRAGMENT_SHADERS_ATI:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteFragmentShaderATI(obj);
+ }
+ };
+ name = "ATI fragment shader";
+ break;
+ case FRAMEBUFFERS_EXT:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteFramebuffersEXT(1, new int[] { obj }, 0);
+ }
+ };
+ name = "EXT framebuffer";
+ break;
+ case LISTS:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteLists(obj, 1);
+ }
+ };
+ name = "display list";
+ break;
+ case OCCLUSION_QUERIES_NV:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteOcclusionQueriesNV(1, new int[] { obj }, 0);
+ }
+ };
+ name = "NV occlusion query";
+ break;
+ case PROGRAM_AND_SHADER_OBJECTS_ARB:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteObjectARB(obj);
+ }
+ };
+ name = "ARB program or shader object";
+ break;
+ case PROGRAM_OBJECTS:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteProgram(obj);
+ }
+ };
+ name = "program object";
+ break;
+ case PROGRAMS_ARB:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteProgramsARB(1, new int[] { obj }, 0);
+ }
+ };
+ name = "ARB program object";
+ break;
+ case PROGRAMS_NV:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteProgramsNV(1, new int[] { obj }, 0);
+ }
+ };
+ name = "NV program";
+ break;
+ case QUERIES:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteQueries(1, new int[] { obj }, 0);
+ }
+ };
+ name = "query";
+ break;
+ case QUERIES_ARB:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteQueriesARB(1, new int[] { obj }, 0);
+ }
+ };
+ name = "ARB query";
+ break;
+ case RENDERBUFFERS_EXT:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteRenderbuffersEXT(1, new int[] { obj }, 0);
+ }
+ };
+ name = "EXT renderbuffer";
+ break;
+ case SHADER_OBJECTS:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteShader(obj);
+ }
+ };
+ name = "shader object";
+ break;
+ case TEXTURES:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteTextures(1, new int[] { obj }, 0);
+ }
+ };
+ name = "texture";
+ break;
+ case VERTEX_ARRAYS_APPLE:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteVertexArraysAPPLE(1, new int[] { obj }, 0);
+ }
+ };
+ name = "APPLE vertex array";
+ break;
+ case VERTEX_SHADERS_EXT:
+ deleter = new Deleter() {
+ public void delete(GL2 gl, int obj) {
+ gl.glDeleteVertexShaderEXT(obj);
+ }
+ };
+ name = "EXT vertex shader";
+ break;
+ default:
+ throw new InternalError("Unexpected OpenGL object type " + which);
+ }
+
+ list = new ObjectList(deleter);
+ list.setName(name);
+ lists[which] = list;
+ }
+ return list;
+ }
+
+ private void delete(GL2 gl) {
+ for (int i = 0; i < lists.length; i++) {
+ ObjectList list = lists[i];
+ if (list != null) {
+ list.delete(gl);
+ lists[i] = null;
+ }
+ }
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLContext.java b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLContext.java
new file mode 100644
index 000000000..bf4023c1c
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLContext.java
@@ -0,0 +1,342 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.impl.macosx.cgl;
+
+import java.nio.*;
+import java.util.*;
+import javax.media.opengl.*;
+import javax.media.nativewindow.*;
+import com.jogamp.opengl.impl.*;
+import com.jogamp.gluegen.runtime.ProcAddressTable;
+
+public abstract class MacOSXCGLContext extends GLContextImpl
+{
+ protected long nsContext; // NSOpenGLContext
+ protected long cglContext; // CGLContextObj
+ private CGLExt cglExt;
+ // Table that holds the addresses of the native C-language entry points for
+ // CGL extension functions.
+ private CGLExtProcAddressTable cglExtProcAddressTable;
+
+ public MacOSXCGLContext(GLDrawableImpl drawable, GLDrawableImpl drawableRead,
+ GLContext shareWith) {
+ super(drawable, drawableRead, shareWith);
+ }
+
+ public MacOSXCGLContext(GLDrawableImpl drawable,
+ GLContext shareWith) {
+ this(drawable, null, shareWith);
+ }
+
+ public Object getPlatformGLExtensions() {
+ return getCGLExt();
+ }
+
+ public CGLExt getCGLExt() {
+ if (cglExt == null) {
+ cglExt = new CGLExtImpl(this);
+ }
+ return cglExt;
+ }
+
+ public final ProcAddressTable getPlatformExtProcAddressTable() {
+ return getCGLExtProcAddressTable();
+ }
+
+ public final CGLExtProcAddressTable getCGLExtProcAddressTable() {
+ return cglExtProcAddressTable;
+ }
+
+ protected String mapToRealGLFunctionName(String glFunctionName)
+ {
+ return glFunctionName;
+ }
+
+ protected String mapToRealGLExtensionName(String glExtensionName)
+ {
+ return glExtensionName;
+ }
+
+ protected abstract boolean create();
+
+ /**
+ * Creates and initializes an appropriate OpenGl nsContext. Should only be
+ * called by {@link makeCurrentImpl()}.
+ */
+ protected boolean create(boolean pbuffer, boolean floatingPoint) {
+ MacOSXCGLContext other = (MacOSXCGLContext) GLContextShareSet.getShareContext(this);
+ long share = 0;
+ if (other != null) {
+ share = other.getNSContext();
+ if (share == 0) {
+ throw new GLException("GLContextShareSet returned an invalid OpenGL context");
+ }
+ }
+ MacOSXCGLGraphicsConfiguration config = (MacOSXCGLGraphicsConfiguration) drawable.getNativeWindow().getGraphicsConfiguration().getNativeGraphicsConfiguration();
+ GLCapabilities capabilitiesRequested = (GLCapabilities)config.getRequestedCapabilities();
+ GLProfile glProfile = capabilitiesRequested.getGLProfile();
+ if(glProfile.isGL3()) {
+ throw new GLException("GL3 profile currently not supported on MacOSX, due to the lack of a OpenGL 3.1 implementation");
+ }
+ // HACK .. bring in OnScreen/PBuffer selection to the DrawableFactory !!
+ GLCapabilities capabilities = (GLCapabilities) capabilitiesRequested.clone();
+ capabilities.setPBuffer(pbuffer);
+ capabilities.setPbufferFloatingPointBuffers(floatingPoint);
+
+ long pixelFormat = MacOSXCGLGraphicsConfiguration.GLCapabilities2NSPixelFormat(capabilities);
+ if (pixelFormat == 0) {
+ throw new GLException("Unable to allocate pixel format with requested GLCapabilities");
+ }
+ config.setChosenPixelFormat(pixelFormat);
+ try {
+ int[] viewNotReady = new int[1];
+ // Try to allocate a context with this
+ nsContext = CGL.createContext(share,
+ drawable.getNativeWindow().getSurfaceHandle(),
+ pixelFormat,
+ viewNotReady, 0);
+ if (nsContext == 0) {
+ if (viewNotReady[0] == 1) {
+ if (DEBUG) {
+ System.err.println("!!! View not ready for " + getClass().getName());
+ }
+ // View not ready at the window system level -- this is OK
+ return false;
+ }
+ throw new GLException("Error creating NSOpenGLContext with requested pixel format");
+ }
+
+ if (!pbuffer && !capabilities.isBackgroundOpaque()) {
+ // Set the context opacity
+ CGL.setContextOpacity(nsContext, 0);
+ }
+
+ GLCapabilities caps = MacOSXCGLGraphicsConfiguration.NSPixelFormat2GLCapabilities(glProfile, pixelFormat);
+ config.setChosenCapabilities(caps);
+ } finally {
+ CGL.deletePixelFormat(pixelFormat);
+ }
+ if (!CGL.makeCurrentContext(nsContext)) {
+ throw new GLException("Error making nsContext current");
+ }
+ setGLFunctionAvailability(true);
+ GLContextShareSet.contextCreated(this);
+ return true;
+ }
+
+ protected int makeCurrentImpl() throws GLException {
+ if (0 == cglContext && drawable.getNativeWindow().getSurfaceHandle() == 0) {
+ if (DEBUG) {
+ System.err.println("drawable not properly initialized");
+ }
+ return CONTEXT_NOT_CURRENT;
+ }
+ boolean created = false;
+ if ( 0 == cglContext && 0 == nsContext) {
+ if (!create()) {
+ return CONTEXT_NOT_CURRENT;
+ }
+ if (DEBUG) {
+ System.err.println("!!! Created OpenGL context " + toHexString(nsContext) + " for " + getClass().getName());
+ }
+ created = true;
+ }
+
+ if ( 0 != cglContext ) {
+ if (CGL.kCGLNoError != CGL.CGLSetCurrentContext(cglContext)) {
+ throw new GLException("Error making cglContext current");
+ }
+ } else {
+ if (!CGL.makeCurrentContext(nsContext)) {
+ throw new GLException("Error making nsContext current");
+ }
+ }
+
+ if (created) {
+ setGLFunctionAvailability(false);
+ return CONTEXT_CURRENT_NEW;
+ }
+ return CONTEXT_CURRENT;
+ }
+
+ protected void releaseImpl() throws GLException {
+ if ( 0 != cglContext ) {
+ CGL.CGLReleaseContext(cglContext);
+ } else {
+ if (!CGL.clearCurrentContext(nsContext)) {
+ throw new GLException("Error freeing OpenGL nsContext");
+ }
+ }
+ }
+
+ protected void destroyImpl() throws GLException {
+ boolean hadContext = isCreated();
+ if ( 0 != cglContext ) {
+ if (CGL.kCGLNoError != CGL.CGLDestroyContext(cglContext)) {
+ throw new GLException("Unable to delete OpenGL cglContext");
+ }
+ if (DEBUG) {
+ System.err.println("!!! Destroyed OpenGL cglContext " + cglContext);
+ }
+ cglContext = 0;
+ GLContextShareSet.contextDestroyed(this);
+ } else if ( 0 != nsContext ) {
+ if (!CGL.deleteContext(nsContext)) {
+ throw new GLException("Unable to delete OpenGL nsContext");
+ }
+ if (DEBUG) {
+ System.err.println("!!! Destroyed OpenGL nsContext " + nsContext);
+ }
+ nsContext = 0;
+ }
+ if(hadContext) {
+ GLContextShareSet.contextDestroyed(this);
+ }
+ }
+
+ public boolean isCreated() {
+ return 0 != cglContext || 0 != nsContext ;
+ }
+
+ public void copy(GLContext source, int mask) throws GLException {
+ long dst = getCGLContext();
+ long src = 0;
+ if( 0 != dst ) {
+ src = ((MacOSXCGLContext) source).getCGLContext();
+ if (src == 0) {
+ throw new GLException("Source OpenGL cglContext has not been created ; Destination has a cglContext.");
+ }
+ CGL.CGLCopyContext(src, dst, mask);
+ } else {
+ dst = getNSContext();
+ src = ((MacOSXCGLContext) source).getNSContext();
+ if (src == 0) {
+ throw new GLException("Source OpenGL nsContext has not been created");
+ }
+ if (dst == 0) {
+ throw new GLException("Destination OpenGL nsContext has not been created");
+ }
+ CGL.copyContext(dst, src, mask);
+ }
+ }
+
+ protected void updateGLProcAddressTable() {
+ if (DEBUG) {
+ System.err.println("!!! Initializing CGL extension address table");
+ }
+ if (cglExtProcAddressTable == null) {
+ // FIXME: cache ProcAddressTables by capability bits so we can
+ // share them among contexts with the same capabilities
+ cglExtProcAddressTable = new CGLExtProcAddressTable();
+ }
+ resetProcAddressTable(getCGLExtProcAddressTable());
+ super.updateGLProcAddressTable();
+ }
+
+ public String getPlatformExtensionsString()
+ {
+ return "";
+ }
+
+ protected void setSwapIntervalImpl(int interval) {
+ if ( 0 != cglContext ) {
+ int[] lval = new int[] { (int) interval } ;
+ CGL.CGLSetParameter(cglContext, CGL.kCGLCPSwapInterval, lval, 0);
+ } else if ( 0 != nsContext ) {
+ CGL.setSwapInterval(nsContext, interval);
+ } else {
+ throw new GLException("OpenGL context not current");
+ }
+ currentSwapInterval = interval ;
+ }
+
+ public ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3) {
+ // FIXME: apparently the Apple extension doesn't require a custom memory allocator
+ throw new GLException("Not yet implemented");
+ }
+
+ public boolean isFunctionAvailable(String glFunctionName)
+ {
+ return super.isFunctionAvailable(glFunctionName);
+ }
+
+ public boolean isExtensionAvailable(String glExtensionName) {
+ if (glExtensionName.equals("GL_ARB_pbuffer") ||
+ glExtensionName.equals("GL_ARB_pixel_format")) {
+ return true;
+ }
+ return super.isExtensionAvailable(glExtensionName);
+ }
+
+ public int getOffscreenContextPixelDataType() {
+ throw new GLException("Should not call this");
+ }
+
+ public int getOffscreenContextReadBuffer() {
+ throw new GLException("Should not call this");
+ }
+
+ public boolean offscreenImageNeedsVerticalFlip() {
+ throw new GLException("Should not call this");
+ }
+
+ public void bindPbufferToTexture() {
+ throw new GLException("Should not call this");
+ }
+
+ public void releasePbufferFromTexture() {
+ throw new GLException("Should not call this");
+ }
+
+ // Support for "mode switching" as described in MacOSXCGLDrawable
+ public abstract void setOpenGLMode(int mode);
+ public abstract int getOpenGLMode();
+
+ //----------------------------------------------------------------------
+ // Internals only below this point
+ //
+
+ public long getCGLContext() {
+ return cglContext;
+ }
+ public long getNSContext() {
+ return nsContext;
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLDrawable.java b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLDrawable.java
new file mode 100644
index 000000000..2b91eb5d3
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLDrawable.java
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.impl.macosx.cgl;
+
+import javax.media.nativewindow.*;
+import javax.media.opengl.*;
+import com.jogamp.opengl.impl.*;
+import com.jogamp.gluegen.runtime.DynamicLookupHelper;
+
+public abstract class MacOSXCGLDrawable extends GLDrawableImpl {
+ // The Java2D/OpenGL pipeline on OS X uses low-level CGLContextObjs
+ // to represent the contexts for e.g. the Java2D back buffer. When
+ // the Java2D/JOGL bridge is active, this means that if we want to
+ // be able to share textures and display lists with the Java2D
+ // contexts, we need to use the CGL APIs rather than the NSOpenGL
+ // APIs on the JOGL side. For example, if we create a pbuffer using
+ // the NSOpenGL APIs and want to share textures and display lists
+ // between it and the Java2D back buffer, there is no way to do so,
+ // because the Java2D context is actually a CGLContextObj and the
+ // NSOpenGLContext's initWithFormat:shareContext: only accepts an
+ // NSOpenGLContext as its second argument. Of course there is no way
+ // to wrap an NSOpenGLContext around an arbitrary CGLContextObj.
+ //
+ // The situation we care most about is allowing a GLPbuffer to share
+ // textures, etc. with a GLJPanel when the Java2D/JOGL bridge is
+ // active; several of the demos rely on this functionality. We aim
+ // to get there by allowing a GLPBuffer to switch its implementation
+ // between using an NSOpenGLPixelBuffer and a CGLPBufferObj. In
+ // order to track whether this has been done we need to have the
+ // notion of a "mode" of both the MacOSXCGLDrawable and the
+ // MacOSXGLContext. Initially the mode is "unspecified", meaning it
+ // leans toward the default (NSOpenGL). If sharing is requested
+ // between either a GLJPanel and a GLPbuffer or a GLCanvas and a
+ // GLPbuffer, the GLPbuffer will be switched into the appropriate
+ // mode: CGL mode for a GLJPanel and NSOpenGL mode for a GLCanvas.
+ // To avoid thrashing we support exactly one such switch during the
+ // lifetime of a given GLPbuffer. This is not a fully general
+ // solution (for example, you can't share textures among a
+ // GLPbuffer, a GLJPanel and a GLCanvas simultaneously) but should
+ // be enough to get things off the ground.
+ public static final int NSOPENGL_MODE = 1;
+ public static final int CGL_MODE = 2;
+
+ public MacOSXCGLDrawable(GLDrawableFactory factory, NativeWindow comp, boolean realized) {
+ super(factory, comp, realized);
+ }
+
+ protected void setRealizedImpl() {
+ if(realized) {
+ if( NativeWindow.LOCK_SURFACE_NOT_READY == lockSurface() ) {
+ throw new GLException("Couldn't lock surface");
+ }
+ try {
+ // don't remove this block .. locking the surface is essential to update surface data
+ } finally {
+ unlockSurface();
+ }
+ }
+ }
+
+ public DynamicLookupHelper getDynamicLookupHelper() {
+ return (MacOSXCGLDrawableFactory) getFactoryImpl() ;
+ }
+
+ protected static String getThreadName() {
+ return Thread.currentThread().getName();
+ }
+
+ // Support for "mode switching" as per above
+ public abstract void setOpenGLMode(int mode);
+ public abstract int getOpenGLMode();
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java
new file mode 100644
index 000000000..c08599964
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java
@@ -0,0 +1,161 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.impl.macosx.cgl;
+
+import java.lang.reflect.InvocationTargetException;
+import java.nio.*;
+import java.util.*;
+import javax.media.nativewindow.*;
+import javax.media.opengl.*;
+import com.jogamp.opengl.impl.*;
+import com.sun.nativewindow.impl.*;
+import com.jogamp.gluegen.runtime.DynamicLookupHelper;
+
+public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl implements DynamicLookupHelper {
+ public MacOSXCGLDrawableFactory() {
+ super();
+
+ // Register our GraphicsConfigurationFactory implementations
+ // The act of constructing them causes them to be registered
+ new MacOSXCGLGraphicsConfigurationFactory();
+
+ try {
+ NWReflection.createInstance("com.jogamp.opengl.impl.macosx.cgl.awt.MacOSXAWTCGLGraphicsConfigurationFactory",
+ new Object[] {});
+ } catch (Throwable t) { }
+ }
+
+ public GLDrawableImpl createOnscreenDrawable(NativeWindow target) {
+ if (target == null) {
+ throw new IllegalArgumentException("Null target");
+ }
+ return new MacOSXOnscreenCGLDrawable(this, target);
+ }
+
+ protected GLDrawableImpl createOffscreenDrawable(NativeWindow target) {
+ return new MacOSXOffscreenCGLDrawable(this, target);
+ }
+
+ public boolean canCreateGLPbuffer() {
+ return true;
+ }
+
+ protected GLDrawableImpl createGLPbufferDrawableImpl(final NativeWindow target) {
+ /**
+ * FIXME: Think about this ..
+ * should not be necessary ? ..
+ final List returnList = new ArrayList();
+ final GLDrawableFactory factory = this;
+ Runnable r = new Runnable() {
+ public void run() {
+ returnList.add(new MacOSXPbufferCGLDrawable(factory, target));
+ }
+ };
+ maybeDoSingleThreadedWorkaround(r);
+ return (GLDrawableImpl) returnList.get(0);
+ */
+ return new MacOSXPbufferCGLDrawable(this, target);
+ }
+
+ protected NativeWindow createOffscreenWindow(GLCapabilities capabilities, GLCapabilitiesChooser chooser, int width, int height) {
+ AbstractGraphicsScreen screen = DefaultGraphicsScreen.createDefault();
+ NullWindow nw = new NullWindow(MacOSXCGLGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(capabilities, chooser, screen, true));
+ nw.setSize(width, height);
+ return nw;
+ }
+
+ public GLContext createExternalGLContext() {
+ return MacOSXExternalCGLContext.create(this, null);
+ }
+
+ public boolean canCreateExternalGLDrawable() {
+ return false;
+ }
+
+ public GLDrawable createExternalGLDrawable() {
+ // FIXME
+ throw new GLException("Not yet implemented");
+ }
+
+ public void loadGLULibrary() {
+ // Nothing to do; already loaded by native code; not much point in
+ // making it lazier on this platform
+ }
+
+ public long dynamicLookupFunction(String glFuncName) {
+ return CGL.getProcAddress(glFuncName);
+ }
+
+ public boolean canCreateContextOnJava2DSurface() {
+ return false;
+ }
+
+ public GLContext createContextOnJava2DSurface(Object graphics, GLContext shareWith)
+ throws GLException {
+ throw new GLException("not supported in non AWT enviroment");
+ }
+
+ //------------------------------------------------------
+ // Gamma-related functionality
+ //
+
+ private static final int GAMMA_RAMP_LENGTH = 256;
+
+ /** Returns the length of the computed gamma ramp for this OS and
+ hardware. Returns 0 if gamma changes are not supported. */
+ protected int getGammaRampLength() {
+ return GAMMA_RAMP_LENGTH;
+ }
+
+ protected boolean setGammaRamp(float[] ramp) {
+ return CGL.setGammaRamp(ramp.length,
+ ramp, 0,
+ ramp, 0,
+ ramp, 0);
+ }
+
+ protected Buffer getGammaRamp() {
+ return null;
+ }
+
+ protected void resetGammaRamp(Buffer originalGammaRamp) {
+ CGL.resetGammaRamp();
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLGraphicsConfiguration.java b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLGraphicsConfiguration.java
new file mode 100644
index 000000000..889d1c333
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLGraphicsConfiguration.java
@@ -0,0 +1,231 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.impl.macosx.cgl;
+
+import javax.media.nativewindow.*;
+import javax.media.opengl.*;
+
+public class MacOSXCGLGraphicsConfiguration extends DefaultGraphicsConfiguration implements Cloneable {
+ long pixelformat;
+
+ public MacOSXCGLGraphicsConfiguration(AbstractGraphicsScreen screen, GLCapabilities capsChosen, GLCapabilities capsRequested,
+ long pixelformat) {
+ super(screen, capsChosen, capsRequested);
+ this.pixelformat=pixelformat;
+ }
+
+ public Object clone() {
+ return super.clone();
+ }
+
+ protected void setChosenPixelFormat(long pixelformat) {
+ this.pixelformat=pixelformat;
+ }
+
+ protected void setChosenCapabilities(GLCapabilities caps) {
+ super.setChosenCapabilities(caps);
+ }
+
+ protected static final int[] cglInternalAttributeToken = new int[] {
+ CGL.kCGLPFAColorFloat,
+ CGL.NSOpenGLPFAPixelBuffer,
+ CGL.NSOpenGLPFADoubleBuffer,
+ CGL.NSOpenGLPFAStereo,
+ CGL.NSOpenGLPFAColorSize,
+ CGL.NSOpenGLPFAAlphaSize,
+ CGL.NSOpenGLPFADepthSize,
+ CGL.NSOpenGLPFAAccumSize,
+ CGL.NSOpenGLPFAStencilSize,
+ CGL.NSOpenGLPFASampleBuffers,
+ CGL.NSOpenGLPFASamples };
+
+ protected static int[] GLCapabilities2AttribList(GLCapabilities caps) {
+ int[] ivalues = new int[cglInternalAttributeToken.length];
+
+ for (int idx = 0; idx < cglInternalAttributeToken.length; idx++) {
+ int attr = cglInternalAttributeToken[idx];
+ switch (attr) {
+ case CGL.kCGLPFAColorFloat:
+ ivalues[idx] = caps.getPbufferFloatingPointBuffers() ? 1 : 0;
+ break;
+
+ case CGL.NSOpenGLPFAPixelBuffer:
+ ivalues[idx] = caps.isPBuffer() ? 1 : 0;
+ break;
+
+ case CGL.NSOpenGLPFADoubleBuffer:
+ ivalues[idx] = (caps.getDoubleBuffered() ? 1 : 0);
+ break;
+
+ case CGL.NSOpenGLPFAStereo:
+ ivalues[idx] = (caps.getStereo() ? 1 : 0);
+ break;
+
+ case CGL.NSOpenGLPFAColorSize:
+ ivalues[idx] = (caps.getRedBits() + caps.getGreenBits() + caps.getBlueBits());
+ break;
+
+ case CGL.NSOpenGLPFAAlphaSize:
+ ivalues[idx] = caps.getAlphaBits();
+ break;
+
+ case CGL.NSOpenGLPFADepthSize:
+ ivalues[idx] = caps.getDepthBits();
+ break;
+
+ case CGL.NSOpenGLPFAAccumSize:
+ ivalues[idx] = (caps.getAccumRedBits() + caps.getAccumGreenBits() + caps.getAccumBlueBits() + caps.getAccumAlphaBits());
+ break;
+
+ case CGL.NSOpenGLPFAStencilSize:
+ ivalues[idx] = caps.getStencilBits();
+ break;
+
+ case CGL.NSOpenGLPFASampleBuffers:
+ ivalues[idx] = caps.getSampleBuffers() ? 1 : 0;
+ break;
+
+ case CGL.NSOpenGLPFASamples:
+ ivalues[idx] = caps.getSampleBuffers() ? ivalues[idx] = caps.getNumSamples() : 0;
+ break;
+
+ default:
+ break;
+ }
+ }
+ return ivalues;
+ }
+
+ protected static long GLCapabilities2NSPixelFormat(GLCapabilities caps) {
+ int[] ivalues = GLCapabilities2AttribList(caps);
+ return CGL.createPixelFormat(cglInternalAttributeToken, 0, cglInternalAttributeToken.length, ivalues, 0);
+ }
+
+ protected static GLCapabilities NSPixelFormat2GLCapabilities(GLProfile glp, long pixelFormat) {
+ return PixelFormat2GLCapabilities(glp, pixelFormat, true);
+ }
+
+ protected static GLCapabilities CGLPixelFormat2GLCapabilities(GLProfile glp, long pixelFormat) {
+ return PixelFormat2GLCapabilities(glp, pixelFormat, false);
+ }
+
+ private static GLCapabilities PixelFormat2GLCapabilities(GLProfile glp, long pixelFormat, boolean nsUsage) {
+ int[] ivalues = new int[cglInternalAttributeToken.length];
+
+ // On this platform the pixel format is associated with the
+ // context and not the drawable. However it's a reasonable
+ // approximation to just store the chosen pixel format up in the
+ // NativeWindow's AbstractGraphicsConfiguration,
+ // since the public API doesn't provide for a different GLCapabilities per context.
+ // Note: These restrictions of the platform's API might be considered as a bug anyways.
+
+ // Figure out what attributes we really got
+ GLCapabilities caps = new GLCapabilities(glp);
+ if(nsUsage) {
+ CGL.queryPixelFormat(pixelFormat, cglInternalAttributeToken, 0, cglInternalAttributeToken.length, ivalues, 0);
+ } else {
+ CGL.CGLQueryPixelFormat(pixelFormat, cglInternalAttributeToken, 0, cglInternalAttributeToken.length, ivalues, 0);
+ }
+ for (int i = 0; i < cglInternalAttributeToken.length; i++) {
+ int attr = cglInternalAttributeToken[i];
+ switch (attr) {
+ case CGL.kCGLPFAColorFloat:
+ caps.setPbufferFloatingPointBuffers(ivalues[i] != 0);
+ break;
+
+ case CGL.NSOpenGLPFAPixelBuffer:
+ caps.setPBuffer(ivalues[i] != 0);
+ break;
+
+ case CGL.NSOpenGLPFADoubleBuffer:
+ caps.setDoubleBuffered(ivalues[i] != 0);
+ break;
+
+ case CGL.NSOpenGLPFAStereo:
+ caps.setStereo(ivalues[i] != 0);
+ break;
+
+ case CGL.NSOpenGLPFAColorSize:
+ {
+ int bitSize = ivalues[i];
+ if (bitSize == 32)
+ bitSize = 24;
+ bitSize /= 3;
+ caps.setRedBits(bitSize);
+ caps.setGreenBits(bitSize);
+ caps.setBlueBits(bitSize);
+ }
+ break;
+
+ case CGL.NSOpenGLPFAAlphaSize:
+ caps.setAlphaBits(ivalues[i]);
+ break;
+
+ case CGL.NSOpenGLPFADepthSize:
+ caps.setDepthBits(ivalues[i]);
+ break;
+
+ case CGL.NSOpenGLPFAAccumSize:
+ {
+ int bitSize = ivalues[i] / 4;
+ caps.setAccumRedBits(bitSize);
+ caps.setAccumGreenBits(bitSize);
+ caps.setAccumBlueBits(bitSize);
+ caps.setAccumAlphaBits(bitSize);
+ }
+ break;
+
+ case CGL.NSOpenGLPFAStencilSize:
+ caps.setStencilBits(ivalues[i]);
+ break;
+
+ case CGL.NSOpenGLPFASampleBuffers:
+ caps.setSampleBuffers(ivalues[i] != 0);
+ break;
+
+ case CGL.NSOpenGLPFASamples:
+ caps.setNumSamples(ivalues[i]);
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ return caps;
+ }
+}
+
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLGraphicsConfigurationFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLGraphicsConfigurationFactory.java
new file mode 100644
index 000000000..ab53e49e9
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLGraphicsConfigurationFactory.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ */
+
+package com.jogamp.opengl.impl.macosx.cgl;
+
+import javax.media.nativewindow.*;
+import javax.media.nativewindow.macosx.*;
+import com.sun.nativewindow.impl.*;
+
+import javax.media.opengl.*;
+import com.jogamp.opengl.impl.*;
+
+/** Subclass of GraphicsConfigurationFactory used when non-AWT tookits
+ are used on OSX platforms. Toolkits will likely need to delegate
+ to this one to change the accepted and returned types of the
+ GraphicsDevice and GraphicsConfiguration abstractions. */
+
+public class MacOSXCGLGraphicsConfigurationFactory extends GraphicsConfigurationFactory {
+ protected static final boolean DEBUG = com.jogamp.opengl.impl.Debug.debug("GraphicsConfiguration");
+
+ public MacOSXCGLGraphicsConfigurationFactory() {
+ GraphicsConfigurationFactory.registerFactory(javax.media.nativewindow.macosx.MacOSXGraphicsDevice.class, this);
+ }
+
+ public AbstractGraphicsConfiguration chooseGraphicsConfiguration(Capabilities capabilities,
+ CapabilitiesChooser chooser,
+ AbstractGraphicsScreen absScreen) {
+ return chooseGraphicsConfigurationStatic(capabilities, chooser, absScreen, false);
+ }
+
+ protected static MacOSXCGLGraphicsConfiguration chooseGraphicsConfigurationStatic(Capabilities capabilities,
+ CapabilitiesChooser chooser,
+ AbstractGraphicsScreen absScreen, boolean usePBuffer) {
+ if (absScreen == null) {
+ throw new IllegalArgumentException("AbstractGraphicsScreen is null");
+ }
+
+ if (capabilities != null &&
+ !(capabilities instanceof GLCapabilities)) {
+ throw new IllegalArgumentException("This NativeWindowFactory accepts only GLCapabilities objects");
+ }
+
+ if (chooser != null &&
+ !(chooser instanceof GLCapabilitiesChooser)) {
+ throw new IllegalArgumentException("This NativeWindowFactory accepts only GLCapabilitiesChooser objects");
+ }
+
+ if (capabilities == null) {
+ capabilities = new GLCapabilities(null);
+ }
+
+ return new MacOSXCGLGraphicsConfiguration(absScreen, (GLCapabilities)capabilities, (GLCapabilities)capabilities, 0);
+ }
+}
+
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXExternalCGLContext.java b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXExternalCGLContext.java
new file mode 100644
index 000000000..239eedd43
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXExternalCGLContext.java
@@ -0,0 +1,216 @@
+/*
+ * Copyright (c) 2005 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.impl.macosx.cgl;
+
+import javax.media.opengl.*;
+import com.jogamp.opengl.impl.*;
+
+import javax.media.nativewindow.*;
+import com.sun.nativewindow.impl.NullWindow;
+
+public class MacOSXExternalCGLContext extends MacOSXCGLContext {
+ private boolean firstMakeCurrent = true;
+ private boolean created = true;
+ private GLContext lastContext;
+
+ private MacOSXExternalCGLContext(Drawable drawable, long cglContext, long nsContext) {
+ super(drawable, null);
+ drawable.setExternalCGLContext(this);
+ this.cglContext = cglContext;
+ this.nsContext = nsContext;
+ GLContextShareSet.contextCreated(this);
+ setGLFunctionAvailability(false);
+ getGLStateTracker().setEnabled(false); // external context usage can't track state in Java
+ }
+
+ protected static MacOSXExternalCGLContext create(GLDrawableFactory factory, GLProfile glp) {
+ ((GLDrawableFactoryImpl)factory).lockToolkit();
+ try {
+ long pixelFormat = 0;
+ long currentDrawable = 0;
+ long cglContext = 0;
+ long nsContext = CGL.getCurrentContext(); // Check: MacOSX 10.3 ..
+ if( 0 != nsContext ) {
+ currentDrawable = CGL.getNSView(nsContext);
+ long ctx = CGL.getCGLContext(nsContext);
+ if (ctx == 0) {
+ throw new GLException("Error: NULL cglContext of nsContext 0x" +Long.toHexString(nsContext));
+ }
+ pixelFormat = CGL.CGLGetPixelFormat(ctx);
+ if(DEBUG) {
+ System.err.println("MacOSXExternalCGLContext Create nsContext 0x"+Long.toHexString(nsContext)+
+ ", cglContext 0x"+Long.toHexString(ctx)+
+ ", pixelFormat 0x"+Long.toHexString(pixelFormat));
+ }
+ } else {
+ cglContext = CGL.CGLGetCurrentContext();
+ if (cglContext == 0) {
+ throw new GLException("Error: current cglContext null, no nsContext");
+ }
+ pixelFormat = CGL.CGLGetPixelFormat(cglContext);
+ if(DEBUG) {
+ System.err.println("MacOSXExternalCGLContext Create cglContext 0x"+Long.toHexString(cglContext)+
+ ", pixelFormat 0x"+Long.toHexString(pixelFormat));
+ }
+ }
+
+ if (0 == pixelFormat) {
+ throw new GLException("Error: current pixelformat of current cglContext 0x"+Long.toHexString(cglContext)+" is null");
+ }
+ GLCapabilities caps = MacOSXCGLGraphicsConfiguration.CGLPixelFormat2GLCapabilities(glp, pixelFormat);
+ if(DEBUG) {
+ System.err.println("MacOSXExternalCGLContext Create "+caps);
+ }
+
+ AbstractGraphicsScreen aScreen = DefaultGraphicsScreen.createDefault();
+ MacOSXCGLGraphicsConfiguration cfg = new MacOSXCGLGraphicsConfiguration(aScreen, caps, caps, pixelFormat);
+
+ NullWindow nw = new NullWindow(cfg);
+ nw.setSurfaceHandle(currentDrawable);
+ return new MacOSXExternalCGLContext(new Drawable(factory, nw), cglContext, nsContext);
+ } finally {
+ ((GLDrawableFactoryImpl)factory).unlockToolkit();
+ }
+ }
+
+ protected boolean create() {
+ return true;
+ }
+
+ public int makeCurrent() throws GLException {
+ // Save last context if necessary to allow external GLContexts to
+ // talk to other GLContexts created by this library
+ GLContext cur = getCurrent();
+ if (cur != null && cur != this) {
+ lastContext = cur;
+ setCurrent(null);
+ }
+ return super.makeCurrent();
+ }
+
+ protected void swapBuffers() {
+ DefaultGraphicsConfiguration config = (DefaultGraphicsConfiguration) drawable.getNativeWindow().getGraphicsConfiguration().getNativeGraphicsConfiguration();
+ GLCapabilities caps = (GLCapabilities)config.getChosenCapabilities();
+ if(caps.isOnscreen()) {
+ if (CGL.kCGLNoError != CGL.CGLFlushDrawable(cglContext)) {
+ throw new GLException("Error swapping buffers");
+ }
+ }
+ }
+
+ public void release() throws GLException {
+ super.release();
+ setCurrent(lastContext);
+ lastContext = null;
+ }
+
+ protected int makeCurrentImpl() throws GLException {
+ if (firstMakeCurrent) {
+ firstMakeCurrent = false;
+ return CONTEXT_CURRENT_NEW;
+ }
+ return CONTEXT_CURRENT;
+ }
+
+ protected void releaseImpl() throws GLException {
+ }
+
+ protected void destroyImpl() throws GLException {
+ created = false;
+ GLContextShareSet.contextDestroyed(this);
+ }
+
+ public boolean isCreated() {
+ return created;
+ }
+
+ public void setOpenGLMode(int mode) {
+ if (mode != MacOSXCGLDrawable.CGL_MODE)
+ throw new GLException("OpenGL mode switching not supported for external GLContexts");
+ }
+
+ public int getOpenGLMode() {
+ return MacOSXCGLDrawable.CGL_MODE;
+ }
+
+ // Need to provide the display connection to extension querying APIs
+ static class Drawable extends MacOSXCGLDrawable {
+ MacOSXExternalCGLContext extCtx;
+
+ Drawable(GLDrawableFactory factory, NativeWindow comp) {
+ super(factory, comp, true);
+ }
+
+ void setExternalCGLContext(MacOSXExternalCGLContext externalContext) {
+ extCtx = externalContext;
+ }
+
+ public GLContext createContext(GLContext shareWith) {
+ throw new GLException("Should not call this");
+ }
+
+ public int getWidth() {
+ throw new GLException("Should not call this");
+ }
+
+ public int getHeight() {
+ throw new GLException("Should not call this");
+ }
+
+ public void setSize(int width, int height) {
+ throw new GLException("Should not call this");
+ }
+
+ protected void swapBuffersImpl() {
+ if (extCtx != null) {
+ extCtx.swapBuffers();
+ }
+ }
+
+ public void setOpenGLMode(int mode) {
+ if (mode != CGL_MODE)
+ throw new GLException("OpenGL mode switching not supported for external GLContext's drawables");
+ }
+
+ public int getOpenGLMode() {
+ return CGL_MODE;
+ }
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXOffscreenCGLContext.java b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXOffscreenCGLContext.java
new file mode 100644
index 000000000..8b8bb46fa
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXOffscreenCGLContext.java
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.impl.macosx.cgl;
+
+import javax.media.opengl.*;
+import com.jogamp.opengl.impl.*;
+
+public class MacOSXOffscreenCGLContext extends MacOSXPbufferCGLContext
+{
+ public MacOSXOffscreenCGLContext(MacOSXPbufferCGLDrawable drawable,
+ GLContext shareWith) {
+ super(drawable, shareWith);
+ }
+
+ public int getOffscreenContextPixelDataType() {
+ GL gl = getGL();
+ return gl.isGL2()?GL2.GL_UNSIGNED_INT_8_8_8_8_REV:GL.GL_UNSIGNED_SHORT_5_5_5_1;
+ }
+
+ public int getOffscreenContextReadBuffer() {
+ return GL.GL_FRONT;
+ }
+
+ public boolean offscreenImageNeedsVerticalFlip() {
+ return true;
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXOffscreenCGLDrawable.java b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXOffscreenCGLDrawable.java
new file mode 100644
index 000000000..adaa48f34
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXOffscreenCGLDrawable.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.impl.macosx.cgl;
+
+import javax.media.opengl.*;
+import javax.media.nativewindow.*;
+import com.jogamp.opengl.impl.*;
+
+public class MacOSXOffscreenCGLDrawable extends MacOSXPbufferCGLDrawable {
+
+ public MacOSXOffscreenCGLDrawable(GLDrawableFactory factory,
+ NativeWindow target) {
+ super(factory, target);
+ }
+
+ public GLContext createContext(GLContext shareWith) {
+ return new MacOSXOffscreenCGLContext(this, shareWith);
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXOnscreenCGLContext.java b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXOnscreenCGLContext.java
new file mode 100644
index 000000000..4c64864fa
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXOnscreenCGLContext.java
@@ -0,0 +1,130 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.impl.macosx.cgl;
+
+import java.util.*;
+
+import javax.media.nativewindow.*;
+import javax.media.opengl.*;
+import com.jogamp.opengl.impl.*;
+
+public class MacOSXOnscreenCGLContext extends MacOSXCGLContext {
+ protected MacOSXOnscreenCGLDrawable drawable;
+
+ public MacOSXOnscreenCGLContext(MacOSXOnscreenCGLDrawable drawable,
+ GLContext shareWith) {
+ super(drawable, shareWith);
+ this.drawable = drawable;
+ }
+
+ protected int makeCurrentImpl() throws GLException {
+ int lockRes = drawable.lockSurface();
+ boolean exceptionOccurred = false;
+ try {
+ if (lockRes == NativeWindow.LOCK_SURFACE_NOT_READY) {
+ return CONTEXT_NOT_CURRENT;
+ }
+ int ret = super.makeCurrentImpl();
+ if ((ret == CONTEXT_CURRENT) ||
+ (ret == CONTEXT_CURRENT_NEW)) {
+ // Assume the canvas might have been resized or moved and tell the OpenGL
+ // context to update itself. This used to be done only upon receiving a
+ // reshape event but that doesn't appear to be sufficient. An experiment
+ // was also done to add a HierarchyBoundsListener to the GLCanvas and
+ // do this updating only upon reshape of this component or reshape or movement
+ // of an ancestor, but this also wasn't sufficient and left garbage on the
+ // screen in some situations.
+ CGL.updateContext(nsContext);
+ } else {
+ if (!isOptimizable()) {
+ // This can happen if the window currently is zero-sized, for example.
+ // Make sure we don't leave the surface locked in this case.
+ drawable.unlockSurface();
+ lockRes = NativeWindow.LOCK_SURFACE_NOT_READY;
+ }
+ }
+ return ret;
+ } catch (RuntimeException e) {
+ exceptionOccurred = true;
+ throw e;
+ } finally {
+ if (exceptionOccurred ||
+ (isOptimizable() && lockRes != NativeWindow.LOCK_SURFACE_NOT_READY)) {
+ drawable.unlockSurface();
+ }
+ }
+ }
+
+ protected void releaseImpl() throws GLException {
+ try {
+ super.releaseImpl();
+ } finally {
+ if (!isOptimizable() && drawable.isSurfaceLocked()) {
+ drawable.unlockSurface();
+ }
+ }
+ }
+
+ protected void swapBuffers() {
+ if (!CGL.flushBuffer(nsContext)) {
+ throw new GLException("Error swapping buffers");
+ }
+ }
+
+ protected void update() throws GLException {
+ if (nsContext == 0) {
+ throw new GLException("Context not created");
+ }
+ CGL.updateContext(nsContext);
+ }
+
+ protected boolean create() {
+ return create(false, false);
+ }
+
+ public void setOpenGLMode(int mode) {
+ if (mode != MacOSXCGLDrawable.NSOPENGL_MODE)
+ throw new GLException("OpenGL mode switching not supported for on-screen GLContexts");
+ }
+
+ public int getOpenGLMode() {
+ return MacOSXCGLDrawable.NSOPENGL_MODE;
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXOnscreenCGLDrawable.java b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXOnscreenCGLDrawable.java
new file mode 100644
index 000000000..6ee023867
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXOnscreenCGLDrawable.java
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.impl.macosx.cgl;
+
+import java.lang.ref.WeakReference;
+import java.security.*;
+import java.util.*;
+
+import javax.media.nativewindow.*;
+import javax.media.opengl.*;
+import com.jogamp.opengl.impl.*;
+
+public class MacOSXOnscreenCGLDrawable extends MacOSXCGLDrawable {
+ private List/*
- *
- * There are at least two possible solutions. One would be to change
- * the JOGL implementation to call through function pointers uniformly
- * so that it does not need to link against libGL.so. This is
- * possible, but requires changes to GlueGen and also is not really
- * necessary in any other situation than with the DRI drivers. Another
- * solution is to force the first load of libGL.so.1.2 to be done
- * dynamically with RTLD_GLOBAL before libjogl.so is loaded and causes
- * libGL.so.1.2 to be loaded again. The NativeLibrary class in the
- * GlueGen runtime has this property, and we use it to implement this
- * workaround.
- */
-
-public class DRIHack {
- private static final boolean DEBUG = Debug.debug("DRIHack");
- private static boolean driHackNeeded;
- private static NativeLibrary oglLib;
-
- public static void begin() {
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- String os = Debug.getProperty("os.name", false).toLowerCase();
- // Do DRI hack on all Linux distributions for best robustness
- driHackNeeded =
- (os.startsWith("linux") ||
- new File("/usr/lib/dri").exists() ||
- new File("/usr/X11R6/lib/modules/dri").exists());
- // Allow manual overriding for now as a workaround for
- // problems seen in some situations -- needs more investigation
- if (Debug.getProperty("jogl.drihack.disable", true) != null) {
- driHackNeeded = false;
- }
- return null;
- }
- });
-
- if (driHackNeeded) {
- if (DEBUG) {
- System.err.println("Beginning DRI hack");
- }
-
- // Try a few different variants for best robustness
- // In theory probably only the first is necessary
- oglLib = NativeLibrary.open("libGL.so.1", null);
- if (DEBUG && oglLib != null) System.err.println(" Found libGL.so.1");
- if (oglLib == null) {
- oglLib = NativeLibrary.open("/usr/lib/libGL.so.1", null);
- if (DEBUG && oglLib != null) System.err.println(" Found /usr/lib/libGL.so.1");
- }
- }
- }
-
- public static void end() {
- if (oglLib != null) {
- if (DEBUG) {
- System.err.println("Ending DRI hack");
- }
-
- oglLib.close();
- oglLib = null;
- }
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/impl/Debug.java b/src/jogl/classes/com/sun/opengl/impl/Debug.java
deleted file mode 100644
index 7c5451706..000000000
--- a/src/jogl/classes/com/sun/opengl/impl/Debug.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright (c) 2003-2005 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.impl;
-
-import java.security.*;
-
-/** Helper routines for logging and debugging. */
-
-public class Debug {
- // Some common properties
- private static boolean verbose;
- private static boolean debugAll;
- private static AccessControlContext localACC;
-
- static {
- localACC=AccessController.getContext();
- verbose = isPropertyDefined("jogl.verbose", true);
- debugAll = isPropertyDefined("jogl.debug", true);
- if (verbose) {
- Package p = Package.getPackage("javax.media.opengl");
- System.err.println("JOGL specification version " + p.getSpecificationVersion());
- System.err.println("JOGL implementation version " + p.getImplementationVersion());
- System.err.println("JOGL implementation vendor " + p.getImplementationVendor());
- }
- }
-
- static int getIntProperty(final String property, final boolean jnlpAlias) {
- return getIntProperty(property, jnlpAlias, localACC);
- }
-
- public static int getIntProperty(final String property, final boolean jnlpAlias, final AccessControlContext acc) {
- int i=0;
- try {
- Integer iv = Integer.valueOf(Debug.getProperty(property, jnlpAlias, acc));
- i = iv.intValue();
- } catch (NumberFormatException nfe) {}
- return i;
- }
-
- static boolean getBooleanProperty(final String property, final boolean jnlpAlias) {
- return getBooleanProperty(property, jnlpAlias, localACC);
- }
-
- public static boolean getBooleanProperty(final String property, final boolean jnlpAlias, final AccessControlContext acc) {
- Boolean b = Boolean.valueOf(Debug.getProperty(property, jnlpAlias, acc));
- return b.booleanValue();
- }
-
- static boolean isPropertyDefined(final String property, final boolean jnlpAlias) {
- return isPropertyDefined(property, jnlpAlias, localACC);
- }
-
- public static boolean isPropertyDefined(final String property, final boolean jnlpAlias, final AccessControlContext acc) {
- return (Debug.getProperty(property, jnlpAlias, acc) != null) ? true : false;
- }
-
- static String getProperty(final String property, final boolean jnlpAlias) {
- return getProperty(property, jnlpAlias, localACC);
- }
-
- public static String getProperty(final String property, final boolean jnlpAlias, final AccessControlContext acc) {
- String s=null;
- if(null!=acc && acc.equals(localACC)) {
- s = (String) AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- String val=null;
- try {
- val = System.getProperty(property);
- } catch (Exception e) {}
- if(null==val && jnlpAlias && !property.startsWith(jnlp_prefix)) {
- try {
- val = System.getProperty(jnlp_prefix + property);
- } catch (Exception e) {}
- }
- return val;
- }
- });
- } else {
- try {
- s = System.getProperty(property);
- } catch (Exception e) {}
- if(null==s && jnlpAlias && !property.startsWith(jnlp_prefix)) {
- try {
- s = System.getProperty(jnlp_prefix + property);
- } catch (Exception e) {}
- }
- }
- return s;
- }
- public static final String jnlp_prefix = "jnlp." ;
-
- public static boolean verbose() {
- return verbose;
- }
-
- public static boolean debugAll() {
- return debugAll;
- }
-
- public static boolean debug(String subcomponent) {
- return debugAll() || isPropertyDefined("jogl.debug." + subcomponent, true);
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/impl/ExtensionAvailabilityCache.java b/src/jogl/classes/com/sun/opengl/impl/ExtensionAvailabilityCache.java
deleted file mode 100644
index 26072519e..000000000
--- a/src/jogl/classes/com/sun/opengl/impl/ExtensionAvailabilityCache.java
+++ /dev/null
@@ -1,390 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.impl;
-
-import javax.media.opengl.*;
-import java.util.*;
-// FIXME: refactor Java SE dependencies
-//import java.util.regex.*;
-import java.lang.reflect.*;
-
-/**
- * A utility object intended to be used by implementations to act as a cache
- * of which OpenGL extensions are currently available on both the host machine
- * and display.
- */
-public final class ExtensionAvailabilityCache {
- private static final boolean DEBUG = Debug.debug("ExtensionAvailabilityCache");
- private static final boolean DEBUG_AVAILABILITY = Debug.isPropertyDefined("ExtensionAvailabilityCache", true);
-
- ExtensionAvailabilityCache(GLContextImpl context)
- {
- this.context = context;
- }
-
- /**
- * Flush the cache. The cache will be rebuilt lazily as calls to {@link
- * #isExtensionAvailable(String)} are received.
- */
- public void flush()
- {
- if(DEBUG) {
- System.out.println("ExtensionAvailabilityCache: Flush availability OpenGL "+majorVersion+"."+minorVersion);
- }
- availableExtensionCache.clear();
- initialized = false;
- majorVersion = 1;
- minorVersion = 0;
- }
-
- /**
- * Flush the cache and rebuild the cache.
- */
- public void reset() {
- flush();
- initAvailableExtensions();
- }
-
- public boolean isInitialized() {
- return initialized && !availableExtensionCache.isEmpty() ;
- }
-
- public boolean isExtensionAvailable(String glExtensionName) {
- initAvailableExtensions();
- return availableExtensionCache.contains(mapGLExtensionName(glExtensionName));
- }
-
- public String getPlatformExtensionsString() {
- initAvailableExtensions();
- return glXExtensions;
- }
-
- public String getGLExtensions() {
- initAvailableExtensions();
- if(DEBUG) {
- System.err.println("ExtensionAvailabilityCache: getGLExtensions() called");
- }
- return glExtensions;
- }
-
- public int getMajorVersion() {
- initAvailableExtensions();
- return majorVersion;
- }
-
- public int getMinorVersion() {
- initAvailableExtensions();
- return minorVersion;
- }
-
- private void initAvailableExtensions() {
- // if hash is empty (meaning it was flushed), pre-cache it with the list
- // of extensions that are in the GL_EXTENSIONS string
- if (availableExtensionCache.isEmpty() || !initialized) {
- GL gl = context.getGL();
-
- if (DEBUG) {
- System.err.println("ExtensionAvailabilityCache: Pre-caching init "+gl+", GL_VERSION "+gl.glGetString(GL.GL_VERSION));
- }
-
- // Set version
- Version version = new Version(gl.glGetString(GL.GL_VERSION));
- if (version.isValid()) {
- majorVersion = version.getMajor();
- minorVersion = version.getMinor();
-
- if( !gl.isGL3() &&
- ( majorVersion > 3 ||
- ( majorVersion == 3 && minorVersion >= 1 ) ) ) {
- // downsize version to 3.0 in case we are not using GL3 (3.1)
- majorVersion = 3;
- minorVersion = 0;
- }
- }
-
- boolean useGetStringi = false;
-
- if ( majorVersion > 3 ||
- ( majorVersion == 3 && minorVersion >= 0 ) ||
- gl.isGL3() ) {
- if ( ! gl.isGL2GL3() ) {
- if(DEBUG) {
- System.err.println("ExtensionAvailabilityCache: GL >= 3.1 usage, but no GL2GL3 interface: "+gl.getClass().getName());
- }
- } else if ( ! gl.isFunctionAvailable("glGetStringi") ) {
- if(DEBUG) {
- System.err.println("ExtensionAvailabilityCache: GL >= 3.1 usage, but no glGetStringi");
- }
- } else {
- useGetStringi = true;
- }
- }
-
- if (DEBUG) {
- System.err.println("ExtensionAvailabilityCache: Pre-caching extension availability OpenGL "+majorVersion+"."+minorVersion+
- ", use "+ ( useGetStringi ? "glGetStringi" : "glGetString" ) );
- }
-
- StringBuffer sb = new StringBuffer();
- if(useGetStringi) {
- GL2GL3 gl2gl3 = gl.getGL2GL3();
- int[] numExtensions = { 0 } ;
- gl2gl3.glGetIntegerv(gl2gl3.GL_NUM_EXTENSIONS, numExtensions, 0);
- for (int i = 0; i < numExtensions[0]; i++) {
- sb.append(gl2gl3.glGetStringi(gl2gl3.GL_EXTENSIONS, i));
- if(i < numExtensions[0]) {
- sb.append(" ");
- }
- }
- } else {
- sb.append(gl.glGetString(GL.GL_EXTENSIONS));
- }
- glExtensions = sb.toString();
- glXExtensions = context.getPlatformExtensionsString();
-
- sb.append(" ");
- sb.append(glXExtensions);
-
- String allAvailableExtensions = sb.toString();
- if (DEBUG_AVAILABILITY) {
- System.err.println("ExtensionAvailabilityCache: Available extensions: " + allAvailableExtensions);
- System.err.println("ExtensionAvailabilityCache: GL vendor: " + gl.glGetString(GL.GL_VENDOR));
- }
- StringTokenizer tok = new StringTokenizer(allAvailableExtensions);
- while (tok.hasMoreTokens()) {
- String availableExt = tok.nextToken().trim();
- availableExt = availableExt.intern();
- availableExtensionCache.add(availableExt);
- if (DEBUG_AVAILABILITY) {
- System.err.println("ExtensionAvailabilityCache: Available: " + availableExt);
- }
- }
-
- // Put GL version strings in the table as well
- // FIXME: this needs to be adjusted when the major rev changes
- // beyond the known ones
- int major = majorVersion;
- int minor = minorVersion;
- while (major > 0) {
- while (minor >= 0) {
- availableExtensionCache.add("GL_VERSION_" + major + "_" + minor);
- if (DEBUG) {
- System.err.println("ExtensionAvailabilityCache: Added GL_VERSION_" + major + "_" + minor + " to known extensions");
- }
- --minor;
- }
-
- switch (major) {
- case 3:
- if(gl.isGL3()) {
- // GL3 is a GL 3.1 forward compatible context,
- // hence no 2.0, 1.0 - 1.5 GL versions are supported.
- major=0;
- }
- // Restart loop at version 2.1
- minor = 1;
- break;
- case 2:
- // Restart loop at version 1.5
- minor = 5;
- break;
- case 1:
- break;
- }
-
- --major;
- }
-
- // put a dummy var in here so that the cache is no longer empty even if
- // no extensions are in the GL_EXTENSIONS string
- availableExtensionCache.add("
- *
- * Instead we now try to track the sizes of allocated buffer objects.
- * We watch calls to glBindBuffer to see which buffer is bound to
- * which target and to glBufferData to see how large the buffer's
- * allocated size is. When glMapBuffer is called, we consult our table
- * of buffer sizes to see if we can return an answer without a glGet
- * call.
- *
- * We share the GLBufferSizeTracker objects among all GLContexts for
- * which sharing is enabled, because the namespace for buffer objects
- * is the same for these contexts.
- *
- * Tracking the state of which buffer objects are bound is done in the
- * GLBufferStateTracker and is not completely trivial. In the face of
- * calls to glPushClientAttrib / glPopClientAttrib we currently punt
- * and re-fetch the bound buffer object for the state in question;
- * see, for example, glVertexPointer and the calls down to
- * GLBufferStateTracker.getBoundBufferObject(). Note that we currently
- * ignore new binding targets such as GL_TRANSFORM_FEEDBACK_BUFFER_NV;
- * the fact that new binding targets may be added in the future makes
- * it impossible to cache state for these new targets.
- *
- * Ignoring new binding targets, the primary situation in which we may
- * not be able to return a cached answer is in the case of an error,
- * where glBindBuffer may not have been called before trying to call
- * glBufferData. Also, if external native code modifies a buffer
- * object, we may return an incorrect answer. (FIXME: this case
- * requires more thought, and perhaps stochastic and
- * exponential-fallback checking. However, note that it can only occur
- * in the face of external native code which requires that the
- * application be signed anyway, so there is no security risk in this
- * area.)
- */
-
-public class GLBufferSizeTracker {
- // Map from buffer names to sizes.
- // Note: should probably have some way of shrinking this map, but
- // can't just make it a WeakHashMap because nobody holds on to the
- // keys; would have to always track creation and deletion of buffer
- // objects, which is probably sub-optimal. The expected usage
- // pattern of buffer objects indicates that the fact that this map
- // never shrinks is probably not that bad.
- private Map/*
- *
- * Note that because the enumerated value used for the binding of a
- * buffer object (e.g. GL_ARRAY_BUFFER) is different than that used to
- * query the binding using glGetIntegerv (e.g.
- * GL_ARRAY_BUFFER_BINDING), then in the face of new binding targets
- * being added to the GL (e.g. GL_TRANSFORM_FEEDBACK_BUFFER_NV) it is
- * impossible to set up a query of the buffer object currently bound
- * to a particular state. It turns out that for some uses, such as
- * finding the size of the currently bound buffer, this doesn't
- * matter, though of course without knowing the buffer object we can't
- * re-associate the queried size with the buffer object ID.
- *
- * Because the namespace of buffer objects is the unsigned integers
- * with 0 reserved by the GL, and because we have to be able to return
- * both 0 and other integers as valid answers from
- * getBoundBufferObject(), we need a second query, which is to ask
- * whether we know the state of the binding for a given target. For
- * "unknown" targets such as GL_TRANSFORM_FEEDBACK_BUFFER_NV we return
- * false from this, but we also clear the valid bit and later refresh
- * the binding state if glPushClientAttrib / glPopClientAttrib are
- * called, since we don't want the complexity of tracking stacks of
- * these attributes.
- *
- */
-
-public class GLBufferStateTracker {
- private static final boolean DEBUG = Debug.debug("GLBufferStateTracker");
-
- private static final Integer arrayBufferEnum = new Integer(GL.GL_ARRAY_BUFFER);
- private static final Integer elementArrayBufferEnum = new Integer(GL.GL_ELEMENT_ARRAY_BUFFER);
- private static final Integer pixelPackBufferEnum = new Integer(GL2.GL_PIXEL_PACK_BUFFER);
- private static final Integer pixelUnpackBufferEnum = new Integer(GL2.GL_PIXEL_UNPACK_BUFFER);
- private static final Integer zero = new Integer(0);
-
- // Maps binding targets to buffer objects. A null value indicates
- // that the binding is unknown. A zero value indicates that it is
- // known that no buffer is bound to the target.
- private Map/*
- * Currently supported states: PixelStorei
- */
-
-public class GLStateTracker {
- private static final boolean DEBUG = Debug.debug("GLStateTracker");
-
- private volatile boolean enabled = true;
-
- private Map/*
- *
- * The {@link #ref ref} and {@link #unref unref} methods should be
- * used during the creation and destruction of OpenGL contexts by JOGL
- * in order to update the liveness of the objects being tracked. The
- * various other methods should be called by the OpenGL binding in the
- * various named methods.
- */
-
-public class GLObjectTracker {
- private static final boolean DEBUG = Debug.debug("GLObjectTracker");
-
- //----------------------------------------------------------------------
- // Adders
- //
-
- // glGenBuffers
- public synchronized void addBuffers(int n, IntBuffer ids) {
- add(getList(BUFFERS), n, ids);
- }
-
- // glGenBuffers
- public synchronized void addBuffers(int n, int[] ids, int ids_offset) {
- add(getList(BUFFERS), n, ids, ids_offset);
- }
-
- // glGenBuffersARB
- public synchronized void addBuffersARB(int n, IntBuffer ids) {
- add(getList(BUFFERS_ARB), n, ids);
- }
-
- // glGenBuffersARB
- public synchronized void addBuffersARB(int n, int[] ids, int ids_offset) {
- add(getList(BUFFERS_ARB), n, ids, ids_offset);
- }
-
- // glGenFencesAPPLE
- public synchronized void addFencesAPPLE(int n, IntBuffer ids) {
- add(getList(FENCES_APPLE), n, ids);
- }
-
- // glGenFencesAPPLE
- public synchronized void addFencesAPPLE(int n, int[] ids, int ids_offset) {
- add(getList(FENCES_APPLE), n, ids, ids_offset);
- }
-
- // glGenFencesNV
- public synchronized void addFencesNV(int n, IntBuffer ids) {
- add(getList(FENCES_NV), n, ids);
- }
-
- // glGenFencesNV
- public synchronized void addFencesNV(int n, int[] ids, int ids_offset) {
- add(getList(FENCES_NV), n, ids, ids_offset);
- }
-
- // glGenFragmentShadersATI
- public synchronized void addFragmentShadersATI(int start, int n) {
- add(getList(FRAGMENT_SHADERS_ATI), start, n);
- }
-
- // glGenFramebuffersEXT
- public synchronized void addFramebuffersEXT(int n, IntBuffer ids) {
- add(getList(FRAMEBUFFERS_EXT), n, ids);
- }
-
- // glGenFramebuffersEXT
- public synchronized void addFramebuffersEXT(int n, int[] ids, int ids_offset) {
- add(getList(FRAMEBUFFERS_EXT), n, ids, ids_offset);
- }
-
- // glGenLists
- public synchronized void addLists(int start, int n) {
- add(getList(LISTS), start, n);
- }
-
- // glGenOcclusionQueriesNV
- public synchronized void addOcclusionQueriesNV(int n, IntBuffer ids) {
- add(getList(OCCLUSION_QUERIES_NV), n, ids);
- }
-
- // glGenOcclusionQueriesNV
- public synchronized void addOcclusionQueriesNV(int n, int[] ids, int ids_offset) {
- add(getList(OCCLUSION_QUERIES_NV), n, ids, ids_offset);
- }
-
- // glCreateProgram
- public synchronized void addProgramObject(int obj) {
- add(getList(PROGRAM_OBJECTS), obj, 1);
- }
-
- // glCreateProgramObjectARB
- public synchronized void addProgramObjectARB(int obj) {
- add(getList(PROGRAM_AND_SHADER_OBJECTS_ARB), obj, 1);
- }
-
- // glGenProgramsARB
- public synchronized void addProgramsARB(int n, IntBuffer ids) {
- add(getList(PROGRAMS_ARB), n, ids);
- }
-
- // glGenProgramsARB
- public synchronized void addProgramsARB(int n, int[] ids, int ids_offset) {
- add(getList(PROGRAMS_ARB), n, ids, ids_offset);
- }
-
- // glGenProgramsNV
- public synchronized void addProgramsNV(int n, IntBuffer ids) {
- add(getList(PROGRAMS_NV), n, ids);
- }
-
- // glGenProgramsNV
- public synchronized void addProgramsNV(int n, int[] ids, int ids_offset) {
- add(getList(PROGRAMS_NV), n, ids, ids_offset);
- }
-
- // glGenQueries
- public synchronized void addQueries(int n, IntBuffer ids) {
- add(getList(QUERIES), n, ids);
- }
-
- // glGenQueries
- public synchronized void addQueries(int n, int[] ids, int ids_offset) {
- add(getList(QUERIES), n, ids, ids_offset);
- }
-
- // glGenQueriesARB
- public synchronized void addQueriesARB(int n, IntBuffer ids) {
- add(getList(QUERIES_ARB), n, ids);
- }
-
- // glGenQueriesARB
- public synchronized void addQueriesARB(int n, int[] ids, int ids_offset) {
- add(getList(QUERIES_ARB), n, ids, ids_offset);
- }
-
- // glGenRenderbuffersEXT
- public synchronized void addRenderbuffersEXT(int n, IntBuffer ids) {
- add(getList(RENDERBUFFERS_EXT), n, ids);
- }
-
- // glGenRenderbuffersEXT
- public synchronized void addRenderbuffersEXT(int n, int[] ids, int ids_offset) {
- add(getList(RENDERBUFFERS_EXT), n, ids, ids_offset);
- }
-
- // glCreateShader
- public synchronized void addShaderObject(int obj) {
- add(getList(SHADER_OBJECTS), obj, 1);
- }
-
- // glCreateShaderObjectARB
- public synchronized void addShaderObjectARB(int obj) {
- add(getList(PROGRAM_AND_SHADER_OBJECTS_ARB), obj, 1);
- }
-
- // glGenTextures
- public synchronized void addTextures(int n, IntBuffer ids) {
- add(getList(TEXTURES), n, ids);
- }
-
- // glGenTextures
- public synchronized void addTextures(int n, int[] ids, int ids_offset) {
- add(getList(TEXTURES), n, ids, ids_offset);
- }
-
- // glGenVertexArraysAPPLE
- public synchronized void addVertexArraysAPPLE(int n, IntBuffer ids) {
- add(getList(VERTEX_ARRAYS_APPLE), n, ids);
- }
-
- // glGenVertexArraysAPPLE
- public synchronized void addVertexArraysAPPLE(int n, int[] ids, int ids_offset) {
- add(getList(VERTEX_ARRAYS_APPLE), n, ids, ids_offset);
- }
-
- // glGenVertexShadersEXT
- public synchronized void addVertexShadersEXT(int start, int n) {
- add(getList(VERTEX_SHADERS_EXT), start, n);
- }
-
- //----------------------------------------------------------------------
- // Removers
- //
-
- // glDeleteBuffers
- public synchronized void removeBuffers(int n, IntBuffer ids) {
- remove(getList(BUFFERS), n, ids);
- }
-
- // glDeleteBuffers
- public synchronized void removeBuffers(int n, int[] ids, int ids_offset) {
- remove(getList(BUFFERS), n, ids, ids_offset);
- }
-
- // glDeleteBuffersARB
- public synchronized void removeBuffersARB(int n, IntBuffer ids) {
- remove(getList(BUFFERS_ARB), n, ids);
- }
-
- // glDeleteBuffersARB
- public synchronized void removeBuffersARB(int n, int[] ids, int ids_offset) {
- remove(getList(BUFFERS_ARB), n, ids, ids_offset);
- }
-
- // glDeleteFencesAPPLE
- public synchronized void removeFencesAPPLE(int n, IntBuffer ids) {
- remove(getList(FENCES_APPLE), n, ids);
- }
-
- // glDeleteFencesAPPLE
- public synchronized void removeFencesAPPLE(int n, int[] ids, int ids_offset) {
- remove(getList(FENCES_APPLE), n, ids, ids_offset);
- }
-
- // glDeleteFencesNV
- public synchronized void removeFencesNV(int n, IntBuffer ids) {
- remove(getList(FENCES_NV), n, ids);
- }
-
- // glDeleteFencesNV
- public synchronized void removeFencesNV(int n, int[] ids, int ids_offset) {
- remove(getList(FENCES_NV), n, ids, ids_offset);
- }
-
- // glDeleteFragmentShaderATI
- public synchronized void removeFragmentShaderATI(int obj) {
- remove(getList(FRAGMENT_SHADERS_ATI), obj, 1);
- }
-
- // glDeleteFramebuffersEXT
- public synchronized void removeFramebuffersEXT(int n, IntBuffer ids) {
- remove(getList(FRAMEBUFFERS_EXT), n, ids);
- }
-
- // glDeleteFramebuffersEXT
- public synchronized void removeFramebuffersEXT(int n, int[] ids, int ids_offset) {
- remove(getList(FRAMEBUFFERS_EXT), n, ids, ids_offset);
- }
-
- // glDeleteLists
- public synchronized void removeLists(int start, int n) {
- remove(getList(LISTS), start, n);
- }
-
- // glDeleteOcclusionQueriesNV
- public synchronized void removeOcclusionQueriesNV(int n, IntBuffer ids) {
- remove(getList(OCCLUSION_QUERIES_NV), n, ids);
- }
-
- // glDeleteOcclusionQueriesNV
- public synchronized void removeOcclusionQueriesNV(int n, int[] ids, int ids_offset) {
- remove(getList(OCCLUSION_QUERIES_NV), n, ids, ids_offset);
- }
-
- // glDeleteProgram
- public synchronized void removeProgramObject(int obj) {
- remove(getList(PROGRAM_OBJECTS), obj, 1);
- }
-
- // glDeleteObjectARB
- public synchronized void removeProgramOrShaderObjectARB(int obj) {
- remove(getList(PROGRAM_AND_SHADER_OBJECTS_ARB), obj, 1);
- }
-
- // glDeleteProgramsARB
- public synchronized void removeProgramsARB(int n, IntBuffer ids) {
- remove(getList(PROGRAMS_ARB), n, ids);
- }
-
- // glDeleteProgramsARB
- public synchronized void removeProgramsARB(int n, int[] ids, int ids_offset) {
- remove(getList(PROGRAMS_ARB), n, ids, ids_offset);
- }
-
- // glDeleteProgramsNV
- public synchronized void removeProgramsNV(int n, IntBuffer ids) {
- remove(getList(PROGRAMS_NV), n, ids);
- }
-
- // glDeleteProgramsNV
- public synchronized void removeProgramsNV(int n, int[] ids, int ids_offset) {
- remove(getList(PROGRAMS_NV), n, ids, ids_offset);
- }
-
- // glDeleteQueries
- public synchronized void removeQueries(int n, IntBuffer ids) {
- remove(getList(QUERIES), n, ids);
- }
-
- // glDeleteQueries
- public synchronized void removeQueries(int n, int[] ids, int ids_offset) {
- remove(getList(QUERIES), n, ids, ids_offset);
- }
-
- // glDeleteQueriesARB
- public synchronized void removeQueriesARB(int n, IntBuffer ids) {
- remove(getList(QUERIES_ARB), n, ids);
- }
-
- // glDeleteQueriesARB
- public synchronized void removeQueriesARB(int n, int[] ids, int ids_offset) {
- remove(getList(QUERIES_ARB), n, ids, ids_offset);
- }
-
- // glDeleteRenderbuffersEXT
- public synchronized void removeRenderbuffersEXT(int n, IntBuffer ids) {
- remove(getList(RENDERBUFFERS_EXT), n, ids);
- }
-
- // glDeleteRenderbuffersEXT
- public synchronized void removeRenderbuffersEXT(int n, int[] ids, int ids_offset) {
- remove(getList(RENDERBUFFERS_EXT), n, ids, ids_offset);
- }
-
- // glDeleteShader
- public synchronized void removeShaderObject(int obj) {
- remove(getList(SHADER_OBJECTS), obj, 1);
- }
-
- // glDeleteTextures
- public synchronized void removeTextures(int n, IntBuffer ids) {
- remove(getList(TEXTURES), n, ids);
- }
-
- // glDeleteTextures
- public synchronized void removeTextures(int n, int[] ids, int ids_offset) {
- remove(getList(TEXTURES), n, ids, ids_offset);
- }
-
- // glDeleteVertexArraysAPPLE
- public synchronized void removeVertexArraysAPPLE(int n, IntBuffer ids) {
- remove(getList(VERTEX_ARRAYS_APPLE), n, ids);
- }
-
- // glDeleteVertexArraysAPPLE
- public synchronized void removeVertexArraysAPPLE(int n, int[] ids, int ids_offset) {
- remove(getList(VERTEX_ARRAYS_APPLE), n, ids, ids_offset);
- }
-
- // glDeleteVertexShaderEXT
- public synchronized void removeVertexShaderEXT(int obj) {
- remove(getList(VERTEX_SHADERS_EXT), obj, 1);
- }
-
- //----------------------------------------------------------------------
- // Reference count maintenance and manual deletion
- //
-
- public synchronized void transferAll(GLObjectTracker other) {
- for (int i = 0; i < lists.length; i++) {
- getList(i).addAll(other.lists[i]);
- if (other.lists[i] != null) {
- other.lists[i].clear();
- }
- }
- dirty = true;
- }
-
- public synchronized void ref() {
- ++refCount;
- }
-
- public void unref(GLObjectTracker deletedObjectPool) {
- boolean tryDelete = false;
- synchronized (this) {
- if (--refCount == 0) {
- tryDelete = true;
- }
- }
- if (tryDelete) {
- // See whether we should try to do the work now or whether we
- // have to postpone
- GLContext cur = GLContext.getCurrent();
- if ((cur != null) &&
- (cur instanceof GLContextImpl)) {
- GLContextImpl curImpl = (GLContextImpl) cur;
- if (deletedObjectPool != null &&
- deletedObjectPool == curImpl.getDeletedObjectTracker()) {
- // Should be safe to delete these objects now
- try {
- delete((GL2)curImpl.getGL());
- return;
- } catch (GLException e) {
- // Shouldn't happen, but if it does, transfer all objects
- // to the deleted object pool hoping we can later clean
- // them up
- deletedObjectPool.transferAll(this);
- throw(e);
- }
- }
- }
- // If we get here, we couldn't attempt to delete the objects
- // right now; instead try to transfer them to the
- // deletedObjectPool for later cleanup (FIXME: should consider
- // throwing an exception if deletedObjectPool is null, since
- // that shouldn't happen)
- if (DEBUG) {
- String s = null;
- if (cur == null) {
- s = "current context was null";
- } else if (!(cur instanceof GLContextImpl)) {
- s = "current context was not a GLContextImpl";
- } else if (deletedObjectPool == null) {
- s = "no current deletedObjectPool";
- } else if (deletedObjectPool != ((GLContextImpl) cur).getDeletedObjectTracker()) {
- s = "deletedObjectTracker didn't match";
- if (((GLContextImpl) cur).getDeletedObjectTracker() == null) {
- s += " (other was null)";
- }
- } else {
- s = "unknown reason";
- }
- System.err.println("Deferred destruction of server-side OpenGL objects into " + deletedObjectPool + ": " + s);
- }
-
- if (deletedObjectPool != null) {
- deletedObjectPool.transferAll(this);
- }
- }
- }
-
- public void clean(GL2 gl) {
- if (dirty) {
- try {
- delete(gl);
- dirty = false;
- } catch (GLException e) {
- // FIXME: not sure what to do here; probably a bad idea to be
- // throwing exceptions during an otherwise-successful makeCurrent
- }
- }
- }
-
-
- //----------------------------------------------------------------------
- // Internals only below this point
- //
-
- // Kinds of sharable server-side OpenGL objects this class tracks
- private static final int BUFFERS = 0;
- private static final int BUFFERS_ARB = 1;
- private static final int FENCES_APPLE = 2;
- private static final int FENCES_NV = 3;
- private static final int FRAGMENT_SHADERS_ATI = 4;
- private static final int FRAMEBUFFERS_EXT = 5;
- private static final int LISTS = 6;
- private static final int OCCLUSION_QUERIES_NV = 7;
- private static final int PROGRAM_AND_SHADER_OBJECTS_ARB = 8;
- private static final int PROGRAM_OBJECTS = 9;
- private static final int PROGRAMS_ARB = 10;
- private static final int PROGRAMS_NV = 11;
- private static final int QUERIES = 12;
- private static final int QUERIES_ARB = 13;
- private static final int RENDERBUFFERS_EXT = 14;
- private static final int SHADER_OBJECTS = 15;
- private static final int TEXTURES = 16;
- private static final int VERTEX_ARRAYS_APPLE = 17;
- private static final int VERTEX_SHADERS_EXT = 18;
- private static final int NUM_OBJECT_TYPES = 19;
-
- static abstract class Deleter {
- public abstract void delete(GL2 gl, int obj);
- }
-
- static class ObjectList {
- private static final int MIN_CAPACITY = 4;
-
- private int size;
- private int capacity;
- private int[] data;
- private Deleter deleter;
- private String name;
-
- public ObjectList(Deleter deleter) {
- this.deleter = deleter;
- clear();
- }
-
- public void add(int obj) {
- if (size == capacity) {
- int newCapacity = 2 * capacity;
- int[] newData = new int[newCapacity];
- System.arraycopy(data, 0, newData, 0, size);
- data = newData;
- capacity = newCapacity;
- }
-
- data[size++] = obj;
- }
-
- public void addAll(ObjectList other) {
- if (other == null) {
- return;
- }
- for (int i = 0; i < other.size; i++) {
- add(other.data[i]);
- }
- }
-
- public boolean remove(int value) {
- for (int i = 0; i < size; i++) {
- if (data[i] == value) {
- if (i < size - 1) {
- System.arraycopy(data, i+1, data, i, size - i - 1);
- }
- --size;
- if ((size < capacity / 4) &&
- (capacity > MIN_CAPACITY)) {
- int newCapacity = capacity / 4;
- if (newCapacity < MIN_CAPACITY) {
- newCapacity = MIN_CAPACITY;
- }
- int[] newData = new int[newCapacity];
- System.arraycopy(data, 0, newData, 0, size);
- data = newData;
- capacity = newCapacity;
- }
- return true;
- }
- }
- return false;
- }
-
- public void setName(String name) {
- if (DEBUG) {
- this.name = name;
- }
- }
-
- public void delete(GL2 gl) {
- // Just in case we start throwing exceptions during deletion,
- // make sure we make progress rather than going into an infinite
- // loop
- while (size > 0) {
- int obj = data[size - 1];
- --size;
- if (DEBUG) {
- System.err.println("Deleting server-side OpenGL object " + obj +
- ((name != null) ? (" (" + name + ")") : ""));
- }
- deleter.delete(gl, obj);
- }
- }
-
- public void clear() {
- size = 0;
- capacity = MIN_CAPACITY;
- data = new int[capacity];
- }
- }
-
- private ObjectList[] lists = new ObjectList[NUM_OBJECT_TYPES];
- private int refCount;
- private boolean dirty;
-
- private void add(ObjectList list, int n, IntBuffer ids) {
- int pos = ids.position();
- for (int i = 0; i < n; i++) {
- list.add(ids.get(pos + i));
- }
- }
-
- private void add(ObjectList list, int n, int[] ids, int ids_offset) {
- for (int i = 0; i < n; i++) {
- list.add(ids[i + ids_offset]);
- }
- }
-
- private void add(ObjectList list, int start, int n) {
- for (int i = 0; i < n; i++) {
- list.add(start + i);
- }
- }
-
- private void remove(ObjectList list, int n, IntBuffer ids) {
- int pos = ids.position();
- for (int i = 0; i < n; i++) {
- list.remove(ids.get(pos + i));
- }
- }
-
- private void remove(ObjectList list, int n, int[] ids, int ids_offset) {
- for (int i = 0; i < n; i++) {
- list.remove(ids[i + ids_offset]);
- }
- }
-
- private void remove(ObjectList list, int start, int n) {
- for (int i = 0; i < n; i++) {
- list.remove(start + i);
- }
- }
-
- private ObjectList getList(int which) {
- ObjectList list = lists[which];
- if (list == null) {
- Deleter deleter = null;
- String name = null;
- // Figure out which deleter we need
- switch (which) {
- case BUFFERS:
- deleter = new Deleter() {
- public void delete(GL2 gl, int obj) {
- gl.glDeleteBuffers(1, new int[] { obj }, 0);
- }
- };
- name = "buffer";
- break;
- case BUFFERS_ARB:
- deleter = new Deleter() {
- public void delete(GL2 gl, int obj) {
- gl.glDeleteBuffersARB(1, new int[] { obj }, 0);
- }
- };
- name = "ARB buffer";
- break;
- case FENCES_APPLE:
- deleter = new Deleter() {
- public void delete(GL2 gl, int obj) {
- gl.glDeleteFencesAPPLE(1, new int[] { obj }, 0);
- }
- };
- name = "APPLE fence";
- break;
- case FENCES_NV:
- deleter = new Deleter() {
- public void delete(GL2 gl, int obj) {
- gl.glDeleteFencesNV(1, new int[] { obj }, 0);
- }
- };
- name = "NV fence";
- break;
- case FRAGMENT_SHADERS_ATI:
- deleter = new Deleter() {
- public void delete(GL2 gl, int obj) {
- gl.glDeleteFragmentShaderATI(obj);
- }
- };
- name = "ATI fragment shader";
- break;
- case FRAMEBUFFERS_EXT:
- deleter = new Deleter() {
- public void delete(GL2 gl, int obj) {
- gl.glDeleteFramebuffersEXT(1, new int[] { obj }, 0);
- }
- };
- name = "EXT framebuffer";
- break;
- case LISTS:
- deleter = new Deleter() {
- public void delete(GL2 gl, int obj) {
- gl.glDeleteLists(obj, 1);
- }
- };
- name = "display list";
- break;
- case OCCLUSION_QUERIES_NV:
- deleter = new Deleter() {
- public void delete(GL2 gl, int obj) {
- gl.glDeleteOcclusionQueriesNV(1, new int[] { obj }, 0);
- }
- };
- name = "NV occlusion query";
- break;
- case PROGRAM_AND_SHADER_OBJECTS_ARB:
- deleter = new Deleter() {
- public void delete(GL2 gl, int obj) {
- gl.glDeleteObjectARB(obj);
- }
- };
- name = "ARB program or shader object";
- break;
- case PROGRAM_OBJECTS:
- deleter = new Deleter() {
- public void delete(GL2 gl, int obj) {
- gl.glDeleteProgram(obj);
- }
- };
- name = "program object";
- break;
- case PROGRAMS_ARB:
- deleter = new Deleter() {
- public void delete(GL2 gl, int obj) {
- gl.glDeleteProgramsARB(1, new int[] { obj }, 0);
- }
- };
- name = "ARB program object";
- break;
- case PROGRAMS_NV:
- deleter = new Deleter() {
- public void delete(GL2 gl, int obj) {
- gl.glDeleteProgramsNV(1, new int[] { obj }, 0);
- }
- };
- name = "NV program";
- break;
- case QUERIES:
- deleter = new Deleter() {
- public void delete(GL2 gl, int obj) {
- gl.glDeleteQueries(1, new int[] { obj }, 0);
- }
- };
- name = "query";
- break;
- case QUERIES_ARB:
- deleter = new Deleter() {
- public void delete(GL2 gl, int obj) {
- gl.glDeleteQueriesARB(1, new int[] { obj }, 0);
- }
- };
- name = "ARB query";
- break;
- case RENDERBUFFERS_EXT:
- deleter = new Deleter() {
- public void delete(GL2 gl, int obj) {
- gl.glDeleteRenderbuffersEXT(1, new int[] { obj }, 0);
- }
- };
- name = "EXT renderbuffer";
- break;
- case SHADER_OBJECTS:
- deleter = new Deleter() {
- public void delete(GL2 gl, int obj) {
- gl.glDeleteShader(obj);
- }
- };
- name = "shader object";
- break;
- case TEXTURES:
- deleter = new Deleter() {
- public void delete(GL2 gl, int obj) {
- gl.glDeleteTextures(1, new int[] { obj }, 0);
- }
- };
- name = "texture";
- break;
- case VERTEX_ARRAYS_APPLE:
- deleter = new Deleter() {
- public void delete(GL2 gl, int obj) {
- gl.glDeleteVertexArraysAPPLE(1, new int[] { obj }, 0);
- }
- };
- name = "APPLE vertex array";
- break;
- case VERTEX_SHADERS_EXT:
- deleter = new Deleter() {
- public void delete(GL2 gl, int obj) {
- gl.glDeleteVertexShaderEXT(obj);
- }
- };
- name = "EXT vertex shader";
- break;
- default:
- throw new InternalError("Unexpected OpenGL object type " + which);
- }
-
- list = new ObjectList(deleter);
- list.setName(name);
- lists[which] = list;
- }
- return list;
- }
-
- private void delete(GL2 gl) {
- for (int i = 0; i < lists.length; i++) {
- ObjectList list = lists[i];
- if (list != null) {
- list.delete(gl);
- lists[i] = null;
- }
- }
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLContext.java b/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLContext.java
deleted file mode 100644
index bd2162efc..000000000
--- a/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLContext.java
+++ /dev/null
@@ -1,342 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.impl.macosx.cgl;
-
-import java.nio.*;
-import java.util.*;
-import javax.media.opengl.*;
-import javax.media.nativewindow.*;
-import com.sun.opengl.impl.*;
-import com.jogamp.gluegen.runtime.ProcAddressTable;
-
-public abstract class MacOSXCGLContext extends GLContextImpl
-{
- protected long nsContext; // NSOpenGLContext
- protected long cglContext; // CGLContextObj
- private CGLExt cglExt;
- // Table that holds the addresses of the native C-language entry points for
- // CGL extension functions.
- private CGLExtProcAddressTable cglExtProcAddressTable;
-
- public MacOSXCGLContext(GLDrawableImpl drawable, GLDrawableImpl drawableRead,
- GLContext shareWith) {
- super(drawable, drawableRead, shareWith);
- }
-
- public MacOSXCGLContext(GLDrawableImpl drawable,
- GLContext shareWith) {
- this(drawable, null, shareWith);
- }
-
- public Object getPlatformGLExtensions() {
- return getCGLExt();
- }
-
- public CGLExt getCGLExt() {
- if (cglExt == null) {
- cglExt = new CGLExtImpl(this);
- }
- return cglExt;
- }
-
- public final ProcAddressTable getPlatformExtProcAddressTable() {
- return getCGLExtProcAddressTable();
- }
-
- public final CGLExtProcAddressTable getCGLExtProcAddressTable() {
- return cglExtProcAddressTable;
- }
-
- protected String mapToRealGLFunctionName(String glFunctionName)
- {
- return glFunctionName;
- }
-
- protected String mapToRealGLExtensionName(String glExtensionName)
- {
- return glExtensionName;
- }
-
- protected abstract boolean create();
-
- /**
- * Creates and initializes an appropriate OpenGl nsContext. Should only be
- * called by {@link makeCurrentImpl()}.
- */
- protected boolean create(boolean pbuffer, boolean floatingPoint) {
- MacOSXCGLContext other = (MacOSXCGLContext) GLContextShareSet.getShareContext(this);
- long share = 0;
- if (other != null) {
- share = other.getNSContext();
- if (share == 0) {
- throw new GLException("GLContextShareSet returned an invalid OpenGL context");
- }
- }
- MacOSXCGLGraphicsConfiguration config = (MacOSXCGLGraphicsConfiguration) drawable.getNativeWindow().getGraphicsConfiguration().getNativeGraphicsConfiguration();
- GLCapabilities capabilitiesRequested = (GLCapabilities)config.getRequestedCapabilities();
- GLProfile glProfile = capabilitiesRequested.getGLProfile();
- if(glProfile.isGL3()) {
- throw new GLException("GL3 profile currently not supported on MacOSX, due to the lack of a OpenGL 3.1 implementation");
- }
- // HACK .. bring in OnScreen/PBuffer selection to the DrawableFactory !!
- GLCapabilities capabilities = (GLCapabilities) capabilitiesRequested.clone();
- capabilities.setPBuffer(pbuffer);
- capabilities.setPbufferFloatingPointBuffers(floatingPoint);
-
- long pixelFormat = MacOSXCGLGraphicsConfiguration.GLCapabilities2NSPixelFormat(capabilities);
- if (pixelFormat == 0) {
- throw new GLException("Unable to allocate pixel format with requested GLCapabilities");
- }
- config.setChosenPixelFormat(pixelFormat);
- try {
- int[] viewNotReady = new int[1];
- // Try to allocate a context with this
- nsContext = CGL.createContext(share,
- drawable.getNativeWindow().getSurfaceHandle(),
- pixelFormat,
- viewNotReady, 0);
- if (nsContext == 0) {
- if (viewNotReady[0] == 1) {
- if (DEBUG) {
- System.err.println("!!! View not ready for " + getClass().getName());
- }
- // View not ready at the window system level -- this is OK
- return false;
- }
- throw new GLException("Error creating NSOpenGLContext with requested pixel format");
- }
-
- if (!pbuffer && !capabilities.isBackgroundOpaque()) {
- // Set the context opacity
- CGL.setContextOpacity(nsContext, 0);
- }
-
- GLCapabilities caps = MacOSXCGLGraphicsConfiguration.NSPixelFormat2GLCapabilities(glProfile, pixelFormat);
- config.setChosenCapabilities(caps);
- } finally {
- CGL.deletePixelFormat(pixelFormat);
- }
- if (!CGL.makeCurrentContext(nsContext)) {
- throw new GLException("Error making nsContext current");
- }
- setGLFunctionAvailability(true);
- GLContextShareSet.contextCreated(this);
- return true;
- }
-
- protected int makeCurrentImpl() throws GLException {
- if (0 == cglContext && drawable.getNativeWindow().getSurfaceHandle() == 0) {
- if (DEBUG) {
- System.err.println("drawable not properly initialized");
- }
- return CONTEXT_NOT_CURRENT;
- }
- boolean created = false;
- if ( 0 == cglContext && 0 == nsContext) {
- if (!create()) {
- return CONTEXT_NOT_CURRENT;
- }
- if (DEBUG) {
- System.err.println("!!! Created OpenGL context " + toHexString(nsContext) + " for " + getClass().getName());
- }
- created = true;
- }
-
- if ( 0 != cglContext ) {
- if (CGL.kCGLNoError != CGL.CGLSetCurrentContext(cglContext)) {
- throw new GLException("Error making cglContext current");
- }
- } else {
- if (!CGL.makeCurrentContext(nsContext)) {
- throw new GLException("Error making nsContext current");
- }
- }
-
- if (created) {
- setGLFunctionAvailability(false);
- return CONTEXT_CURRENT_NEW;
- }
- return CONTEXT_CURRENT;
- }
-
- protected void releaseImpl() throws GLException {
- if ( 0 != cglContext ) {
- CGL.CGLReleaseContext(cglContext);
- } else {
- if (!CGL.clearCurrentContext(nsContext)) {
- throw new GLException("Error freeing OpenGL nsContext");
- }
- }
- }
-
- protected void destroyImpl() throws GLException {
- boolean hadContext = isCreated();
- if ( 0 != cglContext ) {
- if (CGL.kCGLNoError != CGL.CGLDestroyContext(cglContext)) {
- throw new GLException("Unable to delete OpenGL cglContext");
- }
- if (DEBUG) {
- System.err.println("!!! Destroyed OpenGL cglContext " + cglContext);
- }
- cglContext = 0;
- GLContextShareSet.contextDestroyed(this);
- } else if ( 0 != nsContext ) {
- if (!CGL.deleteContext(nsContext)) {
- throw new GLException("Unable to delete OpenGL nsContext");
- }
- if (DEBUG) {
- System.err.println("!!! Destroyed OpenGL nsContext " + nsContext);
- }
- nsContext = 0;
- }
- if(hadContext) {
- GLContextShareSet.contextDestroyed(this);
- }
- }
-
- public boolean isCreated() {
- return 0 != cglContext || 0 != nsContext ;
- }
-
- public void copy(GLContext source, int mask) throws GLException {
- long dst = getCGLContext();
- long src = 0;
- if( 0 != dst ) {
- src = ((MacOSXCGLContext) source).getCGLContext();
- if (src == 0) {
- throw new GLException("Source OpenGL cglContext has not been created ; Destination has a cglContext.");
- }
- CGL.CGLCopyContext(src, dst, mask);
- } else {
- dst = getNSContext();
- src = ((MacOSXCGLContext) source).getNSContext();
- if (src == 0) {
- throw new GLException("Source OpenGL nsContext has not been created");
- }
- if (dst == 0) {
- throw new GLException("Destination OpenGL nsContext has not been created");
- }
- CGL.copyContext(dst, src, mask);
- }
- }
-
- protected void updateGLProcAddressTable() {
- if (DEBUG) {
- System.err.println("!!! Initializing CGL extension address table");
- }
- if (cglExtProcAddressTable == null) {
- // FIXME: cache ProcAddressTables by capability bits so we can
- // share them among contexts with the same capabilities
- cglExtProcAddressTable = new CGLExtProcAddressTable();
- }
- resetProcAddressTable(getCGLExtProcAddressTable());
- super.updateGLProcAddressTable();
- }
-
- public String getPlatformExtensionsString()
- {
- return "";
- }
-
- protected void setSwapIntervalImpl(int interval) {
- if ( 0 != cglContext ) {
- int[] lval = new int[] { (int) interval } ;
- CGL.CGLSetParameter(cglContext, CGL.kCGLCPSwapInterval, lval, 0);
- } else if ( 0 != nsContext ) {
- CGL.setSwapInterval(nsContext, interval);
- } else {
- throw new GLException("OpenGL context not current");
- }
- currentSwapInterval = interval ;
- }
-
- public ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3) {
- // FIXME: apparently the Apple extension doesn't require a custom memory allocator
- throw new GLException("Not yet implemented");
- }
-
- public boolean isFunctionAvailable(String glFunctionName)
- {
- return super.isFunctionAvailable(glFunctionName);
- }
-
- public boolean isExtensionAvailable(String glExtensionName) {
- if (glExtensionName.equals("GL_ARB_pbuffer") ||
- glExtensionName.equals("GL_ARB_pixel_format")) {
- return true;
- }
- return super.isExtensionAvailable(glExtensionName);
- }
-
- public int getOffscreenContextPixelDataType() {
- throw new GLException("Should not call this");
- }
-
- public int getOffscreenContextReadBuffer() {
- throw new GLException("Should not call this");
- }
-
- public boolean offscreenImageNeedsVerticalFlip() {
- throw new GLException("Should not call this");
- }
-
- public void bindPbufferToTexture() {
- throw new GLException("Should not call this");
- }
-
- public void releasePbufferFromTexture() {
- throw new GLException("Should not call this");
- }
-
- // Support for "mode switching" as described in MacOSXCGLDrawable
- public abstract void setOpenGLMode(int mode);
- public abstract int getOpenGLMode();
-
- //----------------------------------------------------------------------
- // Internals only below this point
- //
-
- public long getCGLContext() {
- return cglContext;
- }
- public long getNSContext() {
- return nsContext;
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawable.java b/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawable.java
deleted file mode 100644
index 14df40ef1..000000000
--- a/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawable.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.impl.macosx.cgl;
-
-import javax.media.nativewindow.*;
-import javax.media.opengl.*;
-import com.sun.opengl.impl.*;
-import com.jogamp.gluegen.runtime.DynamicLookupHelper;
-
-public abstract class MacOSXCGLDrawable extends GLDrawableImpl {
- // The Java2D/OpenGL pipeline on OS X uses low-level CGLContextObjs
- // to represent the contexts for e.g. the Java2D back buffer. When
- // the Java2D/JOGL bridge is active, this means that if we want to
- // be able to share textures and display lists with the Java2D
- // contexts, we need to use the CGL APIs rather than the NSOpenGL
- // APIs on the JOGL side. For example, if we create a pbuffer using
- // the NSOpenGL APIs and want to share textures and display lists
- // between it and the Java2D back buffer, there is no way to do so,
- // because the Java2D context is actually a CGLContextObj and the
- // NSOpenGLContext's initWithFormat:shareContext: only accepts an
- // NSOpenGLContext as its second argument. Of course there is no way
- // to wrap an NSOpenGLContext around an arbitrary CGLContextObj.
- //
- // The situation we care most about is allowing a GLPbuffer to share
- // textures, etc. with a GLJPanel when the Java2D/JOGL bridge is
- // active; several of the demos rely on this functionality. We aim
- // to get there by allowing a GLPBuffer to switch its implementation
- // between using an NSOpenGLPixelBuffer and a CGLPBufferObj. In
- // order to track whether this has been done we need to have the
- // notion of a "mode" of both the MacOSXCGLDrawable and the
- // MacOSXGLContext. Initially the mode is "unspecified", meaning it
- // leans toward the default (NSOpenGL). If sharing is requested
- // between either a GLJPanel and a GLPbuffer or a GLCanvas and a
- // GLPbuffer, the GLPbuffer will be switched into the appropriate
- // mode: CGL mode for a GLJPanel and NSOpenGL mode for a GLCanvas.
- // To avoid thrashing we support exactly one such switch during the
- // lifetime of a given GLPbuffer. This is not a fully general
- // solution (for example, you can't share textures among a
- // GLPbuffer, a GLJPanel and a GLCanvas simultaneously) but should
- // be enough to get things off the ground.
- public static final int NSOPENGL_MODE = 1;
- public static final int CGL_MODE = 2;
-
- public MacOSXCGLDrawable(GLDrawableFactory factory, NativeWindow comp, boolean realized) {
- super(factory, comp, realized);
- }
-
- protected void setRealizedImpl() {
- if(realized) {
- if( NativeWindow.LOCK_SURFACE_NOT_READY == lockSurface() ) {
- throw new GLException("Couldn't lock surface");
- }
- try {
- // don't remove this block .. locking the surface is essential to update surface data
- } finally {
- unlockSurface();
- }
- }
- }
-
- public DynamicLookupHelper getDynamicLookupHelper() {
- return (MacOSXCGLDrawableFactory) getFactoryImpl() ;
- }
-
- protected static String getThreadName() {
- return Thread.currentThread().getName();
- }
-
- // Support for "mode switching" as per above
- public abstract void setOpenGLMode(int mode);
- public abstract int getOpenGLMode();
-}
diff --git a/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java b/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java
deleted file mode 100644
index 928bc8151..000000000
--- a/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.impl.macosx.cgl;
-
-import java.lang.reflect.InvocationTargetException;
-import java.nio.*;
-import java.util.*;
-import javax.media.nativewindow.*;
-import javax.media.opengl.*;
-import com.sun.opengl.impl.*;
-import com.sun.nativewindow.impl.*;
-import com.jogamp.gluegen.runtime.DynamicLookupHelper;
-
-public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl implements DynamicLookupHelper {
- public MacOSXCGLDrawableFactory() {
- super();
-
- // Register our GraphicsConfigurationFactory implementations
- // The act of constructing them causes them to be registered
- new MacOSXCGLGraphicsConfigurationFactory();
-
- try {
- NWReflection.createInstance("com.sun.opengl.impl.macosx.cgl.awt.MacOSXAWTCGLGraphicsConfigurationFactory",
- new Object[] {});
- } catch (Throwable t) { }
- }
-
- public GLDrawableImpl createOnscreenDrawable(NativeWindow target) {
- if (target == null) {
- throw new IllegalArgumentException("Null target");
- }
- return new MacOSXOnscreenCGLDrawable(this, target);
- }
-
- protected GLDrawableImpl createOffscreenDrawable(NativeWindow target) {
- return new MacOSXOffscreenCGLDrawable(this, target);
- }
-
- public boolean canCreateGLPbuffer() {
- return true;
- }
-
- protected GLDrawableImpl createGLPbufferDrawableImpl(final NativeWindow target) {
- /**
- * FIXME: Think about this ..
- * should not be necessary ? ..
- final List returnList = new ArrayList();
- final GLDrawableFactory factory = this;
- Runnable r = new Runnable() {
- public void run() {
- returnList.add(new MacOSXPbufferCGLDrawable(factory, target));
- }
- };
- maybeDoSingleThreadedWorkaround(r);
- return (GLDrawableImpl) returnList.get(0);
- */
- return new MacOSXPbufferCGLDrawable(this, target);
- }
-
- protected NativeWindow createOffscreenWindow(GLCapabilities capabilities, GLCapabilitiesChooser chooser, int width, int height) {
- AbstractGraphicsScreen screen = DefaultGraphicsScreen.createDefault();
- NullWindow nw = new NullWindow(MacOSXCGLGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(capabilities, chooser, screen, true));
- nw.setSize(width, height);
- return nw;
- }
-
- public GLContext createExternalGLContext() {
- return MacOSXExternalCGLContext.create(this, null);
- }
-
- public boolean canCreateExternalGLDrawable() {
- return false;
- }
-
- public GLDrawable createExternalGLDrawable() {
- // FIXME
- throw new GLException("Not yet implemented");
- }
-
- public void loadGLULibrary() {
- // Nothing to do; already loaded by native code; not much point in
- // making it lazier on this platform
- }
-
- public long dynamicLookupFunction(String glFuncName) {
- return CGL.getProcAddress(glFuncName);
- }
-
- public boolean canCreateContextOnJava2DSurface() {
- return false;
- }
-
- public GLContext createContextOnJava2DSurface(Object graphics, GLContext shareWith)
- throws GLException {
- throw new GLException("not supported in non AWT enviroment");
- }
-
- //------------------------------------------------------
- // Gamma-related functionality
- //
-
- private static final int GAMMA_RAMP_LENGTH = 256;
-
- /** Returns the length of the computed gamma ramp for this OS and
- hardware. Returns 0 if gamma changes are not supported. */
- protected int getGammaRampLength() {
- return GAMMA_RAMP_LENGTH;
- }
-
- protected boolean setGammaRamp(float[] ramp) {
- return CGL.setGammaRamp(ramp.length,
- ramp, 0,
- ramp, 0,
- ramp, 0);
- }
-
- protected Buffer getGammaRamp() {
- return null;
- }
-
- protected void resetGammaRamp(Buffer originalGammaRamp) {
- CGL.resetGammaRamp();
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLGraphicsConfiguration.java b/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLGraphicsConfiguration.java
deleted file mode 100644
index 6bfa41167..000000000
--- a/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLGraphicsConfiguration.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.impl.macosx.cgl;
-
-import javax.media.nativewindow.*;
-import javax.media.opengl.*;
-
-public class MacOSXCGLGraphicsConfiguration extends DefaultGraphicsConfiguration implements Cloneable {
- long pixelformat;
-
- public MacOSXCGLGraphicsConfiguration(AbstractGraphicsScreen screen, GLCapabilities capsChosen, GLCapabilities capsRequested,
- long pixelformat) {
- super(screen, capsChosen, capsRequested);
- this.pixelformat=pixelformat;
- }
-
- public Object clone() {
- return super.clone();
- }
-
- protected void setChosenPixelFormat(long pixelformat) {
- this.pixelformat=pixelformat;
- }
-
- protected void setChosenCapabilities(GLCapabilities caps) {
- super.setChosenCapabilities(caps);
- }
-
- protected static final int[] cglInternalAttributeToken = new int[] {
- CGL.kCGLPFAColorFloat,
- CGL.NSOpenGLPFAPixelBuffer,
- CGL.NSOpenGLPFADoubleBuffer,
- CGL.NSOpenGLPFAStereo,
- CGL.NSOpenGLPFAColorSize,
- CGL.NSOpenGLPFAAlphaSize,
- CGL.NSOpenGLPFADepthSize,
- CGL.NSOpenGLPFAAccumSize,
- CGL.NSOpenGLPFAStencilSize,
- CGL.NSOpenGLPFASampleBuffers,
- CGL.NSOpenGLPFASamples };
-
- protected static int[] GLCapabilities2AttribList(GLCapabilities caps) {
- int[] ivalues = new int[cglInternalAttributeToken.length];
-
- for (int idx = 0; idx < cglInternalAttributeToken.length; idx++) {
- int attr = cglInternalAttributeToken[idx];
- switch (attr) {
- case CGL.kCGLPFAColorFloat:
- ivalues[idx] = caps.getPbufferFloatingPointBuffers() ? 1 : 0;
- break;
-
- case CGL.NSOpenGLPFAPixelBuffer:
- ivalues[idx] = caps.isPBuffer() ? 1 : 0;
- break;
-
- case CGL.NSOpenGLPFADoubleBuffer:
- ivalues[idx] = (caps.getDoubleBuffered() ? 1 : 0);
- break;
-
- case CGL.NSOpenGLPFAStereo:
- ivalues[idx] = (caps.getStereo() ? 1 : 0);
- break;
-
- case CGL.NSOpenGLPFAColorSize:
- ivalues[idx] = (caps.getRedBits() + caps.getGreenBits() + caps.getBlueBits());
- break;
-
- case CGL.NSOpenGLPFAAlphaSize:
- ivalues[idx] = caps.getAlphaBits();
- break;
-
- case CGL.NSOpenGLPFADepthSize:
- ivalues[idx] = caps.getDepthBits();
- break;
-
- case CGL.NSOpenGLPFAAccumSize:
- ivalues[idx] = (caps.getAccumRedBits() + caps.getAccumGreenBits() + caps.getAccumBlueBits() + caps.getAccumAlphaBits());
- break;
-
- case CGL.NSOpenGLPFAStencilSize:
- ivalues[idx] = caps.getStencilBits();
- break;
-
- case CGL.NSOpenGLPFASampleBuffers:
- ivalues[idx] = caps.getSampleBuffers() ? 1 : 0;
- break;
-
- case CGL.NSOpenGLPFASamples:
- ivalues[idx] = caps.getSampleBuffers() ? ivalues[idx] = caps.getNumSamples() : 0;
- break;
-
- default:
- break;
- }
- }
- return ivalues;
- }
-
- protected static long GLCapabilities2NSPixelFormat(GLCapabilities caps) {
- int[] ivalues = GLCapabilities2AttribList(caps);
- return CGL.createPixelFormat(cglInternalAttributeToken, 0, cglInternalAttributeToken.length, ivalues, 0);
- }
-
- protected static GLCapabilities NSPixelFormat2GLCapabilities(GLProfile glp, long pixelFormat) {
- return PixelFormat2GLCapabilities(glp, pixelFormat, true);
- }
-
- protected static GLCapabilities CGLPixelFormat2GLCapabilities(GLProfile glp, long pixelFormat) {
- return PixelFormat2GLCapabilities(glp, pixelFormat, false);
- }
-
- private static GLCapabilities PixelFormat2GLCapabilities(GLProfile glp, long pixelFormat, boolean nsUsage) {
- int[] ivalues = new int[cglInternalAttributeToken.length];
-
- // On this platform the pixel format is associated with the
- // context and not the drawable. However it's a reasonable
- // approximation to just store the chosen pixel format up in the
- // NativeWindow's AbstractGraphicsConfiguration,
- // since the public API doesn't provide for a different GLCapabilities per context.
- // Note: These restrictions of the platform's API might be considered as a bug anyways.
-
- // Figure out what attributes we really got
- GLCapabilities caps = new GLCapabilities(glp);
- if(nsUsage) {
- CGL.queryPixelFormat(pixelFormat, cglInternalAttributeToken, 0, cglInternalAttributeToken.length, ivalues, 0);
- } else {
- CGL.CGLQueryPixelFormat(pixelFormat, cglInternalAttributeToken, 0, cglInternalAttributeToken.length, ivalues, 0);
- }
- for (int i = 0; i < cglInternalAttributeToken.length; i++) {
- int attr = cglInternalAttributeToken[i];
- switch (attr) {
- case CGL.kCGLPFAColorFloat:
- caps.setPbufferFloatingPointBuffers(ivalues[i] != 0);
- break;
-
- case CGL.NSOpenGLPFAPixelBuffer:
- caps.setPBuffer(ivalues[i] != 0);
- break;
-
- case CGL.NSOpenGLPFADoubleBuffer:
- caps.setDoubleBuffered(ivalues[i] != 0);
- break;
-
- case CGL.NSOpenGLPFAStereo:
- caps.setStereo(ivalues[i] != 0);
- break;
-
- case CGL.NSOpenGLPFAColorSize:
- {
- int bitSize = ivalues[i];
- if (bitSize == 32)
- bitSize = 24;
- bitSize /= 3;
- caps.setRedBits(bitSize);
- caps.setGreenBits(bitSize);
- caps.setBlueBits(bitSize);
- }
- break;
-
- case CGL.NSOpenGLPFAAlphaSize:
- caps.setAlphaBits(ivalues[i]);
- break;
-
- case CGL.NSOpenGLPFADepthSize:
- caps.setDepthBits(ivalues[i]);
- break;
-
- case CGL.NSOpenGLPFAAccumSize:
- {
- int bitSize = ivalues[i] / 4;
- caps.setAccumRedBits(bitSize);
- caps.setAccumGreenBits(bitSize);
- caps.setAccumBlueBits(bitSize);
- caps.setAccumAlphaBits(bitSize);
- }
- break;
-
- case CGL.NSOpenGLPFAStencilSize:
- caps.setStencilBits(ivalues[i]);
- break;
-
- case CGL.NSOpenGLPFASampleBuffers:
- caps.setSampleBuffers(ivalues[i] != 0);
- break;
-
- case CGL.NSOpenGLPFASamples:
- caps.setNumSamples(ivalues[i]);
- break;
-
- default:
- break;
- }
- }
-
- return caps;
- }
-}
-
diff --git a/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLGraphicsConfigurationFactory.java b/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLGraphicsConfigurationFactory.java
deleted file mode 100644
index 7c2c7b751..000000000
--- a/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLGraphicsConfigurationFactory.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- */
-
-package com.sun.opengl.impl.macosx.cgl;
-
-import javax.media.nativewindow.*;
-import javax.media.nativewindow.macosx.*;
-import com.sun.nativewindow.impl.*;
-
-import javax.media.opengl.*;
-import com.sun.opengl.impl.*;
-
-/** Subclass of GraphicsConfigurationFactory used when non-AWT tookits
- are used on OSX platforms. Toolkits will likely need to delegate
- to this one to change the accepted and returned types of the
- GraphicsDevice and GraphicsConfiguration abstractions. */
-
-public class MacOSXCGLGraphicsConfigurationFactory extends GraphicsConfigurationFactory {
- protected static final boolean DEBUG = com.sun.opengl.impl.Debug.debug("GraphicsConfiguration");
-
- public MacOSXCGLGraphicsConfigurationFactory() {
- GraphicsConfigurationFactory.registerFactory(javax.media.nativewindow.macosx.MacOSXGraphicsDevice.class, this);
- }
-
- public AbstractGraphicsConfiguration chooseGraphicsConfiguration(Capabilities capabilities,
- CapabilitiesChooser chooser,
- AbstractGraphicsScreen absScreen) {
- return chooseGraphicsConfigurationStatic(capabilities, chooser, absScreen, false);
- }
-
- protected static MacOSXCGLGraphicsConfiguration chooseGraphicsConfigurationStatic(Capabilities capabilities,
- CapabilitiesChooser chooser,
- AbstractGraphicsScreen absScreen, boolean usePBuffer) {
- if (absScreen == null) {
- throw new IllegalArgumentException("AbstractGraphicsScreen is null");
- }
-
- if (capabilities != null &&
- !(capabilities instanceof GLCapabilities)) {
- throw new IllegalArgumentException("This NativeWindowFactory accepts only GLCapabilities objects");
- }
-
- if (chooser != null &&
- !(chooser instanceof GLCapabilitiesChooser)) {
- throw new IllegalArgumentException("This NativeWindowFactory accepts only GLCapabilitiesChooser objects");
- }
-
- if (capabilities == null) {
- capabilities = new GLCapabilities(null);
- }
-
- return new MacOSXCGLGraphicsConfiguration(absScreen, (GLCapabilities)capabilities, (GLCapabilities)capabilities, 0);
- }
-}
-
diff --git a/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXExternalCGLContext.java b/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXExternalCGLContext.java
deleted file mode 100644
index 0e468e5c5..000000000
--- a/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXExternalCGLContext.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- * Copyright (c) 2005 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.impl.macosx.cgl;
-
-import javax.media.opengl.*;
-import com.sun.opengl.impl.*;
-
-import javax.media.nativewindow.*;
-import com.sun.nativewindow.impl.NullWindow;
-
-public class MacOSXExternalCGLContext extends MacOSXCGLContext {
- private boolean firstMakeCurrent = true;
- private boolean created = true;
- private GLContext lastContext;
-
- private MacOSXExternalCGLContext(Drawable drawable, long cglContext, long nsContext) {
- super(drawable, null);
- drawable.setExternalCGLContext(this);
- this.cglContext = cglContext;
- this.nsContext = nsContext;
- GLContextShareSet.contextCreated(this);
- setGLFunctionAvailability(false);
- getGLStateTracker().setEnabled(false); // external context usage can't track state in Java
- }
-
- protected static MacOSXExternalCGLContext create(GLDrawableFactory factory, GLProfile glp) {
- ((GLDrawableFactoryImpl)factory).lockToolkit();
- try {
- long pixelFormat = 0;
- long currentDrawable = 0;
- long cglContext = 0;
- long nsContext = CGL.getCurrentContext(); // Check: MacOSX 10.3 ..
- if( 0 != nsContext ) {
- currentDrawable = CGL.getNSView(nsContext);
- long ctx = CGL.getCGLContext(nsContext);
- if (ctx == 0) {
- throw new GLException("Error: NULL cglContext of nsContext 0x" +Long.toHexString(nsContext));
- }
- pixelFormat = CGL.CGLGetPixelFormat(ctx);
- if(DEBUG) {
- System.err.println("MacOSXExternalCGLContext Create nsContext 0x"+Long.toHexString(nsContext)+
- ", cglContext 0x"+Long.toHexString(ctx)+
- ", pixelFormat 0x"+Long.toHexString(pixelFormat));
- }
- } else {
- cglContext = CGL.CGLGetCurrentContext();
- if (cglContext == 0) {
- throw new GLException("Error: current cglContext null, no nsContext");
- }
- pixelFormat = CGL.CGLGetPixelFormat(cglContext);
- if(DEBUG) {
- System.err.println("MacOSXExternalCGLContext Create cglContext 0x"+Long.toHexString(cglContext)+
- ", pixelFormat 0x"+Long.toHexString(pixelFormat));
- }
- }
-
- if (0 == pixelFormat) {
- throw new GLException("Error: current pixelformat of current cglContext 0x"+Long.toHexString(cglContext)+" is null");
- }
- GLCapabilities caps = MacOSXCGLGraphicsConfiguration.CGLPixelFormat2GLCapabilities(glp, pixelFormat);
- if(DEBUG) {
- System.err.println("MacOSXExternalCGLContext Create "+caps);
- }
-
- AbstractGraphicsScreen aScreen = DefaultGraphicsScreen.createDefault();
- MacOSXCGLGraphicsConfiguration cfg = new MacOSXCGLGraphicsConfiguration(aScreen, caps, caps, pixelFormat);
-
- NullWindow nw = new NullWindow(cfg);
- nw.setSurfaceHandle(currentDrawable);
- return new MacOSXExternalCGLContext(new Drawable(factory, nw), cglContext, nsContext);
- } finally {
- ((GLDrawableFactoryImpl)factory).unlockToolkit();
- }
- }
-
- protected boolean create() {
- return true;
- }
-
- public int makeCurrent() throws GLException {
- // Save last context if necessary to allow external GLContexts to
- // talk to other GLContexts created by this library
- GLContext cur = getCurrent();
- if (cur != null && cur != this) {
- lastContext = cur;
- setCurrent(null);
- }
- return super.makeCurrent();
- }
-
- protected void swapBuffers() {
- DefaultGraphicsConfiguration config = (DefaultGraphicsConfiguration) drawable.getNativeWindow().getGraphicsConfiguration().getNativeGraphicsConfiguration();
- GLCapabilities caps = (GLCapabilities)config.getChosenCapabilities();
- if(caps.isOnscreen()) {
- if (CGL.kCGLNoError != CGL.CGLFlushDrawable(cglContext)) {
- throw new GLException("Error swapping buffers");
- }
- }
- }
-
- public void release() throws GLException {
- super.release();
- setCurrent(lastContext);
- lastContext = null;
- }
-
- protected int makeCurrentImpl() throws GLException {
- if (firstMakeCurrent) {
- firstMakeCurrent = false;
- return CONTEXT_CURRENT_NEW;
- }
- return CONTEXT_CURRENT;
- }
-
- protected void releaseImpl() throws GLException {
- }
-
- protected void destroyImpl() throws GLException {
- created = false;
- GLContextShareSet.contextDestroyed(this);
- }
-
- public boolean isCreated() {
- return created;
- }
-
- public void setOpenGLMode(int mode) {
- if (mode != MacOSXCGLDrawable.CGL_MODE)
- throw new GLException("OpenGL mode switching not supported for external GLContexts");
- }
-
- public int getOpenGLMode() {
- return MacOSXCGLDrawable.CGL_MODE;
- }
-
- // Need to provide the display connection to extension querying APIs
- static class Drawable extends MacOSXCGLDrawable {
- MacOSXExternalCGLContext extCtx;
-
- Drawable(GLDrawableFactory factory, NativeWindow comp) {
- super(factory, comp, true);
- }
-
- void setExternalCGLContext(MacOSXExternalCGLContext externalContext) {
- extCtx = externalContext;
- }
-
- public GLContext createContext(GLContext shareWith) {
- throw new GLException("Should not call this");
- }
-
- public int getWidth() {
- throw new GLException("Should not call this");
- }
-
- public int getHeight() {
- throw new GLException("Should not call this");
- }
-
- public void setSize(int width, int height) {
- throw new GLException("Should not call this");
- }
-
- protected void swapBuffersImpl() {
- if (extCtx != null) {
- extCtx.swapBuffers();
- }
- }
-
- public void setOpenGLMode(int mode) {
- if (mode != CGL_MODE)
- throw new GLException("OpenGL mode switching not supported for external GLContext's drawables");
- }
-
- public int getOpenGLMode() {
- return CGL_MODE;
- }
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOffscreenCGLContext.java b/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOffscreenCGLContext.java
deleted file mode 100644
index b60c48237..000000000
--- a/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOffscreenCGLContext.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.impl.macosx.cgl;
-
-import javax.media.opengl.*;
-import com.sun.opengl.impl.*;
-
-public class MacOSXOffscreenCGLContext extends MacOSXPbufferCGLContext
-{
- public MacOSXOffscreenCGLContext(MacOSXPbufferCGLDrawable drawable,
- GLContext shareWith) {
- super(drawable, shareWith);
- }
-
- public int getOffscreenContextPixelDataType() {
- GL gl = getGL();
- return gl.isGL2()?GL2.GL_UNSIGNED_INT_8_8_8_8_REV:GL.GL_UNSIGNED_SHORT_5_5_5_1;
- }
-
- public int getOffscreenContextReadBuffer() {
- return GL.GL_FRONT;
- }
-
- public boolean offscreenImageNeedsVerticalFlip() {
- return true;
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOffscreenCGLDrawable.java b/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOffscreenCGLDrawable.java
deleted file mode 100644
index 3448b008a..000000000
--- a/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOffscreenCGLDrawable.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.impl.macosx.cgl;
-
-import javax.media.opengl.*;
-import javax.media.nativewindow.*;
-import com.sun.opengl.impl.*;
-
-public class MacOSXOffscreenCGLDrawable extends MacOSXPbufferCGLDrawable {
-
- public MacOSXOffscreenCGLDrawable(GLDrawableFactory factory,
- NativeWindow target) {
- super(factory, target);
- }
-
- public GLContext createContext(GLContext shareWith) {
- return new MacOSXOffscreenCGLContext(this, shareWith);
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOnscreenCGLContext.java b/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOnscreenCGLContext.java
deleted file mode 100644
index 4a3e0a8eb..000000000
--- a/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOnscreenCGLContext.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.impl.macosx.cgl;
-
-import java.util.*;
-
-import javax.media.nativewindow.*;
-import javax.media.opengl.*;
-import com.sun.opengl.impl.*;
-
-public class MacOSXOnscreenCGLContext extends MacOSXCGLContext {
- protected MacOSXOnscreenCGLDrawable drawable;
-
- public MacOSXOnscreenCGLContext(MacOSXOnscreenCGLDrawable drawable,
- GLContext shareWith) {
- super(drawable, shareWith);
- this.drawable = drawable;
- }
-
- protected int makeCurrentImpl() throws GLException {
- int lockRes = drawable.lockSurface();
- boolean exceptionOccurred = false;
- try {
- if (lockRes == NativeWindow.LOCK_SURFACE_NOT_READY) {
- return CONTEXT_NOT_CURRENT;
- }
- int ret = super.makeCurrentImpl();
- if ((ret == CONTEXT_CURRENT) ||
- (ret == CONTEXT_CURRENT_NEW)) {
- // Assume the canvas might have been resized or moved and tell the OpenGL
- // context to update itself. This used to be done only upon receiving a
- // reshape event but that doesn't appear to be sufficient. An experiment
- // was also done to add a HierarchyBoundsListener to the GLCanvas and
- // do this updating only upon reshape of this component or reshape or movement
- // of an ancestor, but this also wasn't sufficient and left garbage on the
- // screen in some situations.
- CGL.updateContext(nsContext);
- } else {
- if (!isOptimizable()) {
- // This can happen if the window currently is zero-sized, for example.
- // Make sure we don't leave the surface locked in this case.
- drawable.unlockSurface();
- lockRes = NativeWindow.LOCK_SURFACE_NOT_READY;
- }
- }
- return ret;
- } catch (RuntimeException e) {
- exceptionOccurred = true;
- throw e;
- } finally {
- if (exceptionOccurred ||
- (isOptimizable() && lockRes != NativeWindow.LOCK_SURFACE_NOT_READY)) {
- drawable.unlockSurface();
- }
- }
- }
-
- protected void releaseImpl() throws GLException {
- try {
- super.releaseImpl();
- } finally {
- if (!isOptimizable() && drawable.isSurfaceLocked()) {
- drawable.unlockSurface();
- }
- }
- }
-
- protected void swapBuffers() {
- if (!CGL.flushBuffer(nsContext)) {
- throw new GLException("Error swapping buffers");
- }
- }
-
- protected void update() throws GLException {
- if (nsContext == 0) {
- throw new GLException("Context not created");
- }
- CGL.updateContext(nsContext);
- }
-
- protected boolean create() {
- return create(false, false);
- }
-
- public void setOpenGLMode(int mode) {
- if (mode != MacOSXCGLDrawable.NSOPENGL_MODE)
- throw new GLException("OpenGL mode switching not supported for on-screen GLContexts");
- }
-
- public int getOpenGLMode() {
- return MacOSXCGLDrawable.NSOPENGL_MODE;
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOnscreenCGLDrawable.java b/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOnscreenCGLDrawable.java
deleted file mode 100644
index 56951ae10..000000000
--- a/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXOnscreenCGLDrawable.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.impl.macosx.cgl;
-
-import java.lang.ref.WeakReference;
-import java.security.*;
-import java.util.*;
-
-import javax.media.nativewindow.*;
-import javax.media.opengl.*;
-import com.sun.opengl.impl.*;
-
-public class MacOSXOnscreenCGLDrawable extends MacOSXCGLDrawable {
- private List/*
GLXFBConfig * glXChooseFBConfigSGIX, glXChooseFBConfig(Display * dpy, int screen, const int * attribList, int * nitems);
*/
--
cgit v1.2.3
From 7a087b9181b94c3d38f9480ba3ccd3b9e8062200 Mon Sep 17 00:00:00 2001
From: Sven Gothel GL_ARB_uniform_buffer_object
*/
public static final int GL_INVALID_INDEX = 0xFFFFFFFF ;
diff --git a/make/config/jogl/glu-gl2.cfg b/make/config/jogl/glu-gl2.cfg
index 712f9a305..8b77178f4 100755
--- a/make/config/jogl/glu-gl2.cfg
+++ b/make/config/jogl/glu-gl2.cfg
@@ -40,7 +40,7 @@ IncludeAs CustomJavaCode GLUgl2 glu-CustomJavaCode-gl2.java
# and to the nurbs.* package for the NURBS functionality
Import com.sun.opengl.impl.glu.nurbs.*
Import java.security.*
-Import com.sun.gluegen.runtime.opengl.GLProcAddressHelper
+Import com.jogamp.gluegen.runtime.opengl.GLProcAddressHelper
Import com.sun.opengl.impl.glu.gl2.nurbs.*
Import com.sun.opengl.impl.glu.mipmap.Mipmap
Import com.sun.opengl.impl.glu.gl2.*
diff --git a/make/config/jogl/glx-CustomJavaCode.java b/make/config/jogl/glx-CustomJavaCode.java
index 3cb1d3619..56057377a 100644
--- a/make/config/jogl/glx-CustomJavaCode.java
+++ b/make/config/jogl/glx-CustomJavaCode.java
@@ -13,7 +13,7 @@
/** Interface to C language function:
- Alias for:
GLXFBConfig * glXChooseFBConfigSGIX, glXChooseFBConfig(Display * dpy, int screen, const int * attribList, int * nitems);
*/
- public static com.sun.gluegen.runtime.PointerBuffer glXChooseFBConfigCopied(long dpy, int screen, int[] attribList, int attribList_offset, int[] nitems, int nitems_offset)
+ public static com.jogamp.gluegen.runtime.PointerBuffer glXChooseFBConfigCopied(long dpy, int screen, int[] attribList, int attribList_offset, int[] nitems, int nitems_offset)
{
if(attribList != null && attribList.length <= attribList_offset)
throw new GLException("array offset argument \"attribList_offset\" (" + attribList_offset + ") equals or exceeds array length (" + attribList.length + ")");
diff --git a/make/stub_includes/opengl/GL3/gl3.h.orig b/make/stub_includes/opengl/GL3/gl3.h.orig
new file mode 100755
index 000000000..1f4867169
--- /dev/null
+++ b/make/stub_includes/opengl/GL3/gl3.h.orig
@@ -0,0 +1,2742 @@
+#ifndef __gl3_h_
+#define __gl3_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** Copyright (c) 2007-2010 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+/* This is a draft release of gl3.h, a header for use with OpenGL 3.1, and
+ * OpenGL 3.2/3.3/4.0 core profile implementations. The current version is
+ * available at http://www.opengl.org/registry/ . Please don't package
+ * gl3.h for release with other software until it's out of draft status.
+ * The structure of the file may change significantly, and the details
+ * will probably change slightly as we make sure exactly the right set
+ * of interfaces is included.
+ *
+ * gl3.h last updated on $Date: 2010-03-11 11:19:31 -0800 (Thu, 11 Mar 2010) $
+ *
+ * RELEASE NOTES - 2010/03/11
+ *
+ * gl3.h should be placed under a directory 'GL3' and included as
+ * 'GL_ARB_uniform_buffer_object
*/
public static final int GL_INVALID_INDEX = 0xFFFFFFFF ;
diff --git a/make/config/jogl/gl-impl-CustomCCode-gl2.c b/make/config/jogl/gl-impl-CustomCCode-gl2.c
index f97b8eaff..35bc8be49 100644
--- a/make/config/jogl/gl-impl-CustomCCode-gl2.c
+++ b/make/config/jogl/gl-impl-CustomCCode-gl2.c
@@ -1,5 +1,5 @@
/* Java->C glue code:
- * Java package: com.sun.opengl.impl.gl2.GL2Impl
+ * Java package: com.jogamp.opengl.impl.gl2.GL2Impl
* Java method: long dispatch_glMapBuffer(int target, int access)
* C function: void * glMapBuffer(GLenum target, GLenum access);
*/
@@ -14,7 +14,7 @@ Java_com_sun_opengl_impl_gl2_GL2Impl_dispatch_1glMapBuffer(JNIEnv *env, jobject
}
/* Java->C glue code:
- * Java package: com.sun.opengl.impl.gl2.GL2Impl
+ * Java package: com.jogamp.opengl.impl.gl2.GL2Impl
* Java method: ByteBuffer newDirectByteBuffer(long addr, int capacity);
* C function: jobject newDirectByteBuffer(jlong addr, jint capacity);
*/
diff --git a/make/config/jogl/gl-impl-CustomCCode-gl2es12.c b/make/config/jogl/gl-impl-CustomCCode-gl2es12.c
index e2d5cb58d..a8aa57585 100644
--- a/make/config/jogl/gl-impl-CustomCCode-gl2es12.c
+++ b/make/config/jogl/gl-impl-CustomCCode-gl2es12.c
@@ -1,5 +1,5 @@
/* Java->C glue code:
- * Java package: com.sun.opengl.impl.gl2es12.GL2ES12Impl
+ * Java package: com.jogamp.opengl.impl.gl2es12.GL2ES12Impl
* Java method: long dispatch_glMapBuffer(int target, int access)
* C function: void * glMapBuffer(GLenum target, GLenum access);
*/
@@ -14,7 +14,7 @@ Java_com_sun_opengl_impl_gl2es12_GL2ES12Impl_dispatch_1glMapBuffer(JNIEnv *env,
}
/* Java->C glue code:
- * Java package: com.sun.opengl.impl.gl2es12.GL2ES12Impl
+ * Java package: com.jogamp.opengl.impl.gl2es12.GL2ES12Impl
* Java method: ByteBuffer newDirectByteBuffer(long addr, int capacity);
* C function: jobject newDirectByteBuffer(jlong addr, jint capacity);
*/
diff --git a/make/config/jogl/gl-impl-CustomCCode-gl3.c b/make/config/jogl/gl-impl-CustomCCode-gl3.c
index a5f78a460..adb2f8964 100644
--- a/make/config/jogl/gl-impl-CustomCCode-gl3.c
+++ b/make/config/jogl/gl-impl-CustomCCode-gl3.c
@@ -1,5 +1,5 @@
/* Java->C glue code:
- * Java package: com.sun.opengl.impl.gl3.GL3Impl
+ * Java package: com.jogamp.opengl.impl.gl3.GL3Impl
* Java method: long dispatch_glMapBuffer(int target, int access)
* C function: void * glMapBuffer(GLenum target, GLenum access);
*/
@@ -14,7 +14,7 @@ Java_com_sun_opengl_impl_gl3_GL3Impl_dispatch_1glMapBuffer(JNIEnv *env, jobject
}
/* Java->C glue code:
- * Java package: com.sun.opengl.impl.gl3.GL3Impl
+ * Java package: com.jogamp.opengl.impl.gl3.GL3Impl
* Java method: ByteBuffer newDirectByteBuffer(long addr, int capacity);
* C function: jobject newDirectByteBuffer(jlong addr, jint capacity);
*/
diff --git a/make/config/jogl/gl-impl-CustomCCode-gl3bc.c b/make/config/jogl/gl-impl-CustomCCode-gl3bc.c
index a69204198..701e3a942 100644
--- a/make/config/jogl/gl-impl-CustomCCode-gl3bc.c
+++ b/make/config/jogl/gl-impl-CustomCCode-gl3bc.c
@@ -1,5 +1,5 @@
/* Java->C glue code:
- * Java package: com.sun.opengl.impl.gl3.GL3bcImpl
+ * Java package: com.jogamp.opengl.impl.gl3.GL3bcImpl
* Java method: long dispatch_glMapBuffer(int target, int access)
* C function: void * glMapBuffer(GLenum target, GLenum access);
*/
@@ -14,7 +14,7 @@ Java_com_sun_opengl_impl_gl3_GL3bcImpl_dispatch_1glMapBuffer(JNIEnv *env, jobjec
}
/* Java->C glue code:
- * Java package: com.sun.opengl.impl.gl3.GL3bcImpl
+ * Java package: com.jogamp.opengl.impl.gl3.GL3bcImpl
* Java method: ByteBuffer newDirectByteBuffer(long addr, int capacity);
* C function: jobject newDirectByteBuffer(jlong addr, jint capacity);
*/
diff --git a/make/config/jogl/gl-impl-CustomCCode-gles1.c b/make/config/jogl/gl-impl-CustomCCode-gles1.c
index efc614e64..7e875c4d0 100644
--- a/make/config/jogl/gl-impl-CustomCCode-gles1.c
+++ b/make/config/jogl/gl-impl-CustomCCode-gles1.c
@@ -1,6 +1,6 @@
typedef GLvoid* (GL_APIENTRY* PFNGLMAPBUFFERPROC) (GLenum target, GLenum access);
/* Java->C glue code:
- * Java package: com.sun.opengl.impl.es1.GLES1Impl
+ * Java package: com.jogamp.opengl.impl.es1.GLES1Impl
* Java method: long dispatch_glMapBuffer(int target, int access)
* C function: void * glMapBuffer(GLenum target, GLenum access);
*/
@@ -15,7 +15,7 @@ Java_com_sun_opengl_impl_es1_GLES1Impl_dispatch_1glMapBuffer(JNIEnv *env, jobjec
}
/* Java->C glue code:
- * Java package: com.sun.opengl.impl.es1.GLES1Impl
+ * Java package: com.jogamp.opengl.impl.es1.GLES1Impl
* Java method: ByteBuffer newDirectByteBuffer(long addr, int capacity);
* C function: jobject newDirectByteBuffer(jlong addr, jint capacity);
*/
diff --git a/make/config/jogl/gl-impl-CustomCCode-gles2.c b/make/config/jogl/gl-impl-CustomCCode-gles2.c
index 27be04749..8dc92049e 100644
--- a/make/config/jogl/gl-impl-CustomCCode-gles2.c
+++ b/make/config/jogl/gl-impl-CustomCCode-gles2.c
@@ -1,6 +1,6 @@
typedef GLvoid* (GL_APIENTRY* PFNGLMAPBUFFERPROC) (GLenum target, GLenum access);
/* Java->C glue code:
- * Java package: com.sun.opengl.impl.es2.GLES2Impl
+ * Java package: com.jogamp.opengl.impl.es2.GLES2Impl
* Java method: long dispatch_glMapBuffer(int target, int access)
* C function: void * glMapBuffer(GLenum target, GLenum access);
*/
@@ -15,7 +15,7 @@ Java_com_sun_opengl_impl_es2_GLES2Impl_dispatch_1glMapBuffer(JNIEnv *env, jobjec
}
/* Java->C glue code:
- * Java package: com.sun.opengl.impl.es2.GLES2Impl
+ * Java package: com.jogamp.opengl.impl.es2.GLES2Impl
* Java method: ByteBuffer newDirectByteBuffer(long addr, int capacity);
* C function: jobject newDirectByteBuffer(jlong addr, jint capacity);
*/
diff --git a/make/config/jogl/glu-CustomJavaCode-base.java b/make/config/jogl/glu-CustomJavaCode-base.java
index 78c067606..aeb4f2ef9 100755
--- a/make/config/jogl/glu-CustomJavaCode-base.java
+++ b/make/config/jogl/glu-CustomJavaCode-base.java
@@ -169,7 +169,7 @@ protected static boolean checkedGLUtessellatorImpl = false;
protected static final void validateGLUtessellatorImpl() {
if(!checkedGLUtessellatorImpl) {
- availableGLUtessellatorImpl = NWReflection.isClassAvailable("com.sun.opengl.impl.glu.tessellator.GLUtessellatorImpl");
+ availableGLUtessellatorImpl = NWReflection.isClassAvailable("com.jogamp.opengl.impl.glu.tessellator.GLUtessellatorImpl");
checkedGLUtessellatorImpl = true;
}
if(!availableGLUtessellatorImpl) {
@@ -1220,7 +1220,7 @@ protected static final void validateGLUquadricImpl() {
if(!checkedGLUquadricImpl) {
synchronized (syncObject) {
if(!checkedGLUquadricImpl) {
- availableGLUquadricImpl = NWReflection.isClassAvailable("com.sun.opengl.impl.glu.GLUquadricImpl");
+ availableGLUquadricImpl = NWReflection.isClassAvailable("com.jogamp.opengl.impl.glu.GLUquadricImpl");
checkedGLUquadricImpl = true;
}
}
diff --git a/make/config/jogl/glu-CustomJavaCode-gl2es1.java b/make/config/jogl/glu-CustomJavaCode-gl2es1.java
index 8afc28c15..b5cb3b2f8 100755
--- a/make/config/jogl/glu-CustomJavaCode-gl2es1.java
+++ b/make/config/jogl/glu-CustomJavaCode-gl2es1.java
@@ -86,7 +86,7 @@ protected static boolean checkedMipmap = false;
protected static final void validateMipmap() {
if(!checkedMipmap) {
- availableMipmap = NWReflection.isClassAvailable("com.sun.opengl.impl.glu.mipmap.Mipmap");
+ availableMipmap = NWReflection.isClassAvailable("com.jogamp.opengl.impl.glu.mipmap.Mipmap");
checkedMipmap = true;
}
if(!availableMipmap) {
diff --git a/make/config/jogl/glu-base.cfg b/make/config/jogl/glu-base.cfg
index f67673a78..d859225ec 100755
--- a/make/config/jogl/glu-base.cfg
+++ b/make/config/jogl/glu-base.cfg
@@ -20,8 +20,8 @@ Ignore gluScaleImage
IncludeAs CustomJavaCode GLU glu-CustomJavaCode-base.java
# Imports for the Error and Registry classes
-Import com.sun.opengl.impl.glu.error.Error
-Import com.sun.opengl.impl.glu.registry.Registry
+Import com.jogamp.opengl.impl.glu.error.Error
+Import com.jogamp.opengl.impl.glu.registry.Registry
Include glu-common.cfg
diff --git a/make/config/jogl/glu-common.cfg b/make/config/jogl/glu-common.cfg
index df59175bb..28a075954 100644
--- a/make/config/jogl/glu-common.cfg
+++ b/make/config/jogl/glu-common.cfg
@@ -12,9 +12,9 @@ TagNativeBinding true
Import java.nio.*
Import javax.media.opengl.*
Import javax.media.opengl.glu.*
-Import com.sun.opengl.impl.*
-Import com.sun.opengl.impl.glu.*
-Import com.sun.opengl.impl.glu.tessellator.GLUtessellatorImpl
+Import com.jogamp.opengl.impl.*
+Import com.jogamp.opengl.impl.glu.*
+Import com.jogamp.opengl.impl.glu.tessellator.GLUtessellatorImpl
Import com.sun.nativewindow.impl.NWReflection
# Raise GLException instead of RuntimeException in glue code
diff --git a/make/config/jogl/glu-gl2.cfg b/make/config/jogl/glu-gl2.cfg
index 8b77178f4..cc5b16f0f 100755
--- a/make/config/jogl/glu-gl2.cfg
+++ b/make/config/jogl/glu-gl2.cfg
@@ -25,7 +25,7 @@ CustomCCode #endif
Include ../intptr.cfg
EmitProcAddressTable true
-ProcAddressTablePackage com.sun.opengl.impl.glu.gl2
+ProcAddressTablePackage com.jogamp.opengl.impl.glu.gl2
ProcAddressTableClassName GLUgl2ProcAddressTable
GetProcAddressTableExpr getGLUProcAddressTable()
@@ -38,14 +38,14 @@ IncludeAs CustomJavaCode GLUgl2 glu-CustomJavaCode-gl2.java
# GLU needs access to the GLUtesselatorImpl class for GLUtesselator,
# to the Mipmap class for scaling and mipmap generation,
# and to the nurbs.* package for the NURBS functionality
-Import com.sun.opengl.impl.glu.nurbs.*
+Import com.jogamp.opengl.impl.glu.nurbs.*
Import java.security.*
Import com.jogamp.gluegen.runtime.opengl.GLProcAddressHelper
-Import com.sun.opengl.impl.glu.gl2.nurbs.*
-Import com.sun.opengl.impl.glu.mipmap.Mipmap
-Import com.sun.opengl.impl.glu.gl2.*
+Import com.jogamp.opengl.impl.glu.gl2.nurbs.*
+Import com.jogamp.opengl.impl.glu.mipmap.Mipmap
+Import com.jogamp.opengl.impl.glu.gl2.*
Import javax.media.opengl.GL2
-Import com.sun.opengl.impl.gl2.ProjectDouble
+Import com.jogamp.opengl.impl.gl2.ProjectDouble
#
# ------------------------
diff --git a/make/config/jogl/glu-gl2es1.cfg b/make/config/jogl/glu-gl2es1.cfg
index 8927f96b9..af89014f4 100755
--- a/make/config/jogl/glu-gl2es1.cfg
+++ b/make/config/jogl/glu-gl2es1.cfg
@@ -20,7 +20,7 @@ Ignore gluScaleImage
IncludeAs CustomJavaCode GLUgl2es1 glu-CustomJavaCode-gl2es1.java
Import javax.media.opengl.GLES1
-Import com.sun.opengl.impl.glu.mipmap.Mipmap
+Import com.jogamp.opengl.impl.glu.mipmap.Mipmap
Include glu-common.cfg
diff --git a/make/config/jogl/glx-CustomCCode.c b/make/config/jogl/glx-CustomCCode.c
index a075c4852..efe4d5351 100755
--- a/make/config/jogl/glx-CustomCCode.c
+++ b/make/config/jogl/glx-CustomCCode.c
@@ -15,7 +15,7 @@
/* We expect glXGetProcAddressARB to be defined */
extern void (*glXGetProcAddressARB(const GLubyte *procname))();
-static const char * clazzNameInternalBufferUtil = "com/sun/opengl/impl/InternalBufferUtil";
+static const char * clazzNameInternalBufferUtil = "com/jogamp/opengl/impl/InternalBufferUtil";
static const char * clazzNameInternalBufferUtilStaticCstrName = "copyByteBuffer";
static const char * clazzNameInternalBufferUtilStaticCstrSignature = "(Ljava/nio/ByteBuffer;)Ljava/nio/ByteBuffer;";
static const char * clazzNameByteBuffer = "java/nio/ByteBuffer";
@@ -60,7 +60,7 @@ static void _initClazzAccess(JNIEnv *env) {
}
/* Java->C glue code:
- * Java package: com.sun.opengl.impl.x11.glx.GLX
+ * Java package: com.jogamp.opengl.impl.x11.glx.GLX
* Java method: XVisualInfo glXGetVisualFromFBConfig(long dpy, long config)
* C function: XVisualInfo * glXGetVisualFromFBConfig(Display * dpy, GLXFBConfig config);
*/
@@ -85,7 +85,7 @@ Java_com_sun_opengl_impl_x11_glx_GLX_glXGetVisualFromFBConfigCopied0__JJ(JNIEnv
}
/* Java->C glue code:
- * Java package: com.sun.opengl.impl.x11.glx.GLX
+ * Java package: com.jogamp.opengl.impl.x11.glx.GLX
* Java method: java.nio.LongBuffer glXChooseFBConfig(long dpy, int screen, java.nio.IntBuffer attribList, java.nio.IntBuffer nitems)
* C function: GLXFBConfig * glXChooseFBConfig(Display * dpy, int screen, const int * attribList, int * nitems);
*/
@@ -126,7 +126,7 @@ Java_com_sun_opengl_impl_x11_glx_GLX_glXChooseFBConfigCopied1__JILjava_lang_Obje
}
/* Java->C glue code:
- * Java package: com.sun.opengl.impl.x11.glx.GLX
+ * Java package: com.jogamp.opengl.impl.x11.glx.GLX
* Java method: XVisualInfo glXChooseVisual(long dpy, int screen, java.nio.IntBuffer attribList)
* C function: XVisualInfo * glXChooseVisual(Display * dpy, int screen, int * attribList);
*/
diff --git a/make/config/jogl/glx-x11.cfg b/make/config/jogl/glx-x11.cfg
index c9079b84f..8814f5e2f 100644
--- a/make/config/jogl/glx-x11.cfg
+++ b/make/config/jogl/glx-x11.cfg
@@ -3,7 +3,7 @@
JavaOutputDir gensrc/classes
NativeOutputDir gensrc/native/jogl/X11
-Package com.sun.opengl.impl.x11.glx
+Package com.jogamp.opengl.impl.x11.glx
JavaClass GLX
Style allstatic
Include gl-common.cfg
diff --git a/make/config/jogl/glxext.cfg b/make/config/jogl/glxext.cfg
index 39ba379c4..f07d5cc1b 100755
--- a/make/config/jogl/glxext.cfg
+++ b/make/config/jogl/glxext.cfg
@@ -3,13 +3,13 @@
JavaOutputDir gensrc/classes
NativeOutputDir gensrc/native/jogl/X11
-Package com.sun.opengl.impl.x11.glx
+Package com.jogamp.opengl.impl.x11.glx
Style InterfaceAndImpl
JavaClass GLXExt
-ImplPackage com.sun.opengl.impl.x11.glx
+ImplPackage com.jogamp.opengl.impl.x11.glx
ImplJavaClass GLXExtImpl
-ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/com/sun/opengl/impl/x11/glx/GLX.java
+ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/com/jogamp/opengl/impl/x11/glx/GLX.java
Include gl-common.cfg
Include gl-desktop.cfg
diff --git a/make/config/jogl/wgl-win32.cfg b/make/config/jogl/wgl-win32.cfg
index 6cd4fd412..2a69290a4 100644
--- a/make/config/jogl/wgl-win32.cfg
+++ b/make/config/jogl/wgl-win32.cfg
@@ -3,7 +3,7 @@
JavaOutputDir gensrc/classes
NativeOutputDir gensrc/native/jogl/Windows
-Package com.sun.opengl.impl.windows.wgl
+Package com.jogamp.opengl.impl.windows.wgl
JavaClass WGL
Style allstatic
Include gl-common.cfg
diff --git a/make/config/jogl/wglext.cfg b/make/config/jogl/wglext.cfg
index ea9a0257e..35c43cb86 100644
--- a/make/config/jogl/wglext.cfg
+++ b/make/config/jogl/wglext.cfg
@@ -3,10 +3,10 @@
JavaOutputDir gensrc/classes
NativeOutputDir gensrc/native/jogl/Windows
-Package com.sun.opengl.impl.windows.wgl
+Package com.jogamp.opengl.impl.windows.wgl
Style InterfaceAndImpl
JavaClass WGLExt
-ImplPackage com.sun.opengl.impl.windows.wgl
+ImplPackage com.jogamp.opengl.impl.windows.wgl
ImplJavaClass WGLExtImpl
Include gl-common.cfg
Include gl-desktop.cfg
diff --git a/make/stub_includes/opengl/GL3/gl3.h.orig b/make/stub_includes/opengl/GL3/gl3.h.orig
deleted file mode 100755
index 1f4867169..000000000
--- a/make/stub_includes/opengl/GL3/gl3.h.orig
+++ /dev/null
@@ -1,2742 +0,0 @@
-#ifndef __gl3_h_
-#define __gl3_h_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
-** Copyright (c) 2007-2010 The Khronos Group Inc.
-**
-** Permission is hereby granted, free of charge, to any person obtaining a
-** copy of this software and/or associated documentation files (the
-** "Materials"), to deal in the Materials without restriction, including
-** without limitation the rights to use, copy, modify, merge, publish,
-** distribute, sublicense, and/or sell copies of the Materials, and to
-** permit persons to whom the Materials are furnished to do so, subject to
-** the following conditions:
-**
-** The above copyright notice and this permission notice shall be included
-** in all copies or substantial portions of the Materials.
-**
-** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
-*/
-
-/* This is a draft release of gl3.h, a header for use with OpenGL 3.1, and
- * OpenGL 3.2/3.3/4.0 core profile implementations. The current version is
- * available at http://www.opengl.org/registry/ . Please don't package
- * gl3.h for release with other software until it's out of draft status.
- * The structure of the file may change significantly, and the details
- * will probably change slightly as we make sure exactly the right set
- * of interfaces is included.
- *
- * gl3.h last updated on $Date: 2010-03-11 11:19:31 -0800 (Thu, 11 Mar 2010) $
- *
- * RELEASE NOTES - 2010/03/11
- *
- * gl3.h should be placed under a directory 'GL3' and included as
- * 'display()
are performed. After each drawable
+ has been redrawn, a brief pause is performed to avoid swamping the
+ CPU, unless {@link #setRunAsFastAsPossible} has been called. limit() - position()
) in the passed ByteBuffer into
+ a newly-allocated direct ByteBuffer. The returned buffer will
+ have its byte order set to the host platform's native byte
+ order. The position of the newly-allocated buffer will be zero,
+ and the position of the passed buffer is unchanged (though its
+ mark is changed). */
+ public static ByteBuffer copyByteBuffer(ByteBuffer orig) {
+ ByteBuffer dest = newByteBuffer(orig.remaining());
+ dest.put(orig);
+ dest.rewind();
+ return dest;
+ }
+
+ /** Copies the remaining elements (as defined by
+ limit() - position()
) in the passed FloatBuffer
+ into a newly-allocated direct FloatBuffer. The returned buffer
+ will have its byte order set to the host platform's native byte
+ order. The position of the newly-allocated buffer will be zero,
+ and the position of the passed buffer is unchanged (though its
+ mark is changed). */
+ public static FloatBuffer copyFloatBuffer(FloatBuffer orig) {
+ return copyFloatBufferAsByteBuffer(orig).asFloatBuffer();
+ }
+
+ /** Copies the remaining elements (as defined by
+ limit() - position()
) in the passed IntBuffer
+ into a newly-allocated direct IntBuffer. The returned buffer
+ will have its byte order set to the host platform's native byte
+ order. The position of the newly-allocated buffer will be zero,
+ and the position of the passed buffer is unchanged (though its
+ mark is changed). */
+ public static IntBuffer copyIntBuffer(IntBuffer orig) {
+ return copyIntBufferAsByteBuffer(orig).asIntBuffer();
+ }
+
+ /** Copies the remaining elements (as defined by
+ limit() - position()
) in the passed ShortBuffer
+ into a newly-allocated direct ShortBuffer. The returned buffer
+ will have its byte order set to the host platform's native byte
+ order. The position of the newly-allocated buffer will be zero,
+ and the position of the passed buffer is unchanged (though its
+ mark is changed). */
+ public static ShortBuffer copyShortBuffer(ShortBuffer orig) {
+ return copyShortBufferAsByteBuffer(orig).asShortBuffer();
+ }
+
+ //----------------------------------------------------------------------
+ // Copy routines (type-to-ByteBuffer)
+ //
+
+ /** Copies the remaining elements (as defined by
+ limit() - position()
) in the passed FloatBuffer
+ into a newly-allocated direct ByteBuffer. The returned buffer
+ will have its byte order set to the host platform's native byte
+ order. The position of the newly-allocated buffer will be zero,
+ and the position of the passed buffer is unchanged (though its
+ mark is changed). */
+ public static ByteBuffer copyFloatBufferAsByteBuffer(FloatBuffer orig) {
+ ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_FLOAT);
+ dest.asFloatBuffer().put(orig);
+ dest.rewind();
+ return dest;
+ }
+
+ /** Copies the remaining elements (as defined by
+ limit() - position()
) in the passed IntBuffer into
+ a newly-allocated direct ByteBuffer. The returned buffer will
+ have its byte order set to the host platform's native byte
+ order. The position of the newly-allocated buffer will be zero,
+ and the position of the passed buffer is unchanged (though its
+ mark is changed). */
+ public static ByteBuffer copyIntBufferAsByteBuffer(IntBuffer orig) {
+ ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_INT);
+ dest.asIntBuffer().put(orig);
+ dest.rewind();
+ return dest;
+ }
+
+ /** Copies the remaining elements (as defined by
+ limit() - position()
) in the passed ShortBuffer
+ into a newly-allocated direct ByteBuffer. The returned buffer
+ will have its byte order set to the host platform's native byte
+ order. The position of the newly-allocated buffer will be zero,
+ and the position of the passed buffer is unchanged (though its
+ mark is changed). */
+ public static ByteBuffer copyShortBufferAsByteBuffer(ShortBuffer orig) {
+ ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_SHORT);
+ dest.asShortBuffer().put(orig);
+ dest.rewind();
+ return dest;
+ }
+
+ //----------------------------------------------------------------------
+ // Conversion routines
+ //
+
+ public final static float[] getFloatArray(double[] source) {
+ int i=source.length;
+ float[] dest = new float[i--];
+ while(i>=0) { dest[i]=(float)source[i]; i--; }
+ return dest;
+ }
+
+ public static ByteBuffer nativeOrder(ByteBuffer buf) {
+ if (!isCDCFP) {
+ try {
+ if (byteOrderClass == null) {
+ byteOrderClass = Class.forName("java.nio.ByteOrder");
+ orderMethod = ByteBuffer.class.getMethod("order", new Class[] { byteOrderClass });
+ Method nativeOrderMethod = byteOrderClass.getMethod("nativeOrder", null);
+ nativeOrderObject = nativeOrderMethod.invoke(null, null);
+ }
+ } catch (Throwable t) {
+ // Must be running on CDC / FP
+ isCDCFP = true;
+ }
+
+ if (!isCDCFP) {
+ try {
+ orderMethod.invoke(buf, new Object[] { nativeOrderObject });
+ } catch (Throwable t) {
+ }
+ }
+ }
+ return buf;
+ }
+
+ //----------------------------------------------------------------------
+ // Convenient GL put methods with generic target Buffer
+ //
+ public static void put(Buffer dest, Buffer v) {
+ if((dest instanceof ByteBuffer) && (v instanceof ByteBuffer)) {
+ ((ByteBuffer)dest).put((ByteBuffer)v);
+ } else if((dest instanceof ShortBuffer) && (v instanceof ShortBuffer)) {
+ ((ShortBuffer)dest).put((ShortBuffer)v);
+ } else if((dest instanceof IntBuffer) && (v instanceof IntBuffer)) {
+ ((IntBuffer)dest).put((IntBuffer)v);
+ } else if((dest instanceof FloatBuffer) && (v instanceof FloatBuffer)) {
+ ((FloatBuffer)dest).put((FloatBuffer)v);
+ } else {
+ throw new GLException("Incompatible Buffer classes: dest = "+dest.getClass().getName() + ", src = " + v.getClass().getName());
+ }
+ }
+
+ public static void putb(Buffer dest, byte v) {
+ if(dest instanceof ByteBuffer) {
+ ((ByteBuffer)dest).put(v);
+ } else if(dest instanceof ShortBuffer) {
+ ((ShortBuffer)dest).put((short)v);
+ } else if(dest instanceof IntBuffer) {
+ ((IntBuffer)dest).put((int)v);
+ } else {
+ throw new GLException("Byte doesn't match Buffer Class: "+dest);
+ }
+ }
+
+ public static void puts(Buffer dest, short v) {
+ if(dest instanceof ShortBuffer) {
+ ((ShortBuffer)dest).put(v);
+ } else if(dest instanceof IntBuffer) {
+ ((IntBuffer)dest).put((int)v);
+ } else {
+ throw new GLException("Short doesn't match Buffer Class: "+dest);
+ }
+ }
+
+ public static void puti(Buffer dest, int v) {
+ if(dest instanceof IntBuffer) {
+ ((IntBuffer)dest).put(v);
+ } else {
+ throw new GLException("Integer doesn't match Buffer Class: "+dest);
+ }
+ }
+
+ public static void putx(Buffer dest, int v) {
+ puti(dest, v);
+ }
+
+ public static void putf(Buffer dest, float v) {
+ if(dest instanceof FloatBuffer) {
+ ((FloatBuffer)dest).put(v);
+ } else if(dest instanceof IntBuffer) {
+ ((IntBuffer)dest).put(FixedPoint.toFixed(v));
+ } else {
+ throw new GLException("Float doesn't match Buffer Class: "+dest);
+ }
+ }
+
+ //----------------------------------------------------------------------
+ // Internals only below this point
+ //
+
+ // NOTE that this work must be done reflectively at the present time
+ // because this code must compile and run correctly on both CDC/FP and J2SE
+ private static boolean isCDCFP;
+ private static Class byteOrderClass;
+ private static Object nativeOrderObject;
+ private static Method orderMethod;
+
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/BufferUtil.java.javase b/src/jogl/classes/com/jogamp/opengl/util/BufferUtil.java.javase
new file mode 100755
index 000000000..fde1e8681
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/BufferUtil.java.javase
@@ -0,0 +1,499 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.util;
+
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2;
+import javax.media.opengl.GL2ES2;
+import javax.media.opengl.GLException;
+import javax.media.opengl.GLProfile;
+
+import java.nio.*;
+import java.util.*;
+
+import java.lang.reflect.*;
+
+/** Utility routines for dealing with direct buffers. */
+
+public class BufferUtil {
+ public static final int SIZEOF_BYTE = 1;
+ public static final int SIZEOF_SHORT = 2;
+ public static final int SIZEOF_INT = 4;
+ public static final int SIZEOF_FLOAT = 4;
+ public static final int SIZEOF_LONG = 8;
+ public static final int SIZEOF_DOUBLE = 8;
+
+ public static final int sizeOfGLType(int glType) {
+ switch (glType) {
+ case GL.GL_UNSIGNED_BYTE:
+ return SIZEOF_BYTE;
+ case GL.GL_BYTE:
+ return SIZEOF_BYTE;
+ case GL.GL_UNSIGNED_SHORT:
+ return SIZEOF_SHORT;
+ case GL.GL_SHORT:
+ return SIZEOF_SHORT;
+ case GL.GL_FLOAT:
+ return SIZEOF_FLOAT;
+ case GL.GL_FIXED:
+ return SIZEOF_INT;
+ case GL2ES2.GL_INT:
+ return SIZEOF_INT;
+ case GL2ES2.GL_UNSIGNED_INT:
+ return SIZEOF_INT;
+ case GL2.GL_DOUBLE:
+ return SIZEOF_DOUBLE;
+ }
+ return -1;
+ }
+
+ public static final int sizeOfBufferElem(Buffer buffer) {
+ if (buffer == null) {
+ return 0;
+ }
+ if (buffer instanceof ByteBuffer) {
+ return BufferUtil.SIZEOF_BYTE;
+ } else if (buffer instanceof IntBuffer) {
+ return BufferUtil.SIZEOF_INT;
+ } else if (buffer instanceof ShortBuffer) {
+ return BufferUtil.SIZEOF_SHORT;
+ } else if (buffer instanceof FloatBuffer) {
+ return BufferUtil.SIZEOF_FLOAT;
+ } else if (buffer instanceof DoubleBuffer) {
+ return BufferUtil.SIZEOF_DOUBLE;
+ }
+ throw new RuntimeException("Unexpected buffer type " +
+ buffer.getClass().getName());
+ }
+
+ private BufferUtil() {}
+
+ //----------------------------------------------------------------------
+ // Allocation routines
+ //
+
+ public static final Buffer newGLBuffer(int glType, int numElements) {
+ switch (glType) {
+ case GL.GL_UNSIGNED_BYTE:
+ case GL.GL_BYTE:
+ return newByteBuffer(numElements);
+ case GL.GL_UNSIGNED_SHORT:
+ case GL.GL_SHORT:
+ return newShortBuffer(numElements);
+ case GL.GL_FLOAT:
+ return newFloatBuffer(numElements);
+ case GL.GL_FIXED:
+ case GL2ES2.GL_INT:
+ case GL2ES2.GL_UNSIGNED_INT:
+ return newIntBuffer(numElements);
+ case GL2.GL_DOUBLE:
+ return newDoubleBuffer(numElements);
+ }
+ return null;
+ }
+
+ public static final Buffer sliceGLBuffer(ByteBuffer parent, int bytePos, int byteLen, int glType) {
+ if(parent==null || byteLen==0) return null;
+ parent.position(bytePos);
+ parent.limit(bytePos + byteLen);
+
+ switch (glType) {
+ case GL.GL_UNSIGNED_BYTE:
+ case GL.GL_BYTE:
+ return parent.slice();
+ case GL.GL_UNSIGNED_SHORT:
+ case GL.GL_SHORT:
+ return parent.asShortBuffer();
+ case GL.GL_FLOAT:
+ return parent.asFloatBuffer();
+ case GL.GL_FIXED:
+ case GL2ES2.GL_INT:
+ case GL2ES2.GL_UNSIGNED_INT:
+ return parent.asIntBuffer();
+ case GL2.GL_DOUBLE:
+ return parent.asDoubleBuffer();
+ }
+ return null;
+ }
+
+ /** Allocates a new direct ByteBuffer with the specified number of
+ elements. The returned buffer will have its byte order set to
+ the host platform's native byte order. */
+ public static ByteBuffer newByteBuffer(int numElements) {
+ ByteBuffer bb = ByteBuffer.allocateDirect(numElements);
+ nativeOrder(bb);
+ return bb;
+ }
+
+ public static ByteBuffer newByteBuffer(byte[] values, int offset, int len) {
+ ByteBuffer bb = newByteBuffer(len);
+ bb.put(values, offset, len);
+ bb.rewind();
+ return bb;
+ }
+
+ public static ByteBuffer newByteBuffer(byte[] values, int offset) {
+ return newByteBuffer(values, offset, values.length-offset);
+ }
+
+ public static ByteBuffer newByteBuffer(byte[] values) {
+ return newByteBuffer(values, 0);
+ }
+
+
+ /** Allocates a new direct DoubleBuffer with the specified number of
+ elements. The returned buffer will have its byte order set to
+ the host platform's native byte order. */
+ public static DoubleBuffer newDoubleBuffer(int numElements) {
+ ByteBuffer bb = newByteBuffer(numElements * SIZEOF_DOUBLE);
+ return bb.asDoubleBuffer();
+ }
+
+ public static DoubleBuffer newDoubleBuffer(double[] values, int offset) {
+ int len = values.length-offset;
+ DoubleBuffer bb = newDoubleBuffer(len);
+ bb.put(values, offset, len);
+ bb.rewind();
+ return bb;
+ }
+
+ public static DoubleBuffer newDoubleBuffer(double[] values) {
+ return newDoubleBuffer(values, 0);
+ }
+
+
+ /** Allocates a new direct FloatBuffer with the specified number of
+ elements. The returned buffer will have its byte order set to
+ the host platform's native byte order. */
+ public static FloatBuffer newFloatBuffer(int numElements) {
+ ByteBuffer bb = newByteBuffer(numElements * SIZEOF_FLOAT);
+ return bb.asFloatBuffer();
+ }
+
+ public static FloatBuffer newFloatBuffer(float[] values, int offset, int len) {
+ FloatBuffer bb = newFloatBuffer(len);
+ bb.put(values, offset, len);
+ bb.rewind();
+ return bb;
+ }
+
+ public static FloatBuffer newFloatBuffer(float[] values, int offset) {
+ return newFloatBuffer(values, 0, values.length-offset);
+ }
+
+ public static FloatBuffer newFloatBuffer(float[] values) {
+ return newFloatBuffer(values, 0);
+ }
+
+
+ /** Allocates a new direct IntBuffer with the specified number of
+ elements. The returned buffer will have its byte order set to
+ the host platform's native byte order. */
+ public static IntBuffer newIntBuffer(int numElements) {
+ ByteBuffer bb = newByteBuffer(numElements * SIZEOF_INT);
+ return bb.asIntBuffer();
+ }
+
+ public static IntBuffer newIntBuffer(int[] values, int offset, int len) {
+ IntBuffer bb = newIntBuffer(len);
+ bb.put(values, offset, len);
+ bb.rewind();
+ return bb;
+ }
+
+ public static IntBuffer newIntBuffer(int[] values, int offset) {
+ return newIntBuffer(values, 0, values.length-offset);
+ }
+
+ public static IntBuffer newIntBuffer(int[] values) {
+ return newIntBuffer(values, 0);
+ }
+
+ /** Allocates a new direct LongBuffer with the specified number of
+ elements. The returned buffer will have its byte order set to
+ the host platform's native byte order. */
+ public static LongBuffer newLongBuffer(int numElements) {
+ ByteBuffer bb = newByteBuffer(numElements * SIZEOF_LONG);
+ return bb.asLongBuffer();
+ }
+
+ /** Allocates a new direct ShortBuffer with the specified number of
+ elements. The returned buffer will have its byte order set to
+ the host platform's native byte order. */
+ public static ShortBuffer newShortBuffer(int numElements) {
+ ByteBuffer bb = newByteBuffer(numElements * SIZEOF_SHORT);
+ return bb.asShortBuffer();
+ }
+
+ public static ShortBuffer newShortBuffer(short[] values, int offset, int len) {
+ ShortBuffer bb = newShortBuffer(len);
+ bb.put(values, offset, len);
+ bb.rewind();
+ return bb;
+ }
+
+ public static ShortBuffer newShortBuffer(short[] values, int offset) {
+ return newShortBuffer(values, 0, values.length-offset);
+ }
+
+ public static ShortBuffer newShortBuffer(short[] values) {
+ return newShortBuffer(values, 0);
+ }
+
+ //----------------------------------------------------------------------
+ // Copy routines (type-to-type)
+ //
+
+ /** Copies the remaining elements (as defined by
+ limit() - position()
) in the passed ByteBuffer into
+ a newly-allocated direct ByteBuffer. The returned buffer will
+ have its byte order set to the host platform's native byte
+ order. The position of the newly-allocated buffer will be zero,
+ and the position of the passed buffer is unchanged (though its
+ mark is changed). */
+ public static ByteBuffer copyByteBuffer(ByteBuffer orig) {
+ ByteBuffer dest = newByteBuffer(orig.remaining());
+ dest.put(orig);
+ dest.rewind();
+ return dest;
+ }
+
+ /** Copies the remaining elements (as defined by
+ limit() - position()
) in the passed FloatBuffer
+ into a newly-allocated direct FloatBuffer. The returned buffer
+ will have its byte order set to the host platform's native byte
+ order. The position of the newly-allocated buffer will be zero,
+ and the position of the passed buffer is unchanged (though its
+ mark is changed). */
+ public static FloatBuffer copyFloatBuffer(FloatBuffer orig) {
+ return copyFloatBufferAsByteBuffer(orig).asFloatBuffer();
+ }
+
+ /** Copies the remaining elements (as defined by
+ limit() - position()
) in the passed IntBuffer
+ into a newly-allocated direct IntBuffer. The returned buffer
+ will have its byte order set to the host platform's native byte
+ order. The position of the newly-allocated buffer will be zero,
+ and the position of the passed buffer is unchanged (though its
+ mark is changed). */
+ public static IntBuffer copyIntBuffer(IntBuffer orig) {
+ return copyIntBufferAsByteBuffer(orig).asIntBuffer();
+ }
+
+ /** Copies the remaining elements (as defined by
+ limit() - position()
) in the passed ShortBuffer
+ into a newly-allocated direct ShortBuffer. The returned buffer
+ will have its byte order set to the host platform's native byte
+ order. The position of the newly-allocated buffer will be zero,
+ and the position of the passed buffer is unchanged (though its
+ mark is changed). */
+ public static ShortBuffer copyShortBuffer(ShortBuffer orig) {
+ return copyShortBufferAsByteBuffer(orig).asShortBuffer();
+ }
+
+ //----------------------------------------------------------------------
+ // Copy routines (type-to-ByteBuffer)
+ //
+
+ /** Copies the remaining elements (as defined by
+ limit() - position()
) in the passed FloatBuffer
+ into a newly-allocated direct ByteBuffer. The returned buffer
+ will have its byte order set to the host platform's native byte
+ order. The position of the newly-allocated buffer will be zero,
+ and the position of the passed buffer is unchanged (though its
+ mark is changed). */
+ public static ByteBuffer copyFloatBufferAsByteBuffer(FloatBuffer orig) {
+ ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_FLOAT);
+ dest.asFloatBuffer().put(orig);
+ dest.rewind();
+ return dest;
+ }
+
+ /** Copies the remaining elements (as defined by
+ limit() - position()
) in the passed IntBuffer into
+ a newly-allocated direct ByteBuffer. The returned buffer will
+ have its byte order set to the host platform's native byte
+ order. The position of the newly-allocated buffer will be zero,
+ and the position of the passed buffer is unchanged (though its
+ mark is changed). */
+ public static ByteBuffer copyIntBufferAsByteBuffer(IntBuffer orig) {
+ ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_INT);
+ dest.asIntBuffer().put(orig);
+ dest.rewind();
+ return dest;
+ }
+
+ /** Copies the remaining elements (as defined by
+ limit() - position()
) in the passed ShortBuffer
+ into a newly-allocated direct ByteBuffer. The returned buffer
+ will have its byte order set to the host platform's native byte
+ order. The position of the newly-allocated buffer will be zero,
+ and the position of the passed buffer is unchanged (though its
+ mark is changed). */
+ public static ByteBuffer copyShortBufferAsByteBuffer(ShortBuffer orig) {
+ ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_SHORT);
+ dest.asShortBuffer().put(orig);
+ dest.rewind();
+ return dest;
+ }
+
+ //----------------------------------------------------------------------
+ // Conversion routines
+ //
+
+ public final static float[] getFloatArray(double[] source) {
+ int i=source.length;
+ float[] dest = new float[i--];
+ while(i>=0) { dest[i]=(float)source[i]; i--; }
+ return dest;
+ }
+
+ public final static FloatBuffer getFloatBuffer(DoubleBuffer source) {
+ source.rewind();
+ FloatBuffer dest = BufferUtil.newFloatBuffer(source.limit());
+ while(source.hasRemaining()) { dest.put((float)source.get()); }
+ return dest;
+ }
+
+ public static ByteBuffer nativeOrder(ByteBuffer buf) {
+ if (!isCDCFP) {
+ try {
+ if (byteOrderClass == null) {
+ byteOrderClass = Class.forName("java.nio.ByteOrder");
+ orderMethod = ByteBuffer.class.getMethod("order", new Class[] { byteOrderClass });
+ Method nativeOrderMethod = byteOrderClass.getMethod("nativeOrder", null);
+ nativeOrderObject = nativeOrderMethod.invoke(null, null);
+ }
+ } catch (Throwable t) {
+ // Must be running on CDC / FP
+ isCDCFP = true;
+ }
+
+ if (!isCDCFP) {
+ try {
+ orderMethod.invoke(buf, new Object[] { nativeOrderObject });
+ } catch (Throwable t) {
+ }
+ }
+ }
+ return buf;
+ }
+
+ //----------------------------------------------------------------------
+ // Convenient GL put methods with generic target Buffer
+ //
+ public static void put(Buffer dest, Buffer v) {
+ if((dest instanceof ByteBuffer) && (v instanceof ByteBuffer)) {
+ ((ByteBuffer)dest).put((ByteBuffer)v);
+ } else if((dest instanceof ShortBuffer) && (v instanceof ShortBuffer)) {
+ ((ShortBuffer)dest).put((ShortBuffer)v);
+ } else if((dest instanceof IntBuffer) && (v instanceof IntBuffer)) {
+ ((IntBuffer)dest).put((IntBuffer)v);
+ } else if((dest instanceof FloatBuffer) && (v instanceof FloatBuffer)) {
+ ((FloatBuffer)dest).put((FloatBuffer)v);
+ } else {
+ throw new GLException("Incompatible Buffer classes: dest = "+dest.getClass().getName() + ", src = " + v.getClass().getName());
+ }
+ }
+
+ public static void putb(Buffer dest, byte v) {
+ if(dest instanceof ByteBuffer) {
+ ((ByteBuffer)dest).put(v);
+ } else if(dest instanceof ShortBuffer) {
+ ((ShortBuffer)dest).put((short)v);
+ } else if(dest instanceof IntBuffer) {
+ ((IntBuffer)dest).put((int)v);
+ } else {
+ throw new GLException("Byte doesn't match Buffer Class: "+dest);
+ }
+ }
+
+ public static void puts(Buffer dest, short v) {
+ if(dest instanceof ShortBuffer) {
+ ((ShortBuffer)dest).put(v);
+ } else if(dest instanceof IntBuffer) {
+ ((IntBuffer)dest).put((int)v);
+ } else {
+ throw new GLException("Short doesn't match Buffer Class: "+dest);
+ }
+ }
+
+ public static void puti(Buffer dest, int v) {
+ if(dest instanceof IntBuffer) {
+ ((IntBuffer)dest).put(v);
+ } else {
+ throw new GLException("Integer doesn't match Buffer Class: "+dest);
+ }
+ }
+
+ public static void putx(Buffer dest, int v) {
+ puti(dest, v);
+ }
+
+ public static void putf(Buffer dest, float v) {
+ if(dest instanceof FloatBuffer) {
+ ((FloatBuffer)dest).put(v);
+ } else if(dest instanceof IntBuffer) {
+ ((IntBuffer)dest).put(FixedPoint.toFixed(v));
+ } else {
+ throw new GLException("Float doesn't match Buffer Class: "+dest);
+ }
+ }
+
+ public static void putd(Buffer dest, double v) {
+ if(dest instanceof FloatBuffer) {
+ ((FloatBuffer)dest).put((float)v);
+ } else {
+ throw new GLException("Double doesn't match Buffer Class: "+dest);
+ }
+ }
+
+ //----------------------------------------------------------------------
+ // Internals only below this point
+ //
+
+ // NOTE that this work must be done reflectively at the present time
+ // because this code must compile and run correctly on both CDC/FP and J2SE
+ private static boolean isCDCFP;
+ private static Class byteOrderClass;
+ private static Object nativeOrderObject;
+ private static Method orderMethod;
+
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/FBObject.java b/src/jogl/classes/com/jogamp/opengl/util/FBObject.java
new file mode 100755
index 000000000..4920ed5f5
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/FBObject.java
@@ -0,0 +1,263 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.opengl.util;
+
+import javax.media.opengl.*;
+
+public class FBObject {
+ private int width, height, attr;
+ private int fb, fbo_tex, depth_rb, stencil_rb, vStatus;
+ private int texInternalFormat, texDataFormat, texDataType;
+
+ public static final int ATTR_DEPTH = 1 << 0;
+ public static final int ATTR_STENCIL = 1 << 1;
+
+ public FBObject(int width, int height, int attributes) {
+ this.width = width;
+ this.height = height;
+ this.attr = attributes;
+ }
+
+
+ public boolean validateStatus(GL gl) {
+ vStatus = getStatus(gl, fb);
+ switch(vStatus) {
+ case GL.GL_FRAMEBUFFER_COMPLETE:
+ return true;
+ case GL.GL_FRAMEBUFFER_UNSUPPORTED:
+ case GL.GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT:
+ case GL.GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:
+ case GL.GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS:
+ case GL.GL_FRAMEBUFFER_INCOMPLETE_FORMATS:
+ //case GL2.GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER:
+ //case GL2.GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER:
+ //case GL2.GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT:
+ case 0:
+ default:
+ return false;
+ }
+ }
+
+ public static int getStatus(GL gl, int fb) {
+ if(!gl.glIsFramebuffer(fb)) {
+ return -1;
+ }
+ return gl.glCheckFramebufferStatus(gl.GL_FRAMEBUFFER);
+ //return gl.glCheckFramebufferStatus(fb);
+ }
+
+ public String getStatusString() {
+ return getStatusString(vStatus);
+ }
+
+ public static String getStatusString(int fbStatus) {
+ switch(fbStatus) {
+ case -1:
+ return "NOT A FBO";
+ case GL.GL_FRAMEBUFFER_COMPLETE:
+ return "OK";
+ case GL.GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT:
+ return("GL FBO: incomplete,incomplete attachment\n");
+ case GL.GL_FRAMEBUFFER_UNSUPPORTED:
+ return("GL FBO: Unsupported framebuffer format");
+ case GL.GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:
+ return("GL FBO: incomplete,missing attachment");
+ case GL.GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS:
+ return("GL FBO: incomplete,attached images must have same dimensions");
+ case GL.GL_FRAMEBUFFER_INCOMPLETE_FORMATS:
+ return("GL FBO: incomplete,attached images must have same format");
+ /*
+ case GL2.GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER:
+ return("GL FBO: incomplete,missing draw buffer");
+ case GL2.GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER:
+ return("GL FBO: incomplete,missing read buffer");
+ case GL2.GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT:
+ return("GL FBO: incomplete, duplicate attachment");
+ */
+ case 0:
+ return("GL FBO: incomplete, implementation fault");
+ default:
+ return("GL FBO: incomplete, implementation ERROR");
+ }
+ }
+
+ public void init(GL gl) {
+ int textureInternalFormat, textureDataFormat, textureDataType;
+
+ if(gl.isGL2()) {
+ textureInternalFormat=GL.GL_RGBA8;
+ textureDataFormat=GL2.GL_BGRA;
+ textureDataType=GL2.GL_UNSIGNED_INT_8_8_8_8_REV;
+ } else if(gl.isGLES()) {
+ textureInternalFormat=GL.GL_RGBA;
+ textureDataFormat=GL.GL_RGBA;
+ textureDataType=GL.GL_UNSIGNED_BYTE;
+ } else {
+ textureInternalFormat=GL.GL_RGB;
+ textureDataFormat=GL.GL_RGB;
+ textureDataType=GL.GL_UNSIGNED_BYTE;
+ }
+ init(gl, textureInternalFormat, textureDataFormat, textureDataType);
+ }
+
+ public void init(GL gl, int textureInternalFormat, int textureDataFormat, int textureDataType) {
+ texInternalFormat=textureInternalFormat;
+ texDataFormat=textureDataFormat;
+ texDataType=textureDataType;
+
+ // generate fbo ..
+ int name[] = new int[1];
+
+ gl.glGenFramebuffers(1, name, 0);
+ fb = name[0];
+ System.out.println("fb: "+fb);
+
+ gl.glGenTextures(1, name, 0);
+ fbo_tex = name[0];
+ System.out.println("fbo_tex: "+fbo_tex);
+
+ if(0!=(attr&ATTR_DEPTH)) {
+ gl.glGenRenderbuffers(1, name, 0);
+ depth_rb = name[0];
+ System.out.println("depth_rb: "+depth_rb);
+ } else {
+ depth_rb = 0;
+ }
+ if(0!=(attr&ATTR_STENCIL)) {
+ gl.glGenRenderbuffers(1, name, 0);
+ stencil_rb = name[0];
+ System.out.println("stencil_rb: "+stencil_rb);
+ } else {
+ stencil_rb = 0;
+ }
+
+ // bind fbo ..
+ gl.glBindFramebuffer(GL.GL_FRAMEBUFFER, fb);
+
+ gl.glBindTexture(GL.GL_TEXTURE_2D, fbo_tex);
+ gl.glTexImage2D(GL.GL_TEXTURE_2D, 0, texInternalFormat, width, height, 0,
+ texDataFormat, texDataType, null);
+ gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST);
+ gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_NEAREST);
+ //gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL2.GL_CLAMP);
+ //gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL2.GL_CLAMP);
+
+
+ // Set up the color buffer for use as a renderable texture:
+ gl.glFramebufferTexture2D(GL.GL_FRAMEBUFFER,
+ GL.GL_COLOR_ATTACHMENT0,
+ GL.GL_TEXTURE_2D, fbo_tex, 0);
+
+ if(depth_rb!=0) {
+ // Initialize the depth buffer:
+ gl.glBindRenderbuffer(GL.GL_RENDERBUFFER, depth_rb);
+ gl.glRenderbufferStorage(GL.GL_RENDERBUFFER,
+ GL.GL_DEPTH_COMPONENT16, width, height);
+ // Set up the depth buffer attachment:
+ gl.glFramebufferRenderbuffer(GL.GL_FRAMEBUFFER,
+ GL.GL_DEPTH_ATTACHMENT,
+ GL.GL_RENDERBUFFER, depth_rb);
+ }
+
+ if(stencil_rb!=0) {
+ // Initialize the stencil buffer:
+ gl.glBindRenderbuffer(GL.GL_RENDERBUFFER, stencil_rb);
+ gl.glRenderbufferStorage(GL.GL_RENDERBUFFER,
+ GL.GL_STENCIL_INDEX8, width, height);
+ gl.glFramebufferRenderbuffer(GL.GL_FRAMEBUFFER,
+ GL.GL_STENCIL_ATTACHMENT,
+ GL.GL_RENDERBUFFER, stencil_rb);
+ }
+
+ // Check the FBO for completeness
+ if(validateStatus(gl)) {
+ System.out.println("Framebuffer " + fb + " is complete");
+ } else {
+ System.out.println("Framebuffer " + fb + " is incomplete: status = 0x" + Integer.toHexString(vStatus) +
+ " : " + getStatusString());
+ }
+
+ unbind(gl);
+ }
+
+ public void destroy(GL gl) {
+ unbind(gl);
+
+ int name[] = new int[1];
+
+ if(0!=stencil_rb) {
+ name[0] = stencil_rb;
+ gl.glDeleteRenderbuffers(1, name, 0);
+ stencil_rb = 0;
+ }
+ if(0!=depth_rb) {
+ name[0] = depth_rb;
+ gl.glDeleteRenderbuffers(1, name, 0);
+ depth_rb=0;
+ }
+ if(0!=fbo_tex) {
+ name[0] = fbo_tex;
+ gl.glDeleteTextures(1, name, 0);
+ fbo_tex = 0;
+ }
+ if(0!=fb) {
+ name[0] = fb;
+ gl.glDeleteFramebuffers(1, name, 0);
+ fb = 0;
+ }
+ }
+
+ public void bind(GL gl) {
+ gl.glBindTexture(GL.GL_TEXTURE_2D, fbo_tex);
+ gl.glBindFramebuffer(GL.GL_FRAMEBUFFER, fb);
+ }
+
+ public void unbind(GL gl) {
+ gl.glBindTexture(GL.GL_TEXTURE_2D, 0);
+ gl.glBindFramebuffer(GL.GL_FRAMEBUFFER, 0);
+ }
+
+ public void use(GL gl) {
+ gl.glBindTexture(GL.GL_TEXTURE_2D, 0);
+ gl.glBindFramebuffer(GL.GL_FRAMEBUFFER, 0);
+ gl.glBindTexture(GL.GL_TEXTURE_2D, fbo_tex); // to use it ..
+ }
+
+ public int getFBName() {
+ return fb;
+ }
+ public int getTextureName() {
+ return fbo_tex;
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java b/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java
new file mode 100755
index 000000000..75c4cdff7
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java
@@ -0,0 +1,123 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.util;
+
+import java.util.*;
+import javax.media.opengl.*;
+
+/** An Animator subclass which attempts to achieve a target
+ frames-per-second rate to avoid using all CPU time. The target FPS
+ is only an estimate and is not guaranteed. */
+
+public class FPSAnimator extends Animator {
+ private Timer timer;
+ private int fps;
+ private boolean scheduleAtFixedRate;
+
+ /** Creates an FPSAnimator with a given target frames-per-second
+ value. Equivalent to FPSAnimator(null, fps)
. */
+ public FPSAnimator(int fps) {
+ this(null, fps);
+ }
+
+ /** Creates an FPSAnimator with a given target frames-per-second
+ value and a flag indicating whether to use fixed-rate
+ scheduling. Equivalent to FPSAnimator(null, fps,
+ scheduleAtFixedRate)
. */
+ public FPSAnimator(int fps, boolean scheduleAtFixedRate) {
+ this(null, fps, scheduleAtFixedRate);
+ }
+
+ /** Creates an FPSAnimator with a given target frames-per-second
+ value and an initial drawable to animate. Equivalent to
+ FPSAnimator(null, fps, false)
. */
+ public FPSAnimator(GLAutoDrawable drawable, int fps) {
+ this(drawable, fps, false);
+ }
+
+ /** Creates an FPSAnimator with a given target frames-per-second
+ value, an initial drawable to animate, and a flag indicating
+ whether to use fixed-rate scheduling. */
+ public FPSAnimator(GLAutoDrawable drawable, int fps, boolean scheduleAtFixedRate) {
+ this.fps = fps;
+ if (drawable != null) {
+ add(drawable);
+ }
+ this.scheduleAtFixedRate = scheduleAtFixedRate;
+ }
+
+ /** Starts this FPSAnimator. */
+ public synchronized void start() {
+ if (timer != null) {
+ throw new GLException("Already started");
+ }
+ timer = new Timer();
+ long delay = (long) (1000.0f / (float) fps);
+ TimerTask task = new TimerTask() {
+ public void run() {
+ display();
+ }
+ };
+ if (scheduleAtFixedRate) {
+ timer.scheduleAtFixedRate(task, 0, delay);
+ } else {
+ timer.schedule(task, 0, delay);
+ }
+ }
+
+ /** Indicates whether this FPSAnimator is currently running. This
+ should only be used as a heuristic to applications because in
+ some circumstances the FPSAnimator may be in the process of
+ shutting down and this method will still return true. */
+ public synchronized boolean isAnimating() {
+ return (timer != null);
+ }
+
+ /** Stops this FPSAnimator. Due to the implementation of the
+ FPSAnimator it is not guaranteed that the FPSAnimator will be
+ completely stopped by the time this method returns. */
+ public synchronized void stop() {
+ if (timer == null) {
+ throw new GLException("Already stopped");
+ }
+ timer.cancel();
+ timer = null;
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/FileUtil.java b/src/jogl/classes/com/jogamp/opengl/util/FileUtil.java
new file mode 100755
index 000000000..6ad0da825
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/FileUtil.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2005 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.util;
+
+import java.io.*;
+
+/** Utilities for dealing with files. */
+
+public class FileUtil {
+ private FileUtil() {}
+
+ /**
+ * Returns the lowercase suffix of the given file name (the text
+ * after the last '.' in the file name). Returns null if the file
+ * name has no suffix. Only operates on the given file name;
+ * performs no I/O operations.
+ *
+ * @param file name of the file
+ * @return lowercase suffix of the file name
+ * @throws NullPointerException if file is null
+ */
+
+ public static String getFileSuffix(File file) {
+ return getFileSuffix(file.getName());
+ }
+
+ /**
+ * Returns the lowercase suffix of the given file name (the text
+ * after the last '.' in the file name). Returns null if the file
+ * name has no suffix. Only operates on the given file name;
+ * performs no I/O operations.
+ *
+ * @param filename name of the file
+ * @return lowercase suffix of the file name
+ * @throws NullPointerException if filename is null
+ */
+ public static String getFileSuffix(String filename) {
+ int lastDot = filename.lastIndexOf('.');
+ if (lastDot < 0) {
+ return null;
+ }
+ return toLowerCase(filename.substring(lastDot + 1));
+ }
+
+ private static String toLowerCase(String arg) {
+ if (arg == null) {
+ return null;
+ }
+
+ return arg.toLowerCase();
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/FixedPoint.java b/src/jogl/classes/com/jogamp/opengl/util/FixedPoint.java
new file mode 100644
index 000000000..6412db5ef
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/FixedPoint.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.opengl.util;
+
+public class FixedPoint {
+ public static final int toFixed(int value) {
+ if (value < -32768) value = -32768;
+ if (value > 32767) value = 32767;
+ return value * 65536;
+ }
+
+ public static final int toFixed(float value) {
+ if (value < -32768) value = -32768;
+ if (value > 32767) value = 32767;
+ return (int)(value * 65536.0f);
+ }
+
+ public static final float toFloat(int value) {
+ return (float)value/65536.0f;
+ }
+
+ public static final int mult(int x1, int x2) {
+ return (int) ( ((long)x1*(long)x2)/65536 );
+ }
+
+ public static final int div(int x1, int x2) {
+ return (int) ( (((long)x1)<<16)/x2 );
+ }
+}
+
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java
new file mode 100644
index 000000000..f8951f0fd
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java
@@ -0,0 +1,353 @@
+
+package com.jogamp.opengl.util;
+
+import java.security.*;
+
+import javax.media.opengl.*;
+
+import com.jogamp.opengl.util.glsl.*;
+
+import com.jogamp.opengl.impl.SystemUtil;
+
+import java.nio.*;
+
+public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayDataEditable {
+
+ /**
+ * The OpenGL ES emulation on the PC probably has a buggy VBO implementation,
+ * where we have to 'refresh' the VertexPointer or VertexAttribArray after each
+ * BindBuffer !
+ *
+ * This should not be necessary on proper native implementations.
+ */
+ public static final boolean hasVBOBug = AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ return SystemUtil.getenv("JOGL_VBO_BUG");
+ }
+ }) != null;
+
+ /**
+ * @param index The GL array index
+ * @param name The optional custom name for the GL array index, maybe null.
+ * If null, the default name mapping will be used, see 'getPredefinedArrayIndexName(int)'.
+ * This name might be used as the shader attribute name.
+ * @param comps The array component number
+ * @param dataType The array index GL data type
+ * @param normalized Wheather the data shall be normalized
+ *
+ * @see javax.media.opengl.GLContext#getPredefinedArrayIndexName(int)
+ */
+ public static GLArrayDataClient createFixed(GL gl, int index, String name, int comps, int dataType, boolean normalized,
+ int initialSize)
+ throws GLException
+ {
+ gl.getGLProfile().isValidArrayDataType(index, comps, dataType, false, true);
+ GLArrayDataClient adc = new GLArrayDataClient();
+ GLArrayHandler glArrayHandler = new GLFixedArrayHandler(adc);
+ adc.init(name, index, comps, dataType, normalized, 0, null, initialSize, false, glArrayHandler, 0, 0);
+ return adc;
+ }
+
+ public static GLArrayDataClient createFixed(GL gl, int index, String name, int comps, int dataType, boolean normalized,
+ int stride, Buffer buffer)
+ throws GLException
+ {
+ gl.getGLProfile().isValidArrayDataType(index, comps, dataType, false, true);
+ GLArrayDataClient adc = new GLArrayDataClient();
+ GLArrayHandler glArrayHandler = new GLFixedArrayHandler(adc);
+ adc.init(name, index, comps, dataType, normalized, stride, buffer, comps*comps, false, glArrayHandler, 0, 0);
+ return adc;
+ }
+
+ public static GLArrayDataClient createGLSL(GL gl, String name, int comps, int dataType, boolean normalized,
+ int initialSize)
+ throws GLException
+ {
+ if(!gl.hasGLSL()) {
+ throw new GLException("GLArrayDataClient.GLSL not supported: "+gl);
+ }
+ gl.getGLProfile().isValidArrayDataType(-1, comps, dataType, true, true);
+
+ GLArrayDataClient adc = new GLArrayDataClient();
+ GLArrayHandler glArrayHandler = new GLSLArrayHandler(adc);
+ adc.init(name, -1, comps, dataType, normalized, 0, null, initialSize, true, glArrayHandler, 0, 0);
+ return adc;
+ }
+
+ public static GLArrayDataClient createGLSL(GL gl, String name, int comps, int dataType, boolean normalized,
+ int stride, Buffer buffer)
+ throws GLException
+ {
+ if(!gl.hasGLSL()) {
+ throw new GLException("GLArrayDataClient.GLSL not supported: "+gl);
+ }
+ gl.getGLProfile().isValidArrayDataType(-1, comps, dataType, true, true);
+
+ GLArrayDataClient adc = new GLArrayDataClient();
+ GLArrayHandler glArrayHandler = new GLSLArrayHandler(adc);
+ adc.init(name, -1, comps, dataType, normalized, stride, buffer, comps*comps, true, glArrayHandler, 0, 0);
+ return adc;
+ }
+
+ //
+ // Data read access
+ //
+
+ public final boolean isBufferWritten() { return bufferWritten; }
+
+ public final boolean sealed() { return sealed; }
+
+ public int getBufferUsage() { return -1; }
+
+ //
+ // Data and GL state modification ..
+ //
+
+ public final void setBufferWritten(boolean written) { bufferWritten=written; }
+
+ public void destroy(GL gl) {
+ reset(gl);
+ buffer=null;
+ }
+
+ public void reset(GL gl) {
+ enableBuffer(gl, false);
+ reset();
+ }
+
+ public void seal(GL gl, boolean seal)
+ {
+ seal(seal);
+ if(sealedGL==seal) return;
+ sealedGL = seal;
+ if(seal) {
+ init_vbo(gl);
+
+ enableBuffer(gl, true);
+ } else {
+ enableBuffer(gl, false);
+ }
+ }
+
+ public void enableBuffer(GL gl, boolean enable) {
+ if(enableBufferAlways && enable) {
+ bufferEnabled = false;
+ }
+ if( bufferEnabled != enable && components>0 ) {
+ if(enable) {
+ checkSeal(true);
+ if(null!=buffer) {
+ buffer.rewind();
+ }
+ }
+ glArrayHandler.enableBuffer(gl, enable);
+ bufferEnabled = enable;
+ }
+ }
+
+ public void setEnableAlways(boolean always) {
+ enableBufferAlways = always;
+ }
+
+ //
+ // Data modification ..
+ //
+
+ public void reset() {
+ if(buffer!=null) {
+ buffer.clear();
+ }
+ this.sealed=false;
+ this.bufferEnabled=false;
+ this.bufferWritten=false;
+ }
+
+ public void seal(boolean seal)
+ {
+ if(sealed==seal) return;
+ sealed = seal;
+ if(seal) {
+ bufferWritten=false;
+ if (null!=buffer) {
+ buffer.flip();
+ }
+ } else {
+ if (null!=buffer) {
+ buffer.position(buffer.limit());
+ buffer.limit(buffer.capacity());
+ }
+ }
+ }
+
+
+ public void rewind() {
+ if(buffer!=null) {
+ buffer.rewind();
+ }
+ }
+
+ public void padding(int done) {
+ if ( buffer==null || sealed ) return;
+ while(doneSystem.exit()
from the application rather than
+ * rely on the shutdown hook functionality due to inevitable race
+ * conditions and unspecified behavior during JVM teardown. BufferedImage
with a pixel format compatible with the graphics
+ * environment. The returned image can thus benefit from hardware accelerated operations
+ * in Java2D API.
+ *
+ * @param width The width of the image to be created
+ * @param height The height of the image to be created
+ *
+ * @return A instance of BufferedImage
with a type compatible with the graphics card.
+ */
+ public static BufferedImage createCompatibleImage(int width, int height) {
+ GraphicsConfiguration configuration =
+ GraphicsEnvironment.getLocalGraphicsEnvironment().
+ getDefaultScreenDevice().getDefaultConfiguration();
+ return configuration.createCompatibleImage(width, height);
+ }
+
+ /**
+ * Creates a thumbnail from an image. A thumbnail is a scaled down version of the original picture.
+ * This method will retain the width to height ratio of the original picture and return a new
+ * instance of BufferedImage
. The original picture is not modified.
+ *
+ * @param image The original image to sample down
+ * @param thumbWidth The width of the thumbnail to be created
+ *
+ * @throws IllegalArgumentException If thumbWidth is greater than image.getWidth()
+ *
+ * @return A thumbnail with the requested width or the original picture if thumbWidth = image.getWidth()
+ */
+ public static BufferedImage createThumbnail(BufferedImage image, int thumbWidth) {
+ // Thanks to Romain Guy for this utility
+ if (thumbWidth > image.getWidth()) {
+ throw new IllegalArgumentException("Thumbnail width must be greater than image width");
+ }
+
+ if (thumbWidth == image.getWidth()) {
+ return image;
+ }
+
+ float ratio = (float) image.getWidth() / (float) image.getHeight();
+ int width = image.getWidth();
+ BufferedImage thumb = image;
+
+ do {
+ width /= 2;
+ if (width < thumbWidth) {
+ width = thumbWidth;
+ }
+
+ BufferedImage temp = createCompatibleImage(width, (int) (width / ratio));
+ Graphics2D g2 = temp.createGraphics();
+ g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
+ RenderingHints.VALUE_INTERPOLATION_BILINEAR);
+ g2.drawImage(thumb, 0, 0, temp.getWidth(), temp.getHeight(), null);
+ g2.dispose();
+ thumb = temp;
+ } while (width != thumbWidth);
+
+ return thumb;
+ }
+
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/awt/Overlay.java b/src/jogl/classes/com/jogamp/opengl/util/awt/Overlay.java
new file mode 100755
index 000000000..1275c9391
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/awt/Overlay.java
@@ -0,0 +1,214 @@
+/*
+ * Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.util.awt;
+
+import java.awt.Graphics2D;
+
+import javax.media.opengl.*;
+import com.jogamp.opengl.util.texture.*;
+
+/** Provides a Java 2D overlay on top of an arbitrary GLDrawable,
+ making it easier to do things like draw text and images on top of
+ an OpenGL scene while still maintaining reasonably good
+ efficiency. */
+
+public class Overlay {
+ private GLDrawable drawable;
+ private TextureRenderer renderer;
+ private boolean contentsLost;
+
+ /** Creates a new Java 2D overlay on top of the specified
+ GLDrawable. */
+ public Overlay(GLDrawable drawable) {
+ this.drawable = drawable;
+ }
+
+ /** Creates a {@link java.awt.Graphics2D Graphics2D} instance for
+ rendering into the overlay. The returned object should be
+ disposed of using the normal {@link java.awt.Graphics#dispose()
+ Graphics.dispose()} method once it is no longer being used.
+
+ @return a new {@link java.awt.Graphics2D Graphics2D} object for
+ rendering into the backing store of this renderer
+ */
+ public Graphics2D createGraphics() {
+ // Validate the size of the renderer against the current size of
+ // the drawable
+ validateRenderer();
+ return renderer.createGraphics();
+ }
+
+ /** Indicates whether the Java 2D contents of the overlay were lost
+ since the last time {@link #createGraphics} was called. This
+ method should be called immediately after calling {@link
+ #createGraphics} to see whether the entire contents of the
+ overlay need to be redrawn or just the region the application is
+ interested in updating.
+
+ @return whether the contents of the overlay were lost since the
+ last render
+ */
+ public boolean contentsLost() {
+ return contentsLost;
+ }
+
+ /** Marks the given region of the overlay as dirty. This region, and
+ any previously set dirty regions, will be automatically
+ synchronized with the underlying Texture during the next {@link
+ #draw draw} or {@link #drawAll drawAll} operation, at which
+ point the dirty region will be cleared. It is not necessary for
+ an OpenGL context to be current when this method is called.
+
+ @param x the x coordinate (in Java 2D coordinates -- relative to
+ upper left) of the region to update
+ @param y the y coordinate (in Java 2D coordinates -- relative to
+ upper left) of the region to update
+ @param width the width of the region to update
+ @param height the height of the region to update
+
+ @throws GLException If an OpenGL context is not current when this method is called */
+ public void markDirty(int x, int y, int width, int height) {
+ renderer.markDirty(x, y, width, height);
+ }
+
+ /** Draws the entire contents of the overlay on top of the OpenGL
+ drawable. This is a convenience method which encapsulates all
+ portions of the rendering process; if this method is used,
+ {@link #beginRendering}, {@link #endRendering}, etc. should not
+ be used. This method should be called while the OpenGL context
+ for the drawable is current, and after your OpenGL scene has
+ been rendered.
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void drawAll() throws GLException {
+ beginRendering();
+ draw(0, 0, drawable.getWidth(), drawable.getHeight());
+ endRendering();
+ }
+
+ /** Begins the OpenGL rendering process for the overlay. This is
+ separated out so advanced applications can render independent
+ pieces of the overlay to different portions of the drawable.
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void beginRendering() throws GLException {
+ renderer.beginOrthoRendering(drawable.getWidth(), drawable.getHeight());
+ }
+
+ /** Ends the OpenGL rendering process for the overlay. This is
+ separated out so advanced applications can render independent
+ pieces of the overlay to different portions of the drawable.
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void endRendering() throws GLException {
+ renderer.endOrthoRendering();
+ }
+
+ /** Draws the specified sub-rectangle of the overlay on top of the
+ OpenGL drawable. {@link #beginRendering} and {@link
+ #endRendering} must be used in conjunction with this method to
+ achieve proper rendering results. This method should be called
+ while the OpenGL context for the drawable is current, and after
+ your OpenGL scene has been rendered.
+
+ @param x the lower-left x coordinate (relative to the lower left
+ of the overlay) of the rectangle to draw
+ @param y the lower-left y coordinate (relative to the lower left
+ of the overlay) of the rectangle to draw
+ @param width the width of the rectangle to draw
+ @param height the height of the rectangle to draw
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void draw(int x, int y, int width, int height) throws GLException {
+ draw(x, y, x, y, width, height);
+ }
+
+ /** Draws the specified sub-rectangle of the overlay at the
+ specified x and y coordinate on top of the OpenGL drawable.
+ {@link #beginRendering} and {@link #endRendering} must be used
+ in conjunction with this method to achieve proper rendering
+ results. This method should be called while the OpenGL context
+ for the drawable is current, and after your OpenGL scene has
+ been rendered.
+
+ @param screenx the on-screen x coordinate at which to draw the rectangle
+ @param screeny the on-screen y coordinate (relative to lower left) at
+ which to draw the rectangle
+ @param overlayx the x coordinate of the pixel in the overlay of
+ the lower left portion of the rectangle to draw
+ @param overlayy the y coordinate of the pixel in the overlay
+ (relative to lower left) of the lower left portion of the
+ rectangle to draw
+ @param width the width of the rectangle to draw
+ @param height the height of the rectangle to draw
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void draw(int screenx, int screeny,
+ int overlayx, int overlayy,
+ int width, int height) throws GLException {
+ renderer.drawOrthoRect(screenx, screeny,
+ overlayx, overlayy,
+ width, height);
+ }
+
+ //----------------------------------------------------------------------
+ // Internals only below this point
+ //
+
+ private void validateRenderer() {
+ if (renderer == null) {
+ renderer = new TextureRenderer(drawable.getWidth(),
+ drawable.getHeight(),
+ true);
+ contentsLost = true;
+ } else if (renderer.getWidth() != drawable.getWidth() ||
+ renderer.getHeight() != drawable.getHeight()) {
+ renderer.setSize(drawable.getWidth(), drawable.getHeight());
+ contentsLost = true;
+ } else {
+ contentsLost = false;
+ }
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/awt/Screenshot.java b/src/jogl/classes/com/jogamp/opengl/util/awt/Screenshot.java
new file mode 100755
index 000000000..7019d720f
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/awt/Screenshot.java
@@ -0,0 +1,432 @@
+/*
+ * Copyright (c) 2005 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ */
+
+package com.jogamp.opengl.util.awt;
+
+import java.awt.image.*;
+import java.io.*;
+import java.nio.*;
+import java.nio.channels.*;
+import javax.imageio.*;
+
+import javax.media.opengl.*;
+import javax.media.opengl.glu.*;
+import javax.media.opengl.glu.gl2.*;
+
+import com.jogamp.opengl.util.*;
+
+/** Utilities for taking screenshots of OpenGL applications. */
+
+public class Screenshot {
+ private Screenshot() {}
+
+ /**
+ * Takes a fast screenshot of the current OpenGL drawable to a Targa
+ * file. Requires the OpenGL context for the desired drawable to be
+ * current. Takes the screenshot from the last assigned read buffer,
+ * or the OpenGL default read buffer if none has been specified by
+ * the user (GL_FRONT for single-buffered configurations and GL_BACK
+ * for double-buffered configurations). This is the fastest
+ * mechanism for taking a screenshot of an application. Contributed
+ * by Carsten Weisse of Bytonic Software (http://bytonic.de/). TextRenderer renderer;
" field to your {@link
+ javax.media.opengl.GLEventListener GLEventListener}. In your {@link
+ javax.media.opengl.GLEventListener#init init} method, add:
+
+
+ renderer = new TextRenderer(new Font("SansSerif", Font.BOLD, 36));
+
+
+
+ renderer.beginRendering(drawable.getWidth(), drawable.getHeight());
+ // optionally set the color
+ renderer.setColor(1.0f, 0.2f, 0.2f, 0.8f);
+ renderer.draw("Text to draw", xPosition, yPosition);
+ // ... more draw commands, color changes, etc.
+ renderer.endRendering();
+
+
+ Unless you are sharing textures and display lists between OpenGL
+ contexts, you do not need to call the {@link #dispose dispose}
+ method of the TextRenderer; the OpenGL resources it uses
+ internally will be cleaned up automatically when the OpenGL
+ context is destroyed. TextRenderer(font, false,
+ false)
.
+
+ @param font the font to render with
+ */
+ public TextRenderer(Font font) {
+ this(font, false, false, null, false);
+ }
+
+ /** Creates a new TextRenderer with the given font, using no
+ antialiasing or fractional metrics, and the default
+ RenderDelegate. If mipmap
is true, attempts to use
+ OpenGL's automatic mipmap generation for better smoothing when
+ rendering the TextureRenderer's contents at a distance.
+ Equivalent to TextRenderer(font, false, false)
.
+
+ @param font the font to render with
+ @param mipmap whether to attempt use of automatic mipmap generation
+ */
+ public TextRenderer(Font font, boolean mipmap) {
+ this(font, false, false, null, mipmap);
+ }
+
+ /** Creates a new TextRenderer with the given Font, specified font
+ properties, and default RenderDelegate. The
+ antialiased
and useFractionalMetrics
+ flags provide control over the same properties at the Java 2D
+ level. No mipmap support is requested. Equivalent to
+ TextRenderer(font, antialiased, useFractionalMetrics,
+ null)
.
+
+ @param font the font to render with
+ @param antialiased whether to use antialiased fonts
+ @param useFractionalMetrics whether to use fractional font
+ metrics at the Java 2D level
+ */
+ public TextRenderer(Font font, boolean antialiased,
+ boolean useFractionalMetrics) {
+ this(font, antialiased, useFractionalMetrics, null, false);
+ }
+
+ /** Creates a new TextRenderer with the given Font, specified font
+ properties, and given RenderDelegate. The
+ antialiased
and useFractionalMetrics
+ flags provide control over the same properties at the Java 2D
+ level. The renderDelegate
provides more control
+ over the text rendered. No mipmap support is requested.
+
+ @param font the font to render with
+ @param antialiased whether to use antialiased fonts
+ @param useFractionalMetrics whether to use fractional font
+ metrics at the Java 2D level
+ @param renderDelegate the render delegate to use to draw the
+ text's bitmap, or null to use the default one
+ */
+ public TextRenderer(Font font, boolean antialiased,
+ boolean useFractionalMetrics, RenderDelegate renderDelegate) {
+ this(font, antialiased, useFractionalMetrics, renderDelegate, false);
+ }
+
+ /** Creates a new TextRenderer with the given Font, specified font
+ properties, and given RenderDelegate. The
+ antialiased
and useFractionalMetrics
+ flags provide control over the same properties at the Java 2D
+ level. The renderDelegate
provides more control
+ over the text rendered. If mipmap
is true, attempts
+ to use OpenGL's automatic mipmap generation for better smoothing
+ when rendering the TextureRenderer's contents at a distance.
+
+ @param font the font to render with
+ @param antialiased whether to use antialiased fonts
+ @param useFractionalMetrics whether to use fractional font
+ metrics at the Java 2D level
+ @param renderDelegate the render delegate to use to draw the
+ text's bitmap, or null to use the default one
+ @param mipmap whether to attempt use of automatic mipmap generation
+ */
+ public TextRenderer(Font font, boolean antialiased,
+ boolean useFractionalMetrics, RenderDelegate renderDelegate,
+ boolean mipmap) {
+ this.font = font;
+ this.antialiased = antialiased;
+ this.useFractionalMetrics = useFractionalMetrics;
+ this.mipmap = mipmap;
+
+ // FIXME: consider adjusting the size based on font size
+ // (it will already automatically resize if necessary)
+ packer = new RectanglePacker(new Manager(), kSize, kSize);
+
+ if (renderDelegate == null) {
+ renderDelegate = new DefaultRenderDelegate();
+ }
+
+ this.renderDelegate = renderDelegate;
+
+ mGlyphProducer = new GlyphProducer(font.getNumGlyphs());
+ }
+
+ /** Returns the bounding rectangle of the given String, assuming it
+ was rendered at the origin. See {@link #getBounds(CharSequence)
+ getBounds(CharSequence)}. */
+ public Rectangle2D getBounds(String str) {
+ return getBounds((CharSequence) str);
+ }
+
+ /** Returns the bounding rectangle of the given CharSequence,
+ assuming it was rendered at the origin. The coordinate system of
+ the returned rectangle is Java 2D's, with increasing Y
+ coordinates in the downward direction. The relative coordinate
+ (0, 0) in the returned rectangle corresponds to the baseline of
+ the leftmost character of the rendered string, in similar
+ fashion to the results returned by, for example, {@link
+ java.awt.font.GlyphVector#getVisualBounds}. Most applications
+ will use only the width and height of the returned Rectangle for
+ the purposes of centering or justifying the String. It is not
+ specified which Java 2D bounds ({@link
+ java.awt.font.GlyphVector#getVisualBounds getVisualBounds},
+ {@link java.awt.font.GlyphVector#getPixelBounds getPixelBounds},
+ etc.) the returned bounds correspond to, although every effort
+ is made to ensure an accurate bound. */
+ public Rectangle2D getBounds(CharSequence str) {
+ // FIXME: this should be more optimized and use the glyph cache
+ Rect r = null;
+
+ if ((r = (Rect) stringLocations.get(str)) != null) {
+ TextData data = (TextData) r.getUserData();
+
+ // Reconstitute the Java 2D results based on the cached values
+ return new Rectangle2D.Double(-data.origin().x, -data.origin().y,
+ r.w(), r.h());
+ }
+
+ // Must return a Rectangle compatible with the layout algorithm --
+ // must be idempotent
+ return normalize(renderDelegate.getBounds(str, font,
+ getFontRenderContext()));
+ }
+
+ /** Returns the Font this renderer is using. */
+ public Font getFont() {
+ return font;
+ }
+
+ /** Returns a FontRenderContext which can be used for external
+ text-related size computations. This object should be considered
+ transient and may become invalidated between {@link
+ #beginRendering beginRendering} / {@link #endRendering
+ endRendering} pairs. */
+ public FontRenderContext getFontRenderContext() {
+ if (cachedFontRenderContext == null) {
+ cachedFontRenderContext = getGraphics2D().getFontRenderContext();
+ }
+
+ return cachedFontRenderContext;
+ }
+
+ /** Begins rendering with this {@link TextRenderer TextRenderer}
+ into the current OpenGL drawable, pushing the projection and
+ modelview matrices and some state bits and setting up a
+ two-dimensional orthographic projection with (0, 0) as the
+ lower-left coordinate and (width, height) as the upper-right
+ coordinate. Binds and enables the internal OpenGL texture
+ object, sets the texture environment mode to GL_MODULATE, and
+ changes the current color to the last color set with this
+ TextRenderer via {@link #setColor setColor}. This method
+ disables the depth test and is equivalent to
+ beginRendering(width, height, true).
+
+ @param width the width of the current on-screen OpenGL drawable
+ @param height the height of the current on-screen OpenGL drawable
+ @throws javax.media.opengl.GLException If an OpenGL context is not current when this method is called
+ */
+ public void beginRendering(int width, int height) throws GLException {
+ beginRendering(width, height, true);
+ }
+
+ /** Begins rendering with this {@link TextRenderer TextRenderer}
+ into the current OpenGL drawable, pushing the projection and
+ modelview matrices and some state bits and setting up a
+ two-dimensional orthographic projection with (0, 0) as the
+ lower-left coordinate and (width, height) as the upper-right
+ coordinate. Binds and enables the internal OpenGL texture
+ object, sets the texture environment mode to GL_MODULATE, and
+ changes the current color to the last color set with this
+ TextRenderer via {@link #setColor setColor}. Disables the depth
+ test if the disableDepthTest argument is true.
+
+ @param width the width of the current on-screen OpenGL drawable
+ @param height the height of the current on-screen OpenGL drawable
+ @param disableDepthTest whether to disable the depth test
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void beginRendering(int width, int height, boolean disableDepthTest)
+ throws GLException {
+ beginRendering(true, width, height, disableDepthTest);
+ }
+
+ /** Begins rendering of 2D text in 3D with this {@link TextRenderer
+ TextRenderer} into the current OpenGL drawable. Assumes the end
+ user is responsible for setting up the modelview and projection
+ matrices, and will render text using the {@link #draw3D draw3D}
+ method. This method pushes some OpenGL state bits, binds and
+ enables the internal OpenGL texture object, sets the texture
+ environment mode to GL_MODULATE, and changes the current color
+ to the last color set with this TextRenderer via {@link
+ #setColor setColor}.
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void begin3DRendering() throws GLException {
+ beginRendering(false, 0, 0, false);
+ }
+
+ /** Changes the current color of this TextRenderer to the supplied
+ one. The default color is opaque white.
+
+ @param color the new color to use for rendering text
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void setColor(Color color) throws GLException {
+ boolean noNeedForFlush = (haveCachedColor && (cachedColor != null) &&
+ color.equals(cachedColor));
+
+ if (!noNeedForFlush) {
+ flushGlyphPipeline();
+ }
+
+ getBackingStore().setColor(color);
+ haveCachedColor = true;
+ cachedColor = color;
+ }
+
+ /** Changes the current color of this TextRenderer to the supplied
+ one, where each component ranges from 0.0f - 1.0f. The alpha
+ component, if used, does not need to be premultiplied into the
+ color channels as described in the documentation for {@link
+ com.jogamp.opengl.util.texture.Texture Texture}, although
+ premultiplied colors are used internally. The default color is
+ opaque white.
+
+ @param r the red component of the new color
+ @param g the green component of the new color
+ @param b the blue component of the new color
+ @param a the alpha component of the new color, 0.0f = completely
+ transparent, 1.0f = completely opaque
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void setColor(float r, float g, float b, float a)
+ throws GLException {
+ boolean noNeedForFlush = (haveCachedColor && (cachedColor == null) &&
+ (r == cachedR) && (g == cachedG) && (b == cachedB) &&
+ (a == cachedA));
+
+ if (!noNeedForFlush) {
+ flushGlyphPipeline();
+ }
+
+ getBackingStore().setColor(r, g, b, a);
+ haveCachedColor = true;
+ cachedR = r;
+ cachedG = g;
+ cachedB = b;
+ cachedA = a;
+ cachedColor = null;
+ }
+
+ /** Draws the supplied CharSequence at the desired location using
+ the renderer's current color. The baseline of the leftmost
+ character is at position (x, y) specified in OpenGL coordinates,
+ where the origin is at the lower-left of the drawable and the Y
+ coordinate increases in the upward direction.
+
+ @param str the string to draw
+ @param x the x coordinate at which to draw
+ @param y the y coordinate at which to draw
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void draw(CharSequence str, int x, int y) throws GLException {
+ draw3D(str, x, y, 0, 1);
+ }
+
+ /** Draws the supplied String at the desired location using the
+ renderer's current color. See {@link #draw(CharSequence, int,
+ int) draw(CharSequence, int, int)}. */
+ public void draw(String str, int x, int y) throws GLException {
+ draw3D(str, x, y, 0, 1);
+ }
+
+ /** Draws the supplied CharSequence at the desired 3D location using
+ the renderer's current color. The baseline of the leftmost
+ character is placed at position (x, y, z) in the current
+ coordinate system.
+
+ @param str the string to draw
+ @param x the x coordinate at which to draw
+ @param y the y coordinate at which to draw
+ @param z the z coordinate at which to draw
+ @param scaleFactor a uniform scale factor applied to the width and height of the drawn rectangle
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void draw3D(CharSequence str, float x, float y, float z,
+ float scaleFactor) {
+ internal_draw3D(str, x, y, z, scaleFactor);
+ }
+
+ /** Draws the supplied String at the desired 3D location using the
+ renderer's current color. See {@link #draw3D(CharSequence,
+ float, float, float, float) draw3D(CharSequence, float, float,
+ float, float)}. */
+ public void draw3D(String str, float x, float y, float z, float scaleFactor) {
+ internal_draw3D(str, x, y, z, scaleFactor);
+ }
+
+ /** Returns the pixel width of the given character. */
+ public float getCharWidth(char inChar) {
+ return mGlyphProducer.getGlyphPixelWidth(inChar);
+ }
+
+ /** Causes the TextRenderer to flush any internal caches it may be
+ maintaining and draw its rendering results to the screen. This
+ should be called after each call to draw() if you are setting
+ OpenGL state such as the modelview matrix between calls to
+ draw(). */
+ public void flush() {
+ flushGlyphPipeline();
+ }
+
+ /** Ends a render cycle with this {@link TextRenderer TextRenderer}.
+ Restores the projection and modelview matrices as well as
+ several OpenGL state bits. Should be paired with {@link
+ #beginRendering beginRendering}.
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void endRendering() throws GLException {
+ endRendering(true);
+ }
+
+ /** Ends a 3D render cycle with this {@link TextRenderer TextRenderer}.
+ Restores several OpenGL state bits. Should be paired with {@link
+ #begin3DRendering begin3DRendering}.
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void end3DRendering() throws GLException {
+ endRendering(false);
+ }
+
+ /** Disposes of all resources this TextRenderer is using. It is not
+ valid to use the TextRenderer after this method is called.
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void dispose() throws GLException {
+ packer.dispose();
+ packer = null;
+ cachedBackingStore = null;
+ cachedGraphics = null;
+ cachedFontRenderContext = null;
+
+ if (dbgFrame != null) {
+ dbgFrame.dispose();
+ }
+ }
+
+ //----------------------------------------------------------------------
+ // Internals only below this point
+ //
+
+ private static Rectangle2D preNormalize(Rectangle2D src) {
+ // Need to round to integer coordinates
+ // Also give ourselves a little slop around the reported
+ // bounds of glyphs because it looks like neither the visual
+ // nor the pixel bounds works perfectly well
+ int minX = (int) Math.floor(src.getMinX()) - 1;
+ int minY = (int) Math.floor(src.getMinY()) - 1;
+ int maxX = (int) Math.ceil(src.getMaxX()) + 1;
+ int maxY = (int) Math.ceil(src.getMaxY()) + 1;
+ return new Rectangle2D.Double(minX, minY, maxX - minX, maxY - minY);
+ }
+
+
+ private Rectangle2D normalize(Rectangle2D src) {
+ // Give ourselves a boundary around each entity on the backing
+ // store in order to prevent bleeding of nearby Strings due to
+ // the fact that we use linear filtering
+
+ // NOTE that this boundary is quite heuristic and is related
+ // to how far away in 3D we may view the text --
+ // heuristically, 1.5% of the font's height
+ int boundary = (int) Math.max(1, 0.015 * font.getSize());
+
+ return new Rectangle2D.Double((int) Math.floor(src.getMinX() - boundary),
+ (int) Math.floor(src.getMinY() - boundary),
+ (int) Math.ceil(src.getWidth() + 2 * boundary),
+ (int) Math.ceil(src.getHeight()) + 2 * boundary);
+ }
+
+ private TextureRenderer getBackingStore() {
+ TextureRenderer renderer = (TextureRenderer) packer.getBackingStore();
+
+ if (renderer != cachedBackingStore) {
+ // Backing store changed since last time; discard any cached Graphics2D
+ if (cachedGraphics != null) {
+ cachedGraphics.dispose();
+ cachedGraphics = null;
+ cachedFontRenderContext = null;
+ }
+
+ cachedBackingStore = renderer;
+ }
+
+ return cachedBackingStore;
+ }
+
+ private Graphics2D getGraphics2D() {
+ TextureRenderer renderer = getBackingStore();
+
+ if (cachedGraphics == null) {
+ cachedGraphics = renderer.createGraphics();
+
+ // Set up composite, font and rendering hints
+ cachedGraphics.setComposite(AlphaComposite.Src);
+ cachedGraphics.setColor(Color.WHITE);
+ cachedGraphics.setFont(font);
+ cachedGraphics.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
+ (antialiased ? RenderingHints.VALUE_TEXT_ANTIALIAS_ON
+ : RenderingHints.VALUE_TEXT_ANTIALIAS_OFF));
+ cachedGraphics.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS,
+ (useFractionalMetrics
+ ? RenderingHints.VALUE_FRACTIONALMETRICS_ON
+ : RenderingHints.VALUE_FRACTIONALMETRICS_OFF));
+ }
+
+ return cachedGraphics;
+ }
+
+ private void beginRendering(boolean ortho, int width, int height,
+ boolean disableDepthTestForOrtho) {
+ GL2 gl = GLContext.getCurrentGL().getGL2();
+
+ if (DEBUG && !debugged) {
+ debug(gl);
+ }
+
+ inBeginEndPair = true;
+ isOrthoMode = ortho;
+ beginRenderingWidth = width;
+ beginRenderingHeight = height;
+ beginRenderingDepthTestDisabled = disableDepthTestForOrtho;
+
+ if (ortho) {
+ getBackingStore().beginOrthoRendering(width, height,
+ disableDepthTestForOrtho);
+ } else {
+ getBackingStore().begin3DRendering();
+ }
+
+ // Push client attrib bits used by the pipelined quad renderer
+ gl.glPushClientAttrib((int) GL2.GL_ALL_CLIENT_ATTRIB_BITS);
+
+ if (!haveMaxSize) {
+ // Query OpenGL for the maximum texture size and set it in the
+ // RectanglePacker to keep it from expanding too large
+ int[] sz = new int[1];
+ gl.glGetIntegerv(GL2.GL_MAX_TEXTURE_SIZE, sz, 0);
+ packer.setMaxSize(sz[0], sz[0]);
+ haveMaxSize = true;
+ }
+
+ if (needToResetColor && haveCachedColor) {
+ if (cachedColor == null) {
+ getBackingStore().setColor(cachedR, cachedG, cachedB, cachedA);
+ } else {
+ getBackingStore().setColor(cachedColor);
+ }
+
+ needToResetColor = false;
+ }
+
+ // Disable future attempts to use mipmapping if TextureRenderer
+ // doesn't support it
+ if (mipmap && !getBackingStore().isUsingAutoMipmapGeneration()) {
+ if (DEBUG) {
+ System.err.println("Disabled mipmapping in TextRenderer");
+ }
+
+ mipmap = false;
+ }
+ }
+
+ /**
+ * emzic: here the call to glBindBuffer crashes on certain graphicscard/driver combinations
+ * this is why the ugly try-catch block has been added, which falls back to the old textrenderer
+ *
+ * @param ortho
+ * @throws GLException
+ */
+ private void endRendering(boolean ortho) throws GLException {
+ flushGlyphPipeline();
+
+ inBeginEndPair = false;
+
+ GL2 gl = GLContext.getCurrentGL().getGL2();
+
+ // Pop client attrib bits used by the pipelined quad renderer
+ gl.glPopClientAttrib();
+
+ // The OpenGL spec is unclear about whether this changes the
+ // buffer bindings, so preemptively zero out the GL_ARRAY_BUFFER
+ // binding
+ if (is15Available(gl)) {
+ try {
+ gl.glBindBuffer(GL2.GL_ARRAY_BUFFER, 0);
+ } catch (Exception e) {
+ isExtensionAvailable_GL_VERSION_1_5 = false;
+ }
+ }
+
+ if (ortho) {
+ getBackingStore().endOrthoRendering();
+ } else {
+ getBackingStore().end3DRendering();
+ }
+
+ if (++numRenderCycles >= CYCLES_PER_FLUSH) {
+ numRenderCycles = 0;
+
+ if (DEBUG) {
+ System.err.println("Clearing unused entries in endRendering()");
+ }
+
+ clearUnusedEntries();
+ }
+ }
+
+ private void clearUnusedEntries() {
+ final java.util.List deadRects = new ArrayList /*alpha
is true, allocates an alpha
+ channel in the backing store image. No mipmap support is
+ requested.
+
+ @param width the width of the texture to render into
+ @param height the height of the texture to render into
+ @param alpha whether to allocate an alpha channel for the texture
+ */
+ public TextureRenderer(int width, int height, boolean alpha) {
+ this(width, height, alpha, false);
+ }
+
+ /** Creates a new renderer with backing store of the specified width
+ and height. If alpha
is true, allocates an alpha channel in the
+ backing store image. If mipmap
is true, attempts to use OpenGL's
+ automatic mipmap generation for better smoothing when rendering
+ the TextureRenderer's contents at a distance.
+
+ @param width the width of the texture to render into
+ @param height the height of the texture to render into
+ @param alpha whether to allocate an alpha channel for the texture
+ @param mipmap whether to attempt use of automatic mipmap generation
+ */
+ public TextureRenderer(int width, int height, boolean alpha, boolean mipmap) {
+ this(width, height, alpha, false, mipmap);
+ }
+
+ // Internal constructor to avoid confusion since alpha only makes
+ // sense when intensity is not set
+ private TextureRenderer(int width, int height, boolean alpha, boolean intensity, boolean mipmap) {
+ this.alpha = alpha;
+ this.intensity = intensity;
+ this.mipmap = mipmap;
+ init(width, height);
+ }
+
+ /** Creates a new renderer with a special kind of backing store
+ which acts only as an alpha channel. No mipmap support is
+ requested. Internally, this associates a GL_INTENSITY OpenGL
+ texture with the backing store. */
+ public static TextureRenderer createAlphaOnlyRenderer(int width, int height) {
+ return createAlphaOnlyRenderer(width, height, false);
+ }
+
+ /** Creates a new renderer with a special kind of backing store
+ which acts only as an alpha channel. If mipmap
is
+ true, attempts to use OpenGL's automatic mipmap generation for
+ better smoothing when rendering the TextureRenderer's contents
+ at a distance. Internally, this associates a GL_INTENSITY OpenGL
+ texture with the backing store. */
+ public static TextureRenderer createAlphaOnlyRenderer(int width, int height, boolean mipmap) {
+ return new TextureRenderer(width, height, false, true, mipmap);
+ }
+
+ /** Returns the width of the backing store of this renderer.
+
+ @return the width of the backing store of this renderer
+ */
+ public int getWidth() {
+ return image.getWidth();
+ }
+
+ /** Returns the height of the backing store of this renderer.
+
+ @return the height of the backing store of this renderer
+ */
+ public int getHeight() {
+ return image.getHeight();
+ }
+
+ /** Returns the size of the backing store of this renderer in a
+ newly-allocated {@link java.awt.Dimension Dimension} object.
+
+ @return the size of the backing store of this renderer
+ */
+ public Dimension getSize() {
+ return getSize(null);
+ }
+
+ /** Returns the size of the backing store of this renderer. Uses the
+ {@link java.awt.Dimension Dimension} object if one is supplied,
+ or allocates a new one if null is passed.
+
+ @param d a {@link java.awt.Dimension Dimension} object in which
+ to store the results, or null to allocate a new one
+
+ @return the size of the backing store of this renderer
+ */
+ public Dimension getSize(Dimension d) {
+ if (d == null)
+ d = new Dimension();
+ d.setSize(image.getWidth(), image.getHeight());
+ return d;
+ }
+
+ /** Sets the size of the backing store of this renderer. This may
+ cause the OpenGL texture object associated with this renderer to
+ be invalidated; it is not recommended to cache this texture
+ object outside this class but to instead call {@link #getTexture
+ getTexture} when it is needed.
+
+ @param width the new width of the backing store of this renderer
+ @param height the new height of the backing store of this renderer
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void setSize(int width, int height) throws GLException {
+ init(width, height);
+ }
+
+ /** Sets the size of the backing store of this renderer. This may
+ cause the OpenGL texture object associated with this renderer to
+ be invalidated.
+
+ @param d the new size of the backing store of this renderer
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void setSize(Dimension d) throws GLException {
+ setSize(d.width, d.height);
+ }
+
+ /** Sets whether smoothing is enabled for the OpenGL texture; if so,
+ uses GL_LINEAR interpolation for the minification and
+ magnification filters. Defaults to true. Changes to this setting
+ will not take effect until the next call to {@link
+ #beginOrthoRendering beginOrthoRendering}.
+
+ @param smoothing whether smoothing is enabled for the OpenGL texture
+ */
+ public void setSmoothing(boolean smoothing) {
+ this.smoothing = smoothing;
+ smoothingChanged = true;
+ }
+
+ /** Returns whether smoothing is enabled for the OpenGL texture; see
+ {@link #setSmoothing setSmoothing}. Defaults to true.
+
+ @return whether smoothing is enabled for the OpenGL texture
+ */
+ public boolean getSmoothing() {
+ return smoothing;
+ }
+
+ /** Creates a {@link java.awt.Graphics2D Graphics2D} instance for
+ rendering to the backing store of this renderer. The returned
+ object should be disposed of using the normal {@link
+ java.awt.Graphics#dispose() Graphics.dispose()} method once it
+ is no longer being used.
+
+ @return a new {@link java.awt.Graphics2D Graphics2D} object for
+ rendering into the backing store of this renderer
+ */
+ public Graphics2D createGraphics() {
+ return image.createGraphics();
+ }
+
+ /** Returns the underlying Java 2D {@link java.awt.Image Image}
+ being rendered into. */
+ public Image getImage() {
+ return image;
+ }
+
+ /** Marks the given region of the TextureRenderer as dirty. This
+ region, and any previously set dirty regions, will be
+ automatically synchronized with the underlying Texture during
+ the next {@link #getTexture getTexture} operation, at which
+ point the dirty region will be cleared. It is not necessary for
+ an OpenGL context to be current when this method is called.
+
+ @param x the x coordinate (in Java 2D coordinates -- relative to
+ upper left) of the region to update
+ @param y the y coordinate (in Java 2D coordinates -- relative to
+ upper left) of the region to update
+ @param width the width of the region to update
+ @param height the height of the region to update
+ */
+ public void markDirty(int x, int y, int width, int height) {
+ Rectangle curRegion = new Rectangle(x, y, width, height);
+ if (dirtyRegion == null) {
+ dirtyRegion = curRegion;
+ } else {
+ dirtyRegion.add(curRegion);
+ }
+ }
+
+ /** Returns the underlying OpenGL Texture object associated with
+ this renderer, synchronizing any dirty regions of the
+ TextureRenderer with the underlying OpenGL texture.
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public Texture getTexture() throws GLException {
+ if (dirtyRegion != null) {
+ sync(dirtyRegion.x, dirtyRegion.y, dirtyRegion.width, dirtyRegion.height);
+ dirtyRegion = null;
+ }
+
+ ensureTexture();
+ return texture;
+ }
+
+ /** Disposes all resources associated with this renderer. It is not
+ valid to use this renderer after calling this method.
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void dispose() throws GLException {
+ if (texture != null) {
+ texture.dispose();
+ texture = null;
+ }
+ if (image != null) {
+ image.flush();
+ image = null;
+ }
+ }
+
+ /** Convenience method which assists in rendering portions of the
+ OpenGL texture to the screen, if the application intends to draw
+ them as a flat overlay on to the screen. Pushes OpenGL state
+ bits (GL_ENABLE_BIT, GL_DEPTH_BUFFER_BIT and GL_TRANSFORM_BIT);
+ disables the depth test, back-face culling, and lighting;
+ enables the texture in this renderer; and sets up the viewing
+ matrices for orthographic rendering where the coordinates go
+ from (0, 0) at the lower left to (width, height) at the upper
+ right. Equivalent to beginOrthoRendering(width, height, true).
+ {@link #endOrthoRendering} must be used in conjunction with this
+ method to restore all OpenGL states.
+
+ @param width the width of the current on-screen OpenGL drawable
+ @param height the height of the current on-screen OpenGL drawable
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void beginOrthoRendering(int width, int height) throws GLException {
+ beginOrthoRendering(width, height, true);
+ }
+
+ /** Convenience method which assists in rendering portions of the
+ OpenGL texture to the screen, if the application intends to draw
+ them as a flat overlay on to the screen. Pushes OpenGL state
+ bits (GL_ENABLE_BIT, GL_DEPTH_BUFFER_BIT and GL_TRANSFORM_BIT);
+ disables the depth test (if the "disableDepthTest" argument is
+ true), back-face culling, and lighting; enables the texture in
+ this renderer; and sets up the viewing matrices for orthographic
+ rendering where the coordinates go from (0, 0) at the lower left
+ to (width, height) at the upper right. {@link
+ #endOrthoRendering} must be used in conjunction with this method
+ to restore all OpenGL states.
+
+ @param width the width of the current on-screen OpenGL drawable
+ @param height the height of the current on-screen OpenGL drawable
+ @param disableDepthTest whether the depth test should be disabled
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void beginOrthoRendering(int width, int height, boolean disableDepthTest) throws GLException {
+ beginRendering(true, width, height, disableDepthTest);
+ }
+
+ /** Convenience method which assists in rendering portions of the
+ OpenGL texture to the screen as 2D quads in 3D space. Pushes
+ OpenGL state (GL_ENABLE_BIT); disables lighting; and enables the
+ texture in this renderer. Unlike {@link #beginOrthoRendering
+ beginOrthoRendering}, does not modify the depth test, back-face
+ culling, lighting, or the modelview or projection matrices. The
+ user is responsible for setting up the view matrices for correct
+ results of {@link #draw3DRect draw3DRect}. {@link
+ #end3DRendering} must be used in conjunction with this method to
+ restore all OpenGL states.
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void begin3DRendering() throws GLException {
+ beginRendering(false, 0, 0, false);
+ }
+
+ /** Changes the color of the polygons, and therefore the drawn
+ images, this TextureRenderer produces. Use of this method is
+ optional. The TextureRenderer uses the GL_MODULATE texture
+ environment mode, which causes the portions of the rendered
+ texture to be multiplied by the color of the rendered
+ polygons. The polygon color can be varied to achieve effects
+ like tinting of the overall output or fading in and out by
+ changing the alpha of the color. drawOrthoRect(screenx, screeny, 0, 0, getWidth(),
+ getHeight());
.
+
+ @param screenx the on-screen x coordinate at which to draw the rectangle
+ @param screeny the on-screen y coordinate (relative to lower left) at
+ which to draw the rectangle
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void drawOrthoRect(int screenx, int screeny) throws GLException {
+ drawOrthoRect(screenx, screeny, 0, 0, getWidth(), getHeight());
+ }
+
+ /** Draws an orthographically projected rectangle of the underlying
+ texture to the specified location on the screen. All (x, y)
+ coordinates are specified relative to the lower left corner of
+ either the texture image or the current OpenGL drawable.
+
+ @param screenx the on-screen x coordinate at which to draw the rectangle
+ @param screeny the on-screen y coordinate (relative to lower left) at
+ which to draw the rectangle
+ @param texturex the x coordinate of the pixel in the texture of
+ the lower left portion of the rectangle to draw
+ @param texturey the y coordinate of the pixel in the texture
+ (relative to lower left) of the lower left portion of the
+ rectangle to draw
+ @param width the width of the rectangle to draw
+ @param height the height of the rectangle to draw
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void drawOrthoRect(int screenx, int screeny,
+ int texturex, int texturey,
+ int width, int height) throws GLException {
+ draw3DRect(screenx, screeny, 0, texturex, texturey, width, height, 1);
+ }
+
+ /** Draws a rectangle of the underlying texture to the specified 3D
+ location. In the current coordinate system, the lower left
+ corner of the rectangle is placed at (x, y, z), and the upper
+ right corner is placed at (x + width * scaleFactor, y + height *
+ scaleFactor, z). The lower left corner of the sub-rectangle of
+ the texture is (texturex, texturey) and the upper right corner
+ is (texturex + width, texturey + height). For back-face culling
+ purposes, the rectangle is drawn with counterclockwise
+ orientation of the vertices when viewed from the front.
+
+ @param x the x coordinate at which to draw the rectangle
+ @param y the y coordinate at which to draw the rectangle
+ @param z the z coordinate at which to draw the rectangle
+ @param texturex the x coordinate of the pixel in the texture of
+ the lower left portion of the rectangle to draw
+ @param texturey the y coordinate of the pixel in the texture
+ (relative to lower left) of the lower left portion of the
+ rectangle to draw
+ @param width the width in texels of the rectangle to draw
+ @param height the height in texels of the rectangle to draw
+ @param scaleFactor the scale factor to apply (multiplicatively)
+ to the size of the drawn rectangle
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void draw3DRect(float x, float y, float z,
+ int texturex, int texturey,
+ int width, int height,
+ float scaleFactor) throws GLException {
+ GL2 gl = GLContext.getCurrentGL().getGL2();
+ Texture texture = getTexture();
+ TextureCoords coords = texture.getSubImageTexCoords(texturex, texturey,
+ texturex + width,
+ texturey + height);
+ gl.glBegin(GL2.GL_QUADS);
+ gl.glTexCoord2f(coords.left(), coords.bottom());
+ gl.glVertex3f(x, y, z);
+ gl.glTexCoord2f(coords.right(), coords.bottom());
+ gl.glVertex3f(x + width * scaleFactor, y, z);
+ gl.glTexCoord2f(coords.right(), coords.top());
+ gl.glVertex3f(x + width * scaleFactor, y + height * scaleFactor, z);
+ gl.glTexCoord2f(coords.left(), coords.top());
+ gl.glVertex3f(x, y + height * scaleFactor, z);
+ gl.glEnd();
+ }
+
+ /** Convenience method which assists in rendering portions of the
+ OpenGL texture to the screen, if the application intends to draw
+ them as a flat overlay on to the screen. Must be used if {@link
+ #beginOrthoRendering} is used to set up the rendering stage for
+ this overlay.
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void endOrthoRendering() throws GLException {
+ endRendering(true);
+ }
+
+ /** Convenience method which assists in rendering portions of the
+ OpenGL texture to the screen as 2D quads in 3D space. Must be
+ used if {@link #begin3DRendering} is used to set up the
+ rendering stage for this overlay.
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ public void end3DRendering() throws GLException {
+ endRendering(false);
+ }
+
+ /** Indicates whether automatic mipmap generation is in use for this
+ TextureRenderer. The result of this method may change from true
+ to false if it is discovered during allocation of the
+ TextureRenderer's backing store that automatic mipmap generation
+ is not supported at the OpenGL level. */
+ public boolean isUsingAutoMipmapGeneration() {
+ return mipmap;
+ }
+
+ //----------------------------------------------------------------------
+ // Internals only below this point
+ //
+
+ private void beginRendering(boolean ortho, int width, int height, boolean disableDepthTestForOrtho) {
+ GL2 gl = GLContext.getCurrentGL().getGL2();
+ int attribBits =
+ GL2.GL_ENABLE_BIT | GL2.GL_TEXTURE_BIT | GL2.GL_COLOR_BUFFER_BIT |
+ (ortho ? (GL2.GL_DEPTH_BUFFER_BIT | GL2.GL_TRANSFORM_BIT) : 0);
+ gl.glPushAttrib(attribBits);
+ gl.glDisable(GL2.GL_LIGHTING);
+ if (ortho) {
+ if (disableDepthTestForOrtho) {
+ gl.glDisable(GL2.GL_DEPTH_TEST);
+ }
+ gl.glDisable(GL2.GL_CULL_FACE);
+ gl.glMatrixMode(GL2.GL_PROJECTION);
+ gl.glPushMatrix();
+ gl.glLoadIdentity();
+ glu.gluOrtho2D(0, width, 0, height);
+ gl.glMatrixMode(GL2.GL_MODELVIEW);
+ gl.glPushMatrix();
+ gl.glLoadIdentity();
+ gl.glMatrixMode(GL2.GL_TEXTURE);
+ gl.glPushMatrix();
+ gl.glLoadIdentity();
+ }
+ gl.glEnable(GL2.GL_BLEND);
+ gl.glBlendFunc(GL2.GL_ONE, GL2.GL_ONE_MINUS_SRC_ALPHA);
+ Texture texture = getTexture();
+ texture.enable();
+ texture.bind();
+ gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL2.GL_MODULATE);
+ // Change polygon color to last saved
+ gl.glColor4f(r, g, b, a);
+ if (smoothingChanged) {
+ smoothingChanged = false;
+ if (smoothing) {
+ texture.setTexParameteri(GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_LINEAR);
+ if (mipmap) {
+ texture.setTexParameteri(GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_LINEAR_MIPMAP_LINEAR);
+ } else {
+ texture.setTexParameteri(GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_LINEAR);
+ }
+ } else {
+ texture.setTexParameteri(GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_NEAREST);
+ texture.setTexParameteri(GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_NEAREST);
+ }
+ }
+ }
+
+ private void endRendering(boolean ortho) {
+ GL2 gl = GLContext.getCurrentGL().getGL2();
+ Texture texture = getTexture();
+ texture.disable();
+ if (ortho) {
+ gl.glMatrixMode(GL2.GL_PROJECTION);
+ gl.glPopMatrix();
+ gl.glMatrixMode(GL2.GL_MODELVIEW);
+ gl.glPopMatrix();
+ gl.glMatrixMode(GL2.GL_TEXTURE);
+ gl.glPopMatrix();
+ }
+ gl.glPopAttrib();
+ }
+
+ private void init(int width, int height) {
+ GL2 gl = GLContext.getCurrentGL().getGL2();
+ // Discard previous BufferedImage if any
+ if (image != null) {
+ image.flush();
+ image = null;
+ }
+
+ // Infer the internal format if not an intensity texture
+ int internalFormat = (intensity ? GL2.GL_INTENSITY : 0);
+ int imageType =
+ (intensity ? BufferedImage.TYPE_BYTE_GRAY :
+ (alpha ? BufferedImage.TYPE_INT_ARGB_PRE : BufferedImage.TYPE_INT_RGB));
+ image = new BufferedImage(width, height, imageType);
+ // Always realllocate the TextureData associated with this
+ // BufferedImage; it's just a reference to the contents but we
+ // need it in order to update sub-regions of the underlying
+ // texture
+ textureData = new AWTTextureData(gl.getGLProfile(), internalFormat, 0, mipmap, image);
+ // For now, always reallocate the underlying OpenGL texture when
+ // the backing store size changes
+ mustReallocateTexture = true;
+ }
+
+ /** Synchronizes the specified region of the backing store down to
+ the underlying OpenGL texture. If {@link #markDirty markDirty}
+ is used instead to indicate the regions that are out of sync,
+ this method does not need to be called.
+
+ @param x the x coordinate (in Java 2D coordinates -- relative to
+ upper left) of the region to update
+ @param y the y coordinate (in Java 2D coordinates -- relative to
+ upper left) of the region to update
+ @param width the width of the region to update
+ @param height the height of the region to update
+
+ @throws GLException If an OpenGL context is not current when this method is called
+ */
+ private void sync(int x, int y, int width, int height) throws GLException {
+ // Force allocation if necessary
+ boolean canSkipUpdate = ensureTexture();
+
+ if (!canSkipUpdate) {
+ // Update specified region.
+ // NOTE that because BufferedImage-based TextureDatas now don't
+ // do anything to their contents, the coordinate systems for
+ // OpenGL and Java 2D actually line up correctly for
+ // updateSubImage calls, so we don't need to do any argument
+ // conversion here (i.e., flipping the Y coordinate).
+ texture.updateSubImage(textureData, 0, x, y, x, y, width, height);
+ }
+ }
+
+ // Returns true if the texture was newly allocated, false if not
+ private boolean ensureTexture() {
+ if (mustReallocateTexture) {
+ if (texture != null) {
+ texture.dispose();
+ texture = null;
+ }
+ mustReallocateTexture = false;
+ }
+
+ if (texture == null) {
+ texture = TextureIO.newTexture(textureData);
+ if (mipmap && !texture.isUsingAutoMipmapGeneration()) {
+ // Only try this once
+ texture.dispose();
+ mipmap = false;
+ textureData.setMipmap(false);
+ texture = TextureIO.newTexture(textureData);
+ }
+
+ if (!smoothing) {
+ // The TextureIO classes default to GL_LINEAR filtering
+ texture.setTexParameteri(GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_NEAREST);
+ texture.setTexParameteri(GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_NEAREST);
+ }
+ return true;
+ }
+
+ return false;
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/gl2/BitmapCharRec.java b/src/jogl/classes/com/jogamp/opengl/util/gl2/BitmapCharRec.java
new file mode 100644
index 000000000..34685e1b2
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/gl2/BitmapCharRec.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.util.gl2;
+
+/* Copyright (c) Mark J. Kilgard, 1994, 1998. */
+
+/* This program is freely distributable without licensing fees
+ and is provided without guarantee or warrantee expressed or
+ implied. This program is -not- in the public domain. */
+
+class BitmapCharRec {
+ public int width;
+ public int height;
+ public float xorig;
+ public float yorig;
+ public float advance;
+ public byte[] bitmap;
+
+ public BitmapCharRec(int width,
+ int height,
+ float xorig,
+ float yorig,
+ float advance,
+ byte[] bitmap) {
+ this.width = width;
+ this.height = height;
+ this.xorig = xorig;
+ this.yorig = yorig;
+ this.advance = advance;
+ this.bitmap = bitmap;
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/gl2/BitmapFontRec.java b/src/jogl/classes/com/jogamp/opengl/util/gl2/BitmapFontRec.java
new file mode 100644
index 000000000..18f7d3b28
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/gl2/BitmapFontRec.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.util.gl2;
+
+/* Copyright (c) Mark J. Kilgard, 1994, 1998. */
+
+/* This program is freely distributable without licensing fees
+ and is provided without guarantee or warrantee expressed or
+ implied. This program is -not- in the public domain. */
+
+class BitmapFontRec {
+ public String name;
+ public int num_chars;
+ public int first;
+ public BitmapCharRec[] ch;
+
+ public BitmapFontRec(String name,
+ int num_chars,
+ int first,
+ BitmapCharRec[] ch) {
+ this.name = name;
+ this.num_chars = num_chars;
+ this.first = first;
+ this.ch = ch;
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/gl2/CoordRec.java b/src/jogl/classes/com/jogamp/opengl/util/gl2/CoordRec.java
new file mode 100644
index 000000000..9ad95ec03
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/gl2/CoordRec.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.util.gl2;
+
+/* Copyright (c) Mark J. Kilgard, 1994, 1998. */
+
+/* This program is freely distributable without licensing fees
+ and is provided without guarantee or warrantee expressed or
+ implied. This program is -not- in the public domain. */
+
+class CoordRec {
+ public float x;
+ public float y;
+
+ public CoordRec(float x, float y) {
+ this.x = x;
+ this.y = y;
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUT.java b/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUT.java
new file mode 100644
index 000000000..8befc13ba
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUT.java
@@ -0,0 +1,1342 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.util.gl2;
+
+import javax.media.opengl.*;
+import javax.media.opengl.glu.*;
+import javax.media.opengl.glu.gl2.*;
+
+/** Subset of the routines provided by the GLUT interface. Note the
+ signatures of many of the methods are necessarily different than
+ the corresponding C version. A GLUT object must only be used from
+ one particular thread at a time.
+ * Puts this ShaderState to to the thread local storage (TLS),
+ * if on
is true
.
+ *
+ * @see javax.media.opengl.glsl.ShaderState#glUseProgram(GL2ES2, boolean)
+ * @see javax.media.opengl.glsl.ShaderState#getCurrent()
+ */
+ public synchronized void glUseProgram(GL2ES2 gl, boolean on) {
+ if(on) {
+ if(null!=shaderProgram) {
+ shaderProgram.glUseProgram(gl, true);
+ } else {
+ throw new GLException("No program is attached");
+ }
+ // update the current ShaderState to the TLS ..
+ gl.getContext().putAttachedObject(ShaderState.class.getName(), this);
+ } else if(null!=shaderProgram) {
+ shaderProgram.glUseProgram(gl, false);
+ }
+ }
+
+ public boolean linked() {
+ return (null!=shaderProgram)?shaderProgram.linked():false;
+ }
+
+ public boolean inUse() {
+ return (null!=shaderProgram)?shaderProgram.inUse():false;
+ }
+
+ /**
+ * Attach or switch a shader program
+ *
+ * Attaching a shader program the first time,
+ * as well as switching to another program on the fly,
+ * while managing all attribute and uniform data.
+ */
+ public synchronized void attachShaderProgram(GL2ES2 gl, ShaderProgram prog) {
+ boolean prgInUse = false; // earmarked state
+
+ if(DEBUG) {
+ int curId = (null!=shaderProgram)?shaderProgram.id():-1;
+ int newId = (null!=prog)?prog.id():-1;
+ System.err.println("Info: attachShaderProgram: "+curId+" -> "+newId+"\n\t"+shaderProgram+"\n\t"+prog);
+ if(verbose) {
+ Throwable tX = new Throwable("Info: attachShaderProgram: Trace");
+ tX.printStackTrace();
+ }
+ }
+ if(null!=shaderProgram) {
+ if(shaderProgram.equals(prog)) {
+ // nothing to do ..
+ if(DEBUG) {
+ System.err.println("Info: attachShaderProgram: NOP: equal id: "+shaderProgram.id());
+ }
+ return;
+ }
+ prgInUse = shaderProgram.inUse();
+ shaderProgram.glUseProgram(gl, false);
+ }
+
+ // register new one
+ shaderProgram = prog;
+
+ if(null!=shaderProgram) {
+ // reinstall all data ..
+ shaderProgram.glUseProgram(gl, true);
+ glResetAllVertexAttributes(gl);
+ glResetAllUniforms(gl);
+ if(!prgInUse) {
+ shaderProgram.glUseProgram(gl, false);
+ }
+ }
+ if(DEBUG) {
+ System.err.println("Info: attachShaderProgram: END");
+ }
+ }
+
+ public ShaderProgram shaderProgram() { return shaderProgram; }
+
+ /**
+ * Calls release(gl, true, true)
+ *
+ * @see #glReleaseAllVertexAttributes
+ * @see #glReleaseAllUniforms
+ * @see #release(GL2ES2, boolean, boolean)
+ */
+ public synchronized void destroy(GL2ES2 gl) {
+ release(gl, true, true);
+ }
+
+ /**
+ * Calls release(gl, false, false)
+ *
+ * @see #glReleaseAllVertexAttributes
+ * @see #glReleaseAllUniforms
+ * @see #release(GL2ES2, boolean, boolean)
+ */
+ public synchronized void releaseAllData(GL2ES2 gl) {
+ release(gl, false, false);
+ }
+
+ /**
+ * @see #glReleaseAllVertexAttributes
+ * @see #glReleaseAllUniforms
+ * @see ShaderProgram#release(GL2ES2, boolean)
+ */
+ public synchronized void release(GL2ES2 gl, boolean releaseProgramToo, boolean releaseShaderToo) {
+ boolean prgInUse = false;
+ if(null!=shaderProgram) {
+ prgInUse = shaderProgram.inUse();
+ if(!prgInUse) {
+ shaderProgram.glUseProgram(gl, true);
+ }
+ }
+ glReleaseAllVertexAttributes(gl);
+ glReleaseAllUniforms(gl);
+ if(null!=shaderProgram) {
+ if(releaseProgramToo) {
+ shaderProgram.release(gl, releaseShaderToo);
+ } else if(!prgInUse) {
+ shaderProgram.glUseProgram(gl, false);
+ }
+ }
+ }
+
+ //
+ // Shader attribute handling
+ //
+
+ /**
+ * Binds an attribute to the shader.
+ * This must be done before the program is linked !
+ * n name - 1 idx, where name is a uniq key
+ *
+ * @throws GLException is the program is already linked
+ *
+ * @see #glBindAttribLocation
+ * @see javax.media.opengl.GL2ES2#glBindAttribLocation
+ * @see #glGetAttribLocation
+ * @see javax.media.opengl.GL2ES2#glGetAttribLocation
+ * @see #getAttribLocation
+ * @see #glReplaceShader
+ */
+ public void glBindAttribLocation(GL2ES2 gl, int index, String name) {
+ if(null==shaderProgram) throw new GLException("No program is attached");
+ if(shaderProgram.linked()) throw new GLException("Program is already linked");
+ Integer idx = new Integer(index);
+ if(!attribMap2Idx.containsKey(name)) {
+ attribMap2Idx.put(name, idx);
+ gl.glBindAttribLocation(shaderProgram.program(), index, name);
+ }
+ }
+
+ /**
+ * Gets the index of a shader attribute.
+ * This must be done after the program is linked !
+ *
+ * @return -1 if there is no such attribute available,
+ * otherwise >= 0
+ * @throws GLException is the program is not linked
+ *
+ * @see #glBindAttribLocation
+ * @see javax.media.opengl.GL2ES2#glBindAttribLocation
+ * @see #glGetAttribLocation
+ * @see javax.media.opengl.GL2ES2#glGetAttribLocation
+ * @see #getAttribLocation
+ * @see #glReplaceShader
+ */
+ public int glGetAttribLocation(GL2ES2 gl, String name) {
+ if(!shaderProgram.linked()) throw new GLException("Program is not linked");
+ int index = getAttribLocation(name);
+ if(0>index) {
+ index = gl.glGetAttribLocation(shaderProgram.program(), name);
+ if(0<=index) {
+ Integer idx = new Integer(index);
+ attribMap2Idx.put(name, idx);
+ if(DEBUG) {
+ System.err.println("Info: glGetAttribLocation: "+name+", loc: "+index);
+ }
+ } else if(verbose) {
+ Throwable tX = new Throwable("Info: glGetAttribLocation failed, no location for: "+name+", index: "+index);
+ tX.printStackTrace();
+ }
+ }
+ return index;
+ }
+
+ protected int getAttribLocation(String name) {
+ Integer idx = (Integer) attribMap2Idx.get(name);
+ return (null!=idx)?idx.intValue():-1;
+ }
+
+
+ //
+ // Enabled Vertex Arrays and its data
+ //
+
+ /**
+ * Enable a vertex attribute array
+ *
+ * Even if the attribute is not found in the current shader,
+ * it is stored in this state.
+ *
+ * @returns false, if the name is not found, otherwise true
+ *
+ * @throws GLException if the program is not in use
+ *
+ * @see #glEnableVertexAttribArray
+ * @see #glDisableVertexAttribArray
+ * @see #glVertexAttribPointer
+ * @see #getVertexAttributePointer
+ * @see #glReleaseAllVertexAttributes
+ * @see #glResetAllVertexAttributes
+ * @see #glReplaceShader
+ */
+ public boolean glEnableVertexAttribArray(GL2ES2 gl, String name) {
+ if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
+ enabledVertexAttribArraySet.add(name);
+ int index = glGetAttribLocation(gl, name);
+ if(0>index) {
+ if(verbose) {
+ Throwable tX = new Throwable("Info: glEnableVertexAttribArray failed, no index for: "+name);
+ tX.printStackTrace();
+ }
+ return false;
+ }
+ if(DEBUG) {
+ System.err.println("Info: glEnableVertexAttribArray: "+name+", loc: "+index);
+ }
+ gl.glEnableVertexAttribArray(index);
+ return true;
+ }
+
+ public boolean isVertexAttribArrayEnabled(String name) {
+ if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
+ return enabledVertexAttribArraySet.contains(name);
+ }
+
+ /**
+ * Disables a vertex attribute array
+ *
+ * Even if the attribute is not found in the current shader,
+ * it is removed from this state.
+ *
+ * @returns false, if the name is not found, otherwise true
+ *
+ * @throws GLException if the program is not in use
+ *
+ * @see #glEnableVertexAttribArray
+ * @see #glDisableVertexAttribArray
+ * @see #glVertexAttribPointer
+ * @see #getVertexAttributePointer
+ * @see #glReleaseAllVertexAttributes
+ * @see #glResetAllVertexAttributes
+ * @see #glReplaceShader
+ */
+ public boolean glDisableVertexAttribArray(GL2ES2 gl, String name) {
+ if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
+ enabledVertexAttribArraySet.remove(name);
+ int index = glGetAttribLocation(gl, name);
+ if(0>index) {
+ if(verbose) {
+ Throwable tX = new Throwable("Info: glDisableVertexAttribArray failed, no index for: "+name);
+ tX.printStackTrace();
+ }
+ return false;
+ }
+ if(DEBUG) {
+ System.err.println("Info: glDisableVertexAttribArray: "+name);
+ }
+ gl.glDisableVertexAttribArray(index);
+ return true;
+ }
+
+ /**
+ * Set the vertex attribute data.
+ * Enable the attribute, if it is not enabled yet.
+ *
+ * Even if the attribute is not found in the current shader,
+ * it is stored in this state.
+ *
+ * @param data the GLArrayData's name must match the attributes one,
+ * it's index will be set with the attribute's location,
+ * if found.
+ *
+ * @returns false, if the name is not found, otherwise true
+ *
+ * @throws GLException if the program is not in use
+ *
+ * @see #glEnableVertexAttribArray
+ * @see #glDisableVertexAttribArray
+ * @see #glVertexAttribPointer
+ * @see #getVertexAttributePointer
+ * @see #glReleaseAllVertexAttributes
+ * @see #glResetAllVertexAttributes
+ * @see #glReplaceShader
+ */
+ public boolean glVertexAttribPointer(GL2ES2 gl, GLArrayData data) {
+ if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
+ if(!enabledVertexAttribArraySet.contains(data.getName())) {
+ if(!glEnableVertexAttribArray(gl, data.getName())) {
+ if(verbose) {
+ Throwable tX = new Throwable("Info: glVertexAttribPointer: couldn't enable: "+data);
+ tX.printStackTrace();
+ }
+ }
+ }
+ int index = getAttribLocation(data.getName());
+ if(0>index) {
+ if(verbose) {
+ Throwable tX = new Throwable("Info: glVertexAttribPointer failed, no index for: "+data);
+ tX.printStackTrace();
+ }
+ }
+ data.setLocation(index);
+ vertexAttribMap2Data.put(data.getName(), data);
+ if(0<=index) {
+ // only pass the data, if the attribute exists in the current shader
+ if(DEBUG) {
+ System.err.println("Info: glVertexAttribPointer: "+data);
+ }
+ gl.glVertexAttribPointer(data);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Get the vertex attribute data, previously set.
+ *
+ * @returns the GLArrayData object, null if not previously set.
+ *
+ * @see #glEnableVertexAttribArray
+ * @see #glDisableVertexAttribArray
+ * @see #glVertexAttribPointer
+ * @see #getVertexAttributePointer
+ * @see #glReleaseAllVertexAttributes
+ * @see #glResetAllVertexAttributes
+ * @see #glReplaceShader
+ */
+ public GLArrayData getVertexAttribPointer(String name) {
+ return (GLArrayData) vertexAttribMap2Data.get(name);
+ }
+
+ /**
+ * Releases all mapped vertex attribute data,
+ * disables all enabled attributes and loses all indices
+ *
+ * @throws GLException is the program is not in use but the shaderProgram is set
+ *
+ * @see #glEnableVertexAttribArray
+ * @see #glDisableVertexAttribArray
+ * @see #glVertexAttribPointer
+ * @see #getVertexAttributePointer
+ * @see #glReleaseAllVertexAttributes
+ * @see #glResetAllVertexAttributes
+ * @see #glResetAllVertexAttributes
+ * @see #glReplaceShader
+ */
+ public void glReleaseAllVertexAttributes(GL2ES2 gl) {
+ if(null!=shaderProgram) {
+ if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
+ for(Iterator iter = vertexAttribMap2Data.keySet().iterator(); iter.hasNext(); ) {
+ if(!glDisableVertexAttribArray(gl, (String) iter.next())) {
+ throw new GLException("Internal Error: mapped vertex attribute couldn't be disabled");
+ }
+ }
+ for(Iterator iter = enabledVertexAttribArraySet.iterator(); iter.hasNext(); ) {
+ if(!glDisableVertexAttribArray(gl, (String) iter.next())) {
+ throw new GLException("Internal Error: prev enabled vertex attribute couldn't be disabled");
+ }
+ }
+ }
+ vertexAttribMap2Data.clear();
+ enabledVertexAttribArraySet.clear();
+ attribMap2Idx.clear();
+ }
+
+ /**
+ * Disables all vertex attribute arrays.
+ *
+ * Their enabled stated will be removed from this state only
+ * if 'removeFromState' is true.
+ *
+ * This method purpose is more for debugging.
+ *
+ * @throws GLException is the program is not in use but the shaderProgram is set
+ *
+ * @see #glEnableVertexAttribArray
+ * @see #glDisableVertexAttribArray
+ * @see #glVertexAttribPointer
+ * @see #getVertexAttributePointer
+ * @see #glReleaseAllVertexAttributes
+ * @see #glResetAllVertexAttributes
+ * @see #glResetAllVertexAttributes
+ * @see #glReplaceShader
+ */
+ public void glDisableAllVertexAttributeArrays(GL2ES2 gl, boolean removeFromState) {
+ if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
+
+ for(Iterator iter = enabledVertexAttribArraySet.iterator(); iter.hasNext(); ) {
+ String name = (String) iter.next();
+ if(removeFromState) {
+ enabledVertexAttribArraySet.remove(name);
+ }
+ int index = glGetAttribLocation(gl, name);
+ if(0<=index) {
+ gl.glDisableVertexAttribArray(index);
+ }
+ }
+ }
+
+ /**
+ * Reset all previously enabled mapped vertex attribute data,
+ * incl enabling them
+ *
+ * @throws GLException is the program is not in use
+ *
+ * @see #glEnableVertexAttribArray
+ * @see #glDisableVertexAttribArray
+ * @see #glVertexAttribPointer
+ * @see #getVertexAttributePointer
+ * @see #glReleaseAllVertexAttributes
+ * @see #glResetAllVertexAttributes
+ * @see #glReplaceShader
+ */
+ public void glResetAllVertexAttributes(GL2ES2 gl) {
+ if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
+ attribMap2Idx.clear();
+
+ /**
+ *
+ for(Iterator iter = enabledVertexAttribArraySet.iterator(); iter.hasNext(); ) {
+ glEnableVertexAttribArray(gl, (String) iter.next());
+ }
+ for(Iterator iter = vertexAttribMap2Data.values().iterator(); iter.hasNext(); ) {
+ GLArrayData data = (GLArrayData) iter.next();
+
+ ...
+ } */
+
+ for(Iterator iter = enabledVertexAttribArraySet.iterator(); iter.hasNext(); ) {
+ // get new location ..
+ String name = (String) iter.next();
+ int loc = glGetAttribLocation(gl, name);
+
+ // get & update data ..
+ GLArrayData data = getVertexAttribPointer(name);
+ data.setLocation(loc);
+ vertexAttribMap2Data.put(name, data);
+
+ if(0>loc) {
+ // not used in shader
+ continue;
+ }
+
+ // enable attrib, VBO and pass location/data
+ gl.glEnableVertexAttribArray(loc);
+
+ if( data.isVBO() ) {
+ gl.glBindBuffer(GL.GL_ARRAY_BUFFER, data.getVBOName());
+ }
+
+ gl.glVertexAttribPointer(data);
+ }
+ }
+
+ //
+ // Shader Uniform handling
+ //
+
+ /**
+ * Gets the index of a shader uniform.
+ * This must be done when the program is in use !
+ *
+ * @return -1 if there is no such attribute available,
+ * otherwise >= 0
+
+ * @throws GLException is the program is not linked
+ *
+ * @see #glGetUniformLocation
+ * @see javax.media.opengl.GL2ES2#glGetUniformLocation
+ * @see #getUniformLocation
+ * @see #glReplaceShader
+ */
+ protected int glGetUniformLocation(GL2ES2 gl, String name) {
+ if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
+ int index = getUniformLocation(name);
+ if(0>index) {
+ index = gl.glGetUniformLocation(shaderProgram.program(), name);
+ if(0<=index) {
+ Integer idx = new Integer(index);
+ uniformMap2Idx.put(name, idx);
+ } else if(verbose) {
+ Throwable tX = new Throwable("Info: glUniform failed, no location for: "+name+", index: "+index);
+ tX.printStackTrace();
+ }
+ }
+ return index;
+ }
+
+ protected int getUniformLocation(String name) {
+ Integer idx = (Integer) uniformMap2Idx.get(name);
+ return (null!=idx)?idx.intValue():-1;
+ }
+
+ /**
+ * Set the uniform data.
+ *
+ * Even if the uniform is not found in the current shader,
+ * it is stored in this state.
+ *
+ * @param data the GLUniforms's name must match the uniform one,
+ * it's index will be set with the uniforms's location,
+ * if found.
+ *
+ *
+ * @returns false, if the name is not found, otherwise true
+ *
+ * @throws GLException if the program is not in use
+ *
+ * @see #glGetUniformLocation
+ * @see javax.media.opengl.GL2ES2#glGetUniformLocation
+ * @see #getUniformLocation
+ * @see #glReplaceShader
+ */
+ public boolean glUniform(GL2ES2 gl, GLUniformData data) {
+ if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
+ int location = glGetUniformLocation(gl, data.getName());
+ data.setLocation(location);
+ uniformMap2Data.put(data.getName(), data);
+ if(0<=location) {
+ // only pass the data, if the uniform exists in the current shader
+ if(DEBUG) {
+ System.err.println("Info: glUniform: "+data);
+ }
+ gl.glUniform(data);
+ }
+ return true;
+ }
+
+ /**
+ * Get the uniform data, previously set.
+ *
+ * @returns the GLUniformData object, null if not previously set.
+ */
+ public GLUniformData getUniform(String name) {
+ return (GLUniformData) uniformMap2Data.get(name);
+ }
+
+ /**
+ * Releases all mapped uniform data
+ * and loses all indices
+ *
+ * @throws GLException is the program is not in use
+ */
+ public void glReleaseAllUniforms(GL2ES2 gl) {
+ uniformMap2Data.clear();
+ uniformMap2Idx.clear();
+ }
+
+ /**
+ * Reset all previously mapped uniform data
+ *
+ * @throws GLException is the program is not in use
+ */
+ public void glResetAllUniforms(GL2ES2 gl) {
+ if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
+ uniformMap2Idx.clear();
+ for(Iterator iter = uniformMap2Data.values().iterator(); iter.hasNext(); ) {
+ glUniform(gl, (GLUniformData) iter.next());
+ }
+ }
+
+ public String toString() {
+ StringBuffer buf = new StringBuffer();
+ buf.append("ShaderState[");
+ buf.append(shaderProgram.toString());
+ buf.append(",EnabledStates: [");
+ for(Iterator iter = enabledVertexAttribArraySet.iterator(); iter.hasNext(); ) {
+ buf.append("\n ");
+ buf.append((String)iter.next());
+ }
+ buf.append("], [");
+ for(Iterator iter = vertexAttribMap2Data.values().iterator(); iter.hasNext(); ) {
+ GLArrayData data = (GLArrayData) iter.next();
+ if(data.getLocation()>=0) {
+ buf.append("\n ");
+ buf.append(data);
+ }
+ }
+ buf.append("], [");
+ for(Iterator iter=uniformMap2Data.values().iterator(); iter.hasNext(); ) {
+ GLUniformData data = (GLUniformData) iter.next();
+ if(data.getLocation()>=0) {
+ buf.append("\n ");
+ buf.append(data);
+ }
+ }
+ buf.append("]");
+ return buf.toString();
+ }
+
+ protected boolean verbose = false;
+ protected ShaderProgram shaderProgram=null;
+ protected HashMap attribMap2Idx = new HashMap();
+ protected HashSet enabledVertexAttribArraySet = new HashSet();
+ protected HashMap vertexAttribMap2Data = new HashMap();
+ protected HashMap uniformMap2Idx = new HashMap();
+ protected HashMap uniformMap2Data = new HashMap();
+
+}
+
diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java
new file mode 100644
index 000000000..21f359f52
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java
@@ -0,0 +1,476 @@
+/*
+ * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.opengl.util.glsl;
+
+import java.io.PrintStream;
+import java.nio.*;
+import java.util.*;
+
+import javax.media.opengl.*;
+
+public class ShaderUtil {
+ static abstract class Impl {
+ public abstract String getShaderInfoLog(GL gl, int shaderObj);
+ public abstract String getProgramInfoLog(GL gl, int programObj);
+ public abstract boolean isShaderStatusValid(GL gl, int shaderObj, int name);
+ public abstract boolean isShaderStatusValid(GL gl, int shaderObj, int name, PrintStream verboseOut);
+ public abstract boolean isShaderStatusValid(GL gl, IntBuffer shaders, int name);
+ public abstract boolean isShaderStatusValid(GL gl, IntBuffer shaders, int name, PrintStream verboseOut);
+ public abstract boolean isProgramStatusValid(GL gl, int programObj, int name);
+ public abstract boolean isProgramValid(GL gl, int programObj);
+ public abstract boolean isProgramValid(GL gl, int programObj, PrintStream verboseOut);
+ public abstract void createShader(GL gl, int type, IntBuffer shaders);
+ public abstract Set getShaderBinaryFormats(GL gl);
+ public abstract boolean isShaderCompilerAvailable(GL gl);
+ public abstract void shaderSource(GL gl, int shader, java.lang.String[] source);
+ public abstract void shaderSource(GL gl, IntBuffer shaders, java.lang.String[][] sources);
+ public abstract void shaderBinary(GL gl, IntBuffer shaders, int binFormat, java.nio.Buffer bin);
+ public abstract void compileShader(GL gl, IntBuffer shaders);
+ public abstract void attachShader(GL gl, int program, IntBuffer shaders);
+ public abstract void detachShader(GL gl, int program, IntBuffer shaders);
+ public abstract void deleteShader(GL gl, IntBuffer shaders);
+
+ public abstract boolean createAndLoadShader(GL gl, IntBuffer shader, int shaderType,
+ int binFormat, java.nio.Buffer bin,
+ PrintStream verboseOut);
+
+ public abstract boolean createAndCompileShader(GL gl, IntBuffer shader, int shaderType,
+ java.lang.String[][] sources,
+ PrintStream verboseOut);
+ }
+
+ static class GL2ES2Impl extends Impl {
+ public String getShaderInfoLog(GL _gl, int shaderObj) {
+ GL2ES2 gl = _gl.getGL2ES2();
+ int[] infoLogLength=new int[1];
+ gl.glGetShaderiv(shaderObj, gl.GL_INFO_LOG_LENGTH, infoLogLength, 0);
+
+ if(infoLogLength[0]==0) {
+ return "(no info log)";
+ }
+ int[] charsWritten=new int[1];
+ byte[] infoLogBytes = new byte[infoLogLength[0]];
+ gl.glGetShaderInfoLog(shaderObj, infoLogLength[0], charsWritten, 0, infoLogBytes, 0);
+
+ return new String(infoLogBytes, 0, charsWritten[0]);
+ }
+
+ public String getProgramInfoLog(GL _gl, int programObj) {
+ GL2ES2 gl = _gl.getGL2ES2();
+ int[] infoLogLength=new int[1];
+ gl.glGetProgramiv(programObj, gl.GL_INFO_LOG_LENGTH, infoLogLength, 0);
+
+ if(infoLogLength[0]==0) {
+ return "(no info log)";
+ }
+ int[] charsWritten=new int[1];
+ byte[] infoLogBytes = new byte[infoLogLength[0]];
+ gl.glGetProgramInfoLog(programObj, infoLogLength[0], charsWritten, 0, infoLogBytes, 0);
+
+ return new String(infoLogBytes, 0, charsWritten[0]);
+ }
+
+ public boolean isShaderStatusValid(GL _gl, int shaderObj, int name) {
+ return isShaderStatusValid(_gl, shaderObj, name, null);
+ }
+
+ public boolean isShaderStatusValid(GL _gl, int shaderObj, int name, PrintStream verboseOut) {
+ GL2ES2 gl = _gl.getGL2ES2();
+ int[] ires = new int[1];
+ gl.glGetShaderiv(shaderObj, name, ires, 0);
+
+ boolean res = ires[0]==1;
+ if(!res && null!=verboseOut) {
+ verboseOut.println("Shader status invalid: "+ getShaderInfoLog(gl, shaderObj));
+ }
+ return res;
+ }
+
+ public boolean isShaderStatusValid(GL _gl, IntBuffer shaders, int name) {
+ return isShaderStatusValid(_gl, shaders, name, null);
+ }
+
+ public boolean isShaderStatusValid(GL _gl, IntBuffer shaders, int name, PrintStream verboseOut) {
+ boolean res = true;
+ for (int i = shaders.position(); i < shaders.limit(); i++) {
+ res = isShaderStatusValid(_gl, shaders.get(i), name, verboseOut) && res;
+ }
+ return res;
+ }
+
+ public boolean isProgramStatusValid(GL _gl, int programObj, int name) {
+ GL2ES2 gl = _gl.getGL2ES2();
+ int[] ires = new int[1];
+ gl.glGetProgramiv(programObj, name, ires, 0);
+
+ return ires[0]==1;
+ }
+
+ public boolean isProgramValid(GL _gl, int programObj) {
+ return isProgramValid(_gl, programObj, null);
+ }
+
+ public boolean isProgramValid(GL _gl, int programObj, PrintStream verboseOut) {
+ GL2ES2 gl = _gl.getGL2ES2();
+ int[] ires = new int[1];
+ if(!gl.glIsProgram(programObj)) {
+ if(null!=verboseOut) {
+ verboseOut.println("Program name invalid: "+programObj);
+ }
+ return false;
+ }
+ if(!isProgramStatusValid(gl, programObj, gl.GL_LINK_STATUS)) {
+ if(null!=verboseOut) {
+ verboseOut.println("Program link failed: "+programObj+"\n\t"+ getProgramInfoLog(gl, programObj));
+ }
+ return false;
+ }
+ if ( !gl.isGLES2() || isShaderCompilerAvailable(gl) ) {
+ // failed on APX2500 (ES2.0, no compiler) for valid programs
+ gl.glValidateProgram(programObj);
+ if(!isProgramStatusValid(gl, programObj, gl.GL_VALIDATE_STATUS)) {
+ if(null!=verboseOut) {
+ verboseOut.println("Program validation failed: "+programObj+"\n\t"+ getProgramInfoLog(gl, programObj));
+ }
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public void createShader(GL _gl, int type, IntBuffer shaders) {
+ GL2ES2 gl = _gl.getGL2ES2();
+ for (int i = shaders.position(); i < shaders.limit(); i++) {
+ shaders.put(i, gl.glCreateShader(type));
+ }
+ }
+
+ private Boolean shaderCompilerAvailable = null;
+ private Set shaderBinaryFormats = null;
+
+ public Set getShaderBinaryFormats(GL _gl) {
+ GL2ES2 gl = _gl.getGL2ES2();
+ if(null==shaderBinaryFormats) {
+ if(gl.getContext()!=GLContext.getCurrent()) {
+ return new HashSet(0); // bail out
+ }
+
+ int[] param = new int[1];
+ shaderBinaryFormats = new HashSet();
+
+ if (gl.isGLES2()) {
+ gl.glGetIntegerv(GL2ES2.GL_NUM_SHADER_BINARY_FORMATS, param, 0);
+ int numFormats = param[0];
+ if(numFormats>0) {
+ int[] formats = new int[numFormats];
+ gl.glGetIntegerv(GL2ES2.GL_SHADER_BINARY_FORMATS, formats, 0);
+ for(int i=0; i
When creating an OpenGL texture object, the Texture class will
+ * attempt to leverage the GL_ARB_texture_non_power_of_two
+ * and GL_ARB_texture_rectangle
+ * extensions (in that order) whenever possible. If neither extension
+ * is available, the Texture class will simply upload a non-pow2-sized
+ * image into a standard pow2-sized texture (without any special
+ * scaling). Since the choice of extension (or whether one is used at
+ * all) depends on the user's machine configuration, developers are
+ * recommended to use {@link #getImageTexCoords} and {@link
+ * #getSubImageTexCoords}, as those methods will calculate the
+ * appropriate texture coordinates for the situation.
+ *
+ * GL_REPEAT
) are not legal when the GL_ARB_texture_rectangle
+ * extension is in use. Another issue to be aware of is that in the
+ * default pow2 scenario, if the original image does not have pow2
+ * dimensions, then wrapping may not work as one might expect since
+ * the image does not extend to the edges of the pow2 texture. If
+ * texture wrapping is important, it is recommended to use only
+ * pow2-sized images with the Texture class.
+ *
+ *
For best performance, try to avoid calling {@link #enable} /
+ * {@link #bind} / {@link #disable} any more than necessary. For
+ * example, applications using many Texture objects in the same scene
+ * may want to reduce the number of calls to both {@link #enable} and
+ * {@link #disable}. To do this it is necessary to call {@link
+ * #getTarget} to make sure the OpenGL texture target is the same for
+ * all of the Texture objects in use; non-power-of-two textures using
+ * the GL_ARB_texture_rectangle extension use a different target than
+ * power-of-two textures using the GL_TEXTURE_2D target. Note that
+ * when switching between textures it is necessary to call {@link
+ * #bind}, but when drawing many triangles all using the same texture,
+ * for best performance only one call to {@link #bind} should be made.
+ *
+ *
The mathematically correct way to perform blending in OpenGL
+ * (with the SrcOver "source over destination" mode, or any other
+ * Porter-Duff rule) is to use "premultiplied color components", which
+ * means the R/G/ B color components have already been multiplied by
+ * the alpha value. To make things easier for developers, the Texture
+ * class will automatically convert non-premultiplied image data into
+ * premultiplied data when storing it into an OpenGL texture. As a
+ * result, it is important to use the correct blending function; for
+ * example, the SrcOver rule is expressed as:
+
+ gl.glBlendFunc(GL.GL_ONE, GL.GL_ONE_MINUS_SRC_ALPHA);
+
+ * Also, when using a texture function like GL_MODULATE
where
+ * the current color plays a role, it is important to remember to make
+ * sure that the color is specified in a premultiplied form, for
+ * example:
+
+ float a = ...;
+ float r = r * a;
+ float g = g * a;
+ float b = b * a;
+ gl.glColor4f(r, g, b, a);
+
+ *
+ * For reference, here is a list of the Porter-Duff compositing rules
+ * and the associated OpenGL blend functions (source and destination
+ * factors) to use in the face of premultiplied alpha:
+ *
+
+
+ Rule Source Dest
+ Clear GL_ZERO GL_ZERO
+ Src GL_ONE GL_ZERO
+ SrcOver GL_ONE GL_ONE_MINUS_SRC_ALPHA
+ DstOver GL_ONE_MINUS_DST_ALPHA GL_ONE
+ SrcIn GL_DST_ALPHA GL_ZERO
+ DstIn GL_ZERO GL_SRC_ALPHA
+ SrcOut GL_ONE_MINUS_DST_ALPHA GL_ZERO
+ DstOut GL_ZERO GL_ONE_MINUS_SRC_ALPHA
+ Dst GL_ZERO GL_ONE
+ SrcAtop GL_DST_ALPHA GL_ONE_MINUS_SRC_ALPHA
+ DstAtop GL_ONE_MINUS_DST_ALPHA GL_SRC_ALPHA
+ AlphaXor GL_ONE_MINUS_DST_ALPHA GL_ONE_MINUS_SRC_ALPHA
+
+ gl.glEnable(texture.getTarget());
+
+ *
+ * See the performance tips above for hints
+ * on how to maximize performance when using many Texture objects.
+ *
+ * @throws GLException if no OpenGL context was current or if any
+ * OpenGL-related errors occurred
+ */
+ public void enable() throws GLException {
+ GLContext.getCurrentGL().glEnable(target);
+ }
+
+ /**
+ * Disables this texture's target (e.g., GL_TEXTURE_2D) in the
+ * current GL context's state. This method is a shorthand equivalent
+ * of the following OpenGL code:
+
+ gl.glDisable(texture.getTarget());
+
+ *
+ * See the performance tips above for hints
+ * on how to maximize performance when using many Texture objects.
+ *
+ * @throws GLException if no OpenGL context was current or if any
+ * OpenGL-related errors occurred
+ */
+ public void disable() throws GLException {
+ GLContext.getCurrentGL().glDisable(target);
+ }
+
+ /**
+ * Binds this texture to the current GL context. This method is a
+ * shorthand equivalent of the following OpenGL code:
+
+ gl.glBindTexture(texture.getTarget(), texture.getTextureObject());
+
+ *
+ * See the performance tips above for hints
+ * on how to maximize performance when using many Texture objects.
+ *
+ * @throws GLException if no OpenGL context was current or if any
+ * OpenGL-related errors occurred
+ */
+ public void bind() throws GLException {
+ validateTexID(null, true);
+ GLContext.getCurrentGL().glBindTexture(target, texID);
+ }
+
+ /**
+ * Disposes the native resources used by this texture object.
+ *
+ * @throws GLException if no OpenGL context was current or if any
+ * OpenGL-related errors occurred
+ * @deprecated use destroy(GL)
+ */
+ public void dispose() throws GLException {
+ destroy(GLContext.getCurrentGL());
+ }
+
+ /**
+ * Disposes the native resources used by this texture object.
+ *
+ * @throws GLException if any OpenGL-related errors occurred
+ * @deprecated use destroy(GL)
+ */
+ public void dispose(GL gl) throws GLException {
+ destroy(gl);
+ }
+
+ /**
+ * Destroys the native resources used by this texture object.
+ *
+ * @throws GLException if any OpenGL-related errors occurred
+ */
+ public void destroy(GL gl) throws GLException {
+ if(0
+ *
+ * magic 0 - detect by file suffix (TextureIO compliant)
+ * magic 6 - PPM binary RGB
+ * magic 7 - PAM binary RGB or RGBA
+ *
+ */
+ public NetPbmTextureWriter(int magic) {
+ switch(magic) {
+ case 0:
+ case 6:
+ case 7:
+ break;
+ default:
+ throw new GLException("Unsupported magic: "+magic+", should be 0 (auto), 6 (PPM) or 7 (PAM)");
+ }
+ this.magic = magic;
+ }
+
+ public int getMagic() { return magic; }
+
+ public static final String PPM = "ppm";
+ public static final String PAM = "pam";
+
+ public String getSuffix() { return (magic==6)?PPM:PAM; }
+
+ public boolean write(File file,
+ TextureData data) throws IOException {
+
+ // file suffix selection
+ if (0==magic) {
+ if (PPM.equals(FileUtil.getFileSuffix(file))) {
+ magic = 6;
+ } else if (PAM.equals(FileUtil.getFileSuffix(file))) {
+ magic = 7;
+ } else {
+ return false;
+ }
+ }
+
+ int pixelFormat = data.getPixelFormat();
+ int pixelType = data.getPixelType();
+ if ((pixelFormat == GL.GL_RGB ||
+ pixelFormat == GL.GL_RGBA) &&
+ (pixelType == GL.GL_BYTE ||
+ pixelType == GL.GL_UNSIGNED_BYTE)) {
+
+ int comps = ( pixelFormat == GL.GL_RGBA ) ? 4 : 3 ;
+
+ if(magic==6 && comps==4) {
+ throw new IOException("NetPbmTextureWriter magic 6 (PPM) doesn't RGBA pixel format, use magic 7 (PAM)");
+ }
+
+ FileOutputStream fos = new FileOutputStream(file);
+
+ StringBuffer header = new StringBuffer();
+ header.append("P");
+ header.append(magic);
+ header.append("\n");
+ if(7==magic) {
+ header.append("WIDTH ");
+ }
+ header.append(data.getWidth());
+ if(7==magic) {
+ header.append("\nHEIGHT ");
+ } else {
+ header.append(" ");
+ }
+ header.append(data.getHeight());
+ if(7==magic) {
+ header.append("\nDEPTH ");
+ header.append(comps);
+ header.append("\nMAXVAL 255\nTUPLTYPE ");
+ if(pixelFormat == GL.GL_RGBA) {
+ header.append("RGB_ALPHA");
+ } else {
+ header.append("RGB");
+ }
+ header.append("\nENDHDR\n");
+ } else {
+ header.append("\n255\n");
+ }
+
+ fos.write(header.toString().getBytes());
+
+ ByteBuffer buf = (ByteBuffer) data.getBuffer();
+ if (buf == null) {
+ buf = (ByteBuffer) data.getMipmapData()[0];
+ }
+ buf.rewind();
+
+ byte[] bufArray = null;
+
+ try {
+ bufArray = buf.array();
+ } catch (Throwable t) {}
+ if(null==bufArray) {
+ bufArray = new byte[data.getWidth()*data.getHeight()*comps];
+ buf.get(bufArray);
+ buf.rewind();
+ }
+
+ fos.write(bufArray);
+ fos.close();
+
+ return true;
+ }
+
+ throw new IOException("NetPbmTextureWriter writer doesn't support this pixel format / type (only GL_RGB/A + bytes)");
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/SGIImage.java b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/SGIImage.java
new file mode 100755
index 000000000..bb5040a31
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/SGIImage.java
@@ -0,0 +1,670 @@
+/*
+ * Portions Copyright (c) 2005 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.util.texture.spi;
+
+import java.io.*;
+import javax.media.opengl.*;
+import com.jogamp.opengl.util.*;
+
+/** display()
are performed. After each drawable
- has been redrawn, a brief pause is performed to avoid swamping the
- CPU, unless {@link #setRunAsFastAsPossible} has been called. limit() - position()
) in the passed ByteBuffer into
- a newly-allocated direct ByteBuffer. The returned buffer will
- have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ByteBuffer copyByteBuffer(ByteBuffer orig) {
- ByteBuffer dest = newByteBuffer(orig.remaining());
- dest.put(orig);
- dest.rewind();
- return dest;
- }
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed FloatBuffer
- into a newly-allocated direct FloatBuffer. The returned buffer
- will have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static FloatBuffer copyFloatBuffer(FloatBuffer orig) {
- return copyFloatBufferAsByteBuffer(orig).asFloatBuffer();
- }
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed IntBuffer
- into a newly-allocated direct IntBuffer. The returned buffer
- will have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static IntBuffer copyIntBuffer(IntBuffer orig) {
- return copyIntBufferAsByteBuffer(orig).asIntBuffer();
- }
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed ShortBuffer
- into a newly-allocated direct ShortBuffer. The returned buffer
- will have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ShortBuffer copyShortBuffer(ShortBuffer orig) {
- return copyShortBufferAsByteBuffer(orig).asShortBuffer();
- }
-
- //----------------------------------------------------------------------
- // Copy routines (type-to-ByteBuffer)
- //
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed FloatBuffer
- into a newly-allocated direct ByteBuffer. The returned buffer
- will have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ByteBuffer copyFloatBufferAsByteBuffer(FloatBuffer orig) {
- ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_FLOAT);
- dest.asFloatBuffer().put(orig);
- dest.rewind();
- return dest;
- }
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed IntBuffer into
- a newly-allocated direct ByteBuffer. The returned buffer will
- have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ByteBuffer copyIntBufferAsByteBuffer(IntBuffer orig) {
- ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_INT);
- dest.asIntBuffer().put(orig);
- dest.rewind();
- return dest;
- }
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed ShortBuffer
- into a newly-allocated direct ByteBuffer. The returned buffer
- will have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ByteBuffer copyShortBufferAsByteBuffer(ShortBuffer orig) {
- ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_SHORT);
- dest.asShortBuffer().put(orig);
- dest.rewind();
- return dest;
- }
-
- //----------------------------------------------------------------------
- // Conversion routines
- //
-
- public final static float[] getFloatArray(double[] source) {
- int i=source.length;
- float[] dest = new float[i--];
- while(i>=0) { dest[i]=(float)source[i]; i--; }
- return dest;
- }
-
- public static ByteBuffer nativeOrder(ByteBuffer buf) {
- if (!isCDCFP) {
- try {
- if (byteOrderClass == null) {
- byteOrderClass = Class.forName("java.nio.ByteOrder");
- orderMethod = ByteBuffer.class.getMethod("order", new Class[] { byteOrderClass });
- Method nativeOrderMethod = byteOrderClass.getMethod("nativeOrder", null);
- nativeOrderObject = nativeOrderMethod.invoke(null, null);
- }
- } catch (Throwable t) {
- // Must be running on CDC / FP
- isCDCFP = true;
- }
-
- if (!isCDCFP) {
- try {
- orderMethod.invoke(buf, new Object[] { nativeOrderObject });
- } catch (Throwable t) {
- }
- }
- }
- return buf;
- }
-
- //----------------------------------------------------------------------
- // Convenient GL put methods with generic target Buffer
- //
- public static void put(Buffer dest, Buffer v) {
- if((dest instanceof ByteBuffer) && (v instanceof ByteBuffer)) {
- ((ByteBuffer)dest).put((ByteBuffer)v);
- } else if((dest instanceof ShortBuffer) && (v instanceof ShortBuffer)) {
- ((ShortBuffer)dest).put((ShortBuffer)v);
- } else if((dest instanceof IntBuffer) && (v instanceof IntBuffer)) {
- ((IntBuffer)dest).put((IntBuffer)v);
- } else if((dest instanceof FloatBuffer) && (v instanceof FloatBuffer)) {
- ((FloatBuffer)dest).put((FloatBuffer)v);
- } else {
- throw new GLException("Incompatible Buffer classes: dest = "+dest.getClass().getName() + ", src = " + v.getClass().getName());
- }
- }
-
- public static void putb(Buffer dest, byte v) {
- if(dest instanceof ByteBuffer) {
- ((ByteBuffer)dest).put(v);
- } else if(dest instanceof ShortBuffer) {
- ((ShortBuffer)dest).put((short)v);
- } else if(dest instanceof IntBuffer) {
- ((IntBuffer)dest).put((int)v);
- } else {
- throw new GLException("Byte doesn't match Buffer Class: "+dest);
- }
- }
-
- public static void puts(Buffer dest, short v) {
- if(dest instanceof ShortBuffer) {
- ((ShortBuffer)dest).put(v);
- } else if(dest instanceof IntBuffer) {
- ((IntBuffer)dest).put((int)v);
- } else {
- throw new GLException("Short doesn't match Buffer Class: "+dest);
- }
- }
-
- public static void puti(Buffer dest, int v) {
- if(dest instanceof IntBuffer) {
- ((IntBuffer)dest).put(v);
- } else {
- throw new GLException("Integer doesn't match Buffer Class: "+dest);
- }
- }
-
- public static void putx(Buffer dest, int v) {
- puti(dest, v);
- }
-
- public static void putf(Buffer dest, float v) {
- if(dest instanceof FloatBuffer) {
- ((FloatBuffer)dest).put(v);
- } else if(dest instanceof IntBuffer) {
- ((IntBuffer)dest).put(FixedPoint.toFixed(v));
- } else {
- throw new GLException("Float doesn't match Buffer Class: "+dest);
- }
- }
-
- //----------------------------------------------------------------------
- // Internals only below this point
- //
-
- // NOTE that this work must be done reflectively at the present time
- // because this code must compile and run correctly on both CDC/FP and J2SE
- private static boolean isCDCFP;
- private static Class byteOrderClass;
- private static Object nativeOrderObject;
- private static Method orderMethod;
-
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/BufferUtil.java.javase b/src/jogl/classes/com/sun/opengl/util/BufferUtil.java.javase
deleted file mode 100755
index d02f3d15f..000000000
--- a/src/jogl/classes/com/sun/opengl/util/BufferUtil.java.javase
+++ /dev/null
@@ -1,499 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.util;
-
-import javax.media.opengl.GL;
-import javax.media.opengl.GL2;
-import javax.media.opengl.GL2ES2;
-import javax.media.opengl.GLException;
-import javax.media.opengl.GLProfile;
-
-import java.nio.*;
-import java.util.*;
-
-import java.lang.reflect.*;
-
-/** Utility routines for dealing with direct buffers. */
-
-public class BufferUtil {
- public static final int SIZEOF_BYTE = 1;
- public static final int SIZEOF_SHORT = 2;
- public static final int SIZEOF_INT = 4;
- public static final int SIZEOF_FLOAT = 4;
- public static final int SIZEOF_LONG = 8;
- public static final int SIZEOF_DOUBLE = 8;
-
- public static final int sizeOfGLType(int glType) {
- switch (glType) {
- case GL.GL_UNSIGNED_BYTE:
- return SIZEOF_BYTE;
- case GL.GL_BYTE:
- return SIZEOF_BYTE;
- case GL.GL_UNSIGNED_SHORT:
- return SIZEOF_SHORT;
- case GL.GL_SHORT:
- return SIZEOF_SHORT;
- case GL.GL_FLOAT:
- return SIZEOF_FLOAT;
- case GL.GL_FIXED:
- return SIZEOF_INT;
- case GL2ES2.GL_INT:
- return SIZEOF_INT;
- case GL2ES2.GL_UNSIGNED_INT:
- return SIZEOF_INT;
- case GL2.GL_DOUBLE:
- return SIZEOF_DOUBLE;
- }
- return -1;
- }
-
- public static final int sizeOfBufferElem(Buffer buffer) {
- if (buffer == null) {
- return 0;
- }
- if (buffer instanceof ByteBuffer) {
- return BufferUtil.SIZEOF_BYTE;
- } else if (buffer instanceof IntBuffer) {
- return BufferUtil.SIZEOF_INT;
- } else if (buffer instanceof ShortBuffer) {
- return BufferUtil.SIZEOF_SHORT;
- } else if (buffer instanceof FloatBuffer) {
- return BufferUtil.SIZEOF_FLOAT;
- } else if (buffer instanceof DoubleBuffer) {
- return BufferUtil.SIZEOF_DOUBLE;
- }
- throw new RuntimeException("Unexpected buffer type " +
- buffer.getClass().getName());
- }
-
- private BufferUtil() {}
-
- //----------------------------------------------------------------------
- // Allocation routines
- //
-
- public static final Buffer newGLBuffer(int glType, int numElements) {
- switch (glType) {
- case GL.GL_UNSIGNED_BYTE:
- case GL.GL_BYTE:
- return newByteBuffer(numElements);
- case GL.GL_UNSIGNED_SHORT:
- case GL.GL_SHORT:
- return newShortBuffer(numElements);
- case GL.GL_FLOAT:
- return newFloatBuffer(numElements);
- case GL.GL_FIXED:
- case GL2ES2.GL_INT:
- case GL2ES2.GL_UNSIGNED_INT:
- return newIntBuffer(numElements);
- case GL2.GL_DOUBLE:
- return newDoubleBuffer(numElements);
- }
- return null;
- }
-
- public static final Buffer sliceGLBuffer(ByteBuffer parent, int bytePos, int byteLen, int glType) {
- if(parent==null || byteLen==0) return null;
- parent.position(bytePos);
- parent.limit(bytePos + byteLen);
-
- switch (glType) {
- case GL.GL_UNSIGNED_BYTE:
- case GL.GL_BYTE:
- return parent.slice();
- case GL.GL_UNSIGNED_SHORT:
- case GL.GL_SHORT:
- return parent.asShortBuffer();
- case GL.GL_FLOAT:
- return parent.asFloatBuffer();
- case GL.GL_FIXED:
- case GL2ES2.GL_INT:
- case GL2ES2.GL_UNSIGNED_INT:
- return parent.asIntBuffer();
- case GL2.GL_DOUBLE:
- return parent.asDoubleBuffer();
- }
- return null;
- }
-
- /** Allocates a new direct ByteBuffer with the specified number of
- elements. The returned buffer will have its byte order set to
- the host platform's native byte order. */
- public static ByteBuffer newByteBuffer(int numElements) {
- ByteBuffer bb = ByteBuffer.allocateDirect(numElements);
- nativeOrder(bb);
- return bb;
- }
-
- public static ByteBuffer newByteBuffer(byte[] values, int offset, int len) {
- ByteBuffer bb = newByteBuffer(len);
- bb.put(values, offset, len);
- bb.rewind();
- return bb;
- }
-
- public static ByteBuffer newByteBuffer(byte[] values, int offset) {
- return newByteBuffer(values, offset, values.length-offset);
- }
-
- public static ByteBuffer newByteBuffer(byte[] values) {
- return newByteBuffer(values, 0);
- }
-
-
- /** Allocates a new direct DoubleBuffer with the specified number of
- elements. The returned buffer will have its byte order set to
- the host platform's native byte order. */
- public static DoubleBuffer newDoubleBuffer(int numElements) {
- ByteBuffer bb = newByteBuffer(numElements * SIZEOF_DOUBLE);
- return bb.asDoubleBuffer();
- }
-
- public static DoubleBuffer newDoubleBuffer(double[] values, int offset) {
- int len = values.length-offset;
- DoubleBuffer bb = newDoubleBuffer(len);
- bb.put(values, offset, len);
- bb.rewind();
- return bb;
- }
-
- public static DoubleBuffer newDoubleBuffer(double[] values) {
- return newDoubleBuffer(values, 0);
- }
-
-
- /** Allocates a new direct FloatBuffer with the specified number of
- elements. The returned buffer will have its byte order set to
- the host platform's native byte order. */
- public static FloatBuffer newFloatBuffer(int numElements) {
- ByteBuffer bb = newByteBuffer(numElements * SIZEOF_FLOAT);
- return bb.asFloatBuffer();
- }
-
- public static FloatBuffer newFloatBuffer(float[] values, int offset, int len) {
- FloatBuffer bb = newFloatBuffer(len);
- bb.put(values, offset, len);
- bb.rewind();
- return bb;
- }
-
- public static FloatBuffer newFloatBuffer(float[] values, int offset) {
- return newFloatBuffer(values, 0, values.length-offset);
- }
-
- public static FloatBuffer newFloatBuffer(float[] values) {
- return newFloatBuffer(values, 0);
- }
-
-
- /** Allocates a new direct IntBuffer with the specified number of
- elements. The returned buffer will have its byte order set to
- the host platform's native byte order. */
- public static IntBuffer newIntBuffer(int numElements) {
- ByteBuffer bb = newByteBuffer(numElements * SIZEOF_INT);
- return bb.asIntBuffer();
- }
-
- public static IntBuffer newIntBuffer(int[] values, int offset, int len) {
- IntBuffer bb = newIntBuffer(len);
- bb.put(values, offset, len);
- bb.rewind();
- return bb;
- }
-
- public static IntBuffer newIntBuffer(int[] values, int offset) {
- return newIntBuffer(values, 0, values.length-offset);
- }
-
- public static IntBuffer newIntBuffer(int[] values) {
- return newIntBuffer(values, 0);
- }
-
- /** Allocates a new direct LongBuffer with the specified number of
- elements. The returned buffer will have its byte order set to
- the host platform's native byte order. */
- public static LongBuffer newLongBuffer(int numElements) {
- ByteBuffer bb = newByteBuffer(numElements * SIZEOF_LONG);
- return bb.asLongBuffer();
- }
-
- /** Allocates a new direct ShortBuffer with the specified number of
- elements. The returned buffer will have its byte order set to
- the host platform's native byte order. */
- public static ShortBuffer newShortBuffer(int numElements) {
- ByteBuffer bb = newByteBuffer(numElements * SIZEOF_SHORT);
- return bb.asShortBuffer();
- }
-
- public static ShortBuffer newShortBuffer(short[] values, int offset, int len) {
- ShortBuffer bb = newShortBuffer(len);
- bb.put(values, offset, len);
- bb.rewind();
- return bb;
- }
-
- public static ShortBuffer newShortBuffer(short[] values, int offset) {
- return newShortBuffer(values, 0, values.length-offset);
- }
-
- public static ShortBuffer newShortBuffer(short[] values) {
- return newShortBuffer(values, 0);
- }
-
- //----------------------------------------------------------------------
- // Copy routines (type-to-type)
- //
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed ByteBuffer into
- a newly-allocated direct ByteBuffer. The returned buffer will
- have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ByteBuffer copyByteBuffer(ByteBuffer orig) {
- ByteBuffer dest = newByteBuffer(orig.remaining());
- dest.put(orig);
- dest.rewind();
- return dest;
- }
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed FloatBuffer
- into a newly-allocated direct FloatBuffer. The returned buffer
- will have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static FloatBuffer copyFloatBuffer(FloatBuffer orig) {
- return copyFloatBufferAsByteBuffer(orig).asFloatBuffer();
- }
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed IntBuffer
- into a newly-allocated direct IntBuffer. The returned buffer
- will have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static IntBuffer copyIntBuffer(IntBuffer orig) {
- return copyIntBufferAsByteBuffer(orig).asIntBuffer();
- }
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed ShortBuffer
- into a newly-allocated direct ShortBuffer. The returned buffer
- will have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ShortBuffer copyShortBuffer(ShortBuffer orig) {
- return copyShortBufferAsByteBuffer(orig).asShortBuffer();
- }
-
- //----------------------------------------------------------------------
- // Copy routines (type-to-ByteBuffer)
- //
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed FloatBuffer
- into a newly-allocated direct ByteBuffer. The returned buffer
- will have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ByteBuffer copyFloatBufferAsByteBuffer(FloatBuffer orig) {
- ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_FLOAT);
- dest.asFloatBuffer().put(orig);
- dest.rewind();
- return dest;
- }
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed IntBuffer into
- a newly-allocated direct ByteBuffer. The returned buffer will
- have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ByteBuffer copyIntBufferAsByteBuffer(IntBuffer orig) {
- ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_INT);
- dest.asIntBuffer().put(orig);
- dest.rewind();
- return dest;
- }
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed ShortBuffer
- into a newly-allocated direct ByteBuffer. The returned buffer
- will have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ByteBuffer copyShortBufferAsByteBuffer(ShortBuffer orig) {
- ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_SHORT);
- dest.asShortBuffer().put(orig);
- dest.rewind();
- return dest;
- }
-
- //----------------------------------------------------------------------
- // Conversion routines
- //
-
- public final static float[] getFloatArray(double[] source) {
- int i=source.length;
- float[] dest = new float[i--];
- while(i>=0) { dest[i]=(float)source[i]; i--; }
- return dest;
- }
-
- public final static FloatBuffer getFloatBuffer(DoubleBuffer source) {
- source.rewind();
- FloatBuffer dest = BufferUtil.newFloatBuffer(source.limit());
- while(source.hasRemaining()) { dest.put((float)source.get()); }
- return dest;
- }
-
- public static ByteBuffer nativeOrder(ByteBuffer buf) {
- if (!isCDCFP) {
- try {
- if (byteOrderClass == null) {
- byteOrderClass = Class.forName("java.nio.ByteOrder");
- orderMethod = ByteBuffer.class.getMethod("order", new Class[] { byteOrderClass });
- Method nativeOrderMethod = byteOrderClass.getMethod("nativeOrder", null);
- nativeOrderObject = nativeOrderMethod.invoke(null, null);
- }
- } catch (Throwable t) {
- // Must be running on CDC / FP
- isCDCFP = true;
- }
-
- if (!isCDCFP) {
- try {
- orderMethod.invoke(buf, new Object[] { nativeOrderObject });
- } catch (Throwable t) {
- }
- }
- }
- return buf;
- }
-
- //----------------------------------------------------------------------
- // Convenient GL put methods with generic target Buffer
- //
- public static void put(Buffer dest, Buffer v) {
- if((dest instanceof ByteBuffer) && (v instanceof ByteBuffer)) {
- ((ByteBuffer)dest).put((ByteBuffer)v);
- } else if((dest instanceof ShortBuffer) && (v instanceof ShortBuffer)) {
- ((ShortBuffer)dest).put((ShortBuffer)v);
- } else if((dest instanceof IntBuffer) && (v instanceof IntBuffer)) {
- ((IntBuffer)dest).put((IntBuffer)v);
- } else if((dest instanceof FloatBuffer) && (v instanceof FloatBuffer)) {
- ((FloatBuffer)dest).put((FloatBuffer)v);
- } else {
- throw new GLException("Incompatible Buffer classes: dest = "+dest.getClass().getName() + ", src = " + v.getClass().getName());
- }
- }
-
- public static void putb(Buffer dest, byte v) {
- if(dest instanceof ByteBuffer) {
- ((ByteBuffer)dest).put(v);
- } else if(dest instanceof ShortBuffer) {
- ((ShortBuffer)dest).put((short)v);
- } else if(dest instanceof IntBuffer) {
- ((IntBuffer)dest).put((int)v);
- } else {
- throw new GLException("Byte doesn't match Buffer Class: "+dest);
- }
- }
-
- public static void puts(Buffer dest, short v) {
- if(dest instanceof ShortBuffer) {
- ((ShortBuffer)dest).put(v);
- } else if(dest instanceof IntBuffer) {
- ((IntBuffer)dest).put((int)v);
- } else {
- throw new GLException("Short doesn't match Buffer Class: "+dest);
- }
- }
-
- public static void puti(Buffer dest, int v) {
- if(dest instanceof IntBuffer) {
- ((IntBuffer)dest).put(v);
- } else {
- throw new GLException("Integer doesn't match Buffer Class: "+dest);
- }
- }
-
- public static void putx(Buffer dest, int v) {
- puti(dest, v);
- }
-
- public static void putf(Buffer dest, float v) {
- if(dest instanceof FloatBuffer) {
- ((FloatBuffer)dest).put(v);
- } else if(dest instanceof IntBuffer) {
- ((IntBuffer)dest).put(FixedPoint.toFixed(v));
- } else {
- throw new GLException("Float doesn't match Buffer Class: "+dest);
- }
- }
-
- public static void putd(Buffer dest, double v) {
- if(dest instanceof FloatBuffer) {
- ((FloatBuffer)dest).put((float)v);
- } else {
- throw new GLException("Double doesn't match Buffer Class: "+dest);
- }
- }
-
- //----------------------------------------------------------------------
- // Internals only below this point
- //
-
- // NOTE that this work must be done reflectively at the present time
- // because this code must compile and run correctly on both CDC/FP and J2SE
- private static boolean isCDCFP;
- private static Class byteOrderClass;
- private static Object nativeOrderObject;
- private static Method orderMethod;
-
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/FBObject.java b/src/jogl/classes/com/sun/opengl/util/FBObject.java
deleted file mode 100755
index 84b79dff4..000000000
--- a/src/jogl/classes/com/sun/opengl/util/FBObject.java
+++ /dev/null
@@ -1,263 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.sun.opengl.util;
-
-import javax.media.opengl.*;
-
-public class FBObject {
- private int width, height, attr;
- private int fb, fbo_tex, depth_rb, stencil_rb, vStatus;
- private int texInternalFormat, texDataFormat, texDataType;
-
- public static final int ATTR_DEPTH = 1 << 0;
- public static final int ATTR_STENCIL = 1 << 1;
-
- public FBObject(int width, int height, int attributes) {
- this.width = width;
- this.height = height;
- this.attr = attributes;
- }
-
-
- public boolean validateStatus(GL gl) {
- vStatus = getStatus(gl, fb);
- switch(vStatus) {
- case GL.GL_FRAMEBUFFER_COMPLETE:
- return true;
- case GL.GL_FRAMEBUFFER_UNSUPPORTED:
- case GL.GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT:
- case GL.GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:
- case GL.GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS:
- case GL.GL_FRAMEBUFFER_INCOMPLETE_FORMATS:
- //case GL2.GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER:
- //case GL2.GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER:
- //case GL2.GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT:
- case 0:
- default:
- return false;
- }
- }
-
- public static int getStatus(GL gl, int fb) {
- if(!gl.glIsFramebuffer(fb)) {
- return -1;
- }
- return gl.glCheckFramebufferStatus(gl.GL_FRAMEBUFFER);
- //return gl.glCheckFramebufferStatus(fb);
- }
-
- public String getStatusString() {
- return getStatusString(vStatus);
- }
-
- public static String getStatusString(int fbStatus) {
- switch(fbStatus) {
- case -1:
- return "NOT A FBO";
- case GL.GL_FRAMEBUFFER_COMPLETE:
- return "OK";
- case GL.GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT:
- return("GL FBO: incomplete,incomplete attachment\n");
- case GL.GL_FRAMEBUFFER_UNSUPPORTED:
- return("GL FBO: Unsupported framebuffer format");
- case GL.GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:
- return("GL FBO: incomplete,missing attachment");
- case GL.GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS:
- return("GL FBO: incomplete,attached images must have same dimensions");
- case GL.GL_FRAMEBUFFER_INCOMPLETE_FORMATS:
- return("GL FBO: incomplete,attached images must have same format");
- /*
- case GL2.GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER:
- return("GL FBO: incomplete,missing draw buffer");
- case GL2.GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER:
- return("GL FBO: incomplete,missing read buffer");
- case GL2.GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT:
- return("GL FBO: incomplete, duplicate attachment");
- */
- case 0:
- return("GL FBO: incomplete, implementation fault");
- default:
- return("GL FBO: incomplete, implementation ERROR");
- }
- }
-
- public void init(GL gl) {
- int textureInternalFormat, textureDataFormat, textureDataType;
-
- if(gl.isGL2()) {
- textureInternalFormat=GL.GL_RGBA8;
- textureDataFormat=GL2.GL_BGRA;
- textureDataType=GL2.GL_UNSIGNED_INT_8_8_8_8_REV;
- } else if(gl.isGLES()) {
- textureInternalFormat=GL.GL_RGBA;
- textureDataFormat=GL.GL_RGBA;
- textureDataType=GL.GL_UNSIGNED_BYTE;
- } else {
- textureInternalFormat=GL.GL_RGB;
- textureDataFormat=GL.GL_RGB;
- textureDataType=GL.GL_UNSIGNED_BYTE;
- }
- init(gl, textureInternalFormat, textureDataFormat, textureDataType);
- }
-
- public void init(GL gl, int textureInternalFormat, int textureDataFormat, int textureDataType) {
- texInternalFormat=textureInternalFormat;
- texDataFormat=textureDataFormat;
- texDataType=textureDataType;
-
- // generate fbo ..
- int name[] = new int[1];
-
- gl.glGenFramebuffers(1, name, 0);
- fb = name[0];
- System.out.println("fb: "+fb);
-
- gl.glGenTextures(1, name, 0);
- fbo_tex = name[0];
- System.out.println("fbo_tex: "+fbo_tex);
-
- if(0!=(attr&ATTR_DEPTH)) {
- gl.glGenRenderbuffers(1, name, 0);
- depth_rb = name[0];
- System.out.println("depth_rb: "+depth_rb);
- } else {
- depth_rb = 0;
- }
- if(0!=(attr&ATTR_STENCIL)) {
- gl.glGenRenderbuffers(1, name, 0);
- stencil_rb = name[0];
- System.out.println("stencil_rb: "+stencil_rb);
- } else {
- stencil_rb = 0;
- }
-
- // bind fbo ..
- gl.glBindFramebuffer(GL.GL_FRAMEBUFFER, fb);
-
- gl.glBindTexture(GL.GL_TEXTURE_2D, fbo_tex);
- gl.glTexImage2D(GL.GL_TEXTURE_2D, 0, texInternalFormat, width, height, 0,
- texDataFormat, texDataType, null);
- gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST);
- gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_NEAREST);
- //gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL2.GL_CLAMP);
- //gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL2.GL_CLAMP);
-
-
- // Set up the color buffer for use as a renderable texture:
- gl.glFramebufferTexture2D(GL.GL_FRAMEBUFFER,
- GL.GL_COLOR_ATTACHMENT0,
- GL.GL_TEXTURE_2D, fbo_tex, 0);
-
- if(depth_rb!=0) {
- // Initialize the depth buffer:
- gl.glBindRenderbuffer(GL.GL_RENDERBUFFER, depth_rb);
- gl.glRenderbufferStorage(GL.GL_RENDERBUFFER,
- GL.GL_DEPTH_COMPONENT16, width, height);
- // Set up the depth buffer attachment:
- gl.glFramebufferRenderbuffer(GL.GL_FRAMEBUFFER,
- GL.GL_DEPTH_ATTACHMENT,
- GL.GL_RENDERBUFFER, depth_rb);
- }
-
- if(stencil_rb!=0) {
- // Initialize the stencil buffer:
- gl.glBindRenderbuffer(GL.GL_RENDERBUFFER, stencil_rb);
- gl.glRenderbufferStorage(GL.GL_RENDERBUFFER,
- GL.GL_STENCIL_INDEX8, width, height);
- gl.glFramebufferRenderbuffer(GL.GL_FRAMEBUFFER,
- GL.GL_STENCIL_ATTACHMENT,
- GL.GL_RENDERBUFFER, stencil_rb);
- }
-
- // Check the FBO for completeness
- if(validateStatus(gl)) {
- System.out.println("Framebuffer " + fb + " is complete");
- } else {
- System.out.println("Framebuffer " + fb + " is incomplete: status = 0x" + Integer.toHexString(vStatus) +
- " : " + getStatusString());
- }
-
- unbind(gl);
- }
-
- public void destroy(GL gl) {
- unbind(gl);
-
- int name[] = new int[1];
-
- if(0!=stencil_rb) {
- name[0] = stencil_rb;
- gl.glDeleteRenderbuffers(1, name, 0);
- stencil_rb = 0;
- }
- if(0!=depth_rb) {
- name[0] = depth_rb;
- gl.glDeleteRenderbuffers(1, name, 0);
- depth_rb=0;
- }
- if(0!=fbo_tex) {
- name[0] = fbo_tex;
- gl.glDeleteTextures(1, name, 0);
- fbo_tex = 0;
- }
- if(0!=fb) {
- name[0] = fb;
- gl.glDeleteFramebuffers(1, name, 0);
- fb = 0;
- }
- }
-
- public void bind(GL gl) {
- gl.glBindTexture(GL.GL_TEXTURE_2D, fbo_tex);
- gl.glBindFramebuffer(GL.GL_FRAMEBUFFER, fb);
- }
-
- public void unbind(GL gl) {
- gl.glBindTexture(GL.GL_TEXTURE_2D, 0);
- gl.glBindFramebuffer(GL.GL_FRAMEBUFFER, 0);
- }
-
- public void use(GL gl) {
- gl.glBindTexture(GL.GL_TEXTURE_2D, 0);
- gl.glBindFramebuffer(GL.GL_FRAMEBUFFER, 0);
- gl.glBindTexture(GL.GL_TEXTURE_2D, fbo_tex); // to use it ..
- }
-
- public int getFBName() {
- return fb;
- }
- public int getTextureName() {
- return fbo_tex;
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/FPSAnimator.java b/src/jogl/classes/com/sun/opengl/util/FPSAnimator.java
deleted file mode 100755
index 290de89d6..000000000
--- a/src/jogl/classes/com/sun/opengl/util/FPSAnimator.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.util;
-
-import java.util.*;
-import javax.media.opengl.*;
-
-/** An Animator subclass which attempts to achieve a target
- frames-per-second rate to avoid using all CPU time. The target FPS
- is only an estimate and is not guaranteed. */
-
-public class FPSAnimator extends Animator {
- private Timer timer;
- private int fps;
- private boolean scheduleAtFixedRate;
-
- /** Creates an FPSAnimator with a given target frames-per-second
- value. Equivalent to FPSAnimator(null, fps)
. */
- public FPSAnimator(int fps) {
- this(null, fps);
- }
-
- /** Creates an FPSAnimator with a given target frames-per-second
- value and a flag indicating whether to use fixed-rate
- scheduling. Equivalent to FPSAnimator(null, fps,
- scheduleAtFixedRate)
. */
- public FPSAnimator(int fps, boolean scheduleAtFixedRate) {
- this(null, fps, scheduleAtFixedRate);
- }
-
- /** Creates an FPSAnimator with a given target frames-per-second
- value and an initial drawable to animate. Equivalent to
- FPSAnimator(null, fps, false)
. */
- public FPSAnimator(GLAutoDrawable drawable, int fps) {
- this(drawable, fps, false);
- }
-
- /** Creates an FPSAnimator with a given target frames-per-second
- value, an initial drawable to animate, and a flag indicating
- whether to use fixed-rate scheduling. */
- public FPSAnimator(GLAutoDrawable drawable, int fps, boolean scheduleAtFixedRate) {
- this.fps = fps;
- if (drawable != null) {
- add(drawable);
- }
- this.scheduleAtFixedRate = scheduleAtFixedRate;
- }
-
- /** Starts this FPSAnimator. */
- public synchronized void start() {
- if (timer != null) {
- throw new GLException("Already started");
- }
- timer = new Timer();
- long delay = (long) (1000.0f / (float) fps);
- TimerTask task = new TimerTask() {
- public void run() {
- display();
- }
- };
- if (scheduleAtFixedRate) {
- timer.scheduleAtFixedRate(task, 0, delay);
- } else {
- timer.schedule(task, 0, delay);
- }
- }
-
- /** Indicates whether this FPSAnimator is currently running. This
- should only be used as a heuristic to applications because in
- some circumstances the FPSAnimator may be in the process of
- shutting down and this method will still return true. */
- public synchronized boolean isAnimating() {
- return (timer != null);
- }
-
- /** Stops this FPSAnimator. Due to the implementation of the
- FPSAnimator it is not guaranteed that the FPSAnimator will be
- completely stopped by the time this method returns. */
- public synchronized void stop() {
- if (timer == null) {
- throw new GLException("Already stopped");
- }
- timer.cancel();
- timer = null;
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/FileUtil.java b/src/jogl/classes/com/sun/opengl/util/FileUtil.java
deleted file mode 100755
index 84b846853..000000000
--- a/src/jogl/classes/com/sun/opengl/util/FileUtil.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) 2005 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.util;
-
-import java.io.*;
-
-/** Utilities for dealing with files. */
-
-public class FileUtil {
- private FileUtil() {}
-
- /**
- * Returns the lowercase suffix of the given file name (the text
- * after the last '.' in the file name). Returns null if the file
- * name has no suffix. Only operates on the given file name;
- * performs no I/O operations.
- *
- * @param file name of the file
- * @return lowercase suffix of the file name
- * @throws NullPointerException if file is null
- */
-
- public static String getFileSuffix(File file) {
- return getFileSuffix(file.getName());
- }
-
- /**
- * Returns the lowercase suffix of the given file name (the text
- * after the last '.' in the file name). Returns null if the file
- * name has no suffix. Only operates on the given file name;
- * performs no I/O operations.
- *
- * @param filename name of the file
- * @return lowercase suffix of the file name
- * @throws NullPointerException if filename is null
- */
- public static String getFileSuffix(String filename) {
- int lastDot = filename.lastIndexOf('.');
- if (lastDot < 0) {
- return null;
- }
- return toLowerCase(filename.substring(lastDot + 1));
- }
-
- private static String toLowerCase(String arg) {
- if (arg == null) {
- return null;
- }
-
- return arg.toLowerCase();
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/FixedPoint.java b/src/jogl/classes/com/sun/opengl/util/FixedPoint.java
deleted file mode 100644
index e9bdae0e9..000000000
--- a/src/jogl/classes/com/sun/opengl/util/FixedPoint.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.sun.opengl.util;
-
-public class FixedPoint {
- public static final int toFixed(int value) {
- if (value < -32768) value = -32768;
- if (value > 32767) value = 32767;
- return value * 65536;
- }
-
- public static final int toFixed(float value) {
- if (value < -32768) value = -32768;
- if (value > 32767) value = 32767;
- return (int)(value * 65536.0f);
- }
-
- public static final float toFloat(int value) {
- return (float)value/65536.0f;
- }
-
- public static final int mult(int x1, int x2) {
- return (int) ( ((long)x1*(long)x2)/65536 );
- }
-
- public static final int div(int x1, int x2) {
- return (int) ( (((long)x1)<<16)/x2 );
- }
-}
-
diff --git a/src/jogl/classes/com/sun/opengl/util/GLArrayDataClient.java b/src/jogl/classes/com/sun/opengl/util/GLArrayDataClient.java
deleted file mode 100644
index ec4c5e393..000000000
--- a/src/jogl/classes/com/sun/opengl/util/GLArrayDataClient.java
+++ /dev/null
@@ -1,353 +0,0 @@
-
-package com.sun.opengl.util;
-
-import java.security.*;
-
-import javax.media.opengl.*;
-
-import com.sun.opengl.util.glsl.*;
-
-import com.sun.opengl.impl.SystemUtil;
-
-import java.nio.*;
-
-public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayDataEditable {
-
- /**
- * The OpenGL ES emulation on the PC probably has a buggy VBO implementation,
- * where we have to 'refresh' the VertexPointer or VertexAttribArray after each
- * BindBuffer !
- *
- * This should not be necessary on proper native implementations.
- */
- public static final boolean hasVBOBug = AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- return SystemUtil.getenv("JOGL_VBO_BUG");
- }
- }) != null;
-
- /**
- * @param index The GL array index
- * @param name The optional custom name for the GL array index, maybe null.
- * If null, the default name mapping will be used, see 'getPredefinedArrayIndexName(int)'.
- * This name might be used as the shader attribute name.
- * @param comps The array component number
- * @param dataType The array index GL data type
- * @param normalized Wheather the data shall be normalized
- *
- * @see javax.media.opengl.GLContext#getPredefinedArrayIndexName(int)
- */
- public static GLArrayDataClient createFixed(GL gl, int index, String name, int comps, int dataType, boolean normalized,
- int initialSize)
- throws GLException
- {
- gl.getGLProfile().isValidArrayDataType(index, comps, dataType, false, true);
- GLArrayDataClient adc = new GLArrayDataClient();
- GLArrayHandler glArrayHandler = new GLFixedArrayHandler(adc);
- adc.init(name, index, comps, dataType, normalized, 0, null, initialSize, false, glArrayHandler, 0, 0);
- return adc;
- }
-
- public static GLArrayDataClient createFixed(GL gl, int index, String name, int comps, int dataType, boolean normalized,
- int stride, Buffer buffer)
- throws GLException
- {
- gl.getGLProfile().isValidArrayDataType(index, comps, dataType, false, true);
- GLArrayDataClient adc = new GLArrayDataClient();
- GLArrayHandler glArrayHandler = new GLFixedArrayHandler(adc);
- adc.init(name, index, comps, dataType, normalized, stride, buffer, comps*comps, false, glArrayHandler, 0, 0);
- return adc;
- }
-
- public static GLArrayDataClient createGLSL(GL gl, String name, int comps, int dataType, boolean normalized,
- int initialSize)
- throws GLException
- {
- if(!gl.hasGLSL()) {
- throw new GLException("GLArrayDataClient.GLSL not supported: "+gl);
- }
- gl.getGLProfile().isValidArrayDataType(-1, comps, dataType, true, true);
-
- GLArrayDataClient adc = new GLArrayDataClient();
- GLArrayHandler glArrayHandler = new GLSLArrayHandler(adc);
- adc.init(name, -1, comps, dataType, normalized, 0, null, initialSize, true, glArrayHandler, 0, 0);
- return adc;
- }
-
- public static GLArrayDataClient createGLSL(GL gl, String name, int comps, int dataType, boolean normalized,
- int stride, Buffer buffer)
- throws GLException
- {
- if(!gl.hasGLSL()) {
- throw new GLException("GLArrayDataClient.GLSL not supported: "+gl);
- }
- gl.getGLProfile().isValidArrayDataType(-1, comps, dataType, true, true);
-
- GLArrayDataClient adc = new GLArrayDataClient();
- GLArrayHandler glArrayHandler = new GLSLArrayHandler(adc);
- adc.init(name, -1, comps, dataType, normalized, stride, buffer, comps*comps, true, glArrayHandler, 0, 0);
- return adc;
- }
-
- //
- // Data read access
- //
-
- public final boolean isBufferWritten() { return bufferWritten; }
-
- public final boolean sealed() { return sealed; }
-
- public int getBufferUsage() { return -1; }
-
- //
- // Data and GL state modification ..
- //
-
- public final void setBufferWritten(boolean written) { bufferWritten=written; }
-
- public void destroy(GL gl) {
- reset(gl);
- buffer=null;
- }
-
- public void reset(GL gl) {
- enableBuffer(gl, false);
- reset();
- }
-
- public void seal(GL gl, boolean seal)
- {
- seal(seal);
- if(sealedGL==seal) return;
- sealedGL = seal;
- if(seal) {
- init_vbo(gl);
-
- enableBuffer(gl, true);
- } else {
- enableBuffer(gl, false);
- }
- }
-
- public void enableBuffer(GL gl, boolean enable) {
- if(enableBufferAlways && enable) {
- bufferEnabled = false;
- }
- if( bufferEnabled != enable && components>0 ) {
- if(enable) {
- checkSeal(true);
- if(null!=buffer) {
- buffer.rewind();
- }
- }
- glArrayHandler.enableBuffer(gl, enable);
- bufferEnabled = enable;
- }
- }
-
- public void setEnableAlways(boolean always) {
- enableBufferAlways = always;
- }
-
- //
- // Data modification ..
- //
-
- public void reset() {
- if(buffer!=null) {
- buffer.clear();
- }
- this.sealed=false;
- this.bufferEnabled=false;
- this.bufferWritten=false;
- }
-
- public void seal(boolean seal)
- {
- if(sealed==seal) return;
- sealed = seal;
- if(seal) {
- bufferWritten=false;
- if (null!=buffer) {
- buffer.flip();
- }
- } else {
- if (null!=buffer) {
- buffer.position(buffer.limit());
- buffer.limit(buffer.capacity());
- }
- }
- }
-
-
- public void rewind() {
- if(buffer!=null) {
- buffer.rewind();
- }
- }
-
- public void padding(int done) {
- if ( buffer==null || sealed ) return;
- while(doneSystem.exit()
from the application rather than
- * rely on the shutdown hook functionality due to inevitable race
- * conditions and unspecified behavior during JVM teardown. BufferedImage
with a pixel format compatible with the graphics
- * environment. The returned image can thus benefit from hardware accelerated operations
- * in Java2D API.
- *
- * @param width The width of the image to be created
- * @param height The height of the image to be created
- *
- * @return A instance of BufferedImage
with a type compatible with the graphics card.
- */
- public static BufferedImage createCompatibleImage(int width, int height) {
- GraphicsConfiguration configuration =
- GraphicsEnvironment.getLocalGraphicsEnvironment().
- getDefaultScreenDevice().getDefaultConfiguration();
- return configuration.createCompatibleImage(width, height);
- }
-
- /**
- * Creates a thumbnail from an image. A thumbnail is a scaled down version of the original picture.
- * This method will retain the width to height ratio of the original picture and return a new
- * instance of BufferedImage
. The original picture is not modified.
- *
- * @param image The original image to sample down
- * @param thumbWidth The width of the thumbnail to be created
- *
- * @throws IllegalArgumentException If thumbWidth is greater than image.getWidth()
- *
- * @return A thumbnail with the requested width or the original picture if thumbWidth = image.getWidth()
- */
- public static BufferedImage createThumbnail(BufferedImage image, int thumbWidth) {
- // Thanks to Romain Guy for this utility
- if (thumbWidth > image.getWidth()) {
- throw new IllegalArgumentException("Thumbnail width must be greater than image width");
- }
-
- if (thumbWidth == image.getWidth()) {
- return image;
- }
-
- float ratio = (float) image.getWidth() / (float) image.getHeight();
- int width = image.getWidth();
- BufferedImage thumb = image;
-
- do {
- width /= 2;
- if (width < thumbWidth) {
- width = thumbWidth;
- }
-
- BufferedImage temp = createCompatibleImage(width, (int) (width / ratio));
- Graphics2D g2 = temp.createGraphics();
- g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
- RenderingHints.VALUE_INTERPOLATION_BILINEAR);
- g2.drawImage(thumb, 0, 0, temp.getWidth(), temp.getHeight(), null);
- g2.dispose();
- thumb = temp;
- } while (width != thumbWidth);
-
- return thumb;
- }
-
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/awt/Overlay.java b/src/jogl/classes/com/sun/opengl/util/awt/Overlay.java
deleted file mode 100755
index 5a54a7161..000000000
--- a/src/jogl/classes/com/sun/opengl/util/awt/Overlay.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.util.awt;
-
-import java.awt.Graphics2D;
-
-import javax.media.opengl.*;
-import com.sun.opengl.util.texture.*;
-
-/** Provides a Java 2D overlay on top of an arbitrary GLDrawable,
- making it easier to do things like draw text and images on top of
- an OpenGL scene while still maintaining reasonably good
- efficiency. */
-
-public class Overlay {
- private GLDrawable drawable;
- private TextureRenderer renderer;
- private boolean contentsLost;
-
- /** Creates a new Java 2D overlay on top of the specified
- GLDrawable. */
- public Overlay(GLDrawable drawable) {
- this.drawable = drawable;
- }
-
- /** Creates a {@link java.awt.Graphics2D Graphics2D} instance for
- rendering into the overlay. The returned object should be
- disposed of using the normal {@link java.awt.Graphics#dispose()
- Graphics.dispose()} method once it is no longer being used.
-
- @return a new {@link java.awt.Graphics2D Graphics2D} object for
- rendering into the backing store of this renderer
- */
- public Graphics2D createGraphics() {
- // Validate the size of the renderer against the current size of
- // the drawable
- validateRenderer();
- return renderer.createGraphics();
- }
-
- /** Indicates whether the Java 2D contents of the overlay were lost
- since the last time {@link #createGraphics} was called. This
- method should be called immediately after calling {@link
- #createGraphics} to see whether the entire contents of the
- overlay need to be redrawn or just the region the application is
- interested in updating.
-
- @return whether the contents of the overlay were lost since the
- last render
- */
- public boolean contentsLost() {
- return contentsLost;
- }
-
- /** Marks the given region of the overlay as dirty. This region, and
- any previously set dirty regions, will be automatically
- synchronized with the underlying Texture during the next {@link
- #draw draw} or {@link #drawAll drawAll} operation, at which
- point the dirty region will be cleared. It is not necessary for
- an OpenGL context to be current when this method is called.
-
- @param x the x coordinate (in Java 2D coordinates -- relative to
- upper left) of the region to update
- @param y the y coordinate (in Java 2D coordinates -- relative to
- upper left) of the region to update
- @param width the width of the region to update
- @param height the height of the region to update
-
- @throws GLException If an OpenGL context is not current when this method is called */
- public void markDirty(int x, int y, int width, int height) {
- renderer.markDirty(x, y, width, height);
- }
-
- /** Draws the entire contents of the overlay on top of the OpenGL
- drawable. This is a convenience method which encapsulates all
- portions of the rendering process; if this method is used,
- {@link #beginRendering}, {@link #endRendering}, etc. should not
- be used. This method should be called while the OpenGL context
- for the drawable is current, and after your OpenGL scene has
- been rendered.
-
- @throws GLException If an OpenGL context is not current when this method is called
- */
- public void drawAll() throws GLException {
- beginRendering();
- draw(0, 0, drawable.getWidth(), drawable.getHeight());
- endRendering();
- }
-
- /** Begins the OpenGL rendering process for the overlay. This is
- separated out so advanced applications can render independent
- pieces of the overlay to different portions of the drawable.
-
- @throws GLException If an OpenGL context is not current when this method is called
- */
- public void beginRendering() throws GLException {
- renderer.beginOrthoRendering(drawable.getWidth(), drawable.getHeight());
- }
-
- /** Ends the OpenGL rendering process for the overlay. This is
- separated out so advanced applications can render independent
- pieces of the overlay to different portions of the drawable.
-
- @throws GLException If an OpenGL context is not current when this method is called
- */
- public void endRendering() throws GLException {
- renderer.endOrthoRendering();
- }
-
- /** Draws the specified sub-rectangle of the overlay on top of the
- OpenGL drawable. {@link #beginRendering} and {@link
- #endRendering} must be used in conjunction with this method to
- achieve proper rendering results. This method should be called
- while the OpenGL context for the drawable is current, and after
- your OpenGL scene has been rendered.
-
- @param x the lower-left x coordinate (relative to the lower left
- of the overlay) of the rectangle to draw
- @param y the lower-left y coordinate (relative to the lower left
- of the overlay) of the rectangle to draw
- @param width the width of the rectangle to draw
- @param height the height of the rectangle to draw
-
- @throws GLException If an OpenGL context is not current when this method is called
- */
- public void draw(int x, int y, int width, int height) throws GLException {
- draw(x, y, x, y, width, height);
- }
-
- /** Draws the specified sub-rectangle of the overlay at the
- specified x and y coordinate on top of the OpenGL drawable.
- {@link #beginRendering} and {@link #endRendering} must be used
- in conjunction with this method to achieve proper rendering
- results. This method should be called while the OpenGL context
- for the drawable is current, and after your OpenGL scene has
- been rendered.
-
- @param screenx the on-screen x coordinate at which to draw the rectangle
- @param screeny the on-screen y coordinate (relative to lower left) at
- which to draw the rectangle
- @param overlayx the x coordinate of the pixel in the overlay of
- the lower left portion of the rectangle to draw
- @param overlayy the y coordinate of the pixel in the overlay
- (relative to lower left) of the lower left portion of the
- rectangle to draw
- @param width the width of the rectangle to draw
- @param height the height of the rectangle to draw
-
- @throws GLException If an OpenGL context is not current when this method is called
- */
- public void draw(int screenx, int screeny,
- int overlayx, int overlayy,
- int width, int height) throws GLException {
- renderer.drawOrthoRect(screenx, screeny,
- overlayx, overlayy,
- width, height);
- }
-
- //----------------------------------------------------------------------
- // Internals only below this point
- //
-
- private void validateRenderer() {
- if (renderer == null) {
- renderer = new TextureRenderer(drawable.getWidth(),
- drawable.getHeight(),
- true);
- contentsLost = true;
- } else if (renderer.getWidth() != drawable.getWidth() ||
- renderer.getHeight() != drawable.getHeight()) {
- renderer.setSize(drawable.getWidth(), drawable.getHeight());
- contentsLost = true;
- } else {
- contentsLost = false;
- }
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/awt/Screenshot.java b/src/jogl/classes/com/sun/opengl/util/awt/Screenshot.java
deleted file mode 100755
index 55099445a..000000000
--- a/src/jogl/classes/com/sun/opengl/util/awt/Screenshot.java
+++ /dev/null
@@ -1,432 +0,0 @@
-/*
- * Copyright (c) 2005 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- */
-
-package com.sun.opengl.util.awt;
-
-import java.awt.image.*;
-import java.io.*;
-import java.nio.*;
-import java.nio.channels.*;
-import javax.imageio.*;
-
-import javax.media.opengl.*;
-import javax.media.opengl.glu.*;
-import javax.media.opengl.glu.gl2.*;
-
-import com.sun.opengl.util.*;
-
-/** Utilities for taking screenshots of OpenGL applications. */
-
-public class Screenshot {
- private Screenshot() {}
-
- /**
- * Takes a fast screenshot of the current OpenGL drawable to a Targa
- * file. Requires the OpenGL context for the desired drawable to be
- * current. Takes the screenshot from the last assigned read buffer,
- * or the OpenGL default read buffer if none has been specified by
- * the user (GL_FRONT for single-buffered configurations and GL_BACK
- * for double-buffered configurations). This is the fastest
- * mechanism for taking a screenshot of an application. Contributed
- * by Carsten Weisse of Bytonic Software (http://bytonic.de/). TextRenderer renderer;
" field to your {@link
- javax.media.opengl.GLEventListener GLEventListener}. In your {@link
- javax.media.opengl.GLEventListener#init init} method, add:
-
-
- renderer = new TextRenderer(new Font("SansSerif", Font.BOLD, 36));
-
-
-
- renderer.beginRendering(drawable.getWidth(), drawable.getHeight());
- // optionally set the color
- renderer.setColor(1.0f, 0.2f, 0.2f, 0.8f);
- renderer.draw("Text to draw", xPosition, yPosition);
- // ... more draw commands, color changes, etc.
- renderer.endRendering();
-
-
- Unless you are sharing textures and display lists between OpenGL
- contexts, you do not need to call the {@link #dispose dispose}
- method of the TextRenderer; the OpenGL resources it uses
- internally will be cleaned up automatically when the OpenGL
- context is destroyed. TextRenderer(font, false,
- false)
.
-
- @param font the font to render with
- */
- public TextRenderer(Font font) {
- this(font, false, false, null, false);
- }
-
- /** Creates a new TextRenderer with the given font, using no
- antialiasing or fractional metrics, and the default
- RenderDelegate. If mipmap
is true, attempts to use
- OpenGL's automatic mipmap generation for better smoothing when
- rendering the TextureRenderer's contents at a distance.
- Equivalent to TextRenderer(font, false, false)
.
-
- @param font the font to render with
- @param mipmap whether to attempt use of automatic mipmap generation
- */
- public TextRenderer(Font font, boolean mipmap) {
- this(font, false, false, null, mipmap);
- }
-
- /** Creates a new TextRenderer with the given Font, specified font
- properties, and default RenderDelegate. The
- antialiased
and useFractionalMetrics
- flags provide control over the same properties at the Java 2D
- level. No mipmap support is requested. Equivalent to
- TextRenderer(font, antialiased, useFractionalMetrics,
- null)
.
-
- @param font the font to render with
- @param antialiased whether to use antialiased fonts
- @param useFractionalMetrics whether to use fractional font
- metrics at the Java 2D level
- */
- public TextRenderer(Font font, boolean antialiased,
- boolean useFractionalMetrics) {
- this(font, antialiased, useFractionalMetrics, null, false);
- }
-
- /** Creates a new TextRenderer with the given Font, specified font
- properties, and given RenderDelegate. The
- antialiased
and useFractionalMetrics
- flags provide control over the same properties at the Java 2D
- level. The renderDelegate
provides more control
- over the text rendered. No mipmap support is requested.
-
- @param font the font to render with
- @param antialiased whether to use antialiased fonts
- @param useFractionalMetrics whether to use fractional font
- metrics at the Java 2D level
- @param renderDelegate the render delegate to use to draw the
- text's bitmap, or null to use the default one
- */
- public TextRenderer(Font font, boolean antialiased,
- boolean useFractionalMetrics, RenderDelegate renderDelegate) {
- this(font, antialiased, useFractionalMetrics, renderDelegate, false);
- }
-
- /** Creates a new TextRenderer with the given Font, specified font
- properties, and given RenderDelegate. The
- antialiased
and useFractionalMetrics
- flags provide control over the same properties at the Java 2D
- level. The renderDelegate
provides more control
- over the text rendered. If mipmap
is true, attempts
- to use OpenGL's automatic mipmap generation for better smoothing
- when rendering the TextureRenderer's contents at a distance.
-
- @param font the font to render with
- @param antialiased whether to use antialiased fonts
- @param useFractionalMetrics whether to use fractional font
- metrics at the Java 2D level
- @param renderDelegate the render delegate to use to draw the
- text's bitmap, or null to use the default one
- @param mipmap whether to attempt use of automatic mipmap generation
- */
- public TextRenderer(Font font, boolean antialiased,
- boolean useFractionalMetrics, RenderDelegate renderDelegate,
- boolean mipmap) {
- this.font = font;
- this.antialiased = antialiased;
- this.useFractionalMetrics = useFractionalMetrics;
- this.mipmap = mipmap;
-
- // FIXME: consider adjusting the size based on font size
- // (it will already automatically resize if necessary)
- packer = new RectanglePacker(new Manager(), kSize, kSize);
-
- if (renderDelegate == null) {
- renderDelegate = new DefaultRenderDelegate();
- }
-
- this.renderDelegate = renderDelegate;
-
- mGlyphProducer = new GlyphProducer(font.getNumGlyphs());
- }
-
- /** Returns the bounding rectangle of the given String, assuming it
- was rendered at the origin. See {@link #getBounds(CharSequence)
- getBounds(CharSequence)}. */
- public Rectangle2D getBounds(String str) {
- return getBounds((CharSequence) str);
- }
-
- /** Returns the bounding rectangle of the given CharSequence,
- assuming it was rendered at the origin. The coordinate system of
- the returned rectangle is Java 2D's, with increasing Y
- coordinates in the downward direction. The relative coordinate
- (0, 0) in the returned rectangle corresponds to the baseline of
- the leftmost character of the rendered string, in similar
- fashion to the results returned by, for example, {@link
- java.awt.font.GlyphVector#getVisualBounds}. Most applications
- will use only the width and height of the returned Rectangle for
- the purposes of centering or justifying the String. It is not
- specified which Java 2D bounds ({@link
- java.awt.font.GlyphVector#getVisualBounds getVisualBounds},
- {@link java.awt.font.GlyphVector#getPixelBounds getPixelBounds},
- etc.) the returned bounds correspond to, although every effort
- is made to ensure an accurate bound. */
- public Rectangle2D getBounds(CharSequence str) {
- // FIXME: this should be more optimized and use the glyph cache
- Rect r = null;
-
- if ((r = (Rect) stringLocations.get(str)) != null) {
- TextData data = (TextData) r.getUserData();
-
- // Reconstitute the Java 2D results based on the cached values
- return new Rectangle2D.Double(-data.origin().x, -data.origin().y,
- r.w(), r.h());
- }
-
- // Must return a Rectangle compatible with the layout algorithm --
- // must be idempotent
- return normalize(renderDelegate.getBounds(str, font,
- getFontRenderContext()));
- }
-
- /** Returns the Font this renderer is using. */
- public Font getFont() {
- return font;
- }
-
- /** Returns a FontRenderContext which can be used for external
- text-related size computations. This object should be considered
- transient and may become invalidated between {@link
- #beginRendering beginRendering} / {@link #endRendering
- endRendering} pairs. */
- public FontRenderContext getFontRenderContext() {
- if (cachedFontRenderContext == null) {
- cachedFontRenderContext = getGraphics2D().getFontRenderContext();
- }
-
- return cachedFontRenderContext;
- }
-
- /** Begins rendering with this {@link TextRenderer TextRenderer}
- into the current OpenGL drawable, pushing the projection and
- modelview matrices and some state bits and setting up a
- two-dimensional orthographic projection with (0, 0) as the
- lower-left coordinate and (width, height) as the upper-right
- coordinate. Binds and enables the internal OpenGL texture
- object, sets the texture environment mode to GL_MODULATE, and
- changes the current color to the last color set with this
- TextRenderer via {@link #setColor setColor}. This method
- disables the depth test and is equivalent to
- beginRendering(width, height, true).
-
- @param width the width of the current on-screen OpenGL drawable
- @param height the height of the current on-screen OpenGL drawable
- @throws javax.media.opengl.GLException If an OpenGL context is not current when this method is called
- */
- public void beginRendering(int width, int height) throws GLException {
- beginRendering(width, height, true);
- }
-
- /** Begins rendering with this {@link TextRenderer TextRenderer}
- into the current OpenGL drawable, pushing the projection and
- modelview matrices and some state bits and setting up a
- two-dimensional orthographic projection with (0, 0) as the
- lower-left coordinate and (width, height) as the upper-right
- coordinate. Binds and enables the internal OpenGL texture
- object, sets the texture environment mode to GL_MODULATE, and
- changes the current color to the last color set with this
- TextRenderer via {@link #setColor setColor}. Disables the depth
- test if the disableDepthTest argument is true.
-
- @param width the width of the current on-screen OpenGL drawable
- @param height the height of the current on-screen OpenGL drawable
- @param disableDepthTest whether to disable the depth test
- @throws GLException If an OpenGL context is not current when this method is called
- */
- public void beginRendering(int width, int height, boolean disableDepthTest)
- throws GLException {
- beginRendering(true, width, height, disableDepthTest);
- }
-
- /** Begins rendering of 2D text in 3D with this {@link TextRenderer
- TextRenderer} into the current OpenGL drawable. Assumes the end
- user is responsible for setting up the modelview and projection
- matrices, and will render text using the {@link #draw3D draw3D}
- method. This method pushes some OpenGL state bits, binds and
- enables the internal OpenGL texture object, sets the texture
- environment mode to GL_MODULATE, and changes the current color
- to the last color set with this TextRenderer via {@link
- #setColor setColor}.
-
- @throws GLException If an OpenGL context is not current when this method is called
- */
- public void begin3DRendering() throws GLException {
- beginRendering(false, 0, 0, false);
- }
-
- /** Changes the current color of this TextRenderer to the supplied
- one. The default color is opaque white.
-
- @param color the new color to use for rendering text
- @throws GLException If an OpenGL context is not current when this method is called
- */
- public void setColor(Color color) throws GLException {
- boolean noNeedForFlush = (haveCachedColor && (cachedColor != null) &&
- color.equals(cachedColor));
-
- if (!noNeedForFlush) {
- flushGlyphPipeline();
- }
-
- getBackingStore().setColor(color);
- haveCachedColor = true;
- cachedColor = color;
- }
-
- /** Changes the current color of this TextRenderer to the supplied
- one, where each component ranges from 0.0f - 1.0f. The alpha
- component, if used, does not need to be premultiplied into the
- color channels as described in the documentation for {@link
- com.sun.opengl.util.texture.Texture Texture}, although
- premultiplied colors are used internally. The default color is
- opaque white.
-
- @param r the red component of the new color
- @param g the green component of the new color
- @param b the blue component of the new color
- @param a the alpha component of the new color, 0.0f = completely
- transparent, 1.0f = completely opaque
- @throws GLException If an OpenGL context is not current when this method is called
- */
- public void setColor(float r, float g, float b, float a)
- throws GLException {
- boolean noNeedForFlush = (haveCachedColor && (cachedColor == null) &&
- (r == cachedR) && (g == cachedG) && (b == cachedB) &&
- (a == cachedA));
-
- if (!noNeedForFlush) {
- flushGlyphPipeline();
- }
-
- getBackingStore().setColor(r, g, b, a);
- haveCachedColor = true;
- cachedR = r;
- cachedG = g;
- cachedB = b;
- cachedA = a;
- cachedColor = null;
- }
-
- /** Draws the supplied CharSequence at the desired location using
- the renderer's current color. The baseline of the leftmost
- character is at position (x, y) specified in OpenGL coordinates,
- where the origin is at the lower-left of the drawable and the Y
- coordinate increases in the upward direction.
-
- @param str the string to draw
- @param x the x coordinate at which to draw
- @param y the y coordinate at which to draw
- @throws GLException If an OpenGL context is not current when this method is called
- */
- public void draw(CharSequence str, int x, int y) throws GLException {
- draw3D(str, x, y, 0, 1);
- }
-
- /** Draws the supplied String at the desired location using the
- renderer's current color. See {@link #draw(CharSequence, int,
- int) draw(CharSequence, int, int)}. */
- public void draw(String str, int x, int y) throws GLException {
- draw3D(str, x, y, 0, 1);
- }
-
- /** Draws the supplied CharSequence at the desired 3D location using
- the renderer's current color. The baseline of the leftmost
- character is placed at position (x, y, z) in the current
- coordinate system.
-
- @param str the string to draw
- @param x the x coordinate at which to draw
- @param y the y coordinate at which to draw
- @param z the z coordinate at which to draw
- @param scaleFactor a uniform scale factor applied to the width and height of the drawn rectangle
- @throws GLException If an OpenGL context is not current when this method is called
- */
- public void draw3D(CharSequence str, float x, float y, float z,
- float scaleFactor) {
- internal_draw3D(str, x, y, z, scaleFactor);
- }
-
- /** Draws the supplied String at the desired 3D location using the
- renderer's current color. See {@link #draw3D(CharSequence,
- float, float, float, float) draw3D(CharSequence, float, float,
- float, float)}. */
- public void draw3D(String str, float x, float y, float z, float scaleFactor) {
- internal_draw3D(str, x, y, z, scaleFactor);
- }
-
- /** Returns the pixel width of the given character. */
- public float getCharWidth(char inChar) {
- return mGlyphProducer.getGlyphPixelWidth(inChar);
- }
-
- /** Causes the TextRenderer to flush any internal caches it may be
- maintaining and draw its rendering results to the screen. This
- should be called after each call to draw() if you are setting
- OpenGL state such as the modelview matrix between calls to
- draw(). */
- public void flush() {
- flushGlyphPipeline();
- }
-
- /** Ends a render cycle with this {@link TextRenderer TextRenderer}.
- Restores the projection and modelview matrices as well as
- several OpenGL state bits. Should be paired with {@link
- #beginRendering beginRendering}.
-
- @throws GLException If an OpenGL context is not current when this method is called
- */
- public void endRendering() throws GLException {
- endRendering(true);
- }
-
- /** Ends a 3D render cycle with this {@link TextRenderer TextRenderer}.
- Restores several OpenGL state bits. Should be paired with {@link
- #begin3DRendering begin3DRendering}.
-
- @throws GLException If an OpenGL context is not current when this method is called
- */
- public void end3DRendering() throws GLException {
- endRendering(false);
- }
-
- /** Disposes of all resources this TextRenderer is using. It is not
- valid to use the TextRenderer after this method is called.
-
- @throws GLException If an OpenGL context is not current when this method is called
- */
- public void dispose() throws GLException {
- packer.dispose();
- packer = null;
- cachedBackingStore = null;
- cachedGraphics = null;
- cachedFontRenderContext = null;
-
- if (dbgFrame != null) {
- dbgFrame.dispose();
- }
- }
-
- //----------------------------------------------------------------------
- // Internals only below this point
- //
-
- private static Rectangle2D preNormalize(Rectangle2D src) {
- // Need to round to integer coordinates
- // Also give ourselves a little slop around the reported
- // bounds of glyphs because it looks like neither the visual
- // nor the pixel bounds works perfectly well
- int minX = (int) Math.floor(src.getMinX()) - 1;
- int minY = (int) Math.floor(src.getMinY()) - 1;
- int maxX = (int) Math.ceil(src.getMaxX()) + 1;
- int maxY = (int) Math.ceil(src.getMaxY()) + 1;
- return new Rectangle2D.Double(minX, minY, maxX - minX, maxY - minY);
- }
-
-
- private Rectangle2D normalize(Rectangle2D src) {
- // Give ourselves a boundary around each entity on the backing
- // store in order to prevent bleeding of nearby Strings due to
- // the fact that we use linear filtering
-
- // NOTE that this boundary is quite heuristic and is related
- // to how far away in 3D we may view the text --
- // heuristically, 1.5% of the font's height
- int boundary = (int) Math.max(1, 0.015 * font.getSize());
-
- return new Rectangle2D.Double((int) Math.floor(src.getMinX() - boundary),
- (int) Math.floor(src.getMinY() - boundary),
- (int) Math.ceil(src.getWidth() + 2 * boundary),
- (int) Math.ceil(src.getHeight()) + 2 * boundary);
- }
-
- private TextureRenderer getBackingStore() {
- TextureRenderer renderer = (TextureRenderer) packer.getBackingStore();
-
- if (renderer != cachedBackingStore) {
- // Backing store changed since last time; discard any cached Graphics2D
- if (cachedGraphics != null) {
- cachedGraphics.dispose();
- cachedGraphics = null;
- cachedFontRenderContext = null;
- }
-
- cachedBackingStore = renderer;
- }
-
- return cachedBackingStore;
- }
-
- private Graphics2D getGraphics2D() {
- TextureRenderer renderer = getBackingStore();
-
- if (cachedGraphics == null) {
- cachedGraphics = renderer.createGraphics();
-
- // Set up composite, font and rendering hints
- cachedGraphics.setComposite(AlphaComposite.Src);
- cachedGraphics.setColor(Color.WHITE);
- cachedGraphics.setFont(font);
- cachedGraphics.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
- (antialiased ? RenderingHints.VALUE_TEXT_ANTIALIAS_ON
- : RenderingHints.VALUE_TEXT_ANTIALIAS_OFF));
- cachedGraphics.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS,
- (useFractionalMetrics
- ? RenderingHints.VALUE_FRACTIONALMETRICS_ON
- : RenderingHints.VALUE_FRACTIONALMETRICS_OFF));
- }
-
- return cachedGraphics;
- }
-
- private void beginRendering(boolean ortho, int width, int height,
- boolean disableDepthTestForOrtho) {
- GL2 gl = GLContext.getCurrentGL().getGL2();
-
- if (DEBUG && !debugged) {
- debug(gl);
- }
-
- inBeginEndPair = true;
- isOrthoMode = ortho;
- beginRenderingWidth = width;
- beginRenderingHeight = height;
- beginRenderingDepthTestDisabled = disableDepthTestForOrtho;
-
- if (ortho) {
- getBackingStore().beginOrthoRendering(width, height,
- disableDepthTestForOrtho);
- } else {
- getBackingStore().begin3DRendering();
- }
-
- // Push client attrib bits used by the pipelined quad renderer
- gl.glPushClientAttrib((int) GL2.GL_ALL_CLIENT_ATTRIB_BITS);
-
- if (!haveMaxSize) {
- // Query OpenGL for the maximum texture size and set it in the
- // RectanglePacker to keep it from expanding too large
- int[] sz = new int[1];
- gl.glGetIntegerv(GL2.GL_MAX_TEXTURE_SIZE, sz, 0);
- packer.setMaxSize(sz[0], sz[0]);
- haveMaxSize = true;
- }
-
- if (needToResetColor && haveCachedColor) {
- if (cachedColor == null) {
- getBackingStore().setColor(cachedR, cachedG, cachedB, cachedA);
- } else {
- getBackingStore().setColor(cachedColor);
- }
-
- needToResetColor = false;
- }
-
- // Disable future attempts to use mipmapping if TextureRenderer
- // doesn't support it
- if (mipmap && !getBackingStore().isUsingAutoMipmapGeneration()) {
- if (DEBUG) {
- System.err.println("Disabled mipmapping in TextRenderer");
- }
-
- mipmap = false;
- }
- }
-
- /**
- * emzic: here the call to glBindBuffer crashes on certain graphicscard/driver combinations
- * this is why the ugly try-catch block has been added, which falls back to the old textrenderer
- *
- * @param ortho
- * @throws GLException
- */
- private void endRendering(boolean ortho) throws GLException {
- flushGlyphPipeline();
-
- inBeginEndPair = false;
-
- GL2 gl = GLContext.getCurrentGL().getGL2();
-
- // Pop client attrib bits used by the pipelined quad renderer
- gl.glPopClientAttrib();
-
- // The OpenGL spec is unclear about whether this changes the
- // buffer bindings, so preemptively zero out the GL_ARRAY_BUFFER
- // binding
- if (is15Available(gl)) {
- try {
- gl.glBindBuffer(GL2.GL_ARRAY_BUFFER, 0);
- } catch (Exception e) {
- isExtensionAvailable_GL_VERSION_1_5 = false;
- }
- }
-
- if (ortho) {
- getBackingStore().endOrthoRendering();
- } else {
- getBackingStore().end3DRendering();
- }
-
- if (++numRenderCycles >= CYCLES_PER_FLUSH) {
- numRenderCycles = 0;
-
- if (DEBUG) {
- System.err.println("Clearing unused entries in endRendering()");
- }
-
- clearUnusedEntries();
- }
- }
-
- private void clearUnusedEntries() {
- final java.util.List deadRects = new ArrayList /*alpha
is true, allocates an alpha
- channel in the backing store image. No mipmap support is
- requested.
-
- @param width the width of the texture to render into
- @param height the height of the texture to render into
- @param alpha whether to allocate an alpha channel for the texture
- */
- public TextureRenderer(int width, int height, boolean alpha) {
- this(width, height, alpha, false);
- }
-
- /** Creates a new renderer with backing store of the specified width
- and height. If alpha
is true, allocates an alpha channel in the
- backing store image. If mipmap
is true, attempts to use OpenGL's
- automatic mipmap generation for better smoothing when rendering
- the TextureRenderer's contents at a distance.
-
- @param width the width of the texture to render into
- @param height the height of the texture to render into
- @param alpha whether to allocate an alpha channel for the texture
- @param mipmap whether to attempt use of automatic mipmap generation
- */
- public TextureRenderer(int width, int height, boolean alpha, boolean mipmap) {
- this(width, height, alpha, false, mipmap);
- }
-
- // Internal constructor to avoid confusion since alpha only makes
- // sense when intensity is not set
- private TextureRenderer(int width, int height, boolean alpha, boolean intensity, boolean mipmap) {
- this.alpha = alpha;
- this.intensity = intensity;
- this.mipmap = mipmap;
- init(width, height);
- }
-
- /** Creates a new renderer with a special kind of backing store
- which acts only as an alpha channel. No mipmap support is
- requested. Internally, this associates a GL_INTENSITY OpenGL
- texture with the backing store. */
- public static TextureRenderer createAlphaOnlyRenderer(int width, int height) {
- return createAlphaOnlyRenderer(width, height, false);
- }
-
- /** Creates a new renderer with a special kind of backing store
- which acts only as an alpha channel. If mipmap
is
- true, attempts to use OpenGL's automatic mipmap generation for
- better smoothing when rendering the TextureRenderer's contents
- at a distance. Internally, this associates a GL_INTENSITY OpenGL
- texture with the backing store. */
- public static TextureRenderer createAlphaOnlyRenderer(int width, int height, boolean mipmap) {
- return new TextureRenderer(width, height, false, true, mipmap);
- }
-
- /** Returns the width of the backing store of this renderer.
-
- @return the width of the backing store of this renderer
- */
- public int getWidth() {
- return image.getWidth();
- }
-
- /** Returns the height of the backing store of this renderer.
-
- @return the height of the backing store of this renderer
- */
- public int getHeight() {
- return image.getHeight();
- }
-
- /** Returns the size of the backing store of this renderer in a
- newly-allocated {@link java.awt.Dimension Dimension} object.
-
- @return the size of the backing store of this renderer
- */
- public Dimension getSize() {
- return getSize(null);
- }
-
- /** Returns the size of the backing store of this renderer. Uses the
- {@link java.awt.Dimension Dimension} object if one is supplied,
- or allocates a new one if null is passed.
-
- @param d a {@link java.awt.Dimension Dimension} object in which
- to store the results, or null to allocate a new one
-
- @return the size of the backing store of this renderer
- */
- public Dimension getSize(Dimension d) {
- if (d == null)
- d = new Dimension();
- d.setSize(image.getWidth(), image.getHeight());
- return d;
- }
-
- /** Sets the size of the backing store of this renderer. This may
- cause the OpenGL texture object associated with this renderer to
- be invalidated; it is not recommended to cache this texture
- object outside this class but to instead call {@link #getTexture
- getTexture} when it is needed.
-
- @param width the new width of the backing store of this renderer
- @param height the new height of the backing store of this renderer
- @throws GLException If an OpenGL context is not current when this method is called
- */
- public void setSize(int width, int height) throws GLException {
- init(width, height);
- }
-
- /** Sets the size of the backing store of this renderer. This may
- cause the OpenGL texture object associated with this renderer to
- be invalidated.
-
- @param d the new size of the backing store of this renderer
- @throws GLException If an OpenGL context is not current when this method is called
- */
- public void setSize(Dimension d) throws GLException {
- setSize(d.width, d.height);
- }
-
- /** Sets whether smoothing is enabled for the OpenGL texture; if so,
- uses GL_LINEAR interpolation for the minification and
- magnification filters. Defaults to true. Changes to this setting
- will not take effect until the next call to {@link
- #beginOrthoRendering beginOrthoRendering}.
-
- @param smoothing whether smoothing is enabled for the OpenGL texture
- */
- public void setSmoothing(boolean smoothing) {
- this.smoothing = smoothing;
- smoothingChanged = true;
- }
-
- /** Returns whether smoothing is enabled for the OpenGL texture; see
- {@link #setSmoothing setSmoothing}. Defaults to true.
-
- @return whether smoothing is enabled for the OpenGL texture
- */
- public boolean getSmoothing() {
- return smoothing;
- }
-
- /** Creates a {@link java.awt.Graphics2D Graphics2D} instance for
- rendering to the backing store of this renderer. The returned
- object should be disposed of using the normal {@link
- java.awt.Graphics#dispose() Graphics.dispose()} method once it
- is no longer being used.
-
- @return a new {@link java.awt.Graphics2D Graphics2D} object for
- rendering into the backing store of this renderer
- */
- public Graphics2D createGraphics() {
- return image.createGraphics();
- }
-
- /** Returns the underlying Java 2D {@link java.awt.Image Image}
- being rendered into. */
- public Image getImage() {
- return image;
- }
-
- /** Marks the given region of the TextureRenderer as dirty. This
- region, and any previously set dirty regions, will be
- automatically synchronized with the underlying Texture during
- the next {@link #getTexture getTexture} operation, at which
- point the dirty region will be cleared. It is not necessary for
- an OpenGL context to be current when this method is called.
-
- @param x the x coordinate (in Java 2D coordinates -- relative to
- upper left) of the region to update
- @param y the y coordinate (in Java 2D coordinates -- relative to
- upper left) of the region to update
- @param width the width of the region to update
- @param height the height of the region to update
- */
- public void markDirty(int x, int y, int width, int height) {
- Rectangle curRegion = new Rectangle(x, y, width, height);
- if (dirtyRegion == null) {
- dirtyRegion = curRegion;
- } else {
- dirtyRegion.add(curRegion);
- }
- }
-
- /** Returns the underlying OpenGL Texture object associated with
- this renderer, synchronizing any dirty regions of the
- TextureRenderer with the underlying OpenGL texture.
-
- @throws GLException If an OpenGL context is not current when this method is called
- */
- public Texture getTexture() throws GLException {
- if (dirtyRegion != null) {
- sync(dirtyRegion.x, dirtyRegion.y, dirtyRegion.width, dirtyRegion.height);
- dirtyRegion = null;
- }
-
- ensureTexture();
- return texture;
- }
-
- /** Disposes all resources associated with this renderer. It is not
- valid to use this renderer after calling this method.
-
- @throws GLException If an OpenGL context is not current when this method is called
- */
- public void dispose() throws GLException {
- if (texture != null) {
- texture.dispose();
- texture = null;
- }
- if (image != null) {
- image.flush();
- image = null;
- }
- }
-
- /** Convenience method which assists in rendering portions of the
- OpenGL texture to the screen, if the application intends to draw
- them as a flat overlay on to the screen. Pushes OpenGL state
- bits (GL_ENABLE_BIT, GL_DEPTH_BUFFER_BIT and GL_TRANSFORM_BIT);
- disables the depth test, back-face culling, and lighting;
- enables the texture in this renderer; and sets up the viewing
- matrices for orthographic rendering where the coordinates go
- from (0, 0) at the lower left to (width, height) at the upper
- right. Equivalent to beginOrthoRendering(width, height, true).
- {@link #endOrthoRendering} must be used in conjunction with this
- method to restore all OpenGL states.
-
- @param width the width of the current on-screen OpenGL drawable
- @param height the height of the current on-screen OpenGL drawable
-
- @throws GLException If an OpenGL context is not current when this method is called
- */
- public void beginOrthoRendering(int width, int height) throws GLException {
- beginOrthoRendering(width, height, true);
- }
-
- /** Convenience method which assists in rendering portions of the
- OpenGL texture to the screen, if the application intends to draw
- them as a flat overlay on to the screen. Pushes OpenGL state
- bits (GL_ENABLE_BIT, GL_DEPTH_BUFFER_BIT and GL_TRANSFORM_BIT);
- disables the depth test (if the "disableDepthTest" argument is
- true), back-face culling, and lighting; enables the texture in
- this renderer; and sets up the viewing matrices for orthographic
- rendering where the coordinates go from (0, 0) at the lower left
- to (width, height) at the upper right. {@link
- #endOrthoRendering} must be used in conjunction with this method
- to restore all OpenGL states.
-
- @param width the width of the current on-screen OpenGL drawable
- @param height the height of the current on-screen OpenGL drawable
- @param disableDepthTest whether the depth test should be disabled
-
- @throws GLException If an OpenGL context is not current when this method is called
- */
- public void beginOrthoRendering(int width, int height, boolean disableDepthTest) throws GLException {
- beginRendering(true, width, height, disableDepthTest);
- }
-
- /** Convenience method which assists in rendering portions of the
- OpenGL texture to the screen as 2D quads in 3D space. Pushes
- OpenGL state (GL_ENABLE_BIT); disables lighting; and enables the
- texture in this renderer. Unlike {@link #beginOrthoRendering
- beginOrthoRendering}, does not modify the depth test, back-face
- culling, lighting, or the modelview or projection matrices. The
- user is responsible for setting up the view matrices for correct
- results of {@link #draw3DRect draw3DRect}. {@link
- #end3DRendering} must be used in conjunction with this method to
- restore all OpenGL states.
-
- @throws GLException If an OpenGL context is not current when this method is called
- */
- public void begin3DRendering() throws GLException {
- beginRendering(false, 0, 0, false);
- }
-
- /** Changes the color of the polygons, and therefore the drawn
- images, this TextureRenderer produces. Use of this method is
- optional. The TextureRenderer uses the GL_MODULATE texture
- environment mode, which causes the portions of the rendered
- texture to be multiplied by the color of the rendered
- polygons. The polygon color can be varied to achieve effects
- like tinting of the overall output or fading in and out by
- changing the alpha of the color. drawOrthoRect(screenx, screeny, 0, 0, getWidth(),
- getHeight());
.
-
- @param screenx the on-screen x coordinate at which to draw the rectangle
- @param screeny the on-screen y coordinate (relative to lower left) at
- which to draw the rectangle
-
- @throws GLException If an OpenGL context is not current when this method is called
- */
- public void drawOrthoRect(int screenx, int screeny) throws GLException {
- drawOrthoRect(screenx, screeny, 0, 0, getWidth(), getHeight());
- }
-
- /** Draws an orthographically projected rectangle of the underlying
- texture to the specified location on the screen. All (x, y)
- coordinates are specified relative to the lower left corner of
- either the texture image or the current OpenGL drawable.
-
- @param screenx the on-screen x coordinate at which to draw the rectangle
- @param screeny the on-screen y coordinate (relative to lower left) at
- which to draw the rectangle
- @param texturex the x coordinate of the pixel in the texture of
- the lower left portion of the rectangle to draw
- @param texturey the y coordinate of the pixel in the texture
- (relative to lower left) of the lower left portion of the
- rectangle to draw
- @param width the width of the rectangle to draw
- @param height the height of the rectangle to draw
-
- @throws GLException If an OpenGL context is not current when this method is called
- */
- public void drawOrthoRect(int screenx, int screeny,
- int texturex, int texturey,
- int width, int height) throws GLException {
- draw3DRect(screenx, screeny, 0, texturex, texturey, width, height, 1);
- }
-
- /** Draws a rectangle of the underlying texture to the specified 3D
- location. In the current coordinate system, the lower left
- corner of the rectangle is placed at (x, y, z), and the upper
- right corner is placed at (x + width * scaleFactor, y + height *
- scaleFactor, z). The lower left corner of the sub-rectangle of
- the texture is (texturex, texturey) and the upper right corner
- is (texturex + width, texturey + height). For back-face culling
- purposes, the rectangle is drawn with counterclockwise
- orientation of the vertices when viewed from the front.
-
- @param x the x coordinate at which to draw the rectangle
- @param y the y coordinate at which to draw the rectangle
- @param z the z coordinate at which to draw the rectangle
- @param texturex the x coordinate of the pixel in the texture of
- the lower left portion of the rectangle to draw
- @param texturey the y coordinate of the pixel in the texture
- (relative to lower left) of the lower left portion of the
- rectangle to draw
- @param width the width in texels of the rectangle to draw
- @param height the height in texels of the rectangle to draw
- @param scaleFactor the scale factor to apply (multiplicatively)
- to the size of the drawn rectangle
-
- @throws GLException If an OpenGL context is not current when this method is called
- */
- public void draw3DRect(float x, float y, float z,
- int texturex, int texturey,
- int width, int height,
- float scaleFactor) throws GLException {
- GL2 gl = GLContext.getCurrentGL().getGL2();
- Texture texture = getTexture();
- TextureCoords coords = texture.getSubImageTexCoords(texturex, texturey,
- texturex + width,
- texturey + height);
- gl.glBegin(GL2.GL_QUADS);
- gl.glTexCoord2f(coords.left(), coords.bottom());
- gl.glVertex3f(x, y, z);
- gl.glTexCoord2f(coords.right(), coords.bottom());
- gl.glVertex3f(x + width * scaleFactor, y, z);
- gl.glTexCoord2f(coords.right(), coords.top());
- gl.glVertex3f(x + width * scaleFactor, y + height * scaleFactor, z);
- gl.glTexCoord2f(coords.left(), coords.top());
- gl.glVertex3f(x, y + height * scaleFactor, z);
- gl.glEnd();
- }
-
- /** Convenience method which assists in rendering portions of the
- OpenGL texture to the screen, if the application intends to draw
- them as a flat overlay on to the screen. Must be used if {@link
- #beginOrthoRendering} is used to set up the rendering stage for
- this overlay.
-
- @throws GLException If an OpenGL context is not current when this method is called
- */
- public void endOrthoRendering() throws GLException {
- endRendering(true);
- }
-
- /** Convenience method which assists in rendering portions of the
- OpenGL texture to the screen as 2D quads in 3D space. Must be
- used if {@link #begin3DRendering} is used to set up the
- rendering stage for this overlay.
-
- @throws GLException If an OpenGL context is not current when this method is called
- */
- public void end3DRendering() throws GLException {
- endRendering(false);
- }
-
- /** Indicates whether automatic mipmap generation is in use for this
- TextureRenderer. The result of this method may change from true
- to false if it is discovered during allocation of the
- TextureRenderer's backing store that automatic mipmap generation
- is not supported at the OpenGL level. */
- public boolean isUsingAutoMipmapGeneration() {
- return mipmap;
- }
-
- //----------------------------------------------------------------------
- // Internals only below this point
- //
-
- private void beginRendering(boolean ortho, int width, int height, boolean disableDepthTestForOrtho) {
- GL2 gl = GLContext.getCurrentGL().getGL2();
- int attribBits =
- GL2.GL_ENABLE_BIT | GL2.GL_TEXTURE_BIT | GL2.GL_COLOR_BUFFER_BIT |
- (ortho ? (GL2.GL_DEPTH_BUFFER_BIT | GL2.GL_TRANSFORM_BIT) : 0);
- gl.glPushAttrib(attribBits);
- gl.glDisable(GL2.GL_LIGHTING);
- if (ortho) {
- if (disableDepthTestForOrtho) {
- gl.glDisable(GL2.GL_DEPTH_TEST);
- }
- gl.glDisable(GL2.GL_CULL_FACE);
- gl.glMatrixMode(GL2.GL_PROJECTION);
- gl.glPushMatrix();
- gl.glLoadIdentity();
- glu.gluOrtho2D(0, width, 0, height);
- gl.glMatrixMode(GL2.GL_MODELVIEW);
- gl.glPushMatrix();
- gl.glLoadIdentity();
- gl.glMatrixMode(GL2.GL_TEXTURE);
- gl.glPushMatrix();
- gl.glLoadIdentity();
- }
- gl.glEnable(GL2.GL_BLEND);
- gl.glBlendFunc(GL2.GL_ONE, GL2.GL_ONE_MINUS_SRC_ALPHA);
- Texture texture = getTexture();
- texture.enable();
- texture.bind();
- gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL2.GL_MODULATE);
- // Change polygon color to last saved
- gl.glColor4f(r, g, b, a);
- if (smoothingChanged) {
- smoothingChanged = false;
- if (smoothing) {
- texture.setTexParameteri(GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_LINEAR);
- if (mipmap) {
- texture.setTexParameteri(GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_LINEAR_MIPMAP_LINEAR);
- } else {
- texture.setTexParameteri(GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_LINEAR);
- }
- } else {
- texture.setTexParameteri(GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_NEAREST);
- texture.setTexParameteri(GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_NEAREST);
- }
- }
- }
-
- private void endRendering(boolean ortho) {
- GL2 gl = GLContext.getCurrentGL().getGL2();
- Texture texture = getTexture();
- texture.disable();
- if (ortho) {
- gl.glMatrixMode(GL2.GL_PROJECTION);
- gl.glPopMatrix();
- gl.glMatrixMode(GL2.GL_MODELVIEW);
- gl.glPopMatrix();
- gl.glMatrixMode(GL2.GL_TEXTURE);
- gl.glPopMatrix();
- }
- gl.glPopAttrib();
- }
-
- private void init(int width, int height) {
- GL2 gl = GLContext.getCurrentGL().getGL2();
- // Discard previous BufferedImage if any
- if (image != null) {
- image.flush();
- image = null;
- }
-
- // Infer the internal format if not an intensity texture
- int internalFormat = (intensity ? GL2.GL_INTENSITY : 0);
- int imageType =
- (intensity ? BufferedImage.TYPE_BYTE_GRAY :
- (alpha ? BufferedImage.TYPE_INT_ARGB_PRE : BufferedImage.TYPE_INT_RGB));
- image = new BufferedImage(width, height, imageType);
- // Always realllocate the TextureData associated with this
- // BufferedImage; it's just a reference to the contents but we
- // need it in order to update sub-regions of the underlying
- // texture
- textureData = new AWTTextureData(gl.getGLProfile(), internalFormat, 0, mipmap, image);
- // For now, always reallocate the underlying OpenGL texture when
- // the backing store size changes
- mustReallocateTexture = true;
- }
-
- /** Synchronizes the specified region of the backing store down to
- the underlying OpenGL texture. If {@link #markDirty markDirty}
- is used instead to indicate the regions that are out of sync,
- this method does not need to be called.
-
- @param x the x coordinate (in Java 2D coordinates -- relative to
- upper left) of the region to update
- @param y the y coordinate (in Java 2D coordinates -- relative to
- upper left) of the region to update
- @param width the width of the region to update
- @param height the height of the region to update
-
- @throws GLException If an OpenGL context is not current when this method is called
- */
- private void sync(int x, int y, int width, int height) throws GLException {
- // Force allocation if necessary
- boolean canSkipUpdate = ensureTexture();
-
- if (!canSkipUpdate) {
- // Update specified region.
- // NOTE that because BufferedImage-based TextureDatas now don't
- // do anything to their contents, the coordinate systems for
- // OpenGL and Java 2D actually line up correctly for
- // updateSubImage calls, so we don't need to do any argument
- // conversion here (i.e., flipping the Y coordinate).
- texture.updateSubImage(textureData, 0, x, y, x, y, width, height);
- }
- }
-
- // Returns true if the texture was newly allocated, false if not
- private boolean ensureTexture() {
- if (mustReallocateTexture) {
- if (texture != null) {
- texture.dispose();
- texture = null;
- }
- mustReallocateTexture = false;
- }
-
- if (texture == null) {
- texture = TextureIO.newTexture(textureData);
- if (mipmap && !texture.isUsingAutoMipmapGeneration()) {
- // Only try this once
- texture.dispose();
- mipmap = false;
- textureData.setMipmap(false);
- texture = TextureIO.newTexture(textureData);
- }
-
- if (!smoothing) {
- // The TextureIO classes default to GL_LINEAR filtering
- texture.setTexParameteri(GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_NEAREST);
- texture.setTexParameteri(GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_NEAREST);
- }
- return true;
- }
-
- return false;
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/gl2/BitmapCharRec.java b/src/jogl/classes/com/sun/opengl/util/gl2/BitmapCharRec.java
deleted file mode 100644
index 9738be60a..000000000
--- a/src/jogl/classes/com/sun/opengl/util/gl2/BitmapCharRec.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.util.gl2;
-
-/* Copyright (c) Mark J. Kilgard, 1994, 1998. */
-
-/* This program is freely distributable without licensing fees
- and is provided without guarantee or warrantee expressed or
- implied. This program is -not- in the public domain. */
-
-class BitmapCharRec {
- public int width;
- public int height;
- public float xorig;
- public float yorig;
- public float advance;
- public byte[] bitmap;
-
- public BitmapCharRec(int width,
- int height,
- float xorig,
- float yorig,
- float advance,
- byte[] bitmap) {
- this.width = width;
- this.height = height;
- this.xorig = xorig;
- this.yorig = yorig;
- this.advance = advance;
- this.bitmap = bitmap;
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/gl2/BitmapFontRec.java b/src/jogl/classes/com/sun/opengl/util/gl2/BitmapFontRec.java
deleted file mode 100644
index d110c262b..000000000
--- a/src/jogl/classes/com/sun/opengl/util/gl2/BitmapFontRec.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.util.gl2;
-
-/* Copyright (c) Mark J. Kilgard, 1994, 1998. */
-
-/* This program is freely distributable without licensing fees
- and is provided without guarantee or warrantee expressed or
- implied. This program is -not- in the public domain. */
-
-class BitmapFontRec {
- public String name;
- public int num_chars;
- public int first;
- public BitmapCharRec[] ch;
-
- public BitmapFontRec(String name,
- int num_chars,
- int first,
- BitmapCharRec[] ch) {
- this.name = name;
- this.num_chars = num_chars;
- this.first = first;
- this.ch = ch;
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/gl2/CoordRec.java b/src/jogl/classes/com/sun/opengl/util/gl2/CoordRec.java
deleted file mode 100644
index e87354dbf..000000000
--- a/src/jogl/classes/com/sun/opengl/util/gl2/CoordRec.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.util.gl2;
-
-/* Copyright (c) Mark J. Kilgard, 1994, 1998. */
-
-/* This program is freely distributable without licensing fees
- and is provided without guarantee or warrantee expressed or
- implied. This program is -not- in the public domain. */
-
-class CoordRec {
- public float x;
- public float y;
-
- public CoordRec(float x, float y) {
- this.x = x;
- this.y = y;
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/gl2/GLUT.java b/src/jogl/classes/com/sun/opengl/util/gl2/GLUT.java
deleted file mode 100644
index 5a1f7d12d..000000000
--- a/src/jogl/classes/com/sun/opengl/util/gl2/GLUT.java
+++ /dev/null
@@ -1,1342 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.util.gl2;
-
-import javax.media.opengl.*;
-import javax.media.opengl.glu.*;
-import javax.media.opengl.glu.gl2.*;
-
-/** Subset of the routines provided by the GLUT interface. Note the
- signatures of many of the methods are necessarily different than
- the corresponding C version. A GLUT object must only be used from
- one particular thread at a time.
- * Puts this ShaderState to to the thread local storage (TLS),
- * if on
is true
.
- *
- * @see javax.media.opengl.glsl.ShaderState#glUseProgram(GL2ES2, boolean)
- * @see javax.media.opengl.glsl.ShaderState#getCurrent()
- */
- public synchronized void glUseProgram(GL2ES2 gl, boolean on) {
- if(on) {
- if(null!=shaderProgram) {
- shaderProgram.glUseProgram(gl, true);
- } else {
- throw new GLException("No program is attached");
- }
- // update the current ShaderState to the TLS ..
- gl.getContext().putAttachedObject(ShaderState.class.getName(), this);
- } else if(null!=shaderProgram) {
- shaderProgram.glUseProgram(gl, false);
- }
- }
-
- public boolean linked() {
- return (null!=shaderProgram)?shaderProgram.linked():false;
- }
-
- public boolean inUse() {
- return (null!=shaderProgram)?shaderProgram.inUse():false;
- }
-
- /**
- * Attach or switch a shader program
- *
- * Attaching a shader program the first time,
- * as well as switching to another program on the fly,
- * while managing all attribute and uniform data.
- */
- public synchronized void attachShaderProgram(GL2ES2 gl, ShaderProgram prog) {
- boolean prgInUse = false; // earmarked state
-
- if(DEBUG) {
- int curId = (null!=shaderProgram)?shaderProgram.id():-1;
- int newId = (null!=prog)?prog.id():-1;
- System.err.println("Info: attachShaderProgram: "+curId+" -> "+newId+"\n\t"+shaderProgram+"\n\t"+prog);
- if(verbose) {
- Throwable tX = new Throwable("Info: attachShaderProgram: Trace");
- tX.printStackTrace();
- }
- }
- if(null!=shaderProgram) {
- if(shaderProgram.equals(prog)) {
- // nothing to do ..
- if(DEBUG) {
- System.err.println("Info: attachShaderProgram: NOP: equal id: "+shaderProgram.id());
- }
- return;
- }
- prgInUse = shaderProgram.inUse();
- shaderProgram.glUseProgram(gl, false);
- }
-
- // register new one
- shaderProgram = prog;
-
- if(null!=shaderProgram) {
- // reinstall all data ..
- shaderProgram.glUseProgram(gl, true);
- glResetAllVertexAttributes(gl);
- glResetAllUniforms(gl);
- if(!prgInUse) {
- shaderProgram.glUseProgram(gl, false);
- }
- }
- if(DEBUG) {
- System.err.println("Info: attachShaderProgram: END");
- }
- }
-
- public ShaderProgram shaderProgram() { return shaderProgram; }
-
- /**
- * Calls release(gl, true, true)
- *
- * @see #glReleaseAllVertexAttributes
- * @see #glReleaseAllUniforms
- * @see #release(GL2ES2, boolean, boolean)
- */
- public synchronized void destroy(GL2ES2 gl) {
- release(gl, true, true);
- }
-
- /**
- * Calls release(gl, false, false)
- *
- * @see #glReleaseAllVertexAttributes
- * @see #glReleaseAllUniforms
- * @see #release(GL2ES2, boolean, boolean)
- */
- public synchronized void releaseAllData(GL2ES2 gl) {
- release(gl, false, false);
- }
-
- /**
- * @see #glReleaseAllVertexAttributes
- * @see #glReleaseAllUniforms
- * @see ShaderProgram#release(GL2ES2, boolean)
- */
- public synchronized void release(GL2ES2 gl, boolean releaseProgramToo, boolean releaseShaderToo) {
- boolean prgInUse = false;
- if(null!=shaderProgram) {
- prgInUse = shaderProgram.inUse();
- if(!prgInUse) {
- shaderProgram.glUseProgram(gl, true);
- }
- }
- glReleaseAllVertexAttributes(gl);
- glReleaseAllUniforms(gl);
- if(null!=shaderProgram) {
- if(releaseProgramToo) {
- shaderProgram.release(gl, releaseShaderToo);
- } else if(!prgInUse) {
- shaderProgram.glUseProgram(gl, false);
- }
- }
- }
-
- //
- // Shader attribute handling
- //
-
- /**
- * Binds an attribute to the shader.
- * This must be done before the program is linked !
- * n name - 1 idx, where name is a uniq key
- *
- * @throws GLException is the program is already linked
- *
- * @see #glBindAttribLocation
- * @see javax.media.opengl.GL2ES2#glBindAttribLocation
- * @see #glGetAttribLocation
- * @see javax.media.opengl.GL2ES2#glGetAttribLocation
- * @see #getAttribLocation
- * @see #glReplaceShader
- */
- public void glBindAttribLocation(GL2ES2 gl, int index, String name) {
- if(null==shaderProgram) throw new GLException("No program is attached");
- if(shaderProgram.linked()) throw new GLException("Program is already linked");
- Integer idx = new Integer(index);
- if(!attribMap2Idx.containsKey(name)) {
- attribMap2Idx.put(name, idx);
- gl.glBindAttribLocation(shaderProgram.program(), index, name);
- }
- }
-
- /**
- * Gets the index of a shader attribute.
- * This must be done after the program is linked !
- *
- * @return -1 if there is no such attribute available,
- * otherwise >= 0
- * @throws GLException is the program is not linked
- *
- * @see #glBindAttribLocation
- * @see javax.media.opengl.GL2ES2#glBindAttribLocation
- * @see #glGetAttribLocation
- * @see javax.media.opengl.GL2ES2#glGetAttribLocation
- * @see #getAttribLocation
- * @see #glReplaceShader
- */
- public int glGetAttribLocation(GL2ES2 gl, String name) {
- if(!shaderProgram.linked()) throw new GLException("Program is not linked");
- int index = getAttribLocation(name);
- if(0>index) {
- index = gl.glGetAttribLocation(shaderProgram.program(), name);
- if(0<=index) {
- Integer idx = new Integer(index);
- attribMap2Idx.put(name, idx);
- if(DEBUG) {
- System.err.println("Info: glGetAttribLocation: "+name+", loc: "+index);
- }
- } else if(verbose) {
- Throwable tX = new Throwable("Info: glGetAttribLocation failed, no location for: "+name+", index: "+index);
- tX.printStackTrace();
- }
- }
- return index;
- }
-
- protected int getAttribLocation(String name) {
- Integer idx = (Integer) attribMap2Idx.get(name);
- return (null!=idx)?idx.intValue():-1;
- }
-
-
- //
- // Enabled Vertex Arrays and its data
- //
-
- /**
- * Enable a vertex attribute array
- *
- * Even if the attribute is not found in the current shader,
- * it is stored in this state.
- *
- * @returns false, if the name is not found, otherwise true
- *
- * @throws GLException if the program is not in use
- *
- * @see #glEnableVertexAttribArray
- * @see #glDisableVertexAttribArray
- * @see #glVertexAttribPointer
- * @see #getVertexAttributePointer
- * @see #glReleaseAllVertexAttributes
- * @see #glResetAllVertexAttributes
- * @see #glReplaceShader
- */
- public boolean glEnableVertexAttribArray(GL2ES2 gl, String name) {
- if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
- enabledVertexAttribArraySet.add(name);
- int index = glGetAttribLocation(gl, name);
- if(0>index) {
- if(verbose) {
- Throwable tX = new Throwable("Info: glEnableVertexAttribArray failed, no index for: "+name);
- tX.printStackTrace();
- }
- return false;
- }
- if(DEBUG) {
- System.err.println("Info: glEnableVertexAttribArray: "+name+", loc: "+index);
- }
- gl.glEnableVertexAttribArray(index);
- return true;
- }
-
- public boolean isVertexAttribArrayEnabled(String name) {
- if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
- return enabledVertexAttribArraySet.contains(name);
- }
-
- /**
- * Disables a vertex attribute array
- *
- * Even if the attribute is not found in the current shader,
- * it is removed from this state.
- *
- * @returns false, if the name is not found, otherwise true
- *
- * @throws GLException if the program is not in use
- *
- * @see #glEnableVertexAttribArray
- * @see #glDisableVertexAttribArray
- * @see #glVertexAttribPointer
- * @see #getVertexAttributePointer
- * @see #glReleaseAllVertexAttributes
- * @see #glResetAllVertexAttributes
- * @see #glReplaceShader
- */
- public boolean glDisableVertexAttribArray(GL2ES2 gl, String name) {
- if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
- enabledVertexAttribArraySet.remove(name);
- int index = glGetAttribLocation(gl, name);
- if(0>index) {
- if(verbose) {
- Throwable tX = new Throwable("Info: glDisableVertexAttribArray failed, no index for: "+name);
- tX.printStackTrace();
- }
- return false;
- }
- if(DEBUG) {
- System.err.println("Info: glDisableVertexAttribArray: "+name);
- }
- gl.glDisableVertexAttribArray(index);
- return true;
- }
-
- /**
- * Set the vertex attribute data.
- * Enable the attribute, if it is not enabled yet.
- *
- * Even if the attribute is not found in the current shader,
- * it is stored in this state.
- *
- * @param data the GLArrayData's name must match the attributes one,
- * it's index will be set with the attribute's location,
- * if found.
- *
- * @returns false, if the name is not found, otherwise true
- *
- * @throws GLException if the program is not in use
- *
- * @see #glEnableVertexAttribArray
- * @see #glDisableVertexAttribArray
- * @see #glVertexAttribPointer
- * @see #getVertexAttributePointer
- * @see #glReleaseAllVertexAttributes
- * @see #glResetAllVertexAttributes
- * @see #glReplaceShader
- */
- public boolean glVertexAttribPointer(GL2ES2 gl, GLArrayData data) {
- if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
- if(!enabledVertexAttribArraySet.contains(data.getName())) {
- if(!glEnableVertexAttribArray(gl, data.getName())) {
- if(verbose) {
- Throwable tX = new Throwable("Info: glVertexAttribPointer: couldn't enable: "+data);
- tX.printStackTrace();
- }
- }
- }
- int index = getAttribLocation(data.getName());
- if(0>index) {
- if(verbose) {
- Throwable tX = new Throwable("Info: glVertexAttribPointer failed, no index for: "+data);
- tX.printStackTrace();
- }
- }
- data.setLocation(index);
- vertexAttribMap2Data.put(data.getName(), data);
- if(0<=index) {
- // only pass the data, if the attribute exists in the current shader
- if(DEBUG) {
- System.err.println("Info: glVertexAttribPointer: "+data);
- }
- gl.glVertexAttribPointer(data);
- return true;
- }
- return false;
- }
-
- /**
- * Get the vertex attribute data, previously set.
- *
- * @returns the GLArrayData object, null if not previously set.
- *
- * @see #glEnableVertexAttribArray
- * @see #glDisableVertexAttribArray
- * @see #glVertexAttribPointer
- * @see #getVertexAttributePointer
- * @see #glReleaseAllVertexAttributes
- * @see #glResetAllVertexAttributes
- * @see #glReplaceShader
- */
- public GLArrayData getVertexAttribPointer(String name) {
- return (GLArrayData) vertexAttribMap2Data.get(name);
- }
-
- /**
- * Releases all mapped vertex attribute data,
- * disables all enabled attributes and loses all indices
- *
- * @throws GLException is the program is not in use but the shaderProgram is set
- *
- * @see #glEnableVertexAttribArray
- * @see #glDisableVertexAttribArray
- * @see #glVertexAttribPointer
- * @see #getVertexAttributePointer
- * @see #glReleaseAllVertexAttributes
- * @see #glResetAllVertexAttributes
- * @see #glResetAllVertexAttributes
- * @see #glReplaceShader
- */
- public void glReleaseAllVertexAttributes(GL2ES2 gl) {
- if(null!=shaderProgram) {
- if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
- for(Iterator iter = vertexAttribMap2Data.keySet().iterator(); iter.hasNext(); ) {
- if(!glDisableVertexAttribArray(gl, (String) iter.next())) {
- throw new GLException("Internal Error: mapped vertex attribute couldn't be disabled");
- }
- }
- for(Iterator iter = enabledVertexAttribArraySet.iterator(); iter.hasNext(); ) {
- if(!glDisableVertexAttribArray(gl, (String) iter.next())) {
- throw new GLException("Internal Error: prev enabled vertex attribute couldn't be disabled");
- }
- }
- }
- vertexAttribMap2Data.clear();
- enabledVertexAttribArraySet.clear();
- attribMap2Idx.clear();
- }
-
- /**
- * Disables all vertex attribute arrays.
- *
- * Their enabled stated will be removed from this state only
- * if 'removeFromState' is true.
- *
- * This method purpose is more for debugging.
- *
- * @throws GLException is the program is not in use but the shaderProgram is set
- *
- * @see #glEnableVertexAttribArray
- * @see #glDisableVertexAttribArray
- * @see #glVertexAttribPointer
- * @see #getVertexAttributePointer
- * @see #glReleaseAllVertexAttributes
- * @see #glResetAllVertexAttributes
- * @see #glResetAllVertexAttributes
- * @see #glReplaceShader
- */
- public void glDisableAllVertexAttributeArrays(GL2ES2 gl, boolean removeFromState) {
- if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
-
- for(Iterator iter = enabledVertexAttribArraySet.iterator(); iter.hasNext(); ) {
- String name = (String) iter.next();
- if(removeFromState) {
- enabledVertexAttribArraySet.remove(name);
- }
- int index = glGetAttribLocation(gl, name);
- if(0<=index) {
- gl.glDisableVertexAttribArray(index);
- }
- }
- }
-
- /**
- * Reset all previously enabled mapped vertex attribute data,
- * incl enabling them
- *
- * @throws GLException is the program is not in use
- *
- * @see #glEnableVertexAttribArray
- * @see #glDisableVertexAttribArray
- * @see #glVertexAttribPointer
- * @see #getVertexAttributePointer
- * @see #glReleaseAllVertexAttributes
- * @see #glResetAllVertexAttributes
- * @see #glReplaceShader
- */
- public void glResetAllVertexAttributes(GL2ES2 gl) {
- if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
- attribMap2Idx.clear();
-
- /**
- *
- for(Iterator iter = enabledVertexAttribArraySet.iterator(); iter.hasNext(); ) {
- glEnableVertexAttribArray(gl, (String) iter.next());
- }
- for(Iterator iter = vertexAttribMap2Data.values().iterator(); iter.hasNext(); ) {
- GLArrayData data = (GLArrayData) iter.next();
-
- ...
- } */
-
- for(Iterator iter = enabledVertexAttribArraySet.iterator(); iter.hasNext(); ) {
- // get new location ..
- String name = (String) iter.next();
- int loc = glGetAttribLocation(gl, name);
-
- // get & update data ..
- GLArrayData data = getVertexAttribPointer(name);
- data.setLocation(loc);
- vertexAttribMap2Data.put(name, data);
-
- if(0>loc) {
- // not used in shader
- continue;
- }
-
- // enable attrib, VBO and pass location/data
- gl.glEnableVertexAttribArray(loc);
-
- if( data.isVBO() ) {
- gl.glBindBuffer(GL.GL_ARRAY_BUFFER, data.getVBOName());
- }
-
- gl.glVertexAttribPointer(data);
- }
- }
-
- //
- // Shader Uniform handling
- //
-
- /**
- * Gets the index of a shader uniform.
- * This must be done when the program is in use !
- *
- * @return -1 if there is no such attribute available,
- * otherwise >= 0
-
- * @throws GLException is the program is not linked
- *
- * @see #glGetUniformLocation
- * @see javax.media.opengl.GL2ES2#glGetUniformLocation
- * @see #getUniformLocation
- * @see #glReplaceShader
- */
- protected int glGetUniformLocation(GL2ES2 gl, String name) {
- if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
- int index = getUniformLocation(name);
- if(0>index) {
- index = gl.glGetUniformLocation(shaderProgram.program(), name);
- if(0<=index) {
- Integer idx = new Integer(index);
- uniformMap2Idx.put(name, idx);
- } else if(verbose) {
- Throwable tX = new Throwable("Info: glUniform failed, no location for: "+name+", index: "+index);
- tX.printStackTrace();
- }
- }
- return index;
- }
-
- protected int getUniformLocation(String name) {
- Integer idx = (Integer) uniformMap2Idx.get(name);
- return (null!=idx)?idx.intValue():-1;
- }
-
- /**
- * Set the uniform data.
- *
- * Even if the uniform is not found in the current shader,
- * it is stored in this state.
- *
- * @param data the GLUniforms's name must match the uniform one,
- * it's index will be set with the uniforms's location,
- * if found.
- *
- *
- * @returns false, if the name is not found, otherwise true
- *
- * @throws GLException if the program is not in use
- *
- * @see #glGetUniformLocation
- * @see javax.media.opengl.GL2ES2#glGetUniformLocation
- * @see #getUniformLocation
- * @see #glReplaceShader
- */
- public boolean glUniform(GL2ES2 gl, GLUniformData data) {
- if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
- int location = glGetUniformLocation(gl, data.getName());
- data.setLocation(location);
- uniformMap2Data.put(data.getName(), data);
- if(0<=location) {
- // only pass the data, if the uniform exists in the current shader
- if(DEBUG) {
- System.err.println("Info: glUniform: "+data);
- }
- gl.glUniform(data);
- }
- return true;
- }
-
- /**
- * Get the uniform data, previously set.
- *
- * @returns the GLUniformData object, null if not previously set.
- */
- public GLUniformData getUniform(String name) {
- return (GLUniformData) uniformMap2Data.get(name);
- }
-
- /**
- * Releases all mapped uniform data
- * and loses all indices
- *
- * @throws GLException is the program is not in use
- */
- public void glReleaseAllUniforms(GL2ES2 gl) {
- uniformMap2Data.clear();
- uniformMap2Idx.clear();
- }
-
- /**
- * Reset all previously mapped uniform data
- *
- * @throws GLException is the program is not in use
- */
- public void glResetAllUniforms(GL2ES2 gl) {
- if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
- uniformMap2Idx.clear();
- for(Iterator iter = uniformMap2Data.values().iterator(); iter.hasNext(); ) {
- glUniform(gl, (GLUniformData) iter.next());
- }
- }
-
- public String toString() {
- StringBuffer buf = new StringBuffer();
- buf.append("ShaderState[");
- buf.append(shaderProgram.toString());
- buf.append(",EnabledStates: [");
- for(Iterator iter = enabledVertexAttribArraySet.iterator(); iter.hasNext(); ) {
- buf.append("\n ");
- buf.append((String)iter.next());
- }
- buf.append("], [");
- for(Iterator iter = vertexAttribMap2Data.values().iterator(); iter.hasNext(); ) {
- GLArrayData data = (GLArrayData) iter.next();
- if(data.getLocation()>=0) {
- buf.append("\n ");
- buf.append(data);
- }
- }
- buf.append("], [");
- for(Iterator iter=uniformMap2Data.values().iterator(); iter.hasNext(); ) {
- GLUniformData data = (GLUniformData) iter.next();
- if(data.getLocation()>=0) {
- buf.append("\n ");
- buf.append(data);
- }
- }
- buf.append("]");
- return buf.toString();
- }
-
- protected boolean verbose = false;
- protected ShaderProgram shaderProgram=null;
- protected HashMap attribMap2Idx = new HashMap();
- protected HashSet enabledVertexAttribArraySet = new HashSet();
- protected HashMap vertexAttribMap2Data = new HashMap();
- protected HashMap uniformMap2Idx = new HashMap();
- protected HashMap uniformMap2Data = new HashMap();
-
-}
-
diff --git a/src/jogl/classes/com/sun/opengl/util/glsl/ShaderUtil.java b/src/jogl/classes/com/sun/opengl/util/glsl/ShaderUtil.java
deleted file mode 100644
index 390fb27c7..000000000
--- a/src/jogl/classes/com/sun/opengl/util/glsl/ShaderUtil.java
+++ /dev/null
@@ -1,476 +0,0 @@
-/*
- * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.sun.opengl.util.glsl;
-
-import java.io.PrintStream;
-import java.nio.*;
-import java.util.*;
-
-import javax.media.opengl.*;
-
-public class ShaderUtil {
- static abstract class Impl {
- public abstract String getShaderInfoLog(GL gl, int shaderObj);
- public abstract String getProgramInfoLog(GL gl, int programObj);
- public abstract boolean isShaderStatusValid(GL gl, int shaderObj, int name);
- public abstract boolean isShaderStatusValid(GL gl, int shaderObj, int name, PrintStream verboseOut);
- public abstract boolean isShaderStatusValid(GL gl, IntBuffer shaders, int name);
- public abstract boolean isShaderStatusValid(GL gl, IntBuffer shaders, int name, PrintStream verboseOut);
- public abstract boolean isProgramStatusValid(GL gl, int programObj, int name);
- public abstract boolean isProgramValid(GL gl, int programObj);
- public abstract boolean isProgramValid(GL gl, int programObj, PrintStream verboseOut);
- public abstract void createShader(GL gl, int type, IntBuffer shaders);
- public abstract Set getShaderBinaryFormats(GL gl);
- public abstract boolean isShaderCompilerAvailable(GL gl);
- public abstract void shaderSource(GL gl, int shader, java.lang.String[] source);
- public abstract void shaderSource(GL gl, IntBuffer shaders, java.lang.String[][] sources);
- public abstract void shaderBinary(GL gl, IntBuffer shaders, int binFormat, java.nio.Buffer bin);
- public abstract void compileShader(GL gl, IntBuffer shaders);
- public abstract void attachShader(GL gl, int program, IntBuffer shaders);
- public abstract void detachShader(GL gl, int program, IntBuffer shaders);
- public abstract void deleteShader(GL gl, IntBuffer shaders);
-
- public abstract boolean createAndLoadShader(GL gl, IntBuffer shader, int shaderType,
- int binFormat, java.nio.Buffer bin,
- PrintStream verboseOut);
-
- public abstract boolean createAndCompileShader(GL gl, IntBuffer shader, int shaderType,
- java.lang.String[][] sources,
- PrintStream verboseOut);
- }
-
- static class GL2ES2Impl extends Impl {
- public String getShaderInfoLog(GL _gl, int shaderObj) {
- GL2ES2 gl = _gl.getGL2ES2();
- int[] infoLogLength=new int[1];
- gl.glGetShaderiv(shaderObj, gl.GL_INFO_LOG_LENGTH, infoLogLength, 0);
-
- if(infoLogLength[0]==0) {
- return "(no info log)";
- }
- int[] charsWritten=new int[1];
- byte[] infoLogBytes = new byte[infoLogLength[0]];
- gl.glGetShaderInfoLog(shaderObj, infoLogLength[0], charsWritten, 0, infoLogBytes, 0);
-
- return new String(infoLogBytes, 0, charsWritten[0]);
- }
-
- public String getProgramInfoLog(GL _gl, int programObj) {
- GL2ES2 gl = _gl.getGL2ES2();
- int[] infoLogLength=new int[1];
- gl.glGetProgramiv(programObj, gl.GL_INFO_LOG_LENGTH, infoLogLength, 0);
-
- if(infoLogLength[0]==0) {
- return "(no info log)";
- }
- int[] charsWritten=new int[1];
- byte[] infoLogBytes = new byte[infoLogLength[0]];
- gl.glGetProgramInfoLog(programObj, infoLogLength[0], charsWritten, 0, infoLogBytes, 0);
-
- return new String(infoLogBytes, 0, charsWritten[0]);
- }
-
- public boolean isShaderStatusValid(GL _gl, int shaderObj, int name) {
- return isShaderStatusValid(_gl, shaderObj, name, null);
- }
-
- public boolean isShaderStatusValid(GL _gl, int shaderObj, int name, PrintStream verboseOut) {
- GL2ES2 gl = _gl.getGL2ES2();
- int[] ires = new int[1];
- gl.glGetShaderiv(shaderObj, name, ires, 0);
-
- boolean res = ires[0]==1;
- if(!res && null!=verboseOut) {
- verboseOut.println("Shader status invalid: "+ getShaderInfoLog(gl, shaderObj));
- }
- return res;
- }
-
- public boolean isShaderStatusValid(GL _gl, IntBuffer shaders, int name) {
- return isShaderStatusValid(_gl, shaders, name, null);
- }
-
- public boolean isShaderStatusValid(GL _gl, IntBuffer shaders, int name, PrintStream verboseOut) {
- boolean res = true;
- for (int i = shaders.position(); i < shaders.limit(); i++) {
- res = isShaderStatusValid(_gl, shaders.get(i), name, verboseOut) && res;
- }
- return res;
- }
-
- public boolean isProgramStatusValid(GL _gl, int programObj, int name) {
- GL2ES2 gl = _gl.getGL2ES2();
- int[] ires = new int[1];
- gl.glGetProgramiv(programObj, name, ires, 0);
-
- return ires[0]==1;
- }
-
- public boolean isProgramValid(GL _gl, int programObj) {
- return isProgramValid(_gl, programObj, null);
- }
-
- public boolean isProgramValid(GL _gl, int programObj, PrintStream verboseOut) {
- GL2ES2 gl = _gl.getGL2ES2();
- int[] ires = new int[1];
- if(!gl.glIsProgram(programObj)) {
- if(null!=verboseOut) {
- verboseOut.println("Program name invalid: "+programObj);
- }
- return false;
- }
- if(!isProgramStatusValid(gl, programObj, gl.GL_LINK_STATUS)) {
- if(null!=verboseOut) {
- verboseOut.println("Program link failed: "+programObj+"\n\t"+ getProgramInfoLog(gl, programObj));
- }
- return false;
- }
- if ( !gl.isGLES2() || isShaderCompilerAvailable(gl) ) {
- // failed on APX2500 (ES2.0, no compiler) for valid programs
- gl.glValidateProgram(programObj);
- if(!isProgramStatusValid(gl, programObj, gl.GL_VALIDATE_STATUS)) {
- if(null!=verboseOut) {
- verboseOut.println("Program validation failed: "+programObj+"\n\t"+ getProgramInfoLog(gl, programObj));
- }
- return false;
- }
- }
- return true;
- }
-
- public void createShader(GL _gl, int type, IntBuffer shaders) {
- GL2ES2 gl = _gl.getGL2ES2();
- for (int i = shaders.position(); i < shaders.limit(); i++) {
- shaders.put(i, gl.glCreateShader(type));
- }
- }
-
- private Boolean shaderCompilerAvailable = null;
- private Set shaderBinaryFormats = null;
-
- public Set getShaderBinaryFormats(GL _gl) {
- GL2ES2 gl = _gl.getGL2ES2();
- if(null==shaderBinaryFormats) {
- if(gl.getContext()!=GLContext.getCurrent()) {
- return new HashSet(0); // bail out
- }
-
- int[] param = new int[1];
- shaderBinaryFormats = new HashSet();
-
- if (gl.isGLES2()) {
- gl.glGetIntegerv(GL2ES2.GL_NUM_SHADER_BINARY_FORMATS, param, 0);
- int numFormats = param[0];
- if(numFormats>0) {
- int[] formats = new int[numFormats];
- gl.glGetIntegerv(GL2ES2.GL_SHADER_BINARY_FORMATS, formats, 0);
- for(int i=0; i
When creating an OpenGL texture object, the Texture class will
- * attempt to leverage the GL_ARB_texture_non_power_of_two
- * and GL_ARB_texture_rectangle
- * extensions (in that order) whenever possible. If neither extension
- * is available, the Texture class will simply upload a non-pow2-sized
- * image into a standard pow2-sized texture (without any special
- * scaling). Since the choice of extension (or whether one is used at
- * all) depends on the user's machine configuration, developers are
- * recommended to use {@link #getImageTexCoords} and {@link
- * #getSubImageTexCoords}, as those methods will calculate the
- * appropriate texture coordinates for the situation.
- *
- * GL_REPEAT
) are not legal when the GL_ARB_texture_rectangle
- * extension is in use. Another issue to be aware of is that in the
- * default pow2 scenario, if the original image does not have pow2
- * dimensions, then wrapping may not work as one might expect since
- * the image does not extend to the edges of the pow2 texture. If
- * texture wrapping is important, it is recommended to use only
- * pow2-sized images with the Texture class.
- *
- *
For best performance, try to avoid calling {@link #enable} /
- * {@link #bind} / {@link #disable} any more than necessary. For
- * example, applications using many Texture objects in the same scene
- * may want to reduce the number of calls to both {@link #enable} and
- * {@link #disable}. To do this it is necessary to call {@link
- * #getTarget} to make sure the OpenGL texture target is the same for
- * all of the Texture objects in use; non-power-of-two textures using
- * the GL_ARB_texture_rectangle extension use a different target than
- * power-of-two textures using the GL_TEXTURE_2D target. Note that
- * when switching between textures it is necessary to call {@link
- * #bind}, but when drawing many triangles all using the same texture,
- * for best performance only one call to {@link #bind} should be made.
- *
- *
The mathematically correct way to perform blending in OpenGL
- * (with the SrcOver "source over destination" mode, or any other
- * Porter-Duff rule) is to use "premultiplied color components", which
- * means the R/G/ B color components have already been multiplied by
- * the alpha value. To make things easier for developers, the Texture
- * class will automatically convert non-premultiplied image data into
- * premultiplied data when storing it into an OpenGL texture. As a
- * result, it is important to use the correct blending function; for
- * example, the SrcOver rule is expressed as:
-
- gl.glBlendFunc(GL.GL_ONE, GL.GL_ONE_MINUS_SRC_ALPHA);
-
- * Also, when using a texture function like GL_MODULATE
where
- * the current color plays a role, it is important to remember to make
- * sure that the color is specified in a premultiplied form, for
- * example:
-
- float a = ...;
- float r = r * a;
- float g = g * a;
- float b = b * a;
- gl.glColor4f(r, g, b, a);
-
- *
- * For reference, here is a list of the Porter-Duff compositing rules
- * and the associated OpenGL blend functions (source and destination
- * factors) to use in the face of premultiplied alpha:
- *
-
-
- Rule Source Dest
- Clear GL_ZERO GL_ZERO
- Src GL_ONE GL_ZERO
- SrcOver GL_ONE GL_ONE_MINUS_SRC_ALPHA
- DstOver GL_ONE_MINUS_DST_ALPHA GL_ONE
- SrcIn GL_DST_ALPHA GL_ZERO
- DstIn GL_ZERO GL_SRC_ALPHA
- SrcOut GL_ONE_MINUS_DST_ALPHA GL_ZERO
- DstOut GL_ZERO GL_ONE_MINUS_SRC_ALPHA
- Dst GL_ZERO GL_ONE
- SrcAtop GL_DST_ALPHA GL_ONE_MINUS_SRC_ALPHA
- DstAtop GL_ONE_MINUS_DST_ALPHA GL_SRC_ALPHA
- AlphaXor GL_ONE_MINUS_DST_ALPHA GL_ONE_MINUS_SRC_ALPHA
-
- gl.glEnable(texture.getTarget());
-
- *
- * See the performance tips above for hints
- * on how to maximize performance when using many Texture objects.
- *
- * @throws GLException if no OpenGL context was current or if any
- * OpenGL-related errors occurred
- */
- public void enable() throws GLException {
- GLContext.getCurrentGL().glEnable(target);
- }
-
- /**
- * Disables this texture's target (e.g., GL_TEXTURE_2D) in the
- * current GL context's state. This method is a shorthand equivalent
- * of the following OpenGL code:
-
- gl.glDisable(texture.getTarget());
-
- *
- * See the performance tips above for hints
- * on how to maximize performance when using many Texture objects.
- *
- * @throws GLException if no OpenGL context was current or if any
- * OpenGL-related errors occurred
- */
- public void disable() throws GLException {
- GLContext.getCurrentGL().glDisable(target);
- }
-
- /**
- * Binds this texture to the current GL context. This method is a
- * shorthand equivalent of the following OpenGL code:
-
- gl.glBindTexture(texture.getTarget(), texture.getTextureObject());
-
- *
- * See the performance tips above for hints
- * on how to maximize performance when using many Texture objects.
- *
- * @throws GLException if no OpenGL context was current or if any
- * OpenGL-related errors occurred
- */
- public void bind() throws GLException {
- validateTexID(null, true);
- GLContext.getCurrentGL().glBindTexture(target, texID);
- }
-
- /**
- * Disposes the native resources used by this texture object.
- *
- * @throws GLException if no OpenGL context was current or if any
- * OpenGL-related errors occurred
- * @deprecated use destroy(GL)
- */
- public void dispose() throws GLException {
- destroy(GLContext.getCurrentGL());
- }
-
- /**
- * Disposes the native resources used by this texture object.
- *
- * @throws GLException if any OpenGL-related errors occurred
- * @deprecated use destroy(GL)
- */
- public void dispose(GL gl) throws GLException {
- destroy(gl);
- }
-
- /**
- * Destroys the native resources used by this texture object.
- *
- * @throws GLException if any OpenGL-related errors occurred
- */
- public void destroy(GL gl) throws GLException {
- if(0
- *
- * magic 0 - detect by file suffix (TextureIO compliant)
- * magic 6 - PPM binary RGB
- * magic 7 - PAM binary RGB or RGBA
- *
- */
- public NetPbmTextureWriter(int magic) {
- switch(magic) {
- case 0:
- case 6:
- case 7:
- break;
- default:
- throw new GLException("Unsupported magic: "+magic+", should be 0 (auto), 6 (PPM) or 7 (PAM)");
- }
- this.magic = magic;
- }
-
- public int getMagic() { return magic; }
-
- public static final String PPM = "ppm";
- public static final String PAM = "pam";
-
- public String getSuffix() { return (magic==6)?PPM:PAM; }
-
- public boolean write(File file,
- TextureData data) throws IOException {
-
- // file suffix selection
- if (0==magic) {
- if (PPM.equals(FileUtil.getFileSuffix(file))) {
- magic = 6;
- } else if (PAM.equals(FileUtil.getFileSuffix(file))) {
- magic = 7;
- } else {
- return false;
- }
- }
-
- int pixelFormat = data.getPixelFormat();
- int pixelType = data.getPixelType();
- if ((pixelFormat == GL.GL_RGB ||
- pixelFormat == GL.GL_RGBA) &&
- (pixelType == GL.GL_BYTE ||
- pixelType == GL.GL_UNSIGNED_BYTE)) {
-
- int comps = ( pixelFormat == GL.GL_RGBA ) ? 4 : 3 ;
-
- if(magic==6 && comps==4) {
- throw new IOException("NetPbmTextureWriter magic 6 (PPM) doesn't RGBA pixel format, use magic 7 (PAM)");
- }
-
- FileOutputStream fos = new FileOutputStream(file);
-
- StringBuffer header = new StringBuffer();
- header.append("P");
- header.append(magic);
- header.append("\n");
- if(7==magic) {
- header.append("WIDTH ");
- }
- header.append(data.getWidth());
- if(7==magic) {
- header.append("\nHEIGHT ");
- } else {
- header.append(" ");
- }
- header.append(data.getHeight());
- if(7==magic) {
- header.append("\nDEPTH ");
- header.append(comps);
- header.append("\nMAXVAL 255\nTUPLTYPE ");
- if(pixelFormat == GL.GL_RGBA) {
- header.append("RGB_ALPHA");
- } else {
- header.append("RGB");
- }
- header.append("\nENDHDR\n");
- } else {
- header.append("\n255\n");
- }
-
- fos.write(header.toString().getBytes());
-
- ByteBuffer buf = (ByteBuffer) data.getBuffer();
- if (buf == null) {
- buf = (ByteBuffer) data.getMipmapData()[0];
- }
- buf.rewind();
-
- byte[] bufArray = null;
-
- try {
- bufArray = buf.array();
- } catch (Throwable t) {}
- if(null==bufArray) {
- bufArray = new byte[data.getWidth()*data.getHeight()*comps];
- buf.get(bufArray);
- buf.rewind();
- }
-
- fos.write(bufArray);
- fos.close();
-
- return true;
- }
-
- throw new IOException("NetPbmTextureWriter writer doesn't support this pixel format / type (only GL_RGB/A + bytes)");
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/util/texture/spi/SGIImage.java b/src/jogl/classes/com/sun/opengl/util/texture/spi/SGIImage.java
deleted file mode 100755
index 284fa64bd..000000000
--- a/src/jogl/classes/com/sun/opengl/util/texture/spi/SGIImage.java
+++ /dev/null
@@ -1,670 +0,0 @@
-/*
- * Portions Copyright (c) 2005 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.util.texture.spi;
-
-import java.io.*;
-import javax.media.opengl.*;
-import com.sun.opengl.util.*;
-
-/** share1
and
+ share2
will share textures and display lists. Both
+ must be non-null. */
+ public static synchronized void registerSharing(GLContext share1, GLContext share2) {
+ if (share1 == null || share2 == null) {
+ throw new IllegalArgumentException("Both share1 and share2 must be non-null");
+ }
+ ShareSet share = entryFor(share1);
+ if (share == null) {
+ share = entryFor(share2);
+ }
+ if (share == null) {
+ share = new ShareSet();
+ }
+ share.add(share1);
+ share.add(share2);
+ addEntry(share1, share);
+ addEntry(share2, share);
+ }
+
+ public static synchronized GLContext getShareContext(GLContext contextToCreate) {
+ ShareSet share = entryFor(contextToCreate);
+ if (share == null) {
+ return null;
+ }
+ return share.getCreatedShare(contextToCreate);
+ }
+
+ public static synchronized void contextCreated(GLContext context) {
+ ShareSet share = entryFor(context);
+ if (share != null) {
+ share.contextCreated(context);
+ }
+ }
+
+ public static synchronized void contextDestroyed(GLContext context) {
+ ShareSet share = entryFor(context);
+ if (share != null) {
+ share.contextDestroyed(context);
+ }
+ }
+
+ /** In order to avoid glGet calls for buffer object checks related
+ to glVertexPointer, etc. calls as well as glMapBuffer calls, we
+ need to share the same GLBufferSizeTracker object between
+ contexts sharing textures and display lists. For now we keep
+ this mechanism orthogonal to the GLObjectTracker to hopefully
+ keep things easier to understand. (The GLObjectTracker is
+ currently only needed in a fairly esoteric case, when the
+ Java2D/JOGL bridge is active, but the GLBufferSizeTracker
+ mechanism is now always required.) */
+ public static void registerForBufferObjectSharing(GLContext olderContextOrNull, GLContext newContext) {
+ // FIXME: downcasts to GLContextImpl undesirable
+ GLContextImpl older = (GLContextImpl) olderContextOrNull;
+ GLContextImpl newer = (GLContextImpl) newContext;
+ GLBufferSizeTracker tracker = null;
+ if (older != null) {
+ tracker = older.getBufferSizeTracker();
+ assert (tracker != null)
+ : "registerForBufferObjectSharing was not called properly for the older context, or has a bug in it";
+ }
+ if (tracker == null) {
+ tracker = new GLBufferSizeTracker();
+ }
+ newer.setBufferSizeTracker(tracker);
+ }
+
+ // FIXME: refactor Java SE dependencies
+ // /** Indicates that the two supplied contexts (which must be able to
+ // share textures and display lists) should be in the same
+ // namespace for tracking of server-side object creation and
+ // deletion. Because the sharing necessary behind the scenes is
+ // different than that requested at the user level, the two notions
+ // are different. This must be called immediately after the
+ // creation of the new context (which is the second argument)
+ // before any server-side OpenGL objects have been created in that
+ // context. */
+ // public static void registerForObjectTracking(GLContext olderContextOrNull,
+ // GLContext newContext,
+ // GLContext realShareContext) {
+ // if (isObjectTrackingEnabled() || isObjectTrackingDebuggingEnabled()) {
+ // GLContextImpl impl1 = null;
+ // GLContextImpl impl2 = null;
+ // GLObjectTracker tracker = null;
+ //
+ // synchronized (GLContextShareSet.class) {
+ // if (olderContextOrNull != null &&
+ // newContext != null) {
+ // if (entryFor(olderContextOrNull) != entryFor(newContext)) {
+ // throw new IllegalArgumentException("old and new contexts must be able to share textures and display lists");
+ // }
+ // }
+ //
+ // // FIXME: downcast to GLContextImpl undesirable
+ // impl1 = (GLContextImpl) olderContextOrNull;
+ // impl2 = (GLContextImpl) newContext;
+ //
+ // GLObjectTracker deletedObjectTracker = null;
+ // GLContextImpl shareImpl = (GLContextImpl) realShareContext;
+ // // Before we zap the "user-level" object trackers, make sure
+ // // that all contexts in the share set share the destroyed object
+ // // tracker
+ // if (shareImpl != null) {
+ // deletedObjectTracker = shareImpl.getDeletedObjectTracker();
+ // }
+ // if (deletedObjectTracker == null) {
+ // // Must create one and possibly set it up in the older context
+ // deletedObjectTracker = new GLObjectTracker();
+ // if (DEBUG) {
+ // System.err.println("Created deletedObjectTracker " + deletedObjectTracker + " because " +
+ // ((shareImpl == null) ? "shareImpl was null" : "shareImpl's (" + shareImpl + ") deletedObjectTracker was null"));
+ // }
+ //
+ // if (shareImpl != null) {
+ // // FIXME: think should really assert in this case
+ // shareImpl.setDeletedObjectTracker(deletedObjectTracker);
+ // if (DEBUG) {
+ // System.err.println("Set deletedObjectTracker " + deletedObjectTracker + " in shareImpl context " + shareImpl);
+ // }
+ // }
+ // }
+ // impl2.setDeletedObjectTracker(deletedObjectTracker);
+ // if (DEBUG) {
+ // System.err.println("Set deletedObjectTracker " + deletedObjectTracker + " in impl2 context " + impl2);
+ // }
+ // }
+ //
+ // // Must not hold lock around this operation
+ // // Don't share object trackers with the primordial share context from Java2D
+ // if (Java2D.isOGLPipelineActive()) {
+ // // FIXME: probably need to do something different here
+ // // Need to be able to figure out the GraphicsDevice for the
+ // // older context if it's on-screen
+ // GraphicsDevice device = GraphicsEnvironment.
+ // getLocalGraphicsEnvironment().
+ // getDefaultScreenDevice();
+ // GLContext j2dShareContext = Java2D.getShareContext(device);
+ // if (impl1 != null && impl1 == j2dShareContext) {
+ // impl1 = null;
+ // }
+ // }
+ //
+ // synchronized (GLContextShareSet.class) {
+ // if (impl1 != null) {
+ // tracker = impl1.getObjectTracker();
+ // assert (tracker != null)
+ // : "registerForObjectTracking was not called properly for the older context";
+ // }
+ // if (tracker == null) {
+ // tracker = new GLObjectTracker();
+ // }
+ // // Note that we don't assert that the tracker is non-null for
+ // // impl2 because the way we use this functionality we actually
+ // // overwrite the initially-set object tracker in the new context
+ // impl2.setObjectTracker(tracker);
+ // }
+ // }
+ // }
+
+ //----------------------------------------------------------------------
+ // Internals only below this point
+
+
+ private static ShareSet entryFor(GLContext context) {
+ return (ShareSet) shareMap.get(context);
+ }
+
+ private static void addEntry(GLContext context, ShareSet share) {
+ if (shareMap.get(context) == null) {
+ shareMap.put(context, share);
+ }
+ }
+
+ // FIXME: refactor Java SE dependencies
+ // private static boolean isObjectTrackingEnabled() {
+ // return ((Java2D.isOGLPipelineActive() && Java2D.isFBOEnabled()) ||
+ // isObjectTrackingDebuggingEnabled());
+ // }
+ //
+ // private static boolean isObjectTrackingDebuggingEnabled() {
+ // return forceTracking;
+ // }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/GLDrawableFactoryImpl.java b/src/jogl/classes/com/jogamp/opengl/impl/GLDrawableFactoryImpl.java
new file mode 100644
index 000000000..20d0c8072
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/impl/GLDrawableFactoryImpl.java
@@ -0,0 +1,377 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.impl;
+
+import java.nio.*;
+import javax.media.nativewindow.*;
+import javax.media.opengl.*;
+import com.jogamp.gluegen.runtime.*;
+import com.sun.nativewindow.impl.NWReflection;
+import java.lang.reflect.*;
+
+/** Extends GLDrawableFactory with a few methods for handling
+ typically software-accelerated offscreen rendering (Device
+ Independent Bitmaps on Windows, pixmaps on X11). Direct access to
+ these GLDrawables is not supplied directly to end users, though
+ they may be instantiated by the GLJPanel implementation. */
+public abstract class GLDrawableFactoryImpl extends GLDrawableFactory {
+ protected static final boolean DEBUG = Debug.debug("GLDrawableFactory");
+
+ //---------------------------------------------------------------------------
+ // Dispatching GLDrawable construction in respect to the NativeWindow Capabilities
+ //
+ public GLDrawable createGLDrawable(NativeWindow target) {
+ if (target == null) {
+ throw new IllegalArgumentException("Null target");
+ }
+ AbstractGraphicsConfiguration config = target.getGraphicsConfiguration().getNativeGraphicsConfiguration();
+ GLCapabilities caps = (GLCapabilities) target.getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities();
+ GLDrawable result = null;
+ if(caps.isOnscreen()) {
+ if(caps.isPBuffer()) {
+ throw new IllegalArgumentException("Onscreen target can't be PBuffer: "+caps);
+ }
+ if(DEBUG) {
+ System.out.println("GLDrawableFactoryImpl.createGLDrawable -> OnscreenDrawable: "+target);
+ }
+ result = createOnscreenDrawable(target);
+ } else {
+ if( ! ( target instanceof SurfaceChangeable ) ) {
+ throw new IllegalArgumentException("Passed NativeWindow must implement SurfaceChangeable for offscreen: "+target);
+ }
+ if(caps.isPBuffer() && canCreateGLPbuffer()) {
+ if(DEBUG) {
+ System.out.println("GLDrawableFactoryImpl.createGLDrawable -> PbufferDrawable: "+target);
+ }
+ result = createGLPbufferDrawable(target);
+ }
+ if(null==result) {
+ if(DEBUG) {
+ System.out.println("GLDrawableFactoryImpl.createGLDrawable -> OffScreenDrawable: "+target);
+ }
+ result = createOffscreenDrawable(target);
+ }
+ }
+ if(DEBUG) {
+ System.out.println("GLDrawableFactoryImpl.createGLDrawable: "+result);
+ }
+ return result;
+ }
+
+ //---------------------------------------------------------------------------
+ //
+ // Onscreen GLDrawable construction
+ //
+
+ protected abstract GLDrawableImpl createOnscreenDrawable(NativeWindow target);
+
+ //---------------------------------------------------------------------------
+ //
+ // PBuffer GLDrawable construction
+ //
+
+ /** Target must implement SurfaceChangeable */
+ protected abstract GLDrawableImpl createGLPbufferDrawableImpl(NativeWindow target);
+
+ protected GLDrawableImpl createGLPbufferDrawable(NativeWindow target) {
+ if (!canCreateGLPbuffer()) {
+ throw new GLException("Pbuffer support not available with current graphics card");
+ }
+ return createGLPbufferDrawableImpl(target);
+ }
+
+ public GLDrawable createGLPbufferDrawable(GLCapabilities capabilities,
+ GLCapabilitiesChooser chooser,
+ int width,
+ int height) {
+ if(height<=0 || height<=0) {
+ throw new GLException("Width and height of pbuffer must be positive (were (" +
+ width + ", " + height + "))");
+ }
+ capabilities.setDoubleBuffered(false); // FIXME
+ capabilities.setOnscreen(false);
+ capabilities.setPBuffer(true);
+ return createGLPbufferDrawable( createOffscreenWindow(capabilities, chooser, height, height) );
+ }
+
+ public GLPbuffer createGLPbuffer(GLCapabilities capabilities,
+ GLCapabilitiesChooser chooser,
+ int width,
+ int height,
+ GLContext shareWith) {
+ return new GLPbufferImpl( (GLDrawableImpl) createGLPbufferDrawable(capabilities, chooser, height, height),
+ shareWith);
+ }
+
+
+ //---------------------------------------------------------------------------
+ //
+ // Offscreen GLDrawable construction
+ //
+
+ protected abstract GLDrawableImpl createOffscreenDrawable(NativeWindow target) ;
+
+ public GLDrawable createOffscreenDrawable(GLCapabilities capabilities,
+ GLCapabilitiesChooser chooser,
+ int width,
+ int height) {
+ if(width<=0 || height<=0) {
+ throw new GLException("Width and height of pbuffer must be positive (were (" +
+ width + ", " + height + "))");
+ }
+ capabilities.setDoubleBuffered(false); // FIXME
+ capabilities.setOnscreen(false);
+ capabilities.setPBuffer(false);
+ return createOffscreenDrawable( createOffscreenWindow(capabilities, chooser, width, height) );
+ }
+
+ /**
+ * creates an offscreen NativeWindow, which must implement SurfaceChangeable as well,
+ * so the windowing system related implementation is able to set the surface handle.
+ */
+ protected abstract NativeWindow createOffscreenWindow(GLCapabilities capabilities, GLCapabilitiesChooser chooser,
+ int width, int height);
+
+ protected GLDrawableFactoryImpl() {
+ super();
+ }
+
+ protected void maybeDoSingleThreadedWorkaround(Runnable action) {
+ if (Threading.isSingleThreaded() &&
+ !Threading.isOpenGLThread()) {
+ Threading.invokeOnOpenGLThread(action);
+ } else {
+ action.run();
+ }
+ }
+
+ /**
+ * Returns the sole GLDrawableFactoryImpl instance.
+ *
+ * @param glProfile GLProfile to determine the factory type, ie EGLDrawableFactory,
+ * or one of the native GLDrawableFactory's, ie X11/GLX, Windows/WGL or MacOSX/CGL.
+ */
+ public static GLDrawableFactoryImpl getFactoryImpl(GLProfile glp) {
+ return (GLDrawableFactoryImpl) getFactory(glp);
+ }
+
+ // Helper function for more lazily loading the GLU library;
+ // apparently can't use System.loadLibrary on UNIX because it uses
+ // RTLD_LOCAL and we need to call dlsym(RTLD_DEFAULT)
+ public abstract void loadGLULibrary();
+
+ //----------------------------------------------------------------------
+ // Support for locking and unlocking the toolkit -- needed only on X11 platforms
+ //
+
+ public void lockToolkit() {
+ NativeWindowFactory.getDefaultFactory().getToolkitLock().lock();
+ }
+
+ public void unlockToolkit() {
+ NativeWindowFactory.getDefaultFactory().getToolkitLock().unlock();
+ }
+
+ //---------------------------------------------------------------------------
+ // Support for Java2D/JOGL bridge on Mac OS X; the external
+ // GLDrawable mechanism in the public API is sufficient to
+ // implement this functionality on all other platforms
+ //
+
+ public abstract boolean canCreateContextOnJava2DSurface();
+
+ public abstract GLContext createContextOnJava2DSurface(Object graphics, GLContext shareWith)
+ throws GLException;
+
+ //----------------------------------------------------------------------
+ // Gamma adjustment support
+ // Thanks to the LWJGL team for illustrating how to make these
+ // adjustments on various OSs.
+
+ /*
+ * Portions Copyright (c) 2002-2004 LWJGL Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of 'LWJGL' nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+ /**
+ * Sets the gamma, brightness, and contrast of the current main
+ * display. Returns true if the settings were changed, false if
+ * not. If this method returns true, the display settings will
+ * automatically be reset upon JVM exit (assuming the JVM does not
+ * crash); if the user wishes to change the display settings back to
+ * normal ahead of time, use resetDisplayGamma(). Throws
+ * IllegalArgumentException if any of the parameters were
+ * out-of-bounds.
+ *
+ * @param gamma The gamma value, typically > 1.0 (default value is
+ * 1.0)
+ * @param brightness The brightness value between -1.0 and 1.0,
+ * inclusive (default value is 0)
+ * @param contrast The contrast, greater than 0.0 (default value is 1)
+ * @throws IllegalArgumentException if any of the parameters were
+ * out-of-bounds
+ */
+ public boolean setDisplayGamma(float gamma, float brightness, float contrast) throws IllegalArgumentException {
+ if ((brightness < -1.0f) || (brightness > 1.0f)) {
+ throw new IllegalArgumentException("Brightness must be between -1.0 and 1.0");
+ }
+ if (contrast < 0) {
+ throw new IllegalArgumentException("Contrast must be greater than 0.0");
+ }
+ // FIXME: ensure gamma is > 1.0? Are smaller / negative values legal?
+ int rampLength = getGammaRampLength();
+ if (rampLength == 0) {
+ return false;
+ }
+ float[] gammaRamp = new float[rampLength];
+ for (int i = 0; i < rampLength; i++) {
+ float intensity = (float) i / (float) (rampLength - 1);
+ // apply gamma
+ float rampEntry = (float) java.lang.Math.pow(intensity, gamma);
+ // apply brightness
+ rampEntry += brightness;
+ // apply contrast
+ rampEntry = (rampEntry - 0.5f) * contrast + 0.5f;
+ // Clamp entry to [0, 1]
+ if (rampEntry > 1.0f)
+ rampEntry = 1.0f;
+ else if (rampEntry < 0.0f)
+ rampEntry = 0.0f;
+ gammaRamp[i] = rampEntry;
+ }
+ registerGammaShutdownHook();
+ return setGammaRamp(gammaRamp);
+ }
+
+ public synchronized void resetDisplayGamma() {
+ if (gammaShutdownHook == null) {
+ throw new IllegalArgumentException("Should not call this unless setDisplayGamma called first");
+ }
+ resetGammaRamp(originalGammaRamp);
+ unregisterGammeShutdownHook();
+ }
+
+ //------------------------------------------------------
+ // Gamma-related methods to be implemented by subclasses
+ //
+
+ /** Returns the length of the computed gamma ramp for this OS and
+ hardware. Returns 0 if gamma changes are not supported. */
+ protected int getGammaRampLength() {
+ return 0;
+ }
+
+ /** Sets the gamma ramp for the main screen. Returns false if gamma
+ ramp changes were not supported. */
+ protected boolean setGammaRamp(float[] ramp) {
+ return false;
+ }
+
+ /** Gets the current gamma ramp. This is basically an opaque value
+ used only on some platforms to reset the gamma ramp to its
+ original settings. */
+ protected Buffer getGammaRamp() {
+ return null;
+ }
+
+ /** Resets the gamma ramp, potentially using the specified Buffer as
+ data to restore the original values. */
+ protected void resetGammaRamp(Buffer originalGammaRamp) {
+ }
+
+ // Shutdown hook mechanism for resetting gamma
+ private boolean gammaShutdownHookRegistered;
+ private Thread gammaShutdownHook;
+ private Buffer originalGammaRamp;
+ private synchronized void registerGammaShutdownHook() {
+ if (gammaShutdownHookRegistered)
+ return;
+ if (gammaShutdownHook == null) {
+ gammaShutdownHook = new Thread(new Runnable() {
+ public void run() {
+ synchronized (GLDrawableFactoryImpl.this) {
+ resetGammaRamp(originalGammaRamp);
+ }
+ }
+ });
+ originalGammaRamp = getGammaRamp();
+ }
+ Runtime.getRuntime().addShutdownHook(gammaShutdownHook);
+ gammaShutdownHookRegistered = true;
+ }
+
+ private synchronized void unregisterGammeShutdownHook() {
+ if (!gammaShutdownHookRegistered)
+ return;
+ if (gammaShutdownHook == null) {
+ throw new InternalError("Error in gamma shutdown hook logic");
+ }
+ Runtime.getRuntime().removeShutdownHook(gammaShutdownHook);
+ gammaShutdownHookRegistered = false;
+ // Leave the original gamma ramp data alone
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/GLDrawableHelper.java b/src/jogl/classes/com/jogamp/opengl/impl/GLDrawableHelper.java
new file mode 100644
index 000000000..7a4e84081
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/impl/GLDrawableHelper.java
@@ -0,0 +1,180 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.impl;
+
+import java.util.*;
+import javax.media.opengl.*;
+
+/** Encapsulates the implementation of most of the GLAutoDrawable's
+ methods to be able to share it between GLCanvas and GLJPanel. */
+
+public class GLDrawableHelper {
+ private volatile List listeners = new ArrayList();
+ private static final boolean DEBUG = Debug.debug("GLDrawableHelper");
+ private static final boolean VERBOSE = Debug.verbose();
+ private static final boolean NVIDIA_CRASH_WORKAROUND = Debug.isPropertyDefined("jogl.nvidia.crash.workaround", true);
+ private boolean autoSwapBufferMode = true;
+
+ public GLDrawableHelper() {
+ }
+
+ public synchronized String toString() {
+ StringBuffer sb = new StringBuffer();
+ sb.append("GLEventListeners num "+listeners.size()+" [");
+ for (Iterator iter = listeners.iterator(); iter.hasNext(); ) {
+ sb.append(iter.next()+", ");
+ }
+ sb.append("]");
+ return sb.toString();
+ }
+
+ public synchronized void addGLEventListener(GLEventListener listener) {
+ List newListeners = (List) ((ArrayList) listeners).clone();
+ newListeners.add(listener);
+ listeners = newListeners;
+ }
+
+ public synchronized void removeGLEventListener(GLEventListener listener) {
+ List newListeners = (List) ((ArrayList) listeners).clone();
+ newListeners.remove(listener);
+ listeners = newListeners;
+ }
+
+ public synchronized void dispose(GLAutoDrawable drawable) {
+ for (Iterator iter = listeners.iterator(); iter.hasNext(); ) {
+ ((GLEventListener) iter.next()).dispose(drawable);
+ }
+ }
+
+ public void init(GLAutoDrawable drawable) {
+ for (Iterator iter = listeners.iterator(); iter.hasNext(); ) {
+ ((GLEventListener) iter.next()).init(drawable);
+ }
+ }
+
+ public void display(GLAutoDrawable drawable) {
+ for (Iterator iter = listeners.iterator(); iter.hasNext(); ) {
+ ((GLEventListener) iter.next()).display(drawable);
+ }
+ }
+
+ public void reshape(GLAutoDrawable drawable,
+ int x, int y, int width, int height) {
+ for (Iterator iter = listeners.iterator(); iter.hasNext(); ) {
+ ((GLEventListener) iter.next()).reshape(drawable, x, y, width, height);
+ }
+ }
+
+ public void setAutoSwapBufferMode(boolean onOrOff) {
+ autoSwapBufferMode = onOrOff;
+ }
+
+ public boolean getAutoSwapBufferMode() {
+ return autoSwapBufferMode;
+ }
+
+ private static final ThreadLocal perThreadInitAction = new ThreadLocal();
+ /** Principal helper method which runs a Runnable with the context
+ made current. This could have been made part of GLContext, but a
+ desired goal is to be able to implement the GLCanvas in terms of
+ the GLContext's public APIs, and putting it into a separate
+ class helps ensure that we don't inadvertently use private
+ methods of the GLContext or its implementing classes. */
+ public void invokeGL(GLDrawable drawable,
+ GLContext context,
+ Runnable runnable,
+ Runnable initAction) {
+ if(null==context) {
+ if (DEBUG) {
+ Exception e = new GLException(Thread.currentThread().getName()+" GLDrawableHelper " + this + ".invokeGL(): NULL GLContext");
+ e.printStackTrace();
+ }
+ return;
+ }
+ // Support for recursive makeCurrent() calls as well as calling
+ // other drawables' display() methods from within another one's
+ GLContext lastContext = GLContext.getCurrent();
+ Runnable lastInitAction = (Runnable) perThreadInitAction.get();
+ if (lastContext != null) {
+ lastContext.release();
+ }
+
+ int res = 0;
+ try {
+ res = context.makeCurrent();
+ if (res != GLContext.CONTEXT_NOT_CURRENT) {
+ if(null!=initAction) {
+ perThreadInitAction.set(initAction);
+ if (res == GLContext.CONTEXT_CURRENT_NEW) {
+ if (DEBUG) {
+ System.err.println("GLDrawableHelper " + this + ".invokeGL(): Running initAction");
+ }
+ initAction.run();
+ }
+ }
+ if(null!=runnable) {
+ if (DEBUG && VERBOSE) {
+ System.err.println("GLDrawableHelper " + this + ".invokeGL(): Running runnable");
+ }
+ runnable.run();
+ if (autoSwapBufferMode) {
+ if (drawable != null) {
+ drawable.swapBuffers();
+ }
+ }
+ }
+ }
+ } finally {
+ try {
+ if (res != GLContext.CONTEXT_NOT_CURRENT) {
+ context.release();
+ }
+ } catch (Exception e) {
+ }
+ if (lastContext != null) {
+ int res2 = lastContext.makeCurrent();
+ if (res2 == GLContext.CONTEXT_CURRENT_NEW) {
+ lastInitAction.run();
+ }
+ }
+ }
+ }
+
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/GLDrawableImpl.java b/src/jogl/classes/com/jogamp/opengl/impl/GLDrawableImpl.java
new file mode 100644
index 000000000..20bf20c20
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/impl/GLDrawableImpl.java
@@ -0,0 +1,179 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.impl;
+
+import javax.media.nativewindow.*;
+import javax.media.opengl.*;
+import com.jogamp.gluegen.runtime.DynamicLookupHelper;
+
+public abstract class GLDrawableImpl implements GLDrawable {
+ protected static final boolean DEBUG = Debug.debug("GLDrawable");
+
+ protected GLDrawableImpl(GLDrawableFactory factory,
+ NativeWindow comp,
+ boolean realized) {
+ this.factory = factory;
+ this.component = comp;
+ this.realized = realized;
+ this.requestedCapabilities = (GLCapabilities)component.getGraphicsConfiguration().getNativeGraphicsConfiguration().getRequestedCapabilities(); // a copy ..
+ }
+
+ /**
+ * Returns the DynamicLookupHelper
+ */
+ public abstract DynamicLookupHelper getDynamicLookupHelper();
+
+ public GLDrawableFactoryImpl getFactoryImpl() {
+ return (GLDrawableFactoryImpl) getFactory();
+ }
+
+ /** For offscreen GLDrawables (pbuffers and "pixmap" drawables),
+ indicates that native resources should be reclaimed. */
+ public void destroy() {
+ throw new GLException("Should not call this (should only be called for offscreen GLDrawables)");
+ }
+
+ public void swapBuffers() throws GLException {
+ GLCapabilities caps = (GLCapabilities)component.getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities();
+ if ( caps.getDoubleBuffered() ) {
+ if(!component.surfaceSwap()) {
+ swapBuffersImpl();
+ }
+ } else {
+ GLContext ctx = GLContext.getCurrent();
+ if(null!=ctx && ctx.getGLDrawable()==this) {
+ ctx.getGL().glFinish();
+ }
+ }
+ component.surfaceUpdated(this, component, System.currentTimeMillis());
+ }
+
+ protected abstract void swapBuffersImpl();
+
+ public static String toHexString(long hex) {
+ return GLContextImpl.toHexString(hex);
+ }
+
+ public GLProfile getGLProfile() {
+ return requestedCapabilities.getGLProfile();
+ }
+
+ public GLCapabilities getChosenGLCapabilities() {
+ return (GLCapabilities)component.getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities(); // a copy
+ }
+
+ public GLCapabilities getRequestedGLCapabilities() {
+ return requestedCapabilities;
+ }
+
+ public NativeWindow getNativeWindow() {
+ return component;
+ }
+
+ public GLDrawableFactory getFactory() {
+ return factory;
+ }
+
+ public void setRealized(boolean realized) {
+ if ( this.realized != realized ) {
+ if(DEBUG) {
+ System.err.println("setRealized: "+getClass().getName()+" "+this.realized+" -> "+realized);
+ }
+ this.realized = realized;
+ setRealizedImpl();
+ } else if(DEBUG) {
+ System.err.println("setRealized: "+getClass().getName()+" "+this.realized+" == "+realized);
+ }
+ }
+ protected abstract void setRealizedImpl();
+
+ public boolean getRealized() {
+ return realized;
+ }
+
+ public int getWidth() {
+ return component.getWidth();
+ }
+
+ /** Returns the current height of this GLDrawable. */
+ public int getHeight() {
+ return component.getHeight();
+ }
+
+ public int lockSurface() throws GLException {
+ if (!realized) {
+ return NativeWindow.LOCK_SURFACE_NOT_READY;
+ }
+ return component.lockSurface();
+ }
+
+ public void unlockSurface() {
+ component.unlockSurface();
+ }
+
+ public boolean isSurfaceLocked() {
+ return component.isSurfaceLocked();
+ }
+
+ public String toString() {
+ return getClass().getName()+"[realized "+getRealized()+
+ ",\n\tfactory "+getFactory()+
+ ",\n\twindow "+getNativeWindow()+
+ ",\n\trequested "+getRequestedGLCapabilities()+
+ ",\n\tchosen "+getChosenGLCapabilities()+"]";
+ }
+
+ protected GLDrawableFactory factory;
+ protected NativeWindow component;
+ protected GLCapabilities requestedCapabilities;
+
+ // Indicates whether the component (if an onscreen context) has been
+ // realized. Plausibly, before the component is realized the JAWT
+ // should return an error or NULL object from some of its
+ // operations; this appears to be the case on Win32 but is not true
+ // at least with Sun's current X11 implementation (1.4.x), which
+ // crashes with no other error reported if the DrawingSurfaceInfo is
+ // fetched from a locked DrawingSurface during the validation as a
+ // result of calling show() on the main thread. To work around this
+ // we prevent any JAWT or OpenGL operations from being done until
+ // addNotify() is called on the component.
+ protected boolean realized;
+
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/GLPbufferImpl.java b/src/jogl/classes/com/jogamp/opengl/impl/GLPbufferImpl.java
new file mode 100644
index 000000000..dd8d980a6
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/impl/GLPbufferImpl.java
@@ -0,0 +1,320 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.impl;
+
+/**
+import java.awt.Dimension;
+import java.awt.EventQueue;
+import java.awt.event.*;
+import java.beans.PropertyChangeListener;
+ */
+
+import javax.media.nativewindow.*;
+import javax.media.opengl.*;
+
+/** Platform-independent class exposing pbuffer functionality to
+ applications. This class is not exposed in the public API as it
+ would probably add no value; however it implements the GLDrawable
+ interface so can be interacted with via its display() method. */
+
+public class GLPbufferImpl implements GLPbuffer {
+ private GLDrawableImpl pbufferDrawable;
+ private GLContextImpl context;
+ private GLDrawableHelper drawableHelper = new GLDrawableHelper();
+ private int floatMode;
+
+ public GLPbufferImpl(GLDrawableImpl pbufferDrawable,
+ GLContext parentContext) {
+ GLCapabilities caps = (GLCapabilities)
+ pbufferDrawable.getNativeWindow().getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities();
+ if(caps.isOnscreen()) {
+ if(caps.isPBuffer()) {
+ throw new IllegalArgumentException("Error: Given drawable is Onscreen and Pbuffer: "+pbufferDrawable);
+ }
+ throw new IllegalArgumentException("Error: Given drawable is Onscreen: "+pbufferDrawable);
+ } else {
+ if(!caps.isPBuffer()) {
+ throw new IllegalArgumentException("Error: Given drawable is not Pbuffer: "+pbufferDrawable);
+ }
+ }
+ this.pbufferDrawable = pbufferDrawable;
+ context = (GLContextImpl) pbufferDrawable.createContext(parentContext);
+ context.setSynchronized(true);
+ }
+
+ public GLContext createContext(GLContext shareWith) {
+ return pbufferDrawable.createContext(shareWith);
+ }
+
+ public void setRealized(boolean realized) {
+ }
+
+ public void setSize(int width, int height) {
+ // FIXME
+ throw new GLException("Not yet implemented");
+ }
+
+ public NativeWindow getNativeWindow() {
+ return pbufferDrawable.getNativeWindow();
+ }
+
+ public GLDrawableFactory getFactory() {
+ return pbufferDrawable.getFactory();
+ }
+
+ public int getWidth() {
+ return pbufferDrawable.getWidth();
+ }
+
+ public int getHeight() {
+ return pbufferDrawable.getHeight();
+ }
+
+ public void display() {
+ maybeDoSingleThreadedWorkaround(displayOnEventDispatchThreadAction,
+ displayAction,
+ false);
+ }
+
+ public void repaint() {
+ display();
+ }
+
+ public void addGLEventListener(GLEventListener listener) {
+ drawableHelper.addGLEventListener(listener);
+ }
+
+ public void removeGLEventListener(GLEventListener listener) {
+ drawableHelper.removeGLEventListener(listener);
+ }
+
+ public void setContext(GLContext ctx) {
+ context=(GLContextImpl)ctx;
+ }
+
+ public GLContext getContext() {
+ return context;
+ }
+
+ public GLDrawable getDrawable() {
+ return pbufferDrawable;
+ }
+
+ public GL getGL() {
+ return getContext().getGL();
+ }
+
+ public GL setGL(GL gl) {
+ return getContext().setGL(gl);
+ }
+
+ public void setAutoSwapBufferMode(boolean onOrOff) {
+ drawableHelper.setAutoSwapBufferMode(onOrOff);
+ }
+
+ public boolean getAutoSwapBufferMode() {
+ return drawableHelper.getAutoSwapBufferMode();
+ }
+
+ public void swapBuffers() {
+ maybeDoSingleThreadedWorkaround(swapBuffersOnEventDispatchThreadAction, swapBuffersAction, false);
+ }
+
+ public void bindTexture() {
+ // Doesn't make much sense to try to do this on the event dispatch
+ // thread given that it has to be called while the context is current
+ context.bindPbufferToTexture();
+ }
+
+ public void releaseTexture() {
+ // Doesn't make much sense to try to do this on the event dispatch
+ // thread given that it has to be called while the context is current
+ context.releasePbufferFromTexture();
+ }
+
+ public GLCapabilities getChosenGLCapabilities() {
+ if (pbufferDrawable == null)
+ return null;
+
+ return pbufferDrawable.getChosenGLCapabilities();
+ }
+
+ public GLCapabilities getRequestedGLCapabilities() {
+ if (pbufferDrawable == null)
+ return null;
+
+ return pbufferDrawable.getRequestedGLCapabilities();
+ }
+
+ public GLProfile getGLProfile() {
+ if (pbufferDrawable == null)
+ return null;
+
+ return pbufferDrawable.getGLProfile();
+ }
+
+ private boolean surfaceLocked = false;
+
+ public int lockSurface() throws GLException {
+ surfaceLocked=true;
+ return NativeWindow.LOCK_SUCCESS;
+ }
+
+ public void unlockSurface() {
+ surfaceLocked=false;
+ }
+
+ public boolean isSurfaceLocked() {
+ return surfaceLocked;
+ }
+
+ //----------------------------------------------------------------------
+ // No-ops for ComponentEvents
+ //
+
+ /*
+ public void addComponentListener(ComponentListener l) {}
+ public void removeComponentListener(ComponentListener l) {}
+ public void addFocusListener(FocusListener l) {}
+ public void removeFocusListener(FocusListener l) {}
+ public void addHierarchyBoundsListener(HierarchyBoundsListener l) {}
+ public void removeHierarchyBoundsListener(HierarchyBoundsListener l) {}
+ public void addHierarchyListener(HierarchyListener l) {}
+ public void removeHierarchyListener(HierarchyListener l) {}
+ public void addInputMethodListener(InputMethodListener l) {}
+ public void removeInputMethodListener(InputMethodListener l) {}
+ public void addKeyListener(KeyListener l) {}
+ public void removeKeyListener(KeyListener l) {}
+ public void addMouseListener(MouseListener l) {}
+ public void removeMouseListener(MouseListener l) {}
+ public void addMouseMotionListener(MouseMotionListener l) {}
+ public void removeMouseMotionListener(MouseMotionListener l) {}
+ public void addMouseWheelListener(MouseWheelListener l) {}
+ public void removeMouseWheelListener(MouseWheelListener l) {}
+ public void addPropertyChangeListener(PropertyChangeListener listener) {}
+ public void removePropertyChangeListener(PropertyChangeListener listener) {}
+ public void addPropertyChangeListener(String propertyName,
+ PropertyChangeListener listener) {}
+ public void removePropertyChangeListener(String propertyName,
+ PropertyChangeListener listener) {}
+ */
+
+ public void destroy() {
+ // FIXME: not calling event listeners .. see GLAutoDrawable spec
+ if (Threading.isSingleThreaded() &&
+ !Threading.isOpenGLThread()) {
+ Threading.invokeOnOpenGLThread(destroyAction);
+ } else {
+ destroyAction.run();
+ }
+ }
+
+ public int getFloatingPointMode() {
+ if (floatMode == 0) {
+ throw new GLException("Pbuffer not initialized, or floating-point support not requested");
+ }
+ return floatMode;
+ }
+
+ //----------------------------------------------------------------------
+ // Internals only below this point
+ //
+
+ private void maybeDoSingleThreadedWorkaround(Runnable eventDispatchThreadAction,
+ Runnable invokeGLAction,
+ boolean isReshape) {
+ if (Threading.isSingleThreaded() &&
+ !Threading.isOpenGLThread()) {
+ Threading.invokeOnOpenGLThread(eventDispatchThreadAction);
+ } else {
+ drawableHelper.invokeGL(pbufferDrawable, context, invokeGLAction, initAction);
+ }
+ }
+
+ class InitAction implements Runnable {
+ public void run() {
+ floatMode = context.getFloatingPointMode();
+ drawableHelper.init(GLPbufferImpl.this);
+ }
+ }
+ private InitAction initAction = new InitAction();
+
+ class DisplayAction implements Runnable {
+ public void run() {
+ drawableHelper.display(GLPbufferImpl.this);
+ }
+ }
+ private DisplayAction displayAction = new DisplayAction();
+
+ class SwapBuffersAction implements Runnable {
+ public void run() {
+ pbufferDrawable.swapBuffers();
+ }
+ }
+ private SwapBuffersAction swapBuffersAction = new SwapBuffersAction();
+
+ // Workaround for ATI driver bugs related to multithreading issues
+ // like simultaneous rendering via Animators to canvases that are
+ // being resized on the AWT event dispatch thread
+ class DisplayOnEventDispatchThreadAction implements Runnable {
+ public void run() {
+ drawableHelper.invokeGL(pbufferDrawable, context, displayAction, initAction);
+ }
+ }
+ private DisplayOnEventDispatchThreadAction displayOnEventDispatchThreadAction =
+ new DisplayOnEventDispatchThreadAction();
+ class SwapBuffersOnEventDispatchThreadAction implements Runnable {
+ public void run() {
+ drawableHelper.invokeGL(pbufferDrawable, context, swapBuffersAction, initAction);
+ }
+ }
+ private SwapBuffersOnEventDispatchThreadAction swapBuffersOnEventDispatchThreadAction =
+ new SwapBuffersOnEventDispatchThreadAction();
+
+ class DestroyAction implements Runnable {
+ public void run() {
+ if (null != context) {
+ context.destroy();
+ }
+ pbufferDrawable.destroy();
+ }
+ }
+ private DestroyAction destroyAction = new DestroyAction();
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/GLStateTracker.java b/src/jogl/classes/com/jogamp/opengl/impl/GLStateTracker.java
new file mode 100755
index 000000000..744e7b924
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/impl/GLStateTracker.java
@@ -0,0 +1,238 @@
+/*
+ * Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.impl;
+
+import java.util.*;
+import javax.media.opengl.*;
+
+/**
+ * Tracks as closely as possible OpenGL states.
+ * GLStateTracker objects are allocated on a per-OpenGL-context basis.
+ * limit() - position()
) in the passed FloatBuffer
+ into a newly-allocated direct ByteBuffer. The returned buffer
+ will have its byte order set to the host platform's native byte
+ order. The position of the newly-allocated buffer will be zero,
+ and the position of the passed buffer is unchanged (though its
+ mark is changed). */
+ public static ByteBuffer copyFloatBufferAsByteBuffer(FloatBuffer orig) {
+ ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_FLOAT);
+ dest.asFloatBuffer().put(orig);
+ dest.rewind();
+ return dest;
+ }
+
+ /** Copies the remaining elements (as defined by
+ limit() - position()
) in the passed IntBuffer into
+ a newly-allocated direct ByteBuffer. The returned buffer will
+ have its byte order set to the host platform's native byte
+ order. The position of the newly-allocated buffer will be zero,
+ and the position of the passed buffer is unchanged (though its
+ mark is changed). */
+ public static ByteBuffer copyIntBufferAsByteBuffer(IntBuffer orig) {
+ ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_INT);
+ dest.asIntBuffer().put(orig);
+ dest.rewind();
+ return dest;
+ }
+
+ /** Copies the remaining elements (as defined by
+ limit() - position()
) in the passed ShortBuffer
+ into a newly-allocated direct ByteBuffer. The returned buffer
+ will have its byte order set to the host platform's native byte
+ order. The position of the newly-allocated buffer will be zero,
+ and the position of the passed buffer is unchanged (though its
+ mark is changed). */
+ public static ByteBuffer copyShortBufferAsByteBuffer(ShortBuffer orig) {
+ ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_SHORT);
+ dest.asShortBuffer().put(orig);
+ dest.rewind();
+ return dest;
+ }
+
+ /** Copies the remaining elements (as defined by
+ limit() - position()
) in the passed ByteBuffer into
+ a newly-allocated direct ByteBuffer. The returned buffer will
+ have its byte order set to the host platform's native byte
+ order. The position of the newly-allocated buffer will be zero,
+ and the position of the passed buffer is unchanged (though its
+ mark is changed). */
+ public static ByteBuffer copyByteBuffer(ByteBuffer orig) {
+ ByteBuffer dest = newByteBuffer(orig.remaining());
+ dest.put(orig);
+ dest.rewind();
+ return dest;
+ }
+
+ //----------------------------------------------------------------------
+ // Conversion routines
+ //
+
+ public static float[] getFloatArray(double[] source) {
+ int i=source.length;
+ float[] dest = new float[i--];
+ while(i>=0) { dest[i]=(float)source[i]; i--; }
+ return dest;
+ }
+
+ public static ByteBuffer nativeOrder(ByteBuffer buf) {
+ if (!isCDCFP) {
+ try {
+ if (byteOrderClass == null) {
+ byteOrderClass = Class.forName("java.nio.ByteOrder");
+ orderMethod = ByteBuffer.class.getMethod("order", new Class[] { byteOrderClass });
+ Method nativeOrderMethod = byteOrderClass.getMethod("nativeOrder", null);
+ nativeOrderObject = nativeOrderMethod.invoke(null, null);
+ }
+ } catch (Throwable t) {
+ // Must be running on CDC / FP
+ isCDCFP = true;
+ }
+
+ if (!isCDCFP) {
+ try {
+ orderMethod.invoke(buf, new Object[] { nativeOrderObject });
+ } catch (Throwable t) {
+ }
+ }
+ }
+ return buf;
+ }
+
+ //----------------------------------------------------------------------
+ // Internals only below this point
+ //
+
+ // NOTE that this work must be done reflectively at the present time
+ // because this code must compile and run correctly on both CDC/FP and J2SE
+ private static boolean isCDCFP;
+ private static Class byteOrderClass;
+ private static Object nativeOrderObject;
+ private static Method orderMethod;
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/InternalBufferUtil.java.javase b/src/jogl/classes/com/jogamp/opengl/impl/InternalBufferUtil.java.javase
new file mode 100644
index 000000000..655fa95de
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/impl/InternalBufferUtil.java.javase
@@ -0,0 +1,199 @@
+/*
+ * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.opengl.impl;
+
+import java.lang.reflect.*;
+import java.nio.*;
+
+/** Internal copy of selected routines from BufferUtil to avoid
+ outward dependencies on com.jogamp.opengl.util package. */
+public class InternalBufferUtil {
+ public static final int SIZEOF_BYTE = 1;
+ public static final int SIZEOF_SHORT = 2;
+ public static final int SIZEOF_INT = 4;
+ public static final int SIZEOF_FLOAT = 4;
+ public static final int SIZEOF_LONG = 8;
+ public static final int SIZEOF_DOUBLE = 8;
+
+ //----------------------------------------------------------------------
+ // Allocation routines
+ //
+
+ /** Allocates a new direct ByteBuffer with the specified number of
+ elements. The returned buffer will have its byte order set to
+ the host platform's native byte order. */
+ public static ByteBuffer newByteBuffer(int numElements) {
+ ByteBuffer bb = ByteBuffer.allocateDirect(numElements);
+ nativeOrder(bb);
+ return bb;
+ }
+
+ /** Allocates a new direct DoubleBuffer with the specified number of
+ elements. The returned buffer will have its byte order set to
+ the host platform's native byte order. */
+ public static DoubleBuffer newDoubleBuffer(int numElements) {
+ ByteBuffer bb = newByteBuffer(numElements * SIZEOF_DOUBLE);
+ return bb.asDoubleBuffer();
+ }
+
+ /** Allocates a new direct IntBuffer with the specified number of
+ elements. The returned buffer will have its byte order set to
+ the host platform's native byte order. */
+ public static IntBuffer newIntBuffer(int numElements) {
+ ByteBuffer bb = newByteBuffer(numElements * SIZEOF_INT);
+ return bb.asIntBuffer();
+ }
+
+ /** Allocates a new direct ShortBuffer with the specified number of
+ elements. The returned buffer will have its byte order set to
+ the host platform's native byte order. */
+ public static ShortBuffer newShortBuffer(int numElements) {
+ ByteBuffer bb = newByteBuffer(numElements * SIZEOF_SHORT);
+ return bb.asShortBuffer();
+ }
+
+ /** Allocates a new direct FloatBuffer with the specified number of
+ elements. The returned buffer will have its byte order set to
+ the host platform's native byte order. */
+ public static FloatBuffer newFloatBuffer(int numElements) {
+ ByteBuffer bb = newByteBuffer(numElements * SIZEOF_FLOAT);
+ return bb.asFloatBuffer();
+ }
+
+ //----------------------------------------------------------------------
+ // Copy routines (type-to-ByteBuffer)
+ //
+
+ /** Copies the remaining elements (as defined by
+ limit() - position()
) in the passed FloatBuffer
+ into a newly-allocated direct ByteBuffer. The returned buffer
+ will have its byte order set to the host platform's native byte
+ order. The position of the newly-allocated buffer will be zero,
+ and the position of the passed buffer is unchanged (though its
+ mark is changed). */
+ public static ByteBuffer copyFloatBufferAsByteBuffer(FloatBuffer orig) {
+ ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_FLOAT);
+ dest.asFloatBuffer().put(orig);
+ dest.rewind();
+ return dest;
+ }
+
+ /** Copies the remaining elements (as defined by
+ limit() - position()
) in the passed IntBuffer into
+ a newly-allocated direct ByteBuffer. The returned buffer will
+ have its byte order set to the host platform's native byte
+ order. The position of the newly-allocated buffer will be zero,
+ and the position of the passed buffer is unchanged (though its
+ mark is changed). */
+ public static ByteBuffer copyIntBufferAsByteBuffer(IntBuffer orig) {
+ ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_INT);
+ dest.asIntBuffer().put(orig);
+ dest.rewind();
+ return dest;
+ }
+
+ /** Copies the remaining elements (as defined by
+ limit() - position()
) in the passed ShortBuffer
+ into a newly-allocated direct ByteBuffer. The returned buffer
+ will have its byte order set to the host platform's native byte
+ order. The position of the newly-allocated buffer will be zero,
+ and the position of the passed buffer is unchanged (though its
+ mark is changed). */
+ public static ByteBuffer copyShortBufferAsByteBuffer(ShortBuffer orig) {
+ ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_SHORT);
+ dest.asShortBuffer().put(orig);
+ dest.rewind();
+ return dest;
+ }
+
+ /** Copies the remaining elements (as defined by
+ limit() - position()
) in the passed ByteBuffer into
+ a newly-allocated direct ByteBuffer. The returned buffer will
+ have its byte order set to the host platform's native byte
+ order. The position of the newly-allocated buffer will be zero,
+ and the position of the passed buffer is unchanged (though its
+ mark is changed). */
+ public static ByteBuffer copyByteBuffer(ByteBuffer orig) {
+ ByteBuffer dest = newByteBuffer(orig.remaining());
+ dest.put(orig);
+ dest.rewind();
+ return dest;
+ }
+
+ //----------------------------------------------------------------------
+ // Conversion routines
+ //
+
+ public static float[] getFloatArray(double[] source) {
+ int i=source.length;
+ float[] dest = new float[i--];
+ while(i>=0) { dest[i]=(float)source[i]; i--; }
+ return dest;
+ }
+
+ public static ByteBuffer nativeOrder(ByteBuffer buf) {
+ if (!isCDCFP) {
+ try {
+ if (byteOrderClass == null) {
+ byteOrderClass = Class.forName("java.nio.ByteOrder");
+ orderMethod = ByteBuffer.class.getMethod("order", new Class[] { byteOrderClass });
+ Method nativeOrderMethod = byteOrderClass.getMethod("nativeOrder", null);
+ nativeOrderObject = nativeOrderMethod.invoke(null, null);
+ }
+ } catch (Throwable t) {
+ // Must be running on CDC / FP
+ isCDCFP = true;
+ }
+
+ if (!isCDCFP) {
+ try {
+ orderMethod.invoke(buf, new Object[] { nativeOrderObject });
+ } catch (Throwable t) {
+ }
+ }
+ }
+ return buf;
+ }
+
+ //----------------------------------------------------------------------
+ // Internals only below this point
+ //
+
+ // NOTE that this work must be done reflectively at the present time
+ // because this code must compile and run correctly on both CDC/FP and J2SE
+ private static boolean isCDCFP;
+ private static Class byteOrderClass;
+ private static Object nativeOrderObject;
+ private static Method orderMethod;
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/NativeLibLoader.java b/src/jogl/classes/com/jogamp/opengl/impl/NativeLibLoader.java
new file mode 100644
index 000000000..aa71a37da
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/impl/NativeLibLoader.java
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.impl;
+
+// FIXME: refactor Java SE dependencies
+//import java.awt.Toolkit;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.HashSet;
+import com.sun.nativewindow.impl.NativeLibLoaderBase;
+
+public class NativeLibLoader extends NativeLibLoaderBase {
+ public static void loadNEWT() {
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ loadLibrary("newt", nativeOSPreload, true);
+ return null;
+ }
+ });
+ }
+
+ public static void loadGLDesktop() {
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ loadLibrary("jogl_gl2", nativeOSPreload, true);
+ return null;
+ }
+ });
+ }
+
+ public static void loadGLDesktopES12() {
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ loadLibrary("jogl_gl2es12", nativeOSPreload, true);
+ return null;
+ }
+ });
+ }
+
+ public static void loadES2() {
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ loadLibrary("jogl_es2", nativeOSPreload, true);
+ return null;
+ }
+ });
+ }
+
+ public static void loadES1() {
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ loadLibrary("jogl_es1", nativeOSPreload, true);
+ return null;
+ }
+ });
+ }
+
+ public static void loadCgImpl() {
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ String[] preload = { "nativewindow", "cg", "cgGL" };
+ loadLibrary("jogl_cg", preload, true);
+ return null;
+ }
+ });
+ }
+
+ private static final String[] nativeOSPreload = { "nativewindow_x11" };
+}
+
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/ProjectFloat.java b/src/jogl/classes/com/jogamp/opengl/impl/ProjectFloat.java
new file mode 100755
index 000000000..dbd84c9de
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/impl/ProjectFloat.java
@@ -0,0 +1,1057 @@
+/*
+** License Applicability. Except to the extent portions of this file are
+** made subject to an alternative license as permitted in the SGI Free
+** Software License B, Version 2.0 (the "License"), the contents of this
+** file are subject only to the provisions of the License. You may not use
+** this file except in compliance with the License. You may obtain a copy
+** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
+** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
+**
+** http://oss.sgi.com/projects/FreeB
+**
+** Note that, as provided in the License, the Software is distributed on an
+** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
+** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
+** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
+** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
+**
+** NOTE: The Original Code (as defined below) has been licensed to Sun
+** Microsystems, Inc. ("Sun") under the SGI Free Software License B
+** (Version 1.1), shown above ("SGI License"). Pursuant to Section
+** 3.2(3) of the SGI License, Sun is distributing the Covered Code to
+** you under an alternative license ("Alternative License"). This
+** Alternative License includes all of the provisions of the SGI License
+** except that Section 2.2 and 11 are omitted. Any differences between
+** the Alternative License and the SGI License are offered solely by Sun
+** and not by SGI.
+**
+** Original Code. The Original Code is: OpenGL Sample Implementation,
+** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
+** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
+** Copyright in any portions created by third parties is as indicated
+** elsewhere herein. All Rights Reserved.
+**
+** Additional Notice Provisions: The application programming interfaces
+** established by SGI in conjunction with the Original Code are The
+** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
+** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
+** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
+** Window System(R) (Version 1.3), released October 19, 1998. This software
+** was created using the OpenGL(R) version 1.2.1 Sample Implementation
+** published by SGI, but has not been independently verified as being
+** compliant with the OpenGL(R) version 1.2.1 Specification.
+**
+** $Date: 2009-03-13 22:20:29 -0700 (Fri, 13 Mar 2009) $ $Revision: 1867 $
+** $Header$
+*/
+
+/*
+ * Copyright (c) 2002-2004 LWJGL Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of 'LWJGL' nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ */
+package com.jogamp.opengl.impl;
+
+import java.nio.*;
+
+import javax.media.opengl.*;
+import javax.media.opengl.fixedfunc.GLMatrixFunc;
+
+/**
+ * ProjectFloat.java
+ *
+ *
+ * Created 11-jan-2004
+ *
+ * @author Erik Duijs
+ * @author Kenneth Russell
+ */
+public class ProjectFloat {
+ private static final float[] IDENTITY_MATRIX =
+ new float[] {
+ 1.0f, 0.0f, 0.0f, 0.0f,
+ 0.0f, 1.0f, 0.0f, 0.0f,
+ 0.0f, 0.0f, 1.0f, 0.0f,
+ 0.0f, 0.0f, 0.0f, 1.0f };
+
+ private static final float[] ZERO_MATRIX =
+ new float[] {
+ 0.0f, 0.0f, 0.0f, 0.0f,
+ 0.0f, 0.0f, 0.0f, 0.0f,
+ 0.0f, 0.0f, 0.0f, 0.0f,
+ 0.0f, 0.0f, 0.0f, 0.0f };
+
+ // Note that we have cloned parts of the implementation in order to
+ // support incoming Buffers. The reason for this is to avoid loading
+ // non-direct buffer subclasses unnecessarily, because doing so can
+ // cause performance decreases on direct buffer operations, at least
+ // on the current HotSpot JVM. It would be nicer (and make the code
+ // simpler) to simply have the array-based entry points delegate to
+ // the versions taking Buffers by wrapping the arrays.
+
+ // Array-based implementation
+ private final float[] matrix = new float[16];
+ private final float[][] tempInvertMatrix = new float[4][4];
+
+ private final float[] in = new float[4];
+ private final float[] out = new float[4];
+
+ private final float[] forward = new float[3];
+ private final float[] side = new float[3];
+ private final float[] up = new float[3];
+
+ // Buffer-based implementation
+ private FloatBuffer locbuf;
+ private final FloatBuffer matrixBuf;
+ private final FloatBuffer tempInvertMatrixBuf;
+
+ private final FloatBuffer inBuf;
+ private final FloatBuffer outBuf;
+
+ private final FloatBuffer forwardBuf;
+ private final FloatBuffer sideBuf;
+ private final FloatBuffer upBuf;
+
+ public ProjectFloat() {
+ // Use direct buffers to avoid loading indirect buffer
+ // implementations for applications trying to avoid doing so.
+ // Slice up one big buffer because some NIO implementations
+ // allocate a huge amount of memory to back even the smallest of
+ // buffers.
+ locbuf = InternalBufferUtil.newFloatBuffer(2*16+2*4+3*3);
+ int pos = 0;
+ int sz = 16;
+ matrixBuf = slice(locbuf, pos, sz);
+ pos += sz;
+ tempInvertMatrixBuf = slice(locbuf, pos, sz);
+ pos += sz;
+ sz = 4;
+ inBuf = slice(locbuf, pos, sz);
+ pos += sz;
+ outBuf = slice(locbuf, pos, sz);
+ pos += sz;
+ sz = 3;
+ forwardBuf = slice(locbuf, pos, sz);
+ pos += sz;
+ sideBuf = slice(locbuf, pos, sz);
+ pos += sz;
+ upBuf = slice(locbuf, pos, sz);
+ }
+
+ public void destroy() {
+ if(locbuf!=null) {
+ locbuf.clear();
+ locbuf=null;
+ }
+ }
+
+ private static FloatBuffer slice(FloatBuffer buf, int pos, int len) {
+ buf.position(pos);
+ buf.limit(pos + len);
+ return buf.slice();
+ }
+
+ /**
+ * Make matrix an identity matrix
+ */
+ public static void gluMakeIdentityf(FloatBuffer m) {
+ int oldPos = m.position();
+ m.put(IDENTITY_MATRIX);
+ m.position(oldPos);
+ }
+
+ /**
+ * Make matrix an zero matrix
+ */
+ public static void gluMakeZero(FloatBuffer m) {
+ int oldPos = m.position();
+ m.put(ZERO_MATRIX);
+ m.position(oldPos);
+ }
+
+ /**
+ * Make matrix an identity matrix
+ */
+ public static void gluMakeIdentityf(float[] m) {
+ for (int i = 0; i < 16; i++) {
+ m[i] = IDENTITY_MATRIX[i];
+ }
+ }
+
+ /**
+ * Method __gluMultMatrixVecf
+ *
+ * @param matrix
+ * @param in
+ * @param out
+ */
+ private void __gluMultMatrixVecf(float[] matrix, int matrix_offset, float[] in, float[] out) {
+ for (int i = 0; i < 4; i++) {
+ out[i] =
+ in[0] * matrix[0*4+i+matrix_offset] +
+ in[1] * matrix[1*4+i+matrix_offset] +
+ in[2] * matrix[2*4+i+matrix_offset] +
+ in[3] * matrix[3*4+i+matrix_offset];
+ }
+ }
+
+ /**
+ * Method __gluMultMatrixVecf
+ *
+ * @param matrix
+ * @param in
+ * @param out
+ */
+ private void __gluMultMatrixVecf(FloatBuffer matrix, FloatBuffer in, FloatBuffer out) {
+ int inPos = in.position();
+ int outPos = out.position();
+ int matrixPos = matrix.position();
+ for (int i = 0; i < 4; i++) {
+ out.put(i + outPos,
+ in.get(0+inPos) * matrix.get(0*4+i+matrixPos) +
+ in.get(1+inPos) * matrix.get(1*4+i+matrixPos) +
+ in.get(2+inPos) * matrix.get(2*4+i+matrixPos) +
+ in.get(3+inPos) * matrix.get(3*4+i+matrixPos));
+ }
+ }
+
+ /**
+ * @param src
+ * @param inverse
+ *
+ * @return
+ */
+ public boolean gluInvertMatrixf(float[] src, float[] inverse) {
+ int i, j, k, swap;
+ float t;
+ float[][] temp = tempInvertMatrix;
+
+ for (i = 0; i < 4; i++) {
+ for (j = 0; j < 4; j++) {
+ temp[i][j] = src[i*4+j];
+ }
+ }
+ gluMakeIdentityf(inverse);
+
+ for (i = 0; i < 4; i++) {
+ //
+ // Look for largest element in column
+ //
+ swap = i;
+ for (j = i + 1; j < 4; j++) {
+ if (Math.abs(temp[j][i]) > Math.abs(temp[i][i])) {
+ swap = j;
+ }
+ }
+
+ if (swap != i) {
+ //
+ // Swap rows.
+ //
+ for (k = 0; k < 4; k++) {
+ t = temp[i][k];
+ temp[i][k] = temp[swap][k];
+ temp[swap][k] = t;
+
+ t = inverse[i*4+k];
+ inverse[i*4+k] = inverse[swap*4+k];
+ inverse[swap*4+k] = t;
+ }
+ }
+
+ if (temp[i][i] == 0) {
+ //
+ // No non-zero pivot. The matrix is singular, which shouldn't
+ // happen. This means the user gave us a bad matrix.
+ //
+ return false;
+ }
+
+ t = temp[i][i];
+ for (k = 0; k < 4; k++) {
+ temp[i][k] /= t;
+ inverse[i*4+k] /= t;
+ }
+ for (j = 0; j < 4; j++) {
+ if (j != i) {
+ t = temp[j][i];
+ for (k = 0; k < 4; k++) {
+ temp[j][k] -= temp[i][k] * t;
+ inverse[j*4+k] -= inverse[i*4+k]*t;
+ }
+ }
+ }
+ }
+ return true;
+ }
+
+ /**
+ * @param src
+ * @param inverse
+ *
+ * @return
+ */
+ public boolean gluInvertMatrixf(FloatBuffer src, FloatBuffer inverse) {
+ int i, j, k, swap;
+ float t;
+
+ int srcPos = src.position();
+ int invPos = inverse.position();
+
+ FloatBuffer temp = tempInvertMatrixBuf;
+
+ for (i = 0; i < 4; i++) {
+ for (j = 0; j < 4; j++) {
+ temp.put(i*4+j, src.get(i*4+j + srcPos));
+ }
+ }
+ gluMakeIdentityf(inverse);
+
+ for (i = 0; i < 4; i++) {
+ //
+ // Look for largest element in column
+ //
+ swap = i;
+ for (j = i + 1; j < 4; j++) {
+ if (Math.abs(temp.get(j*4+i)) > Math.abs(temp.get(i*4+i))) {
+ swap = j;
+ }
+ }
+
+ if (swap != i) {
+ //
+ // Swap rows.
+ //
+ for (k = 0; k < 4; k++) {
+ t = temp.get(i*4+k);
+ temp.put(i*4+k, temp.get(swap*4+k));
+ temp.put(swap*4+k, t);
+
+ t = inverse.get(i*4+k + invPos);
+ inverse.put(i*4+k + invPos, inverse.get(swap*4+k + invPos));
+ inverse.put(swap*4+k + invPos, t);
+ }
+ }
+
+ if (temp.get(i*4+i) == 0) {
+ //
+ // No non-zero pivot. The matrix is singular, which shouldn't
+ // happen. This means the user gave us a bad matrix.
+ //
+ return false;
+ }
+
+ t = temp.get(i*4+i);
+ for (k = 0; k < 4; k++) {
+ temp.put(i*4+k, temp.get(i*4+k) / t);
+ inverse.put(i*4+k + invPos, inverse.get(i*4+k + invPos) / t);
+ }
+ for (j = 0; j < 4; j++) {
+ if (j != i) {
+ t = temp.get(j*4+i);
+ for (k = 0; k < 4; k++) {
+ temp.put(j*4+k, temp.get(j*4+k) - temp.get(i*4+k) * t);
+ inverse.put(j*4+k + invPos, inverse.get(j*4+k + invPos) - inverse.get(i*4+k + invPos) * t);
+ }
+ }
+ }
+ }
+ return true;
+ }
+
+
+ /**
+ * @param a
+ * @param b
+ * @param r
+ */
+ private void gluMultMatricesf(float[] a, int a_offset, float[] b, int b_offset, float[] r) {
+ for (int i = 0; i < 4; i++) {
+ for (int j = 0; j < 4; j++) {
+ r[i*4+j] =
+ a[i*4+0+a_offset]*b[0*4+j+b_offset] +
+ a[i*4+1+a_offset]*b[1*4+j+b_offset] +
+ a[i*4+2+a_offset]*b[2*4+j+b_offset] +
+ a[i*4+3+a_offset]*b[3*4+j+b_offset];
+ }
+ }
+ }
+
+
+ /**
+ * @param a
+ * @param b
+ * @param r
+ */
+ public static void gluMultMatricesf(FloatBuffer a, FloatBuffer b, FloatBuffer r) {
+ int aPos = a.position();
+ int bPos = b.position();
+ int rPos = r.position();
+
+ for (int i = 0; i < 4; i++) {
+ for (int j = 0; j < 4; j++) {
+ r.put(i*4+j + rPos,
+ a.get(i*4+0+aPos)*b.get(0*4+j+bPos) +
+ a.get(i*4+1+aPos)*b.get(1*4+j+bPos) +
+ a.get(i*4+2+aPos)*b.get(2*4+j+bPos) +
+ a.get(i*4+3+aPos)*b.get(3*4+j+bPos));
+ }
+ }
+ }
+
+ /**
+ * Normalize vector
+ *
+ * @param v
+ */
+ public static void normalize(float[] v) {
+ float r;
+
+ r = (float) Math.sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
+ if ( r == 0.0 || r == 1.0)
+ return;
+
+ r = 1.0f / r;
+
+ v[0] *= r;
+ v[1] *= r;
+ v[2] *= r;
+
+ return;
+ }
+
+ /**
+ * Normalize vector
+ *
+ * @param v
+ */
+ public static void normalize(FloatBuffer v) {
+ float r;
+
+ int vPos = v.position();
+
+ r = (float) Math.sqrt(v.get(0+vPos) * v.get(0+vPos) +
+ v.get(1+vPos) * v.get(1+vPos) +
+ v.get(2+vPos) * v.get(2+vPos));
+ if ( r == 0.0 || r == 1.0)
+ return;
+
+ r = 1.0f / r;
+
+ v.put(0+vPos, v.get(0+vPos) * r);
+ v.put(1+vPos, v.get(1+vPos) * r);
+ v.put(2+vPos, v.get(2+vPos) * r);
+
+ return;
+ }
+
+
+ /**
+ * Calculate cross-product
+ *
+ * @param v1
+ * @param v2
+ * @param result
+ */
+ private static void cross(float[] v1, float[] v2, float[] result) {
+ result[0] = v1[1] * v2[2] - v1[2] * v2[1];
+ result[1] = v1[2] * v2[0] - v1[0] * v2[2];
+ result[2] = v1[0] * v2[1] - v1[1] * v2[0];
+ }
+
+ /**
+ * Calculate cross-product
+ *
+ * @param v1
+ * @param v2
+ * @param result
+ */
+ private static void cross(FloatBuffer v1, FloatBuffer v2, FloatBuffer result) {
+ int v1Pos = v1.position();
+ int v2Pos = v2.position();
+ int rPos = result.position();
+
+ result.put(0+rPos, v1.get(1+v1Pos) * v2.get(2+v2Pos) - v1.get(2+v1Pos) * v2.get(1+v2Pos));
+ result.put(1+rPos, v1.get(2+v1Pos) * v2.get(0+v2Pos) - v1.get(0+v1Pos) * v2.get(2+v2Pos));
+ result.put(2+rPos, v1.get(0+v1Pos) * v2.get(1+v2Pos) - v1.get(1+v1Pos) * v2.get(0+v2Pos));
+ }
+
+ /**
+ * Method gluOrtho2D.
+ *
+ * @param left
+ * @param right
+ * @param bottom
+ * @param top
+ */
+ public void gluOrtho2D(GLMatrixFunc gl, float left, float right, float bottom, float top) {
+ gl.glOrthof(left, right, bottom, top, -1, 1);
+ }
+
+ /**
+ * Method gluPerspective.
+ *
+ * @param fovy
+ * @param aspect
+ * @param zNear
+ * @param zFar
+ */
+ public void gluPerspective(GLMatrixFunc gl, float fovy, float aspect, float zNear, float zFar) {
+ float sine, cotangent, deltaZ;
+ float radians = fovy / 2 * (float) Math.PI / 180;
+
+ deltaZ = zFar - zNear;
+ sine = (float) Math.sin(radians);
+
+ if ((deltaZ == 0) || (sine == 0) || (aspect == 0)) {
+ return;
+ }
+
+ cotangent = (float) Math.cos(radians) / sine;
+
+ gluMakeIdentityf(matrixBuf);
+
+ matrixBuf.put(0 * 4 + 0, cotangent / aspect);
+ matrixBuf.put(1 * 4 + 1, cotangent);
+ matrixBuf.put(2 * 4 + 2, - (zFar + zNear) / deltaZ);
+ matrixBuf.put(2 * 4 + 3, -1);
+ matrixBuf.put(3 * 4 + 2, -2 * zNear * zFar / deltaZ);
+ matrixBuf.put(3 * 4 + 3, 0);
+
+ gl.glMultMatrixf(matrixBuf);
+ }
+
+ /**
+ * Method gluLookAt
+ *
+ * @param eyex
+ * @param eyey
+ * @param eyez
+ * @param centerx
+ * @param centery
+ * @param centerz
+ * @param upx
+ * @param upy
+ * @param upz
+ */
+ public void gluLookAt(GLMatrixFunc gl,
+ float eyex,
+ float eyey,
+ float eyez,
+ float centerx,
+ float centery,
+ float centerz,
+ float upx,
+ float upy,
+ float upz) {
+ FloatBuffer forward = this.forwardBuf;
+ FloatBuffer side = this.sideBuf;
+ FloatBuffer up = this.upBuf;
+
+ forward.put(0, centerx - eyex);
+ forward.put(1, centery - eyey);
+ forward.put(2, centerz - eyez);
+
+ up.put(0, upx);
+ up.put(1, upy);
+ up.put(2, upz);
+
+ normalize(forward);
+
+ /* Side = forward x up */
+ cross(forward, up, side);
+ normalize(side);
+
+ /* Recompute up as: up = side x forward */
+ cross(side, forward, up);
+
+ gluMakeIdentityf(matrixBuf);
+ matrixBuf.put(0 * 4 + 0, side.get(0));
+ matrixBuf.put(1 * 4 + 0, side.get(1));
+ matrixBuf.put(2 * 4 + 0, side.get(2));
+
+ matrixBuf.put(0 * 4 + 1, up.get(0));
+ matrixBuf.put(1 * 4 + 1, up.get(1));
+ matrixBuf.put(2 * 4 + 1, up.get(2));
+
+ matrixBuf.put(0 * 4 + 2, -forward.get(0));
+ matrixBuf.put(1 * 4 + 2, -forward.get(1));
+ matrixBuf.put(2 * 4 + 2, -forward.get(2));
+
+ gl.glMultMatrixf(matrixBuf);
+ gl.glTranslatef(-eyex, -eyey, -eyez);
+ }
+
+ /**
+ * Method gluProject
+ *
+ * @param objx
+ * @param objy
+ * @param objz
+ * @param modelMatrix
+ * @param projMatrix
+ * @param viewport
+ * @param win_pos
+ *
+ * @return
+ */
+ public boolean gluProject(float objx,
+ float objy,
+ float objz,
+ float[] modelMatrix,
+ int modelMatrix_offset,
+ float[] projMatrix,
+ int projMatrix_offset,
+ int[] viewport,
+ int viewport_offset,
+ float[] win_pos,
+ int win_pos_offset ) {
+
+ float[] in = this.in;
+ float[] out = this.out;
+
+ in[0] = objx;
+ in[1] = objy;
+ in[2] = objz;
+ in[3] = 1.0f;
+
+ __gluMultMatrixVecf(modelMatrix, modelMatrix_offset, in, out);
+ __gluMultMatrixVecf(projMatrix, projMatrix_offset, out, in);
+
+ if (in[3] == 0.0f)
+ return false;
+
+ in[3] = (1.0f / in[3]) * 0.5f;
+
+ // Map x, y and z to range 0-1
+ in[0] = in[0] * in[3] + 0.5f;
+ in[1] = in[1] * in[3] + 0.5f;
+ in[2] = in[2] * in[3] + 0.5f;
+
+ // Map x,y to viewport
+ win_pos[0+win_pos_offset] = in[0] * viewport[2+viewport_offset] + viewport[0+viewport_offset];
+ win_pos[1+win_pos_offset] = in[1] * viewport[3+viewport_offset] + viewport[1+viewport_offset];
+ win_pos[2+win_pos_offset] = in[2];
+
+ return true;
+ }
+
+ /**
+ * Method gluProject
+ *
+ * @param objx
+ * @param objy
+ * @param objz
+ * @param modelMatrix
+ * @param projMatrix
+ * @param viewport
+ * @param win_pos
+ *
+ * @return
+ */
+ public boolean gluProject(float objx,
+ float objy,
+ float objz,
+ FloatBuffer modelMatrix,
+ FloatBuffer projMatrix,
+ IntBuffer viewport,
+ FloatBuffer win_pos) {
+
+ FloatBuffer in = this.inBuf;
+ FloatBuffer out = this.outBuf;
+
+ in.put(0, objx);
+ in.put(1, objy);
+ in.put(2, objz);
+ in.put(3, 1.0f);
+
+ __gluMultMatrixVecf(modelMatrix, in, out);
+ __gluMultMatrixVecf(projMatrix, out, in);
+
+ if (in.get(3) == 0.0f)
+ return false;
+
+ in.put(3, (1.0f / in.get(3)) * 0.5f);
+
+ // Map x, y and z to range 0-1
+ in.put(0, in.get(0) * in.get(3) + 0.5f);
+ in.put(1, in.get(1) * in.get(3) + 0.5f);
+ in.put(2, in.get(2) * in.get(3) + 0.5f);
+
+ // Map x,y to viewport
+ int vPos = viewport.position();
+ int wPos = win_pos.position();
+ win_pos.put(0+wPos, in.get(0) * viewport.get(2+vPos) + viewport.get(0+vPos));
+ win_pos.put(1+wPos, in.get(1) * viewport.get(3+vPos) + viewport.get(1+vPos));
+ win_pos.put(2+wPos, in.get(2));
+
+ return true;
+ }
+
+
+ /**
+ * Method gluUnproject
+ *
+ * @param winx
+ * @param winy
+ * @param winz
+ * @param modelMatrix
+ * @param projMatrix
+ * @param viewport
+ * @param obj_pos
+ *
+ * @return
+ */
+ public boolean gluUnProject(float winx,
+ float winy,
+ float winz,
+ float[] modelMatrix,
+ int modelMatrix_offset,
+ float[] projMatrix,
+ int projMatrix_offset,
+ int[] viewport,
+ int viewport_offset,
+ float[] obj_pos,
+ int obj_pos_offset) {
+ float[] in = this.in;
+ float[] out = this.out;
+
+ gluMultMatricesf(modelMatrix, modelMatrix_offset, projMatrix, projMatrix_offset, matrix);
+
+ if (!gluInvertMatrixf(matrix, matrix))
+ return false;
+
+ in[0] = winx;
+ in[1] = winy;
+ in[2] = winz;
+ in[3] = 1.0f;
+
+ // Map x and y from window coordinates
+ in[0] = (in[0] - viewport[0+viewport_offset]) / viewport[2+viewport_offset];
+ in[1] = (in[1] - viewport[1+viewport_offset]) / viewport[3+viewport_offset];
+
+ // Map to range -1 to 1
+ in[0] = in[0] * 2 - 1;
+ in[1] = in[1] * 2 - 1;
+ in[2] = in[2] * 2 - 1;
+
+ __gluMultMatrixVecf(matrix, 0, in, out);
+
+ if (out[3] == 0.0)
+ return false;
+
+ out[3] = 1.0f / out[3];
+
+ obj_pos[0+obj_pos_offset] = out[0] * out[3];
+ obj_pos[1+obj_pos_offset] = out[1] * out[3];
+ obj_pos[2+obj_pos_offset] = out[2] * out[3];
+
+ return true;
+ }
+
+
+ /**
+ * Method gluUnproject
+ *
+ * @param winx
+ * @param winy
+ * @param winz
+ * @param modelMatrix
+ * @param projMatrix
+ * @param viewport
+ * @param obj_pos
+ *
+ * @return
+ */
+ public boolean gluUnProject(float winx,
+ float winy,
+ float winz,
+ FloatBuffer modelMatrix,
+ FloatBuffer projMatrix,
+ IntBuffer viewport,
+ FloatBuffer obj_pos) {
+ FloatBuffer in = this.inBuf;
+ FloatBuffer out = this.outBuf;
+
+ gluMultMatricesf(modelMatrix, projMatrix, matrixBuf);
+
+ if (!gluInvertMatrixf(matrixBuf, matrixBuf))
+ return false;
+
+ in.put(0, winx);
+ in.put(1, winy);
+ in.put(2, winz);
+ in.put(3, 1.0f);
+
+ // Map x and y from window coordinates
+ int vPos = viewport.position();
+ int oPos = obj_pos.position();
+ in.put(0, (in.get(0) - viewport.get(0+vPos)) / viewport.get(2+vPos));
+ in.put(1, (in.get(1) - viewport.get(1+vPos)) / viewport.get(3+vPos));
+
+ // Map to range -1 to 1
+ in.put(0, in.get(0) * 2 - 1);
+ in.put(1, in.get(1) * 2 - 1);
+ in.put(2, in.get(2) * 2 - 1);
+
+ __gluMultMatrixVecf(matrixBuf, in, out);
+
+ if (out.get(3) == 0.0f)
+ return false;
+
+ out.put(3, 1.0f / out.get(3));
+
+ obj_pos.put(0+oPos, out.get(0) * out.get(3));
+ obj_pos.put(1+oPos, out.get(1) * out.get(3));
+ obj_pos.put(2+oPos, out.get(2) * out.get(3));
+
+ return true;
+ }
+
+
+ /**
+ * Method gluUnproject4
+ *
+ * @param winx
+ * @param winy
+ * @param winz
+ * @param clipw
+ * @param modelMatrix
+ * @param projMatrix
+ * @param viewport
+ * @param near
+ * @param far
+ * @param obj_pos
+ *
+ * @return
+ */
+ public boolean gluUnProject4(float winx,
+ float winy,
+ float winz,
+ float clipw,
+ float[] modelMatrix,
+ int modelMatrix_offset,
+ float[] projMatrix,
+ int projMatrix_offset,
+ int[] viewport,
+ int viewport_offset,
+ float near,
+ float far,
+ float[] obj_pos,
+ int obj_pos_offset ) {
+ float[] in = this.in;
+ float[] out = this.out;
+
+ gluMultMatricesf(modelMatrix, modelMatrix_offset, projMatrix, projMatrix_offset, matrix);
+
+ if (!gluInvertMatrixf(matrix, matrix))
+ return false;
+
+ in[0] = winx;
+ in[1] = winy;
+ in[2] = winz;
+ in[3] = clipw;
+
+ // Map x and y from window coordinates
+ in[0] = (in[0] - viewport[0+viewport_offset]) / viewport[2+viewport_offset];
+ in[1] = (in[1] - viewport[1+viewport_offset]) / viewport[3+viewport_offset];
+ in[2] = (in[2] - near) / (far - near);
+
+ // Map to range -1 to 1
+ in[0] = in[0] * 2 - 1;
+ in[1] = in[1] * 2 - 1;
+ in[2] = in[2] * 2 - 1;
+
+ __gluMultMatrixVecf(matrix, 0, in, out);
+
+ if (out[3] == 0.0f)
+ return false;
+
+ obj_pos[0+obj_pos_offset] = out[0];
+ obj_pos[1+obj_pos_offset] = out[1];
+ obj_pos[2+obj_pos_offset] = out[2];
+ obj_pos[3+obj_pos_offset] = out[3];
+ return true;
+ }
+
+ /**
+ * Method gluUnproject4
+ *
+ * @param winx
+ * @param winy
+ * @param winz
+ * @param clipw
+ * @param modelMatrix
+ * @param projMatrix
+ * @param viewport
+ * @param near
+ * @param far
+ * @param obj_pos
+ *
+ * @return
+ */
+ public boolean gluUnProject4(float winx,
+ float winy,
+ float winz,
+ float clipw,
+ FloatBuffer modelMatrix,
+ FloatBuffer projMatrix,
+ IntBuffer viewport,
+ float near,
+ float far,
+ FloatBuffer obj_pos) {
+ FloatBuffer in = this.inBuf;
+ FloatBuffer out = this.outBuf;
+
+ gluMultMatricesf(modelMatrix, projMatrix, matrixBuf);
+
+ if (!gluInvertMatrixf(matrixBuf, matrixBuf))
+ return false;
+
+ in.put(0, winx);
+ in.put(1, winy);
+ in.put(2, winz);
+ in.put(3, clipw);
+
+ // Map x and y from window coordinates
+ int vPos = viewport.position();
+ in.put(0, (in.get(0) - viewport.get(0+vPos)) / viewport.get(2+vPos));
+ in.put(1, (in.get(1) - viewport.get(1+vPos)) / viewport.get(3+vPos));
+ in.put(2, (in.get(2) - near) / (far - near));
+
+ // Map to range -1 to 1
+ in.put(0, in.get(0) * 2 - 1);
+ in.put(1, in.get(1) * 2 - 1);
+ in.put(2, in.get(2) * 2 - 1);
+
+ __gluMultMatrixVecf(matrixBuf, in, out);
+
+ if (out.get(3) == 0.0f)
+ return false;
+
+ int oPos = obj_pos.position();
+ obj_pos.put(0+oPos, out.get(0));
+ obj_pos.put(1+oPos, out.get(1));
+ obj_pos.put(2+oPos, out.get(2));
+ obj_pos.put(3+oPos, out.get(3));
+ return true;
+ }
+
+
+ /**
+ * Method gluPickMatrix
+ *
+ * @param x
+ * @param y
+ * @param deltaX
+ * @param deltaY
+ * @param viewport
+ */
+ public void gluPickMatrix(GLMatrixFunc gl,
+ float x,
+ float y,
+ float deltaX,
+ float deltaY,
+ IntBuffer viewport) {
+ if (deltaX <= 0 || deltaY <= 0) {
+ return;
+ }
+
+ /* Translate and scale the picked region to the entire window */
+ int vPos = viewport.position();
+ gl.glTranslatef((viewport.get(2+vPos) - 2 * (x - viewport.get(0+vPos))) / deltaX,
+ (viewport.get(3+vPos) - 2 * (y - viewport.get(1+vPos))) / deltaY,
+ 0);
+ gl.glScalef(viewport.get(2) / deltaX, viewport.get(3) / deltaY, 1.0f);
+ }
+
+ /**
+ * Method gluPickMatrix
+ *
+ * @param x
+ * @param y
+ * @param deltaX
+ * @param deltaY
+ * @param viewport
+ * @param viewport_offset
+ */
+ public void gluPickMatrix(GLMatrixFunc gl,
+ float x,
+ float y,
+ float deltaX,
+ float deltaY,
+ int[] viewport,
+ int viewport_offset) {
+ if (deltaX <= 0 || deltaY <= 0) {
+ return;
+ }
+
+ /* Translate and scale the picked region to the entire window */
+ gl.glTranslatef((viewport[2+viewport_offset] - 2 * (x - viewport[0+viewport_offset])) / deltaX,
+ (viewport[3+viewport_offset] - 2 * (y - viewport[1+viewport_offset])) / deltaY,
+ 0);
+ gl.glScalef(viewport[2+viewport_offset] / deltaX, viewport[3+viewport_offset] / deltaY, 1.0f);
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/SystemUtil.java.javame_cdc_fp b/src/jogl/classes/com/jogamp/opengl/impl/SystemUtil.java.javame_cdc_fp
new file mode 100644
index 000000000..f686bea92
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/impl/SystemUtil.java.javame_cdc_fp
@@ -0,0 +1,10 @@
+package com.jogamp.opengl.impl;
+
+public class SystemUtil {
+
+ /** Wrapper for System.getenv(), which doesn't work on platforms
+ earlier than JDK 5 */
+ public static String getenv(String variableName) {
+ return null;
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/SystemUtil.java.javase b/src/jogl/classes/com/jogamp/opengl/impl/SystemUtil.java.javase
new file mode 100644
index 000000000..dbb717a32
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/impl/SystemUtil.java.javase
@@ -0,0 +1,18 @@
+package com.jogamp.opengl.impl;
+
+public class SystemUtil {
+
+ private static volatile boolean getenvSupported = true;
+ /** Wrapper for System.getenv(), which doesn't work on platforms
+ earlier than JDK 5 */
+ public static String getenv(String variableName) {
+ if (getenvSupported) {
+ try {
+ return System.getenv(variableName);
+ } catch (Error e) {
+ getenvSupported = false;
+ }
+ }
+ return null;
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/ThreadingImpl.java b/src/jogl/classes/com/jogamp/opengl/impl/ThreadingImpl.java
new file mode 100644
index 000000000..2576c8ae8
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/impl/ThreadingImpl.java
@@ -0,0 +1,234 @@
+/*
+ * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.opengl.impl;
+
+import java.lang.reflect.InvocationTargetException;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+import javax.media.nativewindow.NativeWindowFactory;
+import com.sun.nativewindow.impl.NWReflection;
+import javax.media.opengl.GLException;
+
+/** Implementation of the {@link javax.media.opengl.Threading} class. */
+
+public class ThreadingImpl {
+ public static final int AWT = 1;
+ public static final int WORKER = 2;
+
+ protected static final boolean DEBUG = Debug.debug("Threading");
+
+ private static boolean singleThreaded = true;
+ private static int mode;
+ private static boolean hasAWT;
+ // We need to know whether we're running on X11 platforms to change
+ // our behavior when the Java2D/JOGL bridge is active
+ private static boolean _isX11;
+
+ private static final ThreadingPlugin threadingPlugin;
+
+ static {
+ Object threadingPluginTmp =
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ String workaround = Debug.getProperty("jogl.1thread", true);
+ // Default to using the AWT thread on all platforms except
+ // Windows. On OS X there is instability apparently due to
+ // using the JAWT on non-AWT threads. On X11 platforms there
+ // are potential deadlocks which can be caused if the AWT
+ // EventQueue thread hands work off to the GLWorkerThread
+ // while holding the AWT lock. The optimization of
+ // makeCurrent / release calls isn't worth these stability
+ // problems.
+ hasAWT = NWReflection.isClassAvailable("java.awt.Canvas") &&
+ NWReflection.isClassAvailable("javax.media.opengl.awt.GLCanvas");
+
+ String osType = NativeWindowFactory.getNativeWindowType(false);
+ _isX11 = NativeWindowFactory.TYPE_X11.equals(osType);
+ // boolean isWindows = NativeWindowFactory.TYPE_WINDOWS.equals(osType);
+
+ // int defaultMode = (isWindows ? WORKER : ( hasAWT ? AWT : WORKER ) );
+ int defaultMode = ( hasAWT ? AWT : WORKER );
+
+ mode = defaultMode;
+ if (workaround != null) {
+ workaround = workaround.toLowerCase();
+ if (workaround.equals("true") ||
+ workaround.equals("auto")) {
+ // Nothing to do; singleThreaded and mode already set up
+ } else if (workaround.equals("worker")) {
+ singleThreaded = true;
+ mode = WORKER;
+ } else if (workaround.equals("awt")) {
+ singleThreaded = true;
+ mode = AWT;
+ } else {
+ singleThreaded = false;
+ }
+ }
+ printWorkaroundNotice();
+
+ Object threadingPluginObj=null;
+ // try to fetch the AWTThreadingPlugin
+ try {
+ threadingPluginObj = NWReflection.createInstance("com.jogamp.opengl.impl.awt.AWTThreadingPlugin");
+ } catch (Throwable t) { }
+ return threadingPluginObj;
+ }
+ });
+ threadingPlugin = (ThreadingPlugin) threadingPluginTmp;
+ if(DEBUG) {
+ System.err.println("Threading: hasAWT "+hasAWT+", mode "+((mode==AWT)?"AWT":"WORKER")+", plugin "+threadingPlugin);
+ }
+ }
+
+ /** No reason to ever instantiate this class */
+ private ThreadingImpl() {}
+
+ public static boolean isX11() { return _isX11; }
+ public static int getMode() { return mode; }
+
+ /** If an implementation of the javax.media.opengl APIs offers a
+ multithreading option but the default behavior is single-threading,
+ this API provides a mechanism for end users to disable single-threading
+ in this implementation. Users are strongly discouraged from
+ calling this method unless they are aware of all of the
+ consequences and are prepared to enforce some amount of
+ threading restrictions in their applications. Disabling
+ single-threading, for example, may have unintended consequences
+ on GLAutoDrawable implementations such as GLCanvas, GLJPanel and
+ GLPbuffer. Currently there is no supported way to re-enable it
+ once disabled, partly to discourage careless use of this
+ method. This method should be called as early as possible in an
+ application. */
+ public static void disableSingleThreading() {
+ singleThreaded = false;
+ if (Debug.verbose()) {
+ System.err.println("Application forced disabling of single-threading of javax.media.opengl implementation");
+ }
+ }
+
+ /** Indicates whether OpenGL work is being automatically forced to a
+ single thread in this implementation. */
+ public static boolean isSingleThreaded() {
+ return singleThreaded;
+ }
+
+ /** Indicates whether the current thread is the single thread on
+ which this implementation of the javax.media.opengl APIs
+ performs all of its OpenGL-related work. This method should only
+ be called if the single-thread model is in effect. */
+ public static boolean isOpenGLThread() throws GLException {
+ if (!isSingleThreaded()) {
+ throw new GLException("Should only call this in single-threaded mode");
+ }
+
+ if(null!=threadingPlugin) {
+ return threadingPlugin.isOpenGLThread();
+ }
+
+ switch (mode) {
+ case AWT:
+ return true;
+ case WORKER:
+ return GLWorkerThread.isWorkerThread();
+ default:
+ throw new InternalError("Illegal single-threading mode " + mode);
+ }
+ }
+
+ /** Executes the passed Runnable on the single thread used for all
+ OpenGL work in this javax.media.opengl API implementation. It is
+ not specified exactly which thread is used for this
+ purpose. This method should only be called if the single-thread
+ model is in use and if the current thread is not the OpenGL
+ thread (i.e., if isOpenGLThread()
returns
+ false). It is up to the end user to check to see whether the
+ current thread is the OpenGL thread and either execute the
+ Runnable directly or perform the work inside it. */
+ public static void invokeOnOpenGLThread(Runnable r) throws GLException {
+ if (!isSingleThreaded()) {
+ throw new GLException ("Should only call this in single-threaded mode");
+ }
+
+ if (isOpenGLThread()) {
+ throw new GLException ("Should only call this from other threads than the OpenGL thread");
+ }
+
+ if(null!=threadingPlugin) {
+ threadingPlugin.invokeOnOpenGLThread(r);
+ return;
+ }
+
+ switch (mode) {
+ case AWT:
+ r.run();
+ break;
+
+ case WORKER:
+ if (!GLWorkerThread.isStarted()) {
+ synchronized (GLWorkerThread.class) {
+ if (!GLWorkerThread.isStarted()) {
+ GLWorkerThread.start();
+ }
+ }
+ }
+ try {
+ GLWorkerThread.invokeAndWait(r);
+ } catch (InvocationTargetException e) {
+ throw new GLException(e.getTargetException());
+ } catch (InterruptedException e) {
+ throw new GLException(e);
+ }
+ break;
+
+ default:
+ throw new InternalError("Illegal single-threading mode " + mode);
+ }
+ }
+
+ /** This is a workaround for AWT-related deadlocks which only seem
+ to show up in the context of applets */
+ public static boolean isAWTMode() {
+ return (mode == AWT);
+ }
+
+ private static void printWorkaroundNotice() {
+ if (singleThreaded && Debug.verbose()) {
+ System.err.println("Using " +
+ (mode == AWT ? "AWT" : "OpenGL worker") +
+ " thread for performing OpenGL work in javax.media.opengl implementation");
+ }
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/ThreadingPlugin.java b/src/jogl/classes/com/jogamp/opengl/impl/ThreadingPlugin.java
new file mode 100644
index 000000000..37e4aac70
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/impl/ThreadingPlugin.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.impl;
+
+import javax.media.opengl.*;
+
+public interface ThreadingPlugin {
+ /** Indicates whether the current thread is the single thread on
+ which this implementation of the javax.media.opengl APIs
+ performs all of its OpenGL-related work. This method should only
+ be called if the single-thread model is in effect. */
+ public boolean isOpenGLThread() throws GLException;
+
+ /** Executes the passed Runnable on the single thread used for all
+ OpenGL work in this javax.media.opengl API implementation. It is
+ not specified exactly which thread is used for this
+ purpose. This method should only be called if the single-thread
+ model is in use and if the current thread is not the OpenGL
+ thread (i.e., if isOpenGLThread()
returns
+ false). It is up to the end user to check to see whether the
+ current thread is the OpenGL thread and either execute the
+ Runnable directly or perform the work inside it. */
+ public void invokeOnOpenGLThread(Runnable r) throws GLException;
+}
+
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/awt/AWTThreadingPlugin.java b/src/jogl/classes/com/jogamp/opengl/impl/awt/AWTThreadingPlugin.java
new file mode 100755
index 000000000..07bf2f2db
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/impl/awt/AWTThreadingPlugin.java
@@ -0,0 +1,129 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.impl.awt;
+
+import javax.media.opengl.*;
+
+import java.awt.event.*;
+
+import java.awt.EventQueue;
+import java.lang.reflect.InvocationTargetException;
+
+import com.jogamp.opengl.impl.*;
+
+public class AWTThreadingPlugin implements ThreadingPlugin {
+
+ public AWTThreadingPlugin() {}
+
+ public boolean isOpenGLThread() throws GLException {
+ switch (ThreadingImpl.getMode()) {
+ case ThreadingImpl.AWT:
+ if (Java2D.isOGLPipelineActive()) {
+ // FIXME: ideally only the QFT would be considered to be the
+ // "OpenGL thread", but we can not currently run all of
+ // JOGL's OpenGL work on that thread. See the FIXME in
+ // invokeOnOpenGLThread.
+ return (Java2D.isQueueFlusherThread() ||
+ (ThreadingImpl.isX11() && EventQueue.isDispatchThread()));
+ } else {
+ return EventQueue.isDispatchThread();
+ }
+ case ThreadingImpl.WORKER:
+ if (Java2D.isOGLPipelineActive()) {
+ // FIXME: ideally only the QFT would be considered to be the
+ // "OpenGL thread", but we can not currently run all of
+ // JOGL's OpenGL work on that thread. See the FIXME in
+ // invokeOnOpenGLThread.
+ return (Java2D.isQueueFlusherThread() ||
+ (ThreadingImpl.isX11() && GLWorkerThread.isWorkerThread()));
+ } else {
+ return GLWorkerThread.isWorkerThread();
+ }
+ default:
+ throw new InternalError("Illegal single-threading mode " + ThreadingImpl.getMode());
+ }
+ }
+
+ public void invokeOnOpenGLThread(Runnable r) throws GLException {
+ switch (ThreadingImpl.getMode()) {
+ case ThreadingImpl.AWT:
+ // FIXME: ideally should run all OpenGL work on the Java2D QFT
+ // thread when it's enabled, but unfortunately there are
+ // deadlock issues on X11 platforms when making our
+ // heavyweight OpenGL contexts current on the QFT because we
+ // perform the JAWT lock inside the makeCurrent()
+ // implementation, which attempts to grab the AWT lock on the
+ // QFT which is not allowed. For now, on X11 platforms,
+ // continue to perform this work on the EDT.
+ if (Java2D.isOGLPipelineActive() && !ThreadingImpl.isX11()) {
+ Java2D.invokeWithOGLContextCurrent(null, r);
+ } else {
+ try {
+ EventQueue.invokeAndWait(r);
+ } catch (InvocationTargetException e) {
+ throw new GLException(e.getTargetException());
+ } catch (InterruptedException e) {
+ throw new GLException(e);
+ }
+ }
+ break;
+
+ case ThreadingImpl.WORKER:
+ if (!GLWorkerThread.isStarted()) {
+ synchronized (GLWorkerThread.class) {
+ if (!GLWorkerThread.isStarted()) {
+ GLWorkerThread.start();
+ }
+ }
+ }
+ try {
+ GLWorkerThread.invokeAndWait(r);
+ } catch (InvocationTargetException e) {
+ throw new GLException(e.getTargetException());
+ } catch (InterruptedException e) {
+ throw new GLException(e);
+ }
+ break;
+
+ default:
+ throw new InternalError("Illegal single-threading mode " + ThreadingImpl.getMode());
+ }
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/awt/AWTUtil.java b/src/jogl/classes/com/jogamp/opengl/impl/awt/AWTUtil.java
new file mode 100644
index 000000000..306f6cee7
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/impl/awt/AWTUtil.java
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ */
+
+package com.jogamp.opengl.impl.awt;
+
+import com.sun.nativewindow.impl.jawt.*;
+
+import com.jogamp.opengl.impl.*;
+
+import javax.media.opengl.*;
+
+import java.lang.reflect.*;
+import java.awt.GraphicsEnvironment;
+
+public class AWTUtil {
+ // See whether we're running in headless mode
+ private static boolean headlessMode;
+ private static Class j2dClazz = null;
+ private static Method isOGLPipelineActive = null;
+ private static Method isQueueFlusherThread = null;
+ private static boolean j2dOk = false;
+
+ static {
+ lockedToolkit = false;
+ headlessMode = GraphicsEnvironment.isHeadless();
+ if(!headlessMode) {
+ try {
+ j2dClazz = Class.forName("com.jogamp.opengl.impl.awt.Java2D");
+ isOGLPipelineActive = j2dClazz.getMethod("isOGLPipelineActive", null);
+ isQueueFlusherThread = j2dClazz.getMethod("isQueueFlusherThread", null);
+ j2dOk = true;
+ } catch (Exception e) {}
+ }
+ }
+
+ private static boolean lockedToolkit;
+
+ public static synchronized void lockToolkit() throws GLException {
+ if (lockedToolkit) {
+ throw new GLException("Toolkit already locked");
+ }
+ lockedToolkit = true;
+
+ if (headlessMode) {
+ // Workaround for running (to some degree) in headless
+ // environments but still supporting rendering via pbuffers
+ // For full correctness, would need to implement a Lock class
+ return;
+ }
+
+ if(j2dOk) {
+ try {
+ if( !((Boolean)isOGLPipelineActive.invoke(null, null)).booleanValue() ||
+ !((Boolean)isQueueFlusherThread.invoke(null, null)).booleanValue() ) {
+ JAWTUtil.lockToolkit();
+ }
+ } catch (Exception e) { j2dOk=false; }
+ }
+ if(!j2dOk) {
+ JAWTUtil.lockToolkit();
+ }
+ }
+
+ public static synchronized void unlockToolkit() {
+ if (lockedToolkit) {
+ lockedToolkit = false;
+ if (headlessMode) {
+ // Workaround for running (to some degree) in headless
+ // environments but still supporting rendering via pbuffers
+ // For full correctness, would need to implement a Lock class
+ return;
+ }
+
+ if(j2dOk) {
+ try {
+ if( !((Boolean)isOGLPipelineActive.invoke(null, null)).booleanValue() ||
+ !((Boolean)isQueueFlusherThread.invoke(null, null)).booleanValue() ) {
+ JAWTUtil.unlockToolkit();
+ }
+ } catch (Exception e) { j2dOk=false; }
+ }
+ if(!j2dOk) {
+ JAWTUtil.unlockToolkit();
+ }
+ }
+ }
+
+ public static boolean isToolkitLocked() {
+ return JAWTUtil.isToolkitLocked();
+ }
+
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/awt/Java2D.java b/src/jogl/classes/com/jogamp/opengl/impl/awt/Java2D.java
new file mode 100755
index 000000000..b871c66a7
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/impl/awt/Java2D.java
@@ -0,0 +1,569 @@
+/*
+ * Copyright (c) 2003-2005 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.impl.awt;
+
+import com.jogamp.opengl.impl.*;
+
+import java.awt.*;
+import java.awt.image.*;
+import java.lang.reflect.*;
+import java.security.*;
+
+import javax.media.opengl.*;
+import javax.media.nativewindow.*;
+import javax.media.nativewindow.awt.*;
+
+/** Defines integration with the Java2D OpenGL pipeline. This
+ integration is only supported in 1.6 and is highly experimental. */
+
+public class Java2D {
+ private static boolean DEBUG = Debug.debug("Java2D");
+ private static boolean VERBOSE = Debug.verbose();
+ private static boolean isHeadless;
+ private static boolean isOGLPipelineActive;
+ private static Method invokeWithOGLContextCurrentMethod;
+ private static Method isQueueFlusherThreadMethod;
+ private static Method getOGLViewportMethod;
+ private static Method getOGLScissorBoxMethod;
+ private static Method getOGLSurfaceIdentifierMethod;
+ // This one is currently optional and is only in very recent Mustang builds
+ private static Method getOGLTextureTypeMethod;
+
+ // The following methods and fields are needed for proper support of
+ // Frame Buffer Objects in the Java2D/OpenGL pipeline
+ // (-Dsun.java2d.opengl.fbobject=true)
+ private static boolean fbObjectSupportInitialized;
+ private static Method invokeWithOGLSharedContextCurrentMethod;
+ private static Method getOGLSurfaceTypeMethod;
+
+ // Publicly-visible constants for OpenGL surface types
+ public static final int UNDEFINED = getOGLUtilitiesIntField("UNDEFINED");
+ public static final int WINDOW = getOGLUtilitiesIntField("WINDOW");
+ public static final int PBUFFER = getOGLUtilitiesIntField("PBUFFER");
+ public static final int TEXTURE = getOGLUtilitiesIntField("TEXTURE");
+ public static final int FLIP_BACKBUFFER = getOGLUtilitiesIntField("FLIP_BACKBUFFER");
+ public static final int FBOBJECT = getOGLUtilitiesIntField("FBOBJECT");
+
+ // If FBOs are enabled in the Java2D/OpenGL pipeline, all contexts
+ // created by JOGL must share textures and display lists with the
+ // Java2D contexts in order to access the frame buffer object for
+ // potential rendering, and to simultaneously support sharing of
+ // textures and display lists with one another. Java2D has the
+ // notion of a single shared context with which all other contexts
+ // (on the same display device?) share textures and display lists;
+ // this is an approximation to that notion which will be refined
+ // later.
+ private static boolean initializedJ2DFBOShareContext;
+ private static GLContext j2dFBOShareContext;
+
+ // Accessors for new methods in sun.java2d.opengl.CGLSurfaceData
+ // class on OS X for enabling bridge
+ // public static long createOGLContextOnSurface(Graphics g, long ctx);
+ // public static boolean makeOGLContextCurrentOnSurface(Graphics g, long ctx);
+ // public static void destroyOGLContext(long ctx);
+ private static Method createOGLContextOnSurfaceMethod;
+ private static Method makeOGLContextCurrentOnSurfaceMethod;
+ private static Method destroyOGLContextMethod;
+
+ static {
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ if (DEBUG && VERBOSE) {
+ System.err.println("Checking for Java2D/OpenGL support");
+ }
+ try {
+ isHeadless = true;
+ // Figure out whether the default graphics configuration is an
+ // OpenGL graphics configuration
+ GraphicsConfiguration cfg =
+ GraphicsEnvironment.getLocalGraphicsEnvironment().
+ getDefaultScreenDevice().
+ getDefaultConfiguration();
+ // If we get here, we aren't running in headless mode
+ isHeadless = false;
+ String name = cfg.getClass().getName();
+ if (DEBUG && VERBOSE) {
+ System.err.println("Java2D support: default GraphicsConfiguration = " + name);
+ }
+ isOGLPipelineActive = (name.startsWith("sun.java2d.opengl"));
+
+ if (isOGLPipelineActive) {
+ try {
+ // Try to get methods we need to integrate
+ Class utils = Class.forName("sun.java2d.opengl.OGLUtilities");
+ invokeWithOGLContextCurrentMethod = utils.getDeclaredMethod("invokeWithOGLContextCurrent",
+ new Class[] {
+ Graphics.class,
+ Runnable.class
+ });
+ invokeWithOGLContextCurrentMethod.setAccessible(true);
+
+ isQueueFlusherThreadMethod = utils.getDeclaredMethod("isQueueFlusherThread",
+ new Class[] {});
+ isQueueFlusherThreadMethod.setAccessible(true);
+
+ getOGLViewportMethod = utils.getDeclaredMethod("getOGLViewport",
+ new Class[] {
+ Graphics.class,
+ Integer.TYPE,
+ Integer.TYPE
+ });
+ getOGLViewportMethod.setAccessible(true);
+
+ getOGLScissorBoxMethod = utils.getDeclaredMethod("getOGLScissorBox",
+ new Class[] {
+ Graphics.class
+ });
+ getOGLScissorBoxMethod.setAccessible(true);
+
+ getOGLSurfaceIdentifierMethod = utils.getDeclaredMethod("getOGLSurfaceIdentifier",
+ new Class[] {
+ Graphics.class
+ });
+ getOGLSurfaceIdentifierMethod.setAccessible(true);
+
+ // Try to get additional methods required for proper FBO support
+ fbObjectSupportInitialized = true;
+ try {
+ invokeWithOGLSharedContextCurrentMethod = utils.getDeclaredMethod("invokeWithOGLSharedContextCurrent",
+ new Class[] {
+ GraphicsConfiguration.class,
+ Runnable.class
+ });
+ invokeWithOGLSharedContextCurrentMethod.setAccessible(true);
+
+ getOGLSurfaceTypeMethod = utils.getDeclaredMethod("getOGLSurfaceType",
+ new Class[] {
+ Graphics.class
+ });
+ getOGLSurfaceTypeMethod.setAccessible(true);
+ } catch (Exception e) {
+ fbObjectSupportInitialized = false;
+ if (DEBUG && VERBOSE) {
+ e.printStackTrace();
+ System.err.println("Disabling Java2D/JOGL FBO support");
+ }
+ }
+
+ // Try to get an additional method for FBO support in recent Mustang builds
+ try {
+ getOGLTextureTypeMethod = utils.getDeclaredMethod("getOGLTextureType",
+ new Class[] {
+ Graphics.class
+ });
+ getOGLTextureTypeMethod.setAccessible(true);
+ } catch (Exception e) {
+ if (DEBUG && VERBOSE) {
+ e.printStackTrace();
+ System.err.println("GL_ARB_texture_rectangle FBO support disabled");
+ }
+ }
+
+ // Try to set up APIs for enabling the bridge on OS X,
+ // where it isn't possible to create generalized
+ // external GLDrawables
+ Class cglSurfaceData = null;
+ try {
+ cglSurfaceData = Class.forName("sun.java2d.opengl.CGLSurfaceData");
+ } catch (Exception e) {
+ if (DEBUG && VERBOSE) {
+ e.printStackTrace();
+ System.err.println("Unable to find class sun.java2d.opengl.CGLSurfaceData for OS X");
+ }
+ }
+ if (cglSurfaceData != null) {
+ // FIXME: for now, assume that FBO support is not enabled on OS X
+ fbObjectSupportInitialized = false;
+
+ // We need to find these methods in order to make the bridge work on OS X
+ createOGLContextOnSurfaceMethod = cglSurfaceData.getDeclaredMethod("createOGLContextOnSurface",
+ new Class[] {
+ Graphics.class,
+ Long.TYPE
+ });
+ createOGLContextOnSurfaceMethod.setAccessible(true);
+
+ makeOGLContextCurrentOnSurfaceMethod = cglSurfaceData.getDeclaredMethod("makeOGLContextCurrentOnSurface",
+ new Class[] {
+ Graphics.class,
+ Long.TYPE
+ });
+ makeOGLContextCurrentOnSurfaceMethod.setAccessible(true);
+
+ destroyOGLContextMethod = cglSurfaceData.getDeclaredMethod("destroyOGLContext",
+ new Class[] {
+ Long.TYPE
+ });
+ destroyOGLContextMethod.setAccessible(true);
+ }
+ } catch (Exception e) {
+ if (DEBUG && VERBOSE) {
+ e.printStackTrace();
+ System.err.println("Disabling Java2D/JOGL integration");
+ }
+ isOGLPipelineActive = false;
+ }
+ }
+ } catch (HeadlessException e) {
+ // The AWT is running in headless mode, so the Java 2D / JOGL bridge is clearly disabled
+ }
+
+ if (DEBUG) {
+ System.err.println("JOGL/Java2D integration " + (isOGLPipelineActive ? "enabled" : "disabled"));
+ }
+ return null;
+ }
+ });
+ }
+
+ public static boolean isOGLPipelineActive() {
+ return isOGLPipelineActive;
+ }
+
+ public static boolean isFBOEnabled() {
+ return fbObjectSupportInitialized;
+ }
+
+ public static boolean isQueueFlusherThread() {
+ checkActive();
+
+ try {
+ return ((Boolean) isQueueFlusherThreadMethod.invoke(null, new Object[] {})).booleanValue();
+ } catch (InvocationTargetException e) {
+ throw new GLException(e.getTargetException());
+ } catch (Exception e) {
+ throw (InternalError) new InternalError().initCause(e);
+ }
+ }
+
+ /** Makes current the OpenGL context associated with the passed
+ Graphics object and runs the given Runnable on the Queue
+ Flushing Thread in one atomic action. */
+ public static void invokeWithOGLContextCurrent(Graphics g, Runnable r) throws GLException {
+ checkActive();
+
+ try {
+ // FIXME: this may need adjustment
+ // This seems to be needed in many applications which don't
+ // initialize an OpenGL context before this and which would
+ // otherwise cause initFBOShareContext to be called from the
+ // Queue Flusher Thread, which isn't allowed
+ initFBOShareContext(GraphicsEnvironment.
+ getLocalGraphicsEnvironment().
+ getDefaultScreenDevice());
+
+ AWTUtil.lockToolkit();
+ try {
+ invokeWithOGLContextCurrentMethod.invoke(null, new Object[] {g, r});
+ } finally {
+ AWTUtil.unlockToolkit();
+ }
+ } catch (InvocationTargetException e) {
+ throw new GLException(e.getTargetException());
+ } catch (Exception e) {
+ throw (InternalError) new InternalError().initCause(e);
+ }
+ }
+
+ /** Makes current the "shared" OpenGL context associated with the
+ given GraphicsConfiguration object, allowing JOGL to share
+ server-side OpenGL objects like textures and display lists with
+ this context when necessary. This is needed when Java2D's FBO
+ support is enabled, because in order to render into that FBO,
+ JOGL must share textures and display lists with it. Returns
+ false if the passed GraphicsConfiguration was not an OpenGL
+ GraphicsConfiguration. */
+ public static boolean invokeWithOGLSharedContextCurrent(GraphicsConfiguration g, Runnable r) throws GLException {
+ checkActive();
+
+ try {
+ AWTUtil.lockToolkit();
+ try {
+ return ((Boolean) invokeWithOGLSharedContextCurrentMethod.invoke(null, new Object[] {g, r})).booleanValue();
+ } finally {
+ AWTUtil.unlockToolkit();
+ }
+ } catch (InvocationTargetException e) {
+ throw new GLException(e.getTargetException());
+ } catch (Exception e) {
+ throw (InternalError) new InternalError().initCause(e);
+ }
+ }
+
+ /** Returns the OpenGL viewport associated with the given Graphics
+ object, assuming that the Graphics object is associated with a
+ component of the specified width and height. The user should
+ call glViewport() with the returned rectangle's bounds in order
+ to get correct rendering results. Should only be called from the
+ Queue Flusher Thread. */
+ public static Rectangle getOGLViewport(Graphics g,
+ int componentWidth,
+ int componentHeight) {
+ checkActive();
+
+ try {
+ return (Rectangle) getOGLViewportMethod.invoke(null, new Object[] {g,
+ new Integer(componentWidth),
+ new Integer(componentHeight)});
+ } catch (InvocationTargetException e) {
+ throw new GLException(e.getTargetException());
+ } catch (Exception e) {
+ throw (InternalError) new InternalError().initCause(e);
+ }
+ }
+
+ /** Returns the OpenGL scissor region associated with the given
+ Graphics object, taking into account all clipping regions, etc.
+ To avoid destroying Java2D's previous rendering results, this
+ method should be called and the resulting rectangle's bounds
+ passed to a call to glScissor(). Should only be called from the
+ Queue Flusher Thread. */
+ public static Rectangle getOGLScissorBox(Graphics g) {
+ checkActive();
+
+ try {
+ return (Rectangle) getOGLScissorBoxMethod.invoke(null, new Object[] {g});
+ } catch (InvocationTargetException e) {
+ throw new GLException(e.getTargetException());
+ } catch (Exception e) {
+ throw (InternalError) new InternalError().initCause(e);
+ }
+ }
+
+ /** Returns an opaque "surface identifier" associated with the given
+ Graphics object. If this changes from invocation to invocation,
+ the underlying OpenGL drawable for the Graphics object has
+ changed and a new external GLDrawable and GLContext should be
+ created (and the old ones destroyed). Should only be called from
+ the Queue Flusher Thread.*/
+ public static Object getOGLSurfaceIdentifier(Graphics g) {
+ checkActive();
+
+ try {
+ return getOGLSurfaceIdentifierMethod.invoke(null, new Object[] {g});
+ } catch (InvocationTargetException e) {
+ throw new GLException(e.getTargetException());
+ } catch (Exception e) {
+ throw (InternalError) new InternalError().initCause(e);
+ }
+ }
+
+ /** Returns the underlying surface type for the given Graphics
+ object. This indicates, in particular, whether Java2D is
+ currently rendering into a pbuffer or FBO. */
+ public static int getOGLSurfaceType(Graphics g) {
+ checkActive();
+
+ try {
+ // FIXME: fallback path for pre-b73 (?) Mustang builds -- remove
+ // once fbobject support is in OGLUtilities
+ if (!fbObjectSupportInitialized) {
+ return 0;
+ }
+
+ return ((Integer) getOGLSurfaceTypeMethod.invoke(null, new Object[] { g })).intValue();
+ } catch (InvocationTargetException e) {
+ throw new GLException(e.getTargetException());
+ } catch (Exception e) {
+ throw (InternalError) new InternalError().initCause(e);
+ }
+ }
+
+ /** Returns the underlying texture target of the given Graphics
+ object assuming it is rendering to an FBO. Returns either
+ GL_TEXTURE_2D or GL_TEXTURE_RECTANGLE_ARB. */
+ public static int getOGLTextureType(Graphics g) {
+ checkActive();
+
+ if (getOGLTextureTypeMethod == null) {
+ return GL.GL_TEXTURE_2D;
+ }
+
+ try {
+ return ((Integer) getOGLTextureTypeMethod.invoke(null, new Object[] { g })).intValue();
+ } catch (InvocationTargetException e) {
+ throw new GLException(e.getTargetException());
+ } catch (Exception e) {
+ throw (InternalError) new InternalError().initCause(e);
+ }
+ }
+
+ /** Returns either the given GLContext or a substitute one with
+ which clients should share textures and display lists. Needed
+ when the Java2D/OpenGL pipeline is active and FBOs are being
+ used for rendering. FIXME: may need to alter the API in the
+ future to indicate which GraphicsDevice the source context is
+ associated with. */
+ public static GLContext filterShareContext(GLContext shareContext) {
+ if (isHeadless)
+ return shareContext;
+
+ // FIXME: this may need adjustment
+ initFBOShareContext(GraphicsEnvironment.
+ getLocalGraphicsEnvironment().
+ getDefaultScreenDevice());
+ if (j2dFBOShareContext != null) {
+ return j2dFBOShareContext;
+ }
+ return shareContext;
+ }
+
+ /** Returns the GLContext associated with the Java2D "share
+ context", with which all contexts created by JOGL must share
+ textures and display lists when the FBO option is enabled for
+ the Java2D/OpenGL pipeline. */
+ public static GLContext getShareContext(GraphicsDevice device) {
+ initFBOShareContext(device);
+ // FIXME: for full generality probably need to have multiple of
+ // these, one per GraphicsConfiguration seen?
+ return j2dFBOShareContext;
+ }
+
+ //----------------------------------------------------------------------
+ // Mac OS X-specific methods
+ //
+
+ /** (Mac OS X-specific) Creates a new OpenGL context on the surface
+ associated with the given Graphics object, sharing textures and
+ display lists with the specified (CGLContextObj) share context. */
+ public static long createOGLContextOnSurface(Graphics g, long shareCtx) {
+ checkActive();
+
+ try {
+ return ((Long) createOGLContextOnSurfaceMethod.invoke(null, new Object[] { g, new Long(shareCtx) })).longValue();
+ } catch (InvocationTargetException e) {
+ throw new GLException(e.getTargetException());
+ } catch (Exception e) {
+ throw (InternalError) new InternalError().initCause(e);
+ }
+ }
+
+ /** (Mac OS X-specific) Makes the given OpenGL context current on
+ the surface associated with the given Graphics object. */
+ public static boolean makeOGLContextCurrentOnSurface(Graphics g, long ctx) {
+ checkActive();
+
+ try {
+ return ((Boolean) makeOGLContextCurrentOnSurfaceMethod.invoke(null, new Object[] { g, new Long(ctx) })).booleanValue();
+ } catch (InvocationTargetException e) {
+ throw new GLException(e.getTargetException());
+ } catch (Exception e) {
+ throw (InternalError) new InternalError().initCause(e);
+ }
+ }
+
+ /** (Mac OS X-specific) Destroys the given OpenGL context. */
+ public static void destroyOGLContext(long ctx) {
+ checkActive();
+
+ try {
+ destroyOGLContextMethod.invoke(null, new Object[] { new Long(ctx) });
+ } catch (InvocationTargetException e) {
+ throw new GLException(e.getTargetException());
+ } catch (Exception e) {
+ throw (InternalError) new InternalError().initCause(e);
+ }
+ }
+
+ //----------------------------------------------------------------------
+ // Internals only below this point
+ //
+
+ private static void checkActive() {
+ if (!isOGLPipelineActive()) {
+ throw new GLException("Java2D OpenGL pipeline not active (or necessary support not present)");
+ }
+ }
+
+ private static int getOGLUtilitiesIntField(final String name) {
+ Integer i = (Integer) AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ try {
+ Class utils = Class.forName("sun.java2d.opengl.OGLUtilities");
+ Field f = utils.getField(name);
+ f.setAccessible(true);
+ return f.get(null);
+ } catch (Exception e) {
+ if (DEBUG && VERBOSE) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+ }
+ });
+ if (i == null)
+ return 0;
+ if (DEBUG && VERBOSE) {
+ System.err.println("OGLUtilities." + name + " = " + i.intValue());
+ }
+ return i.intValue();
+ }
+
+ private static void initFBOShareContext(final GraphicsDevice device) {
+ // Note 1: this must not be done in the static initalizer due to
+ // deadlock problems.
+
+ // Note 2: the first execution of this method must not be from the
+ // Java2D Queue Flusher Thread.
+
+ if (isOGLPipelineActive() &&
+ isFBOEnabled() &&
+ !initializedJ2DFBOShareContext) {
+
+ // FIXME: this technique is probably not adequate in multi-head
+ // situations. Ideally we would keep track of a given share
+ // context on a per-GraphicsConfiguration basis or something
+ // similar rather than keeping one share context in a global
+ // variable.
+ initializedJ2DFBOShareContext = true;
+ if (DEBUG) {
+ System.err.println("Starting initialization of J2D FBO share context");
+ }
+ invokeWithOGLSharedContextCurrent(device.getDefaultConfiguration(), new Runnable() {
+ public void run() {
+ j2dFBOShareContext = GLDrawableFactory.getFactory(GLProfile.getDefault()).createExternalGLContext();
+ }
+ });
+ if (DEBUG) {
+ System.err.println("Ending initialization of J2D FBO share context");
+ }
+ }
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/awt/Java2DGLContext.java b/src/jogl/classes/com/jogamp/opengl/impl/awt/Java2DGLContext.java
new file mode 100644
index 000000000..07bc54b6a
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/impl/awt/Java2DGLContext.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.impl.awt;
+
+import com.jogamp.opengl.impl.*;
+import java.awt.Graphics;
+
+/** Provides a construct by which the shared GLJPanel code can
+ * interact with a few methods in the Mac OS X-specific Java2D/JOGL
+ * bridge implementation.
+ */
+
+public interface Java2DGLContext {
+ public void setGraphics(Graphics g);
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLContext.java b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLContext.java
new file mode 100755
index 000000000..42d4588b5
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLContext.java
@@ -0,0 +1,299 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.impl.egl;
+
+import javax.media.nativewindow.*;
+import javax.media.opengl.*;
+import com.jogamp.opengl.impl.*;
+import com.jogamp.gluegen.runtime.ProcAddressTable;
+import java.nio.*;
+import java.util.*;
+
+public abstract class EGLContext extends GLContextImpl {
+ private long eglContext;
+ private boolean eglQueryStringInitialized;
+ private boolean eglQueryStringAvailable;
+ private EGLExt eglExt;
+ // Table that holds the addresses of the native C-language entry points for
+ // EGL extension functions.
+ private EGLExtProcAddressTable eglExtProcAddressTable;
+
+ public EGLContext(GLDrawableImpl drawable, GLDrawableImpl drawableRead,
+ GLContext shareWith) {
+ super(drawable, drawableRead, shareWith);
+ }
+
+ public EGLContext(GLDrawableImpl drawable,
+ GLContext shareWith) {
+ this(drawable, null, shareWith);
+ }
+
+ public Object getPlatformGLExtensions() {
+ return getEGLExt();
+ }
+
+ public EGLExt getEGLExt() {
+ if (eglExt == null) {
+ eglExt = new EGLExtImpl(this);
+ }
+ return eglExt;
+ }
+
+ public final ProcAddressTable getPlatformExtProcAddressTable() {
+ return eglExtProcAddressTable;
+ }
+
+ public final EGLExtProcAddressTable getEGLExtProcAddressTable() {
+ return eglExtProcAddressTable;
+ }
+
+ protected String mapToRealGLFunctionName(String glFunctionName) {
+ return glFunctionName;
+ }
+
+ protected String mapToRealGLExtensionName(String glExtensionName) {
+ return glExtensionName;
+ }
+
+ public long getContext() {
+ return eglContext;
+ }
+
+ protected int makeCurrentImpl() throws GLException {
+ if(EGL.EGL_NO_DISPLAY==((EGLDrawable)drawable).getDisplay() ) {
+ System.err.println("drawable not properly initialized");
+ return CONTEXT_NOT_CURRENT;
+ }
+ boolean created = false;
+ if (eglContext == 0) {
+ create();
+ if (DEBUG) {
+ System.err.println(getThreadName() + ": !!! Created GL context 0x" +
+ Long.toHexString(eglContext) + " for " + getClass().getName());
+ }
+ created = true;
+ }
+ if (EGL.eglGetCurrentContext() != eglContext) {
+ if (!EGL.eglMakeCurrent(((EGLDrawable)drawable).getDisplay(),
+ ((EGLDrawable)drawable).getSurface(),
+ ((EGLDrawable)drawableRead).getSurface(),
+ eglContext)) {
+ throw new GLException("Error making context 0x" +
+ Long.toHexString(eglContext) + " current: error code " + EGL.eglGetError());
+ }
+ }
+
+ if (created) {
+ setGLFunctionAvailability(false);
+ return CONTEXT_CURRENT_NEW;
+ }
+ return CONTEXT_CURRENT;
+ }
+
+ protected void releaseImpl() throws GLException {
+ getDrawableImpl().getFactoryImpl().lockToolkit();
+ try {
+ if (!EGL.eglMakeCurrent(((EGLDrawable)drawable).getDisplay(),
+ EGL.EGL_NO_SURFACE,
+ EGL.EGL_NO_SURFACE,
+ EGL.EGL_NO_CONTEXT)) {
+ throw new GLException("Error freeing OpenGL context 0x" +
+ Long.toHexString(eglContext) + ": error code " + EGL.eglGetError());
+ }
+ } finally {
+ getDrawableImpl().getFactoryImpl().unlockToolkit();
+ }
+ }
+
+ protected void destroyImpl() throws GLException {
+ getDrawableImpl().getFactoryImpl().lockToolkit();
+ try {
+ if (eglContext != 0) {
+ if (!EGL.eglDestroyContext(((EGLDrawable)drawable).getDisplay(), eglContext)) {
+ throw new GLException("Error destroying OpenGL context 0x" +
+ Long.toHexString(eglContext) + ": error code " + EGL.eglGetError());
+ }
+ eglContext = 0;
+ GLContextShareSet.contextDestroyed(this);
+ }
+ } finally {
+ getDrawableImpl().getFactoryImpl().unlockToolkit();
+ }
+ }
+
+ protected void create() throws GLException {
+ long eglDisplay = ((EGLDrawable)drawable).getDisplay();
+ EGLGraphicsConfiguration config = ((EGLDrawable)drawable).getGraphicsConfiguration();
+ GLProfile glProfile = drawable.getGLProfile();
+ _EGLConfig eglConfig = config.getNativeConfig();
+ long shareWith = EGL.EGL_NO_CONTEXT;
+
+ if (eglDisplay == 0) {
+ throw new GLException("Error: attempted to create an OpenGL context without a display connection");
+ }
+ if (eglConfig == null) {
+ throw new GLException("Error: attempted to create an OpenGL context without a graphics configuration");
+ }
+
+ try {
+ // might be unavailable on EGL < 1.2
+ if(!EGL.eglBindAPI(EGL.EGL_OPENGL_ES_API)) {
+ throw new GLException("eglBindAPI to ES failed , error 0x"+Integer.toHexString(EGL.eglGetError()));
+ }
+ } catch (GLException glex) {
+ if (DEBUG) {
+ glex.printStackTrace();
+ }
+ }
+
+ EGLContext other = (EGLContext) GLContextShareSet.getShareContext(this);
+ if (other != null) {
+ shareWith = other.getContext();
+ if (shareWith == 0) {
+ throw new GLException("GLContextShareSet returned an invalid OpenGL context");
+ }
+ }
+
+ int[] contextAttrs = new int[] {
+ EGL.EGL_CONTEXT_CLIENT_VERSION, -1,
+ EGL.EGL_NONE
+ };
+ if (glProfile.usesNativeGLES2()) {
+ contextAttrs[1] = 2;
+ } else if (glProfile.usesNativeGLES1()) {
+ contextAttrs[1] = 1;
+ } else {
+ throw new GLException("Error creating OpenGL context - invalid GLProfile: "+glProfile);
+ }
+ eglContext = EGL.eglCreateContext(eglDisplay, eglConfig, shareWith, contextAttrs, 0);
+ if (eglContext == 0) {
+ throw new GLException("Error creating OpenGL context: eglDisplay 0x"+Long.toHexString(eglDisplay)+
+ ", "+glProfile+", error 0x"+Integer.toHexString(EGL.eglGetError()));
+ }
+ GLContextShareSet.contextCreated(this);
+ if (DEBUG) {
+ System.err.println(getThreadName() + ": !!! Created OpenGL context 0x" +
+ Long.toHexString(eglContext) +
+ ",\n\twrite surface 0x" + Long.toHexString(((EGLDrawable)drawable).getSurface()) +
+ ",\n\tread surface 0x" + Long.toHexString(((EGLDrawable)drawableRead).getSurface())+
+ ",\n\t"+this+
+ ",\n\tsharing with 0x" + Long.toHexString(shareWith));
+ }
+ if (!EGL.eglMakeCurrent(((EGLDrawable)drawable).getDisplay(),
+ ((EGLDrawable)drawable).getSurface(),
+ ((EGLDrawable)drawableRead).getSurface(),
+ eglContext)) {
+ throw new GLException("Error making context 0x" +
+ Long.toHexString(eglContext) + " current: error code " + EGL.eglGetError());
+ }
+ setGLFunctionAvailability(true);
+ }
+
+ public boolean isCreated() {
+ return (eglContext != 0);
+ }
+
+ protected void updateGLProcAddressTable() {
+ if (DEBUG) {
+ System.err.println(getThreadName() + ": !!! Initializing EGL extension address table");
+ }
+ eglQueryStringInitialized = false;
+ eglQueryStringAvailable = false;
+
+ if (eglExtProcAddressTable == null) {
+ // FIXME: cache ProcAddressTables by capability bits so we can
+ // share them among contexts with the same capabilities
+ eglExtProcAddressTable = new EGLExtProcAddressTable();
+ }
+ resetProcAddressTable(getEGLExtProcAddressTable());
+ super.updateGLProcAddressTable();
+ }
+
+ public synchronized String getPlatformExtensionsString() {
+ if (!eglQueryStringInitialized) {
+ eglQueryStringAvailable =
+ getDrawableImpl().getDynamicLookupHelper().dynamicLookupFunction("eglQueryString") != 0;
+ eglQueryStringInitialized = true;
+ }
+ if (eglQueryStringAvailable) {
+ GLDrawableFactoryImpl factory = getDrawableImpl().getFactoryImpl();
+ factory.lockToolkit();
+ try {
+ String ret = EGL.eglQueryString(((EGLDrawable)drawable).getDisplay(),
+ EGL.EGL_EXTENSIONS);
+ if (DEBUG) {
+ System.err.println("!!! EGL extensions: " + ret);
+ }
+ return ret;
+ } finally {
+ factory.unlockToolkit();
+ }
+ } else {
+ return "";
+ }
+ }
+
+ protected void setSwapIntervalImpl(int interval) {
+ if (EGL.eglSwapInterval(((EGLDrawable)drawable).getDisplay(), interval)) {
+ currentSwapInterval = interval ;
+ }
+ }
+
+ public abstract void bindPbufferToTexture();
+
+ public abstract void releasePbufferFromTexture();
+
+ //----------------------------------------------------------------------
+ // Currently unimplemented stuff
+ //
+
+ public void copy(GLContext source, int mask) throws GLException {
+ throw new GLException("Not yet implemented");
+ }
+
+
+ public ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3) {
+ throw new GLException("Should not call this");
+ }
+
+ public boolean offscreenImageNeedsVerticalFlip() {
+ throw new GLException("Should not call this");
+ }
+
+ public int getOffscreenContextPixelDataType() {
+ throw new GLException("Should not call this");
+ }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLDrawable.java b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLDrawable.java
new file mode 100755
index 000000000..e48c78301
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLDrawable.java
@@ -0,0 +1,225 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.impl.egl;
+
+import com.jogamp.opengl.impl.GLDrawableImpl;
+import com.sun.nativewindow.impl.NWReflection;
+import com.jogamp.gluegen.runtime.DynamicLookupHelper;
+
+import javax.media.nativewindow.*;
+import javax.media.nativewindow.egl.*;
+import javax.media.opengl.*;
+
+public abstract class EGLDrawable extends GLDrawableImpl {
+ protected boolean ownEGLDisplay = false; // for destruction
+ protected boolean ownEGLSurface = false; // for destruction
+ private EGLGraphicsConfiguration eglConfig;
+ protected long eglDisplay;
+ protected long eglSurface;
+
+ protected EGLDrawable(EGLDrawableFactory factory,
+ NativeWindow component) throws GLException {
+ super(factory, component, false);
+ eglSurface=EGL.EGL_NO_SURFACE;
+ eglDisplay=0;
+ }
+
+ public long getDisplay() {
+ return eglDisplay;
+ }
+
+ public long getSurface() {
+ return eglSurface;
+ }
+
+ public EGLGraphicsConfiguration getGraphicsConfiguration() {
+ return eglConfig;
+ }
+
+ public GLCapabilities getChosenGLCapabilities() {
+ return (null==eglConfig)?super.getChosenGLCapabilities():(GLCapabilities)eglConfig.getChosenCapabilities();
+ }
+
+ public abstract GLContext createContext(GLContext shareWith);
+
+ protected abstract long createSurface(long eglDpy, _EGLConfig eglNativeCfg, long surfaceHandle);
+
+ private void recreateSurface() {
+ // create a new EGLSurface ..
+ if(EGL.EGL_NO_SURFACE!=eglSurface) {
+ EGL.eglDestroySurface(eglDisplay, eglSurface);
+ }
+
+ if(DEBUG) {
+ System.err.println("createSurface using eglDisplay 0x"+Long.toHexString(eglDisplay)+", "+eglConfig);
+ }
+
+ eglSurface = createSurface(eglDisplay, eglConfig.getNativeConfig(), component.getSurfaceHandle());
+ if (EGL.EGL_NO_SURFACE==eglSurface) {
+ throw new GLException("Creation of window surface failed: "+eglConfig+", error 0x"+Integer.toHexString(EGL.eglGetError()));
+ }
+
+ if(DEBUG) {
+ System.err.println("setSurface using component: handle 0x"+Long.toHexString(component.getSurfaceHandle())+" -> 0x"+Long.toHexString(eglSurface));
+ }
+ }
+
+ protected void setRealizedImpl() {
+ if (realized) {
+ if ( NativeWindow.LOCK_SURFACE_NOT_READY == lockSurface() ) {
+ throw new GLException("Couldn't lock surface");
+ }
+ // lockSurface() also resolved the window/surface handles
+ try {
+ AbstractGraphicsConfiguration aConfig = component.getGraphicsConfiguration().getNativeGraphicsConfiguration();
+ AbstractGraphicsDevice aDevice = aConfig.getScreen().getDevice();
+ if(aDevice instanceof EGLGraphicsDevice) {
+ // just fetch the data .. trust but verify ..
+ eglDisplay = aDevice.getHandle();
+ if (eglDisplay == EGL.EGL_NO_DISPLAY) {
+ throw new GLException("Invalid EGL display in EGLGraphicsDevice from "+aDevice);
+ }
+ if(aConfig instanceof EGLGraphicsConfiguration) {
+ eglConfig = (EGLGraphicsConfiguration) aConfig; // done ..
+ if (null == eglConfig) {
+ throw new GLException("Null EGLGraphicsConfiguration from "+aConfig);
+ }
+
+ int[] tmp = new int[1];
+ if ( 0 != component.getSurfaceHandle() &&
+ EGL.eglQuerySurface(eglDisplay, component.getSurfaceHandle(), EGL.EGL_CONFIG_ID, tmp, 0) ) {
+ // component holds static EGLSurface
+ eglSurface = component.getSurfaceHandle();
+ if(DEBUG) {
+ System.err.println("setSurface re-using component's EGLSurface: handle 0x"+Long.toHexString(eglSurface));
+ }
+ } else {
+ // EGLSurface is ours ..
+ ownEGLSurface=true;
+
+ eglConfig.updateGraphicsConfiguration();
+
+ recreateSurface();
+ }
+ } else {
+ throw new GLException("EGLGraphicsDevice hold by non EGLGraphicsConfiguration: "+aConfig);
+ }
+ } else {
+ // create a new EGL config ..
+ ownEGLDisplay=true;
+ // EGLSurface is ours ..
+ ownEGLSurface=true;
+
+ long nDisplay=0;
+ if( NativeWindowFactory.TYPE_WINDOWS.equals(NativeWindowFactory.getNativeWindowType(false)) ) {
+ nDisplay = component.getSurfaceHandle(); // don't even ask ..
+ } else {
+ nDisplay = aDevice.getHandle(); // 0 == EGL.EGL_DEFAULT_DISPLAY
+ }
+ eglDisplay = EGL.eglGetDisplay(nDisplay);
+ if (eglDisplay == EGL.EGL_NO_DISPLAY) {
+ if(DEBUG) {
+ System.err.println("eglDisplay("+Long.toHexString(nDisplay)+" share1
and
- share2
will share textures and display lists. Both
- must be non-null. */
- public static synchronized void registerSharing(GLContext share1, GLContext share2) {
- if (share1 == null || share2 == null) {
- throw new IllegalArgumentException("Both share1 and share2 must be non-null");
- }
- ShareSet share = entryFor(share1);
- if (share == null) {
- share = entryFor(share2);
- }
- if (share == null) {
- share = new ShareSet();
- }
- share.add(share1);
- share.add(share2);
- addEntry(share1, share);
- addEntry(share2, share);
- }
-
- public static synchronized GLContext getShareContext(GLContext contextToCreate) {
- ShareSet share = entryFor(contextToCreate);
- if (share == null) {
- return null;
- }
- return share.getCreatedShare(contextToCreate);
- }
-
- public static synchronized void contextCreated(GLContext context) {
- ShareSet share = entryFor(context);
- if (share != null) {
- share.contextCreated(context);
- }
- }
-
- public static synchronized void contextDestroyed(GLContext context) {
- ShareSet share = entryFor(context);
- if (share != null) {
- share.contextDestroyed(context);
- }
- }
-
- /** In order to avoid glGet calls for buffer object checks related
- to glVertexPointer, etc. calls as well as glMapBuffer calls, we
- need to share the same GLBufferSizeTracker object between
- contexts sharing textures and display lists. For now we keep
- this mechanism orthogonal to the GLObjectTracker to hopefully
- keep things easier to understand. (The GLObjectTracker is
- currently only needed in a fairly esoteric case, when the
- Java2D/JOGL bridge is active, but the GLBufferSizeTracker
- mechanism is now always required.) */
- public static void registerForBufferObjectSharing(GLContext olderContextOrNull, GLContext newContext) {
- // FIXME: downcasts to GLContextImpl undesirable
- GLContextImpl older = (GLContextImpl) olderContextOrNull;
- GLContextImpl newer = (GLContextImpl) newContext;
- GLBufferSizeTracker tracker = null;
- if (older != null) {
- tracker = older.getBufferSizeTracker();
- assert (tracker != null)
- : "registerForBufferObjectSharing was not called properly for the older context, or has a bug in it";
- }
- if (tracker == null) {
- tracker = new GLBufferSizeTracker();
- }
- newer.setBufferSizeTracker(tracker);
- }
-
- // FIXME: refactor Java SE dependencies
- // /** Indicates that the two supplied contexts (which must be able to
- // share textures and display lists) should be in the same
- // namespace for tracking of server-side object creation and
- // deletion. Because the sharing necessary behind the scenes is
- // different than that requested at the user level, the two notions
- // are different. This must be called immediately after the
- // creation of the new context (which is the second argument)
- // before any server-side OpenGL objects have been created in that
- // context. */
- // public static void registerForObjectTracking(GLContext olderContextOrNull,
- // GLContext newContext,
- // GLContext realShareContext) {
- // if (isObjectTrackingEnabled() || isObjectTrackingDebuggingEnabled()) {
- // GLContextImpl impl1 = null;
- // GLContextImpl impl2 = null;
- // GLObjectTracker tracker = null;
- //
- // synchronized (GLContextShareSet.class) {
- // if (olderContextOrNull != null &&
- // newContext != null) {
- // if (entryFor(olderContextOrNull) != entryFor(newContext)) {
- // throw new IllegalArgumentException("old and new contexts must be able to share textures and display lists");
- // }
- // }
- //
- // // FIXME: downcast to GLContextImpl undesirable
- // impl1 = (GLContextImpl) olderContextOrNull;
- // impl2 = (GLContextImpl) newContext;
- //
- // GLObjectTracker deletedObjectTracker = null;
- // GLContextImpl shareImpl = (GLContextImpl) realShareContext;
- // // Before we zap the "user-level" object trackers, make sure
- // // that all contexts in the share set share the destroyed object
- // // tracker
- // if (shareImpl != null) {
- // deletedObjectTracker = shareImpl.getDeletedObjectTracker();
- // }
- // if (deletedObjectTracker == null) {
- // // Must create one and possibly set it up in the older context
- // deletedObjectTracker = new GLObjectTracker();
- // if (DEBUG) {
- // System.err.println("Created deletedObjectTracker " + deletedObjectTracker + " because " +
- // ((shareImpl == null) ? "shareImpl was null" : "shareImpl's (" + shareImpl + ") deletedObjectTracker was null"));
- // }
- //
- // if (shareImpl != null) {
- // // FIXME: think should really assert in this case
- // shareImpl.setDeletedObjectTracker(deletedObjectTracker);
- // if (DEBUG) {
- // System.err.println("Set deletedObjectTracker " + deletedObjectTracker + " in shareImpl context " + shareImpl);
- // }
- // }
- // }
- // impl2.setDeletedObjectTracker(deletedObjectTracker);
- // if (DEBUG) {
- // System.err.println("Set deletedObjectTracker " + deletedObjectTracker + " in impl2 context " + impl2);
- // }
- // }
- //
- // // Must not hold lock around this operation
- // // Don't share object trackers with the primordial share context from Java2D
- // if (Java2D.isOGLPipelineActive()) {
- // // FIXME: probably need to do something different here
- // // Need to be able to figure out the GraphicsDevice for the
- // // older context if it's on-screen
- // GraphicsDevice device = GraphicsEnvironment.
- // getLocalGraphicsEnvironment().
- // getDefaultScreenDevice();
- // GLContext j2dShareContext = Java2D.getShareContext(device);
- // if (impl1 != null && impl1 == j2dShareContext) {
- // impl1 = null;
- // }
- // }
- //
- // synchronized (GLContextShareSet.class) {
- // if (impl1 != null) {
- // tracker = impl1.getObjectTracker();
- // assert (tracker != null)
- // : "registerForObjectTracking was not called properly for the older context";
- // }
- // if (tracker == null) {
- // tracker = new GLObjectTracker();
- // }
- // // Note that we don't assert that the tracker is non-null for
- // // impl2 because the way we use this functionality we actually
- // // overwrite the initially-set object tracker in the new context
- // impl2.setObjectTracker(tracker);
- // }
- // }
- // }
-
- //----------------------------------------------------------------------
- // Internals only below this point
-
-
- private static ShareSet entryFor(GLContext context) {
- return (ShareSet) shareMap.get(context);
- }
-
- private static void addEntry(GLContext context, ShareSet share) {
- if (shareMap.get(context) == null) {
- shareMap.put(context, share);
- }
- }
-
- // FIXME: refactor Java SE dependencies
- // private static boolean isObjectTrackingEnabled() {
- // return ((Java2D.isOGLPipelineActive() && Java2D.isFBOEnabled()) ||
- // isObjectTrackingDebuggingEnabled());
- // }
- //
- // private static boolean isObjectTrackingDebuggingEnabled() {
- // return forceTracking;
- // }
-}
diff --git a/src/jogl/classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java b/src/jogl/classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java
deleted file mode 100644
index 9f39c67cb..000000000
--- a/src/jogl/classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java
+++ /dev/null
@@ -1,377 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.impl;
-
-import java.nio.*;
-import javax.media.nativewindow.*;
-import javax.media.opengl.*;
-import com.jogamp.gluegen.runtime.*;
-import com.sun.nativewindow.impl.NWReflection;
-import java.lang.reflect.*;
-
-/** Extends GLDrawableFactory with a few methods for handling
- typically software-accelerated offscreen rendering (Device
- Independent Bitmaps on Windows, pixmaps on X11). Direct access to
- these GLDrawables is not supplied directly to end users, though
- they may be instantiated by the GLJPanel implementation. */
-public abstract class GLDrawableFactoryImpl extends GLDrawableFactory {
- protected static final boolean DEBUG = Debug.debug("GLDrawableFactory");
-
- //---------------------------------------------------------------------------
- // Dispatching GLDrawable construction in respect to the NativeWindow Capabilities
- //
- public GLDrawable createGLDrawable(NativeWindow target) {
- if (target == null) {
- throw new IllegalArgumentException("Null target");
- }
- AbstractGraphicsConfiguration config = target.getGraphicsConfiguration().getNativeGraphicsConfiguration();
- GLCapabilities caps = (GLCapabilities) target.getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities();
- GLDrawable result = null;
- if(caps.isOnscreen()) {
- if(caps.isPBuffer()) {
- throw new IllegalArgumentException("Onscreen target can't be PBuffer: "+caps);
- }
- if(DEBUG) {
- System.out.println("GLDrawableFactoryImpl.createGLDrawable -> OnscreenDrawable: "+target);
- }
- result = createOnscreenDrawable(target);
- } else {
- if( ! ( target instanceof SurfaceChangeable ) ) {
- throw new IllegalArgumentException("Passed NativeWindow must implement SurfaceChangeable for offscreen: "+target);
- }
- if(caps.isPBuffer() && canCreateGLPbuffer()) {
- if(DEBUG) {
- System.out.println("GLDrawableFactoryImpl.createGLDrawable -> PbufferDrawable: "+target);
- }
- result = createGLPbufferDrawable(target);
- }
- if(null==result) {
- if(DEBUG) {
- System.out.println("GLDrawableFactoryImpl.createGLDrawable -> OffScreenDrawable: "+target);
- }
- result = createOffscreenDrawable(target);
- }
- }
- if(DEBUG) {
- System.out.println("GLDrawableFactoryImpl.createGLDrawable: "+result);
- }
- return result;
- }
-
- //---------------------------------------------------------------------------
- //
- // Onscreen GLDrawable construction
- //
-
- protected abstract GLDrawableImpl createOnscreenDrawable(NativeWindow target);
-
- //---------------------------------------------------------------------------
- //
- // PBuffer GLDrawable construction
- //
-
- /** Target must implement SurfaceChangeable */
- protected abstract GLDrawableImpl createGLPbufferDrawableImpl(NativeWindow target);
-
- protected GLDrawableImpl createGLPbufferDrawable(NativeWindow target) {
- if (!canCreateGLPbuffer()) {
- throw new GLException("Pbuffer support not available with current graphics card");
- }
- return createGLPbufferDrawableImpl(target);
- }
-
- public GLDrawable createGLPbufferDrawable(GLCapabilities capabilities,
- GLCapabilitiesChooser chooser,
- int width,
- int height) {
- if(height<=0 || height<=0) {
- throw new GLException("Width and height of pbuffer must be positive (were (" +
- width + ", " + height + "))");
- }
- capabilities.setDoubleBuffered(false); // FIXME
- capabilities.setOnscreen(false);
- capabilities.setPBuffer(true);
- return createGLPbufferDrawable( createOffscreenWindow(capabilities, chooser, height, height) );
- }
-
- public GLPbuffer createGLPbuffer(GLCapabilities capabilities,
- GLCapabilitiesChooser chooser,
- int width,
- int height,
- GLContext shareWith) {
- return new GLPbufferImpl( (GLDrawableImpl) createGLPbufferDrawable(capabilities, chooser, height, height),
- shareWith);
- }
-
-
- //---------------------------------------------------------------------------
- //
- // Offscreen GLDrawable construction
- //
-
- protected abstract GLDrawableImpl createOffscreenDrawable(NativeWindow target) ;
-
- public GLDrawable createOffscreenDrawable(GLCapabilities capabilities,
- GLCapabilitiesChooser chooser,
- int width,
- int height) {
- if(width<=0 || height<=0) {
- throw new GLException("Width and height of pbuffer must be positive (were (" +
- width + ", " + height + "))");
- }
- capabilities.setDoubleBuffered(false); // FIXME
- capabilities.setOnscreen(false);
- capabilities.setPBuffer(false);
- return createOffscreenDrawable( createOffscreenWindow(capabilities, chooser, width, height) );
- }
-
- /**
- * creates an offscreen NativeWindow, which must implement SurfaceChangeable as well,
- * so the windowing system related implementation is able to set the surface handle.
- */
- protected abstract NativeWindow createOffscreenWindow(GLCapabilities capabilities, GLCapabilitiesChooser chooser,
- int width, int height);
-
- protected GLDrawableFactoryImpl() {
- super();
- }
-
- protected void maybeDoSingleThreadedWorkaround(Runnable action) {
- if (Threading.isSingleThreaded() &&
- !Threading.isOpenGLThread()) {
- Threading.invokeOnOpenGLThread(action);
- } else {
- action.run();
- }
- }
-
- /**
- * Returns the sole GLDrawableFactoryImpl instance.
- *
- * @param glProfile GLProfile to determine the factory type, ie EGLDrawableFactory,
- * or one of the native GLDrawableFactory's, ie X11/GLX, Windows/WGL or MacOSX/CGL.
- */
- public static GLDrawableFactoryImpl getFactoryImpl(GLProfile glp) {
- return (GLDrawableFactoryImpl) getFactory(glp);
- }
-
- // Helper function for more lazily loading the GLU library;
- // apparently can't use System.loadLibrary on UNIX because it uses
- // RTLD_LOCAL and we need to call dlsym(RTLD_DEFAULT)
- public abstract void loadGLULibrary();
-
- //----------------------------------------------------------------------
- // Support for locking and unlocking the toolkit -- needed only on X11 platforms
- //
-
- public void lockToolkit() {
- NativeWindowFactory.getDefaultFactory().getToolkitLock().lock();
- }
-
- public void unlockToolkit() {
- NativeWindowFactory.getDefaultFactory().getToolkitLock().unlock();
- }
-
- //---------------------------------------------------------------------------
- // Support for Java2D/JOGL bridge on Mac OS X; the external
- // GLDrawable mechanism in the public API is sufficient to
- // implement this functionality on all other platforms
- //
-
- public abstract boolean canCreateContextOnJava2DSurface();
-
- public abstract GLContext createContextOnJava2DSurface(Object graphics, GLContext shareWith)
- throws GLException;
-
- //----------------------------------------------------------------------
- // Gamma adjustment support
- // Thanks to the LWJGL team for illustrating how to make these
- // adjustments on various OSs.
-
- /*
- * Portions Copyright (c) 2002-2004 LWJGL Project
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'LWJGL' nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
- /**
- * Sets the gamma, brightness, and contrast of the current main
- * display. Returns true if the settings were changed, false if
- * not. If this method returns true, the display settings will
- * automatically be reset upon JVM exit (assuming the JVM does not
- * crash); if the user wishes to change the display settings back to
- * normal ahead of time, use resetDisplayGamma(). Throws
- * IllegalArgumentException if any of the parameters were
- * out-of-bounds.
- *
- * @param gamma The gamma value, typically > 1.0 (default value is
- * 1.0)
- * @param brightness The brightness value between -1.0 and 1.0,
- * inclusive (default value is 0)
- * @param contrast The contrast, greater than 0.0 (default value is 1)
- * @throws IllegalArgumentException if any of the parameters were
- * out-of-bounds
- */
- public boolean setDisplayGamma(float gamma, float brightness, float contrast) throws IllegalArgumentException {
- if ((brightness < -1.0f) || (brightness > 1.0f)) {
- throw new IllegalArgumentException("Brightness must be between -1.0 and 1.0");
- }
- if (contrast < 0) {
- throw new IllegalArgumentException("Contrast must be greater than 0.0");
- }
- // FIXME: ensure gamma is > 1.0? Are smaller / negative values legal?
- int rampLength = getGammaRampLength();
- if (rampLength == 0) {
- return false;
- }
- float[] gammaRamp = new float[rampLength];
- for (int i = 0; i < rampLength; i++) {
- float intensity = (float) i / (float) (rampLength - 1);
- // apply gamma
- float rampEntry = (float) java.lang.Math.pow(intensity, gamma);
- // apply brightness
- rampEntry += brightness;
- // apply contrast
- rampEntry = (rampEntry - 0.5f) * contrast + 0.5f;
- // Clamp entry to [0, 1]
- if (rampEntry > 1.0f)
- rampEntry = 1.0f;
- else if (rampEntry < 0.0f)
- rampEntry = 0.0f;
- gammaRamp[i] = rampEntry;
- }
- registerGammaShutdownHook();
- return setGammaRamp(gammaRamp);
- }
-
- public synchronized void resetDisplayGamma() {
- if (gammaShutdownHook == null) {
- throw new IllegalArgumentException("Should not call this unless setDisplayGamma called first");
- }
- resetGammaRamp(originalGammaRamp);
- unregisterGammeShutdownHook();
- }
-
- //------------------------------------------------------
- // Gamma-related methods to be implemented by subclasses
- //
-
- /** Returns the length of the computed gamma ramp for this OS and
- hardware. Returns 0 if gamma changes are not supported. */
- protected int getGammaRampLength() {
- return 0;
- }
-
- /** Sets the gamma ramp for the main screen. Returns false if gamma
- ramp changes were not supported. */
- protected boolean setGammaRamp(float[] ramp) {
- return false;
- }
-
- /** Gets the current gamma ramp. This is basically an opaque value
- used only on some platforms to reset the gamma ramp to its
- original settings. */
- protected Buffer getGammaRamp() {
- return null;
- }
-
- /** Resets the gamma ramp, potentially using the specified Buffer as
- data to restore the original values. */
- protected void resetGammaRamp(Buffer originalGammaRamp) {
- }
-
- // Shutdown hook mechanism for resetting gamma
- private boolean gammaShutdownHookRegistered;
- private Thread gammaShutdownHook;
- private Buffer originalGammaRamp;
- private synchronized void registerGammaShutdownHook() {
- if (gammaShutdownHookRegistered)
- return;
- if (gammaShutdownHook == null) {
- gammaShutdownHook = new Thread(new Runnable() {
- public void run() {
- synchronized (GLDrawableFactoryImpl.this) {
- resetGammaRamp(originalGammaRamp);
- }
- }
- });
- originalGammaRamp = getGammaRamp();
- }
- Runtime.getRuntime().addShutdownHook(gammaShutdownHook);
- gammaShutdownHookRegistered = true;
- }
-
- private synchronized void unregisterGammeShutdownHook() {
- if (!gammaShutdownHookRegistered)
- return;
- if (gammaShutdownHook == null) {
- throw new InternalError("Error in gamma shutdown hook logic");
- }
- Runtime.getRuntime().removeShutdownHook(gammaShutdownHook);
- gammaShutdownHookRegistered = false;
- // Leave the original gamma ramp data alone
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/impl/GLDrawableHelper.java b/src/jogl/classes/com/sun/opengl/impl/GLDrawableHelper.java
deleted file mode 100644
index d6ca2cbf5..000000000
--- a/src/jogl/classes/com/sun/opengl/impl/GLDrawableHelper.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.impl;
-
-import java.util.*;
-import javax.media.opengl.*;
-
-/** Encapsulates the implementation of most of the GLAutoDrawable's
- methods to be able to share it between GLCanvas and GLJPanel. */
-
-public class GLDrawableHelper {
- private volatile List listeners = new ArrayList();
- private static final boolean DEBUG = Debug.debug("GLDrawableHelper");
- private static final boolean VERBOSE = Debug.verbose();
- private static final boolean NVIDIA_CRASH_WORKAROUND = Debug.isPropertyDefined("jogl.nvidia.crash.workaround", true);
- private boolean autoSwapBufferMode = true;
-
- public GLDrawableHelper() {
- }
-
- public synchronized String toString() {
- StringBuffer sb = new StringBuffer();
- sb.append("GLEventListeners num "+listeners.size()+" [");
- for (Iterator iter = listeners.iterator(); iter.hasNext(); ) {
- sb.append(iter.next()+", ");
- }
- sb.append("]");
- return sb.toString();
- }
-
- public synchronized void addGLEventListener(GLEventListener listener) {
- List newListeners = (List) ((ArrayList) listeners).clone();
- newListeners.add(listener);
- listeners = newListeners;
- }
-
- public synchronized void removeGLEventListener(GLEventListener listener) {
- List newListeners = (List) ((ArrayList) listeners).clone();
- newListeners.remove(listener);
- listeners = newListeners;
- }
-
- public synchronized void dispose(GLAutoDrawable drawable) {
- for (Iterator iter = listeners.iterator(); iter.hasNext(); ) {
- ((GLEventListener) iter.next()).dispose(drawable);
- }
- }
-
- public void init(GLAutoDrawable drawable) {
- for (Iterator iter = listeners.iterator(); iter.hasNext(); ) {
- ((GLEventListener) iter.next()).init(drawable);
- }
- }
-
- public void display(GLAutoDrawable drawable) {
- for (Iterator iter = listeners.iterator(); iter.hasNext(); ) {
- ((GLEventListener) iter.next()).display(drawable);
- }
- }
-
- public void reshape(GLAutoDrawable drawable,
- int x, int y, int width, int height) {
- for (Iterator iter = listeners.iterator(); iter.hasNext(); ) {
- ((GLEventListener) iter.next()).reshape(drawable, x, y, width, height);
- }
- }
-
- public void setAutoSwapBufferMode(boolean onOrOff) {
- autoSwapBufferMode = onOrOff;
- }
-
- public boolean getAutoSwapBufferMode() {
- return autoSwapBufferMode;
- }
-
- private static final ThreadLocal perThreadInitAction = new ThreadLocal();
- /** Principal helper method which runs a Runnable with the context
- made current. This could have been made part of GLContext, but a
- desired goal is to be able to implement the GLCanvas in terms of
- the GLContext's public APIs, and putting it into a separate
- class helps ensure that we don't inadvertently use private
- methods of the GLContext or its implementing classes. */
- public void invokeGL(GLDrawable drawable,
- GLContext context,
- Runnable runnable,
- Runnable initAction) {
- if(null==context) {
- if (DEBUG) {
- Exception e = new GLException(Thread.currentThread().getName()+" GLDrawableHelper " + this + ".invokeGL(): NULL GLContext");
- e.printStackTrace();
- }
- return;
- }
- // Support for recursive makeCurrent() calls as well as calling
- // other drawables' display() methods from within another one's
- GLContext lastContext = GLContext.getCurrent();
- Runnable lastInitAction = (Runnable) perThreadInitAction.get();
- if (lastContext != null) {
- lastContext.release();
- }
-
- int res = 0;
- try {
- res = context.makeCurrent();
- if (res != GLContext.CONTEXT_NOT_CURRENT) {
- if(null!=initAction) {
- perThreadInitAction.set(initAction);
- if (res == GLContext.CONTEXT_CURRENT_NEW) {
- if (DEBUG) {
- System.err.println("GLDrawableHelper " + this + ".invokeGL(): Running initAction");
- }
- initAction.run();
- }
- }
- if(null!=runnable) {
- if (DEBUG && VERBOSE) {
- System.err.println("GLDrawableHelper " + this + ".invokeGL(): Running runnable");
- }
- runnable.run();
- if (autoSwapBufferMode) {
- if (drawable != null) {
- drawable.swapBuffers();
- }
- }
- }
- }
- } finally {
- try {
- if (res != GLContext.CONTEXT_NOT_CURRENT) {
- context.release();
- }
- } catch (Exception e) {
- }
- if (lastContext != null) {
- int res2 = lastContext.makeCurrent();
- if (res2 == GLContext.CONTEXT_CURRENT_NEW) {
- lastInitAction.run();
- }
- }
- }
- }
-
-}
diff --git a/src/jogl/classes/com/sun/opengl/impl/GLDrawableImpl.java b/src/jogl/classes/com/sun/opengl/impl/GLDrawableImpl.java
deleted file mode 100644
index d29018116..000000000
--- a/src/jogl/classes/com/sun/opengl/impl/GLDrawableImpl.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.impl;
-
-import javax.media.nativewindow.*;
-import javax.media.opengl.*;
-import com.jogamp.gluegen.runtime.DynamicLookupHelper;
-
-public abstract class GLDrawableImpl implements GLDrawable {
- protected static final boolean DEBUG = Debug.debug("GLDrawable");
-
- protected GLDrawableImpl(GLDrawableFactory factory,
- NativeWindow comp,
- boolean realized) {
- this.factory = factory;
- this.component = comp;
- this.realized = realized;
- this.requestedCapabilities = (GLCapabilities)component.getGraphicsConfiguration().getNativeGraphicsConfiguration().getRequestedCapabilities(); // a copy ..
- }
-
- /**
- * Returns the DynamicLookupHelper
- */
- public abstract DynamicLookupHelper getDynamicLookupHelper();
-
- public GLDrawableFactoryImpl getFactoryImpl() {
- return (GLDrawableFactoryImpl) getFactory();
- }
-
- /** For offscreen GLDrawables (pbuffers and "pixmap" drawables),
- indicates that native resources should be reclaimed. */
- public void destroy() {
- throw new GLException("Should not call this (should only be called for offscreen GLDrawables)");
- }
-
- public void swapBuffers() throws GLException {
- GLCapabilities caps = (GLCapabilities)component.getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities();
- if ( caps.getDoubleBuffered() ) {
- if(!component.surfaceSwap()) {
- swapBuffersImpl();
- }
- } else {
- GLContext ctx = GLContext.getCurrent();
- if(null!=ctx && ctx.getGLDrawable()==this) {
- ctx.getGL().glFinish();
- }
- }
- component.surfaceUpdated(this, component, System.currentTimeMillis());
- }
-
- protected abstract void swapBuffersImpl();
-
- public static String toHexString(long hex) {
- return GLContextImpl.toHexString(hex);
- }
-
- public GLProfile getGLProfile() {
- return requestedCapabilities.getGLProfile();
- }
-
- public GLCapabilities getChosenGLCapabilities() {
- return (GLCapabilities)component.getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities(); // a copy
- }
-
- public GLCapabilities getRequestedGLCapabilities() {
- return requestedCapabilities;
- }
-
- public NativeWindow getNativeWindow() {
- return component;
- }
-
- public GLDrawableFactory getFactory() {
- return factory;
- }
-
- public void setRealized(boolean realized) {
- if ( this.realized != realized ) {
- if(DEBUG) {
- System.err.println("setRealized: "+getClass().getName()+" "+this.realized+" -> "+realized);
- }
- this.realized = realized;
- setRealizedImpl();
- } else if(DEBUG) {
- System.err.println("setRealized: "+getClass().getName()+" "+this.realized+" == "+realized);
- }
- }
- protected abstract void setRealizedImpl();
-
- public boolean getRealized() {
- return realized;
- }
-
- public int getWidth() {
- return component.getWidth();
- }
-
- /** Returns the current height of this GLDrawable. */
- public int getHeight() {
- return component.getHeight();
- }
-
- public int lockSurface() throws GLException {
- if (!realized) {
- return NativeWindow.LOCK_SURFACE_NOT_READY;
- }
- return component.lockSurface();
- }
-
- public void unlockSurface() {
- component.unlockSurface();
- }
-
- public boolean isSurfaceLocked() {
- return component.isSurfaceLocked();
- }
-
- public String toString() {
- return getClass().getName()+"[realized "+getRealized()+
- ",\n\tfactory "+getFactory()+
- ",\n\twindow "+getNativeWindow()+
- ",\n\trequested "+getRequestedGLCapabilities()+
- ",\n\tchosen "+getChosenGLCapabilities()+"]";
- }
-
- protected GLDrawableFactory factory;
- protected NativeWindow component;
- protected GLCapabilities requestedCapabilities;
-
- // Indicates whether the component (if an onscreen context) has been
- // realized. Plausibly, before the component is realized the JAWT
- // should return an error or NULL object from some of its
- // operations; this appears to be the case on Win32 but is not true
- // at least with Sun's current X11 implementation (1.4.x), which
- // crashes with no other error reported if the DrawingSurfaceInfo is
- // fetched from a locked DrawingSurface during the validation as a
- // result of calling show() on the main thread. To work around this
- // we prevent any JAWT or OpenGL operations from being done until
- // addNotify() is called on the component.
- protected boolean realized;
-
-}
diff --git a/src/jogl/classes/com/sun/opengl/impl/GLPbufferImpl.java b/src/jogl/classes/com/sun/opengl/impl/GLPbufferImpl.java
deleted file mode 100644
index ffaf798ae..000000000
--- a/src/jogl/classes/com/sun/opengl/impl/GLPbufferImpl.java
+++ /dev/null
@@ -1,320 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.impl;
-
-/**
-import java.awt.Dimension;
-import java.awt.EventQueue;
-import java.awt.event.*;
-import java.beans.PropertyChangeListener;
- */
-
-import javax.media.nativewindow.*;
-import javax.media.opengl.*;
-
-/** Platform-independent class exposing pbuffer functionality to
- applications. This class is not exposed in the public API as it
- would probably add no value; however it implements the GLDrawable
- interface so can be interacted with via its display() method. */
-
-public class GLPbufferImpl implements GLPbuffer {
- private GLDrawableImpl pbufferDrawable;
- private GLContextImpl context;
- private GLDrawableHelper drawableHelper = new GLDrawableHelper();
- private int floatMode;
-
- public GLPbufferImpl(GLDrawableImpl pbufferDrawable,
- GLContext parentContext) {
- GLCapabilities caps = (GLCapabilities)
- pbufferDrawable.getNativeWindow().getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities();
- if(caps.isOnscreen()) {
- if(caps.isPBuffer()) {
- throw new IllegalArgumentException("Error: Given drawable is Onscreen and Pbuffer: "+pbufferDrawable);
- }
- throw new IllegalArgumentException("Error: Given drawable is Onscreen: "+pbufferDrawable);
- } else {
- if(!caps.isPBuffer()) {
- throw new IllegalArgumentException("Error: Given drawable is not Pbuffer: "+pbufferDrawable);
- }
- }
- this.pbufferDrawable = pbufferDrawable;
- context = (GLContextImpl) pbufferDrawable.createContext(parentContext);
- context.setSynchronized(true);
- }
-
- public GLContext createContext(GLContext shareWith) {
- return pbufferDrawable.createContext(shareWith);
- }
-
- public void setRealized(boolean realized) {
- }
-
- public void setSize(int width, int height) {
- // FIXME
- throw new GLException("Not yet implemented");
- }
-
- public NativeWindow getNativeWindow() {
- return pbufferDrawable.getNativeWindow();
- }
-
- public GLDrawableFactory getFactory() {
- return pbufferDrawable.getFactory();
- }
-
- public int getWidth() {
- return pbufferDrawable.getWidth();
- }
-
- public int getHeight() {
- return pbufferDrawable.getHeight();
- }
-
- public void display() {
- maybeDoSingleThreadedWorkaround(displayOnEventDispatchThreadAction,
- displayAction,
- false);
- }
-
- public void repaint() {
- display();
- }
-
- public void addGLEventListener(GLEventListener listener) {
- drawableHelper.addGLEventListener(listener);
- }
-
- public void removeGLEventListener(GLEventListener listener) {
- drawableHelper.removeGLEventListener(listener);
- }
-
- public void setContext(GLContext ctx) {
- context=(GLContextImpl)ctx;
- }
-
- public GLContext getContext() {
- return context;
- }
-
- public GLDrawable getDrawable() {
- return pbufferDrawable;
- }
-
- public GL getGL() {
- return getContext().getGL();
- }
-
- public GL setGL(GL gl) {
- return getContext().setGL(gl);
- }
-
- public void setAutoSwapBufferMode(boolean onOrOff) {
- drawableHelper.setAutoSwapBufferMode(onOrOff);
- }
-
- public boolean getAutoSwapBufferMode() {
- return drawableHelper.getAutoSwapBufferMode();
- }
-
- public void swapBuffers() {
- maybeDoSingleThreadedWorkaround(swapBuffersOnEventDispatchThreadAction, swapBuffersAction, false);
- }
-
- public void bindTexture() {
- // Doesn't make much sense to try to do this on the event dispatch
- // thread given that it has to be called while the context is current
- context.bindPbufferToTexture();
- }
-
- public void releaseTexture() {
- // Doesn't make much sense to try to do this on the event dispatch
- // thread given that it has to be called while the context is current
- context.releasePbufferFromTexture();
- }
-
- public GLCapabilities getChosenGLCapabilities() {
- if (pbufferDrawable == null)
- return null;
-
- return pbufferDrawable.getChosenGLCapabilities();
- }
-
- public GLCapabilities getRequestedGLCapabilities() {
- if (pbufferDrawable == null)
- return null;
-
- return pbufferDrawable.getRequestedGLCapabilities();
- }
-
- public GLProfile getGLProfile() {
- if (pbufferDrawable == null)
- return null;
-
- return pbufferDrawable.getGLProfile();
- }
-
- private boolean surfaceLocked = false;
-
- public int lockSurface() throws GLException {
- surfaceLocked=true;
- return NativeWindow.LOCK_SUCCESS;
- }
-
- public void unlockSurface() {
- surfaceLocked=false;
- }
-
- public boolean isSurfaceLocked() {
- return surfaceLocked;
- }
-
- //----------------------------------------------------------------------
- // No-ops for ComponentEvents
- //
-
- /*
- public void addComponentListener(ComponentListener l) {}
- public void removeComponentListener(ComponentListener l) {}
- public void addFocusListener(FocusListener l) {}
- public void removeFocusListener(FocusListener l) {}
- public void addHierarchyBoundsListener(HierarchyBoundsListener l) {}
- public void removeHierarchyBoundsListener(HierarchyBoundsListener l) {}
- public void addHierarchyListener(HierarchyListener l) {}
- public void removeHierarchyListener(HierarchyListener l) {}
- public void addInputMethodListener(InputMethodListener l) {}
- public void removeInputMethodListener(InputMethodListener l) {}
- public void addKeyListener(KeyListener l) {}
- public void removeKeyListener(KeyListener l) {}
- public void addMouseListener(MouseListener l) {}
- public void removeMouseListener(MouseListener l) {}
- public void addMouseMotionListener(MouseMotionListener l) {}
- public void removeMouseMotionListener(MouseMotionListener l) {}
- public void addMouseWheelListener(MouseWheelListener l) {}
- public void removeMouseWheelListener(MouseWheelListener l) {}
- public void addPropertyChangeListener(PropertyChangeListener listener) {}
- public void removePropertyChangeListener(PropertyChangeListener listener) {}
- public void addPropertyChangeListener(String propertyName,
- PropertyChangeListener listener) {}
- public void removePropertyChangeListener(String propertyName,
- PropertyChangeListener listener) {}
- */
-
- public void destroy() {
- // FIXME: not calling event listeners .. see GLAutoDrawable spec
- if (Threading.isSingleThreaded() &&
- !Threading.isOpenGLThread()) {
- Threading.invokeOnOpenGLThread(destroyAction);
- } else {
- destroyAction.run();
- }
- }
-
- public int getFloatingPointMode() {
- if (floatMode == 0) {
- throw new GLException("Pbuffer not initialized, or floating-point support not requested");
- }
- return floatMode;
- }
-
- //----------------------------------------------------------------------
- // Internals only below this point
- //
-
- private void maybeDoSingleThreadedWorkaround(Runnable eventDispatchThreadAction,
- Runnable invokeGLAction,
- boolean isReshape) {
- if (Threading.isSingleThreaded() &&
- !Threading.isOpenGLThread()) {
- Threading.invokeOnOpenGLThread(eventDispatchThreadAction);
- } else {
- drawableHelper.invokeGL(pbufferDrawable, context, invokeGLAction, initAction);
- }
- }
-
- class InitAction implements Runnable {
- public void run() {
- floatMode = context.getFloatingPointMode();
- drawableHelper.init(GLPbufferImpl.this);
- }
- }
- private InitAction initAction = new InitAction();
-
- class DisplayAction implements Runnable {
- public void run() {
- drawableHelper.display(GLPbufferImpl.this);
- }
- }
- private DisplayAction displayAction = new DisplayAction();
-
- class SwapBuffersAction implements Runnable {
- public void run() {
- pbufferDrawable.swapBuffers();
- }
- }
- private SwapBuffersAction swapBuffersAction = new SwapBuffersAction();
-
- // Workaround for ATI driver bugs related to multithreading issues
- // like simultaneous rendering via Animators to canvases that are
- // being resized on the AWT event dispatch thread
- class DisplayOnEventDispatchThreadAction implements Runnable {
- public void run() {
- drawableHelper.invokeGL(pbufferDrawable, context, displayAction, initAction);
- }
- }
- private DisplayOnEventDispatchThreadAction displayOnEventDispatchThreadAction =
- new DisplayOnEventDispatchThreadAction();
- class SwapBuffersOnEventDispatchThreadAction implements Runnable {
- public void run() {
- drawableHelper.invokeGL(pbufferDrawable, context, swapBuffersAction, initAction);
- }
- }
- private SwapBuffersOnEventDispatchThreadAction swapBuffersOnEventDispatchThreadAction =
- new SwapBuffersOnEventDispatchThreadAction();
-
- class DestroyAction implements Runnable {
- public void run() {
- if (null != context) {
- context.destroy();
- }
- pbufferDrawable.destroy();
- }
- }
- private DestroyAction destroyAction = new DestroyAction();
-}
diff --git a/src/jogl/classes/com/sun/opengl/impl/GLStateTracker.java b/src/jogl/classes/com/sun/opengl/impl/GLStateTracker.java
deleted file mode 100755
index d28d39f7f..000000000
--- a/src/jogl/classes/com/sun/opengl/impl/GLStateTracker.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- * Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.impl;
-
-import java.util.*;
-import javax.media.opengl.*;
-
-/**
- * Tracks as closely as possible OpenGL states.
- * GLStateTracker objects are allocated on a per-OpenGL-context basis.
- * limit() - position()
) in the passed FloatBuffer
- into a newly-allocated direct ByteBuffer. The returned buffer
- will have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ByteBuffer copyFloatBufferAsByteBuffer(FloatBuffer orig) {
- ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_FLOAT);
- dest.asFloatBuffer().put(orig);
- dest.rewind();
- return dest;
- }
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed IntBuffer into
- a newly-allocated direct ByteBuffer. The returned buffer will
- have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ByteBuffer copyIntBufferAsByteBuffer(IntBuffer orig) {
- ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_INT);
- dest.asIntBuffer().put(orig);
- dest.rewind();
- return dest;
- }
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed ShortBuffer
- into a newly-allocated direct ByteBuffer. The returned buffer
- will have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ByteBuffer copyShortBufferAsByteBuffer(ShortBuffer orig) {
- ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_SHORT);
- dest.asShortBuffer().put(orig);
- dest.rewind();
- return dest;
- }
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed ByteBuffer into
- a newly-allocated direct ByteBuffer. The returned buffer will
- have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ByteBuffer copyByteBuffer(ByteBuffer orig) {
- ByteBuffer dest = newByteBuffer(orig.remaining());
- dest.put(orig);
- dest.rewind();
- return dest;
- }
-
- //----------------------------------------------------------------------
- // Conversion routines
- //
-
- public static float[] getFloatArray(double[] source) {
- int i=source.length;
- float[] dest = new float[i--];
- while(i>=0) { dest[i]=(float)source[i]; i--; }
- return dest;
- }
-
- public static ByteBuffer nativeOrder(ByteBuffer buf) {
- if (!isCDCFP) {
- try {
- if (byteOrderClass == null) {
- byteOrderClass = Class.forName("java.nio.ByteOrder");
- orderMethod = ByteBuffer.class.getMethod("order", new Class[] { byteOrderClass });
- Method nativeOrderMethod = byteOrderClass.getMethod("nativeOrder", null);
- nativeOrderObject = nativeOrderMethod.invoke(null, null);
- }
- } catch (Throwable t) {
- // Must be running on CDC / FP
- isCDCFP = true;
- }
-
- if (!isCDCFP) {
- try {
- orderMethod.invoke(buf, new Object[] { nativeOrderObject });
- } catch (Throwable t) {
- }
- }
- }
- return buf;
- }
-
- //----------------------------------------------------------------------
- // Internals only below this point
- //
-
- // NOTE that this work must be done reflectively at the present time
- // because this code must compile and run correctly on both CDC/FP and J2SE
- private static boolean isCDCFP;
- private static Class byteOrderClass;
- private static Object nativeOrderObject;
- private static Method orderMethod;
-}
diff --git a/src/jogl/classes/com/sun/opengl/impl/InternalBufferUtil.java.javase b/src/jogl/classes/com/sun/opengl/impl/InternalBufferUtil.java.javase
deleted file mode 100644
index 59d44f04d..000000000
--- a/src/jogl/classes/com/sun/opengl/impl/InternalBufferUtil.java.javase
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.sun.opengl.impl;
-
-import java.lang.reflect.*;
-import java.nio.*;
-
-/** Internal copy of selected routines from BufferUtil to avoid
- outward dependencies on com.sun.opengl.util package. */
-public class InternalBufferUtil {
- public static final int SIZEOF_BYTE = 1;
- public static final int SIZEOF_SHORT = 2;
- public static final int SIZEOF_INT = 4;
- public static final int SIZEOF_FLOAT = 4;
- public static final int SIZEOF_LONG = 8;
- public static final int SIZEOF_DOUBLE = 8;
-
- //----------------------------------------------------------------------
- // Allocation routines
- //
-
- /** Allocates a new direct ByteBuffer with the specified number of
- elements. The returned buffer will have its byte order set to
- the host platform's native byte order. */
- public static ByteBuffer newByteBuffer(int numElements) {
- ByteBuffer bb = ByteBuffer.allocateDirect(numElements);
- nativeOrder(bb);
- return bb;
- }
-
- /** Allocates a new direct DoubleBuffer with the specified number of
- elements. The returned buffer will have its byte order set to
- the host platform's native byte order. */
- public static DoubleBuffer newDoubleBuffer(int numElements) {
- ByteBuffer bb = newByteBuffer(numElements * SIZEOF_DOUBLE);
- return bb.asDoubleBuffer();
- }
-
- /** Allocates a new direct IntBuffer with the specified number of
- elements. The returned buffer will have its byte order set to
- the host platform's native byte order. */
- public static IntBuffer newIntBuffer(int numElements) {
- ByteBuffer bb = newByteBuffer(numElements * SIZEOF_INT);
- return bb.asIntBuffer();
- }
-
- /** Allocates a new direct ShortBuffer with the specified number of
- elements. The returned buffer will have its byte order set to
- the host platform's native byte order. */
- public static ShortBuffer newShortBuffer(int numElements) {
- ByteBuffer bb = newByteBuffer(numElements * SIZEOF_SHORT);
- return bb.asShortBuffer();
- }
-
- /** Allocates a new direct FloatBuffer with the specified number of
- elements. The returned buffer will have its byte order set to
- the host platform's native byte order. */
- public static FloatBuffer newFloatBuffer(int numElements) {
- ByteBuffer bb = newByteBuffer(numElements * SIZEOF_FLOAT);
- return bb.asFloatBuffer();
- }
-
- //----------------------------------------------------------------------
- // Copy routines (type-to-ByteBuffer)
- //
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed FloatBuffer
- into a newly-allocated direct ByteBuffer. The returned buffer
- will have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ByteBuffer copyFloatBufferAsByteBuffer(FloatBuffer orig) {
- ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_FLOAT);
- dest.asFloatBuffer().put(orig);
- dest.rewind();
- return dest;
- }
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed IntBuffer into
- a newly-allocated direct ByteBuffer. The returned buffer will
- have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ByteBuffer copyIntBufferAsByteBuffer(IntBuffer orig) {
- ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_INT);
- dest.asIntBuffer().put(orig);
- dest.rewind();
- return dest;
- }
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed ShortBuffer
- into a newly-allocated direct ByteBuffer. The returned buffer
- will have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ByteBuffer copyShortBufferAsByteBuffer(ShortBuffer orig) {
- ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_SHORT);
- dest.asShortBuffer().put(orig);
- dest.rewind();
- return dest;
- }
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed ByteBuffer into
- a newly-allocated direct ByteBuffer. The returned buffer will
- have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ByteBuffer copyByteBuffer(ByteBuffer orig) {
- ByteBuffer dest = newByteBuffer(orig.remaining());
- dest.put(orig);
- dest.rewind();
- return dest;
- }
-
- //----------------------------------------------------------------------
- // Conversion routines
- //
-
- public static float[] getFloatArray(double[] source) {
- int i=source.length;
- float[] dest = new float[i--];
- while(i>=0) { dest[i]=(float)source[i]; i--; }
- return dest;
- }
-
- public static ByteBuffer nativeOrder(ByteBuffer buf) {
- if (!isCDCFP) {
- try {
- if (byteOrderClass == null) {
- byteOrderClass = Class.forName("java.nio.ByteOrder");
- orderMethod = ByteBuffer.class.getMethod("order", new Class[] { byteOrderClass });
- Method nativeOrderMethod = byteOrderClass.getMethod("nativeOrder", null);
- nativeOrderObject = nativeOrderMethod.invoke(null, null);
- }
- } catch (Throwable t) {
- // Must be running on CDC / FP
- isCDCFP = true;
- }
-
- if (!isCDCFP) {
- try {
- orderMethod.invoke(buf, new Object[] { nativeOrderObject });
- } catch (Throwable t) {
- }
- }
- }
- return buf;
- }
-
- //----------------------------------------------------------------------
- // Internals only below this point
- //
-
- // NOTE that this work must be done reflectively at the present time
- // because this code must compile and run correctly on both CDC/FP and J2SE
- private static boolean isCDCFP;
- private static Class byteOrderClass;
- private static Object nativeOrderObject;
- private static Method orderMethod;
-}
diff --git a/src/jogl/classes/com/sun/opengl/impl/NativeLibLoader.java b/src/jogl/classes/com/sun/opengl/impl/NativeLibLoader.java
deleted file mode 100644
index 59f92e53f..000000000
--- a/src/jogl/classes/com/sun/opengl/impl/NativeLibLoader.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.impl;
-
-// FIXME: refactor Java SE dependencies
-//import java.awt.Toolkit;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.HashSet;
-import com.sun.nativewindow.impl.NativeLibLoaderBase;
-
-public class NativeLibLoader extends NativeLibLoaderBase {
- public static void loadNEWT() {
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- loadLibrary("newt", nativeOSPreload, true);
- return null;
- }
- });
- }
-
- public static void loadGLDesktop() {
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- loadLibrary("jogl_gl2", nativeOSPreload, true);
- return null;
- }
- });
- }
-
- public static void loadGLDesktopES12() {
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- loadLibrary("jogl_gl2es12", nativeOSPreload, true);
- return null;
- }
- });
- }
-
- public static void loadES2() {
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- loadLibrary("jogl_es2", nativeOSPreload, true);
- return null;
- }
- });
- }
-
- public static void loadES1() {
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- loadLibrary("jogl_es1", nativeOSPreload, true);
- return null;
- }
- });
- }
-
- public static void loadCgImpl() {
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- String[] preload = { "nativewindow", "cg", "cgGL" };
- loadLibrary("jogl_cg", preload, true);
- return null;
- }
- });
- }
-
- private static final String[] nativeOSPreload = { "nativewindow_x11" };
-}
-
diff --git a/src/jogl/classes/com/sun/opengl/impl/ProjectFloat.java b/src/jogl/classes/com/sun/opengl/impl/ProjectFloat.java
deleted file mode 100755
index f9f38166d..000000000
--- a/src/jogl/classes/com/sun/opengl/impl/ProjectFloat.java
+++ /dev/null
@@ -1,1057 +0,0 @@
-/*
-** License Applicability. Except to the extent portions of this file are
-** made subject to an alternative license as permitted in the SGI Free
-** Software License B, Version 2.0 (the "License"), the contents of this
-** file are subject only to the provisions of the License. You may not use
-** this file except in compliance with the License. You may obtain a copy
-** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
-** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
-**
-** http://oss.sgi.com/projects/FreeB
-**
-** Note that, as provided in the License, the Software is distributed on an
-** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
-** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
-** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
-** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
-**
-** NOTE: The Original Code (as defined below) has been licensed to Sun
-** Microsystems, Inc. ("Sun") under the SGI Free Software License B
-** (Version 1.1), shown above ("SGI License"). Pursuant to Section
-** 3.2(3) of the SGI License, Sun is distributing the Covered Code to
-** you under an alternative license ("Alternative License"). This
-** Alternative License includes all of the provisions of the SGI License
-** except that Section 2.2 and 11 are omitted. Any differences between
-** the Alternative License and the SGI License are offered solely by Sun
-** and not by SGI.
-**
-** Original Code. The Original Code is: OpenGL Sample Implementation,
-** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
-** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
-** Copyright in any portions created by third parties is as indicated
-** elsewhere herein. All Rights Reserved.
-**
-** Additional Notice Provisions: The application programming interfaces
-** established by SGI in conjunction with the Original Code are The
-** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
-** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
-** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
-** Window System(R) (Version 1.3), released October 19, 1998. This software
-** was created using the OpenGL(R) version 1.2.1 Sample Implementation
-** published by SGI, but has not been independently verified as being
-** compliant with the OpenGL(R) version 1.2.1 Specification.
-**
-** $Date: 2009-03-13 22:20:29 -0700 (Fri, 13 Mar 2009) $ $Revision: 1867 $
-** $Header$
-*/
-
-/*
- * Copyright (c) 2002-2004 LWJGL Project
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'LWJGL' nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- */
-package com.sun.opengl.impl;
-
-import java.nio.*;
-
-import javax.media.opengl.*;
-import javax.media.opengl.fixedfunc.GLMatrixFunc;
-
-/**
- * ProjectFloat.java
- *
- *
- * Created 11-jan-2004
- *
- * @author Erik Duijs
- * @author Kenneth Russell
- */
-public class ProjectFloat {
- private static final float[] IDENTITY_MATRIX =
- new float[] {
- 1.0f, 0.0f, 0.0f, 0.0f,
- 0.0f, 1.0f, 0.0f, 0.0f,
- 0.0f, 0.0f, 1.0f, 0.0f,
- 0.0f, 0.0f, 0.0f, 1.0f };
-
- private static final float[] ZERO_MATRIX =
- new float[] {
- 0.0f, 0.0f, 0.0f, 0.0f,
- 0.0f, 0.0f, 0.0f, 0.0f,
- 0.0f, 0.0f, 0.0f, 0.0f,
- 0.0f, 0.0f, 0.0f, 0.0f };
-
- // Note that we have cloned parts of the implementation in order to
- // support incoming Buffers. The reason for this is to avoid loading
- // non-direct buffer subclasses unnecessarily, because doing so can
- // cause performance decreases on direct buffer operations, at least
- // on the current HotSpot JVM. It would be nicer (and make the code
- // simpler) to simply have the array-based entry points delegate to
- // the versions taking Buffers by wrapping the arrays.
-
- // Array-based implementation
- private final float[] matrix = new float[16];
- private final float[][] tempInvertMatrix = new float[4][4];
-
- private final float[] in = new float[4];
- private final float[] out = new float[4];
-
- private final float[] forward = new float[3];
- private final float[] side = new float[3];
- private final float[] up = new float[3];
-
- // Buffer-based implementation
- private FloatBuffer locbuf;
- private final FloatBuffer matrixBuf;
- private final FloatBuffer tempInvertMatrixBuf;
-
- private final FloatBuffer inBuf;
- private final FloatBuffer outBuf;
-
- private final FloatBuffer forwardBuf;
- private final FloatBuffer sideBuf;
- private final FloatBuffer upBuf;
-
- public ProjectFloat() {
- // Use direct buffers to avoid loading indirect buffer
- // implementations for applications trying to avoid doing so.
- // Slice up one big buffer because some NIO implementations
- // allocate a huge amount of memory to back even the smallest of
- // buffers.
- locbuf = InternalBufferUtil.newFloatBuffer(2*16+2*4+3*3);
- int pos = 0;
- int sz = 16;
- matrixBuf = slice(locbuf, pos, sz);
- pos += sz;
- tempInvertMatrixBuf = slice(locbuf, pos, sz);
- pos += sz;
- sz = 4;
- inBuf = slice(locbuf, pos, sz);
- pos += sz;
- outBuf = slice(locbuf, pos, sz);
- pos += sz;
- sz = 3;
- forwardBuf = slice(locbuf, pos, sz);
- pos += sz;
- sideBuf = slice(locbuf, pos, sz);
- pos += sz;
- upBuf = slice(locbuf, pos, sz);
- }
-
- public void destroy() {
- if(locbuf!=null) {
- locbuf.clear();
- locbuf=null;
- }
- }
-
- private static FloatBuffer slice(FloatBuffer buf, int pos, int len) {
- buf.position(pos);
- buf.limit(pos + len);
- return buf.slice();
- }
-
- /**
- * Make matrix an identity matrix
- */
- public static void gluMakeIdentityf(FloatBuffer m) {
- int oldPos = m.position();
- m.put(IDENTITY_MATRIX);
- m.position(oldPos);
- }
-
- /**
- * Make matrix an zero matrix
- */
- public static void gluMakeZero(FloatBuffer m) {
- int oldPos = m.position();
- m.put(ZERO_MATRIX);
- m.position(oldPos);
- }
-
- /**
- * Make matrix an identity matrix
- */
- public static void gluMakeIdentityf(float[] m) {
- for (int i = 0; i < 16; i++) {
- m[i] = IDENTITY_MATRIX[i];
- }
- }
-
- /**
- * Method __gluMultMatrixVecf
- *
- * @param matrix
- * @param in
- * @param out
- */
- private void __gluMultMatrixVecf(float[] matrix, int matrix_offset, float[] in, float[] out) {
- for (int i = 0; i < 4; i++) {
- out[i] =
- in[0] * matrix[0*4+i+matrix_offset] +
- in[1] * matrix[1*4+i+matrix_offset] +
- in[2] * matrix[2*4+i+matrix_offset] +
- in[3] * matrix[3*4+i+matrix_offset];
- }
- }
-
- /**
- * Method __gluMultMatrixVecf
- *
- * @param matrix
- * @param in
- * @param out
- */
- private void __gluMultMatrixVecf(FloatBuffer matrix, FloatBuffer in, FloatBuffer out) {
- int inPos = in.position();
- int outPos = out.position();
- int matrixPos = matrix.position();
- for (int i = 0; i < 4; i++) {
- out.put(i + outPos,
- in.get(0+inPos) * matrix.get(0*4+i+matrixPos) +
- in.get(1+inPos) * matrix.get(1*4+i+matrixPos) +
- in.get(2+inPos) * matrix.get(2*4+i+matrixPos) +
- in.get(3+inPos) * matrix.get(3*4+i+matrixPos));
- }
- }
-
- /**
- * @param src
- * @param inverse
- *
- * @return
- */
- public boolean gluInvertMatrixf(float[] src, float[] inverse) {
- int i, j, k, swap;
- float t;
- float[][] temp = tempInvertMatrix;
-
- for (i = 0; i < 4; i++) {
- for (j = 0; j < 4; j++) {
- temp[i][j] = src[i*4+j];
- }
- }
- gluMakeIdentityf(inverse);
-
- for (i = 0; i < 4; i++) {
- //
- // Look for largest element in column
- //
- swap = i;
- for (j = i + 1; j < 4; j++) {
- if (Math.abs(temp[j][i]) > Math.abs(temp[i][i])) {
- swap = j;
- }
- }
-
- if (swap != i) {
- //
- // Swap rows.
- //
- for (k = 0; k < 4; k++) {
- t = temp[i][k];
- temp[i][k] = temp[swap][k];
- temp[swap][k] = t;
-
- t = inverse[i*4+k];
- inverse[i*4+k] = inverse[swap*4+k];
- inverse[swap*4+k] = t;
- }
- }
-
- if (temp[i][i] == 0) {
- //
- // No non-zero pivot. The matrix is singular, which shouldn't
- // happen. This means the user gave us a bad matrix.
- //
- return false;
- }
-
- t = temp[i][i];
- for (k = 0; k < 4; k++) {
- temp[i][k] /= t;
- inverse[i*4+k] /= t;
- }
- for (j = 0; j < 4; j++) {
- if (j != i) {
- t = temp[j][i];
- for (k = 0; k < 4; k++) {
- temp[j][k] -= temp[i][k] * t;
- inverse[j*4+k] -= inverse[i*4+k]*t;
- }
- }
- }
- }
- return true;
- }
-
- /**
- * @param src
- * @param inverse
- *
- * @return
- */
- public boolean gluInvertMatrixf(FloatBuffer src, FloatBuffer inverse) {
- int i, j, k, swap;
- float t;
-
- int srcPos = src.position();
- int invPos = inverse.position();
-
- FloatBuffer temp = tempInvertMatrixBuf;
-
- for (i = 0; i < 4; i++) {
- for (j = 0; j < 4; j++) {
- temp.put(i*4+j, src.get(i*4+j + srcPos));
- }
- }
- gluMakeIdentityf(inverse);
-
- for (i = 0; i < 4; i++) {
- //
- // Look for largest element in column
- //
- swap = i;
- for (j = i + 1; j < 4; j++) {
- if (Math.abs(temp.get(j*4+i)) > Math.abs(temp.get(i*4+i))) {
- swap = j;
- }
- }
-
- if (swap != i) {
- //
- // Swap rows.
- //
- for (k = 0; k < 4; k++) {
- t = temp.get(i*4+k);
- temp.put(i*4+k, temp.get(swap*4+k));
- temp.put(swap*4+k, t);
-
- t = inverse.get(i*4+k + invPos);
- inverse.put(i*4+k + invPos, inverse.get(swap*4+k + invPos));
- inverse.put(swap*4+k + invPos, t);
- }
- }
-
- if (temp.get(i*4+i) == 0) {
- //
- // No non-zero pivot. The matrix is singular, which shouldn't
- // happen. This means the user gave us a bad matrix.
- //
- return false;
- }
-
- t = temp.get(i*4+i);
- for (k = 0; k < 4; k++) {
- temp.put(i*4+k, temp.get(i*4+k) / t);
- inverse.put(i*4+k + invPos, inverse.get(i*4+k + invPos) / t);
- }
- for (j = 0; j < 4; j++) {
- if (j != i) {
- t = temp.get(j*4+i);
- for (k = 0; k < 4; k++) {
- temp.put(j*4+k, temp.get(j*4+k) - temp.get(i*4+k) * t);
- inverse.put(j*4+k + invPos, inverse.get(j*4+k + invPos) - inverse.get(i*4+k + invPos) * t);
- }
- }
- }
- }
- return true;
- }
-
-
- /**
- * @param a
- * @param b
- * @param r
- */
- private void gluMultMatricesf(float[] a, int a_offset, float[] b, int b_offset, float[] r) {
- for (int i = 0; i < 4; i++) {
- for (int j = 0; j < 4; j++) {
- r[i*4+j] =
- a[i*4+0+a_offset]*b[0*4+j+b_offset] +
- a[i*4+1+a_offset]*b[1*4+j+b_offset] +
- a[i*4+2+a_offset]*b[2*4+j+b_offset] +
- a[i*4+3+a_offset]*b[3*4+j+b_offset];
- }
- }
- }
-
-
- /**
- * @param a
- * @param b
- * @param r
- */
- public static void gluMultMatricesf(FloatBuffer a, FloatBuffer b, FloatBuffer r) {
- int aPos = a.position();
- int bPos = b.position();
- int rPos = r.position();
-
- for (int i = 0; i < 4; i++) {
- for (int j = 0; j < 4; j++) {
- r.put(i*4+j + rPos,
- a.get(i*4+0+aPos)*b.get(0*4+j+bPos) +
- a.get(i*4+1+aPos)*b.get(1*4+j+bPos) +
- a.get(i*4+2+aPos)*b.get(2*4+j+bPos) +
- a.get(i*4+3+aPos)*b.get(3*4+j+bPos));
- }
- }
- }
-
- /**
- * Normalize vector
- *
- * @param v
- */
- public static void normalize(float[] v) {
- float r;
-
- r = (float) Math.sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
- if ( r == 0.0 || r == 1.0)
- return;
-
- r = 1.0f / r;
-
- v[0] *= r;
- v[1] *= r;
- v[2] *= r;
-
- return;
- }
-
- /**
- * Normalize vector
- *
- * @param v
- */
- public static void normalize(FloatBuffer v) {
- float r;
-
- int vPos = v.position();
-
- r = (float) Math.sqrt(v.get(0+vPos) * v.get(0+vPos) +
- v.get(1+vPos) * v.get(1+vPos) +
- v.get(2+vPos) * v.get(2+vPos));
- if ( r == 0.0 || r == 1.0)
- return;
-
- r = 1.0f / r;
-
- v.put(0+vPos, v.get(0+vPos) * r);
- v.put(1+vPos, v.get(1+vPos) * r);
- v.put(2+vPos, v.get(2+vPos) * r);
-
- return;
- }
-
-
- /**
- * Calculate cross-product
- *
- * @param v1
- * @param v2
- * @param result
- */
- private static void cross(float[] v1, float[] v2, float[] result) {
- result[0] = v1[1] * v2[2] - v1[2] * v2[1];
- result[1] = v1[2] * v2[0] - v1[0] * v2[2];
- result[2] = v1[0] * v2[1] - v1[1] * v2[0];
- }
-
- /**
- * Calculate cross-product
- *
- * @param v1
- * @param v2
- * @param result
- */
- private static void cross(FloatBuffer v1, FloatBuffer v2, FloatBuffer result) {
- int v1Pos = v1.position();
- int v2Pos = v2.position();
- int rPos = result.position();
-
- result.put(0+rPos, v1.get(1+v1Pos) * v2.get(2+v2Pos) - v1.get(2+v1Pos) * v2.get(1+v2Pos));
- result.put(1+rPos, v1.get(2+v1Pos) * v2.get(0+v2Pos) - v1.get(0+v1Pos) * v2.get(2+v2Pos));
- result.put(2+rPos, v1.get(0+v1Pos) * v2.get(1+v2Pos) - v1.get(1+v1Pos) * v2.get(0+v2Pos));
- }
-
- /**
- * Method gluOrtho2D.
- *
- * @param left
- * @param right
- * @param bottom
- * @param top
- */
- public void gluOrtho2D(GLMatrixFunc gl, float left, float right, float bottom, float top) {
- gl.glOrthof(left, right, bottom, top, -1, 1);
- }
-
- /**
- * Method gluPerspective.
- *
- * @param fovy
- * @param aspect
- * @param zNear
- * @param zFar
- */
- public void gluPerspective(GLMatrixFunc gl, float fovy, float aspect, float zNear, float zFar) {
- float sine, cotangent, deltaZ;
- float radians = fovy / 2 * (float) Math.PI / 180;
-
- deltaZ = zFar - zNear;
- sine = (float) Math.sin(radians);
-
- if ((deltaZ == 0) || (sine == 0) || (aspect == 0)) {
- return;
- }
-
- cotangent = (float) Math.cos(radians) / sine;
-
- gluMakeIdentityf(matrixBuf);
-
- matrixBuf.put(0 * 4 + 0, cotangent / aspect);
- matrixBuf.put(1 * 4 + 1, cotangent);
- matrixBuf.put(2 * 4 + 2, - (zFar + zNear) / deltaZ);
- matrixBuf.put(2 * 4 + 3, -1);
- matrixBuf.put(3 * 4 + 2, -2 * zNear * zFar / deltaZ);
- matrixBuf.put(3 * 4 + 3, 0);
-
- gl.glMultMatrixf(matrixBuf);
- }
-
- /**
- * Method gluLookAt
- *
- * @param eyex
- * @param eyey
- * @param eyez
- * @param centerx
- * @param centery
- * @param centerz
- * @param upx
- * @param upy
- * @param upz
- */
- public void gluLookAt(GLMatrixFunc gl,
- float eyex,
- float eyey,
- float eyez,
- float centerx,
- float centery,
- float centerz,
- float upx,
- float upy,
- float upz) {
- FloatBuffer forward = this.forwardBuf;
- FloatBuffer side = this.sideBuf;
- FloatBuffer up = this.upBuf;
-
- forward.put(0, centerx - eyex);
- forward.put(1, centery - eyey);
- forward.put(2, centerz - eyez);
-
- up.put(0, upx);
- up.put(1, upy);
- up.put(2, upz);
-
- normalize(forward);
-
- /* Side = forward x up */
- cross(forward, up, side);
- normalize(side);
-
- /* Recompute up as: up = side x forward */
- cross(side, forward, up);
-
- gluMakeIdentityf(matrixBuf);
- matrixBuf.put(0 * 4 + 0, side.get(0));
- matrixBuf.put(1 * 4 + 0, side.get(1));
- matrixBuf.put(2 * 4 + 0, side.get(2));
-
- matrixBuf.put(0 * 4 + 1, up.get(0));
- matrixBuf.put(1 * 4 + 1, up.get(1));
- matrixBuf.put(2 * 4 + 1, up.get(2));
-
- matrixBuf.put(0 * 4 + 2, -forward.get(0));
- matrixBuf.put(1 * 4 + 2, -forward.get(1));
- matrixBuf.put(2 * 4 + 2, -forward.get(2));
-
- gl.glMultMatrixf(matrixBuf);
- gl.glTranslatef(-eyex, -eyey, -eyez);
- }
-
- /**
- * Method gluProject
- *
- * @param objx
- * @param objy
- * @param objz
- * @param modelMatrix
- * @param projMatrix
- * @param viewport
- * @param win_pos
- *
- * @return
- */
- public boolean gluProject(float objx,
- float objy,
- float objz,
- float[] modelMatrix,
- int modelMatrix_offset,
- float[] projMatrix,
- int projMatrix_offset,
- int[] viewport,
- int viewport_offset,
- float[] win_pos,
- int win_pos_offset ) {
-
- float[] in = this.in;
- float[] out = this.out;
-
- in[0] = objx;
- in[1] = objy;
- in[2] = objz;
- in[3] = 1.0f;
-
- __gluMultMatrixVecf(modelMatrix, modelMatrix_offset, in, out);
- __gluMultMatrixVecf(projMatrix, projMatrix_offset, out, in);
-
- if (in[3] == 0.0f)
- return false;
-
- in[3] = (1.0f / in[3]) * 0.5f;
-
- // Map x, y and z to range 0-1
- in[0] = in[0] * in[3] + 0.5f;
- in[1] = in[1] * in[3] + 0.5f;
- in[2] = in[2] * in[3] + 0.5f;
-
- // Map x,y to viewport
- win_pos[0+win_pos_offset] = in[0] * viewport[2+viewport_offset] + viewport[0+viewport_offset];
- win_pos[1+win_pos_offset] = in[1] * viewport[3+viewport_offset] + viewport[1+viewport_offset];
- win_pos[2+win_pos_offset] = in[2];
-
- return true;
- }
-
- /**
- * Method gluProject
- *
- * @param objx
- * @param objy
- * @param objz
- * @param modelMatrix
- * @param projMatrix
- * @param viewport
- * @param win_pos
- *
- * @return
- */
- public boolean gluProject(float objx,
- float objy,
- float objz,
- FloatBuffer modelMatrix,
- FloatBuffer projMatrix,
- IntBuffer viewport,
- FloatBuffer win_pos) {
-
- FloatBuffer in = this.inBuf;
- FloatBuffer out = this.outBuf;
-
- in.put(0, objx);
- in.put(1, objy);
- in.put(2, objz);
- in.put(3, 1.0f);
-
- __gluMultMatrixVecf(modelMatrix, in, out);
- __gluMultMatrixVecf(projMatrix, out, in);
-
- if (in.get(3) == 0.0f)
- return false;
-
- in.put(3, (1.0f / in.get(3)) * 0.5f);
-
- // Map x, y and z to range 0-1
- in.put(0, in.get(0) * in.get(3) + 0.5f);
- in.put(1, in.get(1) * in.get(3) + 0.5f);
- in.put(2, in.get(2) * in.get(3) + 0.5f);
-
- // Map x,y to viewport
- int vPos = viewport.position();
- int wPos = win_pos.position();
- win_pos.put(0+wPos, in.get(0) * viewport.get(2+vPos) + viewport.get(0+vPos));
- win_pos.put(1+wPos, in.get(1) * viewport.get(3+vPos) + viewport.get(1+vPos));
- win_pos.put(2+wPos, in.get(2));
-
- return true;
- }
-
-
- /**
- * Method gluUnproject
- *
- * @param winx
- * @param winy
- * @param winz
- * @param modelMatrix
- * @param projMatrix
- * @param viewport
- * @param obj_pos
- *
- * @return
- */
- public boolean gluUnProject(float winx,
- float winy,
- float winz,
- float[] modelMatrix,
- int modelMatrix_offset,
- float[] projMatrix,
- int projMatrix_offset,
- int[] viewport,
- int viewport_offset,
- float[] obj_pos,
- int obj_pos_offset) {
- float[] in = this.in;
- float[] out = this.out;
-
- gluMultMatricesf(modelMatrix, modelMatrix_offset, projMatrix, projMatrix_offset, matrix);
-
- if (!gluInvertMatrixf(matrix, matrix))
- return false;
-
- in[0] = winx;
- in[1] = winy;
- in[2] = winz;
- in[3] = 1.0f;
-
- // Map x and y from window coordinates
- in[0] = (in[0] - viewport[0+viewport_offset]) / viewport[2+viewport_offset];
- in[1] = (in[1] - viewport[1+viewport_offset]) / viewport[3+viewport_offset];
-
- // Map to range -1 to 1
- in[0] = in[0] * 2 - 1;
- in[1] = in[1] * 2 - 1;
- in[2] = in[2] * 2 - 1;
-
- __gluMultMatrixVecf(matrix, 0, in, out);
-
- if (out[3] == 0.0)
- return false;
-
- out[3] = 1.0f / out[3];
-
- obj_pos[0+obj_pos_offset] = out[0] * out[3];
- obj_pos[1+obj_pos_offset] = out[1] * out[3];
- obj_pos[2+obj_pos_offset] = out[2] * out[3];
-
- return true;
- }
-
-
- /**
- * Method gluUnproject
- *
- * @param winx
- * @param winy
- * @param winz
- * @param modelMatrix
- * @param projMatrix
- * @param viewport
- * @param obj_pos
- *
- * @return
- */
- public boolean gluUnProject(float winx,
- float winy,
- float winz,
- FloatBuffer modelMatrix,
- FloatBuffer projMatrix,
- IntBuffer viewport,
- FloatBuffer obj_pos) {
- FloatBuffer in = this.inBuf;
- FloatBuffer out = this.outBuf;
-
- gluMultMatricesf(modelMatrix, projMatrix, matrixBuf);
-
- if (!gluInvertMatrixf(matrixBuf, matrixBuf))
- return false;
-
- in.put(0, winx);
- in.put(1, winy);
- in.put(2, winz);
- in.put(3, 1.0f);
-
- // Map x and y from window coordinates
- int vPos = viewport.position();
- int oPos = obj_pos.position();
- in.put(0, (in.get(0) - viewport.get(0+vPos)) / viewport.get(2+vPos));
- in.put(1, (in.get(1) - viewport.get(1+vPos)) / viewport.get(3+vPos));
-
- // Map to range -1 to 1
- in.put(0, in.get(0) * 2 - 1);
- in.put(1, in.get(1) * 2 - 1);
- in.put(2, in.get(2) * 2 - 1);
-
- __gluMultMatrixVecf(matrixBuf, in, out);
-
- if (out.get(3) == 0.0f)
- return false;
-
- out.put(3, 1.0f / out.get(3));
-
- obj_pos.put(0+oPos, out.get(0) * out.get(3));
- obj_pos.put(1+oPos, out.get(1) * out.get(3));
- obj_pos.put(2+oPos, out.get(2) * out.get(3));
-
- return true;
- }
-
-
- /**
- * Method gluUnproject4
- *
- * @param winx
- * @param winy
- * @param winz
- * @param clipw
- * @param modelMatrix
- * @param projMatrix
- * @param viewport
- * @param near
- * @param far
- * @param obj_pos
- *
- * @return
- */
- public boolean gluUnProject4(float winx,
- float winy,
- float winz,
- float clipw,
- float[] modelMatrix,
- int modelMatrix_offset,
- float[] projMatrix,
- int projMatrix_offset,
- int[] viewport,
- int viewport_offset,
- float near,
- float far,
- float[] obj_pos,
- int obj_pos_offset ) {
- float[] in = this.in;
- float[] out = this.out;
-
- gluMultMatricesf(modelMatrix, modelMatrix_offset, projMatrix, projMatrix_offset, matrix);
-
- if (!gluInvertMatrixf(matrix, matrix))
- return false;
-
- in[0] = winx;
- in[1] = winy;
- in[2] = winz;
- in[3] = clipw;
-
- // Map x and y from window coordinates
- in[0] = (in[0] - viewport[0+viewport_offset]) / viewport[2+viewport_offset];
- in[1] = (in[1] - viewport[1+viewport_offset]) / viewport[3+viewport_offset];
- in[2] = (in[2] - near) / (far - near);
-
- // Map to range -1 to 1
- in[0] = in[0] * 2 - 1;
- in[1] = in[1] * 2 - 1;
- in[2] = in[2] * 2 - 1;
-
- __gluMultMatrixVecf(matrix, 0, in, out);
-
- if (out[3] == 0.0f)
- return false;
-
- obj_pos[0+obj_pos_offset] = out[0];
- obj_pos[1+obj_pos_offset] = out[1];
- obj_pos[2+obj_pos_offset] = out[2];
- obj_pos[3+obj_pos_offset] = out[3];
- return true;
- }
-
- /**
- * Method gluUnproject4
- *
- * @param winx
- * @param winy
- * @param winz
- * @param clipw
- * @param modelMatrix
- * @param projMatrix
- * @param viewport
- * @param near
- * @param far
- * @param obj_pos
- *
- * @return
- */
- public boolean gluUnProject4(float winx,
- float winy,
- float winz,
- float clipw,
- FloatBuffer modelMatrix,
- FloatBuffer projMatrix,
- IntBuffer viewport,
- float near,
- float far,
- FloatBuffer obj_pos) {
- FloatBuffer in = this.inBuf;
- FloatBuffer out = this.outBuf;
-
- gluMultMatricesf(modelMatrix, projMatrix, matrixBuf);
-
- if (!gluInvertMatrixf(matrixBuf, matrixBuf))
- return false;
-
- in.put(0, winx);
- in.put(1, winy);
- in.put(2, winz);
- in.put(3, clipw);
-
- // Map x and y from window coordinates
- int vPos = viewport.position();
- in.put(0, (in.get(0) - viewport.get(0+vPos)) / viewport.get(2+vPos));
- in.put(1, (in.get(1) - viewport.get(1+vPos)) / viewport.get(3+vPos));
- in.put(2, (in.get(2) - near) / (far - near));
-
- // Map to range -1 to 1
- in.put(0, in.get(0) * 2 - 1);
- in.put(1, in.get(1) * 2 - 1);
- in.put(2, in.get(2) * 2 - 1);
-
- __gluMultMatrixVecf(matrixBuf, in, out);
-
- if (out.get(3) == 0.0f)
- return false;
-
- int oPos = obj_pos.position();
- obj_pos.put(0+oPos, out.get(0));
- obj_pos.put(1+oPos, out.get(1));
- obj_pos.put(2+oPos, out.get(2));
- obj_pos.put(3+oPos, out.get(3));
- return true;
- }
-
-
- /**
- * Method gluPickMatrix
- *
- * @param x
- * @param y
- * @param deltaX
- * @param deltaY
- * @param viewport
- */
- public void gluPickMatrix(GLMatrixFunc gl,
- float x,
- float y,
- float deltaX,
- float deltaY,
- IntBuffer viewport) {
- if (deltaX <= 0 || deltaY <= 0) {
- return;
- }
-
- /* Translate and scale the picked region to the entire window */
- int vPos = viewport.position();
- gl.glTranslatef((viewport.get(2+vPos) - 2 * (x - viewport.get(0+vPos))) / deltaX,
- (viewport.get(3+vPos) - 2 * (y - viewport.get(1+vPos))) / deltaY,
- 0);
- gl.glScalef(viewport.get(2) / deltaX, viewport.get(3) / deltaY, 1.0f);
- }
-
- /**
- * Method gluPickMatrix
- *
- * @param x
- * @param y
- * @param deltaX
- * @param deltaY
- * @param viewport
- * @param viewport_offset
- */
- public void gluPickMatrix(GLMatrixFunc gl,
- float x,
- float y,
- float deltaX,
- float deltaY,
- int[] viewport,
- int viewport_offset) {
- if (deltaX <= 0 || deltaY <= 0) {
- return;
- }
-
- /* Translate and scale the picked region to the entire window */
- gl.glTranslatef((viewport[2+viewport_offset] - 2 * (x - viewport[0+viewport_offset])) / deltaX,
- (viewport[3+viewport_offset] - 2 * (y - viewport[1+viewport_offset])) / deltaY,
- 0);
- gl.glScalef(viewport[2+viewport_offset] / deltaX, viewport[3+viewport_offset] / deltaY, 1.0f);
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/impl/SystemUtil.java.javame_cdc_fp b/src/jogl/classes/com/sun/opengl/impl/SystemUtil.java.javame_cdc_fp
deleted file mode 100644
index 91723b505..000000000
--- a/src/jogl/classes/com/sun/opengl/impl/SystemUtil.java.javame_cdc_fp
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.sun.opengl.impl;
-
-public class SystemUtil {
-
- /** Wrapper for System.getenv(), which doesn't work on platforms
- earlier than JDK 5 */
- public static String getenv(String variableName) {
- return null;
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/impl/SystemUtil.java.javase b/src/jogl/classes/com/sun/opengl/impl/SystemUtil.java.javase
deleted file mode 100644
index 3f201c2b6..000000000
--- a/src/jogl/classes/com/sun/opengl/impl/SystemUtil.java.javase
+++ /dev/null
@@ -1,18 +0,0 @@
-package com.sun.opengl.impl;
-
-public class SystemUtil {
-
- private static volatile boolean getenvSupported = true;
- /** Wrapper for System.getenv(), which doesn't work on platforms
- earlier than JDK 5 */
- public static String getenv(String variableName) {
- if (getenvSupported) {
- try {
- return System.getenv(variableName);
- } catch (Error e) {
- getenvSupported = false;
- }
- }
- return null;
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/impl/ThreadingImpl.java b/src/jogl/classes/com/sun/opengl/impl/ThreadingImpl.java
deleted file mode 100644
index 4a4b2d5f9..000000000
--- a/src/jogl/classes/com/sun/opengl/impl/ThreadingImpl.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.sun.opengl.impl;
-
-import java.lang.reflect.InvocationTargetException;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-
-import javax.media.nativewindow.NativeWindowFactory;
-import com.sun.nativewindow.impl.NWReflection;
-import javax.media.opengl.GLException;
-
-/** Implementation of the {@link javax.media.opengl.Threading} class. */
-
-public class ThreadingImpl {
- public static final int AWT = 1;
- public static final int WORKER = 2;
-
- protected static final boolean DEBUG = Debug.debug("Threading");
-
- private static boolean singleThreaded = true;
- private static int mode;
- private static boolean hasAWT;
- // We need to know whether we're running on X11 platforms to change
- // our behavior when the Java2D/JOGL bridge is active
- private static boolean _isX11;
-
- private static final ThreadingPlugin threadingPlugin;
-
- static {
- Object threadingPluginTmp =
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- String workaround = Debug.getProperty("jogl.1thread", true);
- // Default to using the AWT thread on all platforms except
- // Windows. On OS X there is instability apparently due to
- // using the JAWT on non-AWT threads. On X11 platforms there
- // are potential deadlocks which can be caused if the AWT
- // EventQueue thread hands work off to the GLWorkerThread
- // while holding the AWT lock. The optimization of
- // makeCurrent / release calls isn't worth these stability
- // problems.
- hasAWT = NWReflection.isClassAvailable("java.awt.Canvas") &&
- NWReflection.isClassAvailable("javax.media.opengl.awt.GLCanvas");
-
- String osType = NativeWindowFactory.getNativeWindowType(false);
- _isX11 = NativeWindowFactory.TYPE_X11.equals(osType);
- // boolean isWindows = NativeWindowFactory.TYPE_WINDOWS.equals(osType);
-
- // int defaultMode = (isWindows ? WORKER : ( hasAWT ? AWT : WORKER ) );
- int defaultMode = ( hasAWT ? AWT : WORKER );
-
- mode = defaultMode;
- if (workaround != null) {
- workaround = workaround.toLowerCase();
- if (workaround.equals("true") ||
- workaround.equals("auto")) {
- // Nothing to do; singleThreaded and mode already set up
- } else if (workaround.equals("worker")) {
- singleThreaded = true;
- mode = WORKER;
- } else if (workaround.equals("awt")) {
- singleThreaded = true;
- mode = AWT;
- } else {
- singleThreaded = false;
- }
- }
- printWorkaroundNotice();
-
- Object threadingPluginObj=null;
- // try to fetch the AWTThreadingPlugin
- try {
- threadingPluginObj = NWReflection.createInstance("com.sun.opengl.impl.awt.AWTThreadingPlugin");
- } catch (Throwable t) { }
- return threadingPluginObj;
- }
- });
- threadingPlugin = (ThreadingPlugin) threadingPluginTmp;
- if(DEBUG) {
- System.err.println("Threading: hasAWT "+hasAWT+", mode "+((mode==AWT)?"AWT":"WORKER")+", plugin "+threadingPlugin);
- }
- }
-
- /** No reason to ever instantiate this class */
- private ThreadingImpl() {}
-
- public static boolean isX11() { return _isX11; }
- public static int getMode() { return mode; }
-
- /** If an implementation of the javax.media.opengl APIs offers a
- multithreading option but the default behavior is single-threading,
- this API provides a mechanism for end users to disable single-threading
- in this implementation. Users are strongly discouraged from
- calling this method unless they are aware of all of the
- consequences and are prepared to enforce some amount of
- threading restrictions in their applications. Disabling
- single-threading, for example, may have unintended consequences
- on GLAutoDrawable implementations such as GLCanvas, GLJPanel and
- GLPbuffer. Currently there is no supported way to re-enable it
- once disabled, partly to discourage careless use of this
- method. This method should be called as early as possible in an
- application. */
- public static void disableSingleThreading() {
- singleThreaded = false;
- if (Debug.verbose()) {
- System.err.println("Application forced disabling of single-threading of javax.media.opengl implementation");
- }
- }
-
- /** Indicates whether OpenGL work is being automatically forced to a
- single thread in this implementation. */
- public static boolean isSingleThreaded() {
- return singleThreaded;
- }
-
- /** Indicates whether the current thread is the single thread on
- which this implementation of the javax.media.opengl APIs
- performs all of its OpenGL-related work. This method should only
- be called if the single-thread model is in effect. */
- public static boolean isOpenGLThread() throws GLException {
- if (!isSingleThreaded()) {
- throw new GLException("Should only call this in single-threaded mode");
- }
-
- if(null!=threadingPlugin) {
- return threadingPlugin.isOpenGLThread();
- }
-
- switch (mode) {
- case AWT:
- return true;
- case WORKER:
- return GLWorkerThread.isWorkerThread();
- default:
- throw new InternalError("Illegal single-threading mode " + mode);
- }
- }
-
- /** Executes the passed Runnable on the single thread used for all
- OpenGL work in this javax.media.opengl API implementation. It is
- not specified exactly which thread is used for this
- purpose. This method should only be called if the single-thread
- model is in use and if the current thread is not the OpenGL
- thread (i.e., if isOpenGLThread()
returns
- false). It is up to the end user to check to see whether the
- current thread is the OpenGL thread and either execute the
- Runnable directly or perform the work inside it. */
- public static void invokeOnOpenGLThread(Runnable r) throws GLException {
- if (!isSingleThreaded()) {
- throw new GLException ("Should only call this in single-threaded mode");
- }
-
- if (isOpenGLThread()) {
- throw new GLException ("Should only call this from other threads than the OpenGL thread");
- }
-
- if(null!=threadingPlugin) {
- threadingPlugin.invokeOnOpenGLThread(r);
- return;
- }
-
- switch (mode) {
- case AWT:
- r.run();
- break;
-
- case WORKER:
- if (!GLWorkerThread.isStarted()) {
- synchronized (GLWorkerThread.class) {
- if (!GLWorkerThread.isStarted()) {
- GLWorkerThread.start();
- }
- }
- }
- try {
- GLWorkerThread.invokeAndWait(r);
- } catch (InvocationTargetException e) {
- throw new GLException(e.getTargetException());
- } catch (InterruptedException e) {
- throw new GLException(e);
- }
- break;
-
- default:
- throw new InternalError("Illegal single-threading mode " + mode);
- }
- }
-
- /** This is a workaround for AWT-related deadlocks which only seem
- to show up in the context of applets */
- public static boolean isAWTMode() {
- return (mode == AWT);
- }
-
- private static void printWorkaroundNotice() {
- if (singleThreaded && Debug.verbose()) {
- System.err.println("Using " +
- (mode == AWT ? "AWT" : "OpenGL worker") +
- " thread for performing OpenGL work in javax.media.opengl implementation");
- }
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/impl/ThreadingPlugin.java b/src/jogl/classes/com/sun/opengl/impl/ThreadingPlugin.java
deleted file mode 100644
index 5c52f871e..000000000
--- a/src/jogl/classes/com/sun/opengl/impl/ThreadingPlugin.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.impl;
-
-import javax.media.opengl.*;
-
-public interface ThreadingPlugin {
- /** Indicates whether the current thread is the single thread on
- which this implementation of the javax.media.opengl APIs
- performs all of its OpenGL-related work. This method should only
- be called if the single-thread model is in effect. */
- public boolean isOpenGLThread() throws GLException;
-
- /** Executes the passed Runnable on the single thread used for all
- OpenGL work in this javax.media.opengl API implementation. It is
- not specified exactly which thread is used for this
- purpose. This method should only be called if the single-thread
- model is in use and if the current thread is not the OpenGL
- thread (i.e., if isOpenGLThread()
returns
- false). It is up to the end user to check to see whether the
- current thread is the OpenGL thread and either execute the
- Runnable directly or perform the work inside it. */
- public void invokeOnOpenGLThread(Runnable r) throws GLException;
-}
-
diff --git a/src/jogl/classes/com/sun/opengl/impl/awt/AWTThreadingPlugin.java b/src/jogl/classes/com/sun/opengl/impl/awt/AWTThreadingPlugin.java
deleted file mode 100755
index c7dd9ea80..000000000
--- a/src/jogl/classes/com/sun/opengl/impl/awt/AWTThreadingPlugin.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.impl.awt;
-
-import javax.media.opengl.*;
-
-import java.awt.event.*;
-
-import java.awt.EventQueue;
-import java.lang.reflect.InvocationTargetException;
-
-import com.sun.opengl.impl.*;
-
-public class AWTThreadingPlugin implements ThreadingPlugin {
-
- public AWTThreadingPlugin() {}
-
- public boolean isOpenGLThread() throws GLException {
- switch (ThreadingImpl.getMode()) {
- case ThreadingImpl.AWT:
- if (Java2D.isOGLPipelineActive()) {
- // FIXME: ideally only the QFT would be considered to be the
- // "OpenGL thread", but we can not currently run all of
- // JOGL's OpenGL work on that thread. See the FIXME in
- // invokeOnOpenGLThread.
- return (Java2D.isQueueFlusherThread() ||
- (ThreadingImpl.isX11() && EventQueue.isDispatchThread()));
- } else {
- return EventQueue.isDispatchThread();
- }
- case ThreadingImpl.WORKER:
- if (Java2D.isOGLPipelineActive()) {
- // FIXME: ideally only the QFT would be considered to be the
- // "OpenGL thread", but we can not currently run all of
- // JOGL's OpenGL work on that thread. See the FIXME in
- // invokeOnOpenGLThread.
- return (Java2D.isQueueFlusherThread() ||
- (ThreadingImpl.isX11() && GLWorkerThread.isWorkerThread()));
- } else {
- return GLWorkerThread.isWorkerThread();
- }
- default:
- throw new InternalError("Illegal single-threading mode " + ThreadingImpl.getMode());
- }
- }
-
- public void invokeOnOpenGLThread(Runnable r) throws GLException {
- switch (ThreadingImpl.getMode()) {
- case ThreadingImpl.AWT:
- // FIXME: ideally should run all OpenGL work on the Java2D QFT
- // thread when it's enabled, but unfortunately there are
- // deadlock issues on X11 platforms when making our
- // heavyweight OpenGL contexts current on the QFT because we
- // perform the JAWT lock inside the makeCurrent()
- // implementation, which attempts to grab the AWT lock on the
- // QFT which is not allowed. For now, on X11 platforms,
- // continue to perform this work on the EDT.
- if (Java2D.isOGLPipelineActive() && !ThreadingImpl.isX11()) {
- Java2D.invokeWithOGLContextCurrent(null, r);
- } else {
- try {
- EventQueue.invokeAndWait(r);
- } catch (InvocationTargetException e) {
- throw new GLException(e.getTargetException());
- } catch (InterruptedException e) {
- throw new GLException(e);
- }
- }
- break;
-
- case ThreadingImpl.WORKER:
- if (!GLWorkerThread.isStarted()) {
- synchronized (GLWorkerThread.class) {
- if (!GLWorkerThread.isStarted()) {
- GLWorkerThread.start();
- }
- }
- }
- try {
- GLWorkerThread.invokeAndWait(r);
- } catch (InvocationTargetException e) {
- throw new GLException(e.getTargetException());
- } catch (InterruptedException e) {
- throw new GLException(e);
- }
- break;
-
- default:
- throw new InternalError("Illegal single-threading mode " + ThreadingImpl.getMode());
- }
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/impl/awt/AWTUtil.java b/src/jogl/classes/com/sun/opengl/impl/awt/AWTUtil.java
deleted file mode 100644
index f4c8944df..000000000
--- a/src/jogl/classes/com/sun/opengl/impl/awt/AWTUtil.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- */
-
-package com.sun.opengl.impl.awt;
-
-import com.sun.nativewindow.impl.jawt.*;
-
-import com.sun.opengl.impl.*;
-
-import javax.media.opengl.*;
-
-import java.lang.reflect.*;
-import java.awt.GraphicsEnvironment;
-
-public class AWTUtil {
- // See whether we're running in headless mode
- private static boolean headlessMode;
- private static Class j2dClazz = null;
- private static Method isOGLPipelineActive = null;
- private static Method isQueueFlusherThread = null;
- private static boolean j2dOk = false;
-
- static {
- lockedToolkit = false;
- headlessMode = GraphicsEnvironment.isHeadless();
- if(!headlessMode) {
- try {
- j2dClazz = Class.forName("com.sun.opengl.impl.awt.Java2D");
- isOGLPipelineActive = j2dClazz.getMethod("isOGLPipelineActive", null);
- isQueueFlusherThread = j2dClazz.getMethod("isQueueFlusherThread", null);
- j2dOk = true;
- } catch (Exception e) {}
- }
- }
-
- private static boolean lockedToolkit;
-
- public static synchronized void lockToolkit() throws GLException {
- if (lockedToolkit) {
- throw new GLException("Toolkit already locked");
- }
- lockedToolkit = true;
-
- if (headlessMode) {
- // Workaround for running (to some degree) in headless
- // environments but still supporting rendering via pbuffers
- // For full correctness, would need to implement a Lock class
- return;
- }
-
- if(j2dOk) {
- try {
- if( !((Boolean)isOGLPipelineActive.invoke(null, null)).booleanValue() ||
- !((Boolean)isQueueFlusherThread.invoke(null, null)).booleanValue() ) {
- JAWTUtil.lockToolkit();
- }
- } catch (Exception e) { j2dOk=false; }
- }
- if(!j2dOk) {
- JAWTUtil.lockToolkit();
- }
- }
-
- public static synchronized void unlockToolkit() {
- if (lockedToolkit) {
- lockedToolkit = false;
- if (headlessMode) {
- // Workaround for running (to some degree) in headless
- // environments but still supporting rendering via pbuffers
- // For full correctness, would need to implement a Lock class
- return;
- }
-
- if(j2dOk) {
- try {
- if( !((Boolean)isOGLPipelineActive.invoke(null, null)).booleanValue() ||
- !((Boolean)isQueueFlusherThread.invoke(null, null)).booleanValue() ) {
- JAWTUtil.unlockToolkit();
- }
- } catch (Exception e) { j2dOk=false; }
- }
- if(!j2dOk) {
- JAWTUtil.unlockToolkit();
- }
- }
- }
-
- public static boolean isToolkitLocked() {
- return JAWTUtil.isToolkitLocked();
- }
-
-}
diff --git a/src/jogl/classes/com/sun/opengl/impl/awt/Java2D.java b/src/jogl/classes/com/sun/opengl/impl/awt/Java2D.java
deleted file mode 100755
index 098ec8529..000000000
--- a/src/jogl/classes/com/sun/opengl/impl/awt/Java2D.java
+++ /dev/null
@@ -1,569 +0,0 @@
-/*
- * Copyright (c) 2003-2005 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.impl.awt;
-
-import com.sun.opengl.impl.*;
-
-import java.awt.*;
-import java.awt.image.*;
-import java.lang.reflect.*;
-import java.security.*;
-
-import javax.media.opengl.*;
-import javax.media.nativewindow.*;
-import javax.media.nativewindow.awt.*;
-
-/** Defines integration with the Java2D OpenGL pipeline. This
- integration is only supported in 1.6 and is highly experimental. */
-
-public class Java2D {
- private static boolean DEBUG = Debug.debug("Java2D");
- private static boolean VERBOSE = Debug.verbose();
- private static boolean isHeadless;
- private static boolean isOGLPipelineActive;
- private static Method invokeWithOGLContextCurrentMethod;
- private static Method isQueueFlusherThreadMethod;
- private static Method getOGLViewportMethod;
- private static Method getOGLScissorBoxMethod;
- private static Method getOGLSurfaceIdentifierMethod;
- // This one is currently optional and is only in very recent Mustang builds
- private static Method getOGLTextureTypeMethod;
-
- // The following methods and fields are needed for proper support of
- // Frame Buffer Objects in the Java2D/OpenGL pipeline
- // (-Dsun.java2d.opengl.fbobject=true)
- private static boolean fbObjectSupportInitialized;
- private static Method invokeWithOGLSharedContextCurrentMethod;
- private static Method getOGLSurfaceTypeMethod;
-
- // Publicly-visible constants for OpenGL surface types
- public static final int UNDEFINED = getOGLUtilitiesIntField("UNDEFINED");
- public static final int WINDOW = getOGLUtilitiesIntField("WINDOW");
- public static final int PBUFFER = getOGLUtilitiesIntField("PBUFFER");
- public static final int TEXTURE = getOGLUtilitiesIntField("TEXTURE");
- public static final int FLIP_BACKBUFFER = getOGLUtilitiesIntField("FLIP_BACKBUFFER");
- public static final int FBOBJECT = getOGLUtilitiesIntField("FBOBJECT");
-
- // If FBOs are enabled in the Java2D/OpenGL pipeline, all contexts
- // created by JOGL must share textures and display lists with the
- // Java2D contexts in order to access the frame buffer object for
- // potential rendering, and to simultaneously support sharing of
- // textures and display lists with one another. Java2D has the
- // notion of a single shared context with which all other contexts
- // (on the same display device?) share textures and display lists;
- // this is an approximation to that notion which will be refined
- // later.
- private static boolean initializedJ2DFBOShareContext;
- private static GLContext j2dFBOShareContext;
-
- // Accessors for new methods in sun.java2d.opengl.CGLSurfaceData
- // class on OS X for enabling bridge
- // public static long createOGLContextOnSurface(Graphics g, long ctx);
- // public static boolean makeOGLContextCurrentOnSurface(Graphics g, long ctx);
- // public static void destroyOGLContext(long ctx);
- private static Method createOGLContextOnSurfaceMethod;
- private static Method makeOGLContextCurrentOnSurfaceMethod;
- private static Method destroyOGLContextMethod;
-
- static {
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- if (DEBUG && VERBOSE) {
- System.err.println("Checking for Java2D/OpenGL support");
- }
- try {
- isHeadless = true;
- // Figure out whether the default graphics configuration is an
- // OpenGL graphics configuration
- GraphicsConfiguration cfg =
- GraphicsEnvironment.getLocalGraphicsEnvironment().
- getDefaultScreenDevice().
- getDefaultConfiguration();
- // If we get here, we aren't running in headless mode
- isHeadless = false;
- String name = cfg.getClass().getName();
- if (DEBUG && VERBOSE) {
- System.err.println("Java2D support: default GraphicsConfiguration = " + name);
- }
- isOGLPipelineActive = (name.startsWith("sun.java2d.opengl"));
-
- if (isOGLPipelineActive) {
- try {
- // Try to get methods we need to integrate
- Class utils = Class.forName("sun.java2d.opengl.OGLUtilities");
- invokeWithOGLContextCurrentMethod = utils.getDeclaredMethod("invokeWithOGLContextCurrent",
- new Class[] {
- Graphics.class,
- Runnable.class
- });
- invokeWithOGLContextCurrentMethod.setAccessible(true);
-
- isQueueFlusherThreadMethod = utils.getDeclaredMethod("isQueueFlusherThread",
- new Class[] {});
- isQueueFlusherThreadMethod.setAccessible(true);
-
- getOGLViewportMethod = utils.getDeclaredMethod("getOGLViewport",
- new Class[] {
- Graphics.class,
- Integer.TYPE,
- Integer.TYPE
- });
- getOGLViewportMethod.setAccessible(true);
-
- getOGLScissorBoxMethod = utils.getDeclaredMethod("getOGLScissorBox",
- new Class[] {
- Graphics.class
- });
- getOGLScissorBoxMethod.setAccessible(true);
-
- getOGLSurfaceIdentifierMethod = utils.getDeclaredMethod("getOGLSurfaceIdentifier",
- new Class[] {
- Graphics.class
- });
- getOGLSurfaceIdentifierMethod.setAccessible(true);
-
- // Try to get additional methods required for proper FBO support
- fbObjectSupportInitialized = true;
- try {
- invokeWithOGLSharedContextCurrentMethod = utils.getDeclaredMethod("invokeWithOGLSharedContextCurrent",
- new Class[] {
- GraphicsConfiguration.class,
- Runnable.class
- });
- invokeWithOGLSharedContextCurrentMethod.setAccessible(true);
-
- getOGLSurfaceTypeMethod = utils.getDeclaredMethod("getOGLSurfaceType",
- new Class[] {
- Graphics.class
- });
- getOGLSurfaceTypeMethod.setAccessible(true);
- } catch (Exception e) {
- fbObjectSupportInitialized = false;
- if (DEBUG && VERBOSE) {
- e.printStackTrace();
- System.err.println("Disabling Java2D/JOGL FBO support");
- }
- }
-
- // Try to get an additional method for FBO support in recent Mustang builds
- try {
- getOGLTextureTypeMethod = utils.getDeclaredMethod("getOGLTextureType",
- new Class[] {
- Graphics.class
- });
- getOGLTextureTypeMethod.setAccessible(true);
- } catch (Exception e) {
- if (DEBUG && VERBOSE) {
- e.printStackTrace();
- System.err.println("GL_ARB_texture_rectangle FBO support disabled");
- }
- }
-
- // Try to set up APIs for enabling the bridge on OS X,
- // where it isn't possible to create generalized
- // external GLDrawables
- Class cglSurfaceData = null;
- try {
- cglSurfaceData = Class.forName("sun.java2d.opengl.CGLSurfaceData");
- } catch (Exception e) {
- if (DEBUG && VERBOSE) {
- e.printStackTrace();
- System.err.println("Unable to find class sun.java2d.opengl.CGLSurfaceData for OS X");
- }
- }
- if (cglSurfaceData != null) {
- // FIXME: for now, assume that FBO support is not enabled on OS X
- fbObjectSupportInitialized = false;
-
- // We need to find these methods in order to make the bridge work on OS X
- createOGLContextOnSurfaceMethod = cglSurfaceData.getDeclaredMethod("createOGLContextOnSurface",
- new Class[] {
- Graphics.class,
- Long.TYPE
- });
- createOGLContextOnSurfaceMethod.setAccessible(true);
-
- makeOGLContextCurrentOnSurfaceMethod = cglSurfaceData.getDeclaredMethod("makeOGLContextCurrentOnSurface",
- new Class[] {
- Graphics.class,
- Long.TYPE
- });
- makeOGLContextCurrentOnSurfaceMethod.setAccessible(true);
-
- destroyOGLContextMethod = cglSurfaceData.getDeclaredMethod("destroyOGLContext",
- new Class[] {
- Long.TYPE
- });
- destroyOGLContextMethod.setAccessible(true);
- }
- } catch (Exception e) {
- if (DEBUG && VERBOSE) {
- e.printStackTrace();
- System.err.println("Disabling Java2D/JOGL integration");
- }
- isOGLPipelineActive = false;
- }
- }
- } catch (HeadlessException e) {
- // The AWT is running in headless mode, so the Java 2D / JOGL bridge is clearly disabled
- }
-
- if (DEBUG) {
- System.err.println("JOGL/Java2D integration " + (isOGLPipelineActive ? "enabled" : "disabled"));
- }
- return null;
- }
- });
- }
-
- public static boolean isOGLPipelineActive() {
- return isOGLPipelineActive;
- }
-
- public static boolean isFBOEnabled() {
- return fbObjectSupportInitialized;
- }
-
- public static boolean isQueueFlusherThread() {
- checkActive();
-
- try {
- return ((Boolean) isQueueFlusherThreadMethod.invoke(null, new Object[] {})).booleanValue();
- } catch (InvocationTargetException e) {
- throw new GLException(e.getTargetException());
- } catch (Exception e) {
- throw (InternalError) new InternalError().initCause(e);
- }
- }
-
- /** Makes current the OpenGL context associated with the passed
- Graphics object and runs the given Runnable on the Queue
- Flushing Thread in one atomic action. */
- public static void invokeWithOGLContextCurrent(Graphics g, Runnable r) throws GLException {
- checkActive();
-
- try {
- // FIXME: this may need adjustment
- // This seems to be needed in many applications which don't
- // initialize an OpenGL context before this and which would
- // otherwise cause initFBOShareContext to be called from the
- // Queue Flusher Thread, which isn't allowed
- initFBOShareContext(GraphicsEnvironment.
- getLocalGraphicsEnvironment().
- getDefaultScreenDevice());
-
- AWTUtil.lockToolkit();
- try {
- invokeWithOGLContextCurrentMethod.invoke(null, new Object[] {g, r});
- } finally {
- AWTUtil.unlockToolkit();
- }
- } catch (InvocationTargetException e) {
- throw new GLException(e.getTargetException());
- } catch (Exception e) {
- throw (InternalError) new InternalError().initCause(e);
- }
- }
-
- /** Makes current the "shared" OpenGL context associated with the
- given GraphicsConfiguration object, allowing JOGL to share
- server-side OpenGL objects like textures and display lists with
- this context when necessary. This is needed when Java2D's FBO
- support is enabled, because in order to render into that FBO,
- JOGL must share textures and display lists with it. Returns
- false if the passed GraphicsConfiguration was not an OpenGL
- GraphicsConfiguration. */
- public static boolean invokeWithOGLSharedContextCurrent(GraphicsConfiguration g, Runnable r) throws GLException {
- checkActive();
-
- try {
- AWTUtil.lockToolkit();
- try {
- return ((Boolean) invokeWithOGLSharedContextCurrentMethod.invoke(null, new Object[] {g, r})).booleanValue();
- } finally {
- AWTUtil.unlockToolkit();
- }
- } catch (InvocationTargetException e) {
- throw new GLException(e.getTargetException());
- } catch (Exception e) {
- throw (InternalError) new InternalError().initCause(e);
- }
- }
-
- /** Returns the OpenGL viewport associated with the given Graphics
- object, assuming that the Graphics object is associated with a
- component of the specified width and height. The user should
- call glViewport() with the returned rectangle's bounds in order
- to get correct rendering results. Should only be called from the
- Queue Flusher Thread. */
- public static Rectangle getOGLViewport(Graphics g,
- int componentWidth,
- int componentHeight) {
- checkActive();
-
- try {
- return (Rectangle) getOGLViewportMethod.invoke(null, new Object[] {g,
- new Integer(componentWidth),
- new Integer(componentHeight)});
- } catch (InvocationTargetException e) {
- throw new GLException(e.getTargetException());
- } catch (Exception e) {
- throw (InternalError) new InternalError().initCause(e);
- }
- }
-
- /** Returns the OpenGL scissor region associated with the given
- Graphics object, taking into account all clipping regions, etc.
- To avoid destroying Java2D's previous rendering results, this
- method should be called and the resulting rectangle's bounds
- passed to a call to glScissor(). Should only be called from the
- Queue Flusher Thread. */
- public static Rectangle getOGLScissorBox(Graphics g) {
- checkActive();
-
- try {
- return (Rectangle) getOGLScissorBoxMethod.invoke(null, new Object[] {g});
- } catch (InvocationTargetException e) {
- throw new GLException(e.getTargetException());
- } catch (Exception e) {
- throw (InternalError) new InternalError().initCause(e);
- }
- }
-
- /** Returns an opaque "surface identifier" associated with the given
- Graphics object. If this changes from invocation to invocation,
- the underlying OpenGL drawable for the Graphics object has
- changed and a new external GLDrawable and GLContext should be
- created (and the old ones destroyed). Should only be called from
- the Queue Flusher Thread.*/
- public static Object getOGLSurfaceIdentifier(Graphics g) {
- checkActive();
-
- try {
- return getOGLSurfaceIdentifierMethod.invoke(null, new Object[] {g});
- } catch (InvocationTargetException e) {
- throw new GLException(e.getTargetException());
- } catch (Exception e) {
- throw (InternalError) new InternalError().initCause(e);
- }
- }
-
- /** Returns the underlying surface type for the given Graphics
- object. This indicates, in particular, whether Java2D is
- currently rendering into a pbuffer or FBO. */
- public static int getOGLSurfaceType(Graphics g) {
- checkActive();
-
- try {
- // FIXME: fallback path for pre-b73 (?) Mustang builds -- remove
- // once fbobject support is in OGLUtilities
- if (!fbObjectSupportInitialized) {
- return 0;
- }
-
- return ((Integer) getOGLSurfaceTypeMethod.invoke(null, new Object[] { g })).intValue();
- } catch (InvocationTargetException e) {
- throw new GLException(e.getTargetException());
- } catch (Exception e) {
- throw (InternalError) new InternalError().initCause(e);
- }
- }
-
- /** Returns the underlying texture target of the given Graphics
- object assuming it is rendering to an FBO. Returns either
- GL_TEXTURE_2D or GL_TEXTURE_RECTANGLE_ARB. */
- public static int getOGLTextureType(Graphics g) {
- checkActive();
-
- if (getOGLTextureTypeMethod == null) {
- return GL.GL_TEXTURE_2D;
- }
-
- try {
- return ((Integer) getOGLTextureTypeMethod.invoke(null, new Object[] { g })).intValue();
- } catch (InvocationTargetException e) {
- throw new GLException(e.getTargetException());
- } catch (Exception e) {
- throw (InternalError) new InternalError().initCause(e);
- }
- }
-
- /** Returns either the given GLContext or a substitute one with
- which clients should share textures and display lists. Needed
- when the Java2D/OpenGL pipeline is active and FBOs are being
- used for rendering. FIXME: may need to alter the API in the
- future to indicate which GraphicsDevice the source context is
- associated with. */
- public static GLContext filterShareContext(GLContext shareContext) {
- if (isHeadless)
- return shareContext;
-
- // FIXME: this may need adjustment
- initFBOShareContext(GraphicsEnvironment.
- getLocalGraphicsEnvironment().
- getDefaultScreenDevice());
- if (j2dFBOShareContext != null) {
- return j2dFBOShareContext;
- }
- return shareContext;
- }
-
- /** Returns the GLContext associated with the Java2D "share
- context", with which all contexts created by JOGL must share
- textures and display lists when the FBO option is enabled for
- the Java2D/OpenGL pipeline. */
- public static GLContext getShareContext(GraphicsDevice device) {
- initFBOShareContext(device);
- // FIXME: for full generality probably need to have multiple of
- // these, one per GraphicsConfiguration seen?
- return j2dFBOShareContext;
- }
-
- //----------------------------------------------------------------------
- // Mac OS X-specific methods
- //
-
- /** (Mac OS X-specific) Creates a new OpenGL context on the surface
- associated with the given Graphics object, sharing textures and
- display lists with the specified (CGLContextObj) share context. */
- public static long createOGLContextOnSurface(Graphics g, long shareCtx) {
- checkActive();
-
- try {
- return ((Long) createOGLContextOnSurfaceMethod.invoke(null, new Object[] { g, new Long(shareCtx) })).longValue();
- } catch (InvocationTargetException e) {
- throw new GLException(e.getTargetException());
- } catch (Exception e) {
- throw (InternalError) new InternalError().initCause(e);
- }
- }
-
- /** (Mac OS X-specific) Makes the given OpenGL context current on
- the surface associated with the given Graphics object. */
- public static boolean makeOGLContextCurrentOnSurface(Graphics g, long ctx) {
- checkActive();
-
- try {
- return ((Boolean) makeOGLContextCurrentOnSurfaceMethod.invoke(null, new Object[] { g, new Long(ctx) })).booleanValue();
- } catch (InvocationTargetException e) {
- throw new GLException(e.getTargetException());
- } catch (Exception e) {
- throw (InternalError) new InternalError().initCause(e);
- }
- }
-
- /** (Mac OS X-specific) Destroys the given OpenGL context. */
- public static void destroyOGLContext(long ctx) {
- checkActive();
-
- try {
- destroyOGLContextMethod.invoke(null, new Object[] { new Long(ctx) });
- } catch (InvocationTargetException e) {
- throw new GLException(e.getTargetException());
- } catch (Exception e) {
- throw (InternalError) new InternalError().initCause(e);
- }
- }
-
- //----------------------------------------------------------------------
- // Internals only below this point
- //
-
- private static void checkActive() {
- if (!isOGLPipelineActive()) {
- throw new GLException("Java2D OpenGL pipeline not active (or necessary support not present)");
- }
- }
-
- private static int getOGLUtilitiesIntField(final String name) {
- Integer i = (Integer) AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- try {
- Class utils = Class.forName("sun.java2d.opengl.OGLUtilities");
- Field f = utils.getField(name);
- f.setAccessible(true);
- return f.get(null);
- } catch (Exception e) {
- if (DEBUG && VERBOSE) {
- e.printStackTrace();
- }
- return null;
- }
- }
- });
- if (i == null)
- return 0;
- if (DEBUG && VERBOSE) {
- System.err.println("OGLUtilities." + name + " = " + i.intValue());
- }
- return i.intValue();
- }
-
- private static void initFBOShareContext(final GraphicsDevice device) {
- // Note 1: this must not be done in the static initalizer due to
- // deadlock problems.
-
- // Note 2: the first execution of this method must not be from the
- // Java2D Queue Flusher Thread.
-
- if (isOGLPipelineActive() &&
- isFBOEnabled() &&
- !initializedJ2DFBOShareContext) {
-
- // FIXME: this technique is probably not adequate in multi-head
- // situations. Ideally we would keep track of a given share
- // context on a per-GraphicsConfiguration basis or something
- // similar rather than keeping one share context in a global
- // variable.
- initializedJ2DFBOShareContext = true;
- if (DEBUG) {
- System.err.println("Starting initialization of J2D FBO share context");
- }
- invokeWithOGLSharedContextCurrent(device.getDefaultConfiguration(), new Runnable() {
- public void run() {
- j2dFBOShareContext = GLDrawableFactory.getFactory(GLProfile.getDefault()).createExternalGLContext();
- }
- });
- if (DEBUG) {
- System.err.println("Ending initialization of J2D FBO share context");
- }
- }
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/impl/awt/Java2DGLContext.java b/src/jogl/classes/com/sun/opengl/impl/awt/Java2DGLContext.java
deleted file mode 100644
index 48461c116..000000000
--- a/src/jogl/classes/com/sun/opengl/impl/awt/Java2DGLContext.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.impl.awt;
-
-import com.sun.opengl.impl.*;
-import java.awt.Graphics;
-
-/** Provides a construct by which the shared GLJPanel code can
- * interact with a few methods in the Mac OS X-specific Java2D/JOGL
- * bridge implementation.
- */
-
-public interface Java2DGLContext {
- public void setGraphics(Graphics g);
-}
diff --git a/src/jogl/classes/com/sun/opengl/impl/egl/EGLContext.java b/src/jogl/classes/com/sun/opengl/impl/egl/EGLContext.java
deleted file mode 100755
index 3e67469b4..000000000
--- a/src/jogl/classes/com/sun/opengl/impl/egl/EGLContext.java
+++ /dev/null
@@ -1,299 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.impl.egl;
-
-import javax.media.nativewindow.*;
-import javax.media.opengl.*;
-import com.sun.opengl.impl.*;
-import com.jogamp.gluegen.runtime.ProcAddressTable;
-import java.nio.*;
-import java.util.*;
-
-public abstract class EGLContext extends GLContextImpl {
- private long eglContext;
- private boolean eglQueryStringInitialized;
- private boolean eglQueryStringAvailable;
- private EGLExt eglExt;
- // Table that holds the addresses of the native C-language entry points for
- // EGL extension functions.
- private EGLExtProcAddressTable eglExtProcAddressTable;
-
- public EGLContext(GLDrawableImpl drawable, GLDrawableImpl drawableRead,
- GLContext shareWith) {
- super(drawable, drawableRead, shareWith);
- }
-
- public EGLContext(GLDrawableImpl drawable,
- GLContext shareWith) {
- this(drawable, null, shareWith);
- }
-
- public Object getPlatformGLExtensions() {
- return getEGLExt();
- }
-
- public EGLExt getEGLExt() {
- if (eglExt == null) {
- eglExt = new EGLExtImpl(this);
- }
- return eglExt;
- }
-
- public final ProcAddressTable getPlatformExtProcAddressTable() {
- return eglExtProcAddressTable;
- }
-
- public final EGLExtProcAddressTable getEGLExtProcAddressTable() {
- return eglExtProcAddressTable;
- }
-
- protected String mapToRealGLFunctionName(String glFunctionName) {
- return glFunctionName;
- }
-
- protected String mapToRealGLExtensionName(String glExtensionName) {
- return glExtensionName;
- }
-
- public long getContext() {
- return eglContext;
- }
-
- protected int makeCurrentImpl() throws GLException {
- if(EGL.EGL_NO_DISPLAY==((EGLDrawable)drawable).getDisplay() ) {
- System.err.println("drawable not properly initialized");
- return CONTEXT_NOT_CURRENT;
- }
- boolean created = false;
- if (eglContext == 0) {
- create();
- if (DEBUG) {
- System.err.println(getThreadName() + ": !!! Created GL context 0x" +
- Long.toHexString(eglContext) + " for " + getClass().getName());
- }
- created = true;
- }
- if (EGL.eglGetCurrentContext() != eglContext) {
- if (!EGL.eglMakeCurrent(((EGLDrawable)drawable).getDisplay(),
- ((EGLDrawable)drawable).getSurface(),
- ((EGLDrawable)drawableRead).getSurface(),
- eglContext)) {
- throw new GLException("Error making context 0x" +
- Long.toHexString(eglContext) + " current: error code " + EGL.eglGetError());
- }
- }
-
- if (created) {
- setGLFunctionAvailability(false);
- return CONTEXT_CURRENT_NEW;
- }
- return CONTEXT_CURRENT;
- }
-
- protected void releaseImpl() throws GLException {
- getDrawableImpl().getFactoryImpl().lockToolkit();
- try {
- if (!EGL.eglMakeCurrent(((EGLDrawable)drawable).getDisplay(),
- EGL.EGL_NO_SURFACE,
- EGL.EGL_NO_SURFACE,
- EGL.EGL_NO_CONTEXT)) {
- throw new GLException("Error freeing OpenGL context 0x" +
- Long.toHexString(eglContext) + ": error code " + EGL.eglGetError());
- }
- } finally {
- getDrawableImpl().getFactoryImpl().unlockToolkit();
- }
- }
-
- protected void destroyImpl() throws GLException {
- getDrawableImpl().getFactoryImpl().lockToolkit();
- try {
- if (eglContext != 0) {
- if (!EGL.eglDestroyContext(((EGLDrawable)drawable).getDisplay(), eglContext)) {
- throw new GLException("Error destroying OpenGL context 0x" +
- Long.toHexString(eglContext) + ": error code " + EGL.eglGetError());
- }
- eglContext = 0;
- GLContextShareSet.contextDestroyed(this);
- }
- } finally {
- getDrawableImpl().getFactoryImpl().unlockToolkit();
- }
- }
-
- protected void create() throws GLException {
- long eglDisplay = ((EGLDrawable)drawable).getDisplay();
- EGLGraphicsConfiguration config = ((EGLDrawable)drawable).getGraphicsConfiguration();
- GLProfile glProfile = drawable.getGLProfile();
- _EGLConfig eglConfig = config.getNativeConfig();
- long shareWith = EGL.EGL_NO_CONTEXT;
-
- if (eglDisplay == 0) {
- throw new GLException("Error: attempted to create an OpenGL context without a display connection");
- }
- if (eglConfig == null) {
- throw new GLException("Error: attempted to create an OpenGL context without a graphics configuration");
- }
-
- try {
- // might be unavailable on EGL < 1.2
- if(!EGL.eglBindAPI(EGL.EGL_OPENGL_ES_API)) {
- throw new GLException("eglBindAPI to ES failed , error 0x"+Integer.toHexString(EGL.eglGetError()));
- }
- } catch (GLException glex) {
- if (DEBUG) {
- glex.printStackTrace();
- }
- }
-
- EGLContext other = (EGLContext) GLContextShareSet.getShareContext(this);
- if (other != null) {
- shareWith = other.getContext();
- if (shareWith == 0) {
- throw new GLException("GLContextShareSet returned an invalid OpenGL context");
- }
- }
-
- int[] contextAttrs = new int[] {
- EGL.EGL_CONTEXT_CLIENT_VERSION, -1,
- EGL.EGL_NONE
- };
- if (glProfile.usesNativeGLES2()) {
- contextAttrs[1] = 2;
- } else if (glProfile.usesNativeGLES1()) {
- contextAttrs[1] = 1;
- } else {
- throw new GLException("Error creating OpenGL context - invalid GLProfile: "+glProfile);
- }
- eglContext = EGL.eglCreateContext(eglDisplay, eglConfig, shareWith, contextAttrs, 0);
- if (eglContext == 0) {
- throw new GLException("Error creating OpenGL context: eglDisplay 0x"+Long.toHexString(eglDisplay)+
- ", "+glProfile+", error 0x"+Integer.toHexString(EGL.eglGetError()));
- }
- GLContextShareSet.contextCreated(this);
- if (DEBUG) {
- System.err.println(getThreadName() + ": !!! Created OpenGL context 0x" +
- Long.toHexString(eglContext) +
- ",\n\twrite surface 0x" + Long.toHexString(((EGLDrawable)drawable).getSurface()) +
- ",\n\tread surface 0x" + Long.toHexString(((EGLDrawable)drawableRead).getSurface())+
- ",\n\t"+this+
- ",\n\tsharing with 0x" + Long.toHexString(shareWith));
- }
- if (!EGL.eglMakeCurrent(((EGLDrawable)drawable).getDisplay(),
- ((EGLDrawable)drawable).getSurface(),
- ((EGLDrawable)drawableRead).getSurface(),
- eglContext)) {
- throw new GLException("Error making context 0x" +
- Long.toHexString(eglContext) + " current: error code " + EGL.eglGetError());
- }
- setGLFunctionAvailability(true);
- }
-
- public boolean isCreated() {
- return (eglContext != 0);
- }
-
- protected void updateGLProcAddressTable() {
- if (DEBUG) {
- System.err.println(getThreadName() + ": !!! Initializing EGL extension address table");
- }
- eglQueryStringInitialized = false;
- eglQueryStringAvailable = false;
-
- if (eglExtProcAddressTable == null) {
- // FIXME: cache ProcAddressTables by capability bits so we can
- // share them among contexts with the same capabilities
- eglExtProcAddressTable = new EGLExtProcAddressTable();
- }
- resetProcAddressTable(getEGLExtProcAddressTable());
- super.updateGLProcAddressTable();
- }
-
- public synchronized String getPlatformExtensionsString() {
- if (!eglQueryStringInitialized) {
- eglQueryStringAvailable =
- getDrawableImpl().getDynamicLookupHelper().dynamicLookupFunction("eglQueryString") != 0;
- eglQueryStringInitialized = true;
- }
- if (eglQueryStringAvailable) {
- GLDrawableFactoryImpl factory = getDrawableImpl().getFactoryImpl();
- factory.lockToolkit();
- try {
- String ret = EGL.eglQueryString(((EGLDrawable)drawable).getDisplay(),
- EGL.EGL_EXTENSIONS);
- if (DEBUG) {
- System.err.println("!!! EGL extensions: " + ret);
- }
- return ret;
- } finally {
- factory.unlockToolkit();
- }
- } else {
- return "";
- }
- }
-
- protected void setSwapIntervalImpl(int interval) {
- if (EGL.eglSwapInterval(((EGLDrawable)drawable).getDisplay(), interval)) {
- currentSwapInterval = interval ;
- }
- }
-
- public abstract void bindPbufferToTexture();
-
- public abstract void releasePbufferFromTexture();
-
- //----------------------------------------------------------------------
- // Currently unimplemented stuff
- //
-
- public void copy(GLContext source, int mask) throws GLException {
- throw new GLException("Not yet implemented");
- }
-
-
- public ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3) {
- throw new GLException("Should not call this");
- }
-
- public boolean offscreenImageNeedsVerticalFlip() {
- throw new GLException("Should not call this");
- }
-
- public int getOffscreenContextPixelDataType() {
- throw new GLException("Should not call this");
- }
-}
diff --git a/src/jogl/classes/com/sun/opengl/impl/egl/EGLDrawable.java b/src/jogl/classes/com/sun/opengl/impl/egl/EGLDrawable.java
deleted file mode 100755
index b0a5a93d6..000000000
--- a/src/jogl/classes/com/sun/opengl/impl/egl/EGLDrawable.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.sun.opengl.impl.egl;
-
-import com.sun.opengl.impl.GLDrawableImpl;
-import com.sun.nativewindow.impl.NWReflection;
-import com.jogamp.gluegen.runtime.DynamicLookupHelper;
-
-import javax.media.nativewindow.*;
-import javax.media.nativewindow.egl.*;
-import javax.media.opengl.*;
-
-public abstract class EGLDrawable extends GLDrawableImpl {
- protected boolean ownEGLDisplay = false; // for destruction
- protected boolean ownEGLSurface = false; // for destruction
- private EGLGraphicsConfiguration eglConfig;
- protected long eglDisplay;
- protected long eglSurface;
-
- protected EGLDrawable(EGLDrawableFactory factory,
- NativeWindow component) throws GLException {
- super(factory, component, false);
- eglSurface=EGL.EGL_NO_SURFACE;
- eglDisplay=0;
- }
-
- public long getDisplay() {
- return eglDisplay;
- }
-
- public long getSurface() {
- return eglSurface;
- }
-
- public EGLGraphicsConfiguration getGraphicsConfiguration() {
- return eglConfig;
- }
-
- public GLCapabilities getChosenGLCapabilities() {
- return (null==eglConfig)?super.getChosenGLCapabilities():(GLCapabilities)eglConfig.getChosenCapabilities();
- }
-
- public abstract GLContext createContext(GLContext shareWith);
-
- protected abstract long createSurface(long eglDpy, _EGLConfig eglNativeCfg, long surfaceHandle);
-
- private void recreateSurface() {
- // create a new EGLSurface ..
- if(EGL.EGL_NO_SURFACE!=eglSurface) {
- EGL.eglDestroySurface(eglDisplay, eglSurface);
- }
-
- if(DEBUG) {
- System.err.println("createSurface using eglDisplay 0x"+Long.toHexString(eglDisplay)+", "+eglConfig);
- }
-
- eglSurface = createSurface(eglDisplay, eglConfig.getNativeConfig(), component.getSurfaceHandle());
- if (EGL.EGL_NO_SURFACE==eglSurface) {
- throw new GLException("Creation of window surface failed: "+eglConfig+", error 0x"+Integer.toHexString(EGL.eglGetError()));
- }
-
- if(DEBUG) {
- System.err.println("setSurface using component: handle 0x"+Long.toHexString(component.getSurfaceHandle())+" -> 0x"+Long.toHexString(eglSurface));
- }
- }
-
- protected void setRealizedImpl() {
- if (realized) {
- if ( NativeWindow.LOCK_SURFACE_NOT_READY == lockSurface() ) {
- throw new GLException("Couldn't lock surface");
- }
- // lockSurface() also resolved the window/surface handles
- try {
- AbstractGraphicsConfiguration aConfig = component.getGraphicsConfiguration().getNativeGraphicsConfiguration();
- AbstractGraphicsDevice aDevice = aConfig.getScreen().getDevice();
- if(aDevice instanceof EGLGraphicsDevice) {
- // just fetch the data .. trust but verify ..
- eglDisplay = aDevice.getHandle();
- if (eglDisplay == EGL.EGL_NO_DISPLAY) {
- throw new GLException("Invalid EGL display in EGLGraphicsDevice from "+aDevice);
- }
- if(aConfig instanceof EGLGraphicsConfiguration) {
- eglConfig = (EGLGraphicsConfiguration) aConfig; // done ..
- if (null == eglConfig) {
- throw new GLException("Null EGLGraphicsConfiguration from "+aConfig);
- }
-
- int[] tmp = new int[1];
- if ( 0 != component.getSurfaceHandle() &&
- EGL.eglQuerySurface(eglDisplay, component.getSurfaceHandle(), EGL.EGL_CONFIG_ID, tmp, 0) ) {
- // component holds static EGLSurface
- eglSurface = component.getSurfaceHandle();
- if(DEBUG) {
- System.err.println("setSurface re-using component's EGLSurface: handle 0x"+Long.toHexString(eglSurface));
- }
- } else {
- // EGLSurface is ours ..
- ownEGLSurface=true;
-
- eglConfig.updateGraphicsConfiguration();
-
- recreateSurface();
- }
- } else {
- throw new GLException("EGLGraphicsDevice hold by non EGLGraphicsConfiguration: "+aConfig);
- }
- } else {
- // create a new EGL config ..
- ownEGLDisplay=true;
- // EGLSurface is ours ..
- ownEGLSurface=true;
-
- long nDisplay=0;
- if( NativeWindowFactory.TYPE_WINDOWS.equals(NativeWindowFactory.getNativeWindowType(false)) ) {
- nDisplay = component.getSurfaceHandle(); // don't even ask ..
- } else {
- nDisplay = aDevice.getHandle(); // 0 == EGL.EGL_DEFAULT_DISPLAY
- }
- eglDisplay = EGL.eglGetDisplay(nDisplay);
- if (eglDisplay == EGL.EGL_NO_DISPLAY) {
- if(DEBUG) {
- System.err.println("eglDisplay("+Long.toHexString(nDisplay)+" java -Djava.awt.headless=true demos.es2.RedSquare -GL2
* Single thread (MacOSX) java -XstartOnFirstThread -Djava.awt.headless=true demos.es2.RedSquare -GL2
* Multiple threads & windows (Unix, Win32) java -Djava.awt.headless=true demos.es2.RedSquare -GL2 -GL2 -GL2 -GL2
-* Multiple threads & windows (MacOSX) java -XstartOnFirstThread -Djava.awt.headless=true com.sun.javafx.newt.util.MainThread demos.es2.RedSquare -GL2 -GL2 -GL2 -GL2
+* Multiple threads & windows (MacOSX) java -XstartOnFirstThread -Djava.awt.headless=true com.jogamp.javafx.newt.util.MainThread demos.es2.RedSquare -GL2 -GL2 -GL2 -GL2
-The serialization of the main Java class through ''com.sun.javafx.newt.util.MainThread''
+The serialization of the main Java class through ''com.jogamp.javafx.newt.util.MainThread''
may be used for all platforms, since it only takes effect on ''MacOSX''.
This allows you an almost platform independent invocation of your multithreaded Java applications.
-On ''MacOSX'', ''com.sun.javafx.newt.util.MainThread'' will occupy the main thread and
+On ''MacOSX'', ''com.jogamp.javafx.newt.util.MainThread'' will occupy the main thread and
serializes all native window related tasks through it.
This mechanism is thread safe utilizes reentrant locking.
diff --git a/doxygen/doxygen-all-dev.cfg b/doxygen/doxygen-all-dev.cfg
index 2425ff403..d047e7182 100644
--- a/doxygen/doxygen-all-dev.cfg
+++ b/doxygen/doxygen-all-dev.cfg
@@ -465,7 +465,7 @@ INPUT = ../src/newt/classes
INPUT += ../build/jogl/gensrc/classes
INPUT += ../build/nativewindow/gensrc/classes
INPUT += ../build/newt/gensrc/classes
-INPUT += ../../gluegen/src/java/com/sun/gluegen/runtime
+INPUT += ../../gluegen/src/java/com/jogamp/gluegen/runtime
# If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
diff --git a/doxygen/doxygen-all-pub.cfg b/doxygen/doxygen-all-pub.cfg
index 3cac3e651..a7f4711df 100644
--- a/doxygen/doxygen-all-pub.cfg
+++ b/doxygen/doxygen-all-pub.cfg
@@ -462,7 +462,7 @@ WARN_LOGFILE =
INPUT = ../src/jogl/classes/javax
INPUT += ../build-x86_64/jogl/gensrc/classes/javax
INPUT += ../src/jogl/classes/com/jogamp/opengl/util
-INPUT += ../src/newt/classes/com/sun/javafx/newt
+INPUT += ../src/newt/classes/com/jogamp/javafx/newt
# If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
diff --git a/make/build-jogl.xml b/make/build-jogl.xml
index 80b106467..c3bc96bd8 100644
--- a/make/build-jogl.xml
+++ b/make/build-jogl.xml
@@ -114,7 +114,7 @@
value="com/jogamp/opengl/impl/glu/gl2/** com/jogamp/opengl/impl/glu/nurbs/** com/jogamp/opengl/impl/glu/registry/** javax/media/opengl/glu/gl2/**"/>
limit() - position()
) in the passed ByteBuffer into
+ a newly-allocated direct ByteBuffer. The returned buffer will
+ have its byte order set to the host platform's native byte
+ order. The position of the newly-allocated buffer will be zero,
+ and the position of the passed buffer is unchanged (though its
+ mark is changed). */
+ public static ByteBuffer copyByteBuffer(ByteBuffer orig) {
+ ByteBuffer dest = newByteBuffer(orig.remaining());
+ dest.put(orig);
+ dest.rewind();
+ return dest;
+ }
+
+ //----------------------------------------------------------------------
+ // Conversion routines
+ //
+
+ public static ByteBuffer nativeOrder(ByteBuffer buf) {
+ if (!isCDCFP) {
+ try {
+ if (byteOrderClass == null) {
+ byteOrderClass = Class.forName("java.nio.ByteOrder");
+ orderMethod = ByteBuffer.class.getMethod("order", new Class[] { byteOrderClass });
+ Method nativeOrderMethod = byteOrderClass.getMethod("nativeOrder", null);
+ nativeOrderObject = nativeOrderMethod.invoke(null, null);
+ }
+ } catch (Throwable t) {
+ // Must be running on CDC / FP
+ isCDCFP = true;
+ }
+
+ if (!isCDCFP) {
+ try {
+ orderMethod.invoke(buf, new Object[] { nativeOrderObject });
+ } catch (Throwable t) {
+ }
+ }
+ }
+ return buf;
+ }
+
+ //----------------------------------------------------------------------
+ // Internals only below this point
+ //
+
+ // NOTE that this work must be done reflectively at the present time
+ // because this code must compile and run correctly on both CDC/FP and J2SE
+ private static boolean isCDCFP;
+ private static Class byteOrderClass;
+ private static Object nativeOrderObject;
+ private static Method orderMethod;
+}
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/impl/LockingNativeWindowFactory.java b/src/nativewindow/classes/com/jogamp/nativewindow/impl/LockingNativeWindowFactory.java
new file mode 100644
index 000000000..fd2478ab2
--- /dev/null
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/impl/LockingNativeWindowFactory.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ */
+
+package com.jogamp.nativewindow.impl;
+
+import javax.media.nativewindow.*;
+
+public class LockingNativeWindowFactory extends NativeWindowFactoryImpl {
+ // Provides a generic basic and recursive locking mechanism for your discretion.
+ private ToolkitLock toolkitLock = new ToolkitLock() {
+ private Thread owner;
+ private int recursionCount;
+
+ public synchronized void lock() {
+ Thread cur = Thread.currentThread();
+ if (owner == cur) {
+ ++recursionCount;
+ return;
+ }
+ while (owner != null) {
+ try {
+ wait();
+ } catch (InterruptedException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ owner = cur;
+ }
+
+ public synchronized void unlock() {
+ if (owner != Thread.currentThread()) {
+ throw new RuntimeException("Not owner");
+ }
+ if (recursionCount > 0) {
+ --recursionCount;
+ return;
+ }
+ owner = null;
+ notifyAll();
+ }
+ };
+
+ public ToolkitLock getToolkitLock() {
+ return toolkitLock;
+ }
+}
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/impl/NWReflection.java b/src/nativewindow/classes/com/jogamp/nativewindow/impl/NWReflection.java
new file mode 100644
index 000000000..22bdedac9
--- /dev/null
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/impl/NWReflection.java
@@ -0,0 +1,181 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ */
+
+package com.jogamp.nativewindow.impl;
+
+import java.lang.reflect.*;
+import javax.media.nativewindow.*;
+
+public final class NWReflection {
+ public static final boolean DEBUG = Debug.debug("NWReflection");
+
+ public static final boolean isClassAvailable(String clazzName) {
+ try {
+ Class clazz = Class.forName(clazzName, false, NWReflection.class.getClassLoader());
+ return null!=clazz;
+ } catch (Throwable e) { }
+ return false;
+ }
+
+ public static final Class getClass(String clazzName, boolean initialize) {
+ try {
+ return Class.forName(clazzName, initialize, NWReflection.class.getClassLoader());
+ } catch (Throwable e) { }
+ return null;
+ }
+
+ public static final Constructor getConstructor(String clazzName, Class[] cstrArgTypes) {
+ Class factoryClass = null;
+ Constructor factory = null;
+
+ try {
+ factoryClass = getClass(clazzName, true);
+ if (factoryClass == null) {
+ throw new NativeWindowException(clazzName + " not available");
+ }
+ return getConstructor(factoryClass, cstrArgTypes);
+ } catch (Throwable e) {
+ if (DEBUG) {
+ e.printStackTrace();
+ }
+ throw new NativeWindowException(e);
+ }
+ }
+
+ public static final Constructor getConstructor(Class clazz, Class[] cstrArgTypes) {
+ Constructor factory = null;
+
+ try {
+ try {
+ factory = clazz.getDeclaredConstructor( cstrArgTypes );
+ } catch(NoSuchMethodException nsme) {
+ throw new NativeWindowException("Constructor: '" + clazz + "("+cstrArgTypes+")' not found");
+ }
+ return factory;
+ } catch (Throwable e) {
+ if (DEBUG) {
+ e.printStackTrace();
+ }
+ throw new NativeWindowException(e);
+ }
+ }
+
+ public static final Constructor getConstructor(String clazzName) {
+ return getConstructor(clazzName, new Class[0]);
+ }
+
+ public static final Object createInstance(Class clazz, Class[] cstrArgTypes, Object[] cstrArgs) {
+ Constructor factory = null;
+
+ try {
+ factory = getConstructor(clazz, cstrArgTypes);
+ return factory.newInstance( cstrArgs ) ;
+ } catch (Exception e) {
+ throw new NativeWindowException(e);
+ }
+ }
+
+ public static final Object createInstance(Class clazz, Object[] cstrArgs) {
+ Class[] cstrArgTypes = new Class[cstrArgs.length];
+ for(int i=0; ilimit() - position()
) in the passed ByteBuffer into
- a newly-allocated direct ByteBuffer. The returned buffer will
- have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ByteBuffer copyByteBuffer(ByteBuffer orig) {
- ByteBuffer dest = newByteBuffer(orig.remaining());
- dest.put(orig);
- dest.rewind();
- return dest;
- }
-
- //----------------------------------------------------------------------
- // Conversion routines
- //
-
- public static ByteBuffer nativeOrder(ByteBuffer buf) {
- if (!isCDCFP) {
- try {
- if (byteOrderClass == null) {
- byteOrderClass = Class.forName("java.nio.ByteOrder");
- orderMethod = ByteBuffer.class.getMethod("order", new Class[] { byteOrderClass });
- Method nativeOrderMethod = byteOrderClass.getMethod("nativeOrder", null);
- nativeOrderObject = nativeOrderMethod.invoke(null, null);
- }
- } catch (Throwable t) {
- // Must be running on CDC / FP
- isCDCFP = true;
- }
-
- if (!isCDCFP) {
- try {
- orderMethod.invoke(buf, new Object[] { nativeOrderObject });
- } catch (Throwable t) {
- }
- }
- }
- return buf;
- }
-
- //----------------------------------------------------------------------
- // Internals only below this point
- //
-
- // NOTE that this work must be done reflectively at the present time
- // because this code must compile and run correctly on both CDC/FP and J2SE
- private static boolean isCDCFP;
- private static Class byteOrderClass;
- private static Object nativeOrderObject;
- private static Method orderMethod;
-}
diff --git a/src/nativewindow/classes/com/sun/nativewindow/impl/LockingNativeWindowFactory.java b/src/nativewindow/classes/com/sun/nativewindow/impl/LockingNativeWindowFactory.java
deleted file mode 100644
index 880fd8c7d..000000000
--- a/src/nativewindow/classes/com/sun/nativewindow/impl/LockingNativeWindowFactory.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- */
-
-package com.sun.nativewindow.impl;
-
-import javax.media.nativewindow.*;
-
-public class LockingNativeWindowFactory extends NativeWindowFactoryImpl {
- // Provides a generic basic and recursive locking mechanism for your discretion.
- private ToolkitLock toolkitLock = new ToolkitLock() {
- private Thread owner;
- private int recursionCount;
-
- public synchronized void lock() {
- Thread cur = Thread.currentThread();
- if (owner == cur) {
- ++recursionCount;
- return;
- }
- while (owner != null) {
- try {
- wait();
- } catch (InterruptedException e) {
- throw new RuntimeException(e);
- }
- }
- owner = cur;
- }
-
- public synchronized void unlock() {
- if (owner != Thread.currentThread()) {
- throw new RuntimeException("Not owner");
- }
- if (recursionCount > 0) {
- --recursionCount;
- return;
- }
- owner = null;
- notifyAll();
- }
- };
-
- public ToolkitLock getToolkitLock() {
- return toolkitLock;
- }
-}
diff --git a/src/nativewindow/classes/com/sun/nativewindow/impl/NWReflection.java b/src/nativewindow/classes/com/sun/nativewindow/impl/NWReflection.java
deleted file mode 100644
index d86fbdc55..000000000
--- a/src/nativewindow/classes/com/sun/nativewindow/impl/NWReflection.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- */
-
-package com.sun.nativewindow.impl;
-
-import java.lang.reflect.*;
-import javax.media.nativewindow.*;
-
-public final class NWReflection {
- public static final boolean DEBUG = Debug.debug("NWReflection");
-
- public static final boolean isClassAvailable(String clazzName) {
- try {
- Class clazz = Class.forName(clazzName, false, NWReflection.class.getClassLoader());
- return null!=clazz;
- } catch (Throwable e) { }
- return false;
- }
-
- public static final Class getClass(String clazzName, boolean initialize) {
- try {
- return Class.forName(clazzName, initialize, NWReflection.class.getClassLoader());
- } catch (Throwable e) { }
- return null;
- }
-
- public static final Constructor getConstructor(String clazzName, Class[] cstrArgTypes) {
- Class factoryClass = null;
- Constructor factory = null;
-
- try {
- factoryClass = getClass(clazzName, true);
- if (factoryClass == null) {
- throw new NativeWindowException(clazzName + " not available");
- }
- return getConstructor(factoryClass, cstrArgTypes);
- } catch (Throwable e) {
- if (DEBUG) {
- e.printStackTrace();
- }
- throw new NativeWindowException(e);
- }
- }
-
- public static final Constructor getConstructor(Class clazz, Class[] cstrArgTypes) {
- Constructor factory = null;
-
- try {
- try {
- factory = clazz.getDeclaredConstructor( cstrArgTypes );
- } catch(NoSuchMethodException nsme) {
- throw new NativeWindowException("Constructor: '" + clazz + "("+cstrArgTypes+")' not found");
- }
- return factory;
- } catch (Throwable e) {
- if (DEBUG) {
- e.printStackTrace();
- }
- throw new NativeWindowException(e);
- }
- }
-
- public static final Constructor getConstructor(String clazzName) {
- return getConstructor(clazzName, new Class[0]);
- }
-
- public static final Object createInstance(Class clazz, Class[] cstrArgTypes, Object[] cstrArgs) {
- Constructor factory = null;
-
- try {
- factory = getConstructor(clazz, cstrArgTypes);
- return factory.newInstance( cstrArgs ) ;
- } catch (Exception e) {
- throw new NativeWindowException(e);
- }
- }
-
- public static final Object createInstance(Class clazz, Object[] cstrArgs) {
- Class[] cstrArgTypes = new Class[cstrArgs.length];
- for(int i=0; iInsets
object with the
+ * specified top, left, bottom, and right insets.
+ * @param top the inset from the top.
+ * @param left the inset from the left.
+ * @param bottom the inset from the bottom.
+ * @param right the inset from the right.
+ */
+ public Insets(int top, int left, int bottom, int right) {
+ this.top = top;
+ this.left = left;
+ this.bottom = bottom;
+ this.right = right;
+ }
+
+ /**
+ * Checks whether two insets objects are equal. Two instances
+ * of Insets
are equal if the four integer values
+ * of the fields top
, left
,
+ * bottom
, and right
are all equal.
+ * @return true
if the two insets are equal;
+ * otherwise false
.
+ */
+ public boolean equals(Object obj) {
+ if (obj instanceof Insets) {
+ Insets insets = (Insets)obj;
+ return ((top == insets.top) && (left == insets.left) &&
+ (bottom == insets.bottom) && (right == insets.right));
+ }
+ return false;
+ }
+
+ /**
+ * Returns the hash code for this Insets.
+ *
+ * @return a hash code for this Insets.
+ */
+ public int hashCode() {
+ int sum1 = left + bottom;
+ int sum2 = right + top;
+ int val1 = sum1 * (sum1 + 1)/2 + left;
+ int val2 = sum2 * (sum2 + 1)/2 + top;
+ int sum3 = val1 + val2;
+ return sum3 * (sum3 + 1)/2 + val2;
+ }
+
+ public String toString() {
+ return getClass().getName() + "[top=" + top + ",left=" + left +
+ ",bottom=" + bottom + ",right=" + right + "]";
+ }
+
+ public Object clone() {
+ try {
+ return super.clone();
+ } catch (CloneNotSupportedException ex) {
+ throw new InternalError();
+ }
+ }
+
+}
diff --git a/src/newt/classes/com/jogamp/javafx/newt/KeyEvent.java b/src/newt/classes/com/jogamp/javafx/newt/KeyEvent.java
new file mode 100644
index 000000000..8ae92464c
--- /dev/null
+++ b/src/newt/classes/com/jogamp/javafx/newt/KeyEvent.java
@@ -0,0 +1,738 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.javafx.newt;
+
+public class KeyEvent extends InputEvent
+{
+ KeyEvent(boolean sysEvent, int eventType, Window source, long when, int modifiers, int keyCode, char keyChar) {
+ super(sysEvent, eventType, source, when, modifiers);
+ this.keyCode=keyCode;
+ this.keyChar=keyChar;
+ }
+ public KeyEvent(int eventType, Window source, long when, int modifiers, int keyCode, char keyChar) {
+ this(false, eventType, source, when, modifiers, keyCode, keyChar);
+ }
+
+ public char getKeyChar() {
+ return keyChar;
+ }
+ public int getKeyCode() {
+ return keyCode;
+ }
+
+ public String toString() {
+ return "KeyEvent["+getEventTypeString(getEventType())+
+ ", code "+keyCode+"("+toHexString(keyCode)+"), char <"+keyChar+"> ("+toHexString((int)keyChar)+"), isActionKey "+isActionKey()+", "+super.toString()+"]";
+ }
+
+ public static String getEventTypeString(int type) {
+ switch(type) {
+ case EVENT_KEY_PRESSED: return "EVENT_KEY_PRESSED";
+ case EVENT_KEY_RELEASED: return "EVENT_KEY_RELEASED";
+ case EVENT_KEY_TYPED: return "EVENT_KEY_TYPED";
+ default: return "unknown (" + type + ")";
+ }
+ }
+
+ public boolean isActionKey() {
+ switch (keyCode) {
+ case VK_HOME:
+ case VK_END:
+ case VK_PAGE_UP:
+ case VK_PAGE_DOWN:
+ case VK_UP:
+ case VK_DOWN:
+ case VK_LEFT:
+ case VK_RIGHT:
+
+ case VK_F1:
+ case VK_F2:
+ case VK_F3:
+ case VK_F4:
+ case VK_F5:
+ case VK_F6:
+ case VK_F7:
+ case VK_F8:
+ case VK_F9:
+ case VK_F10:
+ case VK_F11:
+ case VK_F12:
+ case VK_F13:
+ case VK_F14:
+ case VK_F15:
+ case VK_F16:
+ case VK_F17:
+ case VK_F18:
+ case VK_F19:
+ case VK_F20:
+ case VK_F21:
+ case VK_F22:
+ case VK_F23:
+ case VK_F24:
+ case VK_PRINTSCREEN:
+ case VK_CAPS_LOCK:
+ case VK_PAUSE:
+ case VK_INSERT:
+
+ case VK_HELP:
+ case VK_WINDOWS:
+ return true;
+ }
+ return false;
+ }
+
+ private int keyCode;
+ private char keyChar;
+
+ public static final int EVENT_KEY_PRESSED = 300;
+ public static final int EVENT_KEY_RELEASED= 301;
+ public static final int EVENT_KEY_TYPED = 302;
+
+ /* Virtual key codes. */
+
+ public static final int VK_ENTER = '\n';
+ public static final int VK_BACK_SPACE = '\b';
+ public static final int VK_TAB = '\t';
+ public static final int VK_CANCEL = 0x03;
+ public static final int VK_CLEAR = 0x0C;
+ public static final int VK_SHIFT = 0x10;
+ public static final int VK_CONTROL = 0x11;
+ public static final int VK_ALT = 0x12;
+ public static final int VK_PAUSE = 0x13;
+ public static final int VK_CAPS_LOCK = 0x14;
+ public static final int VK_ESCAPE = 0x1B;
+ public static final int VK_SPACE = 0x20;
+ public static final int VK_PAGE_UP = 0x21;
+ public static final int VK_PAGE_DOWN = 0x22;
+ public static final int VK_END = 0x23;
+ public static final int VK_HOME = 0x24;
+
+ /**
+ * Constant for the non-numpad left arrow key.
+ * @see #VK_KP_LEFT
+ */
+ public static final int VK_LEFT = 0x25;
+
+ /**
+ * Constant for the non-numpad up arrow key.
+ * @see #VK_KP_UP
+ */
+ public static final int VK_UP = 0x26;
+
+ /**
+ * Constant for the non-numpad right arrow key.
+ * @see #VK_KP_RIGHT
+ */
+ public static final int VK_RIGHT = 0x27;
+
+ /**
+ * Constant for the non-numpad down arrow key.
+ * @see #VK_KP_DOWN
+ */
+ public static final int VK_DOWN = 0x28;
+
+ /**
+ * Constant for the comma key, ","
+ */
+ public static final int VK_COMMA = 0x2C;
+
+ /**
+ * Constant for the minus key, "-"
+ * @since 1.2
+ */
+ public static final int VK_MINUS = 0x2D;
+
+ /**
+ * Constant for the period key, "."
+ */
+ public static final int VK_PERIOD = 0x2E;
+
+ /**
+ * Constant for the forward slash key, "/"
+ */
+ public static final int VK_SLASH = 0x2F;
+
+ /** VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39) */
+ public static final int VK_0 = 0x30;
+ public static final int VK_1 = 0x31;
+ public static final int VK_2 = 0x32;
+ public static final int VK_3 = 0x33;
+ public static final int VK_4 = 0x34;
+ public static final int VK_5 = 0x35;
+ public static final int VK_6 = 0x36;
+ public static final int VK_7 = 0x37;
+ public static final int VK_8 = 0x38;
+ public static final int VK_9 = 0x39;
+
+ /**
+ * Constant for the semicolon key, ";"
+ */
+ public static final int VK_SEMICOLON = 0x3B;
+
+ /**
+ * Constant for the equals key, "="
+ */
+ public static final int VK_EQUALS = 0x3D;
+
+ /** VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) */
+ public static final int VK_A = 0x41;
+ public static final int VK_B = 0x42;
+ public static final int VK_C = 0x43;
+ public static final int VK_D = 0x44;
+ public static final int VK_E = 0x45;
+ public static final int VK_F = 0x46;
+ public static final int VK_G = 0x47;
+ public static final int VK_H = 0x48;
+ public static final int VK_I = 0x49;
+ public static final int VK_J = 0x4A;
+ public static final int VK_K = 0x4B;
+ public static final int VK_L = 0x4C;
+ public static final int VK_M = 0x4D;
+ public static final int VK_N = 0x4E;
+ public static final int VK_O = 0x4F;
+ public static final int VK_P = 0x50;
+ public static final int VK_Q = 0x51;
+ public static final int VK_R = 0x52;
+ public static final int VK_S = 0x53;
+ public static final int VK_T = 0x54;
+ public static final int VK_U = 0x55;
+ public static final int VK_V = 0x56;
+ public static final int VK_W = 0x57;
+ public static final int VK_X = 0x58;
+ public static final int VK_Y = 0x59;
+ public static final int VK_Z = 0x5A;
+
+ /**
+ * Constant for the open bracket key, "["
+ */
+ public static final int VK_OPEN_BRACKET = 0x5B;
+
+ /**
+ * Constant for the back slash key, "\"
+ */
+ public static final int VK_BACK_SLASH = 0x5C;
+
+ /**
+ * Constant for the close bracket key, "]"
+ */
+ public static final int VK_CLOSE_BRACKET = 0x5D;
+
+ public static final int VK_NUMPAD0 = 0x60;
+ public static final int VK_NUMPAD1 = 0x61;
+ public static final int VK_NUMPAD2 = 0x62;
+ public static final int VK_NUMPAD3 = 0x63;
+ public static final int VK_NUMPAD4 = 0x64;
+ public static final int VK_NUMPAD5 = 0x65;
+ public static final int VK_NUMPAD6 = 0x66;
+ public static final int VK_NUMPAD7 = 0x67;
+ public static final int VK_NUMPAD8 = 0x68;
+ public static final int VK_NUMPAD9 = 0x69;
+ public static final int VK_MULTIPLY = 0x6A;
+ public static final int VK_ADD = 0x6B;
+
+ /**
+ * This constant is obsolete, and is included only for backwards
+ * compatibility.
+ * @see #VK_SEPARATOR
+ */
+ public static final int VK_SEPARATER = 0x6C;
+
+ /**
+ * Constant for the Numpad Separator key.
+ * @since 1.4
+ */
+ public static final int VK_SEPARATOR = VK_SEPARATER;
+
+ public static final int VK_SUBTRACT = 0x6D;
+ public static final int VK_DECIMAL = 0x6E;
+ public static final int VK_DIVIDE = 0x6F;
+ public static final int VK_DELETE = 0x7F; /* ASCII DEL */
+ public static final int VK_NUM_LOCK = 0x90;
+ public static final int VK_SCROLL_LOCK = 0x91;
+
+ /** Constant for the F1 function key. */
+ public static final int VK_F1 = 0x70;
+
+ /** Constant for the F2 function key. */
+ public static final int VK_F2 = 0x71;
+
+ /** Constant for the F3 function key. */
+ public static final int VK_F3 = 0x72;
+
+ /** Constant for the F4 function key. */
+ public static final int VK_F4 = 0x73;
+
+ /** Constant for the F5 function key. */
+ public static final int VK_F5 = 0x74;
+
+ /** Constant for the F6 function key. */
+ public static final int VK_F6 = 0x75;
+
+ /** Constant for the F7 function key. */
+ public static final int VK_F7 = 0x76;
+
+ /** Constant for the F8 function key. */
+ public static final int VK_F8 = 0x77;
+
+ /** Constant for the F9 function key. */
+ public static final int VK_F9 = 0x78;
+
+ /** Constant for the F10 function key. */
+ public static final int VK_F10 = 0x79;
+
+ /** Constant for the F11 function key. */
+ public static final int VK_F11 = 0x7A;
+
+ /** Constant for the F12 function key. */
+ public static final int VK_F12 = 0x7B;
+
+ /**
+ * Constant for the F13 function key.
+ * @since 1.2
+ */
+ /* F13 - F24 are used on IBM 3270 keyboard; use random range for constants. */
+ public static final int VK_F13 = 0xF000;
+
+ /**
+ * Constant for the F14 function key.
+ * @since 1.2
+ */
+ public static final int VK_F14 = 0xF001;
+
+ /**
+ * Constant for the F15 function key.
+ * @since 1.2
+ */
+ public static final int VK_F15 = 0xF002;
+
+ /**
+ * Constant for the F16 function key.
+ * @since 1.2
+ */
+ public static final int VK_F16 = 0xF003;
+
+ /**
+ * Constant for the F17 function key.
+ * @since 1.2
+ */
+ public static final int VK_F17 = 0xF004;
+
+ /**
+ * Constant for the F18 function key.
+ * @since 1.2
+ */
+ public static final int VK_F18 = 0xF005;
+
+ /**
+ * Constant for the F19 function key.
+ * @since 1.2
+ */
+ public static final int VK_F19 = 0xF006;
+
+ /**
+ * Constant for the F20 function key.
+ * @since 1.2
+ */
+ public static final int VK_F20 = 0xF007;
+
+ /**
+ * Constant for the F21 function key.
+ * @since 1.2
+ */
+ public static final int VK_F21 = 0xF008;
+
+ /**
+ * Constant for the F22 function key.
+ * @since 1.2
+ */
+ public static final int VK_F22 = 0xF009;
+
+ /**
+ * Constant for the F23 function key.
+ * @since 1.2
+ */
+ public static final int VK_F23 = 0xF00A;
+
+ /**
+ * Constant for the F24 function key.
+ * @since 1.2
+ */
+ public static final int VK_F24 = 0xF00B;
+
+ public static final int VK_PRINTSCREEN = 0x9A;
+ public static final int VK_INSERT = 0x9B;
+ public static final int VK_HELP = 0x9C;
+ public static final int VK_META = 0x9D;
+
+ public static final int VK_BACK_QUOTE = 0xC0;
+ public static final int VK_QUOTE = 0xDE;
+
+ /**
+ * Constant for the numeric keypad up arrow key.
+ * @see #VK_UP
+ * @since 1.2
+ */
+ public static final int VK_KP_UP = 0xE0;
+
+ /**
+ * Constant for the numeric keypad down arrow key.
+ * @see #VK_DOWN
+ * @since 1.2
+ */
+ public static final int VK_KP_DOWN = 0xE1;
+
+ /**
+ * Constant for the numeric keypad left arrow key.
+ * @see #VK_LEFT
+ * @since 1.2
+ */
+ public static final int VK_KP_LEFT = 0xE2;
+
+ /**
+ * Constant for the numeric keypad right arrow key.
+ * @see #VK_RIGHT
+ * @since 1.2
+ */
+ public static final int VK_KP_RIGHT = 0xE3;
+
+ /* For European keyboards */
+ /** @since 1.2 */
+ public static final int VK_DEAD_GRAVE = 0x80;
+ /** @since 1.2 */
+ public static final int VK_DEAD_ACUTE = 0x81;
+ /** @since 1.2 */
+ public static final int VK_DEAD_CIRCUMFLEX = 0x82;
+ /** @since 1.2 */
+ public static final int VK_DEAD_TILDE = 0x83;
+ /** @since 1.2 */
+ public static final int VK_DEAD_MACRON = 0x84;
+ /** @since 1.2 */
+ public static final int VK_DEAD_BREVE = 0x85;
+ /** @since 1.2 */
+ public static final int VK_DEAD_ABOVEDOT = 0x86;
+ /** @since 1.2 */
+ public static final int VK_DEAD_DIAERESIS = 0x87;
+ /** @since 1.2 */
+ public static final int VK_DEAD_ABOVERING = 0x88;
+ /** @since 1.2 */
+ public static final int VK_DEAD_DOUBLEACUTE = 0x89;
+ /** @since 1.2 */
+ public static final int VK_DEAD_CARON = 0x8a;
+ /** @since 1.2 */
+ public static final int VK_DEAD_CEDILLA = 0x8b;
+ /** @since 1.2 */
+ public static final int VK_DEAD_OGONEK = 0x8c;
+ /** @since 1.2 */
+ public static final int VK_DEAD_IOTA = 0x8d;
+ /** @since 1.2 */
+ public static final int VK_DEAD_VOICED_SOUND = 0x8e;
+ /** @since 1.2 */
+ public static final int VK_DEAD_SEMIVOICED_SOUND = 0x8f;
+
+ /** @since 1.2 */
+ public static final int VK_AMPERSAND = 0x96;
+ /** @since 1.2 */
+ public static final int VK_ASTERISK = 0x97;
+ /** @since 1.2 */
+ public static final int VK_QUOTEDBL = 0x98;
+ /** @since 1.2 */
+ public static final int VK_LESS = 0x99;
+
+ /** @since 1.2 */
+ public static final int VK_GREATER = 0xa0;
+ /** @since 1.2 */
+ public static final int VK_BRACELEFT = 0xa1;
+ /** @since 1.2 */
+ public static final int VK_BRACERIGHT = 0xa2;
+
+ /**
+ * Constant for the "@" key.
+ * @since 1.2
+ */
+ public static final int VK_AT = 0x0200;
+
+ /**
+ * Constant for the ":" key.
+ * @since 1.2
+ */
+ public static final int VK_COLON = 0x0201;
+
+ /**
+ * Constant for the "^" key.
+ * @since 1.2
+ */
+ public static final int VK_CIRCUMFLEX = 0x0202;
+
+ /**
+ * Constant for the "$" key.
+ * @since 1.2
+ */
+ public static final int VK_DOLLAR = 0x0203;
+
+ /**
+ * Constant for the Euro currency sign key.
+ * @since 1.2
+ */
+ public static final int VK_EURO_SIGN = 0x0204;
+
+ /**
+ * Constant for the "!" key.
+ * @since 1.2
+ */
+ public static final int VK_EXCLAMATION_MARK = 0x0205;
+
+ /**
+ * Constant for the inverted exclamation mark key.
+ * @since 1.2
+ */
+ public static final int VK_INVERTED_EXCLAMATION_MARK = 0x0206;
+
+ /**
+ * Constant for the "(" key.
+ * @since 1.2
+ */
+ public static final int VK_LEFT_PARENTHESIS = 0x0207;
+
+ /**
+ * Constant for the "#" key.
+ * @since 1.2
+ */
+ public static final int VK_NUMBER_SIGN = 0x0208;
+
+ /**
+ * Constant for the "+" key.
+ * @since 1.2
+ */
+ public static final int VK_PLUS = 0x0209;
+
+ /**
+ * Constant for the ")" key.
+ * @since 1.2
+ */
+ public static final int VK_RIGHT_PARENTHESIS = 0x020A;
+
+ /**
+ * Constant for the "_" key.
+ * @since 1.2
+ */
+ public static final int VK_UNDERSCORE = 0x020B;
+
+ /**
+ * Constant for the Microsoft Windows "Windows" key.
+ * It is used for both the left and right version of the key.
+ * @see #getKeyLocation()
+ * @since 1.5
+ */
+ public static final int VK_WINDOWS = 0x020C;
+
+ /**
+ * Constant for the Microsoft Windows Context Menu key.
+ * @since 1.5
+ */
+ public static final int VK_CONTEXT_MENU = 0x020D;
+
+ /* for input method support on Asian Keyboards */
+
+ /* not clear what this means - listed in Microsoft Windows API */
+ public static final int VK_FINAL = 0x0018;
+
+ /** Constant for the Convert function key. */
+ /* Japanese PC 106 keyboard, Japanese Solaris keyboard: henkan */
+ public static final int VK_CONVERT = 0x001C;
+
+ /** Constant for the Don't Convert function key. */
+ /* Japanese PC 106 keyboard: muhenkan */
+ public static final int VK_NONCONVERT = 0x001D;
+
+ /** Constant for the Accept or Commit function key. */
+ /* Japanese Solaris keyboard: kakutei */
+ public static final int VK_ACCEPT = 0x001E;
+
+ /* not clear what this means - listed in Microsoft Windows API */
+ public static final int VK_MODECHANGE = 0x001F;
+
+ /* replaced by VK_KANA_LOCK for Microsoft Windows and Solaris;
+ might still be used on other platforms */
+ public static final int VK_KANA = 0x0015;
+
+ /* replaced by VK_INPUT_METHOD_ON_OFF for Microsoft Windows and Solaris;
+ might still be used for other platforms */
+ public static final int VK_KANJI = 0x0019;
+
+ /**
+ * Constant for the Alphanumeric function key.
+ * @since 1.2
+ */
+ /* Japanese PC 106 keyboard: eisuu */
+ public static final int VK_ALPHANUMERIC = 0x00F0;
+
+ /**
+ * Constant for the Katakana function key.
+ * @since 1.2
+ */
+ /* Japanese PC 106 keyboard: katakana */
+ public static final int VK_KATAKANA = 0x00F1;
+
+ /**
+ * Constant for the Hiragana function key.
+ * @since 1.2
+ */
+ /* Japanese PC 106 keyboard: hiragana */
+ public static final int VK_HIRAGANA = 0x00F2;
+
+ /**
+ * Constant for the Full-Width Characters function key.
+ * @since 1.2
+ */
+ /* Japanese PC 106 keyboard: zenkaku */
+ public static final int VK_FULL_WIDTH = 0x00F3;
+
+ /**
+ * Constant for the Half-Width Characters function key.
+ * @since 1.2
+ */
+ /* Japanese PC 106 keyboard: hankaku */
+ public static final int VK_HALF_WIDTH = 0x00F4;
+
+ /**
+ * Constant for the Roman Characters function key.
+ * @since 1.2
+ */
+ /* Japanese PC 106 keyboard: roumaji */
+ public static final int VK_ROMAN_CHARACTERS = 0x00F5;
+
+ /**
+ * Constant for the All Candidates function key.
+ * @since 1.2
+ */
+ /* Japanese PC 106 keyboard - VK_CONVERT + ALT: zenkouho */
+ public static final int VK_ALL_CANDIDATES = 0x0100;
+
+ /**
+ * Constant for the Previous Candidate function key.
+ * @since 1.2
+ */
+ /* Japanese PC 106 keyboard - VK_CONVERT + SHIFT: maekouho */
+ public static final int VK_PREVIOUS_CANDIDATE = 0x0101;
+
+ /**
+ * Constant for the Code Input function key.
+ * @since 1.2
+ */
+ /* Japanese PC 106 keyboard - VK_ALPHANUMERIC + ALT: kanji bangou */
+ public static final int VK_CODE_INPUT = 0x0102;
+
+ /**
+ * Constant for the Japanese-Katakana function key.
+ * This key switches to a Japanese input method and selects its Katakana input mode.
+ * @since 1.2
+ */
+ /* Japanese Macintosh keyboard - VK_JAPANESE_HIRAGANA + SHIFT */
+ public static final int VK_JAPANESE_KATAKANA = 0x0103;
+
+ /**
+ * Constant for the Japanese-Hiragana function key.
+ * This key switches to a Japanese input method and selects its Hiragana input mode.
+ * @since 1.2
+ */
+ /* Japanese Macintosh keyboard */
+ public static final int VK_JAPANESE_HIRAGANA = 0x0104;
+
+ /**
+ * Constant for the Japanese-Roman function key.
+ * This key switches to a Japanese input method and selects its Roman-Direct input mode.
+ * @since 1.2
+ */
+ /* Japanese Macintosh keyboard */
+ public static final int VK_JAPANESE_ROMAN = 0x0105;
+
+ /**
+ * Constant for the locking Kana function key.
+ * This key locks the keyboard into a Kana layout.
+ * @since 1.3
+ */
+ /* Japanese PC 106 keyboard with special Windows driver - eisuu + Control; Japanese Solaris keyboard: kana */
+ public static final int VK_KANA_LOCK = 0x0106;
+
+ /**
+ * Constant for the input method on/off key.
+ * @since 1.3
+ */
+ /* Japanese PC 106 keyboard: kanji. Japanese Solaris keyboard: nihongo */
+ public static final int VK_INPUT_METHOD_ON_OFF = 0x0107;
+
+ /* for Sun keyboards */
+ /** @since 1.2 */
+ public static final int VK_CUT = 0xFFD1;
+ /** @since 1.2 */
+ public static final int VK_COPY = 0xFFCD;
+ /** @since 1.2 */
+ public static final int VK_PASTE = 0xFFCF;
+ /** @since 1.2 */
+ public static final int VK_UNDO = 0xFFCB;
+ /** @since 1.2 */
+ public static final int VK_AGAIN = 0xFFC9;
+ /** @since 1.2 */
+ public static final int VK_FIND = 0xFFD0;
+ /** @since 1.2 */
+ public static final int VK_PROPS = 0xFFCA;
+ /** @since 1.2 */
+ public static final int VK_STOP = 0xFFC8;
+
+ /**
+ * Constant for the Compose function key.
+ * @since 1.2
+ */
+ public static final int VK_COMPOSE = 0xFF20;
+
+ /**
+ * Constant for the AltGraph function key.
+ * @since 1.2
+ */
+ public static final int VK_ALT_GRAPH = 0xFF7E;
+
+ /**
+ * Constant for the Begin key.
+ * @since 1.5
+ */
+ public static final int VK_BEGIN = 0xFF58;
+
+ /**
+ * This value is used to indicate that the keyCode is unknown.
+ * KEY_TYPED events do not have a keyCode value; this value
+ * is used instead.
+ */
+ public static final int VK_UNDEFINED = 0x0;
+}
+
diff --git a/src/newt/classes/com/jogamp/javafx/newt/KeyListener.java b/src/newt/classes/com/jogamp/javafx/newt/KeyListener.java
new file mode 100644
index 000000000..7921a0a97
--- /dev/null
+++ b/src/newt/classes/com/jogamp/javafx/newt/KeyListener.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.javafx.newt;
+
+public interface KeyListener extends EventListener
+{
+ public void keyPressed(KeyEvent e);
+ public void keyReleased(KeyEvent e);
+ public void keyTyped(KeyEvent e) ;
+}
+
diff --git a/src/newt/classes/com/jogamp/javafx/newt/MouseEvent.java b/src/newt/classes/com/jogamp/javafx/newt/MouseEvent.java
new file mode 100644
index 000000000..82989e216
--- /dev/null
+++ b/src/newt/classes/com/jogamp/javafx/newt/MouseEvent.java
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.javafx.newt;
+
+public class MouseEvent extends InputEvent
+{
+ public static final int BUTTON1 = 1;
+ public static final int BUTTON2 = 2;
+ public static final int BUTTON3 = 3;
+ public static final int BUTTON4 = 4;
+ public static final int BUTTON5 = 5;
+ public static final int BUTTON6 = 6;
+ public static final int BUTTON_NUMBER = 6;
+
+ protected MouseEvent(boolean sysEvent, int eventType, Window source, long when,
+ int modifiers, int x, int y, int clickCount, int button,
+ int rotation)
+ {
+ super(sysEvent, eventType, source, when, modifiers);
+ this.x=x;
+ this.y=y;
+ this.clickCount=clickCount;
+ this.button=button;
+ this.wheelRotation = rotation;
+ }
+ public MouseEvent(int eventType, Window source, long when, int modifiers,
+ int x, int y, int clickCount, int button, int rotation) {
+ this(false, eventType, source, when, modifiers, x, y, clickCount, button,
+ rotation);
+ }
+
+ public int getButton() {
+ return button;
+ }
+ public int getClickCount() {
+ return clickCount;
+ }
+ public int getX() {
+ return x;
+ }
+ public int getY() {
+ return y;
+ }
+ public int getWheelRotation() {
+ return wheelRotation;
+ }
+
+ public String toString() {
+ return "MouseEvent["+getEventTypeString(getEventType())+
+ ", "+x+"/"+y+", button "+button+", count "+clickCount+
+ ", wheel rotation "+wheelRotation+
+ ", "+super.toString()+"]";
+ }
+
+ public static String getEventTypeString(int type) {
+ switch(type) {
+ case EVENT_MOUSE_CLICKED: return "EVENT_MOUSE_CLICKED";
+ case EVENT_MOUSE_ENTERED: return "EVENT_MOUSE_ENTERED";
+ case EVENT_MOUSE_EXITED: return "EVENT_MOUSE_EXITED";
+ case EVENT_MOUSE_PRESSED: return "EVENT_MOUSE_PRESSED";
+ case EVENT_MOUSE_RELEASED: return "EVENT_MOUSE_RELEASED";
+ case EVENT_MOUSE_MOVED: return "EVENT_MOUSE_MOVED";
+ case EVENT_MOUSE_DRAGGED: return "EVENT_MOUSE_DRAGGED";
+ case EVENT_MOUSE_WHEEL_MOVED: return "EVENT_MOUSE_WHEEL_MOVED";
+ default: return "unknown (" + type + ")";
+ }
+ }
+
+ private int x, y, clickCount, button, wheelRotation;
+
+ public static final int EVENT_MOUSE_CLICKED = 200;
+ public static final int EVENT_MOUSE_ENTERED = 201;
+ public static final int EVENT_MOUSE_EXITED = 202;
+ public static final int EVENT_MOUSE_PRESSED = 203;
+ public static final int EVENT_MOUSE_RELEASED = 204;
+ public static final int EVENT_MOUSE_MOVED = 205;
+ public static final int EVENT_MOUSE_DRAGGED = 206;
+ public static final int EVENT_MOUSE_WHEEL_MOVED = 207;
+}
diff --git a/src/newt/classes/com/jogamp/javafx/newt/MouseListener.java b/src/newt/classes/com/jogamp/javafx/newt/MouseListener.java
new file mode 100644
index 000000000..a0d42f738
--- /dev/null
+++ b/src/newt/classes/com/jogamp/javafx/newt/MouseListener.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.javafx.newt;
+
+public interface MouseListener extends EventListener
+{
+ public void mouseClicked(MouseEvent e);
+ public void mouseEntered(MouseEvent e);
+ public void mouseExited(MouseEvent e);
+ public void mousePressed(MouseEvent e);
+ public void mouseReleased(MouseEvent e);
+ public void mouseMoved(MouseEvent e);
+ public void mouseDragged(MouseEvent e);
+ public void mouseWheelMoved(MouseEvent e);
+}
+
diff --git a/src/newt/classes/com/jogamp/javafx/newt/NewtFactory.java b/src/newt/classes/com/jogamp/javafx/newt/NewtFactory.java
new file mode 100755
index 000000000..aae51aaf6
--- /dev/null
+++ b/src/newt/classes/com/jogamp/javafx/newt/NewtFactory.java
@@ -0,0 +1,181 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.javafx.newt;
+
+import javax.media.nativewindow.*;
+import java.util.ArrayList;
+import java.util.Iterator;
+import com.jogamp.nativewindow.impl.jvm.JVMUtil;
+
+public abstract class NewtFactory {
+ // Work-around for initialization order problems on Mac OS X
+ // between native Newt and (apparently) Fmod
+ static {
+ JVMUtil.initSingleton();
+ Window.init(NativeWindowFactory.getNativeWindowType(true));
+ }
+
+ static Class getCustomClass(String packageName, String classBaseName) {
+ Class clazz = null;
+ if(packageName!=null || classBaseName!=null) {
+ String clazzName = packageName + "." + classBaseName ;
+ try {
+ clazz = Class.forName(clazzName);
+ } catch (Throwable t) {}
+ }
+ return clazz;
+ }
+
+ private static boolean useEDT = true;
+
+ /**
+ * Toggles the usage of an EventDispatchThread while creating a Display.
+ * Currently only valid is
+ * This implementation does not make the OpenGL context current
+ */
+public class GLWindow extends Window implements GLAutoDrawable {
+ private static List/*GLWindow*/ glwindows = new ArrayList();
+
+ private boolean ownerOfWinScrDpy;
+ private Window window;
+ private boolean runPumpMessages;
+
+ /** Constructor. Do not call this directly -- use {@link
+ create()} instead. */
+ protected GLWindow(Window window, boolean ownerOfWinScrDpy) {
+ this.ownerOfWinScrDpy = ownerOfWinScrDpy;
+ this.window = window;
+ this.window.setAutoDrawableClient(true);
+ this.runPumpMessages = ( null == getScreen().getDisplay().getEDT() ) ;
+ window.addWindowListener(new WindowListener() {
+ public void windowResized(WindowEvent e) {
+ sendReshape = true;
+ }
+
+ public void windowMoved(WindowEvent e) {
+ }
+
+ public void windowGainedFocus(WindowEvent e) {
+ }
+
+ public void windowLostFocus(WindowEvent e) {
+ }
+
+ public void windowDestroyNotify(WindowEvent e) {
+ sendDestroy = true;
+ }
+ });
+
+ List newglw = (List) ((ArrayList) glwindows).clone();
+ newglw.add(this);
+ glwindows=newglw;
+ }
+
+ /** Creates a new GLWindow on the local display, screen 0, with a
+ dummy visual ID, and with the default GLCapabilities. */
+ public static GLWindow create() {
+ return create(null, null, false);
+ }
+
+ public static GLWindow create(boolean undecorated) {
+ return create(null, null, undecorated);
+ }
+
+ /** Creates a new GLWindow referring to the given window. */
+ public static GLWindow create(Window window) {
+ return create(window, null, false);
+ }
+ public static GLWindow create(GLCapabilities caps) {
+ return create(null, caps, false);
+ }
+
+ /** Creates a new GLWindow on the local display, screen 0, with a
+ dummy visual ID, and with the given GLCapabilities. */
+ public static GLWindow create(GLCapabilities caps, boolean undecorated) {
+ return create(null, caps, undecorated);
+ }
+
+ /** Either or: window (prio), or caps and undecorated (2nd choice) */
+ private static GLWindow create(Window window,
+ GLCapabilities caps,
+ boolean undecorated) {
+ Display display;
+ boolean ownerOfWinScrDpy=false;
+ if (window == null) {
+ if (caps == null) {
+ caps = new GLCapabilities(null); // default ..
+ }
+ ownerOfWinScrDpy = true;
+ display = NewtFactory.createDisplay(null); // local display
+ Screen screen = NewtFactory.createScreen(display, 0); // screen 0
+ window = NewtFactory.createWindow(screen, caps, undecorated);
+ }
+
+ return new GLWindow(window, ownerOfWinScrDpy);
+ }
+
+ /**
+ * EXPERIMENTAL
+ *
+ * The idea was that in a single threaded environment with one {@link Display} and many {@link Window}'s,
+ * a performance benefit was expected while disabling the implicit {@link Display#pumpMessages} and
+ * do it once via {@link GLWindow#runCurrentThreadPumpMessage()}
+ *
+ * Best performance has been achieved with one GLWindow per thread.
+ *
+ * This class provides a startup singleton main thread,
+ * from which a new thread with the users main class is launched.
+ *
+ * If your platform is not Mac OS X, but you want to test your code without modifying
+ * this class, you have to set the system property
+ *
+ * The code is compatible with all other platform, which support multithreaded windowing handling.
+ * Since those platforms won't trigger the main thread serialization, the main method
+ * will be simply executed, in case you haven't set
+ *
+ * Test case on Mac OS X (or any other platform):
+
- * Currently only valid is
- * This implementation does not make the OpenGL context current
- */
-public class GLWindow extends Window implements GLAutoDrawable {
- private static List/*GLWindow*/ glwindows = new ArrayList();
-
- private boolean ownerOfWinScrDpy;
- private Window window;
- private boolean runPumpMessages;
-
- /** Constructor. Do not call this directly -- use {@link
- create()} instead. */
- protected GLWindow(Window window, boolean ownerOfWinScrDpy) {
- this.ownerOfWinScrDpy = ownerOfWinScrDpy;
- this.window = window;
- this.window.setAutoDrawableClient(true);
- this.runPumpMessages = ( null == getScreen().getDisplay().getEDT() ) ;
- window.addWindowListener(new WindowListener() {
- public void windowResized(WindowEvent e) {
- sendReshape = true;
- }
-
- public void windowMoved(WindowEvent e) {
- }
-
- public void windowGainedFocus(WindowEvent e) {
- }
-
- public void windowLostFocus(WindowEvent e) {
- }
-
- public void windowDestroyNotify(WindowEvent e) {
- sendDestroy = true;
- }
- });
-
- List newglw = (List) ((ArrayList) glwindows).clone();
- newglw.add(this);
- glwindows=newglw;
- }
-
- /** Creates a new GLWindow on the local display, screen 0, with a
- dummy visual ID, and with the default GLCapabilities. */
- public static GLWindow create() {
- return create(null, null, false);
- }
-
- public static GLWindow create(boolean undecorated) {
- return create(null, null, undecorated);
- }
-
- /** Creates a new GLWindow referring to the given window. */
- public static GLWindow create(Window window) {
- return create(window, null, false);
- }
- public static GLWindow create(GLCapabilities caps) {
- return create(null, caps, false);
- }
-
- /** Creates a new GLWindow on the local display, screen 0, with a
- dummy visual ID, and with the given GLCapabilities. */
- public static GLWindow create(GLCapabilities caps, boolean undecorated) {
- return create(null, caps, undecorated);
- }
-
- /** Either or: window (prio), or caps and undecorated (2nd choice) */
- private static GLWindow create(Window window,
- GLCapabilities caps,
- boolean undecorated) {
- Display display;
- boolean ownerOfWinScrDpy=false;
- if (window == null) {
- if (caps == null) {
- caps = new GLCapabilities(null); // default ..
- }
- ownerOfWinScrDpy = true;
- display = NewtFactory.createDisplay(null); // local display
- Screen screen = NewtFactory.createScreen(display, 0); // screen 0
- window = NewtFactory.createWindow(screen, caps, undecorated);
- }
-
- return new GLWindow(window, ownerOfWinScrDpy);
- }
-
- /**
- * EXPERIMENTAL
- *
- * The idea was that in a single threaded environment with one {@link Display} and many {@link Window}'s,
- * a performance benefit was expected while disabling the implicit {@link Display#pumpMessages} and
- * do it once via {@link GLWindow#runCurrentThreadPumpMessage()}
- *
- * Best performance has been achieved with one GLWindow per thread.
- *
- * This class provides a startup singleton main thread,
- * from which a new thread with the users main class is launched.
- *
- * If your platform is not Mac OS X, but you want to test your code without modifying
- * this class, you have to set the system property
- *
- * The code is compatible with all other platform, which support multithreaded windowing handling.
- * Since those platforms won't trigger the main thread serialization, the main method
- * will be simply executed, in case you haven't set
- *
- * Test case on Mac OS X (or any other platform):
-
- * Currently only valid is
- * This implementation does not make the OpenGL context current
- */
-public class GLWindow extends Window implements GLAutoDrawable {
- private static List/*GLWindow*/ glwindows = new ArrayList();
-
- private boolean ownerOfWinScrDpy;
- private Window window;
- private boolean runPumpMessages;
-
- /** Constructor. Do not call this directly -- use {@link
- create()} instead. */
- protected GLWindow(Window window, boolean ownerOfWinScrDpy) {
- this.ownerOfWinScrDpy = ownerOfWinScrDpy;
- this.window = window;
- this.window.setAutoDrawableClient(true);
- this.runPumpMessages = ( null == getScreen().getDisplay().getEDT() ) ;
- window.addWindowListener(new WindowListener() {
- public void windowResized(WindowEvent e) {
- sendReshape = true;
- }
-
- public void windowMoved(WindowEvent e) {
- }
-
- public void windowGainedFocus(WindowEvent e) {
- }
-
- public void windowLostFocus(WindowEvent e) {
- }
-
- public void windowDestroyNotify(WindowEvent e) {
- sendDestroy = true;
- }
- });
-
- List newglw = (List) ((ArrayList) glwindows).clone();
- newglw.add(this);
- glwindows=newglw;
- }
-
- /** Creates a new GLWindow on the local display, screen 0, with a
- dummy visual ID, and with the default GLCapabilities. */
- public static GLWindow create() {
- return create(null, null, false);
- }
-
- public static GLWindow create(boolean undecorated) {
- return create(null, null, undecorated);
- }
-
- /** Creates a new GLWindow referring to the given window. */
- public static GLWindow create(Window window) {
- return create(window, null, false);
- }
- public static GLWindow create(GLCapabilities caps) {
- return create(null, caps, false);
- }
-
- /** Creates a new GLWindow on the local display, screen 0, with a
- dummy visual ID, and with the given GLCapabilities. */
- public static GLWindow create(GLCapabilities caps, boolean undecorated) {
- return create(null, caps, undecorated);
- }
-
- /** Either or: window (prio), or caps and undecorated (2nd choice) */
- private static GLWindow create(Window window,
- GLCapabilities caps,
- boolean undecorated) {
- Display display;
- boolean ownerOfWinScrDpy=false;
- if (window == null) {
- if (caps == null) {
- caps = new GLCapabilities(null); // default ..
- }
- ownerOfWinScrDpy = true;
- display = NewtFactory.createDisplay(null); // local display
- Screen screen = NewtFactory.createScreen(display, 0); // screen 0
- window = NewtFactory.createWindow(screen, caps, undecorated);
- }
-
- return new GLWindow(window, ownerOfWinScrDpy);
- }
-
- /**
- * EXPERIMENTAL
- *
- * The idea was that in a single threaded environment with one {@link Display} and many {@link Window}'s,
- * a performance benefit was expected while disabling the implicit {@link Display#pumpMessages} and
- * do it once via {@link GLWindow#runCurrentThreadPumpMessage()}
- *
- * Best performance has been achieved with one GLWindow per thread.
- *
- * This class provides a startup singleton main thread,
- * from which a new thread with the users main class is launched.
- *
- * If your platform is not Mac OS X, but you want to test your code without modifying
- * this class, you have to set the system property
- *
- * The code is compatible with all other platform, which support multithreaded windowing handling.
- * Since those platforms won't trigger the main thread serialization, the main method
- * will be simply executed, in case you haven't set
- *
- * Test case on Mac OS X (or any other platform):
-
+ * Currently only valid is
+ * This implementation does not make the OpenGL context current
+ */
+public class GLWindow extends Window implements GLAutoDrawable {
+ private static List/*GLWindow*/ glwindows = new ArrayList();
+
+ private boolean ownerOfWinScrDpy;
+ private Window window;
+ private boolean runPumpMessages;
+
+ /** Constructor. Do not call this directly -- use {@link
+ create()} instead. */
+ protected GLWindow(Window window, boolean ownerOfWinScrDpy) {
+ this.ownerOfWinScrDpy = ownerOfWinScrDpy;
+ this.window = window;
+ this.window.setAutoDrawableClient(true);
+ this.runPumpMessages = ( null == getScreen().getDisplay().getEDT() ) ;
+ window.addWindowListener(new WindowListener() {
+ public void windowResized(WindowEvent e) {
+ sendReshape = true;
+ }
+
+ public void windowMoved(WindowEvent e) {
+ }
+
+ public void windowGainedFocus(WindowEvent e) {
+ }
+
+ public void windowLostFocus(WindowEvent e) {
+ }
+
+ public void windowDestroyNotify(WindowEvent e) {
+ sendDestroy = true;
+ }
+ });
+
+ List newglw = (List) ((ArrayList) glwindows).clone();
+ newglw.add(this);
+ glwindows=newglw;
+ }
+
+ /** Creates a new GLWindow on the local display, screen 0, with a
+ dummy visual ID, and with the default GLCapabilities. */
+ public static GLWindow create() {
+ return create(null, null, false);
+ }
+
+ public static GLWindow create(boolean undecorated) {
+ return create(null, null, undecorated);
+ }
+
+ /** Creates a new GLWindow referring to the given window. */
+ public static GLWindow create(Window window) {
+ return create(window, null, false);
+ }
+ public static GLWindow create(GLCapabilities caps) {
+ return create(null, caps, false);
+ }
+
+ /** Creates a new GLWindow on the local display, screen 0, with a
+ dummy visual ID, and with the given GLCapabilities. */
+ public static GLWindow create(GLCapabilities caps, boolean undecorated) {
+ return create(null, caps, undecorated);
+ }
+
+ /** Either or: window (prio), or caps and undecorated (2nd choice) */
+ private static GLWindow create(Window window,
+ GLCapabilities caps,
+ boolean undecorated) {
+ Display display;
+ boolean ownerOfWinScrDpy=false;
+ if (window == null) {
+ if (caps == null) {
+ caps = new GLCapabilities(null); // default ..
+ }
+ ownerOfWinScrDpy = true;
+ display = NewtFactory.createDisplay(null); // local display
+ Screen screen = NewtFactory.createScreen(display, 0); // screen 0
+ window = NewtFactory.createWindow(screen, caps, undecorated);
+ }
+
+ return new GLWindow(window, ownerOfWinScrDpy);
+ }
+
+ /**
+ * EXPERIMENTAL
+ *
+ * The idea was that in a single threaded environment with one {@link Display} and many {@link Window}'s,
+ * a performance benefit was expected while disabling the implicit {@link Display#pumpMessages} and
+ * do it once via {@link GLWindow#runCurrentThreadPumpMessage()}
+ *
+ * Best performance has been achieved with one GLWindow per thread.
+ *
+ * This class provides a startup singleton main thread,
+ * from which a new thread with the users main class is launched.
+ *
+ * If your platform is not Mac OS X, but you want to test your code without modifying
+ * this class, you have to set the system property
+ *
+ * The code is compatible with all other platform, which support multithreaded windowing handling.
+ * Since those platforms won't trigger the main thread serialization, the main method
+ * will be simply executed, in case you haven't set
+ *
+ * Test case on Mac OS X (or any other platform):
+
+ * results into Targa-format files. Used by the {@link com.jogamp.opengl.util.awt.Screenshot}
+ * class; can also be used in conjunction with the {@link com.jogamp.opengl.util.gl2.TileRenderer} class.
*/
-
public class TGAWriter {
+
private static final int TARGA_HEADER_SIZE = 18;
private FileChannel ch;
diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderProgram.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderProgram.java
index 49a341cc6..430ed08ce 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderProgram.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderProgram.java
@@ -5,7 +5,6 @@ import javax.media.opengl.*;
import java.util.HashMap;
import java.util.Iterator;
-import java.nio.*;
import java.io.PrintStream;
public class ShaderProgram {
@@ -104,16 +103,20 @@ public class ShaderProgram {
* Refetches all previously bin/get attribute names
* and resets all attribute data as well
*
- * @see getAttribLocation
* @param gl
* @param oldShaderID the to be replace Shader
* @param newShader the new ShaderCode
* @param verboseOut the optional verbose outputstream
* @throws GLException is the program is not linked
*
- * @see #glRefetchAttribLocations
- * @see #glResetAllVertexAttributes
- * @see #glReplaceShader
+ * @see ShaderState#glEnableVertexAttribArray
+ * @see ShaderState#glDisableVertexAttribArray
+ * @see ShaderState#glVertexAttribPointer
+ * @see ShaderState#getVertexAttribPointer
+ * @see ShaderState#glReleaseAllVertexAttributes
+ * @see ShaderState#glResetAllVertexAttributes
+ * @see ShaderState#glResetAllVertexAttributes
+ * @see ShaderState#glResetAllVertexAttributes
*/
public synchronized boolean glReplaceShader(GL2ES2 gl, int oldShaderID, ShaderCode newShader, PrintStream verboseOut) {
if(!programLinked) throw new GLException("Program is not linked");
diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderState.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderState.java
index 33f6e210b..86f9251b7 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderState.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderState.java
@@ -2,14 +2,11 @@
package com.jogamp.opengl.util.glsl;
import javax.media.opengl.*;
-import com.jogamp.opengl.util.*;
import com.jogamp.opengl.impl.Debug;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
-import java.nio.*;
-import java.io.PrintStream;
import java.security.*;
public class ShaderState {
@@ -25,8 +22,8 @@ public class ShaderState {
/**
* Fetches the current shader state from the thread local storage (TLS)
*
- * @see javax.media.opengl.glsl.ShaderState#glUseProgram(GL2ES2, boolean)
- * @see javax.media.opengl.glsl.ShaderState#getCurrent()
+ * @see com.jogamp.opengl.util.glsl.ShaderState#glUseProgram(GL2ES2, boolean)
+ * @see com.jogamp.opengl.util.glsl.ShaderState#getCurrent()
*/
public static synchronized ShaderState getCurrent() {
GLContext current = GLContext.getCurrent();
@@ -41,8 +38,8 @@ public class ShaderState {
* Puts this ShaderState to to the thread local storage (TLS),
* if
*
* Not all values for GL state can be copied. For example, pixel
* pack and unpack state, render mode state, and select and feedback
* state are not copied. The state that can be copied is exactly the
* state that is manipulated by the GL command {@link
- * GL#glPushAttrib glPushAttrib}.
+ * GL2#glPushAttrib glPushAttrib}.
*
* On most platforms, this context may not be current to any thread,
* including the calling thread, when this method is called. Some
@@ -165,7 +165,7 @@ public abstract class GLContext {
* If no context is current, throw an GLException
*
* @return the current context's GL object on this thread
- * @thows GLException if no context is current
+ * @throws GLException if no context is current
*/
public static GL getCurrentGL() throws GLException {
GLContext glc = getCurrent();
diff --git a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
index 58a0fabbc..d61ceb1f4 100644
--- a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
+++ b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
@@ -186,10 +186,10 @@ public abstract class GLDrawableFactory {
* The native platform's chosen Capabilties are referenced within the target
* NativeWindow's AbstractGraphicsConfiguration.
*
- * In case {@link javax.media.nativewindow.Capabilties#isOnscreen()} is true,
- * In case {@link javax.media.nativewindow.Capabilties#isOnscreen()} is false,
diff --git a/src/jogl/classes/javax/media/opengl/GLUniformData.java b/src/jogl/classes/javax/media/opengl/GLUniformData.java
index f628ce35a..9b0d5f151 100644
--- a/src/jogl/classes/javax/media/opengl/GLUniformData.java
+++ b/src/jogl/classes/javax/media/opengl/GLUniformData.java
@@ -10,7 +10,6 @@ public class GLUniformData {
*
* Number of objects is 1
*
- * @param components number of elements of one object, ie 4 for GL_FLOAT_VEC4,
*/
public GLUniformData(String name, int val) {
init(name, 1, new Integer(val));
@@ -21,7 +20,6 @@ public class GLUniformData {
*
* Number of objects is 1
*
- * @param components number of elements of one object, ie 4 for GL_FLOAT_VEC4,
*/
public GLUniformData(String name, float val) {
init(name, 1, new Float(val));
diff --git a/src/jogl/classes/javax/media/opengl/fixedfunc/GLMatrixFunc.java b/src/jogl/classes/javax/media/opengl/fixedfunc/GLMatrixFunc.java
index 61757abde..b899f3c0a 100644
--- a/src/jogl/classes/javax/media/opengl/fixedfunc/GLMatrixFunc.java
+++ b/src/jogl/classes/javax/media/opengl/fixedfunc/GLMatrixFunc.java
@@ -6,8 +6,6 @@ package javax.media.opengl.fixedfunc;
import java.nio.*;
-import javax.media.opengl.*;
-
public interface GLMatrixFunc {
public static final int GL_MATRIX_MODE = 0x0BA0;
@@ -56,7 +54,7 @@ public interface GLMatrixFunc {
/**
* glMultMatrixf
- * @param params the FloatBuffer's position remains unchanged,
+ * @param m the FloatBuffer's position remains unchanged,
* which is the same behavior than the native JOGL GL impl
*/
public void glMultMatrixf(java.nio.FloatBuffer m) ;
diff --git a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
index 800e38105..29a392f04 100644
--- a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
+++ b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
@@ -58,8 +58,9 @@ public class GLWindow extends Window implements GLAutoDrawable {
private Window window;
private boolean runPumpMessages;
- /** Constructor. Do not call this directly -- use {@link
- create()} instead. */
+ /**
+ * Constructor. Do not call this directly -- use {@link #create()} instead.
+ */
protected GLWindow(Window window, boolean ownerOfWinScrDpy) {
this.ownerOfWinScrDpy = ownerOfWinScrDpy;
this.window = window;
--
cgit v1.2.3
From f250183bc3d8eb4ef87cecb3311eae554dcafe53 Mon Sep 17 00:00:00 2001
From: Michael Bien
+ *
+ * This version is equal to Brian Paul's version 1.2 1999/10/21
+ */
+
+public class Gears implements GLEventListener /* , MouseListener, MouseMotionListener */ {
+ private float view_rotx = 20.0f, view_roty = 30.0f, view_rotz = 0.0f;
+ private int gear1, gear2, gear3;
+ private float angle = 0.0f;
+
+ private int prevMouseX, prevMouseY;
+ private boolean mouseRButtonDown = false;
+
+ public void init(GLAutoDrawable drawable) {
+ // Use debug pipeline
+ // drawable.setGL(new DebugGL(drawable.getGL()));
+
+ GL2 gl = drawable.getGL().getGL2();
+
+ System.err.println("INIT GL IS: " + gl.getClass().getName());
+
+ System.err.println("Chosen GLCapabilities: " + drawable.getChosenGLCapabilities());
+
+ gl.setSwapInterval(1);
+
+ float pos[] = { 5.0f, 5.0f, 10.0f, 0.0f };
+ float red[] = { 0.8f, 0.1f, 0.0f, 1.0f };
+ float green[] = { 0.0f, 0.8f, 0.2f, 1.0f };
+ float blue[] = { 0.2f, 0.2f, 1.0f, 1.0f };
+
+ gl.glLightfv(GL2.GL_LIGHT0, GL2.GL_POSITION, pos, 0);
+ gl.glEnable(GL2.GL_CULL_FACE);
+ gl.glEnable(GL2.GL_LIGHTING);
+ gl.glEnable(GL2.GL_LIGHT0);
+ gl.glEnable(GL2.GL_DEPTH_TEST);
+
+ /* make the gears */
+ gear1 = gl.glGenLists(1);
+ gl.glNewList(gear1, GL2.GL_COMPILE);
+ gl.glMaterialfv(GL2.GL_FRONT, GL2.GL_AMBIENT_AND_DIFFUSE, red, 0);
+ gear(gl, 1.0f, 4.0f, 1.0f, 20, 0.7f);
+ gl.glEndList();
+
+ gear2 = gl.glGenLists(1);
+ gl.glNewList(gear2, GL2.GL_COMPILE);
+ gl.glMaterialfv(GL2.GL_FRONT, GL2.GL_AMBIENT_AND_DIFFUSE, green, 0);
+ gear(gl, 0.5f, 2.0f, 2.0f, 10, 0.7f);
+ gl.glEndList();
+
+ gear3 = gl.glGenLists(1);
+ gl.glNewList(gear3, GL2.GL_COMPILE);
+ gl.glMaterialfv(GL2.GL_FRONT, GL2.GL_AMBIENT_AND_DIFFUSE, blue, 0);
+ gear(gl, 1.3f, 2.0f, 0.5f, 10, 0.7f);
+ gl.glEndList();
+
+ gl.glEnable(GL2.GL_NORMALIZE);
+
+ /**
+ if (drawable instanceof AWTGLAutoDrawable) {
+ AWTGLAutoDrawable awtDrawable = (AWTGLAutoDrawable) drawable;
+ awtDrawable.addMouseListener(this);
+ awtDrawable.addMouseMotionListener(this);
+ } */
+ }
+
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
+ GL2 gl = drawable.getGL().getGL2();
+
+ float h = (float)height / (float)width;
+
+ gl.glMatrixMode(GL2.GL_PROJECTION);
+
+ System.err.println("GL_VENDOR: " + gl.glGetString(GL2.GL_VENDOR));
+ System.err.println("GL_RENDERER: " + gl.glGetString(GL2.GL_RENDERER));
+ System.err.println("GL_VERSION: " + gl.glGetString(GL2.GL_VERSION));
+ gl.glLoadIdentity();
+ gl.glFrustum(-1.0f, 1.0f, -h, h, 5.0f, 60.0f);
+ gl.glMatrixMode(GL2.GL_MODELVIEW);
+ gl.glLoadIdentity();
+ gl.glTranslatef(0.0f, 0.0f, -40.0f);
+ }
+
+ public void dispose(GLAutoDrawable drawable) {
+ System.out.println("Gears.dispose: "+drawable);
+ }
+
+ public void display(GLAutoDrawable drawable) {
+ // Turn the gears' teeth
+ angle += 2.0f;
+
+ // Get the GL corresponding to the drawable we are animating
+ GL2 gl = drawable.getGL().getGL2();
+
+ /**
+ // Special handling for the case where the GLJPanel is translucent
+ // and wants to be composited with other Java 2D content
+ if ((drawable instanceof GLJPanel) &&
+ !((GLJPanel) drawable).isOpaque() &&
+ ((GLJPanel) drawable).shouldPreserveColorBufferIfTranslucent()) {
+ gl.glClear(GL2.GL_DEPTH_BUFFER_BIT);
+ } else */ {
+ gl.glClear(GL2.GL_COLOR_BUFFER_BIT | GL2.GL_DEPTH_BUFFER_BIT);
+ }
+
+ // Rotate the entire assembly of gears based on how the user
+ // dragged the mouse around
+ gl.glPushMatrix();
+ gl.glRotatef(view_rotx, 1.0f, 0.0f, 0.0f);
+ gl.glRotatef(view_roty, 0.0f, 1.0f, 0.0f);
+ gl.glRotatef(view_rotz, 0.0f, 0.0f, 1.0f);
+
+ // Place the first gear and call its display list
+ gl.glPushMatrix();
+ gl.glTranslatef(-3.0f, -2.0f, 0.0f);
+ gl.glRotatef(angle, 0.0f, 0.0f, 1.0f);
+ gl.glCallList(gear1);
+ gl.glPopMatrix();
+
+ // Place the second gear and call its display list
+ gl.glPushMatrix();
+ gl.glTranslatef(3.1f, -2.0f, 0.0f);
+ gl.glRotatef(-2.0f * angle - 9.0f, 0.0f, 0.0f, 1.0f);
+ gl.glCallList(gear2);
+ gl.glPopMatrix();
+
+ // Place the third gear and call its display list
+ gl.glPushMatrix();
+ gl.glTranslatef(-3.1f, 4.2f, 0.0f);
+ gl.glRotatef(-2.0f * angle - 25.0f, 0.0f, 0.0f, 1.0f);
+ gl.glCallList(gear3);
+ gl.glPopMatrix();
+
+ // Remember that every push needs a pop; this one is paired with
+ // rotating the entire gear assembly
+ gl.glPopMatrix();
+ }
+
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
+
+ public static void gear(GL2 gl,
+ float inner_radius,
+ float outer_radius,
+ float width,
+ int teeth,
+ float tooth_depth)
+ {
+ int i;
+ float r0, r1, r2;
+ float angle, da;
+ float u, v, len;
+
+ r0 = inner_radius;
+ r1 = outer_radius - tooth_depth / 2.0f;
+ r2 = outer_radius + tooth_depth / 2.0f;
+
+ da = 2.0f * (float) Math.PI / teeth / 4.0f;
+
+ gl.glShadeModel(GL2.GL_FLAT);
+
+ gl.glNormal3f(0.0f, 0.0f, 1.0f);
+
+ /* draw front face */
+ gl.glBegin(GL2.GL_QUAD_STRIP);
+ for (i = 0; i <= teeth; i++)
+ {
+ angle = i * 2.0f * (float) Math.PI / teeth;
+ gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), width * 0.5f);
+ gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), width * 0.5f);
+ if(i < teeth)
+ {
+ gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), width * 0.5f);
+ gl.glVertex3f(r1 * (float)Math.cos(angle + 3.0f * da), r1 * (float)Math.sin(angle + 3.0f * da), width * 0.5f);
+ }
+ }
+ gl.glEnd();
+
+ /* draw front sides of teeth */
+ gl.glBegin(GL2.GL_QUADS);
+ for (i = 0; i < teeth; i++)
+ {
+ angle = i * 2.0f * (float) Math.PI / teeth;
+ gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), width * 0.5f);
+ gl.glVertex3f(r2 * (float)Math.cos(angle + da), r2 * (float)Math.sin(angle + da), width * 0.5f);
+ gl.glVertex3f(r2 * (float)Math.cos(angle + 2.0f * da), r2 * (float)Math.sin(angle + 2.0f * da), width * 0.5f);
+ gl.glVertex3f(r1 * (float)Math.cos(angle + 3.0f * da), r1 * (float)Math.sin(angle + 3.0f * da), width * 0.5f);
+ }
+ gl.glEnd();
+
+ /* draw back face */
+ gl.glBegin(GL2.GL_QUAD_STRIP);
+ for (i = 0; i <= teeth; i++)
+ {
+ angle = i * 2.0f * (float) Math.PI / teeth;
+ gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), -width * 0.5f);
+ gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), -width * 0.5f);
+ gl.glVertex3f(r1 * (float)Math.cos(angle + 3 * da), r1 * (float)Math.sin(angle + 3 * da), -width * 0.5f);
+ gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), -width * 0.5f);
+ }
+ gl.glEnd();
+
+ /* draw back sides of teeth */
+ gl.glBegin(GL2.GL_QUADS);
+ for (i = 0; i < teeth; i++)
+ {
+ angle = i * 2.0f * (float) Math.PI / teeth;
+ gl.glVertex3f(r1 * (float)Math.cos(angle + 3 * da), r1 * (float)Math.sin(angle + 3 * da), -width * 0.5f);
+ gl.glVertex3f(r2 * (float)Math.cos(angle + 2 * da), r2 * (float)Math.sin(angle + 2 * da), -width * 0.5f);
+ gl.glVertex3f(r2 * (float)Math.cos(angle + da), r2 * (float)Math.sin(angle + da), -width * 0.5f);
+ gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), -width * 0.5f);
+ }
+ gl.glEnd();
+
+ /* draw outward faces of teeth */
+ gl.glBegin(GL2.GL_QUAD_STRIP);
+ for (i = 0; i < teeth; i++)
+ {
+ angle = i * 2.0f * (float) Math.PI / teeth;
+ gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), width * 0.5f);
+ gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), -width * 0.5f);
+ u = r2 * (float)Math.cos(angle + da) - r1 * (float)Math.cos(angle);
+ v = r2 * (float)Math.sin(angle + da) - r1 * (float)Math.sin(angle);
+ len = (float)Math.sqrt(u * u + v * v);
+ u /= len;
+ v /= len;
+ gl.glNormal3f(v, -u, 0.0f);
+ gl.glVertex3f(r2 * (float)Math.cos(angle + da), r2 * (float)Math.sin(angle + da), width * 0.5f);
+ gl.glVertex3f(r2 * (float)Math.cos(angle + da), r2 * (float)Math.sin(angle + da), -width * 0.5f);
+ gl.glNormal3f((float)Math.cos(angle), (float)Math.sin(angle), 0.0f);
+ gl.glVertex3f(r2 * (float)Math.cos(angle + 2 * da), r2 * (float)Math.sin(angle + 2 * da), width * 0.5f);
+ gl.glVertex3f(r2 * (float)Math.cos(angle + 2 * da), r2 * (float)Math.sin(angle + 2 * da), -width * 0.5f);
+ u = r1 * (float)Math.cos(angle + 3 * da) - r2 * (float)Math.cos(angle + 2 * da);
+ v = r1 * (float)Math.sin(angle + 3 * da) - r2 * (float)Math.sin(angle + 2 * da);
+ gl.glNormal3f(v, -u, 0.0f);
+ gl.glVertex3f(r1 * (float)Math.cos(angle + 3 * da), r1 * (float)Math.sin(angle + 3 * da), width * 0.5f);
+ gl.glVertex3f(r1 * (float)Math.cos(angle + 3 * da), r1 * (float)Math.sin(angle + 3 * da), -width * 0.5f);
+ gl.glNormal3f((float)Math.cos(angle), (float)Math.sin(angle), 0.0f);
+ }
+ gl.glVertex3f(r1 * (float)Math.cos(0), r1 * (float)Math.sin(0), width * 0.5f);
+ gl.glVertex3f(r1 * (float)Math.cos(0), r1 * (float)Math.sin(0), -width * 0.5f);
+ gl.glEnd();
+
+ gl.glShadeModel(GL2.GL_SMOOTH);
+
+ /* draw inside radius cylinder */
+ gl.glBegin(GL2.GL_QUAD_STRIP);
+ for (i = 0; i <= teeth; i++)
+ {
+ angle = i * 2.0f * (float) Math.PI / teeth;
+ gl.glNormal3f(-(float)Math.cos(angle), -(float)Math.sin(angle), 0.0f);
+ gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), -width * 0.5f);
+ gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), width * 0.5f);
+ }
+ gl.glEnd();
+ }
+
+ /***
+ // Methods required for the implementation of MouseListener
+ public void mouseEntered(MouseEvent e) {}
+ public void mouseExited(MouseEvent e) {}
+
+ public void mousePressed(MouseEvent e) {
+ prevMouseX = e.getX();
+ prevMouseY = e.getY();
+ if ((e.getModifiers() & e.BUTTON3_MASK) != 0) {
+ mouseRButtonDown = true;
+ }
+ }
+
+ public void mouseReleased(MouseEvent e) {
+ if ((e.getModifiers() & e.BUTTON3_MASK) != 0) {
+ mouseRButtonDown = false;
+ }
+ }
+
+ public void mouseClicked(MouseEvent e) {}
+
+ // Methods required for the implementation of MouseMotionListener
+ public void mouseDragged(MouseEvent e) {
+ int x = e.getX();
+ int y = e.getY();
+ Dimension size = e.getComponent().getSize();
+
+ float thetaY = 360.0f * ( (float)(x-prevMouseX)/(float)size.width);
+ float thetaX = 360.0f * ( (float)(prevMouseY-y)/(float)size.height);
+
+ prevMouseX = x;
+ prevMouseY = y;
+
+ view_rotx += thetaX;
+ view_roty += thetaY;
+ }
+
+ public void mouseMoved(MouseEvent e) {}
+ */
+}
diff --git a/src/junit/com/jogamp/test/junit/jogl/drawable/TestDrawable01NEWT.java b/src/junit/com/jogamp/test/junit/jogl/drawable/TestDrawable01NEWT.java
new file mode 100755
index 000000000..6c812ba18
--- /dev/null
+++ b/src/junit/com/jogamp/test/junit/jogl/drawable/TestDrawable01NEWT.java
@@ -0,0 +1,143 @@
+/*
+ * Copyright (c) 2010 Sven Gothel. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name Sven Gothel or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SVEN GOTHEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ */
+
+package com.jogamp.test.junit.jogl.drawable;
+
+import java.lang.reflect.*;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import javax.media.opengl.*;
+import javax.media.nativewindow.*;
+
+import com.jogamp.newt.*;
+import com.jogamp.newt.opengl.*;
+
+public class TestDrawable01NEWT {
+ static GLProfile glp;
+ static int width, height;
+ GLCapabilities caps;
+ Window window;
+ GLDrawable drawable;
+ GLContext context;
+
+ @BeforeClass
+ public static void initClass() {
+ glp = GLProfile.getDefault();
+ width = 640;
+ height = 480;
+ }
+
+ @Before
+ public void initTest() {
+ caps = new GLCapabilities(glp);
+ }
+
+ void createWindow(boolean onscreen, boolean pbuffer, boolean undecorated) {
+ caps.setOnscreen(onscreen);
+ caps.setPBuffer(!onscreen && pbuffer);
+ caps.setDoubleBuffered(!onscreen);
+ System.out.println("**********************************************************");
+ System.out.println("**********************************************************");
+ System.out.println("Requested: "+caps);
+
+ //
+ // Create native windowing resources .. X11/Win/OSX
+ //
+ Display display = NewtFactory.createDisplay(null); // local display
+ Screen screen = NewtFactory.createScreen(display, 0); // screen 0
+ window = NewtFactory.createWindow(screen, caps, onscreen && undecorated);
+ window.setSize(width, height);
+ window.setVisible(true);
+ System.out.println("**********************************************************");
+ System.out.println("**********************************************************");
+ System.out.println("Created: "+window);
+
+ //
+ // Create native OpenGL resources .. XGL/WGL/CGL ..
+ // equivalent to GLAutoDrawable methods: setVisible(true)
+ //
+ GLCapabilities glCaps = (GLCapabilities) window.getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities();
+
+ GLDrawableFactory factory = GLDrawableFactory.getFactory(glCaps.getGLProfile());
+ System.out.println(factory);
+ drawable = factory.createGLDrawable(window);
+ System.out.println("**********************************************************");
+ System.out.println("**********************************************************");
+ System.out.println("Pre: "+drawable);
+ drawable.setRealized(true);
+ System.out.println("**********************************************************");
+ System.out.println("**********************************************************");
+ System.out.println("Post: "+drawable);
+ context = drawable.createContext(null);
+ System.out.println(context);
+
+ System.out.println("**********************************************************");
+ System.out.println("**********************************************************");
+ System.out.println("Final: "+window);
+ }
+
+ void destroyWindow() {
+ context.destroy();
+ drawable.setRealized(false);
+ window.destroy(true); // incl screen + display
+ }
+
+ @Test
+ public void testOnScreenDecorated() {
+ createWindow(true, false, false);
+ try {
+ Thread.sleep(1000); // 1000 ms
+ } catch (Exception e) {}
+ destroyWindow();
+ }
+
+ @Test
+ public void testOnScreenUndecorated() {
+ createWindow(true, false, true);
+ try {
+ Thread.sleep(1000); // 1000 ms
+ } catch (Exception e) {}
+ destroyWindow();
+ }
+
+ public static void main(String args[]) {
+ org.junit.runner.JUnitCore.main(TestDrawable01NEWT.class.getName());
+ }
+
+}
diff --git a/src/junit/com/jogamp/test/junit/jogl/offscreen/ReadBuffer2File.java b/src/junit/com/jogamp/test/junit/jogl/offscreen/ReadBuffer2File.java
new file mode 100755
index 000000000..2b32f720e
--- /dev/null
+++ b/src/junit/com/jogamp/test/junit/jogl/offscreen/ReadBuffer2File.java
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2010 Sven Gothel. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name Sven Gothel or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SVEN GOTHEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ */
+
+package com.jogamp.test.junit.jogl.offscreen;
+
+import java.nio.*;
+import javax.media.opengl.*;
+
+import com.jogamp.opengl.util.texture.TextureData;
+import com.jogamp.opengl.util.texture.TextureIO;
+import java.io.File;
+import java.io.IOException;
+
+import javax.media.nativewindow.*;
+
+public class ReadBuffer2File extends ReadBufferBase {
+
+ public ReadBuffer2File (GLDrawable externalRead) {
+ super(externalRead);
+ }
+
+ public void dispose(GLAutoDrawable drawable) {
+ super.dispose(drawable);
+ }
+
+ int shotNum=0;
+
+ void copyTextureData2File() {
+ if(!readBufferUtil.isValid()) return;
+
+ try {
+ File file = File.createTempFile("shot"+shotNum+"-", ".ppm");
+ TextureIO.write(readBufferUtil.getTextureData(), file);
+ if(0==shotNum) {
+ System.out.println("Wrote: "+file.getAbsolutePath()+", ...");
+ }
+ shotNum++;
+ } catch (IOException ioe) { ioe.printStackTrace(); }
+ readBufferUtil.rewindPixelBuffer();
+ }
+
+ public void display(GLAutoDrawable drawable) {
+ super.display(drawable);
+ copyTextureData2File();
+ }
+}
+
diff --git a/src/junit/com/jogamp/test/junit/jogl/offscreen/ReadBuffer2Screen.java b/src/junit/com/jogamp/test/junit/jogl/offscreen/ReadBuffer2Screen.java
new file mode 100755
index 000000000..1166cc1e5
--- /dev/null
+++ b/src/junit/com/jogamp/test/junit/jogl/offscreen/ReadBuffer2Screen.java
@@ -0,0 +1,188 @@
+/*
+ * Copyright (c) 2010 Sven Gothel. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name Sven Gothel or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SVEN GOTHEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ */
+
+package com.jogamp.test.junit.jogl.offscreen;
+
+import java.nio.*;
+import javax.media.opengl.*;
+import javax.media.opengl.fixedfunc.*;
+
+import com.jogamp.opengl.util.*;
+
+import javax.media.opengl.fixedfunc.GLPointerFunc;
+import com.jogamp.opengl.util.texture.TextureCoords;
+import com.jogamp.opengl.util.GLArrayDataClient;
+import com.jogamp.opengl.util.GLArrayDataServer;
+
+public class ReadBuffer2Screen extends ReadBufferBase {
+ PMVMatrix pmvMatrix;
+ GLArrayDataClient readTextureVertices = null;
+ GLArrayDataClient readTextureCoords = null;
+ boolean enableBufferAlways = false; // FIXME
+ boolean enableBufferVBO = true; // FIXME
+
+ public ReadBuffer2Screen (GLDrawable externalRead) {
+ super(externalRead);
+ }
+
+ public void init(GLAutoDrawable drawable) {
+ super.init(drawable);
+
+ GL gl = drawable.getGL();
+
+ pmvMatrix = new PMVMatrix();
+
+ float f_edge = 1f;
+ if(null==readTextureVertices) {
+ //readTextureVertices = GLArrayDataClient.createFixed(gl, GLPointerFunc.GL_VERTEX_ARRAY, "mgl_Vertex",
+ // 2, GL.GL_FLOAT, true, 4);
+ readTextureVertices = GLArrayDataServer.createFixed(gl, GLPointerFunc.GL_VERTEX_ARRAY, "mgl_Vertex",
+ 2, GL.GL_FLOAT, true, 4, GL.GL_STATIC_DRAW);
+ readTextureVertices.setEnableAlways(enableBufferAlways);
+ readTextureVertices.setVBOUsage(enableBufferVBO);
+ {
+ FloatBuffer vb = (FloatBuffer)readTextureVertices.getBuffer();
+ vb.put(-f_edge); vb.put(-f_edge);
+ vb.put( f_edge); vb.put(-f_edge);
+ vb.put(-f_edge); vb.put( f_edge);
+ vb.put( f_edge); vb.put( f_edge);
+ }
+ readTextureVertices.seal(gl, true);
+ System.out.println(readTextureVertices);
+ }
+
+ // Clear background to gray
+ gl.glClearColor(0.5f, 0.5f, 0.5f, 0.4f);
+ }
+
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
+ super.reshape(drawable, x, y, width, height);
+
+ GL gl = drawable.getGL();
+
+ gl.glViewport(0, 0, width, height);
+
+ if(gl instanceof GLLightingFunc) {
+ ((GLLightingFunc)gl).glShadeModel(GLLightingFunc.GL_SMOOTH);
+ }
+
+ GLMatrixFunc glM;
+ if(gl instanceof GLMatrixFunc) {
+ glM = (GLMatrixFunc)gl;
+ } else {
+ throw new GLException("ES2 currently unhandled .. ");
+ }
+
+ // Identity ..
+ pmvMatrix.glMatrixMode(pmvMatrix.GL_MODELVIEW);
+ pmvMatrix.glLoadIdentity();
+ pmvMatrix.glTranslatef(0, 0, -2.5f);
+ if(null!=glM) {
+ glM.glMatrixMode(pmvMatrix.GL_MODELVIEW);
+ glM.glLoadMatrixf(pmvMatrix.glGetMvMatrixf());
+ }
+
+ // Set location in front of camera
+ pmvMatrix.glMatrixMode(pmvMatrix.GL_PROJECTION);
+ pmvMatrix.glLoadIdentity();
+ pmvMatrix.gluPerspective(45.0f, (float)width / (float)height, 1.0f, 100.0f);
+ if(null!=glM) {
+ glM.glMatrixMode(pmvMatrix.GL_PROJECTION);
+ glM.glLoadMatrixf(pmvMatrix.glGetPMatrixf());
+ }
+ }
+
+ public void dispose(GLAutoDrawable drawable) {
+ super.dispose(drawable);
+ }
+
+ void renderOffscreenTexture(GL gl) {
+ if(!readBufferUtil.isValid()) return;
+
+ // Now draw one quad with the texture
+ readBufferUtil.getTexture().enable();
+ readBufferUtil.getTexture().bind();
+
+ if(gl.isGL2ES1()) {
+ // gl.getGL2ES1().glTexEnvi(GL2ES1.GL_TEXTURE_ENV, GL2ES1.GL_TEXTURE_ENV_MODE, GL2ES1.GL_REPLACE);
+ gl.getGL2ES1().glTexEnvi(GL2ES1.GL_TEXTURE_ENV, GL2ES1.GL_TEXTURE_ENV_MODE, GL2ES1.GL_MODULATE);
+ }
+
+ updateTextureCoords(gl, false);
+
+ readTextureVertices.enableBuffer(gl, true);
+ if(null!=readTextureCoords) {
+ readTextureCoords.enableBuffer(gl, true);
+ }
+ gl.glDrawArrays(GL.GL_TRIANGLE_STRIP, 0, readTextureVertices.getElementNumber());
+ /**
+ if(null!=readTextureCoords) {
+ readTextureCoords.enableBuffer(gl, false);
+ }
+ readTextureVertices.enableBuffer(gl, false); */
+
+ readBufferUtil.getTexture().disable();
+ }
+
+ void updateTextureCoords(GL gl, boolean force) {
+ if(force || null==readTextureCoords) {
+ readTextureCoords = GLArrayDataServer.createFixed(gl, GLPointerFunc.GL_TEXTURE_COORD_ARRAY, "mgl_MultiTexCoord0",
+ 2, GL.GL_FLOAT, true, 4, GL.GL_STATIC_DRAW);
+ readTextureCoords.setEnableAlways(enableBufferAlways);
+ readTextureCoords.setVBOUsage(enableBufferVBO);
+ {
+ TextureCoords coords = readBufferUtil.getTexture().getImageTexCoords();
+ FloatBuffer cb = (FloatBuffer)readTextureCoords.getBuffer();
+ cb.put(coords.left()); cb.put(coords.bottom());
+ cb.put(coords.right()); cb.put(coords.bottom());
+ cb.put(coords.left()); cb.put(coords.top());
+ cb.put(coords.right()); cb.put(coords.top());
+ }
+ readTextureCoords.seal(gl, true);
+ System.out.println(readTextureCoords);
+ }
+ }
+
+ public void display(GLAutoDrawable drawable) {
+ super.display(drawable);
+
+ GL gl = drawable.getGL();
+
+ gl.glClear(gl.GL_COLOR_BUFFER_BIT | gl.GL_DEPTH_BUFFER_BIT);
+ if(gl instanceof GLLightingFunc) {
+ ((GLLightingFunc)gl).glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
+ }
+
+ renderOffscreenTexture(gl);
+ }
+}
+
diff --git a/src/junit/com/jogamp/test/junit/jogl/offscreen/ReadBufferBase.java b/src/junit/com/jogamp/test/junit/jogl/offscreen/ReadBufferBase.java
new file mode 100755
index 000000000..597b21782
--- /dev/null
+++ b/src/junit/com/jogamp/test/junit/jogl/offscreen/ReadBufferBase.java
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2010 Sven Gothel. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name Sven Gothel or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SVEN GOTHEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ */
+
+package com.jogamp.test.junit.jogl.offscreen;
+
+import javax.media.opengl.*;
+
+public class ReadBufferBase implements GLEventListener {
+ public boolean glDebug = false ;
+ public boolean glTrace = false ;
+
+ protected GLDrawable externalRead;
+
+ ReadBufferUtil readBufferUtil = new ReadBufferUtil();
+
+ public ReadBufferBase (GLDrawable externalRead) {
+ this.externalRead = externalRead ;
+ }
+
+ public void init(GLAutoDrawable drawable) {
+ GL _gl = drawable.getGL();
+
+ _gl.glGetError(); // flush error ..
+
+ if(glDebug) {
+ try {
+ _gl = _gl.getContext().setGL( GLPipelineFactory.create("javax.media.opengl.Debug", null, _gl, null) );
+ } catch (Exception e) {e.printStackTrace();}
+ }
+
+ if(glTrace) {
+ try {
+ _gl = _gl.getContext().setGL( GLPipelineFactory.create("javax.media.opengl.Trace", null, _gl, new Object[] { System.err } ) );
+ } catch (Exception e) {e.printStackTrace();}
+ }
+
+ System.out.println(_gl);
+
+ _gl.getContext().setGLDrawableRead(externalRead);
+ if(_gl.isGL2GL3()) {
+ _gl.getGL2GL3().glReadBuffer(GL2GL3.GL_FRONT);
+ }
+ System.out.println("---------------------------");
+ System.out.println(_gl.getContext());
+ System.out.println("---------------------------");
+ }
+
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
+ }
+
+ public void dispose(GLAutoDrawable drawable) {
+ readBufferUtil.dispose();
+ }
+
+ public void display(GLAutoDrawable drawable) {
+ GL gl = drawable.getGL();
+
+ readBufferUtil.fetchOffscreenTexture(drawable, gl);
+ }
+
+}
+
diff --git a/src/junit/com/jogamp/test/junit/jogl/offscreen/ReadBufferUtil.java b/src/junit/com/jogamp/test/junit/jogl/offscreen/ReadBufferUtil.java
new file mode 100755
index 000000000..d409093f4
--- /dev/null
+++ b/src/junit/com/jogamp/test/junit/jogl/offscreen/ReadBufferUtil.java
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 2010 Sven Gothel. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name Sven Gothel or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SVEN GOTHEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ */
+
+package com.jogamp.test.junit.jogl.offscreen;
+
+import com.jogamp.opengl.util.GLBuffers;
+import java.nio.*;
+import javax.media.opengl.*;
+
+import com.jogamp.opengl.util.texture.Texture;
+import com.jogamp.opengl.util.texture.TextureData;
+
+public class ReadBufferUtil {
+ protected int readPixelSizeLast = 0;
+ protected Buffer readPixelBuffer = null;
+ protected TextureData readTextureData = null;
+ protected Texture readTexture = new Texture(GL.GL_TEXTURE_2D);
+
+ public Buffer getPixelBuffer() { return readPixelBuffer; }
+ public void rewindPixelBuffer() { readPixelBuffer.rewind(); }
+
+ public TextureData getTextureData() { return readTextureData; }
+ public Texture getTexture() { return readTexture; }
+
+ public boolean isValid() {
+ return null!=readTexture && null!=readTextureData && null!=readPixelBuffer ;
+ }
+
+ public void fetchOffscreenTexture(GLDrawable drawable, GL gl) {
+ int readPixelSize = drawable.getWidth() * drawable.getHeight() * 3 ; // RGB
+ boolean newData = false;
+ if(readPixelSize>readPixelSizeLast) {
+ readPixelBuffer = GLBuffers.newDirectGLBuffer(GL.GL_UNSIGNED_BYTE, readPixelSize);
+ readPixelSizeLast = readPixelSize ;
+ try {
+ readTextureData = new TextureData(
+ gl.getGLProfile(),
+ // gl.isGL2GL3()?gl.GL_RGBA:gl.GL_RGB,
+ gl.GL_RGB,
+ drawable.getWidth(), drawable.getHeight(),
+ 0,
+ gl.GL_RGB,
+ gl.GL_UNSIGNED_BYTE,
+ false, false,
+ false /* flip */,
+ readPixelBuffer,
+ null /* Flusher */);
+ newData = true;
+ } catch (Exception e) {
+ e.printStackTrace();
+ readTextureData = null;
+ readPixelBuffer = null;
+ readPixelSizeLast = 0;
+ }
+ }
+ if(null!=readPixelBuffer) {
+ readPixelBuffer.clear();
+ gl.glReadPixels(0, 0, drawable.getWidth(), drawable.getHeight(), GL.GL_RGB, GL.GL_UNSIGNED_BYTE, readPixelBuffer);
+ readPixelBuffer.rewind();
+ if(newData) {
+ readTexture.updateImage(readTextureData);
+ } else {
+ readTexture.updateSubImage(readTextureData, 0,
+ 0, 0, // src offset
+ 0, 0, // dst offset
+ drawable.getWidth(), drawable.getHeight());
+ }
+ readPixelBuffer.rewind();
+ }
+ }
+
+ public void dispose() {
+ readTexture.dispose();
+ readTextureData = null;
+ readPixelBuffer.clear();
+ readPixelBuffer = null;
+ readPixelSizeLast = 0;
+ }
+
+}
+
diff --git a/src/junit/com/jogamp/test/junit/jogl/offscreen/Surface2File.java b/src/junit/com/jogamp/test/junit/jogl/offscreen/Surface2File.java
new file mode 100755
index 000000000..43e2df54c
--- /dev/null
+++ b/src/junit/com/jogamp/test/junit/jogl/offscreen/Surface2File.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2010 Sven Gothel. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name Sven Gothel or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SVEN GOTHEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ */
+
+package com.jogamp.test.junit.jogl.offscreen;
+
+import javax.media.opengl.*;
+
+import com.jogamp.opengl.util.texture.TextureIO;
+
+import java.io.File;
+import java.io.IOException;
+
+import javax.media.nativewindow.*;
+
+public class Surface2File implements SurfaceUpdatedListener {
+
+ ReadBufferUtil readBufferUtil = new ReadBufferUtil();
+ int shotNum=0;
+
+ public void dispose() {
+ readBufferUtil.dispose();
+ }
+
+ public void surfaceUpdated(Object updater, NativeWindow window, long when) {
+ if(updater instanceof GLDrawable) {
+ GLDrawable drawable = (GLDrawable) updater;
+ GLContext ctx = GLContext.getCurrent();
+ if(null!=ctx && ctx.getGLDrawable()==drawable) {
+ readBufferUtil.fetchOffscreenTexture(drawable, ctx.getGL());
+ surface2File("shot");
+ }
+ }
+ }
+
+ public void surface2File(String basename) {
+ if(!readBufferUtil.isValid()) return;
+
+ try {
+ File file = File.createTempFile(basename+shotNum+"-", ".ppm");
+ TextureIO.write(readBufferUtil.getTextureData(), file);
+ if(0==shotNum) {
+ System.out.println("Wrote: "+file.getAbsolutePath()+", ...");
+ }
+ shotNum++;
+ } catch (IOException ioe) { ioe.printStackTrace(); }
+ readBufferUtil.rewindPixelBuffer();
+ }
+}
+
diff --git a/src/junit/com/jogamp/test/junit/jogl/offscreen/TestOffscreen01NEWT.java b/src/junit/com/jogamp/test/junit/jogl/offscreen/TestOffscreen01NEWT.java
new file mode 100755
index 000000000..a8caafb30
--- /dev/null
+++ b/src/junit/com/jogamp/test/junit/jogl/offscreen/TestOffscreen01NEWT.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2010 Sven Gothel. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name Sven Gothel or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SVEN GOTHEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ */
+
+package com.jogamp.test.junit.jogl.offscreen;
+
+import java.lang.reflect.*;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import javax.media.opengl.*;
+import javax.media.nativewindow.*;
+
+import com.jogamp.newt.*;
+import com.jogamp.newt.opengl.*;
+
+import com.jogamp.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.test.junit.jogl.demos.es1.RedSquare;
+
+public class TestOffscreen01NEWT {
+ int width, height;
+ GLProfile glp;
+ GLCapabilities caps;
+
+ @Before
+ public void init() {
+ glp = GLProfile.getDefault();
+ width = 640;
+ height = 480;
+ caps = new GLCapabilities(glp);
+ }
+
+ @Test
+ public void test1() {
+ if(false) {
+ GLWindow windowOffscreen = WindowUtilNEWT.createGLWindow(caps, width, height, false, true, false);
+ GLEventListener demo = new RedSquare();
+ GLWindow windowOnScreen = null;
+ WindowListener wl=null;
+ MouseListener ml=null;
+ SurfaceUpdatedListener ul=null;
+
+ WindowUtilNEWT.run(windowOffscreen, demo, windowOnScreen, wl, ml, ul, 2, true /*debug*/);
+ WindowUtilNEWT.shutdown(windowOffscreen, windowOnScreen);
+ }
+ }
+
+ public static void main(String args[]) {
+ org.junit.runner.JUnitCore.main(TestOffscreen01NEWT.class.getName());
+ }
+
+}
diff --git a/src/junit/com/jogamp/test/junit/jogl/offscreen/WindowUtilNEWT.java b/src/junit/com/jogamp/test/junit/jogl/offscreen/WindowUtilNEWT.java
new file mode 100755
index 000000000..31ee7b552
--- /dev/null
+++ b/src/junit/com/jogamp/test/junit/jogl/offscreen/WindowUtilNEWT.java
@@ -0,0 +1,138 @@
+/*
+ * Copyright (c) 2010 Sven Gothel. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name Sven Gothel or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SVEN GOTHEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ */
+
+package com.jogamp.test.junit.jogl.offscreen;
+
+import com.jogamp.test.junit.util.*;
+
+import java.lang.reflect.*;
+import javax.media.opengl.*;
+import javax.media.nativewindow.*;
+import com.jogamp.newt.*;
+import com.jogamp.newt.opengl.*;
+
+public class WindowUtilNEWT {
+
+ public static Window createWindow(GLCapabilities caps, int w, int h, boolean onscreen, boolean pbuffer, boolean undecorated) {
+ GLCapabilities caps2 = (GLCapabilities) caps.clone();
+ caps2.setOnscreen(onscreen);
+ caps2.setPBuffer(!onscreen && pbuffer);
+ caps2.setDoubleBuffered(!onscreen);
+
+ Display display = NewtFactory.createDisplay(null); // local display
+ Screen screen = NewtFactory.createScreen(display, 0); // screen 0
+ Window window = NewtFactory.createWindow(screen, caps2, onscreen && undecorated);
+
+ GLCapabilities glCaps = (GLCapabilities) window.getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities();
+
+ GLDrawableFactory factory = GLDrawableFactory.getFactory(glCaps.getGLProfile());
+ GLDrawable drawable = factory.createGLDrawable(window);
+ drawable.setRealized(true);
+ GLContext context = drawable.createContext(null);
+
+ window.setSize(w, h);
+ window.setVisible(true);
+ return window;
+ }
+
+ public static GLWindow createGLWindow(GLCapabilities caps, int w, int h, boolean onscreen, boolean pbuffer, boolean undecorated) {
+ GLCapabilities caps2 = (GLCapabilities) caps.clone();
+ caps2.setOnscreen(onscreen);
+ caps2.setPBuffer(!onscreen && pbuffer);
+ caps2.setDoubleBuffered(!onscreen);
+ GLWindow window = GLWindow.create(caps2, onscreen && undecorated);
+ window.setSize(w, h);
+ window.setVisible(true);
+ return window;
+ }
+
+ public static void run(GLWindow windowOffscreen, GLEventListener demo,
+ GLWindow windowOnScreen, WindowListener wl, MouseListener ml,
+ SurfaceUpdatedListener ul, int frames, boolean debug) {
+ try {
+ if(debug) {
+ MiscUtils.setField(demo, "glDebug", new Boolean(true));
+ MiscUtils.setField(demo, "glTrace", new Boolean(true));
+ }
+ if(!MiscUtils.setField(demo, "window", windowOffscreen)) {
+ MiscUtils.setField(demo, "glWindow", windowOffscreen);
+ }
+ windowOffscreen.addGLEventListener(demo);
+
+ if ( null != windowOnScreen ) {
+ if(null!=wl) {
+ windowOnScreen.addWindowListener(wl);
+ }
+ if(null!=ml) {
+ windowOnScreen.addMouseListener(ml);
+ }
+ windowOnScreen.setVisible(true);
+ }
+
+ GLDrawable readDrawable = windowOffscreen.getContext().getGLDrawable() ;
+
+ if ( null == windowOnScreen ) {
+ ReadBuffer2File readDemo = new ReadBuffer2File( readDrawable ) ;
+ } else {
+ ReadBuffer2Screen readDemo = new ReadBuffer2Screen( readDrawable ) ;
+ windowOnScreen.addGLEventListener(readDemo);
+ if(null!=wl) {
+ windowOffscreen.addSurfaceUpdatedListener(ul);
+ }
+ }
+
+ System.out.println("+++++++++++++++++++++++++++");
+ System.out.println(windowOffscreen);
+ System.out.println("+++++++++++++++++++++++++++");
+
+ while ( windowOffscreen.getTotalFrames() < frames) {
+ windowOffscreen.display();
+ }
+
+ } catch (GLException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public static void shutdown(GLWindow windowOffscreen, GLWindow windowOnscreen) {
+ // Shut things down cooperatively
+ if(null!=windowOnscreen) {
+ windowOnscreen.destroy();
+ }
+ if(null!=windowOffscreen) {
+ windowOffscreen.destroy();
+ }
+ if(null!=windowOnscreen) {
+ windowOnscreen.getFactory().shutdown();
+ }
+ }
+}
diff --git a/src/junit/com/jogamp/test/junit/jogl/texture/TestTexture01AWT.java b/src/junit/com/jogamp/test/junit/jogl/texture/TestTexture01AWT.java
new file mode 100755
index 000000000..d83e064bf
--- /dev/null
+++ b/src/junit/com/jogamp/test/junit/jogl/texture/TestTexture01AWT.java
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 2010 Sven Gothel. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name Sven Gothel or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SVEN GOTHEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ */
+
+package com.jogamp.test.junit.jogl.texture;
+
+import com.jogamp.test.junit.jogl.util.texture.gl2.TextureGL2ListenerDraw1;
+
+import javax.media.opengl.GLProfile;
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2ES1;
+import javax.media.opengl.GL2;
+import javax.media.opengl.GLAutoDrawable;
+import javax.media.opengl.GLEventListener;
+import javax.media.opengl.awt.GLCanvas;
+import com.jogamp.opengl.util.texture.Texture;
+import com.jogamp.opengl.util.texture.TextureCoords;
+import com.jogamp.opengl.util.texture.TextureData;
+import com.jogamp.opengl.util.texture.TextureIO;
+import com.jogamp.opengl.util.texture.awt.AWTTextureIO;
+import com.jogamp.opengl.util.Animator;
+
+import java.awt.AlphaComposite;
+import java.awt.Color;
+import java.awt.Frame;
+import java.awt.GradientPaint;
+import java.awt.Graphics2D;
+import java.awt.Rectangle;
+import java.awt.image.BufferedImage;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class TestTexture01AWT {
+ Frame frame;
+ BufferedImage textureImage;
+
+ @Before
+ public void init() {
+ // create base image
+ BufferedImage baseImage = new BufferedImage(256, 256, BufferedImage.TYPE_INT_RGB);
+ Graphics2D g = baseImage.createGraphics();
+ g.setPaint(new GradientPaint(0, 0, Color.CYAN,
+ baseImage.getWidth(), baseImage.getHeight(), Color.BLUE));
+ g.fillRect(0, 0, baseImage.getWidth(), baseImage.getHeight());
+ g.dispose();
+
+ // create texture image
+ int imageType = BufferedImage.TYPE_INT_RGB;
+ textureImage = new BufferedImage(baseImage.getWidth(),
+ baseImage.getHeight(),
+ imageType);
+ g = textureImage.createGraphics();
+ g.setComposite(AlphaComposite.Src);
+ g.drawImage(baseImage, 0, 0, null);
+ g.dispose();
+
+ frame = new Frame("Texture Test");
+ }
+
+ @Test
+ public void test1() {
+ GLCapabilities caps = new GLCapabilities(GLProfile.get(GLProfile.GL2GL3));
+ GLCanvas glCanvas = new GLCanvas(caps);
+ frame.add(glCanvas);
+ frame.setSize(512, 512);
+
+ // create texture
+ TextureData textureData = AWTTextureIO.newTextureData(caps.getGLProfile(), textureImage, false);
+ glCanvas.addGLEventListener(new TextureGL2ListenerDraw1(textureData));
+
+ Animator animator = new Animator(glCanvas);
+ frame.setVisible(true);
+ animator.start();
+
+ try {
+ Thread.sleep(1000); // 1000 ms
+ } catch (Exception e) {}
+
+ animator.stop();
+ frame.setVisible(false);
+
+ frame.remove(glCanvas);
+ frame.dispose();
+ frame=null;
+ }
+
+ public static void main(String args[]) {
+ org.junit.runner.JUnitCore.main(TestTexture01AWT.class.getName());
+ }
+}
diff --git a/src/junit/com/jogamp/test/junit/util/MiscUtils.java b/src/junit/com/jogamp/test/junit/util/MiscUtils.java
new file mode 100644
index 000000000..5114c3a84
--- /dev/null
+++ b/src/junit/com/jogamp/test/junit/util/MiscUtils.java
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2010 Sven Gothel. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name Sven Gothel or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SVEN GOTHEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ */
+
+package com.jogamp.test.junit.util;
+
+import java.lang.reflect.*;
+
+public class MiscUtils {
+ public static int str2int(String str, int def) {
+ try {
+ return Integer.parseInt(str);
+ } catch (Exception ex) { ex.printStackTrace(); }
+ return def;
+ }
+
+ public static boolean setField(Object instance, String fieldName, Object value) {
+ try {
+ Field f = instance.getClass().getField(fieldName);
+ if(value instanceof Boolean || f.getType().isInstance(value)) {
+ f.set(instance, value);
+ return true;
+ } else {
+ System.out.println(instance.getClass()+" '"+fieldName+"' field not assignable with "+value.getClass()+", it's a: "+f.getType());
+ }
+ } catch (NoSuchFieldException nsfe) {
+ System.out.println(instance.getClass()+" has no '"+fieldName+"' field");
+ } catch (Throwable t) {
+ t.printStackTrace();
+ }
+ return false;
+ }
+}
+
+
+
--
cgit v1.2.3
From a9eaf11b0d168db049bafc24260d6c0b4a000071 Mon Sep 17 00:00:00 2001
From: Sven Gothel
@@ -280,7 +279,7 @@ public abstract class GLDrawableFactory {
* Returns true if it is possible to create an external GLDrawable
* object via {@link #createExternalGLDrawable}.
*/
- public abstract boolean canCreateExternalGLDrawable();
+ public abstract boolean canCreateExternalGLDrawable(AbstractGraphicsDevice device);
/**
* Creates a {@link GLDrawable} object representing an existing
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
index 43b2e1e1d..e8de00629 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
@@ -494,7 +494,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable {
backend = new J2DOGLBackend();
} else {
if (!hardwareAccelerationDisabled &&
- factory.canCreateGLPbuffer()) {
+ factory.canCreateGLPbuffer(null)) {
backend = new PbufferBackend();
} else {
if (softwareRenderingDisabled) {
@@ -1509,7 +1509,8 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable {
}
}
if (joglContext == null) {
- if (factory.canCreateExternalGLDrawable()) {
+ AbstractGraphicsDevice device = j2dContext.getGLDrawable().getNativeWindow().getGraphicsConfiguration().getNativeGraphicsConfiguration().getScreen().getDevice();
+ if (factory.canCreateExternalGLDrawable(device)) {
joglDrawable = factory.createExternalGLDrawable();
// FIXME: Need to share with j2d context, due to FBO resource ..
// - ORIG: joglContext = joglDrawable.createContext(shareWith);
@@ -1518,7 +1519,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable {
System.err.println("-- Created External Drawable: "+joglDrawable);
System.err.println("-- Created Context: "+joglContext);
}
- } else if (factory.canCreateContextOnJava2DSurface()) {
+ } else if (factory.canCreateContextOnJava2DSurface(device)) {
// Mac OS X code path
// FIXME: Need to share with j2d context, due to FBO resource ..
// - ORIG: joglContext = factory.createContextOnJava2DSurface(g, shareWith);
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/impl/x11/X11Util.java b/src/nativewindow/classes/com/jogamp/nativewindow/impl/x11/X11Util.java
index 9fc986180..95fd6c72b 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/impl/x11/X11Util.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/impl/x11/X11Util.java
@@ -113,11 +113,11 @@ public class X11Util {
return 0;
}
long dpy = namedDpy.getHandle();
- X11Lib.XCloseDisplay(dpy);
if(DEBUG) {
- Exception e = new Exception("X11Util.Display: Closed TLS Display("+name+") with handle 0x"+Long.toHexString(dpy)+" in thread "+Thread.currentThread().getName());
+ Exception e = new Exception("X11Util.Display: Closing TLS Display("+name+") with handle 0x"+Long.toHexString(dpy)+" in thread "+Thread.currentThread().getName());
e.printStackTrace();
}
+ X11Lib.XCloseDisplay(dpy);
return dpy;
}
--
cgit v1.2.3
From 2ae28d54858ff684bc2368e0476a7a357dc63432 Mon Sep 17 00:00:00 2001
From: Sven Gothel Provides a virtual machine- and operating system-independent
mechanism for creating {@link GLDrawable}s.
@@ -116,7 +116,7 @@ public class MainThread {
// start user app ..
try {
- Class mainClass = NWReflection.getClass(mainClassName, true);
+ Class mainClass = ReflectionUtil.getClass(mainClassName, true);
if(null==mainClass) {
throw new RuntimeException(new ClassNotFoundException("MainThread couldn't find main class "+mainClassName));
}
@@ -159,7 +159,7 @@ public class MainThread {
System.arraycopy(args, 1, mainClassArgs, 0, args.length-1);
}
- NativeLibLoader.loadNEWT();
+ NEWTJNILibLoader.loadNEWT();
shouldStop = false;
tasks = new ArrayList();
diff --git a/src/newt/classes/com/jogamp/newt/windows/WindowsDisplay.java b/src/newt/classes/com/jogamp/newt/windows/WindowsDisplay.java
index 05cab1a0a..281022901 100755
--- a/src/newt/classes/com/jogamp/newt/windows/WindowsDisplay.java
+++ b/src/newt/classes/com/jogamp/newt/windows/WindowsDisplay.java
@@ -45,7 +45,7 @@ public class WindowsDisplay extends Display {
private static long hInstance;
static {
- NativeLibLoader.loadNEWT();
+ NEWTJNILibLoader.loadNEWT();
if (!WindowsWindow.initIDs()) {
throw new NativeWindowException("Failed to initialize WindowsWindow jmethodIDs");
diff --git a/src/newt/classes/com/jogamp/newt/x11/X11Display.java b/src/newt/classes/com/jogamp/newt/x11/X11Display.java
index 5fd6d9640..c8faefbf1 100755
--- a/src/newt/classes/com/jogamp/newt/x11/X11Display.java
+++ b/src/newt/classes/com/jogamp/newt/x11/X11Display.java
@@ -41,7 +41,7 @@ import com.jogamp.nativewindow.impl.x11.X11Util;
public class X11Display extends Display {
static {
- NativeLibLoader.loadNEWT();
+ NEWTJNILibLoader.loadNEWT();
if (!initIDs()) {
throw new NativeWindowException("Failed to initialize X11Display jmethodIDs");
diff --git a/src/newt/native/X11Window.c b/src/newt/native/X11Window.c
index 33c5324e2..296172f6e 100755
--- a/src/newt/native/X11Window.c
+++ b/src/newt/native/X11Window.c
@@ -159,11 +159,11 @@ static void _FatalError(JNIEnv *env, const char* msg, ...)
va_end(ap);
fprintf(stderr, buffer);
+ fprintf(stderr, "\n");
(*env)->FatalError(env, buffer);
}
-static const char * const ClazzNameRuntimeException =
- "java/lang/RuntimeException";
+static const char * const ClazzNameRuntimeException = "java/lang/RuntimeException";
static jclass runtimeExceptionClz=NULL;
static const char * const ClazzNameNewtWindow =
@@ -200,6 +200,7 @@ static void _throwNewRuntimeException(Display * unlockDisplay, JNIEnv *env, cons
*/
+static JNIEnv * x11ErrorHandlerJNIEnv = NULL;
static XErrorHandler origErrorHandler = NULL ;
static int displayDispatchErrorHandler(Display *dpy, XErrorEvent *e)
@@ -213,15 +214,16 @@ static int displayDispatchErrorHandler(Display *dpy, XErrorEvent *e)
{
fprintf(stderr, " BadWindow (%p): Window probably already removed\n", e->resourceid);
} else {
- return origErrorHandler(dpy, e);
+ _throwNewRuntimeException(NULL, x11ErrorHandlerJNIEnv, "NEWT X11 Error: Display %p, Code 0x%X", dpy, e->error_code);
}
return 0;
}
-static void displayDispatchErrorHandlerEnable(int onoff) {
+static void displayDispatchErrorHandlerEnable(int onoff, JNIEnv * env) {
if(onoff) {
if(NULL==origErrorHandler) {
+ x11ErrorHandlerJNIEnv = env;
origErrorHandler = XSetErrorHandler(displayDispatchErrorHandler);
}
} else {
@@ -329,13 +331,13 @@ JNIEXPORT void JNICALL Java_com_jogamp_newt_x11_X11Display_CompleteDisplay
javaObjectAtom = (jlong) XInternAtom(dpy, "JOGL_JAVA_OBJECT", False);
if(None==javaObjectAtom) {
- _throwNewRuntimeException(dpy, env, "could not create Atom JOGL_JAVA_OBJECT, bail out!\n");
+ _throwNewRuntimeException(dpy, env, "could not create Atom JOGL_JAVA_OBJECT, bail out!");
return;
}
windowDeleteAtom = (jlong) XInternAtom(dpy, "WM_DELETE_WINDOW", False);
if(None==windowDeleteAtom) {
- _throwNewRuntimeException(dpy, env, "could not create Atom WM_DELETE_WINDOW, bail out!\n");
+ _throwNewRuntimeException(dpy, env, "could not create Atom WM_DELETE_WINDOW, bail out!");
return;
}
@@ -371,7 +373,7 @@ static void setJavaWindowProperty(JNIEnv *env, Display *dpy, Window window, jlon
{
jobject test = (jobject) getPtrOut32Long(jogl_java_object_data);
if( ! (jwindow==test) ) {
- _throwNewRuntimeException(dpy, env, "Internal Error .. Encoded Window ref not the same %p != %p !\n", jwindow, test);
+ _throwNewRuntimeException(dpy, env, "Internal Error .. Encoded Window ref not the same %p != %p !", jwindow, test);
return;
}
}
@@ -415,7 +417,7 @@ static jobject getJavaWindowProperty(JNIEnv *env, Display *dpy, Window window, j
#ifdef VERBOSE_ON
if(JNI_FALSE == (*env)->IsInstanceOf(env, jwindow, newtWindowClz)) {
- _throwNewRuntimeException(dpy, env, "fetched Atom JOGL_JAVA_OBJECT window is not a NEWT Window: javaWindow 0x%X !\n", jwindow);
+ _throwNewRuntimeException(dpy, env, "fetched Atom JOGL_JAVA_OBJECT window is not a NEWT Window: javaWindow 0x%X !", jwindow);
}
#endif
return jwindow;
@@ -457,20 +459,20 @@ JNIEXPORT void JNICALL Java_com_jogamp_newt_x11_X11Display_DispatchMessages
num_events--;
if( 0==evt.xany.window ) {
- _throwNewRuntimeException(dpy, env, "event window NULL, bail out!\n");
+ _throwNewRuntimeException(dpy, env, "event window NULL, bail out!");
return ;
}
if(dpy!=evt.xany.display) {
- _throwNewRuntimeException(dpy, env, "wrong display, bail out!\n");
+ _throwNewRuntimeException(dpy, env, "wrong display, bail out!");
return ;
}
- displayDispatchErrorHandlerEnable(1);
+ displayDispatchErrorHandlerEnable(1, env);
jwindow = getJavaWindowProperty(env, dpy, evt.xany.window, javaObjectAtom);
- displayDispatchErrorHandlerEnable(0);
+ displayDispatchErrorHandlerEnable(0, env);
if(NULL==jwindow) {
fprintf(stderr, "Warning: NEWT X11 DisplayDispatch %p, Couldn't handle event %d for invalid X11 window %p\n",
@@ -685,7 +687,7 @@ JNIEXPORT jlong JNICALL Java_com_jogamp_newt_x11_X11Window_CreateWindow
}
if(visualID<0) {
- _throwNewRuntimeException(NULL, env, "invalid VisualID ..\n");
+ _throwNewRuntimeException(NULL, env, "invalid VisualID ..");
return 0;
}
@@ -712,7 +714,7 @@ JNIEXPORT jlong JNICALL Java_com_jogamp_newt_x11_X11Window_CreateWindow
if (visual==NULL)
{
- _throwNewRuntimeException(dpy, env, "could not query Visual by given VisualID, bail out!\n");
+ _throwNewRuntimeException(dpy, env, "could not query Visual by given VisualID, bail out!");
return 0;
}
@@ -797,11 +799,11 @@ JNIEXPORT void JNICALL Java_com_jogamp_newt_x11_X11Window_CloseWindow
jwindow = getJavaWindowProperty(env, dpy, w, javaObjectAtom);
if(NULL==jwindow) {
- _throwNewRuntimeException(dpy, env, "could not fetch Java Window object, bail out!\n");
+ _throwNewRuntimeException(dpy, env, "could not fetch Java Window object, bail out!");
return;
}
if ( JNI_FALSE == (*env)->IsSameObject(env, jwindow, obj) ) {
- _throwNewRuntimeException(dpy, env, "Internal Error .. Window global ref not the same!\n");
+ _throwNewRuntimeException(dpy, env, "Internal Error .. Window global ref not the same!");
return;
}
(*env)->DeleteGlobalRef(env, jwindow);
--
cgit v1.2.3
From d429d317f27e71ee06877fb539ecde15d6e73037 Mon Sep 17 00:00:00 2001
From: Sven Gothel
+ *
+ * This version is equal to Brian Paul's version 1.2 1999/10/21
+ */
+
+public class Gears implements GLEventListener, MouseListener, MouseMotionListener {
+ public static void main(String[] args) {
+
+ Frame frame = new Frame("Gear Demo");
+ GLCanvas canvas = new GLCanvas(new GLCapabilities());
+
+ canvas.addGLEventListener(new Gears());
+ frame.add(canvas);
+ frame.setSize(300, 300);
+ final Animator animator = new Animator(canvas);
+ frame.addWindowListener(new WindowAdapter() {
+ public void windowClosing(WindowEvent e) {
+ // Run this on another thread than the AWT event queue to
+ // make sure the call to Animator.stop() completes before
+ // exiting
+ new Thread(new Runnable() {
+ public void run() {
+ animator.stop();
+ System.exit(0);
+ }
+ }).start();
+ }
+ });
+ frame.show();
+ animator.start();
+ }
+
+ private float view_rotx = 20.0f, view_roty = 30.0f, view_rotz = 0.0f;
+ private int gear1, gear2, gear3;
+ private float angle = 0.0f;
+
+ private int prevMouseX, prevMouseY;
+ private boolean mouseRButtonDown = false;
+
+ public void init(GLAutoDrawable drawable) {
+ // Use debug pipeline
+ // drawable.setGL(new DebugGL(drawable.getGL()));
+
+ GL gl = drawable.getGL();
+
+ System.err.println("INIT GL IS: " + gl.getClass().getName());
+
+ gl.setSwapInterval(1);
+
+ float pos[] = { 5.0f, 5.0f, 10.0f, 0.0f };
+ float red[] = { 0.8f, 0.1f, 0.0f, 1.0f };
+ float green[] = { 0.0f, 0.8f, 0.2f, 1.0f };
+ float blue[] = { 0.2f, 0.2f, 1.0f, 1.0f };
+
+ gl.glLightfv(GL.GL_LIGHT0, GL.GL_POSITION, pos, 0);
+ gl.glEnable(GL.GL_CULL_FACE);
+ gl.glEnable(GL.GL_LIGHTING);
+ gl.glEnable(GL.GL_LIGHT0);
+ gl.glEnable(GL.GL_DEPTH_TEST);
+
+ /* make the gears */
+ gear1 = gl.glGenLists(1);
+ gl.glNewList(gear1, GL.GL_COMPILE);
+ gl.glMaterialfv(GL.GL_FRONT, GL.GL_AMBIENT_AND_DIFFUSE, red, 0);
+ gear(gl, 1.0f, 4.0f, 1.0f, 20, 0.7f);
+ gl.glEndList();
+
+ gear2 = gl.glGenLists(1);
+ gl.glNewList(gear2, GL.GL_COMPILE);
+ gl.glMaterialfv(GL.GL_FRONT, GL.GL_AMBIENT_AND_DIFFUSE, green, 0);
+ gear(gl, 0.5f, 2.0f, 2.0f, 10, 0.7f);
+ gl.glEndList();
+
+ gear3 = gl.glGenLists(1);
+ gl.glNewList(gear3, GL.GL_COMPILE);
+ gl.glMaterialfv(GL.GL_FRONT, GL.GL_AMBIENT_AND_DIFFUSE, blue, 0);
+ gear(gl, 1.3f, 2.0f, 0.5f, 10, 0.7f);
+ gl.glEndList();
+
+ gl.glEnable(GL.GL_NORMALIZE);
+
+ drawable.addMouseListener(this);
+ drawable.addMouseMotionListener(this);
+ }
+
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
+ GL gl = drawable.getGL();
+
+ float h = (float)height / (float)width;
+
+ gl.glMatrixMode(GL.GL_PROJECTION);
+
+ System.err.println("GL_VENDOR: " + gl.glGetString(GL.GL_VENDOR));
+ System.err.println("GL_RENDERER: " + gl.glGetString(GL.GL_RENDERER));
+ System.err.println("GL_VERSION: " + gl.glGetString(GL.GL_VERSION));
+ gl.glLoadIdentity();
+ gl.glFrustum(-1.0f, 1.0f, -h, h, 5.0f, 60.0f);
+ gl.glMatrixMode(GL.GL_MODELVIEW);
+ gl.glLoadIdentity();
+ gl.glTranslatef(0.0f, 0.0f, -40.0f);
+ }
+
+ public void display(GLAutoDrawable drawable) {
+ angle += 2.0f;
+
+ GL gl = drawable.getGL();
+ if ((drawable instanceof GLJPanel) &&
+ !((GLJPanel) drawable).isOpaque() &&
+ ((GLJPanel) drawable).shouldPreserveColorBufferIfTranslucent()) {
+ gl.glClear(GL.GL_DEPTH_BUFFER_BIT);
+ } else {
+ gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
+ }
+
+ gl.glPushMatrix();
+ gl.glRotatef(view_rotx, 1.0f, 0.0f, 0.0f);
+ gl.glRotatef(view_roty, 0.0f, 1.0f, 0.0f);
+ gl.glRotatef(view_rotz, 0.0f, 0.0f, 1.0f);
+
+ gl.glPushMatrix();
+ gl.glTranslatef(-3.0f, -2.0f, 0.0f);
+ gl.glRotatef(angle, 0.0f, 0.0f, 1.0f);
+ gl.glCallList(gear1);
+ gl.glPopMatrix();
+
+ gl.glPushMatrix();
+ gl.glTranslatef(3.1f, -2.0f, 0.0f);
+ gl.glRotatef(-2.0f * angle - 9.0f, 0.0f, 0.0f, 1.0f);
+ gl.glCallList(gear2);
+ gl.glPopMatrix();
+
+ gl.glPushMatrix();
+ gl.glTranslatef(-3.1f, 4.2f, 0.0f);
+ gl.glRotatef(-2.0f * angle - 25.0f, 0.0f, 0.0f, 1.0f);
+ gl.glCallList(gear3);
+ gl.glPopMatrix();
+
+ gl.glPopMatrix();
+ }
+
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {}
+
+ private void gear(GL gl,
+ float inner_radius,
+ float outer_radius,
+ float width,
+ int teeth,
+ float tooth_depth)
+ {
+ int i;
+ float r0, r1, r2;
+ float angle, da;
+ float u, v, len;
+
+ r0 = inner_radius;
+ r1 = outer_radius - tooth_depth / 2.0f;
+ r2 = outer_radius + tooth_depth / 2.0f;
+
+ da = 2.0f * (float) Math.PI / teeth / 4.0f;
+
+ gl.glShadeModel(GL.GL_FLAT);
+
+ gl.glNormal3f(0.0f, 0.0f, 1.0f);
+
+ /* draw front face */
+ gl.glBegin(GL.GL_QUAD_STRIP);
+ for (i = 0; i <= teeth; i++)
+ {
+ angle = i * 2.0f * (float) Math.PI / teeth;
+ gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), width * 0.5f);
+ gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), width * 0.5f);
+ if(i < teeth)
+ {
+ gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), width * 0.5f);
+ gl.glVertex3f(r1 * (float)Math.cos(angle + 3.0f * da), r1 * (float)Math.sin(angle + 3.0f * da), width * 0.5f);
+ }
+ }
+ gl.glEnd();
+
+ /* draw front sides of teeth */
+ gl.glBegin(GL.GL_QUADS);
+ for (i = 0; i < teeth; i++)
+ {
+ angle = i * 2.0f * (float) Math.PI / teeth;
+ gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), width * 0.5f);
+ gl.glVertex3f(r2 * (float)Math.cos(angle + da), r2 * (float)Math.sin(angle + da), width * 0.5f);
+ gl.glVertex3f(r2 * (float)Math.cos(angle + 2.0f * da), r2 * (float)Math.sin(angle + 2.0f * da), width * 0.5f);
+ gl.glVertex3f(r1 * (float)Math.cos(angle + 3.0f * da), r1 * (float)Math.sin(angle + 3.0f * da), width * 0.5f);
+ }
+ gl.glEnd();
+
+ /* draw back face */
+ gl.glBegin(GL.GL_QUAD_STRIP);
+ for (i = 0; i <= teeth; i++)
+ {
+ angle = i * 2.0f * (float) Math.PI / teeth;
+ gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), -width * 0.5f);
+ gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), -width * 0.5f);
+ gl.glVertex3f(r1 * (float)Math.cos(angle + 3 * da), r1 * (float)Math.sin(angle + 3 * da), -width * 0.5f);
+ gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), -width * 0.5f);
+ }
+ gl.glEnd();
+
+ /* draw back sides of teeth */
+ gl.glBegin(GL.GL_QUADS);
+ for (i = 0; i < teeth; i++)
+ {
+ angle = i * 2.0f * (float) Math.PI / teeth;
+ gl.glVertex3f(r1 * (float)Math.cos(angle + 3 * da), r1 * (float)Math.sin(angle + 3 * da), -width * 0.5f);
+ gl.glVertex3f(r2 * (float)Math.cos(angle + 2 * da), r2 * (float)Math.sin(angle + 2 * da), -width * 0.5f);
+ gl.glVertex3f(r2 * (float)Math.cos(angle + da), r2 * (float)Math.sin(angle + da), -width * 0.5f);
+ gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), -width * 0.5f);
+ }
+ gl.glEnd();
+
+ /* draw outward faces of teeth */
+ gl.glBegin(GL.GL_QUAD_STRIP);
+ for (i = 0; i < teeth; i++)
+ {
+ angle = i * 2.0f * (float) Math.PI / teeth;
+ gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), width * 0.5f);
+ gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), -width * 0.5f);
+ u = r2 * (float)Math.cos(angle + da) - r1 * (float)Math.cos(angle);
+ v = r2 * (float)Math.sin(angle + da) - r1 * (float)Math.sin(angle);
+ len = (float)Math.sqrt(u * u + v * v);
+ u /= len;
+ v /= len;
+ gl.glNormal3f(v, -u, 0.0f);
+ gl.glVertex3f(r2 * (float)Math.cos(angle + da), r2 * (float)Math.sin(angle + da), width * 0.5f);
+ gl.glVertex3f(r2 * (float)Math.cos(angle + da), r2 * (float)Math.sin(angle + da), -width * 0.5f);
+ gl.glNormal3f((float)Math.cos(angle), (float)Math.sin(angle), 0.0f);
+ gl.glVertex3f(r2 * (float)Math.cos(angle + 2 * da), r2 * (float)Math.sin(angle + 2 * da), width * 0.5f);
+ gl.glVertex3f(r2 * (float)Math.cos(angle + 2 * da), r2 * (float)Math.sin(angle + 2 * da), -width * 0.5f);
+ u = r1 * (float)Math.cos(angle + 3 * da) - r2 * (float)Math.cos(angle + 2 * da);
+ v = r1 * (float)Math.sin(angle + 3 * da) - r2 * (float)Math.sin(angle + 2 * da);
+ gl.glNormal3f(v, -u, 0.0f);
+ gl.glVertex3f(r1 * (float)Math.cos(angle + 3 * da), r1 * (float)Math.sin(angle + 3 * da), width * 0.5f);
+ gl.glVertex3f(r1 * (float)Math.cos(angle + 3 * da), r1 * (float)Math.sin(angle + 3 * da), -width * 0.5f);
+ gl.glNormal3f((float)Math.cos(angle), (float)Math.sin(angle), 0.0f);
+ }
+ gl.glVertex3f(r1 * (float)Math.cos(0), r1 * (float)Math.sin(0), width * 0.5f);
+ gl.glVertex3f(r1 * (float)Math.cos(0), r1 * (float)Math.sin(0), -width * 0.5f);
+ gl.glEnd();
+
+ gl.glShadeModel(GL.GL_SMOOTH);
+
+ /* draw inside radius cylinder */
+ gl.glBegin(GL.GL_QUAD_STRIP);
+ for (i = 0; i <= teeth; i++)
+ {
+ angle = i * 2.0f * (float) Math.PI / teeth;
+ gl.glNormal3f(-(float)Math.cos(angle), -(float)Math.sin(angle), 0.0f);
+ gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), -width * 0.5f);
+ gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), width * 0.5f);
+ }
+ gl.glEnd();
+ }
+
+ // Methods required for the implementation of MouseListener
+ public void mouseEntered(MouseEvent e) {}
+ public void mouseExited(MouseEvent e) {}
+
+ public void mousePressed(MouseEvent e) {
+ prevMouseX = e.getX();
+ prevMouseY = e.getY();
+ if ((e.getModifiers() & e.BUTTON3_MASK) != 0) {
+ mouseRButtonDown = true;
+ }
+ }
+
+ public void mouseReleased(MouseEvent e) {
+ if ((e.getModifiers() & e.BUTTON3_MASK) != 0) {
+ mouseRButtonDown = false;
+ }
+ }
+
+ public void mouseClicked(MouseEvent e) {}
+
+ // Methods required for the implementation of MouseMotionListener
+ public void mouseDragged(MouseEvent e) {
+ int x = e.getX();
+ int y = e.getY();
+ Dimension size = e.getComponent().getSize();
+
+ float thetaY = 360.0f * ( (float)(x-prevMouseX)/(float)size.width);
+ float thetaX = 360.0f * ( (float)(prevMouseY-y)/(float)size.height);
+
+ prevMouseX = x;
+ prevMouseY = y;
+
+ view_rotx += thetaX;
+ view_roty += thetaY;
+ }
+
+ public void mouseMoved(MouseEvent e) {}
+}
+
--
cgit v1.2.3
From 11ddcfe64ab2ef99f51bdd44e598703995662ae2 Mon Sep 17 00:00:00 2001
From: Sven Gothel This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. AWTWindow(Frame frame)
,
+ * to support an external created AWT Frame, ie the browsers embedded frame.
+ */
+ public static Window createWindow(Object[] cstrArguments, Screen screen, Capabilities caps, boolean undecorated) {
+ return Window.create(NativeWindowFactory.getNativeWindowType(true), cstrArguments, screen, caps, undecorated);
+ }
+
+ /**
+ * Create a Window entity using the given implementation type, incl native creation
+ */
+ public static Window createWindow(String type, Screen screen, Capabilities caps) {
+ return Window.create(type, 0, screen, caps, false);
+ }
+
+ public static Window createWindow(String type, Screen screen, Capabilities caps, boolean undecorated) {
+ return Window.create(type, 0, screen, caps, undecorated);
+ }
+
+ public static Window createWindow(String type, long parentWindowHandle, Screen screen, Capabilities caps, boolean undecorated) {
+ return Window.create(type, parentWindowHandle, screen, caps, undecorated);
+ }
+
+ public static Window createWindow(String type, Object[] cstrArguments, Screen screen, Capabilities caps, boolean undecorated) {
+ return Window.create(type, cstrArguments, screen, caps, undecorated);
+ }
+
+ /**
+ * Instantiate a Display entity using the native handle.
+ */
+ public static Display wrapDisplay(String name, AbstractGraphicsDevice device) {
+ return Display.wrapHandle(NativeWindowFactory.getNativeWindowType(true), name, device);
+ }
+
+ /**
+ * Instantiate a Screen entity using the native handle.
+ */
+ public static Screen wrapScreen(Display display, AbstractGraphicsScreen screen) {
+ return Screen.wrapHandle(NativeWindowFactory.getNativeWindowType(true), display, screen);
+ }
+
+ /**
+ * Instantiate a Window entity using the native handle.
+ */
+ public static Window wrapWindow(Screen screen, AbstractGraphicsConfiguration config,
+ long windowHandle, boolean fullscreen, boolean visible,
+ int x, int y, int width, int height) {
+ return Window.wrapHandle(NativeWindowFactory.getNativeWindowType(true), screen, config,
+ windowHandle, fullscreen, visible, x, y, width, height);
+ }
+
+ private static final boolean instanceOf(Object obj, String clazzName) {
+ Class clazz = obj.getClass();
+ do {
+ if(clazz.getName().equals(clazzName)) {
+ return true;
+ }
+ clazz = clazz.getSuperclass();
+ } while (clazz!=null);
+ return false;
+ }
+
+}
+
diff --git a/src/newt/classes/com/jogamp/javafx/newt/OffscreenWindow.java b/src/newt/classes/com/jogamp/javafx/newt/OffscreenWindow.java
new file mode 100644
index 000000000..015e9b8d2
--- /dev/null
+++ b/src/newt/classes/com/jogamp/javafx/newt/OffscreenWindow.java
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.javafx.newt;
+
+import javax.media.nativewindow.*;
+
+public class OffscreenWindow extends Window implements SurfaceChangeable {
+
+ long surfaceHandle = 0;
+
+ public OffscreenWindow() {
+ }
+
+ static long nextWindowHandle = 0x100; // start here - a marker
+
+ protected void createNative(long parentWindowHandle, Capabilities caps) {
+ if(0!=parentWindowHandle) {
+ throw new NativeWindowException("OffscreenWindow does not support window parenting");
+ }
+ if(caps.isOnscreen()) {
+ throw new NativeWindowException("Capabilities is onscreen");
+ }
+ AbstractGraphicsScreen aScreen = screen.getGraphicsScreen();
+ config = GraphicsConfigurationFactory.getFactory(aScreen.getDevice()).chooseGraphicsConfiguration(caps, null, aScreen);
+ if (config == null) {
+ throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
+ }
+
+ synchronized(OffscreenWindow.class) {
+ windowHandle = nextWindowHandle++;
+ }
+ }
+
+ protected void closeNative() {
+ // nop
+ }
+
+ public void invalidate() {
+ super.invalidate();
+ surfaceHandle = 0;
+ }
+
+ public synchronized void destroy() {
+ surfaceHandle = 0;
+ }
+
+ public void setSurfaceHandle(long handle) {
+ surfaceHandle = handle ;
+ }
+
+ public long getSurfaceHandle() {
+ return surfaceHandle;
+ }
+
+ public void setVisible(boolean visible) {
+ if(!visible) {
+ this.visible = visible;
+ }
+ }
+
+ public void setSize(int width, int height) {
+ if(!visible) {
+ this.width = width;
+ this.height = height;
+ }
+ }
+
+ public void setPosition(int x, int y) {
+ // nop
+ }
+
+ public boolean setFullscreen(boolean fullscreen) {
+ // nop
+ return false;
+ }
+}
+
diff --git a/src/newt/classes/com/jogamp/javafx/newt/PaintEvent.java b/src/newt/classes/com/jogamp/javafx/newt/PaintEvent.java
new file mode 100755
index 000000000..8543246a7
--- /dev/null
+++ b/src/newt/classes/com/jogamp/javafx/newt/PaintEvent.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.javafx.newt;
+
+/**
+ *
+ * @author tdv
+ */
+public class PaintEvent extends Event {
+
+ // bounds of the damage region
+ private int x, y, width, height;
+ public PaintEvent(int eventType, Window source,
+ long when, int x, int y, int w, int h)
+ {
+ super(true, eventType, source, when);
+ this.x = x;
+ this.y = y;
+ this.width = w;
+ this.height = h;
+ }
+
+ public int getHeight() {
+ return height;
+ }
+
+ public int getWidth() {
+ return width;
+ }
+
+ public int getX() {
+ return x;
+ }
+
+ public int getY() {
+ return y;
+ }
+
+ public String toString() {
+ return "ExposeEvent[modifiers: x="+x+" y="+y+" w="+width+" h="+height +"]";
+ }
+
+}
diff --git a/src/newt/classes/com/jogamp/javafx/newt/PaintListener.java b/src/newt/classes/com/jogamp/javafx/newt/PaintListener.java
new file mode 100755
index 000000000..adfd78f18
--- /dev/null
+++ b/src/newt/classes/com/jogamp/javafx/newt/PaintListener.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.javafx.newt;
+
+/**
+ *
+ * @author tdv
+ */
+public interface PaintListener {
+ public void exposed(PaintEvent e);
+}
diff --git a/src/newt/classes/com/jogamp/javafx/newt/Screen.java b/src/newt/classes/com/jogamp/javafx/newt/Screen.java
new file mode 100755
index 000000000..b02a7ef00
--- /dev/null
+++ b/src/newt/classes/com/jogamp/javafx/newt/Screen.java
@@ -0,0 +1,147 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.javafx.newt;
+
+import com.jogamp.javafx.newt.impl.*;
+
+import javax.media.nativewindow.*;
+import java.security.*;
+
+public abstract class Screen {
+
+ private static Class getScreenClass(String type)
+ throws ClassNotFoundException
+ {
+ Class screenClass = NewtFactory.getCustomClass(type, "Screen");
+ if(null==screenClass) {
+ if (NativeWindowFactory.TYPE_EGL.equals(type)) {
+ screenClass = Class.forName("com.jogamp.javafx.newt.opengl.kd.KDScreen");
+ } else if (NativeWindowFactory.TYPE_WINDOWS.equals(type)) {
+ screenClass = Class.forName("com.jogamp.javafx.newt.windows.WindowsScreen");
+ } else if (NativeWindowFactory.TYPE_MACOSX.equals(type)) {
+ screenClass = Class.forName("com.jogamp.javafx.newt.macosx.MacScreen");
+ } else if (NativeWindowFactory.TYPE_X11.equals(type)) {
+ screenClass = Class.forName("com.jogamp.javafx.newt.x11.X11Screen");
+ } else if (NativeWindowFactory.TYPE_AWT.equals(type)) {
+ screenClass = Class.forName("com.jogamp.javafx.newt.awt.AWTScreen");
+ } else {
+ throw new RuntimeException("Unknown window type \"" + type + "\"");
+ }
+ }
+ return screenClass;
+ }
+
+ protected static Screen create(String type, Display display, int idx) {
+ try {
+ if(usrWidth<0 || usrHeight<0) {
+ usrWidth = Debug.getIntProperty("newt.ws.swidth", true, localACC);
+ usrHeight = Debug.getIntProperty("newt.ws.sheight", true, localACC);
+ System.out.println("User screen size "+usrWidth+"x"+usrHeight);
+ }
+ Class screenClass = getScreenClass(type);
+ Screen screen = (Screen) screenClass.newInstance();
+ screen.display = display;
+ screen.createNative(idx);
+ if(null==screen.aScreen) {
+ throw new RuntimeException("Screen.createNative() failed to instanciate an AbstractGraphicsScreen");
+ }
+ return screen;
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public synchronized void destroy() {
+ closeNative();
+ display = null;
+ aScreen = null;
+ }
+
+ protected static Screen wrapHandle(String type, Display display, AbstractGraphicsScreen aScreen) {
+ try {
+ Class screenClass = getScreenClass(type);
+ Screen screen = (Screen) screenClass.newInstance();
+ screen.display = display;
+ screen.aScreen = aScreen;
+ return screen;
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ protected abstract void createNative(int index);
+ protected abstract void closeNative();
+
+ protected void setScreenSize(int w, int h) {
+ System.out.println("Detected screen size "+w+"x"+h);
+ width=w; height=h;
+ }
+
+ public Display getDisplay() {
+ return display;
+ }
+
+ public int getIndex() {
+ return aScreen.getIndex();
+ }
+
+ public AbstractGraphicsScreen getGraphicsScreen() {
+ return aScreen;
+ }
+
+ /**
+ * The actual implementation shall return the detected display value,
+ * if not we return 800.
+ * This can be overwritten with the user property 'newt.ws.swidth',
+ */
+ public int getWidth() {
+ return (usrWidth>0) ? usrWidth : (width>0) ? width : 480;
+ }
+
+ /**
+ * The actual implementation shall return the detected display value,
+ * if not we return 480.
+ * This can be overwritten with the user property 'newt.ws.sheight',
+ */
+ public int getHeight() {
+ return (usrHeight>0) ? usrHeight : (height>0) ? height : 480;
+ }
+
+ protected Display display;
+ protected AbstractGraphicsScreen aScreen;
+ protected int width=-1, height=-1; // detected values: set using setScreenSize
+ protected static int usrWidth=-1, usrHeight=-1; // property values: newt.ws.swidth and newt.ws.sheight
+ private static AccessControlContext localACC = AccessController.getContext();
+}
+
diff --git a/src/newt/classes/com/jogamp/javafx/newt/Window.java b/src/newt/classes/com/jogamp/javafx/newt/Window.java
new file mode 100755
index 000000000..2d9341e13
--- /dev/null
+++ b/src/newt/classes/com/jogamp/javafx/newt/Window.java
@@ -0,0 +1,929 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.javafx.newt;
+
+import com.jogamp.javafx.newt.impl.Debug;
+import com.jogamp.javafx.newt.util.EventDispatchThread;
+
+import javax.media.nativewindow.*;
+import com.jogamp.nativewindow.impl.NWReflection;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.lang.reflect.Method;
+
+public abstract class Window implements NativeWindow
+{
+ public static final boolean DEBUG_MOUSE_EVENT = Debug.debug("Window.MouseEvent");
+ public static final boolean DEBUG_KEY_EVENT = Debug.debug("Window.KeyEvent");
+ public static final boolean DEBUG_WINDOW_EVENT = Debug.debug("Window.WindowEvent");
+ public static final boolean DEBUG_IMPLEMENTATION = Debug.debug("Window");
+
+ // Workaround for initialization order problems on Mac OS X
+ // between native Newt and (apparently) Fmod -- if Fmod is
+ // initialized first then the connection to the window server
+ // breaks, leading to errors from deep within the AppKit
+ static void init(String type) {
+ if (NativeWindowFactory.TYPE_MACOSX.equals(type)) {
+ try {
+ getWindowClass(type);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ private static Class getWindowClass(String type)
+ throws ClassNotFoundException
+ {
+ Class windowClass = NewtFactory.getCustomClass(type, "Window");
+ if(null==windowClass) {
+ if (NativeWindowFactory.TYPE_EGL.equals(type)) {
+ windowClass = Class.forName("com.jogamp.javafx.newt.opengl.kd.KDWindow");
+ } else if (NativeWindowFactory.TYPE_WINDOWS.equals(type)) {
+ windowClass = Class.forName("com.jogamp.javafx.newt.windows.WindowsWindow");
+ } else if (NativeWindowFactory.TYPE_MACOSX.equals(type)) {
+ windowClass = Class.forName("com.jogamp.javafx.newt.macosx.MacWindow");
+ } else if (NativeWindowFactory.TYPE_X11.equals(type)) {
+ windowClass = Class.forName("com.jogamp.javafx.newt.x11.X11Window");
+ } else if (NativeWindowFactory.TYPE_AWT.equals(type)) {
+ windowClass = Class.forName("com.jogamp.javafx.newt.awt.AWTWindow");
+ } else {
+ throw new NativeWindowException("Unknown window type \"" + type + "\"");
+ }
+ }
+ return windowClass;
+ }
+
+ protected static Window create(String type, final long parentWindowHandle, Screen screen, final Capabilities caps, boolean undecorated) {
+ try {
+ Class windowClass;
+ if(caps.isOnscreen()) {
+ windowClass = getWindowClass(type);
+ } else {
+ windowClass = OffscreenWindow.class;
+ }
+ Window window = (Window) windowClass.newInstance();
+ window.invalidate();
+ window.screen = screen;
+ window.setUndecorated(undecorated||0!=parentWindowHandle);
+ EventDispatchThread edt = screen.getDisplay().getEDT();
+ if(null!=edt) {
+ final Window f_win = window;
+ edt.invokeAndWait(new Runnable() {
+ public void run() {
+ f_win.createNative(parentWindowHandle, caps);
+ }
+ } );
+ } else {
+ window.createNative(parentWindowHandle, caps);
+ }
+ return window;
+ } catch (Throwable t) {
+ t.printStackTrace();
+ throw new NativeWindowException(t);
+ }
+ }
+
+ protected static Window create(String type, Object[] cstrArguments, Screen screen, final Capabilities caps, boolean undecorated) {
+ try {
+ Class windowClass = getWindowClass(type);
+ Class[] cstrArgumentTypes = getCustomConstructorArgumentTypes(windowClass);
+ if(null==cstrArgumentTypes) {
+ throw new NativeWindowException("WindowClass "+windowClass+" doesn't support custom arguments in constructor");
+ }
+ int argsChecked = verifyConstructorArgumentTypes(cstrArgumentTypes, cstrArguments);
+ if ( argsChecked < cstrArguments.length ) {
+ throw new NativeWindowException("WindowClass "+windowClass+" constructor mismatch at argument #"+argsChecked+"; Constructor: "+getTypeStrList(cstrArgumentTypes)+", arguments: "+getArgsStrList(cstrArguments));
+ }
+ Window window = (Window) NWReflection.createInstance( windowClass, cstrArgumentTypes, cstrArguments ) ;
+ window.invalidate();
+ window.screen = screen;
+ window.setUndecorated(undecorated);
+ EventDispatchThread edt = screen.getDisplay().getEDT();
+ if(null!=edt) {
+ final Window f_win = window;
+ edt.invokeAndWait(new Runnable() {
+ public void run() {
+ f_win.createNative(0, caps);
+ }
+ } );
+ } else {
+ window.createNative(0, caps);
+ }
+ return window;
+ } catch (Throwable t) {
+ t.printStackTrace();
+ throw new NativeWindowException(t);
+ }
+ }
+
+ protected static Window wrapHandle(String type, Screen screen, AbstractGraphicsConfiguration config,
+ long windowHandle, boolean fullscreen, boolean visible,
+ int x, int y, int width, int height)
+ {
+ try {
+ Class windowClass = getWindowClass(type);
+ Window window = (Window) windowClass.newInstance();
+ window.invalidate();
+ window.screen = screen;
+ window.config = config;
+ window.windowHandle = windowHandle;
+ window.fullscreen=fullscreen;
+ window.visible=visible;
+ window.x=x;
+ window.y=y;
+ window.width=width;
+ window.height=height;
+ return window;
+ } catch (Throwable t) {
+ t.printStackTrace();
+ throw new NativeWindowException(t);
+ }
+ }
+
+ public static String toHexString(int hex) {
+ return "0x" + Integer.toHexString(hex);
+ }
+
+ public static String toHexString(long hex) {
+ return "0x" + Long.toHexString(hex);
+ }
+
+ protected Screen screen;
+
+ protected AbstractGraphicsConfiguration config;
+ protected long windowHandle;
+ protected boolean fullscreen, visible;
+ protected int width, height, x, y;
+ protected int eventMask;
+
+ protected String title = "Newt Window";
+ protected boolean undecorated = false;
+
+ /**
+ * Create native windowHandle, ie creates a new native invisible window.
+ *
+ * The parentWindowHandle may be null, in which case no window parenting
+ * is requested.
+ *
+ * Shall use the capabilities to determine the graphics configuration
+ * and shall set the chosen capabilities.
+ */
+ protected abstract void createNative(long parentWindowHandle, Capabilities caps);
+
+ protected abstract void closeNative();
+
+ public Screen getScreen() {
+ return screen;
+ }
+
+ public String toString() {
+ StringBuffer sb = new StringBuffer();
+
+ sb.append(getClass().getName()+"[config "+config+
+ ", windowHandle "+toHexString(getWindowHandle())+
+ ", surfaceHandle "+toHexString(getSurfaceHandle())+
+ ", pos "+getX()+"/"+getY()+", size "+getWidth()+"x"+getHeight()+
+ ", visible "+isVisible()+
+ ", undecorated "+undecorated+
+ ", fullscreen "+fullscreen+
+ ", "+screen+
+ ", wrappedWindow "+getWrappedWindow());
+
+ sb.append(", SurfaceUpdatedListeners num "+surfaceUpdatedListeners.size()+" [");
+ for (Iterator iter = surfaceUpdatedListeners.iterator(); iter.hasNext(); ) {
+ sb.append(iter.next()+", ");
+ }
+ sb.append("], WindowListeners num "+windowListeners.size()+" [");
+ for (Iterator iter = windowListeners.iterator(); iter.hasNext(); ) {
+ sb.append(iter.next()+", ");
+ }
+ sb.append("], MouseListeners num "+mouseListeners.size()+" [");
+ for (Iterator iter = mouseListeners.iterator(); iter.hasNext(); ) {
+ sb.append(iter.next()+", ");
+ }
+ sb.append("], KeyListeners num "+keyListeners.size()+" [");
+ for (Iterator iter = keyListeners.iterator(); iter.hasNext(); ) {
+ sb.append(iter.next()+", ");
+ }
+ sb.append("] ]");
+ return sb.toString();
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public void setUndecorated(boolean value) {
+ undecorated = value;
+ }
+
+ public boolean isUndecorated() {
+ return undecorated;
+ }
+
+ public void requestFocus() {
+ }
+
+ //
+ // NativeWindow impl
+ //
+ private Thread owner;
+ private int recursionCount;
+ protected Exception lockedStack = null;
+
+ /** Recursive and blocking lockSurface() implementation */
+ public synchronized int lockSurface() {
+ // We leave the ToolkitLock lock to the specializtion's discretion,
+ // ie the implicit JAWTWindow in case of AWTWindow
+ Thread cur = Thread.currentThread();
+ if (owner == cur) {
+ ++recursionCount;
+ return LOCK_SUCCESS;
+ }
+ while (owner != null) {
+ try {
+ wait();
+ } catch (InterruptedException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ owner = cur;
+ lockedStack = new Exception("NEWT Surface previously locked by "+Thread.currentThread());
+ screen.getDisplay().lockDisplay();
+ return LOCK_SUCCESS;
+ }
+
+ /** Recursive and unblocking unlockSurface() implementation */
+ public synchronized void unlockSurface() throws NativeWindowException {
+ Thread cur = Thread.currentThread();
+ if (owner != cur) {
+ lockedStack.printStackTrace();
+ throw new NativeWindowException(cur+": Not owner, owner is "+owner);
+ }
+ if (recursionCount > 0) {
+ --recursionCount;
+ return;
+ }
+ owner = null;
+ lockedStack = null;
+ screen.getDisplay().unlockDisplay();
+ notifyAll();
+ // We leave the ToolkitLock unlock to the specializtion's discretion,
+ // ie the implicit JAWTWindow in case of AWTWindow
+ }
+
+ public synchronized boolean isSurfaceLocked() {
+ return null!=owner;
+ }
+
+ public synchronized Thread getSurfaceLockOwner() {
+ return owner;
+ }
+
+ public synchronized Exception getLockedStack() {
+ return lockedStack;
+ }
+
+ public synchronized void destroy() {
+ destroy(false);
+ }
+
+ /** @param deep If true, the linked Screen and Display will be destroyed as well. */
+ public synchronized void destroy(boolean deep) {
+ if(DEBUG_WINDOW_EVENT) {
+ System.out.println("Window.destroy() start (deep "+deep+" - "+Thread.currentThread());
+ }
+ synchronized(surfaceUpdatedListeners) {
+ surfaceUpdatedListeners = new ArrayList();
+ }
+ synchronized(windowListeners) {
+ windowListeners = new ArrayList();
+ }
+ synchronized(mouseListeners) {
+ mouseListeners = new ArrayList();
+ }
+ synchronized(keyListeners) {
+ keyListeners = new ArrayList();
+ }
+ Screen scr = screen;
+ Display dpy = (null!=screen) ? screen.getDisplay() : null;
+ EventDispatchThread edt = (null!=dpy) ? dpy.getEDT() : null;
+ if(null!=edt) {
+ final Window f_win = this;
+ edt.invokeAndWait(new Runnable() {
+ public void run() {
+ f_win.closeNative();
+ }
+ } );
+ } else {
+ closeNative();
+ }
+ invalidate();
+ if(deep) {
+ if(null!=scr) {
+ scr.destroy();
+ }
+ if(null!=dpy) {
+ dpy.destroy();
+ }
+ }
+ if(DEBUG_WINDOW_EVENT) {
+ System.out.println("Window.destroy() end "+Thread.currentThread());
+ }
+ }
+
+ public void invalidate() {
+ if(DEBUG_IMPLEMENTATION || DEBUG_WINDOW_EVENT) {
+ Exception e = new Exception("!!! Window Invalidate "+Thread.currentThread());
+ e.printStackTrace();
+ }
+ screen = null;
+ windowHandle = 0;
+ fullscreen=false;
+ visible=false;
+ eventMask = 0;
+
+ // Default position and dimension will be re-set immediately by user
+ width = 100;
+ height = 100;
+ x=0;
+ y=0;
+ }
+
+ public boolean surfaceSwap() {
+ return false;
+ }
+
+ protected void clearEventMask() {
+ eventMask=0;
+ }
+
+ public long getDisplayHandle() {
+ return screen.getDisplay().getHandle();
+ }
+
+ public int getScreenIndex() {
+ return screen.getIndex();
+ }
+
+ public long getWindowHandle() {
+ return windowHandle;
+ }
+
+ public long getSurfaceHandle() {
+ return windowHandle; // default: return window handle
+ }
+
+ public AbstractGraphicsConfiguration getGraphicsConfiguration() {
+ return config;
+ }
+
+ /**
+ * Returns the width of the client area of this window
+ * @return width of the client area
+ */
+ public int getWidth() {
+ return width;
+ }
+
+ /**
+ * Returns the height of the client area of this window
+ * @return height of the client area
+ */
+ public int getHeight() {
+ return height;
+ }
+
+ /**
+ * Returns the insets for this native window (the difference between the
+ * size of the toplevel window with the decorations and the client area).
+ *
+ * @return insets for this platform window
+ */
+ // this probably belongs to NativeWindow interface
+ public Insets getInsets() {
+ return new Insets(0,0,0,0);
+ }
+
+ /** If this Window actually wraps one from another toolkit such as
+ the AWT, this will return a non-null value. */
+ public Object getWrappedWindow() {
+ return null;
+ }
+
+ //
+ // Additional methods
+ //
+
+ public int getX() {
+ return x;
+ }
+
+ public int getY() {
+ return y;
+ }
+
+ public boolean isVisible() {
+ return visible;
+ }
+
+ public boolean isFullscreen() {
+ return fullscreen;
+ }
+
+ private boolean autoDrawableMember = false;
+
+ /** If the implementation is capable of detecting a device change
+ return true and clear the status/reason of the change. */
+ public boolean hasDeviceChanged() {
+ return false;
+ }
+
+ /**
+ * If set to true,
+ * certain action will be performed by the owning
+ * AutoDrawable, ie the destroy() call within windowDestroyNotify()
+ */
+ public void setAutoDrawableClient(boolean b) {
+ autoDrawableMember = b;
+ }
+
+ protected void windowDestroyNotify() {
+ if(DEBUG_WINDOW_EVENT) {
+ System.out.println("Window.windowDestroyeNotify start "+Thread.currentThread());
+ }
+
+ sendWindowEvent(WindowEvent.EVENT_WINDOW_DESTROY_NOTIFY);
+
+ if(!autoDrawableMember) {
+ destroy();
+ }
+
+ if(DEBUG_WINDOW_EVENT) {
+ System.out.println("Window.windowDestroyeNotify end "+Thread.currentThread());
+ }
+ }
+
+ protected void windowDestroyed() {
+ if(DEBUG_WINDOW_EVENT) {
+ System.out.println("Window.windowDestroyed "+Thread.currentThread());
+ }
+ invalidate();
+ }
+
+ public abstract void setVisible(boolean visible);
+ /**
+ * Sets the size of the client area of the window, excluding decorations
+ * Total size of the window will be
+ * {@code width+insets.left+insets.right, height+insets.top+insets.bottom}
+ * @param width of the client area of the window
+ * @param height of the client area of the window
+ */
+ public abstract void setSize(int width, int height);
+ /**
+ * Sets the location of the top left corner of the window, including
+ * decorations (so the client area will be placed at
+ * {@code x+insets.left,y+insets.top}.
+ * @param x coord of the top left corner
+ * @param y coord of the top left corner
+ */
+ public abstract void setPosition(int x, int y);
+ public abstract boolean setFullscreen(boolean fullscreen);
+
+ //
+ // SurfaceUpdatedListener Support
+ //
+ private ArrayList surfaceUpdatedListeners = new ArrayList();
+
+ public void addSurfaceUpdatedListener(SurfaceUpdatedListener l) {
+ if(l == null) {
+ return;
+ }
+ synchronized(surfaceUpdatedListeners) {
+ ArrayList newSurfaceUpdatedListeners = (ArrayList) surfaceUpdatedListeners.clone();
+ newSurfaceUpdatedListeners.add(l);
+ surfaceUpdatedListeners = newSurfaceUpdatedListeners;
+ }
+ }
+
+ public void removeSurfaceUpdatedListener(SurfaceUpdatedListener l) {
+ if (l == null) {
+ return;
+ }
+ synchronized(surfaceUpdatedListeners) {
+ ArrayList newSurfaceUpdatedListeners = (ArrayList) surfaceUpdatedListeners.clone();
+ newSurfaceUpdatedListeners.remove(l);
+ surfaceUpdatedListeners = newSurfaceUpdatedListeners;
+ }
+ }
+
+ public SurfaceUpdatedListener[] getSurfaceUpdatedListener() {
+ synchronized(surfaceUpdatedListeners) {
+ return (SurfaceUpdatedListener[]) surfaceUpdatedListeners.toArray();
+ }
+ }
+
+ public void surfaceUpdated(Object updater, NativeWindow window, long when) {
+ ArrayList listeners = null;
+ synchronized(surfaceUpdatedListeners) {
+ listeners = surfaceUpdatedListeners;
+ }
+ for(Iterator i = listeners.iterator(); i.hasNext(); ) {
+ SurfaceUpdatedListener l = (SurfaceUpdatedListener) i.next();
+ l.surfaceUpdated(updater, window, when);
+ }
+ }
+
+ //
+ // MouseListener Support
+ //
+
+ public void addMouseListener(MouseListener l) {
+ if(l == null) {
+ return;
+ }
+ synchronized(mouseListeners) {
+ ArrayList newMouseListeners = (ArrayList) mouseListeners.clone();
+ newMouseListeners.add(l);
+ mouseListeners = newMouseListeners;
+ }
+ }
+
+ public void removeMouseListener(MouseListener l) {
+ if (l == null) {
+ return;
+ }
+ synchronized(mouseListeners) {
+ ArrayList newMouseListeners = (ArrayList) mouseListeners.clone();
+ newMouseListeners.remove(l);
+ mouseListeners = newMouseListeners;
+ }
+ }
+
+ public MouseListener[] getMouseListeners() {
+ synchronized(mouseListeners) {
+ return (MouseListener[]) mouseListeners.toArray();
+ }
+ }
+
+ private ArrayList mouseListeners = new ArrayList();
+ private int mouseButtonPressed = 0; // current pressed mouse button number
+ private long lastMousePressed = 0; // last time when a mouse button was pressed
+ private int lastMouseClickCount = 0; // last mouse button click count
+ public static final int ClickTimeout = 300;
+
+ protected void sendMouseEvent(int eventType, int modifiers,
+ int x, int y, int button, int rotation) {
+ if(x<0||y<0||x>=width||y>=height) {
+ return; // .. invalid ..
+ }
+ if(DEBUG_MOUSE_EVENT) {
+ System.out.println("sendMouseEvent: "+MouseEvent.getEventTypeString(eventType)+
+ ", mod "+modifiers+", pos "+x+"/"+y+", button "+button);
+ }
+ if(button<0||button>MouseEvent.BUTTON_NUMBER) {
+ throw new NativeWindowException("Invalid mouse button number" + button);
+ }
+ long when = System.currentTimeMillis();
+ MouseEvent eClicked = null;
+ MouseEvent e = null;
+
+ if(MouseEvent.EVENT_MOUSE_PRESSED==eventType) {
+ if(when-lastMousePressed
+ * before calling the various input EventListener callbacks (MouseListener, KeyListener,
+ * etc.).
+ * This design decision is made to favor a more performant and simplified
+ * implementation, as well as the event dispatcher shall be allowed
+ * not having a notion about OpenGL.
+ *
+ * Enable or disables running the {@link Display#pumpMessages} in the {@link #display()} call.
+ * The default behavior is to run {@link Display#pumpMessages}.
+ * This could not have been verified. No measurable difference could have been recognized.
+ *
+ * Enabling local pump messages while using the EDT,
+ * {@link com.jogamp.javafx.newt.NewtFactory#setUseEDT(boolean)},
+ * will result in an exception.
+ *
+ * @deprecated EXPERIMENTAL, semantic is about to be removed after further verification.
+ */
+ public void setRunPumpMessages(boolean onoff) {
+ if( onoff && null!=getScreen().getDisplay().getEDT() ) {
+ throw new GLException("GLWindow.setRunPumpMessages(true) - Can't do with EDT on");
+ }
+ runPumpMessages = onoff;
+ }
+
+ protected void createNative(long parentWindowHandle, Capabilities caps) {
+ shouldNotCallThis();
+ }
+
+ protected void closeNative() {
+ shouldNotCallThis();
+ }
+
+ protected void dispose(boolean regenerate, boolean sendEvent) {
+ if(Window.DEBUG_WINDOW_EVENT || window.DEBUG_IMPLEMENTATION) {
+ Exception e1 = new Exception("GLWindow.dispose("+regenerate+") "+Thread.currentThread()+", 1");
+ e1.printStackTrace();
+ }
+
+ if(sendEvent) {
+ sendDisposeEvent();
+ }
+
+ if (context != null) {
+ context.destroy();
+ }
+ if (drawable != null) {
+ drawable.setRealized(false);
+ }
+
+ if(regenerate) {
+ if(null==window) {
+ throw new GLException("GLWindow.dispose(true): null window");
+ }
+
+ // recreate GLDrawable, to reflect the new graphics configurations
+ NativeWindow nw;
+ if (window.getWrappedWindow() != null) {
+ nw = NativeWindowFactory.getNativeWindow(window.getWrappedWindow(), window.getGraphicsConfiguration());
+ } else {
+ nw = window;
+ }
+ drawable = factory.createGLDrawable(nw);
+ drawable.setRealized(true);
+ context = drawable.createContext(null);
+ sendReshape = true; // ensure a reshape event is send ..
+ }
+
+ if(Window.DEBUG_WINDOW_EVENT || window.DEBUG_IMPLEMENTATION) {
+ System.out.println("GLWindow.dispose("+regenerate+") "+Thread.currentThread()+", fin: "+this);
+ }
+ }
+
+ public synchronized void destroy() {
+ destroy(true);
+ }
+
+ /** @param sendDisposeEvent should be false in a [time,reliable] critical shutdown */
+ public synchronized void destroy(boolean sendDisposeEvent) {
+ if(Window.DEBUG_WINDOW_EVENT || window.DEBUG_IMPLEMENTATION) {
+ Exception e1 = new Exception("GLWindow.destroy "+Thread.currentThread()+", 1: "+this);
+ e1.printStackTrace();
+ }
+
+ List newglw = (List) ((ArrayList) glwindows).clone();
+ newglw.remove(this);
+ glwindows=newglw;
+
+ dispose(false, sendDisposeEvent);
+
+ if(null!=window) {
+ if(ownerOfWinScrDpy) {
+ window.destroy(true);
+ }
+ }
+
+ drawable = null;
+ context = null;
+ window = null;
+
+ if(Window.DEBUG_WINDOW_EVENT || window.DEBUG_IMPLEMENTATION) {
+ System.out.println("GLWindow.destroy "+Thread.currentThread()+", fin: "+this);
+ }
+ }
+
+ public boolean getPerfLogEnabled() { return perfLog; }
+
+ public void enablePerfLog(boolean v) {
+ perfLog = v;
+ }
+
+ public void setVisible(boolean visible) {
+ if(Window.DEBUG_WINDOW_EVENT || window.DEBUG_IMPLEMENTATION) {
+ System.out.println(Thread.currentThread()+" GLWindow.setVisible("+visible+") START ; isVisible "+this.visible+" ; has context "+(null!=context));
+ }
+ this.visible=visible;
+ window.setVisible(visible);
+ if (visible && context == null) {
+ NativeWindow nw;
+ if (window.getWrappedWindow() != null) {
+ nw = NativeWindowFactory.getNativeWindow(window.getWrappedWindow(), window.getGraphicsConfiguration());
+ } else {
+ nw = window;
+ }
+ GLCapabilities glCaps = (GLCapabilities) nw.getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities();
+ factory = GLDrawableFactory.getFactory(glCaps.getGLProfile());
+ drawable = factory.createGLDrawable(nw);
+ drawable.setRealized(true);
+ context = drawable.createContext(null);
+ sendReshape = true; // ensure a reshape event is send ..
+ }
+ if(Window.DEBUG_WINDOW_EVENT || window.DEBUG_IMPLEMENTATION) {
+ System.out.println(Thread.currentThread()+" GLWindow.setVisible("+visible+") END ; has context "+(null!=context));
+ }
+ }
+
+ public Screen getScreen() {
+ return window.getScreen();
+ }
+
+ public void setTitle(String title) {
+ window.setTitle(title);
+ }
+
+ public String getTitle() {
+ return window.getTitle();
+ }
+
+ public void setUndecorated(boolean value) {
+ window.setUndecorated(value);
+ }
+
+ public boolean isUndecorated() {
+ return window.isUndecorated();
+ }
+
+ public void setSize(int width, int height) {
+ window.setSize(width, height);
+ }
+
+ public void setPosition(int x, int y) {
+ window.setPosition(x, y);
+ }
+
+ public Insets getInsets() {
+ return window.getInsets();
+ }
+
+ public boolean setFullscreen(boolean fullscreen) {
+ return window.setFullscreen(fullscreen);
+ }
+
+ public boolean isVisible() {
+ return window.isVisible();
+ }
+
+ public int getX() {
+ return window.getX();
+ }
+
+ public int getY() {
+ return window.getY();
+ }
+
+ public int getWidth() {
+ return window.getWidth();
+ }
+
+ public int getHeight() {
+ return window.getHeight();
+ }
+
+ public boolean isFullscreen() {
+ return window.isFullscreen();
+ }
+
+ public void addSurfaceUpdatedListener(SurfaceUpdatedListener l) {
+ window.addSurfaceUpdatedListener(l);
+ }
+ public void removeSurfaceUpdatedListener(SurfaceUpdatedListener l) {
+ window.removeSurfaceUpdatedListener(l);
+ }
+ public SurfaceUpdatedListener[] getSurfaceUpdatedListener() {
+ return window.getSurfaceUpdatedListener();
+ }
+ public void surfaceUpdated(Object updater, NativeWindow window0, long when) {
+ window.surfaceUpdated(updater, window, when);
+ }
+
+ public void addMouseListener(MouseListener l) {
+ window.addMouseListener(l);
+ }
+
+ public void removeMouseListener(MouseListener l) {
+ window.removeMouseListener(l);
+ }
+
+ public MouseListener[] getMouseListeners() {
+ return window.getMouseListeners();
+ }
+
+ public void addKeyListener(KeyListener l) {
+ window.addKeyListener(l);
+ }
+
+ public void removeKeyListener(KeyListener l) {
+ window.removeKeyListener(l);
+ }
+
+ public KeyListener[] getKeyListeners() {
+ return window.getKeyListeners();
+ }
+
+ public void addWindowListener(WindowListener l) {
+ window.addWindowListener(l);
+ }
+
+ public void removeWindowListener(WindowListener l) {
+ window.removeWindowListener(l);
+ }
+
+ public WindowListener[] getWindowListeners() {
+ return window.getWindowListeners();
+ }
+
+ public String toString() {
+ return "NEWT-GLWindow[ \n\tDrawable: "+drawable+", \n\tWindow: "+window+", \n\tHelper: "+helper+", \n\tFactory: "+factory+"]";
+ }
+
+ //----------------------------------------------------------------------
+ // OpenGL-related methods and state
+ //
+
+ private GLDrawableFactory factory;
+ private GLDrawable drawable;
+ private GLContext context;
+ private GLDrawableHelper helper = new GLDrawableHelper();
+ // To make reshape events be sent immediately before a display event
+ private boolean sendReshape=false;
+ private boolean sendDestroy=false;
+ private boolean perfLog = false;
+
+ public GLDrawableFactory getFactory() {
+ return factory;
+ }
+
+ public void setContext(GLContext newCtx) {
+ context = newCtx;
+ }
+
+ public GLContext getContext() {
+ return context;
+ }
+
+ public GL getGL() {
+ if (context == null) {
+ return null;
+ }
+ return context.getGL();
+ }
+
+ public GL setGL(GL gl) {
+ if (context != null) {
+ context.setGL(gl);
+ return gl;
+ }
+ return null;
+ }
+
+ public void addGLEventListener(GLEventListener listener) {
+ helper.addGLEventListener(listener);
+ }
+
+ public void removeGLEventListener(GLEventListener listener) {
+ helper.removeGLEventListener(listener);
+ }
+
+ public void display() {
+ display(false);
+ }
+
+ public void display(boolean forceReshape) {
+ if(window!=null && drawable!=null && context != null) {
+ if(runPumpMessages) {
+ window.getScreen().getDisplay().pumpMessages();
+ }
+ if(window.hasDeviceChanged() && GLAutoDrawable.SCREEN_CHANGE_ACTION_ENABLED) {
+ dispose(true, true);
+ }
+ if (sendDestroy) {
+ destroy();
+ sendDestroy=false;
+ } else {
+ if(forceReshape) {
+ sendReshape = true;
+ }
+ helper.invokeGL(drawable, context, displayAction, initAction);
+ }
+ }
+ }
+
+ private void sendDisposeEvent() {
+ if(drawable!=null && context != null) {
+ helper.invokeGL(drawable, context, disposeAction, null);
+ }
+ }
+
+ /** This implementation uses a static value */
+ public void setAutoSwapBufferMode(boolean onOrOff) {
+ helper.setAutoSwapBufferMode(onOrOff);
+ }
+
+ /** This implementation uses a static value */
+ public boolean getAutoSwapBufferMode() {
+ return helper.getAutoSwapBufferMode();
+ }
+
+ public void swapBuffers() {
+ if(drawable!=null && context != null) {
+ if (context != GLContext.getCurrent()) {
+ // Assume we should try to make the context current before swapping the buffers
+ helper.invokeGL(drawable, context, swapBuffersAction, initAction);
+ } else {
+ drawable.swapBuffers();
+ }
+ }
+ }
+
+ class InitAction implements Runnable {
+ public void run() {
+ helper.init(GLWindow.this);
+ startTime = System.currentTimeMillis();
+ curTime = startTime;
+ if(perfLog) {
+ lastCheck = startTime;
+ totalFrames = 0; lastFrames = 0;
+ }
+ }
+ }
+ private InitAction initAction = new InitAction();
+
+ class DisposeAction implements Runnable {
+ public void run() {
+ helper.dispose(GLWindow.this);
+ }
+ }
+ private DisposeAction disposeAction = new DisposeAction();
+
+ class DisplayAction implements Runnable {
+ public void run() {
+ if (sendReshape) {
+ int width = getWidth();
+ int height = getHeight();
+ getGL().glViewport(0, 0, width, height);
+ helper.reshape(GLWindow.this, 0, 0, width, height);
+ sendReshape = false;
+ }
+
+ helper.display(GLWindow.this);
+
+ curTime = System.currentTimeMillis();
+ totalFrames++;
+
+ if(perfLog) {
+ long dt0, dt1;
+ lastFrames++;
+ dt0 = curTime-lastCheck;
+ if ( dt0 > 5000 ) {
+ dt1 = curTime-startTime;
+ System.out.println(dt0/1000 +"s: "+ lastFrames + "f, " + (lastFrames*1000)/dt0 + " fps, "+dt0/lastFrames+" ms/f; "+
+ "total: "+ dt1/1000+"s, "+(totalFrames*1000)/dt1 + " fps, "+dt1/totalFrames+" ms/f");
+ lastCheck=curTime;
+ lastFrames=0;
+ }
+ }
+ }
+ }
+ private DisplayAction displayAction = new DisplayAction();
+
+ public long getStartTime() { return startTime; }
+ public long getCurrentTime() { return curTime; }
+ public long getDuration() { return curTime-startTime; }
+ public int getTotalFrames() { return totalFrames; }
+
+ private long startTime = 0;
+ private long curTime = 0;
+ private long lastCheck = 0;
+ private int totalFrames = 0, lastFrames = 0;
+
+ class SwapBuffersAction implements Runnable {
+ public void run() {
+ drawable.swapBuffers();
+ }
+ }
+ private SwapBuffersAction swapBuffersAction = new SwapBuffersAction();
+
+ //----------------------------------------------------------------------
+ // GLDrawable methods
+ //
+
+ public NativeWindow getNativeWindow() {
+ return null!=drawable ? drawable.getNativeWindow() : null;
+ }
+
+ public synchronized int lockSurface() throws NativeWindowException {
+ if(null!=drawable) return drawable.getNativeWindow().lockSurface();
+ return NativeWindow.LOCK_SURFACE_NOT_READY;
+ }
+
+ public synchronized void unlockSurface() {
+ if(null!=drawable) drawable.getNativeWindow().unlockSurface();
+ else throw new NativeWindowException("NEWT-GLWindow not locked");
+ }
+
+ public synchronized boolean isSurfaceLocked() {
+ if(null!=drawable) return drawable.getNativeWindow().isSurfaceLocked();
+ return false;
+ }
+
+ public synchronized Exception getLockedStack() {
+ if(null!=drawable) return drawable.getNativeWindow().getLockedStack();
+ return null;
+ }
+
+ public boolean surfaceSwap() {
+ if(null!=drawable) return drawable.getNativeWindow().surfaceSwap();
+ return super.surfaceSwap();
+ }
+
+ public long getWindowHandle() {
+ if(null!=drawable) return drawable.getNativeWindow().getWindowHandle();
+ return super.getWindowHandle();
+ }
+
+ public long getSurfaceHandle() {
+ if(null!=drawable) return drawable.getNativeWindow().getSurfaceHandle();
+ return super.getSurfaceHandle();
+ }
+
+ //----------------------------------------------------------------------
+ // GLDrawable methods that are not really needed
+ //
+
+ public GLContext createContext(GLContext shareWith) {
+ return drawable.createContext(shareWith);
+ }
+
+ public void setRealized(boolean realized) {
+ }
+
+ public GLCapabilities getChosenGLCapabilities() {
+ if (drawable == null) {
+ throw new GLException("No drawable yet");
+ }
+
+ return drawable.getChosenGLCapabilities();
+ }
+
+ public GLProfile getGLProfile() {
+ if (drawable == null) {
+ throw new GLException("No drawable yet");
+ }
+
+ return drawable.getGLProfile();
+ }
+
+ //----------------------------------------------------------------------
+ // Internals only below this point
+ //
+
+ private void shouldNotCallThis() {
+ throw new NativeWindowException("Should not call this");
+ }
+}
diff --git a/src/newt/classes/com/jogamp/javafx/newt/opengl/broadcom/egl/Display.java b/src/newt/classes/com/jogamp/javafx/newt/opengl/broadcom/egl/Display.java
new file mode 100644
index 000000000..c0c1ee5fd
--- /dev/null
+++ b/src/newt/classes/com/jogamp/javafx/newt/opengl/broadcom/egl/Display.java
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.javafx.newt.opengl.broadcom.egl;
+
+import com.jogamp.javafx.newt.impl.*;
+import com.jogamp.opengl.impl.egl.*;
+import javax.media.nativewindow.*;
+import javax.media.nativewindow.egl.*;
+
+public class Display extends com.jogamp.javafx.newt.Display {
+
+ static {
+ NativeLibLoader.loadNEWT();
+
+ if (!Window.initIDs()) {
+ throw new NativeWindowException("Failed to initialize BCEGL Window jmethodIDs");
+ }
+ }
+
+ public static void initSingleton() {
+ // just exist to ensure static init has been run
+ }
+
+
+ public Display() {
+ }
+
+ protected void createNative() {
+ long handle = CreateDisplay(Screen.fixedWidth, Screen.fixedHeight);
+ if (handle == EGL.EGL_NO_DISPLAY) {
+ throw new NativeWindowException("BC EGL CreateDisplay failed");
+ }
+ aDevice = new EGLGraphicsDevice(handle);
+ }
+
+ protected void closeNative() {
+ if (aDevice.getHandle() != EGL.EGL_NO_DISPLAY) {
+ DestroyDisplay(aDevice.getHandle());
+ }
+ }
+
+ protected void dispatchMessages() {
+ // n/a .. DispatchMessages();
+ }
+
+ private native long CreateDisplay(int width, int height);
+ private native void DestroyDisplay(long dpy);
+ private native void DispatchMessages();
+}
+
diff --git a/src/newt/classes/com/jogamp/javafx/newt/opengl/broadcom/egl/Screen.java b/src/newt/classes/com/jogamp/javafx/newt/opengl/broadcom/egl/Screen.java
new file mode 100755
index 000000000..f7abe3836
--- /dev/null
+++ b/src/newt/classes/com/jogamp/javafx/newt/opengl/broadcom/egl/Screen.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.javafx.newt.opengl.broadcom.egl;
+
+import com.jogamp.javafx.newt.impl.*;
+import javax.media.nativewindow.*;
+
+public class Screen extends com.jogamp.javafx.newt.Screen {
+
+ static {
+ Display.initSingleton();
+ }
+
+
+ public Screen() {
+ }
+
+ protected void createNative(int index) {
+ aScreen = new DefaultGraphicsScreen(getDisplay().getGraphicsDevice(), index);
+ setScreenSize(fixedWidth, fixedHeight);
+ }
+
+ protected void closeNative() { }
+
+ //----------------------------------------------------------------------
+ // Internals only
+ //
+
+ static final int fixedWidth = 1920;
+ static final int fixedHeight = 1080;
+}
+
diff --git a/src/newt/classes/com/jogamp/javafx/newt/opengl/broadcom/egl/Window.java b/src/newt/classes/com/jogamp/javafx/newt/opengl/broadcom/egl/Window.java
new file mode 100755
index 000000000..bd2d7930e
--- /dev/null
+++ b/src/newt/classes/com/jogamp/javafx/newt/opengl/broadcom/egl/Window.java
@@ -0,0 +1,156 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.javafx.newt.opengl.broadcom.egl;
+
+import com.jogamp.javafx.newt.impl.*;
+import com.jogamp.opengl.impl.egl.*;
+import javax.media.nativewindow.*;
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLProfile;
+import javax.media.nativewindow.NativeWindowException;
+
+public class Window extends com.jogamp.javafx.newt.Window {
+ static {
+ Display.initSingleton();
+ }
+
+ public Window() {
+ }
+
+ protected void createNative(long parentWindowHandle, Capabilities caps) {
+ if(0!=parentWindowHandle) {
+ throw new RuntimeException("Window parenting not supported (yet)");
+ }
+ // query a good configuration .. even thought we drop this one
+ // and reuse the EGLUtil choosen one later.
+ config = GraphicsConfigurationFactory.getFactory(getScreen().getDisplay().getGraphicsDevice()).chooseGraphicsConfiguration(caps, null, getScreen().getGraphicsScreen());
+ if (config == null) {
+ throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
+ }
+ setSizeImpl(getScreen().getWidth(), getScreen().getHeight());
+ }
+
+ protected void closeNative() {
+ if(0!=windowHandleClose) {
+ CloseWindow(getDisplayHandle(), windowHandleClose);
+ }
+ }
+
+ public void setVisible(boolean visible) {
+ if(this.visible!=visible) {
+ this.visible=visible;
+ if ( 0==windowHandle ) {
+ windowHandle = realizeWindow(true, width, height);
+ if (0 == windowHandle) {
+ throw new NativeWindowException("Error native Window Handle is null");
+ }
+ }
+ clearEventMask();
+ }
+ }
+
+ public void setSize(int width, int height) {
+ System.err.println("setSize "+width+"x"+height+" n/a in BroadcomEGL");
+ }
+
+ void setSizeImpl(int width, int height) {
+ if(0!=windowHandle) {
+ // n/a in BroadcomEGL
+ System.err.println("BCEGL Window.setSizeImpl n/a in BroadcomEGL with realized window");
+ } else {
+ if(DEBUG_IMPLEMENTATION) {
+ Exception e = new Exception("BCEGL Window.setSizeImpl() "+this.width+"x"+this.height+" -> "+width+"x"+height);
+ e.printStackTrace();
+ }
+ this.width = width;
+ this.height = height;
+ }
+ }
+
+ public void setPosition(int x, int y) {
+ // n/a in BroadcomEGL
+ System.err.println("setPosition n/a in BroadcomEGL");
+ }
+
+ public boolean setFullscreen(boolean fullscreen) {
+ // n/a in BroadcomEGL
+ System.err.println("setFullscreen n/a in BroadcomEGL");
+ return false;
+ }
+
+ public boolean surfaceSwap() {
+ if ( 0!=windowHandle ) {
+ SwapWindow(getDisplayHandle(), windowHandle);
+ return true;
+ }
+ return false;
+ }
+
+ //----------------------------------------------------------------------
+ // Internals only
+ //
+
+ protected static native boolean initIDs();
+ private native long CreateWindow(long eglDisplayHandle, boolean chromaKey, int width, int height);
+ private native void CloseWindow(long eglDisplayHandle, long eglWindowHandle);
+ private native void SwapWindow(long eglDisplayHandle, long eglWindowHandle);
+
+
+ private long realizeWindow(boolean chromaKey, int width, int height) {
+ if(DEBUG_IMPLEMENTATION) {
+ System.out.println("BCEGL Window.realizeWindow() with: chroma "+chromaKey+", "+width+"x"+height+", "+config);
+ }
+ long handle = CreateWindow(getDisplayHandle(), chromaKey, width, height);
+ if (0 == handle) {
+ throw new NativeWindowException("Error native Window Handle is null");
+ }
+ windowHandleClose = handle;
+ return handle;
+ }
+
+ private void windowCreated(int cfgID, int width, int height) {
+ this.width = width;
+ this.height = height;
+ GLCapabilities capsReq = (GLCapabilities) config.getRequestedCapabilities();
+ config = EGLGraphicsConfiguration.create(capsReq, screen.getGraphicsScreen(), cfgID);
+ if (config == null) {
+ throw new NativeWindowException("Error creating EGLGraphicsConfiguration from id: "+cfgID+", "+this);
+ }
+ if(DEBUG_IMPLEMENTATION) {
+ System.out.println("BCEGL Window.windowCreated(): "+toHexString(cfgID)+", "+width+"x"+height+", "+config);
+ }
+ }
+
+ private long windowHandleClose;
+}
diff --git a/src/newt/classes/com/jogamp/javafx/newt/opengl/kd/KDDisplay.java b/src/newt/classes/com/jogamp/javafx/newt/opengl/kd/KDDisplay.java
new file mode 100755
index 000000000..40a37115d
--- /dev/null
+++ b/src/newt/classes/com/jogamp/javafx/newt/opengl/kd/KDDisplay.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.javafx.newt.opengl.kd;
+
+import com.jogamp.javafx.newt.*;
+import com.jogamp.javafx.newt.impl.*;
+import com.jogamp.opengl.impl.egl.*;
+import javax.media.nativewindow.*;
+import javax.media.nativewindow.egl.*;
+
+public class KDDisplay extends Display {
+
+ static {
+ NativeLibLoader.loadNEWT();
+
+ if (!KDWindow.initIDs()) {
+ throw new NativeWindowException("Failed to initialize KDWindow jmethodIDs");
+ }
+ }
+
+ public static void initSingleton() {
+ // just exist to ensure static init has been run
+ }
+
+
+ public KDDisplay() {
+ }
+
+ protected void createNative() {
+ // FIXME: map name to EGL_*_DISPLAY
+ long handle = EGL.eglGetDisplay(EGL.EGL_DEFAULT_DISPLAY);
+ if (handle == EGL.EGL_NO_DISPLAY) {
+ throw new NativeWindowException("eglGetDisplay failed");
+ }
+ if (!EGL.eglInitialize(handle, null, null)) {
+ throw new NativeWindowException("eglInitialize failed");
+ }
+ aDevice = new EGLGraphicsDevice(handle);
+ }
+
+ protected void closeNative() {
+ if (aDevice.getHandle() != EGL.EGL_NO_DISPLAY) {
+ EGL.eglTerminate(aDevice.getHandle());
+ }
+ }
+
+ protected void dispatchMessages() {
+ DispatchMessages();
+ }
+
+ private native void DispatchMessages();
+}
+
diff --git a/src/newt/classes/com/jogamp/javafx/newt/opengl/kd/KDScreen.java b/src/newt/classes/com/jogamp/javafx/newt/opengl/kd/KDScreen.java
new file mode 100755
index 000000000..4bc7f8257
--- /dev/null
+++ b/src/newt/classes/com/jogamp/javafx/newt/opengl/kd/KDScreen.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.javafx.newt.opengl.kd;
+
+import com.jogamp.javafx.newt.*;
+import javax.media.nativewindow.*;
+
+public class KDScreen extends Screen {
+ static {
+ KDDisplay.initSingleton();
+ }
+
+ public KDScreen() {
+ }
+
+ protected void createNative(int index) {
+ aScreen = new DefaultGraphicsScreen(getDisplay().getGraphicsDevice(), index);
+ }
+
+ protected void closeNative() { }
+
+ // elevate access to this package ..
+ protected void setScreenSize(int w, int h) {
+ super.setScreenSize(w, h);
+ }
+}
diff --git a/src/newt/classes/com/jogamp/javafx/newt/opengl/kd/KDWindow.java b/src/newt/classes/com/jogamp/javafx/newt/opengl/kd/KDWindow.java
new file mode 100755
index 000000000..d5be2207c
--- /dev/null
+++ b/src/newt/classes/com/jogamp/javafx/newt/opengl/kd/KDWindow.java
@@ -0,0 +1,153 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.javafx.newt.opengl.kd;
+
+import com.jogamp.javafx.newt.*;
+import com.jogamp.javafx.newt.impl.*;
+import com.jogamp.opengl.impl.egl.*;
+import javax.media.nativewindow.*;
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLProfile;
+import javax.media.nativewindow.NativeWindowException;
+
+public class KDWindow extends Window {
+ private static final String WINDOW_CLASS_NAME = "NewtWindow";
+ // non fullscreen dimensions ..
+ private int nfs_width, nfs_height, nfs_x, nfs_y;
+
+ static {
+ KDDisplay.initSingleton();
+ }
+
+ public KDWindow() {
+ }
+
+ protected void createNative(long parentWindowHandle, Capabilities caps) {
+ if(0!=parentWindowHandle) {
+ throw new RuntimeException("Window parenting not supported (yet)");
+ }
+ config = GraphicsConfigurationFactory.getFactory(getScreen().getDisplay().getGraphicsDevice()).chooseGraphicsConfiguration(caps, null, getScreen().getGraphicsScreen());
+ if (config == null) {
+ throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
+ }
+
+ GLCapabilities eglCaps = (GLCapabilities)config.getChosenCapabilities();
+ int[] eglAttribs = EGLGraphicsConfiguration.GLCapabilities2AttribList(eglCaps);
+
+ windowHandle = 0;
+ eglWindowHandle = CreateWindow(getDisplayHandle(), eglAttribs);
+ if (eglWindowHandle == 0) {
+ throw new NativeWindowException("Error creating egl window: "+config);
+ }
+ setVisible0(eglWindowHandle, false);
+ windowHandleClose = eglWindowHandle;
+ }
+
+ protected void closeNative() {
+ if(0!=windowHandleClose) {
+ CloseWindow(windowHandleClose, windowUserData);
+ windowUserData=0;
+ }
+ }
+
+ public void setVisible(boolean visible) {
+ if(0!=eglWindowHandle && this.visible!=visible) {
+ this.visible=visible;
+ setVisible0(eglWindowHandle, visible);
+ if ( 0==windowHandle ) {
+ windowHandle = RealizeWindow(eglWindowHandle);
+ if (0 == windowHandle) {
+ throw new NativeWindowException("Error native Window Handle is null");
+ }
+ }
+ clearEventMask();
+ }
+ }
+
+ public void setSize(int width, int height) {
+ if(0!=eglWindowHandle) {
+ setSize0(eglWindowHandle, width, height);
+ }
+ }
+
+ public void setPosition(int x, int y) {
+ // n/a in KD
+ System.err.println("setPosition n/a in KD");
+ }
+
+ public boolean setFullscreen(boolean fullscreen) {
+ if(0!=eglWindowHandle && this.fullscreen!=fullscreen) {
+ this.fullscreen=fullscreen;
+ if(this.fullscreen) {
+ setFullScreen0(eglWindowHandle, true);
+ } else {
+ setFullScreen0(eglWindowHandle, false);
+ setSize0(eglWindowHandle, nfs_width, nfs_height);
+ }
+ }
+ return true;
+ }
+
+ //----------------------------------------------------------------------
+ // Internals only
+ //
+
+ protected static native boolean initIDs();
+ private native long CreateWindow(long displayHandle, int[] attributes);
+ private native long RealizeWindow(long eglWindowHandle);
+ private native int CloseWindow(long eglWindowHandle, long userData);
+ private native void setVisible0(long eglWindowHandle, boolean visible);
+ private native void setSize0(long eglWindowHandle, int width, int height);
+ private native void setFullScreen0(long eglWindowHandle, boolean fullscreen);
+
+ private void windowCreated(long userData) {
+ windowUserData=userData;
+ }
+
+ private void sizeChanged(int newWidth, int newHeight) {
+ width = newWidth;
+ height = newHeight;
+ if(!fullscreen) {
+ nfs_width=width;
+ nfs_height=height;
+ } else {
+ ((KDScreen)screen).setScreenSize(width, height);
+ }
+ sendWindowEvent(WindowEvent.EVENT_WINDOW_RESIZED);
+ }
+
+ private long eglWindowHandle;
+ private long windowHandleClose;
+ private long windowUserData;
+}
diff --git a/src/newt/classes/com/jogamp/javafx/newt/util/EventDispatchThread.java b/src/newt/classes/com/jogamp/javafx/newt/util/EventDispatchThread.java
new file mode 100644
index 000000000..db3f97ee6
--- /dev/null
+++ b/src/newt/classes/com/jogamp/javafx/newt/util/EventDispatchThread.java
@@ -0,0 +1,240 @@
+/*
+ * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ */
+
+package com.jogamp.javafx.newt.util;
+
+import com.jogamp.javafx.newt.Display;
+import com.jogamp.javafx.newt.impl.Debug;
+import java.util.*;
+
+public class EventDispatchThread {
+ public static final boolean DEBUG = Debug.debug("EDT");
+
+ private ThreadGroup threadGroup;
+ private volatile boolean shouldStop = false;
+ private TaskWorker taskWorker = null;
+ private Object taskWorkerLock = new Object();
+ private ArrayList tasks = new ArrayList(); // one shot tasks
+ private Display display = null;
+ private String name;
+ private long edtPollGranularity = 10;
+
+ public EventDispatchThread(Display display, ThreadGroup tg, String name) {
+ this.display = display;
+ this.threadGroup = tg;
+ this.name=new String("EDT-Display_"+display.getName()+"-"+name);
+ }
+
+ public String getName() { return name; }
+
+ public ThreadGroup getThreadGroup() { return threadGroup; }
+
+ public void start() {
+ start(false);
+ }
+
+ /**
+ * @param externalStimuli true indicates that another thread stimulates,
+ * ie. calls this TaskManager's run() loop method.
+ * Hence no own thread is started in this case.
+ *
+ * @return The started Runnable, which handles the run-loop.
+ * Usefull in combination with externalStimuli=true,
+ * so an external stimuli can call it.
+ */
+ public Runnable start(boolean externalStimuli) {
+ synchronized(taskWorkerLock) {
+ if(null==taskWorker) {
+ taskWorker = new TaskWorker(threadGroup, name);
+ }
+ if(!taskWorker.isRunning()) {
+ shouldStop = false;
+ taskWorker.start(externalStimuli);
+ }
+ taskWorkerLock.notifyAll();
+ }
+ return taskWorker;
+ }
+
+ public void stop() {
+ synchronized(taskWorkerLock) {
+ if(null!=taskWorker && taskWorker.isRunning()) {
+ shouldStop = true;
+ }
+ taskWorkerLock.notifyAll();
+ if(DEBUG) {
+ System.out.println(Thread.currentThread()+": EDT signal STOP");
+ }
+ }
+ }
+
+ public boolean isThreadEDT(Thread thread) {
+ return null!=taskWorker && taskWorker == thread;
+ }
+
+ public boolean isCurrentThreadEDT() {
+ return null!=taskWorker && taskWorker == Thread.currentThread();
+ }
+
+ public boolean isRunning() {
+ return null!=taskWorker && taskWorker.isRunning() ;
+ }
+
+ public void invokeLater(Runnable task) {
+ if(task == null) {
+ return;
+ }
+ synchronized(taskWorkerLock) {
+ if(null!=taskWorker && taskWorker.isRunning() && taskWorker != Thread.currentThread() ) {
+ tasks.add(task);
+ taskWorkerLock.notifyAll();
+ } else {
+ // if !running or isEDTThread, do it right away
+ task.run();
+ }
+ }
+ }
+
+ public void invokeAndWait(Runnable task) {
+ if(task == null) {
+ return;
+ }
+ invokeLater(task);
+ waitOnWorker();
+ }
+
+ public void waitOnWorker() {
+ synchronized(taskWorkerLock) {
+ if(null!=taskWorker && taskWorker.isRunning() && tasks.size()>0 && taskWorker != Thread.currentThread() ) {
+ try {
+ taskWorkerLock.wait();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+
+ public void waitUntilStopped() {
+ synchronized(taskWorkerLock) {
+ while(null!=taskWorker && taskWorker.isRunning() && taskWorker != Thread.currentThread() ) {
+ try {
+ taskWorkerLock.wait();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+
+ class TaskWorker extends Thread {
+ boolean isRunning = false;
+ boolean externalStimuli = false;
+
+ public TaskWorker(ThreadGroup tg, String name) {
+ super(tg, name);
+ }
+
+ public synchronized boolean isRunning() {
+ return isRunning;
+ }
+
+ public void start(boolean externalStimuli) throws IllegalThreadStateException {
+ synchronized(this) {
+ this.externalStimuli = externalStimuli;
+ isRunning = true;
+ }
+ if(!externalStimuli) {
+ super.start();
+ }
+ }
+
+ /**
+ * Utilizing taskWorkerLock only for local resources and task execution,
+ * not for event dispatching.
+ */
+ public void run() {
+ if(DEBUG) {
+ System.out.println(Thread.currentThread()+": EDT run() START");
+ }
+ while(!shouldStop) {
+ try {
+ // wait for something todo
+ while(!shouldStop && tasks.size()==0) {
+ synchronized(taskWorkerLock) {
+ if(!shouldStop && tasks.size()==0) {
+ try {
+ taskWorkerLock.wait(edtPollGranularity);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ display.pumpMessages(); // event dispatch
+ }
+ if(!shouldStop && tasks.size()>0) {
+ synchronized(taskWorkerLock) {
+ if(!shouldStop && tasks.size()>0) {
+ Runnable task = (Runnable) tasks.remove(0);
+ task.run();
+ taskWorkerLock.notifyAll();
+ }
+ }
+ display.pumpMessages(); // event dispatch
+ }
+ } catch (Throwable t) {
+ // handle errors ..
+ t.printStackTrace();
+ } finally {
+ // epilog - unlock locked stuff
+ }
+ if(externalStimuli) break; // no loop if called by external stimuli
+ }
+ synchronized(this) {
+ isRunning = !shouldStop;
+ }
+ if(!isRunning) {
+ synchronized(taskWorkerLock) {
+ taskWorkerLock.notifyAll();
+ }
+ }
+ if(DEBUG) {
+ System.out.println(Thread.currentThread()+": EDT run() EXIT");
+ }
+ }
+ }
+}
+
diff --git a/src/newt/classes/com/jogamp/javafx/newt/util/MainThread.java b/src/newt/classes/com/jogamp/javafx/newt/util/MainThread.java
new file mode 100644
index 000000000..9bf25098f
--- /dev/null
+++ b/src/newt/classes/com/jogamp/javafx/newt/util/MainThread.java
@@ -0,0 +1,307 @@
+/*
+ * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ */
+
+package com.jogamp.javafx.newt.util;
+
+import java.util.*;
+import java.lang.reflect.Method;
+import java.lang.reflect.InvocationTargetException;
+import java.security.*;
+
+import javax.media.nativewindow.*;
+
+import com.jogamp.javafx.newt.*;
+import com.jogamp.javafx.newt.impl.*;
+import com.jogamp.javafx.newt.macosx.MacDisplay;
+import com.jogamp.nativewindow.impl.NWReflection;
+
+/**
+ * NEWT Utility class MainThread
+ *
+ * Such behavior is necessary for native windowing toolkits,
+ * where the windowing management must happen on the so called
+ * main thread e.g. for Mac OS X !
+ *
+ * Utilizing this class as a launchpad, now you are able to
+ * use a NEWT multithreaded application with window handling within the different threads,
+ * even on these restricted platforms.
+ *
+ * To support your NEWT Window platform,
+ * you have to pass your main thread actions to {@link #invoke invoke(..)},
+ * have a look at the {@link com.jogamp.javafx.newt.macosx.MacWindow MacWindow} implementation.
+ * TODO: Some hardcoded dependencies exist in this implementation,
+ * where you have to patch this code or factor it out. newt.MainThread.force
to true
.newt.MainThread.force
to true
.
+ java -XstartOnFirstThread com.jogamp.javafx.newt.util.MainThread demos.es1.RedSquare -GL2 -GL2 -GL2 -GL2
+
+ * Which starts 4 threads, each with a window and OpenGL rendering.
+ */
+public class MainThread {
+ private static AccessControlContext localACC = AccessController.getContext();
+ public static final boolean USE_MAIN_THREAD = NativeWindowFactory.TYPE_MACOSX.equals(NativeWindowFactory.getNativeWindowType(false)) ||
+ Debug.getBooleanProperty("newt.MainThread.force", true, localACC);
+
+ protected static final boolean DEBUG = Debug.debug("MainThread");
+
+ private static boolean isExit=false;
+ private static volatile boolean isRunning=false;
+ private static Object taskWorkerLock=new Object();
+ private static boolean shouldStop;
+ private static ArrayList tasks;
+ private static ArrayList tasksBlock;
+ private static Thread mainThread;
+
+ static class MainAction extends Thread {
+ private String mainClassName;
+ private String[] mainClassArgs;
+
+ private Class mainClass;
+ private Method mainClassMain;
+
+ public MainAction(String mainClassName, String[] mainClassArgs) {
+ this.mainClassName=mainClassName;
+ this.mainClassArgs=mainClassArgs;
+ }
+
+ public void run() {
+ if ( USE_MAIN_THREAD ) {
+ // we have to start first to provide the service ..
+ MainThread.waitUntilRunning();
+ }
+
+ // start user app ..
+ try {
+ Class mainClass = NWReflection.getClass(mainClassName, true);
+ if(null==mainClass) {
+ throw new RuntimeException(new ClassNotFoundException("MainThread couldn't find main class "+mainClassName));
+ }
+ try {
+ mainClassMain = mainClass.getDeclaredMethod("main", new Class[] { String[].class });
+ mainClassMain.setAccessible(true);
+ } catch (Throwable t) {
+ throw new RuntimeException(t);
+ }
+ if(DEBUG) System.err.println("MainAction.run(): "+Thread.currentThread().getName()+" invoke "+mainClassName);
+ mainClassMain.invoke(null, new Object[] { mainClassArgs } );
+ } catch (InvocationTargetException ite) {
+ ite.getTargetException().printStackTrace();
+ } catch (Throwable t) {
+ t.printStackTrace();
+ }
+
+ if(DEBUG) System.err.println("MainAction.run(): "+Thread.currentThread().getName()+" user app fin");
+
+ if ( USE_MAIN_THREAD ) {
+ MainThread.exit();
+ if(DEBUG) System.err.println("MainAction.run(): "+Thread.currentThread().getName()+" MainThread fin - exit");
+ System.exit(0);
+ }
+ }
+ }
+ private static MainAction mainAction;
+
+ /** Your new java application main entry, which pipelines your application */
+ public static void main(String[] args) {
+ if(DEBUG) System.err.println("MainThread.main(): "+Thread.currentThread().getName()+" USE_MAIN_THREAD "+ USE_MAIN_THREAD );
+
+ if(args.length==0) {
+ return;
+ }
+
+ String mainClassName=args[0];
+ String[] mainClassArgs=new String[args.length-1];
+ if(args.length>1) {
+ System.arraycopy(args, 1, mainClassArgs, 0, args.length-1);
+ }
+
+ NativeLibLoader.loadNEWT();
+
+ shouldStop = false;
+ tasks = new ArrayList();
+ tasksBlock = new ArrayList();
+ mainThread = Thread.currentThread();
+
+ mainAction = new MainAction(mainClassName, mainClassArgs);
+
+ if(NativeWindowFactory.TYPE_MACOSX.equals(NativeWindowFactory.getNativeWindowType(false))) {
+ MacDisplay.initSingleton();
+ }
+
+ if ( USE_MAIN_THREAD ) {
+ // dispatch user's main thread ..
+ mainAction.start();
+
+ // do our main thread task scheduling
+ run();
+ } else {
+ // run user's main in this thread
+ mainAction.run();
+ }
+ }
+
+ /** invokes the given Runnable */
+ public static void invoke(boolean wait, Runnable r) {
+ if(r == null) {
+ return;
+ }
+
+ // if this main thread is not being used or
+ // if this is already the main thread .. just execute.
+ if( !isRunning() || mainThread == Thread.currentThread() ) {
+ r.run();
+ return;
+ }
+
+ synchronized(taskWorkerLock) {
+ tasks.add(r);
+ if(wait) {
+ tasksBlock.add(r);
+ }
+ taskWorkerLock.notifyAll();
+ if(wait) {
+ while(tasksBlock.size()>0) {
+ try {
+ taskWorkerLock.wait();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+ }
+
+ public static void exit() {
+ if(DEBUG) System.err.println("MainThread.exit(): "+Thread.currentThread().getName()+" start");
+ synchronized(taskWorkerLock) {
+ if(isRunning) {
+ shouldStop = true;
+ }
+ taskWorkerLock.notifyAll();
+ }
+ if(DEBUG) System.err.println("MainThread.exit(): "+Thread.currentThread().getName()+" end");
+ }
+
+ public static boolean isRunning() {
+ synchronized(taskWorkerLock) {
+ return isRunning;
+ }
+ }
+
+ private static void waitUntilRunning() {
+ synchronized(taskWorkerLock) {
+ if(isExit) return;
+
+ while(!isRunning) {
+ try {
+ taskWorkerLock.wait();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+
+ public static void run() {
+ if(DEBUG) System.err.println("MainThread.run(): "+Thread.currentThread().getName());
+ synchronized(taskWorkerLock) {
+ isRunning = true;
+ taskWorkerLock.notifyAll();
+ }
+ while(!shouldStop) {
+ try {
+ ArrayList localTasks=null;
+
+ // wait for something todo ..
+ synchronized(taskWorkerLock) {
+ while(!shouldStop && tasks.size()==0) {
+ try {
+ taskWorkerLock.wait();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ // seq. process all tasks until no blocking one exists in the list
+ for(Iterator i = tasks.iterator(); tasksBlock.size()>0 && i.hasNext(); ) {
+ Runnable task = (Runnable) i.next();
+ task.run();
+ i.remove();
+ tasksBlock.remove(task);
+ }
+
+ // take over the tasks ..
+ if(tasks.size()>0) {
+ localTasks = tasks;
+ tasks = new ArrayList();
+ }
+ taskWorkerLock.notifyAll();
+ }
+
+ // seq. process all unblocking tasks ..
+ if(null!=localTasks) {
+ for(Iterator i = localTasks.iterator(); i.hasNext(); ) {
+ Runnable task = (Runnable) i.next();
+ task.run();
+ }
+ }
+ } catch (Throwable t) {
+ // handle errors ..
+ t.printStackTrace();
+ } finally {
+ // epilog - unlock locked stuff
+ }
+ }
+ if(DEBUG) System.err.println("MainThread.run(): "+Thread.currentThread().getName()+" fin");
+ synchronized(taskWorkerLock) {
+ isRunning = false;
+ isExit = true;
+ taskWorkerLock.notifyAll();
+ }
+ }
+}
+
+
diff --git a/src/newt/classes/com/jogamp/javafx/newt/windows/WindowsDisplay.java b/src/newt/classes/com/jogamp/javafx/newt/windows/WindowsDisplay.java
new file mode 100755
index 000000000..f2e8d21ef
--- /dev/null
+++ b/src/newt/classes/com/jogamp/javafx/newt/windows/WindowsDisplay.java
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.javafx.newt.windows;
+
+import javax.media.nativewindow.*;
+import javax.media.nativewindow.windows.*;
+import com.jogamp.javafx.newt.*;
+import com.jogamp.javafx.newt.impl.*;
+
+public class WindowsDisplay extends Display {
+
+ protected static final String WINDOW_CLASS_NAME = "NewtWindowClass";
+ private static int windowClassAtom;
+ private static long hInstance;
+
+ static {
+ NativeLibLoader.loadNEWT();
+
+ if (!WindowsWindow.initIDs()) {
+ throw new NativeWindowException("Failed to initialize WindowsWindow jmethodIDs");
+ }
+ }
+
+ public static void initSingleton() {
+ // just exist to ensure static init has been run
+ }
+
+
+ public WindowsDisplay() {
+ }
+
+ protected void createNative() {
+ aDevice = new WindowsGraphicsDevice();
+ }
+
+ protected void closeNative() {
+ // Can't do .. only at application shutdown
+ // UnregisterWindowClass(getWindowClassAtom(), getHInstance());
+ }
+
+ protected void dispatchMessages() {
+ DispatchMessages();
+ }
+
+ protected static synchronized int getWindowClassAtom() {
+ if(0 == windowClassAtom) {
+ windowClassAtom = RegisterWindowClass(WINDOW_CLASS_NAME, getHInstance());
+ if (0 == windowClassAtom) {
+ throw new NativeWindowException("Error while registering window class");
+ }
+ }
+ return windowClassAtom;
+ }
+
+ protected static synchronized long getHInstance() {
+ if(0 == hInstance) {
+ hInstance = LoadLibraryW("newt");
+ if (0 == hInstance) {
+ throw new NativeWindowException("Error finding HINSTANCE for \"newt\"");
+ }
+ }
+ return hInstance;
+ }
+
+ //----------------------------------------------------------------------
+ // Internals only
+ //
+ private static native long LoadLibraryW(String libraryName);
+ private static native int RegisterWindowClass(String windowClassName, long hInstance);
+ private static native void UnregisterWindowClass(int wndClassAtom, long hInstance);
+
+ private static native void DispatchMessages();
+}
+
diff --git a/src/newt/classes/com/jogamp/javafx/newt/windows/WindowsScreen.java b/src/newt/classes/com/jogamp/javafx/newt/windows/WindowsScreen.java
new file mode 100755
index 000000000..ab11f97dd
--- /dev/null
+++ b/src/newt/classes/com/jogamp/javafx/newt/windows/WindowsScreen.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.javafx.newt.windows;
+
+import com.jogamp.javafx.newt.*;
+import com.jogamp.javafx.newt.impl.*;
+import javax.media.nativewindow.*;
+
+public class WindowsScreen extends Screen {
+ static {
+ WindowsDisplay.initSingleton();
+ }
+
+
+ public WindowsScreen() {
+ }
+
+ protected void createNative(int index) {
+ aScreen = new DefaultGraphicsScreen(getDisplay().getGraphicsDevice(), index);
+ setScreenSize(getWidthImpl(getIndex()), getHeightImpl(getIndex()));
+ }
+
+ protected void closeNative() { }
+
+ private native int getWidthImpl(int scrn_idx);
+ private native int getHeightImpl(int scrn_idx);
+}
diff --git a/src/newt/classes/com/jogamp/javafx/newt/windows/WindowsWindow.java b/src/newt/classes/com/jogamp/javafx/newt/windows/WindowsWindow.java
new file mode 100755
index 000000000..7c8864190
--- /dev/null
+++ b/src/newt/classes/com/jogamp/javafx/newt/windows/WindowsWindow.java
@@ -0,0 +1,289 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.javafx.newt.windows;
+
+import javax.media.nativewindow.*;
+import com.jogamp.javafx.newt.*;
+
+public class WindowsWindow extends Window {
+
+ private long hmon;
+ private long hdc;
+ private long windowHandleClose;
+ private long parentWindowHandle;
+ // non fullscreen dimensions ..
+ private int nfs_width, nfs_height, nfs_x, nfs_y;
+ private final Insets insets = new Insets(0, 0, 0, 0);
+
+ static {
+ WindowsDisplay.initSingleton();
+ }
+
+ public WindowsWindow() {
+ }
+
+ Thread hdcOwner = null;
+
+ public synchronized int lockSurface() throws NativeWindowException {
+ int res = super.lockSurface();
+ if(LOCK_SUCCESS==res && 0!=windowHandle) {
+ if(hdc!=0) {
+ throw new NativeWindowException("NEWT Surface handle set HDC "+toHexString(hdc)+" - "+Thread.currentThread().getName()+" ; "+this);
+ }
+ hdc = GetDC(windowHandle);
+ hmon = MonitorFromWindow(windowHandle);
+ hdcOwner = Thread.currentThread();
+ }
+ return res;
+ }
+
+ public synchronized void unlockSurface() {
+ // prevalidate, before we change data ..
+ Thread cur = Thread.currentThread();
+ if ( getSurfaceLockOwner() != cur ) {
+ getLockedStack().printStackTrace();
+ throw new NativeWindowException(cur+": Not owner, owner is "+getSurfaceLockOwner());
+ }
+ if (0!=hdc && 0!=windowHandle) {
+ if(hdcOwner != cur) {
+ throw new NativeWindowException("NEWT Surface handle set HDC "+toHexString(hdc)+" by other thread "+hdcOwner+", this "+cur+" ; "+this);
+ }
+ ReleaseDC(windowHandle, hdc);
+ hdc=0;
+ hdcOwner=null;
+ }
+ super.unlockSurface();
+ }
+
+ public long getSurfaceHandle() {
+ return hdc;
+ }
+
+ public boolean hasDeviceChanged() {
+ if(0!=windowHandle) {
+ long _hmon = MonitorFromWindow(windowHandle);
+ if (hmon != _hmon) {
+ if(DEBUG_IMPLEMENTATION || DEBUG_WINDOW_EVENT) {
+ Exception e = new Exception("!!! Window Device Changed "+Thread.currentThread().getName()+
+ ", HMON "+toHexString(hmon)+" -> "+toHexString(_hmon));
+ e.printStackTrace();
+ }
+ hmon = _hmon;
+ return true;
+ }
+ }
+ return false;
+ }
+
+ protected void createNative(long parentWindowHandle, Capabilities caps) {
+ WindowsScreen screen = (WindowsScreen) getScreen();
+ WindowsDisplay display = (WindowsDisplay) screen.getDisplay();
+ config = GraphicsConfigurationFactory.getFactory(display.getGraphicsDevice()).chooseGraphicsConfiguration(caps, null, screen.getGraphicsScreen());
+ if (config == null) {
+ throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
+ }
+ windowHandle = CreateWindow(parentWindowHandle,
+ display.getWindowClassAtom(), display.WINDOW_CLASS_NAME, display.getHInstance(),
+ 0, undecorated, x, y, width, height);
+ if (windowHandle == 0) {
+ throw new NativeWindowException("Error creating window");
+ }
+ this.parentWindowHandle = parentWindowHandle;
+ windowHandleClose = windowHandle;
+ if(DEBUG_IMPLEMENTATION || DEBUG_WINDOW_EVENT) {
+ Exception e = new Exception("!!! Window new window handle "+Thread.currentThread().getName()+
+ " (Parent HWND "+toHexString(parentWindowHandle)+
+ ") : HWND "+toHexString(windowHandle)+", "+Thread.currentThread());
+ e.printStackTrace();
+ }
+ }
+
+ protected void closeNative() {
+ if (hdc != 0) {
+ if(windowHandleClose != 0) {
+ ReleaseDC(windowHandleClose, hdc);
+ }
+ hdc = 0;
+ }
+ if(windowHandleClose != 0) {
+ DestroyWindow(windowHandleClose);
+ windowHandleClose = 0;
+ }
+ }
+
+ protected void windowDestroyed() {
+ windowHandleClose = 0;
+ super.windowDestroyed();
+ }
+
+ public void setVisible(boolean visible) {
+ if(this.visible!=visible && 0!=windowHandle) {
+ this.visible=visible;
+ setVisible0(windowHandle, visible);
+ }
+ }
+
+ // @Override
+ public void setSize(int width, int height) {
+ if (0!=windowHandle && (width != this.width || this.height != height)) {
+ if(!fullscreen) {
+ nfs_width=width;
+ nfs_height=height;
+ }
+ this.width = width;
+ this.height = height;
+ setSize0(parentWindowHandle, windowHandle, x, y, width, height);
+ }
+ }
+
+ //@Override
+ public void setPosition(int x, int y) {
+ if (0!=windowHandle && (this.x != x || this.y != y)) {
+ if(!fullscreen) {
+ nfs_x=x;
+ nfs_y=y;
+ }
+ this.x = x;
+ this.y = y;
+ setPosition(parentWindowHandle, windowHandle, x , y);
+ }
+ }
+
+ public boolean setFullscreen(boolean fullscreen) {
+ if(0!=windowHandle && (this.fullscreen!=fullscreen)) {
+ int x,y,w,h;
+ this.fullscreen=fullscreen;
+ if(fullscreen) {
+ x = 0; y = 0;
+ w = screen.getWidth();
+ h = screen.getHeight();
+ } else {
+ x = nfs_x;
+ y = nfs_y;
+ w = nfs_width;
+ h = nfs_height;
+ }
+ if(DEBUG_IMPLEMENTATION || DEBUG_WINDOW_EVENT) {
+ System.err.println("WindowsWindow fs: "+fullscreen+" "+x+"/"+y+" "+w+"x"+h);
+ }
+ setFullscreen0(parentWindowHandle, windowHandle, x, y, w, h, undecorated, fullscreen);
+ }
+ return fullscreen;
+ }
+
+ // @Override
+ public void requestFocus() {
+ super.requestFocus();
+ if (windowHandle != 0L) {
+ requestFocus(windowHandle);
+ }
+ }
+
+ // @Override
+ public void setTitle(String title) {
+ if (title == null) {
+ title = "";
+ }
+ if (0!=windowHandle && !title.equals(getTitle())) {
+ super.setTitle(title);
+ setTitle(windowHandle, title);
+ }
+ }
+
+ public Insets getInsets() {
+ return (Insets)insets.clone();
+ }
+
+ //----------------------------------------------------------------------
+ // Internals only
+ //
+ protected static native boolean initIDs();
+ private native long CreateWindow(long parentWindowHandle,
+ int wndClassAtom, String wndName,
+ long hInstance, long visualID,
+ boolean isUndecorated,
+ int x, int y, int width, int height);
+ private native void DestroyWindow(long windowHandle);
+ private native long GetDC(long windowHandle);
+ private native void ReleaseDC(long windowHandle, long hdc);
+ private native long MonitorFromWindow(long windowHandle);
+ private static native void setVisible0(long windowHandle, boolean visible);
+ private native void setSize0(long parentWindowHandle, long windowHandle, int x, int y, int width, int height);
+ private native void setPosition(long parentWindowHandle, long windowHandle, int x, int y);
+ private native void setFullscreen0(long parentWindowHandle, long windowHandle, int x, int y, int width, int height, boolean isUndecorated, boolean on);
+ private static native void setTitle(long windowHandle, String title);
+ private static native void requestFocus(long windowHandle);
+
+ private void insetsChanged(int left, int top, int right, int bottom) {
+ if (left != -1 && top != -1 && right != -1 && bottom != -1) {
+ insets.left = left;
+ insets.top = top;
+ insets.right = right;
+ insets.bottom = bottom;
+ }
+ }
+ private void sizeChanged(int newWidth, int newHeight) {
+ width = newWidth;
+ height = newHeight;
+ if(!fullscreen) {
+ nfs_width=width;
+ nfs_height=height;
+ }
+ sendWindowEvent(WindowEvent.EVENT_WINDOW_RESIZED);
+ }
+
+ private void positionChanged(int newX, int newY) {
+ x = newX;
+ y = newY;
+ if(!fullscreen) {
+ nfs_x=x;
+ nfs_y=y;
+ }
+ sendWindowEvent(WindowEvent.EVENT_WINDOW_MOVED);
+ }
+
+ /**
+ *
+ * @param focusOwner if focusGained is true, focusOwner is the previous
+ * focus owner, if focusGained is false, focusOwner is the new focus owner
+ * @param focusGained
+ */
+ private void focusChanged(long focusOwner, boolean focusGained) {
+ if (focusGained) {
+ sendWindowEvent(WindowEvent.EVENT_WINDOW_GAINED_FOCUS);
+ } else {
+ sendWindowEvent(WindowEvent.EVENT_WINDOW_LOST_FOCUS);
+ }
+ }
+}
diff --git a/src/newt/classes/com/jogamp/javafx/newt/x11/X11Display.java b/src/newt/classes/com/jogamp/javafx/newt/x11/X11Display.java
new file mode 100755
index 000000000..96d55c082
--- /dev/null
+++ b/src/newt/classes/com/jogamp/javafx/newt/x11/X11Display.java
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.javafx.newt.x11;
+
+import javax.media.nativewindow.*;
+import javax.media.nativewindow.x11.*;
+import com.jogamp.javafx.newt.*;
+import com.jogamp.javafx.newt.impl.*;
+import com.jogamp.nativewindow.impl.x11.X11Util;
+
+public class X11Display extends Display {
+ static {
+ NativeLibLoader.loadNEWT();
+
+ if (!initIDs()) {
+ throw new NativeWindowException("Failed to initialize X11Display jmethodIDs");
+ }
+
+ if (!X11Window.initIDs()) {
+ throw new NativeWindowException("Failed to initialize X11Window jmethodIDs");
+ }
+ }
+
+ public static void initSingleton() {
+ // just exist to ensure static init has been run
+ }
+
+
+ public X11Display() {
+ }
+
+ protected void createNative() {
+ long handle= X11Util.getThreadLocalDisplay(name);
+ if (handle == 0 ) {
+ throw new RuntimeException("Error creating display: "+name);
+ }
+ try {
+ CompleteDisplay(handle);
+ } catch(RuntimeException e) {
+ X11Util.closeThreadLocalDisplay(name);
+ throw e;
+ }
+ aDevice = new X11GraphicsDevice(handle);
+ }
+
+ protected void closeNative() {
+ if(0==X11Util.closeThreadLocalDisplay(name)) {
+ throw new NativeWindowException(this+" was not mapped");
+ }
+ }
+
+ protected void dispatchMessages() {
+ DispatchMessages(getHandle(), javaObjectAtom, windowDeleteAtom);
+ }
+
+ protected void lockDisplay() {
+ super.lockDisplay();
+ LockDisplay(getHandle());
+ }
+
+ protected void unlockDisplay() {
+ UnlockDisplay(getHandle());
+ super.unlockDisplay();
+ }
+
+ protected long getJavaObjectAtom() { return javaObjectAtom; }
+ protected long getWindowDeleteAtom() { return windowDeleteAtom; }
+
+ //----------------------------------------------------------------------
+ // Internals only
+ //
+ private static native boolean initIDs();
+
+ private native void LockDisplay(long handle);
+ private native void UnlockDisplay(long handle);
+
+ private native void CompleteDisplay(long handle);
+
+ private native void DispatchMessages(long display, long javaObjectAtom, long windowDeleteAtom);
+
+ private void displayCompleted(long javaObjectAtom, long windowDeleteAtom) {
+ this.javaObjectAtom=javaObjectAtom;
+ this.windowDeleteAtom=windowDeleteAtom;
+ }
+
+ private long windowDeleteAtom;
+ private long javaObjectAtom;
+}
+
diff --git a/src/newt/classes/com/jogamp/javafx/newt/x11/X11Screen.java b/src/newt/classes/com/jogamp/javafx/newt/x11/X11Screen.java
new file mode 100755
index 000000000..d90b1868d
--- /dev/null
+++ b/src/newt/classes/com/jogamp/javafx/newt/x11/X11Screen.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.javafx.newt.x11;
+
+import com.jogamp.javafx.newt.*;
+import com.jogamp.javafx.newt.impl.*;
+import javax.media.nativewindow.*;
+import javax.media.nativewindow.x11.*;
+
+public class X11Screen extends Screen {
+
+ static {
+ X11Display.initSingleton();
+ }
+
+
+ public X11Screen() {
+ }
+
+ protected void createNative(int index) {
+ long handle = GetScreen(display.getHandle(), index);
+ if (handle == 0 ) {
+ throw new RuntimeException("Error creating screen: "+index);
+ }
+ aScreen = new X11GraphicsScreen((X11GraphicsDevice)getDisplay().getGraphicsDevice(), index);
+ setScreenSize(getWidth0(display.getHandle(), index),
+ getHeight0(display.getHandle(), index));
+ }
+
+ protected void closeNative() { }
+
+ //----------------------------------------------------------------------
+ // Internals only
+ //
+
+ private native long GetScreen(long dpy, int scrn_idx);
+ private native int getWidth0(long display, int scrn_idx);
+ private native int getHeight0(long display, int scrn_idx);
+}
+
diff --git a/src/newt/classes/com/jogamp/javafx/newt/x11/X11Window.java b/src/newt/classes/com/jogamp/javafx/newt/x11/X11Window.java
new file mode 100755
index 000000000..8387160c9
--- /dev/null
+++ b/src/newt/classes/com/jogamp/javafx/newt/x11/X11Window.java
@@ -0,0 +1,203 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.javafx.newt.x11;
+
+import com.jogamp.javafx.newt.*;
+import com.jogamp.javafx.newt.impl.*;
+import javax.media.nativewindow.*;
+import javax.media.nativewindow.x11.*;
+
+public class X11Window extends Window {
+ private static final String WINDOW_CLASS_NAME = "NewtWindow";
+ // non fullscreen dimensions ..
+ private int nfs_width, nfs_height, nfs_x, nfs_y;
+
+ static {
+ X11Display.initSingleton();
+ }
+
+ public X11Window() {
+ }
+
+ protected void createNative(long parentWindowHandle, Capabilities caps) {
+ X11Screen screen = (X11Screen) getScreen();
+ X11Display display = (X11Display) screen.getDisplay();
+ config = GraphicsConfigurationFactory.getFactory(display.getGraphicsDevice()).chooseGraphicsConfiguration(caps, null, screen.getGraphicsScreen());
+ if (config == null) {
+ throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
+ }
+ X11GraphicsConfiguration x11config = (X11GraphicsConfiguration) config;
+ long visualID = x11config.getVisualID();
+ long w = CreateWindow(parentWindowHandle,
+ display.getHandle(), screen.getIndex(), visualID,
+ display.getJavaObjectAtom(), display.getWindowDeleteAtom(), x, y, width, height);
+ if (w == 0 || w!=windowHandle) {
+ throw new NativeWindowException("Error creating window: "+w);
+ }
+ this.parentWindowHandle = parentWindowHandle;
+ windowHandleClose = windowHandle;
+ displayHandleClose = display.getHandle();
+ }
+
+ protected void closeNative() {
+ if(0!=displayHandleClose && 0!=windowHandleClose && null!=getScreen() ) {
+ X11Display display = (X11Display) getScreen().getDisplay();
+ CloseWindow(displayHandleClose, windowHandleClose, display.getJavaObjectAtom());
+ windowHandleClose = 0;
+ displayHandleClose = 0;
+ }
+ }
+
+ protected void windowDestroyed() {
+ windowHandleClose = 0;
+ displayHandleClose = 0;
+ super.windowDestroyed();
+ }
+
+ public void setVisible(boolean visible) {
+ if(0!=windowHandle && this.visible!=visible) {
+ this.visible=visible;
+ setVisible0(getDisplayHandle(), windowHandle, visible);
+ clearEventMask();
+ }
+ }
+
+ public void requestFocus() {
+ super.requestFocus();
+ }
+
+ public void setSize(int width, int height) {
+ if(DEBUG_IMPLEMENTATION) {
+ System.err.println("X11Window setSize: "+this.x+"/"+this.y+" "+this.width+"x"+this.height+" -> "+width+"x"+height);
+ // Exception e = new Exception("XXXXXXXXXX");
+ // e.printStackTrace();
+ }
+ this.width = width;
+ this.height = height;
+ if(!fullscreen) {
+ nfs_width=width;
+ nfs_height=height;
+ }
+ if(0!=windowHandle) {
+ setSize0(parentWindowHandle, getDisplayHandle(), getScreenIndex(), windowHandle, x, y, width, height, (undecorated||fullscreen)?-1:1, false);
+ }
+ }
+
+ public void setPosition(int x, int y) {
+ if(DEBUG_IMPLEMENTATION) {
+ System.err.println("X11Window setPosition: "+this.x+"/"+this.y+" -> "+x+"/"+y);
+ // Exception e = new Exception("XXXXXXXXXX");
+ // e.printStackTrace();
+ }
+ this.x = x;
+ this.y = y;
+ if(!fullscreen) {
+ nfs_x=x;
+ nfs_y=y;
+ }
+ if(0!=windowHandle) {
+ setPosition0(getDisplayHandle(), windowHandle, x, y);
+ }
+ }
+
+ public boolean setFullscreen(boolean fullscreen) {
+ if(0!=windowHandle && this.fullscreen!=fullscreen) {
+ int x,y,w,h;
+ this.fullscreen=fullscreen;
+ if(fullscreen) {
+ x = 0; y = 0;
+ w = screen.getWidth();
+ h = screen.getHeight();
+ } else {
+ x = nfs_x;
+ y = nfs_y;
+ w = nfs_width;
+ h = nfs_height;
+ }
+ if(DEBUG_IMPLEMENTATION || DEBUG_WINDOW_EVENT) {
+ System.err.println("X11Window fs: "+fullscreen+" "+x+"/"+y+" "+w+"x"+h);
+ }
+ setSize0(parentWindowHandle, getDisplayHandle(), getScreenIndex(), windowHandle, x, y, w, h, (undecorated||fullscreen)?-1:1, false);
+ }
+ return fullscreen;
+ }
+
+ //----------------------------------------------------------------------
+ // Internals only
+ //
+
+ protected static native boolean initIDs();
+ private native long CreateWindow(long parentWindowHandle, long display, int screen_index,
+ long visualID, long javaObjectAtom, long windowDeleteAtom, int x, int y, int width, int height);
+ private native void CloseWindow(long display, long windowHandle, long javaObjectAtom);
+ private native void setVisible0(long display, long windowHandle, boolean visible);
+ private native void setSize0(long parentWindowHandle, long display, int screen_index, long windowHandle,
+ int x, int y, int width, int height, int decorationToggle, boolean setVisible);
+ private native void setPosition0(long display, long windowHandle, int x, int y);
+
+ private void windowChanged(int newX, int newY, int newWidth, int newHeight) {
+ if(width != newWidth || height != newHeight) {
+ if(DEBUG_IMPLEMENTATION) {
+ System.err.println("X11Window windowChanged size: "+this.width+"x"+this.height+" -> "+newWidth+"x"+newHeight);
+ }
+ width = newWidth;
+ height = newHeight;
+ if(!fullscreen) {
+ nfs_width=width;
+ nfs_height=height;
+ }
+ sendWindowEvent(WindowEvent.EVENT_WINDOW_RESIZED);
+ }
+ if( 0==parentWindowHandle && ( x != newX || y != newY ) ) {
+ if(DEBUG_IMPLEMENTATION) {
+ System.err.println("X11Window windowChanged position: "+this.x+"/"+this.y+" -> "+newX+"x"+newY);
+ }
+ x = newX;
+ y = newY;
+ if(!fullscreen) {
+ nfs_x=x;
+ nfs_y=y;
+ }
+ sendWindowEvent(WindowEvent.EVENT_WINDOW_MOVED);
+ }
+ }
+
+ private void windowCreated(long windowHandle) {
+ this.windowHandle = windowHandle;
+ }
+
+ private long windowHandleClose;
+ private long displayHandleClose;
+ private long parentWindowHandle;
+}
diff --git a/src/newt/classes/com/sun/javafx/newt/Display.java b/src/newt/classes/com/sun/javafx/newt/Display.java
deleted file mode 100755
index a4b7a4f51..000000000
--- a/src/newt/classes/com/sun/javafx/newt/Display.java
+++ /dev/null
@@ -1,276 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.sun.javafx.newt;
-
-import javax.media.nativewindow.*;
-import com.sun.javafx.newt.impl.Debug;
-import com.sun.javafx.newt.util.EventDispatchThread;
-import java.util.*;
-
-public abstract class Display {
- public static final boolean DEBUG = Debug.debug("Display");
-
- private static Class getDisplayClass(String type)
- throws ClassNotFoundException
- {
- Class displayClass = NewtFactory.getCustomClass(type, "Display");
- if(null==displayClass) {
- if (NativeWindowFactory.TYPE_EGL.equals(type)) {
- displayClass = Class.forName("com.sun.javafx.newt.opengl.kd.KDDisplay");
- } else if (NativeWindowFactory.TYPE_WINDOWS.equals(type)) {
- displayClass = Class.forName("com.sun.javafx.newt.windows.WindowsDisplay");
- } else if (NativeWindowFactory.TYPE_MACOSX.equals(type)) {
- displayClass = Class.forName("com.sun.javafx.newt.macosx.MacDisplay");
- } else if (NativeWindowFactory.TYPE_X11.equals(type)) {
- displayClass = Class.forName("com.sun.javafx.newt.x11.X11Display");
- } else if (NativeWindowFactory.TYPE_AWT.equals(type)) {
- displayClass = Class.forName("com.sun.javafx.newt.awt.AWTDisplay");
- } else {
- throw new RuntimeException("Unknown display type \"" + type + "\"");
- }
- }
- return displayClass;
- }
-
- // Unique Display for each thread
- private static ThreadLocal currentDisplayMap = new ThreadLocal();
-
- /** Returns the thread local display map */
- public static Map getCurrentDisplayMap() {
- Map displayMap = (Map) currentDisplayMap.get();
- if(null==displayMap) {
- displayMap = new HashMap();
- currentDisplayMap.set( displayMap );
- }
- return displayMap;
- }
-
- /** maps the given display to the thread local display map
- * and notifies all threads synchronized to this display map. */
- protected static Display setCurrentDisplay(Display display) {
- Map displayMap = getCurrentDisplayMap();
- Display oldDisplay = null;
- synchronized(displayMap) {
- String name = display.getName();
- if(null==name) name="nil";
- oldDisplay = (Display) displayMap.put(name, display);
- displayMap.notifyAll();
- }
- return oldDisplay;
- }
-
- /** removes the mapping of the given name from the thread local display map
- * and notifies all threads synchronized to this display map. */
- protected static Display removeCurrentDisplay(String name) {
- if(null==name) name="nil";
- Map displayMap = getCurrentDisplayMap();
- Display oldDisplay = null;
- synchronized(displayMap) {
- oldDisplay = (Display) displayMap.remove(name);
- displayMap.notifyAll();
- }
- return oldDisplay;
- }
-
- /** Returns the thread local display mapped to the given name */
- public static Display getCurrentDisplay(String name) {
- if(null==name) name="nil";
- Map displayMap = getCurrentDisplayMap();
- Display display = (Display) displayMap.get(name);
- return display;
- }
-
- public static void dumpDisplayMap(String prefix) {
- Map displayMap = getCurrentDisplayMap();
- Set entrySet = displayMap.entrySet();
- Iterator i = entrySet.iterator();
- System.err.println(prefix+" DisplayMap["+entrySet.size()+"] "+Thread.currentThread());
- for(int j=0; i.hasNext(); j++) {
- Map.Entry entry = (Map.Entry) i.next();
- System.err.println(" ["+j+"] "+entry.getKey()+" -> "+entry.getValue());
- }
- }
-
- /** Returns the thread local display collection */
- public static Collection getCurrentDisplays() {
- return getCurrentDisplayMap().values();
- }
-
- /** Make sure to reuse a Display with the same name */
- protected static Display create(String type, String name) {
- try {
- if(DEBUG) {
- dumpDisplayMap("Display.create("+name+") BEGIN");
- }
- Display display = getCurrentDisplay(name);
- if(null==display) {
- Class displayClass = getDisplayClass(type);
- display = (Display) displayClass.newInstance();
- display.name=name;
- display.refCount=1;
-
- if(NewtFactory.useEDT()) {
- Thread current = Thread.currentThread();
- display.eventDispatchThread = new EventDispatchThread(display, current.getThreadGroup(), current.getName());
- display.eventDispatchThread.start();
- final Display f_dpy = display;
- display.eventDispatchThread.invokeAndWait(new Runnable() {
- public void run() {
- f_dpy.createNative();
- }
- } );
- } else {
- display.createNative();
- }
- if(null==display.aDevice) {
- throw new RuntimeException("Display.createNative() failed to instanciate an AbstractGraphicsDevice");
- }
- setCurrentDisplay(display);
- if(DEBUG) {
- System.err.println("Display.create("+name+") NEW: "+display+" "+Thread.currentThread());
- }
- } else {
- synchronized(display) {
- display.refCount++;
- if(DEBUG) {
- System.err.println("Display.create("+name+") REUSE: refCount "+display.refCount+", "+display+" "+Thread.currentThread());
- }
- }
- }
- if(DEBUG) {
- dumpDisplayMap("Display.create("+name+") END");
- }
- return display;
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-
- protected static Display wrapHandle(String type, String name, AbstractGraphicsDevice aDevice) {
- try {
- Class displayClass = getDisplayClass(type);
- Display display = (Display) displayClass.newInstance();
- display.name=name;
- display.aDevice=aDevice;
- return display;
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-
- public EventDispatchThread getEDT() { return eventDispatchThread; }
-
- public synchronized void destroy() {
- if(DEBUG) {
- dumpDisplayMap("Display.destroy("+name+") BEGIN");
- }
- refCount--;
- if(0==refCount) {
- removeCurrentDisplay(name);
- if(DEBUG) {
- System.err.println("Display.destroy("+name+") REMOVE: "+this+" "+Thread.currentThread());
- }
- if(null!=eventDispatchThread) {
- final Display f_dpy = this;
- final EventDispatchThread f_edt = eventDispatchThread;
- eventDispatchThread.invokeAndWait(new Runnable() {
- public void run() {
- f_dpy.closeNative();
- f_edt.stop();
- }
- } );
- } else {
- closeNative();
- }
- if(null!=eventDispatchThread) {
- eventDispatchThread.waitUntilStopped();
- eventDispatchThread=null;
- }
- aDevice = null;
- } else {
- if(DEBUG) {
- System.err.println("Display.destroy("+name+") KEEP: refCount "+refCount+", "+this+" "+Thread.currentThread());
- }
- }
- if(DEBUG) {
- dumpDisplayMap("Display.destroy("+name+") END");
- }
- }
-
- protected abstract void createNative();
- protected abstract void closeNative();
-
- public String getName() {
- return name;
- }
-
- public long getHandle() {
- if(null!=aDevice) {
- return aDevice.getHandle();
- }
- return 0;
- }
-
- public AbstractGraphicsDevice getGraphicsDevice() {
- return aDevice;
- }
-
- public void pumpMessages() {
- if(null!=eventDispatchThread) {
- dispatchMessages();
- } else {
- synchronized(this) {
- dispatchMessages();
- }
- }
- }
-
- public String toString() {
- return "NEWT-Display["+name+", refCount "+refCount+", "+aDevice+"]";
- }
-
- protected abstract void dispatchMessages();
-
- /** Default impl. nop - Currently only X11 needs a Display lock */
- protected void lockDisplay() { }
-
- /** Default impl. nop - Currently only X11 needs a Display lock */
- protected void unlockDisplay() { }
-
- protected EventDispatchThread eventDispatchThread = null;
- protected String name;
- protected int refCount;
- protected AbstractGraphicsDevice aDevice;
-}
-
diff --git a/src/newt/classes/com/sun/javafx/newt/Event.java b/src/newt/classes/com/sun/javafx/newt/Event.java
deleted file mode 100644
index 3c045c52b..000000000
--- a/src/newt/classes/com/sun/javafx/newt/Event.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.sun.javafx.newt;
-
-public class Event {
- private boolean isSystemEvent;
- private int eventType;
- private Window source;
- private long when;
-
- Event(boolean isSystemEvent, int eventType, Window source, long when) {
- this.isSystemEvent = isSystemEvent;
- this.eventType = eventType;
- this.source = source;
- this.when = when;
- }
-
- protected Event(int eventType, Window source, long when) {
- this(false, eventType, source, when);
- }
-
- /** Indicates whether this event was produced by the system or
- generated by user code. */
- public final boolean isSystemEvent() {
- return isSystemEvent;
- }
-
- /** Returns the event type of this event. */
- public final int getEventType() {
- return eventType;
- }
-
- /** Returns the source Window which produced this Event. */
- public final Window getSource() {
- return source;
- }
-
- /** Returns the timestamp, in milliseconds, of this event. */
- public final long getWhen() {
- return when;
- }
-
- public String toString() {
- return "Event[sys:"+isSystemEvent()+", source:"+getSource()+", when:"+getWhen()+"]";
- }
-
- public static String toHexString(int hex) {
- return "0x" + Integer.toHexString(hex);
- }
-
- public static String toHexString(long hex) {
- return "0x" + Long.toHexString(hex);
- }
-
-}
diff --git a/src/newt/classes/com/sun/javafx/newt/EventListener.java b/src/newt/classes/com/sun/javafx/newt/EventListener.java
deleted file mode 100644
index a312752fe..000000000
--- a/src/newt/classes/com/sun/javafx/newt/EventListener.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.sun.javafx.newt;
-
-public interface EventListener
-{
- public static final int WINDOW = 1 << 0;
- public static final int MOUSE = 1 << 1;
- public static final int KEY = 1 << 2;
- public static final int SURFACE = 1 << 3;
-
-}
-
diff --git a/src/newt/classes/com/sun/javafx/newt/InputEvent.java b/src/newt/classes/com/sun/javafx/newt/InputEvent.java
deleted file mode 100644
index b49c72e75..000000000
--- a/src/newt/classes/com/sun/javafx/newt/InputEvent.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.sun.javafx.newt;
-
-public abstract class InputEvent extends Event
-{
- public static final int SHIFT_MASK = 1 << 0;
- public static final int CTRL_MASK = 1 << 1;
- public static final int META_MASK = 1 << 2;
- public static final int ALT_MASK = 1 << 3;
- public static final int ALT_GRAPH_MASK = 1 << 5;
- public static final int BUTTON1_MASK = 1 << 6;
- public static final int BUTTON2_MASK = 1 << 7;
- public static final int BUTTON3_MASK = 1 << 8;
-
- protected InputEvent(boolean sysEvent, int eventType, Window source, long when, int modifiers) {
- super(sysEvent, eventType, source, when);
- this.consumed=false;
- this.modifiers=modifiers;
- }
-
- public void consume() {
- consumed=true;
- }
-
- public boolean isConsumed() {
- return consumed;
- }
- public int getModifiers() {
- return modifiers;
- }
- public boolean isAltDown() {
- return (modifiers&ALT_MASK)!=0;
- }
- public boolean isAltGraphDown() {
- return (modifiers&ALT_GRAPH_MASK)!=0;
- }
- public boolean isControlDown() {
- return (modifiers&CTRL_MASK)!=0;
- }
- public boolean isMetaDown() {
- return (modifiers&META_MASK)!=0;
- }
- public boolean isShiftDown() {
- return (modifiers&SHIFT_MASK)!=0;
- }
-
- public boolean isButton1Down() {
- return (modifiers&BUTTON1_MASK)!=0;
- }
-
- public boolean isButton2Down() {
- return (modifiers&BUTTON2_MASK)!=0;
- }
-
- public boolean isButton3Down() {
- return (modifiers&BUTTON3_MASK)!=0;
- }
-
- public String toString() {
- return "InputEvent[modifiers:"+modifiers+"]";
- }
-
- private boolean consumed;
- private int modifiers;
-}
diff --git a/src/newt/classes/com/sun/javafx/newt/Insets.java b/src/newt/classes/com/sun/javafx/newt/Insets.java
deleted file mode 100644
index 7d379cd92..000000000
--- a/src/newt/classes/com/sun/javafx/newt/Insets.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-package com.sun.javafx.newt;
-
-/**
- * Simple class representing insets.
- *
- * @author tdv
- */
-public class Insets implements Cloneable {
- public int top;
- public int left;
- public int bottom;
- public int right;
-
- /**
- * Creates and initializes a new Insets
object with the
- * specified top, left, bottom, and right insets.
- * @param top the inset from the top.
- * @param left the inset from the left.
- * @param bottom the inset from the bottom.
- * @param right the inset from the right.
- */
- public Insets(int top, int left, int bottom, int right) {
- this.top = top;
- this.left = left;
- this.bottom = bottom;
- this.right = right;
- }
-
- /**
- * Checks whether two insets objects are equal. Two instances
- * of Insets
are equal if the four integer values
- * of the fields top
, left
,
- * bottom
, and right
are all equal.
- * @return true
if the two insets are equal;
- * otherwise false
.
- */
- public boolean equals(Object obj) {
- if (obj instanceof Insets) {
- Insets insets = (Insets)obj;
- return ((top == insets.top) && (left == insets.left) &&
- (bottom == insets.bottom) && (right == insets.right));
- }
- return false;
- }
-
- /**
- * Returns the hash code for this Insets.
- *
- * @return a hash code for this Insets.
- */
- public int hashCode() {
- int sum1 = left + bottom;
- int sum2 = right + top;
- int val1 = sum1 * (sum1 + 1)/2 + left;
- int val2 = sum2 * (sum2 + 1)/2 + top;
- int sum3 = val1 + val2;
- return sum3 * (sum3 + 1)/2 + val2;
- }
-
- public String toString() {
- return getClass().getName() + "[top=" + top + ",left=" + left +
- ",bottom=" + bottom + ",right=" + right + "]";
- }
-
- public Object clone() {
- try {
- return super.clone();
- } catch (CloneNotSupportedException ex) {
- throw new InternalError();
- }
- }
-
-}
diff --git a/src/newt/classes/com/sun/javafx/newt/KeyEvent.java b/src/newt/classes/com/sun/javafx/newt/KeyEvent.java
deleted file mode 100644
index c7450da67..000000000
--- a/src/newt/classes/com/sun/javafx/newt/KeyEvent.java
+++ /dev/null
@@ -1,738 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.sun.javafx.newt;
-
-public class KeyEvent extends InputEvent
-{
- KeyEvent(boolean sysEvent, int eventType, Window source, long when, int modifiers, int keyCode, char keyChar) {
- super(sysEvent, eventType, source, when, modifiers);
- this.keyCode=keyCode;
- this.keyChar=keyChar;
- }
- public KeyEvent(int eventType, Window source, long when, int modifiers, int keyCode, char keyChar) {
- this(false, eventType, source, when, modifiers, keyCode, keyChar);
- }
-
- public char getKeyChar() {
- return keyChar;
- }
- public int getKeyCode() {
- return keyCode;
- }
-
- public String toString() {
- return "KeyEvent["+getEventTypeString(getEventType())+
- ", code "+keyCode+"("+toHexString(keyCode)+"), char <"+keyChar+"> ("+toHexString((int)keyChar)+"), isActionKey "+isActionKey()+", "+super.toString()+"]";
- }
-
- public static String getEventTypeString(int type) {
- switch(type) {
- case EVENT_KEY_PRESSED: return "EVENT_KEY_PRESSED";
- case EVENT_KEY_RELEASED: return "EVENT_KEY_RELEASED";
- case EVENT_KEY_TYPED: return "EVENT_KEY_TYPED";
- default: return "unknown (" + type + ")";
- }
- }
-
- public boolean isActionKey() {
- switch (keyCode) {
- case VK_HOME:
- case VK_END:
- case VK_PAGE_UP:
- case VK_PAGE_DOWN:
- case VK_UP:
- case VK_DOWN:
- case VK_LEFT:
- case VK_RIGHT:
-
- case VK_F1:
- case VK_F2:
- case VK_F3:
- case VK_F4:
- case VK_F5:
- case VK_F6:
- case VK_F7:
- case VK_F8:
- case VK_F9:
- case VK_F10:
- case VK_F11:
- case VK_F12:
- case VK_F13:
- case VK_F14:
- case VK_F15:
- case VK_F16:
- case VK_F17:
- case VK_F18:
- case VK_F19:
- case VK_F20:
- case VK_F21:
- case VK_F22:
- case VK_F23:
- case VK_F24:
- case VK_PRINTSCREEN:
- case VK_CAPS_LOCK:
- case VK_PAUSE:
- case VK_INSERT:
-
- case VK_HELP:
- case VK_WINDOWS:
- return true;
- }
- return false;
- }
-
- private int keyCode;
- private char keyChar;
-
- public static final int EVENT_KEY_PRESSED = 300;
- public static final int EVENT_KEY_RELEASED= 301;
- public static final int EVENT_KEY_TYPED = 302;
-
- /* Virtual key codes. */
-
- public static final int VK_ENTER = '\n';
- public static final int VK_BACK_SPACE = '\b';
- public static final int VK_TAB = '\t';
- public static final int VK_CANCEL = 0x03;
- public static final int VK_CLEAR = 0x0C;
- public static final int VK_SHIFT = 0x10;
- public static final int VK_CONTROL = 0x11;
- public static final int VK_ALT = 0x12;
- public static final int VK_PAUSE = 0x13;
- public static final int VK_CAPS_LOCK = 0x14;
- public static final int VK_ESCAPE = 0x1B;
- public static final int VK_SPACE = 0x20;
- public static final int VK_PAGE_UP = 0x21;
- public static final int VK_PAGE_DOWN = 0x22;
- public static final int VK_END = 0x23;
- public static final int VK_HOME = 0x24;
-
- /**
- * Constant for the non-numpad left arrow key.
- * @see #VK_KP_LEFT
- */
- public static final int VK_LEFT = 0x25;
-
- /**
- * Constant for the non-numpad up arrow key.
- * @see #VK_KP_UP
- */
- public static final int VK_UP = 0x26;
-
- /**
- * Constant for the non-numpad right arrow key.
- * @see #VK_KP_RIGHT
- */
- public static final int VK_RIGHT = 0x27;
-
- /**
- * Constant for the non-numpad down arrow key.
- * @see #VK_KP_DOWN
- */
- public static final int VK_DOWN = 0x28;
-
- /**
- * Constant for the comma key, ","
- */
- public static final int VK_COMMA = 0x2C;
-
- /**
- * Constant for the minus key, "-"
- * @since 1.2
- */
- public static final int VK_MINUS = 0x2D;
-
- /**
- * Constant for the period key, "."
- */
- public static final int VK_PERIOD = 0x2E;
-
- /**
- * Constant for the forward slash key, "/"
- */
- public static final int VK_SLASH = 0x2F;
-
- /** VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39) */
- public static final int VK_0 = 0x30;
- public static final int VK_1 = 0x31;
- public static final int VK_2 = 0x32;
- public static final int VK_3 = 0x33;
- public static final int VK_4 = 0x34;
- public static final int VK_5 = 0x35;
- public static final int VK_6 = 0x36;
- public static final int VK_7 = 0x37;
- public static final int VK_8 = 0x38;
- public static final int VK_9 = 0x39;
-
- /**
- * Constant for the semicolon key, ";"
- */
- public static final int VK_SEMICOLON = 0x3B;
-
- /**
- * Constant for the equals key, "="
- */
- public static final int VK_EQUALS = 0x3D;
-
- /** VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) */
- public static final int VK_A = 0x41;
- public static final int VK_B = 0x42;
- public static final int VK_C = 0x43;
- public static final int VK_D = 0x44;
- public static final int VK_E = 0x45;
- public static final int VK_F = 0x46;
- public static final int VK_G = 0x47;
- public static final int VK_H = 0x48;
- public static final int VK_I = 0x49;
- public static final int VK_J = 0x4A;
- public static final int VK_K = 0x4B;
- public static final int VK_L = 0x4C;
- public static final int VK_M = 0x4D;
- public static final int VK_N = 0x4E;
- public static final int VK_O = 0x4F;
- public static final int VK_P = 0x50;
- public static final int VK_Q = 0x51;
- public static final int VK_R = 0x52;
- public static final int VK_S = 0x53;
- public static final int VK_T = 0x54;
- public static final int VK_U = 0x55;
- public static final int VK_V = 0x56;
- public static final int VK_W = 0x57;
- public static final int VK_X = 0x58;
- public static final int VK_Y = 0x59;
- public static final int VK_Z = 0x5A;
-
- /**
- * Constant for the open bracket key, "["
- */
- public static final int VK_OPEN_BRACKET = 0x5B;
-
- /**
- * Constant for the back slash key, "\"
- */
- public static final int VK_BACK_SLASH = 0x5C;
-
- /**
- * Constant for the close bracket key, "]"
- */
- public static final int VK_CLOSE_BRACKET = 0x5D;
-
- public static final int VK_NUMPAD0 = 0x60;
- public static final int VK_NUMPAD1 = 0x61;
- public static final int VK_NUMPAD2 = 0x62;
- public static final int VK_NUMPAD3 = 0x63;
- public static final int VK_NUMPAD4 = 0x64;
- public static final int VK_NUMPAD5 = 0x65;
- public static final int VK_NUMPAD6 = 0x66;
- public static final int VK_NUMPAD7 = 0x67;
- public static final int VK_NUMPAD8 = 0x68;
- public static final int VK_NUMPAD9 = 0x69;
- public static final int VK_MULTIPLY = 0x6A;
- public static final int VK_ADD = 0x6B;
-
- /**
- * This constant is obsolete, and is included only for backwards
- * compatibility.
- * @see #VK_SEPARATOR
- */
- public static final int VK_SEPARATER = 0x6C;
-
- /**
- * Constant for the Numpad Separator key.
- * @since 1.4
- */
- public static final int VK_SEPARATOR = VK_SEPARATER;
-
- public static final int VK_SUBTRACT = 0x6D;
- public static final int VK_DECIMAL = 0x6E;
- public static final int VK_DIVIDE = 0x6F;
- public static final int VK_DELETE = 0x7F; /* ASCII DEL */
- public static final int VK_NUM_LOCK = 0x90;
- public static final int VK_SCROLL_LOCK = 0x91;
-
- /** Constant for the F1 function key. */
- public static final int VK_F1 = 0x70;
-
- /** Constant for the F2 function key. */
- public static final int VK_F2 = 0x71;
-
- /** Constant for the F3 function key. */
- public static final int VK_F3 = 0x72;
-
- /** Constant for the F4 function key. */
- public static final int VK_F4 = 0x73;
-
- /** Constant for the F5 function key. */
- public static final int VK_F5 = 0x74;
-
- /** Constant for the F6 function key. */
- public static final int VK_F6 = 0x75;
-
- /** Constant for the F7 function key. */
- public static final int VK_F7 = 0x76;
-
- /** Constant for the F8 function key. */
- public static final int VK_F8 = 0x77;
-
- /** Constant for the F9 function key. */
- public static final int VK_F9 = 0x78;
-
- /** Constant for the F10 function key. */
- public static final int VK_F10 = 0x79;
-
- /** Constant for the F11 function key. */
- public static final int VK_F11 = 0x7A;
-
- /** Constant for the F12 function key. */
- public static final int VK_F12 = 0x7B;
-
- /**
- * Constant for the F13 function key.
- * @since 1.2
- */
- /* F13 - F24 are used on IBM 3270 keyboard; use random range for constants. */
- public static final int VK_F13 = 0xF000;
-
- /**
- * Constant for the F14 function key.
- * @since 1.2
- */
- public static final int VK_F14 = 0xF001;
-
- /**
- * Constant for the F15 function key.
- * @since 1.2
- */
- public static final int VK_F15 = 0xF002;
-
- /**
- * Constant for the F16 function key.
- * @since 1.2
- */
- public static final int VK_F16 = 0xF003;
-
- /**
- * Constant for the F17 function key.
- * @since 1.2
- */
- public static final int VK_F17 = 0xF004;
-
- /**
- * Constant for the F18 function key.
- * @since 1.2
- */
- public static final int VK_F18 = 0xF005;
-
- /**
- * Constant for the F19 function key.
- * @since 1.2
- */
- public static final int VK_F19 = 0xF006;
-
- /**
- * Constant for the F20 function key.
- * @since 1.2
- */
- public static final int VK_F20 = 0xF007;
-
- /**
- * Constant for the F21 function key.
- * @since 1.2
- */
- public static final int VK_F21 = 0xF008;
-
- /**
- * Constant for the F22 function key.
- * @since 1.2
- */
- public static final int VK_F22 = 0xF009;
-
- /**
- * Constant for the F23 function key.
- * @since 1.2
- */
- public static final int VK_F23 = 0xF00A;
-
- /**
- * Constant for the F24 function key.
- * @since 1.2
- */
- public static final int VK_F24 = 0xF00B;
-
- public static final int VK_PRINTSCREEN = 0x9A;
- public static final int VK_INSERT = 0x9B;
- public static final int VK_HELP = 0x9C;
- public static final int VK_META = 0x9D;
-
- public static final int VK_BACK_QUOTE = 0xC0;
- public static final int VK_QUOTE = 0xDE;
-
- /**
- * Constant for the numeric keypad up arrow key.
- * @see #VK_UP
- * @since 1.2
- */
- public static final int VK_KP_UP = 0xE0;
-
- /**
- * Constant for the numeric keypad down arrow key.
- * @see #VK_DOWN
- * @since 1.2
- */
- public static final int VK_KP_DOWN = 0xE1;
-
- /**
- * Constant for the numeric keypad left arrow key.
- * @see #VK_LEFT
- * @since 1.2
- */
- public static final int VK_KP_LEFT = 0xE2;
-
- /**
- * Constant for the numeric keypad right arrow key.
- * @see #VK_RIGHT
- * @since 1.2
- */
- public static final int VK_KP_RIGHT = 0xE3;
-
- /* For European keyboards */
- /** @since 1.2 */
- public static final int VK_DEAD_GRAVE = 0x80;
- /** @since 1.2 */
- public static final int VK_DEAD_ACUTE = 0x81;
- /** @since 1.2 */
- public static final int VK_DEAD_CIRCUMFLEX = 0x82;
- /** @since 1.2 */
- public static final int VK_DEAD_TILDE = 0x83;
- /** @since 1.2 */
- public static final int VK_DEAD_MACRON = 0x84;
- /** @since 1.2 */
- public static final int VK_DEAD_BREVE = 0x85;
- /** @since 1.2 */
- public static final int VK_DEAD_ABOVEDOT = 0x86;
- /** @since 1.2 */
- public static final int VK_DEAD_DIAERESIS = 0x87;
- /** @since 1.2 */
- public static final int VK_DEAD_ABOVERING = 0x88;
- /** @since 1.2 */
- public static final int VK_DEAD_DOUBLEACUTE = 0x89;
- /** @since 1.2 */
- public static final int VK_DEAD_CARON = 0x8a;
- /** @since 1.2 */
- public static final int VK_DEAD_CEDILLA = 0x8b;
- /** @since 1.2 */
- public static final int VK_DEAD_OGONEK = 0x8c;
- /** @since 1.2 */
- public static final int VK_DEAD_IOTA = 0x8d;
- /** @since 1.2 */
- public static final int VK_DEAD_VOICED_SOUND = 0x8e;
- /** @since 1.2 */
- public static final int VK_DEAD_SEMIVOICED_SOUND = 0x8f;
-
- /** @since 1.2 */
- public static final int VK_AMPERSAND = 0x96;
- /** @since 1.2 */
- public static final int VK_ASTERISK = 0x97;
- /** @since 1.2 */
- public static final int VK_QUOTEDBL = 0x98;
- /** @since 1.2 */
- public static final int VK_LESS = 0x99;
-
- /** @since 1.2 */
- public static final int VK_GREATER = 0xa0;
- /** @since 1.2 */
- public static final int VK_BRACELEFT = 0xa1;
- /** @since 1.2 */
- public static final int VK_BRACERIGHT = 0xa2;
-
- /**
- * Constant for the "@" key.
- * @since 1.2
- */
- public static final int VK_AT = 0x0200;
-
- /**
- * Constant for the ":" key.
- * @since 1.2
- */
- public static final int VK_COLON = 0x0201;
-
- /**
- * Constant for the "^" key.
- * @since 1.2
- */
- public static final int VK_CIRCUMFLEX = 0x0202;
-
- /**
- * Constant for the "$" key.
- * @since 1.2
- */
- public static final int VK_DOLLAR = 0x0203;
-
- /**
- * Constant for the Euro currency sign key.
- * @since 1.2
- */
- public static final int VK_EURO_SIGN = 0x0204;
-
- /**
- * Constant for the "!" key.
- * @since 1.2
- */
- public static final int VK_EXCLAMATION_MARK = 0x0205;
-
- /**
- * Constant for the inverted exclamation mark key.
- * @since 1.2
- */
- public static final int VK_INVERTED_EXCLAMATION_MARK = 0x0206;
-
- /**
- * Constant for the "(" key.
- * @since 1.2
- */
- public static final int VK_LEFT_PARENTHESIS = 0x0207;
-
- /**
- * Constant for the "#" key.
- * @since 1.2
- */
- public static final int VK_NUMBER_SIGN = 0x0208;
-
- /**
- * Constant for the "+" key.
- * @since 1.2
- */
- public static final int VK_PLUS = 0x0209;
-
- /**
- * Constant for the ")" key.
- * @since 1.2
- */
- public static final int VK_RIGHT_PARENTHESIS = 0x020A;
-
- /**
- * Constant for the "_" key.
- * @since 1.2
- */
- public static final int VK_UNDERSCORE = 0x020B;
-
- /**
- * Constant for the Microsoft Windows "Windows" key.
- * It is used for both the left and right version of the key.
- * @see #getKeyLocation()
- * @since 1.5
- */
- public static final int VK_WINDOWS = 0x020C;
-
- /**
- * Constant for the Microsoft Windows Context Menu key.
- * @since 1.5
- */
- public static final int VK_CONTEXT_MENU = 0x020D;
-
- /* for input method support on Asian Keyboards */
-
- /* not clear what this means - listed in Microsoft Windows API */
- public static final int VK_FINAL = 0x0018;
-
- /** Constant for the Convert function key. */
- /* Japanese PC 106 keyboard, Japanese Solaris keyboard: henkan */
- public static final int VK_CONVERT = 0x001C;
-
- /** Constant for the Don't Convert function key. */
- /* Japanese PC 106 keyboard: muhenkan */
- public static final int VK_NONCONVERT = 0x001D;
-
- /** Constant for the Accept or Commit function key. */
- /* Japanese Solaris keyboard: kakutei */
- public static final int VK_ACCEPT = 0x001E;
-
- /* not clear what this means - listed in Microsoft Windows API */
- public static final int VK_MODECHANGE = 0x001F;
-
- /* replaced by VK_KANA_LOCK for Microsoft Windows and Solaris;
- might still be used on other platforms */
- public static final int VK_KANA = 0x0015;
-
- /* replaced by VK_INPUT_METHOD_ON_OFF for Microsoft Windows and Solaris;
- might still be used for other platforms */
- public static final int VK_KANJI = 0x0019;
-
- /**
- * Constant for the Alphanumeric function key.
- * @since 1.2
- */
- /* Japanese PC 106 keyboard: eisuu */
- public static final int VK_ALPHANUMERIC = 0x00F0;
-
- /**
- * Constant for the Katakana function key.
- * @since 1.2
- */
- /* Japanese PC 106 keyboard: katakana */
- public static final int VK_KATAKANA = 0x00F1;
-
- /**
- * Constant for the Hiragana function key.
- * @since 1.2
- */
- /* Japanese PC 106 keyboard: hiragana */
- public static final int VK_HIRAGANA = 0x00F2;
-
- /**
- * Constant for the Full-Width Characters function key.
- * @since 1.2
- */
- /* Japanese PC 106 keyboard: zenkaku */
- public static final int VK_FULL_WIDTH = 0x00F3;
-
- /**
- * Constant for the Half-Width Characters function key.
- * @since 1.2
- */
- /* Japanese PC 106 keyboard: hankaku */
- public static final int VK_HALF_WIDTH = 0x00F4;
-
- /**
- * Constant for the Roman Characters function key.
- * @since 1.2
- */
- /* Japanese PC 106 keyboard: roumaji */
- public static final int VK_ROMAN_CHARACTERS = 0x00F5;
-
- /**
- * Constant for the All Candidates function key.
- * @since 1.2
- */
- /* Japanese PC 106 keyboard - VK_CONVERT + ALT: zenkouho */
- public static final int VK_ALL_CANDIDATES = 0x0100;
-
- /**
- * Constant for the Previous Candidate function key.
- * @since 1.2
- */
- /* Japanese PC 106 keyboard - VK_CONVERT + SHIFT: maekouho */
- public static final int VK_PREVIOUS_CANDIDATE = 0x0101;
-
- /**
- * Constant for the Code Input function key.
- * @since 1.2
- */
- /* Japanese PC 106 keyboard - VK_ALPHANUMERIC + ALT: kanji bangou */
- public static final int VK_CODE_INPUT = 0x0102;
-
- /**
- * Constant for the Japanese-Katakana function key.
- * This key switches to a Japanese input method and selects its Katakana input mode.
- * @since 1.2
- */
- /* Japanese Macintosh keyboard - VK_JAPANESE_HIRAGANA + SHIFT */
- public static final int VK_JAPANESE_KATAKANA = 0x0103;
-
- /**
- * Constant for the Japanese-Hiragana function key.
- * This key switches to a Japanese input method and selects its Hiragana input mode.
- * @since 1.2
- */
- /* Japanese Macintosh keyboard */
- public static final int VK_JAPANESE_HIRAGANA = 0x0104;
-
- /**
- * Constant for the Japanese-Roman function key.
- * This key switches to a Japanese input method and selects its Roman-Direct input mode.
- * @since 1.2
- */
- /* Japanese Macintosh keyboard */
- public static final int VK_JAPANESE_ROMAN = 0x0105;
-
- /**
- * Constant for the locking Kana function key.
- * This key locks the keyboard into a Kana layout.
- * @since 1.3
- */
- /* Japanese PC 106 keyboard with special Windows driver - eisuu + Control; Japanese Solaris keyboard: kana */
- public static final int VK_KANA_LOCK = 0x0106;
-
- /**
- * Constant for the input method on/off key.
- * @since 1.3
- */
- /* Japanese PC 106 keyboard: kanji. Japanese Solaris keyboard: nihongo */
- public static final int VK_INPUT_METHOD_ON_OFF = 0x0107;
-
- /* for Sun keyboards */
- /** @since 1.2 */
- public static final int VK_CUT = 0xFFD1;
- /** @since 1.2 */
- public static final int VK_COPY = 0xFFCD;
- /** @since 1.2 */
- public static final int VK_PASTE = 0xFFCF;
- /** @since 1.2 */
- public static final int VK_UNDO = 0xFFCB;
- /** @since 1.2 */
- public static final int VK_AGAIN = 0xFFC9;
- /** @since 1.2 */
- public static final int VK_FIND = 0xFFD0;
- /** @since 1.2 */
- public static final int VK_PROPS = 0xFFCA;
- /** @since 1.2 */
- public static final int VK_STOP = 0xFFC8;
-
- /**
- * Constant for the Compose function key.
- * @since 1.2
- */
- public static final int VK_COMPOSE = 0xFF20;
-
- /**
- * Constant for the AltGraph function key.
- * @since 1.2
- */
- public static final int VK_ALT_GRAPH = 0xFF7E;
-
- /**
- * Constant for the Begin key.
- * @since 1.5
- */
- public static final int VK_BEGIN = 0xFF58;
-
- /**
- * This value is used to indicate that the keyCode is unknown.
- * KEY_TYPED events do not have a keyCode value; this value
- * is used instead.
- */
- public static final int VK_UNDEFINED = 0x0;
-}
-
diff --git a/src/newt/classes/com/sun/javafx/newt/KeyListener.java b/src/newt/classes/com/sun/javafx/newt/KeyListener.java
deleted file mode 100644
index 6f022c45a..000000000
--- a/src/newt/classes/com/sun/javafx/newt/KeyListener.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.sun.javafx.newt;
-
-public interface KeyListener extends EventListener
-{
- public void keyPressed(KeyEvent e);
- public void keyReleased(KeyEvent e);
- public void keyTyped(KeyEvent e) ;
-}
-
diff --git a/src/newt/classes/com/sun/javafx/newt/MouseEvent.java b/src/newt/classes/com/sun/javafx/newt/MouseEvent.java
deleted file mode 100644
index ede193e1c..000000000
--- a/src/newt/classes/com/sun/javafx/newt/MouseEvent.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.sun.javafx.newt;
-
-public class MouseEvent extends InputEvent
-{
- public static final int BUTTON1 = 1;
- public static final int BUTTON2 = 2;
- public static final int BUTTON3 = 3;
- public static final int BUTTON4 = 4;
- public static final int BUTTON5 = 5;
- public static final int BUTTON6 = 6;
- public static final int BUTTON_NUMBER = 6;
-
- protected MouseEvent(boolean sysEvent, int eventType, Window source, long when,
- int modifiers, int x, int y, int clickCount, int button,
- int rotation)
- {
- super(sysEvent, eventType, source, when, modifiers);
- this.x=x;
- this.y=y;
- this.clickCount=clickCount;
- this.button=button;
- this.wheelRotation = rotation;
- }
- public MouseEvent(int eventType, Window source, long when, int modifiers,
- int x, int y, int clickCount, int button, int rotation) {
- this(false, eventType, source, when, modifiers, x, y, clickCount, button,
- rotation);
- }
-
- public int getButton() {
- return button;
- }
- public int getClickCount() {
- return clickCount;
- }
- public int getX() {
- return x;
- }
- public int getY() {
- return y;
- }
- public int getWheelRotation() {
- return wheelRotation;
- }
-
- public String toString() {
- return "MouseEvent["+getEventTypeString(getEventType())+
- ", "+x+"/"+y+", button "+button+", count "+clickCount+
- ", wheel rotation "+wheelRotation+
- ", "+super.toString()+"]";
- }
-
- public static String getEventTypeString(int type) {
- switch(type) {
- case EVENT_MOUSE_CLICKED: return "EVENT_MOUSE_CLICKED";
- case EVENT_MOUSE_ENTERED: return "EVENT_MOUSE_ENTERED";
- case EVENT_MOUSE_EXITED: return "EVENT_MOUSE_EXITED";
- case EVENT_MOUSE_PRESSED: return "EVENT_MOUSE_PRESSED";
- case EVENT_MOUSE_RELEASED: return "EVENT_MOUSE_RELEASED";
- case EVENT_MOUSE_MOVED: return "EVENT_MOUSE_MOVED";
- case EVENT_MOUSE_DRAGGED: return "EVENT_MOUSE_DRAGGED";
- case EVENT_MOUSE_WHEEL_MOVED: return "EVENT_MOUSE_WHEEL_MOVED";
- default: return "unknown (" + type + ")";
- }
- }
-
- private int x, y, clickCount, button, wheelRotation;
-
- public static final int EVENT_MOUSE_CLICKED = 200;
- public static final int EVENT_MOUSE_ENTERED = 201;
- public static final int EVENT_MOUSE_EXITED = 202;
- public static final int EVENT_MOUSE_PRESSED = 203;
- public static final int EVENT_MOUSE_RELEASED = 204;
- public static final int EVENT_MOUSE_MOVED = 205;
- public static final int EVENT_MOUSE_DRAGGED = 206;
- public static final int EVENT_MOUSE_WHEEL_MOVED = 207;
-}
diff --git a/src/newt/classes/com/sun/javafx/newt/MouseListener.java b/src/newt/classes/com/sun/javafx/newt/MouseListener.java
deleted file mode 100644
index 3d2031f2a..000000000
--- a/src/newt/classes/com/sun/javafx/newt/MouseListener.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.sun.javafx.newt;
-
-public interface MouseListener extends EventListener
-{
- public void mouseClicked(MouseEvent e);
- public void mouseEntered(MouseEvent e);
- public void mouseExited(MouseEvent e);
- public void mousePressed(MouseEvent e);
- public void mouseReleased(MouseEvent e);
- public void mouseMoved(MouseEvent e);
- public void mouseDragged(MouseEvent e);
- public void mouseWheelMoved(MouseEvent e);
-}
-
diff --git a/src/newt/classes/com/sun/javafx/newt/NewtFactory.java b/src/newt/classes/com/sun/javafx/newt/NewtFactory.java
deleted file mode 100755
index 6e25b19eb..000000000
--- a/src/newt/classes/com/sun/javafx/newt/NewtFactory.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.sun.javafx.newt;
-
-import javax.media.nativewindow.*;
-import java.util.ArrayList;
-import java.util.Iterator;
-import com.sun.nativewindow.impl.jvm.JVMUtil;
-
-public abstract class NewtFactory {
- // Work-around for initialization order problems on Mac OS X
- // between native Newt and (apparently) Fmod
- static {
- JVMUtil.initSingleton();
- Window.init(NativeWindowFactory.getNativeWindowType(true));
- }
-
- static Class getCustomClass(String packageName, String classBaseName) {
- Class clazz = null;
- if(packageName!=null || classBaseName!=null) {
- String clazzName = packageName + "." + classBaseName ;
- try {
- clazz = Class.forName(clazzName);
- } catch (Throwable t) {}
- }
- return clazz;
- }
-
- private static boolean useEDT = true;
-
- /**
- * Toggles the usage of an EventDispatchThread while creating a Display.
- * The default is enabled.
- * The EventDispatchThread is thread local to the Display instance.
- */
- public static synchronized void setUseEDT(boolean onoff) {
- useEDT = onoff;
- }
-
- /** @see #setUseEDT(boolean) */
- public static boolean useEDT() { return useEDT; }
-
- /**
- * Create a Display entity, incl native creation
- */
- public static Display createDisplay(String name) {
- return Display.create(NativeWindowFactory.getNativeWindowType(true), name);
- }
-
- /**
- * Create a Display entity using the given implementation type, incl native creation
- */
- public static Display createDisplay(String type, String name) {
- return Display.create(type, name);
- }
-
- /**
- * Create a Screen entity, incl native creation
- */
- public static Screen createScreen(Display display, int index) {
- return Screen.create(NativeWindowFactory.getNativeWindowType(true), display, index);
- }
-
- /**
- * Create a Screen entity using the given implementation type, incl native creation
- */
- public static Screen createScreen(String type, Display display, int index) {
- return Screen.create(type, display, index);
- }
-
- /**
- * Create a Window entity, incl native creation
- */
- public static Window createWindow(Screen screen, Capabilities caps) {
- return Window.create(NativeWindowFactory.getNativeWindowType(true), 0, screen, caps, false);
- }
-
- public static Window createWindow(Screen screen, Capabilities caps, boolean undecorated) {
- return Window.create(NativeWindowFactory.getNativeWindowType(true), 0, screen, caps, undecorated);
- }
-
- public static Window createWindow(long parentWindowHandle, Screen screen, Capabilities caps, boolean undecorated) {
- return Window.create(NativeWindowFactory.getNativeWindowType(true), parentWindowHandle, screen, caps, undecorated);
- }
-
- /**
- * Ability to try a Window type with a construnctor argument, if supported .. AWTWindow(Frame frame)
,
- * to support an external created AWT Frame, ie the browsers embedded frame.
- */
- public static Window createWindow(Object[] cstrArguments, Screen screen, Capabilities caps, boolean undecorated) {
- return Window.create(NativeWindowFactory.getNativeWindowType(true), cstrArguments, screen, caps, undecorated);
- }
-
- /**
- * Create a Window entity using the given implementation type, incl native creation
- */
- public static Window createWindow(String type, Screen screen, Capabilities caps) {
- return Window.create(type, 0, screen, caps, false);
- }
-
- public static Window createWindow(String type, Screen screen, Capabilities caps, boolean undecorated) {
- return Window.create(type, 0, screen, caps, undecorated);
- }
-
- public static Window createWindow(String type, long parentWindowHandle, Screen screen, Capabilities caps, boolean undecorated) {
- return Window.create(type, parentWindowHandle, screen, caps, undecorated);
- }
-
- public static Window createWindow(String type, Object[] cstrArguments, Screen screen, Capabilities caps, boolean undecorated) {
- return Window.create(type, cstrArguments, screen, caps, undecorated);
- }
-
- /**
- * Instantiate a Display entity using the native handle.
- */
- public static Display wrapDisplay(String name, AbstractGraphicsDevice device) {
- return Display.wrapHandle(NativeWindowFactory.getNativeWindowType(true), name, device);
- }
-
- /**
- * Instantiate a Screen entity using the native handle.
- */
- public static Screen wrapScreen(Display display, AbstractGraphicsScreen screen) {
- return Screen.wrapHandle(NativeWindowFactory.getNativeWindowType(true), display, screen);
- }
-
- /**
- * Instantiate a Window entity using the native handle.
- */
- public static Window wrapWindow(Screen screen, AbstractGraphicsConfiguration config,
- long windowHandle, boolean fullscreen, boolean visible,
- int x, int y, int width, int height) {
- return Window.wrapHandle(NativeWindowFactory.getNativeWindowType(true), screen, config,
- windowHandle, fullscreen, visible, x, y, width, height);
- }
-
- private static final boolean instanceOf(Object obj, String clazzName) {
- Class clazz = obj.getClass();
- do {
- if(clazz.getName().equals(clazzName)) {
- return true;
- }
- clazz = clazz.getSuperclass();
- } while (clazz!=null);
- return false;
- }
-
-}
-
diff --git a/src/newt/classes/com/sun/javafx/newt/OffscreenWindow.java b/src/newt/classes/com/sun/javafx/newt/OffscreenWindow.java
deleted file mode 100644
index 11ce8e6c7..000000000
--- a/src/newt/classes/com/sun/javafx/newt/OffscreenWindow.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.sun.javafx.newt;
-
-import javax.media.nativewindow.*;
-
-public class OffscreenWindow extends Window implements SurfaceChangeable {
-
- long surfaceHandle = 0;
-
- public OffscreenWindow() {
- }
-
- static long nextWindowHandle = 0x100; // start here - a marker
-
- protected void createNative(long parentWindowHandle, Capabilities caps) {
- if(0!=parentWindowHandle) {
- throw new NativeWindowException("OffscreenWindow does not support window parenting");
- }
- if(caps.isOnscreen()) {
- throw new NativeWindowException("Capabilities is onscreen");
- }
- AbstractGraphicsScreen aScreen = screen.getGraphicsScreen();
- config = GraphicsConfigurationFactory.getFactory(aScreen.getDevice()).chooseGraphicsConfiguration(caps, null, aScreen);
- if (config == null) {
- throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
- }
-
- synchronized(OffscreenWindow.class) {
- windowHandle = nextWindowHandle++;
- }
- }
-
- protected void closeNative() {
- // nop
- }
-
- public void invalidate() {
- super.invalidate();
- surfaceHandle = 0;
- }
-
- public synchronized void destroy() {
- surfaceHandle = 0;
- }
-
- public void setSurfaceHandle(long handle) {
- surfaceHandle = handle ;
- }
-
- public long getSurfaceHandle() {
- return surfaceHandle;
- }
-
- public void setVisible(boolean visible) {
- if(!visible) {
- this.visible = visible;
- }
- }
-
- public void setSize(int width, int height) {
- if(!visible) {
- this.width = width;
- this.height = height;
- }
- }
-
- public void setPosition(int x, int y) {
- // nop
- }
-
- public boolean setFullscreen(boolean fullscreen) {
- // nop
- return false;
- }
-}
-
diff --git a/src/newt/classes/com/sun/javafx/newt/PaintEvent.java b/src/newt/classes/com/sun/javafx/newt/PaintEvent.java
deleted file mode 100755
index b27b969da..000000000
--- a/src/newt/classes/com/sun/javafx/newt/PaintEvent.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.sun.javafx.newt;
-
-/**
- *
- * @author tdv
- */
-public class PaintEvent extends Event {
-
- // bounds of the damage region
- private int x, y, width, height;
- public PaintEvent(int eventType, Window source,
- long when, int x, int y, int w, int h)
- {
- super(true, eventType, source, when);
- this.x = x;
- this.y = y;
- this.width = w;
- this.height = h;
- }
-
- public int getHeight() {
- return height;
- }
-
- public int getWidth() {
- return width;
- }
-
- public int getX() {
- return x;
- }
-
- public int getY() {
- return y;
- }
-
- public String toString() {
- return "ExposeEvent[modifiers: x="+x+" y="+y+" w="+width+" h="+height +"]";
- }
-
-}
diff --git a/src/newt/classes/com/sun/javafx/newt/PaintListener.java b/src/newt/classes/com/sun/javafx/newt/PaintListener.java
deleted file mode 100755
index fab5fa35c..000000000
--- a/src/newt/classes/com/sun/javafx/newt/PaintListener.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.sun.javafx.newt;
-
-/**
- *
- * @author tdv
- */
-public interface PaintListener {
- public void exposed(PaintEvent e);
-}
diff --git a/src/newt/classes/com/sun/javafx/newt/Screen.java b/src/newt/classes/com/sun/javafx/newt/Screen.java
deleted file mode 100755
index 9edd0b719..000000000
--- a/src/newt/classes/com/sun/javafx/newt/Screen.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.sun.javafx.newt;
-
-import com.sun.javafx.newt.impl.*;
-
-import javax.media.nativewindow.*;
-import java.security.*;
-
-public abstract class Screen {
-
- private static Class getScreenClass(String type)
- throws ClassNotFoundException
- {
- Class screenClass = NewtFactory.getCustomClass(type, "Screen");
- if(null==screenClass) {
- if (NativeWindowFactory.TYPE_EGL.equals(type)) {
- screenClass = Class.forName("com.sun.javafx.newt.opengl.kd.KDScreen");
- } else if (NativeWindowFactory.TYPE_WINDOWS.equals(type)) {
- screenClass = Class.forName("com.sun.javafx.newt.windows.WindowsScreen");
- } else if (NativeWindowFactory.TYPE_MACOSX.equals(type)) {
- screenClass = Class.forName("com.sun.javafx.newt.macosx.MacScreen");
- } else if (NativeWindowFactory.TYPE_X11.equals(type)) {
- screenClass = Class.forName("com.sun.javafx.newt.x11.X11Screen");
- } else if (NativeWindowFactory.TYPE_AWT.equals(type)) {
- screenClass = Class.forName("com.sun.javafx.newt.awt.AWTScreen");
- } else {
- throw new RuntimeException("Unknown window type \"" + type + "\"");
- }
- }
- return screenClass;
- }
-
- protected static Screen create(String type, Display display, int idx) {
- try {
- if(usrWidth<0 || usrHeight<0) {
- usrWidth = Debug.getIntProperty("newt.ws.swidth", true, localACC);
- usrHeight = Debug.getIntProperty("newt.ws.sheight", true, localACC);
- System.out.println("User screen size "+usrWidth+"x"+usrHeight);
- }
- Class screenClass = getScreenClass(type);
- Screen screen = (Screen) screenClass.newInstance();
- screen.display = display;
- screen.createNative(idx);
- if(null==screen.aScreen) {
- throw new RuntimeException("Screen.createNative() failed to instanciate an AbstractGraphicsScreen");
- }
- return screen;
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-
- public synchronized void destroy() {
- closeNative();
- display = null;
- aScreen = null;
- }
-
- protected static Screen wrapHandle(String type, Display display, AbstractGraphicsScreen aScreen) {
- try {
- Class screenClass = getScreenClass(type);
- Screen screen = (Screen) screenClass.newInstance();
- screen.display = display;
- screen.aScreen = aScreen;
- return screen;
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-
- protected abstract void createNative(int index);
- protected abstract void closeNative();
-
- protected void setScreenSize(int w, int h) {
- System.out.println("Detected screen size "+w+"x"+h);
- width=w; height=h;
- }
-
- public Display getDisplay() {
- return display;
- }
-
- public int getIndex() {
- return aScreen.getIndex();
- }
-
- public AbstractGraphicsScreen getGraphicsScreen() {
- return aScreen;
- }
-
- /**
- * The actual implementation shall return the detected display value,
- * if not we return 800.
- * This can be overwritten with the user property 'newt.ws.swidth',
- */
- public int getWidth() {
- return (usrWidth>0) ? usrWidth : (width>0) ? width : 480;
- }
-
- /**
- * The actual implementation shall return the detected display value,
- * if not we return 480.
- * This can be overwritten with the user property 'newt.ws.sheight',
- */
- public int getHeight() {
- return (usrHeight>0) ? usrHeight : (height>0) ? height : 480;
- }
-
- protected Display display;
- protected AbstractGraphicsScreen aScreen;
- protected int width=-1, height=-1; // detected values: set using setScreenSize
- protected static int usrWidth=-1, usrHeight=-1; // property values: newt.ws.swidth and newt.ws.sheight
- private static AccessControlContext localACC = AccessController.getContext();
-}
-
diff --git a/src/newt/classes/com/sun/javafx/newt/Window.java b/src/newt/classes/com/sun/javafx/newt/Window.java
deleted file mode 100755
index 58bd251d2..000000000
--- a/src/newt/classes/com/sun/javafx/newt/Window.java
+++ /dev/null
@@ -1,929 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.sun.javafx.newt;
-
-import com.sun.javafx.newt.impl.Debug;
-import com.sun.javafx.newt.util.EventDispatchThread;
-
-import javax.media.nativewindow.*;
-import com.sun.nativewindow.impl.NWReflection;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.lang.reflect.Method;
-
-public abstract class Window implements NativeWindow
-{
- public static final boolean DEBUG_MOUSE_EVENT = Debug.debug("Window.MouseEvent");
- public static final boolean DEBUG_KEY_EVENT = Debug.debug("Window.KeyEvent");
- public static final boolean DEBUG_WINDOW_EVENT = Debug.debug("Window.WindowEvent");
- public static final boolean DEBUG_IMPLEMENTATION = Debug.debug("Window");
-
- // Workaround for initialization order problems on Mac OS X
- // between native Newt and (apparently) Fmod -- if Fmod is
- // initialized first then the connection to the window server
- // breaks, leading to errors from deep within the AppKit
- static void init(String type) {
- if (NativeWindowFactory.TYPE_MACOSX.equals(type)) {
- try {
- getWindowClass(type);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
-
- private static Class getWindowClass(String type)
- throws ClassNotFoundException
- {
- Class windowClass = NewtFactory.getCustomClass(type, "Window");
- if(null==windowClass) {
- if (NativeWindowFactory.TYPE_EGL.equals(type)) {
- windowClass = Class.forName("com.sun.javafx.newt.opengl.kd.KDWindow");
- } else if (NativeWindowFactory.TYPE_WINDOWS.equals(type)) {
- windowClass = Class.forName("com.sun.javafx.newt.windows.WindowsWindow");
- } else if (NativeWindowFactory.TYPE_MACOSX.equals(type)) {
- windowClass = Class.forName("com.sun.javafx.newt.macosx.MacWindow");
- } else if (NativeWindowFactory.TYPE_X11.equals(type)) {
- windowClass = Class.forName("com.sun.javafx.newt.x11.X11Window");
- } else if (NativeWindowFactory.TYPE_AWT.equals(type)) {
- windowClass = Class.forName("com.sun.javafx.newt.awt.AWTWindow");
- } else {
- throw new NativeWindowException("Unknown window type \"" + type + "\"");
- }
- }
- return windowClass;
- }
-
- protected static Window create(String type, final long parentWindowHandle, Screen screen, final Capabilities caps, boolean undecorated) {
- try {
- Class windowClass;
- if(caps.isOnscreen()) {
- windowClass = getWindowClass(type);
- } else {
- windowClass = OffscreenWindow.class;
- }
- Window window = (Window) windowClass.newInstance();
- window.invalidate();
- window.screen = screen;
- window.setUndecorated(undecorated||0!=parentWindowHandle);
- EventDispatchThread edt = screen.getDisplay().getEDT();
- if(null!=edt) {
- final Window f_win = window;
- edt.invokeAndWait(new Runnable() {
- public void run() {
- f_win.createNative(parentWindowHandle, caps);
- }
- } );
- } else {
- window.createNative(parentWindowHandle, caps);
- }
- return window;
- } catch (Throwable t) {
- t.printStackTrace();
- throw new NativeWindowException(t);
- }
- }
-
- protected static Window create(String type, Object[] cstrArguments, Screen screen, final Capabilities caps, boolean undecorated) {
- try {
- Class windowClass = getWindowClass(type);
- Class[] cstrArgumentTypes = getCustomConstructorArgumentTypes(windowClass);
- if(null==cstrArgumentTypes) {
- throw new NativeWindowException("WindowClass "+windowClass+" doesn't support custom arguments in constructor");
- }
- int argsChecked = verifyConstructorArgumentTypes(cstrArgumentTypes, cstrArguments);
- if ( argsChecked < cstrArguments.length ) {
- throw new NativeWindowException("WindowClass "+windowClass+" constructor mismatch at argument #"+argsChecked+"; Constructor: "+getTypeStrList(cstrArgumentTypes)+", arguments: "+getArgsStrList(cstrArguments));
- }
- Window window = (Window) NWReflection.createInstance( windowClass, cstrArgumentTypes, cstrArguments ) ;
- window.invalidate();
- window.screen = screen;
- window.setUndecorated(undecorated);
- EventDispatchThread edt = screen.getDisplay().getEDT();
- if(null!=edt) {
- final Window f_win = window;
- edt.invokeAndWait(new Runnable() {
- public void run() {
- f_win.createNative(0, caps);
- }
- } );
- } else {
- window.createNative(0, caps);
- }
- return window;
- } catch (Throwable t) {
- t.printStackTrace();
- throw new NativeWindowException(t);
- }
- }
-
- protected static Window wrapHandle(String type, Screen screen, AbstractGraphicsConfiguration config,
- long windowHandle, boolean fullscreen, boolean visible,
- int x, int y, int width, int height)
- {
- try {
- Class windowClass = getWindowClass(type);
- Window window = (Window) windowClass.newInstance();
- window.invalidate();
- window.screen = screen;
- window.config = config;
- window.windowHandle = windowHandle;
- window.fullscreen=fullscreen;
- window.visible=visible;
- window.x=x;
- window.y=y;
- window.width=width;
- window.height=height;
- return window;
- } catch (Throwable t) {
- t.printStackTrace();
- throw new NativeWindowException(t);
- }
- }
-
- public static String toHexString(int hex) {
- return "0x" + Integer.toHexString(hex);
- }
-
- public static String toHexString(long hex) {
- return "0x" + Long.toHexString(hex);
- }
-
- protected Screen screen;
-
- protected AbstractGraphicsConfiguration config;
- protected long windowHandle;
- protected boolean fullscreen, visible;
- protected int width, height, x, y;
- protected int eventMask;
-
- protected String title = "Newt Window";
- protected boolean undecorated = false;
-
- /**
- * Create native windowHandle, ie creates a new native invisible window.
- *
- * The parentWindowHandle may be null, in which case no window parenting
- * is requested.
- *
- * Shall use the capabilities to determine the graphics configuration
- * and shall set the chosen capabilities.
- */
- protected abstract void createNative(long parentWindowHandle, Capabilities caps);
-
- protected abstract void closeNative();
-
- public Screen getScreen() {
- return screen;
- }
-
- public String toString() {
- StringBuffer sb = new StringBuffer();
-
- sb.append(getClass().getName()+"[config "+config+
- ", windowHandle "+toHexString(getWindowHandle())+
- ", surfaceHandle "+toHexString(getSurfaceHandle())+
- ", pos "+getX()+"/"+getY()+", size "+getWidth()+"x"+getHeight()+
- ", visible "+isVisible()+
- ", undecorated "+undecorated+
- ", fullscreen "+fullscreen+
- ", "+screen+
- ", wrappedWindow "+getWrappedWindow());
-
- sb.append(", SurfaceUpdatedListeners num "+surfaceUpdatedListeners.size()+" [");
- for (Iterator iter = surfaceUpdatedListeners.iterator(); iter.hasNext(); ) {
- sb.append(iter.next()+", ");
- }
- sb.append("], WindowListeners num "+windowListeners.size()+" [");
- for (Iterator iter = windowListeners.iterator(); iter.hasNext(); ) {
- sb.append(iter.next()+", ");
- }
- sb.append("], MouseListeners num "+mouseListeners.size()+" [");
- for (Iterator iter = mouseListeners.iterator(); iter.hasNext(); ) {
- sb.append(iter.next()+", ");
- }
- sb.append("], KeyListeners num "+keyListeners.size()+" [");
- for (Iterator iter = keyListeners.iterator(); iter.hasNext(); ) {
- sb.append(iter.next()+", ");
- }
- sb.append("] ]");
- return sb.toString();
- }
-
- public String getTitle() {
- return title;
- }
-
- public void setTitle(String title) {
- this.title = title;
- }
-
- public void setUndecorated(boolean value) {
- undecorated = value;
- }
-
- public boolean isUndecorated() {
- return undecorated;
- }
-
- public void requestFocus() {
- }
-
- //
- // NativeWindow impl
- //
- private Thread owner;
- private int recursionCount;
- protected Exception lockedStack = null;
-
- /** Recursive and blocking lockSurface() implementation */
- public synchronized int lockSurface() {
- // We leave the ToolkitLock lock to the specializtion's discretion,
- // ie the implicit JAWTWindow in case of AWTWindow
- Thread cur = Thread.currentThread();
- if (owner == cur) {
- ++recursionCount;
- return LOCK_SUCCESS;
- }
- while (owner != null) {
- try {
- wait();
- } catch (InterruptedException e) {
- throw new RuntimeException(e);
- }
- }
- owner = cur;
- lockedStack = new Exception("NEWT Surface previously locked by "+Thread.currentThread());
- screen.getDisplay().lockDisplay();
- return LOCK_SUCCESS;
- }
-
- /** Recursive and unblocking unlockSurface() implementation */
- public synchronized void unlockSurface() throws NativeWindowException {
- Thread cur = Thread.currentThread();
- if (owner != cur) {
- lockedStack.printStackTrace();
- throw new NativeWindowException(cur+": Not owner, owner is "+owner);
- }
- if (recursionCount > 0) {
- --recursionCount;
- return;
- }
- owner = null;
- lockedStack = null;
- screen.getDisplay().unlockDisplay();
- notifyAll();
- // We leave the ToolkitLock unlock to the specializtion's discretion,
- // ie the implicit JAWTWindow in case of AWTWindow
- }
-
- public synchronized boolean isSurfaceLocked() {
- return null!=owner;
- }
-
- public synchronized Thread getSurfaceLockOwner() {
- return owner;
- }
-
- public synchronized Exception getLockedStack() {
- return lockedStack;
- }
-
- public synchronized void destroy() {
- destroy(false);
- }
-
- /** @param deep If true, the linked Screen and Display will be destroyed as well. */
- public synchronized void destroy(boolean deep) {
- if(DEBUG_WINDOW_EVENT) {
- System.out.println("Window.destroy() start (deep "+deep+" - "+Thread.currentThread());
- }
- synchronized(surfaceUpdatedListeners) {
- surfaceUpdatedListeners = new ArrayList();
- }
- synchronized(windowListeners) {
- windowListeners = new ArrayList();
- }
- synchronized(mouseListeners) {
- mouseListeners = new ArrayList();
- }
- synchronized(keyListeners) {
- keyListeners = new ArrayList();
- }
- Screen scr = screen;
- Display dpy = (null!=screen) ? screen.getDisplay() : null;
- EventDispatchThread edt = (null!=dpy) ? dpy.getEDT() : null;
- if(null!=edt) {
- final Window f_win = this;
- edt.invokeAndWait(new Runnable() {
- public void run() {
- f_win.closeNative();
- }
- } );
- } else {
- closeNative();
- }
- invalidate();
- if(deep) {
- if(null!=scr) {
- scr.destroy();
- }
- if(null!=dpy) {
- dpy.destroy();
- }
- }
- if(DEBUG_WINDOW_EVENT) {
- System.out.println("Window.destroy() end "+Thread.currentThread());
- }
- }
-
- public void invalidate() {
- if(DEBUG_IMPLEMENTATION || DEBUG_WINDOW_EVENT) {
- Exception e = new Exception("!!! Window Invalidate "+Thread.currentThread());
- e.printStackTrace();
- }
- screen = null;
- windowHandle = 0;
- fullscreen=false;
- visible=false;
- eventMask = 0;
-
- // Default position and dimension will be re-set immediately by user
- width = 100;
- height = 100;
- x=0;
- y=0;
- }
-
- public boolean surfaceSwap() {
- return false;
- }
-
- protected void clearEventMask() {
- eventMask=0;
- }
-
- public long getDisplayHandle() {
- return screen.getDisplay().getHandle();
- }
-
- public int getScreenIndex() {
- return screen.getIndex();
- }
-
- public long getWindowHandle() {
- return windowHandle;
- }
-
- public long getSurfaceHandle() {
- return windowHandle; // default: return window handle
- }
-
- public AbstractGraphicsConfiguration getGraphicsConfiguration() {
- return config;
- }
-
- /**
- * Returns the width of the client area of this window
- * @return width of the client area
- */
- public int getWidth() {
- return width;
- }
-
- /**
- * Returns the height of the client area of this window
- * @return height of the client area
- */
- public int getHeight() {
- return height;
- }
-
- /**
- * Returns the insets for this native window (the difference between the
- * size of the toplevel window with the decorations and the client area).
- *
- * @return insets for this platform window
- */
- // this probably belongs to NativeWindow interface
- public Insets getInsets() {
- return new Insets(0,0,0,0);
- }
-
- /** If this Window actually wraps one from another toolkit such as
- the AWT, this will return a non-null value. */
- public Object getWrappedWindow() {
- return null;
- }
-
- //
- // Additional methods
- //
-
- public int getX() {
- return x;
- }
-
- public int getY() {
- return y;
- }
-
- public boolean isVisible() {
- return visible;
- }
-
- public boolean isFullscreen() {
- return fullscreen;
- }
-
- private boolean autoDrawableMember = false;
-
- /** If the implementation is capable of detecting a device change
- return true and clear the status/reason of the change. */
- public boolean hasDeviceChanged() {
- return false;
- }
-
- /**
- * If set to true,
- * certain action will be performed by the owning
- * AutoDrawable, ie the destroy() call within windowDestroyNotify()
- */
- public void setAutoDrawableClient(boolean b) {
- autoDrawableMember = b;
- }
-
- protected void windowDestroyNotify() {
- if(DEBUG_WINDOW_EVENT) {
- System.out.println("Window.windowDestroyeNotify start "+Thread.currentThread());
- }
-
- sendWindowEvent(WindowEvent.EVENT_WINDOW_DESTROY_NOTIFY);
-
- if(!autoDrawableMember) {
- destroy();
- }
-
- if(DEBUG_WINDOW_EVENT) {
- System.out.println("Window.windowDestroyeNotify end "+Thread.currentThread());
- }
- }
-
- protected void windowDestroyed() {
- if(DEBUG_WINDOW_EVENT) {
- System.out.println("Window.windowDestroyed "+Thread.currentThread());
- }
- invalidate();
- }
-
- public abstract void setVisible(boolean visible);
- /**
- * Sets the size of the client area of the window, excluding decorations
- * Total size of the window will be
- * {@code width+insets.left+insets.right, height+insets.top+insets.bottom}
- * @param width of the client area of the window
- * @param height of the client area of the window
- */
- public abstract void setSize(int width, int height);
- /**
- * Sets the location of the top left corner of the window, including
- * decorations (so the client area will be placed at
- * {@code x+insets.left,y+insets.top}.
- * @param x coord of the top left corner
- * @param y coord of the top left corner
- */
- public abstract void setPosition(int x, int y);
- public abstract boolean setFullscreen(boolean fullscreen);
-
- //
- // SurfaceUpdatedListener Support
- //
- private ArrayList surfaceUpdatedListeners = new ArrayList();
-
- public void addSurfaceUpdatedListener(SurfaceUpdatedListener l) {
- if(l == null) {
- return;
- }
- synchronized(surfaceUpdatedListeners) {
- ArrayList newSurfaceUpdatedListeners = (ArrayList) surfaceUpdatedListeners.clone();
- newSurfaceUpdatedListeners.add(l);
- surfaceUpdatedListeners = newSurfaceUpdatedListeners;
- }
- }
-
- public void removeSurfaceUpdatedListener(SurfaceUpdatedListener l) {
- if (l == null) {
- return;
- }
- synchronized(surfaceUpdatedListeners) {
- ArrayList newSurfaceUpdatedListeners = (ArrayList) surfaceUpdatedListeners.clone();
- newSurfaceUpdatedListeners.remove(l);
- surfaceUpdatedListeners = newSurfaceUpdatedListeners;
- }
- }
-
- public SurfaceUpdatedListener[] getSurfaceUpdatedListener() {
- synchronized(surfaceUpdatedListeners) {
- return (SurfaceUpdatedListener[]) surfaceUpdatedListeners.toArray();
- }
- }
-
- public void surfaceUpdated(Object updater, NativeWindow window, long when) {
- ArrayList listeners = null;
- synchronized(surfaceUpdatedListeners) {
- listeners = surfaceUpdatedListeners;
- }
- for(Iterator i = listeners.iterator(); i.hasNext(); ) {
- SurfaceUpdatedListener l = (SurfaceUpdatedListener) i.next();
- l.surfaceUpdated(updater, window, when);
- }
- }
-
- //
- // MouseListener Support
- //
-
- public void addMouseListener(MouseListener l) {
- if(l == null) {
- return;
- }
- synchronized(mouseListeners) {
- ArrayList newMouseListeners = (ArrayList) mouseListeners.clone();
- newMouseListeners.add(l);
- mouseListeners = newMouseListeners;
- }
- }
-
- public void removeMouseListener(MouseListener l) {
- if (l == null) {
- return;
- }
- synchronized(mouseListeners) {
- ArrayList newMouseListeners = (ArrayList) mouseListeners.clone();
- newMouseListeners.remove(l);
- mouseListeners = newMouseListeners;
- }
- }
-
- public MouseListener[] getMouseListeners() {
- synchronized(mouseListeners) {
- return (MouseListener[]) mouseListeners.toArray();
- }
- }
-
- private ArrayList mouseListeners = new ArrayList();
- private int mouseButtonPressed = 0; // current pressed mouse button number
- private long lastMousePressed = 0; // last time when a mouse button was pressed
- private int lastMouseClickCount = 0; // last mouse button click count
- public static final int ClickTimeout = 300;
-
- protected void sendMouseEvent(int eventType, int modifiers,
- int x, int y, int button, int rotation) {
- if(x<0||y<0||x>=width||y>=height) {
- return; // .. invalid ..
- }
- if(DEBUG_MOUSE_EVENT) {
- System.out.println("sendMouseEvent: "+MouseEvent.getEventTypeString(eventType)+
- ", mod "+modifiers+", pos "+x+"/"+y+", button "+button);
- }
- if(button<0||button>MouseEvent.BUTTON_NUMBER) {
- throw new NativeWindowException("Invalid mouse button number" + button);
- }
- long when = System.currentTimeMillis();
- MouseEvent eClicked = null;
- MouseEvent e = null;
-
- if(MouseEvent.EVENT_MOUSE_PRESSED==eventType) {
- if(when-lastMousePressed
- * before calling the various input EventListener callbacks (MouseListener, KeyListener,
- * etc.).
- * This design decision is made to favor a more performant and simplified
- * implementation, as well as the event dispatcher shall be allowed
- * not having a notion about OpenGL.
- *
- * Enable or disables running the {@link Display#pumpMessages} in the {@link #display()} call.
- * The default behavior is to run {@link Display#pumpMessages}.
- * This could not have been verified. No measurable difference could have been recognized.
- *
- * Enabling local pump messages while using the EDT,
- * {@link com.sun.javafx.newt.NewtFactory#setUseEDT(boolean)},
- * will result in an exception.
- *
- * @deprecated EXPERIMENTAL, semantic is about to be removed after further verification.
- */
- public void setRunPumpMessages(boolean onoff) {
- if( onoff && null!=getScreen().getDisplay().getEDT() ) {
- throw new GLException("GLWindow.setRunPumpMessages(true) - Can't do with EDT on");
- }
- runPumpMessages = onoff;
- }
-
- protected void createNative(long parentWindowHandle, Capabilities caps) {
- shouldNotCallThis();
- }
-
- protected void closeNative() {
- shouldNotCallThis();
- }
-
- protected void dispose(boolean regenerate, boolean sendEvent) {
- if(Window.DEBUG_WINDOW_EVENT || window.DEBUG_IMPLEMENTATION) {
- Exception e1 = new Exception("GLWindow.dispose("+regenerate+") "+Thread.currentThread()+", 1");
- e1.printStackTrace();
- }
-
- if(sendEvent) {
- sendDisposeEvent();
- }
-
- if (context != null) {
- context.destroy();
- }
- if (drawable != null) {
- drawable.setRealized(false);
- }
-
- if(regenerate) {
- if(null==window) {
- throw new GLException("GLWindow.dispose(true): null window");
- }
-
- // recreate GLDrawable, to reflect the new graphics configurations
- NativeWindow nw;
- if (window.getWrappedWindow() != null) {
- nw = NativeWindowFactory.getNativeWindow(window.getWrappedWindow(), window.getGraphicsConfiguration());
- } else {
- nw = window;
- }
- drawable = factory.createGLDrawable(nw);
- drawable.setRealized(true);
- context = drawable.createContext(null);
- sendReshape = true; // ensure a reshape event is send ..
- }
-
- if(Window.DEBUG_WINDOW_EVENT || window.DEBUG_IMPLEMENTATION) {
- System.out.println("GLWindow.dispose("+regenerate+") "+Thread.currentThread()+", fin: "+this);
- }
- }
-
- public synchronized void destroy() {
- destroy(true);
- }
-
- /** @param sendDisposeEvent should be false in a [time,reliable] critical shutdown */
- public synchronized void destroy(boolean sendDisposeEvent) {
- if(Window.DEBUG_WINDOW_EVENT || window.DEBUG_IMPLEMENTATION) {
- Exception e1 = new Exception("GLWindow.destroy "+Thread.currentThread()+", 1: "+this);
- e1.printStackTrace();
- }
-
- List newglw = (List) ((ArrayList) glwindows).clone();
- newglw.remove(this);
- glwindows=newglw;
-
- dispose(false, sendDisposeEvent);
-
- if(null!=window) {
- if(ownerOfWinScrDpy) {
- window.destroy(true);
- }
- }
-
- drawable = null;
- context = null;
- window = null;
-
- if(Window.DEBUG_WINDOW_EVENT || window.DEBUG_IMPLEMENTATION) {
- System.out.println("GLWindow.destroy "+Thread.currentThread()+", fin: "+this);
- }
- }
-
- public boolean getPerfLogEnabled() { return perfLog; }
-
- public void enablePerfLog(boolean v) {
- perfLog = v;
- }
-
- public void setVisible(boolean visible) {
- if(Window.DEBUG_WINDOW_EVENT || window.DEBUG_IMPLEMENTATION) {
- System.out.println(Thread.currentThread()+" GLWindow.setVisible("+visible+") START ; isVisible "+this.visible+" ; has context "+(null!=context));
- }
- this.visible=visible;
- window.setVisible(visible);
- if (visible && context == null) {
- NativeWindow nw;
- if (window.getWrappedWindow() != null) {
- nw = NativeWindowFactory.getNativeWindow(window.getWrappedWindow(), window.getGraphicsConfiguration());
- } else {
- nw = window;
- }
- GLCapabilities glCaps = (GLCapabilities) nw.getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities();
- factory = GLDrawableFactory.getFactory(glCaps.getGLProfile());
- drawable = factory.createGLDrawable(nw);
- drawable.setRealized(true);
- context = drawable.createContext(null);
- sendReshape = true; // ensure a reshape event is send ..
- }
- if(Window.DEBUG_WINDOW_EVENT || window.DEBUG_IMPLEMENTATION) {
- System.out.println(Thread.currentThread()+" GLWindow.setVisible("+visible+") END ; has context "+(null!=context));
- }
- }
-
- public Screen getScreen() {
- return window.getScreen();
- }
-
- public void setTitle(String title) {
- window.setTitle(title);
- }
-
- public String getTitle() {
- return window.getTitle();
- }
-
- public void setUndecorated(boolean value) {
- window.setUndecorated(value);
- }
-
- public boolean isUndecorated() {
- return window.isUndecorated();
- }
-
- public void setSize(int width, int height) {
- window.setSize(width, height);
- }
-
- public void setPosition(int x, int y) {
- window.setPosition(x, y);
- }
-
- public Insets getInsets() {
- return window.getInsets();
- }
-
- public boolean setFullscreen(boolean fullscreen) {
- return window.setFullscreen(fullscreen);
- }
-
- public boolean isVisible() {
- return window.isVisible();
- }
-
- public int getX() {
- return window.getX();
- }
-
- public int getY() {
- return window.getY();
- }
-
- public int getWidth() {
- return window.getWidth();
- }
-
- public int getHeight() {
- return window.getHeight();
- }
-
- public boolean isFullscreen() {
- return window.isFullscreen();
- }
-
- public void addSurfaceUpdatedListener(SurfaceUpdatedListener l) {
- window.addSurfaceUpdatedListener(l);
- }
- public void removeSurfaceUpdatedListener(SurfaceUpdatedListener l) {
- window.removeSurfaceUpdatedListener(l);
- }
- public SurfaceUpdatedListener[] getSurfaceUpdatedListener() {
- return window.getSurfaceUpdatedListener();
- }
- public void surfaceUpdated(Object updater, NativeWindow window0, long when) {
- window.surfaceUpdated(updater, window, when);
- }
-
- public void addMouseListener(MouseListener l) {
- window.addMouseListener(l);
- }
-
- public void removeMouseListener(MouseListener l) {
- window.removeMouseListener(l);
- }
-
- public MouseListener[] getMouseListeners() {
- return window.getMouseListeners();
- }
-
- public void addKeyListener(KeyListener l) {
- window.addKeyListener(l);
- }
-
- public void removeKeyListener(KeyListener l) {
- window.removeKeyListener(l);
- }
-
- public KeyListener[] getKeyListeners() {
- return window.getKeyListeners();
- }
-
- public void addWindowListener(WindowListener l) {
- window.addWindowListener(l);
- }
-
- public void removeWindowListener(WindowListener l) {
- window.removeWindowListener(l);
- }
-
- public WindowListener[] getWindowListeners() {
- return window.getWindowListeners();
- }
-
- public String toString() {
- return "NEWT-GLWindow[ \n\tDrawable: "+drawable+", \n\tWindow: "+window+", \n\tHelper: "+helper+", \n\tFactory: "+factory+"]";
- }
-
- //----------------------------------------------------------------------
- // OpenGL-related methods and state
- //
-
- private GLDrawableFactory factory;
- private GLDrawable drawable;
- private GLContext context;
- private GLDrawableHelper helper = new GLDrawableHelper();
- // To make reshape events be sent immediately before a display event
- private boolean sendReshape=false;
- private boolean sendDestroy=false;
- private boolean perfLog = false;
-
- public GLDrawableFactory getFactory() {
- return factory;
- }
-
- public void setContext(GLContext newCtx) {
- context = newCtx;
- }
-
- public GLContext getContext() {
- return context;
- }
-
- public GL getGL() {
- if (context == null) {
- return null;
- }
- return context.getGL();
- }
-
- public GL setGL(GL gl) {
- if (context != null) {
- context.setGL(gl);
- return gl;
- }
- return null;
- }
-
- public void addGLEventListener(GLEventListener listener) {
- helper.addGLEventListener(listener);
- }
-
- public void removeGLEventListener(GLEventListener listener) {
- helper.removeGLEventListener(listener);
- }
-
- public void display() {
- display(false);
- }
-
- public void display(boolean forceReshape) {
- if(window!=null && drawable!=null && context != null) {
- if(runPumpMessages) {
- window.getScreen().getDisplay().pumpMessages();
- }
- if(window.hasDeviceChanged() && GLAutoDrawable.SCREEN_CHANGE_ACTION_ENABLED) {
- dispose(true, true);
- }
- if (sendDestroy) {
- destroy();
- sendDestroy=false;
- } else {
- if(forceReshape) {
- sendReshape = true;
- }
- helper.invokeGL(drawable, context, displayAction, initAction);
- }
- }
- }
-
- private void sendDisposeEvent() {
- if(drawable!=null && context != null) {
- helper.invokeGL(drawable, context, disposeAction, null);
- }
- }
-
- /** This implementation uses a static value */
- public void setAutoSwapBufferMode(boolean onOrOff) {
- helper.setAutoSwapBufferMode(onOrOff);
- }
-
- /** This implementation uses a static value */
- public boolean getAutoSwapBufferMode() {
- return helper.getAutoSwapBufferMode();
- }
-
- public void swapBuffers() {
- if(drawable!=null && context != null) {
- if (context != GLContext.getCurrent()) {
- // Assume we should try to make the context current before swapping the buffers
- helper.invokeGL(drawable, context, swapBuffersAction, initAction);
- } else {
- drawable.swapBuffers();
- }
- }
- }
-
- class InitAction implements Runnable {
- public void run() {
- helper.init(GLWindow.this);
- startTime = System.currentTimeMillis();
- curTime = startTime;
- if(perfLog) {
- lastCheck = startTime;
- totalFrames = 0; lastFrames = 0;
- }
- }
- }
- private InitAction initAction = new InitAction();
-
- class DisposeAction implements Runnable {
- public void run() {
- helper.dispose(GLWindow.this);
- }
- }
- private DisposeAction disposeAction = new DisposeAction();
-
- class DisplayAction implements Runnable {
- public void run() {
- if (sendReshape) {
- int width = getWidth();
- int height = getHeight();
- getGL().glViewport(0, 0, width, height);
- helper.reshape(GLWindow.this, 0, 0, width, height);
- sendReshape = false;
- }
-
- helper.display(GLWindow.this);
-
- curTime = System.currentTimeMillis();
- totalFrames++;
-
- if(perfLog) {
- long dt0, dt1;
- lastFrames++;
- dt0 = curTime-lastCheck;
- if ( dt0 > 5000 ) {
- dt1 = curTime-startTime;
- System.out.println(dt0/1000 +"s: "+ lastFrames + "f, " + (lastFrames*1000)/dt0 + " fps, "+dt0/lastFrames+" ms/f; "+
- "total: "+ dt1/1000+"s, "+(totalFrames*1000)/dt1 + " fps, "+dt1/totalFrames+" ms/f");
- lastCheck=curTime;
- lastFrames=0;
- }
- }
- }
- }
- private DisplayAction displayAction = new DisplayAction();
-
- public long getStartTime() { return startTime; }
- public long getCurrentTime() { return curTime; }
- public long getDuration() { return curTime-startTime; }
- public int getTotalFrames() { return totalFrames; }
-
- private long startTime = 0;
- private long curTime = 0;
- private long lastCheck = 0;
- private int totalFrames = 0, lastFrames = 0;
-
- class SwapBuffersAction implements Runnable {
- public void run() {
- drawable.swapBuffers();
- }
- }
- private SwapBuffersAction swapBuffersAction = new SwapBuffersAction();
-
- //----------------------------------------------------------------------
- // GLDrawable methods
- //
-
- public NativeWindow getNativeWindow() {
- return null!=drawable ? drawable.getNativeWindow() : null;
- }
-
- public synchronized int lockSurface() throws NativeWindowException {
- if(null!=drawable) return drawable.getNativeWindow().lockSurface();
- return NativeWindow.LOCK_SURFACE_NOT_READY;
- }
-
- public synchronized void unlockSurface() {
- if(null!=drawable) drawable.getNativeWindow().unlockSurface();
- else throw new NativeWindowException("NEWT-GLWindow not locked");
- }
-
- public synchronized boolean isSurfaceLocked() {
- if(null!=drawable) return drawable.getNativeWindow().isSurfaceLocked();
- return false;
- }
-
- public synchronized Exception getLockedStack() {
- if(null!=drawable) return drawable.getNativeWindow().getLockedStack();
- return null;
- }
-
- public boolean surfaceSwap() {
- if(null!=drawable) return drawable.getNativeWindow().surfaceSwap();
- return super.surfaceSwap();
- }
-
- public long getWindowHandle() {
- if(null!=drawable) return drawable.getNativeWindow().getWindowHandle();
- return super.getWindowHandle();
- }
-
- public long getSurfaceHandle() {
- if(null!=drawable) return drawable.getNativeWindow().getSurfaceHandle();
- return super.getSurfaceHandle();
- }
-
- //----------------------------------------------------------------------
- // GLDrawable methods that are not really needed
- //
-
- public GLContext createContext(GLContext shareWith) {
- return drawable.createContext(shareWith);
- }
-
- public void setRealized(boolean realized) {
- }
-
- public GLCapabilities getChosenGLCapabilities() {
- if (drawable == null) {
- throw new GLException("No drawable yet");
- }
-
- return drawable.getChosenGLCapabilities();
- }
-
- public GLProfile getGLProfile() {
- if (drawable == null) {
- throw new GLException("No drawable yet");
- }
-
- return drawable.getGLProfile();
- }
-
- //----------------------------------------------------------------------
- // Internals only below this point
- //
-
- private void shouldNotCallThis() {
- throw new NativeWindowException("Should not call this");
- }
-}
diff --git a/src/newt/classes/com/sun/javafx/newt/opengl/broadcom/egl/Display.java b/src/newt/classes/com/sun/javafx/newt/opengl/broadcom/egl/Display.java
deleted file mode 100644
index 1b74aebc3..000000000
--- a/src/newt/classes/com/sun/javafx/newt/opengl/broadcom/egl/Display.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.sun.javafx.newt.opengl.broadcom.egl;
-
-import com.sun.javafx.newt.impl.*;
-import com.jogamp.opengl.impl.egl.*;
-import javax.media.nativewindow.*;
-import javax.media.nativewindow.egl.*;
-
-public class Display extends com.sun.javafx.newt.Display {
-
- static {
- NativeLibLoader.loadNEWT();
-
- if (!Window.initIDs()) {
- throw new NativeWindowException("Failed to initialize BCEGL Window jmethodIDs");
- }
- }
-
- public static void initSingleton() {
- // just exist to ensure static init has been run
- }
-
-
- public Display() {
- }
-
- protected void createNative() {
- long handle = CreateDisplay(Screen.fixedWidth, Screen.fixedHeight);
- if (handle == EGL.EGL_NO_DISPLAY) {
- throw new NativeWindowException("BC EGL CreateDisplay failed");
- }
- aDevice = new EGLGraphicsDevice(handle);
- }
-
- protected void closeNative() {
- if (aDevice.getHandle() != EGL.EGL_NO_DISPLAY) {
- DestroyDisplay(aDevice.getHandle());
- }
- }
-
- protected void dispatchMessages() {
- // n/a .. DispatchMessages();
- }
-
- private native long CreateDisplay(int width, int height);
- private native void DestroyDisplay(long dpy);
- private native void DispatchMessages();
-}
-
diff --git a/src/newt/classes/com/sun/javafx/newt/opengl/broadcom/egl/Screen.java b/src/newt/classes/com/sun/javafx/newt/opengl/broadcom/egl/Screen.java
deleted file mode 100755
index 28f7211c3..000000000
--- a/src/newt/classes/com/sun/javafx/newt/opengl/broadcom/egl/Screen.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.sun.javafx.newt.opengl.broadcom.egl;
-
-import com.sun.javafx.newt.impl.*;
-import javax.media.nativewindow.*;
-
-public class Screen extends com.sun.javafx.newt.Screen {
-
- static {
- Display.initSingleton();
- }
-
-
- public Screen() {
- }
-
- protected void createNative(int index) {
- aScreen = new DefaultGraphicsScreen(getDisplay().getGraphicsDevice(), index);
- setScreenSize(fixedWidth, fixedHeight);
- }
-
- protected void closeNative() { }
-
- //----------------------------------------------------------------------
- // Internals only
- //
-
- static final int fixedWidth = 1920;
- static final int fixedHeight = 1080;
-}
-
diff --git a/src/newt/classes/com/sun/javafx/newt/opengl/broadcom/egl/Window.java b/src/newt/classes/com/sun/javafx/newt/opengl/broadcom/egl/Window.java
deleted file mode 100755
index 8446ec20f..000000000
--- a/src/newt/classes/com/sun/javafx/newt/opengl/broadcom/egl/Window.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.sun.javafx.newt.opengl.broadcom.egl;
-
-import com.sun.javafx.newt.impl.*;
-import com.jogamp.opengl.impl.egl.*;
-import javax.media.nativewindow.*;
-import javax.media.opengl.GLCapabilities;
-import javax.media.opengl.GLProfile;
-import javax.media.nativewindow.NativeWindowException;
-
-public class Window extends com.sun.javafx.newt.Window {
- static {
- Display.initSingleton();
- }
-
- public Window() {
- }
-
- protected void createNative(long parentWindowHandle, Capabilities caps) {
- if(0!=parentWindowHandle) {
- throw new RuntimeException("Window parenting not supported (yet)");
- }
- // query a good configuration .. even thought we drop this one
- // and reuse the EGLUtil choosen one later.
- config = GraphicsConfigurationFactory.getFactory(getScreen().getDisplay().getGraphicsDevice()).chooseGraphicsConfiguration(caps, null, getScreen().getGraphicsScreen());
- if (config == null) {
- throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
- }
- setSizeImpl(getScreen().getWidth(), getScreen().getHeight());
- }
-
- protected void closeNative() {
- if(0!=windowHandleClose) {
- CloseWindow(getDisplayHandle(), windowHandleClose);
- }
- }
-
- public void setVisible(boolean visible) {
- if(this.visible!=visible) {
- this.visible=visible;
- if ( 0==windowHandle ) {
- windowHandle = realizeWindow(true, width, height);
- if (0 == windowHandle) {
- throw new NativeWindowException("Error native Window Handle is null");
- }
- }
- clearEventMask();
- }
- }
-
- public void setSize(int width, int height) {
- System.err.println("setSize "+width+"x"+height+" n/a in BroadcomEGL");
- }
-
- void setSizeImpl(int width, int height) {
- if(0!=windowHandle) {
- // n/a in BroadcomEGL
- System.err.println("BCEGL Window.setSizeImpl n/a in BroadcomEGL with realized window");
- } else {
- if(DEBUG_IMPLEMENTATION) {
- Exception e = new Exception("BCEGL Window.setSizeImpl() "+this.width+"x"+this.height+" -> "+width+"x"+height);
- e.printStackTrace();
- }
- this.width = width;
- this.height = height;
- }
- }
-
- public void setPosition(int x, int y) {
- // n/a in BroadcomEGL
- System.err.println("setPosition n/a in BroadcomEGL");
- }
-
- public boolean setFullscreen(boolean fullscreen) {
- // n/a in BroadcomEGL
- System.err.println("setFullscreen n/a in BroadcomEGL");
- return false;
- }
-
- public boolean surfaceSwap() {
- if ( 0!=windowHandle ) {
- SwapWindow(getDisplayHandle(), windowHandle);
- return true;
- }
- return false;
- }
-
- //----------------------------------------------------------------------
- // Internals only
- //
-
- protected static native boolean initIDs();
- private native long CreateWindow(long eglDisplayHandle, boolean chromaKey, int width, int height);
- private native void CloseWindow(long eglDisplayHandle, long eglWindowHandle);
- private native void SwapWindow(long eglDisplayHandle, long eglWindowHandle);
-
-
- private long realizeWindow(boolean chromaKey, int width, int height) {
- if(DEBUG_IMPLEMENTATION) {
- System.out.println("BCEGL Window.realizeWindow() with: chroma "+chromaKey+", "+width+"x"+height+", "+config);
- }
- long handle = CreateWindow(getDisplayHandle(), chromaKey, width, height);
- if (0 == handle) {
- throw new NativeWindowException("Error native Window Handle is null");
- }
- windowHandleClose = handle;
- return handle;
- }
-
- private void windowCreated(int cfgID, int width, int height) {
- this.width = width;
- this.height = height;
- GLCapabilities capsReq = (GLCapabilities) config.getRequestedCapabilities();
- config = EGLGraphicsConfiguration.create(capsReq, screen.getGraphicsScreen(), cfgID);
- if (config == null) {
- throw new NativeWindowException("Error creating EGLGraphicsConfiguration from id: "+cfgID+", "+this);
- }
- if(DEBUG_IMPLEMENTATION) {
- System.out.println("BCEGL Window.windowCreated(): "+toHexString(cfgID)+", "+width+"x"+height+", "+config);
- }
- }
-
- private long windowHandleClose;
-}
diff --git a/src/newt/classes/com/sun/javafx/newt/opengl/kd/KDDisplay.java b/src/newt/classes/com/sun/javafx/newt/opengl/kd/KDDisplay.java
deleted file mode 100755
index 9e328a223..000000000
--- a/src/newt/classes/com/sun/javafx/newt/opengl/kd/KDDisplay.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.sun.javafx.newt.opengl.kd;
-
-import com.sun.javafx.newt.*;
-import com.sun.javafx.newt.impl.*;
-import com.jogamp.opengl.impl.egl.*;
-import javax.media.nativewindow.*;
-import javax.media.nativewindow.egl.*;
-
-public class KDDisplay extends Display {
-
- static {
- NativeLibLoader.loadNEWT();
-
- if (!KDWindow.initIDs()) {
- throw new NativeWindowException("Failed to initialize KDWindow jmethodIDs");
- }
- }
-
- public static void initSingleton() {
- // just exist to ensure static init has been run
- }
-
-
- public KDDisplay() {
- }
-
- protected void createNative() {
- // FIXME: map name to EGL_*_DISPLAY
- long handle = EGL.eglGetDisplay(EGL.EGL_DEFAULT_DISPLAY);
- if (handle == EGL.EGL_NO_DISPLAY) {
- throw new NativeWindowException("eglGetDisplay failed");
- }
- if (!EGL.eglInitialize(handle, null, null)) {
- throw new NativeWindowException("eglInitialize failed");
- }
- aDevice = new EGLGraphicsDevice(handle);
- }
-
- protected void closeNative() {
- if (aDevice.getHandle() != EGL.EGL_NO_DISPLAY) {
- EGL.eglTerminate(aDevice.getHandle());
- }
- }
-
- protected void dispatchMessages() {
- DispatchMessages();
- }
-
- private native void DispatchMessages();
-}
-
diff --git a/src/newt/classes/com/sun/javafx/newt/opengl/kd/KDScreen.java b/src/newt/classes/com/sun/javafx/newt/opengl/kd/KDScreen.java
deleted file mode 100755
index 1767c1240..000000000
--- a/src/newt/classes/com/sun/javafx/newt/opengl/kd/KDScreen.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.sun.javafx.newt.opengl.kd;
-
-import com.sun.javafx.newt.*;
-import javax.media.nativewindow.*;
-
-public class KDScreen extends Screen {
- static {
- KDDisplay.initSingleton();
- }
-
- public KDScreen() {
- }
-
- protected void createNative(int index) {
- aScreen = new DefaultGraphicsScreen(getDisplay().getGraphicsDevice(), index);
- }
-
- protected void closeNative() { }
-
- // elevate access to this package ..
- protected void setScreenSize(int w, int h) {
- super.setScreenSize(w, h);
- }
-}
diff --git a/src/newt/classes/com/sun/javafx/newt/opengl/kd/KDWindow.java b/src/newt/classes/com/sun/javafx/newt/opengl/kd/KDWindow.java
deleted file mode 100755
index 9919d1f6f..000000000
--- a/src/newt/classes/com/sun/javafx/newt/opengl/kd/KDWindow.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.sun.javafx.newt.opengl.kd;
-
-import com.sun.javafx.newt.*;
-import com.sun.javafx.newt.impl.*;
-import com.jogamp.opengl.impl.egl.*;
-import javax.media.nativewindow.*;
-import javax.media.opengl.GLCapabilities;
-import javax.media.opengl.GLProfile;
-import javax.media.nativewindow.NativeWindowException;
-
-public class KDWindow extends Window {
- private static final String WINDOW_CLASS_NAME = "NewtWindow";
- // non fullscreen dimensions ..
- private int nfs_width, nfs_height, nfs_x, nfs_y;
-
- static {
- KDDisplay.initSingleton();
- }
-
- public KDWindow() {
- }
-
- protected void createNative(long parentWindowHandle, Capabilities caps) {
- if(0!=parentWindowHandle) {
- throw new RuntimeException("Window parenting not supported (yet)");
- }
- config = GraphicsConfigurationFactory.getFactory(getScreen().getDisplay().getGraphicsDevice()).chooseGraphicsConfiguration(caps, null, getScreen().getGraphicsScreen());
- if (config == null) {
- throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
- }
-
- GLCapabilities eglCaps = (GLCapabilities)config.getChosenCapabilities();
- int[] eglAttribs = EGLGraphicsConfiguration.GLCapabilities2AttribList(eglCaps);
-
- windowHandle = 0;
- eglWindowHandle = CreateWindow(getDisplayHandle(), eglAttribs);
- if (eglWindowHandle == 0) {
- throw new NativeWindowException("Error creating egl window: "+config);
- }
- setVisible0(eglWindowHandle, false);
- windowHandleClose = eglWindowHandle;
- }
-
- protected void closeNative() {
- if(0!=windowHandleClose) {
- CloseWindow(windowHandleClose, windowUserData);
- windowUserData=0;
- }
- }
-
- public void setVisible(boolean visible) {
- if(0!=eglWindowHandle && this.visible!=visible) {
- this.visible=visible;
- setVisible0(eglWindowHandle, visible);
- if ( 0==windowHandle ) {
- windowHandle = RealizeWindow(eglWindowHandle);
- if (0 == windowHandle) {
- throw new NativeWindowException("Error native Window Handle is null");
- }
- }
- clearEventMask();
- }
- }
-
- public void setSize(int width, int height) {
- if(0!=eglWindowHandle) {
- setSize0(eglWindowHandle, width, height);
- }
- }
-
- public void setPosition(int x, int y) {
- // n/a in KD
- System.err.println("setPosition n/a in KD");
- }
-
- public boolean setFullscreen(boolean fullscreen) {
- if(0!=eglWindowHandle && this.fullscreen!=fullscreen) {
- this.fullscreen=fullscreen;
- if(this.fullscreen) {
- setFullScreen0(eglWindowHandle, true);
- } else {
- setFullScreen0(eglWindowHandle, false);
- setSize0(eglWindowHandle, nfs_width, nfs_height);
- }
- }
- return true;
- }
-
- //----------------------------------------------------------------------
- // Internals only
- //
-
- protected static native boolean initIDs();
- private native long CreateWindow(long displayHandle, int[] attributes);
- private native long RealizeWindow(long eglWindowHandle);
- private native int CloseWindow(long eglWindowHandle, long userData);
- private native void setVisible0(long eglWindowHandle, boolean visible);
- private native void setSize0(long eglWindowHandle, int width, int height);
- private native void setFullScreen0(long eglWindowHandle, boolean fullscreen);
-
- private void windowCreated(long userData) {
- windowUserData=userData;
- }
-
- private void sizeChanged(int newWidth, int newHeight) {
- width = newWidth;
- height = newHeight;
- if(!fullscreen) {
- nfs_width=width;
- nfs_height=height;
- } else {
- ((KDScreen)screen).setScreenSize(width, height);
- }
- sendWindowEvent(WindowEvent.EVENT_WINDOW_RESIZED);
- }
-
- private long eglWindowHandle;
- private long windowHandleClose;
- private long windowUserData;
-}
diff --git a/src/newt/classes/com/sun/javafx/newt/util/EventDispatchThread.java b/src/newt/classes/com/sun/javafx/newt/util/EventDispatchThread.java
deleted file mode 100644
index a98ebab93..000000000
--- a/src/newt/classes/com/sun/javafx/newt/util/EventDispatchThread.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- */
-
-package com.sun.javafx.newt.util;
-
-import com.sun.javafx.newt.Display;
-import com.sun.javafx.newt.impl.Debug;
-import java.util.*;
-
-public class EventDispatchThread {
- public static final boolean DEBUG = Debug.debug("EDT");
-
- private ThreadGroup threadGroup;
- private volatile boolean shouldStop = false;
- private TaskWorker taskWorker = null;
- private Object taskWorkerLock = new Object();
- private ArrayList tasks = new ArrayList(); // one shot tasks
- private Display display = null;
- private String name;
- private long edtPollGranularity = 10;
-
- public EventDispatchThread(Display display, ThreadGroup tg, String name) {
- this.display = display;
- this.threadGroup = tg;
- this.name=new String("EDT-Display_"+display.getName()+"-"+name);
- }
-
- public String getName() { return name; }
-
- public ThreadGroup getThreadGroup() { return threadGroup; }
-
- public void start() {
- start(false);
- }
-
- /**
- * @param externalStimuli true indicates that another thread stimulates,
- * ie. calls this TaskManager's run() loop method.
- * Hence no own thread is started in this case.
- *
- * @return The started Runnable, which handles the run-loop.
- * Usefull in combination with externalStimuli=true,
- * so an external stimuli can call it.
- */
- public Runnable start(boolean externalStimuli) {
- synchronized(taskWorkerLock) {
- if(null==taskWorker) {
- taskWorker = new TaskWorker(threadGroup, name);
- }
- if(!taskWorker.isRunning()) {
- shouldStop = false;
- taskWorker.start(externalStimuli);
- }
- taskWorkerLock.notifyAll();
- }
- return taskWorker;
- }
-
- public void stop() {
- synchronized(taskWorkerLock) {
- if(null!=taskWorker && taskWorker.isRunning()) {
- shouldStop = true;
- }
- taskWorkerLock.notifyAll();
- if(DEBUG) {
- System.out.println(Thread.currentThread()+": EDT signal STOP");
- }
- }
- }
-
- public boolean isThreadEDT(Thread thread) {
- return null!=taskWorker && taskWorker == thread;
- }
-
- public boolean isCurrentThreadEDT() {
- return null!=taskWorker && taskWorker == Thread.currentThread();
- }
-
- public boolean isRunning() {
- return null!=taskWorker && taskWorker.isRunning() ;
- }
-
- public void invokeLater(Runnable task) {
- if(task == null) {
- return;
- }
- synchronized(taskWorkerLock) {
- if(null!=taskWorker && taskWorker.isRunning() && taskWorker != Thread.currentThread() ) {
- tasks.add(task);
- taskWorkerLock.notifyAll();
- } else {
- // if !running or isEDTThread, do it right away
- task.run();
- }
- }
- }
-
- public void invokeAndWait(Runnable task) {
- if(task == null) {
- return;
- }
- invokeLater(task);
- waitOnWorker();
- }
-
- public void waitOnWorker() {
- synchronized(taskWorkerLock) {
- if(null!=taskWorker && taskWorker.isRunning() && tasks.size()>0 && taskWorker != Thread.currentThread() ) {
- try {
- taskWorkerLock.wait();
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
- }
- }
-
- public void waitUntilStopped() {
- synchronized(taskWorkerLock) {
- while(null!=taskWorker && taskWorker.isRunning() && taskWorker != Thread.currentThread() ) {
- try {
- taskWorkerLock.wait();
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
- }
- }
-
- class TaskWorker extends Thread {
- boolean isRunning = false;
- boolean externalStimuli = false;
-
- public TaskWorker(ThreadGroup tg, String name) {
- super(tg, name);
- }
-
- public synchronized boolean isRunning() {
- return isRunning;
- }
-
- public void start(boolean externalStimuli) throws IllegalThreadStateException {
- synchronized(this) {
- this.externalStimuli = externalStimuli;
- isRunning = true;
- }
- if(!externalStimuli) {
- super.start();
- }
- }
-
- /**
- * Utilizing taskWorkerLock only for local resources and task execution,
- * not for event dispatching.
- */
- public void run() {
- if(DEBUG) {
- System.out.println(Thread.currentThread()+": EDT run() START");
- }
- while(!shouldStop) {
- try {
- // wait for something todo
- while(!shouldStop && tasks.size()==0) {
- synchronized(taskWorkerLock) {
- if(!shouldStop && tasks.size()==0) {
- try {
- taskWorkerLock.wait(edtPollGranularity);
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
- }
- display.pumpMessages(); // event dispatch
- }
- if(!shouldStop && tasks.size()>0) {
- synchronized(taskWorkerLock) {
- if(!shouldStop && tasks.size()>0) {
- Runnable task = (Runnable) tasks.remove(0);
- task.run();
- taskWorkerLock.notifyAll();
- }
- }
- display.pumpMessages(); // event dispatch
- }
- } catch (Throwable t) {
- // handle errors ..
- t.printStackTrace();
- } finally {
- // epilog - unlock locked stuff
- }
- if(externalStimuli) break; // no loop if called by external stimuli
- }
- synchronized(this) {
- isRunning = !shouldStop;
- }
- if(!isRunning) {
- synchronized(taskWorkerLock) {
- taskWorkerLock.notifyAll();
- }
- }
- if(DEBUG) {
- System.out.println(Thread.currentThread()+": EDT run() EXIT");
- }
- }
- }
-}
-
diff --git a/src/newt/classes/com/sun/javafx/newt/util/MainThread.java b/src/newt/classes/com/sun/javafx/newt/util/MainThread.java
deleted file mode 100644
index abfe3f0c7..000000000
--- a/src/newt/classes/com/sun/javafx/newt/util/MainThread.java
+++ /dev/null
@@ -1,307 +0,0 @@
-/*
- * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- */
-
-package com.sun.javafx.newt.util;
-
-import java.util.*;
-import java.lang.reflect.Method;
-import java.lang.reflect.InvocationTargetException;
-import java.security.*;
-
-import javax.media.nativewindow.*;
-
-import com.sun.javafx.newt.*;
-import com.sun.javafx.newt.impl.*;
-import com.sun.javafx.newt.macosx.MacDisplay;
-import com.sun.nativewindow.impl.NWReflection;
-
-/**
- * NEWT Utility class MainThread
- *
- * Such behavior is necessary for native windowing toolkits,
- * where the windowing management must happen on the so called
- * main thread e.g. for Mac OS X !
- *
- * Utilizing this class as a launchpad, now you are able to
- * use a NEWT multithreaded application with window handling within the different threads,
- * even on these restricted platforms.
- *
- * To support your NEWT Window platform,
- * you have to pass your main thread actions to {@link #invoke invoke(..)},
- * have a look at the {@link com.sun.javafx.newt.macosx.MacWindow MacWindow} implementation.
- * TODO: Some hardcoded dependencies exist in this implementation,
- * where you have to patch this code or factor it out. newt.MainThread.force
to true
.newt.MainThread.force
to true
.
- java -XstartOnFirstThread com.sun.javafx.newt.util.MainThread demos.es1.RedSquare -GL2 -GL2 -GL2 -GL2
-
- * Which starts 4 threads, each with a window and OpenGL rendering.
- */
-public class MainThread {
- private static AccessControlContext localACC = AccessController.getContext();
- public static final boolean USE_MAIN_THREAD = NativeWindowFactory.TYPE_MACOSX.equals(NativeWindowFactory.getNativeWindowType(false)) ||
- Debug.getBooleanProperty("newt.MainThread.force", true, localACC);
-
- protected static final boolean DEBUG = Debug.debug("MainThread");
-
- private static boolean isExit=false;
- private static volatile boolean isRunning=false;
- private static Object taskWorkerLock=new Object();
- private static boolean shouldStop;
- private static ArrayList tasks;
- private static ArrayList tasksBlock;
- private static Thread mainThread;
-
- static class MainAction extends Thread {
- private String mainClassName;
- private String[] mainClassArgs;
-
- private Class mainClass;
- private Method mainClassMain;
-
- public MainAction(String mainClassName, String[] mainClassArgs) {
- this.mainClassName=mainClassName;
- this.mainClassArgs=mainClassArgs;
- }
-
- public void run() {
- if ( USE_MAIN_THREAD ) {
- // we have to start first to provide the service ..
- MainThread.waitUntilRunning();
- }
-
- // start user app ..
- try {
- Class mainClass = NWReflection.getClass(mainClassName, true);
- if(null==mainClass) {
- throw new RuntimeException(new ClassNotFoundException("MainThread couldn't find main class "+mainClassName));
- }
- try {
- mainClassMain = mainClass.getDeclaredMethod("main", new Class[] { String[].class });
- mainClassMain.setAccessible(true);
- } catch (Throwable t) {
- throw new RuntimeException(t);
- }
- if(DEBUG) System.err.println("MainAction.run(): "+Thread.currentThread().getName()+" invoke "+mainClassName);
- mainClassMain.invoke(null, new Object[] { mainClassArgs } );
- } catch (InvocationTargetException ite) {
- ite.getTargetException().printStackTrace();
- } catch (Throwable t) {
- t.printStackTrace();
- }
-
- if(DEBUG) System.err.println("MainAction.run(): "+Thread.currentThread().getName()+" user app fin");
-
- if ( USE_MAIN_THREAD ) {
- MainThread.exit();
- if(DEBUG) System.err.println("MainAction.run(): "+Thread.currentThread().getName()+" MainThread fin - exit");
- System.exit(0);
- }
- }
- }
- private static MainAction mainAction;
-
- /** Your new java application main entry, which pipelines your application */
- public static void main(String[] args) {
- if(DEBUG) System.err.println("MainThread.main(): "+Thread.currentThread().getName()+" USE_MAIN_THREAD "+ USE_MAIN_THREAD );
-
- if(args.length==0) {
- return;
- }
-
- String mainClassName=args[0];
- String[] mainClassArgs=new String[args.length-1];
- if(args.length>1) {
- System.arraycopy(args, 1, mainClassArgs, 0, args.length-1);
- }
-
- NativeLibLoader.loadNEWT();
-
- shouldStop = false;
- tasks = new ArrayList();
- tasksBlock = new ArrayList();
- mainThread = Thread.currentThread();
-
- mainAction = new MainAction(mainClassName, mainClassArgs);
-
- if(NativeWindowFactory.TYPE_MACOSX.equals(NativeWindowFactory.getNativeWindowType(false))) {
- MacDisplay.initSingleton();
- }
-
- if ( USE_MAIN_THREAD ) {
- // dispatch user's main thread ..
- mainAction.start();
-
- // do our main thread task scheduling
- run();
- } else {
- // run user's main in this thread
- mainAction.run();
- }
- }
-
- /** invokes the given Runnable */
- public static void invoke(boolean wait, Runnable r) {
- if(r == null) {
- return;
- }
-
- // if this main thread is not being used or
- // if this is already the main thread .. just execute.
- if( !isRunning() || mainThread == Thread.currentThread() ) {
- r.run();
- return;
- }
-
- synchronized(taskWorkerLock) {
- tasks.add(r);
- if(wait) {
- tasksBlock.add(r);
- }
- taskWorkerLock.notifyAll();
- if(wait) {
- while(tasksBlock.size()>0) {
- try {
- taskWorkerLock.wait();
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
- }
- }
- }
-
- public static void exit() {
- if(DEBUG) System.err.println("MainThread.exit(): "+Thread.currentThread().getName()+" start");
- synchronized(taskWorkerLock) {
- if(isRunning) {
- shouldStop = true;
- }
- taskWorkerLock.notifyAll();
- }
- if(DEBUG) System.err.println("MainThread.exit(): "+Thread.currentThread().getName()+" end");
- }
-
- public static boolean isRunning() {
- synchronized(taskWorkerLock) {
- return isRunning;
- }
- }
-
- private static void waitUntilRunning() {
- synchronized(taskWorkerLock) {
- if(isExit) return;
-
- while(!isRunning) {
- try {
- taskWorkerLock.wait();
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
- }
- }
-
- public static void run() {
- if(DEBUG) System.err.println("MainThread.run(): "+Thread.currentThread().getName());
- synchronized(taskWorkerLock) {
- isRunning = true;
- taskWorkerLock.notifyAll();
- }
- while(!shouldStop) {
- try {
- ArrayList localTasks=null;
-
- // wait for something todo ..
- synchronized(taskWorkerLock) {
- while(!shouldStop && tasks.size()==0) {
- try {
- taskWorkerLock.wait();
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
- // seq. process all tasks until no blocking one exists in the list
- for(Iterator i = tasks.iterator(); tasksBlock.size()>0 && i.hasNext(); ) {
- Runnable task = (Runnable) i.next();
- task.run();
- i.remove();
- tasksBlock.remove(task);
- }
-
- // take over the tasks ..
- if(tasks.size()>0) {
- localTasks = tasks;
- tasks = new ArrayList();
- }
- taskWorkerLock.notifyAll();
- }
-
- // seq. process all unblocking tasks ..
- if(null!=localTasks) {
- for(Iterator i = localTasks.iterator(); i.hasNext(); ) {
- Runnable task = (Runnable) i.next();
- task.run();
- }
- }
- } catch (Throwable t) {
- // handle errors ..
- t.printStackTrace();
- } finally {
- // epilog - unlock locked stuff
- }
- }
- if(DEBUG) System.err.println("MainThread.run(): "+Thread.currentThread().getName()+" fin");
- synchronized(taskWorkerLock) {
- isRunning = false;
- isExit = true;
- taskWorkerLock.notifyAll();
- }
- }
-}
-
-
diff --git a/src/newt/classes/com/sun/javafx/newt/windows/WindowsDisplay.java b/src/newt/classes/com/sun/javafx/newt/windows/WindowsDisplay.java
deleted file mode 100755
index 80485ed67..000000000
--- a/src/newt/classes/com/sun/javafx/newt/windows/WindowsDisplay.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.sun.javafx.newt.windows;
-
-import javax.media.nativewindow.*;
-import javax.media.nativewindow.windows.*;
-import com.sun.javafx.newt.*;
-import com.sun.javafx.newt.impl.*;
-
-public class WindowsDisplay extends Display {
-
- protected static final String WINDOW_CLASS_NAME = "NewtWindowClass";
- private static int windowClassAtom;
- private static long hInstance;
-
- static {
- NativeLibLoader.loadNEWT();
-
- if (!WindowsWindow.initIDs()) {
- throw new NativeWindowException("Failed to initialize WindowsWindow jmethodIDs");
- }
- }
-
- public static void initSingleton() {
- // just exist to ensure static init has been run
- }
-
-
- public WindowsDisplay() {
- }
-
- protected void createNative() {
- aDevice = new WindowsGraphicsDevice();
- }
-
- protected void closeNative() {
- // Can't do .. only at application shutdown
- // UnregisterWindowClass(getWindowClassAtom(), getHInstance());
- }
-
- protected void dispatchMessages() {
- DispatchMessages();
- }
-
- protected static synchronized int getWindowClassAtom() {
- if(0 == windowClassAtom) {
- windowClassAtom = RegisterWindowClass(WINDOW_CLASS_NAME, getHInstance());
- if (0 == windowClassAtom) {
- throw new NativeWindowException("Error while registering window class");
- }
- }
- return windowClassAtom;
- }
-
- protected static synchronized long getHInstance() {
- if(0 == hInstance) {
- hInstance = LoadLibraryW("newt");
- if (0 == hInstance) {
- throw new NativeWindowException("Error finding HINSTANCE for \"newt\"");
- }
- }
- return hInstance;
- }
-
- //----------------------------------------------------------------------
- // Internals only
- //
- private static native long LoadLibraryW(String libraryName);
- private static native int RegisterWindowClass(String windowClassName, long hInstance);
- private static native void UnregisterWindowClass(int wndClassAtom, long hInstance);
-
- private static native void DispatchMessages();
-}
-
diff --git a/src/newt/classes/com/sun/javafx/newt/windows/WindowsScreen.java b/src/newt/classes/com/sun/javafx/newt/windows/WindowsScreen.java
deleted file mode 100755
index 87ae1b49d..000000000
--- a/src/newt/classes/com/sun/javafx/newt/windows/WindowsScreen.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.sun.javafx.newt.windows;
-
-import com.sun.javafx.newt.*;
-import com.sun.javafx.newt.impl.*;
-import javax.media.nativewindow.*;
-
-public class WindowsScreen extends Screen {
- static {
- WindowsDisplay.initSingleton();
- }
-
-
- public WindowsScreen() {
- }
-
- protected void createNative(int index) {
- aScreen = new DefaultGraphicsScreen(getDisplay().getGraphicsDevice(), index);
- setScreenSize(getWidthImpl(getIndex()), getHeightImpl(getIndex()));
- }
-
- protected void closeNative() { }
-
- private native int getWidthImpl(int scrn_idx);
- private native int getHeightImpl(int scrn_idx);
-}
diff --git a/src/newt/classes/com/sun/javafx/newt/windows/WindowsWindow.java b/src/newt/classes/com/sun/javafx/newt/windows/WindowsWindow.java
deleted file mode 100755
index 1b5bf80cf..000000000
--- a/src/newt/classes/com/sun/javafx/newt/windows/WindowsWindow.java
+++ /dev/null
@@ -1,289 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.sun.javafx.newt.windows;
-
-import javax.media.nativewindow.*;
-import com.sun.javafx.newt.*;
-
-public class WindowsWindow extends Window {
-
- private long hmon;
- private long hdc;
- private long windowHandleClose;
- private long parentWindowHandle;
- // non fullscreen dimensions ..
- private int nfs_width, nfs_height, nfs_x, nfs_y;
- private final Insets insets = new Insets(0, 0, 0, 0);
-
- static {
- WindowsDisplay.initSingleton();
- }
-
- public WindowsWindow() {
- }
-
- Thread hdcOwner = null;
-
- public synchronized int lockSurface() throws NativeWindowException {
- int res = super.lockSurface();
- if(LOCK_SUCCESS==res && 0!=windowHandle) {
- if(hdc!=0) {
- throw new NativeWindowException("NEWT Surface handle set HDC "+toHexString(hdc)+" - "+Thread.currentThread().getName()+" ; "+this);
- }
- hdc = GetDC(windowHandle);
- hmon = MonitorFromWindow(windowHandle);
- hdcOwner = Thread.currentThread();
- }
- return res;
- }
-
- public synchronized void unlockSurface() {
- // prevalidate, before we change data ..
- Thread cur = Thread.currentThread();
- if ( getSurfaceLockOwner() != cur ) {
- getLockedStack().printStackTrace();
- throw new NativeWindowException(cur+": Not owner, owner is "+getSurfaceLockOwner());
- }
- if (0!=hdc && 0!=windowHandle) {
- if(hdcOwner != cur) {
- throw new NativeWindowException("NEWT Surface handle set HDC "+toHexString(hdc)+" by other thread "+hdcOwner+", this "+cur+" ; "+this);
- }
- ReleaseDC(windowHandle, hdc);
- hdc=0;
- hdcOwner=null;
- }
- super.unlockSurface();
- }
-
- public long getSurfaceHandle() {
- return hdc;
- }
-
- public boolean hasDeviceChanged() {
- if(0!=windowHandle) {
- long _hmon = MonitorFromWindow(windowHandle);
- if (hmon != _hmon) {
- if(DEBUG_IMPLEMENTATION || DEBUG_WINDOW_EVENT) {
- Exception e = new Exception("!!! Window Device Changed "+Thread.currentThread().getName()+
- ", HMON "+toHexString(hmon)+" -> "+toHexString(_hmon));
- e.printStackTrace();
- }
- hmon = _hmon;
- return true;
- }
- }
- return false;
- }
-
- protected void createNative(long parentWindowHandle, Capabilities caps) {
- WindowsScreen screen = (WindowsScreen) getScreen();
- WindowsDisplay display = (WindowsDisplay) screen.getDisplay();
- config = GraphicsConfigurationFactory.getFactory(display.getGraphicsDevice()).chooseGraphicsConfiguration(caps, null, screen.getGraphicsScreen());
- if (config == null) {
- throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
- }
- windowHandle = CreateWindow(parentWindowHandle,
- display.getWindowClassAtom(), display.WINDOW_CLASS_NAME, display.getHInstance(),
- 0, undecorated, x, y, width, height);
- if (windowHandle == 0) {
- throw new NativeWindowException("Error creating window");
- }
- this.parentWindowHandle = parentWindowHandle;
- windowHandleClose = windowHandle;
- if(DEBUG_IMPLEMENTATION || DEBUG_WINDOW_EVENT) {
- Exception e = new Exception("!!! Window new window handle "+Thread.currentThread().getName()+
- " (Parent HWND "+toHexString(parentWindowHandle)+
- ") : HWND "+toHexString(windowHandle)+", "+Thread.currentThread());
- e.printStackTrace();
- }
- }
-
- protected void closeNative() {
- if (hdc != 0) {
- if(windowHandleClose != 0) {
- ReleaseDC(windowHandleClose, hdc);
- }
- hdc = 0;
- }
- if(windowHandleClose != 0) {
- DestroyWindow(windowHandleClose);
- windowHandleClose = 0;
- }
- }
-
- protected void windowDestroyed() {
- windowHandleClose = 0;
- super.windowDestroyed();
- }
-
- public void setVisible(boolean visible) {
- if(this.visible!=visible && 0!=windowHandle) {
- this.visible=visible;
- setVisible0(windowHandle, visible);
- }
- }
-
- // @Override
- public void setSize(int width, int height) {
- if (0!=windowHandle && (width != this.width || this.height != height)) {
- if(!fullscreen) {
- nfs_width=width;
- nfs_height=height;
- }
- this.width = width;
- this.height = height;
- setSize0(parentWindowHandle, windowHandle, x, y, width, height);
- }
- }
-
- //@Override
- public void setPosition(int x, int y) {
- if (0!=windowHandle && (this.x != x || this.y != y)) {
- if(!fullscreen) {
- nfs_x=x;
- nfs_y=y;
- }
- this.x = x;
- this.y = y;
- setPosition(parentWindowHandle, windowHandle, x , y);
- }
- }
-
- public boolean setFullscreen(boolean fullscreen) {
- if(0!=windowHandle && (this.fullscreen!=fullscreen)) {
- int x,y,w,h;
- this.fullscreen=fullscreen;
- if(fullscreen) {
- x = 0; y = 0;
- w = screen.getWidth();
- h = screen.getHeight();
- } else {
- x = nfs_x;
- y = nfs_y;
- w = nfs_width;
- h = nfs_height;
- }
- if(DEBUG_IMPLEMENTATION || DEBUG_WINDOW_EVENT) {
- System.err.println("WindowsWindow fs: "+fullscreen+" "+x+"/"+y+" "+w+"x"+h);
- }
- setFullscreen0(parentWindowHandle, windowHandle, x, y, w, h, undecorated, fullscreen);
- }
- return fullscreen;
- }
-
- // @Override
- public void requestFocus() {
- super.requestFocus();
- if (windowHandle != 0L) {
- requestFocus(windowHandle);
- }
- }
-
- // @Override
- public void setTitle(String title) {
- if (title == null) {
- title = "";
- }
- if (0!=windowHandle && !title.equals(getTitle())) {
- super.setTitle(title);
- setTitle(windowHandle, title);
- }
- }
-
- public Insets getInsets() {
- return (Insets)insets.clone();
- }
-
- //----------------------------------------------------------------------
- // Internals only
- //
- protected static native boolean initIDs();
- private native long CreateWindow(long parentWindowHandle,
- int wndClassAtom, String wndName,
- long hInstance, long visualID,
- boolean isUndecorated,
- int x, int y, int width, int height);
- private native void DestroyWindow(long windowHandle);
- private native long GetDC(long windowHandle);
- private native void ReleaseDC(long windowHandle, long hdc);
- private native long MonitorFromWindow(long windowHandle);
- private static native void setVisible0(long windowHandle, boolean visible);
- private native void setSize0(long parentWindowHandle, long windowHandle, int x, int y, int width, int height);
- private native void setPosition(long parentWindowHandle, long windowHandle, int x, int y);
- private native void setFullscreen0(long parentWindowHandle, long windowHandle, int x, int y, int width, int height, boolean isUndecorated, boolean on);
- private static native void setTitle(long windowHandle, String title);
- private static native void requestFocus(long windowHandle);
-
- private void insetsChanged(int left, int top, int right, int bottom) {
- if (left != -1 && top != -1 && right != -1 && bottom != -1) {
- insets.left = left;
- insets.top = top;
- insets.right = right;
- insets.bottom = bottom;
- }
- }
- private void sizeChanged(int newWidth, int newHeight) {
- width = newWidth;
- height = newHeight;
- if(!fullscreen) {
- nfs_width=width;
- nfs_height=height;
- }
- sendWindowEvent(WindowEvent.EVENT_WINDOW_RESIZED);
- }
-
- private void positionChanged(int newX, int newY) {
- x = newX;
- y = newY;
- if(!fullscreen) {
- nfs_x=x;
- nfs_y=y;
- }
- sendWindowEvent(WindowEvent.EVENT_WINDOW_MOVED);
- }
-
- /**
- *
- * @param focusOwner if focusGained is true, focusOwner is the previous
- * focus owner, if focusGained is false, focusOwner is the new focus owner
- * @param focusGained
- */
- private void focusChanged(long focusOwner, boolean focusGained) {
- if (focusGained) {
- sendWindowEvent(WindowEvent.EVENT_WINDOW_GAINED_FOCUS);
- } else {
- sendWindowEvent(WindowEvent.EVENT_WINDOW_LOST_FOCUS);
- }
- }
-}
diff --git a/src/newt/classes/com/sun/javafx/newt/x11/X11Display.java b/src/newt/classes/com/sun/javafx/newt/x11/X11Display.java
deleted file mode 100755
index ae23c4423..000000000
--- a/src/newt/classes/com/sun/javafx/newt/x11/X11Display.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.sun.javafx.newt.x11;
-
-import javax.media.nativewindow.*;
-import javax.media.nativewindow.x11.*;
-import com.sun.javafx.newt.*;
-import com.sun.javafx.newt.impl.*;
-import com.sun.nativewindow.impl.x11.X11Util;
-
-public class X11Display extends Display {
- static {
- NativeLibLoader.loadNEWT();
-
- if (!initIDs()) {
- throw new NativeWindowException("Failed to initialize X11Display jmethodIDs");
- }
-
- if (!X11Window.initIDs()) {
- throw new NativeWindowException("Failed to initialize X11Window jmethodIDs");
- }
- }
-
- public static void initSingleton() {
- // just exist to ensure static init has been run
- }
-
-
- public X11Display() {
- }
-
- protected void createNative() {
- long handle= X11Util.getThreadLocalDisplay(name);
- if (handle == 0 ) {
- throw new RuntimeException("Error creating display: "+name);
- }
- try {
- CompleteDisplay(handle);
- } catch(RuntimeException e) {
- X11Util.closeThreadLocalDisplay(name);
- throw e;
- }
- aDevice = new X11GraphicsDevice(handle);
- }
-
- protected void closeNative() {
- if(0==X11Util.closeThreadLocalDisplay(name)) {
- throw new NativeWindowException(this+" was not mapped");
- }
- }
-
- protected void dispatchMessages() {
- DispatchMessages(getHandle(), javaObjectAtom, windowDeleteAtom);
- }
-
- protected void lockDisplay() {
- super.lockDisplay();
- LockDisplay(getHandle());
- }
-
- protected void unlockDisplay() {
- UnlockDisplay(getHandle());
- super.unlockDisplay();
- }
-
- protected long getJavaObjectAtom() { return javaObjectAtom; }
- protected long getWindowDeleteAtom() { return windowDeleteAtom; }
-
- //----------------------------------------------------------------------
- // Internals only
- //
- private static native boolean initIDs();
-
- private native void LockDisplay(long handle);
- private native void UnlockDisplay(long handle);
-
- private native void CompleteDisplay(long handle);
-
- private native void DispatchMessages(long display, long javaObjectAtom, long windowDeleteAtom);
-
- private void displayCompleted(long javaObjectAtom, long windowDeleteAtom) {
- this.javaObjectAtom=javaObjectAtom;
- this.windowDeleteAtom=windowDeleteAtom;
- }
-
- private long windowDeleteAtom;
- private long javaObjectAtom;
-}
-
diff --git a/src/newt/classes/com/sun/javafx/newt/x11/X11Screen.java b/src/newt/classes/com/sun/javafx/newt/x11/X11Screen.java
deleted file mode 100755
index cee576e2c..000000000
--- a/src/newt/classes/com/sun/javafx/newt/x11/X11Screen.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.sun.javafx.newt.x11;
-
-import com.sun.javafx.newt.*;
-import com.sun.javafx.newt.impl.*;
-import javax.media.nativewindow.*;
-import javax.media.nativewindow.x11.*;
-
-public class X11Screen extends Screen {
-
- static {
- X11Display.initSingleton();
- }
-
-
- public X11Screen() {
- }
-
- protected void createNative(int index) {
- long handle = GetScreen(display.getHandle(), index);
- if (handle == 0 ) {
- throw new RuntimeException("Error creating screen: "+index);
- }
- aScreen = new X11GraphicsScreen((X11GraphicsDevice)getDisplay().getGraphicsDevice(), index);
- setScreenSize(getWidth0(display.getHandle(), index),
- getHeight0(display.getHandle(), index));
- }
-
- protected void closeNative() { }
-
- //----------------------------------------------------------------------
- // Internals only
- //
-
- private native long GetScreen(long dpy, int scrn_idx);
- private native int getWidth0(long display, int scrn_idx);
- private native int getHeight0(long display, int scrn_idx);
-}
-
diff --git a/src/newt/classes/com/sun/javafx/newt/x11/X11Window.java b/src/newt/classes/com/sun/javafx/newt/x11/X11Window.java
deleted file mode 100755
index f46ae9564..000000000
--- a/src/newt/classes/com/sun/javafx/newt/x11/X11Window.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.sun.javafx.newt.x11;
-
-import com.sun.javafx.newt.*;
-import com.sun.javafx.newt.impl.*;
-import javax.media.nativewindow.*;
-import javax.media.nativewindow.x11.*;
-
-public class X11Window extends Window {
- private static final String WINDOW_CLASS_NAME = "NewtWindow";
- // non fullscreen dimensions ..
- private int nfs_width, nfs_height, nfs_x, nfs_y;
-
- static {
- X11Display.initSingleton();
- }
-
- public X11Window() {
- }
-
- protected void createNative(long parentWindowHandle, Capabilities caps) {
- X11Screen screen = (X11Screen) getScreen();
- X11Display display = (X11Display) screen.getDisplay();
- config = GraphicsConfigurationFactory.getFactory(display.getGraphicsDevice()).chooseGraphicsConfiguration(caps, null, screen.getGraphicsScreen());
- if (config == null) {
- throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
- }
- X11GraphicsConfiguration x11config = (X11GraphicsConfiguration) config;
- long visualID = x11config.getVisualID();
- long w = CreateWindow(parentWindowHandle,
- display.getHandle(), screen.getIndex(), visualID,
- display.getJavaObjectAtom(), display.getWindowDeleteAtom(), x, y, width, height);
- if (w == 0 || w!=windowHandle) {
- throw new NativeWindowException("Error creating window: "+w);
- }
- this.parentWindowHandle = parentWindowHandle;
- windowHandleClose = windowHandle;
- displayHandleClose = display.getHandle();
- }
-
- protected void closeNative() {
- if(0!=displayHandleClose && 0!=windowHandleClose && null!=getScreen() ) {
- X11Display display = (X11Display) getScreen().getDisplay();
- CloseWindow(displayHandleClose, windowHandleClose, display.getJavaObjectAtom());
- windowHandleClose = 0;
- displayHandleClose = 0;
- }
- }
-
- protected void windowDestroyed() {
- windowHandleClose = 0;
- displayHandleClose = 0;
- super.windowDestroyed();
- }
-
- public void setVisible(boolean visible) {
- if(0!=windowHandle && this.visible!=visible) {
- this.visible=visible;
- setVisible0(getDisplayHandle(), windowHandle, visible);
- clearEventMask();
- }
- }
-
- public void requestFocus() {
- super.requestFocus();
- }
-
- public void setSize(int width, int height) {
- if(DEBUG_IMPLEMENTATION) {
- System.err.println("X11Window setSize: "+this.x+"/"+this.y+" "+this.width+"x"+this.height+" -> "+width+"x"+height);
- // Exception e = new Exception("XXXXXXXXXX");
- // e.printStackTrace();
- }
- this.width = width;
- this.height = height;
- if(!fullscreen) {
- nfs_width=width;
- nfs_height=height;
- }
- if(0!=windowHandle) {
- setSize0(parentWindowHandle, getDisplayHandle(), getScreenIndex(), windowHandle, x, y, width, height, (undecorated||fullscreen)?-1:1, false);
- }
- }
-
- public void setPosition(int x, int y) {
- if(DEBUG_IMPLEMENTATION) {
- System.err.println("X11Window setPosition: "+this.x+"/"+this.y+" -> "+x+"/"+y);
- // Exception e = new Exception("XXXXXXXXXX");
- // e.printStackTrace();
- }
- this.x = x;
- this.y = y;
- if(!fullscreen) {
- nfs_x=x;
- nfs_y=y;
- }
- if(0!=windowHandle) {
- setPosition0(getDisplayHandle(), windowHandle, x, y);
- }
- }
-
- public boolean setFullscreen(boolean fullscreen) {
- if(0!=windowHandle && this.fullscreen!=fullscreen) {
- int x,y,w,h;
- this.fullscreen=fullscreen;
- if(fullscreen) {
- x = 0; y = 0;
- w = screen.getWidth();
- h = screen.getHeight();
- } else {
- x = nfs_x;
- y = nfs_y;
- w = nfs_width;
- h = nfs_height;
- }
- if(DEBUG_IMPLEMENTATION || DEBUG_WINDOW_EVENT) {
- System.err.println("X11Window fs: "+fullscreen+" "+x+"/"+y+" "+w+"x"+h);
- }
- setSize0(parentWindowHandle, getDisplayHandle(), getScreenIndex(), windowHandle, x, y, w, h, (undecorated||fullscreen)?-1:1, false);
- }
- return fullscreen;
- }
-
- //----------------------------------------------------------------------
- // Internals only
- //
-
- protected static native boolean initIDs();
- private native long CreateWindow(long parentWindowHandle, long display, int screen_index,
- long visualID, long javaObjectAtom, long windowDeleteAtom, int x, int y, int width, int height);
- private native void CloseWindow(long display, long windowHandle, long javaObjectAtom);
- private native void setVisible0(long display, long windowHandle, boolean visible);
- private native void setSize0(long parentWindowHandle, long display, int screen_index, long windowHandle,
- int x, int y, int width, int height, int decorationToggle, boolean setVisible);
- private native void setPosition0(long display, long windowHandle, int x, int y);
-
- private void windowChanged(int newX, int newY, int newWidth, int newHeight) {
- if(width != newWidth || height != newHeight) {
- if(DEBUG_IMPLEMENTATION) {
- System.err.println("X11Window windowChanged size: "+this.width+"x"+this.height+" -> "+newWidth+"x"+newHeight);
- }
- width = newWidth;
- height = newHeight;
- if(!fullscreen) {
- nfs_width=width;
- nfs_height=height;
- }
- sendWindowEvent(WindowEvent.EVENT_WINDOW_RESIZED);
- }
- if( 0==parentWindowHandle && ( x != newX || y != newY ) ) {
- if(DEBUG_IMPLEMENTATION) {
- System.err.println("X11Window windowChanged position: "+this.x+"/"+this.y+" -> "+newX+"x"+newY);
- }
- x = newX;
- y = newY;
- if(!fullscreen) {
- nfs_x=x;
- nfs_y=y;
- }
- sendWindowEvent(WindowEvent.EVENT_WINDOW_MOVED);
- }
- }
-
- private void windowCreated(long windowHandle) {
- this.windowHandle = windowHandle;
- }
-
- private long windowHandleClose;
- private long displayHandleClose;
- private long parentWindowHandle;
-}
diff --git a/src/newt/native/BroadcomEGL.c b/src/newt/native/BroadcomEGL.c
index 55688f9d1..8a9c5f948 100755
--- a/src/newt/native/BroadcomEGL.c
+++ b/src/newt/native/BroadcomEGL.c
@@ -41,7 +41,7 @@
#include java -Djava.awt.headless=true demos.es2.RedSquare -GL2
* Single thread (MacOSX) java -XstartOnFirstThread -Djava.awt.headless=true demos.es2.RedSquare -GL2
* Multiple threads & windows (Unix, Win32) java -Djava.awt.headless=true demos.es2.RedSquare -GL2 -GL2 -GL2 -GL2
-* Multiple threads & windows (MacOSX) java -XstartOnFirstThread -Djava.awt.headless=true com.jogamp.javafx.newt.util.MainThread demos.es2.RedSquare -GL2 -GL2 -GL2 -GL2
+* Multiple threads & windows (MacOSX) java -XstartOnFirstThread -Djava.awt.headless=true com.jogamp.newt.util.MainThread demos.es2.RedSquare -GL2 -GL2 -GL2 -GL2
-The serialization of the main Java class through ''com.jogamp.javafx.newt.util.MainThread''
+The serialization of the main Java class through ''com.jogamp.newt.util.MainThread''
may be used for all platforms, since it only takes effect on ''MacOSX''.
This allows you an almost platform independent invocation of your multithreaded Java applications.
-On ''MacOSX'', ''com.jogamp.javafx.newt.util.MainThread'' will occupy the main thread and
+On ''MacOSX'', ''com.jogamp.newt.util.MainThread'' will occupy the main thread and
serializes all native window related tasks through it.
This mechanism is thread safe utilizes reentrant locking.
diff --git a/doxygen/doxygen-all-pub.cfg b/doxygen/doxygen-all-pub.cfg
index a7f4711df..a94c49fb0 100644
--- a/doxygen/doxygen-all-pub.cfg
+++ b/doxygen/doxygen-all-pub.cfg
@@ -462,7 +462,7 @@ WARN_LOGFILE =
INPUT = ../src/jogl/classes/javax
INPUT += ../build-x86_64/jogl/gensrc/classes/javax
INPUT += ../src/jogl/classes/com/jogamp/opengl/util
-INPUT += ../src/newt/classes/com/jogamp/javafx/newt
+INPUT += ../src/newt/classes/com/jogamp/newt
# If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
diff --git a/make/build-jogl.xml b/make/build-jogl.xml
index c3bc96bd8..4a0bac4d5 100644
--- a/make/build-jogl.xml
+++ b/make/build-jogl.xml
@@ -191,10 +191,10 @@
+ falloffFactor
+ -------------------
+ falloffFactor + r^2
+
+*/
+ public void setFalloffFactor(float factor) {
+ falloffFactor = factor;
+ }
+
+ public void shutdown() {
+ synchronized(shutdownLock) {
+ shutdown = true;
+ SetEvent(event);
+ try {
+ shutdownLock.wait();
+ } catch (InterruptedException e) {
+ }
+ }
+ }
+
+ class FillerThread extends Thread {
+ FillerThread() {
+ super("Mixer Thread");
+ }
+
+ public void run() {
+ while (!shutdown) {
+ List/*
- falloffFactor
- -------------------
- falloffFactor + r^2
-
-*/
- public void setFalloffFactor(float factor) {
- falloffFactor = factor;
- }
-
- public void shutdown() {
- synchronized(shutdownLock) {
- shutdown = true;
- SetEvent(event);
- try {
- shutdownLock.wait();
- } catch (InterruptedException e) {
- }
- }
- }
-
- class FillerThread extends Thread {
- FillerThread() {
- super("Mixer Thread");
- }
-
- public void run() {
- while (!shutdown) {
- List/*
This protocol does not describe how to create native windows, but how to bind a native window to an implementation of
{@link javax.media.nativewindow.NativeWindow NativeWindow}.
- However, an implementation of this protocol (e.g. {@link com.jogamp.javafx.newt}) may support the creation.
+ However, an implementation of this protocol (e.g. {@link com.jogamp.newt}) may support the creation.
Dependencies
This binding has dependencies to the following:
diff --git a/src/newt/classes/com/jogamp/javafx/newt/Display.java b/src/newt/classes/com/jogamp/javafx/newt/Display.java
deleted file mode 100755
index 5c5db0338..000000000
--- a/src/newt/classes/com/jogamp/javafx/newt/Display.java
+++ /dev/null
@@ -1,276 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.jogamp.javafx.newt;
-
-import javax.media.nativewindow.*;
-import com.jogamp.javafx.newt.impl.Debug;
-import com.jogamp.javafx.newt.util.EventDispatchThread;
-import java.util.*;
-
-public abstract class Display {
- public static final boolean DEBUG = Debug.debug("Display");
-
- private static Class getDisplayClass(String type)
- throws ClassNotFoundException
- {
- Class displayClass = NewtFactory.getCustomClass(type, "Display");
- if(null==displayClass) {
- if (NativeWindowFactory.TYPE_EGL.equals(type)) {
- displayClass = Class.forName("com.jogamp.javafx.newt.opengl.kd.KDDisplay");
- } else if (NativeWindowFactory.TYPE_WINDOWS.equals(type)) {
- displayClass = Class.forName("com.jogamp.javafx.newt.windows.WindowsDisplay");
- } else if (NativeWindowFactory.TYPE_MACOSX.equals(type)) {
- displayClass = Class.forName("com.jogamp.javafx.newt.macosx.MacDisplay");
- } else if (NativeWindowFactory.TYPE_X11.equals(type)) {
- displayClass = Class.forName("com.jogamp.javafx.newt.x11.X11Display");
- } else if (NativeWindowFactory.TYPE_AWT.equals(type)) {
- displayClass = Class.forName("com.jogamp.javafx.newt.awt.AWTDisplay");
- } else {
- throw new RuntimeException("Unknown display type \"" + type + "\"");
- }
- }
- return displayClass;
- }
-
- // Unique Display for each thread
- private static ThreadLocal currentDisplayMap = new ThreadLocal();
-
- /** Returns the thread local display map */
- public static Map getCurrentDisplayMap() {
- Map displayMap = (Map) currentDisplayMap.get();
- if(null==displayMap) {
- displayMap = new HashMap();
- currentDisplayMap.set( displayMap );
- }
- return displayMap;
- }
-
- /** maps the given display to the thread local display map
- * and notifies all threads synchronized to this display map. */
- protected static Display setCurrentDisplay(Display display) {
- Map displayMap = getCurrentDisplayMap();
- Display oldDisplay = null;
- synchronized(displayMap) {
- String name = display.getName();
- if(null==name) name="nil";
- oldDisplay = (Display) displayMap.put(name, display);
- displayMap.notifyAll();
- }
- return oldDisplay;
- }
-
- /** removes the mapping of the given name from the thread local display map
- * and notifies all threads synchronized to this display map. */
- protected static Display removeCurrentDisplay(String name) {
- if(null==name) name="nil";
- Map displayMap = getCurrentDisplayMap();
- Display oldDisplay = null;
- synchronized(displayMap) {
- oldDisplay = (Display) displayMap.remove(name);
- displayMap.notifyAll();
- }
- return oldDisplay;
- }
-
- /** Returns the thread local display mapped to the given name */
- public static Display getCurrentDisplay(String name) {
- if(null==name) name="nil";
- Map displayMap = getCurrentDisplayMap();
- Display display = (Display) displayMap.get(name);
- return display;
- }
-
- public static void dumpDisplayMap(String prefix) {
- Map displayMap = getCurrentDisplayMap();
- Set entrySet = displayMap.entrySet();
- Iterator i = entrySet.iterator();
- System.err.println(prefix+" DisplayMap["+entrySet.size()+"] "+Thread.currentThread());
- for(int j=0; i.hasNext(); j++) {
- Map.Entry entry = (Map.Entry) i.next();
- System.err.println(" ["+j+"] "+entry.getKey()+" -> "+entry.getValue());
- }
- }
-
- /** Returns the thread local display collection */
- public static Collection getCurrentDisplays() {
- return getCurrentDisplayMap().values();
- }
-
- /** Make sure to reuse a Display with the same name */
- protected static Display create(String type, String name) {
- try {
- if(DEBUG) {
- dumpDisplayMap("Display.create("+name+") BEGIN");
- }
- Display display = getCurrentDisplay(name);
- if(null==display) {
- Class displayClass = getDisplayClass(type);
- display = (Display) displayClass.newInstance();
- display.name=name;
- display.refCount=1;
-
- if(NewtFactory.useEDT()) {
- Thread current = Thread.currentThread();
- display.eventDispatchThread = new EventDispatchThread(display, current.getThreadGroup(), current.getName());
- display.eventDispatchThread.start();
- final Display f_dpy = display;
- display.eventDispatchThread.invokeAndWait(new Runnable() {
- public void run() {
- f_dpy.createNative();
- }
- } );
- } else {
- display.createNative();
- }
- if(null==display.aDevice) {
- throw new RuntimeException("Display.createNative() failed to instanciate an AbstractGraphicsDevice");
- }
- setCurrentDisplay(display);
- if(DEBUG) {
- System.err.println("Display.create("+name+") NEW: "+display+" "+Thread.currentThread());
- }
- } else {
- synchronized(display) {
- display.refCount++;
- if(DEBUG) {
- System.err.println("Display.create("+name+") REUSE: refCount "+display.refCount+", "+display+" "+Thread.currentThread());
- }
- }
- }
- if(DEBUG) {
- dumpDisplayMap("Display.create("+name+") END");
- }
- return display;
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-
- protected static Display wrapHandle(String type, String name, AbstractGraphicsDevice aDevice) {
- try {
- Class displayClass = getDisplayClass(type);
- Display display = (Display) displayClass.newInstance();
- display.name=name;
- display.aDevice=aDevice;
- return display;
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-
- public EventDispatchThread getEDT() { return eventDispatchThread; }
-
- public synchronized void destroy() {
- if(DEBUG) {
- dumpDisplayMap("Display.destroy("+name+") BEGIN");
- }
- refCount--;
- if(0==refCount) {
- removeCurrentDisplay(name);
- if(DEBUG) {
- System.err.println("Display.destroy("+name+") REMOVE: "+this+" "+Thread.currentThread());
- }
- if(null!=eventDispatchThread) {
- final Display f_dpy = this;
- final EventDispatchThread f_edt = eventDispatchThread;
- eventDispatchThread.invokeAndWait(new Runnable() {
- public void run() {
- f_dpy.closeNative();
- f_edt.stop();
- }
- } );
- } else {
- closeNative();
- }
- if(null!=eventDispatchThread) {
- eventDispatchThread.waitUntilStopped();
- eventDispatchThread=null;
- }
- aDevice = null;
- } else {
- if(DEBUG) {
- System.err.println("Display.destroy("+name+") KEEP: refCount "+refCount+", "+this+" "+Thread.currentThread());
- }
- }
- if(DEBUG) {
- dumpDisplayMap("Display.destroy("+name+") END");
- }
- }
-
- protected abstract void createNative();
- protected abstract void closeNative();
-
- public String getName() {
- return name;
- }
-
- public long getHandle() {
- if(null!=aDevice) {
- return aDevice.getHandle();
- }
- return 0;
- }
-
- public AbstractGraphicsDevice getGraphicsDevice() {
- return aDevice;
- }
-
- public void pumpMessages() {
- if(null!=eventDispatchThread) {
- dispatchMessages();
- } else {
- synchronized(this) {
- dispatchMessages();
- }
- }
- }
-
- public String toString() {
- return "NEWT-Display["+name+", refCount "+refCount+", "+aDevice+"]";
- }
-
- protected abstract void dispatchMessages();
-
- /** Default impl. nop - Currently only X11 needs a Display lock */
- protected void lockDisplay() { }
-
- /** Default impl. nop - Currently only X11 needs a Display lock */
- protected void unlockDisplay() { }
-
- protected EventDispatchThread eventDispatchThread = null;
- protected String name;
- protected int refCount;
- protected AbstractGraphicsDevice aDevice;
-}
-
diff --git a/src/newt/classes/com/jogamp/javafx/newt/Event.java b/src/newt/classes/com/jogamp/javafx/newt/Event.java
deleted file mode 100644
index 4274454ab..000000000
--- a/src/newt/classes/com/jogamp/javafx/newt/Event.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.jogamp.javafx.newt;
-
-public class Event {
- private boolean isSystemEvent;
- private int eventType;
- private Window source;
- private long when;
-
- Event(boolean isSystemEvent, int eventType, Window source, long when) {
- this.isSystemEvent = isSystemEvent;
- this.eventType = eventType;
- this.source = source;
- this.when = when;
- }
-
- protected Event(int eventType, Window source, long when) {
- this(false, eventType, source, when);
- }
-
- /** Indicates whether this event was produced by the system or
- generated by user code. */
- public final boolean isSystemEvent() {
- return isSystemEvent;
- }
-
- /** Returns the event type of this event. */
- public final int getEventType() {
- return eventType;
- }
-
- /** Returns the source Window which produced this Event. */
- public final Window getSource() {
- return source;
- }
-
- /** Returns the timestamp, in milliseconds, of this event. */
- public final long getWhen() {
- return when;
- }
-
- public String toString() {
- return "Event[sys:"+isSystemEvent()+", source:"+getSource()+", when:"+getWhen()+"]";
- }
-
- public static String toHexString(int hex) {
- return "0x" + Integer.toHexString(hex);
- }
-
- public static String toHexString(long hex) {
- return "0x" + Long.toHexString(hex);
- }
-
-}
diff --git a/src/newt/classes/com/jogamp/javafx/newt/EventListener.java b/src/newt/classes/com/jogamp/javafx/newt/EventListener.java
deleted file mode 100644
index 065cc1de3..000000000
--- a/src/newt/classes/com/jogamp/javafx/newt/EventListener.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.jogamp.javafx.newt;
-
-public interface EventListener
-{
- public static final int WINDOW = 1 << 0;
- public static final int MOUSE = 1 << 1;
- public static final int KEY = 1 << 2;
- public static final int SURFACE = 1 << 3;
-
-}
-
diff --git a/src/newt/classes/com/jogamp/javafx/newt/InputEvent.java b/src/newt/classes/com/jogamp/javafx/newt/InputEvent.java
deleted file mode 100644
index 0cfaaa4c0..000000000
--- a/src/newt/classes/com/jogamp/javafx/newt/InputEvent.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.jogamp.javafx.newt;
-
-public abstract class InputEvent extends Event
-{
- public static final int SHIFT_MASK = 1 << 0;
- public static final int CTRL_MASK = 1 << 1;
- public static final int META_MASK = 1 << 2;
- public static final int ALT_MASK = 1 << 3;
- public static final int ALT_GRAPH_MASK = 1 << 5;
- public static final int BUTTON1_MASK = 1 << 6;
- public static final int BUTTON2_MASK = 1 << 7;
- public static final int BUTTON3_MASK = 1 << 8;
-
- protected InputEvent(boolean sysEvent, int eventType, Window source, long when, int modifiers) {
- super(sysEvent, eventType, source, when);
- this.consumed=false;
- this.modifiers=modifiers;
- }
-
- public void consume() {
- consumed=true;
- }
-
- public boolean isConsumed() {
- return consumed;
- }
- public int getModifiers() {
- return modifiers;
- }
- public boolean isAltDown() {
- return (modifiers&ALT_MASK)!=0;
- }
- public boolean isAltGraphDown() {
- return (modifiers&ALT_GRAPH_MASK)!=0;
- }
- public boolean isControlDown() {
- return (modifiers&CTRL_MASK)!=0;
- }
- public boolean isMetaDown() {
- return (modifiers&META_MASK)!=0;
- }
- public boolean isShiftDown() {
- return (modifiers&SHIFT_MASK)!=0;
- }
-
- public boolean isButton1Down() {
- return (modifiers&BUTTON1_MASK)!=0;
- }
-
- public boolean isButton2Down() {
- return (modifiers&BUTTON2_MASK)!=0;
- }
-
- public boolean isButton3Down() {
- return (modifiers&BUTTON3_MASK)!=0;
- }
-
- public String toString() {
- return "InputEvent[modifiers:"+modifiers+"]";
- }
-
- private boolean consumed;
- private int modifiers;
-}
diff --git a/src/newt/classes/com/jogamp/javafx/newt/Insets.java b/src/newt/classes/com/jogamp/javafx/newt/Insets.java
deleted file mode 100644
index 5c91847f4..000000000
--- a/src/newt/classes/com/jogamp/javafx/newt/Insets.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-package com.jogamp.javafx.newt;
-
-/**
- * Simple class representing insets.
- *
- * @author tdv
- */
-public class Insets implements Cloneable {
- public int top;
- public int left;
- public int bottom;
- public int right;
-
- /**
- * Creates and initializes a new Insets
object with the
- * specified top, left, bottom, and right insets.
- * @param top the inset from the top.
- * @param left the inset from the left.
- * @param bottom the inset from the bottom.
- * @param right the inset from the right.
- */
- public Insets(int top, int left, int bottom, int right) {
- this.top = top;
- this.left = left;
- this.bottom = bottom;
- this.right = right;
- }
-
- /**
- * Checks whether two insets objects are equal. Two instances
- * of Insets
are equal if the four integer values
- * of the fields top
, left
,
- * bottom
, and right
are all equal.
- * @return true
if the two insets are equal;
- * otherwise false
.
- */
- public boolean equals(Object obj) {
- if (obj instanceof Insets) {
- Insets insets = (Insets)obj;
- return ((top == insets.top) && (left == insets.left) &&
- (bottom == insets.bottom) && (right == insets.right));
- }
- return false;
- }
-
- /**
- * Returns the hash code for this Insets.
- *
- * @return a hash code for this Insets.
- */
- public int hashCode() {
- int sum1 = left + bottom;
- int sum2 = right + top;
- int val1 = sum1 * (sum1 + 1)/2 + left;
- int val2 = sum2 * (sum2 + 1)/2 + top;
- int sum3 = val1 + val2;
- return sum3 * (sum3 + 1)/2 + val2;
- }
-
- public String toString() {
- return getClass().getName() + "[top=" + top + ",left=" + left +
- ",bottom=" + bottom + ",right=" + right + "]";
- }
-
- public Object clone() {
- try {
- return super.clone();
- } catch (CloneNotSupportedException ex) {
- throw new InternalError();
- }
- }
-
-}
diff --git a/src/newt/classes/com/jogamp/javafx/newt/KeyEvent.java b/src/newt/classes/com/jogamp/javafx/newt/KeyEvent.java
deleted file mode 100644
index 8ae92464c..000000000
--- a/src/newt/classes/com/jogamp/javafx/newt/KeyEvent.java
+++ /dev/null
@@ -1,738 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.jogamp.javafx.newt;
-
-public class KeyEvent extends InputEvent
-{
- KeyEvent(boolean sysEvent, int eventType, Window source, long when, int modifiers, int keyCode, char keyChar) {
- super(sysEvent, eventType, source, when, modifiers);
- this.keyCode=keyCode;
- this.keyChar=keyChar;
- }
- public KeyEvent(int eventType, Window source, long when, int modifiers, int keyCode, char keyChar) {
- this(false, eventType, source, when, modifiers, keyCode, keyChar);
- }
-
- public char getKeyChar() {
- return keyChar;
- }
- public int getKeyCode() {
- return keyCode;
- }
-
- public String toString() {
- return "KeyEvent["+getEventTypeString(getEventType())+
- ", code "+keyCode+"("+toHexString(keyCode)+"), char <"+keyChar+"> ("+toHexString((int)keyChar)+"), isActionKey "+isActionKey()+", "+super.toString()+"]";
- }
-
- public static String getEventTypeString(int type) {
- switch(type) {
- case EVENT_KEY_PRESSED: return "EVENT_KEY_PRESSED";
- case EVENT_KEY_RELEASED: return "EVENT_KEY_RELEASED";
- case EVENT_KEY_TYPED: return "EVENT_KEY_TYPED";
- default: return "unknown (" + type + ")";
- }
- }
-
- public boolean isActionKey() {
- switch (keyCode) {
- case VK_HOME:
- case VK_END:
- case VK_PAGE_UP:
- case VK_PAGE_DOWN:
- case VK_UP:
- case VK_DOWN:
- case VK_LEFT:
- case VK_RIGHT:
-
- case VK_F1:
- case VK_F2:
- case VK_F3:
- case VK_F4:
- case VK_F5:
- case VK_F6:
- case VK_F7:
- case VK_F8:
- case VK_F9:
- case VK_F10:
- case VK_F11:
- case VK_F12:
- case VK_F13:
- case VK_F14:
- case VK_F15:
- case VK_F16:
- case VK_F17:
- case VK_F18:
- case VK_F19:
- case VK_F20:
- case VK_F21:
- case VK_F22:
- case VK_F23:
- case VK_F24:
- case VK_PRINTSCREEN:
- case VK_CAPS_LOCK:
- case VK_PAUSE:
- case VK_INSERT:
-
- case VK_HELP:
- case VK_WINDOWS:
- return true;
- }
- return false;
- }
-
- private int keyCode;
- private char keyChar;
-
- public static final int EVENT_KEY_PRESSED = 300;
- public static final int EVENT_KEY_RELEASED= 301;
- public static final int EVENT_KEY_TYPED = 302;
-
- /* Virtual key codes. */
-
- public static final int VK_ENTER = '\n';
- public static final int VK_BACK_SPACE = '\b';
- public static final int VK_TAB = '\t';
- public static final int VK_CANCEL = 0x03;
- public static final int VK_CLEAR = 0x0C;
- public static final int VK_SHIFT = 0x10;
- public static final int VK_CONTROL = 0x11;
- public static final int VK_ALT = 0x12;
- public static final int VK_PAUSE = 0x13;
- public static final int VK_CAPS_LOCK = 0x14;
- public static final int VK_ESCAPE = 0x1B;
- public static final int VK_SPACE = 0x20;
- public static final int VK_PAGE_UP = 0x21;
- public static final int VK_PAGE_DOWN = 0x22;
- public static final int VK_END = 0x23;
- public static final int VK_HOME = 0x24;
-
- /**
- * Constant for the non-numpad left arrow key.
- * @see #VK_KP_LEFT
- */
- public static final int VK_LEFT = 0x25;
-
- /**
- * Constant for the non-numpad up arrow key.
- * @see #VK_KP_UP
- */
- public static final int VK_UP = 0x26;
-
- /**
- * Constant for the non-numpad right arrow key.
- * @see #VK_KP_RIGHT
- */
- public static final int VK_RIGHT = 0x27;
-
- /**
- * Constant for the non-numpad down arrow key.
- * @see #VK_KP_DOWN
- */
- public static final int VK_DOWN = 0x28;
-
- /**
- * Constant for the comma key, ","
- */
- public static final int VK_COMMA = 0x2C;
-
- /**
- * Constant for the minus key, "-"
- * @since 1.2
- */
- public static final int VK_MINUS = 0x2D;
-
- /**
- * Constant for the period key, "."
- */
- public static final int VK_PERIOD = 0x2E;
-
- /**
- * Constant for the forward slash key, "/"
- */
- public static final int VK_SLASH = 0x2F;
-
- /** VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39) */
- public static final int VK_0 = 0x30;
- public static final int VK_1 = 0x31;
- public static final int VK_2 = 0x32;
- public static final int VK_3 = 0x33;
- public static final int VK_4 = 0x34;
- public static final int VK_5 = 0x35;
- public static final int VK_6 = 0x36;
- public static final int VK_7 = 0x37;
- public static final int VK_8 = 0x38;
- public static final int VK_9 = 0x39;
-
- /**
- * Constant for the semicolon key, ";"
- */
- public static final int VK_SEMICOLON = 0x3B;
-
- /**
- * Constant for the equals key, "="
- */
- public static final int VK_EQUALS = 0x3D;
-
- /** VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) */
- public static final int VK_A = 0x41;
- public static final int VK_B = 0x42;
- public static final int VK_C = 0x43;
- public static final int VK_D = 0x44;
- public static final int VK_E = 0x45;
- public static final int VK_F = 0x46;
- public static final int VK_G = 0x47;
- public static final int VK_H = 0x48;
- public static final int VK_I = 0x49;
- public static final int VK_J = 0x4A;
- public static final int VK_K = 0x4B;
- public static final int VK_L = 0x4C;
- public static final int VK_M = 0x4D;
- public static final int VK_N = 0x4E;
- public static final int VK_O = 0x4F;
- public static final int VK_P = 0x50;
- public static final int VK_Q = 0x51;
- public static final int VK_R = 0x52;
- public static final int VK_S = 0x53;
- public static final int VK_T = 0x54;
- public static final int VK_U = 0x55;
- public static final int VK_V = 0x56;
- public static final int VK_W = 0x57;
- public static final int VK_X = 0x58;
- public static final int VK_Y = 0x59;
- public static final int VK_Z = 0x5A;
-
- /**
- * Constant for the open bracket key, "["
- */
- public static final int VK_OPEN_BRACKET = 0x5B;
-
- /**
- * Constant for the back slash key, "\"
- */
- public static final int VK_BACK_SLASH = 0x5C;
-
- /**
- * Constant for the close bracket key, "]"
- */
- public static final int VK_CLOSE_BRACKET = 0x5D;
-
- public static final int VK_NUMPAD0 = 0x60;
- public static final int VK_NUMPAD1 = 0x61;
- public static final int VK_NUMPAD2 = 0x62;
- public static final int VK_NUMPAD3 = 0x63;
- public static final int VK_NUMPAD4 = 0x64;
- public static final int VK_NUMPAD5 = 0x65;
- public static final int VK_NUMPAD6 = 0x66;
- public static final int VK_NUMPAD7 = 0x67;
- public static final int VK_NUMPAD8 = 0x68;
- public static final int VK_NUMPAD9 = 0x69;
- public static final int VK_MULTIPLY = 0x6A;
- public static final int VK_ADD = 0x6B;
-
- /**
- * This constant is obsolete, and is included only for backwards
- * compatibility.
- * @see #VK_SEPARATOR
- */
- public static final int VK_SEPARATER = 0x6C;
-
- /**
- * Constant for the Numpad Separator key.
- * @since 1.4
- */
- public static final int VK_SEPARATOR = VK_SEPARATER;
-
- public static final int VK_SUBTRACT = 0x6D;
- public static final int VK_DECIMAL = 0x6E;
- public static final int VK_DIVIDE = 0x6F;
- public static final int VK_DELETE = 0x7F; /* ASCII DEL */
- public static final int VK_NUM_LOCK = 0x90;
- public static final int VK_SCROLL_LOCK = 0x91;
-
- /** Constant for the F1 function key. */
- public static final int VK_F1 = 0x70;
-
- /** Constant for the F2 function key. */
- public static final int VK_F2 = 0x71;
-
- /** Constant for the F3 function key. */
- public static final int VK_F3 = 0x72;
-
- /** Constant for the F4 function key. */
- public static final int VK_F4 = 0x73;
-
- /** Constant for the F5 function key. */
- public static final int VK_F5 = 0x74;
-
- /** Constant for the F6 function key. */
- public static final int VK_F6 = 0x75;
-
- /** Constant for the F7 function key. */
- public static final int VK_F7 = 0x76;
-
- /** Constant for the F8 function key. */
- public static final int VK_F8 = 0x77;
-
- /** Constant for the F9 function key. */
- public static final int VK_F9 = 0x78;
-
- /** Constant for the F10 function key. */
- public static final int VK_F10 = 0x79;
-
- /** Constant for the F11 function key. */
- public static final int VK_F11 = 0x7A;
-
- /** Constant for the F12 function key. */
- public static final int VK_F12 = 0x7B;
-
- /**
- * Constant for the F13 function key.
- * @since 1.2
- */
- /* F13 - F24 are used on IBM 3270 keyboard; use random range for constants. */
- public static final int VK_F13 = 0xF000;
-
- /**
- * Constant for the F14 function key.
- * @since 1.2
- */
- public static final int VK_F14 = 0xF001;
-
- /**
- * Constant for the F15 function key.
- * @since 1.2
- */
- public static final int VK_F15 = 0xF002;
-
- /**
- * Constant for the F16 function key.
- * @since 1.2
- */
- public static final int VK_F16 = 0xF003;
-
- /**
- * Constant for the F17 function key.
- * @since 1.2
- */
- public static final int VK_F17 = 0xF004;
-
- /**
- * Constant for the F18 function key.
- * @since 1.2
- */
- public static final int VK_F18 = 0xF005;
-
- /**
- * Constant for the F19 function key.
- * @since 1.2
- */
- public static final int VK_F19 = 0xF006;
-
- /**
- * Constant for the F20 function key.
- * @since 1.2
- */
- public static final int VK_F20 = 0xF007;
-
- /**
- * Constant for the F21 function key.
- * @since 1.2
- */
- public static final int VK_F21 = 0xF008;
-
- /**
- * Constant for the F22 function key.
- * @since 1.2
- */
- public static final int VK_F22 = 0xF009;
-
- /**
- * Constant for the F23 function key.
- * @since 1.2
- */
- public static final int VK_F23 = 0xF00A;
-
- /**
- * Constant for the F24 function key.
- * @since 1.2
- */
- public static final int VK_F24 = 0xF00B;
-
- public static final int VK_PRINTSCREEN = 0x9A;
- public static final int VK_INSERT = 0x9B;
- public static final int VK_HELP = 0x9C;
- public static final int VK_META = 0x9D;
-
- public static final int VK_BACK_QUOTE = 0xC0;
- public static final int VK_QUOTE = 0xDE;
-
- /**
- * Constant for the numeric keypad up arrow key.
- * @see #VK_UP
- * @since 1.2
- */
- public static final int VK_KP_UP = 0xE0;
-
- /**
- * Constant for the numeric keypad down arrow key.
- * @see #VK_DOWN
- * @since 1.2
- */
- public static final int VK_KP_DOWN = 0xE1;
-
- /**
- * Constant for the numeric keypad left arrow key.
- * @see #VK_LEFT
- * @since 1.2
- */
- public static final int VK_KP_LEFT = 0xE2;
-
- /**
- * Constant for the numeric keypad right arrow key.
- * @see #VK_RIGHT
- * @since 1.2
- */
- public static final int VK_KP_RIGHT = 0xE3;
-
- /* For European keyboards */
- /** @since 1.2 */
- public static final int VK_DEAD_GRAVE = 0x80;
- /** @since 1.2 */
- public static final int VK_DEAD_ACUTE = 0x81;
- /** @since 1.2 */
- public static final int VK_DEAD_CIRCUMFLEX = 0x82;
- /** @since 1.2 */
- public static final int VK_DEAD_TILDE = 0x83;
- /** @since 1.2 */
- public static final int VK_DEAD_MACRON = 0x84;
- /** @since 1.2 */
- public static final int VK_DEAD_BREVE = 0x85;
- /** @since 1.2 */
- public static final int VK_DEAD_ABOVEDOT = 0x86;
- /** @since 1.2 */
- public static final int VK_DEAD_DIAERESIS = 0x87;
- /** @since 1.2 */
- public static final int VK_DEAD_ABOVERING = 0x88;
- /** @since 1.2 */
- public static final int VK_DEAD_DOUBLEACUTE = 0x89;
- /** @since 1.2 */
- public static final int VK_DEAD_CARON = 0x8a;
- /** @since 1.2 */
- public static final int VK_DEAD_CEDILLA = 0x8b;
- /** @since 1.2 */
- public static final int VK_DEAD_OGONEK = 0x8c;
- /** @since 1.2 */
- public static final int VK_DEAD_IOTA = 0x8d;
- /** @since 1.2 */
- public static final int VK_DEAD_VOICED_SOUND = 0x8e;
- /** @since 1.2 */
- public static final int VK_DEAD_SEMIVOICED_SOUND = 0x8f;
-
- /** @since 1.2 */
- public static final int VK_AMPERSAND = 0x96;
- /** @since 1.2 */
- public static final int VK_ASTERISK = 0x97;
- /** @since 1.2 */
- public static final int VK_QUOTEDBL = 0x98;
- /** @since 1.2 */
- public static final int VK_LESS = 0x99;
-
- /** @since 1.2 */
- public static final int VK_GREATER = 0xa0;
- /** @since 1.2 */
- public static final int VK_BRACELEFT = 0xa1;
- /** @since 1.2 */
- public static final int VK_BRACERIGHT = 0xa2;
-
- /**
- * Constant for the "@" key.
- * @since 1.2
- */
- public static final int VK_AT = 0x0200;
-
- /**
- * Constant for the ":" key.
- * @since 1.2
- */
- public static final int VK_COLON = 0x0201;
-
- /**
- * Constant for the "^" key.
- * @since 1.2
- */
- public static final int VK_CIRCUMFLEX = 0x0202;
-
- /**
- * Constant for the "$" key.
- * @since 1.2
- */
- public static final int VK_DOLLAR = 0x0203;
-
- /**
- * Constant for the Euro currency sign key.
- * @since 1.2
- */
- public static final int VK_EURO_SIGN = 0x0204;
-
- /**
- * Constant for the "!" key.
- * @since 1.2
- */
- public static final int VK_EXCLAMATION_MARK = 0x0205;
-
- /**
- * Constant for the inverted exclamation mark key.
- * @since 1.2
- */
- public static final int VK_INVERTED_EXCLAMATION_MARK = 0x0206;
-
- /**
- * Constant for the "(" key.
- * @since 1.2
- */
- public static final int VK_LEFT_PARENTHESIS = 0x0207;
-
- /**
- * Constant for the "#" key.
- * @since 1.2
- */
- public static final int VK_NUMBER_SIGN = 0x0208;
-
- /**
- * Constant for the "+" key.
- * @since 1.2
- */
- public static final int VK_PLUS = 0x0209;
-
- /**
- * Constant for the ")" key.
- * @since 1.2
- */
- public static final int VK_RIGHT_PARENTHESIS = 0x020A;
-
- /**
- * Constant for the "_" key.
- * @since 1.2
- */
- public static final int VK_UNDERSCORE = 0x020B;
-
- /**
- * Constant for the Microsoft Windows "Windows" key.
- * It is used for both the left and right version of the key.
- * @see #getKeyLocation()
- * @since 1.5
- */
- public static final int VK_WINDOWS = 0x020C;
-
- /**
- * Constant for the Microsoft Windows Context Menu key.
- * @since 1.5
- */
- public static final int VK_CONTEXT_MENU = 0x020D;
-
- /* for input method support on Asian Keyboards */
-
- /* not clear what this means - listed in Microsoft Windows API */
- public static final int VK_FINAL = 0x0018;
-
- /** Constant for the Convert function key. */
- /* Japanese PC 106 keyboard, Japanese Solaris keyboard: henkan */
- public static final int VK_CONVERT = 0x001C;
-
- /** Constant for the Don't Convert function key. */
- /* Japanese PC 106 keyboard: muhenkan */
- public static final int VK_NONCONVERT = 0x001D;
-
- /** Constant for the Accept or Commit function key. */
- /* Japanese Solaris keyboard: kakutei */
- public static final int VK_ACCEPT = 0x001E;
-
- /* not clear what this means - listed in Microsoft Windows API */
- public static final int VK_MODECHANGE = 0x001F;
-
- /* replaced by VK_KANA_LOCK for Microsoft Windows and Solaris;
- might still be used on other platforms */
- public static final int VK_KANA = 0x0015;
-
- /* replaced by VK_INPUT_METHOD_ON_OFF for Microsoft Windows and Solaris;
- might still be used for other platforms */
- public static final int VK_KANJI = 0x0019;
-
- /**
- * Constant for the Alphanumeric function key.
- * @since 1.2
- */
- /* Japanese PC 106 keyboard: eisuu */
- public static final int VK_ALPHANUMERIC = 0x00F0;
-
- /**
- * Constant for the Katakana function key.
- * @since 1.2
- */
- /* Japanese PC 106 keyboard: katakana */
- public static final int VK_KATAKANA = 0x00F1;
-
- /**
- * Constant for the Hiragana function key.
- * @since 1.2
- */
- /* Japanese PC 106 keyboard: hiragana */
- public static final int VK_HIRAGANA = 0x00F2;
-
- /**
- * Constant for the Full-Width Characters function key.
- * @since 1.2
- */
- /* Japanese PC 106 keyboard: zenkaku */
- public static final int VK_FULL_WIDTH = 0x00F3;
-
- /**
- * Constant for the Half-Width Characters function key.
- * @since 1.2
- */
- /* Japanese PC 106 keyboard: hankaku */
- public static final int VK_HALF_WIDTH = 0x00F4;
-
- /**
- * Constant for the Roman Characters function key.
- * @since 1.2
- */
- /* Japanese PC 106 keyboard: roumaji */
- public static final int VK_ROMAN_CHARACTERS = 0x00F5;
-
- /**
- * Constant for the All Candidates function key.
- * @since 1.2
- */
- /* Japanese PC 106 keyboard - VK_CONVERT + ALT: zenkouho */
- public static final int VK_ALL_CANDIDATES = 0x0100;
-
- /**
- * Constant for the Previous Candidate function key.
- * @since 1.2
- */
- /* Japanese PC 106 keyboard - VK_CONVERT + SHIFT: maekouho */
- public static final int VK_PREVIOUS_CANDIDATE = 0x0101;
-
- /**
- * Constant for the Code Input function key.
- * @since 1.2
- */
- /* Japanese PC 106 keyboard - VK_ALPHANUMERIC + ALT: kanji bangou */
- public static final int VK_CODE_INPUT = 0x0102;
-
- /**
- * Constant for the Japanese-Katakana function key.
- * This key switches to a Japanese input method and selects its Katakana input mode.
- * @since 1.2
- */
- /* Japanese Macintosh keyboard - VK_JAPANESE_HIRAGANA + SHIFT */
- public static final int VK_JAPANESE_KATAKANA = 0x0103;
-
- /**
- * Constant for the Japanese-Hiragana function key.
- * This key switches to a Japanese input method and selects its Hiragana input mode.
- * @since 1.2
- */
- /* Japanese Macintosh keyboard */
- public static final int VK_JAPANESE_HIRAGANA = 0x0104;
-
- /**
- * Constant for the Japanese-Roman function key.
- * This key switches to a Japanese input method and selects its Roman-Direct input mode.
- * @since 1.2
- */
- /* Japanese Macintosh keyboard */
- public static final int VK_JAPANESE_ROMAN = 0x0105;
-
- /**
- * Constant for the locking Kana function key.
- * This key locks the keyboard into a Kana layout.
- * @since 1.3
- */
- /* Japanese PC 106 keyboard with special Windows driver - eisuu + Control; Japanese Solaris keyboard: kana */
- public static final int VK_KANA_LOCK = 0x0106;
-
- /**
- * Constant for the input method on/off key.
- * @since 1.3
- */
- /* Japanese PC 106 keyboard: kanji. Japanese Solaris keyboard: nihongo */
- public static final int VK_INPUT_METHOD_ON_OFF = 0x0107;
-
- /* for Sun keyboards */
- /** @since 1.2 */
- public static final int VK_CUT = 0xFFD1;
- /** @since 1.2 */
- public static final int VK_COPY = 0xFFCD;
- /** @since 1.2 */
- public static final int VK_PASTE = 0xFFCF;
- /** @since 1.2 */
- public static final int VK_UNDO = 0xFFCB;
- /** @since 1.2 */
- public static final int VK_AGAIN = 0xFFC9;
- /** @since 1.2 */
- public static final int VK_FIND = 0xFFD0;
- /** @since 1.2 */
- public static final int VK_PROPS = 0xFFCA;
- /** @since 1.2 */
- public static final int VK_STOP = 0xFFC8;
-
- /**
- * Constant for the Compose function key.
- * @since 1.2
- */
- public static final int VK_COMPOSE = 0xFF20;
-
- /**
- * Constant for the AltGraph function key.
- * @since 1.2
- */
- public static final int VK_ALT_GRAPH = 0xFF7E;
-
- /**
- * Constant for the Begin key.
- * @since 1.5
- */
- public static final int VK_BEGIN = 0xFF58;
-
- /**
- * This value is used to indicate that the keyCode is unknown.
- * KEY_TYPED events do not have a keyCode value; this value
- * is used instead.
- */
- public static final int VK_UNDEFINED = 0x0;
-}
-
diff --git a/src/newt/classes/com/jogamp/javafx/newt/KeyListener.java b/src/newt/classes/com/jogamp/javafx/newt/KeyListener.java
deleted file mode 100644
index 7921a0a97..000000000
--- a/src/newt/classes/com/jogamp/javafx/newt/KeyListener.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.jogamp.javafx.newt;
-
-public interface KeyListener extends EventListener
-{
- public void keyPressed(KeyEvent e);
- public void keyReleased(KeyEvent e);
- public void keyTyped(KeyEvent e) ;
-}
-
diff --git a/src/newt/classes/com/jogamp/javafx/newt/MouseEvent.java b/src/newt/classes/com/jogamp/javafx/newt/MouseEvent.java
deleted file mode 100644
index 82989e216..000000000
--- a/src/newt/classes/com/jogamp/javafx/newt/MouseEvent.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.jogamp.javafx.newt;
-
-public class MouseEvent extends InputEvent
-{
- public static final int BUTTON1 = 1;
- public static final int BUTTON2 = 2;
- public static final int BUTTON3 = 3;
- public static final int BUTTON4 = 4;
- public static final int BUTTON5 = 5;
- public static final int BUTTON6 = 6;
- public static final int BUTTON_NUMBER = 6;
-
- protected MouseEvent(boolean sysEvent, int eventType, Window source, long when,
- int modifiers, int x, int y, int clickCount, int button,
- int rotation)
- {
- super(sysEvent, eventType, source, when, modifiers);
- this.x=x;
- this.y=y;
- this.clickCount=clickCount;
- this.button=button;
- this.wheelRotation = rotation;
- }
- public MouseEvent(int eventType, Window source, long when, int modifiers,
- int x, int y, int clickCount, int button, int rotation) {
- this(false, eventType, source, when, modifiers, x, y, clickCount, button,
- rotation);
- }
-
- public int getButton() {
- return button;
- }
- public int getClickCount() {
- return clickCount;
- }
- public int getX() {
- return x;
- }
- public int getY() {
- return y;
- }
- public int getWheelRotation() {
- return wheelRotation;
- }
-
- public String toString() {
- return "MouseEvent["+getEventTypeString(getEventType())+
- ", "+x+"/"+y+", button "+button+", count "+clickCount+
- ", wheel rotation "+wheelRotation+
- ", "+super.toString()+"]";
- }
-
- public static String getEventTypeString(int type) {
- switch(type) {
- case EVENT_MOUSE_CLICKED: return "EVENT_MOUSE_CLICKED";
- case EVENT_MOUSE_ENTERED: return "EVENT_MOUSE_ENTERED";
- case EVENT_MOUSE_EXITED: return "EVENT_MOUSE_EXITED";
- case EVENT_MOUSE_PRESSED: return "EVENT_MOUSE_PRESSED";
- case EVENT_MOUSE_RELEASED: return "EVENT_MOUSE_RELEASED";
- case EVENT_MOUSE_MOVED: return "EVENT_MOUSE_MOVED";
- case EVENT_MOUSE_DRAGGED: return "EVENT_MOUSE_DRAGGED";
- case EVENT_MOUSE_WHEEL_MOVED: return "EVENT_MOUSE_WHEEL_MOVED";
- default: return "unknown (" + type + ")";
- }
- }
-
- private int x, y, clickCount, button, wheelRotation;
-
- public static final int EVENT_MOUSE_CLICKED = 200;
- public static final int EVENT_MOUSE_ENTERED = 201;
- public static final int EVENT_MOUSE_EXITED = 202;
- public static final int EVENT_MOUSE_PRESSED = 203;
- public static final int EVENT_MOUSE_RELEASED = 204;
- public static final int EVENT_MOUSE_MOVED = 205;
- public static final int EVENT_MOUSE_DRAGGED = 206;
- public static final int EVENT_MOUSE_WHEEL_MOVED = 207;
-}
diff --git a/src/newt/classes/com/jogamp/javafx/newt/MouseListener.java b/src/newt/classes/com/jogamp/javafx/newt/MouseListener.java
deleted file mode 100644
index a0d42f738..000000000
--- a/src/newt/classes/com/jogamp/javafx/newt/MouseListener.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.jogamp.javafx.newt;
-
-public interface MouseListener extends EventListener
-{
- public void mouseClicked(MouseEvent e);
- public void mouseEntered(MouseEvent e);
- public void mouseExited(MouseEvent e);
- public void mousePressed(MouseEvent e);
- public void mouseReleased(MouseEvent e);
- public void mouseMoved(MouseEvent e);
- public void mouseDragged(MouseEvent e);
- public void mouseWheelMoved(MouseEvent e);
-}
-
diff --git a/src/newt/classes/com/jogamp/javafx/newt/NewtFactory.java b/src/newt/classes/com/jogamp/javafx/newt/NewtFactory.java
deleted file mode 100755
index aae51aaf6..000000000
--- a/src/newt/classes/com/jogamp/javafx/newt/NewtFactory.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.jogamp.javafx.newt;
-
-import javax.media.nativewindow.*;
-import java.util.ArrayList;
-import java.util.Iterator;
-import com.jogamp.nativewindow.impl.jvm.JVMUtil;
-
-public abstract class NewtFactory {
- // Work-around for initialization order problems on Mac OS X
- // between native Newt and (apparently) Fmod
- static {
- JVMUtil.initSingleton();
- Window.init(NativeWindowFactory.getNativeWindowType(true));
- }
-
- static Class getCustomClass(String packageName, String classBaseName) {
- Class clazz = null;
- if(packageName!=null || classBaseName!=null) {
- String clazzName = packageName + "." + classBaseName ;
- try {
- clazz = Class.forName(clazzName);
- } catch (Throwable t) {}
- }
- return clazz;
- }
-
- private static boolean useEDT = true;
-
- /**
- * Toggles the usage of an EventDispatchThread while creating a Display.
- * The default is enabled.
- * The EventDispatchThread is thread local to the Display instance.
- */
- public static synchronized void setUseEDT(boolean onoff) {
- useEDT = onoff;
- }
-
- /** @see #setUseEDT(boolean) */
- public static boolean useEDT() { return useEDT; }
-
- /**
- * Create a Display entity, incl native creation
- */
- public static Display createDisplay(String name) {
- return Display.create(NativeWindowFactory.getNativeWindowType(true), name);
- }
-
- /**
- * Create a Display entity using the given implementation type, incl native creation
- */
- public static Display createDisplay(String type, String name) {
- return Display.create(type, name);
- }
-
- /**
- * Create a Screen entity, incl native creation
- */
- public static Screen createScreen(Display display, int index) {
- return Screen.create(NativeWindowFactory.getNativeWindowType(true), display, index);
- }
-
- /**
- * Create a Screen entity using the given implementation type, incl native creation
- */
- public static Screen createScreen(String type, Display display, int index) {
- return Screen.create(type, display, index);
- }
-
- /**
- * Create a Window entity, incl native creation
- */
- public static Window createWindow(Screen screen, Capabilities caps) {
- return Window.create(NativeWindowFactory.getNativeWindowType(true), 0, screen, caps, false);
- }
-
- public static Window createWindow(Screen screen, Capabilities caps, boolean undecorated) {
- return Window.create(NativeWindowFactory.getNativeWindowType(true), 0, screen, caps, undecorated);
- }
-
- public static Window createWindow(long parentWindowHandle, Screen screen, Capabilities caps, boolean undecorated) {
- return Window.create(NativeWindowFactory.getNativeWindowType(true), parentWindowHandle, screen, caps, undecorated);
- }
-
- /**
- * Ability to try a Window type with a construnctor argument, if supported .. AWTWindow(Frame frame)
,
- * to support an external created AWT Frame, ie the browsers embedded frame.
- */
- public static Window createWindow(Object[] cstrArguments, Screen screen, Capabilities caps, boolean undecorated) {
- return Window.create(NativeWindowFactory.getNativeWindowType(true), cstrArguments, screen, caps, undecorated);
- }
-
- /**
- * Create a Window entity using the given implementation type, incl native creation
- */
- public static Window createWindow(String type, Screen screen, Capabilities caps) {
- return Window.create(type, 0, screen, caps, false);
- }
-
- public static Window createWindow(String type, Screen screen, Capabilities caps, boolean undecorated) {
- return Window.create(type, 0, screen, caps, undecorated);
- }
-
- public static Window createWindow(String type, long parentWindowHandle, Screen screen, Capabilities caps, boolean undecorated) {
- return Window.create(type, parentWindowHandle, screen, caps, undecorated);
- }
-
- public static Window createWindow(String type, Object[] cstrArguments, Screen screen, Capabilities caps, boolean undecorated) {
- return Window.create(type, cstrArguments, screen, caps, undecorated);
- }
-
- /**
- * Instantiate a Display entity using the native handle.
- */
- public static Display wrapDisplay(String name, AbstractGraphicsDevice device) {
- return Display.wrapHandle(NativeWindowFactory.getNativeWindowType(true), name, device);
- }
-
- /**
- * Instantiate a Screen entity using the native handle.
- */
- public static Screen wrapScreen(Display display, AbstractGraphicsScreen screen) {
- return Screen.wrapHandle(NativeWindowFactory.getNativeWindowType(true), display, screen);
- }
-
- /**
- * Instantiate a Window entity using the native handle.
- */
- public static Window wrapWindow(Screen screen, AbstractGraphicsConfiguration config,
- long windowHandle, boolean fullscreen, boolean visible,
- int x, int y, int width, int height) {
- return Window.wrapHandle(NativeWindowFactory.getNativeWindowType(true), screen, config,
- windowHandle, fullscreen, visible, x, y, width, height);
- }
-
- private static final boolean instanceOf(Object obj, String clazzName) {
- Class clazz = obj.getClass();
- do {
- if(clazz.getName().equals(clazzName)) {
- return true;
- }
- clazz = clazz.getSuperclass();
- } while (clazz!=null);
- return false;
- }
-
-}
-
diff --git a/src/newt/classes/com/jogamp/javafx/newt/OffscreenWindow.java b/src/newt/classes/com/jogamp/javafx/newt/OffscreenWindow.java
deleted file mode 100644
index 015e9b8d2..000000000
--- a/src/newt/classes/com/jogamp/javafx/newt/OffscreenWindow.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.jogamp.javafx.newt;
-
-import javax.media.nativewindow.*;
-
-public class OffscreenWindow extends Window implements SurfaceChangeable {
-
- long surfaceHandle = 0;
-
- public OffscreenWindow() {
- }
-
- static long nextWindowHandle = 0x100; // start here - a marker
-
- protected void createNative(long parentWindowHandle, Capabilities caps) {
- if(0!=parentWindowHandle) {
- throw new NativeWindowException("OffscreenWindow does not support window parenting");
- }
- if(caps.isOnscreen()) {
- throw new NativeWindowException("Capabilities is onscreen");
- }
- AbstractGraphicsScreen aScreen = screen.getGraphicsScreen();
- config = GraphicsConfigurationFactory.getFactory(aScreen.getDevice()).chooseGraphicsConfiguration(caps, null, aScreen);
- if (config == null) {
- throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
- }
-
- synchronized(OffscreenWindow.class) {
- windowHandle = nextWindowHandle++;
- }
- }
-
- protected void closeNative() {
- // nop
- }
-
- public void invalidate() {
- super.invalidate();
- surfaceHandle = 0;
- }
-
- public synchronized void destroy() {
- surfaceHandle = 0;
- }
-
- public void setSurfaceHandle(long handle) {
- surfaceHandle = handle ;
- }
-
- public long getSurfaceHandle() {
- return surfaceHandle;
- }
-
- public void setVisible(boolean visible) {
- if(!visible) {
- this.visible = visible;
- }
- }
-
- public void setSize(int width, int height) {
- if(!visible) {
- this.width = width;
- this.height = height;
- }
- }
-
- public void setPosition(int x, int y) {
- // nop
- }
-
- public boolean setFullscreen(boolean fullscreen) {
- // nop
- return false;
- }
-}
-
diff --git a/src/newt/classes/com/jogamp/javafx/newt/PaintEvent.java b/src/newt/classes/com/jogamp/javafx/newt/PaintEvent.java
deleted file mode 100755
index 8543246a7..000000000
--- a/src/newt/classes/com/jogamp/javafx/newt/PaintEvent.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.jogamp.javafx.newt;
-
-/**
- *
- * @author tdv
- */
-public class PaintEvent extends Event {
-
- // bounds of the damage region
- private int x, y, width, height;
- public PaintEvent(int eventType, Window source,
- long when, int x, int y, int w, int h)
- {
- super(true, eventType, source, when);
- this.x = x;
- this.y = y;
- this.width = w;
- this.height = h;
- }
-
- public int getHeight() {
- return height;
- }
-
- public int getWidth() {
- return width;
- }
-
- public int getX() {
- return x;
- }
-
- public int getY() {
- return y;
- }
-
- public String toString() {
- return "ExposeEvent[modifiers: x="+x+" y="+y+" w="+width+" h="+height +"]";
- }
-
-}
diff --git a/src/newt/classes/com/jogamp/javafx/newt/PaintListener.java b/src/newt/classes/com/jogamp/javafx/newt/PaintListener.java
deleted file mode 100755
index adfd78f18..000000000
--- a/src/newt/classes/com/jogamp/javafx/newt/PaintListener.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.jogamp.javafx.newt;
-
-/**
- *
- * @author tdv
- */
-public interface PaintListener {
- public void exposed(PaintEvent e);
-}
diff --git a/src/newt/classes/com/jogamp/javafx/newt/Screen.java b/src/newt/classes/com/jogamp/javafx/newt/Screen.java
deleted file mode 100755
index b02a7ef00..000000000
--- a/src/newt/classes/com/jogamp/javafx/newt/Screen.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.jogamp.javafx.newt;
-
-import com.jogamp.javafx.newt.impl.*;
-
-import javax.media.nativewindow.*;
-import java.security.*;
-
-public abstract class Screen {
-
- private static Class getScreenClass(String type)
- throws ClassNotFoundException
- {
- Class screenClass = NewtFactory.getCustomClass(type, "Screen");
- if(null==screenClass) {
- if (NativeWindowFactory.TYPE_EGL.equals(type)) {
- screenClass = Class.forName("com.jogamp.javafx.newt.opengl.kd.KDScreen");
- } else if (NativeWindowFactory.TYPE_WINDOWS.equals(type)) {
- screenClass = Class.forName("com.jogamp.javafx.newt.windows.WindowsScreen");
- } else if (NativeWindowFactory.TYPE_MACOSX.equals(type)) {
- screenClass = Class.forName("com.jogamp.javafx.newt.macosx.MacScreen");
- } else if (NativeWindowFactory.TYPE_X11.equals(type)) {
- screenClass = Class.forName("com.jogamp.javafx.newt.x11.X11Screen");
- } else if (NativeWindowFactory.TYPE_AWT.equals(type)) {
- screenClass = Class.forName("com.jogamp.javafx.newt.awt.AWTScreen");
- } else {
- throw new RuntimeException("Unknown window type \"" + type + "\"");
- }
- }
- return screenClass;
- }
-
- protected static Screen create(String type, Display display, int idx) {
- try {
- if(usrWidth<0 || usrHeight<0) {
- usrWidth = Debug.getIntProperty("newt.ws.swidth", true, localACC);
- usrHeight = Debug.getIntProperty("newt.ws.sheight", true, localACC);
- System.out.println("User screen size "+usrWidth+"x"+usrHeight);
- }
- Class screenClass = getScreenClass(type);
- Screen screen = (Screen) screenClass.newInstance();
- screen.display = display;
- screen.createNative(idx);
- if(null==screen.aScreen) {
- throw new RuntimeException("Screen.createNative() failed to instanciate an AbstractGraphicsScreen");
- }
- return screen;
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-
- public synchronized void destroy() {
- closeNative();
- display = null;
- aScreen = null;
- }
-
- protected static Screen wrapHandle(String type, Display display, AbstractGraphicsScreen aScreen) {
- try {
- Class screenClass = getScreenClass(type);
- Screen screen = (Screen) screenClass.newInstance();
- screen.display = display;
- screen.aScreen = aScreen;
- return screen;
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-
- protected abstract void createNative(int index);
- protected abstract void closeNative();
-
- protected void setScreenSize(int w, int h) {
- System.out.println("Detected screen size "+w+"x"+h);
- width=w; height=h;
- }
-
- public Display getDisplay() {
- return display;
- }
-
- public int getIndex() {
- return aScreen.getIndex();
- }
-
- public AbstractGraphicsScreen getGraphicsScreen() {
- return aScreen;
- }
-
- /**
- * The actual implementation shall return the detected display value,
- * if not we return 800.
- * This can be overwritten with the user property 'newt.ws.swidth',
- */
- public int getWidth() {
- return (usrWidth>0) ? usrWidth : (width>0) ? width : 480;
- }
-
- /**
- * The actual implementation shall return the detected display value,
- * if not we return 480.
- * This can be overwritten with the user property 'newt.ws.sheight',
- */
- public int getHeight() {
- return (usrHeight>0) ? usrHeight : (height>0) ? height : 480;
- }
-
- protected Display display;
- protected AbstractGraphicsScreen aScreen;
- protected int width=-1, height=-1; // detected values: set using setScreenSize
- protected static int usrWidth=-1, usrHeight=-1; // property values: newt.ws.swidth and newt.ws.sheight
- private static AccessControlContext localACC = AccessController.getContext();
-}
-
diff --git a/src/newt/classes/com/jogamp/javafx/newt/Window.java b/src/newt/classes/com/jogamp/javafx/newt/Window.java
deleted file mode 100755
index 2d9341e13..000000000
--- a/src/newt/classes/com/jogamp/javafx/newt/Window.java
+++ /dev/null
@@ -1,929 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.jogamp.javafx.newt;
-
-import com.jogamp.javafx.newt.impl.Debug;
-import com.jogamp.javafx.newt.util.EventDispatchThread;
-
-import javax.media.nativewindow.*;
-import com.jogamp.nativewindow.impl.NWReflection;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.lang.reflect.Method;
-
-public abstract class Window implements NativeWindow
-{
- public static final boolean DEBUG_MOUSE_EVENT = Debug.debug("Window.MouseEvent");
- public static final boolean DEBUG_KEY_EVENT = Debug.debug("Window.KeyEvent");
- public static final boolean DEBUG_WINDOW_EVENT = Debug.debug("Window.WindowEvent");
- public static final boolean DEBUG_IMPLEMENTATION = Debug.debug("Window");
-
- // Workaround for initialization order problems on Mac OS X
- // between native Newt and (apparently) Fmod -- if Fmod is
- // initialized first then the connection to the window server
- // breaks, leading to errors from deep within the AppKit
- static void init(String type) {
- if (NativeWindowFactory.TYPE_MACOSX.equals(type)) {
- try {
- getWindowClass(type);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
-
- private static Class getWindowClass(String type)
- throws ClassNotFoundException
- {
- Class windowClass = NewtFactory.getCustomClass(type, "Window");
- if(null==windowClass) {
- if (NativeWindowFactory.TYPE_EGL.equals(type)) {
- windowClass = Class.forName("com.jogamp.javafx.newt.opengl.kd.KDWindow");
- } else if (NativeWindowFactory.TYPE_WINDOWS.equals(type)) {
- windowClass = Class.forName("com.jogamp.javafx.newt.windows.WindowsWindow");
- } else if (NativeWindowFactory.TYPE_MACOSX.equals(type)) {
- windowClass = Class.forName("com.jogamp.javafx.newt.macosx.MacWindow");
- } else if (NativeWindowFactory.TYPE_X11.equals(type)) {
- windowClass = Class.forName("com.jogamp.javafx.newt.x11.X11Window");
- } else if (NativeWindowFactory.TYPE_AWT.equals(type)) {
- windowClass = Class.forName("com.jogamp.javafx.newt.awt.AWTWindow");
- } else {
- throw new NativeWindowException("Unknown window type \"" + type + "\"");
- }
- }
- return windowClass;
- }
-
- protected static Window create(String type, final long parentWindowHandle, Screen screen, final Capabilities caps, boolean undecorated) {
- try {
- Class windowClass;
- if(caps.isOnscreen()) {
- windowClass = getWindowClass(type);
- } else {
- windowClass = OffscreenWindow.class;
- }
- Window window = (Window) windowClass.newInstance();
- window.invalidate();
- window.screen = screen;
- window.setUndecorated(undecorated||0!=parentWindowHandle);
- EventDispatchThread edt = screen.getDisplay().getEDT();
- if(null!=edt) {
- final Window f_win = window;
- edt.invokeAndWait(new Runnable() {
- public void run() {
- f_win.createNative(parentWindowHandle, caps);
- }
- } );
- } else {
- window.createNative(parentWindowHandle, caps);
- }
- return window;
- } catch (Throwable t) {
- t.printStackTrace();
- throw new NativeWindowException(t);
- }
- }
-
- protected static Window create(String type, Object[] cstrArguments, Screen screen, final Capabilities caps, boolean undecorated) {
- try {
- Class windowClass = getWindowClass(type);
- Class[] cstrArgumentTypes = getCustomConstructorArgumentTypes(windowClass);
- if(null==cstrArgumentTypes) {
- throw new NativeWindowException("WindowClass "+windowClass+" doesn't support custom arguments in constructor");
- }
- int argsChecked = verifyConstructorArgumentTypes(cstrArgumentTypes, cstrArguments);
- if ( argsChecked < cstrArguments.length ) {
- throw new NativeWindowException("WindowClass "+windowClass+" constructor mismatch at argument #"+argsChecked+"; Constructor: "+getTypeStrList(cstrArgumentTypes)+", arguments: "+getArgsStrList(cstrArguments));
- }
- Window window = (Window) NWReflection.createInstance( windowClass, cstrArgumentTypes, cstrArguments ) ;
- window.invalidate();
- window.screen = screen;
- window.setUndecorated(undecorated);
- EventDispatchThread edt = screen.getDisplay().getEDT();
- if(null!=edt) {
- final Window f_win = window;
- edt.invokeAndWait(new Runnable() {
- public void run() {
- f_win.createNative(0, caps);
- }
- } );
- } else {
- window.createNative(0, caps);
- }
- return window;
- } catch (Throwable t) {
- t.printStackTrace();
- throw new NativeWindowException(t);
- }
- }
-
- protected static Window wrapHandle(String type, Screen screen, AbstractGraphicsConfiguration config,
- long windowHandle, boolean fullscreen, boolean visible,
- int x, int y, int width, int height)
- {
- try {
- Class windowClass = getWindowClass(type);
- Window window = (Window) windowClass.newInstance();
- window.invalidate();
- window.screen = screen;
- window.config = config;
- window.windowHandle = windowHandle;
- window.fullscreen=fullscreen;
- window.visible=visible;
- window.x=x;
- window.y=y;
- window.width=width;
- window.height=height;
- return window;
- } catch (Throwable t) {
- t.printStackTrace();
- throw new NativeWindowException(t);
- }
- }
-
- public static String toHexString(int hex) {
- return "0x" + Integer.toHexString(hex);
- }
-
- public static String toHexString(long hex) {
- return "0x" + Long.toHexString(hex);
- }
-
- protected Screen screen;
-
- protected AbstractGraphicsConfiguration config;
- protected long windowHandle;
- protected boolean fullscreen, visible;
- protected int width, height, x, y;
- protected int eventMask;
-
- protected String title = "Newt Window";
- protected boolean undecorated = false;
-
- /**
- * Create native windowHandle, ie creates a new native invisible window.
- *
- * The parentWindowHandle may be null, in which case no window parenting
- * is requested.
- *
- * Shall use the capabilities to determine the graphics configuration
- * and shall set the chosen capabilities.
- */
- protected abstract void createNative(long parentWindowHandle, Capabilities caps);
-
- protected abstract void closeNative();
-
- public Screen getScreen() {
- return screen;
- }
-
- public String toString() {
- StringBuffer sb = new StringBuffer();
-
- sb.append(getClass().getName()+"[config "+config+
- ", windowHandle "+toHexString(getWindowHandle())+
- ", surfaceHandle "+toHexString(getSurfaceHandle())+
- ", pos "+getX()+"/"+getY()+", size "+getWidth()+"x"+getHeight()+
- ", visible "+isVisible()+
- ", undecorated "+undecorated+
- ", fullscreen "+fullscreen+
- ", "+screen+
- ", wrappedWindow "+getWrappedWindow());
-
- sb.append(", SurfaceUpdatedListeners num "+surfaceUpdatedListeners.size()+" [");
- for (Iterator iter = surfaceUpdatedListeners.iterator(); iter.hasNext(); ) {
- sb.append(iter.next()+", ");
- }
- sb.append("], WindowListeners num "+windowListeners.size()+" [");
- for (Iterator iter = windowListeners.iterator(); iter.hasNext(); ) {
- sb.append(iter.next()+", ");
- }
- sb.append("], MouseListeners num "+mouseListeners.size()+" [");
- for (Iterator iter = mouseListeners.iterator(); iter.hasNext(); ) {
- sb.append(iter.next()+", ");
- }
- sb.append("], KeyListeners num "+keyListeners.size()+" [");
- for (Iterator iter = keyListeners.iterator(); iter.hasNext(); ) {
- sb.append(iter.next()+", ");
- }
- sb.append("] ]");
- return sb.toString();
- }
-
- public String getTitle() {
- return title;
- }
-
- public void setTitle(String title) {
- this.title = title;
- }
-
- public void setUndecorated(boolean value) {
- undecorated = value;
- }
-
- public boolean isUndecorated() {
- return undecorated;
- }
-
- public void requestFocus() {
- }
-
- //
- // NativeWindow impl
- //
- private Thread owner;
- private int recursionCount;
- protected Exception lockedStack = null;
-
- /** Recursive and blocking lockSurface() implementation */
- public synchronized int lockSurface() {
- // We leave the ToolkitLock lock to the specializtion's discretion,
- // ie the implicit JAWTWindow in case of AWTWindow
- Thread cur = Thread.currentThread();
- if (owner == cur) {
- ++recursionCount;
- return LOCK_SUCCESS;
- }
- while (owner != null) {
- try {
- wait();
- } catch (InterruptedException e) {
- throw new RuntimeException(e);
- }
- }
- owner = cur;
- lockedStack = new Exception("NEWT Surface previously locked by "+Thread.currentThread());
- screen.getDisplay().lockDisplay();
- return LOCK_SUCCESS;
- }
-
- /** Recursive and unblocking unlockSurface() implementation */
- public synchronized void unlockSurface() throws NativeWindowException {
- Thread cur = Thread.currentThread();
- if (owner != cur) {
- lockedStack.printStackTrace();
- throw new NativeWindowException(cur+": Not owner, owner is "+owner);
- }
- if (recursionCount > 0) {
- --recursionCount;
- return;
- }
- owner = null;
- lockedStack = null;
- screen.getDisplay().unlockDisplay();
- notifyAll();
- // We leave the ToolkitLock unlock to the specializtion's discretion,
- // ie the implicit JAWTWindow in case of AWTWindow
- }
-
- public synchronized boolean isSurfaceLocked() {
- return null!=owner;
- }
-
- public synchronized Thread getSurfaceLockOwner() {
- return owner;
- }
-
- public synchronized Exception getLockedStack() {
- return lockedStack;
- }
-
- public synchronized void destroy() {
- destroy(false);
- }
-
- /** @param deep If true, the linked Screen and Display will be destroyed as well. */
- public synchronized void destroy(boolean deep) {
- if(DEBUG_WINDOW_EVENT) {
- System.out.println("Window.destroy() start (deep "+deep+" - "+Thread.currentThread());
- }
- synchronized(surfaceUpdatedListeners) {
- surfaceUpdatedListeners = new ArrayList();
- }
- synchronized(windowListeners) {
- windowListeners = new ArrayList();
- }
- synchronized(mouseListeners) {
- mouseListeners = new ArrayList();
- }
- synchronized(keyListeners) {
- keyListeners = new ArrayList();
- }
- Screen scr = screen;
- Display dpy = (null!=screen) ? screen.getDisplay() : null;
- EventDispatchThread edt = (null!=dpy) ? dpy.getEDT() : null;
- if(null!=edt) {
- final Window f_win = this;
- edt.invokeAndWait(new Runnable() {
- public void run() {
- f_win.closeNative();
- }
- } );
- } else {
- closeNative();
- }
- invalidate();
- if(deep) {
- if(null!=scr) {
- scr.destroy();
- }
- if(null!=dpy) {
- dpy.destroy();
- }
- }
- if(DEBUG_WINDOW_EVENT) {
- System.out.println("Window.destroy() end "+Thread.currentThread());
- }
- }
-
- public void invalidate() {
- if(DEBUG_IMPLEMENTATION || DEBUG_WINDOW_EVENT) {
- Exception e = new Exception("!!! Window Invalidate "+Thread.currentThread());
- e.printStackTrace();
- }
- screen = null;
- windowHandle = 0;
- fullscreen=false;
- visible=false;
- eventMask = 0;
-
- // Default position and dimension will be re-set immediately by user
- width = 100;
- height = 100;
- x=0;
- y=0;
- }
-
- public boolean surfaceSwap() {
- return false;
- }
-
- protected void clearEventMask() {
- eventMask=0;
- }
-
- public long getDisplayHandle() {
- return screen.getDisplay().getHandle();
- }
-
- public int getScreenIndex() {
- return screen.getIndex();
- }
-
- public long getWindowHandle() {
- return windowHandle;
- }
-
- public long getSurfaceHandle() {
- return windowHandle; // default: return window handle
- }
-
- public AbstractGraphicsConfiguration getGraphicsConfiguration() {
- return config;
- }
-
- /**
- * Returns the width of the client area of this window
- * @return width of the client area
- */
- public int getWidth() {
- return width;
- }
-
- /**
- * Returns the height of the client area of this window
- * @return height of the client area
- */
- public int getHeight() {
- return height;
- }
-
- /**
- * Returns the insets for this native window (the difference between the
- * size of the toplevel window with the decorations and the client area).
- *
- * @return insets for this platform window
- */
- // this probably belongs to NativeWindow interface
- public Insets getInsets() {
- return new Insets(0,0,0,0);
- }
-
- /** If this Window actually wraps one from another toolkit such as
- the AWT, this will return a non-null value. */
- public Object getWrappedWindow() {
- return null;
- }
-
- //
- // Additional methods
- //
-
- public int getX() {
- return x;
- }
-
- public int getY() {
- return y;
- }
-
- public boolean isVisible() {
- return visible;
- }
-
- public boolean isFullscreen() {
- return fullscreen;
- }
-
- private boolean autoDrawableMember = false;
-
- /** If the implementation is capable of detecting a device change
- return true and clear the status/reason of the change. */
- public boolean hasDeviceChanged() {
- return false;
- }
-
- /**
- * If set to true,
- * certain action will be performed by the owning
- * AutoDrawable, ie the destroy() call within windowDestroyNotify()
- */
- public void setAutoDrawableClient(boolean b) {
- autoDrawableMember = b;
- }
-
- protected void windowDestroyNotify() {
- if(DEBUG_WINDOW_EVENT) {
- System.out.println("Window.windowDestroyeNotify start "+Thread.currentThread());
- }
-
- sendWindowEvent(WindowEvent.EVENT_WINDOW_DESTROY_NOTIFY);
-
- if(!autoDrawableMember) {
- destroy();
- }
-
- if(DEBUG_WINDOW_EVENT) {
- System.out.println("Window.windowDestroyeNotify end "+Thread.currentThread());
- }
- }
-
- protected void windowDestroyed() {
- if(DEBUG_WINDOW_EVENT) {
- System.out.println("Window.windowDestroyed "+Thread.currentThread());
- }
- invalidate();
- }
-
- public abstract void setVisible(boolean visible);
- /**
- * Sets the size of the client area of the window, excluding decorations
- * Total size of the window will be
- * {@code width+insets.left+insets.right, height+insets.top+insets.bottom}
- * @param width of the client area of the window
- * @param height of the client area of the window
- */
- public abstract void setSize(int width, int height);
- /**
- * Sets the location of the top left corner of the window, including
- * decorations (so the client area will be placed at
- * {@code x+insets.left,y+insets.top}.
- * @param x coord of the top left corner
- * @param y coord of the top left corner
- */
- public abstract void setPosition(int x, int y);
- public abstract boolean setFullscreen(boolean fullscreen);
-
- //
- // SurfaceUpdatedListener Support
- //
- private ArrayList surfaceUpdatedListeners = new ArrayList();
-
- public void addSurfaceUpdatedListener(SurfaceUpdatedListener l) {
- if(l == null) {
- return;
- }
- synchronized(surfaceUpdatedListeners) {
- ArrayList newSurfaceUpdatedListeners = (ArrayList) surfaceUpdatedListeners.clone();
- newSurfaceUpdatedListeners.add(l);
- surfaceUpdatedListeners = newSurfaceUpdatedListeners;
- }
- }
-
- public void removeSurfaceUpdatedListener(SurfaceUpdatedListener l) {
- if (l == null) {
- return;
- }
- synchronized(surfaceUpdatedListeners) {
- ArrayList newSurfaceUpdatedListeners = (ArrayList) surfaceUpdatedListeners.clone();
- newSurfaceUpdatedListeners.remove(l);
- surfaceUpdatedListeners = newSurfaceUpdatedListeners;
- }
- }
-
- public SurfaceUpdatedListener[] getSurfaceUpdatedListener() {
- synchronized(surfaceUpdatedListeners) {
- return (SurfaceUpdatedListener[]) surfaceUpdatedListeners.toArray();
- }
- }
-
- public void surfaceUpdated(Object updater, NativeWindow window, long when) {
- ArrayList listeners = null;
- synchronized(surfaceUpdatedListeners) {
- listeners = surfaceUpdatedListeners;
- }
- for(Iterator i = listeners.iterator(); i.hasNext(); ) {
- SurfaceUpdatedListener l = (SurfaceUpdatedListener) i.next();
- l.surfaceUpdated(updater, window, when);
- }
- }
-
- //
- // MouseListener Support
- //
-
- public void addMouseListener(MouseListener l) {
- if(l == null) {
- return;
- }
- synchronized(mouseListeners) {
- ArrayList newMouseListeners = (ArrayList) mouseListeners.clone();
- newMouseListeners.add(l);
- mouseListeners = newMouseListeners;
- }
- }
-
- public void removeMouseListener(MouseListener l) {
- if (l == null) {
- return;
- }
- synchronized(mouseListeners) {
- ArrayList newMouseListeners = (ArrayList) mouseListeners.clone();
- newMouseListeners.remove(l);
- mouseListeners = newMouseListeners;
- }
- }
-
- public MouseListener[] getMouseListeners() {
- synchronized(mouseListeners) {
- return (MouseListener[]) mouseListeners.toArray();
- }
- }
-
- private ArrayList mouseListeners = new ArrayList();
- private int mouseButtonPressed = 0; // current pressed mouse button number
- private long lastMousePressed = 0; // last time when a mouse button was pressed
- private int lastMouseClickCount = 0; // last mouse button click count
- public static final int ClickTimeout = 300;
-
- protected void sendMouseEvent(int eventType, int modifiers,
- int x, int y, int button, int rotation) {
- if(x<0||y<0||x>=width||y>=height) {
- return; // .. invalid ..
- }
- if(DEBUG_MOUSE_EVENT) {
- System.out.println("sendMouseEvent: "+MouseEvent.getEventTypeString(eventType)+
- ", mod "+modifiers+", pos "+x+"/"+y+", button "+button);
- }
- if(button<0||button>MouseEvent.BUTTON_NUMBER) {
- throw new NativeWindowException("Invalid mouse button number" + button);
- }
- long when = System.currentTimeMillis();
- MouseEvent eClicked = null;
- MouseEvent e = null;
-
- if(MouseEvent.EVENT_MOUSE_PRESSED==eventType) {
- if(when-lastMousePressed
- * before calling the various input EventListener callbacks (MouseListener, KeyListener,
- * etc.).
- * This design decision is made to favor a more performant and simplified
- * implementation, as well as the event dispatcher shall be allowed
- * not having a notion about OpenGL.
- *
- * Enable or disables running the {@link Display#pumpMessages} in the {@link #display()} call.
- * The default behavior is to run {@link Display#pumpMessages}.
- * This could not have been verified. No measurable difference could have been recognized.
- *
- * Enabling local pump messages while using the EDT,
- * {@link com.jogamp.javafx.newt.NewtFactory#setUseEDT(boolean)},
- * will result in an exception.
- *
- * @deprecated EXPERIMENTAL, semantic is about to be removed after further verification.
- */
- public void setRunPumpMessages(boolean onoff) {
- if( onoff && null!=getScreen().getDisplay().getEDT() ) {
- throw new GLException("GLWindow.setRunPumpMessages(true) - Can't do with EDT on");
- }
- runPumpMessages = onoff;
- }
-
- protected void createNative(long parentWindowHandle, Capabilities caps) {
- shouldNotCallThis();
- }
-
- protected void closeNative() {
- shouldNotCallThis();
- }
-
- protected void dispose(boolean regenerate, boolean sendEvent) {
- if(Window.DEBUG_WINDOW_EVENT || window.DEBUG_IMPLEMENTATION) {
- Exception e1 = new Exception("GLWindow.dispose("+regenerate+") "+Thread.currentThread()+", 1");
- e1.printStackTrace();
- }
-
- if(sendEvent) {
- sendDisposeEvent();
- }
-
- if (context != null) {
- context.destroy();
- }
- if (drawable != null) {
- drawable.setRealized(false);
- }
-
- if(regenerate) {
- if(null==window) {
- throw new GLException("GLWindow.dispose(true): null window");
- }
-
- // recreate GLDrawable, to reflect the new graphics configurations
- NativeWindow nw;
- if (window.getWrappedWindow() != null) {
- nw = NativeWindowFactory.getNativeWindow(window.getWrappedWindow(), window.getGraphicsConfiguration());
- } else {
- nw = window;
- }
- drawable = factory.createGLDrawable(nw);
- drawable.setRealized(true);
- context = drawable.createContext(null);
- sendReshape = true; // ensure a reshape event is send ..
- }
-
- if(Window.DEBUG_WINDOW_EVENT || window.DEBUG_IMPLEMENTATION) {
- System.out.println("GLWindow.dispose("+regenerate+") "+Thread.currentThread()+", fin: "+this);
- }
- }
-
- public synchronized void destroy() {
- destroy(true);
- }
-
- /** @param sendDisposeEvent should be false in a [time,reliable] critical shutdown */
- public synchronized void destroy(boolean sendDisposeEvent) {
- if(Window.DEBUG_WINDOW_EVENT || window.DEBUG_IMPLEMENTATION) {
- Exception e1 = new Exception("GLWindow.destroy "+Thread.currentThread()+", 1: "+this);
- e1.printStackTrace();
- }
-
- List newglw = (List) ((ArrayList) glwindows).clone();
- newglw.remove(this);
- glwindows=newglw;
-
- dispose(false, sendDisposeEvent);
-
- if(null!=window) {
- if(ownerOfWinScrDpy) {
- window.destroy(true);
- }
- }
-
- drawable = null;
- context = null;
- window = null;
-
- if(Window.DEBUG_WINDOW_EVENT || window.DEBUG_IMPLEMENTATION) {
- System.out.println("GLWindow.destroy "+Thread.currentThread()+", fin: "+this);
- }
- }
-
- public boolean getPerfLogEnabled() { return perfLog; }
-
- public void enablePerfLog(boolean v) {
- perfLog = v;
- }
-
- public void setVisible(boolean visible) {
- if(Window.DEBUG_WINDOW_EVENT || window.DEBUG_IMPLEMENTATION) {
- System.out.println(Thread.currentThread()+" GLWindow.setVisible("+visible+") START ; isVisible "+this.visible+" ; has context "+(null!=context));
- }
- this.visible=visible;
- window.setVisible(visible);
- if (visible && context == null) {
- NativeWindow nw;
- if (window.getWrappedWindow() != null) {
- nw = NativeWindowFactory.getNativeWindow(window.getWrappedWindow(), window.getGraphicsConfiguration());
- } else {
- nw = window;
- }
- GLCapabilities glCaps = (GLCapabilities) nw.getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities();
- factory = GLDrawableFactory.getFactory(glCaps.getGLProfile());
- drawable = factory.createGLDrawable(nw);
- drawable.setRealized(true);
- context = drawable.createContext(null);
- sendReshape = true; // ensure a reshape event is send ..
- }
- if(Window.DEBUG_WINDOW_EVENT || window.DEBUG_IMPLEMENTATION) {
- System.out.println(Thread.currentThread()+" GLWindow.setVisible("+visible+") END ; has context "+(null!=context));
- }
- }
-
- public Screen getScreen() {
- return window.getScreen();
- }
-
- public void setTitle(String title) {
- window.setTitle(title);
- }
-
- public String getTitle() {
- return window.getTitle();
- }
-
- public void setUndecorated(boolean value) {
- window.setUndecorated(value);
- }
-
- public boolean isUndecorated() {
- return window.isUndecorated();
- }
-
- public void setSize(int width, int height) {
- window.setSize(width, height);
- }
-
- public void setPosition(int x, int y) {
- window.setPosition(x, y);
- }
-
- public Insets getInsets() {
- return window.getInsets();
- }
-
- public boolean setFullscreen(boolean fullscreen) {
- return window.setFullscreen(fullscreen);
- }
-
- public boolean isVisible() {
- return window.isVisible();
- }
-
- public int getX() {
- return window.getX();
- }
-
- public int getY() {
- return window.getY();
- }
-
- public int getWidth() {
- return window.getWidth();
- }
-
- public int getHeight() {
- return window.getHeight();
- }
-
- public boolean isFullscreen() {
- return window.isFullscreen();
- }
-
- public void addSurfaceUpdatedListener(SurfaceUpdatedListener l) {
- window.addSurfaceUpdatedListener(l);
- }
- public void removeSurfaceUpdatedListener(SurfaceUpdatedListener l) {
- window.removeSurfaceUpdatedListener(l);
- }
- public SurfaceUpdatedListener[] getSurfaceUpdatedListener() {
- return window.getSurfaceUpdatedListener();
- }
- public void surfaceUpdated(Object updater, NativeWindow window0, long when) {
- window.surfaceUpdated(updater, window, when);
- }
-
- public void addMouseListener(MouseListener l) {
- window.addMouseListener(l);
- }
-
- public void removeMouseListener(MouseListener l) {
- window.removeMouseListener(l);
- }
-
- public MouseListener[] getMouseListeners() {
- return window.getMouseListeners();
- }
-
- public void addKeyListener(KeyListener l) {
- window.addKeyListener(l);
- }
-
- public void removeKeyListener(KeyListener l) {
- window.removeKeyListener(l);
- }
-
- public KeyListener[] getKeyListeners() {
- return window.getKeyListeners();
- }
-
- public void addWindowListener(WindowListener l) {
- window.addWindowListener(l);
- }
-
- public void removeWindowListener(WindowListener l) {
- window.removeWindowListener(l);
- }
-
- public WindowListener[] getWindowListeners() {
- return window.getWindowListeners();
- }
-
- public String toString() {
- return "NEWT-GLWindow[ \n\tDrawable: "+drawable+", \n\tWindow: "+window+", \n\tHelper: "+helper+", \n\tFactory: "+factory+"]";
- }
-
- //----------------------------------------------------------------------
- // OpenGL-related methods and state
- //
-
- private GLDrawableFactory factory;
- private GLDrawable drawable;
- private GLContext context;
- private GLDrawableHelper helper = new GLDrawableHelper();
- // To make reshape events be sent immediately before a display event
- private boolean sendReshape=false;
- private boolean sendDestroy=false;
- private boolean perfLog = false;
-
- public GLDrawableFactory getFactory() {
- return factory;
- }
-
- public void setContext(GLContext newCtx) {
- context = newCtx;
- }
-
- public GLContext getContext() {
- return context;
- }
-
- public GL getGL() {
- if (context == null) {
- return null;
- }
- return context.getGL();
- }
-
- public GL setGL(GL gl) {
- if (context != null) {
- context.setGL(gl);
- return gl;
- }
- return null;
- }
-
- public void addGLEventListener(GLEventListener listener) {
- helper.addGLEventListener(listener);
- }
-
- public void removeGLEventListener(GLEventListener listener) {
- helper.removeGLEventListener(listener);
- }
-
- public void display() {
- display(false);
- }
-
- public void display(boolean forceReshape) {
- if(window!=null && drawable!=null && context != null) {
- if(runPumpMessages) {
- window.getScreen().getDisplay().pumpMessages();
- }
- if(window.hasDeviceChanged() && GLAutoDrawable.SCREEN_CHANGE_ACTION_ENABLED) {
- dispose(true, true);
- }
- if (sendDestroy) {
- destroy();
- sendDestroy=false;
- } else {
- if(forceReshape) {
- sendReshape = true;
- }
- helper.invokeGL(drawable, context, displayAction, initAction);
- }
- }
- }
-
- private void sendDisposeEvent() {
- if(drawable!=null && context != null) {
- helper.invokeGL(drawable, context, disposeAction, null);
- }
- }
-
- /** This implementation uses a static value */
- public void setAutoSwapBufferMode(boolean onOrOff) {
- helper.setAutoSwapBufferMode(onOrOff);
- }
-
- /** This implementation uses a static value */
- public boolean getAutoSwapBufferMode() {
- return helper.getAutoSwapBufferMode();
- }
-
- public void swapBuffers() {
- if(drawable!=null && context != null) {
- if (context != GLContext.getCurrent()) {
- // Assume we should try to make the context current before swapping the buffers
- helper.invokeGL(drawable, context, swapBuffersAction, initAction);
- } else {
- drawable.swapBuffers();
- }
- }
- }
-
- class InitAction implements Runnable {
- public void run() {
- helper.init(GLWindow.this);
- startTime = System.currentTimeMillis();
- curTime = startTime;
- if(perfLog) {
- lastCheck = startTime;
- totalFrames = 0; lastFrames = 0;
- }
- }
- }
- private InitAction initAction = new InitAction();
-
- class DisposeAction implements Runnable {
- public void run() {
- helper.dispose(GLWindow.this);
- }
- }
- private DisposeAction disposeAction = new DisposeAction();
-
- class DisplayAction implements Runnable {
- public void run() {
- if (sendReshape) {
- int width = getWidth();
- int height = getHeight();
- getGL().glViewport(0, 0, width, height);
- helper.reshape(GLWindow.this, 0, 0, width, height);
- sendReshape = false;
- }
-
- helper.display(GLWindow.this);
-
- curTime = System.currentTimeMillis();
- totalFrames++;
-
- if(perfLog) {
- long dt0, dt1;
- lastFrames++;
- dt0 = curTime-lastCheck;
- if ( dt0 > 5000 ) {
- dt1 = curTime-startTime;
- System.out.println(dt0/1000 +"s: "+ lastFrames + "f, " + (lastFrames*1000)/dt0 + " fps, "+dt0/lastFrames+" ms/f; "+
- "total: "+ dt1/1000+"s, "+(totalFrames*1000)/dt1 + " fps, "+dt1/totalFrames+" ms/f");
- lastCheck=curTime;
- lastFrames=0;
- }
- }
- }
- }
- private DisplayAction displayAction = new DisplayAction();
-
- public long getStartTime() { return startTime; }
- public long getCurrentTime() { return curTime; }
- public long getDuration() { return curTime-startTime; }
- public int getTotalFrames() { return totalFrames; }
-
- private long startTime = 0;
- private long curTime = 0;
- private long lastCheck = 0;
- private int totalFrames = 0, lastFrames = 0;
-
- class SwapBuffersAction implements Runnable {
- public void run() {
- drawable.swapBuffers();
- }
- }
- private SwapBuffersAction swapBuffersAction = new SwapBuffersAction();
-
- //----------------------------------------------------------------------
- // GLDrawable methods
- //
-
- public NativeWindow getNativeWindow() {
- return null!=drawable ? drawable.getNativeWindow() : null;
- }
-
- public synchronized int lockSurface() throws NativeWindowException {
- if(null!=drawable) return drawable.getNativeWindow().lockSurface();
- return NativeWindow.LOCK_SURFACE_NOT_READY;
- }
-
- public synchronized void unlockSurface() {
- if(null!=drawable) drawable.getNativeWindow().unlockSurface();
- else throw new NativeWindowException("NEWT-GLWindow not locked");
- }
-
- public synchronized boolean isSurfaceLocked() {
- if(null!=drawable) return drawable.getNativeWindow().isSurfaceLocked();
- return false;
- }
-
- public synchronized Exception getLockedStack() {
- if(null!=drawable) return drawable.getNativeWindow().getLockedStack();
- return null;
- }
-
- public boolean surfaceSwap() {
- if(null!=drawable) return drawable.getNativeWindow().surfaceSwap();
- return super.surfaceSwap();
- }
-
- public long getWindowHandle() {
- if(null!=drawable) return drawable.getNativeWindow().getWindowHandle();
- return super.getWindowHandle();
- }
-
- public long getSurfaceHandle() {
- if(null!=drawable) return drawable.getNativeWindow().getSurfaceHandle();
- return super.getSurfaceHandle();
- }
-
- //----------------------------------------------------------------------
- // GLDrawable methods that are not really needed
- //
-
- public GLContext createContext(GLContext shareWith) {
- return drawable.createContext(shareWith);
- }
-
- public void setRealized(boolean realized) {
- }
-
- public GLCapabilities getChosenGLCapabilities() {
- if (drawable == null) {
- throw new GLException("No drawable yet");
- }
-
- return drawable.getChosenGLCapabilities();
- }
-
- public GLProfile getGLProfile() {
- if (drawable == null) {
- throw new GLException("No drawable yet");
- }
-
- return drawable.getGLProfile();
- }
-
- //----------------------------------------------------------------------
- // Internals only below this point
- //
-
- private void shouldNotCallThis() {
- throw new NativeWindowException("Should not call this");
- }
-}
diff --git a/src/newt/classes/com/jogamp/javafx/newt/opengl/broadcom/egl/Display.java b/src/newt/classes/com/jogamp/javafx/newt/opengl/broadcom/egl/Display.java
deleted file mode 100644
index c0c1ee5fd..000000000
--- a/src/newt/classes/com/jogamp/javafx/newt/opengl/broadcom/egl/Display.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.jogamp.javafx.newt.opengl.broadcom.egl;
-
-import com.jogamp.javafx.newt.impl.*;
-import com.jogamp.opengl.impl.egl.*;
-import javax.media.nativewindow.*;
-import javax.media.nativewindow.egl.*;
-
-public class Display extends com.jogamp.javafx.newt.Display {
-
- static {
- NativeLibLoader.loadNEWT();
-
- if (!Window.initIDs()) {
- throw new NativeWindowException("Failed to initialize BCEGL Window jmethodIDs");
- }
- }
-
- public static void initSingleton() {
- // just exist to ensure static init has been run
- }
-
-
- public Display() {
- }
-
- protected void createNative() {
- long handle = CreateDisplay(Screen.fixedWidth, Screen.fixedHeight);
- if (handle == EGL.EGL_NO_DISPLAY) {
- throw new NativeWindowException("BC EGL CreateDisplay failed");
- }
- aDevice = new EGLGraphicsDevice(handle);
- }
-
- protected void closeNative() {
- if (aDevice.getHandle() != EGL.EGL_NO_DISPLAY) {
- DestroyDisplay(aDevice.getHandle());
- }
- }
-
- protected void dispatchMessages() {
- // n/a .. DispatchMessages();
- }
-
- private native long CreateDisplay(int width, int height);
- private native void DestroyDisplay(long dpy);
- private native void DispatchMessages();
-}
-
diff --git a/src/newt/classes/com/jogamp/javafx/newt/opengl/broadcom/egl/Screen.java b/src/newt/classes/com/jogamp/javafx/newt/opengl/broadcom/egl/Screen.java
deleted file mode 100755
index f7abe3836..000000000
--- a/src/newt/classes/com/jogamp/javafx/newt/opengl/broadcom/egl/Screen.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.jogamp.javafx.newt.opengl.broadcom.egl;
-
-import com.jogamp.javafx.newt.impl.*;
-import javax.media.nativewindow.*;
-
-public class Screen extends com.jogamp.javafx.newt.Screen {
-
- static {
- Display.initSingleton();
- }
-
-
- public Screen() {
- }
-
- protected void createNative(int index) {
- aScreen = new DefaultGraphicsScreen(getDisplay().getGraphicsDevice(), index);
- setScreenSize(fixedWidth, fixedHeight);
- }
-
- protected void closeNative() { }
-
- //----------------------------------------------------------------------
- // Internals only
- //
-
- static final int fixedWidth = 1920;
- static final int fixedHeight = 1080;
-}
-
diff --git a/src/newt/classes/com/jogamp/javafx/newt/opengl/broadcom/egl/Window.java b/src/newt/classes/com/jogamp/javafx/newt/opengl/broadcom/egl/Window.java
deleted file mode 100755
index bd2d7930e..000000000
--- a/src/newt/classes/com/jogamp/javafx/newt/opengl/broadcom/egl/Window.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.jogamp.javafx.newt.opengl.broadcom.egl;
-
-import com.jogamp.javafx.newt.impl.*;
-import com.jogamp.opengl.impl.egl.*;
-import javax.media.nativewindow.*;
-import javax.media.opengl.GLCapabilities;
-import javax.media.opengl.GLProfile;
-import javax.media.nativewindow.NativeWindowException;
-
-public class Window extends com.jogamp.javafx.newt.Window {
- static {
- Display.initSingleton();
- }
-
- public Window() {
- }
-
- protected void createNative(long parentWindowHandle, Capabilities caps) {
- if(0!=parentWindowHandle) {
- throw new RuntimeException("Window parenting not supported (yet)");
- }
- // query a good configuration .. even thought we drop this one
- // and reuse the EGLUtil choosen one later.
- config = GraphicsConfigurationFactory.getFactory(getScreen().getDisplay().getGraphicsDevice()).chooseGraphicsConfiguration(caps, null, getScreen().getGraphicsScreen());
- if (config == null) {
- throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
- }
- setSizeImpl(getScreen().getWidth(), getScreen().getHeight());
- }
-
- protected void closeNative() {
- if(0!=windowHandleClose) {
- CloseWindow(getDisplayHandle(), windowHandleClose);
- }
- }
-
- public void setVisible(boolean visible) {
- if(this.visible!=visible) {
- this.visible=visible;
- if ( 0==windowHandle ) {
- windowHandle = realizeWindow(true, width, height);
- if (0 == windowHandle) {
- throw new NativeWindowException("Error native Window Handle is null");
- }
- }
- clearEventMask();
- }
- }
-
- public void setSize(int width, int height) {
- System.err.println("setSize "+width+"x"+height+" n/a in BroadcomEGL");
- }
-
- void setSizeImpl(int width, int height) {
- if(0!=windowHandle) {
- // n/a in BroadcomEGL
- System.err.println("BCEGL Window.setSizeImpl n/a in BroadcomEGL with realized window");
- } else {
- if(DEBUG_IMPLEMENTATION) {
- Exception e = new Exception("BCEGL Window.setSizeImpl() "+this.width+"x"+this.height+" -> "+width+"x"+height);
- e.printStackTrace();
- }
- this.width = width;
- this.height = height;
- }
- }
-
- public void setPosition(int x, int y) {
- // n/a in BroadcomEGL
- System.err.println("setPosition n/a in BroadcomEGL");
- }
-
- public boolean setFullscreen(boolean fullscreen) {
- // n/a in BroadcomEGL
- System.err.println("setFullscreen n/a in BroadcomEGL");
- return false;
- }
-
- public boolean surfaceSwap() {
- if ( 0!=windowHandle ) {
- SwapWindow(getDisplayHandle(), windowHandle);
- return true;
- }
- return false;
- }
-
- //----------------------------------------------------------------------
- // Internals only
- //
-
- protected static native boolean initIDs();
- private native long CreateWindow(long eglDisplayHandle, boolean chromaKey, int width, int height);
- private native void CloseWindow(long eglDisplayHandle, long eglWindowHandle);
- private native void SwapWindow(long eglDisplayHandle, long eglWindowHandle);
-
-
- private long realizeWindow(boolean chromaKey, int width, int height) {
- if(DEBUG_IMPLEMENTATION) {
- System.out.println("BCEGL Window.realizeWindow() with: chroma "+chromaKey+", "+width+"x"+height+", "+config);
- }
- long handle = CreateWindow(getDisplayHandle(), chromaKey, width, height);
- if (0 == handle) {
- throw new NativeWindowException("Error native Window Handle is null");
- }
- windowHandleClose = handle;
- return handle;
- }
-
- private void windowCreated(int cfgID, int width, int height) {
- this.width = width;
- this.height = height;
- GLCapabilities capsReq = (GLCapabilities) config.getRequestedCapabilities();
- config = EGLGraphicsConfiguration.create(capsReq, screen.getGraphicsScreen(), cfgID);
- if (config == null) {
- throw new NativeWindowException("Error creating EGLGraphicsConfiguration from id: "+cfgID+", "+this);
- }
- if(DEBUG_IMPLEMENTATION) {
- System.out.println("BCEGL Window.windowCreated(): "+toHexString(cfgID)+", "+width+"x"+height+", "+config);
- }
- }
-
- private long windowHandleClose;
-}
diff --git a/src/newt/classes/com/jogamp/javafx/newt/opengl/kd/KDDisplay.java b/src/newt/classes/com/jogamp/javafx/newt/opengl/kd/KDDisplay.java
deleted file mode 100755
index 40a37115d..000000000
--- a/src/newt/classes/com/jogamp/javafx/newt/opengl/kd/KDDisplay.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.jogamp.javafx.newt.opengl.kd;
-
-import com.jogamp.javafx.newt.*;
-import com.jogamp.javafx.newt.impl.*;
-import com.jogamp.opengl.impl.egl.*;
-import javax.media.nativewindow.*;
-import javax.media.nativewindow.egl.*;
-
-public class KDDisplay extends Display {
-
- static {
- NativeLibLoader.loadNEWT();
-
- if (!KDWindow.initIDs()) {
- throw new NativeWindowException("Failed to initialize KDWindow jmethodIDs");
- }
- }
-
- public static void initSingleton() {
- // just exist to ensure static init has been run
- }
-
-
- public KDDisplay() {
- }
-
- protected void createNative() {
- // FIXME: map name to EGL_*_DISPLAY
- long handle = EGL.eglGetDisplay(EGL.EGL_DEFAULT_DISPLAY);
- if (handle == EGL.EGL_NO_DISPLAY) {
- throw new NativeWindowException("eglGetDisplay failed");
- }
- if (!EGL.eglInitialize(handle, null, null)) {
- throw new NativeWindowException("eglInitialize failed");
- }
- aDevice = new EGLGraphicsDevice(handle);
- }
-
- protected void closeNative() {
- if (aDevice.getHandle() != EGL.EGL_NO_DISPLAY) {
- EGL.eglTerminate(aDevice.getHandle());
- }
- }
-
- protected void dispatchMessages() {
- DispatchMessages();
- }
-
- private native void DispatchMessages();
-}
-
diff --git a/src/newt/classes/com/jogamp/javafx/newt/opengl/kd/KDScreen.java b/src/newt/classes/com/jogamp/javafx/newt/opengl/kd/KDScreen.java
deleted file mode 100755
index 4bc7f8257..000000000
--- a/src/newt/classes/com/jogamp/javafx/newt/opengl/kd/KDScreen.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.jogamp.javafx.newt.opengl.kd;
-
-import com.jogamp.javafx.newt.*;
-import javax.media.nativewindow.*;
-
-public class KDScreen extends Screen {
- static {
- KDDisplay.initSingleton();
- }
-
- public KDScreen() {
- }
-
- protected void createNative(int index) {
- aScreen = new DefaultGraphicsScreen(getDisplay().getGraphicsDevice(), index);
- }
-
- protected void closeNative() { }
-
- // elevate access to this package ..
- protected void setScreenSize(int w, int h) {
- super.setScreenSize(w, h);
- }
-}
diff --git a/src/newt/classes/com/jogamp/javafx/newt/opengl/kd/KDWindow.java b/src/newt/classes/com/jogamp/javafx/newt/opengl/kd/KDWindow.java
deleted file mode 100755
index d5be2207c..000000000
--- a/src/newt/classes/com/jogamp/javafx/newt/opengl/kd/KDWindow.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.jogamp.javafx.newt.opengl.kd;
-
-import com.jogamp.javafx.newt.*;
-import com.jogamp.javafx.newt.impl.*;
-import com.jogamp.opengl.impl.egl.*;
-import javax.media.nativewindow.*;
-import javax.media.opengl.GLCapabilities;
-import javax.media.opengl.GLProfile;
-import javax.media.nativewindow.NativeWindowException;
-
-public class KDWindow extends Window {
- private static final String WINDOW_CLASS_NAME = "NewtWindow";
- // non fullscreen dimensions ..
- private int nfs_width, nfs_height, nfs_x, nfs_y;
-
- static {
- KDDisplay.initSingleton();
- }
-
- public KDWindow() {
- }
-
- protected void createNative(long parentWindowHandle, Capabilities caps) {
- if(0!=parentWindowHandle) {
- throw new RuntimeException("Window parenting not supported (yet)");
- }
- config = GraphicsConfigurationFactory.getFactory(getScreen().getDisplay().getGraphicsDevice()).chooseGraphicsConfiguration(caps, null, getScreen().getGraphicsScreen());
- if (config == null) {
- throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
- }
-
- GLCapabilities eglCaps = (GLCapabilities)config.getChosenCapabilities();
- int[] eglAttribs = EGLGraphicsConfiguration.GLCapabilities2AttribList(eglCaps);
-
- windowHandle = 0;
- eglWindowHandle = CreateWindow(getDisplayHandle(), eglAttribs);
- if (eglWindowHandle == 0) {
- throw new NativeWindowException("Error creating egl window: "+config);
- }
- setVisible0(eglWindowHandle, false);
- windowHandleClose = eglWindowHandle;
- }
-
- protected void closeNative() {
- if(0!=windowHandleClose) {
- CloseWindow(windowHandleClose, windowUserData);
- windowUserData=0;
- }
- }
-
- public void setVisible(boolean visible) {
- if(0!=eglWindowHandle && this.visible!=visible) {
- this.visible=visible;
- setVisible0(eglWindowHandle, visible);
- if ( 0==windowHandle ) {
- windowHandle = RealizeWindow(eglWindowHandle);
- if (0 == windowHandle) {
- throw new NativeWindowException("Error native Window Handle is null");
- }
- }
- clearEventMask();
- }
- }
-
- public void setSize(int width, int height) {
- if(0!=eglWindowHandle) {
- setSize0(eglWindowHandle, width, height);
- }
- }
-
- public void setPosition(int x, int y) {
- // n/a in KD
- System.err.println("setPosition n/a in KD");
- }
-
- public boolean setFullscreen(boolean fullscreen) {
- if(0!=eglWindowHandle && this.fullscreen!=fullscreen) {
- this.fullscreen=fullscreen;
- if(this.fullscreen) {
- setFullScreen0(eglWindowHandle, true);
- } else {
- setFullScreen0(eglWindowHandle, false);
- setSize0(eglWindowHandle, nfs_width, nfs_height);
- }
- }
- return true;
- }
-
- //----------------------------------------------------------------------
- // Internals only
- //
-
- protected static native boolean initIDs();
- private native long CreateWindow(long displayHandle, int[] attributes);
- private native long RealizeWindow(long eglWindowHandle);
- private native int CloseWindow(long eglWindowHandle, long userData);
- private native void setVisible0(long eglWindowHandle, boolean visible);
- private native void setSize0(long eglWindowHandle, int width, int height);
- private native void setFullScreen0(long eglWindowHandle, boolean fullscreen);
-
- private void windowCreated(long userData) {
- windowUserData=userData;
- }
-
- private void sizeChanged(int newWidth, int newHeight) {
- width = newWidth;
- height = newHeight;
- if(!fullscreen) {
- nfs_width=width;
- nfs_height=height;
- } else {
- ((KDScreen)screen).setScreenSize(width, height);
- }
- sendWindowEvent(WindowEvent.EVENT_WINDOW_RESIZED);
- }
-
- private long eglWindowHandle;
- private long windowHandleClose;
- private long windowUserData;
-}
diff --git a/src/newt/classes/com/jogamp/javafx/newt/util/EventDispatchThread.java b/src/newt/classes/com/jogamp/javafx/newt/util/EventDispatchThread.java
deleted file mode 100644
index db3f97ee6..000000000
--- a/src/newt/classes/com/jogamp/javafx/newt/util/EventDispatchThread.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- */
-
-package com.jogamp.javafx.newt.util;
-
-import com.jogamp.javafx.newt.Display;
-import com.jogamp.javafx.newt.impl.Debug;
-import java.util.*;
-
-public class EventDispatchThread {
- public static final boolean DEBUG = Debug.debug("EDT");
-
- private ThreadGroup threadGroup;
- private volatile boolean shouldStop = false;
- private TaskWorker taskWorker = null;
- private Object taskWorkerLock = new Object();
- private ArrayList tasks = new ArrayList(); // one shot tasks
- private Display display = null;
- private String name;
- private long edtPollGranularity = 10;
-
- public EventDispatchThread(Display display, ThreadGroup tg, String name) {
- this.display = display;
- this.threadGroup = tg;
- this.name=new String("EDT-Display_"+display.getName()+"-"+name);
- }
-
- public String getName() { return name; }
-
- public ThreadGroup getThreadGroup() { return threadGroup; }
-
- public void start() {
- start(false);
- }
-
- /**
- * @param externalStimuli true indicates that another thread stimulates,
- * ie. calls this TaskManager's run() loop method.
- * Hence no own thread is started in this case.
- *
- * @return The started Runnable, which handles the run-loop.
- * Usefull in combination with externalStimuli=true,
- * so an external stimuli can call it.
- */
- public Runnable start(boolean externalStimuli) {
- synchronized(taskWorkerLock) {
- if(null==taskWorker) {
- taskWorker = new TaskWorker(threadGroup, name);
- }
- if(!taskWorker.isRunning()) {
- shouldStop = false;
- taskWorker.start(externalStimuli);
- }
- taskWorkerLock.notifyAll();
- }
- return taskWorker;
- }
-
- public void stop() {
- synchronized(taskWorkerLock) {
- if(null!=taskWorker && taskWorker.isRunning()) {
- shouldStop = true;
- }
- taskWorkerLock.notifyAll();
- if(DEBUG) {
- System.out.println(Thread.currentThread()+": EDT signal STOP");
- }
- }
- }
-
- public boolean isThreadEDT(Thread thread) {
- return null!=taskWorker && taskWorker == thread;
- }
-
- public boolean isCurrentThreadEDT() {
- return null!=taskWorker && taskWorker == Thread.currentThread();
- }
-
- public boolean isRunning() {
- return null!=taskWorker && taskWorker.isRunning() ;
- }
-
- public void invokeLater(Runnable task) {
- if(task == null) {
- return;
- }
- synchronized(taskWorkerLock) {
- if(null!=taskWorker && taskWorker.isRunning() && taskWorker != Thread.currentThread() ) {
- tasks.add(task);
- taskWorkerLock.notifyAll();
- } else {
- // if !running or isEDTThread, do it right away
- task.run();
- }
- }
- }
-
- public void invokeAndWait(Runnable task) {
- if(task == null) {
- return;
- }
- invokeLater(task);
- waitOnWorker();
- }
-
- public void waitOnWorker() {
- synchronized(taskWorkerLock) {
- if(null!=taskWorker && taskWorker.isRunning() && tasks.size()>0 && taskWorker != Thread.currentThread() ) {
- try {
- taskWorkerLock.wait();
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
- }
- }
-
- public void waitUntilStopped() {
- synchronized(taskWorkerLock) {
- while(null!=taskWorker && taskWorker.isRunning() && taskWorker != Thread.currentThread() ) {
- try {
- taskWorkerLock.wait();
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
- }
- }
-
- class TaskWorker extends Thread {
- boolean isRunning = false;
- boolean externalStimuli = false;
-
- public TaskWorker(ThreadGroup tg, String name) {
- super(tg, name);
- }
-
- public synchronized boolean isRunning() {
- return isRunning;
- }
-
- public void start(boolean externalStimuli) throws IllegalThreadStateException {
- synchronized(this) {
- this.externalStimuli = externalStimuli;
- isRunning = true;
- }
- if(!externalStimuli) {
- super.start();
- }
- }
-
- /**
- * Utilizing taskWorkerLock only for local resources and task execution,
- * not for event dispatching.
- */
- public void run() {
- if(DEBUG) {
- System.out.println(Thread.currentThread()+": EDT run() START");
- }
- while(!shouldStop) {
- try {
- // wait for something todo
- while(!shouldStop && tasks.size()==0) {
- synchronized(taskWorkerLock) {
- if(!shouldStop && tasks.size()==0) {
- try {
- taskWorkerLock.wait(edtPollGranularity);
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
- }
- display.pumpMessages(); // event dispatch
- }
- if(!shouldStop && tasks.size()>0) {
- synchronized(taskWorkerLock) {
- if(!shouldStop && tasks.size()>0) {
- Runnable task = (Runnable) tasks.remove(0);
- task.run();
- taskWorkerLock.notifyAll();
- }
- }
- display.pumpMessages(); // event dispatch
- }
- } catch (Throwable t) {
- // handle errors ..
- t.printStackTrace();
- } finally {
- // epilog - unlock locked stuff
- }
- if(externalStimuli) break; // no loop if called by external stimuli
- }
- synchronized(this) {
- isRunning = !shouldStop;
- }
- if(!isRunning) {
- synchronized(taskWorkerLock) {
- taskWorkerLock.notifyAll();
- }
- }
- if(DEBUG) {
- System.out.println(Thread.currentThread()+": EDT run() EXIT");
- }
- }
- }
-}
-
diff --git a/src/newt/classes/com/jogamp/javafx/newt/util/MainThread.java b/src/newt/classes/com/jogamp/javafx/newt/util/MainThread.java
deleted file mode 100644
index 9bf25098f..000000000
--- a/src/newt/classes/com/jogamp/javafx/newt/util/MainThread.java
+++ /dev/null
@@ -1,307 +0,0 @@
-/*
- * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- */
-
-package com.jogamp.javafx.newt.util;
-
-import java.util.*;
-import java.lang.reflect.Method;
-import java.lang.reflect.InvocationTargetException;
-import java.security.*;
-
-import javax.media.nativewindow.*;
-
-import com.jogamp.javafx.newt.*;
-import com.jogamp.javafx.newt.impl.*;
-import com.jogamp.javafx.newt.macosx.MacDisplay;
-import com.jogamp.nativewindow.impl.NWReflection;
-
-/**
- * NEWT Utility class MainThread
- *
- * Such behavior is necessary for native windowing toolkits,
- * where the windowing management must happen on the so called
- * main thread e.g. for Mac OS X !
- *
- * Utilizing this class as a launchpad, now you are able to
- * use a NEWT multithreaded application with window handling within the different threads,
- * even on these restricted platforms.
- *
- * To support your NEWT Window platform,
- * you have to pass your main thread actions to {@link #invoke invoke(..)},
- * have a look at the {@link com.jogamp.javafx.newt.macosx.MacWindow MacWindow} implementation.
- * TODO: Some hardcoded dependencies exist in this implementation,
- * where you have to patch this code or factor it out. newt.MainThread.force
to true
.newt.MainThread.force
to true
.
- java -XstartOnFirstThread com.jogamp.javafx.newt.util.MainThread demos.es1.RedSquare -GL2 -GL2 -GL2 -GL2
-
- * Which starts 4 threads, each with a window and OpenGL rendering.
- */
-public class MainThread {
- private static AccessControlContext localACC = AccessController.getContext();
- public static final boolean USE_MAIN_THREAD = NativeWindowFactory.TYPE_MACOSX.equals(NativeWindowFactory.getNativeWindowType(false)) ||
- Debug.getBooleanProperty("newt.MainThread.force", true, localACC);
-
- protected static final boolean DEBUG = Debug.debug("MainThread");
-
- private static boolean isExit=false;
- private static volatile boolean isRunning=false;
- private static Object taskWorkerLock=new Object();
- private static boolean shouldStop;
- private static ArrayList tasks;
- private static ArrayList tasksBlock;
- private static Thread mainThread;
-
- static class MainAction extends Thread {
- private String mainClassName;
- private String[] mainClassArgs;
-
- private Class mainClass;
- private Method mainClassMain;
-
- public MainAction(String mainClassName, String[] mainClassArgs) {
- this.mainClassName=mainClassName;
- this.mainClassArgs=mainClassArgs;
- }
-
- public void run() {
- if ( USE_MAIN_THREAD ) {
- // we have to start first to provide the service ..
- MainThread.waitUntilRunning();
- }
-
- // start user app ..
- try {
- Class mainClass = NWReflection.getClass(mainClassName, true);
- if(null==mainClass) {
- throw new RuntimeException(new ClassNotFoundException("MainThread couldn't find main class "+mainClassName));
- }
- try {
- mainClassMain = mainClass.getDeclaredMethod("main", new Class[] { String[].class });
- mainClassMain.setAccessible(true);
- } catch (Throwable t) {
- throw new RuntimeException(t);
- }
- if(DEBUG) System.err.println("MainAction.run(): "+Thread.currentThread().getName()+" invoke "+mainClassName);
- mainClassMain.invoke(null, new Object[] { mainClassArgs } );
- } catch (InvocationTargetException ite) {
- ite.getTargetException().printStackTrace();
- } catch (Throwable t) {
- t.printStackTrace();
- }
-
- if(DEBUG) System.err.println("MainAction.run(): "+Thread.currentThread().getName()+" user app fin");
-
- if ( USE_MAIN_THREAD ) {
- MainThread.exit();
- if(DEBUG) System.err.println("MainAction.run(): "+Thread.currentThread().getName()+" MainThread fin - exit");
- System.exit(0);
- }
- }
- }
- private static MainAction mainAction;
-
- /** Your new java application main entry, which pipelines your application */
- public static void main(String[] args) {
- if(DEBUG) System.err.println("MainThread.main(): "+Thread.currentThread().getName()+" USE_MAIN_THREAD "+ USE_MAIN_THREAD );
-
- if(args.length==0) {
- return;
- }
-
- String mainClassName=args[0];
- String[] mainClassArgs=new String[args.length-1];
- if(args.length>1) {
- System.arraycopy(args, 1, mainClassArgs, 0, args.length-1);
- }
-
- NativeLibLoader.loadNEWT();
-
- shouldStop = false;
- tasks = new ArrayList();
- tasksBlock = new ArrayList();
- mainThread = Thread.currentThread();
-
- mainAction = new MainAction(mainClassName, mainClassArgs);
-
- if(NativeWindowFactory.TYPE_MACOSX.equals(NativeWindowFactory.getNativeWindowType(false))) {
- MacDisplay.initSingleton();
- }
-
- if ( USE_MAIN_THREAD ) {
- // dispatch user's main thread ..
- mainAction.start();
-
- // do our main thread task scheduling
- run();
- } else {
- // run user's main in this thread
- mainAction.run();
- }
- }
-
- /** invokes the given Runnable */
- public static void invoke(boolean wait, Runnable r) {
- if(r == null) {
- return;
- }
-
- // if this main thread is not being used or
- // if this is already the main thread .. just execute.
- if( !isRunning() || mainThread == Thread.currentThread() ) {
- r.run();
- return;
- }
-
- synchronized(taskWorkerLock) {
- tasks.add(r);
- if(wait) {
- tasksBlock.add(r);
- }
- taskWorkerLock.notifyAll();
- if(wait) {
- while(tasksBlock.size()>0) {
- try {
- taskWorkerLock.wait();
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
- }
- }
- }
-
- public static void exit() {
- if(DEBUG) System.err.println("MainThread.exit(): "+Thread.currentThread().getName()+" start");
- synchronized(taskWorkerLock) {
- if(isRunning) {
- shouldStop = true;
- }
- taskWorkerLock.notifyAll();
- }
- if(DEBUG) System.err.println("MainThread.exit(): "+Thread.currentThread().getName()+" end");
- }
-
- public static boolean isRunning() {
- synchronized(taskWorkerLock) {
- return isRunning;
- }
- }
-
- private static void waitUntilRunning() {
- synchronized(taskWorkerLock) {
- if(isExit) return;
-
- while(!isRunning) {
- try {
- taskWorkerLock.wait();
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
- }
- }
-
- public static void run() {
- if(DEBUG) System.err.println("MainThread.run(): "+Thread.currentThread().getName());
- synchronized(taskWorkerLock) {
- isRunning = true;
- taskWorkerLock.notifyAll();
- }
- while(!shouldStop) {
- try {
- ArrayList localTasks=null;
-
- // wait for something todo ..
- synchronized(taskWorkerLock) {
- while(!shouldStop && tasks.size()==0) {
- try {
- taskWorkerLock.wait();
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
- // seq. process all tasks until no blocking one exists in the list
- for(Iterator i = tasks.iterator(); tasksBlock.size()>0 && i.hasNext(); ) {
- Runnable task = (Runnable) i.next();
- task.run();
- i.remove();
- tasksBlock.remove(task);
- }
-
- // take over the tasks ..
- if(tasks.size()>0) {
- localTasks = tasks;
- tasks = new ArrayList();
- }
- taskWorkerLock.notifyAll();
- }
-
- // seq. process all unblocking tasks ..
- if(null!=localTasks) {
- for(Iterator i = localTasks.iterator(); i.hasNext(); ) {
- Runnable task = (Runnable) i.next();
- task.run();
- }
- }
- } catch (Throwable t) {
- // handle errors ..
- t.printStackTrace();
- } finally {
- // epilog - unlock locked stuff
- }
- }
- if(DEBUG) System.err.println("MainThread.run(): "+Thread.currentThread().getName()+" fin");
- synchronized(taskWorkerLock) {
- isRunning = false;
- isExit = true;
- taskWorkerLock.notifyAll();
- }
- }
-}
-
-
diff --git a/src/newt/classes/com/jogamp/javafx/newt/windows/WindowsDisplay.java b/src/newt/classes/com/jogamp/javafx/newt/windows/WindowsDisplay.java
deleted file mode 100755
index f2e8d21ef..000000000
--- a/src/newt/classes/com/jogamp/javafx/newt/windows/WindowsDisplay.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.jogamp.javafx.newt.windows;
-
-import javax.media.nativewindow.*;
-import javax.media.nativewindow.windows.*;
-import com.jogamp.javafx.newt.*;
-import com.jogamp.javafx.newt.impl.*;
-
-public class WindowsDisplay extends Display {
-
- protected static final String WINDOW_CLASS_NAME = "NewtWindowClass";
- private static int windowClassAtom;
- private static long hInstance;
-
- static {
- NativeLibLoader.loadNEWT();
-
- if (!WindowsWindow.initIDs()) {
- throw new NativeWindowException("Failed to initialize WindowsWindow jmethodIDs");
- }
- }
-
- public static void initSingleton() {
- // just exist to ensure static init has been run
- }
-
-
- public WindowsDisplay() {
- }
-
- protected void createNative() {
- aDevice = new WindowsGraphicsDevice();
- }
-
- protected void closeNative() {
- // Can't do .. only at application shutdown
- // UnregisterWindowClass(getWindowClassAtom(), getHInstance());
- }
-
- protected void dispatchMessages() {
- DispatchMessages();
- }
-
- protected static synchronized int getWindowClassAtom() {
- if(0 == windowClassAtom) {
- windowClassAtom = RegisterWindowClass(WINDOW_CLASS_NAME, getHInstance());
- if (0 == windowClassAtom) {
- throw new NativeWindowException("Error while registering window class");
- }
- }
- return windowClassAtom;
- }
-
- protected static synchronized long getHInstance() {
- if(0 == hInstance) {
- hInstance = LoadLibraryW("newt");
- if (0 == hInstance) {
- throw new NativeWindowException("Error finding HINSTANCE for \"newt\"");
- }
- }
- return hInstance;
- }
-
- //----------------------------------------------------------------------
- // Internals only
- //
- private static native long LoadLibraryW(String libraryName);
- private static native int RegisterWindowClass(String windowClassName, long hInstance);
- private static native void UnregisterWindowClass(int wndClassAtom, long hInstance);
-
- private static native void DispatchMessages();
-}
-
diff --git a/src/newt/classes/com/jogamp/javafx/newt/windows/WindowsScreen.java b/src/newt/classes/com/jogamp/javafx/newt/windows/WindowsScreen.java
deleted file mode 100755
index ab11f97dd..000000000
--- a/src/newt/classes/com/jogamp/javafx/newt/windows/WindowsScreen.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.jogamp.javafx.newt.windows;
-
-import com.jogamp.javafx.newt.*;
-import com.jogamp.javafx.newt.impl.*;
-import javax.media.nativewindow.*;
-
-public class WindowsScreen extends Screen {
- static {
- WindowsDisplay.initSingleton();
- }
-
-
- public WindowsScreen() {
- }
-
- protected void createNative(int index) {
- aScreen = new DefaultGraphicsScreen(getDisplay().getGraphicsDevice(), index);
- setScreenSize(getWidthImpl(getIndex()), getHeightImpl(getIndex()));
- }
-
- protected void closeNative() { }
-
- private native int getWidthImpl(int scrn_idx);
- private native int getHeightImpl(int scrn_idx);
-}
diff --git a/src/newt/classes/com/jogamp/javafx/newt/windows/WindowsWindow.java b/src/newt/classes/com/jogamp/javafx/newt/windows/WindowsWindow.java
deleted file mode 100755
index 7c8864190..000000000
--- a/src/newt/classes/com/jogamp/javafx/newt/windows/WindowsWindow.java
+++ /dev/null
@@ -1,289 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.jogamp.javafx.newt.windows;
-
-import javax.media.nativewindow.*;
-import com.jogamp.javafx.newt.*;
-
-public class WindowsWindow extends Window {
-
- private long hmon;
- private long hdc;
- private long windowHandleClose;
- private long parentWindowHandle;
- // non fullscreen dimensions ..
- private int nfs_width, nfs_height, nfs_x, nfs_y;
- private final Insets insets = new Insets(0, 0, 0, 0);
-
- static {
- WindowsDisplay.initSingleton();
- }
-
- public WindowsWindow() {
- }
-
- Thread hdcOwner = null;
-
- public synchronized int lockSurface() throws NativeWindowException {
- int res = super.lockSurface();
- if(LOCK_SUCCESS==res && 0!=windowHandle) {
- if(hdc!=0) {
- throw new NativeWindowException("NEWT Surface handle set HDC "+toHexString(hdc)+" - "+Thread.currentThread().getName()+" ; "+this);
- }
- hdc = GetDC(windowHandle);
- hmon = MonitorFromWindow(windowHandle);
- hdcOwner = Thread.currentThread();
- }
- return res;
- }
-
- public synchronized void unlockSurface() {
- // prevalidate, before we change data ..
- Thread cur = Thread.currentThread();
- if ( getSurfaceLockOwner() != cur ) {
- getLockedStack().printStackTrace();
- throw new NativeWindowException(cur+": Not owner, owner is "+getSurfaceLockOwner());
- }
- if (0!=hdc && 0!=windowHandle) {
- if(hdcOwner != cur) {
- throw new NativeWindowException("NEWT Surface handle set HDC "+toHexString(hdc)+" by other thread "+hdcOwner+", this "+cur+" ; "+this);
- }
- ReleaseDC(windowHandle, hdc);
- hdc=0;
- hdcOwner=null;
- }
- super.unlockSurface();
- }
-
- public long getSurfaceHandle() {
- return hdc;
- }
-
- public boolean hasDeviceChanged() {
- if(0!=windowHandle) {
- long _hmon = MonitorFromWindow(windowHandle);
- if (hmon != _hmon) {
- if(DEBUG_IMPLEMENTATION || DEBUG_WINDOW_EVENT) {
- Exception e = new Exception("!!! Window Device Changed "+Thread.currentThread().getName()+
- ", HMON "+toHexString(hmon)+" -> "+toHexString(_hmon));
- e.printStackTrace();
- }
- hmon = _hmon;
- return true;
- }
- }
- return false;
- }
-
- protected void createNative(long parentWindowHandle, Capabilities caps) {
- WindowsScreen screen = (WindowsScreen) getScreen();
- WindowsDisplay display = (WindowsDisplay) screen.getDisplay();
- config = GraphicsConfigurationFactory.getFactory(display.getGraphicsDevice()).chooseGraphicsConfiguration(caps, null, screen.getGraphicsScreen());
- if (config == null) {
- throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
- }
- windowHandle = CreateWindow(parentWindowHandle,
- display.getWindowClassAtom(), display.WINDOW_CLASS_NAME, display.getHInstance(),
- 0, undecorated, x, y, width, height);
- if (windowHandle == 0) {
- throw new NativeWindowException("Error creating window");
- }
- this.parentWindowHandle = parentWindowHandle;
- windowHandleClose = windowHandle;
- if(DEBUG_IMPLEMENTATION || DEBUG_WINDOW_EVENT) {
- Exception e = new Exception("!!! Window new window handle "+Thread.currentThread().getName()+
- " (Parent HWND "+toHexString(parentWindowHandle)+
- ") : HWND "+toHexString(windowHandle)+", "+Thread.currentThread());
- e.printStackTrace();
- }
- }
-
- protected void closeNative() {
- if (hdc != 0) {
- if(windowHandleClose != 0) {
- ReleaseDC(windowHandleClose, hdc);
- }
- hdc = 0;
- }
- if(windowHandleClose != 0) {
- DestroyWindow(windowHandleClose);
- windowHandleClose = 0;
- }
- }
-
- protected void windowDestroyed() {
- windowHandleClose = 0;
- super.windowDestroyed();
- }
-
- public void setVisible(boolean visible) {
- if(this.visible!=visible && 0!=windowHandle) {
- this.visible=visible;
- setVisible0(windowHandle, visible);
- }
- }
-
- // @Override
- public void setSize(int width, int height) {
- if (0!=windowHandle && (width != this.width || this.height != height)) {
- if(!fullscreen) {
- nfs_width=width;
- nfs_height=height;
- }
- this.width = width;
- this.height = height;
- setSize0(parentWindowHandle, windowHandle, x, y, width, height);
- }
- }
-
- //@Override
- public void setPosition(int x, int y) {
- if (0!=windowHandle && (this.x != x || this.y != y)) {
- if(!fullscreen) {
- nfs_x=x;
- nfs_y=y;
- }
- this.x = x;
- this.y = y;
- setPosition(parentWindowHandle, windowHandle, x , y);
- }
- }
-
- public boolean setFullscreen(boolean fullscreen) {
- if(0!=windowHandle && (this.fullscreen!=fullscreen)) {
- int x,y,w,h;
- this.fullscreen=fullscreen;
- if(fullscreen) {
- x = 0; y = 0;
- w = screen.getWidth();
- h = screen.getHeight();
- } else {
- x = nfs_x;
- y = nfs_y;
- w = nfs_width;
- h = nfs_height;
- }
- if(DEBUG_IMPLEMENTATION || DEBUG_WINDOW_EVENT) {
- System.err.println("WindowsWindow fs: "+fullscreen+" "+x+"/"+y+" "+w+"x"+h);
- }
- setFullscreen0(parentWindowHandle, windowHandle, x, y, w, h, undecorated, fullscreen);
- }
- return fullscreen;
- }
-
- // @Override
- public void requestFocus() {
- super.requestFocus();
- if (windowHandle != 0L) {
- requestFocus(windowHandle);
- }
- }
-
- // @Override
- public void setTitle(String title) {
- if (title == null) {
- title = "";
- }
- if (0!=windowHandle && !title.equals(getTitle())) {
- super.setTitle(title);
- setTitle(windowHandle, title);
- }
- }
-
- public Insets getInsets() {
- return (Insets)insets.clone();
- }
-
- //----------------------------------------------------------------------
- // Internals only
- //
- protected static native boolean initIDs();
- private native long CreateWindow(long parentWindowHandle,
- int wndClassAtom, String wndName,
- long hInstance, long visualID,
- boolean isUndecorated,
- int x, int y, int width, int height);
- private native void DestroyWindow(long windowHandle);
- private native long GetDC(long windowHandle);
- private native void ReleaseDC(long windowHandle, long hdc);
- private native long MonitorFromWindow(long windowHandle);
- private static native void setVisible0(long windowHandle, boolean visible);
- private native void setSize0(long parentWindowHandle, long windowHandle, int x, int y, int width, int height);
- private native void setPosition(long parentWindowHandle, long windowHandle, int x, int y);
- private native void setFullscreen0(long parentWindowHandle, long windowHandle, int x, int y, int width, int height, boolean isUndecorated, boolean on);
- private static native void setTitle(long windowHandle, String title);
- private static native void requestFocus(long windowHandle);
-
- private void insetsChanged(int left, int top, int right, int bottom) {
- if (left != -1 && top != -1 && right != -1 && bottom != -1) {
- insets.left = left;
- insets.top = top;
- insets.right = right;
- insets.bottom = bottom;
- }
- }
- private void sizeChanged(int newWidth, int newHeight) {
- width = newWidth;
- height = newHeight;
- if(!fullscreen) {
- nfs_width=width;
- nfs_height=height;
- }
- sendWindowEvent(WindowEvent.EVENT_WINDOW_RESIZED);
- }
-
- private void positionChanged(int newX, int newY) {
- x = newX;
- y = newY;
- if(!fullscreen) {
- nfs_x=x;
- nfs_y=y;
- }
- sendWindowEvent(WindowEvent.EVENT_WINDOW_MOVED);
- }
-
- /**
- *
- * @param focusOwner if focusGained is true, focusOwner is the previous
- * focus owner, if focusGained is false, focusOwner is the new focus owner
- * @param focusGained
- */
- private void focusChanged(long focusOwner, boolean focusGained) {
- if (focusGained) {
- sendWindowEvent(WindowEvent.EVENT_WINDOW_GAINED_FOCUS);
- } else {
- sendWindowEvent(WindowEvent.EVENT_WINDOW_LOST_FOCUS);
- }
- }
-}
diff --git a/src/newt/classes/com/jogamp/javafx/newt/x11/X11Display.java b/src/newt/classes/com/jogamp/javafx/newt/x11/X11Display.java
deleted file mode 100755
index 96d55c082..000000000
--- a/src/newt/classes/com/jogamp/javafx/newt/x11/X11Display.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.jogamp.javafx.newt.x11;
-
-import javax.media.nativewindow.*;
-import javax.media.nativewindow.x11.*;
-import com.jogamp.javafx.newt.*;
-import com.jogamp.javafx.newt.impl.*;
-import com.jogamp.nativewindow.impl.x11.X11Util;
-
-public class X11Display extends Display {
- static {
- NativeLibLoader.loadNEWT();
-
- if (!initIDs()) {
- throw new NativeWindowException("Failed to initialize X11Display jmethodIDs");
- }
-
- if (!X11Window.initIDs()) {
- throw new NativeWindowException("Failed to initialize X11Window jmethodIDs");
- }
- }
-
- public static void initSingleton() {
- // just exist to ensure static init has been run
- }
-
-
- public X11Display() {
- }
-
- protected void createNative() {
- long handle= X11Util.getThreadLocalDisplay(name);
- if (handle == 0 ) {
- throw new RuntimeException("Error creating display: "+name);
- }
- try {
- CompleteDisplay(handle);
- } catch(RuntimeException e) {
- X11Util.closeThreadLocalDisplay(name);
- throw e;
- }
- aDevice = new X11GraphicsDevice(handle);
- }
-
- protected void closeNative() {
- if(0==X11Util.closeThreadLocalDisplay(name)) {
- throw new NativeWindowException(this+" was not mapped");
- }
- }
-
- protected void dispatchMessages() {
- DispatchMessages(getHandle(), javaObjectAtom, windowDeleteAtom);
- }
-
- protected void lockDisplay() {
- super.lockDisplay();
- LockDisplay(getHandle());
- }
-
- protected void unlockDisplay() {
- UnlockDisplay(getHandle());
- super.unlockDisplay();
- }
-
- protected long getJavaObjectAtom() { return javaObjectAtom; }
- protected long getWindowDeleteAtom() { return windowDeleteAtom; }
-
- //----------------------------------------------------------------------
- // Internals only
- //
- private static native boolean initIDs();
-
- private native void LockDisplay(long handle);
- private native void UnlockDisplay(long handle);
-
- private native void CompleteDisplay(long handle);
-
- private native void DispatchMessages(long display, long javaObjectAtom, long windowDeleteAtom);
-
- private void displayCompleted(long javaObjectAtom, long windowDeleteAtom) {
- this.javaObjectAtom=javaObjectAtom;
- this.windowDeleteAtom=windowDeleteAtom;
- }
-
- private long windowDeleteAtom;
- private long javaObjectAtom;
-}
-
diff --git a/src/newt/classes/com/jogamp/javafx/newt/x11/X11Screen.java b/src/newt/classes/com/jogamp/javafx/newt/x11/X11Screen.java
deleted file mode 100755
index d90b1868d..000000000
--- a/src/newt/classes/com/jogamp/javafx/newt/x11/X11Screen.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.jogamp.javafx.newt.x11;
-
-import com.jogamp.javafx.newt.*;
-import com.jogamp.javafx.newt.impl.*;
-import javax.media.nativewindow.*;
-import javax.media.nativewindow.x11.*;
-
-public class X11Screen extends Screen {
-
- static {
- X11Display.initSingleton();
- }
-
-
- public X11Screen() {
- }
-
- protected void createNative(int index) {
- long handle = GetScreen(display.getHandle(), index);
- if (handle == 0 ) {
- throw new RuntimeException("Error creating screen: "+index);
- }
- aScreen = new X11GraphicsScreen((X11GraphicsDevice)getDisplay().getGraphicsDevice(), index);
- setScreenSize(getWidth0(display.getHandle(), index),
- getHeight0(display.getHandle(), index));
- }
-
- protected void closeNative() { }
-
- //----------------------------------------------------------------------
- // Internals only
- //
-
- private native long GetScreen(long dpy, int scrn_idx);
- private native int getWidth0(long display, int scrn_idx);
- private native int getHeight0(long display, int scrn_idx);
-}
-
diff --git a/src/newt/classes/com/jogamp/javafx/newt/x11/X11Window.java b/src/newt/classes/com/jogamp/javafx/newt/x11/X11Window.java
deleted file mode 100755
index 8387160c9..000000000
--- a/src/newt/classes/com/jogamp/javafx/newt/x11/X11Window.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.jogamp.javafx.newt.x11;
-
-import com.jogamp.javafx.newt.*;
-import com.jogamp.javafx.newt.impl.*;
-import javax.media.nativewindow.*;
-import javax.media.nativewindow.x11.*;
-
-public class X11Window extends Window {
- private static final String WINDOW_CLASS_NAME = "NewtWindow";
- // non fullscreen dimensions ..
- private int nfs_width, nfs_height, nfs_x, nfs_y;
-
- static {
- X11Display.initSingleton();
- }
-
- public X11Window() {
- }
-
- protected void createNative(long parentWindowHandle, Capabilities caps) {
- X11Screen screen = (X11Screen) getScreen();
- X11Display display = (X11Display) screen.getDisplay();
- config = GraphicsConfigurationFactory.getFactory(display.getGraphicsDevice()).chooseGraphicsConfiguration(caps, null, screen.getGraphicsScreen());
- if (config == null) {
- throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
- }
- X11GraphicsConfiguration x11config = (X11GraphicsConfiguration) config;
- long visualID = x11config.getVisualID();
- long w = CreateWindow(parentWindowHandle,
- display.getHandle(), screen.getIndex(), visualID,
- display.getJavaObjectAtom(), display.getWindowDeleteAtom(), x, y, width, height);
- if (w == 0 || w!=windowHandle) {
- throw new NativeWindowException("Error creating window: "+w);
- }
- this.parentWindowHandle = parentWindowHandle;
- windowHandleClose = windowHandle;
- displayHandleClose = display.getHandle();
- }
-
- protected void closeNative() {
- if(0!=displayHandleClose && 0!=windowHandleClose && null!=getScreen() ) {
- X11Display display = (X11Display) getScreen().getDisplay();
- CloseWindow(displayHandleClose, windowHandleClose, display.getJavaObjectAtom());
- windowHandleClose = 0;
- displayHandleClose = 0;
- }
- }
-
- protected void windowDestroyed() {
- windowHandleClose = 0;
- displayHandleClose = 0;
- super.windowDestroyed();
- }
-
- public void setVisible(boolean visible) {
- if(0!=windowHandle && this.visible!=visible) {
- this.visible=visible;
- setVisible0(getDisplayHandle(), windowHandle, visible);
- clearEventMask();
- }
- }
-
- public void requestFocus() {
- super.requestFocus();
- }
-
- public void setSize(int width, int height) {
- if(DEBUG_IMPLEMENTATION) {
- System.err.println("X11Window setSize: "+this.x+"/"+this.y+" "+this.width+"x"+this.height+" -> "+width+"x"+height);
- // Exception e = new Exception("XXXXXXXXXX");
- // e.printStackTrace();
- }
- this.width = width;
- this.height = height;
- if(!fullscreen) {
- nfs_width=width;
- nfs_height=height;
- }
- if(0!=windowHandle) {
- setSize0(parentWindowHandle, getDisplayHandle(), getScreenIndex(), windowHandle, x, y, width, height, (undecorated||fullscreen)?-1:1, false);
- }
- }
-
- public void setPosition(int x, int y) {
- if(DEBUG_IMPLEMENTATION) {
- System.err.println("X11Window setPosition: "+this.x+"/"+this.y+" -> "+x+"/"+y);
- // Exception e = new Exception("XXXXXXXXXX");
- // e.printStackTrace();
- }
- this.x = x;
- this.y = y;
- if(!fullscreen) {
- nfs_x=x;
- nfs_y=y;
- }
- if(0!=windowHandle) {
- setPosition0(getDisplayHandle(), windowHandle, x, y);
- }
- }
-
- public boolean setFullscreen(boolean fullscreen) {
- if(0!=windowHandle && this.fullscreen!=fullscreen) {
- int x,y,w,h;
- this.fullscreen=fullscreen;
- if(fullscreen) {
- x = 0; y = 0;
- w = screen.getWidth();
- h = screen.getHeight();
- } else {
- x = nfs_x;
- y = nfs_y;
- w = nfs_width;
- h = nfs_height;
- }
- if(DEBUG_IMPLEMENTATION || DEBUG_WINDOW_EVENT) {
- System.err.println("X11Window fs: "+fullscreen+" "+x+"/"+y+" "+w+"x"+h);
- }
- setSize0(parentWindowHandle, getDisplayHandle(), getScreenIndex(), windowHandle, x, y, w, h, (undecorated||fullscreen)?-1:1, false);
- }
- return fullscreen;
- }
-
- //----------------------------------------------------------------------
- // Internals only
- //
-
- protected static native boolean initIDs();
- private native long CreateWindow(long parentWindowHandle, long display, int screen_index,
- long visualID, long javaObjectAtom, long windowDeleteAtom, int x, int y, int width, int height);
- private native void CloseWindow(long display, long windowHandle, long javaObjectAtom);
- private native void setVisible0(long display, long windowHandle, boolean visible);
- private native void setSize0(long parentWindowHandle, long display, int screen_index, long windowHandle,
- int x, int y, int width, int height, int decorationToggle, boolean setVisible);
- private native void setPosition0(long display, long windowHandle, int x, int y);
-
- private void windowChanged(int newX, int newY, int newWidth, int newHeight) {
- if(width != newWidth || height != newHeight) {
- if(DEBUG_IMPLEMENTATION) {
- System.err.println("X11Window windowChanged size: "+this.width+"x"+this.height+" -> "+newWidth+"x"+newHeight);
- }
- width = newWidth;
- height = newHeight;
- if(!fullscreen) {
- nfs_width=width;
- nfs_height=height;
- }
- sendWindowEvent(WindowEvent.EVENT_WINDOW_RESIZED);
- }
- if( 0==parentWindowHandle && ( x != newX || y != newY ) ) {
- if(DEBUG_IMPLEMENTATION) {
- System.err.println("X11Window windowChanged position: "+this.x+"/"+this.y+" -> "+newX+"x"+newY);
- }
- x = newX;
- y = newY;
- if(!fullscreen) {
- nfs_x=x;
- nfs_y=y;
- }
- sendWindowEvent(WindowEvent.EVENT_WINDOW_MOVED);
- }
- }
-
- private void windowCreated(long windowHandle) {
- this.windowHandle = windowHandle;
- }
-
- private long windowHandleClose;
- private long displayHandleClose;
- private long parentWindowHandle;
-}
diff --git a/src/newt/classes/com/jogamp/newt/Display.java b/src/newt/classes/com/jogamp/newt/Display.java
new file mode 100755
index 000000000..88f6dd34b
--- /dev/null
+++ b/src/newt/classes/com/jogamp/newt/Display.java
@@ -0,0 +1,276 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.newt;
+
+import javax.media.nativewindow.*;
+import com.jogamp.newt.impl.Debug;
+import com.jogamp.newt.util.EventDispatchThread;
+import java.util.*;
+
+public abstract class Display {
+ public static final boolean DEBUG = Debug.debug("Display");
+
+ private static Class getDisplayClass(String type)
+ throws ClassNotFoundException
+ {
+ Class displayClass = NewtFactory.getCustomClass(type, "Display");
+ if(null==displayClass) {
+ if (NativeWindowFactory.TYPE_EGL.equals(type)) {
+ displayClass = Class.forName("com.jogamp.newt.opengl.kd.KDDisplay");
+ } else if (NativeWindowFactory.TYPE_WINDOWS.equals(type)) {
+ displayClass = Class.forName("com.jogamp.newt.windows.WindowsDisplay");
+ } else if (NativeWindowFactory.TYPE_MACOSX.equals(type)) {
+ displayClass = Class.forName("com.jogamp.newt.macosx.MacDisplay");
+ } else if (NativeWindowFactory.TYPE_X11.equals(type)) {
+ displayClass = Class.forName("com.jogamp.newt.x11.X11Display");
+ } else if (NativeWindowFactory.TYPE_AWT.equals(type)) {
+ displayClass = Class.forName("com.jogamp.newt.awt.AWTDisplay");
+ } else {
+ throw new RuntimeException("Unknown display type \"" + type + "\"");
+ }
+ }
+ return displayClass;
+ }
+
+ // Unique Display for each thread
+ private static ThreadLocal currentDisplayMap = new ThreadLocal();
+
+ /** Returns the thread local display map */
+ public static Map getCurrentDisplayMap() {
+ Map displayMap = (Map) currentDisplayMap.get();
+ if(null==displayMap) {
+ displayMap = new HashMap();
+ currentDisplayMap.set( displayMap );
+ }
+ return displayMap;
+ }
+
+ /** maps the given display to the thread local display map
+ * and notifies all threads synchronized to this display map. */
+ protected static Display setCurrentDisplay(Display display) {
+ Map displayMap = getCurrentDisplayMap();
+ Display oldDisplay = null;
+ synchronized(displayMap) {
+ String name = display.getName();
+ if(null==name) name="nil";
+ oldDisplay = (Display) displayMap.put(name, display);
+ displayMap.notifyAll();
+ }
+ return oldDisplay;
+ }
+
+ /** removes the mapping of the given name from the thread local display map
+ * and notifies all threads synchronized to this display map. */
+ protected static Display removeCurrentDisplay(String name) {
+ if(null==name) name="nil";
+ Map displayMap = getCurrentDisplayMap();
+ Display oldDisplay = null;
+ synchronized(displayMap) {
+ oldDisplay = (Display) displayMap.remove(name);
+ displayMap.notifyAll();
+ }
+ return oldDisplay;
+ }
+
+ /** Returns the thread local display mapped to the given name */
+ public static Display getCurrentDisplay(String name) {
+ if(null==name) name="nil";
+ Map displayMap = getCurrentDisplayMap();
+ Display display = (Display) displayMap.get(name);
+ return display;
+ }
+
+ public static void dumpDisplayMap(String prefix) {
+ Map displayMap = getCurrentDisplayMap();
+ Set entrySet = displayMap.entrySet();
+ Iterator i = entrySet.iterator();
+ System.err.println(prefix+" DisplayMap["+entrySet.size()+"] "+Thread.currentThread());
+ for(int j=0; i.hasNext(); j++) {
+ Map.Entry entry = (Map.Entry) i.next();
+ System.err.println(" ["+j+"] "+entry.getKey()+" -> "+entry.getValue());
+ }
+ }
+
+ /** Returns the thread local display collection */
+ public static Collection getCurrentDisplays() {
+ return getCurrentDisplayMap().values();
+ }
+
+ /** Make sure to reuse a Display with the same name */
+ protected static Display create(String type, String name) {
+ try {
+ if(DEBUG) {
+ dumpDisplayMap("Display.create("+name+") BEGIN");
+ }
+ Display display = getCurrentDisplay(name);
+ if(null==display) {
+ Class displayClass = getDisplayClass(type);
+ display = (Display) displayClass.newInstance();
+ display.name=name;
+ display.refCount=1;
+
+ if(NewtFactory.useEDT()) {
+ Thread current = Thread.currentThread();
+ display.eventDispatchThread = new EventDispatchThread(display, current.getThreadGroup(), current.getName());
+ display.eventDispatchThread.start();
+ final Display f_dpy = display;
+ display.eventDispatchThread.invokeAndWait(new Runnable() {
+ public void run() {
+ f_dpy.createNative();
+ }
+ } );
+ } else {
+ display.createNative();
+ }
+ if(null==display.aDevice) {
+ throw new RuntimeException("Display.createNative() failed to instanciate an AbstractGraphicsDevice");
+ }
+ setCurrentDisplay(display);
+ if(DEBUG) {
+ System.err.println("Display.create("+name+") NEW: "+display+" "+Thread.currentThread());
+ }
+ } else {
+ synchronized(display) {
+ display.refCount++;
+ if(DEBUG) {
+ System.err.println("Display.create("+name+") REUSE: refCount "+display.refCount+", "+display+" "+Thread.currentThread());
+ }
+ }
+ }
+ if(DEBUG) {
+ dumpDisplayMap("Display.create("+name+") END");
+ }
+ return display;
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ protected static Display wrapHandle(String type, String name, AbstractGraphicsDevice aDevice) {
+ try {
+ Class displayClass = getDisplayClass(type);
+ Display display = (Display) displayClass.newInstance();
+ display.name=name;
+ display.aDevice=aDevice;
+ return display;
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public EventDispatchThread getEDT() { return eventDispatchThread; }
+
+ public synchronized void destroy() {
+ if(DEBUG) {
+ dumpDisplayMap("Display.destroy("+name+") BEGIN");
+ }
+ refCount--;
+ if(0==refCount) {
+ removeCurrentDisplay(name);
+ if(DEBUG) {
+ System.err.println("Display.destroy("+name+") REMOVE: "+this+" "+Thread.currentThread());
+ }
+ if(null!=eventDispatchThread) {
+ final Display f_dpy = this;
+ final EventDispatchThread f_edt = eventDispatchThread;
+ eventDispatchThread.invokeAndWait(new Runnable() {
+ public void run() {
+ f_dpy.closeNative();
+ f_edt.stop();
+ }
+ } );
+ } else {
+ closeNative();
+ }
+ if(null!=eventDispatchThread) {
+ eventDispatchThread.waitUntilStopped();
+ eventDispatchThread=null;
+ }
+ aDevice = null;
+ } else {
+ if(DEBUG) {
+ System.err.println("Display.destroy("+name+") KEEP: refCount "+refCount+", "+this+" "+Thread.currentThread());
+ }
+ }
+ if(DEBUG) {
+ dumpDisplayMap("Display.destroy("+name+") END");
+ }
+ }
+
+ protected abstract void createNative();
+ protected abstract void closeNative();
+
+ public String getName() {
+ return name;
+ }
+
+ public long getHandle() {
+ if(null!=aDevice) {
+ return aDevice.getHandle();
+ }
+ return 0;
+ }
+
+ public AbstractGraphicsDevice getGraphicsDevice() {
+ return aDevice;
+ }
+
+ public void pumpMessages() {
+ if(null!=eventDispatchThread) {
+ dispatchMessages();
+ } else {
+ synchronized(this) {
+ dispatchMessages();
+ }
+ }
+ }
+
+ public String toString() {
+ return "NEWT-Display["+name+", refCount "+refCount+", "+aDevice+"]";
+ }
+
+ protected abstract void dispatchMessages();
+
+ /** Default impl. nop - Currently only X11 needs a Display lock */
+ protected void lockDisplay() { }
+
+ /** Default impl. nop - Currently only X11 needs a Display lock */
+ protected void unlockDisplay() { }
+
+ protected EventDispatchThread eventDispatchThread = null;
+ protected String name;
+ protected int refCount;
+ protected AbstractGraphicsDevice aDevice;
+}
+
diff --git a/src/newt/classes/com/jogamp/newt/Event.java b/src/newt/classes/com/jogamp/newt/Event.java
new file mode 100644
index 000000000..d42a95735
--- /dev/null
+++ b/src/newt/classes/com/jogamp/newt/Event.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.newt;
+
+public class Event {
+ private boolean isSystemEvent;
+ private int eventType;
+ private Window source;
+ private long when;
+
+ Event(boolean isSystemEvent, int eventType, Window source, long when) {
+ this.isSystemEvent = isSystemEvent;
+ this.eventType = eventType;
+ this.source = source;
+ this.when = when;
+ }
+
+ protected Event(int eventType, Window source, long when) {
+ this(false, eventType, source, when);
+ }
+
+ /** Indicates whether this event was produced by the system or
+ generated by user code. */
+ public final boolean isSystemEvent() {
+ return isSystemEvent;
+ }
+
+ /** Returns the event type of this event. */
+ public final int getEventType() {
+ return eventType;
+ }
+
+ /** Returns the source Window which produced this Event. */
+ public final Window getSource() {
+ return source;
+ }
+
+ /** Returns the timestamp, in milliseconds, of this event. */
+ public final long getWhen() {
+ return when;
+ }
+
+ public String toString() {
+ return "Event[sys:"+isSystemEvent()+", source:"+getSource()+", when:"+getWhen()+"]";
+ }
+
+ public static String toHexString(int hex) {
+ return "0x" + Integer.toHexString(hex);
+ }
+
+ public static String toHexString(long hex) {
+ return "0x" + Long.toHexString(hex);
+ }
+
+}
diff --git a/src/newt/classes/com/jogamp/newt/EventListener.java b/src/newt/classes/com/jogamp/newt/EventListener.java
new file mode 100644
index 000000000..75cb487dd
--- /dev/null
+++ b/src/newt/classes/com/jogamp/newt/EventListener.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.newt;
+
+public interface EventListener
+{
+ public static final int WINDOW = 1 << 0;
+ public static final int MOUSE = 1 << 1;
+ public static final int KEY = 1 << 2;
+ public static final int SURFACE = 1 << 3;
+
+}
+
diff --git a/src/newt/classes/com/jogamp/newt/InputEvent.java b/src/newt/classes/com/jogamp/newt/InputEvent.java
new file mode 100644
index 000000000..d4c3f6905
--- /dev/null
+++ b/src/newt/classes/com/jogamp/newt/InputEvent.java
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.newt;
+
+public abstract class InputEvent extends Event
+{
+ public static final int SHIFT_MASK = 1 << 0;
+ public static final int CTRL_MASK = 1 << 1;
+ public static final int META_MASK = 1 << 2;
+ public static final int ALT_MASK = 1 << 3;
+ public static final int ALT_GRAPH_MASK = 1 << 5;
+ public static final int BUTTON1_MASK = 1 << 6;
+ public static final int BUTTON2_MASK = 1 << 7;
+ public static final int BUTTON3_MASK = 1 << 8;
+
+ protected InputEvent(boolean sysEvent, int eventType, Window source, long when, int modifiers) {
+ super(sysEvent, eventType, source, when);
+ this.consumed=false;
+ this.modifiers=modifiers;
+ }
+
+ public void consume() {
+ consumed=true;
+ }
+
+ public boolean isConsumed() {
+ return consumed;
+ }
+ public int getModifiers() {
+ return modifiers;
+ }
+ public boolean isAltDown() {
+ return (modifiers&ALT_MASK)!=0;
+ }
+ public boolean isAltGraphDown() {
+ return (modifiers&ALT_GRAPH_MASK)!=0;
+ }
+ public boolean isControlDown() {
+ return (modifiers&CTRL_MASK)!=0;
+ }
+ public boolean isMetaDown() {
+ return (modifiers&META_MASK)!=0;
+ }
+ public boolean isShiftDown() {
+ return (modifiers&SHIFT_MASK)!=0;
+ }
+
+ public boolean isButton1Down() {
+ return (modifiers&BUTTON1_MASK)!=0;
+ }
+
+ public boolean isButton2Down() {
+ return (modifiers&BUTTON2_MASK)!=0;
+ }
+
+ public boolean isButton3Down() {
+ return (modifiers&BUTTON3_MASK)!=0;
+ }
+
+ public String toString() {
+ return "InputEvent[modifiers:"+modifiers+"]";
+ }
+
+ private boolean consumed;
+ private int modifiers;
+}
diff --git a/src/newt/classes/com/jogamp/newt/Insets.java b/src/newt/classes/com/jogamp/newt/Insets.java
new file mode 100644
index 000000000..e440892f0
--- /dev/null
+++ b/src/newt/classes/com/jogamp/newt/Insets.java
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+package com.jogamp.newt;
+
+/**
+ * Simple class representing insets.
+ *
+ * @author tdv
+ */
+public class Insets implements Cloneable {
+ public int top;
+ public int left;
+ public int bottom;
+ public int right;
+
+ /**
+ * Creates and initializes a new Insets
object with the
+ * specified top, left, bottom, and right insets.
+ * @param top the inset from the top.
+ * @param left the inset from the left.
+ * @param bottom the inset from the bottom.
+ * @param right the inset from the right.
+ */
+ public Insets(int top, int left, int bottom, int right) {
+ this.top = top;
+ this.left = left;
+ this.bottom = bottom;
+ this.right = right;
+ }
+
+ /**
+ * Checks whether two insets objects are equal. Two instances
+ * of Insets
are equal if the four integer values
+ * of the fields top
, left
,
+ * bottom
, and right
are all equal.
+ * @return true
if the two insets are equal;
+ * otherwise false
.
+ */
+ public boolean equals(Object obj) {
+ if (obj instanceof Insets) {
+ Insets insets = (Insets)obj;
+ return ((top == insets.top) && (left == insets.left) &&
+ (bottom == insets.bottom) && (right == insets.right));
+ }
+ return false;
+ }
+
+ /**
+ * Returns the hash code for this Insets.
+ *
+ * @return a hash code for this Insets.
+ */
+ public int hashCode() {
+ int sum1 = left + bottom;
+ int sum2 = right + top;
+ int val1 = sum1 * (sum1 + 1)/2 + left;
+ int val2 = sum2 * (sum2 + 1)/2 + top;
+ int sum3 = val1 + val2;
+ return sum3 * (sum3 + 1)/2 + val2;
+ }
+
+ public String toString() {
+ return getClass().getName() + "[top=" + top + ",left=" + left +
+ ",bottom=" + bottom + ",right=" + right + "]";
+ }
+
+ public Object clone() {
+ try {
+ return super.clone();
+ } catch (CloneNotSupportedException ex) {
+ throw new InternalError();
+ }
+ }
+
+}
diff --git a/src/newt/classes/com/jogamp/newt/KeyEvent.java b/src/newt/classes/com/jogamp/newt/KeyEvent.java
new file mode 100644
index 000000000..bec77160b
--- /dev/null
+++ b/src/newt/classes/com/jogamp/newt/KeyEvent.java
@@ -0,0 +1,738 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.newt;
+
+public class KeyEvent extends InputEvent
+{
+ KeyEvent(boolean sysEvent, int eventType, Window source, long when, int modifiers, int keyCode, char keyChar) {
+ super(sysEvent, eventType, source, when, modifiers);
+ this.keyCode=keyCode;
+ this.keyChar=keyChar;
+ }
+ public KeyEvent(int eventType, Window source, long when, int modifiers, int keyCode, char keyChar) {
+ this(false, eventType, source, when, modifiers, keyCode, keyChar);
+ }
+
+ public char getKeyChar() {
+ return keyChar;
+ }
+ public int getKeyCode() {
+ return keyCode;
+ }
+
+ public String toString() {
+ return "KeyEvent["+getEventTypeString(getEventType())+
+ ", code "+keyCode+"("+toHexString(keyCode)+"), char <"+keyChar+"> ("+toHexString((int)keyChar)+"), isActionKey "+isActionKey()+", "+super.toString()+"]";
+ }
+
+ public static String getEventTypeString(int type) {
+ switch(type) {
+ case EVENT_KEY_PRESSED: return "EVENT_KEY_PRESSED";
+ case EVENT_KEY_RELEASED: return "EVENT_KEY_RELEASED";
+ case EVENT_KEY_TYPED: return "EVENT_KEY_TYPED";
+ default: return "unknown (" + type + ")";
+ }
+ }
+
+ public boolean isActionKey() {
+ switch (keyCode) {
+ case VK_HOME:
+ case VK_END:
+ case VK_PAGE_UP:
+ case VK_PAGE_DOWN:
+ case VK_UP:
+ case VK_DOWN:
+ case VK_LEFT:
+ case VK_RIGHT:
+
+ case VK_F1:
+ case VK_F2:
+ case VK_F3:
+ case VK_F4:
+ case VK_F5:
+ case VK_F6:
+ case VK_F7:
+ case VK_F8:
+ case VK_F9:
+ case VK_F10:
+ case VK_F11:
+ case VK_F12:
+ case VK_F13:
+ case VK_F14:
+ case VK_F15:
+ case VK_F16:
+ case VK_F17:
+ case VK_F18:
+ case VK_F19:
+ case VK_F20:
+ case VK_F21:
+ case VK_F22:
+ case VK_F23:
+ case VK_F24:
+ case VK_PRINTSCREEN:
+ case VK_CAPS_LOCK:
+ case VK_PAUSE:
+ case VK_INSERT:
+
+ case VK_HELP:
+ case VK_WINDOWS:
+ return true;
+ }
+ return false;
+ }
+
+ private int keyCode;
+ private char keyChar;
+
+ public static final int EVENT_KEY_PRESSED = 300;
+ public static final int EVENT_KEY_RELEASED= 301;
+ public static final int EVENT_KEY_TYPED = 302;
+
+ /* Virtual key codes. */
+
+ public static final int VK_ENTER = '\n';
+ public static final int VK_BACK_SPACE = '\b';
+ public static final int VK_TAB = '\t';
+ public static final int VK_CANCEL = 0x03;
+ public static final int VK_CLEAR = 0x0C;
+ public static final int VK_SHIFT = 0x10;
+ public static final int VK_CONTROL = 0x11;
+ public static final int VK_ALT = 0x12;
+ public static final int VK_PAUSE = 0x13;
+ public static final int VK_CAPS_LOCK = 0x14;
+ public static final int VK_ESCAPE = 0x1B;
+ public static final int VK_SPACE = 0x20;
+ public static final int VK_PAGE_UP = 0x21;
+ public static final int VK_PAGE_DOWN = 0x22;
+ public static final int VK_END = 0x23;
+ public static final int VK_HOME = 0x24;
+
+ /**
+ * Constant for the non-numpad left arrow key.
+ * @see #VK_KP_LEFT
+ */
+ public static final int VK_LEFT = 0x25;
+
+ /**
+ * Constant for the non-numpad up arrow key.
+ * @see #VK_KP_UP
+ */
+ public static final int VK_UP = 0x26;
+
+ /**
+ * Constant for the non-numpad right arrow key.
+ * @see #VK_KP_RIGHT
+ */
+ public static final int VK_RIGHT = 0x27;
+
+ /**
+ * Constant for the non-numpad down arrow key.
+ * @see #VK_KP_DOWN
+ */
+ public static final int VK_DOWN = 0x28;
+
+ /**
+ * Constant for the comma key, ","
+ */
+ public static final int VK_COMMA = 0x2C;
+
+ /**
+ * Constant for the minus key, "-"
+ * @since 1.2
+ */
+ public static final int VK_MINUS = 0x2D;
+
+ /**
+ * Constant for the period key, "."
+ */
+ public static final int VK_PERIOD = 0x2E;
+
+ /**
+ * Constant for the forward slash key, "/"
+ */
+ public static final int VK_SLASH = 0x2F;
+
+ /** VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39) */
+ public static final int VK_0 = 0x30;
+ public static final int VK_1 = 0x31;
+ public static final int VK_2 = 0x32;
+ public static final int VK_3 = 0x33;
+ public static final int VK_4 = 0x34;
+ public static final int VK_5 = 0x35;
+ public static final int VK_6 = 0x36;
+ public static final int VK_7 = 0x37;
+ public static final int VK_8 = 0x38;
+ public static final int VK_9 = 0x39;
+
+ /**
+ * Constant for the semicolon key, ";"
+ */
+ public static final int VK_SEMICOLON = 0x3B;
+
+ /**
+ * Constant for the equals key, "="
+ */
+ public static final int VK_EQUALS = 0x3D;
+
+ /** VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) */
+ public static final int VK_A = 0x41;
+ public static final int VK_B = 0x42;
+ public static final int VK_C = 0x43;
+ public static final int VK_D = 0x44;
+ public static final int VK_E = 0x45;
+ public static final int VK_F = 0x46;
+ public static final int VK_G = 0x47;
+ public static final int VK_H = 0x48;
+ public static final int VK_I = 0x49;
+ public static final int VK_J = 0x4A;
+ public static final int VK_K = 0x4B;
+ public static final int VK_L = 0x4C;
+ public static final int VK_M = 0x4D;
+ public static final int VK_N = 0x4E;
+ public static final int VK_O = 0x4F;
+ public static final int VK_P = 0x50;
+ public static final int VK_Q = 0x51;
+ public static final int VK_R = 0x52;
+ public static final int VK_S = 0x53;
+ public static final int VK_T = 0x54;
+ public static final int VK_U = 0x55;
+ public static final int VK_V = 0x56;
+ public static final int VK_W = 0x57;
+ public static final int VK_X = 0x58;
+ public static final int VK_Y = 0x59;
+ public static final int VK_Z = 0x5A;
+
+ /**
+ * Constant for the open bracket key, "["
+ */
+ public static final int VK_OPEN_BRACKET = 0x5B;
+
+ /**
+ * Constant for the back slash key, "\"
+ */
+ public static final int VK_BACK_SLASH = 0x5C;
+
+ /**
+ * Constant for the close bracket key, "]"
+ */
+ public static final int VK_CLOSE_BRACKET = 0x5D;
+
+ public static final int VK_NUMPAD0 = 0x60;
+ public static final int VK_NUMPAD1 = 0x61;
+ public static final int VK_NUMPAD2 = 0x62;
+ public static final int VK_NUMPAD3 = 0x63;
+ public static final int VK_NUMPAD4 = 0x64;
+ public static final int VK_NUMPAD5 = 0x65;
+ public static final int VK_NUMPAD6 = 0x66;
+ public static final int VK_NUMPAD7 = 0x67;
+ public static final int VK_NUMPAD8 = 0x68;
+ public static final int VK_NUMPAD9 = 0x69;
+ public static final int VK_MULTIPLY = 0x6A;
+ public static final int VK_ADD = 0x6B;
+
+ /**
+ * This constant is obsolete, and is included only for backwards
+ * compatibility.
+ * @see #VK_SEPARATOR
+ */
+ public static final int VK_SEPARATER = 0x6C;
+
+ /**
+ * Constant for the Numpad Separator key.
+ * @since 1.4
+ */
+ public static final int VK_SEPARATOR = VK_SEPARATER;
+
+ public static final int VK_SUBTRACT = 0x6D;
+ public static final int VK_DECIMAL = 0x6E;
+ public static final int VK_DIVIDE = 0x6F;
+ public static final int VK_DELETE = 0x7F; /* ASCII DEL */
+ public static final int VK_NUM_LOCK = 0x90;
+ public static final int VK_SCROLL_LOCK = 0x91;
+
+ /** Constant for the F1 function key. */
+ public static final int VK_F1 = 0x70;
+
+ /** Constant for the F2 function key. */
+ public static final int VK_F2 = 0x71;
+
+ /** Constant for the F3 function key. */
+ public static final int VK_F3 = 0x72;
+
+ /** Constant for the F4 function key. */
+ public static final int VK_F4 = 0x73;
+
+ /** Constant for the F5 function key. */
+ public static final int VK_F5 = 0x74;
+
+ /** Constant for the F6 function key. */
+ public static final int VK_F6 = 0x75;
+
+ /** Constant for the F7 function key. */
+ public static final int VK_F7 = 0x76;
+
+ /** Constant for the F8 function key. */
+ public static final int VK_F8 = 0x77;
+
+ /** Constant for the F9 function key. */
+ public static final int VK_F9 = 0x78;
+
+ /** Constant for the F10 function key. */
+ public static final int VK_F10 = 0x79;
+
+ /** Constant for the F11 function key. */
+ public static final int VK_F11 = 0x7A;
+
+ /** Constant for the F12 function key. */
+ public static final int VK_F12 = 0x7B;
+
+ /**
+ * Constant for the F13 function key.
+ * @since 1.2
+ */
+ /* F13 - F24 are used on IBM 3270 keyboard; use random range for constants. */
+ public static final int VK_F13 = 0xF000;
+
+ /**
+ * Constant for the F14 function key.
+ * @since 1.2
+ */
+ public static final int VK_F14 = 0xF001;
+
+ /**
+ * Constant for the F15 function key.
+ * @since 1.2
+ */
+ public static final int VK_F15 = 0xF002;
+
+ /**
+ * Constant for the F16 function key.
+ * @since 1.2
+ */
+ public static final int VK_F16 = 0xF003;
+
+ /**
+ * Constant for the F17 function key.
+ * @since 1.2
+ */
+ public static final int VK_F17 = 0xF004;
+
+ /**
+ * Constant for the F18 function key.
+ * @since 1.2
+ */
+ public static final int VK_F18 = 0xF005;
+
+ /**
+ * Constant for the F19 function key.
+ * @since 1.2
+ */
+ public static final int VK_F19 = 0xF006;
+
+ /**
+ * Constant for the F20 function key.
+ * @since 1.2
+ */
+ public static final int VK_F20 = 0xF007;
+
+ /**
+ * Constant for the F21 function key.
+ * @since 1.2
+ */
+ public static final int VK_F21 = 0xF008;
+
+ /**
+ * Constant for the F22 function key.
+ * @since 1.2
+ */
+ public static final int VK_F22 = 0xF009;
+
+ /**
+ * Constant for the F23 function key.
+ * @since 1.2
+ */
+ public static final int VK_F23 = 0xF00A;
+
+ /**
+ * Constant for the F24 function key.
+ * @since 1.2
+ */
+ public static final int VK_F24 = 0xF00B;
+
+ public static final int VK_PRINTSCREEN = 0x9A;
+ public static final int VK_INSERT = 0x9B;
+ public static final int VK_HELP = 0x9C;
+ public static final int VK_META = 0x9D;
+
+ public static final int VK_BACK_QUOTE = 0xC0;
+ public static final int VK_QUOTE = 0xDE;
+
+ /**
+ * Constant for the numeric keypad up arrow key.
+ * @see #VK_UP
+ * @since 1.2
+ */
+ public static final int VK_KP_UP = 0xE0;
+
+ /**
+ * Constant for the numeric keypad down arrow key.
+ * @see #VK_DOWN
+ * @since 1.2
+ */
+ public static final int VK_KP_DOWN = 0xE1;
+
+ /**
+ * Constant for the numeric keypad left arrow key.
+ * @see #VK_LEFT
+ * @since 1.2
+ */
+ public static final int VK_KP_LEFT = 0xE2;
+
+ /**
+ * Constant for the numeric keypad right arrow key.
+ * @see #VK_RIGHT
+ * @since 1.2
+ */
+ public static final int VK_KP_RIGHT = 0xE3;
+
+ /* For European keyboards */
+ /** @since 1.2 */
+ public static final int VK_DEAD_GRAVE = 0x80;
+ /** @since 1.2 */
+ public static final int VK_DEAD_ACUTE = 0x81;
+ /** @since 1.2 */
+ public static final int VK_DEAD_CIRCUMFLEX = 0x82;
+ /** @since 1.2 */
+ public static final int VK_DEAD_TILDE = 0x83;
+ /** @since 1.2 */
+ public static final int VK_DEAD_MACRON = 0x84;
+ /** @since 1.2 */
+ public static final int VK_DEAD_BREVE = 0x85;
+ /** @since 1.2 */
+ public static final int VK_DEAD_ABOVEDOT = 0x86;
+ /** @since 1.2 */
+ public static final int VK_DEAD_DIAERESIS = 0x87;
+ /** @since 1.2 */
+ public static final int VK_DEAD_ABOVERING = 0x88;
+ /** @since 1.2 */
+ public static final int VK_DEAD_DOUBLEACUTE = 0x89;
+ /** @since 1.2 */
+ public static final int VK_DEAD_CARON = 0x8a;
+ /** @since 1.2 */
+ public static final int VK_DEAD_CEDILLA = 0x8b;
+ /** @since 1.2 */
+ public static final int VK_DEAD_OGONEK = 0x8c;
+ /** @since 1.2 */
+ public static final int VK_DEAD_IOTA = 0x8d;
+ /** @since 1.2 */
+ public static final int VK_DEAD_VOICED_SOUND = 0x8e;
+ /** @since 1.2 */
+ public static final int VK_DEAD_SEMIVOICED_SOUND = 0x8f;
+
+ /** @since 1.2 */
+ public static final int VK_AMPERSAND = 0x96;
+ /** @since 1.2 */
+ public static final int VK_ASTERISK = 0x97;
+ /** @since 1.2 */
+ public static final int VK_QUOTEDBL = 0x98;
+ /** @since 1.2 */
+ public static final int VK_LESS = 0x99;
+
+ /** @since 1.2 */
+ public static final int VK_GREATER = 0xa0;
+ /** @since 1.2 */
+ public static final int VK_BRACELEFT = 0xa1;
+ /** @since 1.2 */
+ public static final int VK_BRACERIGHT = 0xa2;
+
+ /**
+ * Constant for the "@" key.
+ * @since 1.2
+ */
+ public static final int VK_AT = 0x0200;
+
+ /**
+ * Constant for the ":" key.
+ * @since 1.2
+ */
+ public static final int VK_COLON = 0x0201;
+
+ /**
+ * Constant for the "^" key.
+ * @since 1.2
+ */
+ public static final int VK_CIRCUMFLEX = 0x0202;
+
+ /**
+ * Constant for the "$" key.
+ * @since 1.2
+ */
+ public static final int VK_DOLLAR = 0x0203;
+
+ /**
+ * Constant for the Euro currency sign key.
+ * @since 1.2
+ */
+ public static final int VK_EURO_SIGN = 0x0204;
+
+ /**
+ * Constant for the "!" key.
+ * @since 1.2
+ */
+ public static final int VK_EXCLAMATION_MARK = 0x0205;
+
+ /**
+ * Constant for the inverted exclamation mark key.
+ * @since 1.2
+ */
+ public static final int VK_INVERTED_EXCLAMATION_MARK = 0x0206;
+
+ /**
+ * Constant for the "(" key.
+ * @since 1.2
+ */
+ public static final int VK_LEFT_PARENTHESIS = 0x0207;
+
+ /**
+ * Constant for the "#" key.
+ * @since 1.2
+ */
+ public static final int VK_NUMBER_SIGN = 0x0208;
+
+ /**
+ * Constant for the "+" key.
+ * @since 1.2
+ */
+ public static final int VK_PLUS = 0x0209;
+
+ /**
+ * Constant for the ")" key.
+ * @since 1.2
+ */
+ public static final int VK_RIGHT_PARENTHESIS = 0x020A;
+
+ /**
+ * Constant for the "_" key.
+ * @since 1.2
+ */
+ public static final int VK_UNDERSCORE = 0x020B;
+
+ /**
+ * Constant for the Microsoft Windows "Windows" key.
+ * It is used for both the left and right version of the key.
+ * @see #getKeyLocation()
+ * @since 1.5
+ */
+ public static final int VK_WINDOWS = 0x020C;
+
+ /**
+ * Constant for the Microsoft Windows Context Menu key.
+ * @since 1.5
+ */
+ public static final int VK_CONTEXT_MENU = 0x020D;
+
+ /* for input method support on Asian Keyboards */
+
+ /* not clear what this means - listed in Microsoft Windows API */
+ public static final int VK_FINAL = 0x0018;
+
+ /** Constant for the Convert function key. */
+ /* Japanese PC 106 keyboard, Japanese Solaris keyboard: henkan */
+ public static final int VK_CONVERT = 0x001C;
+
+ /** Constant for the Don't Convert function key. */
+ /* Japanese PC 106 keyboard: muhenkan */
+ public static final int VK_NONCONVERT = 0x001D;
+
+ /** Constant for the Accept or Commit function key. */
+ /* Japanese Solaris keyboard: kakutei */
+ public static final int VK_ACCEPT = 0x001E;
+
+ /* not clear what this means - listed in Microsoft Windows API */
+ public static final int VK_MODECHANGE = 0x001F;
+
+ /* replaced by VK_KANA_LOCK for Microsoft Windows and Solaris;
+ might still be used on other platforms */
+ public static final int VK_KANA = 0x0015;
+
+ /* replaced by VK_INPUT_METHOD_ON_OFF for Microsoft Windows and Solaris;
+ might still be used for other platforms */
+ public static final int VK_KANJI = 0x0019;
+
+ /**
+ * Constant for the Alphanumeric function key.
+ * @since 1.2
+ */
+ /* Japanese PC 106 keyboard: eisuu */
+ public static final int VK_ALPHANUMERIC = 0x00F0;
+
+ /**
+ * Constant for the Katakana function key.
+ * @since 1.2
+ */
+ /* Japanese PC 106 keyboard: katakana */
+ public static final int VK_KATAKANA = 0x00F1;
+
+ /**
+ * Constant for the Hiragana function key.
+ * @since 1.2
+ */
+ /* Japanese PC 106 keyboard: hiragana */
+ public static final int VK_HIRAGANA = 0x00F2;
+
+ /**
+ * Constant for the Full-Width Characters function key.
+ * @since 1.2
+ */
+ /* Japanese PC 106 keyboard: zenkaku */
+ public static final int VK_FULL_WIDTH = 0x00F3;
+
+ /**
+ * Constant for the Half-Width Characters function key.
+ * @since 1.2
+ */
+ /* Japanese PC 106 keyboard: hankaku */
+ public static final int VK_HALF_WIDTH = 0x00F4;
+
+ /**
+ * Constant for the Roman Characters function key.
+ * @since 1.2
+ */
+ /* Japanese PC 106 keyboard: roumaji */
+ public static final int VK_ROMAN_CHARACTERS = 0x00F5;
+
+ /**
+ * Constant for the All Candidates function key.
+ * @since 1.2
+ */
+ /* Japanese PC 106 keyboard - VK_CONVERT + ALT: zenkouho */
+ public static final int VK_ALL_CANDIDATES = 0x0100;
+
+ /**
+ * Constant for the Previous Candidate function key.
+ * @since 1.2
+ */
+ /* Japanese PC 106 keyboard - VK_CONVERT + SHIFT: maekouho */
+ public static final int VK_PREVIOUS_CANDIDATE = 0x0101;
+
+ /**
+ * Constant for the Code Input function key.
+ * @since 1.2
+ */
+ /* Japanese PC 106 keyboard - VK_ALPHANUMERIC + ALT: kanji bangou */
+ public static final int VK_CODE_INPUT = 0x0102;
+
+ /**
+ * Constant for the Japanese-Katakana function key.
+ * This key switches to a Japanese input method and selects its Katakana input mode.
+ * @since 1.2
+ */
+ /* Japanese Macintosh keyboard - VK_JAPANESE_HIRAGANA + SHIFT */
+ public static final int VK_JAPANESE_KATAKANA = 0x0103;
+
+ /**
+ * Constant for the Japanese-Hiragana function key.
+ * This key switches to a Japanese input method and selects its Hiragana input mode.
+ * @since 1.2
+ */
+ /* Japanese Macintosh keyboard */
+ public static final int VK_JAPANESE_HIRAGANA = 0x0104;
+
+ /**
+ * Constant for the Japanese-Roman function key.
+ * This key switches to a Japanese input method and selects its Roman-Direct input mode.
+ * @since 1.2
+ */
+ /* Japanese Macintosh keyboard */
+ public static final int VK_JAPANESE_ROMAN = 0x0105;
+
+ /**
+ * Constant for the locking Kana function key.
+ * This key locks the keyboard into a Kana layout.
+ * @since 1.3
+ */
+ /* Japanese PC 106 keyboard with special Windows driver - eisuu + Control; Japanese Solaris keyboard: kana */
+ public static final int VK_KANA_LOCK = 0x0106;
+
+ /**
+ * Constant for the input method on/off key.
+ * @since 1.3
+ */
+ /* Japanese PC 106 keyboard: kanji. Japanese Solaris keyboard: nihongo */
+ public static final int VK_INPUT_METHOD_ON_OFF = 0x0107;
+
+ /* for Sun keyboards */
+ /** @since 1.2 */
+ public static final int VK_CUT = 0xFFD1;
+ /** @since 1.2 */
+ public static final int VK_COPY = 0xFFCD;
+ /** @since 1.2 */
+ public static final int VK_PASTE = 0xFFCF;
+ /** @since 1.2 */
+ public static final int VK_UNDO = 0xFFCB;
+ /** @since 1.2 */
+ public static final int VK_AGAIN = 0xFFC9;
+ /** @since 1.2 */
+ public static final int VK_FIND = 0xFFD0;
+ /** @since 1.2 */
+ public static final int VK_PROPS = 0xFFCA;
+ /** @since 1.2 */
+ public static final int VK_STOP = 0xFFC8;
+
+ /**
+ * Constant for the Compose function key.
+ * @since 1.2
+ */
+ public static final int VK_COMPOSE = 0xFF20;
+
+ /**
+ * Constant for the AltGraph function key.
+ * @since 1.2
+ */
+ public static final int VK_ALT_GRAPH = 0xFF7E;
+
+ /**
+ * Constant for the Begin key.
+ * @since 1.5
+ */
+ public static final int VK_BEGIN = 0xFF58;
+
+ /**
+ * This value is used to indicate that the keyCode is unknown.
+ * KEY_TYPED events do not have a keyCode value; this value
+ * is used instead.
+ */
+ public static final int VK_UNDEFINED = 0x0;
+}
+
diff --git a/src/newt/classes/com/jogamp/newt/KeyListener.java b/src/newt/classes/com/jogamp/newt/KeyListener.java
new file mode 100644
index 000000000..28e2b833b
--- /dev/null
+++ b/src/newt/classes/com/jogamp/newt/KeyListener.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.newt;
+
+public interface KeyListener extends EventListener
+{
+ public void keyPressed(KeyEvent e);
+ public void keyReleased(KeyEvent e);
+ public void keyTyped(KeyEvent e) ;
+}
+
diff --git a/src/newt/classes/com/jogamp/newt/MouseEvent.java b/src/newt/classes/com/jogamp/newt/MouseEvent.java
new file mode 100644
index 000000000..d5412c0cc
--- /dev/null
+++ b/src/newt/classes/com/jogamp/newt/MouseEvent.java
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.newt;
+
+public class MouseEvent extends InputEvent
+{
+ public static final int BUTTON1 = 1;
+ public static final int BUTTON2 = 2;
+ public static final int BUTTON3 = 3;
+ public static final int BUTTON4 = 4;
+ public static final int BUTTON5 = 5;
+ public static final int BUTTON6 = 6;
+ public static final int BUTTON_NUMBER = 6;
+
+ protected MouseEvent(boolean sysEvent, int eventType, Window source, long when,
+ int modifiers, int x, int y, int clickCount, int button,
+ int rotation)
+ {
+ super(sysEvent, eventType, source, when, modifiers);
+ this.x=x;
+ this.y=y;
+ this.clickCount=clickCount;
+ this.button=button;
+ this.wheelRotation = rotation;
+ }
+ public MouseEvent(int eventType, Window source, long when, int modifiers,
+ int x, int y, int clickCount, int button, int rotation) {
+ this(false, eventType, source, when, modifiers, x, y, clickCount, button,
+ rotation);
+ }
+
+ public int getButton() {
+ return button;
+ }
+ public int getClickCount() {
+ return clickCount;
+ }
+ public int getX() {
+ return x;
+ }
+ public int getY() {
+ return y;
+ }
+ public int getWheelRotation() {
+ return wheelRotation;
+ }
+
+ public String toString() {
+ return "MouseEvent["+getEventTypeString(getEventType())+
+ ", "+x+"/"+y+", button "+button+", count "+clickCount+
+ ", wheel rotation "+wheelRotation+
+ ", "+super.toString()+"]";
+ }
+
+ public static String getEventTypeString(int type) {
+ switch(type) {
+ case EVENT_MOUSE_CLICKED: return "EVENT_MOUSE_CLICKED";
+ case EVENT_MOUSE_ENTERED: return "EVENT_MOUSE_ENTERED";
+ case EVENT_MOUSE_EXITED: return "EVENT_MOUSE_EXITED";
+ case EVENT_MOUSE_PRESSED: return "EVENT_MOUSE_PRESSED";
+ case EVENT_MOUSE_RELEASED: return "EVENT_MOUSE_RELEASED";
+ case EVENT_MOUSE_MOVED: return "EVENT_MOUSE_MOVED";
+ case EVENT_MOUSE_DRAGGED: return "EVENT_MOUSE_DRAGGED";
+ case EVENT_MOUSE_WHEEL_MOVED: return "EVENT_MOUSE_WHEEL_MOVED";
+ default: return "unknown (" + type + ")";
+ }
+ }
+
+ private int x, y, clickCount, button, wheelRotation;
+
+ public static final int EVENT_MOUSE_CLICKED = 200;
+ public static final int EVENT_MOUSE_ENTERED = 201;
+ public static final int EVENT_MOUSE_EXITED = 202;
+ public static final int EVENT_MOUSE_PRESSED = 203;
+ public static final int EVENT_MOUSE_RELEASED = 204;
+ public static final int EVENT_MOUSE_MOVED = 205;
+ public static final int EVENT_MOUSE_DRAGGED = 206;
+ public static final int EVENT_MOUSE_WHEEL_MOVED = 207;
+}
diff --git a/src/newt/classes/com/jogamp/newt/MouseListener.java b/src/newt/classes/com/jogamp/newt/MouseListener.java
new file mode 100644
index 000000000..6d931dd31
--- /dev/null
+++ b/src/newt/classes/com/jogamp/newt/MouseListener.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.newt;
+
+public interface MouseListener extends EventListener
+{
+ public void mouseClicked(MouseEvent e);
+ public void mouseEntered(MouseEvent e);
+ public void mouseExited(MouseEvent e);
+ public void mousePressed(MouseEvent e);
+ public void mouseReleased(MouseEvent e);
+ public void mouseMoved(MouseEvent e);
+ public void mouseDragged(MouseEvent e);
+ public void mouseWheelMoved(MouseEvent e);
+}
+
diff --git a/src/newt/classes/com/jogamp/newt/NewtFactory.java b/src/newt/classes/com/jogamp/newt/NewtFactory.java
new file mode 100755
index 000000000..2a696aa07
--- /dev/null
+++ b/src/newt/classes/com/jogamp/newt/NewtFactory.java
@@ -0,0 +1,181 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.newt;
+
+import javax.media.nativewindow.*;
+import java.util.ArrayList;
+import java.util.Iterator;
+import com.jogamp.nativewindow.impl.jvm.JVMUtil;
+
+public abstract class NewtFactory {
+ // Work-around for initialization order problems on Mac OS X
+ // between native Newt and (apparently) Fmod
+ static {
+ JVMUtil.initSingleton();
+ Window.init(NativeWindowFactory.getNativeWindowType(true));
+ }
+
+ static Class getCustomClass(String packageName, String classBaseName) {
+ Class clazz = null;
+ if(packageName!=null || classBaseName!=null) {
+ String clazzName = packageName + "." + classBaseName ;
+ try {
+ clazz = Class.forName(clazzName);
+ } catch (Throwable t) {}
+ }
+ return clazz;
+ }
+
+ private static boolean useEDT = true;
+
+ /**
+ * Toggles the usage of an EventDispatchThread while creating a Display.
+ * The default is enabled.
+ * The EventDispatchThread is thread local to the Display instance.
+ */
+ public static synchronized void setUseEDT(boolean onoff) {
+ useEDT = onoff;
+ }
+
+ /** @see #setUseEDT(boolean) */
+ public static boolean useEDT() { return useEDT; }
+
+ /**
+ * Create a Display entity, incl native creation
+ */
+ public static Display createDisplay(String name) {
+ return Display.create(NativeWindowFactory.getNativeWindowType(true), name);
+ }
+
+ /**
+ * Create a Display entity using the given implementation type, incl native creation
+ */
+ public static Display createDisplay(String type, String name) {
+ return Display.create(type, name);
+ }
+
+ /**
+ * Create a Screen entity, incl native creation
+ */
+ public static Screen createScreen(Display display, int index) {
+ return Screen.create(NativeWindowFactory.getNativeWindowType(true), display, index);
+ }
+
+ /**
+ * Create a Screen entity using the given implementation type, incl native creation
+ */
+ public static Screen createScreen(String type, Display display, int index) {
+ return Screen.create(type, display, index);
+ }
+
+ /**
+ * Create a Window entity, incl native creation
+ */
+ public static Window createWindow(Screen screen, Capabilities caps) {
+ return Window.create(NativeWindowFactory.getNativeWindowType(true), 0, screen, caps, false);
+ }
+
+ public static Window createWindow(Screen screen, Capabilities caps, boolean undecorated) {
+ return Window.create(NativeWindowFactory.getNativeWindowType(true), 0, screen, caps, undecorated);
+ }
+
+ public static Window createWindow(long parentWindowHandle, Screen screen, Capabilities caps, boolean undecorated) {
+ return Window.create(NativeWindowFactory.getNativeWindowType(true), parentWindowHandle, screen, caps, undecorated);
+ }
+
+ /**
+ * Ability to try a Window type with a construnctor argument, if supported .. AWTWindow(Frame frame)
,
+ * to support an external created AWT Frame, ie the browsers embedded frame.
+ */
+ public static Window createWindow(Object[] cstrArguments, Screen screen, Capabilities caps, boolean undecorated) {
+ return Window.create(NativeWindowFactory.getNativeWindowType(true), cstrArguments, screen, caps, undecorated);
+ }
+
+ /**
+ * Create a Window entity using the given implementation type, incl native creation
+ */
+ public static Window createWindow(String type, Screen screen, Capabilities caps) {
+ return Window.create(type, 0, screen, caps, false);
+ }
+
+ public static Window createWindow(String type, Screen screen, Capabilities caps, boolean undecorated) {
+ return Window.create(type, 0, screen, caps, undecorated);
+ }
+
+ public static Window createWindow(String type, long parentWindowHandle, Screen screen, Capabilities caps, boolean undecorated) {
+ return Window.create(type, parentWindowHandle, screen, caps, undecorated);
+ }
+
+ public static Window createWindow(String type, Object[] cstrArguments, Screen screen, Capabilities caps, boolean undecorated) {
+ return Window.create(type, cstrArguments, screen, caps, undecorated);
+ }
+
+ /**
+ * Instantiate a Display entity using the native handle.
+ */
+ public static Display wrapDisplay(String name, AbstractGraphicsDevice device) {
+ return Display.wrapHandle(NativeWindowFactory.getNativeWindowType(true), name, device);
+ }
+
+ /**
+ * Instantiate a Screen entity using the native handle.
+ */
+ public static Screen wrapScreen(Display display, AbstractGraphicsScreen screen) {
+ return Screen.wrapHandle(NativeWindowFactory.getNativeWindowType(true), display, screen);
+ }
+
+ /**
+ * Instantiate a Window entity using the native handle.
+ */
+ public static Window wrapWindow(Screen screen, AbstractGraphicsConfiguration config,
+ long windowHandle, boolean fullscreen, boolean visible,
+ int x, int y, int width, int height) {
+ return Window.wrapHandle(NativeWindowFactory.getNativeWindowType(true), screen, config,
+ windowHandle, fullscreen, visible, x, y, width, height);
+ }
+
+ private static final boolean instanceOf(Object obj, String clazzName) {
+ Class clazz = obj.getClass();
+ do {
+ if(clazz.getName().equals(clazzName)) {
+ return true;
+ }
+ clazz = clazz.getSuperclass();
+ } while (clazz!=null);
+ return false;
+ }
+
+}
+
diff --git a/src/newt/classes/com/jogamp/newt/OffscreenWindow.java b/src/newt/classes/com/jogamp/newt/OffscreenWindow.java
new file mode 100644
index 000000000..c9c56fc61
--- /dev/null
+++ b/src/newt/classes/com/jogamp/newt/OffscreenWindow.java
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.newt;
+
+import javax.media.nativewindow.*;
+
+public class OffscreenWindow extends Window implements SurfaceChangeable {
+
+ long surfaceHandle = 0;
+
+ public OffscreenWindow() {
+ }
+
+ static long nextWindowHandle = 0x100; // start here - a marker
+
+ protected void createNative(long parentWindowHandle, Capabilities caps) {
+ if(0!=parentWindowHandle) {
+ throw new NativeWindowException("OffscreenWindow does not support window parenting");
+ }
+ if(caps.isOnscreen()) {
+ throw new NativeWindowException("Capabilities is onscreen");
+ }
+ AbstractGraphicsScreen aScreen = screen.getGraphicsScreen();
+ config = GraphicsConfigurationFactory.getFactory(aScreen.getDevice()).chooseGraphicsConfiguration(caps, null, aScreen);
+ if (config == null) {
+ throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
+ }
+
+ synchronized(OffscreenWindow.class) {
+ windowHandle = nextWindowHandle++;
+ }
+ }
+
+ protected void closeNative() {
+ // nop
+ }
+
+ public void invalidate() {
+ super.invalidate();
+ surfaceHandle = 0;
+ }
+
+ public synchronized void destroy() {
+ surfaceHandle = 0;
+ }
+
+ public void setSurfaceHandle(long handle) {
+ surfaceHandle = handle ;
+ }
+
+ public long getSurfaceHandle() {
+ return surfaceHandle;
+ }
+
+ public void setVisible(boolean visible) {
+ if(!visible) {
+ this.visible = visible;
+ }
+ }
+
+ public void setSize(int width, int height) {
+ if(!visible) {
+ this.width = width;
+ this.height = height;
+ }
+ }
+
+ public void setPosition(int x, int y) {
+ // nop
+ }
+
+ public boolean setFullscreen(boolean fullscreen) {
+ // nop
+ return false;
+ }
+}
+
diff --git a/src/newt/classes/com/jogamp/newt/PaintEvent.java b/src/newt/classes/com/jogamp/newt/PaintEvent.java
new file mode 100755
index 000000000..51c43725a
--- /dev/null
+++ b/src/newt/classes/com/jogamp/newt/PaintEvent.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.newt;
+
+/**
+ *
+ * @author tdv
+ */
+public class PaintEvent extends Event {
+
+ // bounds of the damage region
+ private int x, y, width, height;
+ public PaintEvent(int eventType, Window source,
+ long when, int x, int y, int w, int h)
+ {
+ super(true, eventType, source, when);
+ this.x = x;
+ this.y = y;
+ this.width = w;
+ this.height = h;
+ }
+
+ public int getHeight() {
+ return height;
+ }
+
+ public int getWidth() {
+ return width;
+ }
+
+ public int getX() {
+ return x;
+ }
+
+ public int getY() {
+ return y;
+ }
+
+ public String toString() {
+ return "ExposeEvent[modifiers: x="+x+" y="+y+" w="+width+" h="+height +"]";
+ }
+
+}
diff --git a/src/newt/classes/com/jogamp/newt/PaintListener.java b/src/newt/classes/com/jogamp/newt/PaintListener.java
new file mode 100755
index 000000000..6fbc9c8fc
--- /dev/null
+++ b/src/newt/classes/com/jogamp/newt/PaintListener.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.newt;
+
+/**
+ *
+ * @author tdv
+ */
+public interface PaintListener {
+ public void exposed(PaintEvent e);
+}
diff --git a/src/newt/classes/com/jogamp/newt/Screen.java b/src/newt/classes/com/jogamp/newt/Screen.java
new file mode 100755
index 000000000..b393d30de
--- /dev/null
+++ b/src/newt/classes/com/jogamp/newt/Screen.java
@@ -0,0 +1,147 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.newt;
+
+import com.jogamp.newt.impl.*;
+
+import javax.media.nativewindow.*;
+import java.security.*;
+
+public abstract class Screen {
+
+ private static Class getScreenClass(String type)
+ throws ClassNotFoundException
+ {
+ Class screenClass = NewtFactory.getCustomClass(type, "Screen");
+ if(null==screenClass) {
+ if (NativeWindowFactory.TYPE_EGL.equals(type)) {
+ screenClass = Class.forName("com.jogamp.newt.opengl.kd.KDScreen");
+ } else if (NativeWindowFactory.TYPE_WINDOWS.equals(type)) {
+ screenClass = Class.forName("com.jogamp.newt.windows.WindowsScreen");
+ } else if (NativeWindowFactory.TYPE_MACOSX.equals(type)) {
+ screenClass = Class.forName("com.jogamp.newt.macosx.MacScreen");
+ } else if (NativeWindowFactory.TYPE_X11.equals(type)) {
+ screenClass = Class.forName("com.jogamp.newt.x11.X11Screen");
+ } else if (NativeWindowFactory.TYPE_AWT.equals(type)) {
+ screenClass = Class.forName("com.jogamp.newt.awt.AWTScreen");
+ } else {
+ throw new RuntimeException("Unknown window type \"" + type + "\"");
+ }
+ }
+ return screenClass;
+ }
+
+ protected static Screen create(String type, Display display, int idx) {
+ try {
+ if(usrWidth<0 || usrHeight<0) {
+ usrWidth = Debug.getIntProperty("newt.ws.swidth", true, localACC);
+ usrHeight = Debug.getIntProperty("newt.ws.sheight", true, localACC);
+ System.out.println("User screen size "+usrWidth+"x"+usrHeight);
+ }
+ Class screenClass = getScreenClass(type);
+ Screen screen = (Screen) screenClass.newInstance();
+ screen.display = display;
+ screen.createNative(idx);
+ if(null==screen.aScreen) {
+ throw new RuntimeException("Screen.createNative() failed to instanciate an AbstractGraphicsScreen");
+ }
+ return screen;
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public synchronized void destroy() {
+ closeNative();
+ display = null;
+ aScreen = null;
+ }
+
+ protected static Screen wrapHandle(String type, Display display, AbstractGraphicsScreen aScreen) {
+ try {
+ Class screenClass = getScreenClass(type);
+ Screen screen = (Screen) screenClass.newInstance();
+ screen.display = display;
+ screen.aScreen = aScreen;
+ return screen;
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ protected abstract void createNative(int index);
+ protected abstract void closeNative();
+
+ protected void setScreenSize(int w, int h) {
+ System.out.println("Detected screen size "+w+"x"+h);
+ width=w; height=h;
+ }
+
+ public Display getDisplay() {
+ return display;
+ }
+
+ public int getIndex() {
+ return aScreen.getIndex();
+ }
+
+ public AbstractGraphicsScreen getGraphicsScreen() {
+ return aScreen;
+ }
+
+ /**
+ * The actual implementation shall return the detected display value,
+ * if not we return 800.
+ * This can be overwritten with the user property 'newt.ws.swidth',
+ */
+ public int getWidth() {
+ return (usrWidth>0) ? usrWidth : (width>0) ? width : 480;
+ }
+
+ /**
+ * The actual implementation shall return the detected display value,
+ * if not we return 480.
+ * This can be overwritten with the user property 'newt.ws.sheight',
+ */
+ public int getHeight() {
+ return (usrHeight>0) ? usrHeight : (height>0) ? height : 480;
+ }
+
+ protected Display display;
+ protected AbstractGraphicsScreen aScreen;
+ protected int width=-1, height=-1; // detected values: set using setScreenSize
+ protected static int usrWidth=-1, usrHeight=-1; // property values: newt.ws.swidth and newt.ws.sheight
+ private static AccessControlContext localACC = AccessController.getContext();
+}
+
diff --git a/src/newt/classes/com/jogamp/newt/Window.java b/src/newt/classes/com/jogamp/newt/Window.java
new file mode 100755
index 000000000..410144653
--- /dev/null
+++ b/src/newt/classes/com/jogamp/newt/Window.java
@@ -0,0 +1,929 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.newt;
+
+import com.jogamp.newt.impl.Debug;
+import com.jogamp.newt.util.EventDispatchThread;
+
+import javax.media.nativewindow.*;
+import com.jogamp.nativewindow.impl.NWReflection;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.lang.reflect.Method;
+
+public abstract class Window implements NativeWindow
+{
+ public static final boolean DEBUG_MOUSE_EVENT = Debug.debug("Window.MouseEvent");
+ public static final boolean DEBUG_KEY_EVENT = Debug.debug("Window.KeyEvent");
+ public static final boolean DEBUG_WINDOW_EVENT = Debug.debug("Window.WindowEvent");
+ public static final boolean DEBUG_IMPLEMENTATION = Debug.debug("Window");
+
+ // Workaround for initialization order problems on Mac OS X
+ // between native Newt and (apparently) Fmod -- if Fmod is
+ // initialized first then the connection to the window server
+ // breaks, leading to errors from deep within the AppKit
+ static void init(String type) {
+ if (NativeWindowFactory.TYPE_MACOSX.equals(type)) {
+ try {
+ getWindowClass(type);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ private static Class getWindowClass(String type)
+ throws ClassNotFoundException
+ {
+ Class windowClass = NewtFactory.getCustomClass(type, "Window");
+ if(null==windowClass) {
+ if (NativeWindowFactory.TYPE_EGL.equals(type)) {
+ windowClass = Class.forName("com.jogamp.newt.opengl.kd.KDWindow");
+ } else if (NativeWindowFactory.TYPE_WINDOWS.equals(type)) {
+ windowClass = Class.forName("com.jogamp.newt.windows.WindowsWindow");
+ } else if (NativeWindowFactory.TYPE_MACOSX.equals(type)) {
+ windowClass = Class.forName("com.jogamp.newt.macosx.MacWindow");
+ } else if (NativeWindowFactory.TYPE_X11.equals(type)) {
+ windowClass = Class.forName("com.jogamp.newt.x11.X11Window");
+ } else if (NativeWindowFactory.TYPE_AWT.equals(type)) {
+ windowClass = Class.forName("com.jogamp.newt.awt.AWTWindow");
+ } else {
+ throw new NativeWindowException("Unknown window type \"" + type + "\"");
+ }
+ }
+ return windowClass;
+ }
+
+ protected static Window create(String type, final long parentWindowHandle, Screen screen, final Capabilities caps, boolean undecorated) {
+ try {
+ Class windowClass;
+ if(caps.isOnscreen()) {
+ windowClass = getWindowClass(type);
+ } else {
+ windowClass = OffscreenWindow.class;
+ }
+ Window window = (Window) windowClass.newInstance();
+ window.invalidate();
+ window.screen = screen;
+ window.setUndecorated(undecorated||0!=parentWindowHandle);
+ EventDispatchThread edt = screen.getDisplay().getEDT();
+ if(null!=edt) {
+ final Window f_win = window;
+ edt.invokeAndWait(new Runnable() {
+ public void run() {
+ f_win.createNative(parentWindowHandle, caps);
+ }
+ } );
+ } else {
+ window.createNative(parentWindowHandle, caps);
+ }
+ return window;
+ } catch (Throwable t) {
+ t.printStackTrace();
+ throw new NativeWindowException(t);
+ }
+ }
+
+ protected static Window create(String type, Object[] cstrArguments, Screen screen, final Capabilities caps, boolean undecorated) {
+ try {
+ Class windowClass = getWindowClass(type);
+ Class[] cstrArgumentTypes = getCustomConstructorArgumentTypes(windowClass);
+ if(null==cstrArgumentTypes) {
+ throw new NativeWindowException("WindowClass "+windowClass+" doesn't support custom arguments in constructor");
+ }
+ int argsChecked = verifyConstructorArgumentTypes(cstrArgumentTypes, cstrArguments);
+ if ( argsChecked < cstrArguments.length ) {
+ throw new NativeWindowException("WindowClass "+windowClass+" constructor mismatch at argument #"+argsChecked+"; Constructor: "+getTypeStrList(cstrArgumentTypes)+", arguments: "+getArgsStrList(cstrArguments));
+ }
+ Window window = (Window) NWReflection.createInstance( windowClass, cstrArgumentTypes, cstrArguments ) ;
+ window.invalidate();
+ window.screen = screen;
+ window.setUndecorated(undecorated);
+ EventDispatchThread edt = screen.getDisplay().getEDT();
+ if(null!=edt) {
+ final Window f_win = window;
+ edt.invokeAndWait(new Runnable() {
+ public void run() {
+ f_win.createNative(0, caps);
+ }
+ } );
+ } else {
+ window.createNative(0, caps);
+ }
+ return window;
+ } catch (Throwable t) {
+ t.printStackTrace();
+ throw new NativeWindowException(t);
+ }
+ }
+
+ protected static Window wrapHandle(String type, Screen screen, AbstractGraphicsConfiguration config,
+ long windowHandle, boolean fullscreen, boolean visible,
+ int x, int y, int width, int height)
+ {
+ try {
+ Class windowClass = getWindowClass(type);
+ Window window = (Window) windowClass.newInstance();
+ window.invalidate();
+ window.screen = screen;
+ window.config = config;
+ window.windowHandle = windowHandle;
+ window.fullscreen=fullscreen;
+ window.visible=visible;
+ window.x=x;
+ window.y=y;
+ window.width=width;
+ window.height=height;
+ return window;
+ } catch (Throwable t) {
+ t.printStackTrace();
+ throw new NativeWindowException(t);
+ }
+ }
+
+ public static String toHexString(int hex) {
+ return "0x" + Integer.toHexString(hex);
+ }
+
+ public static String toHexString(long hex) {
+ return "0x" + Long.toHexString(hex);
+ }
+
+ protected Screen screen;
+
+ protected AbstractGraphicsConfiguration config;
+ protected long windowHandle;
+ protected boolean fullscreen, visible;
+ protected int width, height, x, y;
+ protected int eventMask;
+
+ protected String title = "Newt Window";
+ protected boolean undecorated = false;
+
+ /**
+ * Create native windowHandle, ie creates a new native invisible window.
+ *
+ * The parentWindowHandle may be null, in which case no window parenting
+ * is requested.
+ *
+ * Shall use the capabilities to determine the graphics configuration
+ * and shall set the chosen capabilities.
+ */
+ protected abstract void createNative(long parentWindowHandle, Capabilities caps);
+
+ protected abstract void closeNative();
+
+ public Screen getScreen() {
+ return screen;
+ }
+
+ public String toString() {
+ StringBuffer sb = new StringBuffer();
+
+ sb.append(getClass().getName()+"[config "+config+
+ ", windowHandle "+toHexString(getWindowHandle())+
+ ", surfaceHandle "+toHexString(getSurfaceHandle())+
+ ", pos "+getX()+"/"+getY()+", size "+getWidth()+"x"+getHeight()+
+ ", visible "+isVisible()+
+ ", undecorated "+undecorated+
+ ", fullscreen "+fullscreen+
+ ", "+screen+
+ ", wrappedWindow "+getWrappedWindow());
+
+ sb.append(", SurfaceUpdatedListeners num "+surfaceUpdatedListeners.size()+" [");
+ for (Iterator iter = surfaceUpdatedListeners.iterator(); iter.hasNext(); ) {
+ sb.append(iter.next()+", ");
+ }
+ sb.append("], WindowListeners num "+windowListeners.size()+" [");
+ for (Iterator iter = windowListeners.iterator(); iter.hasNext(); ) {
+ sb.append(iter.next()+", ");
+ }
+ sb.append("], MouseListeners num "+mouseListeners.size()+" [");
+ for (Iterator iter = mouseListeners.iterator(); iter.hasNext(); ) {
+ sb.append(iter.next()+", ");
+ }
+ sb.append("], KeyListeners num "+keyListeners.size()+" [");
+ for (Iterator iter = keyListeners.iterator(); iter.hasNext(); ) {
+ sb.append(iter.next()+", ");
+ }
+ sb.append("] ]");
+ return sb.toString();
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public void setUndecorated(boolean value) {
+ undecorated = value;
+ }
+
+ public boolean isUndecorated() {
+ return undecorated;
+ }
+
+ public void requestFocus() {
+ }
+
+ //
+ // NativeWindow impl
+ //
+ private Thread owner;
+ private int recursionCount;
+ protected Exception lockedStack = null;
+
+ /** Recursive and blocking lockSurface() implementation */
+ public synchronized int lockSurface() {
+ // We leave the ToolkitLock lock to the specializtion's discretion,
+ // ie the implicit JAWTWindow in case of AWTWindow
+ Thread cur = Thread.currentThread();
+ if (owner == cur) {
+ ++recursionCount;
+ return LOCK_SUCCESS;
+ }
+ while (owner != null) {
+ try {
+ wait();
+ } catch (InterruptedException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ owner = cur;
+ lockedStack = new Exception("NEWT Surface previously locked by "+Thread.currentThread());
+ screen.getDisplay().lockDisplay();
+ return LOCK_SUCCESS;
+ }
+
+ /** Recursive and unblocking unlockSurface() implementation */
+ public synchronized void unlockSurface() throws NativeWindowException {
+ Thread cur = Thread.currentThread();
+ if (owner != cur) {
+ lockedStack.printStackTrace();
+ throw new NativeWindowException(cur+": Not owner, owner is "+owner);
+ }
+ if (recursionCount > 0) {
+ --recursionCount;
+ return;
+ }
+ owner = null;
+ lockedStack = null;
+ screen.getDisplay().unlockDisplay();
+ notifyAll();
+ // We leave the ToolkitLock unlock to the specializtion's discretion,
+ // ie the implicit JAWTWindow in case of AWTWindow
+ }
+
+ public synchronized boolean isSurfaceLocked() {
+ return null!=owner;
+ }
+
+ public synchronized Thread getSurfaceLockOwner() {
+ return owner;
+ }
+
+ public synchronized Exception getLockedStack() {
+ return lockedStack;
+ }
+
+ public synchronized void destroy() {
+ destroy(false);
+ }
+
+ /** @param deep If true, the linked Screen and Display will be destroyed as well. */
+ public synchronized void destroy(boolean deep) {
+ if(DEBUG_WINDOW_EVENT) {
+ System.out.println("Window.destroy() start (deep "+deep+" - "+Thread.currentThread());
+ }
+ synchronized(surfaceUpdatedListeners) {
+ surfaceUpdatedListeners = new ArrayList();
+ }
+ synchronized(windowListeners) {
+ windowListeners = new ArrayList();
+ }
+ synchronized(mouseListeners) {
+ mouseListeners = new ArrayList();
+ }
+ synchronized(keyListeners) {
+ keyListeners = new ArrayList();
+ }
+ Screen scr = screen;
+ Display dpy = (null!=screen) ? screen.getDisplay() : null;
+ EventDispatchThread edt = (null!=dpy) ? dpy.getEDT() : null;
+ if(null!=edt) {
+ final Window f_win = this;
+ edt.invokeAndWait(new Runnable() {
+ public void run() {
+ f_win.closeNative();
+ }
+ } );
+ } else {
+ closeNative();
+ }
+ invalidate();
+ if(deep) {
+ if(null!=scr) {
+ scr.destroy();
+ }
+ if(null!=dpy) {
+ dpy.destroy();
+ }
+ }
+ if(DEBUG_WINDOW_EVENT) {
+ System.out.println("Window.destroy() end "+Thread.currentThread());
+ }
+ }
+
+ public void invalidate() {
+ if(DEBUG_IMPLEMENTATION || DEBUG_WINDOW_EVENT) {
+ Exception e = new Exception("!!! Window Invalidate "+Thread.currentThread());
+ e.printStackTrace();
+ }
+ screen = null;
+ windowHandle = 0;
+ fullscreen=false;
+ visible=false;
+ eventMask = 0;
+
+ // Default position and dimension will be re-set immediately by user
+ width = 100;
+ height = 100;
+ x=0;
+ y=0;
+ }
+
+ public boolean surfaceSwap() {
+ return false;
+ }
+
+ protected void clearEventMask() {
+ eventMask=0;
+ }
+
+ public long getDisplayHandle() {
+ return screen.getDisplay().getHandle();
+ }
+
+ public int getScreenIndex() {
+ return screen.getIndex();
+ }
+
+ public long getWindowHandle() {
+ return windowHandle;
+ }
+
+ public long getSurfaceHandle() {
+ return windowHandle; // default: return window handle
+ }
+
+ public AbstractGraphicsConfiguration getGraphicsConfiguration() {
+ return config;
+ }
+
+ /**
+ * Returns the width of the client area of this window
+ * @return width of the client area
+ */
+ public int getWidth() {
+ return width;
+ }
+
+ /**
+ * Returns the height of the client area of this window
+ * @return height of the client area
+ */
+ public int getHeight() {
+ return height;
+ }
+
+ /**
+ * Returns the insets for this native window (the difference between the
+ * size of the toplevel window with the decorations and the client area).
+ *
+ * @return insets for this platform window
+ */
+ // this probably belongs to NativeWindow interface
+ public Insets getInsets() {
+ return new Insets(0,0,0,0);
+ }
+
+ /** If this Window actually wraps one from another toolkit such as
+ the AWT, this will return a non-null value. */
+ public Object getWrappedWindow() {
+ return null;
+ }
+
+ //
+ // Additional methods
+ //
+
+ public int getX() {
+ return x;
+ }
+
+ public int getY() {
+ return y;
+ }
+
+ public boolean isVisible() {
+ return visible;
+ }
+
+ public boolean isFullscreen() {
+ return fullscreen;
+ }
+
+ private boolean autoDrawableMember = false;
+
+ /** If the implementation is capable of detecting a device change
+ return true and clear the status/reason of the change. */
+ public boolean hasDeviceChanged() {
+ return false;
+ }
+
+ /**
+ * If set to true,
+ * certain action will be performed by the owning
+ * AutoDrawable, ie the destroy() call within windowDestroyNotify()
+ */
+ public void setAutoDrawableClient(boolean b) {
+ autoDrawableMember = b;
+ }
+
+ protected void windowDestroyNotify() {
+ if(DEBUG_WINDOW_EVENT) {
+ System.out.println("Window.windowDestroyeNotify start "+Thread.currentThread());
+ }
+
+ sendWindowEvent(WindowEvent.EVENT_WINDOW_DESTROY_NOTIFY);
+
+ if(!autoDrawableMember) {
+ destroy();
+ }
+
+ if(DEBUG_WINDOW_EVENT) {
+ System.out.println("Window.windowDestroyeNotify end "+Thread.currentThread());
+ }
+ }
+
+ protected void windowDestroyed() {
+ if(DEBUG_WINDOW_EVENT) {
+ System.out.println("Window.windowDestroyed "+Thread.currentThread());
+ }
+ invalidate();
+ }
+
+ public abstract void setVisible(boolean visible);
+ /**
+ * Sets the size of the client area of the window, excluding decorations
+ * Total size of the window will be
+ * {@code width+insets.left+insets.right, height+insets.top+insets.bottom}
+ * @param width of the client area of the window
+ * @param height of the client area of the window
+ */
+ public abstract void setSize(int width, int height);
+ /**
+ * Sets the location of the top left corner of the window, including
+ * decorations (so the client area will be placed at
+ * {@code x+insets.left,y+insets.top}.
+ * @param x coord of the top left corner
+ * @param y coord of the top left corner
+ */
+ public abstract void setPosition(int x, int y);
+ public abstract boolean setFullscreen(boolean fullscreen);
+
+ //
+ // SurfaceUpdatedListener Support
+ //
+ private ArrayList surfaceUpdatedListeners = new ArrayList();
+
+ public void addSurfaceUpdatedListener(SurfaceUpdatedListener l) {
+ if(l == null) {
+ return;
+ }
+ synchronized(surfaceUpdatedListeners) {
+ ArrayList newSurfaceUpdatedListeners = (ArrayList) surfaceUpdatedListeners.clone();
+ newSurfaceUpdatedListeners.add(l);
+ surfaceUpdatedListeners = newSurfaceUpdatedListeners;
+ }
+ }
+
+ public void removeSurfaceUpdatedListener(SurfaceUpdatedListener l) {
+ if (l == null) {
+ return;
+ }
+ synchronized(surfaceUpdatedListeners) {
+ ArrayList newSurfaceUpdatedListeners = (ArrayList) surfaceUpdatedListeners.clone();
+ newSurfaceUpdatedListeners.remove(l);
+ surfaceUpdatedListeners = newSurfaceUpdatedListeners;
+ }
+ }
+
+ public SurfaceUpdatedListener[] getSurfaceUpdatedListener() {
+ synchronized(surfaceUpdatedListeners) {
+ return (SurfaceUpdatedListener[]) surfaceUpdatedListeners.toArray();
+ }
+ }
+
+ public void surfaceUpdated(Object updater, NativeWindow window, long when) {
+ ArrayList listeners = null;
+ synchronized(surfaceUpdatedListeners) {
+ listeners = surfaceUpdatedListeners;
+ }
+ for(Iterator i = listeners.iterator(); i.hasNext(); ) {
+ SurfaceUpdatedListener l = (SurfaceUpdatedListener) i.next();
+ l.surfaceUpdated(updater, window, when);
+ }
+ }
+
+ //
+ // MouseListener Support
+ //
+
+ public void addMouseListener(MouseListener l) {
+ if(l == null) {
+ return;
+ }
+ synchronized(mouseListeners) {
+ ArrayList newMouseListeners = (ArrayList) mouseListeners.clone();
+ newMouseListeners.add(l);
+ mouseListeners = newMouseListeners;
+ }
+ }
+
+ public void removeMouseListener(MouseListener l) {
+ if (l == null) {
+ return;
+ }
+ synchronized(mouseListeners) {
+ ArrayList newMouseListeners = (ArrayList) mouseListeners.clone();
+ newMouseListeners.remove(l);
+ mouseListeners = newMouseListeners;
+ }
+ }
+
+ public MouseListener[] getMouseListeners() {
+ synchronized(mouseListeners) {
+ return (MouseListener[]) mouseListeners.toArray();
+ }
+ }
+
+ private ArrayList mouseListeners = new ArrayList();
+ private int mouseButtonPressed = 0; // current pressed mouse button number
+ private long lastMousePressed = 0; // last time when a mouse button was pressed
+ private int lastMouseClickCount = 0; // last mouse button click count
+ public static final int ClickTimeout = 300;
+
+ protected void sendMouseEvent(int eventType, int modifiers,
+ int x, int y, int button, int rotation) {
+ if(x<0||y<0||x>=width||y>=height) {
+ return; // .. invalid ..
+ }
+ if(DEBUG_MOUSE_EVENT) {
+ System.out.println("sendMouseEvent: "+MouseEvent.getEventTypeString(eventType)+
+ ", mod "+modifiers+", pos "+x+"/"+y+", button "+button);
+ }
+ if(button<0||button>MouseEvent.BUTTON_NUMBER) {
+ throw new NativeWindowException("Invalid mouse button number" + button);
+ }
+ long when = System.currentTimeMillis();
+ MouseEvent eClicked = null;
+ MouseEvent e = null;
+
+ if(MouseEvent.EVENT_MOUSE_PRESSED==eventType) {
+ if(when-lastMousePressed
+ * before calling the various input EventListener callbacks (MouseListener, KeyListener,
+ * etc.).
+ * This design decision is made to favor a more performant and simplified
+ * implementation, as well as the event dispatcher shall be allowed
+ * not having a notion about OpenGL.
+ *
+ * Enable or disables running the {@link Display#pumpMessages} in the {@link #display()} call.
+ * The default behavior is to run {@link Display#pumpMessages}.
+ * This could not have been verified. No measurable difference could have been recognized.
+ *
+ * Enabling local pump messages while using the EDT,
+ * {@link com.jogamp.newt.NewtFactory#setUseEDT(boolean)},
+ * will result in an exception.
+ *
+ * @deprecated EXPERIMENTAL, semantic is about to be removed after further verification.
+ */
+ public void setRunPumpMessages(boolean onoff) {
+ if( onoff && null!=getScreen().getDisplay().getEDT() ) {
+ throw new GLException("GLWindow.setRunPumpMessages(true) - Can't do with EDT on");
+ }
+ runPumpMessages = onoff;
+ }
+
+ protected void createNative(long parentWindowHandle, Capabilities caps) {
+ shouldNotCallThis();
+ }
+
+ protected void closeNative() {
+ shouldNotCallThis();
+ }
+
+ protected void dispose(boolean regenerate, boolean sendEvent) {
+ if(Window.DEBUG_WINDOW_EVENT || window.DEBUG_IMPLEMENTATION) {
+ Exception e1 = new Exception("GLWindow.dispose("+regenerate+") "+Thread.currentThread()+", 1");
+ e1.printStackTrace();
+ }
+
+ if(sendEvent) {
+ sendDisposeEvent();
+ }
+
+ if (context != null) {
+ context.destroy();
+ }
+ if (drawable != null) {
+ drawable.setRealized(false);
+ }
+
+ if(regenerate) {
+ if(null==window) {
+ throw new GLException("GLWindow.dispose(true): null window");
+ }
+
+ // recreate GLDrawable, to reflect the new graphics configurations
+ NativeWindow nw;
+ if (window.getWrappedWindow() != null) {
+ nw = NativeWindowFactory.getNativeWindow(window.getWrappedWindow(), window.getGraphicsConfiguration());
+ } else {
+ nw = window;
+ }
+ drawable = factory.createGLDrawable(nw);
+ drawable.setRealized(true);
+ context = drawable.createContext(null);
+ sendReshape = true; // ensure a reshape event is send ..
+ }
+
+ if(Window.DEBUG_WINDOW_EVENT || window.DEBUG_IMPLEMENTATION) {
+ System.out.println("GLWindow.dispose("+regenerate+") "+Thread.currentThread()+", fin: "+this);
+ }
+ }
+
+ public synchronized void destroy() {
+ destroy(true);
+ }
+
+ /** @param sendDisposeEvent should be false in a [time,reliable] critical shutdown */
+ public synchronized void destroy(boolean sendDisposeEvent) {
+ if(Window.DEBUG_WINDOW_EVENT || window.DEBUG_IMPLEMENTATION) {
+ Exception e1 = new Exception("GLWindow.destroy "+Thread.currentThread()+", 1: "+this);
+ e1.printStackTrace();
+ }
+
+ List newglw = (List) ((ArrayList) glwindows).clone();
+ newglw.remove(this);
+ glwindows=newglw;
+
+ dispose(false, sendDisposeEvent);
+
+ if(null!=window) {
+ if(ownerOfWinScrDpy) {
+ window.destroy(true);
+ }
+ }
+
+ drawable = null;
+ context = null;
+ window = null;
+
+ if(Window.DEBUG_WINDOW_EVENT || window.DEBUG_IMPLEMENTATION) {
+ System.out.println("GLWindow.destroy "+Thread.currentThread()+", fin: "+this);
+ }
+ }
+
+ public boolean getPerfLogEnabled() { return perfLog; }
+
+ public void enablePerfLog(boolean v) {
+ perfLog = v;
+ }
+
+ public void setVisible(boolean visible) {
+ if(Window.DEBUG_WINDOW_EVENT || window.DEBUG_IMPLEMENTATION) {
+ System.out.println(Thread.currentThread()+" GLWindow.setVisible("+visible+") START ; isVisible "+this.visible+" ; has context "+(null!=context));
+ }
+ this.visible=visible;
+ window.setVisible(visible);
+ if (visible && context == null) {
+ NativeWindow nw;
+ if (window.getWrappedWindow() != null) {
+ nw = NativeWindowFactory.getNativeWindow(window.getWrappedWindow(), window.getGraphicsConfiguration());
+ } else {
+ nw = window;
+ }
+ GLCapabilities glCaps = (GLCapabilities) nw.getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities();
+ factory = GLDrawableFactory.getFactory(glCaps.getGLProfile());
+ drawable = factory.createGLDrawable(nw);
+ drawable.setRealized(true);
+ context = drawable.createContext(null);
+ sendReshape = true; // ensure a reshape event is send ..
+ }
+ if(Window.DEBUG_WINDOW_EVENT || window.DEBUG_IMPLEMENTATION) {
+ System.out.println(Thread.currentThread()+" GLWindow.setVisible("+visible+") END ; has context "+(null!=context));
+ }
+ }
+
+ public Screen getScreen() {
+ return window.getScreen();
+ }
+
+ public void setTitle(String title) {
+ window.setTitle(title);
+ }
+
+ public String getTitle() {
+ return window.getTitle();
+ }
+
+ public void setUndecorated(boolean value) {
+ window.setUndecorated(value);
+ }
+
+ public boolean isUndecorated() {
+ return window.isUndecorated();
+ }
+
+ public void setSize(int width, int height) {
+ window.setSize(width, height);
+ }
+
+ public void setPosition(int x, int y) {
+ window.setPosition(x, y);
+ }
+
+ public Insets getInsets() {
+ return window.getInsets();
+ }
+
+ public boolean setFullscreen(boolean fullscreen) {
+ return window.setFullscreen(fullscreen);
+ }
+
+ public boolean isVisible() {
+ return window.isVisible();
+ }
+
+ public int getX() {
+ return window.getX();
+ }
+
+ public int getY() {
+ return window.getY();
+ }
+
+ public int getWidth() {
+ return window.getWidth();
+ }
+
+ public int getHeight() {
+ return window.getHeight();
+ }
+
+ public boolean isFullscreen() {
+ return window.isFullscreen();
+ }
+
+ public void addSurfaceUpdatedListener(SurfaceUpdatedListener l) {
+ window.addSurfaceUpdatedListener(l);
+ }
+ public void removeSurfaceUpdatedListener(SurfaceUpdatedListener l) {
+ window.removeSurfaceUpdatedListener(l);
+ }
+ public SurfaceUpdatedListener[] getSurfaceUpdatedListener() {
+ return window.getSurfaceUpdatedListener();
+ }
+ public void surfaceUpdated(Object updater, NativeWindow window0, long when) {
+ window.surfaceUpdated(updater, window, when);
+ }
+
+ public void addMouseListener(MouseListener l) {
+ window.addMouseListener(l);
+ }
+
+ public void removeMouseListener(MouseListener l) {
+ window.removeMouseListener(l);
+ }
+
+ public MouseListener[] getMouseListeners() {
+ return window.getMouseListeners();
+ }
+
+ public void addKeyListener(KeyListener l) {
+ window.addKeyListener(l);
+ }
+
+ public void removeKeyListener(KeyListener l) {
+ window.removeKeyListener(l);
+ }
+
+ public KeyListener[] getKeyListeners() {
+ return window.getKeyListeners();
+ }
+
+ public void addWindowListener(WindowListener l) {
+ window.addWindowListener(l);
+ }
+
+ public void removeWindowListener(WindowListener l) {
+ window.removeWindowListener(l);
+ }
+
+ public WindowListener[] getWindowListeners() {
+ return window.getWindowListeners();
+ }
+
+ public String toString() {
+ return "NEWT-GLWindow[ \n\tDrawable: "+drawable+", \n\tWindow: "+window+", \n\tHelper: "+helper+", \n\tFactory: "+factory+"]";
+ }
+
+ //----------------------------------------------------------------------
+ // OpenGL-related methods and state
+ //
+
+ private GLDrawableFactory factory;
+ private GLDrawable drawable;
+ private GLContext context;
+ private GLDrawableHelper helper = new GLDrawableHelper();
+ // To make reshape events be sent immediately before a display event
+ private boolean sendReshape=false;
+ private boolean sendDestroy=false;
+ private boolean perfLog = false;
+
+ public GLDrawableFactory getFactory() {
+ return factory;
+ }
+
+ public void setContext(GLContext newCtx) {
+ context = newCtx;
+ }
+
+ public GLContext getContext() {
+ return context;
+ }
+
+ public GL getGL() {
+ if (context == null) {
+ return null;
+ }
+ return context.getGL();
+ }
+
+ public GL setGL(GL gl) {
+ if (context != null) {
+ context.setGL(gl);
+ return gl;
+ }
+ return null;
+ }
+
+ public void addGLEventListener(GLEventListener listener) {
+ helper.addGLEventListener(listener);
+ }
+
+ public void removeGLEventListener(GLEventListener listener) {
+ helper.removeGLEventListener(listener);
+ }
+
+ public void display() {
+ display(false);
+ }
+
+ public void display(boolean forceReshape) {
+ if(window!=null && drawable!=null && context != null) {
+ if(runPumpMessages) {
+ window.getScreen().getDisplay().pumpMessages();
+ }
+ if(window.hasDeviceChanged() && GLAutoDrawable.SCREEN_CHANGE_ACTION_ENABLED) {
+ dispose(true, true);
+ }
+ if (sendDestroy) {
+ destroy();
+ sendDestroy=false;
+ } else {
+ if(forceReshape) {
+ sendReshape = true;
+ }
+ helper.invokeGL(drawable, context, displayAction, initAction);
+ }
+ }
+ }
+
+ private void sendDisposeEvent() {
+ if(drawable!=null && context != null) {
+ helper.invokeGL(drawable, context, disposeAction, null);
+ }
+ }
+
+ /** This implementation uses a static value */
+ public void setAutoSwapBufferMode(boolean onOrOff) {
+ helper.setAutoSwapBufferMode(onOrOff);
+ }
+
+ /** This implementation uses a static value */
+ public boolean getAutoSwapBufferMode() {
+ return helper.getAutoSwapBufferMode();
+ }
+
+ public void swapBuffers() {
+ if(drawable!=null && context != null) {
+ if (context != GLContext.getCurrent()) {
+ // Assume we should try to make the context current before swapping the buffers
+ helper.invokeGL(drawable, context, swapBuffersAction, initAction);
+ } else {
+ drawable.swapBuffers();
+ }
+ }
+ }
+
+ class InitAction implements Runnable {
+ public void run() {
+ helper.init(GLWindow.this);
+ startTime = System.currentTimeMillis();
+ curTime = startTime;
+ if(perfLog) {
+ lastCheck = startTime;
+ totalFrames = 0; lastFrames = 0;
+ }
+ }
+ }
+ private InitAction initAction = new InitAction();
+
+ class DisposeAction implements Runnable {
+ public void run() {
+ helper.dispose(GLWindow.this);
+ }
+ }
+ private DisposeAction disposeAction = new DisposeAction();
+
+ class DisplayAction implements Runnable {
+ public void run() {
+ if (sendReshape) {
+ int width = getWidth();
+ int height = getHeight();
+ getGL().glViewport(0, 0, width, height);
+ helper.reshape(GLWindow.this, 0, 0, width, height);
+ sendReshape = false;
+ }
+
+ helper.display(GLWindow.this);
+
+ curTime = System.currentTimeMillis();
+ totalFrames++;
+
+ if(perfLog) {
+ long dt0, dt1;
+ lastFrames++;
+ dt0 = curTime-lastCheck;
+ if ( dt0 > 5000 ) {
+ dt1 = curTime-startTime;
+ System.out.println(dt0/1000 +"s: "+ lastFrames + "f, " + (lastFrames*1000)/dt0 + " fps, "+dt0/lastFrames+" ms/f; "+
+ "total: "+ dt1/1000+"s, "+(totalFrames*1000)/dt1 + " fps, "+dt1/totalFrames+" ms/f");
+ lastCheck=curTime;
+ lastFrames=0;
+ }
+ }
+ }
+ }
+ private DisplayAction displayAction = new DisplayAction();
+
+ public long getStartTime() { return startTime; }
+ public long getCurrentTime() { return curTime; }
+ public long getDuration() { return curTime-startTime; }
+ public int getTotalFrames() { return totalFrames; }
+
+ private long startTime = 0;
+ private long curTime = 0;
+ private long lastCheck = 0;
+ private int totalFrames = 0, lastFrames = 0;
+
+ class SwapBuffersAction implements Runnable {
+ public void run() {
+ drawable.swapBuffers();
+ }
+ }
+ private SwapBuffersAction swapBuffersAction = new SwapBuffersAction();
+
+ //----------------------------------------------------------------------
+ // GLDrawable methods
+ //
+
+ public NativeWindow getNativeWindow() {
+ return null!=drawable ? drawable.getNativeWindow() : null;
+ }
+
+ public synchronized int lockSurface() throws NativeWindowException {
+ if(null!=drawable) return drawable.getNativeWindow().lockSurface();
+ return NativeWindow.LOCK_SURFACE_NOT_READY;
+ }
+
+ public synchronized void unlockSurface() {
+ if(null!=drawable) drawable.getNativeWindow().unlockSurface();
+ else throw new NativeWindowException("NEWT-GLWindow not locked");
+ }
+
+ public synchronized boolean isSurfaceLocked() {
+ if(null!=drawable) return drawable.getNativeWindow().isSurfaceLocked();
+ return false;
+ }
+
+ public synchronized Exception getLockedStack() {
+ if(null!=drawable) return drawable.getNativeWindow().getLockedStack();
+ return null;
+ }
+
+ public boolean surfaceSwap() {
+ if(null!=drawable) return drawable.getNativeWindow().surfaceSwap();
+ return super.surfaceSwap();
+ }
+
+ public long getWindowHandle() {
+ if(null!=drawable) return drawable.getNativeWindow().getWindowHandle();
+ return super.getWindowHandle();
+ }
+
+ public long getSurfaceHandle() {
+ if(null!=drawable) return drawable.getNativeWindow().getSurfaceHandle();
+ return super.getSurfaceHandle();
+ }
+
+ //----------------------------------------------------------------------
+ // GLDrawable methods that are not really needed
+ //
+
+ public GLContext createContext(GLContext shareWith) {
+ return drawable.createContext(shareWith);
+ }
+
+ public void setRealized(boolean realized) {
+ }
+
+ public GLCapabilities getChosenGLCapabilities() {
+ if (drawable == null) {
+ throw new GLException("No drawable yet");
+ }
+
+ return drawable.getChosenGLCapabilities();
+ }
+
+ public GLProfile getGLProfile() {
+ if (drawable == null) {
+ throw new GLException("No drawable yet");
+ }
+
+ return drawable.getGLProfile();
+ }
+
+ //----------------------------------------------------------------------
+ // Internals only below this point
+ //
+
+ private void shouldNotCallThis() {
+ throw new NativeWindowException("Should not call this");
+ }
+}
diff --git a/src/newt/classes/com/jogamp/newt/opengl/broadcom/egl/Display.java b/src/newt/classes/com/jogamp/newt/opengl/broadcom/egl/Display.java
new file mode 100644
index 000000000..a375181ac
--- /dev/null
+++ b/src/newt/classes/com/jogamp/newt/opengl/broadcom/egl/Display.java
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.newt.opengl.broadcom.egl;
+
+import com.jogamp.newt.impl.*;
+import com.jogamp.opengl.impl.egl.*;
+import javax.media.nativewindow.*;
+import javax.media.nativewindow.egl.*;
+
+public class Display extends com.jogamp.newt.Display {
+
+ static {
+ NativeLibLoader.loadNEWT();
+
+ if (!Window.initIDs()) {
+ throw new NativeWindowException("Failed to initialize BCEGL Window jmethodIDs");
+ }
+ }
+
+ public static void initSingleton() {
+ // just exist to ensure static init has been run
+ }
+
+
+ public Display() {
+ }
+
+ protected void createNative() {
+ long handle = CreateDisplay(Screen.fixedWidth, Screen.fixedHeight);
+ if (handle == EGL.EGL_NO_DISPLAY) {
+ throw new NativeWindowException("BC EGL CreateDisplay failed");
+ }
+ aDevice = new EGLGraphicsDevice(handle);
+ }
+
+ protected void closeNative() {
+ if (aDevice.getHandle() != EGL.EGL_NO_DISPLAY) {
+ DestroyDisplay(aDevice.getHandle());
+ }
+ }
+
+ protected void dispatchMessages() {
+ // n/a .. DispatchMessages();
+ }
+
+ private native long CreateDisplay(int width, int height);
+ private native void DestroyDisplay(long dpy);
+ private native void DispatchMessages();
+}
+
diff --git a/src/newt/classes/com/jogamp/newt/opengl/broadcom/egl/Screen.java b/src/newt/classes/com/jogamp/newt/opengl/broadcom/egl/Screen.java
new file mode 100755
index 000000000..b4f07599b
--- /dev/null
+++ b/src/newt/classes/com/jogamp/newt/opengl/broadcom/egl/Screen.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.newt.opengl.broadcom.egl;
+
+import javax.media.nativewindow.*;
+
+public class Screen extends com.jogamp.newt.Screen {
+
+ static {
+ Display.initSingleton();
+ }
+
+
+ public Screen() {
+ }
+
+ protected void createNative(int index) {
+ aScreen = new DefaultGraphicsScreen(getDisplay().getGraphicsDevice(), index);
+ setScreenSize(fixedWidth, fixedHeight);
+ }
+
+ protected void closeNative() { }
+
+ //----------------------------------------------------------------------
+ // Internals only
+ //
+
+ static final int fixedWidth = 1920;
+ static final int fixedHeight = 1080;
+}
+
diff --git a/src/newt/classes/com/jogamp/newt/opengl/broadcom/egl/Window.java b/src/newt/classes/com/jogamp/newt/opengl/broadcom/egl/Window.java
new file mode 100755
index 000000000..185dc97b9
--- /dev/null
+++ b/src/newt/classes/com/jogamp/newt/opengl/broadcom/egl/Window.java
@@ -0,0 +1,154 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.newt.opengl.broadcom.egl;
+
+import com.jogamp.opengl.impl.egl.*;
+import javax.media.nativewindow.*;
+import javax.media.opengl.GLCapabilities;
+import javax.media.nativewindow.NativeWindowException;
+
+public class Window extends com.jogamp.newt.Window {
+ static {
+ Display.initSingleton();
+ }
+
+ public Window() {
+ }
+
+ protected void createNative(long parentWindowHandle, Capabilities caps) {
+ if(0!=parentWindowHandle) {
+ throw new RuntimeException("Window parenting not supported (yet)");
+ }
+ // query a good configuration .. even thought we drop this one
+ // and reuse the EGLUtil choosen one later.
+ config = GraphicsConfigurationFactory.getFactory(getScreen().getDisplay().getGraphicsDevice()).chooseGraphicsConfiguration(caps, null, getScreen().getGraphicsScreen());
+ if (config == null) {
+ throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
+ }
+ setSizeImpl(getScreen().getWidth(), getScreen().getHeight());
+ }
+
+ protected void closeNative() {
+ if(0!=windowHandleClose) {
+ CloseWindow(getDisplayHandle(), windowHandleClose);
+ }
+ }
+
+ public void setVisible(boolean visible) {
+ if(this.visible!=visible) {
+ this.visible=visible;
+ if ( 0==windowHandle ) {
+ windowHandle = realizeWindow(true, width, height);
+ if (0 == windowHandle) {
+ throw new NativeWindowException("Error native Window Handle is null");
+ }
+ }
+ clearEventMask();
+ }
+ }
+
+ public void setSize(int width, int height) {
+ System.err.println("setSize "+width+"x"+height+" n/a in BroadcomEGL");
+ }
+
+ void setSizeImpl(int width, int height) {
+ if(0!=windowHandle) {
+ // n/a in BroadcomEGL
+ System.err.println("BCEGL Window.setSizeImpl n/a in BroadcomEGL with realized window");
+ } else {
+ if(DEBUG_IMPLEMENTATION) {
+ Exception e = new Exception("BCEGL Window.setSizeImpl() "+this.width+"x"+this.height+" -> "+width+"x"+height);
+ e.printStackTrace();
+ }
+ this.width = width;
+ this.height = height;
+ }
+ }
+
+ public void setPosition(int x, int y) {
+ // n/a in BroadcomEGL
+ System.err.println("setPosition n/a in BroadcomEGL");
+ }
+
+ public boolean setFullscreen(boolean fullscreen) {
+ // n/a in BroadcomEGL
+ System.err.println("setFullscreen n/a in BroadcomEGL");
+ return false;
+ }
+
+ public boolean surfaceSwap() {
+ if ( 0!=windowHandle ) {
+ SwapWindow(getDisplayHandle(), windowHandle);
+ return true;
+ }
+ return false;
+ }
+
+ //----------------------------------------------------------------------
+ // Internals only
+ //
+
+ protected static native boolean initIDs();
+ private native long CreateWindow(long eglDisplayHandle, boolean chromaKey, int width, int height);
+ private native void CloseWindow(long eglDisplayHandle, long eglWindowHandle);
+ private native void SwapWindow(long eglDisplayHandle, long eglWindowHandle);
+
+
+ private long realizeWindow(boolean chromaKey, int width, int height) {
+ if(DEBUG_IMPLEMENTATION) {
+ System.out.println("BCEGL Window.realizeWindow() with: chroma "+chromaKey+", "+width+"x"+height+", "+config);
+ }
+ long handle = CreateWindow(getDisplayHandle(), chromaKey, width, height);
+ if (0 == handle) {
+ throw new NativeWindowException("Error native Window Handle is null");
+ }
+ windowHandleClose = handle;
+ return handle;
+ }
+
+ private void windowCreated(int cfgID, int width, int height) {
+ this.width = width;
+ this.height = height;
+ GLCapabilities capsReq = (GLCapabilities) config.getRequestedCapabilities();
+ config = EGLGraphicsConfiguration.create(capsReq, screen.getGraphicsScreen(), cfgID);
+ if (config == null) {
+ throw new NativeWindowException("Error creating EGLGraphicsConfiguration from id: "+cfgID+", "+this);
+ }
+ if(DEBUG_IMPLEMENTATION) {
+ System.out.println("BCEGL Window.windowCreated(): "+toHexString(cfgID)+", "+width+"x"+height+", "+config);
+ }
+ }
+
+ private long windowHandleClose;
+}
diff --git a/src/newt/classes/com/jogamp/newt/opengl/kd/KDDisplay.java b/src/newt/classes/com/jogamp/newt/opengl/kd/KDDisplay.java
new file mode 100755
index 000000000..b09568237
--- /dev/null
+++ b/src/newt/classes/com/jogamp/newt/opengl/kd/KDDisplay.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.newt.opengl.kd;
+
+import com.jogamp.newt.*;
+import com.jogamp.newt.impl.*;
+import com.jogamp.opengl.impl.egl.*;
+import javax.media.nativewindow.*;
+import javax.media.nativewindow.egl.*;
+
+public class KDDisplay extends Display {
+
+ static {
+ NativeLibLoader.loadNEWT();
+
+ if (!KDWindow.initIDs()) {
+ throw new NativeWindowException("Failed to initialize KDWindow jmethodIDs");
+ }
+ }
+
+ public static void initSingleton() {
+ // just exist to ensure static init has been run
+ }
+
+
+ public KDDisplay() {
+ }
+
+ protected void createNative() {
+ // FIXME: map name to EGL_*_DISPLAY
+ long handle = EGL.eglGetDisplay(EGL.EGL_DEFAULT_DISPLAY);
+ if (handle == EGL.EGL_NO_DISPLAY) {
+ throw new NativeWindowException("eglGetDisplay failed");
+ }
+ if (!EGL.eglInitialize(handle, null, null)) {
+ throw new NativeWindowException("eglInitialize failed");
+ }
+ aDevice = new EGLGraphicsDevice(handle);
+ }
+
+ protected void closeNative() {
+ if (aDevice.getHandle() != EGL.EGL_NO_DISPLAY) {
+ EGL.eglTerminate(aDevice.getHandle());
+ }
+ }
+
+ protected void dispatchMessages() {
+ DispatchMessages();
+ }
+
+ private native void DispatchMessages();
+}
+
diff --git a/src/newt/classes/com/jogamp/newt/opengl/kd/KDScreen.java b/src/newt/classes/com/jogamp/newt/opengl/kd/KDScreen.java
new file mode 100755
index 000000000..cd53c8152
--- /dev/null
+++ b/src/newt/classes/com/jogamp/newt/opengl/kd/KDScreen.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.newt.opengl.kd;
+
+import com.jogamp.newt.*;
+import javax.media.nativewindow.*;
+
+public class KDScreen extends Screen {
+ static {
+ KDDisplay.initSingleton();
+ }
+
+ public KDScreen() {
+ }
+
+ protected void createNative(int index) {
+ aScreen = new DefaultGraphicsScreen(getDisplay().getGraphicsDevice(), index);
+ }
+
+ protected void closeNative() { }
+
+ // elevate access to this package ..
+ protected void setScreenSize(int w, int h) {
+ super.setScreenSize(w, h);
+ }
+}
diff --git a/src/newt/classes/com/jogamp/newt/opengl/kd/KDWindow.java b/src/newt/classes/com/jogamp/newt/opengl/kd/KDWindow.java
new file mode 100755
index 000000000..555f54599
--- /dev/null
+++ b/src/newt/classes/com/jogamp/newt/opengl/kd/KDWindow.java
@@ -0,0 +1,153 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.newt.opengl.kd;
+
+import com.jogamp.newt.*;
+import com.jogamp.newt.impl.*;
+import com.jogamp.opengl.impl.egl.*;
+import javax.media.nativewindow.*;
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLProfile;
+import javax.media.nativewindow.NativeWindowException;
+
+public class KDWindow extends Window {
+ private static final String WINDOW_CLASS_NAME = "NewtWindow";
+ // non fullscreen dimensions ..
+ private int nfs_width, nfs_height, nfs_x, nfs_y;
+
+ static {
+ KDDisplay.initSingleton();
+ }
+
+ public KDWindow() {
+ }
+
+ protected void createNative(long parentWindowHandle, Capabilities caps) {
+ if(0!=parentWindowHandle) {
+ throw new RuntimeException("Window parenting not supported (yet)");
+ }
+ config = GraphicsConfigurationFactory.getFactory(getScreen().getDisplay().getGraphicsDevice()).chooseGraphicsConfiguration(caps, null, getScreen().getGraphicsScreen());
+ if (config == null) {
+ throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
+ }
+
+ GLCapabilities eglCaps = (GLCapabilities)config.getChosenCapabilities();
+ int[] eglAttribs = EGLGraphicsConfiguration.GLCapabilities2AttribList(eglCaps);
+
+ windowHandle = 0;
+ eglWindowHandle = CreateWindow(getDisplayHandle(), eglAttribs);
+ if (eglWindowHandle == 0) {
+ throw new NativeWindowException("Error creating egl window: "+config);
+ }
+ setVisible0(eglWindowHandle, false);
+ windowHandleClose = eglWindowHandle;
+ }
+
+ protected void closeNative() {
+ if(0!=windowHandleClose) {
+ CloseWindow(windowHandleClose, windowUserData);
+ windowUserData=0;
+ }
+ }
+
+ public void setVisible(boolean visible) {
+ if(0!=eglWindowHandle && this.visible!=visible) {
+ this.visible=visible;
+ setVisible0(eglWindowHandle, visible);
+ if ( 0==windowHandle ) {
+ windowHandle = RealizeWindow(eglWindowHandle);
+ if (0 == windowHandle) {
+ throw new NativeWindowException("Error native Window Handle is null");
+ }
+ }
+ clearEventMask();
+ }
+ }
+
+ public void setSize(int width, int height) {
+ if(0!=eglWindowHandle) {
+ setSize0(eglWindowHandle, width, height);
+ }
+ }
+
+ public void setPosition(int x, int y) {
+ // n/a in KD
+ System.err.println("setPosition n/a in KD");
+ }
+
+ public boolean setFullscreen(boolean fullscreen) {
+ if(0!=eglWindowHandle && this.fullscreen!=fullscreen) {
+ this.fullscreen=fullscreen;
+ if(this.fullscreen) {
+ setFullScreen0(eglWindowHandle, true);
+ } else {
+ setFullScreen0(eglWindowHandle, false);
+ setSize0(eglWindowHandle, nfs_width, nfs_height);
+ }
+ }
+ return true;
+ }
+
+ //----------------------------------------------------------------------
+ // Internals only
+ //
+
+ protected static native boolean initIDs();
+ private native long CreateWindow(long displayHandle, int[] attributes);
+ private native long RealizeWindow(long eglWindowHandle);
+ private native int CloseWindow(long eglWindowHandle, long userData);
+ private native void setVisible0(long eglWindowHandle, boolean visible);
+ private native void setSize0(long eglWindowHandle, int width, int height);
+ private native void setFullScreen0(long eglWindowHandle, boolean fullscreen);
+
+ private void windowCreated(long userData) {
+ windowUserData=userData;
+ }
+
+ private void sizeChanged(int newWidth, int newHeight) {
+ width = newWidth;
+ height = newHeight;
+ if(!fullscreen) {
+ nfs_width=width;
+ nfs_height=height;
+ } else {
+ ((KDScreen)screen).setScreenSize(width, height);
+ }
+ sendWindowEvent(WindowEvent.EVENT_WINDOW_RESIZED);
+ }
+
+ private long eglWindowHandle;
+ private long windowHandleClose;
+ private long windowUserData;
+}
diff --git a/src/newt/classes/com/jogamp/newt/util/EventDispatchThread.java b/src/newt/classes/com/jogamp/newt/util/EventDispatchThread.java
new file mode 100644
index 000000000..675c6f322
--- /dev/null
+++ b/src/newt/classes/com/jogamp/newt/util/EventDispatchThread.java
@@ -0,0 +1,240 @@
+/*
+ * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ */
+
+package com.jogamp.newt.util;
+
+import com.jogamp.newt.Display;
+import com.jogamp.newt.impl.Debug;
+import java.util.*;
+
+public class EventDispatchThread {
+ public static final boolean DEBUG = Debug.debug("EDT");
+
+ private ThreadGroup threadGroup;
+ private volatile boolean shouldStop = false;
+ private TaskWorker taskWorker = null;
+ private Object taskWorkerLock = new Object();
+ private ArrayList tasks = new ArrayList(); // one shot tasks
+ private Display display = null;
+ private String name;
+ private long edtPollGranularity = 10;
+
+ public EventDispatchThread(Display display, ThreadGroup tg, String name) {
+ this.display = display;
+ this.threadGroup = tg;
+ this.name=new String("EDT-Display_"+display.getName()+"-"+name);
+ }
+
+ public String getName() { return name; }
+
+ public ThreadGroup getThreadGroup() { return threadGroup; }
+
+ public void start() {
+ start(false);
+ }
+
+ /**
+ * @param externalStimuli true indicates that another thread stimulates,
+ * ie. calls this TaskManager's run() loop method.
+ * Hence no own thread is started in this case.
+ *
+ * @return The started Runnable, which handles the run-loop.
+ * Usefull in combination with externalStimuli=true,
+ * so an external stimuli can call it.
+ */
+ public Runnable start(boolean externalStimuli) {
+ synchronized(taskWorkerLock) {
+ if(null==taskWorker) {
+ taskWorker = new TaskWorker(threadGroup, name);
+ }
+ if(!taskWorker.isRunning()) {
+ shouldStop = false;
+ taskWorker.start(externalStimuli);
+ }
+ taskWorkerLock.notifyAll();
+ }
+ return taskWorker;
+ }
+
+ public void stop() {
+ synchronized(taskWorkerLock) {
+ if(null!=taskWorker && taskWorker.isRunning()) {
+ shouldStop = true;
+ }
+ taskWorkerLock.notifyAll();
+ if(DEBUG) {
+ System.out.println(Thread.currentThread()+": EDT signal STOP");
+ }
+ }
+ }
+
+ public boolean isThreadEDT(Thread thread) {
+ return null!=taskWorker && taskWorker == thread;
+ }
+
+ public boolean isCurrentThreadEDT() {
+ return null!=taskWorker && taskWorker == Thread.currentThread();
+ }
+
+ public boolean isRunning() {
+ return null!=taskWorker && taskWorker.isRunning() ;
+ }
+
+ public void invokeLater(Runnable task) {
+ if(task == null) {
+ return;
+ }
+ synchronized(taskWorkerLock) {
+ if(null!=taskWorker && taskWorker.isRunning() && taskWorker != Thread.currentThread() ) {
+ tasks.add(task);
+ taskWorkerLock.notifyAll();
+ } else {
+ // if !running or isEDTThread, do it right away
+ task.run();
+ }
+ }
+ }
+
+ public void invokeAndWait(Runnable task) {
+ if(task == null) {
+ return;
+ }
+ invokeLater(task);
+ waitOnWorker();
+ }
+
+ public void waitOnWorker() {
+ synchronized(taskWorkerLock) {
+ if(null!=taskWorker && taskWorker.isRunning() && tasks.size()>0 && taskWorker != Thread.currentThread() ) {
+ try {
+ taskWorkerLock.wait();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+
+ public void waitUntilStopped() {
+ synchronized(taskWorkerLock) {
+ while(null!=taskWorker && taskWorker.isRunning() && taskWorker != Thread.currentThread() ) {
+ try {
+ taskWorkerLock.wait();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+
+ class TaskWorker extends Thread {
+ boolean isRunning = false;
+ boolean externalStimuli = false;
+
+ public TaskWorker(ThreadGroup tg, String name) {
+ super(tg, name);
+ }
+
+ public synchronized boolean isRunning() {
+ return isRunning;
+ }
+
+ public void start(boolean externalStimuli) throws IllegalThreadStateException {
+ synchronized(this) {
+ this.externalStimuli = externalStimuli;
+ isRunning = true;
+ }
+ if(!externalStimuli) {
+ super.start();
+ }
+ }
+
+ /**
+ * Utilizing taskWorkerLock only for local resources and task execution,
+ * not for event dispatching.
+ */
+ public void run() {
+ if(DEBUG) {
+ System.out.println(Thread.currentThread()+": EDT run() START");
+ }
+ while(!shouldStop) {
+ try {
+ // wait for something todo
+ while(!shouldStop && tasks.size()==0) {
+ synchronized(taskWorkerLock) {
+ if(!shouldStop && tasks.size()==0) {
+ try {
+ taskWorkerLock.wait(edtPollGranularity);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ display.pumpMessages(); // event dispatch
+ }
+ if(!shouldStop && tasks.size()>0) {
+ synchronized(taskWorkerLock) {
+ if(!shouldStop && tasks.size()>0) {
+ Runnable task = (Runnable) tasks.remove(0);
+ task.run();
+ taskWorkerLock.notifyAll();
+ }
+ }
+ display.pumpMessages(); // event dispatch
+ }
+ } catch (Throwable t) {
+ // handle errors ..
+ t.printStackTrace();
+ } finally {
+ // epilog - unlock locked stuff
+ }
+ if(externalStimuli) break; // no loop if called by external stimuli
+ }
+ synchronized(this) {
+ isRunning = !shouldStop;
+ }
+ if(!isRunning) {
+ synchronized(taskWorkerLock) {
+ taskWorkerLock.notifyAll();
+ }
+ }
+ if(DEBUG) {
+ System.out.println(Thread.currentThread()+": EDT run() EXIT");
+ }
+ }
+ }
+}
+
diff --git a/src/newt/classes/com/jogamp/newt/util/MainThread.java b/src/newt/classes/com/jogamp/newt/util/MainThread.java
new file mode 100644
index 000000000..6cd4f8c69
--- /dev/null
+++ b/src/newt/classes/com/jogamp/newt/util/MainThread.java
@@ -0,0 +1,307 @@
+/*
+ * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ */
+
+package com.jogamp.newt.util;
+
+import java.util.*;
+import java.lang.reflect.Method;
+import java.lang.reflect.InvocationTargetException;
+import java.security.*;
+
+import javax.media.nativewindow.*;
+
+import com.jogamp.newt.*;
+import com.jogamp.newt.impl.*;
+import com.jogamp.newt.macosx.MacDisplay;
+import com.jogamp.nativewindow.impl.NWReflection;
+
+/**
+ * NEWT Utility class MainThread
+ *
+ * Such behavior is necessary for native windowing toolkits,
+ * where the windowing management must happen on the so called
+ * main thread e.g. for Mac OS X !
+ *
+ * Utilizing this class as a launchpad, now you are able to
+ * use a NEWT multithreaded application with window handling within the different threads,
+ * even on these restricted platforms.
+ *
+ * To support your NEWT Window platform,
+ * you have to pass your main thread actions to {@link #invoke invoke(..)},
+ * have a look at the {@link com.jogamp.newt.macosx.MacWindow MacWindow} implementation.
+ * TODO: Some hardcoded dependencies exist in this implementation,
+ * where you have to patch this code or factor it out. newt.MainThread.force
to true
.newt.MainThread.force
to true
.
+ java -XstartOnFirstThread com.jogamp.newt.util.MainThread demos.es1.RedSquare -GL2 -GL2 -GL2 -GL2
+
+ * Which starts 4 threads, each with a window and OpenGL rendering.
+ */
+public class MainThread {
+ private static AccessControlContext localACC = AccessController.getContext();
+ public static final boolean USE_MAIN_THREAD = NativeWindowFactory.TYPE_MACOSX.equals(NativeWindowFactory.getNativeWindowType(false)) ||
+ Debug.getBooleanProperty("newt.MainThread.force", true, localACC);
+
+ protected static final boolean DEBUG = Debug.debug("MainThread");
+
+ private static boolean isExit=false;
+ private static volatile boolean isRunning=false;
+ private static Object taskWorkerLock=new Object();
+ private static boolean shouldStop;
+ private static ArrayList tasks;
+ private static ArrayList tasksBlock;
+ private static Thread mainThread;
+
+ static class MainAction extends Thread {
+ private String mainClassName;
+ private String[] mainClassArgs;
+
+ private Class mainClass;
+ private Method mainClassMain;
+
+ public MainAction(String mainClassName, String[] mainClassArgs) {
+ this.mainClassName=mainClassName;
+ this.mainClassArgs=mainClassArgs;
+ }
+
+ public void run() {
+ if ( USE_MAIN_THREAD ) {
+ // we have to start first to provide the service ..
+ MainThread.waitUntilRunning();
+ }
+
+ // start user app ..
+ try {
+ Class mainClass = NWReflection.getClass(mainClassName, true);
+ if(null==mainClass) {
+ throw new RuntimeException(new ClassNotFoundException("MainThread couldn't find main class "+mainClassName));
+ }
+ try {
+ mainClassMain = mainClass.getDeclaredMethod("main", new Class[] { String[].class });
+ mainClassMain.setAccessible(true);
+ } catch (Throwable t) {
+ throw new RuntimeException(t);
+ }
+ if(DEBUG) System.err.println("MainAction.run(): "+Thread.currentThread().getName()+" invoke "+mainClassName);
+ mainClassMain.invoke(null, new Object[] { mainClassArgs } );
+ } catch (InvocationTargetException ite) {
+ ite.getTargetException().printStackTrace();
+ } catch (Throwable t) {
+ t.printStackTrace();
+ }
+
+ if(DEBUG) System.err.println("MainAction.run(): "+Thread.currentThread().getName()+" user app fin");
+
+ if ( USE_MAIN_THREAD ) {
+ MainThread.exit();
+ if(DEBUG) System.err.println("MainAction.run(): "+Thread.currentThread().getName()+" MainThread fin - exit");
+ System.exit(0);
+ }
+ }
+ }
+ private static MainAction mainAction;
+
+ /** Your new java application main entry, which pipelines your application */
+ public static void main(String[] args) {
+ if(DEBUG) System.err.println("MainThread.main(): "+Thread.currentThread().getName()+" USE_MAIN_THREAD "+ USE_MAIN_THREAD );
+
+ if(args.length==0) {
+ return;
+ }
+
+ String mainClassName=args[0];
+ String[] mainClassArgs=new String[args.length-1];
+ if(args.length>1) {
+ System.arraycopy(args, 1, mainClassArgs, 0, args.length-1);
+ }
+
+ NativeLibLoader.loadNEWT();
+
+ shouldStop = false;
+ tasks = new ArrayList();
+ tasksBlock = new ArrayList();
+ mainThread = Thread.currentThread();
+
+ mainAction = new MainAction(mainClassName, mainClassArgs);
+
+ if(NativeWindowFactory.TYPE_MACOSX.equals(NativeWindowFactory.getNativeWindowType(false))) {
+ MacDisplay.initSingleton();
+ }
+
+ if ( USE_MAIN_THREAD ) {
+ // dispatch user's main thread ..
+ mainAction.start();
+
+ // do our main thread task scheduling
+ run();
+ } else {
+ // run user's main in this thread
+ mainAction.run();
+ }
+ }
+
+ /** invokes the given Runnable */
+ public static void invoke(boolean wait, Runnable r) {
+ if(r == null) {
+ return;
+ }
+
+ // if this main thread is not being used or
+ // if this is already the main thread .. just execute.
+ if( !isRunning() || mainThread == Thread.currentThread() ) {
+ r.run();
+ return;
+ }
+
+ synchronized(taskWorkerLock) {
+ tasks.add(r);
+ if(wait) {
+ tasksBlock.add(r);
+ }
+ taskWorkerLock.notifyAll();
+ if(wait) {
+ while(tasksBlock.size()>0) {
+ try {
+ taskWorkerLock.wait();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+ }
+
+ public static void exit() {
+ if(DEBUG) System.err.println("MainThread.exit(): "+Thread.currentThread().getName()+" start");
+ synchronized(taskWorkerLock) {
+ if(isRunning) {
+ shouldStop = true;
+ }
+ taskWorkerLock.notifyAll();
+ }
+ if(DEBUG) System.err.println("MainThread.exit(): "+Thread.currentThread().getName()+" end");
+ }
+
+ public static boolean isRunning() {
+ synchronized(taskWorkerLock) {
+ return isRunning;
+ }
+ }
+
+ private static void waitUntilRunning() {
+ synchronized(taskWorkerLock) {
+ if(isExit) return;
+
+ while(!isRunning) {
+ try {
+ taskWorkerLock.wait();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+
+ public static void run() {
+ if(DEBUG) System.err.println("MainThread.run(): "+Thread.currentThread().getName());
+ synchronized(taskWorkerLock) {
+ isRunning = true;
+ taskWorkerLock.notifyAll();
+ }
+ while(!shouldStop) {
+ try {
+ ArrayList localTasks=null;
+
+ // wait for something todo ..
+ synchronized(taskWorkerLock) {
+ while(!shouldStop && tasks.size()==0) {
+ try {
+ taskWorkerLock.wait();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ // seq. process all tasks until no blocking one exists in the list
+ for(Iterator i = tasks.iterator(); tasksBlock.size()>0 && i.hasNext(); ) {
+ Runnable task = (Runnable) i.next();
+ task.run();
+ i.remove();
+ tasksBlock.remove(task);
+ }
+
+ // take over the tasks ..
+ if(tasks.size()>0) {
+ localTasks = tasks;
+ tasks = new ArrayList();
+ }
+ taskWorkerLock.notifyAll();
+ }
+
+ // seq. process all unblocking tasks ..
+ if(null!=localTasks) {
+ for(Iterator i = localTasks.iterator(); i.hasNext(); ) {
+ Runnable task = (Runnable) i.next();
+ task.run();
+ }
+ }
+ } catch (Throwable t) {
+ // handle errors ..
+ t.printStackTrace();
+ } finally {
+ // epilog - unlock locked stuff
+ }
+ }
+ if(DEBUG) System.err.println("MainThread.run(): "+Thread.currentThread().getName()+" fin");
+ synchronized(taskWorkerLock) {
+ isRunning = false;
+ isExit = true;
+ taskWorkerLock.notifyAll();
+ }
+ }
+}
+
+
diff --git a/src/newt/classes/com/jogamp/newt/windows/WindowsDisplay.java b/src/newt/classes/com/jogamp/newt/windows/WindowsDisplay.java
new file mode 100755
index 000000000..05cab1a0a
--- /dev/null
+++ b/src/newt/classes/com/jogamp/newt/windows/WindowsDisplay.java
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.newt.windows;
+
+import javax.media.nativewindow.*;
+import javax.media.nativewindow.windows.*;
+import com.jogamp.newt.*;
+import com.jogamp.newt.impl.*;
+
+public class WindowsDisplay extends Display {
+
+ protected static final String WINDOW_CLASS_NAME = "NewtWindowClass";
+ private static int windowClassAtom;
+ private static long hInstance;
+
+ static {
+ NativeLibLoader.loadNEWT();
+
+ if (!WindowsWindow.initIDs()) {
+ throw new NativeWindowException("Failed to initialize WindowsWindow jmethodIDs");
+ }
+ }
+
+ public static void initSingleton() {
+ // just exist to ensure static init has been run
+ }
+
+
+ public WindowsDisplay() {
+ }
+
+ protected void createNative() {
+ aDevice = new WindowsGraphicsDevice();
+ }
+
+ protected void closeNative() {
+ // Can't do .. only at application shutdown
+ // UnregisterWindowClass(getWindowClassAtom(), getHInstance());
+ }
+
+ protected void dispatchMessages() {
+ DispatchMessages();
+ }
+
+ protected static synchronized int getWindowClassAtom() {
+ if(0 == windowClassAtom) {
+ windowClassAtom = RegisterWindowClass(WINDOW_CLASS_NAME, getHInstance());
+ if (0 == windowClassAtom) {
+ throw new NativeWindowException("Error while registering window class");
+ }
+ }
+ return windowClassAtom;
+ }
+
+ protected static synchronized long getHInstance() {
+ if(0 == hInstance) {
+ hInstance = LoadLibraryW("newt");
+ if (0 == hInstance) {
+ throw new NativeWindowException("Error finding HINSTANCE for \"newt\"");
+ }
+ }
+ return hInstance;
+ }
+
+ //----------------------------------------------------------------------
+ // Internals only
+ //
+ private static native long LoadLibraryW(String libraryName);
+ private static native int RegisterWindowClass(String windowClassName, long hInstance);
+ private static native void UnregisterWindowClass(int wndClassAtom, long hInstance);
+
+ private static native void DispatchMessages();
+}
+
diff --git a/src/newt/classes/com/jogamp/newt/windows/WindowsScreen.java b/src/newt/classes/com/jogamp/newt/windows/WindowsScreen.java
new file mode 100755
index 000000000..aea3cd439
--- /dev/null
+++ b/src/newt/classes/com/jogamp/newt/windows/WindowsScreen.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.newt.windows;
+
+import com.jogamp.newt.*;
+import javax.media.nativewindow.*;
+
+public class WindowsScreen extends Screen {
+ static {
+ WindowsDisplay.initSingleton();
+ }
+
+
+ public WindowsScreen() {
+ }
+
+ protected void createNative(int index) {
+ aScreen = new DefaultGraphicsScreen(getDisplay().getGraphicsDevice(), index);
+ setScreenSize(getWidthImpl(getIndex()), getHeightImpl(getIndex()));
+ }
+
+ protected void closeNative() { }
+
+ private native int getWidthImpl(int scrn_idx);
+ private native int getHeightImpl(int scrn_idx);
+}
diff --git a/src/newt/classes/com/jogamp/newt/windows/WindowsWindow.java b/src/newt/classes/com/jogamp/newt/windows/WindowsWindow.java
new file mode 100755
index 000000000..4a468ae86
--- /dev/null
+++ b/src/newt/classes/com/jogamp/newt/windows/WindowsWindow.java
@@ -0,0 +1,289 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.newt.windows;
+
+import javax.media.nativewindow.*;
+import com.jogamp.newt.*;
+
+public class WindowsWindow extends Window {
+
+ private long hmon;
+ private long hdc;
+ private long windowHandleClose;
+ private long parentWindowHandle;
+ // non fullscreen dimensions ..
+ private int nfs_width, nfs_height, nfs_x, nfs_y;
+ private final Insets insets = new Insets(0, 0, 0, 0);
+
+ static {
+ WindowsDisplay.initSingleton();
+ }
+
+ public WindowsWindow() {
+ }
+
+ Thread hdcOwner = null;
+
+ public synchronized int lockSurface() throws NativeWindowException {
+ int res = super.lockSurface();
+ if(LOCK_SUCCESS==res && 0!=windowHandle) {
+ if(hdc!=0) {
+ throw new NativeWindowException("NEWT Surface handle set HDC "+toHexString(hdc)+" - "+Thread.currentThread().getName()+" ; "+this);
+ }
+ hdc = GetDC(windowHandle);
+ hmon = MonitorFromWindow(windowHandle);
+ hdcOwner = Thread.currentThread();
+ }
+ return res;
+ }
+
+ public synchronized void unlockSurface() {
+ // prevalidate, before we change data ..
+ Thread cur = Thread.currentThread();
+ if ( getSurfaceLockOwner() != cur ) {
+ getLockedStack().printStackTrace();
+ throw new NativeWindowException(cur+": Not owner, owner is "+getSurfaceLockOwner());
+ }
+ if (0!=hdc && 0!=windowHandle) {
+ if(hdcOwner != cur) {
+ throw new NativeWindowException("NEWT Surface handle set HDC "+toHexString(hdc)+" by other thread "+hdcOwner+", this "+cur+" ; "+this);
+ }
+ ReleaseDC(windowHandle, hdc);
+ hdc=0;
+ hdcOwner=null;
+ }
+ super.unlockSurface();
+ }
+
+ public long getSurfaceHandle() {
+ return hdc;
+ }
+
+ public boolean hasDeviceChanged() {
+ if(0!=windowHandle) {
+ long _hmon = MonitorFromWindow(windowHandle);
+ if (hmon != _hmon) {
+ if(DEBUG_IMPLEMENTATION || DEBUG_WINDOW_EVENT) {
+ Exception e = new Exception("!!! Window Device Changed "+Thread.currentThread().getName()+
+ ", HMON "+toHexString(hmon)+" -> "+toHexString(_hmon));
+ e.printStackTrace();
+ }
+ hmon = _hmon;
+ return true;
+ }
+ }
+ return false;
+ }
+
+ protected void createNative(long parentWindowHandle, Capabilities caps) {
+ WindowsScreen screen = (WindowsScreen) getScreen();
+ WindowsDisplay display = (WindowsDisplay) screen.getDisplay();
+ config = GraphicsConfigurationFactory.getFactory(display.getGraphicsDevice()).chooseGraphicsConfiguration(caps, null, screen.getGraphicsScreen());
+ if (config == null) {
+ throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
+ }
+ windowHandle = CreateWindow(parentWindowHandle,
+ display.getWindowClassAtom(), display.WINDOW_CLASS_NAME, display.getHInstance(),
+ 0, undecorated, x, y, width, height);
+ if (windowHandle == 0) {
+ throw new NativeWindowException("Error creating window");
+ }
+ this.parentWindowHandle = parentWindowHandle;
+ windowHandleClose = windowHandle;
+ if(DEBUG_IMPLEMENTATION || DEBUG_WINDOW_EVENT) {
+ Exception e = new Exception("!!! Window new window handle "+Thread.currentThread().getName()+
+ " (Parent HWND "+toHexString(parentWindowHandle)+
+ ") : HWND "+toHexString(windowHandle)+", "+Thread.currentThread());
+ e.printStackTrace();
+ }
+ }
+
+ protected void closeNative() {
+ if (hdc != 0) {
+ if(windowHandleClose != 0) {
+ ReleaseDC(windowHandleClose, hdc);
+ }
+ hdc = 0;
+ }
+ if(windowHandleClose != 0) {
+ DestroyWindow(windowHandleClose);
+ windowHandleClose = 0;
+ }
+ }
+
+ protected void windowDestroyed() {
+ windowHandleClose = 0;
+ super.windowDestroyed();
+ }
+
+ public void setVisible(boolean visible) {
+ if(this.visible!=visible && 0!=windowHandle) {
+ this.visible=visible;
+ setVisible0(windowHandle, visible);
+ }
+ }
+
+ // @Override
+ public void setSize(int width, int height) {
+ if (0!=windowHandle && (width != this.width || this.height != height)) {
+ if(!fullscreen) {
+ nfs_width=width;
+ nfs_height=height;
+ }
+ this.width = width;
+ this.height = height;
+ setSize0(parentWindowHandle, windowHandle, x, y, width, height);
+ }
+ }
+
+ //@Override
+ public void setPosition(int x, int y) {
+ if (0!=windowHandle && (this.x != x || this.y != y)) {
+ if(!fullscreen) {
+ nfs_x=x;
+ nfs_y=y;
+ }
+ this.x = x;
+ this.y = y;
+ setPosition(parentWindowHandle, windowHandle, x , y);
+ }
+ }
+
+ public boolean setFullscreen(boolean fullscreen) {
+ if(0!=windowHandle && (this.fullscreen!=fullscreen)) {
+ int x,y,w,h;
+ this.fullscreen=fullscreen;
+ if(fullscreen) {
+ x = 0; y = 0;
+ w = screen.getWidth();
+ h = screen.getHeight();
+ } else {
+ x = nfs_x;
+ y = nfs_y;
+ w = nfs_width;
+ h = nfs_height;
+ }
+ if(DEBUG_IMPLEMENTATION || DEBUG_WINDOW_EVENT) {
+ System.err.println("WindowsWindow fs: "+fullscreen+" "+x+"/"+y+" "+w+"x"+h);
+ }
+ setFullscreen0(parentWindowHandle, windowHandle, x, y, w, h, undecorated, fullscreen);
+ }
+ return fullscreen;
+ }
+
+ // @Override
+ public void requestFocus() {
+ super.requestFocus();
+ if (windowHandle != 0L) {
+ requestFocus(windowHandle);
+ }
+ }
+
+ // @Override
+ public void setTitle(String title) {
+ if (title == null) {
+ title = "";
+ }
+ if (0!=windowHandle && !title.equals(getTitle())) {
+ super.setTitle(title);
+ setTitle(windowHandle, title);
+ }
+ }
+
+ public Insets getInsets() {
+ return (Insets)insets.clone();
+ }
+
+ //----------------------------------------------------------------------
+ // Internals only
+ //
+ protected static native boolean initIDs();
+ private native long CreateWindow(long parentWindowHandle,
+ int wndClassAtom, String wndName,
+ long hInstance, long visualID,
+ boolean isUndecorated,
+ int x, int y, int width, int height);
+ private native void DestroyWindow(long windowHandle);
+ private native long GetDC(long windowHandle);
+ private native void ReleaseDC(long windowHandle, long hdc);
+ private native long MonitorFromWindow(long windowHandle);
+ private static native void setVisible0(long windowHandle, boolean visible);
+ private native void setSize0(long parentWindowHandle, long windowHandle, int x, int y, int width, int height);
+ private native void setPosition(long parentWindowHandle, long windowHandle, int x, int y);
+ private native void setFullscreen0(long parentWindowHandle, long windowHandle, int x, int y, int width, int height, boolean isUndecorated, boolean on);
+ private static native void setTitle(long windowHandle, String title);
+ private static native void requestFocus(long windowHandle);
+
+ private void insetsChanged(int left, int top, int right, int bottom) {
+ if (left != -1 && top != -1 && right != -1 && bottom != -1) {
+ insets.left = left;
+ insets.top = top;
+ insets.right = right;
+ insets.bottom = bottom;
+ }
+ }
+ private void sizeChanged(int newWidth, int newHeight) {
+ width = newWidth;
+ height = newHeight;
+ if(!fullscreen) {
+ nfs_width=width;
+ nfs_height=height;
+ }
+ sendWindowEvent(WindowEvent.EVENT_WINDOW_RESIZED);
+ }
+
+ private void positionChanged(int newX, int newY) {
+ x = newX;
+ y = newY;
+ if(!fullscreen) {
+ nfs_x=x;
+ nfs_y=y;
+ }
+ sendWindowEvent(WindowEvent.EVENT_WINDOW_MOVED);
+ }
+
+ /**
+ *
+ * @param focusOwner if focusGained is true, focusOwner is the previous
+ * focus owner, if focusGained is false, focusOwner is the new focus owner
+ * @param focusGained
+ */
+ private void focusChanged(long focusOwner, boolean focusGained) {
+ if (focusGained) {
+ sendWindowEvent(WindowEvent.EVENT_WINDOW_GAINED_FOCUS);
+ } else {
+ sendWindowEvent(WindowEvent.EVENT_WINDOW_LOST_FOCUS);
+ }
+ }
+}
diff --git a/src/newt/classes/com/jogamp/newt/x11/X11Display.java b/src/newt/classes/com/jogamp/newt/x11/X11Display.java
new file mode 100755
index 000000000..b8eb80b39
--- /dev/null
+++ b/src/newt/classes/com/jogamp/newt/x11/X11Display.java
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.newt.x11;
+
+import javax.media.nativewindow.*;
+import javax.media.nativewindow.x11.*;
+import com.jogamp.newt.*;
+import com.jogamp.newt.impl.*;
+import com.jogamp.nativewindow.impl.x11.X11Util;
+
+public class X11Display extends Display {
+ static {
+ NativeLibLoader.loadNEWT();
+
+ if (!initIDs()) {
+ throw new NativeWindowException("Failed to initialize X11Display jmethodIDs");
+ }
+
+ if (!X11Window.initIDs()) {
+ throw new NativeWindowException("Failed to initialize X11Window jmethodIDs");
+ }
+ }
+
+ public static void initSingleton() {
+ // just exist to ensure static init has been run
+ }
+
+
+ public X11Display() {
+ }
+
+ protected void createNative() {
+ long handle= X11Util.getThreadLocalDisplay(name);
+ if (handle == 0 ) {
+ throw new RuntimeException("Error creating display: "+name);
+ }
+ try {
+ CompleteDisplay(handle);
+ } catch(RuntimeException e) {
+ X11Util.closeThreadLocalDisplay(name);
+ throw e;
+ }
+ aDevice = new X11GraphicsDevice(handle);
+ }
+
+ protected void closeNative() {
+ if(0==X11Util.closeThreadLocalDisplay(name)) {
+ throw new NativeWindowException(this+" was not mapped");
+ }
+ }
+
+ protected void dispatchMessages() {
+ DispatchMessages(getHandle(), javaObjectAtom, windowDeleteAtom);
+ }
+
+ protected void lockDisplay() {
+ super.lockDisplay();
+ LockDisplay(getHandle());
+ }
+
+ protected void unlockDisplay() {
+ UnlockDisplay(getHandle());
+ super.unlockDisplay();
+ }
+
+ protected long getJavaObjectAtom() { return javaObjectAtom; }
+ protected long getWindowDeleteAtom() { return windowDeleteAtom; }
+
+ //----------------------------------------------------------------------
+ // Internals only
+ //
+ private static native boolean initIDs();
+
+ private native void LockDisplay(long handle);
+ private native void UnlockDisplay(long handle);
+
+ private native void CompleteDisplay(long handle);
+
+ private native void DispatchMessages(long display, long javaObjectAtom, long windowDeleteAtom);
+
+ private void displayCompleted(long javaObjectAtom, long windowDeleteAtom) {
+ this.javaObjectAtom=javaObjectAtom;
+ this.windowDeleteAtom=windowDeleteAtom;
+ }
+
+ private long windowDeleteAtom;
+ private long javaObjectAtom;
+}
+
diff --git a/src/newt/classes/com/jogamp/newt/x11/X11Screen.java b/src/newt/classes/com/jogamp/newt/x11/X11Screen.java
new file mode 100755
index 000000000..e053d99c0
--- /dev/null
+++ b/src/newt/classes/com/jogamp/newt/x11/X11Screen.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.newt.x11;
+
+import com.jogamp.newt.*;
+import javax.media.nativewindow.x11.*;
+
+public class X11Screen extends Screen {
+
+ static {
+ X11Display.initSingleton();
+ }
+
+
+ public X11Screen() {
+ }
+
+ protected void createNative(int index) {
+ long handle = GetScreen(display.getHandle(), index);
+ if (handle == 0 ) {
+ throw new RuntimeException("Error creating screen: "+index);
+ }
+ aScreen = new X11GraphicsScreen((X11GraphicsDevice)getDisplay().getGraphicsDevice(), index);
+ setScreenSize(getWidth0(display.getHandle(), index),
+ getHeight0(display.getHandle(), index));
+ }
+
+ protected void closeNative() { }
+
+ //----------------------------------------------------------------------
+ // Internals only
+ //
+
+ private native long GetScreen(long dpy, int scrn_idx);
+ private native int getWidth0(long display, int scrn_idx);
+ private native int getHeight0(long display, int scrn_idx);
+}
+
diff --git a/src/newt/classes/com/jogamp/newt/x11/X11Window.java b/src/newt/classes/com/jogamp/newt/x11/X11Window.java
new file mode 100755
index 000000000..cc3aa58a2
--- /dev/null
+++ b/src/newt/classes/com/jogamp/newt/x11/X11Window.java
@@ -0,0 +1,202 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ */
+
+package com.jogamp.newt.x11;
+
+import com.jogamp.newt.*;
+import javax.media.nativewindow.*;
+import javax.media.nativewindow.x11.*;
+
+public class X11Window extends Window {
+ private static final String WINDOW_CLASS_NAME = "NewtWindow";
+ // non fullscreen dimensions ..
+ private int nfs_width, nfs_height, nfs_x, nfs_y;
+
+ static {
+ X11Display.initSingleton();
+ }
+
+ public X11Window() {
+ }
+
+ protected void createNative(long parentWindowHandle, Capabilities caps) {
+ X11Screen screen = (X11Screen) getScreen();
+ X11Display display = (X11Display) screen.getDisplay();
+ config = GraphicsConfigurationFactory.getFactory(display.getGraphicsDevice()).chooseGraphicsConfiguration(caps, null, screen.getGraphicsScreen());
+ if (config == null) {
+ throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
+ }
+ X11GraphicsConfiguration x11config = (X11GraphicsConfiguration) config;
+ long visualID = x11config.getVisualID();
+ long w = CreateWindow(parentWindowHandle,
+ display.getHandle(), screen.getIndex(), visualID,
+ display.getJavaObjectAtom(), display.getWindowDeleteAtom(), x, y, width, height);
+ if (w == 0 || w!=windowHandle) {
+ throw new NativeWindowException("Error creating window: "+w);
+ }
+ this.parentWindowHandle = parentWindowHandle;
+ windowHandleClose = windowHandle;
+ displayHandleClose = display.getHandle();
+ }
+
+ protected void closeNative() {
+ if(0!=displayHandleClose && 0!=windowHandleClose && null!=getScreen() ) {
+ X11Display display = (X11Display) getScreen().getDisplay();
+ CloseWindow(displayHandleClose, windowHandleClose, display.getJavaObjectAtom());
+ windowHandleClose = 0;
+ displayHandleClose = 0;
+ }
+ }
+
+ protected void windowDestroyed() {
+ windowHandleClose = 0;
+ displayHandleClose = 0;
+ super.windowDestroyed();
+ }
+
+ public void setVisible(boolean visible) {
+ if(0!=windowHandle && this.visible!=visible) {
+ this.visible=visible;
+ setVisible0(getDisplayHandle(), windowHandle, visible);
+ clearEventMask();
+ }
+ }
+
+ public void requestFocus() {
+ super.requestFocus();
+ }
+
+ public void setSize(int width, int height) {
+ if(DEBUG_IMPLEMENTATION) {
+ System.err.println("X11Window setSize: "+this.x+"/"+this.y+" "+this.width+"x"+this.height+" -> "+width+"x"+height);
+ // Exception e = new Exception("XXXXXXXXXX");
+ // e.printStackTrace();
+ }
+ this.width = width;
+ this.height = height;
+ if(!fullscreen) {
+ nfs_width=width;
+ nfs_height=height;
+ }
+ if(0!=windowHandle) {
+ setSize0(parentWindowHandle, getDisplayHandle(), getScreenIndex(), windowHandle, x, y, width, height, (undecorated||fullscreen)?-1:1, false);
+ }
+ }
+
+ public void setPosition(int x, int y) {
+ if(DEBUG_IMPLEMENTATION) {
+ System.err.println("X11Window setPosition: "+this.x+"/"+this.y+" -> "+x+"/"+y);
+ // Exception e = new Exception("XXXXXXXXXX");
+ // e.printStackTrace();
+ }
+ this.x = x;
+ this.y = y;
+ if(!fullscreen) {
+ nfs_x=x;
+ nfs_y=y;
+ }
+ if(0!=windowHandle) {
+ setPosition0(getDisplayHandle(), windowHandle, x, y);
+ }
+ }
+
+ public boolean setFullscreen(boolean fullscreen) {
+ if(0!=windowHandle && this.fullscreen!=fullscreen) {
+ int x,y,w,h;
+ this.fullscreen=fullscreen;
+ if(fullscreen) {
+ x = 0; y = 0;
+ w = screen.getWidth();
+ h = screen.getHeight();
+ } else {
+ x = nfs_x;
+ y = nfs_y;
+ w = nfs_width;
+ h = nfs_height;
+ }
+ if(DEBUG_IMPLEMENTATION || DEBUG_WINDOW_EVENT) {
+ System.err.println("X11Window fs: "+fullscreen+" "+x+"/"+y+" "+w+"x"+h);
+ }
+ setSize0(parentWindowHandle, getDisplayHandle(), getScreenIndex(), windowHandle, x, y, w, h, (undecorated||fullscreen)?-1:1, false);
+ }
+ return fullscreen;
+ }
+
+ //----------------------------------------------------------------------
+ // Internals only
+ //
+
+ protected static native boolean initIDs();
+ private native long CreateWindow(long parentWindowHandle, long display, int screen_index,
+ long visualID, long javaObjectAtom, long windowDeleteAtom, int x, int y, int width, int height);
+ private native void CloseWindow(long display, long windowHandle, long javaObjectAtom);
+ private native void setVisible0(long display, long windowHandle, boolean visible);
+ private native void setSize0(long parentWindowHandle, long display, int screen_index, long windowHandle,
+ int x, int y, int width, int height, int decorationToggle, boolean setVisible);
+ private native void setPosition0(long display, long windowHandle, int x, int y);
+
+ private void windowChanged(int newX, int newY, int newWidth, int newHeight) {
+ if(width != newWidth || height != newHeight) {
+ if(DEBUG_IMPLEMENTATION) {
+ System.err.println("X11Window windowChanged size: "+this.width+"x"+this.height+" -> "+newWidth+"x"+newHeight);
+ }
+ width = newWidth;
+ height = newHeight;
+ if(!fullscreen) {
+ nfs_width=width;
+ nfs_height=height;
+ }
+ sendWindowEvent(WindowEvent.EVENT_WINDOW_RESIZED);
+ }
+ if( 0==parentWindowHandle && ( x != newX || y != newY ) ) {
+ if(DEBUG_IMPLEMENTATION) {
+ System.err.println("X11Window windowChanged position: "+this.x+"/"+this.y+" -> "+newX+"x"+newY);
+ }
+ x = newX;
+ y = newY;
+ if(!fullscreen) {
+ nfs_x=x;
+ nfs_y=y;
+ }
+ sendWindowEvent(WindowEvent.EVENT_WINDOW_MOVED);
+ }
+ }
+
+ private void windowCreated(long windowHandle) {
+ this.windowHandle = windowHandle;
+ }
+
+ private long windowHandleClose;
+ private long displayHandleClose;
+ private long parentWindowHandle;
+}
diff --git a/src/newt/native/BroadcomEGL.c b/src/newt/native/BroadcomEGL.c
index 8a9c5f948..9aac90abb 100755
--- a/src/newt/native/BroadcomEGL.c
+++ b/src/newt/native/BroadcomEGL.c
@@ -41,7 +41,7 @@
#include limit() - position()
) in the passed ByteBuffer into
+ a newly-allocated direct ByteBuffer. The returned buffer will
+ have its byte order set to the host platform's native byte
+ order. The position of the newly-allocated buffer will be zero,
+ and the position of the passed buffer is unchanged (though its
+ mark is changed). */
+ public static ByteBuffer copyByteBuffer(ByteBuffer orig) {
+ ByteBuffer dest = newByteBuffer(orig.remaining());
+ dest.put(orig);
+ dest.rewind();
+ return dest;
+ }
+
+ /** Copies the remaining elements (as defined by
+ limit() - position()
) in the passed FloatBuffer
+ into a newly-allocated direct FloatBuffer. The returned buffer
+ will have its byte order set to the host platform's native byte
+ order. The position of the newly-allocated buffer will be zero,
+ and the position of the passed buffer is unchanged (though its
+ mark is changed). */
+ public static FloatBuffer copyFloatBuffer(FloatBuffer orig) {
+ return copyFloatBufferAsByteBuffer(orig).asFloatBuffer();
+ }
+
+ /** Copies the remaining elements (as defined by
+ limit() - position()
) in the passed IntBuffer
+ into a newly-allocated direct IntBuffer. The returned buffer
+ will have its byte order set to the host platform's native byte
+ order. The position of the newly-allocated buffer will be zero,
+ and the position of the passed buffer is unchanged (though its
+ mark is changed). */
+ public static IntBuffer copyIntBuffer(IntBuffer orig) {
+ return copyIntBufferAsByteBuffer(orig).asIntBuffer();
+ }
+
+ /** Copies the remaining elements (as defined by
+ limit() - position()
) in the passed ShortBuffer
+ into a newly-allocated direct ShortBuffer. The returned buffer
+ will have its byte order set to the host platform's native byte
+ order. The position of the newly-allocated buffer will be zero,
+ and the position of the passed buffer is unchanged (though its
+ mark is changed). */
+ public static ShortBuffer copyShortBuffer(ShortBuffer orig) {
+ return copyShortBufferAsByteBuffer(orig).asShortBuffer();
+ }
+
+ //----------------------------------------------------------------------
+ // Copy routines (type-to-ByteBuffer)
+ //
+
+ /** Copies the remaining elements (as defined by
+ limit() - position()
) in the passed FloatBuffer
+ into a newly-allocated direct ByteBuffer. The returned buffer
+ will have its byte order set to the host platform's native byte
+ order. The position of the newly-allocated buffer will be zero,
+ and the position of the passed buffer is unchanged (though its
+ mark is changed). */
+ public static ByteBuffer copyFloatBufferAsByteBuffer(FloatBuffer orig) {
+ ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_FLOAT);
+ dest.asFloatBuffer().put(orig);
+ dest.rewind();
+ return dest;
+ }
+
+ /** Copies the remaining elements (as defined by
+ limit() - position()
) in the passed IntBuffer into
+ a newly-allocated direct ByteBuffer. The returned buffer will
+ have its byte order set to the host platform's native byte
+ order. The position of the newly-allocated buffer will be zero,
+ and the position of the passed buffer is unchanged (though its
+ mark is changed). */
+ public static ByteBuffer copyIntBufferAsByteBuffer(IntBuffer orig) {
+ ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_INT);
+ dest.asIntBuffer().put(orig);
+ dest.rewind();
+ return dest;
+ }
+
+ /** Copies the remaining elements (as defined by
+ limit() - position()
) in the passed ShortBuffer
+ into a newly-allocated direct ByteBuffer. The returned buffer
+ will have its byte order set to the host platform's native byte
+ order. The position of the newly-allocated buffer will be zero,
+ and the position of the passed buffer is unchanged (though its
+ mark is changed). */
+ public static ByteBuffer copyShortBufferAsByteBuffer(ShortBuffer orig) {
+ ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_SHORT);
+ dest.asShortBuffer().put(orig);
+ dest.rewind();
+ return dest;
+ }
+
+ //----------------------------------------------------------------------
+ // Conversion routines
+ //
+
+ public final static float[] getFloatArray(double[] source) {
+ int i=source.length;
+ float[] dest = new float[i--];
+ while(i>=0) { dest[i]=(float)source[i]; i--; }
+ return dest;
+ }
+
+ public final static FloatBuffer getFloatBuffer(DoubleBuffer source) {
+ source.rewind();
+ FloatBuffer dest = BufferUtil.newFloatBuffer(source.limit());
+ while(source.hasRemaining()) { dest.put((float)source.get()); }
+ return dest;
+ }
+
+ public static ByteBuffer nativeOrder(ByteBuffer buf) {
+ if (!isCDCFP) {
+ try {
+ if (byteOrderClass == null) {
+ byteOrderClass = Class.forName("java.nio.ByteOrder");
+ orderMethod = ByteBuffer.class.getMethod("order", new Class[] { byteOrderClass });
+ Method nativeOrderMethod = byteOrderClass.getMethod("nativeOrder", null);
+ nativeOrderObject = nativeOrderMethod.invoke(null, null);
+ }
+ } catch (Throwable t) {
+ // Must be running on CDC / FP
+ isCDCFP = true;
+ }
+
+ if (!isCDCFP) {
+ try {
+ orderMethod.invoke(buf, new Object[] { nativeOrderObject });
+ } catch (Throwable t) {
+ }
+ }
+ }
+ return buf;
+ }
+
+ //----------------------------------------------------------------------
+ // Convenient GL put methods with generic target Buffer
+ //
+ public static void put(Buffer dest, Buffer v) {
+ if((dest instanceof ByteBuffer) && (v instanceof ByteBuffer)) {
+ ((ByteBuffer)dest).put((ByteBuffer)v);
+ } else if((dest instanceof ShortBuffer) && (v instanceof ShortBuffer)) {
+ ((ShortBuffer)dest).put((ShortBuffer)v);
+ } else if((dest instanceof IntBuffer) && (v instanceof IntBuffer)) {
+ ((IntBuffer)dest).put((IntBuffer)v);
+ } else if((dest instanceof FloatBuffer) && (v instanceof FloatBuffer)) {
+ ((FloatBuffer)dest).put((FloatBuffer)v);
+ } else {
+ throw new GLException("Incompatible Buffer classes: dest = "+dest.getClass().getName() + ", src = " + v.getClass().getName());
+ }
+ }
+
+ public static void putb(Buffer dest, byte v) {
+ if(dest instanceof ByteBuffer) {
+ ((ByteBuffer)dest).put(v);
+ } else if(dest instanceof ShortBuffer) {
+ ((ShortBuffer)dest).put((short)v);
+ } else if(dest instanceof IntBuffer) {
+ ((IntBuffer)dest).put((int)v);
+ } else {
+ throw new GLException("Byte doesn't match Buffer Class: "+dest);
+ }
+ }
+
+ public static void puts(Buffer dest, short v) {
+ if(dest instanceof ShortBuffer) {
+ ((ShortBuffer)dest).put(v);
+ } else if(dest instanceof IntBuffer) {
+ ((IntBuffer)dest).put((int)v);
+ } else {
+ throw new GLException("Short doesn't match Buffer Class: "+dest);
+ }
+ }
+
+ public static void puti(Buffer dest, int v) {
+ if(dest instanceof IntBuffer) {
+ ((IntBuffer)dest).put(v);
+ } else {
+ throw new GLException("Integer doesn't match Buffer Class: "+dest);
+ }
+ }
+
+ public static void putx(Buffer dest, int v) {
+ puti(dest, v);
+ }
+
+ public static void putf(Buffer dest, float v) {
+ if(dest instanceof FloatBuffer) {
+ ((FloatBuffer)dest).put(v);
+ } else if(dest instanceof IntBuffer) {
+ ((IntBuffer)dest).put(FixedPoint.toFixed(v));
+ } else {
+ throw new GLException("Float doesn't match Buffer Class: "+dest);
+ }
+ }
+
+ public static void putd(Buffer dest, double v) {
+ if(dest instanceof FloatBuffer) {
+ ((FloatBuffer)dest).put((float)v);
+ } else {
+ throw new GLException("Double doesn't match Buffer Class: "+dest);
+ }
+ }
+
+ //----------------------------------------------------------------------
+ // Internals only below this point
+ //
+
+ // NOTE that this work must be done reflectively at the present time
+ // because this code must compile and run correctly on both CDC/FP and J2SE
+ private static boolean isCDCFP;
+ private static Class byteOrderClass;
+ private static Object nativeOrderObject;
+ private static Method orderMethod;
+
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/BufferUtil.java.javame_cdc_fp b/src/jogl/classes/com/jogamp/opengl/util/BufferUtil.java.javame_cdc_fp
deleted file mode 100755
index 2f82487f8..000000000
--- a/src/jogl/classes/com/jogamp/opengl/util/BufferUtil.java.javame_cdc_fp
+++ /dev/null
@@ -1,449 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.jogamp.opengl.util;
-
-import javax.media.opengl.GL;
-import javax.media.opengl.GL2;
-import javax.media.opengl.GL2ES2;
-import javax.media.opengl.GLException;
-import javax.media.opengl.GLProfile;
-
-import java.nio.*;
-import java.util.*;
-
-import java.lang.reflect.*;
-
-/** Utility routines for dealing with direct buffers. */
-
-public class BufferUtil {
- public static final int SIZEOF_BYTE = 1;
- public static final int SIZEOF_SHORT = 2;
- public static final int SIZEOF_INT = 4;
- public static final int SIZEOF_FLOAT = 4;
- public static final int SIZEOF_LONG = -1; // not supported
- public static final int SIZEOF_DOUBLE = -1; // not supported
-
- public static final int sizeOfGLType(int glType) {
- switch (glType) {
- case GL.GL_UNSIGNED_BYTE:
- return SIZEOF_BYTE;
- case GL.GL_BYTE:
- return SIZEOF_BYTE;
- case GL.GL_UNSIGNED_SHORT:
- return SIZEOF_SHORT;
- case GL.GL_SHORT:
- return SIZEOF_SHORT;
- case GL.GL_FLOAT:
- return SIZEOF_FLOAT;
- case GL.GL_FIXED:
- return SIZEOF_INT;
- case GL2ES2.GL_INT:
- return SIZEOF_INT;
- case GL2ES2.GL_UNSIGNED_INT:
- return SIZEOF_INT;
- case GL2.GL_DOUBLE:
- return SIZEOF_DOUBLE;
- }
- return -1;
- }
-
- public static final int sizeOfBufferElem(Buffer buffer) {
- if (buffer == null) {
- return 0;
- }
- if (buffer instanceof ByteBuffer) {
- return BufferUtil.SIZEOF_BYTE;
- } else if (buffer instanceof IntBuffer) {
- return BufferUtil.SIZEOF_INT;
- } else if (buffer instanceof ShortBuffer) {
- return BufferUtil.SIZEOF_SHORT;
- } else if (buffer instanceof FloatBuffer) {
- return BufferUtil.SIZEOF_FLOAT;
- }
- throw new RuntimeException("Unexpected buffer type " +
- buffer.getClass().getName());
- }
-
- private BufferUtil() {}
-
- //----------------------------------------------------------------------
- // Allocation routines
- //
-
- public static final Buffer newGLBuffer(int glType, int numElements) {
- switch (glType) {
- case GL.GL_UNSIGNED_BYTE:
- case GL.GL_BYTE:
- return newByteBuffer(numElements);
- case GL.GL_UNSIGNED_SHORT:
- case GL.GL_SHORT:
- return newShortBuffer(numElements);
- case GL.GL_FLOAT:
- return newFloatBuffer(numElements);
- case GL.GL_FIXED:
- case GL2ES2.GL_INT:
- case GL2ES2.GL_UNSIGNED_INT:
- return newIntBuffer(numElements);
- }
- return null;
- }
-
- public static final Buffer sliceGLBuffer(ByteBuffer parent, int bytePos, int byteLen, int glType) {
- if(parent==null || byteLen==0) return null;
- parent.position(bytePos);
- parent.limit(bytePos + byteLen);
-
- switch (glType) {
- case GL.GL_UNSIGNED_BYTE:
- case GL.GL_BYTE:
- return parent.slice();
- case GL.GL_UNSIGNED_SHORT:
- case GL.GL_SHORT:
- return parent.asShortBuffer();
- case GL.GL_FLOAT:
- return parent.asFloatBuffer();
- case GL.GL_FIXED:
- case GL2ES2.GL_INT:
- case GL2ES2.GL_UNSIGNED_INT:
- return parent.asIntBuffer();
- }
- return null;
- }
-
- /** Allocates a new direct ByteBuffer with the specified number of
- elements. The returned buffer will have its byte order set to
- the host platform's native byte order. */
- public static ByteBuffer newByteBuffer(int numElements) {
- ByteBuffer bb = ByteBuffer.allocateDirect(numElements);
- nativeOrder(bb);
- return bb;
- }
-
- public static ByteBuffer newByteBuffer(byte[] values, int offset, int len) {
- ByteBuffer bb = newByteBuffer(len);
- bb.put(values, offset, len);
- bb.rewind();
- return bb;
- }
-
- public static ByteBuffer newByteBuffer(byte[] values, int offset) {
- return newByteBuffer(values, offset, values.length-offset);
- }
-
- public static ByteBuffer newByteBuffer(byte[] values) {
- return newByteBuffer(values, 0);
- }
-
- /** Allocates a new direct FloatBuffer with the specified number of
- elements. The returned buffer will have its byte order set to
- the host platform's native byte order. */
- public static FloatBuffer newFloatBuffer(int numElements) {
- ByteBuffer bb = newByteBuffer(numElements * SIZEOF_FLOAT);
- return bb.asFloatBuffer();
- }
-
- public static FloatBuffer newFloatBuffer(float[] values, int offset, int len) {
- FloatBuffer bb = newFloatBuffer(len);
- bb.put(values, offset, len);
- bb.rewind();
- return bb;
- }
-
- public static FloatBuffer newFloatBuffer(float[] values, int offset) {
- return newFloatBuffer(values, 0, values.length-offset);
- }
-
- public static FloatBuffer newFloatBuffer(float[] values) {
- return newFloatBuffer(values, 0);
- }
-
- /** Allocates a new direct IntBuffer with the specified number of
- elements. The returned buffer will have its byte order set to
- the host platform's native byte order. */
- public static IntBuffer newIntBuffer(int numElements) {
- ByteBuffer bb = newByteBuffer(numElements * SIZEOF_INT);
- return bb.asIntBuffer();
- }
-
- public static IntBuffer newIntBuffer(int[] values, int offset, int len) {
- IntBuffer bb = newIntBuffer(len);
- bb.put(values, offset, len);
- bb.rewind();
- return bb;
- }
-
- public static IntBuffer newIntBuffer(int[] values, int offset) {
- return newIntBuffer(values, 0, values.length-offset);
- }
-
- public static IntBuffer newIntBuffer(int[] values) {
- return newIntBuffer(values, 0);
- }
-
-
- /** Allocates a new direct ShortBuffer with the specified number of
- elements. The returned buffer will have its byte order set to
- the host platform's native byte order. */
- public static ShortBuffer newShortBuffer(int numElements) {
- ByteBuffer bb = newByteBuffer(numElements * SIZEOF_SHORT);
- return bb.asShortBuffer();
- }
-
- public static ShortBuffer newShortBuffer(short[] values, int offset, int len) {
- ShortBuffer bb = newShortBuffer(len);
- bb.put(values, offset, len);
- bb.rewind();
- return bb;
- }
-
- public static ShortBuffer newShortBuffer(short[] values, int offset) {
- return newShortBuffer(values, 0, values.length-offset);
- }
-
- public static ShortBuffer newShortBuffer(short[] values) {
- return newShortBuffer(values, 0);
- }
-
-
- //----------------------------------------------------------------------
- // Copy routines (type-to-type)
- //
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed ByteBuffer into
- a newly-allocated direct ByteBuffer. The returned buffer will
- have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ByteBuffer copyByteBuffer(ByteBuffer orig) {
- ByteBuffer dest = newByteBuffer(orig.remaining());
- dest.put(orig);
- dest.rewind();
- return dest;
- }
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed FloatBuffer
- into a newly-allocated direct FloatBuffer. The returned buffer
- will have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static FloatBuffer copyFloatBuffer(FloatBuffer orig) {
- return copyFloatBufferAsByteBuffer(orig).asFloatBuffer();
- }
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed IntBuffer
- into a newly-allocated direct IntBuffer. The returned buffer
- will have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static IntBuffer copyIntBuffer(IntBuffer orig) {
- return copyIntBufferAsByteBuffer(orig).asIntBuffer();
- }
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed ShortBuffer
- into a newly-allocated direct ShortBuffer. The returned buffer
- will have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ShortBuffer copyShortBuffer(ShortBuffer orig) {
- return copyShortBufferAsByteBuffer(orig).asShortBuffer();
- }
-
- //----------------------------------------------------------------------
- // Copy routines (type-to-ByteBuffer)
- //
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed FloatBuffer
- into a newly-allocated direct ByteBuffer. The returned buffer
- will have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ByteBuffer copyFloatBufferAsByteBuffer(FloatBuffer orig) {
- ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_FLOAT);
- dest.asFloatBuffer().put(orig);
- dest.rewind();
- return dest;
- }
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed IntBuffer into
- a newly-allocated direct ByteBuffer. The returned buffer will
- have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ByteBuffer copyIntBufferAsByteBuffer(IntBuffer orig) {
- ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_INT);
- dest.asIntBuffer().put(orig);
- dest.rewind();
- return dest;
- }
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed ShortBuffer
- into a newly-allocated direct ByteBuffer. The returned buffer
- will have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ByteBuffer copyShortBufferAsByteBuffer(ShortBuffer orig) {
- ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_SHORT);
- dest.asShortBuffer().put(orig);
- dest.rewind();
- return dest;
- }
-
- //----------------------------------------------------------------------
- // Conversion routines
- //
-
- public final static float[] getFloatArray(double[] source) {
- int i=source.length;
- float[] dest = new float[i--];
- while(i>=0) { dest[i]=(float)source[i]; i--; }
- return dest;
- }
-
- public static ByteBuffer nativeOrder(ByteBuffer buf) {
- if (!isCDCFP) {
- try {
- if (byteOrderClass == null) {
- byteOrderClass = Class.forName("java.nio.ByteOrder");
- orderMethod = ByteBuffer.class.getMethod("order", new Class[] { byteOrderClass });
- Method nativeOrderMethod = byteOrderClass.getMethod("nativeOrder", null);
- nativeOrderObject = nativeOrderMethod.invoke(null, null);
- }
- } catch (Throwable t) {
- // Must be running on CDC / FP
- isCDCFP = true;
- }
-
- if (!isCDCFP) {
- try {
- orderMethod.invoke(buf, new Object[] { nativeOrderObject });
- } catch (Throwable t) {
- }
- }
- }
- return buf;
- }
-
- //----------------------------------------------------------------------
- // Convenient GL put methods with generic target Buffer
- //
- public static void put(Buffer dest, Buffer v) {
- if((dest instanceof ByteBuffer) && (v instanceof ByteBuffer)) {
- ((ByteBuffer)dest).put((ByteBuffer)v);
- } else if((dest instanceof ShortBuffer) && (v instanceof ShortBuffer)) {
- ((ShortBuffer)dest).put((ShortBuffer)v);
- } else if((dest instanceof IntBuffer) && (v instanceof IntBuffer)) {
- ((IntBuffer)dest).put((IntBuffer)v);
- } else if((dest instanceof FloatBuffer) && (v instanceof FloatBuffer)) {
- ((FloatBuffer)dest).put((FloatBuffer)v);
- } else {
- throw new GLException("Incompatible Buffer classes: dest = "+dest.getClass().getName() + ", src = " + v.getClass().getName());
- }
- }
-
- public static void putb(Buffer dest, byte v) {
- if(dest instanceof ByteBuffer) {
- ((ByteBuffer)dest).put(v);
- } else if(dest instanceof ShortBuffer) {
- ((ShortBuffer)dest).put((short)v);
- } else if(dest instanceof IntBuffer) {
- ((IntBuffer)dest).put((int)v);
- } else {
- throw new GLException("Byte doesn't match Buffer Class: "+dest);
- }
- }
-
- public static void puts(Buffer dest, short v) {
- if(dest instanceof ShortBuffer) {
- ((ShortBuffer)dest).put(v);
- } else if(dest instanceof IntBuffer) {
- ((IntBuffer)dest).put((int)v);
- } else {
- throw new GLException("Short doesn't match Buffer Class: "+dest);
- }
- }
-
- public static void puti(Buffer dest, int v) {
- if(dest instanceof IntBuffer) {
- ((IntBuffer)dest).put(v);
- } else {
- throw new GLException("Integer doesn't match Buffer Class: "+dest);
- }
- }
-
- public static void putx(Buffer dest, int v) {
- puti(dest, v);
- }
-
- public static void putf(Buffer dest, float v) {
- if(dest instanceof FloatBuffer) {
- ((FloatBuffer)dest).put(v);
- } else if(dest instanceof IntBuffer) {
- ((IntBuffer)dest).put(FixedPoint.toFixed(v));
- } else {
- throw new GLException("Float doesn't match Buffer Class: "+dest);
- }
- }
-
- //----------------------------------------------------------------------
- // Internals only below this point
- //
-
- // NOTE that this work must be done reflectively at the present time
- // because this code must compile and run correctly on both CDC/FP and J2SE
- private static boolean isCDCFP;
- private static Class byteOrderClass;
- private static Object nativeOrderObject;
- private static Method orderMethod;
-
-}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/BufferUtil.java.javase b/src/jogl/classes/com/jogamp/opengl/util/BufferUtil.java.javase
deleted file mode 100755
index fde1e8681..000000000
--- a/src/jogl/classes/com/jogamp/opengl/util/BufferUtil.java.javase
+++ /dev/null
@@ -1,499 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- *
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package com.jogamp.opengl.util;
-
-import javax.media.opengl.GL;
-import javax.media.opengl.GL2;
-import javax.media.opengl.GL2ES2;
-import javax.media.opengl.GLException;
-import javax.media.opengl.GLProfile;
-
-import java.nio.*;
-import java.util.*;
-
-import java.lang.reflect.*;
-
-/** Utility routines for dealing with direct buffers. */
-
-public class BufferUtil {
- public static final int SIZEOF_BYTE = 1;
- public static final int SIZEOF_SHORT = 2;
- public static final int SIZEOF_INT = 4;
- public static final int SIZEOF_FLOAT = 4;
- public static final int SIZEOF_LONG = 8;
- public static final int SIZEOF_DOUBLE = 8;
-
- public static final int sizeOfGLType(int glType) {
- switch (glType) {
- case GL.GL_UNSIGNED_BYTE:
- return SIZEOF_BYTE;
- case GL.GL_BYTE:
- return SIZEOF_BYTE;
- case GL.GL_UNSIGNED_SHORT:
- return SIZEOF_SHORT;
- case GL.GL_SHORT:
- return SIZEOF_SHORT;
- case GL.GL_FLOAT:
- return SIZEOF_FLOAT;
- case GL.GL_FIXED:
- return SIZEOF_INT;
- case GL2ES2.GL_INT:
- return SIZEOF_INT;
- case GL2ES2.GL_UNSIGNED_INT:
- return SIZEOF_INT;
- case GL2.GL_DOUBLE:
- return SIZEOF_DOUBLE;
- }
- return -1;
- }
-
- public static final int sizeOfBufferElem(Buffer buffer) {
- if (buffer == null) {
- return 0;
- }
- if (buffer instanceof ByteBuffer) {
- return BufferUtil.SIZEOF_BYTE;
- } else if (buffer instanceof IntBuffer) {
- return BufferUtil.SIZEOF_INT;
- } else if (buffer instanceof ShortBuffer) {
- return BufferUtil.SIZEOF_SHORT;
- } else if (buffer instanceof FloatBuffer) {
- return BufferUtil.SIZEOF_FLOAT;
- } else if (buffer instanceof DoubleBuffer) {
- return BufferUtil.SIZEOF_DOUBLE;
- }
- throw new RuntimeException("Unexpected buffer type " +
- buffer.getClass().getName());
- }
-
- private BufferUtil() {}
-
- //----------------------------------------------------------------------
- // Allocation routines
- //
-
- public static final Buffer newGLBuffer(int glType, int numElements) {
- switch (glType) {
- case GL.GL_UNSIGNED_BYTE:
- case GL.GL_BYTE:
- return newByteBuffer(numElements);
- case GL.GL_UNSIGNED_SHORT:
- case GL.GL_SHORT:
- return newShortBuffer(numElements);
- case GL.GL_FLOAT:
- return newFloatBuffer(numElements);
- case GL.GL_FIXED:
- case GL2ES2.GL_INT:
- case GL2ES2.GL_UNSIGNED_INT:
- return newIntBuffer(numElements);
- case GL2.GL_DOUBLE:
- return newDoubleBuffer(numElements);
- }
- return null;
- }
-
- public static final Buffer sliceGLBuffer(ByteBuffer parent, int bytePos, int byteLen, int glType) {
- if(parent==null || byteLen==0) return null;
- parent.position(bytePos);
- parent.limit(bytePos + byteLen);
-
- switch (glType) {
- case GL.GL_UNSIGNED_BYTE:
- case GL.GL_BYTE:
- return parent.slice();
- case GL.GL_UNSIGNED_SHORT:
- case GL.GL_SHORT:
- return parent.asShortBuffer();
- case GL.GL_FLOAT:
- return parent.asFloatBuffer();
- case GL.GL_FIXED:
- case GL2ES2.GL_INT:
- case GL2ES2.GL_UNSIGNED_INT:
- return parent.asIntBuffer();
- case GL2.GL_DOUBLE:
- return parent.asDoubleBuffer();
- }
- return null;
- }
-
- /** Allocates a new direct ByteBuffer with the specified number of
- elements. The returned buffer will have its byte order set to
- the host platform's native byte order. */
- public static ByteBuffer newByteBuffer(int numElements) {
- ByteBuffer bb = ByteBuffer.allocateDirect(numElements);
- nativeOrder(bb);
- return bb;
- }
-
- public static ByteBuffer newByteBuffer(byte[] values, int offset, int len) {
- ByteBuffer bb = newByteBuffer(len);
- bb.put(values, offset, len);
- bb.rewind();
- return bb;
- }
-
- public static ByteBuffer newByteBuffer(byte[] values, int offset) {
- return newByteBuffer(values, offset, values.length-offset);
- }
-
- public static ByteBuffer newByteBuffer(byte[] values) {
- return newByteBuffer(values, 0);
- }
-
-
- /** Allocates a new direct DoubleBuffer with the specified number of
- elements. The returned buffer will have its byte order set to
- the host platform's native byte order. */
- public static DoubleBuffer newDoubleBuffer(int numElements) {
- ByteBuffer bb = newByteBuffer(numElements * SIZEOF_DOUBLE);
- return bb.asDoubleBuffer();
- }
-
- public static DoubleBuffer newDoubleBuffer(double[] values, int offset) {
- int len = values.length-offset;
- DoubleBuffer bb = newDoubleBuffer(len);
- bb.put(values, offset, len);
- bb.rewind();
- return bb;
- }
-
- public static DoubleBuffer newDoubleBuffer(double[] values) {
- return newDoubleBuffer(values, 0);
- }
-
-
- /** Allocates a new direct FloatBuffer with the specified number of
- elements. The returned buffer will have its byte order set to
- the host platform's native byte order. */
- public static FloatBuffer newFloatBuffer(int numElements) {
- ByteBuffer bb = newByteBuffer(numElements * SIZEOF_FLOAT);
- return bb.asFloatBuffer();
- }
-
- public static FloatBuffer newFloatBuffer(float[] values, int offset, int len) {
- FloatBuffer bb = newFloatBuffer(len);
- bb.put(values, offset, len);
- bb.rewind();
- return bb;
- }
-
- public static FloatBuffer newFloatBuffer(float[] values, int offset) {
- return newFloatBuffer(values, 0, values.length-offset);
- }
-
- public static FloatBuffer newFloatBuffer(float[] values) {
- return newFloatBuffer(values, 0);
- }
-
-
- /** Allocates a new direct IntBuffer with the specified number of
- elements. The returned buffer will have its byte order set to
- the host platform's native byte order. */
- public static IntBuffer newIntBuffer(int numElements) {
- ByteBuffer bb = newByteBuffer(numElements * SIZEOF_INT);
- return bb.asIntBuffer();
- }
-
- public static IntBuffer newIntBuffer(int[] values, int offset, int len) {
- IntBuffer bb = newIntBuffer(len);
- bb.put(values, offset, len);
- bb.rewind();
- return bb;
- }
-
- public static IntBuffer newIntBuffer(int[] values, int offset) {
- return newIntBuffer(values, 0, values.length-offset);
- }
-
- public static IntBuffer newIntBuffer(int[] values) {
- return newIntBuffer(values, 0);
- }
-
- /** Allocates a new direct LongBuffer with the specified number of
- elements. The returned buffer will have its byte order set to
- the host platform's native byte order. */
- public static LongBuffer newLongBuffer(int numElements) {
- ByteBuffer bb = newByteBuffer(numElements * SIZEOF_LONG);
- return bb.asLongBuffer();
- }
-
- /** Allocates a new direct ShortBuffer with the specified number of
- elements. The returned buffer will have its byte order set to
- the host platform's native byte order. */
- public static ShortBuffer newShortBuffer(int numElements) {
- ByteBuffer bb = newByteBuffer(numElements * SIZEOF_SHORT);
- return bb.asShortBuffer();
- }
-
- public static ShortBuffer newShortBuffer(short[] values, int offset, int len) {
- ShortBuffer bb = newShortBuffer(len);
- bb.put(values, offset, len);
- bb.rewind();
- return bb;
- }
-
- public static ShortBuffer newShortBuffer(short[] values, int offset) {
- return newShortBuffer(values, 0, values.length-offset);
- }
-
- public static ShortBuffer newShortBuffer(short[] values) {
- return newShortBuffer(values, 0);
- }
-
- //----------------------------------------------------------------------
- // Copy routines (type-to-type)
- //
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed ByteBuffer into
- a newly-allocated direct ByteBuffer. The returned buffer will
- have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ByteBuffer copyByteBuffer(ByteBuffer orig) {
- ByteBuffer dest = newByteBuffer(orig.remaining());
- dest.put(orig);
- dest.rewind();
- return dest;
- }
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed FloatBuffer
- into a newly-allocated direct FloatBuffer. The returned buffer
- will have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static FloatBuffer copyFloatBuffer(FloatBuffer orig) {
- return copyFloatBufferAsByteBuffer(orig).asFloatBuffer();
- }
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed IntBuffer
- into a newly-allocated direct IntBuffer. The returned buffer
- will have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static IntBuffer copyIntBuffer(IntBuffer orig) {
- return copyIntBufferAsByteBuffer(orig).asIntBuffer();
- }
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed ShortBuffer
- into a newly-allocated direct ShortBuffer. The returned buffer
- will have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ShortBuffer copyShortBuffer(ShortBuffer orig) {
- return copyShortBufferAsByteBuffer(orig).asShortBuffer();
- }
-
- //----------------------------------------------------------------------
- // Copy routines (type-to-ByteBuffer)
- //
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed FloatBuffer
- into a newly-allocated direct ByteBuffer. The returned buffer
- will have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ByteBuffer copyFloatBufferAsByteBuffer(FloatBuffer orig) {
- ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_FLOAT);
- dest.asFloatBuffer().put(orig);
- dest.rewind();
- return dest;
- }
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed IntBuffer into
- a newly-allocated direct ByteBuffer. The returned buffer will
- have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ByteBuffer copyIntBufferAsByteBuffer(IntBuffer orig) {
- ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_INT);
- dest.asIntBuffer().put(orig);
- dest.rewind();
- return dest;
- }
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed ShortBuffer
- into a newly-allocated direct ByteBuffer. The returned buffer
- will have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ByteBuffer copyShortBufferAsByteBuffer(ShortBuffer orig) {
- ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_SHORT);
- dest.asShortBuffer().put(orig);
- dest.rewind();
- return dest;
- }
-
- //----------------------------------------------------------------------
- // Conversion routines
- //
-
- public final static float[] getFloatArray(double[] source) {
- int i=source.length;
- float[] dest = new float[i--];
- while(i>=0) { dest[i]=(float)source[i]; i--; }
- return dest;
- }
-
- public final static FloatBuffer getFloatBuffer(DoubleBuffer source) {
- source.rewind();
- FloatBuffer dest = BufferUtil.newFloatBuffer(source.limit());
- while(source.hasRemaining()) { dest.put((float)source.get()); }
- return dest;
- }
-
- public static ByteBuffer nativeOrder(ByteBuffer buf) {
- if (!isCDCFP) {
- try {
- if (byteOrderClass == null) {
- byteOrderClass = Class.forName("java.nio.ByteOrder");
- orderMethod = ByteBuffer.class.getMethod("order", new Class[] { byteOrderClass });
- Method nativeOrderMethod = byteOrderClass.getMethod("nativeOrder", null);
- nativeOrderObject = nativeOrderMethod.invoke(null, null);
- }
- } catch (Throwable t) {
- // Must be running on CDC / FP
- isCDCFP = true;
- }
-
- if (!isCDCFP) {
- try {
- orderMethod.invoke(buf, new Object[] { nativeOrderObject });
- } catch (Throwable t) {
- }
- }
- }
- return buf;
- }
-
- //----------------------------------------------------------------------
- // Convenient GL put methods with generic target Buffer
- //
- public static void put(Buffer dest, Buffer v) {
- if((dest instanceof ByteBuffer) && (v instanceof ByteBuffer)) {
- ((ByteBuffer)dest).put((ByteBuffer)v);
- } else if((dest instanceof ShortBuffer) && (v instanceof ShortBuffer)) {
- ((ShortBuffer)dest).put((ShortBuffer)v);
- } else if((dest instanceof IntBuffer) && (v instanceof IntBuffer)) {
- ((IntBuffer)dest).put((IntBuffer)v);
- } else if((dest instanceof FloatBuffer) && (v instanceof FloatBuffer)) {
- ((FloatBuffer)dest).put((FloatBuffer)v);
- } else {
- throw new GLException("Incompatible Buffer classes: dest = "+dest.getClass().getName() + ", src = " + v.getClass().getName());
- }
- }
-
- public static void putb(Buffer dest, byte v) {
- if(dest instanceof ByteBuffer) {
- ((ByteBuffer)dest).put(v);
- } else if(dest instanceof ShortBuffer) {
- ((ShortBuffer)dest).put((short)v);
- } else if(dest instanceof IntBuffer) {
- ((IntBuffer)dest).put((int)v);
- } else {
- throw new GLException("Byte doesn't match Buffer Class: "+dest);
- }
- }
-
- public static void puts(Buffer dest, short v) {
- if(dest instanceof ShortBuffer) {
- ((ShortBuffer)dest).put(v);
- } else if(dest instanceof IntBuffer) {
- ((IntBuffer)dest).put((int)v);
- } else {
- throw new GLException("Short doesn't match Buffer Class: "+dest);
- }
- }
-
- public static void puti(Buffer dest, int v) {
- if(dest instanceof IntBuffer) {
- ((IntBuffer)dest).put(v);
- } else {
- throw new GLException("Integer doesn't match Buffer Class: "+dest);
- }
- }
-
- public static void putx(Buffer dest, int v) {
- puti(dest, v);
- }
-
- public static void putf(Buffer dest, float v) {
- if(dest instanceof FloatBuffer) {
- ((FloatBuffer)dest).put(v);
- } else if(dest instanceof IntBuffer) {
- ((IntBuffer)dest).put(FixedPoint.toFixed(v));
- } else {
- throw new GLException("Float doesn't match Buffer Class: "+dest);
- }
- }
-
- public static void putd(Buffer dest, double v) {
- if(dest instanceof FloatBuffer) {
- ((FloatBuffer)dest).put((float)v);
- } else {
- throw new GLException("Double doesn't match Buffer Class: "+dest);
- }
- }
-
- //----------------------------------------------------------------------
- // Internals only below this point
- //
-
- // NOTE that this work must be done reflectively at the present time
- // because this code must compile and run correctly on both CDC/FP and J2SE
- private static boolean isCDCFP;
- private static Class byteOrderClass;
- private static Object nativeOrderObject;
- private static Method orderMethod;
-
-}
--
cgit v1.2.3
From e5d63fe78dfe6760de7997e5303aada7ab8b570e Mon Sep 17 00:00:00 2001
From: Michael Bien limit() - position()
) in the passed ByteBuffer into
- a newly-allocated direct ByteBuffer. The returned buffer will
- have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ByteBuffer copyByteBuffer(ByteBuffer orig) {
- ByteBuffer dest = newByteBuffer(orig.remaining());
- dest.put(orig);
- dest.rewind();
- return dest;
- }
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed FloatBuffer
- into a newly-allocated direct FloatBuffer. The returned buffer
- will have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static FloatBuffer copyFloatBuffer(FloatBuffer orig) {
- return copyFloatBufferAsByteBuffer(orig).asFloatBuffer();
- }
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed IntBuffer
- into a newly-allocated direct IntBuffer. The returned buffer
- will have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static IntBuffer copyIntBuffer(IntBuffer orig) {
- return copyIntBufferAsByteBuffer(orig).asIntBuffer();
- }
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed ShortBuffer
- into a newly-allocated direct ShortBuffer. The returned buffer
- will have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ShortBuffer copyShortBuffer(ShortBuffer orig) {
- return copyShortBufferAsByteBuffer(orig).asShortBuffer();
- }
-
- //----------------------------------------------------------------------
- // Copy routines (type-to-ByteBuffer)
- //
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed FloatBuffer
- into a newly-allocated direct ByteBuffer. The returned buffer
- will have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ByteBuffer copyFloatBufferAsByteBuffer(FloatBuffer orig) {
- ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_FLOAT);
- dest.asFloatBuffer().put(orig);
- dest.rewind();
- return dest;
- }
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed IntBuffer into
- a newly-allocated direct ByteBuffer. The returned buffer will
- have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ByteBuffer copyIntBufferAsByteBuffer(IntBuffer orig) {
- ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_INT);
- dest.asIntBuffer().put(orig);
- dest.rewind();
- return dest;
- }
-
- /** Copies the remaining elements (as defined by
- limit() - position()
) in the passed ShortBuffer
- into a newly-allocated direct ByteBuffer. The returned buffer
- will have its byte order set to the host platform's native byte
- order. The position of the newly-allocated buffer will be zero,
- and the position of the passed buffer is unchanged (though its
- mark is changed). */
- public static ByteBuffer copyShortBufferAsByteBuffer(ShortBuffer orig) {
- ByteBuffer dest = newByteBuffer(orig.remaining() * SIZEOF_SHORT);
- dest.asShortBuffer().put(orig);
- dest.rewind();
- return dest;
- }
-
- //----------------------------------------------------------------------
- // Conversion routines
- //
-
- public final static float[] getFloatArray(double[] source) {
- int i=source.length;
- float[] dest = new float[i--];
- while(i>=0) { dest[i]=(float)source[i]; i--; }
- return dest;
- }
-
- public final static FloatBuffer getFloatBuffer(DoubleBuffer source) {
- source.rewind();
- FloatBuffer dest = BufferUtil.newFloatBuffer(source.limit());
- while(source.hasRemaining()) { dest.put((float)source.get()); }
- return dest;
- }
-
- public static ByteBuffer nativeOrder(ByteBuffer buf) {
- if (!isCDCFP) {
- try {
- if (byteOrderClass == null) {
- byteOrderClass = Class.forName("java.nio.ByteOrder");
- orderMethod = ByteBuffer.class.getMethod("order", new Class[] { byteOrderClass });
- Method nativeOrderMethod = byteOrderClass.getMethod("nativeOrder", null);
- nativeOrderObject = nativeOrderMethod.invoke(null, null);
- }
- } catch (Throwable t) {
- // Must be running on CDC / FP
- isCDCFP = true;
- }
-
- if (!isCDCFP) {
- try {
- orderMethod.invoke(buf, new Object[] { nativeOrderObject });
- } catch (Throwable t) {
- }
- }
- }
- return buf;
- }
-
- //----------------------------------------------------------------------
- // Convenient GL put methods with generic target Buffer
- //
- public static void put(Buffer dest, Buffer v) {
- if((dest instanceof ByteBuffer) && (v instanceof ByteBuffer)) {
- ((ByteBuffer)dest).put((ByteBuffer)v);
- } else if((dest instanceof ShortBuffer) && (v instanceof ShortBuffer)) {
- ((ShortBuffer)dest).put((ShortBuffer)v);
- } else if((dest instanceof IntBuffer) && (v instanceof IntBuffer)) {
- ((IntBuffer)dest).put((IntBuffer)v);
- } else if((dest instanceof FloatBuffer) && (v instanceof FloatBuffer)) {
- ((FloatBuffer)dest).put((FloatBuffer)v);
- } else {
- throw new GLException("Incompatible Buffer classes: dest = "+dest.getClass().getName() + ", src = " + v.getClass().getName());
- }
- }
-
- public static void putb(Buffer dest, byte v) {
- if(dest instanceof ByteBuffer) {
- ((ByteBuffer)dest).put(v);
- } else if(dest instanceof ShortBuffer) {
- ((ShortBuffer)dest).put((short)v);
- } else if(dest instanceof IntBuffer) {
- ((IntBuffer)dest).put((int)v);
- } else {
- throw new GLException("Byte doesn't match Buffer Class: "+dest);
- }
- }
-
- public static void puts(Buffer dest, short v) {
- if(dest instanceof ShortBuffer) {
- ((ShortBuffer)dest).put(v);
- } else if(dest instanceof IntBuffer) {
- ((IntBuffer)dest).put((int)v);
- } else {
- throw new GLException("Short doesn't match Buffer Class: "+dest);
}
- }
- public static void puti(Buffer dest, int v) {
- if(dest instanceof IntBuffer) {
- ((IntBuffer)dest).put(v);
- } else {
- throw new GLException("Integer doesn't match Buffer Class: "+dest);
- }
- }
-
- public static void putx(Buffer dest, int v) {
- puti(dest, v);
- }
-
- public static void putf(Buffer dest, float v) {
- if(dest instanceof FloatBuffer) {
- ((FloatBuffer)dest).put(v);
- } else if(dest instanceof IntBuffer) {
- ((IntBuffer)dest).put(FixedPoint.toFixed(v));
- } else {
- throw new GLException("Float doesn't match Buffer Class: "+dest);
- }
- }
-
- public static void putd(Buffer dest, double v) {
- if(dest instanceof FloatBuffer) {
- ((FloatBuffer)dest).put((float)v);
- } else {
- throw new GLException("Double doesn't match Buffer Class: "+dest);
+ //----------------------------------------------------------------------
+ // Conversion routines
+ //
+ public final static float[] getFloatArray(double[] source) {
+ int i = source.length;
+ float[] dest = new float[i--];
+ while (i >= 0) {
+ dest[i] = (float) source[i];
+ i--;
+ }
+ return dest;
}
- }
-
- //----------------------------------------------------------------------
- // Internals only below this point
- //
-
- // NOTE that this work must be done reflectively at the present time
- // because this code must compile and run correctly on both CDC/FP and J2SE
- private static boolean isCDCFP;
- private static Class byteOrderClass;
- private static Object nativeOrderObject;
- private static Method orderMethod;
-
}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java
index f8951f0fd..d41e4b922 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java
@@ -1,6 +1,7 @@
package com.jogamp.opengl.util;
+import com.jogamp.gluegen.runtime.Buffers;
import java.security.*;
import javax.media.opengl.*;
@@ -189,7 +190,7 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
public void padding(int done) {
if ( buffer==null || sealed ) return;
while(doneon
is true
.
*
- * @see javax.media.opengl.glsl.ShaderState#glUseProgram(GL2ES2, boolean)
- * @see javax.media.opengl.glsl.ShaderState#getCurrent()
+ * @see com.jogamp.opengl.util.glsl.ShaderState#glUseProgram(GL2ES2, boolean)
+ * @see com.jogamp.opengl.util.glsl.ShaderState#getCurrent()
*/
public synchronized void glUseProgram(GL2ES2 gl, boolean on) {
if(on) {
@@ -178,7 +175,7 @@ public class ShaderState {
* @see #glGetAttribLocation
* @see javax.media.opengl.GL2ES2#glGetAttribLocation
* @see #getAttribLocation
- * @see #glReplaceShader
+ * @see ShaderProgram#glReplaceShader
*/
public void glBindAttribLocation(GL2ES2 gl, int index, String name) {
if(null==shaderProgram) throw new GLException("No program is attached");
@@ -203,7 +200,7 @@ public class ShaderState {
* @see #glGetAttribLocation
* @see javax.media.opengl.GL2ES2#glGetAttribLocation
* @see #getAttribLocation
- * @see #glReplaceShader
+ * @see ShaderProgram#glReplaceShader
*/
public int glGetAttribLocation(GL2ES2 gl, String name) {
if(!shaderProgram.linked()) throw new GLException("Program is not linked");
@@ -240,17 +237,17 @@ public class ShaderState {
* Even if the attribute is not found in the current shader,
* it is stored in this state.
*
- * @returns false, if the name is not found, otherwise true
+ * @return false, if the name is not found, otherwise true
*
* @throws GLException if the program is not in use
*
* @see #glEnableVertexAttribArray
* @see #glDisableVertexAttribArray
* @see #glVertexAttribPointer
- * @see #getVertexAttributePointer
+ * @see #getVertexAttribPointer
* @see #glReleaseAllVertexAttributes
* @see #glResetAllVertexAttributes
- * @see #glReplaceShader
+ * @see ShaderProgram#glReplaceShader
*/
public boolean glEnableVertexAttribArray(GL2ES2 gl, String name) {
if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
@@ -281,17 +278,17 @@ public class ShaderState {
* Even if the attribute is not found in the current shader,
* it is removed from this state.
*
- * @returns false, if the name is not found, otherwise true
+ * @return false, if the name is not found, otherwise true
*
* @throws GLException if the program is not in use
*
* @see #glEnableVertexAttribArray
* @see #glDisableVertexAttribArray
* @see #glVertexAttribPointer
- * @see #getVertexAttributePointer
+ * @see #getVertexAttribPointer
* @see #glReleaseAllVertexAttributes
* @see #glResetAllVertexAttributes
- * @see #glReplaceShader
+ * @see ShaderProgram#glReplaceShader
*/
public boolean glDisableVertexAttribArray(GL2ES2 gl, String name) {
if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
@@ -322,17 +319,17 @@ public class ShaderState {
* it's index will be set with the attribute's location,
* if found.
*
- * @returns false, if the name is not found, otherwise true
+ * @return false, if the name is not found, otherwise true
*
* @throws GLException if the program is not in use
*
* @see #glEnableVertexAttribArray
* @see #glDisableVertexAttribArray
* @see #glVertexAttribPointer
- * @see #getVertexAttributePointer
+ * @see #getVertexAttribPointer
* @see #glReleaseAllVertexAttributes
* @see #glResetAllVertexAttributes
- * @see #glReplaceShader
+ * @see ShaderProgram#glReplaceShader
*/
public boolean glVertexAttribPointer(GL2ES2 gl, GLArrayData data) {
if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
@@ -367,15 +364,15 @@ public class ShaderState {
/**
* Get the vertex attribute data, previously set.
*
- * @returns the GLArrayData object, null if not previously set.
+ * @return the GLArrayData object, null if not previously set.
*
* @see #glEnableVertexAttribArray
* @see #glDisableVertexAttribArray
* @see #glVertexAttribPointer
- * @see #getVertexAttributePointer
+ * @see #getVertexAttribPointer
* @see #glReleaseAllVertexAttributes
* @see #glResetAllVertexAttributes
- * @see #glReplaceShader
+ * @see ShaderProgram#glReplaceShader
*/
public GLArrayData getVertexAttribPointer(String name) {
return (GLArrayData) vertexAttribMap2Data.get(name);
@@ -390,11 +387,11 @@ public class ShaderState {
* @see #glEnableVertexAttribArray
* @see #glDisableVertexAttribArray
* @see #glVertexAttribPointer
- * @see #getVertexAttributePointer
+ * @see #getVertexAttribPointer
* @see #glReleaseAllVertexAttributes
* @see #glResetAllVertexAttributes
* @see #glResetAllVertexAttributes
- * @see #glReplaceShader
+ * @see ShaderProgram#glReplaceShader
*/
public void glReleaseAllVertexAttributes(GL2ES2 gl) {
if(null!=shaderProgram) {
@@ -428,11 +425,11 @@ public class ShaderState {
* @see #glEnableVertexAttribArray
* @see #glDisableVertexAttribArray
* @see #glVertexAttribPointer
- * @see #getVertexAttributePointer
+ * @see #getVertexAttribPointer
* @see #glReleaseAllVertexAttributes
* @see #glResetAllVertexAttributes
* @see #glResetAllVertexAttributes
- * @see #glReplaceShader
+ * @see ShaderProgram#glReplaceShader
*/
public void glDisableAllVertexAttributeArrays(GL2ES2 gl, boolean removeFromState) {
if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
@@ -458,10 +455,10 @@ public class ShaderState {
* @see #glEnableVertexAttribArray
* @see #glDisableVertexAttribArray
* @see #glVertexAttribPointer
- * @see #getVertexAttributePointer
+ * @see #getVertexAttribPointer
* @see #glReleaseAllVertexAttributes
* @see #glResetAllVertexAttributes
- * @see #glReplaceShader
+ * @see ShaderProgram#glReplaceShader
*/
public void glResetAllVertexAttributes(GL2ES2 gl) {
if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
@@ -520,7 +517,7 @@ public class ShaderState {
* @see #glGetUniformLocation
* @see javax.media.opengl.GL2ES2#glGetUniformLocation
* @see #getUniformLocation
- * @see #glReplaceShader
+ * @see ShaderProgram#glReplaceShader
*/
protected int glGetUniformLocation(GL2ES2 gl, String name) {
if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
@@ -554,14 +551,14 @@ public class ShaderState {
* if found.
*
*
- * @returns false, if the name is not found, otherwise true
+ * @return false, if the name is not found, otherwise true
*
* @throws GLException if the program is not in use
*
* @see #glGetUniformLocation
* @see javax.media.opengl.GL2ES2#glGetUniformLocation
* @see #getUniformLocation
- * @see #glReplaceShader
+ * @see ShaderProgram#glReplaceShader
*/
public boolean glUniform(GL2ES2 gl, GLUniformData data) {
if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
@@ -581,7 +578,7 @@ public class ShaderState {
/**
* Get the uniform data, previously set.
*
- * @returns the GLUniformData object, null if not previously set.
+ * @return the GLUniformData object, null if not previously set.
*/
public GLUniformData getUniform(String name) {
return (GLUniformData) uniformMap2Data.get(name);
diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/fixedfunc/FixedFuncUtil.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/fixedfunc/FixedFuncUtil.java
index a7042c47a..f00357bfb 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/glsl/fixedfunc/FixedFuncUtil.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/fixedfunc/FixedFuncUtil.java
@@ -66,25 +66,25 @@ public class FixedFuncUtil {
/**
* String name for
- * @see javax.media.opengl.GL#GL_VERTEX_ARRAY
+ * @see javax.media.opengl.GL2#GL_VERTEX_ARRAY
*/
public static final String mgl_Vertex = FixedFuncPipeline.mgl_Vertex;
/**
* String name for
- * @see javax.media.opengl.GL#GL_NORMAL_ARRAY
+ * @see javax.media.opengl.GL2#GL_NORMAL_ARRAY
*/
public static final String mgl_Normal = FixedFuncPipeline.mgl_Normal;
/**
* String name for
- * @see javax.media.opengl.GL#GL_COLOR_ARRAY
+ * @see javax.media.opengl.GL2#GL_COLOR_ARRAY
*/
public static final String mgl_Color = FixedFuncPipeline.mgl_Color;
/**
* String name for
- * @see javax.media.opengl.GL#GL_TEXTURE_COORD_ARRAY
+ * @see javax.media.opengl.GL2#GL_TEXTURE_COORD_ARRAY
*/
public static final String mgl_MultiTexCoord = FixedFuncPipeline.mgl_MultiTexCoord;
}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/sdk/CompileShader.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/sdk/CompileShader.java
index 9741da737..a0eed50ea 100755
--- a/src/jogl/classes/com/jogamp/opengl/util/glsl/sdk/CompileShader.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/sdk/CompileShader.java
@@ -7,16 +7,17 @@ import com.jogamp.opengl.util.glsl.*;
import java.io.*;
import java.net.*;
-/** Precompiles a shader into a vendor binary format. Input is the
- resource name of the shader, such as
- "com/jogamp/opengl/impl/glsl/fixed/shader/a.fp".
- Output is "com/jogamp/opengl/impl/glsl/fixed/shader/bin/nvidia/a.bfp".
-
- All path and suffixes are determined by the ShaderCode class,
- which ensures runtime compatibility.
-
- @see javax.media.opengl.glsl.ShaderCode
- */
+/**
+ * Precompiles a shader into a vendor binary format. Input is the
+ * resource name of the shader, such as
+ * "com/jogamp/opengl/impl/glsl/fixed/shader/a.fp".
+ * Output is "com/jogamp/opengl/impl/glsl/fixed/shader/bin/nvidia/a.bfp".
+ *
+ * All path and suffixes are determined by the ShaderCode class,
+ * which ensures runtime compatibility.
+ *
+ * @see com.jogamp.opengl.util.glsl.ShaderCode
+ */
public abstract class CompileShader {
diff --git a/src/jogl/classes/javax/media/opengl/GLArrayData.java b/src/jogl/classes/javax/media/opengl/GLArrayData.java
index d17ee6a06..088c71bd8 100644
--- a/src/jogl/classes/javax/media/opengl/GLArrayData.java
+++ b/src/jogl/classes/javax/media/opengl/GLArrayData.java
@@ -21,10 +21,10 @@ public interface GLArrayData {
* The index of the predefined array index, see list below,
* or -1 in case of a shader attribute array.
*
- * @see javax.media.opengl.GL#GL_VERTEX_ARRAY
- * @see javax.media.opengl.GL#GL_NORMAL_ARRAY
- * @see javax.media.opengl.GL#GL_COLOR_ARRAY
- * @see javax.media.opengl.GL#GL_TEXTURE_COORD_ARRAY
+ * @see javax.media.opengl.GL2#GL_VERTEX_ARRAY
+ * @see javax.media.opengl.GL2#GL_NORMAL_ARRAY
+ * @see javax.media.opengl.GL2#GL_COLOR_ARRAY
+ * @see javax.media.opengl.GL2#GL_TEXTURE_COORD_ARRAY
*/
public int getIndex();
@@ -49,7 +49,7 @@ public interface GLArrayData {
* Sets the determined location of the shader attribute
* This is usually done within ShaderState.
*
- * @see javax.media.opengl.glsl.ShaderState#glVertexAttribPointer(GL2ES2, GLArrayData)
+ * @see com.jogamp.opengl.util.glsl.ShaderState#glVertexAttribPointer(GL2ES2, GLArrayData)
*/
public void setLocation(int v);
diff --git a/src/jogl/classes/javax/media/opengl/GLBase.java b/src/jogl/classes/javax/media/opengl/GLBase.java
index be5a6dc4f..369907c22 100644
--- a/src/jogl/classes/javax/media/opengl/GLBase.java
+++ b/src/jogl/classes/javax/media/opengl/GLBase.java
@@ -220,7 +220,7 @@ public interface GLBase {
*
* @param glFunctionName the name of the OpenGL function (e.g., use
* "glBindRenderbufferEXT" or "glBindRenderbuffer" to check if {@link
- * #glBindRenderbuffer(int,int)} is available).
+ * GL#glBindRenderbuffer(int,int)} is available).
*/
public boolean isFunctionAvailable(String glFunctionName);
diff --git a/src/jogl/classes/javax/media/opengl/GLContext.java b/src/jogl/classes/javax/media/opengl/GLContext.java
index 3ca1cd317..1e52c2a65 100644
--- a/src/jogl/classes/javax/media/opengl/GLContext.java
+++ b/src/jogl/classes/javax/media/opengl/GLContext.java
@@ -137,14 +137,14 @@ public abstract class GLContext {
* copied. mask
contains the bitwise OR of the same
* symbolic names that are passed to the GL command {@link
* GL#glPushAttrib glPushAttrib}. The single symbolic constant
- * {@link GL#GL_ALL_ATTRIB_BITS GL_ALL_ATTRIB_BITS} can be used to
+ * {@link GL2#GL_ALL_ATTRIB_BITS GL_ALL_ATTRIB_BITS} can be used to
* copy the maximum possible portion of rendering state.
+ * In case {@link javax.media.nativewindow.Capabilities#isOnscreen()} is true,
* an onscreen GLDrawable will be realized.
*
+ * In case {@link javax.media.nativewindow.Capabilities#isOnscreen()} is false,
* either a Pbuffer drawable is created if {@link javax.media.opengl.GLCapabilities#isPBuffer()} is true,
* or a simple offscreen drawable is creates. The latter is unlikely to be hardware accelerated.
*
- Alias for:
GLXFBConfig * glXChooseFBConfigSGIX, glXChooseFBConfig(Display * dpy, int screen, const int * attribList, int * nitems);
*/
- public static com.jogamp.gluegen.runtime.PointerBuffer glXChooseFBConfigCopied(long dpy, int screen, int[] attribList, int attribList_offset, int[] nitems, int nitems_offset)
+ public static com.jogamp.common.nio.PointerBuffer glXChooseFBConfigCopied(long dpy, int screen, int[] attribList, int attribList_offset, int[] nitems, int nitems_offset)
{
if(attribList != null && attribList.length <= attribList_offset)
throw new GLException("array offset argument \"attribList_offset\" (" + attribList_offset + ") equals or exceeds array length (" + attribList.length + ")");
diff --git a/make/joglversion b/make/joglversion
index d013d0967..b65b6e3b6 100644
--- a/make/joglversion
+++ b/make/joglversion
@@ -3,6 +3,6 @@ Specification-Version: @BASEVERSION@
Specification-Vendor: Sun Microsystems, Inc.
Implementation-Title: Java Bindings for OpenGL Runtime Environment
Implementation-Version: @VERSION@
-Implementation-Vendor: java.net JOGL community
+Implementation-Vendor: JogAmp community
Extension-Name: javax.media.opengl
-Implementation-Vendor-Id: com.sun
+Implementation-Vendor-Id: com.jogamp
diff --git a/make/joglversion-cdc b/make/joglversion-cdc
index 5a2950b55..5056fbaf3 100644
--- a/make/joglversion-cdc
+++ b/make/joglversion-cdc
@@ -3,6 +3,6 @@ Specification-Version: @BASEVERSION@
Specification-Vendor: Sun Microsystems, Inc.
Implementation-Title: Java Bindings for OpenGL Runtime Environment CDC
Implementation-Version: @VERSION@
-Implementation-Vendor: java.net JOGL community
+Implementation-Vendor: JogAmp community
Extension-Name: javax.media.opengl
-Implementation-Vendor-Id: com.sun
+Implementation-Vendor-Id: com.jogamp
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/DRIHack.java b/src/jogl/classes/com/jogamp/opengl/impl/DRIHack.java
index ede966259..e845ef160 100755
--- a/src/jogl/classes/com/jogamp/opengl/impl/DRIHack.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/DRIHack.java
@@ -39,9 +39,9 @@
package com.jogamp.opengl.impl;
+import com.jogamp.common.os.NativeLibrary;
import java.io.*;
import java.security.*;
-import com.jogamp.gluegen.runtime.*;
/**
* Helper class for working around problems with open-source DRI
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java b/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java
index 49045910a..893827a8c 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java
@@ -39,8 +39,8 @@
package com.jogamp.opengl.impl;
+import com.jogamp.common.os.DynamicLookupHelper;
import java.nio.*;
-import java.lang.reflect.*;
import javax.media.opengl.*;
import com.jogamp.nativewindow.impl.NWReflection;
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/GLDrawableImpl.java b/src/jogl/classes/com/jogamp/opengl/impl/GLDrawableImpl.java
index 20bf20c20..10c70db99 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/GLDrawableImpl.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/GLDrawableImpl.java
@@ -39,9 +39,9 @@
package com.jogamp.opengl.impl;
+import com.jogamp.common.os.DynamicLookupHelper;
import javax.media.nativewindow.*;
import javax.media.opengl.*;
-import com.jogamp.gluegen.runtime.DynamicLookupHelper;
public abstract class GLDrawableImpl implements GLDrawable {
protected static final boolean DEBUG = Debug.debug("GLDrawable");
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLDrawable.java b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLDrawable.java
index db5ee6ac6..dcfe06bdc 100755
--- a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLDrawable.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLDrawable.java
@@ -35,9 +35,8 @@
package com.jogamp.opengl.impl.egl;
+import com.jogamp.common.os.DynamicLookupHelper;
import com.jogamp.opengl.impl.GLDrawableImpl;
-import com.jogamp.nativewindow.impl.NWReflection;
-import com.jogamp.gluegen.runtime.DynamicLookupHelper;
import javax.media.nativewindow.*;
import javax.media.nativewindow.egl.*;
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLDrawableFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLDrawableFactory.java
index d50f671a3..34b039b3a 100755
--- a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLDrawableFactory.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLDrawableFactory.java
@@ -35,12 +35,10 @@
package com.jogamp.opengl.impl.egl;
-import java.util.*;
import javax.media.nativewindow.*;
import javax.media.opengl.*;
import com.jogamp.opengl.impl.*;
import com.jogamp.nativewindow.impl.*;
-import com.jogamp.gluegen.runtime.NativeLibrary;
public class EGLDrawableFactory extends GLDrawableFactoryImpl {
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLDynamicLookupHelper.java b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLDynamicLookupHelper.java
index 4918acbb3..70f0540bf 100755
--- a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLDynamicLookupHelper.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLDynamicLookupHelper.java
@@ -35,13 +35,12 @@
package com.jogamp.opengl.impl.egl;
+import com.jogamp.common.os.DynamicLookupHelper;
+import com.jogamp.common.os.NativeLibrary;
import java.util.*;
import javax.media.nativewindow.*;
import javax.media.opengl.*;
import com.jogamp.opengl.impl.*;
-import com.jogamp.nativewindow.impl.*;
-import com.jogamp.gluegen.runtime.NativeLibrary;
-import com.jogamp.gluegen.runtime.DynamicLookupHelper;
import java.security.*;
/**
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLES1DynamicLookupHelper.java b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLES1DynamicLookupHelper.java
index 5c4da5098..e5740a4f0 100755
--- a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLES1DynamicLookupHelper.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLES1DynamicLookupHelper.java
@@ -36,11 +36,6 @@
package com.jogamp.opengl.impl.egl;
import java.util.*;
-import javax.media.nativewindow.*;
-import javax.media.opengl.*;
-import com.jogamp.opengl.impl.*;
-import com.jogamp.nativewindow.impl.*;
-import com.jogamp.gluegen.runtime.NativeLibrary;
/**
* Implementation of the EGLDynamicLookupHelper for ES1.
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLES2DynamicLookupHelper.java b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLES2DynamicLookupHelper.java
index 0b499c204..c4fc66630 100755
--- a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLES2DynamicLookupHelper.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLES2DynamicLookupHelper.java
@@ -36,11 +36,6 @@
package com.jogamp.opengl.impl.egl;
import java.util.*;
-import javax.media.nativewindow.*;
-import javax.media.opengl.*;
-import com.jogamp.opengl.impl.*;
-import com.jogamp.nativewindow.impl.*;
-import com.jogamp.gluegen.runtime.NativeLibrary;
/**
* Implementation of the EGLDynamicLookupHelper for ES2.
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLGraphicsConfiguration.java b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLGraphicsConfiguration.java
index 43c99a422..c8bc4fe0d 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLGraphicsConfiguration.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLGraphicsConfiguration.java
@@ -35,13 +35,12 @@
package com.jogamp.opengl.impl.egl;
+import com.jogamp.common.nio.PointerBuffer;
import java.util.*;
import javax.media.nativewindow.*;
import javax.media.nativewindow.egl.*;
import javax.media.opengl.*;
import com.jogamp.opengl.impl.*;
-import com.jogamp.gluegen.runtime.NativeLibrary;
-import com.jogamp.gluegen.runtime.PointerBuffer;
public class EGLGraphicsConfiguration extends DefaultGraphicsConfiguration implements Cloneable {
protected static final boolean DEBUG = Debug.debug("GraphicsConfiguration");
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLGraphicsConfigurationFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLGraphicsConfigurationFactory.java
index f315a514c..f22661238 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLGraphicsConfigurationFactory.java
@@ -32,15 +32,13 @@
package com.jogamp.opengl.impl.egl;
+import com.jogamp.common.nio.PointerBuffer;
import java.io.PrintStream;
import javax.media.nativewindow.*;
import javax.media.nativewindow.egl.*;
-import com.jogamp.nativewindow.impl.*;
import javax.media.opengl.*;
-import com.jogamp.opengl.impl.*;
-import com.jogamp.gluegen.runtime.PointerBuffer;
/** Subclass of GraphicsConfigurationFactory used when non-AWT tookits
are used on X11 platforms. Toolkits will likely need to delegate
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLDrawable.java b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLDrawable.java
index 2b91eb5d3..5816b2101 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLDrawable.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLDrawable.java
@@ -42,7 +42,7 @@ package com.jogamp.opengl.impl.macosx.cgl;
import javax.media.nativewindow.*;
import javax.media.opengl.*;
import com.jogamp.opengl.impl.*;
-import com.jogamp.gluegen.runtime.DynamicLookupHelper;
+import com.jogamp.common.os.DynamicLookupHelper;
public abstract class MacOSXCGLDrawable extends GLDrawableImpl {
// The Java2D/OpenGL pipeline on OS X uses low-level CGLContextObjs
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java
index a3ae6f936..641e482bc 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java
@@ -39,14 +39,12 @@
package com.jogamp.opengl.impl.macosx.cgl;
-import java.lang.reflect.InvocationTargetException;
+import com.jogamp.common.os.DynamicLookupHelper;
import java.nio.*;
-import java.util.*;
import javax.media.nativewindow.*;
import javax.media.opengl.*;
import com.jogamp.opengl.impl.*;
import com.jogamp.nativewindow.impl.*;
-import com.jogamp.gluegen.runtime.DynamicLookupHelper;
public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl implements DynamicLookupHelper {
public MacOSXCGLDrawableFactory() {
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXPbufferCGLContext.java b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXPbufferCGLContext.java
index aacd2c38e..446f457be 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXPbufferCGLContext.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXPbufferCGLContext.java
@@ -1,12 +1,12 @@
package com.jogamp.opengl.impl.macosx.cgl;
+import com.jogamp.common.nio.PointerBuffer;
import java.security.*;
import java.util.*;
import javax.media.opengl.*;
import javax.media.nativewindow.*;
import com.jogamp.opengl.impl.*;
-import com.jogamp.gluegen.runtime.PointerBuffer;
public class MacOSXPbufferCGLContext extends MacOSXCGLContext {
protected MacOSXPbufferCGLDrawable drawable;
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java
index 95609aee5..b02cea03e 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java
@@ -39,10 +39,10 @@
package com.jogamp.opengl.impl.macosx.cgl;
+import com.jogamp.common.nio.PointerBuffer;
import javax.media.opengl.*;
import javax.media.nativewindow.*;
import com.jogamp.opengl.impl.*;
-import com.jogamp.gluegen.runtime.PointerBuffer;
public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable {
private static final boolean DEBUG = Debug.debug("MacOSXPbufferCGLDrawable");
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawable.java b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawable.java
index c76766b2e..fe0945139 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawable.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawable.java
@@ -39,10 +39,10 @@
package com.jogamp.opengl.impl.windows.wgl;
+import com.jogamp.common.os.DynamicLookupHelper;
import javax.media.nativewindow.*;
import javax.media.opengl.*;
import com.jogamp.opengl.impl.*;
-import com.jogamp.gluegen.runtime.DynamicLookupHelper;
public abstract class WindowsWGLDrawable extends GLDrawableImpl {
private static final int MAX_SET_PIXEL_FORMAT_FAIL_COUNT = 5;
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java
index 6827c755e..9e458c8d0 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java
@@ -39,13 +39,13 @@
package com.jogamp.opengl.impl.windows.wgl;
+import com.jogamp.common.os.DynamicLookupHelper;
import java.nio.*;
import java.util.*;
import javax.media.nativewindow.*;
import javax.media.opengl.*;
import com.jogamp.opengl.impl.*;
import com.jogamp.nativewindow.impl.NWReflection;
-import com.jogamp.gluegen.runtime.DynamicLookupHelper;
import com.jogamp.nativewindow.impl.NullWindow;
public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl implements DynamicLookupHelper {
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLGraphicsConfiguration.java b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLGraphicsConfiguration.java
index bb59434b7..5b34e40e1 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLGraphicsConfiguration.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLGraphicsConfiguration.java
@@ -32,11 +32,9 @@
package com.jogamp.opengl.impl.windows.wgl;
-import java.util.*;
import javax.media.nativewindow.*;
import javax.media.opengl.*;
import com.jogamp.opengl.impl.*;
-import com.jogamp.gluegen.runtime.NativeLibrary;
public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguration implements Cloneable {
// Keep this under the same debug flag as the drawable factory for convenience
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11ExternalGLXDrawable.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11ExternalGLXDrawable.java
index 44aea0fa7..f10bd38c6 100755
--- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11ExternalGLXDrawable.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11ExternalGLXDrawable.java
@@ -44,9 +44,7 @@ import javax.media.nativewindow.x11.*;
import javax.media.opengl.*;
import com.jogamp.opengl.impl.*;
import com.jogamp.nativewindow.impl.NullWindow;
-import com.jogamp.nativewindow.impl.x11.*;
-import com.jogamp.gluegen.runtime.PointerBuffer;
public class X11ExternalGLXDrawable extends X11GLXDrawable {
private int fbConfigID;
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawable.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawable.java
index ee807c32a..2dabe774c 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawable.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawable.java
@@ -42,8 +42,7 @@ package com.jogamp.opengl.impl.x11.glx;
import javax.media.nativewindow.*;
import javax.media.opengl.*;
import com.jogamp.opengl.impl.*;
-import com.jogamp.nativewindow.impl.x11.*;
-import com.jogamp.gluegen.runtime.DynamicLookupHelper;
+import com.jogamp.common.os.DynamicLookupHelper;
public abstract class X11GLXDrawable extends GLDrawableImpl {
protected X11GLXDrawable(GLDrawableFactory factory, NativeWindow comp, boolean realized) {
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java
index cb25e6723..1a254843e 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java
@@ -36,16 +36,13 @@
package com.jogamp.opengl.impl.x11.glx;
+import com.jogamp.common.os.DynamicLookupHelper;
import java.nio.*;
-import java.security.*;
-import java.util.*;
import javax.media.nativewindow.*;
import javax.media.nativewindow.x11.*;
import javax.media.opengl.*;
-import com.jogamp.gluegen.runtime.*;
import com.jogamp.gluegen.runtime.opengl.*;
import com.jogamp.opengl.impl.*;
-import com.jogamp.opengl.impl.x11.glx.*;
import com.jogamp.nativewindow.impl.NullWindow;
import com.jogamp.nativewindow.impl.NWReflection;
import com.jogamp.nativewindow.impl.x11.*;
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXGraphicsConfiguration.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXGraphicsConfiguration.java
index f127ec2d0..b3a6e5b8c 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXGraphicsConfiguration.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXGraphicsConfiguration.java
@@ -32,13 +32,11 @@
package com.jogamp.opengl.impl.x11.glx;
-import java.util.*;
+import com.jogamp.common.nio.PointerBuffer;
import javax.media.nativewindow.*;
import javax.media.nativewindow.x11.*;
import javax.media.opengl.*;
import com.jogamp.opengl.impl.*;
-import com.jogamp.gluegen.runtime.NativeLibrary;
-import com.jogamp.gluegen.runtime.PointerBuffer;
import com.jogamp.nativewindow.impl.x11.*;
public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implements Cloneable {
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java
index eca5fede5..5f438cb7f 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java
@@ -32,16 +32,14 @@
package com.jogamp.opengl.impl.x11.glx;
+import com.jogamp.common.nio.PointerBuffer;
import javax.media.nativewindow.*;
import javax.media.nativewindow.x11.*;
-import com.jogamp.nativewindow.impl.NativeWindowFactoryImpl;
import com.jogamp.nativewindow.impl.x11.*;
import javax.media.opengl.*;
import com.jogamp.opengl.impl.*;
-import com.jogamp.opengl.impl.x11.glx.*;
-import com.jogamp.gluegen.runtime.PointerBuffer;
/** Subclass of GraphicsConfigurationFactory used when non-AWT tookits
are used on X11 platforms. Toolkits will likely need to delegate
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java
index d41e4b922..1141f6624 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java
@@ -1,7 +1,7 @@
package com.jogamp.opengl.util;
-import com.jogamp.gluegen.runtime.Buffers;
+import com.jogamp.common.nio.Buffers;
import java.security.*;
import javax.media.opengl.*;
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLBuffers.java b/src/jogl/classes/com/jogamp/opengl/util/GLBuffers.java
index b49bb3364..efe3a7675 100755
--- a/src/jogl/classes/com/jogamp/opengl/util/GLBuffers.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/GLBuffers.java
@@ -38,7 +38,7 @@
*/
package com.jogamp.opengl.util;
-import com.jogamp.gluegen.runtime.Buffers;
+import com.jogamp.common.nio.Buffers;
import javax.media.opengl.GL;
import javax.media.opengl.GL2;
import javax.media.opengl.GL2ES2;
diff --git a/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java b/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java
index 4ca8ff197..47de8ce0a 100755
--- a/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java
@@ -33,7 +33,7 @@
package com.jogamp.opengl.util;
-import com.jogamp.gluegen.runtime.Buffers;
+import com.jogamp.common.nio.Buffers;
import com.jogamp.opengl.impl.ProjectFloat;
import java.nio.*;
diff --git a/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java b/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java
index 4de2e5974..bac9f88ea 100755
--- a/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java
@@ -38,7 +38,7 @@
*/
package com.jogamp.opengl.util.awt;
-import com.jogamp.gluegen.runtime.Buffers;
+import com.jogamp.common.nio.Buffers;
import com.jogamp.opengl.impl.Debug;
import com.jogamp.opengl.util.*;
import com.jogamp.opengl.util.packrect.*;
diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java
index 94b329cd5..d0e7ea29d 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java
@@ -1,7 +1,7 @@
package com.jogamp.opengl.util.glsl;
-import com.jogamp.gluegen.runtime.Buffers;
+import com.jogamp.common.nio.Buffers;
import javax.media.opengl.*;
import com.jogamp.opengl.util.*;
import com.jogamp.opengl.impl.Debug;
diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/fixedfunc/impl/FixedFuncHook.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/fixedfunc/impl/FixedFuncHook.java
index 2276cc835..b8e3922a4 100755
--- a/src/jogl/classes/com/jogamp/opengl/util/glsl/fixedfunc/impl/FixedFuncHook.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/fixedfunc/impl/FixedFuncHook.java
@@ -7,7 +7,7 @@ package com.jogamp.opengl.util.glsl.fixedfunc.impl;
import javax.media.opengl.*;
import javax.media.opengl.fixedfunc.*;
import javax.media.opengl.glu.*;
-import com.jogamp.gluegen.runtime.Buffers;
+import com.jogamp.common.nio.Buffers;
import com.jogamp.opengl.util.*;
import com.jogamp.opengl.util.glsl.*;
import java.nio.*;
diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/fixedfunc/impl/FixedFuncPipeline.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/fixedfunc/impl/FixedFuncPipeline.java
index 9ead6c4eb..529e4567b 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/glsl/fixedfunc/impl/FixedFuncPipeline.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/fixedfunc/impl/FixedFuncPipeline.java
@@ -1,7 +1,7 @@
package com.jogamp.opengl.util.glsl.fixedfunc.impl;
-import com.jogamp.gluegen.runtime.Buffers;
+import com.jogamp.common.nio.Buffers;
import javax.media.opengl.*;
import javax.media.opengl.fixedfunc.*;
import com.jogamp.opengl.util.*;
--
cgit v1.2.3
From e76ebd8a98dfc60af05a490cae6e2e057a5c351d Mon Sep 17 00:00:00 2001
From: Michael Bien
+ * author: Brian Paul (converted to Java by Ron Cemer and Sven Goethel) XVisualInfo * XGetVisualInfo(Display * , long, XVisualInfo * , int * );
*/
private static native java.nio.ByteBuffer XGetVisualInfoCopied1(long arg0, long arg1, java.nio.ByteBuffer arg2, Object arg3, int arg3_byte_offset);
+ public static native long XOpenDisplay(String arg0);
+ public static native int XCloseDisplay(long display);
+ public static native long dlopen(String name);
+ public static native long dlsym(String name);
+
diff --git a/make/config/nativewindow/x11-lib.cfg b/make/config/nativewindow/x11-lib.cfg
index 7a64307da..394dd230a 100644
--- a/make/config/nativewindow/x11-lib.cfg
+++ b/make/config/nativewindow/x11-lib.cfg
@@ -20,8 +20,9 @@ Opaque long Display *
Opaque boolean Bool
Opaque long GLXFBConfig
-CustomJavaCode X11Lib public static native long dlopen(String name);
-CustomJavaCode X11Lib public static native long dlsym(String name);
+# Manually implement XOpenDisplay, XCloseDisplay, catching XIOError
+ManuallyImplement XCloseDisplay
+ManuallyImplement XOpenDisplay
IncludeAs CustomJavaCode X11Lib x11-CustomJavaCode.java
IncludeAs CustomCCode x11-CustomCCode.c
diff --git a/make/stub_includes/win32/wingdi.h b/make/stub_includes/win32/wingdi.h
index 46aeec2b6..fbf2ec5ec 100644
--- a/make/stub_includes/win32/wingdi.h
+++ b/make/stub_includes/win32/wingdi.h
@@ -212,7 +212,7 @@ WINGDIAPI HGDIOBJ WINAPI SelectObject(HDC, HGDIOBJ);
// Routines for creation of a dummy window, device context and OpenGL
// context for the purposes of getting wglChoosePixelFormatARB and
// associated routines
-HDC CreateDummyWindow(int,int,int,int);
+HWND CreateDummyWindow( int x, int y, int width, int height ) ;
WINUSERAPI BOOL WINAPI ShowWindow(HWND hWnd, int nCmdShow);
WINUSERAPI HDC WINAPI GetDC(HWND);
WINUSERAPI int WINAPI ReleaseDC(HWND hWnd, HDC hDC);
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java b/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java
index 893827a8c..7543a1084 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java
@@ -41,6 +41,7 @@ package com.jogamp.opengl.impl;
import com.jogamp.common.os.DynamicLookupHelper;
import java.nio.*;
+import java.util.*;
import javax.media.opengl.*;
import com.jogamp.nativewindow.impl.NWReflection;
@@ -346,13 +347,30 @@ public abstract class GLContextImpl extends GLContext {
/** Maps the given "platform-independent" function name to a real function
name. Currently this is only used to map "glAllocateMemoryNV" and
associated routines to wglAllocateMemoryNV / glXAllocateMemoryNV. */
- protected abstract String mapToRealGLFunctionName(String glFunctionName);
+ protected String mapToRealGLFunctionName(String glFunctionName) {
+ Map/* XVisualInfo * XGetVisualInfo(Display * , long, XVisualInfo * , int * );
*/
private static native java.nio.ByteBuffer XGetVisualInfoCopied1(long arg0, long arg1, java.nio.ByteBuffer arg2, Object arg3, int arg3_byte_offset);
- public static native long XOpenDisplay(String arg0);
- public static native int XCloseDisplay(long display);
+ public static native long DefaultVisualID(long display, int screen);
+
+ /**
+ public static native long CreateDummyWindow(long display, int screen_index, long visualID);
+ public static native void DestroyDummyWindow(long display, long window); */
+
public static native long dlopen(String name);
public static native long dlsym(String name);
+ public static native int XCloseDisplay(long display);
+ public static native void XUnlockDisplay(long display);
+ public static native void XLockDisplay(long display);
+
diff --git a/make/config/nativewindow/x11-lib.cfg b/make/config/nativewindow/x11-lib.cfg
index 394dd230a..cf9642398 100644
--- a/make/config/nativewindow/x11-lib.cfg
+++ b/make/config/nativewindow/x11-lib.cfg
@@ -20,25 +20,25 @@ Opaque long Display *
Opaque boolean Bool
Opaque long GLXFBConfig
-# Manually implement XOpenDisplay, XCloseDisplay, catching XIOError
-ManuallyImplement XCloseDisplay
-ManuallyImplement XOpenDisplay
-
IncludeAs CustomJavaCode X11Lib x11-CustomJavaCode.java
-IncludeAs CustomCCode x11-CustomCCode.c
+# Now resides in x11/Xmisc.c: IncludeAs CustomCCode x11-CustomCCode.c
ArgumentIsString XOpenDisplay 0
-# Need to expose DefaultScreen and RootWindow macros to Java
-CustomJavaCode X11Lib public static native int DefaultScreen(long display);
-CustomJavaCode X11Lib public static native long DefaultVisualID(long display, int screen);
-CustomJavaCode X11Lib public static native long RootWindow(long display, int screen);
-
# We have Custom code for the following
Ignore XGetVisualInfo
+ManuallyImplement XCloseDisplay
+ManuallyImplement XUnlockDisplay
+ManuallyImplement XLockDisplay
+
# Helper routine to make the ReturnedArrayLength expression below work correctly
CustomJavaCode X11Lib private static int getFirstElement(IntBuffer buf) { return buf.get(buf.position()); }
CustomJavaCode X11Lib private static int getFirstElement(int[] arr, int offset) { return arr[offset]; }
CustomJavaCode XVisualInfo public static XVisualInfo create(XVisualInfo s) { XVisualInfo d = XVisualInfo.create(); d.getBuffer().put(s.getBuffer()); d.getBuffer().rewind(); s.getBuffer().rewind(); return d; }
+
+CustomCCode #include
+ * as well as the static global display connection.
*
* The TLS variant is thread safe per se, but be aware of the memory leak risk
* where an application heavily utilizing this class on temporary new threads.
@@ -51,27 +54,98 @@ public class X11Util {
static {
NativeLibLoaderBase.loadNativeWindow("x11");
+ installIOErrorHandler();
}
private X11Util() {}
private static ThreadLocal currentDisplayMap = new ThreadLocal();
+ // not exactly thread safe, but good enough for our purpose,
+ // which is to tag a NamedDisplay uncloseable after creation.
+ private static Object globalLock = new Object();
+ private static Collection globalNamedDisplayActive = new ArrayList();
+ private static Collection globalNamedDisplayPassive = new ArrayList();
+
+ public static final String nullDeviceName = "nil" ;
+
public static class NamedDisplay implements Cloneable {
- private String name;
- private long handle;
+ String name;
+ long handle;
+ int refCount;
+ boolean unCloseable;
protected NamedDisplay(String name, long handle) {
this.name=name;
this.handle=handle;
+ this.refCount=1;
+ this.unCloseable=false;
}
- public String getName() { return name; }
- public long getHandle() { return handle; }
+ public final String getName() { return name; }
+ public final String getNameSafe() { return null == name ? nullDeviceName : name; }
+ public final long getHandle() { return handle; }
+ public final int getRefCount() { return refCount; }
+ public final boolean isUncloseable() { return unCloseable; }
public Object clone() throws CloneNotSupportedException {
return super.clone();
}
+
+ public String toString() {
+ return "NamedX11Display["+name+", 0x"+Long.toHexString(handle)+", refCount "+refCount+", unCloseable "+unCloseable+"]";
+ }
+ }
+
+ /** Returns the number of unclosed X11 Displays.
+ * @param realXClosePendingDisplays if true, call XCloseDisplay on the remaining ones
+ */
+ public static int shutdown(boolean realXClosePendingDisplays, boolean verbose) {
+ int num=0;
+ String msg;
+ if(DEBUG||verbose) {
+ msg = "X11Util.Display: Shutdown (active: "+globalNamedDisplayActive.size()+
+ ", passive: "+globalNamedDisplayPassive.size() + ")";
+ if(DEBUG) {
+ Exception e = new Exception(msg);
+ e.printStackTrace();
+ } else if(verbose) {
+ System.err.println(msg);
+ }
+ }
+
+ msg = realXClosePendingDisplays ? "Close" : "Keep" ;
+
+ synchronized(globalLock) {
+ // for all passive displays ..
+ Collection namedDisplays = globalNamedDisplayPassive;
+ globalNamedDisplayPassive = new ArrayList();
+ for(Iterator iter=namedDisplays.iterator(); iter.hasNext(); ) {
+ NamedDisplay ndpy = (NamedDisplay)iter.next();
+ if(DEBUG||verbose) {
+ System.err.println(msg+" passive: "+ndpy);
+ }
+ if(realXClosePendingDisplays) {
+ X11Lib.XCloseDisplay(ndpy.getHandle());
+ }
+ num++;
+ }
+
+ // for all active displays ..
+ namedDisplays = globalNamedDisplayActive;
+ globalNamedDisplayActive = new ArrayList();
+ for(Iterator iter=namedDisplays.iterator(); iter.hasNext(); ) {
+ NamedDisplay ndpy = (NamedDisplay)iter.next();
+ if(DEBUG||verbose) {
+ System.err.println(msg+" active: "+ndpy);
+ }
+ if(realXClosePendingDisplays) {
+ X11Lib.XCloseDisplay(ndpy.getHandle());
+ }
+ num++;
+ }
+ }
+ return num;
}
/** Returns a clone of the thread local display map, you may {@link Object#wait()} on it */
@@ -79,48 +153,120 @@ public class X11Util {
return (Map) ((HashMap)getCurrentDisplayMapImpl()).clone();
}
- /** Returns this thread current default display. If it doesn not exist, it is being created */
- public static long getThreadLocalDefaultDisplay() {
- return getThreadLocalDisplay(null);
+ /** Returns this thread current default display. If it doesn not exist, it is being created, otherwise the reference count is increased */
+ public static long createThreadLocalDefaultDisplay() {
+ return createThreadLocalDisplay(null);
}
- /** Returns this thread named display. If it doesn not exist, it is being created */
- public static long getThreadLocalDisplay(String name) {
+ /** Returns this thread named display. If it doesn not exist, it is being created, otherwise the reference count is increased */
+ public static long createThreadLocalDisplay(String name) {
NamedDisplay namedDpy = getCurrentDisplay(name);
+ if(null==namedDpy) {
+ synchronized(globalLock) {
+ namedDpy = getNamedDisplay(globalNamedDisplayPassive, name);
+ if(null != namedDpy) {
+ if(!globalNamedDisplayPassive.remove(namedDpy)) { throw new RuntimeException("Internal: "+namedDpy); }
+ globalNamedDisplayActive.add(namedDpy);
+ addCurrentDisplay( namedDpy );
+ }
+ }
+ }
if(null==namedDpy) {
long dpy = X11Lib.XOpenDisplay(name);
if(0==dpy) {
throw new NativeWindowException("X11Util.Display: Unable to create a display("+name+") connection in Thread "+Thread.currentThread().getName());
}
namedDpy = new NamedDisplay(name, dpy);
- setCurrentDisplay( namedDpy );
+ synchronized(globalLock) {
+ globalNamedDisplayActive.add(namedDpy);
+ addCurrentDisplay( namedDpy );
+ }
if(DEBUG) {
- Exception e = new Exception("X11Util.Display: Created new TLS display("+name+") connection 0x"+Long.toHexString(dpy)+" in thread "+Thread.currentThread().getName());
+ Exception e = new Exception("X11Util.Display: Created new TLS "+namedDpy+" in thread "+Thread.currentThread().getName());
+ e.printStackTrace();
+ }
+ } else {
+ namedDpy.refCount++;
+ if(DEBUG) {
+ Exception e = new Exception("X11Util.Display: Reused TLS "+namedDpy+" in thread "+Thread.currentThread().getName());
e.printStackTrace();
}
}
return namedDpy.getHandle();
}
- /** Closes this thread named display. It returns the handle of the closed display or 0, if it does not exist. */
+ /** Decrease the reference count of this thread named display. If it reaches 0, close it.
+ It returns the handle of the to be closed display.
+ It throws a RuntimeException in case the named display does not exist,
+ or the reference count goes below 0.
+ */
public static long closeThreadLocalDisplay(String name) {
- NamedDisplay namedDpy = removeCurrentDisplay(name);
+ NamedDisplay namedDpy = getCurrentDisplay(name);
if(null==namedDpy) {
+ throw new RuntimeException("X11Util.Display: Display("+name+") with given handle is not mapped to TLS in thread "+Thread.currentThread().getName());
+ }
+ if(0==namedDpy.refCount) {
+ throw new RuntimeException("X11Util.Display: "+namedDpy+" has refCount already 0 in thread "+Thread.currentThread().getName());
+ }
+ long dpy = namedDpy.getHandle();
+ namedDpy.refCount--;
+ if(0==namedDpy.refCount) {
+ synchronized(globalLock) {
+ if(!globalNamedDisplayActive.remove(namedDpy)) { throw new RuntimeException("Internal: "+namedDpy); }
+ if(namedDpy.isUncloseable()) {
+ globalNamedDisplayPassive.add(namedDpy);
+ } else {
+ X11Lib.XCloseDisplay(dpy);
+ }
+ removeCurrentDisplay(namedDpy);
+ }
if(DEBUG) {
- Exception e = new Exception("X11Util.Display: Display("+name+") with given handle is not mapped to TLS in thread "+Thread.currentThread().getName());
+ String type = namedDpy.isUncloseable() ? "passive" : "real" ;
+ Exception e = new Exception("X11Util.Display: Closing ( "+type+" ) TLS "+namedDpy+" in thread "+Thread.currentThread().getName());
e.printStackTrace();
}
- return 0;
- }
- long dpy = namedDpy.getHandle();
- if(DEBUG) {
- Exception e = new Exception("X11Util.Display: Closing TLS Display("+name+") with handle 0x"+Long.toHexString(dpy)+" in thread "+Thread.currentThread().getName());
+ } else if(DEBUG) {
+ Exception e = new Exception("X11Util.Display: Keep TLS "+namedDpy+" in thread "+Thread.currentThread().getName());
e.printStackTrace();
}
- X11Lib.XCloseDisplay(dpy);
return dpy;
}
+ public static String getThreadLocalDisplayName(long handle) {
+ NamedDisplay ndpy = getNamedDisplay(getCurrentDisplayMapImpl().values(), handle);
+ return null != ndpy ? ndpy.getName() : null;
+ }
+
+ public static boolean markThreadLocalDisplayUndeletable(long handle) {
+ NamedDisplay ndpy = getNamedDisplay(getCurrentDisplayMapImpl().values(), handle);
+ if( null != ndpy ) {
+ ndpy.unCloseable=true;
+ return true;
+ }
+ return false;
+ }
+
+ public static String getGlobalDisplayName(long handle, boolean active) {
+ String name;
+ synchronized(globalLock) {
+ NamedDisplay ndpy = getNamedDisplay(active ? globalNamedDisplayActive : globalNamedDisplayPassive, handle);
+ name = null != ndpy ? ndpy.getName() : null;
+ }
+ return name;
+ }
+
+ public static boolean markGlobalDisplayUndeletable(long handle) {
+ boolean r=false;
+ synchronized(globalLock) {
+ NamedDisplay ndpy = getNamedDisplay(globalNamedDisplayActive, handle);
+ if( null != ndpy ) {
+ ndpy.unCloseable=true;
+ r=true;
+ }
+ }
+ return r;
+ }
+
private static Map getCurrentDisplayMapImpl() {
Map displayMap = (Map) currentDisplayMap.get();
if(null==displayMap) {
@@ -132,12 +278,11 @@ public class X11Util {
/** maps the given display to the thread local display map
* and notifies all threads synchronized to this display map. */
- private static NamedDisplay setCurrentDisplay(NamedDisplay newDisplay) {
+ private static NamedDisplay addCurrentDisplay(NamedDisplay newDisplay) {
Map displayMap = getCurrentDisplayMapImpl();
NamedDisplay oldDisplay = null;
synchronized(displayMap) {
- String name = (null==newDisplay.getName())?"nil":newDisplay.getName();
- oldDisplay = (NamedDisplay) displayMap.put(name, newDisplay);
+ oldDisplay = (NamedDisplay) displayMap.put(newDisplay.getNameSafe(), newDisplay);
displayMap.notifyAll();
}
return oldDisplay;
@@ -145,22 +290,45 @@ public class X11Util {
/** removes the mapping of the given name from the thread local display map
* and notifies all threads synchronized to this display map. */
- private static NamedDisplay removeCurrentDisplay(String name) {
+ private static NamedDisplay removeCurrentDisplay(NamedDisplay ndpy) {
Map displayMap = getCurrentDisplayMapImpl();
- NamedDisplay oldDisplay = null;
synchronized(displayMap) {
- if(null==name) name="nil";
- oldDisplay = (NamedDisplay) displayMap.remove(name);
+ NamedDisplay ndpyDel = (NamedDisplay) displayMap.remove(ndpy.getNameSafe());
+ if(ndpyDel!=ndpy) {
+ throw new RuntimeException("Wrong mapping req: "+ndpy+", got "+ndpyDel);
+ }
displayMap.notifyAll();
}
- return oldDisplay;
+ return ndpy;
}
/** Returns the thread local display mapped to the given name */
private static NamedDisplay getCurrentDisplay(String name) {
- if(null==name) name="nil";
+ if(null==name) name=nullDeviceName;
Map displayMap = getCurrentDisplayMapImpl();
return (NamedDisplay) displayMap.get(name);
}
+ private static NamedDisplay getNamedDisplay(Collection namedDisplays, String name) {
+ if(null==name) name=nullDeviceName;
+ for(Iterator iter=namedDisplays.iterator(); iter.hasNext(); ) {
+ NamedDisplay ndpy = (NamedDisplay)iter.next();
+ if (ndpy.getNameSafe().equals(name)) {
+ return ndpy;
+ }
+ }
+ return null;
+ }
+
+ private static NamedDisplay getNamedDisplay(Collection namedDisplays, long handle) {
+ for(Iterator iter=namedDisplays.iterator(); iter.hasNext(); ) {
+ NamedDisplay ndpy = (NamedDisplay)iter.next();
+ if (ndpy.getHandle()==handle) {
+ return ndpy;
+ }
+ }
+ return null;
+ }
+
+ private static native void installIOErrorHandler();
}
diff --git a/src/nativewindow/classes/javax/media/nativewindow/x11/X11GraphicsScreen.java b/src/nativewindow/classes/javax/media/nativewindow/x11/X11GraphicsScreen.java
index 52f48660a..69ace3c52 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/x11/X11GraphicsScreen.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/x11/X11GraphicsScreen.java
@@ -57,7 +57,7 @@ public class X11GraphicsScreen extends DefaultGraphicsScreen implements Cloneabl
/** Creates a new X11GraphicsScreen using a thread local display connection */
public static AbstractGraphicsScreen createDefault() {
NativeWindowFactory.getDefaultFactory().getToolkitLock().lock();
- long display = X11Util.getThreadLocalDefaultDisplay();
+ long display = X11Util.createThreadLocalDefaultDisplay();
try {
X11Lib.XLockDisplay(display);
int scrnIdx = X11Lib.DefaultScreen(display);
diff --git a/src/nativewindow/native/x11/Xmisc.c b/src/nativewindow/native/x11/Xmisc.c
new file mode 100644
index 000000000..4320a8f12
--- /dev/null
+++ b/src/nativewindow/native/x11/Xmisc.c
@@ -0,0 +1,471 @@
+/*
+ * Copyright (c) 2010 Sven Gothel. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name Sven Gothel or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SVEN GOTHEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ */
+
+#include ARB_create_context
+ * mechanism to create a context.
+ * The implementation shall verify this context, ie issue a
+ * MakeCurrent
call if necessary.
+ *
+ * @param share the shared context or null
+ * @param direct flag if direct is requested
+ * @param ctxOptionFlags ARB_create_context
related, see references below
+ * @param major major number
+ * @param minor minor number
+ * @return the valid context if successfull, or null
+ *
+ * @see #CTX_PROFILE_COMPAT
+ * @see #CTX_OPTION_FORWARD
+ * @see #CTX_OPTION_DEBUG
+ */
+ protected abstract long createContextARBImpl(long share, boolean direct, int ctxOptionFlags,
+ int major, int minor);
+
+ private long createContextARB(long share, boolean direct, int ctxOptionFlags,
+ int majorMax, int minorMax,
+ int majorMin, int minorMin,
+ int major[], int minor[]) {
+ major[0]=majorMax;
+ minor[0]=minorMax;
+ long _context=0;
+
+ while ( 0==_context &&
+ GLProfile.isValidGLVersion(major[0], minor[0]) &&
+ ( major[0]>majorMin || major[0]==majorMin && minor[0] >=minorMin ) ) {
+
+ _context = createContextARBImpl(share, direct, ctxOptionFlags, major[0], minor[0]);
+
+ if(0==_context) {
+ if(!GLProfile.decrementGLVersion(major, minor)) break;
+ }
+ }
+ return _context;
+ }
+
+ /**
+ * Platform independent part of using the ARB_create_context
+ * mechanism to create a context.
+ */
+ protected long createContextARB(long share, boolean direct,
+ int major[], int minor[], int ctp[])
+ {
+ AbstractGraphicsConfiguration config = drawable.getNativeWindow().getGraphicsConfiguration().getNativeGraphicsConfiguration();
+ GLCapabilities glCaps = (GLCapabilities) config.getChosenCapabilities();
+ GLProfile glp = glCaps.getGLProfile();
+ long _context = 0;
+
+ ctp[0] = CTX_IS_ARB_CREATED | CTX_PROFILE_CORE | CTX_OPTION_ANY; // default
+ boolean isBackwardCompatibility = glp.isGL2() || glp.isGL3bc() || glp.isGL4bc() ;
+ int majorMin, minorMin;
+ int majorMax, minorMax;
+ if( glp.isGL4() ) {
+ // ?? majorMax=GLProfile.getMaxMajor(); minorMax=GLProfile.getMaxMinor(majorMax);
+ majorMax=4; minorMax=GLProfile.getMaxMinor(majorMax);
+ majorMin=4; minorMin=0;
+ } else if( glp.isGL3() ) {
+ majorMax=3; minorMax=GLProfile.getMaxMinor(majorMax);
+ majorMin=3; minorMin=1;
+ } else /* if( glp.isGL2() ) */ {
+ majorMax=3; minorMax=0;
+ majorMin=1; minorMin=1; // our minimum desktop OpenGL runtime requirements
+ }
+ // Try the requested ..
+ if(isBackwardCompatibility) {
+ ctp[0] &= ~CTX_PROFILE_CORE ;
+ ctp[0] |= CTX_PROFILE_COMPAT ;
+ }
+ _context = createContextARB(share, direct, ctp[0],
+ /* max */ majorMax, minorMax,
+ /* min */ majorMin, minorMin,
+ /* res */ major, minor);
+
+ if(0==_context && !isBackwardCompatibility) {
+ ctp[0] &= ~CTX_PROFILE_COMPAT ;
+ ctp[0] |= CTX_PROFILE_CORE ;
+ ctp[0] &= ~CTX_OPTION_ANY ;
+ ctp[0] |= CTX_OPTION_FORWARD ;
+ _context = createContextARB(share, direct, ctp[0],
+ /* max */ majorMax, minorMax,
+ /* min */ majorMin, minorMin,
+ /* res */ major, minor);
+ if(0==_context) {
+ // Try a compatible one .. even though not requested .. last resort
+ ctp[0] &= ~CTX_PROFILE_CORE ;
+ ctp[0] |= CTX_PROFILE_COMPAT ;
+ ctp[0] &= ~CTX_OPTION_FORWARD ;
+ ctp[0] |= CTX_OPTION_ANY ;
+ _context = createContextARB(share, direct, ctp[0],
+ /* max */ majorMax, minorMax,
+ /* min */ majorMin, minorMin,
+ /* res */ major, minor);
+ }
+ }
+ return _context;
+ }
+
public int makeCurrent() throws GLException {
// Support calls to makeCurrent() over and over again with
// different contexts without releasing them
@@ -272,7 +375,7 @@ public abstract class GLContextImpl extends GLContext {
if(DEBUG) {
String sgl1 = (null!=this.gl)?this.gl.getClass().toString()+", "+this.gl.toString():new String("major.minor ([option]?[options,]*) - gl-version
+ *
+ *
+ *
+ *
+ * e.g.:
+ *
+ *
+ * old
refers to the non ARB_create_context created context
+ * new
refers to the ARB_create_context created context
+ * compatible profile
+ * core profile
+ * forward compatible
+ * any
refers to the non forward compatible context
+ * ES
refers to the GLES context variant
+ *
+ *
+ *
+ *
+ *
+ *
+ * row 2, cell 1
+ * row 2, cell 2
+ *
+ *
+ */
+ public final String getGLVersion() {
+ return ctxVersionString;
+ }
+
+ protected int ctxMajorVersion=-1;
+ protected int ctxMinorVersion=-1;
+ protected int ctxOptions=0;
+ protected String ctxVersionString=null;
+
+ /**
+ * ES2 2.0 (ES, any, new) - 2.0 ES Profile
+ * ATI GL2 3.0 (compatibility profile, any, new) - 3.2.9704 Compatibility Profile Context
+ * ATI GL3 3.3 (core profile, any, new) - 1.4 (3.2.9704 Compatibility Profile Context)
+ * ATI GL3bc 3.3 (compatibility profile, any, new) - 1.4 (3.2.9704 Compatibility Profile Context)
+ * NV GL2 3.0 (compatibility profile, any, new) - 3.0.0 NVIDIA 195.36.07.03
+ * NV GL3 3.3 (core profile, any, new) - 3.3.0 NVIDIA 195.36.07.03
+ * NV GL3bc 3.3 (compatibility profile, any, new) - 3.3.0 NVIDIA 195.36.07.03
ARB_create_context
related: created via ARB_create_context */
+ protected static final int CTX_IS_ARB_CREATED = 1 << 0;
+ /** ARB_create_context
related: compatibility profile */
+ protected static final int CTX_PROFILE_COMPAT = 1 << 1;
+ /** ARB_create_context
related: core profile */
+ protected static final int CTX_PROFILE_CORE = 1 << 2;
+ /** ARB_create_context
related: flag forward compatible */
+ protected static final int CTX_OPTION_FORWARD = 1 << 3;
+ /** ARB_create_context
related: not flag forward compatible */
+ protected static final int CTX_OPTION_ANY = 1 << 4;
+ /** ARB_create_context
related: flag debug */
+ protected static final int CTX_OPTION_DEBUG = 1 << 5;
}
diff --git a/src/jogl/classes/javax/media/opengl/GLProfile.java b/src/jogl/classes/javax/media/opengl/GLProfile.java
index 755fae73d..231faab8c 100644
--- a/src/jogl/classes/javax/media/opengl/GLProfile.java
+++ b/src/jogl/classes/javax/media/opengl/GLProfile.java
@@ -62,6 +62,13 @@ public class GLProfile implements Cloneable {
// Public (user-visible) profiles
//
+ /** The desktop OpenGL compatibility profile 4.x, with x >= 0, ie GL2 plus GL4.
+ bc
stands for backward compatibility. */
+ public static final String GL4bc = "GL4bc";
+
+ /** The desktop OpenGL core profile 4.x, with x >= 0 */
+ public static final String GL4 = "GL4";
+
/** The desktop OpenGL compatibility profile 3.x, with x >= 1, ie GL2 plus GL3.
bc
stands for backward compatibility. */
public static final String GL3bc = "GL3bc";
@@ -90,12 +97,12 @@ public class GLProfile implements Cloneable {
/**
* All GL Profiles in the order of default detection: GL2, GL2ES2, GL2ES1, GLES2, GLES1, GL2GL3, GL3
*/
- public static final String[] GL_PROFILE_LIST_ALL = new String[] { GL2, GL2ES2, GL2ES1, GLES2, GLES1, GL2GL3, GL3bc, GL3 };
+ public static final String[] GL_PROFILE_LIST_ALL = new String[] { GL2, GL2ES2, GL2ES1, GLES2, GLES1, GL2GL3, GL4bc, GL3bc, GL4, GL3 };
/**
* All GL2ES2 Profiles in the order of default detection: GL2ES2, GL2, GLES2, GL3
*/
- public static final String[] GL_PROFILE_LIST_GL2ES2 = new String[] { GL2ES2, GL2, GLES2, GL3bc, GL3 };
+ public static final String[] GL_PROFILE_LIST_GL2ES2 = new String[] { GL2ES2, GL2, GLES2, GL4bc, GL3bc, GL4, GL3 };
/**
* All GL2ES1 Profiles in the order of default detection: GL2ES1, GL2, GLES1
@@ -193,7 +200,11 @@ public class GLProfile implements Cloneable {
}
private static final String getGLImplBaseClassName(String profileImpl) {
- if(GL3bc.equals(profileImpl)) {
+ if(GL4bc.equals(profileImpl)) {
+ return "com.jogamp.opengl.impl.gl4.GL4bc";
+ } else if(GL4.equals(profileImpl)) {
+ return "com.jogamp.opengl.impl.gl4.GL4";
+ } else if(GL3bc.equals(profileImpl)) {
return "com.jogamp.opengl.impl.gl3.GL3bc";
} else if(GL3.equals(profileImpl)) {
return "com.jogamp.opengl.impl.gl3.GL3";
@@ -254,19 +265,29 @@ public class GLProfile implements Cloneable {
return profileImpl;
}
+ /** Indicates whether this profile is capable of GL4bc. */
+ public final boolean isGL4bc() {
+ return GL4bc.equals(profile);
+ }
+
+ /** Indicates whether this profile is capable of GL4. */
+ public final boolean isGL4() {
+ return isGL4bc() || GL4.equals(profile);
+ }
+
/** Indicates whether this profile is capable of GL3bc. */
public final boolean isGL3bc() {
- return GL3bc.equals(profile);
+ return isGL4bc() || GL3bc.equals(profile);
}
/** Indicates whether this profile is capable of GL3. */
public final boolean isGL3() {
- return isGL3bc() || GL3.equals(profile);
+ return isGL4() || isGL3bc() || GL3.equals(profile);
}
/** Indicates whether this profile is capable of GL2. */
public final boolean isGL2() {
- return GL2.equals(profile);
+ return isGL3bc() || GL2.equals(profile);
}
/** Indicates whether this profile is capable of GLES1. */
@@ -294,24 +315,14 @@ public class GLProfile implements Cloneable {
return GL2GL3.equals(profile) || isGL2() || isGL3() ;
}
- /** Indicates whether this profile uses the native OpenGL ES1 implementations. */
- public final boolean usesNativeGLES1() {
- return GLES1.equals(profileImpl);
+ /** Indicates whether this profile uses the native desktop OpenGL GL4bc implementations. */
+ public final boolean usesNativeGL4bc() {
+ return GL4bc.equals(profileImpl);
}
- /** Indicates whether this profile uses the native OpenGL ES2 implementations. */
- public final boolean usesNativeGLES2() {
- return GLES2.equals(profileImpl);
- }
-
- /** Indicates whether this profile uses either of the native OpenGL ES implementations. */
- public final boolean usesNativeGLES() {
- return usesNativeGLES2() || usesNativeGLES1();
- }
-
- /** Indicates whether this profile uses the native desktop OpenGL GL2 implementations. */
- public final boolean usesNativeGL2() {
- return GL2.equals(profileImpl) || GL2ES12.equals(profileImpl) ;
+ /** Indicates whether this profile uses the native desktop OpenGL GL4 implementations. */
+ public final boolean usesNativeGL4() {
+ return usesNativeGL4bc() || GL4.equals(profileImpl);
}
/** Indicates whether this profile uses the native desktop OpenGL GL3bc implementations. */
@@ -324,9 +335,29 @@ public class GLProfile implements Cloneable {
return usesNativeGL3bc() || GL3.equals(profileImpl);
}
+ /** Indicates whether this profile uses the native desktop OpenGL GL2 implementations. */
+ public final boolean usesNativeGL2() {
+ return GL2.equals(profileImpl) || GL2ES12.equals(profileImpl) ;
+ }
+
/** Indicates whether this profile uses the native desktop OpenGL GL2 or GL3 implementations. */
public final boolean usesNativeGL2GL3() {
- return usesNativeGL2() || usesNativeGL3() ;
+ return usesNativeGL2() || usesNativeGL3() || usesNativeGL4();
+ }
+
+ /** Indicates whether this profile uses the native OpenGL ES1 implementations. */
+ public final boolean usesNativeGLES1() {
+ return GLES1.equals(profileImpl);
+ }
+
+ /** Indicates whether this profile uses the native OpenGL ES2 implementations. */
+ public final boolean usesNativeGLES2() {
+ return GLES2.equals(profileImpl);
+ }
+
+ /** Indicates whether this profile uses either of the native OpenGL ES implementations. */
+ public final boolean usesNativeGLES() {
+ return usesNativeGLES2() || usesNativeGLES1();
}
/** Indicates whether this profile supports GLSL. */
@@ -634,6 +665,49 @@ public class GLProfile implements Cloneable {
return "GLProfile[" + profile + "/" + profileImpl + "]";
}
+ public static final int GL_VERSIONS[][] = {
+ /* 0.*/ { -1 },
+ /* 1.*/ { 0, 1, 2, 3, 4, 5 },
+ /* 2.*/ { 0, 1 },
+ /* 3.*/ { 0, 1, 2, 3 },
+ /* 4.*/ { 0 } };
+
+ public static final int getMaxMajor() {
+ return GL_VERSIONS.length-1;
+ }
+
+ public static final int getMaxMinor(int major) {
+ if(1>major || major>=GL_VERSIONS.length) return -1;
+ return GL_VERSIONS[major].length-1;
+ }
+
+ public static final boolean isValidGLVersion(int major, int minor) {
+ if(1>major || major>=GL_VERSIONS.length) return false;
+ if(0>minor || minor>=GL_VERSIONS[major].length) return false;
+ return true;
+ }
+
+ public static final boolean decrementGLVersion(int major[], int minor[]) {
+ if(null==major || major.length<1 ||null==minor || minor.length<1) {
+ throw new GLException("invalid array arguments");
+ }
+ int m = major[0];
+ int n = minor[0];
+ if(!isValidGLVersion(m, n)) return false;
+
+ // decrement ..
+ n -= 1;
+ if(n < 0) {
+ m -= 1;
+ n = GL_VERSIONS[m].length-1;
+ }
+ if(!isValidGLVersion(m, n)) return false;
+ major[0]=m;
+ minor[0]=n;
+
+ return true;
+ }
+
// The intersection between desktop OpenGL and the union of the OpenGL ES profiles
// This is here only to avoid having separate GL2ES1Impl and GL2ES2Impl classes
private static final String GL2ES12 = "GL2ES12";
--
cgit v1.2.3
From 60da84a5ca8fa5e74e995ad0343c8967ba9463a5 Mon Sep 17 00:00:00 2001
From: Sven Gothel
LPVOID glMapBuffer(GLenum target, GLenum access);
*/
-public java.nio.ByteBuffer glMapBuffer(int target, int access) {
- final long __addr_ = ((GL2ProcAddressTable)_context.getGLProcAddressTable())._addressof_glMapBuffer;
- if (__addr_ == 0) {
- throw new GLException("Method \"glMapBuffer\" not available");
- }
- int sz = bufferSizeTracker.getBufferSize(bufferStateTracker,
- target,
- this);
- long addr;
- addr = dispatch_glMapBuffer(target, access, __addr_);
- if (addr == 0 || sz == 0) {
- return null;
- }
- ARBVBOKey key = new ARBVBOKey(addr, sz);
- ByteBuffer _res = (ByteBuffer) arbVBOCache.get(key);
- if (_res == null) {
- _res = newDirectByteBuffer(addr, sz);
- InternalBufferUtil.nativeOrder(_res);
- arbVBOCache.put(key, _res);
- }
- _res.position(0);
- return _res;
-}
-
-/** Encapsulates function pointer for OpenGL function
: LPVOID glMapBuffer(GLenum target, GLenum access);
*/
-native private long dispatch_glMapBuffer(int target, int access, long glProcAddress);
-
-native private ByteBuffer newDirectByteBuffer(long addr, int capacity);
-
- /** Dummy implementation for the ES 2.0 function:
void {@native glShaderBinary}(GLint n, const GLuint * shaders, GLenum binaryformat, const void * binary, GLint length);
Always throws a GLException! */
- public void glShaderBinary(int n, java.nio.IntBuffer shaders, int binaryformat, java.nio.Buffer binary, int length) {
- throw new GLException("Method \"glShaderBinary\" not available");
- }
-
- /** Dummy implementation for the ES 2.0 function:
void {@native glShaderBinary}(GLint n, const GLuint * shaders, GLenum binaryformat, const void * binary, GLint length);
Always throws a GLException! */
- public void glShaderBinary(int n, int[] shaders, int shaders_offset, int binaryformat, java.nio.Buffer binary, int length) {
- throw new GLException("Method \"glShaderBinary\" not available");
- }
-
- public void glReleaseShaderCompiler() {
- // nothing to do
- }
-
- public void glVertexPointer(GLArrayData array) {
- if(array.getComponentNumber()==0) return;
- if(array.isVBO()) {
- glVertexPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset());
- } else {
- glVertexPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer());
- }
- }
- public void glColorPointer(GLArrayData array) {
- if(array.getComponentNumber()==0) return;
- if(array.isVBO()) {
- glColorPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset());
- } else {
- glColorPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer());
- }
-
- }
- public void glNormalPointer(GLArrayData array) {
- if(array.getComponentNumber()==0) return;
- if(array.getComponentNumber()!=3) {
- throw new GLException("Only 3 components per normal allowed");
- }
- if(array.isVBO()) {
- glNormalPointer(array.getComponentType(), array.getStride(), array.getOffset());
- } else {
- glNormalPointer(array.getComponentType(), array.getStride(), array.getBuffer());
- }
- }
- public void glTexCoordPointer(GLArrayData array) {
- if(array.getComponentNumber()==0) return;
- if(array.isVBO()) {
- glTexCoordPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset());
- } else {
- glTexCoordPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer());
- }
- }
-
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gl2es12.java b/make/config/jogl/gl-impl-CustomJavaCode-gl2es12.java
deleted file mode 100644
index 54c7bd92b..000000000
--- a/make/config/jogl/gl-impl-CustomJavaCode-gl2es12.java
+++ /dev/null
@@ -1,455 +0,0 @@
-// Tracks glBegin/glEnd calls to determine whether it is legal to
-// query Vertex Buffer Object state
-private boolean inBeginEndPair;
-
-/* FIXME: refactor dependence on Java 2D / JOGL bridge
-
-// Tracks creation and destruction of server-side OpenGL objects when
-// the Java2D/OpenGL pipeline is enabled and it is using frame buffer
-// objects (FBOs) to do its rendering
-private GLObjectTracker tracker;
-
-public void setObjectTracker(GLObjectTracker tracker) {
- this.tracker = tracker;
-}
-
-*/
-
-public GL2ES12Impl(GLProfile glp, GLContextImpl context) {
- this._context = context;
- this.bufferSizeTracker = context.getBufferSizeTracker();
- this.bufferStateTracker = context.getBufferStateTracker();
- this.glStateTracker = context.getGLStateTracker();
- this.isGL2ES2 = glp.isGL2ES2();
- this.glProfile = glp;
-}
-
-private boolean isGL2ES2;
-
-public final boolean isGL() {
- return true;
-}
-
-public final boolean isGL4bc() {
- return false;
-}
-
-public final boolean isGL4() {
- return false;
-}
-
-public final boolean isGL3bc() {
- return false;
-}
-
-public final boolean isGL3() {
- return false;
-}
-
-public final boolean isGL2() {
- return false;
-}
-
-public final boolean isGLES1() {
- return false;
-}
-
-public final boolean isGLES2() {
- return false;
-}
-
-public final boolean isGLES() {
- return false;
-}
-
-public final boolean isGL2ES1() {
- return !isGL2ES2;
-}
-
-public final boolean isGL2ES2() {
- return isGL2ES2;
-}
-
-public final boolean isGL2GL3() {
- return false;
-}
-
-public final boolean hasGLSL() {
- return isGL2ES2;
-}
-
-public final GL getGL() throws GLException {
- return this;
-}
-
-public final GL4bc getGL4bc() throws GLException {
- throw new GLException("Not a GL4bc implementation");
-}
-
-public final GL4 getGL4() throws GLException {
- throw new GLException("Not a GL4 implementation");
-}
-
-public final GL3bc getGL3bc() throws GLException {
- throw new GLException("Not a GL3bc implementation");
-}
-
-public final GL3 getGL3() throws GLException {
- throw new GLException("Not a GL3 implementation");
-}
-
-public final GL2 getGL2() throws GLException {
- throw new GLException("Not a GL2 implementation");
-}
-
-public final GLES1 getGLES1() throws GLException {
- throw new GLException("Not a GLES1 implementation");
-}
-
-public final GLES2 getGLES2() throws GLException {
- throw new GLException("Not a GLES2 implementation");
-}
-
-public final GL2ES1 getGL2ES1() throws GLException {
- if (isGL2ES1()) {
- return this;
- }
- throw new GLException("Not a GL2ES1 implementation");
-}
-
-public final GL2ES2 getGL2ES2() throws GLException {
- if (isGL2ES2()) {
- return this;
- }
- throw new GLException("Not a GL2ES2 implementation");
-}
-
-public final GL2GL3 getGL2GL3() throws GLException {
- throw new GLException("Not a GL2GL3 implementation");
-}
-
-public boolean isFunctionAvailable(String glFunctionName) {
- return _context.isFunctionAvailable(glFunctionName);
-}
-
-public boolean isExtensionAvailable(String glExtensionName) {
- return _context.isExtensionAvailable(glExtensionName);
-}
-
-public Object getExtension(String extensionName) {
- // At this point we don't expose any extensions using this mechanism
- return null;
-}
-
-/** Returns the context this GL object is associated with for better
- error checking by DebugGL. */
-public GLContext getContext() {
- return _context;
-}
-
-private GLContextImpl _context;
-
-public void setSwapInterval(int interval) {
- _context.setSwapInterval(interval);
-}
-
-public int getSwapInterval() {
- return _context.getSwapInterval();
-}
-
-public Object getPlatformGLExtensions() {
- return _context.getPlatformGLExtensions();
-}
-
-//
-// Helpers for ensuring the correct amount of texture data
-//
-
-/** Returns the number of bytes required to fill in the appropriate
- texture. This is computed as closely as possible based on the
- pixel pack or unpack parameters. The logic in this routine is
- based on code in the SGI OpenGL sample implementation. */
-
-private int imageSizeInBytes(int format, int type, int w, int h, int d,
- boolean pack) {
- int elements = 0;
- int esize = 0;
-
- if (w < 0) return 0;
- if (h < 0) return 0;
- if (d < 0) return 0;
- switch (format) {
- case GL_STENCIL_INDEX:
- elements = 1;
- break;
- case GL_ALPHA:
- case GL_LUMINANCE:
- case GL_DEPTH_COMPONENT:
- elements = 1;
- break;
- case GL_LUMINANCE_ALPHA:
- elements = 2;
- break;
- case GL_RGB:
- elements = 3;
- break;
- case GL_RGBA:
- elements = 4;
- break;
- /* FIXME ??
- case GL_HILO_NV:
- elements = 2;
- break; */
- default:
- return 0;
- }
- switch (type) {
- case GL_BYTE:
- case GL_UNSIGNED_BYTE:
- esize = 1;
- break;
- case GL_SHORT:
- case GL_UNSIGNED_SHORT:
- esize = 2;
- break;
- case GL_UNSIGNED_SHORT_5_6_5:
- case GL_UNSIGNED_SHORT_4_4_4_4:
- case GL_UNSIGNED_SHORT_5_5_5_1:
- esize = 2;
- elements = 1;
- break;
- case GL_INT:
- case GL_UNSIGNED_INT:
- case GL_FLOAT:
- esize = 4;
- break;
- default:
- return 0;
- }
- return imageSizeInBytes(elements * esize, w, h, d, pack);
-}
-
-private GLBufferSizeTracker bufferSizeTracker;
-private GLBufferStateTracker bufferStateTracker;
-private GLStateTracker glStateTracker;
-
-private boolean bufferObjectExtensionsInitialized = false;
-private boolean haveGL15;
-private boolean haveGL21;
-private boolean haveARBVertexBufferObject;
-
-private void initBufferObjectExtensionChecks() {
- if (bufferObjectExtensionsInitialized)
- return;
- bufferObjectExtensionsInitialized = true;
- haveGL15 = isExtensionAvailable("GL_VERSION_1_5");
- haveGL21 = isExtensionAvailable("GL_VERSION_2_1");
- haveARBVertexBufferObject = isExtensionAvailable("GL_ARB_vertex_buffer_object");
-}
-
-private boolean checkBufferObject(boolean extension1,
- boolean extension2,
- boolean extension3,
- boolean enabled,
- int state,
- String kind, boolean throwException) {
- if (inBeginEndPair) {
- throw new GLException("May not call this between glBegin and glEnd");
- }
- boolean avail = (extension1 || extension2 || extension3);
- if (!avail) {
- if (!enabled)
- return true;
- if(throwException) {
- throw new GLException("Required extensions not available to call this function");
- }
- return false;
- }
- int buffer = bufferStateTracker.getBoundBufferObject(state, this);
- if (enabled) {
- if (buffer == 0) {
- if(throwException) {
- throw new GLException(kind + " must be enabled to call this method");
- }
- return false;
- }
- } else {
- if (buffer != 0) {
- if(throwException) {
- throw new GLException(kind + " must be disabled to call this method");
- }
- return false;
- }
- }
- return true;
-}
-
-private boolean checkArrayVBODisabled(boolean throwException) {
- initBufferObjectExtensionChecks();
- return checkBufferObject(haveGL15,
- haveARBVertexBufferObject,
- false,
- false,
- GL.GL_ARRAY_BUFFER,
- "array vertex_buffer_object", throwException);
-}
-
-private boolean checkArrayVBOEnabled(boolean throwException) {
- initBufferObjectExtensionChecks();
- return checkBufferObject(haveGL15,
- haveARBVertexBufferObject,
- false,
- true,
- GL.GL_ARRAY_BUFFER,
- "array vertex_buffer_object", throwException);
-}
-
-private boolean checkElementVBODisabled(boolean throwException) {
- initBufferObjectExtensionChecks();
- return checkBufferObject(haveGL15,
- haveARBVertexBufferObject,
- false,
- false,
- GL.GL_ELEMENT_ARRAY_BUFFER,
- "element vertex_buffer_object", throwException);
-}
-
-private boolean checkElementVBOEnabled(boolean throwException) {
- initBufferObjectExtensionChecks();
- return checkBufferObject(haveGL15,
- haveARBVertexBufferObject,
- false,
- true,
- GL.GL_ELEMENT_ARRAY_BUFFER,
- "element vertex_buffer_object", throwException);
-}
-
-private boolean checkUnpackPBODisabled(boolean throwException) {
- // PBO n/a for ES 1.1 or ES 2.0
- return true;
-}
-
-private boolean checkUnpackPBOEnabled(boolean throwException) {
- // PBO n/a for ES 1.1 or ES 2.0
- return false;
-}
-
-private boolean checkPackPBODisabled(boolean throwException) {
- // PBO n/a for ES 1.1 or ES 2.0
- return true;
-}
-
-private boolean checkPackPBOEnabled(boolean throwException) {
- // PBO n/a for ES 1.1 or ES 2.0
- return false;
-}
-
-// Attempt to return the same ByteBuffer object from glMapBuffer if
-// the vertex buffer object's base address and size haven't changed
-private static class ARBVBOKey {
- private long addr;
- private int capacity;
-
- ARBVBOKey(long addr, int capacity) {
- this.addr = addr;
- this.capacity = capacity;
- }
-
- public int hashCode() {
- return (int) addr;
- }
-
- public boolean equals(Object o) {
- if ((o == null) || (!(o instanceof ARBVBOKey))) {
- return false;
- }
-
- ARBVBOKey other = (ARBVBOKey) o;
- return ((addr == other.addr) && (capacity == other.capacity));
- }
-}
-
-private Map/*
LPVOID glMapBuffer(GLenum target, GLenum access);
*/
-public java.nio.ByteBuffer glMapBuffer(int target, int access) {
- final long __addr_ = ((GL2ES12ProcAddressTable)_context.getGLProcAddressTable())._addressof_glMapBuffer;
- if (__addr_ == 0) {
- throw new GLException("Method \"glMapBuffer\" not available");
- }
- int sz = bufferSizeTracker.getBufferSize(bufferStateTracker,
- target,
- this);
- long addr;
- addr = dispatch_glMapBuffer(target, access, __addr_);
- if (addr == 0 || sz == 0) {
- return null;
- }
- ARBVBOKey key = new ARBVBOKey(addr, sz);
- ByteBuffer _res = (ByteBuffer) arbVBOCache.get(key);
- if (_res == null) {
- _res = newDirectByteBuffer(addr, sz);
- InternalBufferUtil.nativeOrder(_res);
- arbVBOCache.put(key, _res);
- }
- _res.position(0);
- return _res;
-}
-
-/** Encapsulates function pointer for OpenGL function
: LPVOID glMapBuffer(GLenum target, GLenum access);
*/
-native private long dispatch_glMapBuffer(int target, int access, long glProcAddress);
-
-native private ByteBuffer newDirectByteBuffer(long addr, int capacity);
-
- /** Dummy implementation for the ES 2.0 function:
void {@native glShaderBinary}(GLint n, const GLuint * shaders, GLenum binaryformat, const void * binary, GLint length);
Always throws a GLException! */
- public void glShaderBinary(int n, java.nio.IntBuffer shaders, int binaryformat, java.nio.Buffer binary, int length) {
- throw new GLException("Method \"glShaderBinary\" not available");
- }
-
- /** Dummy implementation for the ES 2.0 function:
void {@native glShaderBinary}(GLint n, const GLuint * shaders, GLenum binaryformat, const void * binary, GLint length);
Always throws a GLException! */
- public void glShaderBinary(int n, int[] shaders, int shaders_offset, int binaryformat, java.nio.Buffer binary, int length) {
- throw new GLException("Method \"glShaderBinary\" not available");
- }
-
- public void glReleaseShaderCompiler() {
- // nothing to do
- }
-
- public void glVertexPointer(GLArrayData array) {
- if(array.getComponentNumber()==0) return;
- if(array.isVBO()) {
- glVertexPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset());
- } else {
- glVertexPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer());
- }
- }
- public void glColorPointer(GLArrayData array) {
- if(array.getComponentNumber()==0) return;
- if(array.isVBO()) {
- glColorPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset());
- } else {
- glColorPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer());
- }
-
- }
- public void glNormalPointer(GLArrayData array) {
- if(array.getComponentNumber()==0) return;
- if(array.getComponentNumber()!=3) {
- throw new GLException("Only 3 components per normal allowed");
- }
- if(array.isVBO()) {
- glNormalPointer(array.getComponentType(), array.getStride(), array.getOffset());
- } else {
- glNormalPointer(array.getComponentType(), array.getStride(), array.getBuffer());
- }
- }
- public void glTexCoordPointer(GLArrayData array) {
- if(array.getComponentNumber()==0) return;
- if(array.isVBO()) {
- glTexCoordPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset());
- } else {
- glTexCoordPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer());
- }
- }
-
-
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gl3.java b/make/config/jogl/gl-impl-CustomJavaCode-gl3.java
deleted file mode 100644
index cff0b0f94..000000000
--- a/make/config/jogl/gl-impl-CustomJavaCode-gl3.java
+++ /dev/null
@@ -1,468 +0,0 @@
-// Tracks glBegin/glEnd calls to determine whether it is legal to
-// query Vertex Buffer Object state
-private boolean inBeginEndPair;
-
-/* FIXME: refactor dependence on Java 2D / JOGL bridge
-
-// Tracks creation and destruction of server-side OpenGL objects when
-// the Java2D/OpenGL pipeline is enabled and it is using frame buffer
-// objects (FBOs) to do its rendering
-private GLObjectTracker tracker;
-
-public void setObjectTracker(GLObjectTracker tracker) {
- this.tracker = tracker;
-}
-
-*/
-
-public GL3Impl(GLProfile glp, GLContextImpl context) {
- this._context = context;
- this.bufferSizeTracker = context.getBufferSizeTracker();
- this.bufferStateTracker = context.getBufferStateTracker();
- this.glStateTracker = context.getGLStateTracker();
- this.glProfile = glp;
-}
-
-public final boolean isGL() {
- return true;
-}
-
-public final boolean isGL4bc() {
- return false;
-}
-
-public final boolean isGL4() {
- return false;
-}
-
-public final boolean isGL3bc() {
- return false;
-}
-
-public final boolean isGL3() {
- return true;
-}
-
-public final boolean isGL2() {
- return false;
-}
-
-public final boolean isGLES1() {
- return false;
-}
-
-public final boolean isGLES2() {
- return false;
-}
-
-public final boolean isGLES() {
- return false;
-}
-
-public final boolean isGL2ES1() {
- return false;
-}
-
-public final boolean isGL2ES2() {
- return true;
-}
-
-public final boolean isGL2GL3() {
- return true;
-}
-
-public final boolean hasGLSL() {
- return true;
-}
-
-public final GL getGL() throws GLException {
- return this;
-}
-
-public final GL4bc getGL4bc() throws GLException {
- throw new GLException("Not a GL4bc implementation");
-}
-
-public final GL4 getGL4() throws GLException {
- throw new GLException("Not a GL4 implementation");
-}
-
-public final GL3bc getGL3bc() throws GLException {
- throw new GLException("Not a GL3bc implementation");
-}
-
-public final GL3 getGL3() throws GLException {
- return this;
-}
-
-public final GL2 getGL2() throws GLException {
- throw new GLException("Not a GL2 implementation");
-}
-
-public final GLES1 getGLES1() throws GLException {
- throw new GLException("Not a GLES1 implementation");
-}
-
-public final GLES2 getGLES2() throws GLException {
- throw new GLException("Not a GLES2 implementation");
-}
-
-public final GL2ES1 getGL2ES1() throws GLException {
- throw new GLException("Not a GLES2ES1 implementation");
-}
-
-public final GL2ES2 getGL2ES2() throws GLException {
- return this;
-}
-
-public final GL2GL3 getGL2GL3() throws GLException {
- return this;
-}
-
-public boolean isFunctionAvailable(String glFunctionName) {
- return _context.isFunctionAvailable(glFunctionName);
-}
-
-public boolean isExtensionAvailable(String glExtensionName) {
- return _context.isExtensionAvailable(glExtensionName);
-}
-
-public Object getExtension(String extensionName) {
- // At this point we don't expose any extensions using this mechanism
- return null;
-}
-
-/** Returns the context this GL object is associated with for better
- error checking by DebugGL. */
-public GLContext getContext() {
- return _context;
-}
-
-private GLContextImpl _context;
-
-/**
- * Provides platform-independent access to the wglAllocateMemoryNV /
- * glXAllocateMemoryNV extension.
- */
-public java.nio.ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3) {
- return _context.glAllocateMemoryNV(arg0, arg1, arg2, arg3);
-}
-
-public void setSwapInterval(int interval) {
- _context.setSwapInterval(interval);
-}
-
-public int getSwapInterval() {
- return _context.getSwapInterval();
-}
-
-public Object getPlatformGLExtensions() {
- return _context.getPlatformGLExtensions();
-}
-
-//
-// Helpers for ensuring the correct amount of texture data
-//
-
-/** Returns the number of bytes required to fill in the appropriate
- texture. This is computed as closely as possible based on the
- pixel pack or unpack parameters. The logic in this routine is
- based on code in the SGI OpenGL sample implementation. */
-
-private int imageSizeInBytes(int format, int type, int w, int h, int d,
- boolean pack) {
- int elements = 0;
- int esize = 0;
-
- if (w < 0) return 0;
- if (h < 0) return 0;
- if (d < 0) return 0;
- switch (format) {
- case GL_STENCIL_INDEX:
- elements = 1;
- break;
- case GL_RED:
- case GL_GREEN:
- case GL_BLUE:
- case GL_ALPHA:
- case GL_LUMINANCE:
- case GL_DEPTH_COMPONENT:
- elements = 1;
- break;
- case GL_LUMINANCE_ALPHA:
- elements = 2;
- break;
- case GL_RGB:
- case GL_BGR:
- elements = 3;
- break;
- case GL_RGBA:
- case GL_BGRA:
- elements = 4;
- break;
- /* FIXME ??
- case GL_HILO_NV:
- elements = 2;
- break; */
- default:
- return 0;
- }
- switch (type) {
- case GL_BYTE:
- case GL_UNSIGNED_BYTE:
- esize = 1;
- break;
- case GL_UNSIGNED_BYTE_3_3_2:
- case GL_UNSIGNED_BYTE_2_3_3_REV:
- esize = 1;
- elements = 1;
- break;
- case GL_SHORT:
- case GL_UNSIGNED_SHORT:
- esize = 2;
- break;
- case GL_UNSIGNED_SHORT_5_6_5:
- case GL_UNSIGNED_SHORT_5_6_5_REV:
- case GL_UNSIGNED_SHORT_4_4_4_4:
- case GL_UNSIGNED_SHORT_4_4_4_4_REV:
- case GL_UNSIGNED_SHORT_5_5_5_1:
- case GL_UNSIGNED_SHORT_1_5_5_5_REV:
- esize = 2;
- elements = 1;
- break;
- case GL_INT:
- case GL_UNSIGNED_INT:
- case GL_FLOAT:
- esize = 4;
- break;
- case GL_UNSIGNED_INT_8_8_8_8:
- case GL_UNSIGNED_INT_8_8_8_8_REV:
- case GL_UNSIGNED_INT_10_10_10_2:
- case GL_UNSIGNED_INT_2_10_10_10_REV:
- esize = 4;
- elements = 1;
- break;
- default:
- return 0;
- }
- return imageSizeInBytes(elements * esize, w, h, d, pack);
-}
-
-private GLBufferSizeTracker bufferSizeTracker;
-private GLBufferStateTracker bufferStateTracker;
-private GLStateTracker glStateTracker;
-
-private boolean bufferObjectExtensionsInitialized = false;
-private boolean haveARBPixelBufferObject;
-private boolean haveEXTPixelBufferObject;
-private boolean haveGL15;
-private boolean haveGL21;
-private boolean haveARBVertexBufferObject;
-
-private void initBufferObjectExtensionChecks() {
- if (bufferObjectExtensionsInitialized)
- return;
- bufferObjectExtensionsInitialized = true;
- haveARBPixelBufferObject = isExtensionAvailable("GL_ARB_pixel_buffer_object");
- haveEXTPixelBufferObject = isExtensionAvailable("GL_EXT_pixel_buffer_object");
- haveGL15 = isExtensionAvailable("GL_VERSION_1_5");
- haveGL21 = isExtensionAvailable("GL_VERSION_2_1");
- haveARBVertexBufferObject = isExtensionAvailable("GL_ARB_vertex_buffer_object");
-}
-
-private boolean checkBufferObject(boolean extension1,
- boolean extension2,
- boolean extension3,
- boolean enabled,
- int state,
- String kind, boolean throwException) {
- if (inBeginEndPair) {
- throw new GLException("May not call this between glBegin and glEnd");
- }
- boolean avail = (extension1 || extension2 || extension3);
- if (!avail) {
- if (!enabled)
- return true;
- if(throwException) {
- throw new GLException("Required extensions not available to call this function");
- }
- return false;
- }
- int buffer = bufferStateTracker.getBoundBufferObject(state, this);
- if (enabled) {
- if (buffer == 0) {
- if(throwException) {
- throw new GLException(kind + " must be enabled to call this method");
- }
- return false;
- }
- } else {
- if (buffer != 0) {
- if(throwException) {
- throw new GLException(kind + " must be disabled to call this method");
- }
- return false;
- }
- }
- return true;
-}
-
-private boolean checkArrayVBODisabled(boolean throwException) {
- initBufferObjectExtensionChecks();
- return checkBufferObject(haveGL15,
- haveARBVertexBufferObject,
- false,
- false,
- GL.GL_ARRAY_BUFFER,
- "array vertex_buffer_object", throwException);
-}
-
-private boolean checkArrayVBOEnabled(boolean throwException) {
- initBufferObjectExtensionChecks();
- return checkBufferObject(haveGL15,
- haveARBVertexBufferObject,
- false,
- true,
- GL.GL_ARRAY_BUFFER,
- "array vertex_buffer_object", throwException);
-}
-
-private boolean checkElementVBODisabled(boolean throwException) {
- initBufferObjectExtensionChecks();
- return checkBufferObject(haveGL15,
- haveARBVertexBufferObject,
- false,
- false,
- GL.GL_ELEMENT_ARRAY_BUFFER,
- "element vertex_buffer_object", throwException);
-}
-
-private boolean checkElementVBOEnabled(boolean throwException) {
- initBufferObjectExtensionChecks();
- return checkBufferObject(haveGL15,
- haveARBVertexBufferObject,
- false,
- true,
- GL.GL_ELEMENT_ARRAY_BUFFER,
- "element vertex_buffer_object", throwException);
-}
-
-private boolean checkUnpackPBODisabled(boolean throwException) {
- initBufferObjectExtensionChecks();
- return checkBufferObject(haveARBPixelBufferObject,
- haveEXTPixelBufferObject,
- haveGL21,
- false,
- GL2.GL_PIXEL_UNPACK_BUFFER,
- "unpack pixel_buffer_object", throwException);
-}
-
-private boolean checkUnpackPBOEnabled(boolean throwException) {
- initBufferObjectExtensionChecks();
- return checkBufferObject(haveARBPixelBufferObject,
- haveEXTPixelBufferObject,
- haveGL21,
- true,
- GL2.GL_PIXEL_UNPACK_BUFFER,
- "unpack pixel_buffer_object", throwException);
-}
-
-private boolean checkPackPBODisabled(boolean throwException) {
- initBufferObjectExtensionChecks();
- return checkBufferObject(haveARBPixelBufferObject,
- haveEXTPixelBufferObject,
- haveGL21,
- false,
- GL2.GL_PIXEL_PACK_BUFFER,
- "pack pixel_buffer_object", throwException);
-}
-
-private boolean checkPackPBOEnabled(boolean throwException) {
- initBufferObjectExtensionChecks();
- return checkBufferObject(haveARBPixelBufferObject,
- haveEXTPixelBufferObject,
- haveGL21,
- true,
- GL2.GL_PIXEL_PACK_BUFFER,
- "pack pixel_buffer_object", throwException);
-}
-
-public boolean glIsPBOPackEnabled() {
- return checkPackPBOEnabled(false);
-}
-
-public boolean glIsPBOUnpackEnabled() {
- return checkUnpackPBOEnabled(false);
-}
-
-// Attempt to return the same ByteBuffer object from glMapBuffer if
-// the vertex buffer object's base address and size haven't changed
-private static class ARBVBOKey {
- private long addr;
- private int capacity;
-
- ARBVBOKey(long addr, int capacity) {
- this.addr = addr;
- this.capacity = capacity;
- }
-
- public int hashCode() {
- return (int) addr;
- }
-
- public boolean equals(Object o) {
- if ((o == null) || (!(o instanceof ARBVBOKey))) {
- return false;
- }
-
- ARBVBOKey other = (ARBVBOKey) o;
- return ((addr == other.addr) && (capacity == other.capacity));
- }
-}
-
-private Map/*
LPVOID glMapBuffer(GLenum target, GLenum access);
*/
-public java.nio.ByteBuffer glMapBuffer(int target, int access) {
- final long __addr_ = ((GL3ProcAddressTable)_context.getGLProcAddressTable())._addressof_glMapBuffer;
- if (__addr_ == 0) {
- throw new GLException("Method \"glMapBuffer\" not available");
- }
- int sz = bufferSizeTracker.getBufferSize(bufferStateTracker,
- target,
- this);
- long addr;
- addr = dispatch_glMapBuffer(target, access, __addr_);
- if (addr == 0 || sz == 0) {
- return null;
- }
- ARBVBOKey key = new ARBVBOKey(addr, sz);
- ByteBuffer _res = (ByteBuffer) arbVBOCache.get(key);
- if (_res == null) {
- _res = newDirectByteBuffer(addr, sz);
- InternalBufferUtil.nativeOrder(_res);
- arbVBOCache.put(key, _res);
- }
- _res.position(0);
- return _res;
-}
-
-/** Encapsulates function pointer for OpenGL function
: LPVOID glMapBuffer(GLenum target, GLenum access);
*/
-native private long dispatch_glMapBuffer(int target, int access, long glProcAddress);
-
-native private ByteBuffer newDirectByteBuffer(long addr, int capacity);
-
- /** Dummy implementation for the ES 2.0 function:
void {@native glShaderBinary}(GLint n, const GLuint * shaders, GLenum binaryformat, const void * binary, GLint length);
Always throws a GLException! */
- public void glShaderBinary(int n, java.nio.IntBuffer shaders, int binaryformat, java.nio.Buffer binary, int length) {
- throw new GLException("Method \"glShaderBinary\" not available");
- }
-
- /** Dummy implementation for the ES 2.0 function:
void {@native glShaderBinary}(GLint n, const GLuint * shaders, GLenum binaryformat, const void * binary, GLint length);
Always throws a GLException! */
- public void glShaderBinary(int n, int[] shaders, int shaders_offset, int binaryformat, java.nio.Buffer binary, int length) {
- throw new GLException("Method \"glShaderBinary\" not available");
- }
-
- public void glReleaseShaderCompiler() {
- // nothing to do
- }
-
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gl3bc.java b/make/config/jogl/gl-impl-CustomJavaCode-gl3bc.java
deleted file mode 100644
index 2f804a218..000000000
--- a/make/config/jogl/gl-impl-CustomJavaCode-gl3bc.java
+++ /dev/null
@@ -1,514 +0,0 @@
-// Tracks glBegin/glEnd calls to determine whether it is legal to
-// query Vertex Buffer Object state
-private boolean inBeginEndPair;
-
-/* FIXME: refactor dependence on Java 2D / JOGL bridge
-
-// Tracks creation and destruction of server-side OpenGL objects when
-// the Java2D/OpenGL pipeline is enabled and it is using frame buffer
-// objects (FBOs) to do its rendering
-private GLObjectTracker tracker;
-
-public void setObjectTracker(GLObjectTracker tracker) {
- this.tracker = tracker;
-}
-
-*/
-
-
-public GL3bcImpl(GLProfile glp, GLContextImpl context) {
- this._context = context;
- this.bufferSizeTracker = context.getBufferSizeTracker();
- this.bufferStateTracker = context.getBufferStateTracker();
- this.glStateTracker = context.getGLStateTracker();
- this.glProfile = glp;
-}
-
-public final boolean isGL() {
- return true;
-}
-
-public final boolean isGL4bc() {
- return false;
-}
-
-public final boolean isGL4() {
- return false;
-}
-
-public final boolean isGL3bc() {
- return true;
-}
-
-public final boolean isGL3() {
- return true;
-}
-
-public final boolean isGL2() {
- return true;
-}
-
-public final boolean isGLES1() {
- return false;
-}
-
-public final boolean isGLES2() {
- return false;
-}
-
-public final boolean isGLES() {
- return false;
-}
-
-public final boolean isGL2ES1() {
- return true;
-}
-
-public final boolean isGL2ES2() {
- return true;
-}
-
-public final boolean isGL2GL3() {
- return true;
-}
-
-public final boolean hasGLSL() {
- return true;
-}
-
-public final GL getGL() throws GLException {
- return this;
-}
-
-public final GL4bc getGL4bc() throws GLException {
- throw new GLException("Not a GL4bc implementation");
-}
-
-public final GL4 getGL4() throws GLException {
- throw new GLException("Not a GL4 implementation");
-}
-
-public final GL3bc getGL3bc() throws GLException {
- return this;
-}
-
-public final GL3 getGL3() throws GLException {
- return this;
-}
-
-public final GL2 getGL2() throws GLException {
- return this;
-}
-
-public final GLES1 getGLES1() throws GLException {
- throw new GLException("Not a GLES1 implementation");
-}
-
-public final GLES2 getGLES2() throws GLException {
- throw new GLException("Not a GLES2 implementation");
-}
-
-public final GL2ES1 getGL2ES1() throws GLException {
- return this;
-}
-
-public final GL2ES2 getGL2ES2() throws GLException {
- return this;
-}
-
-public final GL2GL3 getGL2GL3() throws GLException {
- return this;
-}
-
-public boolean isFunctionAvailable(String glFunctionName) {
- return _context.isFunctionAvailable(glFunctionName);
-}
-
-public boolean isExtensionAvailable(String glExtensionName) {
- return _context.isExtensionAvailable(glExtensionName);
-}
-
-public Object getExtension(String extensionName) {
- // At this point we don't expose any extensions using this mechanism
- return null;
-}
-
-/** Returns the context this GL object is associated with for better
- error checking by DebugGL. */
-public GLContext getContext() {
- return _context;
-}
-
-private GLContextImpl _context;
-
-/**
- * Provides platform-independent access to the wglAllocateMemoryNV /
- * glXAllocateMemoryNV extension.
- */
-public java.nio.ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3) {
- return _context.glAllocateMemoryNV(arg0, arg1, arg2, arg3);
-}
-
-public void setSwapInterval(int interval) {
- _context.setSwapInterval(interval);
-}
-
-public int getSwapInterval() {
- return _context.getSwapInterval();
-}
-
-public Object getPlatformGLExtensions() {
- return _context.getPlatformGLExtensions();
-}
-
-//
-// Helpers for ensuring the correct amount of texture data
-//
-
-/** Returns the number of bytes required to fill in the appropriate
- texture. This is computed as closely as possible based on the
- pixel pack or unpack parameters. The logic in this routine is
- based on code in the SGI OpenGL sample implementation. */
-
-private int imageSizeInBytes(int format, int type, int w, int h, int d,
- boolean pack) {
- int elements = 0;
- int esize = 0;
-
- if (w < 0) return 0;
- if (h < 0) return 0;
- if (d < 0) return 0;
- switch (format) {
- case GL_COLOR_INDEX:
- case GL_STENCIL_INDEX:
- elements = 1;
- break;
- case GL_RED:
- case GL_GREEN:
- case GL_BLUE:
- case GL_ALPHA:
- case GL_LUMINANCE:
- case GL_DEPTH_COMPONENT:
- elements = 1;
- break;
- case GL_LUMINANCE_ALPHA:
- elements = 2;
- break;
- case GL_RGB:
- case GL_BGR:
- elements = 3;
- break;
- case GL_RGBA:
- case GL_BGRA:
- case GL_ABGR_EXT:
- elements = 4;
- break;
- /* FIXME ??
- case GL_HILO_NV:
- elements = 2;
- break; */
- default:
- return 0;
- }
- switch (type) {
- case GL_BITMAP:
- if (format == GL_COLOR_INDEX) {
- return (d * (h * ((w+7)/8)));
- } else {
- return 0;
- }
- case GL_BYTE:
- case GL_UNSIGNED_BYTE:
- esize = 1;
- break;
- case GL_UNSIGNED_BYTE_3_3_2:
- case GL_UNSIGNED_BYTE_2_3_3_REV:
- esize = 1;
- elements = 1;
- break;
- case GL_SHORT:
- case GL_UNSIGNED_SHORT:
- esize = 2;
- break;
- case GL_UNSIGNED_SHORT_5_6_5:
- case GL_UNSIGNED_SHORT_5_6_5_REV:
- case GL_UNSIGNED_SHORT_4_4_4_4:
- case GL_UNSIGNED_SHORT_4_4_4_4_REV:
- case GL_UNSIGNED_SHORT_5_5_5_1:
- case GL_UNSIGNED_SHORT_1_5_5_5_REV:
- esize = 2;
- elements = 1;
- break;
- case GL_INT:
- case GL_UNSIGNED_INT:
- case GL_FLOAT:
- esize = 4;
- break;
- case GL_UNSIGNED_INT_8_8_8_8:
- case GL_UNSIGNED_INT_8_8_8_8_REV:
- case GL_UNSIGNED_INT_10_10_10_2:
- case GL_UNSIGNED_INT_2_10_10_10_REV:
- esize = 4;
- elements = 1;
- break;
- default:
- return 0;
- }
- return imageSizeInBytes(elements * esize, w, h, d, pack);
-}
-
-private GLBufferSizeTracker bufferSizeTracker;
-private GLBufferStateTracker bufferStateTracker;
-private GLStateTracker glStateTracker;
-
-private boolean bufferObjectExtensionsInitialized = false;
-private boolean haveARBPixelBufferObject;
-private boolean haveEXTPixelBufferObject;
-private boolean haveGL15;
-private boolean haveGL21;
-private boolean haveARBVertexBufferObject;
-
-private void initBufferObjectExtensionChecks() {
- if (bufferObjectExtensionsInitialized)
- return;
- bufferObjectExtensionsInitialized = true;
- haveARBPixelBufferObject = isExtensionAvailable("GL_ARB_pixel_buffer_object");
- haveEXTPixelBufferObject = isExtensionAvailable("GL_EXT_pixel_buffer_object");
- haveGL15 = isExtensionAvailable("GL_VERSION_1_5");
- haveGL21 = isExtensionAvailable("GL_VERSION_2_1");
- haveARBVertexBufferObject = isExtensionAvailable("GL_ARB_vertex_buffer_object");
-}
-
-private boolean checkBufferObject(boolean extension1,
- boolean extension2,
- boolean extension3,
- boolean enabled,
- int state,
- String kind, boolean throwException) {
- if (inBeginEndPair) {
- throw new GLException("May not call this between glBegin and glEnd");
- }
- boolean avail = (extension1 || extension2 || extension3);
- if (!avail) {
- if (!enabled)
- return true;
- if(throwException) {
- throw new GLException("Required extensions not available to call this function");
- }
- return false;
- }
- int buffer = bufferStateTracker.getBoundBufferObject(state, this);
- if (enabled) {
- if (buffer == 0) {
- if(throwException) {
- throw new GLException(kind + " must be enabled to call this method");
- }
- return false;
- }
- } else {
- if (buffer != 0) {
- if(throwException) {
- throw new GLException(kind + " must be disabled to call this method");
- }
- return false;
- }
- }
- return true;
-}
-
-private boolean checkArrayVBODisabled(boolean throwException) {
- initBufferObjectExtensionChecks();
- return checkBufferObject(haveGL15,
- haveARBVertexBufferObject,
- false,
- false,
- GL.GL_ARRAY_BUFFER,
- "array vertex_buffer_object", throwException);
-}
-
-private boolean checkArrayVBOEnabled(boolean throwException) {
- initBufferObjectExtensionChecks();
- return checkBufferObject(haveGL15,
- haveARBVertexBufferObject,
- false,
- true,
- GL.GL_ARRAY_BUFFER,
- "array vertex_buffer_object", throwException);
-}
-
-private boolean checkElementVBODisabled(boolean throwException) {
- initBufferObjectExtensionChecks();
- return checkBufferObject(haveGL15,
- haveARBVertexBufferObject,
- false,
- false,
- GL.GL_ELEMENT_ARRAY_BUFFER,
- "element vertex_buffer_object", throwException);
-}
-
-private boolean checkElementVBOEnabled(boolean throwException) {
- initBufferObjectExtensionChecks();
- return checkBufferObject(haveGL15,
- haveARBVertexBufferObject,
- false,
- true,
- GL.GL_ELEMENT_ARRAY_BUFFER,
- "element vertex_buffer_object", throwException);
-}
-
-private boolean checkUnpackPBODisabled(boolean throwException) {
- initBufferObjectExtensionChecks();
- return checkBufferObject(haveARBPixelBufferObject,
- haveEXTPixelBufferObject,
- haveGL21,
- false,
- GL2.GL_PIXEL_UNPACK_BUFFER,
- "unpack pixel_buffer_object", throwException);
-}
-
-private boolean checkUnpackPBOEnabled(boolean throwException) {
- initBufferObjectExtensionChecks();
- return checkBufferObject(haveARBPixelBufferObject,
- haveEXTPixelBufferObject,
- haveGL21,
- true,
- GL2.GL_PIXEL_UNPACK_BUFFER,
- "unpack pixel_buffer_object", throwException);
-}
-
-private boolean checkPackPBODisabled(boolean throwException) {
- initBufferObjectExtensionChecks();
- return checkBufferObject(haveARBPixelBufferObject,
- haveEXTPixelBufferObject,
- haveGL21,
- false,
- GL2.GL_PIXEL_PACK_BUFFER,
- "pack pixel_buffer_object", throwException);
-}
-
-private boolean checkPackPBOEnabled(boolean throwException) {
- initBufferObjectExtensionChecks();
- return checkBufferObject(haveARBPixelBufferObject,
- haveEXTPixelBufferObject,
- haveGL21,
- true,
- GL2.GL_PIXEL_PACK_BUFFER,
- "pack pixel_buffer_object", throwException);
-}
-
-public boolean glIsPBOPackEnabled() {
- return checkPackPBOEnabled(false);
-}
-
-public boolean glIsPBOUnpackEnabled() {
- return checkUnpackPBOEnabled(false);
-}
-
-// Attempt to return the same ByteBuffer object from glMapBuffer if
-// the vertex buffer object's base address and size haven't changed
-private static class ARBVBOKey {
- private long addr;
- private int capacity;
-
- ARBVBOKey(long addr, int capacity) {
- this.addr = addr;
- this.capacity = capacity;
- }
-
- public int hashCode() {
- return (int) addr;
- }
-
- public boolean equals(Object o) {
- if ((o == null) || (!(o instanceof ARBVBOKey))) {
- return false;
- }
-
- ARBVBOKey other = (ARBVBOKey) o;
- return ((addr == other.addr) && (capacity == other.capacity));
- }
-}
-
-private Map/*
LPVOID glMapBuffer(GLenum target, GLenum access);
*/
-public java.nio.ByteBuffer glMapBuffer(int target, int access) {
- final long __addr_ = ((GL3bcProcAddressTable)_context.getGLProcAddressTable())._addressof_glMapBuffer;
- if (__addr_ == 0) {
- throw new GLException("Method \"glMapBuffer\" not available");
- }
- int sz = bufferSizeTracker.getBufferSize(bufferStateTracker,
- target,
- this);
- long addr;
- addr = dispatch_glMapBuffer(target, access, __addr_);
- if (addr == 0 || sz == 0) {
- return null;
- }
- ARBVBOKey key = new ARBVBOKey(addr, sz);
- ByteBuffer _res = (ByteBuffer) arbVBOCache.get(key);
- if (_res == null) {
- _res = newDirectByteBuffer(addr, sz);
- InternalBufferUtil.nativeOrder(_res);
- arbVBOCache.put(key, _res);
- }
- _res.position(0);
- return _res;
-}
-
-/** Encapsulates function pointer for OpenGL function
: LPVOID glMapBuffer(GLenum target, GLenum access);
*/
-native private long dispatch_glMapBuffer(int target, int access, long glProcAddress);
-
-native private ByteBuffer newDirectByteBuffer(long addr, int capacity);
-
- /** Dummy implementation for the ES 2.0 function:
void {@native glShaderBinary}(GLint n, const GLuint * shaders, GLenum binaryformat, const void * binary, GLint length);
Always throws a GLException! */
- public void glShaderBinary(int n, java.nio.IntBuffer shaders, int binaryformat, java.nio.Buffer binary, int length) {
- throw new GLException("Method \"glShaderBinary\" not available");
- }
-
- /** Dummy implementation for the ES 2.0 function:
void {@native glShaderBinary}(GLint n, const GLuint * shaders, GLenum binaryformat, const void * binary, GLint length);
Always throws a GLException! */
- public void glShaderBinary(int n, int[] shaders, int shaders_offset, int binaryformat, java.nio.Buffer binary, int length) {
- throw new GLException("Method \"glShaderBinary\" not available");
- }
-
- public void glReleaseShaderCompiler() {
- // nothing to do
- }
-
- public void glVertexPointer(GLArrayData array) {
- if(array.getComponentNumber()==0) return;
- if(array.isVBO()) {
- glVertexPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset());
- } else {
- glVertexPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer());
- }
- }
- public void glColorPointer(GLArrayData array) {
- if(array.getComponentNumber()==0) return;
- if(array.isVBO()) {
- glColorPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset());
- } else {
- glColorPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer());
- }
-
- }
- public void glNormalPointer(GLArrayData array) {
- if(array.getComponentNumber()==0) return;
- if(array.getComponentNumber()!=3) {
- throw new GLException("Only 3 components per normal allowed");
- }
- if(array.isVBO()) {
- glNormalPointer(array.getComponentType(), array.getStride(), array.getOffset());
- } else {
- glNormalPointer(array.getComponentType(), array.getStride(), array.getBuffer());
- }
- }
- public void glTexCoordPointer(GLArrayData array) {
- if(array.getComponentNumber()==0) return;
- if(array.isVBO()) {
- glTexCoordPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset());
- } else {
- glTexCoordPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer());
- }
- }
-
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gl4.java b/make/config/jogl/gl-impl-CustomJavaCode-gl4.java
new file mode 100644
index 000000000..a2c70eeee
--- /dev/null
+++ b/make/config/jogl/gl-impl-CustomJavaCode-gl4.java
@@ -0,0 +1,339 @@
+// Tracks glBegin/glEnd calls to determine whether it is legal to
+// query Vertex Buffer Object state
+private boolean inBeginEndPair;
+
+/* FIXME: refactor dependence on Java 2D / JOGL bridge
+
+// Tracks creation and destruction of server-side OpenGL objects when
+// the Java2D/OpenGL pipeline is enabled and it is using frame buffer
+// objects (FBOs) to do its rendering
+private GLObjectTracker tracker;
+
+public void setObjectTracker(GLObjectTracker tracker) {
+ this.tracker = tracker;
+}
+
+*/
+
+public GL3Impl(GLProfile glp, GLContextImpl context) {
+ this._context = context;
+ this.bufferSizeTracker = context.getBufferSizeTracker();
+ this.bufferStateTracker = context.getBufferStateTracker();
+ this.glStateTracker = context.getGLStateTracker();
+ this.glProfile = glp;
+}
+
+/**
+ * Provides platform-independent access to the wglAllocateMemoryNV /
+ * glXAllocateMemoryNV extension.
+ */
+public java.nio.ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3) {
+ return _context.glAllocateMemoryNV(arg0, arg1, arg2, arg3);
+}
+
+//
+// Helpers for ensuring the correct amount of texture data
+//
+
+/** Returns the number of bytes required to fill in the appropriate
+ texture. This is computed as closely as possible based on the
+ pixel pack or unpack parameters. The logic in this routine is
+ based on code in the SGI OpenGL sample implementation. */
+
+private int imageSizeInBytes(int format, int type, int w, int h, int d,
+ boolean pack) {
+ int elements = 0;
+ int esize = 0;
+
+ if (w < 0) return 0;
+ if (h < 0) return 0;
+ if (d < 0) return 0;
+ switch (format) {
+ case GL_STENCIL_INDEX:
+ elements = 1;
+ break;
+ case GL_RED:
+ case GL_GREEN:
+ case GL_BLUE:
+ case GL_ALPHA:
+ case GL_LUMINANCE:
+ case GL_DEPTH_COMPONENT:
+ elements = 1;
+ break;
+ case GL_LUMINANCE_ALPHA:
+ elements = 2;
+ break;
+ case GL_RGB:
+ case GL_BGR:
+ elements = 3;
+ break;
+ case GL_RGBA:
+ case GL_BGRA:
+ elements = 4;
+ break;
+ /* FIXME ??
+ case GL_HILO_NV:
+ elements = 2;
+ break; */
+ default:
+ return 0;
+ }
+ switch (type) {
+ case GL_BYTE:
+ case GL_UNSIGNED_BYTE:
+ esize = 1;
+ break;
+ case GL_UNSIGNED_BYTE_3_3_2:
+ case GL_UNSIGNED_BYTE_2_3_3_REV:
+ esize = 1;
+ elements = 1;
+ break;
+ case GL_SHORT:
+ case GL_UNSIGNED_SHORT:
+ esize = 2;
+ break;
+ case GL_UNSIGNED_SHORT_5_6_5:
+ case GL_UNSIGNED_SHORT_5_6_5_REV:
+ case GL_UNSIGNED_SHORT_4_4_4_4:
+ case GL_UNSIGNED_SHORT_4_4_4_4_REV:
+ case GL_UNSIGNED_SHORT_5_5_5_1:
+ case GL_UNSIGNED_SHORT_1_5_5_5_REV:
+ esize = 2;
+ elements = 1;
+ break;
+ case GL_INT:
+ case GL_UNSIGNED_INT:
+ case GL_FLOAT:
+ esize = 4;
+ break;
+ case GL_UNSIGNED_INT_8_8_8_8:
+ case GL_UNSIGNED_INT_8_8_8_8_REV:
+ case GL_UNSIGNED_INT_10_10_10_2:
+ case GL_UNSIGNED_INT_2_10_10_10_REV:
+ esize = 4;
+ elements = 1;
+ break;
+ default:
+ return 0;
+ }
+ return imageSizeInBytes(elements * esize, w, h, d, pack);
+}
+
+private GLBufferSizeTracker bufferSizeTracker;
+private GLBufferStateTracker bufferStateTracker;
+private GLStateTracker glStateTracker;
+
+private boolean bufferObjectExtensionsInitialized = false;
+private boolean haveARBPixelBufferObject;
+private boolean haveEXTPixelBufferObject;
+private boolean haveGL15;
+private boolean haveGL21;
+private boolean haveARBVertexBufferObject;
+
+private void initBufferObjectExtensionChecks() {
+ if (bufferObjectExtensionsInitialized)
+ return;
+ bufferObjectExtensionsInitialized = true;
+ haveARBPixelBufferObject = isExtensionAvailable("GL_ARB_pixel_buffer_object");
+ haveEXTPixelBufferObject = isExtensionAvailable("GL_EXT_pixel_buffer_object");
+ haveGL15 = isExtensionAvailable("GL_VERSION_1_5");
+ haveGL21 = isExtensionAvailable("GL_VERSION_2_1");
+ haveARBVertexBufferObject = isExtensionAvailable("GL_ARB_vertex_buffer_object");
+}
+
+private boolean checkBufferObject(boolean extension1,
+ boolean extension2,
+ boolean extension3,
+ boolean enabled,
+ int state,
+ String kind, boolean throwException) {
+ if (inBeginEndPair) {
+ throw new GLException("May not call this between glBegin and glEnd");
+ }
+ boolean avail = (extension1 || extension2 || extension3);
+ if (!avail) {
+ if (!enabled)
+ return true;
+ if(throwException) {
+ throw new GLException("Required extensions not available to call this function");
+ }
+ return false;
+ }
+ int buffer = bufferStateTracker.getBoundBufferObject(state, this);
+ if (enabled) {
+ if (buffer == 0) {
+ if(throwException) {
+ throw new GLException(kind + " must be enabled to call this method");
+ }
+ return false;
+ }
+ } else {
+ if (buffer != 0) {
+ if(throwException) {
+ throw new GLException(kind + " must be disabled to call this method");
+ }
+ return false;
+ }
+ }
+ return true;
+}
+
+private boolean checkArrayVBODisabled(boolean throwException) {
+ initBufferObjectExtensionChecks();
+ return checkBufferObject(haveGL15,
+ haveARBVertexBufferObject,
+ false,
+ false,
+ GL.GL_ARRAY_BUFFER,
+ "array vertex_buffer_object", throwException);
+}
+
+private boolean checkArrayVBOEnabled(boolean throwException) {
+ initBufferObjectExtensionChecks();
+ return checkBufferObject(haveGL15,
+ haveARBVertexBufferObject,
+ false,
+ true,
+ GL.GL_ARRAY_BUFFER,
+ "array vertex_buffer_object", throwException);
+}
+
+private boolean checkElementVBODisabled(boolean throwException) {
+ initBufferObjectExtensionChecks();
+ return checkBufferObject(haveGL15,
+ haveARBVertexBufferObject,
+ false,
+ false,
+ GL.GL_ELEMENT_ARRAY_BUFFER,
+ "element vertex_buffer_object", throwException);
+}
+
+private boolean checkElementVBOEnabled(boolean throwException) {
+ initBufferObjectExtensionChecks();
+ return checkBufferObject(haveGL15,
+ haveARBVertexBufferObject,
+ false,
+ true,
+ GL.GL_ELEMENT_ARRAY_BUFFER,
+ "element vertex_buffer_object", throwException);
+}
+
+private boolean checkUnpackPBODisabled(boolean throwException) {
+ initBufferObjectExtensionChecks();
+ return checkBufferObject(haveARBPixelBufferObject,
+ haveEXTPixelBufferObject,
+ haveGL21,
+ false,
+ GL2.GL_PIXEL_UNPACK_BUFFER,
+ "unpack pixel_buffer_object", throwException);
+}
+
+private boolean checkUnpackPBOEnabled(boolean throwException) {
+ initBufferObjectExtensionChecks();
+ return checkBufferObject(haveARBPixelBufferObject,
+ haveEXTPixelBufferObject,
+ haveGL21,
+ true,
+ GL2.GL_PIXEL_UNPACK_BUFFER,
+ "unpack pixel_buffer_object", throwException);
+}
+
+private boolean checkPackPBODisabled(boolean throwException) {
+ initBufferObjectExtensionChecks();
+ return checkBufferObject(haveARBPixelBufferObject,
+ haveEXTPixelBufferObject,
+ haveGL21,
+ false,
+ GL2.GL_PIXEL_PACK_BUFFER,
+ "pack pixel_buffer_object", throwException);
+}
+
+private boolean checkPackPBOEnabled(boolean throwException) {
+ initBufferObjectExtensionChecks();
+ return checkBufferObject(haveARBPixelBufferObject,
+ haveEXTPixelBufferObject,
+ haveGL21,
+ true,
+ GL2.GL_PIXEL_PACK_BUFFER,
+ "pack pixel_buffer_object", throwException);
+}
+
+public boolean glIsPBOPackEnabled() {
+ return checkPackPBOEnabled(false);
+}
+
+public boolean glIsPBOUnpackEnabled() {
+ return checkUnpackPBOEnabled(false);
+}
+
+// Attempt to return the same ByteBuffer object from glMapBuffer if
+// the vertex buffer object's base address and size haven't changed
+private static class ARBVBOKey {
+ private long addr;
+ private int capacity;
+
+ ARBVBOKey(long addr, int capacity) {
+ this.addr = addr;
+ this.capacity = capacity;
+ }
+
+ public int hashCode() {
+ return (int) addr;
+ }
+
+ public boolean equals(Object o) {
+ if ((o == null) || (!(o instanceof ARBVBOKey))) {
+ return false;
+ }
+
+ ARBVBOKey other = (ARBVBOKey) o;
+ return ((addr == other.addr) && (capacity == other.capacity));
+ }
+}
+
+private Map/*
LPVOID glMapBuffer(GLenum target, GLenum access);
*/
+public java.nio.ByteBuffer glMapBuffer(int target, int access) {
+ final long __addr_ = ((GL3ProcAddressTable)_context.getGLProcAddressTable())._addressof_glMapBuffer;
+ if (__addr_ == 0) {
+ throw new GLException("Method \"glMapBuffer\" not available");
+ }
+ int sz = bufferSizeTracker.getBufferSize(bufferStateTracker,
+ target,
+ this);
+ long addr;
+ addr = dispatch_glMapBuffer(target, access, __addr_);
+ if (addr == 0 || sz == 0) {
+ return null;
+ }
+ ARBVBOKey key = new ARBVBOKey(addr, sz);
+ ByteBuffer _res = (ByteBuffer) arbVBOCache.get(key);
+ if (_res == null) {
+ _res = newDirectByteBuffer(addr, sz);
+ InternalBufferUtil.nativeOrder(_res);
+ arbVBOCache.put(key, _res);
+ }
+ _res.position(0);
+ return _res;
+}
+
+/** Encapsulates function pointer for OpenGL function
: LPVOID glMapBuffer(GLenum target, GLenum access);
*/
+native private long dispatch_glMapBuffer(int target, int access, long glProcAddress);
+
+native private ByteBuffer newDirectByteBuffer(long addr, int capacity);
+
+ /** Dummy implementation for the ES 2.0 function:
void {@native glShaderBinary}(GLint n, const GLuint * shaders, GLenum binaryformat, const void * binary, GLint length);
Always throws a GLException! */
+ public void glShaderBinary(int n, java.nio.IntBuffer shaders, int binaryformat, java.nio.Buffer binary, int length) {
+ throw new GLException("Method \"glShaderBinary\" not available");
+ }
+
+ /** Dummy implementation for the ES 2.0 function:
void {@native glShaderBinary}(GLint n, const GLuint * shaders, GLenum binaryformat, const void * binary, GLint length);
Always throws a GLException! */
+ public void glShaderBinary(int n, int[] shaders, int shaders_offset, int binaryformat, java.nio.Buffer binary, int length) {
+ throw new GLException("Method \"glShaderBinary\" not available");
+ }
+
+ public void glReleaseShaderCompiler() {
+ // nothing to do
+ }
+
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java b/make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java
new file mode 100644
index 000000000..bceb12fe5
--- /dev/null
+++ b/make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java
@@ -0,0 +1,385 @@
+// Tracks glBegin/glEnd calls to determine whether it is legal to
+// query Vertex Buffer Object state
+private boolean inBeginEndPair;
+
+/* FIXME: refactor dependence on Java 2D / JOGL bridge
+
+// Tracks creation and destruction of server-side OpenGL objects when
+// the Java2D/OpenGL pipeline is enabled and it is using frame buffer
+// objects (FBOs) to do its rendering
+private GLObjectTracker tracker;
+
+public void setObjectTracker(GLObjectTracker tracker) {
+ this.tracker = tracker;
+}
+
+*/
+
+
+public GL4bcImpl(GLProfile glp, GLContextImpl context) {
+ this._context = context;
+ this.bufferSizeTracker = context.getBufferSizeTracker();
+ this.bufferStateTracker = context.getBufferStateTracker();
+ this.glStateTracker = context.getGLStateTracker();
+ this.glProfile = glp;
+}
+
+/**
+ * Provides platform-independent access to the wglAllocateMemoryNV /
+ * glXAllocateMemoryNV extension.
+ */
+public java.nio.ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3) {
+ return _context.glAllocateMemoryNV(arg0, arg1, arg2, arg3);
+}
+
+//
+// Helpers for ensuring the correct amount of texture data
+//
+
+/** Returns the number of bytes required to fill in the appropriate
+ texture. This is computed as closely as possible based on the
+ pixel pack or unpack parameters. The logic in this routine is
+ based on code in the SGI OpenGL sample implementation. */
+
+private int imageSizeInBytes(int format, int type, int w, int h, int d,
+ boolean pack) {
+ int elements = 0;
+ int esize = 0;
+
+ if (w < 0) return 0;
+ if (h < 0) return 0;
+ if (d < 0) return 0;
+ switch (format) {
+ case GL_COLOR_INDEX:
+ case GL_STENCIL_INDEX:
+ elements = 1;
+ break;
+ case GL_RED:
+ case GL_GREEN:
+ case GL_BLUE:
+ case GL_ALPHA:
+ case GL_LUMINANCE:
+ case GL_DEPTH_COMPONENT:
+ elements = 1;
+ break;
+ case GL_LUMINANCE_ALPHA:
+ elements = 2;
+ break;
+ case GL_RGB:
+ case GL_BGR:
+ elements = 3;
+ break;
+ case GL_RGBA:
+ case GL_BGRA:
+ case GL_ABGR_EXT:
+ elements = 4;
+ break;
+ /* FIXME ??
+ case GL_HILO_NV:
+ elements = 2;
+ break; */
+ default:
+ return 0;
+ }
+ switch (type) {
+ case GL_BITMAP:
+ if (format == GL_COLOR_INDEX) {
+ return (d * (h * ((w+7)/8)));
+ } else {
+ return 0;
+ }
+ case GL_BYTE:
+ case GL_UNSIGNED_BYTE:
+ esize = 1;
+ break;
+ case GL_UNSIGNED_BYTE_3_3_2:
+ case GL_UNSIGNED_BYTE_2_3_3_REV:
+ esize = 1;
+ elements = 1;
+ break;
+ case GL_SHORT:
+ case GL_UNSIGNED_SHORT:
+ esize = 2;
+ break;
+ case GL_UNSIGNED_SHORT_5_6_5:
+ case GL_UNSIGNED_SHORT_5_6_5_REV:
+ case GL_UNSIGNED_SHORT_4_4_4_4:
+ case GL_UNSIGNED_SHORT_4_4_4_4_REV:
+ case GL_UNSIGNED_SHORT_5_5_5_1:
+ case GL_UNSIGNED_SHORT_1_5_5_5_REV:
+ esize = 2;
+ elements = 1;
+ break;
+ case GL_INT:
+ case GL_UNSIGNED_INT:
+ case GL_FLOAT:
+ esize = 4;
+ break;
+ case GL_UNSIGNED_INT_8_8_8_8:
+ case GL_UNSIGNED_INT_8_8_8_8_REV:
+ case GL_UNSIGNED_INT_10_10_10_2:
+ case GL_UNSIGNED_INT_2_10_10_10_REV:
+ esize = 4;
+ elements = 1;
+ break;
+ default:
+ return 0;
+ }
+ return imageSizeInBytes(elements * esize, w, h, d, pack);
+}
+
+private GLBufferSizeTracker bufferSizeTracker;
+private GLBufferStateTracker bufferStateTracker;
+private GLStateTracker glStateTracker;
+
+private boolean bufferObjectExtensionsInitialized = false;
+private boolean haveARBPixelBufferObject;
+private boolean haveEXTPixelBufferObject;
+private boolean haveGL15;
+private boolean haveGL21;
+private boolean haveARBVertexBufferObject;
+
+private void initBufferObjectExtensionChecks() {
+ if (bufferObjectExtensionsInitialized)
+ return;
+ bufferObjectExtensionsInitialized = true;
+ haveARBPixelBufferObject = isExtensionAvailable("GL_ARB_pixel_buffer_object");
+ haveEXTPixelBufferObject = isExtensionAvailable("GL_EXT_pixel_buffer_object");
+ haveGL15 = isExtensionAvailable("GL_VERSION_1_5");
+ haveGL21 = isExtensionAvailable("GL_VERSION_2_1");
+ haveARBVertexBufferObject = isExtensionAvailable("GL_ARB_vertex_buffer_object");
+}
+
+private boolean checkBufferObject(boolean extension1,
+ boolean extension2,
+ boolean extension3,
+ boolean enabled,
+ int state,
+ String kind, boolean throwException) {
+ if (inBeginEndPair) {
+ throw new GLException("May not call this between glBegin and glEnd");
+ }
+ boolean avail = (extension1 || extension2 || extension3);
+ if (!avail) {
+ if (!enabled)
+ return true;
+ if(throwException) {
+ throw new GLException("Required extensions not available to call this function");
+ }
+ return false;
+ }
+ int buffer = bufferStateTracker.getBoundBufferObject(state, this);
+ if (enabled) {
+ if (buffer == 0) {
+ if(throwException) {
+ throw new GLException(kind + " must be enabled to call this method");
+ }
+ return false;
+ }
+ } else {
+ if (buffer != 0) {
+ if(throwException) {
+ throw new GLException(kind + " must be disabled to call this method");
+ }
+ return false;
+ }
+ }
+ return true;
+}
+
+private boolean checkArrayVBODisabled(boolean throwException) {
+ initBufferObjectExtensionChecks();
+ return checkBufferObject(haveGL15,
+ haveARBVertexBufferObject,
+ false,
+ false,
+ GL.GL_ARRAY_BUFFER,
+ "array vertex_buffer_object", throwException);
+}
+
+private boolean checkArrayVBOEnabled(boolean throwException) {
+ initBufferObjectExtensionChecks();
+ return checkBufferObject(haveGL15,
+ haveARBVertexBufferObject,
+ false,
+ true,
+ GL.GL_ARRAY_BUFFER,
+ "array vertex_buffer_object", throwException);
+}
+
+private boolean checkElementVBODisabled(boolean throwException) {
+ initBufferObjectExtensionChecks();
+ return checkBufferObject(haveGL15,
+ haveARBVertexBufferObject,
+ false,
+ false,
+ GL.GL_ELEMENT_ARRAY_BUFFER,
+ "element vertex_buffer_object", throwException);
+}
+
+private boolean checkElementVBOEnabled(boolean throwException) {
+ initBufferObjectExtensionChecks();
+ return checkBufferObject(haveGL15,
+ haveARBVertexBufferObject,
+ false,
+ true,
+ GL.GL_ELEMENT_ARRAY_BUFFER,
+ "element vertex_buffer_object", throwException);
+}
+
+private boolean checkUnpackPBODisabled(boolean throwException) {
+ initBufferObjectExtensionChecks();
+ return checkBufferObject(haveARBPixelBufferObject,
+ haveEXTPixelBufferObject,
+ haveGL21,
+ false,
+ GL2.GL_PIXEL_UNPACK_BUFFER,
+ "unpack pixel_buffer_object", throwException);
+}
+
+private boolean checkUnpackPBOEnabled(boolean throwException) {
+ initBufferObjectExtensionChecks();
+ return checkBufferObject(haveARBPixelBufferObject,
+ haveEXTPixelBufferObject,
+ haveGL21,
+ true,
+ GL2.GL_PIXEL_UNPACK_BUFFER,
+ "unpack pixel_buffer_object", throwException);
+}
+
+private boolean checkPackPBODisabled(boolean throwException) {
+ initBufferObjectExtensionChecks();
+ return checkBufferObject(haveARBPixelBufferObject,
+ haveEXTPixelBufferObject,
+ haveGL21,
+ false,
+ GL2.GL_PIXEL_PACK_BUFFER,
+ "pack pixel_buffer_object", throwException);
+}
+
+private boolean checkPackPBOEnabled(boolean throwException) {
+ initBufferObjectExtensionChecks();
+ return checkBufferObject(haveARBPixelBufferObject,
+ haveEXTPixelBufferObject,
+ haveGL21,
+ true,
+ GL2.GL_PIXEL_PACK_BUFFER,
+ "pack pixel_buffer_object", throwException);
+}
+
+public boolean glIsPBOPackEnabled() {
+ return checkPackPBOEnabled(false);
+}
+
+public boolean glIsPBOUnpackEnabled() {
+ return checkUnpackPBOEnabled(false);
+}
+
+// Attempt to return the same ByteBuffer object from glMapBuffer if
+// the vertex buffer object's base address and size haven't changed
+private static class ARBVBOKey {
+ private long addr;
+ private int capacity;
+
+ ARBVBOKey(long addr, int capacity) {
+ this.addr = addr;
+ this.capacity = capacity;
+ }
+
+ public int hashCode() {
+ return (int) addr;
+ }
+
+ public boolean equals(Object o) {
+ if ((o == null) || (!(o instanceof ARBVBOKey))) {
+ return false;
+ }
+
+ ARBVBOKey other = (ARBVBOKey) o;
+ return ((addr == other.addr) && (capacity == other.capacity));
+ }
+}
+
+private Map/*
LPVOID glMapBuffer(GLenum target, GLenum access);
*/
+public java.nio.ByteBuffer glMapBuffer(int target, int access) {
+ final long __addr_ = ((GL4bcProcAddressTable)_context.getGLProcAddressTable())._addressof_glMapBuffer;
+ if (__addr_ == 0) {
+ throw new GLException("Method \"glMapBuffer\" not available");
+ }
+ int sz = bufferSizeTracker.getBufferSize(bufferStateTracker,
+ target,
+ this);
+ long addr;
+ addr = dispatch_glMapBuffer(target, access, __addr_);
+ if (addr == 0 || sz == 0) {
+ return null;
+ }
+ ARBVBOKey key = new ARBVBOKey(addr, sz);
+ ByteBuffer _res = (ByteBuffer) arbVBOCache.get(key);
+ if (_res == null) {
+ _res = newDirectByteBuffer(addr, sz);
+ InternalBufferUtil.nativeOrder(_res);
+ arbVBOCache.put(key, _res);
+ }
+ _res.position(0);
+ return _res;
+}
+
+/** Encapsulates function pointer for OpenGL function
: LPVOID glMapBuffer(GLenum target, GLenum access);
*/
+native private long dispatch_glMapBuffer(int target, int access, long glProcAddress);
+
+native private ByteBuffer newDirectByteBuffer(long addr, int capacity);
+
+ /** Dummy implementation for the ES 2.0 function:
void {@native glShaderBinary}(GLint n, const GLuint * shaders, GLenum binaryformat, const void * binary, GLint length);
Always throws a GLException! */
+ public void glShaderBinary(int n, java.nio.IntBuffer shaders, int binaryformat, java.nio.Buffer binary, int length) {
+ throw new GLException("Method \"glShaderBinary\" not available");
+ }
+
+ /** Dummy implementation for the ES 2.0 function:
void {@native glShaderBinary}(GLint n, const GLuint * shaders, GLenum binaryformat, const void * binary, GLint length);
Always throws a GLException! */
+ public void glShaderBinary(int n, int[] shaders, int shaders_offset, int binaryformat, java.nio.Buffer binary, int length) {
+ throw new GLException("Method \"glShaderBinary\" not available");
+ }
+
+ public void glReleaseShaderCompiler() {
+ // nothing to do
+ }
+
+ public void glVertexPointer(GLArrayData array) {
+ if(array.getComponentNumber()==0) return;
+ if(array.isVBO()) {
+ glVertexPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset());
+ } else {
+ glVertexPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer());
+ }
+ }
+ public void glColorPointer(GLArrayData array) {
+ if(array.getComponentNumber()==0) return;
+ if(array.isVBO()) {
+ glColorPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset());
+ } else {
+ glColorPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer());
+ }
+
+ }
+ public void glNormalPointer(GLArrayData array) {
+ if(array.getComponentNumber()==0) return;
+ if(array.getComponentNumber()!=3) {
+ throw new GLException("Only 3 components per normal allowed");
+ }
+ if(array.isVBO()) {
+ glNormalPointer(array.getComponentType(), array.getStride(), array.getOffset());
+ } else {
+ glNormalPointer(array.getComponentType(), array.getStride(), array.getBuffer());
+ }
+ }
+ public void glTexCoordPointer(GLArrayData array) {
+ if(array.getComponentNumber()==0) return;
+ if(array.isVBO()) {
+ glTexCoordPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset());
+ } else {
+ glTexCoordPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer());
+ }
+ }
+
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gles1.java b/make/config/jogl/gl-impl-CustomJavaCode-gles1.java
index 6fb8a32ef..b4efac8a1 100755
--- a/make/config/jogl/gl-impl-CustomJavaCode-gles1.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-gles1.java
@@ -6,10 +6,6 @@ public GLES1Impl(GLProfile glp, GLContextImpl context) {
this.glProfile = glp;
}
-public final boolean isGL() {
- return true;
-}
-
public final boolean isGL4bc() {
return false;
}
@@ -58,10 +54,6 @@ public final boolean hasGLSL() {
return false;
}
-public final GL getGL() throws GLException {
- return this;
-}
-
public final GL4bc getGL4bc() throws GLException {
throw new GLException("Not a GL4bc implementation");
}
@@ -102,39 +94,6 @@ public final GL2GL3 getGL2GL3() throws GLException {
throw new GLException("Not a GL2GL3 implementation");
}
-public boolean isFunctionAvailable(String glFunctionName) {
- return _context.isFunctionAvailable(glFunctionName);
-}
-
-public boolean isExtensionAvailable(String glExtensionName) {
- return _context.isExtensionAvailable(glExtensionName);
-}
-
-public Object getExtension(String extensionName) {
- // At this point we don't expose any extensions using this mechanism
- return null;
-}
-
-/** Returns the context this GL object is associated with for better
- error checking by DebugGL. */
-public GLContext getContext() {
- return _context;
-}
-
-private GLContextImpl _context;
-
-public void setSwapInterval(int interval) {
- _context.setSwapInterval(interval);
-}
-
-public int getSwapInterval() {
- return _context.getSwapInterval();
-}
-
-public Object getPlatformGLExtensions() {
- return _context.getPlatformGLExtensions();
-}
-
//
// Helpers for ensuring the correct amount of texture data
//
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gles2.java b/make/config/jogl/gl-impl-CustomJavaCode-gles2.java
index 8204bd1ae..bb8ddb7ef 100755
--- a/make/config/jogl/gl-impl-CustomJavaCode-gles2.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-gles2.java
@@ -10,10 +10,6 @@ public GLES2Impl(GLProfile glp, GLContextImpl context) {
this.glProfile = glp;
}
-public final boolean isGL() {
- return true;
-}
-
public final boolean isGL4bc() {
return false;
}
@@ -62,10 +58,6 @@ public final boolean hasGLSL() {
return true;
}
-public final GL getGL() throws GLException {
- return this;
-}
-
public final GL4bc getGL4bc() throws GLException {
throw new GLException("Not a GL4bc implementation");
}
@@ -106,39 +98,6 @@ public final GL2GL3 getGL2GL3() throws GLException {
throw new GLException("Not a GL2GL3 implementation");
}
-public boolean isFunctionAvailable(String glFunctionName) {
- return _context.isFunctionAvailable(glFunctionName);
-}
-
-public boolean isExtensionAvailable(String glExtensionName) {
- return _context.isExtensionAvailable(glExtensionName);
-}
-
-public Object getExtension(String extensionName) {
- // At this point we don't expose any extensions using this mechanism
- return null;
-}
-
-/** Returns the context this GL object is associated with for better
- error checking by DebugGL. */
-public GLContext getContext() {
- return _context;
-}
-
-private GLContextImpl _context;
-
-public void setSwapInterval(int interval) {
- _context.setSwapInterval(interval);
-}
-
-public int getSwapInterval() {
- return _context.getSwapInterval();
-}
-
-public Object getPlatformGLExtensions() {
- return _context.getPlatformGLExtensions();
-}
-
//
// Helpers for ensuring the correct amount of texture data
//
diff --git a/make/config/jogl/gl3-common.cfg b/make/config/jogl/gl3-common.cfg
index fac8323bb..c2cc2968e 100644
--- a/make/config/jogl/gl3-common.cfg
+++ b/make/config/jogl/gl3-common.cfg
@@ -16,6 +16,9 @@ RenameExtensionIntoCore GL_ARB_geometry_shader4
RenameExtensionIntoCore GL_ARB_sync
# <<< OpenGL 3.2
+# >>> OpenGL 3.3
+# <<< OpenGL 3.3
+
# Ignore GL functions that deal with explicit pointer values in such a
# way that we cannot implement the functionality in Java
Ignore glMultiDrawElementsBaseVertex
diff --git a/make/config/jogl/gl3-desktop-tracker.cfg b/make/config/jogl/gl3-desktop-tracker.cfg
deleted file mode 100644
index 4b9a7edb7..000000000
--- a/make/config/jogl/gl3-desktop-tracker.cfg
+++ /dev/null
@@ -1,38 +0,0 @@
-
-# Track server-side object creation and deletion when necessary
-# Note that this is only necessary when the Java 2D / JOGL bridge is active,
-# so will never be needed for the embedded OpenGL variants
-JavaEpilogue glGenBuffers if (tracker != null) tracker.addBuffers({0}, {1});
-JavaEpilogue glGenFencesAPPLE if (tracker != null) tracker.addFencesAPPLE({0}, {1});
-JavaEpilogue glGenFencesNV if (tracker != null) tracker.addFencesNV({0}, {1});
-JavaEpilogue glGenFragmentShadersATI if (tracker != null) tracker.addFragmentShadersATI(_res, {0});
-JavaEpilogue glGenFramebuffersEXT if (tracker != null) tracker.addFramebuffersEXT({0}, {1});
-JavaEpilogue glGenLists if (tracker != null) tracker.addLists(_res, {0});
-JavaEpilogue glGenOcclusionQueriesNV if (tracker != null) tracker.addOcclusionQueriesNV({0}, {1});
-JavaEpilogue glCreateProgram if (tracker != null) tracker.addProgramObject(_res);
-JavaEpilogue glGenPrograms if (tracker != null) tracker.addPrograms({0}, {1});
-JavaEpilogue glGenQueries if (tracker != null) tracker.addQueries({0}, {1});
-JavaEpilogue glGenRenderbuffersEXT if (tracker != null) tracker.addRenderbuffersEXT({0}, {1});
-JavaEpilogue glCreateShader if (tracker != null) tracker.addShaderObject(_res);
-JavaEpilogue glGenTextures if (tracker != null) tracker.addTextures({0}, {1});
-JavaEpilogue glGenVertexArraysAPPLE if (tracker != null) tracker.addVertexArraysAPPLE({0}, {1});
-JavaEpilogue glGenVertexShadersEXT if (tracker != null) tracker.addVertexShadersEXT(_res, {0});
-
-JavaEpilogue glDeleteBuffers if (tracker != null) tracker.removeBuffers({0}, {1});
-JavaEpilogue glDeleteFencesAPPLE if (tracker != null) tracker.removeFencesAPPLE({0}, {1});
-JavaEpilogue glDeleteFencesNV if (tracker != null) tracker.removeFencesNV({0}, {1});
-JavaEpilogue glDeleteFragmentShaderATI if (tracker != null) tracker.removeFragmentShaderATI({0});
-JavaEpilogue glDeleteFramebuffersEXT if (tracker != null) tracker.removeFramebuffersEXT({0}, {1});
-JavaEpilogue glDeleteLists if (tracker != null) tracker.removeLists({0}, {1});
-JavaEpilogue glDeleteOcclusionQueriesNV if (tracker != null) tracker.removeOcclusionQueriesNV({0}, {1});
-JavaEpilogue glDeleteProgram if (tracker != null) tracker.removeProgramObject({0});
-JavaEpilogue glDeleteObject if (tracker != null) tracker.removeProgramOrShaderObject({0});
-JavaEpilogue glDeletePrograms if (tracker != null) tracker.removePrograms({0}, {1});
-JavaEpilogue glDeleteProgramsNV if (tracker != null) tracker.removeProgramsNV({0}, {1});
-JavaEpilogue glDeleteQueries if (tracker != null) tracker.removeQueries({0}, {1});
-JavaEpilogue glDeleteRenderbuffersEXT if (tracker != null) tracker.removeRenderbuffersEXT({0}, {1});
-JavaEpilogue glDeleteShader if (tracker != null) tracker.removeShaderObject({0});
-JavaEpilogue glDeleteTextures if (tracker != null) tracker.removeTextures({0}, {1});
-JavaEpilogue glDeleteVertexArraysAPPLE if (tracker != null) tracker.removeVertexArraysAPPLE({0}, {1});
-JavaEpilogue glDeleteVertexShaderEXT if (tracker != null) tracker.removeVertexShaderEXT({0});
-
diff --git a/make/config/jogl/gl4-common.cfg b/make/config/jogl/gl4-common.cfg
new file mode 100644
index 000000000..2c119da30
--- /dev/null
+++ b/make/config/jogl/gl4-common.cfg
@@ -0,0 +1,5 @@
+
+# >>> OpenGL 4.0
+# <<< OpenGL 4.0
+
+
diff --git a/make/config/jogl/gl4-desktop-tracker.cfg b/make/config/jogl/gl4-desktop-tracker.cfg
new file mode 100644
index 000000000..4b9a7edb7
--- /dev/null
+++ b/make/config/jogl/gl4-desktop-tracker.cfg
@@ -0,0 +1,38 @@
+
+# Track server-side object creation and deletion when necessary
+# Note that this is only necessary when the Java 2D / JOGL bridge is active,
+# so will never be needed for the embedded OpenGL variants
+JavaEpilogue glGenBuffers if (tracker != null) tracker.addBuffers({0}, {1});
+JavaEpilogue glGenFencesAPPLE if (tracker != null) tracker.addFencesAPPLE({0}, {1});
+JavaEpilogue glGenFencesNV if (tracker != null) tracker.addFencesNV({0}, {1});
+JavaEpilogue glGenFragmentShadersATI if (tracker != null) tracker.addFragmentShadersATI(_res, {0});
+JavaEpilogue glGenFramebuffersEXT if (tracker != null) tracker.addFramebuffersEXT({0}, {1});
+JavaEpilogue glGenLists if (tracker != null) tracker.addLists(_res, {0});
+JavaEpilogue glGenOcclusionQueriesNV if (tracker != null) tracker.addOcclusionQueriesNV({0}, {1});
+JavaEpilogue glCreateProgram if (tracker != null) tracker.addProgramObject(_res);
+JavaEpilogue glGenPrograms if (tracker != null) tracker.addPrograms({0}, {1});
+JavaEpilogue glGenQueries if (tracker != null) tracker.addQueries({0}, {1});
+JavaEpilogue glGenRenderbuffersEXT if (tracker != null) tracker.addRenderbuffersEXT({0}, {1});
+JavaEpilogue glCreateShader if (tracker != null) tracker.addShaderObject(_res);
+JavaEpilogue glGenTextures if (tracker != null) tracker.addTextures({0}, {1});
+JavaEpilogue glGenVertexArraysAPPLE if (tracker != null) tracker.addVertexArraysAPPLE({0}, {1});
+JavaEpilogue glGenVertexShadersEXT if (tracker != null) tracker.addVertexShadersEXT(_res, {0});
+
+JavaEpilogue glDeleteBuffers if (tracker != null) tracker.removeBuffers({0}, {1});
+JavaEpilogue glDeleteFencesAPPLE if (tracker != null) tracker.removeFencesAPPLE({0}, {1});
+JavaEpilogue glDeleteFencesNV if (tracker != null) tracker.removeFencesNV({0}, {1});
+JavaEpilogue glDeleteFragmentShaderATI if (tracker != null) tracker.removeFragmentShaderATI({0});
+JavaEpilogue glDeleteFramebuffersEXT if (tracker != null) tracker.removeFramebuffersEXT({0}, {1});
+JavaEpilogue glDeleteLists if (tracker != null) tracker.removeLists({0}, {1});
+JavaEpilogue glDeleteOcclusionQueriesNV if (tracker != null) tracker.removeOcclusionQueriesNV({0}, {1});
+JavaEpilogue glDeleteProgram if (tracker != null) tracker.removeProgramObject({0});
+JavaEpilogue glDeleteObject if (tracker != null) tracker.removeProgramOrShaderObject({0});
+JavaEpilogue glDeletePrograms if (tracker != null) tracker.removePrograms({0}, {1});
+JavaEpilogue glDeleteProgramsNV if (tracker != null) tracker.removeProgramsNV({0}, {1});
+JavaEpilogue glDeleteQueries if (tracker != null) tracker.removeQueries({0}, {1});
+JavaEpilogue glDeleteRenderbuffersEXT if (tracker != null) tracker.removeRenderbuffersEXT({0}, {1});
+JavaEpilogue glDeleteShader if (tracker != null) tracker.removeShaderObject({0});
+JavaEpilogue glDeleteTextures if (tracker != null) tracker.removeTextures({0}, {1});
+JavaEpilogue glDeleteVertexArraysAPPLE if (tracker != null) tracker.removeVertexArraysAPPLE({0}, {1});
+JavaEpilogue glDeleteVertexShaderEXT if (tracker != null) tracker.removeVertexShaderEXT({0});
+
diff --git a/make/config/jogl/glu-CustomJavaCode-base.java b/make/config/jogl/glu-CustomJavaCode-base.java
index aeb4f2ef9..480f5d117 100755
--- a/make/config/jogl/glu-CustomJavaCode-base.java
+++ b/make/config/jogl/glu-CustomJavaCode-base.java
@@ -169,7 +169,7 @@ protected static boolean checkedGLUtessellatorImpl = false;
protected static final void validateGLUtessellatorImpl() {
if(!checkedGLUtessellatorImpl) {
- availableGLUtessellatorImpl = NWReflection.isClassAvailable("com.jogamp.opengl.impl.glu.tessellator.GLUtessellatorImpl");
+ availableGLUtessellatorImpl = ReflectionUtil.isClassAvailable("com.jogamp.opengl.impl.glu.tessellator.GLUtessellatorImpl");
checkedGLUtessellatorImpl = true;
}
if(!availableGLUtessellatorImpl) {
@@ -1220,7 +1220,7 @@ protected static final void validateGLUquadricImpl() {
if(!checkedGLUquadricImpl) {
synchronized (syncObject) {
if(!checkedGLUquadricImpl) {
- availableGLUquadricImpl = NWReflection.isClassAvailable("com.jogamp.opengl.impl.glu.GLUquadricImpl");
+ availableGLUquadricImpl = ReflectionUtil.isClassAvailable("com.jogamp.opengl.impl.glu.GLUquadricImpl");
checkedGLUquadricImpl = true;
}
}
diff --git a/make/config/jogl/glu-CustomJavaCode-gl2es1.java b/make/config/jogl/glu-CustomJavaCode-gl2es1.java
index b5cb3b2f8..f3b4322d9 100755
--- a/make/config/jogl/glu-CustomJavaCode-gl2es1.java
+++ b/make/config/jogl/glu-CustomJavaCode-gl2es1.java
@@ -86,7 +86,7 @@ protected static boolean checkedMipmap = false;
protected static final void validateMipmap() {
if(!checkedMipmap) {
- availableMipmap = NWReflection.isClassAvailable("com.jogamp.opengl.impl.glu.mipmap.Mipmap");
+ availableMipmap = ReflectionUtil.isClassAvailable("com.jogamp.opengl.impl.glu.mipmap.Mipmap");
checkedMipmap = true;
}
if(!availableMipmap) {
diff --git a/make/config/jogl/glu-common.cfg b/make/config/jogl/glu-common.cfg
index 937ca0348..f5fc7c1b3 100644
--- a/make/config/jogl/glu-common.cfg
+++ b/make/config/jogl/glu-common.cfg
@@ -14,7 +14,7 @@ Import javax.media.opengl.glu.*
Import com.jogamp.opengl.impl.*
Import com.jogamp.opengl.impl.glu.*
Import com.jogamp.opengl.impl.glu.tessellator.GLUtessellatorImpl
-Import com.jogamp.nativewindow.impl.NWReflection
+Import com.jogamp.common.util.ReflectionUtil
# Raise GLException instead of RuntimeException in glue code
RuntimeExceptionType GLException
diff --git a/make/config/jogl/obsolete/gl-gl2es12.cfg b/make/config/jogl/obsolete/gl-gl2es12.cfg
new file mode 100644
index 000000000..3942b1419
--- /dev/null
+++ b/make/config/jogl/obsolete/gl-gl2es12.cfg
@@ -0,0 +1,90 @@
+# This .cfg file is used to generate the GL interface and implementing class.
+JavaOutputDir gensrc/classes
+NativeOutputDir gensrc/native/jogl/gl2es12
+
+ExtendedInterfaceSymbolsOnly ../build-temp/gensrc/classes/javax/media/opengl/GL.java
+ExtendedInterfaceSymbolsOnly ../build-temp/gensrc/classes/javax/media/opengl/GL2ES1.java
+ExtendedInterfaceSymbolsOnly ../build-temp/gensrc/classes/javax/media/opengl/GL2ES2.java
+ExtendedInterfaceSymbolsOnly ../src/jogl/classes/javax/media/opengl/GLBase.java
+ExtendedInterfaceSymbolsOnly ../src/jogl/classes/javax/media/opengl/fixedfunc/GLMatrixFunc.java
+ExtendedInterfaceSymbolsOnly ../src/jogl/classes/javax/media/opengl/fixedfunc/GLPointerFunc.java
+ExtendedInterfaceSymbolsOnly ../src/jogl/classes/javax/media/opengl/fixedfunc/GLLightingFunc.java
+
+Style ImplOnly
+ImplPackage com.jogamp.opengl.impl.gl2es12
+ImplJavaClass GL2ES12Impl
+Implements GL2ES12Impl GLBase
+Implements GL2ES12Impl GL
+Implements GL2ES12Impl GL2ES1
+Implements GL2ES12Impl GL2ES2
+
+Include gl-common.cfg
+Include gl-common-extensions.cfg
+Include gl-desktop.cfg
+
+# Because we're manually implementing glMapBuffer but only producing
+# the implementing class, GlueGen doesn't notice that it has to emit a
+# proc address table entry for it. Force it to here.
+ForceProcAddressGen glMapBuffer
+
+# Force all of the methods to be emitted using dynamic linking so we
+# don't need to link against any emulation library on the desktop or
+# depend on the presence of an import library for a particular device
+ForceProcAddressGen __ALL__
+
+# Also force the calling conventions of the locally generated function
+# pointer typedefs for these routines to APIENTRY
+LocalProcAddressCallingConvention __ALL__ APIENTRY
+
+EmitProcAddressTable true
+ProcAddressTableClassName GL2ES12ProcAddressTable
+GetProcAddressTableExpr ((GL2ES12ProcAddressTable)_context.getGLProcAddressTable())
+
+# Pick up on-line OpenGL javadoc thanks to user cylab on javagaming.org forums
+TagNativeBinding true
+
+# There seem to be some errors in the glue code generation where we are not ignoring
+# enough routines from desktop GL in GL2ES12Impl. For now manually ignore those which
+# we know shouldn't be in there
+Ignore glGetTexImage
+Ignore glPixelStoref
+
+# Add PixelStorei StateTracker
+#
+# Add input validation to glPixelStorei to make sure that, even if we
+# are running on top of desktop OpenGL, parameters not exposed in
+# OpenGL ES can not be changed
+CustomJavaCode GL2ES12Impl private static final int params_offset = 0; // just a helper for JavaPrologue ..
+
+JavaPrologue glPixelStorei if (pname != GL_PACK_ALIGNMENT && pname != GL_UNPACK_ALIGNMENT) {
+JavaPrologue glPixelStorei throw new GLException("Unsupported pixel store parameter name 0x" + Integer.toHexString(pname));
+JavaPrologue glPixelStorei }
+JavaPrologue glPixelStorei glStateTracker.setInt(pname, param);
+
+JavaPrologue glGetIntegerv if ( glStateTracker.getInt(pname, params, params_offset) ) { return; }
+
+CustomJavaCode GL2ES12Impl public void glFrustumf(float left, float right, float bottom, float top, float zNear, float zFar) {
+CustomJavaCode GL2ES12Impl glFrustum((double)left, (double)right, (double)bottom, (double)top, (double)zNear, (double)zFar); }
+
+CustomJavaCode GL2ES12Impl public void glOrthof(float left, float right, float bottom, float top, float zNear, float zFar) {
+CustomJavaCode GL2ES12Impl glOrtho((double)left, (double)right, (double)bottom, (double)top, (double)zNear, (double)zFar); }
+
+CustomJavaCode GL2ES12Impl public void glClearDepthf(float depth) {
+CustomJavaCode GL2ES12Impl glClearDepth((double)depth); }
+
+CustomJavaCode GL2ES12Impl public void glDepthRangef(float zNear, float zFar) {
+CustomJavaCode GL2ES12Impl glDepthRange((double)zNear, (double)zFar); }
+
+Include gl-headers.cfg
+Include ../intptr.cfg
+
+IncludeAs CustomJavaCode GL2ES12Impl gl-impl-CustomJavaCode-common.java
+IncludeAs CustomJavaCode GL2ES12Impl gl-impl-CustomJavaCode-gl2es12.java
+IncludeAs CustomJavaCode GL2ES12Impl gl-impl-CustomJavaCode-embedded.java
+IncludeAs CustomJavaCode GL2ES12Impl gl-impl-CustomJavaCode-gl2_es2.java
+IncludeAs CustomCCode gl-impl-CustomCCode-gl2es12.c
+
+Import javax.media.opengl.GLES1
+Import javax.media.opengl.GLES2
+Import com.jogamp.opengl.impl.InternalBufferUtil
+Import java.io.PrintStream
diff --git a/make/config/jogl/obsolete/gl-impl-CustomCCode-gl2.c b/make/config/jogl/obsolete/gl-impl-CustomCCode-gl2.c
new file mode 100644
index 000000000..91fd0078b
--- /dev/null
+++ b/make/config/jogl/obsolete/gl-impl-CustomCCode-gl2.c
@@ -0,0 +1,24 @@
+/* Java->C glue code:
+ * Java package: com.jogamp.opengl.impl.gl2.GL2Impl
+ * Java method: long dispatch_glMapBuffer(int target, int access)
+ * C function: void * glMapBuffer(GLenum target, GLenum access);
+ */
+JNIEXPORT jlong JNICALL
+Java_com_jogamp_opengl_impl_gl2_GL2Impl_dispatch_1glMapBuffer(JNIEnv *env, jobject _unused, jint target, jint access, jlong glProcAddress) {
+ PFNGLMAPBUFFERPROC ptr_glMapBuffer;
+ void * _res;
+ ptr_glMapBuffer = (PFNGLMAPBUFFERPROC) (intptr_t) glProcAddress;
+ assert(ptr_glMapBuffer != NULL);
+ _res = (* ptr_glMapBuffer) ((GLenum) target, (GLenum) access);
+ return (jlong) (intptr_t) _res;
+}
+
+/* Java->C glue code:
+ * Java package: com.jogamp.opengl.impl.gl2.GL2Impl
+ * Java method: ByteBuffer newDirectByteBuffer(long addr, int capacity);
+ * C function: jobject newDirectByteBuffer(jlong addr, jint capacity);
+ */
+JNIEXPORT jobject JNICALL
+Java_com_jogamp_opengl_impl_gl2_GL2Impl_newDirectByteBuffer(JNIEnv *env, jobject _unused, jlong addr, jint capacity) {
+ return (*env)->NewDirectByteBuffer(env, (void*) (intptr_t) addr, capacity);
+}
diff --git a/make/config/jogl/obsolete/gl-impl-CustomCCode-gl2es12.c b/make/config/jogl/obsolete/gl-impl-CustomCCode-gl2es12.c
new file mode 100644
index 000000000..07b821802
--- /dev/null
+++ b/make/config/jogl/obsolete/gl-impl-CustomCCode-gl2es12.c
@@ -0,0 +1,24 @@
+/* Java->C glue code:
+ * Java package: com.jogamp.opengl.impl.gl2es12.GL2ES12Impl
+ * Java method: long dispatch_glMapBuffer(int target, int access)
+ * C function: void * glMapBuffer(GLenum target, GLenum access);
+ */
+JNIEXPORT jlong JNICALL
+Java_com_jogamp_opengl_impl_gl2es12_GL2ES12Impl_dispatch_1glMapBuffer(JNIEnv *env, jobject _unused, jint target, jint access, jlong glProcAddress) {
+ PFNGLMAPBUFFERPROC ptr_glMapBuffer;
+ void * _res;
+ ptr_glMapBuffer = (PFNGLMAPBUFFERPROC) (intptr_t) glProcAddress;
+ assert(ptr_glMapBuffer != NULL);
+ _res = (* ptr_glMapBuffer) ((GLenum) target, (GLenum) access);
+ return (jlong) (intptr_t) _res;
+}
+
+/* Java->C glue code:
+ * Java package: com.jogamp.opengl.impl.gl2es12.GL2ES12Impl
+ * Java method: ByteBuffer newDirectByteBuffer(long addr, int capacity);
+ * C function: jobject newDirectByteBuffer(jlong addr, jint capacity);
+ */
+JNIEXPORT jobject JNICALL
+Java_com_jogamp_opengl_impl_gl2es12_GL2ES12Impl_newDirectByteBuffer(JNIEnv *env, jobject _unused, jlong addr, jint capacity) {
+ return (*env)->NewDirectByteBuffer(env, (void*) (intptr_t) addr, capacity);
+}
diff --git a/make/config/jogl/obsolete/gl-impl-CustomCCode-gl3.c b/make/config/jogl/obsolete/gl-impl-CustomCCode-gl3.c
new file mode 100644
index 000000000..f540a7d4a
--- /dev/null
+++ b/make/config/jogl/obsolete/gl-impl-CustomCCode-gl3.c
@@ -0,0 +1,24 @@
+/* Java->C glue code:
+ * Java package: com.jogamp.opengl.impl.gl3.GL3Impl
+ * Java method: long dispatch_glMapBuffer(int target, int access)
+ * C function: void * glMapBuffer(GLenum target, GLenum access);
+ */
+JNIEXPORT jlong JNICALL
+Java_com_jogamp_opengl_impl_gl3_GL3Impl_dispatch_1glMapBuffer(JNIEnv *env, jobject _unused, jint target, jint access, jlong glProcAddress) {
+ PFNGLMAPBUFFERPROC ptr_glMapBuffer;
+ void * _res;
+ ptr_glMapBuffer = (PFNGLMAPBUFFERPROC) (intptr_t) glProcAddress;
+ assert(ptr_glMapBuffer != NULL);
+ _res = (* ptr_glMapBuffer) ((GLenum) target, (GLenum) access);
+ return (jlong) (intptr_t) _res;
+}
+
+/* Java->C glue code:
+ * Java package: com.jogamp.opengl.impl.gl3.GL3Impl
+ * Java method: ByteBuffer newDirectByteBuffer(long addr, int capacity);
+ * C function: jobject newDirectByteBuffer(jlong addr, jint capacity);
+ */
+JNIEXPORT jobject JNICALL
+Java_com_jogamp_opengl_impl_gl3_GL3Impl_newDirectByteBuffer(JNIEnv *env, jobject _unused, jlong addr, jint capacity) {
+ return (*env)->NewDirectByteBuffer(env, (void*) (intptr_t) addr, capacity);
+}
diff --git a/make/config/jogl/obsolete/gl-impl-CustomJavaCode-gl2.java b/make/config/jogl/obsolete/gl-impl-CustomJavaCode-gl2.java
new file mode 100644
index 000000000..a1a6917df
--- /dev/null
+++ b/make/config/jogl/obsolete/gl-impl-CustomJavaCode-gl2.java
@@ -0,0 +1,385 @@
+// Tracks glBegin/glEnd calls to determine whether it is legal to
+// query Vertex Buffer Object state
+private boolean inBeginEndPair;
+
+/* FIXME: refactor dependence on Java 2D / JOGL bridge
+
+// Tracks creation and destruction of server-side OpenGL objects when
+// the Java2D/OpenGL pipeline is enabled and it is using frame buffer
+// objects (FBOs) to do its rendering
+private GLObjectTracker tracker;
+
+public void setObjectTracker(GLObjectTracker tracker) {
+ this.tracker = tracker;
+}
+
+*/
+
+
+public GL2Impl(GLProfile glp, GLContextImpl context) {
+ this._context = context;
+ this.bufferSizeTracker = context.getBufferSizeTracker();
+ this.bufferStateTracker = context.getBufferStateTracker();
+ this.glStateTracker = context.getGLStateTracker();
+ this.glProfile = glp;
+}
+
+/**
+ * Provides platform-independent access to the wglAllocateMemoryNV /
+ * glXAllocateMemoryNV extension.
+ */
+public java.nio.ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3) {
+ return _context.glAllocateMemoryNV(arg0, arg1, arg2, arg3);
+}
+
+//
+// Helpers for ensuring the correct amount of texture data
+//
+
+/** Returns the number of bytes required to fill in the appropriate
+ texture. This is computed as closely as possible based on the
+ pixel pack or unpack parameters. The logic in this routine is
+ based on code in the SGI OpenGL sample implementation. */
+
+private int imageSizeInBytes(int format, int type, int w, int h, int d,
+ boolean pack) {
+ int elements = 0;
+ int esize = 0;
+
+ if (w < 0) return 0;
+ if (h < 0) return 0;
+ if (d < 0) return 0;
+ switch (format) {
+ case GL_COLOR_INDEX:
+ case GL_STENCIL_INDEX:
+ elements = 1;
+ break;
+ case GL_RED:
+ case GL_GREEN:
+ case GL_BLUE:
+ case GL_ALPHA:
+ case GL_LUMINANCE:
+ case GL_DEPTH_COMPONENT:
+ elements = 1;
+ break;
+ case GL_LUMINANCE_ALPHA:
+ elements = 2;
+ break;
+ case GL_RGB:
+ case GL_BGR:
+ elements = 3;
+ break;
+ case GL_RGBA:
+ case GL_BGRA:
+ case GL_ABGR_EXT:
+ elements = 4;
+ break;
+ /* FIXME ??
+ case GL_HILO_NV:
+ elements = 2;
+ break; */
+ default:
+ return 0;
+ }
+ switch (type) {
+ case GL_BITMAP:
+ if (format == GL_COLOR_INDEX) {
+ return (d * (h * ((w+7)/8)));
+ } else {
+ return 0;
+ }
+ case GL_BYTE:
+ case GL_UNSIGNED_BYTE:
+ esize = 1;
+ break;
+ case GL_UNSIGNED_BYTE_3_3_2:
+ case GL_UNSIGNED_BYTE_2_3_3_REV:
+ esize = 1;
+ elements = 1;
+ break;
+ case GL_SHORT:
+ case GL_UNSIGNED_SHORT:
+ esize = 2;
+ break;
+ case GL_UNSIGNED_SHORT_5_6_5:
+ case GL_UNSIGNED_SHORT_5_6_5_REV:
+ case GL_UNSIGNED_SHORT_4_4_4_4:
+ case GL_UNSIGNED_SHORT_4_4_4_4_REV:
+ case GL_UNSIGNED_SHORT_5_5_5_1:
+ case GL_UNSIGNED_SHORT_1_5_5_5_REV:
+ esize = 2;
+ elements = 1;
+ break;
+ case GL_INT:
+ case GL_UNSIGNED_INT:
+ case GL_FLOAT:
+ esize = 4;
+ break;
+ case GL_UNSIGNED_INT_8_8_8_8:
+ case GL_UNSIGNED_INT_8_8_8_8_REV:
+ case GL_UNSIGNED_INT_10_10_10_2:
+ case GL_UNSIGNED_INT_2_10_10_10_REV:
+ esize = 4;
+ elements = 1;
+ break;
+ default:
+ return 0;
+ }
+ return imageSizeInBytes(elements * esize, w, h, d, pack);
+}
+
+private GLBufferSizeTracker bufferSizeTracker;
+private GLBufferStateTracker bufferStateTracker;
+private GLStateTracker glStateTracker;
+
+private boolean bufferObjectExtensionsInitialized = false;
+private boolean haveARBPixelBufferObject;
+private boolean haveEXTPixelBufferObject;
+private boolean haveGL15;
+private boolean haveGL21;
+private boolean haveARBVertexBufferObject;
+
+private void initBufferObjectExtensionChecks() {
+ if (bufferObjectExtensionsInitialized)
+ return;
+ bufferObjectExtensionsInitialized = true;
+ haveARBPixelBufferObject = isExtensionAvailable("GL_ARB_pixel_buffer_object");
+ haveEXTPixelBufferObject = isExtensionAvailable("GL_EXT_pixel_buffer_object");
+ haveGL15 = isExtensionAvailable("GL_VERSION_1_5");
+ haveGL21 = isExtensionAvailable("GL_VERSION_2_1");
+ haveARBVertexBufferObject = isExtensionAvailable("GL_ARB_vertex_buffer_object");
+}
+
+private boolean checkBufferObject(boolean extension1,
+ boolean extension2,
+ boolean extension3,
+ boolean enabled,
+ int state,
+ String kind, boolean throwException) {
+ if (inBeginEndPair) {
+ throw new GLException("May not call this between glBegin and glEnd");
+ }
+ boolean avail = (extension1 || extension2 || extension3);
+ if (!avail) {
+ if (!enabled)
+ return true;
+ if(throwException) {
+ throw new GLException("Required extensions not available to call this function");
+ }
+ return false;
+ }
+ int buffer = bufferStateTracker.getBoundBufferObject(state, this);
+ if (enabled) {
+ if (buffer == 0) {
+ if(throwException) {
+ throw new GLException(kind + " must be enabled to call this method");
+ }
+ return false;
+ }
+ } else {
+ if (buffer != 0) {
+ if(throwException) {
+ throw new GLException(kind + " must be disabled to call this method");
+ }
+ return false;
+ }
+ }
+ return true;
+}
+
+private boolean checkArrayVBODisabled(boolean throwException) {
+ initBufferObjectExtensionChecks();
+ return checkBufferObject(haveGL15,
+ haveARBVertexBufferObject,
+ false,
+ false,
+ GL.GL_ARRAY_BUFFER,
+ "array vertex_buffer_object", throwException);
+}
+
+private boolean checkArrayVBOEnabled(boolean throwException) {
+ initBufferObjectExtensionChecks();
+ return checkBufferObject(haveGL15,
+ haveARBVertexBufferObject,
+ false,
+ true,
+ GL.GL_ARRAY_BUFFER,
+ "array vertex_buffer_object", throwException);
+}
+
+private boolean checkElementVBODisabled(boolean throwException) {
+ initBufferObjectExtensionChecks();
+ return checkBufferObject(haveGL15,
+ haveARBVertexBufferObject,
+ false,
+ false,
+ GL.GL_ELEMENT_ARRAY_BUFFER,
+ "element vertex_buffer_object", throwException);
+}
+
+private boolean checkElementVBOEnabled(boolean throwException) {
+ initBufferObjectExtensionChecks();
+ return checkBufferObject(haveGL15,
+ haveARBVertexBufferObject,
+ false,
+ true,
+ GL.GL_ELEMENT_ARRAY_BUFFER,
+ "element vertex_buffer_object", throwException);
+}
+
+private boolean checkUnpackPBODisabled(boolean throwException) {
+ initBufferObjectExtensionChecks();
+ return checkBufferObject(haveARBPixelBufferObject,
+ haveEXTPixelBufferObject,
+ haveGL21,
+ false,
+ GL2.GL_PIXEL_UNPACK_BUFFER,
+ "unpack pixel_buffer_object", throwException);
+}
+
+private boolean checkUnpackPBOEnabled(boolean throwException) {
+ initBufferObjectExtensionChecks();
+ return checkBufferObject(haveARBPixelBufferObject,
+ haveEXTPixelBufferObject,
+ haveGL21,
+ true,
+ GL2.GL_PIXEL_UNPACK_BUFFER,
+ "unpack pixel_buffer_object", throwException);
+}
+
+private boolean checkPackPBODisabled(boolean throwException) {
+ initBufferObjectExtensionChecks();
+ return checkBufferObject(haveARBPixelBufferObject,
+ haveEXTPixelBufferObject,
+ haveGL21,
+ false,
+ GL2.GL_PIXEL_PACK_BUFFER,
+ "pack pixel_buffer_object", throwException);
+}
+
+private boolean checkPackPBOEnabled(boolean throwException) {
+ initBufferObjectExtensionChecks();
+ return checkBufferObject(haveARBPixelBufferObject,
+ haveEXTPixelBufferObject,
+ haveGL21,
+ true,
+ GL2.GL_PIXEL_PACK_BUFFER,
+ "pack pixel_buffer_object", throwException);
+}
+
+public boolean glIsPBOPackEnabled() {
+ return checkPackPBOEnabled(false);
+}
+
+public boolean glIsPBOUnpackEnabled() {
+ return checkUnpackPBOEnabled(false);
+}
+
+// Attempt to return the same ByteBuffer object from glMapBuffer if
+// the vertex buffer object's base address and size haven't changed
+private static class ARBVBOKey {
+ private long addr;
+ private int capacity;
+
+ ARBVBOKey(long addr, int capacity) {
+ this.addr = addr;
+ this.capacity = capacity;
+ }
+
+ public int hashCode() {
+ return (int) addr;
+ }
+
+ public boolean equals(Object o) {
+ if ((o == null) || (!(o instanceof ARBVBOKey))) {
+ return false;
+ }
+
+ ARBVBOKey other = (ARBVBOKey) o;
+ return ((addr == other.addr) && (capacity == other.capacity));
+ }
+}
+
+private Map/*
LPVOID glMapBuffer(GLenum target, GLenum access);
*/
+public java.nio.ByteBuffer glMapBuffer(int target, int access) {
+ final long __addr_ = ((GL2ProcAddressTable)_context.getGLProcAddressTable())._addressof_glMapBuffer;
+ if (__addr_ == 0) {
+ throw new GLException("Method \"glMapBuffer\" not available");
+ }
+ int sz = bufferSizeTracker.getBufferSize(bufferStateTracker,
+ target,
+ this);
+ long addr;
+ addr = dispatch_glMapBuffer(target, access, __addr_);
+ if (addr == 0 || sz == 0) {
+ return null;
+ }
+ ARBVBOKey key = new ARBVBOKey(addr, sz);
+ ByteBuffer _res = (ByteBuffer) arbVBOCache.get(key);
+ if (_res == null) {
+ _res = newDirectByteBuffer(addr, sz);
+ InternalBufferUtil.nativeOrder(_res);
+ arbVBOCache.put(key, _res);
+ }
+ _res.position(0);
+ return _res;
+}
+
+/** Encapsulates function pointer for OpenGL function
: LPVOID glMapBuffer(GLenum target, GLenum access);
*/
+native private long dispatch_glMapBuffer(int target, int access, long glProcAddress);
+
+native private ByteBuffer newDirectByteBuffer(long addr, int capacity);
+
+ /** Dummy implementation for the ES 2.0 function:
void {@native glShaderBinary}(GLint n, const GLuint * shaders, GLenum binaryformat, const void * binary, GLint length);
Always throws a GLException! */
+ public void glShaderBinary(int n, java.nio.IntBuffer shaders, int binaryformat, java.nio.Buffer binary, int length) {
+ throw new GLException("Method \"glShaderBinary\" not available");
+ }
+
+ /** Dummy implementation for the ES 2.0 function:
void {@native glShaderBinary}(GLint n, const GLuint * shaders, GLenum binaryformat, const void * binary, GLint length);
Always throws a GLException! */
+ public void glShaderBinary(int n, int[] shaders, int shaders_offset, int binaryformat, java.nio.Buffer binary, int length) {
+ throw new GLException("Method \"glShaderBinary\" not available");
+ }
+
+ public void glReleaseShaderCompiler() {
+ // nothing to do
+ }
+
+ public void glVertexPointer(GLArrayData array) {
+ if(array.getComponentNumber()==0) return;
+ if(array.isVBO()) {
+ glVertexPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset());
+ } else {
+ glVertexPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer());
+ }
+ }
+ public void glColorPointer(GLArrayData array) {
+ if(array.getComponentNumber()==0) return;
+ if(array.isVBO()) {
+ glColorPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset());
+ } else {
+ glColorPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer());
+ }
+
+ }
+ public void glNormalPointer(GLArrayData array) {
+ if(array.getComponentNumber()==0) return;
+ if(array.getComponentNumber()!=3) {
+ throw new GLException("Only 3 components per normal allowed");
+ }
+ if(array.isVBO()) {
+ glNormalPointer(array.getComponentType(), array.getStride(), array.getOffset());
+ } else {
+ glNormalPointer(array.getComponentType(), array.getStride(), array.getBuffer());
+ }
+ }
+ public void glTexCoordPointer(GLArrayData array) {
+ if(array.getComponentNumber()==0) return;
+ if(array.isVBO()) {
+ glTexCoordPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset());
+ } else {
+ glTexCoordPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer());
+ }
+ }
+
diff --git a/make/config/jogl/obsolete/gl-impl-CustomJavaCode-gl2es12.java b/make/config/jogl/obsolete/gl-impl-CustomJavaCode-gl2es12.java
new file mode 100644
index 000000000..aed442da3
--- /dev/null
+++ b/make/config/jogl/obsolete/gl-impl-CustomJavaCode-gl2es12.java
@@ -0,0 +1,353 @@
+// Tracks glBegin/glEnd calls to determine whether it is legal to
+// query Vertex Buffer Object state
+private boolean inBeginEndPair;
+
+/* FIXME: refactor dependence on Java 2D / JOGL bridge
+
+// Tracks creation and destruction of server-side OpenGL objects when
+// the Java2D/OpenGL pipeline is enabled and it is using frame buffer
+// objects (FBOs) to do its rendering
+private GLObjectTracker tracker;
+
+public void setObjectTracker(GLObjectTracker tracker) {
+ this.tracker = tracker;
+}
+
+*/
+
+public GL2ES12Impl(GLProfile glp, GLContextImpl context) {
+ this._context = context;
+ this.bufferSizeTracker = context.getBufferSizeTracker();
+ this.bufferStateTracker = context.getBufferStateTracker();
+ this.glStateTracker = context.getGLStateTracker();
+ this.isGL2ES2 = glp.isGL2ES2();
+ this.glProfile = glp;
+}
+
+private boolean isGL2ES2;
+
+public boolean isFunctionAvailable(String glFunctionName) {
+ return _context.isFunctionAvailable(glFunctionName);
+}
+
+public boolean isExtensionAvailable(String glExtensionName) {
+ return _context.isExtensionAvailable(glExtensionName);
+}
+
+public Object getExtension(String extensionName) {
+ // At this point we don't expose any extensions using this mechanism
+ return null;
+}
+
+/** Returns the context this GL object is associated with for better
+ error checking by DebugGL. */
+public GLContext getContext() {
+ return _context;
+}
+
+private GLContextImpl _context;
+
+public void setSwapInterval(int interval) {
+ _context.setSwapInterval(interval);
+}
+
+public int getSwapInterval() {
+ return _context.getSwapInterval();
+}
+
+public Object getPlatformGLExtensions() {
+ return _context.getPlatformGLExtensions();
+}
+
+//
+// Helpers for ensuring the correct amount of texture data
+//
+
+/** Returns the number of bytes required to fill in the appropriate
+ texture. This is computed as closely as possible based on the
+ pixel pack or unpack parameters. The logic in this routine is
+ based on code in the SGI OpenGL sample implementation. */
+
+private int imageSizeInBytes(int format, int type, int w, int h, int d,
+ boolean pack) {
+ int elements = 0;
+ int esize = 0;
+
+ if (w < 0) return 0;
+ if (h < 0) return 0;
+ if (d < 0) return 0;
+ switch (format) {
+ case GL_STENCIL_INDEX:
+ elements = 1;
+ break;
+ case GL_ALPHA:
+ case GL_LUMINANCE:
+ case GL_DEPTH_COMPONENT:
+ elements = 1;
+ break;
+ case GL_LUMINANCE_ALPHA:
+ elements = 2;
+ break;
+ case GL_RGB:
+ elements = 3;
+ break;
+ case GL_RGBA:
+ elements = 4;
+ break;
+ /* FIXME ??
+ case GL_HILO_NV:
+ elements = 2;
+ break; */
+ default:
+ return 0;
+ }
+ switch (type) {
+ case GL_BYTE:
+ case GL_UNSIGNED_BYTE:
+ esize = 1;
+ break;
+ case GL_SHORT:
+ case GL_UNSIGNED_SHORT:
+ esize = 2;
+ break;
+ case GL_UNSIGNED_SHORT_5_6_5:
+ case GL_UNSIGNED_SHORT_4_4_4_4:
+ case GL_UNSIGNED_SHORT_5_5_5_1:
+ esize = 2;
+ elements = 1;
+ break;
+ case GL_INT:
+ case GL_UNSIGNED_INT:
+ case GL_FLOAT:
+ esize = 4;
+ break;
+ default:
+ return 0;
+ }
+ return imageSizeInBytes(elements * esize, w, h, d, pack);
+}
+
+private GLBufferSizeTracker bufferSizeTracker;
+private GLBufferStateTracker bufferStateTracker;
+private GLStateTracker glStateTracker;
+
+private boolean bufferObjectExtensionsInitialized = false;
+private boolean haveGL15;
+private boolean haveGL21;
+private boolean haveARBVertexBufferObject;
+
+private void initBufferObjectExtensionChecks() {
+ if (bufferObjectExtensionsInitialized)
+ return;
+ bufferObjectExtensionsInitialized = true;
+ haveGL15 = isExtensionAvailable("GL_VERSION_1_5");
+ haveGL21 = isExtensionAvailable("GL_VERSION_2_1");
+ haveARBVertexBufferObject = isExtensionAvailable("GL_ARB_vertex_buffer_object");
+}
+
+private boolean checkBufferObject(boolean extension1,
+ boolean extension2,
+ boolean extension3,
+ boolean enabled,
+ int state,
+ String kind, boolean throwException) {
+ if (inBeginEndPair) {
+ throw new GLException("May not call this between glBegin and glEnd");
+ }
+ boolean avail = (extension1 || extension2 || extension3);
+ if (!avail) {
+ if (!enabled)
+ return true;
+ if(throwException) {
+ throw new GLException("Required extensions not available to call this function");
+ }
+ return false;
+ }
+ int buffer = bufferStateTracker.getBoundBufferObject(state, this);
+ if (enabled) {
+ if (buffer == 0) {
+ if(throwException) {
+ throw new GLException(kind + " must be enabled to call this method");
+ }
+ return false;
+ }
+ } else {
+ if (buffer != 0) {
+ if(throwException) {
+ throw new GLException(kind + " must be disabled to call this method");
+ }
+ return false;
+ }
+ }
+ return true;
+}
+
+private boolean checkArrayVBODisabled(boolean throwException) {
+ initBufferObjectExtensionChecks();
+ return checkBufferObject(haveGL15,
+ haveARBVertexBufferObject,
+ false,
+ false,
+ GL.GL_ARRAY_BUFFER,
+ "array vertex_buffer_object", throwException);
+}
+
+private boolean checkArrayVBOEnabled(boolean throwException) {
+ initBufferObjectExtensionChecks();
+ return checkBufferObject(haveGL15,
+ haveARBVertexBufferObject,
+ false,
+ true,
+ GL.GL_ARRAY_BUFFER,
+ "array vertex_buffer_object", throwException);
+}
+
+private boolean checkElementVBODisabled(boolean throwException) {
+ initBufferObjectExtensionChecks();
+ return checkBufferObject(haveGL15,
+ haveARBVertexBufferObject,
+ false,
+ false,
+ GL.GL_ELEMENT_ARRAY_BUFFER,
+ "element vertex_buffer_object", throwException);
+}
+
+private boolean checkElementVBOEnabled(boolean throwException) {
+ initBufferObjectExtensionChecks();
+ return checkBufferObject(haveGL15,
+ haveARBVertexBufferObject,
+ false,
+ true,
+ GL.GL_ELEMENT_ARRAY_BUFFER,
+ "element vertex_buffer_object", throwException);
+}
+
+private boolean checkUnpackPBODisabled(boolean throwException) {
+ // PBO n/a for ES 1.1 or ES 2.0
+ return true;
+}
+
+private boolean checkUnpackPBOEnabled(boolean throwException) {
+ // PBO n/a for ES 1.1 or ES 2.0
+ return false;
+}
+
+private boolean checkPackPBODisabled(boolean throwException) {
+ // PBO n/a for ES 1.1 or ES 2.0
+ return true;
+}
+
+private boolean checkPackPBOEnabled(boolean throwException) {
+ // PBO n/a for ES 1.1 or ES 2.0
+ return false;
+}
+
+// Attempt to return the same ByteBuffer object from glMapBuffer if
+// the vertex buffer object's base address and size haven't changed
+private static class ARBVBOKey {
+ private long addr;
+ private int capacity;
+
+ ARBVBOKey(long addr, int capacity) {
+ this.addr = addr;
+ this.capacity = capacity;
+ }
+
+ public int hashCode() {
+ return (int) addr;
+ }
+
+ public boolean equals(Object o) {
+ if ((o == null) || (!(o instanceof ARBVBOKey))) {
+ return false;
+ }
+
+ ARBVBOKey other = (ARBVBOKey) o;
+ return ((addr == other.addr) && (capacity == other.capacity));
+ }
+}
+
+private Map/*
LPVOID glMapBuffer(GLenum target, GLenum access);
*/
+public java.nio.ByteBuffer glMapBuffer(int target, int access) {
+ final long __addr_ = ((GL2ES12ProcAddressTable)_context.getGLProcAddressTable())._addressof_glMapBuffer;
+ if (__addr_ == 0) {
+ throw new GLException("Method \"glMapBuffer\" not available");
+ }
+ int sz = bufferSizeTracker.getBufferSize(bufferStateTracker,
+ target,
+ this);
+ long addr;
+ addr = dispatch_glMapBuffer(target, access, __addr_);
+ if (addr == 0 || sz == 0) {
+ return null;
+ }
+ ARBVBOKey key = new ARBVBOKey(addr, sz);
+ ByteBuffer _res = (ByteBuffer) arbVBOCache.get(key);
+ if (_res == null) {
+ _res = newDirectByteBuffer(addr, sz);
+ InternalBufferUtil.nativeOrder(_res);
+ arbVBOCache.put(key, _res);
+ }
+ _res.position(0);
+ return _res;
+}
+
+/** Encapsulates function pointer for OpenGL function
: LPVOID glMapBuffer(GLenum target, GLenum access);
*/
+native private long dispatch_glMapBuffer(int target, int access, long glProcAddress);
+
+native private ByteBuffer newDirectByteBuffer(long addr, int capacity);
+
+ /** Dummy implementation for the ES 2.0 function:
void {@native glShaderBinary}(GLint n, const GLuint * shaders, GLenum binaryformat, const void * binary, GLint length);
Always throws a GLException! */
+ public void glShaderBinary(int n, java.nio.IntBuffer shaders, int binaryformat, java.nio.Buffer binary, int length) {
+ throw new GLException("Method \"glShaderBinary\" not available");
+ }
+
+ /** Dummy implementation for the ES 2.0 function:
void {@native glShaderBinary}(GLint n, const GLuint * shaders, GLenum binaryformat, const void * binary, GLint length);
Always throws a GLException! */
+ public void glShaderBinary(int n, int[] shaders, int shaders_offset, int binaryformat, java.nio.Buffer binary, int length) {
+ throw new GLException("Method \"glShaderBinary\" not available");
+ }
+
+ public void glReleaseShaderCompiler() {
+ // nothing to do
+ }
+
+ public void glVertexPointer(GLArrayData array) {
+ if(array.getComponentNumber()==0) return;
+ if(array.isVBO()) {
+ glVertexPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset());
+ } else {
+ glVertexPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer());
+ }
+ }
+ public void glColorPointer(GLArrayData array) {
+ if(array.getComponentNumber()==0) return;
+ if(array.isVBO()) {
+ glColorPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset());
+ } else {
+ glColorPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer());
+ }
+
+ }
+ public void glNormalPointer(GLArrayData array) {
+ if(array.getComponentNumber()==0) return;
+ if(array.getComponentNumber()!=3) {
+ throw new GLException("Only 3 components per normal allowed");
+ }
+ if(array.isVBO()) {
+ glNormalPointer(array.getComponentType(), array.getStride(), array.getOffset());
+ } else {
+ glNormalPointer(array.getComponentType(), array.getStride(), array.getBuffer());
+ }
+ }
+ public void glTexCoordPointer(GLArrayData array) {
+ if(array.getComponentNumber()==0) return;
+ if(array.isVBO()) {
+ glTexCoordPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset());
+ } else {
+ glTexCoordPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer());
+ }
+ }
+
+
diff --git a/make/config/nativewindow/x11-CustomJavaCode.java b/make/config/nativewindow/x11-CustomJavaCode.java
index 57f37bee7..44bb1e8d0 100644
--- a/make/config/nativewindow/x11-CustomJavaCode.java
+++ b/make/config/nativewindow/x11-CustomJavaCode.java
@@ -26,9 +26,8 @@
public static native long DefaultVisualID(long display, int screen);
- /**
public static native long CreateDummyWindow(long display, int screen_index, long visualID);
- public static native void DestroyDummyWindow(long display, long window); */
+ public static native void DestroyDummyWindow(long display, long window);
public static native long dlopen(String name);
public static native long dlsym(String name);
diff --git a/make/stub_includes/opengl/gl4.c b/make/stub_includes/opengl/gl4.c
index cf8a709f7..5e9d87ccd 100644
--- a/make/stub_includes/opengl/gl4.c
+++ b/make/stub_includes/opengl/gl4.c
@@ -1,11 +1,11 @@
#define GLAPI
-// Define GL4_PROTOTYPES so that the OpenGL prototypes in
+// Define GL3_PROTOTYPES so that the OpenGL prototypes in
// "gl3.h" are parsed.
-#define GL4_PROTOTYPES
+#define GL3_PROTOTYPES
-// Define GL_GL4EXT_PROTOTYPES so that the OpenGL extension prototypes in
+// Define GL_GL3EXT_PROTOTYPES so that the OpenGL extension prototypes in
// "gl3ext.h" are parsed.
-#define GL_GL4EXT_PROTOTYPES
+#define GL_GL3EXT_PROTOTYPES
-#include ARB_create_context
- * mechanism to create a context.
- * The implementation shall verify this context, ie issue a
- * MakeCurrent
call if necessary.
- *
- * @param share the shared context or null
- * @param direct flag if direct is requested
- * @param ctxOptionFlags ARB_create_context
related, see references below
- * @param major major number
- * @param minor minor number
- * @return the valid context if successfull, or null
- *
- * @see #CTX_PROFILE_COMPAT
- * @see #CTX_OPTION_FORWARD
- * @see #CTX_OPTION_DEBUG
- */
- protected abstract long createContextARBImpl(long share, boolean direct, int ctxOptionFlags,
- int major, int minor);
+ public final GL getGL() {
+ return gl;
+ }
- private long createContextARB(long share, boolean direct, int ctxOptionFlags,
- int majorMax, int minorMax,
- int majorMin, int minorMin,
- int major[], int minor[]) {
- major[0]=majorMax;
- minor[0]=minorMax;
- long _context=0;
+ public GL setGL(GL gl) {
+ if(DEBUG) {
+ String sgl1 = (null!=this.gl)?this.gl.getClass().toString()+", "+this.gl.toString():new String("ARB_create_context
- * mechanism to create a context.
- */
- protected long createContextARB(long share, boolean direct,
- int major[], int minor[], int ctp[])
- {
- AbstractGraphicsConfiguration config = drawable.getNativeWindow().getGraphicsConfiguration().getNativeGraphicsConfiguration();
- GLCapabilities glCaps = (GLCapabilities) config.getChosenCapabilities();
- GLProfile glp = glCaps.getGLProfile();
- long _context = 0;
+ protected abstract void releaseImpl() throws GLException;
- ctp[0] = CTX_IS_ARB_CREATED | CTX_PROFILE_CORE | CTX_OPTION_ANY; // default
- boolean isBackwardCompatibility = glp.isGL2() || glp.isGL3bc() || glp.isGL4bc() ;
- int majorMin, minorMin;
- int majorMax, minorMax;
- if( glp.isGL4() ) {
- // ?? majorMax=GLProfile.getMaxMajor(); minorMax=GLProfile.getMaxMinor(majorMax);
- majorMax=4; minorMax=GLProfile.getMaxMinor(majorMax);
- majorMin=4; minorMin=0;
- } else if( glp.isGL3() ) {
- majorMax=3; minorMax=GLProfile.getMaxMinor(majorMax);
- majorMin=3; minorMin=1;
- } else /* if( glp.isGL2() ) */ {
- majorMax=3; minorMax=0;
- majorMin=1; minorMin=1; // our minimum desktop OpenGL runtime requirements
+ public void destroy() {
+ if (lock.isHeld()) {
+ // release current context
+ release();
}
- // Try the requested ..
- if(isBackwardCompatibility) {
- ctp[0] &= ~CTX_PROFILE_CORE ;
- ctp[0] |= CTX_PROFILE_COMPAT ;
- }
- _context = createContextARB(share, direct, ctp[0],
- /* max */ majorMax, minorMax,
- /* min */ majorMin, minorMin,
- /* res */ major, minor);
-
- if(0==_context && !isBackwardCompatibility) {
- ctp[0] &= ~CTX_PROFILE_COMPAT ;
- ctp[0] |= CTX_PROFILE_CORE ;
- ctp[0] &= ~CTX_OPTION_ANY ;
- ctp[0] |= CTX_OPTION_FORWARD ;
- _context = createContextARB(share, direct, ctp[0],
- /* max */ majorMax, minorMax,
- /* min */ majorMin, minorMin,
- /* res */ major, minor);
- if(0==_context) {
- // Try a compatible one .. even though not requested .. last resort
- ctp[0] &= ~CTX_PROFILE_CORE ;
- ctp[0] |= CTX_PROFILE_COMPAT ;
- ctp[0] &= ~CTX_OPTION_FORWARD ;
- ctp[0] |= CTX_OPTION_ANY ;
- _context = createContextARB(share, direct, ctp[0],
- /* max */ majorMax, minorMax,
- /* min */ majorMin, minorMin,
- /* res */ major, minor);
- }
+
+ // Must hold the lock around the destroy operation to make sure we
+ // don't destroy the context out from under another thread rendering to it
+ lock.lock();
+ try {
+ /* FIXME: refactor dependence on Java 2D / JOGL bridge
+ if (tracker != null) {
+ // Don't need to do anything for contexts that haven't been
+ // created yet
+ if (isCreated()) {
+ // If we are tracking creation and destruction of server-side
+ // OpenGL objects, we must decrement the reference count of the
+ // GLObjectTracker upon context destruction.
+ //
+ // Note that we can only eagerly delete these server-side
+ // objects if there is another context currrent right now
+ // which shares textures and display lists with this one.
+ tracker.unref(deletedObjectTracker);
+ }
+ }
+ */
+
+ // Because we don't know how many other contexts we might be
+ // sharing with (and it seems too complicated to implement the
+ // GLObjectTracker's ref/unref scheme for the buffer-related
+ // optimizations), simply clear the cache of known buffers' sizes
+ // when we destroy contexts
+ if (bufferSizeTracker != null) {
+ bufferSizeTracker.clearCachedBufferSizes();
+ }
+
+ if (bufferStateTracker != null) {
+ bufferStateTracker.clearBufferObjectState();
+ }
+
+ if (glStateTracker != null) {
+ glStateTracker.clearStates(false);
+ }
+
+ destroyImpl();
+ } finally {
+ lock.unlock();
}
- return _context;
}
+ protected abstract void destroyImpl() throws GLException;
+
+ //----------------------------------------------------------------------
+ //
+
+ /**
+ * MakeCurrent functionality, which also issues the creation of the actual OpenGL context.
+ * The complete callgraph for general OpenGL context creation is:
+ *
+ *
ARB_create_context
is supported:
+ *
+ *
+ *
+ *
+ * Once at startup, ie triggered by the singleton {@link GLDrawableImpl} constructor,
+ * calling {@link #createContextARB} will query all available OpenGL versions:
+ *
+ *
FOR ALL GL* DO
:
+ *
+ *
+ *
+ *
+ *
+ *
+ * @see #makeCurrentImpl
+ * @see #create
+ * @see #createContextARB
+ * @see #createContextARBImpl
+ * @see #mapVersionAvailable
+ * @see #destroyContextARBImpl
+ */
public int makeCurrent() throws GLException {
// Support calls to makeCurrent() over and over again with
// different contexts without releasing them
@@ -287,103 +317,206 @@ public abstract class GLContextImpl extends GLContext {
return res;
}
+ /**
+ * @see #makeCurrent
+ */
protected abstract int makeCurrentImpl() throws GLException;
- public void release() throws GLException {
- if (!lock.isHeld()) {
- throw new GLException("Context not current on current thread");
- }
- setCurrent(null);
- try {
- releaseImpl();
- } finally {
- lock.unlock();
- }
- }
+ /**
+ * @see #makeCurrent
+ */
+ protected abstract void create() throws GLException ;
- protected abstract void releaseImpl() throws GLException;
+ /**
+ * Platform dependent but harmonized implementation of the ARB_create_context
+ * mechanism to create a context.
+ *
+ * This method is called from {@link #createContextARB}.
+ *
+ * The implementation shall verify this context with a
+ * MakeContextCurrent
call.
+ *
+ * @param share the shared context or null
+ * @param direct flag if direct is requested
+ * @param ctxOptionFlags ARB_create_context
related, see references below
+ * @param major major number
+ * @param minor minor number
+ * @return the valid context if successfull, or null
+ *
+ * @see #makeCurrent
+ * @see #CTX_PROFILE_COMPAT
+ * @see #CTX_OPTION_FORWARD
+ * @see #CTX_OPTION_DEBUG
+ * @see #makeCurrentImpl
+ * @see #create
+ * @see #createContextARB
+ * @see #createContextARBImpl
+ * @see #destroyContextARBImpl
+ */
+ protected abstract long createContextARBImpl(long share, boolean direct, int ctxOptionFlags,
+ int major, int minor);
- public void destroy() {
- if (lock.isHeld()) {
- // release current context
- release();
- }
+ /**
+ * Destroy the context created by {@link #createContextARBImpl}.
+ *
+ * @see #makeCurrent
+ * @see #makeCurrentImpl
+ * @see #create
+ * @see #createContextARB
+ * @see #createContextARBImpl
+ * @see #destroyContextARBImpl
+ */
+ protected abstract void destroyContextARBImpl(long context);
- // Must hold the lock around the destroy operation to make sure we
- // don't destroy the context out from under another thread rendering to it
- lock.lock();
- try {
- /* FIXME: refactor dependence on Java 2D / JOGL bridge
- if (tracker != null) {
- // Don't need to do anything for contexts that haven't been
- // created yet
- if (isCreated()) {
- // If we are tracking creation and destruction of server-side
- // OpenGL objects, we must decrement the reference count of the
- // GLObjectTracker upon context destruction.
- //
- // Note that we can only eagerly delete these server-side
- // objects if there is another context currrent right now
- // which shares textures and display lists with this one.
- tracker.unref(deletedObjectTracker);
+ /**
+ * Platform independent part of using the ARB_create_context
+ * mechanism to create a context.
+ *
+ * The implementation of {@link #create} shall use this protocol in case the platform supports ARB_create_context
.
+ *
+ * This method may call {@link #createContextARBImpl} and {@link #destroyContextARBImpl}.
+ *
+ * This method will also query all available native OpenGL context when first called,
+ * usually the first call should happen with the shared GLContext of the DrawableFactory.
+ *
+ * @see #makeCurrentImpl
+ * @see #create
+ * @see #createContextARB
+ * @see #createContextARBImpl
+ * @see #destroyContextARBImpl
+ */
+ protected long createContextARB(long share, boolean direct,
+ int major[], int minor[], int ctp[])
+ {
+ AbstractGraphicsConfiguration config = drawable.getNativeWindow().getGraphicsConfiguration().getNativeGraphicsConfiguration();
+ GLCapabilities glCaps = (GLCapabilities) config.getChosenCapabilities();
+ GLProfile glp = glCaps.getGLProfile();
+ long _context = 0;
+
+ if( !mappedVersionsAvailableSet ) {
+ synchronized(mappedVersionsAvailableLock) {
+ if( !mappedVersionsAvailableSet ) {
+ createContextARBMapVersionsAvailable(4, false /* compat */); // GL4
+ createContextARBMapVersionsAvailable(4, true /* compat */); // GL4bc
+ createContextARBMapVersionsAvailable(3, false /* compat */); // GL3
+ createContextARBMapVersionsAvailable(3, true /* compat */); // GL3bc
+ createContextARBMapVersionsAvailable(2, true /* compat */); // GL2
+ mappedVersionsAvailableSet=true;
+ }
}
- }
- */
-
- // Because we don't know how many other contexts we might be
- // sharing with (and it seems too complicated to implement the
- // GLObjectTracker's ref/unref scheme for the buffer-related
- // optimizations), simply clear the cache of known buffers' sizes
- // when we destroy contexts
- if (bufferSizeTracker != null) {
- bufferSizeTracker.clearCachedBufferSizes();
- }
+ }
- if (bufferStateTracker != null) {
- bufferStateTracker.clearBufferObjectState();
- }
-
- if (glStateTracker != null) {
- glStateTracker.clearStates(false);
- }
-
- destroyImpl();
- } finally {
- lock.unlock();
+ int reqMajor;
+ if(glp.isGL4()) {
+ reqMajor=4;
+ } else if (glp.isGL3()) {
+ reqMajor=3;
+ } else /* if (glp.isGL2()) */ {
+ reqMajor=2;
}
+ boolean compat = glp.isGL2(); // incl GL3bc and GL4bc
+
+ int key = compose8bit(reqMajor, compat?CTX_PROFILE_COMPAT:CTX_PROFILE_CORE, 0, 0);
+ int val = mappedVersionsAvailable.get( key );
+ long _ctx = 0;
+ if(val>0) {
+ int _major = getComposed8bit(val, 1);
+ int _minor = getComposed8bit(val, 2);
+ int _ctp = getComposed8bit(val, 3);
+
+ _ctx = createContextARBImpl(share, direct, _ctp, _major, _minor);
+ if(0!=_ctx) {
+ setGLFunctionAvailability(true, _major, _minor, _ctp);
+ }
+ }
+ return _ctx;
}
- protected abstract void destroyImpl() throws GLException;
+ private void createContextARBMapVersionsAvailable(int reqMajor, boolean compat)
+ {
+ long _context;
+ int ctp = CTX_IS_ARB_CREATED | CTX_PROFILE_CORE | CTX_OPTION_ANY; // default
+ if(compat) {
+ ctp &= ~CTX_PROFILE_CORE ;
+ ctp |= CTX_PROFILE_COMPAT ;
+ }
- // This is only needed for Mac OS X on-screen contexts
- protected void update() throws GLException {
+ // FIXME GL3GL4:
+ // To avoid OpenGL implementation bugs and raise compatibility
+ // within JOGL, we map to the proper GL version.
+ // This may change later when GL3 and GL4 drivers become more mature!
+ // Bug: To ensure GL profile compatibility within the JOGL application
+ // Bug: we always try to map against the highest GL version,
+ // Bug: so the use can always cast to a higher one
+ // Bug: int majorMax=GLContext.getMaxMajor();
+ // Bug: int minorMax=GLContext.getMaxMinor(majorMax);
+ int majorMax, minorMax;
+ int majorMin, minorMin;
+ int major[] = new int[1];
+ int minor[] = new int[1];
+ if( 4 == reqMajor ) {
+ majorMax=4; minorMax=GLContext.getMaxMinor(majorMax);
+ majorMin=4; minorMin=0;
+ } else if( 3 == reqMajor ) {
+ majorMax=3; minorMax=GLContext.getMaxMinor(majorMax);
+ majorMin=3; minorMin=1;
+ } else /* if( glp.isGL2() ) */ {
+ majorMax=3; minorMax=0;
+ majorMin=1; minorMin=1; // our minimum desktop OpenGL runtime requirements
+ }
+ _context = createContextARBVersions(0, true, ctp,
+ /* max */ majorMax, minorMax,
+ /* min */ majorMin, minorMin,
+ /* res */ major, minor);
+
+ if(0==_context && !compat) {
+ ctp &= ~CTX_PROFILE_COMPAT ;
+ ctp |= CTX_PROFILE_CORE ;
+ ctp &= ~CTX_OPTION_ANY ;
+ ctp |= CTX_OPTION_FORWARD ;
+ _context = createContextARBVersions(0, true, ctp,
+ /* max */ majorMax, minorMax,
+ /* min */ majorMin, minorMin,
+ /* res */ major, minor);
+ if(0==_context) {
+ // Try a compatible one .. even though not requested .. last resort
+ ctp &= ~CTX_PROFILE_CORE ;
+ ctp |= CTX_PROFILE_COMPAT ;
+ ctp &= ~CTX_OPTION_FORWARD ;
+ ctp |= CTX_OPTION_ANY ;
+ _context = createContextARBVersions(0, true, ctp,
+ /* max */ majorMax, minorMax,
+ /* min */ majorMin, minorMin,
+ /* res */ major, minor);
+ }
+ }
+ if(0!=_context) {
+ destroyContextARBImpl(_context);
+ mapVersionAvailable(reqMajor, compat, major[0], minor[0], ctp);
+ }
}
- public boolean isSynchronized() {
- return !lock.getFailFastMode();
- }
+ private long createContextARBVersions(long share, boolean direct, int ctxOptionFlags,
+ int majorMax, int minorMax,
+ int majorMin, int minorMin,
+ int major[], int minor[]) {
+ major[0]=majorMax;
+ minor[0]=minorMax;
+ long _context=0;
- public void setSynchronized(boolean isSynchronized) {
- lock.setFailFastMode(!isSynchronized);
- }
+ while ( 0==_context &&
+ GLContext.isValidGLVersion(major[0], minor[0]) &&
+ ( major[0]>majorMin || major[0]==majorMin && minor[0] >=minorMin ) ) {
- public final GL getGL() {
- return gl;
- }
+ _context = createContextARBImpl(share, direct, ctxOptionFlags, major[0], minor[0]);
- public GL setGL(GL gl) {
- if(DEBUG) {
- String sgl1 = (null!=this.gl)?this.gl.getClass().toString()+", "+this.gl.toString():new String("ARB_create_context
related: core profile */
protected static final int CTX_PROFILE_CORE = 1 << 2;
/** ARB_create_context
related: flag forward compatible */
- protected static final int CTX_OPTION_FORWARD = 1 << 3;
+ protected static final int CTX_PROFILE_ES = 1 << 3;
+ /** ARB_create_context
related: flag forward compatible */
+ protected static final int CTX_OPTION_FORWARD = 1 << 4;
/** ARB_create_context
related: not flag forward compatible */
- protected static final int CTX_OPTION_ANY = 1 << 4;
+ protected static final int CTX_OPTION_ANY = 1 << 5;
/** ARB_create_context
related: flag debug */
- protected static final int CTX_OPTION_DEBUG = 1 << 5;
+ protected static final int CTX_OPTION_DEBUG = 1 << 6;
+
+
+ public final boolean isGL4bc() {
+ return ctxMajorVersion>=4 && CTX_PROFILE_COMPAT==(ctxOptions & (CTX_PROFILE_COMPAT|CTX_PROFILE_ES));
+ }
+
+ public final boolean isGL4() {
+ return ctxMajorVersion>=4 && 0==(ctxOptions & (CTX_PROFILE_ES));
+ }
+
+ public final boolean isGL3bc() {
+ return ctxMajorVersion>=3 && CTX_PROFILE_COMPAT==(ctxOptions & (CTX_PROFILE_COMPAT|CTX_PROFILE_ES));
+ }
+
+ public final boolean isGL3() {
+ return ctxMajorVersion>=3 && 0==(ctxOptions & (CTX_PROFILE_ES));
+ }
+
+ public final boolean isGL2() {
+ return ctxMajorVersion>=1 && CTX_PROFILE_COMPAT==(ctxOptions & (CTX_PROFILE_COMPAT|CTX_PROFILE_ES));
+ }
+
+ public final boolean isGLES1() {
+ return ctxMajorVersion==1 && CTX_PROFILE_ES==(ctxOptions & CTX_PROFILE_ES);
+ }
+
+ public final boolean isGLES2() {
+ return ctxMajorVersion==2 && CTX_PROFILE_ES==(ctxOptions & CTX_PROFILE_ES);
+ }
+
+ public final boolean isGLES() {
+ return CTX_PROFILE_ES==(ctxOptions & CTX_PROFILE_ES);
+ }
+
+ public final boolean isGL2ES1() {
+ return isGL2() || isGLES1() ;
+ }
+
+ public final boolean isGL2ES2() {
+ return isGL2() || isGL3() || isGLES2() ;
+ }
+
+ public final boolean isGL2GL3() {
+ return isGL2() || isGL3();
+ }
+
+ public final boolean hasGLSL() {
+ return isGL2ES2() ;
+ }
+
+ public static final int GL_VERSIONS[][] = {
+ /* 0.*/ { -1 },
+ /* 1.*/ { 0, 1, 2, 3, 4, 5 },
+ /* 2.*/ { 0, 1 },
+ /* 3.*/ { 0, 1, 2, 3 },
+ /* 4.*/ { 0 } };
+
+ public static final int getMaxMajor() {
+ return GL_VERSIONS.length-1;
+ }
+
+ public static final int getMaxMinor(int major) {
+ if(1>major || major>=GL_VERSIONS.length) return -1;
+ return GL_VERSIONS[major].length-1;
+ }
+
+ public static final boolean isValidGLVersion(int major, int minor) {
+ if(1>major || major>=GL_VERSIONS.length) return false;
+ if(0>minor || minor>=GL_VERSIONS[major].length) return false;
+ return true;
+ }
+
+ public static final boolean decrementGLVersion(int major[], int minor[]) {
+ if(null==major || major.length<1 ||null==minor || minor.length<1) {
+ throw new GLException("invalid array arguments");
+ }
+ int m = major[0];
+ int n = minor[0];
+ if(!isValidGLVersion(m, n)) return false;
+
+ // decrement ..
+ n -= 1;
+ if(n < 0) {
+ m -= 1;
+ n = GL_VERSIONS[m].length-1;
+ }
+ if(!isValidGLVersion(m, n)) return false;
+ major[0]=m;
+ minor[0]=n;
+
+ return true;
+ }
+
+ public static final boolean isGLVersionAvailable(int major, boolean compatibility) {
+ int key = compose8bit(major, compatibility?CTX_PROFILE_COMPAT:CTX_PROFILE_CORE, 0, 0);
+ int val = mappedVersionsAvailable.get( key );
+ return val>0;
+ }
+ public static final boolean isGL4bcAvailable() { return isGLVersionAvailable(4, true); }
+ public static final boolean isGL4Available() { return isGLVersionAvailable(4, false); }
+ public static final boolean isGL3bcAvailable() { return isGLVersionAvailable(3, true); }
+ public static final boolean isGL3Available() { return isGLVersionAvailable(3, false); }
+ public static final boolean isGL2Available() { return isGLVersionAvailable(2, true); }
+
+ protected static final IntIntHashMap mappedVersionsAvailable;
+ protected static volatile boolean mappedVersionsAvailableSet;
+ protected static Object mappedVersionsAvailableLock;
+
+ static {
+ mappedVersionsAvailableLock = new Object();
+ mappedVersionsAvailableSet = false;
+ mappedVersionsAvailable = new IntIntHashMap();
+ mappedVersionsAvailable.setKeyNotFoundValue(-1);
+ }
+
+ /**
+ * Called by {@link GLContextImpl#createContextARBMapVersionsAvailable} not intendet to be used by
+ * implementations. However, if {@link #createContextARB} is not being used within the
+ * {@link GLDrawableImpl} constructor, GLProfile has to map the available versions.
+ *
+ * @see #createContextARBMapVersionsAvailable
+ */
+ protected static void mapVersionAvailable(int reqMajor, boolean reqCompat, int resMajor, int resMinor, int resCtp)
+ {
+ int key = compose8bit(reqMajor, reqCompat?CTX_PROFILE_COMPAT:CTX_PROFILE_CORE, 0, 0);
+ int val = compose8bit(resMajor, resMinor, resCtp, 0);
+ mappedVersionsAvailable.put( key, val );
+ }
+
+ protected static int compose8bit(int one, int two, int three, int four) {
+ return ( ( one & 0x000000FF ) << 24 ) |
+ ( ( two & 0x000000FF ) << 16 ) |
+ ( ( three & 0x000000FF ) << 8 ) |
+ ( ( four & 0x000000FF ) ) ;
+ }
+
+ protected static int getComposed8bit(int bits32, int which ) {
+ switch (which) {
+ case 1: return ( bits32 & 0xFF000000 ) >> 24 ;
+ case 2: return ( bits32 & 0x00FF0000 ) >> 16 ;
+ case 3: return ( bits32 & 0x0000FF00 ) >> 8 ;
+ case 4: return ( bits32 & 0xFF0000FF ) ;
+ }
+ throw new GLException("argument which out of range: "+which);
+ }
+
+ protected static String composed8BitToString(int bits32, boolean hex1, boolean hex2, boolean hex3, boolean hex4) {
+ int a = getComposed8bit(bits32, 1);
+ int b = getComposed8bit(bits32, 2);
+ int c = getComposed8bit(bits32, 3);
+ int d = getComposed8bit(bits32, 4);
+ return "["+toString(a, hex1)+", "+toString(b, hex2)+", "+toString(c, hex3)+", "+toString(d, hex4)+"]";
+ }
+
+ protected static String toString(int val, boolean hex) {
+ if(hex) {
+ return "0x" + Integer.toHexString(val);
+ }
+ return String.valueOf(val);
+ }
+
+ protected static String toHexString(int hex) {
+ return "0x" + Integer.toHexString(hex);
+ }
+
+ protected static String toHexString(long hex) {
+ return "0x" + Long.toHexString(hex);
+ }
+
}
+
diff --git a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
index 80c2c10e2..b02bffb61 100644
--- a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
+++ b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
@@ -42,8 +42,9 @@ package javax.media.opengl;
import javax.media.nativewindow.*;
import java.security.*;
+import com.jogamp.common.JogampRuntimeException;
+import com.jogamp.common.util.*;
import com.jogamp.opengl.impl.*;
-import com.jogamp.nativewindow.impl.NWReflection;
/**
+ *
+ *
*/
- public static final String[] GL_PROFILE_LIST_ALL = new String[] { GL2, GL2ES2, GL2ES1, GLES2, GLES1, GL2GL3, GL4bc, GL3bc, GL4, GL3 };
+ public static final String[] GL_PROFILE_LIST_ALL = new String[] { GL2, GL3bc, GL4bc, GL2GL3, GL3, GL4, GL2ES2, GLES2, GL2ES1, GLES1 };
/**
- * All GL2ES2 Profiles in the order of default detection: GL2ES2, GL2, GLES2, GL3
+ * Order of maximum fixed function profiles
+ *
+ *
+ *
+ *
+ */
+ public static final String[] GL_PROFILE_LIST_MAX_FIXEDFUNC = new String[] { GL4bc, GL3bc, GL2, GL2ES1, GLES1 };
+
+ /**
+ * Order of maximum programmable shader profiles
+ *
+ *
+ *
+ *
+ */
+ public static final String[] GL_PROFILE_LIST_MAX_PROGSHADER = new String[] { GL4, GL4bc, GL3, GL3bc, GL2, GL2ES2, GLES2 };
+
+ /**
+ * All GL2ES2 Profiles in the order of default detection.
+ *
+ * FIXME GL3GL4: Due to GL3 and GL4 implementation bugs, we still choose GL2 first, if available!
+ *
+ *
+ *
+ *
*/
- public static final String[] GL_PROFILE_LIST_GL2ES2 = new String[] { GL2ES2, GL2, GLES2, GL4bc, GL3bc, GL4, GL3 };
+ public static final String[] GL_PROFILE_LIST_GL2ES2 = new String[] { GL2ES2, GL2, GL3, GL4, GLES2 };
/**
- * All GL2ES1 Profiles in the order of default detection: GL2ES1, GL2, GLES1
+ * All GL2ES1 Profiles in the order of default detection.
+ *
+ * FIXME GL3GL4: Due to GL3 and GL4 implementation bugs, we still choose GL2 first, if available!
+ *
+ *
+ *
+ *
*/
- public static final String[] GL_PROFILE_LIST_GL2ES1 = new String[] { GL2ES1, GL2, GLES1 };
+ public static final String[] GL_PROFILE_LIST_GL2ES1 = new String[] { GL2ES1, GL2, GL3bc, GL4bc, GLES1 };
/** Returns a default GLProfile object, reflecting the best for the running platform.
* It selects the first of the set {@link GLProfile#GL_PROFILE_LIST_ALL}
+ * @see #GL_PROFILE_LIST_ALL
*/
public static final GLProfile getDefault() {
if(null==defaultGLProfile) {
@@ -119,22 +229,30 @@ public class GLProfile implements Cloneable {
return defaultGLProfile;
}
- /** Returns a GLProfile object.
- * Verfifies the given profile and chooses an apropriate implementation.
- * A generic value of null
or GL
will result in
- * the default profile.
+ /**
+ * Returns the highest profile, implementing the fixed function pipeline
+ * It selects the first of the set: {@link GLProfile#GL_PROFILE_LIST_MAX_FIXEDFUNC}
*
* @throws GLException if no implementation for the given profile is found.
+ * @see #GL_PROFILE_LIST_MAX_FIXEDFUNC
*/
- public static final GLProfile get(String profile)
+ public static final GLProfile getMaxFixedFunc()
throws GLException
{
- if(null==profile || profile.equals("GL")) return getDefault();
- GLProfile glProfile = (GLProfile) mappedProfiles.get(profile);
- if(null==glProfile) {
- throw new GLException("No implementation for profile "+profile+" available");
- }
- return glProfile;
+ return get(GL_PROFILE_LIST_MAX_FIXEDFUNC);
+ }
+
+ /**
+ * Returns the highest profile, implementing the programmable shader pipeline.
+ * It selects the first of the set: {@link GLProfile#GL_PROFILE_LIST_MAX_PROGSHADER}
+ *
+ * @throws GLException if no implementation for the given profile is found.
+ * @see #GL_PROFILE_LIST_MAX_PROGSHADER
+ */
+ public static final GLProfile getMaxProgrammable()
+ throws GLException
+ {
+ return get(GL_PROFILE_LIST_MAX_PROGSHADER);
}
/**
@@ -142,6 +260,7 @@ public class GLProfile implements Cloneable {
* It selects the first of the set: {@link GLProfile#GL_PROFILE_LIST_GL2ES1}
*
* @throws GLException if no implementation for the given profile is found.
+ * @see #GL_PROFILE_LIST_GL2ES1
*/
public static final GLProfile getGL2ES1()
throws GLException
@@ -154,6 +273,7 @@ public class GLProfile implements Cloneable {
* It selects the first of the set: {@link GLProfile#GL_PROFILE_LIST_GL2ES2}
*
* @throws GLException if no implementation for the given profile is found.
+ * @see #GL_PROFILE_LIST_GL2ES2
*/
public static final GLProfile getGL2ES2()
throws GLException
@@ -161,6 +281,24 @@ public class GLProfile implements Cloneable {
return get(GL_PROFILE_LIST_GL2ES2);
}
+ /** Returns a GLProfile object.
+ * Verfifies the given profile and chooses an apropriate implementation.
+ * A generic value of null
or GL
will result in
+ * the default profile.
+ *
+ * @throws GLException if no implementation for the given profile is found.
+ */
+ public static final GLProfile get(String profile)
+ throws GLException
+ {
+ if(null==profile || profile.equals("GL")) return getDefault();
+ GLProfile glProfile = (GLProfile) mappedProfiles.get(profile);
+ if(null==glProfile) {
+ throw new GLException("No implementation for profile "+profile+" available");
+ }
+ return glProfile;
+ }
+
/**
* Returns the first profile from the given list,
* where an implementation is available.
@@ -200,18 +338,12 @@ public class GLProfile implements Cloneable {
}
private static final String getGLImplBaseClassName(String profileImpl) {
- if(GL4bc.equals(profileImpl)) {
+ if ( GL4bc.equals(profileImpl) ||
+ GL4.equals(profileImpl) ||
+ GL3bc.equals(profileImpl) ||
+ GL3.equals(profileImpl) ||
+ GL2.equals(profileImpl) ) {
return "com.jogamp.opengl.impl.gl4.GL4bc";
- } else if(GL4.equals(profileImpl)) {
- return "com.jogamp.opengl.impl.gl4.GL4";
- } else if(GL3bc.equals(profileImpl)) {
- return "com.jogamp.opengl.impl.gl3.GL3bc";
- } else if(GL3.equals(profileImpl)) {
- return "com.jogamp.opengl.impl.gl3.GL3";
- } else if(GL2.equals(profileImpl)) {
- return "com.jogamp.opengl.impl.gl2.GL2";
- } else if(GL2ES12.equals(profileImpl)) {
- return "com.jogamp.opengl.impl.gl2es12.GL2ES12";
} else if(GLES1.equals(profileImpl) || GL2ES1.equals(profileImpl)) {
return "com.jogamp.opengl.impl.es1.GLES1";
} else if(GLES2.equals(profileImpl) || GL2ES2.equals(profileImpl)) {
@@ -285,7 +417,7 @@ public class GLProfile implements Cloneable {
return isGL4() || isGL3bc() || GL3.equals(profile);
}
- /** Indicates whether this profile is capable of GL2. */
+ /** Indicates whether this context is a GL2 context */
public final boolean isGL2() {
return isGL3bc() || GL2.equals(profile);
}
@@ -315,34 +447,9 @@ public class GLProfile implements Cloneable {
return GL2GL3.equals(profile) || isGL2() || isGL3() ;
}
- /** Indicates whether this profile uses the native desktop OpenGL GL4bc implementations. */
- public final boolean usesNativeGL4bc() {
- return GL4bc.equals(profileImpl);
- }
-
- /** Indicates whether this profile uses the native desktop OpenGL GL4 implementations. */
- public final boolean usesNativeGL4() {
- return usesNativeGL4bc() || GL4.equals(profileImpl);
- }
-
- /** Indicates whether this profile uses the native desktop OpenGL GL3bc implementations. */
- public final boolean usesNativeGL3bc() {
- return GL3bc.equals(profileImpl);
- }
-
- /** Indicates whether this profile uses the native desktop OpenGL GL3 implementations. */
- public final boolean usesNativeGL3() {
- return usesNativeGL3bc() || GL3.equals(profileImpl);
- }
-
- /** Indicates whether this profile uses the native desktop OpenGL GL2 implementations. */
- public final boolean usesNativeGL2() {
- return GL2.equals(profileImpl) || GL2ES12.equals(profileImpl) ;
- }
-
- /** Indicates whether this profile uses the native desktop OpenGL GL2 or GL3 implementations. */
- public final boolean usesNativeGL2GL3() {
- return usesNativeGL2() || usesNativeGL3() || usesNativeGL4();
+ /** Indicates whether this profile supports GLSL. */
+ public final boolean hasGLSL() {
+ return isGL2ES2() ;
}
/** Indicates whether this profile uses the native OpenGL ES1 implementations. */
@@ -360,11 +467,6 @@ public class GLProfile implements Cloneable {
return usesNativeGLES2() || usesNativeGLES1();
}
- /** Indicates whether this profile supports GLSL. */
- public final boolean hasGLSL() {
- return isGL2ES2() ;
- }
-
/**
* General validation if type is a valid GL data type
* for the current profile
@@ -665,70 +767,23 @@ public class GLProfile implements Cloneable {
return "GLProfile[" + profile + "/" + profileImpl + "]";
}
- public static final int GL_VERSIONS[][] = {
- /* 0.*/ { -1 },
- /* 1.*/ { 0, 1, 2, 3, 4, 5 },
- /* 2.*/ { 0, 1 },
- /* 3.*/ { 0, 1, 2, 3 },
- /* 4.*/ { 0 } };
-
- public static final int getMaxMajor() {
- return GL_VERSIONS.length-1;
- }
-
- public static final int getMaxMinor(int major) {
- if(1>major || major>=GL_VERSIONS.length) return -1;
- return GL_VERSIONS[major].length-1;
- }
-
- public static final boolean isValidGLVersion(int major, int minor) {
- if(1>major || major>=GL_VERSIONS.length) return false;
- if(0>minor || minor>=GL_VERSIONS[major].length) return false;
- return true;
- }
-
- public static final boolean decrementGLVersion(int major[], int minor[]) {
- if(null==major || major.length<1 ||null==minor || minor.length<1) {
- throw new GLException("invalid array arguments");
- }
- int m = major[0];
- int n = minor[0];
- if(!isValidGLVersion(m, n)) return false;
-
- // decrement ..
- n -= 1;
- if(n < 0) {
- m -= 1;
- n = GL_VERSIONS[m].length-1;
- }
- if(!isValidGLVersion(m, n)) return false;
- major[0]=m;
- minor[0]=n;
-
- return true;
- }
-
- // The intersection between desktop OpenGL and the union of the OpenGL ES profiles
- // This is here only to avoid having separate GL2ES1Impl and GL2ES2Impl classes
- private static final String GL2ES12 = "GL2ES12";
-
private static final boolean isAWTAvailable;
private static final boolean isAWTJOGLAvailable;
- private static final boolean hasGL4bcImpl;
- private static final boolean hasGL4Impl;
- private static final boolean hasGL3bcImpl;
- private static final boolean hasGL3Impl;
- private static final boolean hasGL2Impl;
- private static final boolean hasGL2ES12Impl;
- private static final boolean hasGLES2Impl;
- private static final boolean hasGLES1Impl;
+ private static /*final*/ boolean hasGL234Impl;
+ private static /*final*/ boolean hasGL4bcImpl;
+ private static /*final*/ boolean hasGL4Impl;
+ private static /*final*/ boolean hasGL3bcImpl;
+ private static /*final*/ boolean hasGL3Impl;
+ private static /*final*/ boolean hasGL2Impl;
+ private static /*final*/ boolean hasGLES2Impl;
+ private static /*final*/ boolean hasGLES1Impl;
/** The JVM/process wide default GL profile **/
- private static GLProfile defaultGLProfile;
+ private static /*final*/ GLProfile defaultGLProfile;
/** All GLProfiles */
- private static final HashMap/*
+ * author: Brian Paul (converted to Java by Ron Cemer and Sven Goethel)
LPVOID glMapBuffer(GLenum target, GLenum access);
*/
+public java.nio.ByteBuffer glMapBuffer(int target, int access) {
+ final long __addr_ = ((GL2ES12ProcAddressTable)_context.getGLProcAddressTable())._addressof_glMapBuffer;
+ if (__addr_ == 0) {
+ throw new GLException("Method \"glMapBuffer\" not available");
+ }
+ int sz = bufferSizeTracker.getBufferSize(bufferStateTracker,
+ target,
+ this);
+ long addr;
+ addr = dispatch_glMapBuffer(target, access, __addr_);
+ if (addr == 0 || sz == 0) {
+ return null;
+ }
+ ARBVBOKey key = new ARBVBOKey(addr, sz);
+ ByteBuffer _res = (ByteBuffer) arbVBOCache.get(key);
+ if (_res == null) {
+ _res = newDirectByteBuffer(addr, sz);
+ InternalBufferUtil.nativeOrder(_res);
+ arbVBOCache.put(key, _res);
+ }
+ _res.position(0);
+ return _res;
+}
+
+/** Encapsulates function pointer for OpenGL function
: LPVOID glMapBuffer(GLenum target, GLenum access);
*/
+native private long dispatch_glMapBuffer(int target, int access, long glProcAddress);
+
+native private ByteBuffer newDirectByteBuffer(long addr, int capacity);
+
+ /** Dummy implementation for the ES 2.0 function:
void {@native glShaderBinary}(GLint n, const GLuint * shaders, GLenum binaryformat, const void * binary, GLint length);
Always throws a GLException! */
+ public void glShaderBinary(int n, java.nio.IntBuffer shaders, int binaryformat, java.nio.Buffer binary, int length) {
+ throw new GLException("Method \"glShaderBinary\" not available");
+ }
+
+ /** Dummy implementation for the ES 2.0 function:
void {@native glShaderBinary}(GLint n, const GLuint * shaders, GLenum binaryformat, const void * binary, GLint length);
Always throws a GLException! */
+ public void glShaderBinary(int n, int[] shaders, int shaders_offset, int binaryformat, java.nio.Buffer binary, int length) {
+ throw new GLException("Method \"glShaderBinary\" not available");
+ }
+
+ public void glReleaseShaderCompiler() {
+ // nothing to do
+ }
+
+ public void glVertexPointer(GLArrayData array) {
+ if(array.getComponentNumber()==0) return;
+ if(array.isVBO()) {
+ glVertexPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset());
+ } else {
+ glVertexPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer());
+ }
+ }
+ public void glColorPointer(GLArrayData array) {
+ if(array.getComponentNumber()==0) return;
+ if(array.isVBO()) {
+ glColorPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset());
+ } else {
+ glColorPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer());
+ }
+
+ }
+ public void glNormalPointer(GLArrayData array) {
+ if(array.getComponentNumber()==0) return;
+ if(array.getComponentNumber()!=3) {
+ throw new GLException("Only 3 components per normal allowed");
+ }
+ if(array.isVBO()) {
+ glNormalPointer(array.getComponentType(), array.getStride(), array.getOffset());
+ } else {
+ glNormalPointer(array.getComponentType(), array.getStride(), array.getBuffer());
+ }
+ }
+ public void glTexCoordPointer(GLArrayData array) {
+ if(array.getComponentNumber()==0) return;
+ if(array.isVBO()) {
+ glTexCoordPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset());
+ } else {
+ glTexCoordPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer());
+ }
+ }
+
+
diff --git a/make/config/jogl/obsolete/gl-gl2es12.cfg b/make/config/jogl/obsolete/gl-gl2es12.cfg
deleted file mode 100644
index 3942b1419..000000000
--- a/make/config/jogl/obsolete/gl-gl2es12.cfg
+++ /dev/null
@@ -1,90 +0,0 @@
-# This .cfg file is used to generate the GL interface and implementing class.
-JavaOutputDir gensrc/classes
-NativeOutputDir gensrc/native/jogl/gl2es12
-
-ExtendedInterfaceSymbolsOnly ../build-temp/gensrc/classes/javax/media/opengl/GL.java
-ExtendedInterfaceSymbolsOnly ../build-temp/gensrc/classes/javax/media/opengl/GL2ES1.java
-ExtendedInterfaceSymbolsOnly ../build-temp/gensrc/classes/javax/media/opengl/GL2ES2.java
-ExtendedInterfaceSymbolsOnly ../src/jogl/classes/javax/media/opengl/GLBase.java
-ExtendedInterfaceSymbolsOnly ../src/jogl/classes/javax/media/opengl/fixedfunc/GLMatrixFunc.java
-ExtendedInterfaceSymbolsOnly ../src/jogl/classes/javax/media/opengl/fixedfunc/GLPointerFunc.java
-ExtendedInterfaceSymbolsOnly ../src/jogl/classes/javax/media/opengl/fixedfunc/GLLightingFunc.java
-
-Style ImplOnly
-ImplPackage com.jogamp.opengl.impl.gl2es12
-ImplJavaClass GL2ES12Impl
-Implements GL2ES12Impl GLBase
-Implements GL2ES12Impl GL
-Implements GL2ES12Impl GL2ES1
-Implements GL2ES12Impl GL2ES2
-
-Include gl-common.cfg
-Include gl-common-extensions.cfg
-Include gl-desktop.cfg
-
-# Because we're manually implementing glMapBuffer but only producing
-# the implementing class, GlueGen doesn't notice that it has to emit a
-# proc address table entry for it. Force it to here.
-ForceProcAddressGen glMapBuffer
-
-# Force all of the methods to be emitted using dynamic linking so we
-# don't need to link against any emulation library on the desktop or
-# depend on the presence of an import library for a particular device
-ForceProcAddressGen __ALL__
-
-# Also force the calling conventions of the locally generated function
-# pointer typedefs for these routines to APIENTRY
-LocalProcAddressCallingConvention __ALL__ APIENTRY
-
-EmitProcAddressTable true
-ProcAddressTableClassName GL2ES12ProcAddressTable
-GetProcAddressTableExpr ((GL2ES12ProcAddressTable)_context.getGLProcAddressTable())
-
-# Pick up on-line OpenGL javadoc thanks to user cylab on javagaming.org forums
-TagNativeBinding true
-
-# There seem to be some errors in the glue code generation where we are not ignoring
-# enough routines from desktop GL in GL2ES12Impl. For now manually ignore those which
-# we know shouldn't be in there
-Ignore glGetTexImage
-Ignore glPixelStoref
-
-# Add PixelStorei StateTracker
-#
-# Add input validation to glPixelStorei to make sure that, even if we
-# are running on top of desktop OpenGL, parameters not exposed in
-# OpenGL ES can not be changed
-CustomJavaCode GL2ES12Impl private static final int params_offset = 0; // just a helper for JavaPrologue ..
-
-JavaPrologue glPixelStorei if (pname != GL_PACK_ALIGNMENT && pname != GL_UNPACK_ALIGNMENT) {
-JavaPrologue glPixelStorei throw new GLException("Unsupported pixel store parameter name 0x" + Integer.toHexString(pname));
-JavaPrologue glPixelStorei }
-JavaPrologue glPixelStorei glStateTracker.setInt(pname, param);
-
-JavaPrologue glGetIntegerv if ( glStateTracker.getInt(pname, params, params_offset) ) { return; }
-
-CustomJavaCode GL2ES12Impl public void glFrustumf(float left, float right, float bottom, float top, float zNear, float zFar) {
-CustomJavaCode GL2ES12Impl glFrustum((double)left, (double)right, (double)bottom, (double)top, (double)zNear, (double)zFar); }
-
-CustomJavaCode GL2ES12Impl public void glOrthof(float left, float right, float bottom, float top, float zNear, float zFar) {
-CustomJavaCode GL2ES12Impl glOrtho((double)left, (double)right, (double)bottom, (double)top, (double)zNear, (double)zFar); }
-
-CustomJavaCode GL2ES12Impl public void glClearDepthf(float depth) {
-CustomJavaCode GL2ES12Impl glClearDepth((double)depth); }
-
-CustomJavaCode GL2ES12Impl public void glDepthRangef(float zNear, float zFar) {
-CustomJavaCode GL2ES12Impl glDepthRange((double)zNear, (double)zFar); }
-
-Include gl-headers.cfg
-Include ../intptr.cfg
-
-IncludeAs CustomJavaCode GL2ES12Impl gl-impl-CustomJavaCode-common.java
-IncludeAs CustomJavaCode GL2ES12Impl gl-impl-CustomJavaCode-gl2es12.java
-IncludeAs CustomJavaCode GL2ES12Impl gl-impl-CustomJavaCode-embedded.java
-IncludeAs CustomJavaCode GL2ES12Impl gl-impl-CustomJavaCode-gl2_es2.java
-IncludeAs CustomCCode gl-impl-CustomCCode-gl2es12.c
-
-Import javax.media.opengl.GLES1
-Import javax.media.opengl.GLES2
-Import com.jogamp.opengl.impl.InternalBufferUtil
-Import java.io.PrintStream
diff --git a/make/config/jogl/obsolete/gl-impl-CustomCCode-gl2.c b/make/config/jogl/obsolete/gl-impl-CustomCCode-gl2.c
deleted file mode 100644
index 91fd0078b..000000000
--- a/make/config/jogl/obsolete/gl-impl-CustomCCode-gl2.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Java->C glue code:
- * Java package: com.jogamp.opengl.impl.gl2.GL2Impl
- * Java method: long dispatch_glMapBuffer(int target, int access)
- * C function: void * glMapBuffer(GLenum target, GLenum access);
- */
-JNIEXPORT jlong JNICALL
-Java_com_jogamp_opengl_impl_gl2_GL2Impl_dispatch_1glMapBuffer(JNIEnv *env, jobject _unused, jint target, jint access, jlong glProcAddress) {
- PFNGLMAPBUFFERPROC ptr_glMapBuffer;
- void * _res;
- ptr_glMapBuffer = (PFNGLMAPBUFFERPROC) (intptr_t) glProcAddress;
- assert(ptr_glMapBuffer != NULL);
- _res = (* ptr_glMapBuffer) ((GLenum) target, (GLenum) access);
- return (jlong) (intptr_t) _res;
-}
-
-/* Java->C glue code:
- * Java package: com.jogamp.opengl.impl.gl2.GL2Impl
- * Java method: ByteBuffer newDirectByteBuffer(long addr, int capacity);
- * C function: jobject newDirectByteBuffer(jlong addr, jint capacity);
- */
-JNIEXPORT jobject JNICALL
-Java_com_jogamp_opengl_impl_gl2_GL2Impl_newDirectByteBuffer(JNIEnv *env, jobject _unused, jlong addr, jint capacity) {
- return (*env)->NewDirectByteBuffer(env, (void*) (intptr_t) addr, capacity);
-}
diff --git a/make/config/jogl/obsolete/gl-impl-CustomCCode-gl2es12.c b/make/config/jogl/obsolete/gl-impl-CustomCCode-gl2es12.c
deleted file mode 100644
index 07b821802..000000000
--- a/make/config/jogl/obsolete/gl-impl-CustomCCode-gl2es12.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Java->C glue code:
- * Java package: com.jogamp.opengl.impl.gl2es12.GL2ES12Impl
- * Java method: long dispatch_glMapBuffer(int target, int access)
- * C function: void * glMapBuffer(GLenum target, GLenum access);
- */
-JNIEXPORT jlong JNICALL
-Java_com_jogamp_opengl_impl_gl2es12_GL2ES12Impl_dispatch_1glMapBuffer(JNIEnv *env, jobject _unused, jint target, jint access, jlong glProcAddress) {
- PFNGLMAPBUFFERPROC ptr_glMapBuffer;
- void * _res;
- ptr_glMapBuffer = (PFNGLMAPBUFFERPROC) (intptr_t) glProcAddress;
- assert(ptr_glMapBuffer != NULL);
- _res = (* ptr_glMapBuffer) ((GLenum) target, (GLenum) access);
- return (jlong) (intptr_t) _res;
-}
-
-/* Java->C glue code:
- * Java package: com.jogamp.opengl.impl.gl2es12.GL2ES12Impl
- * Java method: ByteBuffer newDirectByteBuffer(long addr, int capacity);
- * C function: jobject newDirectByteBuffer(jlong addr, jint capacity);
- */
-JNIEXPORT jobject JNICALL
-Java_com_jogamp_opengl_impl_gl2es12_GL2ES12Impl_newDirectByteBuffer(JNIEnv *env, jobject _unused, jlong addr, jint capacity) {
- return (*env)->NewDirectByteBuffer(env, (void*) (intptr_t) addr, capacity);
-}
diff --git a/make/config/jogl/obsolete/gl-impl-CustomCCode-gl3.c b/make/config/jogl/obsolete/gl-impl-CustomCCode-gl3.c
deleted file mode 100644
index f540a7d4a..000000000
--- a/make/config/jogl/obsolete/gl-impl-CustomCCode-gl3.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Java->C glue code:
- * Java package: com.jogamp.opengl.impl.gl3.GL3Impl
- * Java method: long dispatch_glMapBuffer(int target, int access)
- * C function: void * glMapBuffer(GLenum target, GLenum access);
- */
-JNIEXPORT jlong JNICALL
-Java_com_jogamp_opengl_impl_gl3_GL3Impl_dispatch_1glMapBuffer(JNIEnv *env, jobject _unused, jint target, jint access, jlong glProcAddress) {
- PFNGLMAPBUFFERPROC ptr_glMapBuffer;
- void * _res;
- ptr_glMapBuffer = (PFNGLMAPBUFFERPROC) (intptr_t) glProcAddress;
- assert(ptr_glMapBuffer != NULL);
- _res = (* ptr_glMapBuffer) ((GLenum) target, (GLenum) access);
- return (jlong) (intptr_t) _res;
-}
-
-/* Java->C glue code:
- * Java package: com.jogamp.opengl.impl.gl3.GL3Impl
- * Java method: ByteBuffer newDirectByteBuffer(long addr, int capacity);
- * C function: jobject newDirectByteBuffer(jlong addr, jint capacity);
- */
-JNIEXPORT jobject JNICALL
-Java_com_jogamp_opengl_impl_gl3_GL3Impl_newDirectByteBuffer(JNIEnv *env, jobject _unused, jlong addr, jint capacity) {
- return (*env)->NewDirectByteBuffer(env, (void*) (intptr_t) addr, capacity);
-}
diff --git a/make/config/jogl/obsolete/gl-impl-CustomJavaCode-gl2.java b/make/config/jogl/obsolete/gl-impl-CustomJavaCode-gl2.java
deleted file mode 100644
index a1a6917df..000000000
--- a/make/config/jogl/obsolete/gl-impl-CustomJavaCode-gl2.java
+++ /dev/null
@@ -1,385 +0,0 @@
-// Tracks glBegin/glEnd calls to determine whether it is legal to
-// query Vertex Buffer Object state
-private boolean inBeginEndPair;
-
-/* FIXME: refactor dependence on Java 2D / JOGL bridge
-
-// Tracks creation and destruction of server-side OpenGL objects when
-// the Java2D/OpenGL pipeline is enabled and it is using frame buffer
-// objects (FBOs) to do its rendering
-private GLObjectTracker tracker;
-
-public void setObjectTracker(GLObjectTracker tracker) {
- this.tracker = tracker;
-}
-
-*/
-
-
-public GL2Impl(GLProfile glp, GLContextImpl context) {
- this._context = context;
- this.bufferSizeTracker = context.getBufferSizeTracker();
- this.bufferStateTracker = context.getBufferStateTracker();
- this.glStateTracker = context.getGLStateTracker();
- this.glProfile = glp;
-}
-
-/**
- * Provides platform-independent access to the wglAllocateMemoryNV /
- * glXAllocateMemoryNV extension.
- */
-public java.nio.ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3) {
- return _context.glAllocateMemoryNV(arg0, arg1, arg2, arg3);
-}
-
-//
-// Helpers for ensuring the correct amount of texture data
-//
-
-/** Returns the number of bytes required to fill in the appropriate
- texture. This is computed as closely as possible based on the
- pixel pack or unpack parameters. The logic in this routine is
- based on code in the SGI OpenGL sample implementation. */
-
-private int imageSizeInBytes(int format, int type, int w, int h, int d,
- boolean pack) {
- int elements = 0;
- int esize = 0;
-
- if (w < 0) return 0;
- if (h < 0) return 0;
- if (d < 0) return 0;
- switch (format) {
- case GL_COLOR_INDEX:
- case GL_STENCIL_INDEX:
- elements = 1;
- break;
- case GL_RED:
- case GL_GREEN:
- case GL_BLUE:
- case GL_ALPHA:
- case GL_LUMINANCE:
- case GL_DEPTH_COMPONENT:
- elements = 1;
- break;
- case GL_LUMINANCE_ALPHA:
- elements = 2;
- break;
- case GL_RGB:
- case GL_BGR:
- elements = 3;
- break;
- case GL_RGBA:
- case GL_BGRA:
- case GL_ABGR_EXT:
- elements = 4;
- break;
- /* FIXME ??
- case GL_HILO_NV:
- elements = 2;
- break; */
- default:
- return 0;
- }
- switch (type) {
- case GL_BITMAP:
- if (format == GL_COLOR_INDEX) {
- return (d * (h * ((w+7)/8)));
- } else {
- return 0;
- }
- case GL_BYTE:
- case GL_UNSIGNED_BYTE:
- esize = 1;
- break;
- case GL_UNSIGNED_BYTE_3_3_2:
- case GL_UNSIGNED_BYTE_2_3_3_REV:
- esize = 1;
- elements = 1;
- break;
- case GL_SHORT:
- case GL_UNSIGNED_SHORT:
- esize = 2;
- break;
- case GL_UNSIGNED_SHORT_5_6_5:
- case GL_UNSIGNED_SHORT_5_6_5_REV:
- case GL_UNSIGNED_SHORT_4_4_4_4:
- case GL_UNSIGNED_SHORT_4_4_4_4_REV:
- case GL_UNSIGNED_SHORT_5_5_5_1:
- case GL_UNSIGNED_SHORT_1_5_5_5_REV:
- esize = 2;
- elements = 1;
- break;
- case GL_INT:
- case GL_UNSIGNED_INT:
- case GL_FLOAT:
- esize = 4;
- break;
- case GL_UNSIGNED_INT_8_8_8_8:
- case GL_UNSIGNED_INT_8_8_8_8_REV:
- case GL_UNSIGNED_INT_10_10_10_2:
- case GL_UNSIGNED_INT_2_10_10_10_REV:
- esize = 4;
- elements = 1;
- break;
- default:
- return 0;
- }
- return imageSizeInBytes(elements * esize, w, h, d, pack);
-}
-
-private GLBufferSizeTracker bufferSizeTracker;
-private GLBufferStateTracker bufferStateTracker;
-private GLStateTracker glStateTracker;
-
-private boolean bufferObjectExtensionsInitialized = false;
-private boolean haveARBPixelBufferObject;
-private boolean haveEXTPixelBufferObject;
-private boolean haveGL15;
-private boolean haveGL21;
-private boolean haveARBVertexBufferObject;
-
-private void initBufferObjectExtensionChecks() {
- if (bufferObjectExtensionsInitialized)
- return;
- bufferObjectExtensionsInitialized = true;
- haveARBPixelBufferObject = isExtensionAvailable("GL_ARB_pixel_buffer_object");
- haveEXTPixelBufferObject = isExtensionAvailable("GL_EXT_pixel_buffer_object");
- haveGL15 = isExtensionAvailable("GL_VERSION_1_5");
- haveGL21 = isExtensionAvailable("GL_VERSION_2_1");
- haveARBVertexBufferObject = isExtensionAvailable("GL_ARB_vertex_buffer_object");
-}
-
-private boolean checkBufferObject(boolean extension1,
- boolean extension2,
- boolean extension3,
- boolean enabled,
- int state,
- String kind, boolean throwException) {
- if (inBeginEndPair) {
- throw new GLException("May not call this between glBegin and glEnd");
- }
- boolean avail = (extension1 || extension2 || extension3);
- if (!avail) {
- if (!enabled)
- return true;
- if(throwException) {
- throw new GLException("Required extensions not available to call this function");
- }
- return false;
- }
- int buffer = bufferStateTracker.getBoundBufferObject(state, this);
- if (enabled) {
- if (buffer == 0) {
- if(throwException) {
- throw new GLException(kind + " must be enabled to call this method");
- }
- return false;
- }
- } else {
- if (buffer != 0) {
- if(throwException) {
- throw new GLException(kind + " must be disabled to call this method");
- }
- return false;
- }
- }
- return true;
-}
-
-private boolean checkArrayVBODisabled(boolean throwException) {
- initBufferObjectExtensionChecks();
- return checkBufferObject(haveGL15,
- haveARBVertexBufferObject,
- false,
- false,
- GL.GL_ARRAY_BUFFER,
- "array vertex_buffer_object", throwException);
-}
-
-private boolean checkArrayVBOEnabled(boolean throwException) {
- initBufferObjectExtensionChecks();
- return checkBufferObject(haveGL15,
- haveARBVertexBufferObject,
- false,
- true,
- GL.GL_ARRAY_BUFFER,
- "array vertex_buffer_object", throwException);
-}
-
-private boolean checkElementVBODisabled(boolean throwException) {
- initBufferObjectExtensionChecks();
- return checkBufferObject(haveGL15,
- haveARBVertexBufferObject,
- false,
- false,
- GL.GL_ELEMENT_ARRAY_BUFFER,
- "element vertex_buffer_object", throwException);
-}
-
-private boolean checkElementVBOEnabled(boolean throwException) {
- initBufferObjectExtensionChecks();
- return checkBufferObject(haveGL15,
- haveARBVertexBufferObject,
- false,
- true,
- GL.GL_ELEMENT_ARRAY_BUFFER,
- "element vertex_buffer_object", throwException);
-}
-
-private boolean checkUnpackPBODisabled(boolean throwException) {
- initBufferObjectExtensionChecks();
- return checkBufferObject(haveARBPixelBufferObject,
- haveEXTPixelBufferObject,
- haveGL21,
- false,
- GL2.GL_PIXEL_UNPACK_BUFFER,
- "unpack pixel_buffer_object", throwException);
-}
-
-private boolean checkUnpackPBOEnabled(boolean throwException) {
- initBufferObjectExtensionChecks();
- return checkBufferObject(haveARBPixelBufferObject,
- haveEXTPixelBufferObject,
- haveGL21,
- true,
- GL2.GL_PIXEL_UNPACK_BUFFER,
- "unpack pixel_buffer_object", throwException);
-}
-
-private boolean checkPackPBODisabled(boolean throwException) {
- initBufferObjectExtensionChecks();
- return checkBufferObject(haveARBPixelBufferObject,
- haveEXTPixelBufferObject,
- haveGL21,
- false,
- GL2.GL_PIXEL_PACK_BUFFER,
- "pack pixel_buffer_object", throwException);
-}
-
-private boolean checkPackPBOEnabled(boolean throwException) {
- initBufferObjectExtensionChecks();
- return checkBufferObject(haveARBPixelBufferObject,
- haveEXTPixelBufferObject,
- haveGL21,
- true,
- GL2.GL_PIXEL_PACK_BUFFER,
- "pack pixel_buffer_object", throwException);
-}
-
-public boolean glIsPBOPackEnabled() {
- return checkPackPBOEnabled(false);
-}
-
-public boolean glIsPBOUnpackEnabled() {
- return checkUnpackPBOEnabled(false);
-}
-
-// Attempt to return the same ByteBuffer object from glMapBuffer if
-// the vertex buffer object's base address and size haven't changed
-private static class ARBVBOKey {
- private long addr;
- private int capacity;
-
- ARBVBOKey(long addr, int capacity) {
- this.addr = addr;
- this.capacity = capacity;
- }
-
- public int hashCode() {
- return (int) addr;
- }
-
- public boolean equals(Object o) {
- if ((o == null) || (!(o instanceof ARBVBOKey))) {
- return false;
- }
-
- ARBVBOKey other = (ARBVBOKey) o;
- return ((addr == other.addr) && (capacity == other.capacity));
- }
-}
-
-private Map/*
LPVOID glMapBuffer(GLenum target, GLenum access);
*/
-public java.nio.ByteBuffer glMapBuffer(int target, int access) {
- final long __addr_ = ((GL2ProcAddressTable)_context.getGLProcAddressTable())._addressof_glMapBuffer;
- if (__addr_ == 0) {
- throw new GLException("Method \"glMapBuffer\" not available");
- }
- int sz = bufferSizeTracker.getBufferSize(bufferStateTracker,
- target,
- this);
- long addr;
- addr = dispatch_glMapBuffer(target, access, __addr_);
- if (addr == 0 || sz == 0) {
- return null;
- }
- ARBVBOKey key = new ARBVBOKey(addr, sz);
- ByteBuffer _res = (ByteBuffer) arbVBOCache.get(key);
- if (_res == null) {
- _res = newDirectByteBuffer(addr, sz);
- InternalBufferUtil.nativeOrder(_res);
- arbVBOCache.put(key, _res);
- }
- _res.position(0);
- return _res;
-}
-
-/** Encapsulates function pointer for OpenGL function
: LPVOID glMapBuffer(GLenum target, GLenum access);
*/
-native private long dispatch_glMapBuffer(int target, int access, long glProcAddress);
-
-native private ByteBuffer newDirectByteBuffer(long addr, int capacity);
-
- /** Dummy implementation for the ES 2.0 function:
void {@native glShaderBinary}(GLint n, const GLuint * shaders, GLenum binaryformat, const void * binary, GLint length);
Always throws a GLException! */
- public void glShaderBinary(int n, java.nio.IntBuffer shaders, int binaryformat, java.nio.Buffer binary, int length) {
- throw new GLException("Method \"glShaderBinary\" not available");
- }
-
- /** Dummy implementation for the ES 2.0 function:
void {@native glShaderBinary}(GLint n, const GLuint * shaders, GLenum binaryformat, const void * binary, GLint length);
Always throws a GLException! */
- public void glShaderBinary(int n, int[] shaders, int shaders_offset, int binaryformat, java.nio.Buffer binary, int length) {
- throw new GLException("Method \"glShaderBinary\" not available");
- }
-
- public void glReleaseShaderCompiler() {
- // nothing to do
- }
-
- public void glVertexPointer(GLArrayData array) {
- if(array.getComponentNumber()==0) return;
- if(array.isVBO()) {
- glVertexPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset());
- } else {
- glVertexPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer());
- }
- }
- public void glColorPointer(GLArrayData array) {
- if(array.getComponentNumber()==0) return;
- if(array.isVBO()) {
- glColorPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset());
- } else {
- glColorPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer());
- }
-
- }
- public void glNormalPointer(GLArrayData array) {
- if(array.getComponentNumber()==0) return;
- if(array.getComponentNumber()!=3) {
- throw new GLException("Only 3 components per normal allowed");
- }
- if(array.isVBO()) {
- glNormalPointer(array.getComponentType(), array.getStride(), array.getOffset());
- } else {
- glNormalPointer(array.getComponentType(), array.getStride(), array.getBuffer());
- }
- }
- public void glTexCoordPointer(GLArrayData array) {
- if(array.getComponentNumber()==0) return;
- if(array.isVBO()) {
- glTexCoordPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset());
- } else {
- glTexCoordPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer());
- }
- }
-
diff --git a/make/config/jogl/obsolete/gl-impl-CustomJavaCode-gl2es12.java b/make/config/jogl/obsolete/gl-impl-CustomJavaCode-gl2es12.java
deleted file mode 100644
index aed442da3..000000000
--- a/make/config/jogl/obsolete/gl-impl-CustomJavaCode-gl2es12.java
+++ /dev/null
@@ -1,353 +0,0 @@
-// Tracks glBegin/glEnd calls to determine whether it is legal to
-// query Vertex Buffer Object state
-private boolean inBeginEndPair;
-
-/* FIXME: refactor dependence on Java 2D / JOGL bridge
-
-// Tracks creation and destruction of server-side OpenGL objects when
-// the Java2D/OpenGL pipeline is enabled and it is using frame buffer
-// objects (FBOs) to do its rendering
-private GLObjectTracker tracker;
-
-public void setObjectTracker(GLObjectTracker tracker) {
- this.tracker = tracker;
-}
-
-*/
-
-public GL2ES12Impl(GLProfile glp, GLContextImpl context) {
- this._context = context;
- this.bufferSizeTracker = context.getBufferSizeTracker();
- this.bufferStateTracker = context.getBufferStateTracker();
- this.glStateTracker = context.getGLStateTracker();
- this.isGL2ES2 = glp.isGL2ES2();
- this.glProfile = glp;
-}
-
-private boolean isGL2ES2;
-
-public boolean isFunctionAvailable(String glFunctionName) {
- return _context.isFunctionAvailable(glFunctionName);
-}
-
-public boolean isExtensionAvailable(String glExtensionName) {
- return _context.isExtensionAvailable(glExtensionName);
-}
-
-public Object getExtension(String extensionName) {
- // At this point we don't expose any extensions using this mechanism
- return null;
-}
-
-/** Returns the context this GL object is associated with for better
- error checking by DebugGL. */
-public GLContext getContext() {
- return _context;
-}
-
-private GLContextImpl _context;
-
-public void setSwapInterval(int interval) {
- _context.setSwapInterval(interval);
-}
-
-public int getSwapInterval() {
- return _context.getSwapInterval();
-}
-
-public Object getPlatformGLExtensions() {
- return _context.getPlatformGLExtensions();
-}
-
-//
-// Helpers for ensuring the correct amount of texture data
-//
-
-/** Returns the number of bytes required to fill in the appropriate
- texture. This is computed as closely as possible based on the
- pixel pack or unpack parameters. The logic in this routine is
- based on code in the SGI OpenGL sample implementation. */
-
-private int imageSizeInBytes(int format, int type, int w, int h, int d,
- boolean pack) {
- int elements = 0;
- int esize = 0;
-
- if (w < 0) return 0;
- if (h < 0) return 0;
- if (d < 0) return 0;
- switch (format) {
- case GL_STENCIL_INDEX:
- elements = 1;
- break;
- case GL_ALPHA:
- case GL_LUMINANCE:
- case GL_DEPTH_COMPONENT:
- elements = 1;
- break;
- case GL_LUMINANCE_ALPHA:
- elements = 2;
- break;
- case GL_RGB:
- elements = 3;
- break;
- case GL_RGBA:
- elements = 4;
- break;
- /* FIXME ??
- case GL_HILO_NV:
- elements = 2;
- break; */
- default:
- return 0;
- }
- switch (type) {
- case GL_BYTE:
- case GL_UNSIGNED_BYTE:
- esize = 1;
- break;
- case GL_SHORT:
- case GL_UNSIGNED_SHORT:
- esize = 2;
- break;
- case GL_UNSIGNED_SHORT_5_6_5:
- case GL_UNSIGNED_SHORT_4_4_4_4:
- case GL_UNSIGNED_SHORT_5_5_5_1:
- esize = 2;
- elements = 1;
- break;
- case GL_INT:
- case GL_UNSIGNED_INT:
- case GL_FLOAT:
- esize = 4;
- break;
- default:
- return 0;
- }
- return imageSizeInBytes(elements * esize, w, h, d, pack);
-}
-
-private GLBufferSizeTracker bufferSizeTracker;
-private GLBufferStateTracker bufferStateTracker;
-private GLStateTracker glStateTracker;
-
-private boolean bufferObjectExtensionsInitialized = false;
-private boolean haveGL15;
-private boolean haveGL21;
-private boolean haveARBVertexBufferObject;
-
-private void initBufferObjectExtensionChecks() {
- if (bufferObjectExtensionsInitialized)
- return;
- bufferObjectExtensionsInitialized = true;
- haveGL15 = isExtensionAvailable("GL_VERSION_1_5");
- haveGL21 = isExtensionAvailable("GL_VERSION_2_1");
- haveARBVertexBufferObject = isExtensionAvailable("GL_ARB_vertex_buffer_object");
-}
-
-private boolean checkBufferObject(boolean extension1,
- boolean extension2,
- boolean extension3,
- boolean enabled,
- int state,
- String kind, boolean throwException) {
- if (inBeginEndPair) {
- throw new GLException("May not call this between glBegin and glEnd");
- }
- boolean avail = (extension1 || extension2 || extension3);
- if (!avail) {
- if (!enabled)
- return true;
- if(throwException) {
- throw new GLException("Required extensions not available to call this function");
- }
- return false;
- }
- int buffer = bufferStateTracker.getBoundBufferObject(state, this);
- if (enabled) {
- if (buffer == 0) {
- if(throwException) {
- throw new GLException(kind + " must be enabled to call this method");
- }
- return false;
- }
- } else {
- if (buffer != 0) {
- if(throwException) {
- throw new GLException(kind + " must be disabled to call this method");
- }
- return false;
- }
- }
- return true;
-}
-
-private boolean checkArrayVBODisabled(boolean throwException) {
- initBufferObjectExtensionChecks();
- return checkBufferObject(haveGL15,
- haveARBVertexBufferObject,
- false,
- false,
- GL.GL_ARRAY_BUFFER,
- "array vertex_buffer_object", throwException);
-}
-
-private boolean checkArrayVBOEnabled(boolean throwException) {
- initBufferObjectExtensionChecks();
- return checkBufferObject(haveGL15,
- haveARBVertexBufferObject,
- false,
- true,
- GL.GL_ARRAY_BUFFER,
- "array vertex_buffer_object", throwException);
-}
-
-private boolean checkElementVBODisabled(boolean throwException) {
- initBufferObjectExtensionChecks();
- return checkBufferObject(haveGL15,
- haveARBVertexBufferObject,
- false,
- false,
- GL.GL_ELEMENT_ARRAY_BUFFER,
- "element vertex_buffer_object", throwException);
-}
-
-private boolean checkElementVBOEnabled(boolean throwException) {
- initBufferObjectExtensionChecks();
- return checkBufferObject(haveGL15,
- haveARBVertexBufferObject,
- false,
- true,
- GL.GL_ELEMENT_ARRAY_BUFFER,
- "element vertex_buffer_object", throwException);
-}
-
-private boolean checkUnpackPBODisabled(boolean throwException) {
- // PBO n/a for ES 1.1 or ES 2.0
- return true;
-}
-
-private boolean checkUnpackPBOEnabled(boolean throwException) {
- // PBO n/a for ES 1.1 or ES 2.0
- return false;
-}
-
-private boolean checkPackPBODisabled(boolean throwException) {
- // PBO n/a for ES 1.1 or ES 2.0
- return true;
-}
-
-private boolean checkPackPBOEnabled(boolean throwException) {
- // PBO n/a for ES 1.1 or ES 2.0
- return false;
-}
-
-// Attempt to return the same ByteBuffer object from glMapBuffer if
-// the vertex buffer object's base address and size haven't changed
-private static class ARBVBOKey {
- private long addr;
- private int capacity;
-
- ARBVBOKey(long addr, int capacity) {
- this.addr = addr;
- this.capacity = capacity;
- }
-
- public int hashCode() {
- return (int) addr;
- }
-
- public boolean equals(Object o) {
- if ((o == null) || (!(o instanceof ARBVBOKey))) {
- return false;
- }
-
- ARBVBOKey other = (ARBVBOKey) o;
- return ((addr == other.addr) && (capacity == other.capacity));
- }
-}
-
-private Map/*
LPVOID glMapBuffer(GLenum target, GLenum access);
*/
-public java.nio.ByteBuffer glMapBuffer(int target, int access) {
- final long __addr_ = ((GL2ES12ProcAddressTable)_context.getGLProcAddressTable())._addressof_glMapBuffer;
- if (__addr_ == 0) {
- throw new GLException("Method \"glMapBuffer\" not available");
- }
- int sz = bufferSizeTracker.getBufferSize(bufferStateTracker,
- target,
- this);
- long addr;
- addr = dispatch_glMapBuffer(target, access, __addr_);
- if (addr == 0 || sz == 0) {
- return null;
- }
- ARBVBOKey key = new ARBVBOKey(addr, sz);
- ByteBuffer _res = (ByteBuffer) arbVBOCache.get(key);
- if (_res == null) {
- _res = newDirectByteBuffer(addr, sz);
- InternalBufferUtil.nativeOrder(_res);
- arbVBOCache.put(key, _res);
- }
- _res.position(0);
- return _res;
-}
-
-/** Encapsulates function pointer for OpenGL function
: LPVOID glMapBuffer(GLenum target, GLenum access);
*/
-native private long dispatch_glMapBuffer(int target, int access, long glProcAddress);
-
-native private ByteBuffer newDirectByteBuffer(long addr, int capacity);
-
- /** Dummy implementation for the ES 2.0 function:
void {@native glShaderBinary}(GLint n, const GLuint * shaders, GLenum binaryformat, const void * binary, GLint length);
Always throws a GLException! */
- public void glShaderBinary(int n, java.nio.IntBuffer shaders, int binaryformat, java.nio.Buffer binary, int length) {
- throw new GLException("Method \"glShaderBinary\" not available");
- }
-
- /** Dummy implementation for the ES 2.0 function:
void {@native glShaderBinary}(GLint n, const GLuint * shaders, GLenum binaryformat, const void * binary, GLint length);
Always throws a GLException! */
- public void glShaderBinary(int n, int[] shaders, int shaders_offset, int binaryformat, java.nio.Buffer binary, int length) {
- throw new GLException("Method \"glShaderBinary\" not available");
- }
-
- public void glReleaseShaderCompiler() {
- // nothing to do
- }
-
- public void glVertexPointer(GLArrayData array) {
- if(array.getComponentNumber()==0) return;
- if(array.isVBO()) {
- glVertexPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset());
- } else {
- glVertexPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer());
- }
- }
- public void glColorPointer(GLArrayData array) {
- if(array.getComponentNumber()==0) return;
- if(array.isVBO()) {
- glColorPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset());
- } else {
- glColorPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer());
- }
-
- }
- public void glNormalPointer(GLArrayData array) {
- if(array.getComponentNumber()==0) return;
- if(array.getComponentNumber()!=3) {
- throw new GLException("Only 3 components per normal allowed");
- }
- if(array.isVBO()) {
- glNormalPointer(array.getComponentType(), array.getStride(), array.getOffset());
- } else {
- glNormalPointer(array.getComponentType(), array.getStride(), array.getBuffer());
- }
- }
- public void glTexCoordPointer(GLArrayData array) {
- if(array.getComponentNumber()==0) return;
- if(array.isVBO()) {
- glTexCoordPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset());
- } else {
- glTexCoordPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer());
- }
- }
-
-
diff --git a/make/lstjars.sh b/make/lstjars.sh
index 7691bfa2d..3837be5e3 100644
--- a/make/lstjars.sh
+++ b/make/lstjars.sh
@@ -47,7 +47,7 @@ function listdeployment() {
echo
echo JOGL GL2ES12 NEWT
- report gluegen-rt.$JAR_SUFFIX nativewindow.all-noawt.$JAR_SUFFIX jogl.core.$JAR_SUFFIX jogl.util.$JAR_SUFFIX jogl.os.$OSS.$JAR_SUFFIX newt.all-noawt.$JAR_SUFFIX libgluegen-rt.so.gz libnewt.so.gz libnativewindow_$OSS.so.gz
+ report gluegen-rt.$JAR_SUFFIX nativewindow.all-noawt.$JAR_SUFFIX jogl.core.$JAR_SUFFIX jogl.util.$JAR_SUFFIX jogl.os.$OSS.$JAR_SUFFIX jogl.gl2es12.$JAR_SUFFIX newt.all-noawt.$JAR_SUFFIX libgluegen-rt.so.gz libjogl_gl2es12.so.gz libnewt.so.gz libnativewindow_$OSS.so.gz
echo
echo JOGL GL2 NEWT
@@ -125,8 +125,8 @@ mkdir -p nope
mv *.cdc.lst *.all*.lst nope/
-mv jogl.gldesktop.*.lst nope/
-echo duplicates - w/o gldesktop.*
+mv jogl.gl2es12.*.lst jogl.gldesktop.*.lst nope/
+echo duplicates - w/o gl2es12.* gldesktop.*
echo
sort jogl*.lst | uniq -d
mv nope/* .
diff --git a/make/make.jogl.all.linux-x86_64.sh b/make/make.jogl.all.linux-x86_64.sh
index 8ebcc8744..b6c5e9d63 100644
--- a/make/make.jogl.all.linux-x86_64.sh
+++ b/make/make.jogl.all.linux-x86_64.sh
@@ -16,6 +16,7 @@ fi
# -Dbuild.noarchives=true \
ant \
+ -Dbuild.noarchives=true \
-Djogl.cg=1 -Dx11.cg.lib=../../lib-linux-x86_64 \
-Drootrel.build=build-x86_64 \
-DuseKD=true \
diff --git a/make/make.jogl.all.win64.bat b/make/make.jogl.all.win64.bat
new file mode 100644
index 000000000..508067d57
--- /dev/null
+++ b/make/make.jogl.all.win64.bat
@@ -0,0 +1,17 @@
+set THISDIR="C:\JOGL"
+
+set J2RE_HOME=c:\jre1.6.0_19
+set JAVA_HOME=c:\jdk1.6.0_19
+set ANT_PATH=C:\apache-ant-1.8.0
+
+set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw-w64\bin;c:\mingw\bin;%PATH%
+
+set LIB_GEN=%THISDIR%\lib
+set CLASSPATH=.;%THISDIR%\build-win64\classes
+REM -Dc.compiler.debug=true
+REM -DuseOpenMAX=true
+REM -DuseKD=true
+REM -Djogl.cg=1 -D-Dwindows.cg.lib=C:\Cg-2.2
+REM -Dbuild.noarchives=true
+
+ant -Drootrel.build=build-win64 -Djogl.cg=1 -Dwindows.cg.lib=C:\Cg-2.2\lib %1 %2 %3 %4 %5 %6 %7 %8 %9 > make.jogl.all.win64.log 2>&1
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/ExtensionAvailabilityCache.java b/src/jogl/classes/com/jogamp/opengl/impl/ExtensionAvailabilityCache.java
index 1ed0396a9..9d1235e13 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/ExtensionAvailabilityCache.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/ExtensionAvailabilityCache.java
@@ -113,9 +113,7 @@ public final class ExtensionAvailabilityCache {
boolean useGetStringi = false;
- if ( context.getGLVersionMajor() > 3 ||
- ( context.getGLVersionMajor() == 3 && context.getGLVersionMinor() >= 0 ) ||
- gl.isGL3() ) {
+ if ( gl.isGL2GL3() ) {
if ( ! gl.isFunctionAvailable("glGetStringi") ) {
if(DEBUG) {
System.err.println("GLContext: GL >= 3.1 usage, but no glGetStringi");
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java b/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java
index 3abb69a7f..7143344bf 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java
@@ -602,10 +602,7 @@ public abstract class GLContextImpl extends GLContext {
//
private Object createInstance(GLProfile glp, String suffix, Class[] cstrArgTypes, Object[] cstrArgs) {
- try {
- return ReflectionUtil.createInstance(glp.getGLImplBaseClassName()+suffix, cstrArgTypes, cstrArgs);
- } catch (JogampRuntimeException jre) { /* n/a .. */ }
- return null;
+ return ReflectionUtil.createInstance(glp.getGLImplBaseClassName()+suffix, cstrArgTypes, cstrArgs);
}
/** Create the GL for this context. */
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/GLJNILibLoader.java b/src/jogl/classes/com/jogamp/opengl/impl/GLJNILibLoader.java
index 7747b014b..c3958eedf 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/GLJNILibLoader.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/GLJNILibLoader.java
@@ -67,6 +67,15 @@ public class GLJNILibLoader extends JNILibLoaderBase {
});
}
+ public static void loadGLDesktopES12() {
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ loadLibrary("jogl_gl2es12", nativeOSPreload, true);
+ return null;
+ }
+ });
+ }
+
public static void loadES2() {
AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXContext.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXContext.java
index 7d907bf28..dce25978c 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXContext.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXContext.java
@@ -308,7 +308,7 @@ public abstract class X11GLXContext extends GLContextImpl {
}
}
} else {
- if(!glp.isGL2()) {
+ if(glp.isGL3()) {
glXMakeContextCurrent(display, 0, 0, 0);
GLX.glXDestroyContext(display, temp_context);
throw new GLException("X11GLXContext.createContext failed, but context > GL2 requested "+getGLVersion(null, major[0], minor[0], ctp[0], "@creation")+", ");
diff --git a/src/jogl/classes/javax/media/opengl/GLProfile.java b/src/jogl/classes/javax/media/opengl/GLProfile.java
index 9e3a532e6..0e10b32b3 100644
--- a/src/jogl/classes/javax/media/opengl/GLProfile.java
+++ b/src/jogl/classes/javax/media/opengl/GLProfile.java
@@ -63,29 +63,36 @@ public class GLProfile implements Cloneable {
// Query platform available OpenGL implementation
//
- public static final boolean isGL4bcAvailable() { return hasGL4bcImpl; }
- public static final boolean isGL4Available() { return hasGL4Impl; }
- public static final boolean isGL3bcAvailable() { return hasGL3bcImpl; }
- public static final boolean isGL3Available() { return hasGL3Impl; }
- public static final boolean isGL2Available() { return hasGL2Impl; }
- public static final boolean isGLES2Available() { return hasGLES2Impl; }
- public static final boolean isGLES1Available() { return hasGLES1Impl; }
+ public static final boolean isGL4bcAvailable() { return null != mappedProfiles.get(GL4bc); }
+ public static final boolean isGL4Available() { return null != mappedProfiles.get(GL4); }
+ public static final boolean isGL3bcAvailable() { return null != mappedProfiles.get(GL3bc); }
+ public static final boolean isGL3Available() { return null != mappedProfiles.get(GL3); }
+ public static final boolean isGL2Available() { return null != mappedProfiles.get(GL2); }
+ public static final boolean isGLES2Available() { return null != mappedProfiles.get(GLES2); }
+ public static final boolean isGLES1Available() { return null != mappedProfiles.get(GLES1); }
+ public static final boolean isGL2ES1Available() { return null != mappedProfiles.get(GL2ES1); }
+ public static final boolean isGL2ES2Available() { return null != mappedProfiles.get(GL2ES2); }
+
public static final String glAvailabilityToString() {
StringBuffer sb = new StringBuffer();
sb.append("GLAvailability[Native[GL4bc ");
- sb.append(hasGL4bcImpl);
+ sb.append(isGL4bcAvailable());
sb.append(", GL4 ");
- sb.append(hasGL4Impl);
+ sb.append(isGL4Available());
sb.append(", GL3bc ");
- sb.append(hasGL3bcImpl);
+ sb.append(isGL3bcAvailable());
sb.append(", GL3 ");
- sb.append(hasGL3Impl);
+ sb.append(isGL3Available());
sb.append(", GL2 ");
- sb.append(hasGL2Impl);
+ sb.append(isGL2Available());
+ sb.append(", GL2ES1 ");
+ sb.append(isGL2ES1Available());
sb.append(", GLES1 ");
- sb.append(hasGLES1Impl);
+ sb.append(isGLES1Available());
+ sb.append(", GL2ES2 ");
+ sb.append(isGL2ES2Available());
sb.append(", GLES2 ");
- sb.append(hasGLES2Impl);
+ sb.append(isGLES2Available());
sb.append("], Profiles[");
for(Iterator i=mappedProfiles.values().iterator(); i.hasNext(); ) {
sb.append(((GLProfile)i.next()).toString());
@@ -344,6 +351,8 @@ public class GLProfile implements Cloneable {
GL3.equals(profileImpl) ||
GL2.equals(profileImpl) ) {
return "com.jogamp.opengl.impl.gl4.GL4bc";
+ } else if(GL2ES12.equals(profileImpl)) {
+ return "com.jogamp.opengl.impl.gl2es12.GL2ES12";
} else if(GLES1.equals(profileImpl) || GL2ES1.equals(profileImpl)) {
return "com.jogamp.opengl.impl.es1.GLES1";
} else if(GLES2.equals(profileImpl) || GL2ES2.equals(profileImpl)) {
@@ -767,6 +776,10 @@ public class GLProfile implements Cloneable {
return "GLProfile[" + profile + "/" + profileImpl + "]";
}
+ // The intersection between desktop OpenGL and the union of the OpenGL ES profiles
+ // This is here only to avoid having separate GL2ES1Impl and GL2ES2Impl classes
+ private static final String GL2ES12 = "GL2ES12";
+
private static final boolean isAWTAvailable;
private static final boolean isAWTJOGLAvailable;
@@ -776,6 +789,7 @@ public class GLProfile implements Cloneable {
private static /*final*/ boolean hasGL3bcImpl;
private static /*final*/ boolean hasGL3Impl;
private static /*final*/ boolean hasGL2Impl;
+ private static /*final*/ boolean hasGL2ES12Impl;
private static /*final*/ boolean hasGLES2Impl;
private static /*final*/ boolean hasGLES1Impl;
@@ -802,6 +816,7 @@ public class GLProfile implements Cloneable {
ReflectionUtil.isClassAvailable("javax.media.opengl.awt.GLCanvas") ; // JOGL
boolean hasDesktopGL = false;
+ boolean hasDesktopGLES12 = false;
boolean hasNativeOSFactory = false;
Throwable t;
@@ -833,12 +848,37 @@ public class GLProfile implements Cloneable {
}
}
+ t=null;
+ try {
+ // See DRIHack.java for an explanation of why this is necessary
+ DRIHack.begin();
+ GLJNILibLoader.loadGLDesktopES12();
+ DRIHack.end();
+ hasDesktopGLES12 = true;
+ } catch (UnsatisfiedLinkError ule) {
+ t=ule;
+ } catch (SecurityException se) {
+ t=se;
+ } catch (NullPointerException npe) {
+ t=npe;
+ } catch (RuntimeException re) {
+ t=re;
+ }
+ if(null!=t) {
+ if (DEBUG) {
+ System.err.println("GLProfile.static Desktop GLES12 Library not available");
+ t.printStackTrace();
+ }
+ }
+
+
hasGL234Impl = hasDesktopGL && ReflectionUtil.isClassAvailable("com.jogamp.opengl.impl.gl4.GL4bcImpl");
hasGL4bcImpl = hasGL234Impl;
hasGL4Impl = hasGL234Impl;
hasGL3bcImpl = hasGL234Impl;
hasGL3Impl = hasGL234Impl;
hasGL2Impl = hasGL234Impl;
+ hasGL2ES12Impl = hasDesktopGLES12 && ReflectionUtil.isClassAvailable("com.jogamp.opengl.impl.gl2es12.GL2ES12Impl");
mappedProfiles = computeProfileMap();
//
@@ -849,7 +889,7 @@ public class GLProfile implements Cloneable {
// which will register at GLContext ..
//
- if(hasDesktopGL) {
+ if(hasDesktopGL||hasDesktopGLES12) {
// if successfull it has a shared dummy drawable and context created
try {
hasNativeOSFactory = null != GLDrawableFactory.getFactoryImpl(GL2);
@@ -872,13 +912,15 @@ public class GLProfile implements Cloneable {
hasGL4Impl = false;
hasGL3bcImpl = false;
hasGL3Impl = false;
+ hasGL2ES12Impl = false;
hasGL2Impl = false;
} else {
- hasGL4bcImpl = GLContext.isGL4bcAvailable();
- hasGL4Impl = GLContext.isGL4Available();
- hasGL3bcImpl = GLContext.isGL3bcAvailable();
- hasGL3Impl = GLContext.isGL3Available();
- hasGL2Impl = GLContext.isGL2Available();
+ hasGL4bcImpl = hasGL4bcImpl && GLContext.isGL4bcAvailable();
+ hasGL4Impl = hasGL4Impl && GLContext.isGL4Available();
+ hasGL3bcImpl = hasGL3bcImpl && GLContext.isGL3bcAvailable();
+ hasGL3Impl = hasGL3Impl && GLContext.isGL3Available();
+ hasGL2Impl = hasGL2Impl && GLContext.isGL2Available();
+ hasGL2ES12Impl = hasGL2ES12Impl && GLContext.isGL2Available();
}
boolean btest = false;
@@ -934,7 +976,7 @@ public class GLProfile implements Cloneable {
mappedProfiles = computeProfileMap();
if(null==defaultGLProfile) {
- throw new GLException("No profile available: "+list2String(GL_PROFILE_LIST_ALL));
+ throw new GLException("No profile available: "+list2String(GL_PROFILE_LIST_ALL)+", "+glAvailabilityToString());
}
if (DEBUG) {
@@ -942,6 +984,7 @@ public class GLProfile implements Cloneable {
System.err.println("GLProfile.static isAWTJOGLAvailable "+isAWTJOGLAvailable);
System.err.println("GLProfile.static hasNativeOSFactory "+hasNativeOSFactory);
System.err.println("GLProfile.static hasDesktopGL "+hasDesktopGL);
+ System.err.println("GLProfile.static hasDesktopGLES12 "+hasDesktopGLES12);
System.err.println("GLProfile.static hasEGLDynLookup "+hasEGLDynLookup);
System.err.println("GLProfile.static hasEGLDrawableFactory "+hasEGLDrawableFactory);
System.err.println("GLProfile.static hasGL234Impl "+hasGL234Impl);
@@ -993,7 +1036,9 @@ public class GLProfile implements Cloneable {
*/
private static String computeProfileImpl(String profile) {
if (GL2ES1.equals(profile)) {
- if(hasGL2Impl) {
+ if(hasGL2ES12Impl) {
+ return GL2ES12;
+ } else if(hasGL2Impl) {
return GL2;
} else if(hasGL3bcImpl) {
return GL3bc;
@@ -1003,7 +1048,9 @@ public class GLProfile implements Cloneable {
return GLES1;
}
} else if (GL2ES2.equals(profile)) {
- if(hasGL2Impl) {
+ if(hasGL2ES12Impl) {
+ return GL2ES12;
+ } else if(hasGL2Impl) {
return GL2;
} else if(hasGL3Impl) {
return GL3;
--
cgit v1.2.3
From 012fca06f2539db232f0183f72187ec2f8ca54f5 Mon Sep 17 00:00:00 2001
From: Sven Gothel
+
+
+
diff --git a/doc/bouml/html-svg/classes.html b/doc/bouml/html-svg/classes.html
new file mode 100644
index 000000000..dd1a230ed
--- /dev/null
+++ b/doc/bouml/html-svg/classes.html
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+OpenGL Interfaces
+
+
+
diff --git a/doc/bouml/html-svg/classes_list.html b/doc/bouml/html-svg/classes_list.html
new file mode 100644
index 000000000..69e77a5ad
--- /dev/null
+++ b/doc/bouml/html-svg/classes_list.html
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+AbstractGraphicsConfiguration
+Capabilities
+GL interface
+GL2 interface
+GL2ES1 interface
+GL2ES12 entity
+GL2ES2 interface
+GL2GL3 interface
+GL3 interface
+GL3bc interface
+GL4 interface
+GL4bc interface
+GL4bcImpl entity
+GLBase interface
+GLCapabilities
+GLContext
+GLDrawable
+GLES1 interface
+GLES1Impl entity
+GLES2 interface
+GLES2Impl entity
+GLProfile
+NativeWindow interface
+
+
+
diff --git a/doc/bouml/html-svg/fig128069.svg b/doc/bouml/html-svg/fig128069.svg
new file mode 100644
index 000000000..77e4a0941
--- /dev/null
+++ b/doc/bouml/html-svg/fig128069.svg
@@ -0,0 +1,437 @@
+
+
+
+
diff --git a/doc/bouml/html-svg/index-withframe.html b/doc/bouml/html-svg/index-withframe.html
new file mode 100644
index 000000000..96f19466e
--- /dev/null
+++ b/doc/bouml/html-svg/index-withframe.html
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+AbstractGraphicsConfiguration
+
+Capabilities
+GL
+GL2
+GL2ES1
+GL2ES12
+GL2ES2
+GL2GL3
+GL3
+GL3bc
+GL4
+GL4bc
+GL4bcImpl
+GLBase
+GLCapabilities
+GLContext
+GLDrawable
+GLES1
+GLES1Impl
+GLES2
+GLES2Impl
+GLProfile
+NativeWindow
+Frame Alert
Link to Non-frame version.