*/
public static final int BITHINT_BLENDING_ENABLED = 1 << 0 ;
-
+
/**
* Bitfield hint, {@link #isHintMaskSet(int) if set}
* stating globally enabled {@link GL#GL_DEPTH_TEST}, otherwise disabled.
@@ -81,15 +82,15 @@ public class RenderState {
*/
public static final int BITHINT_GLOBAL_DEPTH_TEST_ENABLED = 1 << 1 ;
- public static RenderState createRenderState(Vertex.Factory extends Vertex> pointFactory) {
+ public static RenderState createRenderState(final Vertex.Factory extends Vertex> pointFactory) {
return new RenderState(pointFactory, null);
}
- public static RenderState createRenderState(Vertex.Factory extends Vertex> pointFactory, PMVMatrix pmvMatrix) {
+ public static RenderState createRenderState(final Vertex.Factory extends Vertex> pointFactory, final PMVMatrix pmvMatrix) {
return new RenderState(pointFactory, pmvMatrix);
}
- public static final RenderState getRenderState(GL2ES2 gl) {
+ public static final RenderState getRenderState(final GL2ES2 gl) {
return (RenderState) gl.getContext().getAttachedObject(thisKey);
}
@@ -167,13 +168,13 @@ public class RenderState {
return res;
}
- public StringBuilder toString(StringBuilder sb, boolean alsoUnlocated) {
+ public StringBuilder toString(StringBuilder sb, final boolean alsoUnlocated) {
if(null==sb) {
sb = new StringBuilder();
}
- sb.append("ProgramLocal[rsID ").append(rsId).append(Platform.NEWLINE);
+ sb.append("ProgramLocal[rsID ").append(rsId).append(PlatformPropsImpl.NEWLINE);
// pmvMatrix.toString(sb, "%.2f");
- sb.append(gcu_PMVMatrix01).append(", ").append(Platform.NEWLINE);
+ sb.append(gcu_PMVMatrix01).append(", ").append(PlatformPropsImpl.NEWLINE);
sb.append(gcu_ColorStatic).append(", ");
sb.append(gcu_Weight).append("]");
return sb;
@@ -185,7 +186,7 @@ public class RenderState {
}
}
- protected RenderState(Vertex.Factory extends Vertex> vertexFactory, PMVMatrix pmvMatrix) {
+ protected RenderState(final Vertex.Factory extends Vertex> vertexFactory, final PMVMatrix pmvMatrix) {
this.id = getNextID();
this.sp = null;
this.vertexFactory = vertexFactory;
@@ -226,11 +227,11 @@ public class RenderState {
public final PMVMatrix getMatrix() { return pmvMatrix; }
- public static boolean isWeightValid(float v) {
+ public static boolean isWeightValid(final float v) {
return 0.0f <= v && v <= 1.9f ;
}
public final float getWeight() { return weight[0]; }
- public final void setWeight(float v) {
+ public final void setWeight(final float v) {
if( !isWeightValid(v) ) {
throw new IllegalArgumentException("Weight out of range");
}
@@ -238,11 +239,11 @@ public class RenderState {
}
- public final float[] getColorStatic(float[] rgbaColor) {
+ public final float[] getColorStatic(final float[] rgbaColor) {
System.arraycopy(colorStatic, 0, rgbaColor, 0, 4);
return rgbaColor;
}
- public final void setColorStatic(float r, float g, float b, float a){
+ public final void setColorStatic(final float r, final float g, final float b, final float a){
colorStatic[0] = r;
colorStatic[1] = g;
colorStatic[2] = b;
@@ -301,7 +302,7 @@ public class RenderState {
* @param throwOnError TODO
* @return true if no error occured, i.e. all locations found, otherwise false.
*/
- public final boolean updateAttributeLoc(final GL2ES2 gl, final boolean updateLocation, final GLArrayDataServer data, boolean throwOnError) {
+ public final boolean updateAttributeLoc(final GL2ES2 gl, final boolean updateLocation, final GLArrayDataServer data, final boolean throwOnError) {
if( updateLocation || 0 > data.getLocation() ) {
final boolean ok = 0 <= data.setLocation(gl, sp.program());
if( throwOnError && !ok ) {
@@ -314,29 +315,29 @@ public class RenderState {
}
- public final boolean isHintMaskSet(int mask) {
+ public final boolean isHintMaskSet(final int mask) {
return mask == ( hintBitfield & mask );
}
- public final void setHintMask(int mask) {
+ public final void setHintMask(final int mask) {
hintBitfield |= mask;
}
- public final void clearHintMask(int mask) {
+ public final void clearHintMask(final int mask) {
hintBitfield &= ~mask;
}
- public void destroy(GL2ES2 gl) {
+ public void destroy(final GL2ES2 gl) {
if( null != sp ) {
sp.destroy(gl);
sp = null;
}
}
- public final RenderState attachTo(GL2ES2 gl) {
+ public final RenderState attachTo(final GL2ES2 gl) {
return (RenderState) gl.getContext().attachObject(thisKey, this);
}
- public final boolean detachFrom(GL2ES2 gl) {
- RenderState _rs = (RenderState) gl.getContext().getAttachedObject(thisKey);
+ public final boolean detachFrom(final GL2ES2 gl) {
+ final RenderState _rs = (RenderState) gl.getContext().getAttachedObject(thisKey);
if(_rs == this) {
gl.getContext().detachObject(thisKey);
return true;
diff --git a/src/jogl/classes/com/jogamp/graph/curve/opengl/TextRegionUtil.java b/src/jogl/classes/com/jogamp/graph/curve/opengl/TextRegionUtil.java
index aadbecc91..0fa1f49f1 100644
--- a/src/jogl/classes/com/jogamp/graph/curve/opengl/TextRegionUtil.java
+++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/TextRegionUtil.java
@@ -88,7 +88,7 @@ public class TextRegionUtil {
*/
public static void processString(final ShapeVisitor visitor, final AffineTransform transform,
final Font font, final float pixelSize, final CharSequence str,
- final AffineTransform temp1, AffineTransform temp2) {
+ final AffineTransform temp1, final AffineTransform temp2) {
final int charCount = str.length();
// region.setFlipped(true);
@@ -248,7 +248,7 @@ public class TextRegionUtil {
/**
* Clear all cached {@link GLRegions}.
*/
- public void clear(GL2ES2 gl) {
+ public void clear(final GL2ES2 gl) {
// fluchCache(gl) already called
final Iterator iterator = stringCacheMap.values().iterator();
while(iterator.hasNext()){
@@ -269,7 +269,7 @@ public class TextRegionUtil {
*
* @see #DEFAULT_CACHE_LIMIT
*/
- public final void setCacheLimit(int newLimit ) { stringCacheLimit = newLimit; }
+ public final void setCacheLimit(final int newLimit ) { stringCacheLimit = newLimit; }
/**
* Sets the cache limit, see {@link #setCacheLimit(int)} and validates the cache.
@@ -279,7 +279,7 @@ public class TextRegionUtil {
* @param gl current GL used to remove cached objects if required
* @param newLimit new cache size
*/
- public final void setCacheLimit(GL2ES2 gl, int newLimit ) { stringCacheLimit = newLimit; validateCache(gl, 0); }
+ public final void setCacheLimit(final GL2ES2 gl, final int newLimit ) { stringCacheLimit = newLimit; validateCache(gl, 0); }
/**
* @return the current cache limit
@@ -291,7 +291,7 @@ public class TextRegionUtil {
*/
public final int getCacheSize() { return stringCacheArray.size(); }
- protected final void validateCache(GL2ES2 gl, int space) {
+ protected final void validateCache(final GL2ES2 gl, final int space) {
if ( getCacheLimit() > 0 ) {
while ( getCacheSize() + space > getCacheLimit() ) {
removeCachedRegion(gl, 0);
@@ -299,11 +299,11 @@ public class TextRegionUtil {
}
}
- protected final GLRegion getCachedRegion(Font font, CharSequence str, float pixelSize, int special) {
+ protected final GLRegion getCachedRegion(final Font font, final CharSequence str, final float pixelSize, final int special) {
return stringCacheMap.get(getKey(font, str, pixelSize, special));
}
- protected final void addCachedRegion(GL2ES2 gl, Font font, CharSequence str, float pixelSize, int special, GLRegion glyphString) {
+ protected final void addCachedRegion(final GL2ES2 gl, final Font font, final CharSequence str, final float pixelSize, final int special, final GLRegion glyphString) {
if ( 0 != getCacheLimit() ) {
final String key = getKey(font, str, pixelSize, special);
final GLRegion oldRegion = stringCacheMap.put(key, glyphString);
@@ -315,7 +315,7 @@ public class TextRegionUtil {
}
}
- protected final void removeCachedRegion(GL2ES2 gl, Font font, CharSequence str, int pixelSize, int special) {
+ protected final void removeCachedRegion(final GL2ES2 gl, final Font font, final CharSequence str, final int pixelSize, final int special) {
final String key = getKey(font, str, pixelSize, special);
final GLRegion region = stringCacheMap.remove(key);
if(null != region) {
@@ -324,7 +324,7 @@ public class TextRegionUtil {
stringCacheArray.remove(key);
}
- protected final void removeCachedRegion(GL2ES2 gl, int idx) {
+ protected final void removeCachedRegion(final GL2ES2 gl, final int idx) {
final String key = stringCacheArray.remove(idx);
if( null != key ) {
final GLRegion region = stringCacheMap.remove(key);
@@ -334,7 +334,7 @@ public class TextRegionUtil {
}
}
- protected final String getKey(Font font, CharSequence str, float pixelSize, int special) {
+ protected final String getKey(final Font font, final CharSequence str, final float pixelSize, final int special) {
final StringBuilder sb = new StringBuilder();
return font.getName(sb, Font.NAME_UNIQUNAME)
.append(".").append(str.hashCode()).append(".").append(Float.floatToIntBits(pixelSize)).append(special).toString();
diff --git a/src/jogl/classes/com/jogamp/graph/font/FontFactory.java b/src/jogl/classes/com/jogamp/graph/font/FontFactory.java
index 948600a4a..db775e8dc 100644
--- a/src/jogl/classes/com/jogamp/graph/font/FontFactory.java
+++ b/src/jogl/classes/com/jogamp/graph/font/FontFactory.java
@@ -78,7 +78,7 @@ public class FontFactory {
return get(UBUNTU);
}
- public static final FontSet get(int font) {
+ public static final FontSet get(final int font) {
switch (font) {
case JAVA:
return JavaFontLoader.get();
@@ -87,7 +87,7 @@ public class FontFactory {
}
}
- public static final Font get(File file) throws IOException {
+ public static final Font get(final File file) throws IOException {
return fontConstr.create(file);
}
@@ -101,7 +101,7 @@ public class FontFactory {
try {
final URI uri = TempJarCache.getResource(fname);
conn = null != uri ? uri.toURL().openConnection() : null;
- } catch (Exception e) {
+ } catch (final Exception e) {
throw new IOException(e);
}
} else {
@@ -113,7 +113,7 @@ public class FontFactory {
return null;
}
- public static boolean isPrintableChar( char c ) {
+ public static boolean isPrintableChar( final char c ) {
if( Character.isWhitespace(c) ) {
return true;
}
diff --git a/src/jogl/classes/com/jogamp/graph/geom/Outline.java b/src/jogl/classes/com/jogamp/graph/geom/Outline.java
index 15a45b056..ea2059165 100644
--- a/src/jogl/classes/com/jogamp/graph/geom/Outline.java
+++ b/src/jogl/classes/com/jogamp/graph/geom/Outline.java
@@ -87,7 +87,7 @@ public class Outline implements Comparable {
* @param vertex Vertex to be added
* @throws NullPointerException if the {@link Vertex} element is null
*/
- public final void addVertex(Vertex vertex) throws NullPointerException {
+ public final void addVertex(final Vertex vertex) throws NullPointerException {
addVertex(vertices.size(), vertex);
}
@@ -98,7 +98,7 @@ public class Outline implements Comparable {
* @throws NullPointerException if the {@link Vertex} element is null
* @throws IndexOutOfBoundsException if position is out of range (position < 0 || position > getVertexNumber())
*/
- public final void addVertex(int position, Vertex vertex) throws NullPointerException, IndexOutOfBoundsException {
+ public final void addVertex(final int position, final Vertex vertex) throws NullPointerException, IndexOutOfBoundsException {
if (null == vertex) {
throw new NullPointerException("vertex is null");
}
@@ -116,7 +116,7 @@ public class Outline implements Comparable {
* @throws NullPointerException if the {@link Outline} element is null
* @throws IndexOutOfBoundsException if position is out of range (position < 0 || position >= getVertexNumber())
*/
- public final void setVertex(int position, Vertex vertex) throws NullPointerException, IndexOutOfBoundsException {
+ public final void setVertex(final int position, final Vertex vertex) throws NullPointerException, IndexOutOfBoundsException {
if (null == vertex) {
throw new NullPointerException("vertex is null");
}
@@ -124,11 +124,11 @@ public class Outline implements Comparable {
dirtyBBox = true;
}
- public final Vertex getVertex(int index){
+ public final Vertex getVertex(final int index){
return vertices.get(index);
}
- public int getVertexIndex(Vertex vertex){
+ public int getVertexIndex(final Vertex vertex){
return vertices.indexOf(vertex);
}
@@ -138,7 +138,7 @@ public class Outline implements Comparable {
* @param position of the to be removed Vertex
* @throws IndexOutOfBoundsException if position is out of range (position < 0 || position >= getVertexNumber())
*/
- public final Vertex removeVertex(int position) throws IndexOutOfBoundsException {
+ public final Vertex removeVertex(final int position) throws IndexOutOfBoundsException {
dirtyBBox = true;
return vertices.remove(position);
}
@@ -164,7 +164,7 @@ public class Outline implements Comparable {
*
* @param vertices the new outline loop/strip
*/
- public final void setVertices(ArrayList vertices) {
+ public final void setVertices(final ArrayList vertices) {
this.vertices = vertices;
validateBoundingBox();
}
@@ -184,7 +184,7 @@ public class Outline implements Comparable {
* otherwise a clone of the last vertex will be prepended.
* @return true if closing performed, otherwise false for NOP
*/
- public final boolean setClosed(boolean closeTail) {
+ public final boolean setClosed(final boolean closeTail) {
this.closed = true;
if( !isEmpty() ) {
final Vertex first = vertices.get(0);
@@ -253,7 +253,7 @@ public class Outline implements Comparable {
* @return true if {@code obj} is an Outline, not null, equals bounds and equal vertices in the same order
*/
@Override
- public boolean equals(Object obj) {
+ public boolean equals(final Object obj) {
if( obj == this) {
return true;
}
diff --git a/src/jogl/classes/com/jogamp/graph/geom/SVertex.java b/src/jogl/classes/com/jogamp/graph/geom/SVertex.java
index 579f92455..8df8fbb31 100644
--- a/src/jogl/classes/com/jogamp/graph/geom/SVertex.java
+++ b/src/jogl/classes/com/jogamp/graph/geom/SVertex.java
@@ -65,7 +65,7 @@ public class SVertex implements Vertex {
}
@Override
- public SVertex create(float[] coordsBuffer, int offset, int length, boolean onCurve) {
+ public SVertex create(final float[] coordsBuffer, final int offset, final int length, final boolean onCurve) {
return new SVertex(coordsBuffer, offset, length, onCurve);
}
}
@@ -100,14 +100,14 @@ public class SVertex implements Vertex {
}
@Override
- public final void setCoord(float x, float y, float z) {
+ public final void setCoord(final float x, final float y, final float z) {
coord[0] = x;
coord[1] = y;
coord[2] = z;
}
@Override
- public final void setCoord(float[] coordsBuffer, int offset, int length) {
+ public final void setCoord(final float[] coordsBuffer, final int offset, final int length) {
System.arraycopy(coordsBuffer, offset, coord, 0, length);
}
@@ -122,17 +122,17 @@ public class SVertex implements Vertex {
}
@Override
- public final void setX(float x) {
+ public final void setX(final float x) {
this.coord[0] = x;
}
@Override
- public final void setY(float y) {
+ public final void setY(final float y) {
this.coord[1] = y;
}
@Override
- public final void setZ(float z) {
+ public final void setZ(final float z) {
this.coord[2] = z;
}
@@ -157,7 +157,7 @@ public class SVertex implements Vertex {
}
@Override
- public final void setOnCurve(boolean onCurve) {
+ public final void setOnCurve(final boolean onCurve) {
this.onCurve = onCurve;
}
@@ -167,12 +167,12 @@ public class SVertex implements Vertex {
}
@Override
- public final void setId(int id){
+ public final void setId(final int id){
this.id = id;
}
@Override
- public boolean equals(Object obj) {
+ public boolean equals(final Object obj) {
if( obj == this) {
return true;
}
@@ -192,14 +192,14 @@ public class SVertex implements Vertex {
}
@Override
- public final void setTexCoord(float s, float t, float p) {
+ public final void setTexCoord(final float s, final float t, final float p) {
texCoord[0] = s;
texCoord[1] = t;
texCoord[2] = p;
}
@Override
- public final void setTexCoord(float[] texCoordsBuffer, int offset, int length) {
+ public final void setTexCoord(final float[] texCoordsBuffer, final int offset, final int length) {
System.arraycopy(texCoordsBuffer, offset, texCoord, 0, length);
}
diff --git a/src/jogl/classes/com/jogamp/graph/geom/Triangle.java b/src/jogl/classes/com/jogamp/graph/geom/Triangle.java
index 33e53f3ed..fc345f2a7 100644
--- a/src/jogl/classes/com/jogamp/graph/geom/Triangle.java
+++ b/src/jogl/classes/com/jogamp/graph/geom/Triangle.java
@@ -93,7 +93,7 @@ public class Triangle {
return id;
}
- public void setId(int id) {
+ public void setId(final int id) {
this.id = id;
}
@@ -118,7 +118,7 @@ public class Triangle {
return boundaryVertices;
}
- public void setVerticesBoundary(boolean[] boundaryVertices) {
+ public void setVerticesBoundary(final boolean[] boundaryVertices) {
this.boundaryVertices = boundaryVertices;
}
diff --git a/src/jogl/classes/com/jogamp/opengl/FBObject.java b/src/jogl/classes/com/jogamp/opengl/FBObject.java
index a9b54097f..e765d2d52 100644
--- a/src/jogl/classes/com/jogamp/opengl/FBObject.java
+++ b/src/jogl/classes/com/jogamp/opengl/FBObject.java
@@ -101,7 +101,7 @@ public class FBObject {
* Returns {@link #COLOR}, {@link #DEPTH}, {@link #STENCIL} or {@link #DEPTH_STENCIL}
* @throws IllegalArgumentException if format cannot be handled.
*/
- public static Type determine(int format) throws IllegalArgumentException {
+ public static Type determine(final int format) throws IllegalArgumentException {
switch(format) {
case GL.GL_RGBA4:
case GL.GL_RGB5_A1:
@@ -135,7 +135,7 @@ public class FBObject {
private int name;
- protected Attachment(Type type, int iFormat, int width, int height, int name) {
+ protected Attachment(final Type type, final int iFormat, final int width, final int height, final int name) {
this.type = type;
this.format = iFormat;
this.width = width;
@@ -148,7 +148,7 @@ public class FBObject {
* @param caps the destination for format bits
* @param rgba8Avail whether rgba8 is available
*/
- public final void formatToGLCapabilities(GLCapabilities caps, boolean rgba8Avail) {
+ public final void formatToGLCapabilities(final GLCapabilities caps, final boolean rgba8Avail) {
final int _format;
switch(format) {
case GL.GL_RGBA:
@@ -224,11 +224,11 @@ public class FBObject {
public final int getWidth() { return width; }
/** height of attachment */
public final int getHeight() { return height; }
- /* pp */ final void setSize(int w, int h) { width = w; height = h; }
+ /* pp */ final void setSize(final int w, final int h) { width = w; height = h; }
/** buffer name [1..max], maybe a texture or renderbuffer name, depending on type. */
public final int getName() { return name; }
- /* pp */ final void setName(int n) { name = n; }
+ /* pp */ final void setName(final int n) { name = n; }
/**
* Initializes the attachment and set it's parameter, if uninitialized, i.e. name is zero.
@@ -263,7 +263,7 @@ public class FBObject {
* {@inheritDoc}
*/
@Override
- public boolean equals(Object o) {
+ public boolean equals(final Object o) {
if( this == o ) return true;
if( ! ( o instanceof Attachment ) ) return false;
final Attachment a = (Attachment)o;
@@ -299,7 +299,7 @@ public class FBObject {
"; name "+toHexString(name)+", obj "+toHexString(objectHashCode())+"]";
}
- public static Type getType(int attachmentPoint, int maxColorAttachments) {
+ public static Type getType(final int attachmentPoint, final int maxColorAttachments) {
if( GL.GL_COLOR_ATTACHMENT0 <= attachmentPoint && attachmentPoint < GL.GL_COLOR_ATTACHMENT0+maxColorAttachments ) {
return Type.COLOR;
}
@@ -326,16 +326,16 @@ public class FBObject {
* @param height
* @param name
*/
- public RenderAttachment(Type type, int iFormat, int samples, int width, int height, int name) {
+ public RenderAttachment(final Type type, final int iFormat, final int samples, final int width, final int height, final int name) {
super(validateType(type), iFormat, width, height, name);
this.samples = samples;
}
/** number of samples, or zero for no multisampling */
public final int getSamples() { return samples; }
- /* pp */ final void setSamples(int s) { samples = s; }
+ /* pp */ final void setSamples(final int s) { samples = s; }
- private static Type validateType(Type type) {
+ private static Type validateType(final Type type) {
switch(type) {
case DEPTH_STENCIL:
case DEPTH:
@@ -354,7 +354,7 @@ public class FBObject {
* {@inheritDoc}
*/
@Override
- public boolean equals(Object o) {
+ public boolean equals(final Object o) {
if( this == o ) return true;
if( ! ( o instanceof RenderAttachment ) ) return false;
return super.equals(o) &&
@@ -376,7 +376,7 @@ public class FBObject {
}
@Override
- public boolean initialize(GL gl) throws GLException {
+ public boolean initialize(final GL gl) throws GLException {
final boolean init = 0 == getName();
if( init ) {
checkPreGLError(gl);
@@ -405,7 +405,7 @@ public class FBObject {
}
@Override
- public void free(GL gl) {
+ public void free(final GL gl) {
final int[] name = new int[] { getName() };
if( 0 != name[0] ) {
if(DEBUG) {
@@ -425,7 +425,7 @@ public class FBObject {
/** Color render buffer attachment */
public static class ColorAttachment extends RenderAttachment implements Colorbuffer {
- public ColorAttachment(int iFormat, int samples, int width, int height, int name) {
+ public ColorAttachment(final int iFormat, final int samples, final int width, final int height, final int name) {
super(Type.COLOR, iFormat, samples, width, height, name);
}
}
@@ -448,8 +448,8 @@ public class FBObject {
* @param wrapT
* @param name
*/
- public TextureAttachment(Type type, int iFormat, int width, int height, int dataFormat, int dataType,
- int magFilter, int minFilter, int wrapS, int wrapT, int name) {
+ public TextureAttachment(final Type type, final int iFormat, final int width, final int height, final int dataFormat, final int dataType,
+ final int magFilter, final int minFilter, final int wrapS, final int wrapT, final int name) {
super(validateType(type), iFormat, width, height, name);
this.dataFormat = dataFormat;
this.dataType = dataType;
@@ -459,7 +459,7 @@ public class FBObject {
this.wrapT = wrapT;
}
- private static Type validateType(Type type) {
+ private static Type validateType(final Type type) {
switch(type) {
case COLOR_TEXTURE:
case DEPTH_TEXTURE:
@@ -475,7 +475,7 @@ public class FBObject {
* @throws GLException if texture generation and setup fails. The just created texture name will be deleted in this case.
*/
@Override
- public boolean initialize(GL gl) throws GLException {
+ public boolean initialize(final GL gl) throws GLException {
final boolean init = 0 == getName();
if( init ) {
checkPreGLError(gl);
@@ -520,7 +520,7 @@ public class FBObject {
}
@Override
- public void free(GL gl) {
+ public void free(final GL gl) {
final int[] name = new int[] { getName() };
if( 0 != name[0] ) {
if(DEBUG) {
@@ -540,7 +540,7 @@ public class FBObject {
"; name "+toHexString(getName())+", obj "+toHexString(objectHashCode())+"]";
}
}
- static String toHexString(int v) {
+ static String toHexString(final int v) {
return "0x"+Integer.toHexString(v);
}
@@ -556,7 +556,7 @@ public class FBObject {
* @param height texture height
* @return the created and uninitialized color {@link TextureAttachment}
*/
- public static final TextureAttachment createColorTextureAttachment(GL gl, boolean alpha, int width, int height) {
+ public static final TextureAttachment createColorTextureAttachment(final GL gl, final boolean alpha, final int width, final int height) {
return createColorTextureAttachment(gl, alpha, width, height, GL.GL_NEAREST, GL.GL_NEAREST, GL.GL_CLAMP_TO_EDGE, GL.GL_CLAMP_TO_EDGE);
}
@@ -605,8 +605,8 @@ public class FBObject {
* @param wrapT if > 0 value for {@link GL#GL_TEXTURE_WRAP_T}
* @return the created and uninitialized color {@link TextureAttachment}
*/
- public static final TextureAttachment createColorTextureAttachment(GL gl, boolean alpha, int width, int height,
- int magFilter, int minFilter, int wrapS, int wrapT) {
+ public static final TextureAttachment createColorTextureAttachment(final GL gl, final boolean alpha, final int width, final int height,
+ final int magFilter, final int minFilter, final int wrapS, final int wrapT) {
final int textureInternalFormat, textureDataFormat, textureDataType;
if(gl.isGLES3()) {
textureInternalFormat = alpha ? GL.GL_RGBA8 : GL.GL_RGB8;
@@ -640,13 +640,13 @@ public class FBObject {
* @param wrapT if > 0 value for {@link GL#GL_TEXTURE_WRAP_T}
* @return the created and uninitialized color {@link TextureAttachment}
*/
- public static final TextureAttachment createColorTextureAttachment(int internalFormat, int width, int height, int dataFormat, int dataType,
- int magFilter, int minFilter, int wrapS, int wrapT) {
+ public static final TextureAttachment createColorTextureAttachment(final int internalFormat, final int width, final int height, final int dataFormat, final int dataType,
+ final int magFilter, final int minFilter, final int wrapS, final int wrapT) {
return new TextureAttachment(Type.COLOR_TEXTURE, internalFormat, width, height, dataFormat, dataType,
magFilter, minFilter, wrapS, wrapT, 0 /* name */);
}
- private static boolean hasAlpha(int format) {
+ private static boolean hasAlpha(final int format) {
switch(format) {
case GL.GL_RGBA8:
case GL.GL_RGBA4:
@@ -689,7 +689,7 @@ public class FBObject {
// ColorAttachment helper ..
//
- private final void validateColorAttachmentPointRange(int point) {
+ private final void validateColorAttachmentPointRange(final int point) {
if(!initialized) {
throw new GLException("FBO not initialized");
}
@@ -701,14 +701,14 @@ public class FBObject {
}
}
- private final void validateAddColorAttachment(int point, Colorbuffer ca) {
+ private final void validateAddColorAttachment(final int point, final Colorbuffer ca) {
validateColorAttachmentPointRange(point);
if( null != colorAttachmentPoints[point] ) {
throw new IllegalArgumentException("Cannot attach "+ca+", attachment point already in use by "+colorAttachmentPoints[point]+", "+this);
}
}
- private final void addColorAttachment(int point, Colorbuffer ca) {
+ private final void addColorAttachment(final int point, final Colorbuffer ca) {
validateColorAttachmentPointRange(point);
final Colorbuffer c = colorAttachmentPoints[point];
if( null != c && c != ca ) {
@@ -718,7 +718,7 @@ public class FBObject {
colorAttachmentCount++;
}
- private final void removeColorAttachment(int point, Colorbuffer ca) {
+ private final void removeColorAttachment(final int point, final Colorbuffer ca) {
validateColorAttachmentPointRange(point);
final Colorbuffer c = colorAttachmentPoints[point];
if( null != c && c != ca ) {
@@ -736,7 +736,7 @@ public class FBObject {
* @see #attachTexture2D(GL, int, boolean, int, int, int, int)
* @see #attachTexture2D(GL, int, int, int, int, int, int, int, int)
*/
- public final Colorbuffer getColorbuffer(int attachmentPoint) {
+ public final Colorbuffer getColorbuffer(final int attachmentPoint) {
validateColorAttachmentPointRange(attachmentPoint);
return colorAttachmentPoints[attachmentPoint];
}
@@ -750,7 +750,7 @@ public class FBObject {
* @param ca the {@link Colorbuffer} to look for.
* @return -1 if the {@link Colorbuffer} could not be found, otherwise [0..{@link #getMaxColorAttachments()}-1]
*/
- public final int getColorbufferAttachmentPoint(Colorbuffer ca) {
+ public final int getColorbufferAttachmentPoint(final Colorbuffer ca) {
for(int i=0; i=0 ? getColorbuffer(p) : null;
}
@@ -840,7 +840,7 @@ public class FBObject {
this.samplingSinkDirty = true;
}
- private void init(GL gl, int width, int height, int samples) throws GLException {
+ private void init(final GL gl, int width, int height, final int samples) throws GLException {
if(initialized) {
throw new GLException("FBO already initialized");
}
@@ -863,7 +863,7 @@ public class FBObject {
final boolean NV_fbo_color_attachments = gl.isExtensionAvailable(GLExtensions.NV_fbo_color_attachments);
- int val[] = new int[1];
+ final int val[] = new int[1];
checkPreGLError(gl);
@@ -874,7 +874,7 @@ public class FBObject {
val[0] = 0;
gl.glGetIntegerv(GL2ES2.GL_MAX_COLOR_ATTACHMENTS, val, 0);
realMaxColorAttachments = 1 <= val[0] ? val[0] : 1; // cap minimum to 1
- } catch (GLException gle) { gle.printStackTrace(); }
+ } catch (final GLException gle) { gle.printStackTrace(); }
}
maxColorAttachments = realMaxColorAttachments <= 8 ? realMaxColorAttachments : 8; // cap to limit array size
@@ -967,7 +967,7 @@ public class FBObject {
* @param newHeight
* @throws GLException in case of an error
*/
- public final void reset(GL gl, int newWidth, int newHeight) {
+ public final void reset(final GL gl, final int newWidth, final int newHeight) {
reset(gl, newWidth, newHeight, 0, false);
}
@@ -996,7 +996,7 @@ public class FBObject {
*
* @throws GLException in case of an error, i.e. size too big, etc ..
*/
- public final void reset(GL gl, int newWidth, int newHeight, int newSamples, boolean resetSamplingSink) {
+ public final void reset(final GL gl, int newWidth, int newHeight, int newSamples, final boolean resetSamplingSink) {
if( !initialized ) {
init(gl, newWidth, newHeight, newSamples);
return;
@@ -1048,7 +1048,7 @@ public class FBObject {
* Writes the internal format of the attachments to the given GLCapabilities object.
* @param caps the destination for format bits
*/
- public final void formatToGLCapabilities(GLCapabilities caps) {
+ public final void formatToGLCapabilities(final GLCapabilities caps) {
caps.setSampleBuffers(samples > 0);
caps.setNumSamples(samples);
caps.setDepthBits(0);
@@ -1080,7 +1080,7 @@ public class FBObject {
return getStatusString(vStatus);
}
- public static final String getStatusString(int fbStatus) {
+ public static final String getStatusString(final int fbStatus) {
switch(fbStatus) {
case -1:
return "NOT A FBO";
@@ -1132,7 +1132,7 @@ public class FBObject {
case GL.GL_FRAMEBUFFER_INCOMPLETE_FORMATS:
case GL2GL3.GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER:
case GL2GL3.GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER:
- case GL2GL3.GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:
+ case GL2ES3.GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:
case GL3.GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS:
if(0 == colorAttachmentCount || null == depth) {
// we are in transition
@@ -1152,8 +1152,8 @@ public class FBObject {
}
}
- private static int checkPreGLError(GL gl) {
- int glerr = gl.glGetError();
+ private static int checkPreGLError(final GL gl) {
+ final int glerr = gl.glGetError();
if(DEBUG && GL.GL_NO_ERROR != glerr) {
System.err.println("Pre-existing GL error: "+toHexString(glerr));
Thread.dumpStack();
@@ -1161,7 +1161,7 @@ public class FBObject {
return glerr;
}
- private final boolean checkNoError(GL gl, int err, String exceptionMessage) throws GLException {
+ private final boolean checkNoError(final GL gl, final int err, final String exceptionMessage) throws GLException {
if(GL.GL_NO_ERROR != err) {
if(null != gl) {
destroy(gl);
@@ -1195,7 +1195,7 @@ public class FBObject {
* @throws GLException in case the texture colorbuffer couldn't be allocated or MSAA has been chosen
* @see #createColorTextureAttachment(GLProfile, boolean, int, int)
*/
- public final TextureAttachment attachTexture2D(GL gl, int attachmentPoint, boolean alpha) throws GLException {
+ public final TextureAttachment attachTexture2D(final GL gl, final int attachmentPoint, final boolean alpha) throws GLException {
return (TextureAttachment)attachColorbuffer(gl, attachmentPoint,
createColorTextureAttachment(gl, alpha, width, height));
}
@@ -1217,7 +1217,7 @@ public class FBObject {
* @throws GLException in case the texture colorbuffer couldn't be allocated or MSAA has been chosen
* @see #createColorTextureAttachment(GLProfile, boolean, int, int, int, int, int, int)
*/
- public final TextureAttachment attachTexture2D(GL gl, int attachmentPoint, boolean alpha, int magFilter, int minFilter, int wrapS, int wrapT) throws GLException {
+ public final TextureAttachment attachTexture2D(final GL gl, final int attachmentPoint, final boolean alpha, final int magFilter, final int minFilter, final int wrapS, final int wrapT) throws GLException {
return (TextureAttachment)attachColorbuffer(gl, attachmentPoint,
createColorTextureAttachment(gl, alpha, width, height, magFilter, minFilter, wrapS, wrapT));
}
@@ -1240,9 +1240,9 @@ public class FBObject {
* @throws GLException in case the texture colorbuffer couldn't be allocated or MSAA has been chosen
* @see #createColorTextureAttachment(int, int, int, int, int, int, int, int, int)
*/
- public final TextureAttachment attachTexture2D(GL gl, int attachmentPoint,
- int internalFormat, int dataFormat, int dataType,
- int magFilter, int minFilter, int wrapS, int wrapT) throws GLException {
+ public final TextureAttachment attachTexture2D(final GL gl, final int attachmentPoint,
+ final int internalFormat, final int dataFormat, final int dataType,
+ final int magFilter, final int minFilter, final int wrapS, final int wrapT) throws GLException {
return (TextureAttachment)attachColorbuffer(gl, attachmentPoint,
createColorTextureAttachment(internalFormat, width, height, dataFormat, dataType, magFilter, minFilter, wrapS, wrapT));
}
@@ -1258,7 +1258,7 @@ public class FBObject {
* @param alpha set to true if you request alpha channel, otherwise false;
* @return uninitialized ColorAttachment instance describing the new attached colorbuffer
*/
- public final ColorAttachment createColorAttachment(boolean alpha) {
+ public final ColorAttachment createColorAttachment(final boolean alpha) {
final int internalFormat;
if( rgba8Avail ) {
@@ -1282,7 +1282,7 @@ public class FBObject {
* @throws GLException in case the colorbuffer couldn't be allocated
* @see #createColorAttachment(boolean)
*/
- public final ColorAttachment attachColorbuffer(GL gl, int attachmentPoint, boolean alpha) throws GLException {
+ public final ColorAttachment attachColorbuffer(final GL gl, final int attachmentPoint, final boolean alpha) throws GLException {
return (ColorAttachment) attachColorbuffer(gl, attachmentPoint, createColorAttachment(alpha));
}
@@ -1298,7 +1298,7 @@ public class FBObject {
* @throws GLException in case the colorbuffer couldn't be allocated
* @throws IllegalArgumentException if internalFormat doesn't reflect a colorbuffer
*/
- public final ColorAttachment attachColorbuffer(GL gl, int attachmentPoint, int internalFormat) throws GLException, IllegalArgumentException {
+ public final ColorAttachment attachColorbuffer(final GL gl, final int attachmentPoint, final int internalFormat) throws GLException, IllegalArgumentException {
final Attachment.Type atype = Attachment.Type.determine(internalFormat);
if( Attachment.Type.COLOR != atype ) {
throw new IllegalArgumentException("colorformat invalid: "+toHexString(internalFormat)+", "+this);
@@ -1326,12 +1326,12 @@ public class FBObject {
* @return newly attached {@link Colorbuffer} instance if bound and configured successfully, otherwise GLException is thrown
* @throws GLException in case the colorbuffer couldn't be allocated or MSAA has been chosen in case of a {@link TextureAttachment}
*/
- public final Colorbuffer attachColorbuffer(GL gl, int attachmentPoint, Colorbuffer colbuf) throws GLException {
+ public final Colorbuffer attachColorbuffer(final GL gl, final int attachmentPoint, final Colorbuffer colbuf) throws GLException {
bind(gl);
return attachColorbufferImpl(gl, attachmentPoint, colbuf);
}
- private final Colorbuffer attachColorbufferImpl(GL gl, int attachmentPoint, Colorbuffer colbuf) throws GLException {
+ private final Colorbuffer attachColorbufferImpl(final GL gl, final int attachmentPoint, final Colorbuffer colbuf) throws GLException {
validateAddColorAttachment(attachmentPoint, colbuf);
final boolean initializedColorbuf = colbuf.initialize(gl);
@@ -1407,7 +1407,7 @@ public class FBObject {
* @see #getDepthAttachment()
* @see #getStencilAttachment()
*/
- public final void attachRenderbuffer(GL gl, Attachment.Type atype, int reqBits) throws GLException, IllegalArgumentException {
+ public final void attachRenderbuffer(final GL gl, final Attachment.Type atype, int reqBits) throws GLException, IllegalArgumentException {
if( 0 > reqBits ) {
reqBits = 24;
}
@@ -1493,7 +1493,7 @@ public class FBObject {
* @see #getDepthAttachment()
* @see #getStencilAttachment()
*/
- public final void attachRenderbuffer(GL gl, int internalFormat) throws GLException, IllegalArgumentException {
+ public final void attachRenderbuffer(final GL gl, final int internalFormat) throws GLException, IllegalArgumentException {
final Attachment.Type atype = Attachment.Type.determine(internalFormat);
if( Attachment.Type.DEPTH != atype && Attachment.Type.STENCIL != atype && Attachment.Type.DEPTH_STENCIL != atype ) {
throw new IllegalArgumentException("renderformat invalid: "+toHexString(internalFormat)+", "+this);
@@ -1501,7 +1501,7 @@ public class FBObject {
attachRenderbufferImpl(gl, atype, internalFormat);
}
- protected final void attachRenderbufferImpl(GL gl, Attachment.Type atype, int internalFormat) throws GLException {
+ protected final void attachRenderbufferImpl(final GL gl, final Attachment.Type atype, final int internalFormat) throws GLException {
if( null != depth && ( Attachment.Type.DEPTH == atype || Attachment.Type.DEPTH_STENCIL == atype ) ) {
throw new GLException("FBO depth buffer already attached (rb "+depth+"), type is "+atype+", "+toHexString(internalFormat)+", "+this);
}
@@ -1513,7 +1513,7 @@ public class FBObject {
attachRenderbufferImpl2(gl, atype, internalFormat);
}
- private final void attachRenderbufferImpl2(GL gl, Attachment.Type atype, int internalFormat) throws GLException {
+ private final void attachRenderbufferImpl2(final GL gl, final Attachment.Type atype, final int internalFormat) throws GLException {
if( Attachment.Type.DEPTH == atype ) {
if(null == depth) {
depth = new RenderAttachment(Type.DEPTH, internalFormat, samples, width, height, 0);
@@ -1578,7 +1578,7 @@ public class FBObject {
* @return the detached Colorbuffer
* @throws IllegalArgumentException
*/
- public final Colorbuffer detachColorbuffer(GL gl, int attachmentPoint, boolean dispose) throws IllegalArgumentException {
+ public final Colorbuffer detachColorbuffer(final GL gl, final int attachmentPoint, final boolean dispose) throws IllegalArgumentException {
bind(gl);
final Colorbuffer res = detachColorbufferImpl(gl, attachmentPoint, dispose ? DetachAction.DISPOSE : DetachAction.NONE);
@@ -1591,7 +1591,7 @@ public class FBObject {
return res;
}
- private final Colorbuffer detachColorbufferImpl(GL gl, int attachmentPoint, DetachAction detachAction) {
+ private final Colorbuffer detachColorbufferImpl(final GL gl, final int attachmentPoint, final DetachAction detachAction) {
Colorbuffer colbuf = colorAttachmentPoints[attachmentPoint]; // shortcut, don't validate here
if(null == colbuf) {
@@ -1661,7 +1661,7 @@ public class FBObject {
return colbuf;
}
- private final void freeAllColorbufferImpl(GL gl) {
+ private final void freeAllColorbufferImpl(final GL gl) {
for(int i=0; i
* @param gl the current GL context
*/
- public final void detachAll(GL gl) {
+ public final void detachAll(final GL gl) {
if(null != samplingSink) {
samplingSink.detachAll(gl);
}
@@ -1869,7 +1869,7 @@ public class FBObject {
*
* @param gl the current GL context
*/
- public final void detachAllColorbuffer(GL gl) {
+ public final void detachAllColorbuffer(final GL gl) {
if(null != samplingSink) {
samplingSink.detachAllColorbuffer(gl);
}
@@ -1884,7 +1884,7 @@ public class FBObject {
*
* @param gl the current GL context
*/
- public final void detachAllTexturebuffer(GL gl) {
+ public final void detachAllTexturebuffer(final GL gl) {
if( !isInitialized() ) {
return;
}
@@ -1902,7 +1902,7 @@ public class FBObject {
}
}
- public final void detachAllRenderbuffer(GL gl) {
+ public final void detachAllRenderbuffer(final GL gl) {
if( !isInitialized() ) {
return;
}
@@ -1913,7 +1913,7 @@ public class FBObject {
detachRenderbufferImpl(gl, Attachment.Type.DEPTH_STENCIL, DetachAction.DISPOSE);
}
- private final void detachAllImpl(GL gl, boolean detachNonColorbuffer, boolean recreate) {
+ private final void detachAllImpl(final GL gl, final boolean detachNonColorbuffer, final boolean recreate) {
if( !isInitialized() ) {
return;
}
@@ -1957,7 +1957,7 @@ public class FBObject {
/**
* @param gl the current GL context
*/
- public final void destroy(GL gl) {
+ public final void destroy(final GL gl) {
if(!initialized) {
return;
}
@@ -1976,7 +1976,7 @@ public class FBObject {
final int fb_cache = fbName;
fbName = 0;
- int name[] = new int[1];
+ final int name[] = new int[1];
if(0!=fb_cache) {
name[0] = fb_cache;
gl.glDeleteFramebuffers(1, name, 0);
@@ -2036,7 +2036,7 @@ public class FBObject {
* @param gl the current GL context
* @throws GLException in case of an error, i.e. size too big, etc ..
*/
- public final void resetSamplingSink(GL gl) throws GLException {
+ public final void resetSamplingSink(final GL gl) throws GLException {
if(0 == samples) {
// MSAA off
if(null != samplingSink && samplingSink.initialized) {
@@ -2088,7 +2088,7 @@ public class FBObject {
}
if(null == samplingSinkTexture) {
- boolean hasAlpha = hasAttachmentUsingAlpha();
+ final boolean hasAlpha = hasAttachmentUsingAlpha();
samplingSinkTexture = samplingSink.attachTexture2D(gl, 0, hasAlpha);
} else if( 0 == samplingSinkTexture.getName() ) {
samplingSinkTexture.setSize(width, height);
@@ -2123,7 +2123,7 @@ public class FBObject {
* @return the previous sampling sink or null if none was attached
* @throws GLException if this FBO doesn't use MSAA or the given sink uses MSAA itself
*/
- public FBObject setSamplingSink(FBObject newSamplingSink) throws GLException {
+ public FBObject setSamplingSink(final FBObject newSamplingSink) throws GLException {
final FBObject prev = samplingSink;
if( null == newSamplingSink) {
samplingSink = null;
@@ -2154,7 +2154,7 @@ public class FBObject {
* @param gl the current GL context
* @throws GLException
*/
- public final void bind(GL gl) throws GLException {
+ public final void bind(final GL gl) throws GLException {
if(!bound || fbName != gl.getBoundFramebuffer(GL.GL_FRAMEBUFFER)) {
checkInitialized();
if(samples > 0 && fullFBOSupport) {
@@ -2180,7 +2180,7 @@ public class FBObject {
* @param gl the current GL context
* @throws GLException
*/
- public final void unbind(GL gl) throws GLException {
+ public final void unbind(final GL gl) throws GLException {
if(bound) {
if(fullFBOSupport) {
// default read/draw buffers, may utilize GLContext/GLDrawable override of
@@ -2212,7 +2212,7 @@ public class FBObject {
*
* @param gl the current GL context
*/
- public final boolean isBound(GL gl) {
+ public final boolean isBound(final GL gl) {
bound = bound && fbName != gl.getBoundFramebuffer(GL.GL_FRAMEBUFFER) ;
return bound;
}
@@ -2244,7 +2244,7 @@ public class FBObject {
* @param ta {@link TextureAttachment} to use, prev. attached w/ {@link #attachTexture2D(GL, int, boolean, int, int, int, int) attachTexture2D(..)}
* @throws IllegalArgumentException
*/
- public final void syncSamplingSink(GL gl) {
+ public final void syncSamplingSink(final GL gl) {
markUnbound();
if(samples>0 && samplingSinkDirty) {
samplingSinkDirty = false;
@@ -2279,7 +2279,7 @@ public class FBObject {
* @param ta {@link TextureAttachment} to use, prev. attached w/ {@link #attachTexture2D(GL, int, boolean, int, int, int, int) attachTexture2D(..)}
* @throws IllegalArgumentException
*/
- public final void use(GL gl, TextureAttachment ta) throws IllegalArgumentException {
+ public final void use(final GL gl, final TextureAttachment ta) throws IllegalArgumentException {
if(null == ta) { throw new IllegalArgumentException("Null TextureAttachment, this: "+toString()); }
syncSamplingSink(gl);
gl.glBindTexture(GL.GL_TEXTURE_2D, ta.getName()); // use it ..
@@ -2290,7 +2290,7 @@ public class FBObject {
*
*
Leaves the FBO unbound.
*/
- public final void unuse(GL gl) {
+ public final void unuse(final GL gl) {
unbind(gl);
gl.glBindTexture(GL.GL_TEXTURE_2D, 0); // don't use it
}
@@ -2309,7 +2309,7 @@ public class FBObject {
* @param bits 16, 24 or 32 bits
* @throws GLException if {@link #init(GL)} hasn't been called.
*/
- public final boolean supportsDepth(int bits) throws GLException {
+ public final boolean supportsDepth(final int bits) throws GLException {
checkInitialized();
switch(bits) {
case 16: return true;
@@ -2324,7 +2324,7 @@ public class FBObject {
* @param bits 1, 4, 8 or 16 bits
* @throws GLException if {@link #init(GL)} hasn't been called.
*/
- public final boolean supportsStencil(int bits) throws GLException {
+ public final boolean supportsStencil(final int bits) throws GLException {
checkInitialized();
switch(bits) {
case 1: return stencil01Avail;
@@ -2400,7 +2400,7 @@ public class FBObject {
", dirty "+samplingSinkDirty+"], state "+getStatusString()+", obj "+toHexString(objectHashCode())+"]";
}
- private final void updateStatus(GL gl) {
+ private final void updateStatus(final GL gl) {
if( 0 == fbName ) {
vStatus = -1;
} else {
diff --git a/src/jogl/classes/com/jogamp/opengl/GLAutoDrawableDelegate.java b/src/jogl/classes/com/jogamp/opengl/GLAutoDrawableDelegate.java
index e9fe80a91..f9a7ab029 100644
--- a/src/jogl/classes/com/jogamp/opengl/GLAutoDrawableDelegate.java
+++ b/src/jogl/classes/com/jogamp/opengl/GLAutoDrawableDelegate.java
@@ -84,7 +84,7 @@ public class GLAutoDrawableDelegate extends GLAutoDrawableBase implements GLAuto
* and no further lifecycle handling is applied.
* @param lock optional custom {@link RecursiveLock}.
*/
- public GLAutoDrawableDelegate(GLDrawable drawable, GLContext context, Object upstreamWidget, boolean ownDevice, RecursiveLock lock) {
+ public GLAutoDrawableDelegate(final GLDrawable drawable, final GLContext context, final Object upstreamWidget, final boolean ownDevice, final RecursiveLock lock) {
super((GLDrawableImpl)drawable, (GLContextImpl)context, ownDevice);
if(null == drawable) {
throw new IllegalArgumentException("null drawable");
@@ -118,7 +118,7 @@ public class GLAutoDrawableDelegate extends GLAutoDrawableBase implements GLAuto
* @param newWidth new width in pixel units
* @param newWidth new height in pixel units
*/
- public final void windowResizedOp(int newWidth, int newHeight) {
+ public final void windowResizedOp(final int newWidth, final int newHeight) {
super.defaultWindowResizedOp(newWidth, newHeight);
}
@@ -154,7 +154,7 @@ public class GLAutoDrawableDelegate extends GLAutoDrawableBase implements GLAuto
* Set the upstream UI toolkit object.
* @see #getUpstreamWidget()
*/
- public final void setUpstreamWidget(Object newUpstreamWidget) {
+ public final void setUpstreamWidget(final Object newUpstreamWidget) {
upstreamWidget = newUpstreamWidget;
}
diff --git a/src/jogl/classes/com/jogamp/opengl/GLEventListenerState.java b/src/jogl/classes/com/jogamp/opengl/GLEventListenerState.java
index 299e51532..aa56a8442 100644
--- a/src/jogl/classes/com/jogamp/opengl/GLEventListenerState.java
+++ b/src/jogl/classes/com/jogamp/opengl/GLEventListenerState.java
@@ -70,9 +70,9 @@ import com.jogamp.nativewindow.MutableGraphicsConfiguration;
public class GLEventListenerState {
private static final boolean DEBUG = Debug.debug("GLDrawable") || Debug.debug("GLEventListenerState");
- private GLEventListenerState(AbstractGraphicsDevice upstreamDevice, boolean proxyOwnsUpstreamDevice, AbstractGraphicsDevice device,
- GLCapabilitiesImmutable caps,
- GLContext context, int count, GLAnimatorControl anim, boolean animStarted) {
+ private GLEventListenerState(final AbstractGraphicsDevice upstreamDevice, final boolean proxyOwnsUpstreamDevice, final AbstractGraphicsDevice device,
+ final GLCapabilitiesImmutable caps,
+ final GLContext context, final int count, final GLAnimatorControl anim, final boolean animStarted) {
this.upstreamDevice = upstreamDevice;
this.proxyOwnsUpstreamDevice = proxyOwnsUpstreamDevice;
this.device = device;
@@ -124,7 +124,7 @@ public class GLEventListenerState {
}
}
- private static AbstractGraphicsDevice cloneDevice(AbstractGraphicsDevice aDevice) {
+ private static AbstractGraphicsDevice cloneDevice(final AbstractGraphicsDevice aDevice) {
return (AbstractGraphicsDevice) aDevice.clone();
}
@@ -148,7 +148,7 @@ public class GLEventListenerState {
*
* @see #moveTo(GLAutoDrawable)
*/
- public static GLEventListenerState moveFrom(GLAutoDrawable a) {
+ public static GLEventListenerState moveFrom(final GLAutoDrawable a) {
final GLAnimatorControl aAnim = a.getAnimator();
final boolean aAnimStarted;
if( null != aAnim ) {
@@ -251,7 +251,7 @@ public class GLEventListenerState {
* @see #moveFrom(GLAutoDrawable)
* @see #isOwner()
*/
- public final void moveTo(GLAutoDrawable a) {
+ public final void moveTo(final GLAutoDrawable a) {
final GLAnimatorControl aAnim = a.getAnimator();
final boolean hasAnimator = null != aAnim;
final boolean aPaused;
@@ -407,7 +407,7 @@ public class GLEventListenerState {
public static GLRunnable setViewport = new GLRunnable() {
@Override
- public boolean run(GLAutoDrawable drawable) {
+ public boolean run(final GLAutoDrawable drawable) {
drawable.getGL().glViewport(0, 0, drawable.getSurfaceWidth(), drawable.getSurfaceHeight());
return true;
}
@@ -415,19 +415,19 @@ public class GLEventListenerState {
public static GLRunnable glFinish = new GLRunnable() {
@Override
- public boolean run(GLAutoDrawable drawable) {
+ public boolean run(final GLAutoDrawable drawable) {
drawable.getGL().glFinish();
return true;
}
};
public static class ReshapeGLEventListener implements GLRunnable {
- private GLEventListener listener;
- public ReshapeGLEventListener(GLEventListener listener) {
+ private final GLEventListener listener;
+ public ReshapeGLEventListener(final GLEventListener listener) {
this.listener = listener;
}
@Override
- public boolean run(GLAutoDrawable drawable) {
+ public boolean run(final GLAutoDrawable drawable) {
listener.reshape(drawable, 0, 0, drawable.getSurfaceWidth(), drawable.getSurfaceHeight());
return true;
}
diff --git a/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java b/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java
index 9c9f4e3d6..078b48ec2 100644
--- a/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java
+++ b/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java
@@ -336,7 +336,7 @@ public class GLRendererQuirks {
*
* @see #areSameStickyDevice(AbstractGraphicsDevice, AbstractGraphicsDevice)
*/
- public static GLRendererQuirks getStickyDeviceQuirks(AbstractGraphicsDevice device) {
+ public static GLRendererQuirks getStickyDeviceQuirks(final AbstractGraphicsDevice device) {
final String key = device.getUniqueID();
final GLRendererQuirks has = stickyDeviceQuirks.get(key);
final GLRendererQuirks res;
@@ -353,7 +353,7 @@ public class GLRendererQuirks {
* Returns true if both devices have the same {@link AbstractGraphicsDevice#getUniqueID()},
* otherwise false.
*/
- public static boolean areSameStickyDevice(AbstractGraphicsDevice device1, AbstractGraphicsDevice device2) {
+ public static boolean areSameStickyDevice(final AbstractGraphicsDevice device1, final AbstractGraphicsDevice device2) {
return device1.getUniqueID() == device2.getUniqueID();
}
@@ -364,7 +364,7 @@ public class GLRendererQuirks {
*
* @see #getStickyDeviceQuirks(AbstractGraphicsDevice)
*/
- public static void addStickyDeviceQuirks(AbstractGraphicsDevice device, int[] quirks, int offset, int len) throws IllegalArgumentException {
+ public static void addStickyDeviceQuirks(final AbstractGraphicsDevice device, final int[] quirks, final int offset, final int len) throws IllegalArgumentException {
final GLRendererQuirks sq = getStickyDeviceQuirks(device);
sq.addQuirks(quirks, offset, len);
}
@@ -375,7 +375,7 @@ public class GLRendererQuirks {
*
* @see #getStickyDeviceQuirks(AbstractGraphicsDevice)
*/
- public static void addStickyDeviceQuirks(AbstractGraphicsDevice device, GLRendererQuirks quirks) throws IllegalArgumentException {
+ public static void addStickyDeviceQuirks(final AbstractGraphicsDevice device, final GLRendererQuirks quirks) throws IllegalArgumentException {
final GLRendererQuirks sq = getStickyDeviceQuirks(device);
sq.addQuirks(quirks);
}
@@ -386,7 +386,7 @@ public class GLRendererQuirks {
*
* @see #getStickyDeviceQuirks(AbstractGraphicsDevice)
*/
- public static boolean existStickyDeviceQuirk(AbstractGraphicsDevice device, int quirk) {
+ public static boolean existStickyDeviceQuirk(final AbstractGraphicsDevice device, final int quirk) {
return getStickyDeviceQuirks(device).exist(quirk);
}
/**
@@ -397,7 +397,7 @@ public class GLRendererQuirks {
*
* @see #getStickyDeviceQuirks(AbstractGraphicsDevice)
*/
- public static void pushStickyDeviceQuirks(AbstractGraphicsDevice device, GLRendererQuirks dest) {
+ public static void pushStickyDeviceQuirks(final AbstractGraphicsDevice device, final GLRendererQuirks dest) {
dest.addQuirks(getStickyDeviceQuirks(device));
}
@@ -413,7 +413,7 @@ public class GLRendererQuirks {
* @param len number of quirks to read from offset within quirks array
* @throws IllegalArgumentException if one of the quirks is out of range
*/
- public GLRendererQuirks(int[] quirks, int offset, int len) throws IllegalArgumentException {
+ public GLRendererQuirks(final int[] quirks, final int offset, final int len) throws IllegalArgumentException {
this();
addQuirks(quirks, offset, len);
}
@@ -424,7 +424,7 @@ public class GLRendererQuirks {
* @param len number of quirks to read from offset within quirks array
* @throws IllegalArgumentException if one of the quirks is out of range
*/
- public final void addQuirks(int[] quirks, int offset, int len) throws IllegalArgumentException {
+ public final void addQuirks(final int[] quirks, final int offset, final int len) throws IllegalArgumentException {
int bitmask = 0;
if( !( 0 <= offset + len && offset + len <= quirks.length ) ) {
throw new IllegalArgumentException("offset and len out of bounds: offset "+offset+", len "+len+", array-len "+quirks.length);
@@ -440,7 +440,7 @@ public class GLRendererQuirks {
/**
* @param quirks valid GLRendererQuirks to be added
*/
- public final void addQuirks(GLRendererQuirks quirks) {
+ public final void addQuirks(final GLRendererQuirks quirks) {
_bitmask |= quirks._bitmask;
}
@@ -449,7 +449,7 @@ public class GLRendererQuirks {
* @return true if quirk exist, otherwise false
* @throws IllegalArgumentException if quirk is out of range
*/
- public final boolean exist(int quirk) throws IllegalArgumentException {
+ public final boolean exist(final int quirk) throws IllegalArgumentException {
validateQuirk(quirk);
return 0 != ( ( 1 << quirk ) & _bitmask );
}
@@ -481,7 +481,7 @@ public class GLRendererQuirks {
* @param quirk the quirk to be validated, i.e. whether it is out of range
* @throws IllegalArgumentException if quirk is out of range
*/
- public static void validateQuirk(int quirk) throws IllegalArgumentException {
+ public static void validateQuirk(final int quirk) throws IllegalArgumentException {
if( !( 0 <= quirk && quirk < COUNT ) ) {
throw new IllegalArgumentException("Quirks must be in range [0.."+COUNT+"[, but quirk: "+quirk);
}
@@ -492,7 +492,7 @@ public class GLRendererQuirks {
* @return the String equivalent of this quirk
* @throws IllegalArgumentException if quirk is out of range
*/
- public static final String toString(int quirk) throws IllegalArgumentException {
+ public static final String toString(final int quirk) throws IllegalArgumentException {
validateQuirk(quirk);
return _names[quirk];
}
diff --git a/src/jogl/classes/com/jogamp/opengl/JoglVersion.java b/src/jogl/classes/com/jogamp/opengl/JoglVersion.java
index 40f0d180f..8d6765036 100644
--- a/src/jogl/classes/com/jogamp/opengl/JoglVersion.java
+++ b/src/jogl/classes/com/jogamp/opengl/JoglVersion.java
@@ -43,7 +43,7 @@ public class JoglVersion extends JogampVersion {
protected static volatile JoglVersion jogampCommonVersionInfo;
- protected JoglVersion(String packageName, Manifest mf) {
+ protected JoglVersion(final String packageName, final Manifest mf) {
super(packageName, mf);
}
@@ -60,17 +60,17 @@ public class JoglVersion extends JogampVersion {
return jogampCommonVersionInfo;
}
- public StringBuilder toString(GL gl, StringBuilder sb) {
+ public StringBuilder toString(final GL gl, StringBuilder sb) {
sb = super.toString(sb).append(Platform.getNewline());
getGLInfo(gl, sb);
return sb;
}
- public String toString(GL gl) {
+ public String toString(final GL gl) {
return toString(gl, null).toString();
}
- public static StringBuilder getAvailableCapabilitiesInfo(GLDrawableFactory factory, AbstractGraphicsDevice device, StringBuilder sb) {
+ public static StringBuilder getAvailableCapabilitiesInfo(final GLDrawableFactory factory, final AbstractGraphicsDevice device, StringBuilder sb) {
if(null==sb) {
sb = new StringBuilder();
}
@@ -84,7 +84,7 @@ public class JoglVersion extends JogampVersion {
}
done = true;
}
- } catch (GLException gle) { /* n/a */ }
+ } catch (final GLException gle) { /* n/a */ }
}
if(!done) {
sb.append("\tnone").append(Platform.getNewline());
@@ -108,7 +108,7 @@ public class JoglVersion extends JogampVersion {
return sb;
}
- public static StringBuilder getDefaultOpenGLInfo(AbstractGraphicsDevice device, StringBuilder sb, boolean withCapabilitiesInfo) {
+ public static StringBuilder getDefaultOpenGLInfo(AbstractGraphicsDevice device, StringBuilder sb, final boolean withCapabilitiesInfo) {
if(null==sb) {
sb = new StringBuilder();
}
@@ -127,11 +127,11 @@ public class JoglVersion extends JogampVersion {
return sb;
}
- public static StringBuilder getGLInfo(GL gl, StringBuilder sb) {
+ public static StringBuilder getGLInfo(final GL gl, final StringBuilder sb) {
return getGLInfo(gl, sb, false);
}
- public static StringBuilder getGLInfo(GL gl, StringBuilder sb, boolean withCapabilitiesAndExtensionInfo) {
- AbstractGraphicsDevice device = gl.getContext().getGLDrawable().getNativeSurface()
+ public static StringBuilder getGLInfo(final GL gl, StringBuilder sb, final boolean withCapabilitiesAndExtensionInfo) {
+ final AbstractGraphicsDevice device = gl.getContext().getGLDrawable().getNativeSurface()
.getGraphicsConfiguration().getScreen().getDevice();
if(null==sb) {
sb = new StringBuilder();
@@ -151,11 +151,11 @@ public class JoglVersion extends JogampVersion {
return sb;
}
- public static StringBuilder getGLStrings(GL gl, StringBuilder sb) {
+ public static StringBuilder getGLStrings(final GL gl, final StringBuilder sb) {
return getGLStrings(gl, sb, true);
}
- public static StringBuilder getGLStrings(GL gl, StringBuilder sb, boolean withExtensions) {
+ public static StringBuilder getGLStrings(final GL gl, StringBuilder sb, final boolean withExtensions) {
if(null==sb) {
sb = new StringBuilder();
}
@@ -200,7 +200,7 @@ public class JoglVersion extends JogampVersion {
return sb;
}
- public StringBuilder getBriefOSGLBuildInfo(GL gl, StringBuilder sb) {
+ public StringBuilder getBriefOSGLBuildInfo(final GL gl, StringBuilder sb) {
if(null==sb) {
sb = new StringBuilder();
}
@@ -217,7 +217,7 @@ public class JoglVersion extends JogampVersion {
return sb;
}
- public static void main(String args[]) {
+ public static void main(final String args[]) {
System.err.println(VersionUtil.getPlatformInfo());
System.err.println(GlueGenVersion.getInstance());
// System.err.println(NativeWindowVersion.getInstance());
diff --git a/src/jogl/classes/com/jogamp/opengl/cg/CgDynamicLibraryBundleInfo.java b/src/jogl/classes/com/jogamp/opengl/cg/CgDynamicLibraryBundleInfo.java
index 4270607f2..d3dae9d63 100644
--- a/src/jogl/classes/com/jogamp/opengl/cg/CgDynamicLibraryBundleInfo.java
+++ b/src/jogl/classes/com/jogamp/opengl/cg/CgDynamicLibraryBundleInfo.java
@@ -89,12 +89,12 @@ public final class CgDynamicLibraryBundleInfo implements DynamicLibraryBundleInf
/** Tool has none **/
@Override
- public final long toolGetProcAddress(long toolGetProcAddressHandle, String funcName) {
+ public final long toolGetProcAddress(final long toolGetProcAddressHandle, final String funcName) {
return 0;
}
@Override
- public final boolean useToolGetProcAdressFirst(String funcName) {
+ public final boolean useToolGetProcAdressFirst(final String funcName) {
return false;
}
diff --git a/src/jogl/classes/com/jogamp/opengl/cg/CgException.java b/src/jogl/classes/com/jogamp/opengl/cg/CgException.java
index 3e42f4d70..0a3535ba6 100644
--- a/src/jogl/classes/com/jogamp/opengl/cg/CgException.java
+++ b/src/jogl/classes/com/jogamp/opengl/cg/CgException.java
@@ -50,18 +50,18 @@ public class CgException extends RuntimeException {
}
/** Constructs a CgException object with the specified detail message. */
- public CgException(String message) {
+ public CgException(final String message) {
super(message);
}
/** Constructs a CgException object with the specified detail message and
root cause. */
- public CgException(String message, Throwable cause) {
+ public CgException(final String message, final Throwable cause) {
super(message, cause);
}
/** Constructs a CgException object with the specified root cause. */
- public CgException(Throwable cause) {
+ public CgException(final Throwable cause) {
super(cause);
}
}
diff --git a/src/jogl/classes/com/jogamp/opengl/math/Binary16.java b/src/jogl/classes/com/jogamp/opengl/math/Binary16.java
index 33add46c2..8e4aa9176 100644
--- a/src/jogl/classes/com/jogamp/opengl/math/Binary16.java
+++ b/src/jogl/classes/com/jogamp/opengl/math/Binary16.java
@@ -151,7 +151,7 @@ public final class Binary16
* the interval of double precision values is far larger than that of the
* binary16 type.
*
- *
+ *
* @see #unpackDouble(char)
*/
@@ -224,7 +224,7 @@ public final class Binary16
* the interval of single precision values is far larger than that of the
* binary16 type.
*
- *
+ *
* @see #unpackFloat(char)
*/
@@ -280,7 +280,7 @@ public final class Binary16
* range [-15, 16] - values outside of this range will be
* truncated.
*
- *
+ *
* @see #unpackGetExponentUnbiased(char)
*/
@@ -298,7 +298,7 @@ public final class Binary16
* Encode the significand s. Values should be in the range
* [0, 1023]. Values outside of this range will be truncated.
*
- *
+ *
* @see #unpackGetSignificand(char)
*/
@@ -315,7 +315,7 @@ public final class Binary16
* [0, 1], with 0 ironically denoting a positive
* value. Values outside of this range will be truncated.
*
- *
+ *
* @see #unpackGetSign(char)
*/
@@ -369,7 +369,7 @@ public final class Binary16
* k, and the decoded significand s of
* k.
*
- *
+ *
* @see #packDouble(double)
*/
@@ -405,7 +405,7 @@ public final class Binary16
/**
* 1. Bias the exponent.
- *
+ *
* 2. Shift the result left to the position at which it will appear in the
* resulting value.
*/
@@ -443,7 +443,7 @@ public final class Binary16
* k, and the decoded significand s of
* k.
*
- *
+ *
* @see #packFloat(float)
*/
@@ -479,7 +479,7 @@ public final class Binary16
/**
* 1. Bias the exponent.
- *
+ *
* 2. Shift the result left to the position at which it will appear in the
* resulting value.
*/
@@ -522,7 +522,7 @@ public final class Binary16
* 16 iff the input is {@link #POSITIVE_INFINITY},
* {@link #NEGATIVE_INFINITY}, or NaN.
*
- *
+ *
* @see #packSetExponentUnbiasedUnchecked(int)
*/
@@ -537,7 +537,7 @@ public final class Binary16
/**
* Retrieve the sign bit of the given packed binary16 value, as
* an integer in the range [0, 1].
- *
+ *
* @see Binary16#packSetSignUnchecked(int)
*/
@@ -552,7 +552,7 @@ public final class Binary16
* Return the significand of the given packed binary16 value as
* an integer in the range [0, 1023].
*
- *
+ *
* @see Binary16#packSetSignificandUnchecked(int)
*/
diff --git a/src/jogl/classes/com/jogamp/opengl/math/Binary32.java b/src/jogl/classes/com/jogamp/opengl/math/Binary32.java
index d98815d9f..599b1ff68 100644
--- a/src/jogl/classes/com/jogamp/opengl/math/Binary32.java
+++ b/src/jogl/classes/com/jogamp/opengl/math/Binary32.java
@@ -75,7 +75,7 @@ public final class Binary32
* {@link #POSITIVE_INFINITY}, {@link #NEGATIVE_INFINITY}, or
* NaN.
*
- *
+ *
* @see #packSetExponentUnbiasedUnchecked(int)
*/
diff --git a/src/jogl/classes/com/jogamp/opengl/math/Binary64.java b/src/jogl/classes/com/jogamp/opengl/math/Binary64.java
index 5efad433a..d4ec636a5 100644
--- a/src/jogl/classes/com/jogamp/opengl/math/Binary64.java
+++ b/src/jogl/classes/com/jogamp/opengl/math/Binary64.java
@@ -75,7 +75,7 @@ public final class Binary64
* {@link #POSITIVE_INFINITY}, {@link #NEGATIVE_INFINITY}, or
* NaN.
*
- *
+ *
* @see #packSetExponentUnbiasedUnchecked(int)
*/
@@ -93,7 +93,7 @@ public final class Binary64
* Return the significand of the given double value.
*
*/
-
+
public static long unpackGetSignificand(
final double d)
{
@@ -106,7 +106,7 @@ public final class Binary64
* Return the sign of the given double value.
*
*/
-
+
public static long unpackGetSign(
final double d)
{
diff --git a/src/jogl/classes/com/jogamp/opengl/math/FixedPoint.java b/src/jogl/classes/com/jogamp/opengl/math/FixedPoint.java
index b7dbf183f..31408b079 100644
--- a/src/jogl/classes/com/jogamp/opengl/math/FixedPoint.java
+++ b/src/jogl/classes/com/jogamp/opengl/math/FixedPoint.java
@@ -46,15 +46,15 @@ public class FixedPoint {
return (int)(value * 65536.0f);
}
- public static final float toFloat(int value) {
- return (float)value/65536.0f;
+ public static final float toFloat(final int value) {
+ return value/65536.0f;
}
- public static final int mult(int x1, int x2) {
+ public static final int mult(final int x1, final int x2) {
return (int) ( ((long)x1*(long)x2)/65536 );
}
- public static final int div(int x1, int x2) {
+ public static final int div(final int x1, final int x2) {
return (int) ( (((long)x1)<<16)/x2 );
}
}
diff --git a/src/jogl/classes/com/jogamp/opengl/math/Quaternion.java b/src/jogl/classes/com/jogamp/opengl/math/Quaternion.java
index 243ab2a33..5e0784022 100644
--- a/src/jogl/classes/com/jogamp/opengl/math/Quaternion.java
+++ b/src/jogl/classes/com/jogamp/opengl/math/Quaternion.java
@@ -438,7 +438,7 @@ public class Quaternion {
* @see #rotateByAngleX(float)
* @see #setFromEuler(float, float, float)
*/
- public final Quaternion rotateByEuler(final float bankX, final float headingY, float attitudeZ) {
+ public final Quaternion rotateByEuler(final float bankX, final float headingY, final float attitudeZ) {
if ( VectorUtil.isZero(bankX, headingY, attitudeZ, FloatUtil.EPSILON) ) {
return this;
} else {
@@ -859,7 +859,7 @@ public class Quaternion {
* @see euclideanspace.com-eulerToQuaternion
* @see #toEuler(float[])
*/
- public final Quaternion setFromEuler(final float bankX, final float headingY, float attitudeZ) {
+ public final Quaternion setFromEuler(final float bankX, final float headingY, final float attitudeZ) {
if ( VectorUtil.isZero(bankX, headingY, attitudeZ, FloatUtil.EPSILON) ) {
return setIdentity();
} else {
@@ -1154,7 +1154,7 @@ public class Quaternion {
* @param m 3x3 column matrix
* @return true if representing a rotational matrix, false otherwise
*/
- public final boolean isRotationMatrix3f(float[] m) {
+ public final boolean isRotationMatrix3f(final float[] m) {
final float epsilon = 0.01f; // margin to allow for rounding errors
if (FloatUtil.abs(m[0] * m[3] + m[3] * m[4] + m[6] * m[7]) > epsilon)
return false;
@@ -1171,7 +1171,7 @@ public class Quaternion {
return (FloatUtil.abs(determinant3f(m) - 1) < epsilon);
}
- private final float determinant3f(float[] m) {
+ private final float determinant3f(final float[] m) {
return m[0] * m[4] * m[8] + m[3] * m[7] * m[2] + m[6] * m[1] * m[5]
- m[0] * m[7] * m[5] - m[3] * m[1] * m[8] - m[6] * m[4] * m[2];
}
diff --git a/src/jogl/classes/com/jogamp/opengl/math/geom/AABBox.java b/src/jogl/classes/com/jogamp/opengl/math/geom/AABBox.java
index d87bbb6f9..e454c036a 100644
--- a/src/jogl/classes/com/jogamp/opengl/math/geom/AABBox.java
+++ b/src/jogl/classes/com/jogamp/opengl/math/geom/AABBox.java
@@ -68,7 +68,7 @@ public class AABBox {
* Create an AABBox copying all values from the given one
* @param src the box value to be used for the new instance
*/
- public AABBox(AABBox src) {
+ public AABBox(final AABBox src) {
copy(src);
}
@@ -147,7 +147,7 @@ public class AABBox {
* @param src source AABBox
* @return this AABBox for chaining
*/
- public final AABBox copy(AABBox src) {
+ public final AABBox copy(final AABBox src) {
System.arraycopy(src.low, 0, low, 0, 3);
System.arraycopy(src.high, 0, high, 0, 3);
System.arraycopy(src.center, 0, center, 0, 3);
@@ -196,8 +196,8 @@ public class AABBox {
* @return this AABBox for chaining
*/
public final AABBox resize(final AABBox newBox) {
- float[] newLow = newBox.getLow();
- float[] newHigh = newBox.getHigh();
+ final float[] newLow = newBox.getLow();
+ final float[] newHigh = newBox.getHigh();
/** test low */
if (newLow[0] < low[0])
@@ -662,7 +662,7 @@ public class AABBox {
}
@Override
- public final boolean equals(Object obj) {
+ public final boolean equals(final Object obj) {
if( obj == this ) {
return true;
}
diff --git a/src/jogl/classes/com/jogamp/opengl/math/geom/Frustum.java b/src/jogl/classes/com/jogamp/opengl/math/geom/Frustum.java
index 87d31becb..f6d3c0dfa 100644
--- a/src/jogl/classes/com/jogamp/opengl/math/geom/Frustum.java
+++ b/src/jogl/classes/com/jogamp/opengl/math/geom/Frustum.java
@@ -27,6 +27,8 @@
*/
package com.jogamp.opengl.math.geom;
+import jogamp.common.os.PlatformPropsImpl;
+
import com.jogamp.common.os.Platform;
/**
@@ -113,12 +115,12 @@ public class Frustum {
* Negative halfspace is the other side of the plane, i.e. *-1
*
**/
- public final float distanceTo(float x, float y, float z) {
+ public final float distanceTo(final float x, final float y, final float z) {
return n[0] * x + n[1] * y + n[2] * z + d;
}
/** Return distance of plane to given point, see {@link #distanceTo(float, float, float)}. */
- public final float distanceTo(float[] p) {
+ public final float distanceTo(final float[] p) {
return n[0] * p[0] + n[1] * p[1] + n[2] * p[2] + d;
}
@@ -164,7 +166,7 @@ public class Frustum {
* Copy the given src planes into this this instance's planes.
* @param src the 6 source planes
*/
- public final void updateByPlanes(Plane[] src) {
+ public final void updateByPlanes(final Plane[] src) {
for (int i = 0; i < 6; ++i) {
final Plane p0 = planes[i];
final float[] p0_n = p0.n;
@@ -185,7 +187,7 @@ public class Frustum {
* as required by this class.
*
*/
- public void updateByPMV(float[] pmv, int pmv_off) {
+ public void updateByPMV(final float[] pmv, final int pmv_off) {
// Left: a = m41 + m11, b = m42 + m12, c = m43 + m13, d = m44 + m14 - [1..4] column-major
// Left: a = m30 + m00, b = m31 + m01, c = m32 + m02, d = m33 + m03 - [0..3] column-major
{
@@ -265,7 +267,7 @@ public class Frustum {
}
}
- private static final boolean isOutsideImpl(Plane p, AABBox box) {
+ private static final boolean isOutsideImpl(final Plane p, final AABBox box) {
final float[] low = box.getLow();
final float[] high = box.getHigh();
@@ -288,7 +290,7 @@ public class Frustum {
* Note: If method returns false, the box may only be partially inside.
*
*/
- public final boolean isAABBoxOutside(AABBox box) {
+ public final boolean isAABBoxOutside(final AABBox box) {
for (int i = 0; i < 6; ++i) {
if ( isOutsideImpl(planes[i], box) ) {
// fully outside
@@ -308,7 +310,7 @@ public class Frustum {
* @param p the point
* @return {@link Location} of point related to frustum planes
*/
- public final Location classifyPoint(float[] p) {
+ public final Location classifyPoint(final float[] p) {
Location res = Location.INSIDE;
for (int i = 0; i < 6; ++i) {
@@ -328,7 +330,7 @@ public class Frustum {
* @param p the point
* @return true if outside of the frustum, otherwise inside or on a plane
*/
- public final boolean isPointOutside(float[] p) {
+ public final boolean isPointOutside(final float[] p) {
return Location.OUTSIDE == classifyPoint(p);
}
@@ -339,7 +341,7 @@ public class Frustum {
* @param radius radius of the sphere
* @return {@link Location} of point related to frustum planes
*/
- public final Location classifySphere(float[] p, float radius) {
+ public final Location classifySphere(final float[] p, final float radius) {
Location res = Location.INSIDE; // fully inside
for (int i = 0; i < 6; ++i) {
@@ -362,7 +364,7 @@ public class Frustum {
* @param radius radius of the sphere
* @return true if outside of the frustum, otherwise inside or intersecting
*/
- public final boolean isSphereOutside(float[] p, float radius) {
+ public final boolean isSphereOutside(final float[] p, final float radius) {
return Location.OUTSIDE == classifySphere(p, radius);
}
@@ -370,13 +372,13 @@ public class Frustum {
if( null == sb ) {
sb = new StringBuilder();
}
- sb.append("Frustum[ Planes[ ").append(Platform.NEWLINE)
- .append(" L: ").append(planes[0]).append(", ").append(Platform.NEWLINE)
- .append(" R: ").append(planes[1]).append(", ").append(Platform.NEWLINE)
- .append(" B: ").append(planes[2]).append(", ").append(Platform.NEWLINE)
- .append(" T: ").append(planes[3]).append(", ").append(Platform.NEWLINE)
- .append(" N: ").append(planes[4]).append(", ").append(Platform.NEWLINE)
- .append(" F: ").append(planes[5]).append("], ").append(Platform.NEWLINE)
+ sb.append("Frustum[ Planes[ ").append(PlatformPropsImpl.NEWLINE)
+ .append(" L: ").append(planes[0]).append(", ").append(PlatformPropsImpl.NEWLINE)
+ .append(" R: ").append(planes[1]).append(", ").append(PlatformPropsImpl.NEWLINE)
+ .append(" B: ").append(planes[2]).append(", ").append(PlatformPropsImpl.NEWLINE)
+ .append(" T: ").append(planes[3]).append(", ").append(PlatformPropsImpl.NEWLINE)
+ .append(" N: ").append(planes[4]).append(", ").append(PlatformPropsImpl.NEWLINE)
+ .append(" F: ").append(planes[5]).append("], ").append(PlatformPropsImpl.NEWLINE)
.append("]");
return sb;
}
diff --git a/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java b/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java
index fbe5fedc4..c94d21369 100644
--- a/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java
+++ b/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java
@@ -125,8 +125,8 @@ public class GLCanvas extends Canvas implements GLAutoDrawable, GLSharedContextS
private volatile boolean sendReshape; // volatile: maybe written by WindowManager thread w/o locking
private static String getThreadName() { return Thread.currentThread().getName(); }
- private static String toHexString(int v) { return "0x"+Integer.toHexString(v); }
- private static String toHexString(long v) { return "0x"+Long.toHexString(v); }
+ private static String toHexString(final int v) { return "0x"+Integer.toHexString(v); }
+ private static String toHexString(final long v) { return "0x"+Long.toHexString(v); }
/*
* Invokes init(...) on all GLEventListeners. Assumes context is current when run.
@@ -215,7 +215,7 @@ public class GLCanvas extends Canvas implements GLAutoDrawable, GLSharedContextS
} else {
context.destroy();
}
- } catch (GLException gle) {
+ } catch (final GLException gle) {
gle.printStackTrace();
}
}
@@ -247,7 +247,7 @@ public class GLCanvas extends Canvas implements GLAutoDrawable, GLSharedContextS
private class DisposeGLEventListenerAction implements Runnable {
private GLEventListener listener;
private final boolean remove;
- private DisposeGLEventListenerAction(GLEventListener listener, boolean remove) {
+ private DisposeGLEventListenerAction(final GLEventListener listener, final boolean remove) {
this.listener = listener;
this.remove = remove;
}
@@ -346,7 +346,7 @@ public class GLCanvas extends Canvas implements GLAutoDrawable, GLSharedContextS
* Optional GLCapabilitiesChooser to customize the selection of the used GLCapabilities based on the
* requested GLCapabilities, and the available capabilities of the graphics device.
*/
- public GLCanvas(final Composite parent, final int style, GLCapabilitiesImmutable capsReqUser,
+ public GLCanvas(final Composite parent, final int style, final GLCapabilitiesImmutable capsReqUser,
final GLCapabilitiesChooser capsChooser) {
this(parent, style, capsReqUser, capsChooser, null);
}
@@ -418,7 +418,7 @@ public class GLCanvas extends Canvas implements GLAutoDrawable, GLSharedContextS
final Listener listener = new Listener () {
@Override
- public void handleEvent (Event event) {
+ public void handleEvent (final Event event) {
switch (event.type) {
case SWT.Paint:
displayIfNoAnimatorNoCheck();
@@ -438,29 +438,29 @@ public class GLCanvas extends Canvas implements GLAutoDrawable, GLSharedContextS
}
@Override
- public final void setSharedContext(GLContext sharedContext) throws IllegalStateException {
+ public final void setSharedContext(final GLContext sharedContext) throws IllegalStateException {
helper.setSharedContext(this.context, sharedContext);
}
@Override
- public final void setSharedAutoDrawable(GLAutoDrawable sharedAutoDrawable) throws IllegalStateException {
+ public final void setSharedAutoDrawable(final GLAutoDrawable sharedAutoDrawable) throws IllegalStateException {
helper.setSharedAutoDrawable(this, sharedAutoDrawable);
}
private final UpstreamSurfaceHook swtCanvasUpStreamHook = new UpstreamSurfaceHook() {
@Override
- public final void create(ProxySurface s) { /* nop */ }
+ public final void create(final ProxySurface s) { /* nop */ }
@Override
- public final void destroy(ProxySurface s) { /* nop */ }
+ public final void destroy(final ProxySurface s) { /* nop */ }
@Override
- public final int getSurfaceWidth(ProxySurface s) {
+ public final int getSurfaceWidth(final ProxySurface s) {
return clientArea.width;
}
@Override
- public final int getSurfaceHeight(ProxySurface s) {
+ public final int getSurfaceHeight(final ProxySurface s) {
return clientArea.height;
}
@@ -619,7 +619,7 @@ public class GLCanvas extends Canvas implements GLAutoDrawable, GLSharedContextS
final GLDrawableFactory glFactory = GLDrawableFactory.getFactory(capsRequested.getGLProfile());
// Create a NativeWindow proxy for the SWT canvas
- ProxySurface proxySurface = glFactory.createProxySurface(device, screen.getIndex(), nativeWindowHandle,
+ final ProxySurface proxySurface = glFactory.createProxySurface(device, screen.getIndex(), nativeWindowHandle,
capsRequested, capsChooser, swtCanvasUpStreamHook);
// Associate a GL surface with the proxy
final GLDrawableImpl _drawable = (GLDrawableImpl) glFactory.createGLDrawable(proxySurface);
@@ -731,7 +731,7 @@ public class GLCanvas extends Canvas implements GLAutoDrawable, GLSharedContextS
}
@Override
- public GLEventListener getGLEventListener(int index) throws IndexOutOfBoundsException {
+ public GLEventListener getGLEventListener(final int index) throws IndexOutOfBoundsException {
return helper.getGLEventListener(index);
}
@@ -741,17 +741,17 @@ public class GLCanvas extends Canvas implements GLAutoDrawable, GLSharedContextS
}
@Override
- public boolean getGLEventListenerInitState(GLEventListener listener) {
+ public boolean getGLEventListenerInitState(final GLEventListener listener) {
return helper.getGLEventListenerInitState(listener);
}
@Override
- public void setGLEventListenerInitState(GLEventListener listener, boolean initialized) {
+ public void setGLEventListenerInitState(final GLEventListener listener, final boolean initialized) {
helper.setGLEventListenerInitState(listener, initialized);
}
@Override
- public GLEventListener disposeGLEventListener(GLEventListener listener, boolean remove) {
+ public GLEventListener disposeGLEventListener(final GLEventListener listener, final boolean remove) {
final DisposeGLEventListenerAction r = new DisposeGLEventListenerAction(listener, remove);
runInGLThread(r);
return r.listener;
@@ -781,7 +781,7 @@ public class GLCanvas extends Canvas implements GLAutoDrawable, GLSharedContextS
}
@Override
- public final Thread setExclusiveContextThread(Thread t) throws GLException {
+ public final Thread setExclusiveContextThread(final Thread t) throws GLException {
return helper.setExclusiveContextThread(t, context);
}
@@ -837,7 +837,7 @@ public class GLCanvas extends Canvas implements GLAutoDrawable, GLSharedContextS
}
@Override
- public GLContext setContext(GLContext newCtx, boolean destroyPrevCtx) {
+ public GLContext setContext(final GLContext newCtx, final boolean destroyPrevCtx) {
final RecursiveLock _lock = lock;
_lock.lock();
try {
@@ -981,7 +981,7 @@ public class GLCanvas extends Canvas implements GLAutoDrawable, GLSharedContextS
action.run();
}
- private void runOnEDTIfAvail(boolean wait, final Runnable action) {
+ private void runOnEDTIfAvail(final boolean wait, final Runnable action) {
final Display d = isDisposed() ? null : getDisplay();
if( null == d || d.isDisposed() || d.getThread() == Thread.currentThread() ) {
action.run();
@@ -1025,7 +1025,7 @@ public class GLCanvas extends Canvas implements GLAutoDrawable, GLSharedContextS
canvas.addGLEventListener(new GLEventListener() {
@Override
public void init(final GLAutoDrawable drawable) {
- GL gl = drawable.getGL();
+ final GL gl = drawable.getGL();
System.err.println(JoglVersion.getGLInfo(gl, null));
}
@Override
diff --git a/src/jogl/classes/com/jogamp/opengl/util/AWTAnimatorImpl.java b/src/jogl/classes/com/jogamp/opengl/util/AWTAnimatorImpl.java
index d0de3b3a0..496fb88c0 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/AWTAnimatorImpl.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/AWTAnimatorImpl.java
@@ -54,16 +54,16 @@ import javax.media.opengl.GLAutoDrawable;
class AWTAnimatorImpl implements AnimatorBase.AnimatorImpl {
// For efficient rendering of Swing components, in particular when
// they overlap one another
- private List lightweights = new ArrayList();
- private Map repaintManagers = new IdentityHashMap();
- private Map dirtyRegions = new IdentityHashMap();
+ private final List lightweights = new ArrayList();
+ private final Map repaintManagers = new IdentityHashMap();
+ private final Map dirtyRegions = new IdentityHashMap();
@Override
- public void display(ArrayList drawables,
- boolean ignoreExceptions,
- boolean printExceptions) {
+ public void display(final ArrayList drawables,
+ final boolean ignoreExceptions,
+ final boolean printExceptions) {
for (int i=0; i 0) {
try {
SwingUtilities.invokeAndWait(drawWithRepaintManagerRunnable);
- } catch (Exception e) {
+ } catch (final Exception e) {
e.printStackTrace();
}
lightweights.clear();
@@ -97,10 +97,10 @@ class AWTAnimatorImpl implements AnimatorBase.AnimatorImpl {
// Uses RepaintManager APIs to implement more efficient redrawing of
// the Swing widgets we're animating
- private Runnable drawWithRepaintManagerRunnable = new Runnable() {
+ private final Runnable drawWithRepaintManagerRunnable = new Runnable() {
@Override
public void run() {
- for (Iterator iter = lightweights.iterator(); iter.hasNext(); ) {
+ for (final Iterator iter = lightweights.iterator(); iter.hasNext(); ) {
JComponent comp = iter.next();
RepaintManager rm = RepaintManager.currentManager(comp);
rm.markCompletelyDirty(comp);
@@ -117,13 +117,13 @@ class AWTAnimatorImpl implements AnimatorBase.AnimatorImpl {
// Walk up the hierarchy trying to find a non-optimizable
// ancestor
- Rectangle visible = comp.getVisibleRect();
+ final Rectangle visible = comp.getVisibleRect();
int x = visible.x;
int y = visible.y;
while (comp != null) {
x += comp.getX();
y += comp.getY();
- Component c = comp.getParent();
+ final Component c = comp.getParent();
if ((c == null) || (!(c instanceof JComponent))) {
comp = null;
} else {
@@ -132,7 +132,7 @@ class AWTAnimatorImpl implements AnimatorBase.AnimatorImpl {
rm = RepaintManager.currentManager(comp);
repaintManagers.put(rm, rm);
// Need to dirty this region
- Rectangle dirty = (Rectangle) dirtyRegions.get(comp);
+ Rectangle dirty = dirtyRegions.get(comp);
if (dirty == null) {
dirty = new Rectangle(x, y, visible.width, visible.height);
dirtyRegions.put(comp, dirty);
@@ -150,15 +150,15 @@ class AWTAnimatorImpl implements AnimatorBase.AnimatorImpl {
}
// Dirty any needed regions on non-optimizable components
- for (Iterator iter = dirtyRegions.keySet().iterator(); iter.hasNext(); ) {
- JComponent comp = iter.next();
- Rectangle rect = dirtyRegions.get(comp);
- RepaintManager rm = RepaintManager.currentManager(comp);
+ for (final Iterator iter = dirtyRegions.keySet().iterator(); iter.hasNext(); ) {
+ final JComponent comp = iter.next();
+ final Rectangle rect = dirtyRegions.get(comp);
+ final RepaintManager rm = RepaintManager.currentManager(comp);
rm.addDirtyRegion(comp, rect.x, rect.y, rect.width, rect.height);
}
// Draw all dirty regions
- for (Iterator iter = repaintManagers.keySet().iterator(); iter.hasNext(); ) {
+ for (final Iterator iter = repaintManagers.keySet().iterator(); iter.hasNext(); ) {
iter.next().paintDirtyRegions();
}
dirtyRegions.clear();
@@ -167,7 +167,7 @@ class AWTAnimatorImpl implements AnimatorBase.AnimatorImpl {
};
@Override
- public boolean blockUntilDone(Thread thread) {
+ public boolean blockUntilDone(final Thread thread) {
return Thread.currentThread() != thread && !EventQueue.isDispatchThread();
}
}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/Animator.java b/src/jogl/classes/com/jogamp/opengl/util/Animator.java
index 31938612a..ae09d81a4 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/Animator.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/Animator.java
@@ -78,7 +78,7 @@ public class Animator extends AnimatorBase {
/**
* Creates a new Animator w/ an associated ThreadGroup.
*/
- public Animator(ThreadGroup tg) {
+ public Animator(final ThreadGroup tg) {
super();
setThreadGroup(tg);
if(DEBUG) {
@@ -89,7 +89,7 @@ public class Animator extends AnimatorBase {
/**
* Creates a new Animator for a particular drawable.
*/
- public Animator(GLAutoDrawable drawable) {
+ public Animator(final GLAutoDrawable drawable) {
super();
add(drawable);
if(DEBUG) {
@@ -100,7 +100,7 @@ public class Animator extends AnimatorBase {
/**
* Creates a new Animator w/ an associated ThreadGroup for a particular drawable.
*/
- public Animator(ThreadGroup tg, GLAutoDrawable drawable) {
+ public Animator(final ThreadGroup tg, final GLAutoDrawable drawable) {
super();
setThreadGroup(tg);
add(drawable);
@@ -110,7 +110,7 @@ public class Animator extends AnimatorBase {
}
@Override
- protected final String getBaseName(String prefix) {
+ protected final String getBaseName(final String prefix) {
return prefix + "Animator" ;
}
@@ -120,7 +120,7 @@ public class Animator extends AnimatorBase {
* animation loop which prevents the CPU from getting swamped.
* This method may not have an effect on subclasses.
*/
- public final synchronized void setRunAsFastAsPossible(boolean runFast) {
+ public final synchronized void setRunAsFastAsPossible(final boolean runFast) {
runAsFastAsPossible = runFast;
}
@@ -151,7 +151,7 @@ public class Animator extends AnimatorBase {
if( drawablesEmpty ) {
pauseIssued = true;
}
- boolean wasPaused = pauseIssued;
+ final boolean wasPaused = pauseIssued;
if (DEBUG) {
System.err.println("Animator pause on " + animThread.getName() + ": " + toString());
}
@@ -164,7 +164,7 @@ public class Animator extends AnimatorBase {
Animator.this.notifyAll();
try {
Animator.this.wait();
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
}
if (wasPaused) {
// resume from pause -> reset counter
@@ -192,7 +192,7 @@ public class Animator extends AnimatorBase {
Thread.yield();
}
}
- } catch( ThreadDeath td) {
+ } catch( final ThreadDeath td) {
if(DEBUG) {
System.err.println("Animator caught: "+td.getClass().getName()+": "+td.getMessage());
td.printStackTrace();
@@ -232,7 +232,7 @@ public class Animator extends AnimatorBase {
* @param tg the {@link ThreadGroup}
* @throws GLException if the animator has already been started
*/
- public final synchronized void setThreadGroup(ThreadGroup tg) throws GLException {
+ public final synchronized void setThreadGroup(final ThreadGroup tg) throws GLException {
if ( isStarted() ) {
throw new GLException("Animator already started.");
}
@@ -248,7 +248,7 @@ public class Animator extends AnimatorBase {
runnable = new MainLoop();
}
fpsCounter.resetFPSCounter();
- String threadName = getThreadName()+"-"+baseName;
+ final String threadName = getThreadName()+"-"+baseName;
Thread thread;
if(null==threadGroup) {
thread = new Thread(runnable, threadName);
diff --git a/src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java b/src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java
index 39643744a..68a48381e 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java
@@ -92,7 +92,7 @@ public abstract class AnimatorBase implements GLAnimatorControl {
Class> clazz;
try {
clazz = Class.forName("com.jogamp.opengl.util.AWTAnimatorImpl");
- } catch (Exception e) {
+ } catch (final Exception e) {
clazz = null;
}
awtAnimatorImplClazz = clazz;
@@ -112,7 +112,7 @@ public abstract class AnimatorBase implements GLAnimatorControl {
drawablesEmpty = true;
}
- private static final boolean useAWTAnimatorImpl(int modeBits) {
+ private static final boolean useAWTAnimatorImpl(final int modeBits) {
return 0 != ( MODE_EXPECT_AWT_RENDERING_THREAD & modeBits ) && null != awtAnimatorImplClazz;
}
@@ -126,13 +126,13 @@ public abstract class AnimatorBase implements GLAnimatorControl {
*
* @throws GLException if Animator is {@link #isStarted()}
*/
- protected final synchronized void initImpl(boolean force) {
+ protected final synchronized void initImpl(final boolean force) {
if( force || null == impl ) {
if( useAWTAnimatorImpl( modeBits ) ) {
try {
impl = (AnimatorImpl) awtAnimatorImplClazz.newInstance();
baseName = getBaseName("AWT");
- } catch (Exception e) { e.printStackTrace(); }
+ } catch (final Exception e) { e.printStackTrace(); }
}
if( null == impl ) {
impl = new DefaultAnimatorImpl();
@@ -154,7 +154,7 @@ public abstract class AnimatorBase implements GLAnimatorControl {
* @throws GLException if Animator is {@link #isStarted()} and {@link #MODE_EXPECT_AWT_RENDERING_THREAD} about to change
* @see AnimatorBase#MODE_EXPECT_AWT_RENDERING_THREAD
*/
- public final synchronized void setModeBits(boolean enable, int bitValues) throws GLException {
+ public final synchronized void setModeBits(final boolean enable, final int bitValues) throws GLException {
final int _oldModeBits = modeBits;
if(enable) {
modeBits |= bitValues;
@@ -225,7 +225,7 @@ public abstract class AnimatorBase implements GLAnimatorControl {
}
}
- boolean paused = pause();
+ final boolean paused = pause();
drawables.remove(drawable);
drawablesEmpty = drawables.size() == 0;
drawable.setAnimator(null);
@@ -267,7 +267,7 @@ public abstract class AnimatorBase implements GLAnimatorControl {
* @see #isExclusiveContextEnabled()
*/
// @Override
- public final synchronized Thread setExclusiveContext(Thread t) {
+ public final synchronized Thread setExclusiveContext(final Thread t) {
final boolean enable = null != t;
final Thread old = userExclusiveContextThread;
if( enable && t != animThread ) { // disable: will be cleared at end after propagation && filter out own animThread usae
@@ -299,7 +299,7 @@ public abstract class AnimatorBase implements GLAnimatorControl {
* @see #isExclusiveContextEnabled()
*/
// @Override
- public final boolean setExclusiveContext(boolean enable) {
+ public final boolean setExclusiveContext(final boolean enable) {
final boolean propagateState;
final boolean oldExclusiveContext;
final Thread _exclusiveContextThread;
@@ -324,7 +324,7 @@ public abstract class AnimatorBase implements GLAnimatorControl {
while( 0
*/
- protected final synchronized void setDrawablesExclCtxState(boolean enable) {
+ protected final synchronized void setDrawablesExclCtxState(final boolean enable) {
if(DEBUG) {
System.err.println("AnimatorBase.setExclusiveContextImpl exlusive "+exclusiveContext+": Enable "+enable+" for "+this+" - "+Thread.currentThread());
// Thread.dumpStack();
@@ -388,12 +388,12 @@ public abstract class AnimatorBase implements GLAnimatorControl {
for (int i=0; i0, method will wait for the given pollPeriod in milliseconds.
* @return true if {@link Condition#eval() waitCondition.eval()} returned false, otherwise false.
*/
- protected final synchronized boolean finishLifecycleAction(Condition waitCondition, long pollPeriod) {
+ protected final synchronized boolean finishLifecycleAction(final Condition waitCondition, long pollPeriod) {
/**
* It's hard to tell whether the thread which changes the lifecycle has
* dependencies on the Animator's internal thread. Currently we
@@ -519,7 +519,7 @@ public abstract class AnimatorBase implements GLAnimatorControl {
notifyAll();
try {
wait(pollPeriod);
- } catch (InterruptedException ie) { }
+ } catch (final InterruptedException ie) { }
remaining -= System.currentTimeMillis() - t1 ;
nok = waitCondition.eval();
}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/DefaultAnimatorImpl.java b/src/jogl/classes/com/jogamp/opengl/util/DefaultAnimatorImpl.java
index a9c6e6456..7fa4011f8 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/DefaultAnimatorImpl.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/DefaultAnimatorImpl.java
@@ -42,14 +42,14 @@ import javax.media.opengl.GLAutoDrawable;
class DefaultAnimatorImpl implements AnimatorBase.AnimatorImpl {
@Override
- public void display(ArrayList drawables,
- boolean ignoreExceptions,
- boolean printExceptions) {
+ public void display(final ArrayList drawables,
+ final boolean ignoreExceptions,
+ final boolean printExceptions) {
for (int i=0; iFPSAnimator(null, fps). */
- public FPSAnimator(int fps) {
+ public FPSAnimator(final int fps) {
this(null, fps);
}
@@ -79,21 +79,21 @@ public class FPSAnimator extends AnimatorBase {
value and a flag indicating whether to use fixed-rate
scheduling. Equivalent to FPSAnimator(null, fps,
scheduleAtFixedRate). */
- public FPSAnimator(int fps, boolean scheduleAtFixedRate) {
+ public FPSAnimator(final int fps, final 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) {
+ public FPSAnimator(final GLAutoDrawable drawable, final 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) {
+ public FPSAnimator(final GLAutoDrawable drawable, final int fps, final boolean scheduleAtFixedRate) {
super();
this.fps = fps;
if (drawable != null) {
@@ -106,7 +106,7 @@ public class FPSAnimator extends AnimatorBase {
* @param fps
* @throws GLException if the animator has already been started
*/
- public final synchronized void setFPS(int fps) throws GLException {
+ public final synchronized void setFPS(final int fps) throws GLException {
if ( isStarted() ) {
throw new GLException("Animator already started.");
}
@@ -122,7 +122,7 @@ public class FPSAnimator extends AnimatorBase {
public MainTask() {
}
- public void start(Timer timer) {
+ public void start(final Timer timer) {
fpsCounter.resetFPSCounter();
shouldRun = true;
shouldStop = false;
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java
index a58eb82cd..1a9ec2782 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java
@@ -69,11 +69,11 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
*
* @see javax.media.opengl.GLContext#getPredefinedArrayIndexName(int)
*/
- public static GLArrayDataClient createFixed(int index, int comps, int dataType, boolean normalized, int initialElementCount)
+ public static GLArrayDataClient createFixed(final int index, final int comps, final int dataType, final boolean normalized, final int initialElementCount)
throws GLException
{
- GLArrayDataClient adc = new GLArrayDataClient();
- GLArrayHandler glArrayHandler = new GLFixedArrayHandler(adc);
+ final GLArrayDataClient adc = new GLArrayDataClient();
+ final GLArrayHandler glArrayHandler = new GLFixedArrayHandler(adc);
adc.init(null, index, comps, dataType, normalized, 0, null, initialElementCount, 0 /* mappedElementCount */, false, glArrayHandler, 0, 0, 0, 0, false);
return adc;
}
@@ -99,12 +99,12 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
*
* @see javax.media.opengl.GLContext#getPredefinedArrayIndexName(int)
*/
- public static GLArrayDataClient createFixed(int index, int comps, int dataType, boolean normalized, int stride,
- Buffer buffer)
+ public static GLArrayDataClient createFixed(final int index, final int comps, final int dataType, final boolean normalized, final int stride,
+ final Buffer buffer)
throws GLException
{
- GLArrayDataClient adc = new GLArrayDataClient();
- GLArrayHandler glArrayHandler = new GLFixedArrayHandler(adc);
+ final GLArrayDataClient adc = new GLArrayDataClient();
+ final GLArrayHandler glArrayHandler = new GLFixedArrayHandler(adc);
adc.init(null, index, comps, dataType, normalized, stride, buffer, comps*comps, 0 /* mappedElementCount */, false, glArrayHandler, 0, 0, 0, 0, false);
return adc;
}
@@ -118,12 +118,12 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
* @param normalized Whether the data shall be normalized
* @param initialElementCount
*/
- public static GLArrayDataClient createGLSL(String name, int comps,
- int dataType, boolean normalized, int initialElementCount)
+ public static GLArrayDataClient createGLSL(final String name, final int comps,
+ final int dataType, final boolean normalized, final int initialElementCount)
throws GLException
{
- GLArrayDataClient adc = new GLArrayDataClient();
- GLArrayHandler glArrayHandler = new GLSLArrayHandler(adc);
+ final GLArrayDataClient adc = new GLArrayDataClient();
+ final GLArrayHandler glArrayHandler = new GLSLArrayHandler(adc);
adc.init(name, -1, comps, dataType, normalized, 0, null, initialElementCount, 0 /* mappedElementCount */, true, glArrayHandler, 0, 0, 0, 0, true);
return adc;
}
@@ -138,18 +138,18 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
* @param stride
* @param buffer the user define data
*/
- public static GLArrayDataClient createGLSL(String name, int comps,
- int dataType, boolean normalized, int stride, Buffer buffer)
+ public static GLArrayDataClient createGLSL(final String name, final int comps,
+ final int dataType, final boolean normalized, final int stride, final Buffer buffer)
throws GLException
{
- GLArrayDataClient adc = new GLArrayDataClient();
- GLArrayHandler glArrayHandler = new GLSLArrayHandler(adc);
+ final GLArrayDataClient adc = new GLArrayDataClient();
+ final GLArrayHandler glArrayHandler = new GLSLArrayHandler(adc);
adc.init(name, -1, comps, dataType, normalized, stride, buffer, comps*comps, 0 /* mappedElementCount */, true, glArrayHandler, 0, 0, 0, 0, true);
return adc;
}
@Override
- public void associate(Object obj, boolean enable) {
+ public void associate(final Object obj, final boolean enable) {
if(obj instanceof ShaderState) {
if(enable) {
shaderState = (ShaderState)obj;
@@ -177,30 +177,30 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
//
@Override
- public final void setVBOWritten(boolean written) {
+ public final void setVBOWritten(final boolean written) {
bufferWritten = ( 0 == mappedElementCount ) ? written : true;
}
@Override
- public void destroy(GL gl) {
+ public void destroy(final GL gl) {
reset(gl);
super.destroy(gl);
}
@Override
- public void reset(GL gl) {
+ public void reset(final GL gl) {
enableBuffer(gl, false);
reset();
}
@Override
- public void seal(GL gl, boolean seal) {
+ public void seal(final GL gl, final boolean seal) {
seal(seal);
enableBuffer(gl, seal);
}
@Override
- public void enableBuffer(GL gl, boolean enable) {
+ public void enableBuffer(final GL gl, final boolean enable) {
if( enableBufferAlways || bufferEnabled != enable ) {
if(enable) {
checkSeal(true);
@@ -213,7 +213,7 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
}
@Override
- public boolean bindBuffer(GL gl, boolean bind) {
+ public boolean bindBuffer(final GL gl, final boolean bind) {
if(bind) {
checkSeal(true);
// init/generate VBO name if not done yet
@@ -223,7 +223,7 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
}
@Override
- public void setEnableAlways(boolean always) {
+ public void setEnableAlways(final boolean always) {
enableBufferAlways = always;
}
@@ -242,7 +242,7 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
}
@Override
- public void seal(boolean seal)
+ public void seal(final boolean seal)
{
if( sealed == seal ) return;
sealed = seal;
@@ -281,7 +281,7 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
* The arguments remaining elements must be a multiple of this arrays element stride.
*/
@Override
- public void put(Buffer v) {
+ public void put(final Buffer v) {
if ( sealed ) return;
/** FIXME: isn't true for interleaved arrays !
if(0!=(v.remaining() % strideL)) {
@@ -292,33 +292,33 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
}
@Override
- public void putb(byte v) {
+ public void putb(final byte v) {
if ( sealed ) return;
growBufferIfNecessary(1);
Buffers.putb(buffer, v);
}
@Override
- public void puts(short v) {
+ public void puts(final short v) {
if ( sealed ) return;
growBufferIfNecessary(1);
Buffers.puts(buffer, v);
}
@Override
- public void puti(int v) {
+ public void puti(final int v) {
if ( sealed ) return;
growBufferIfNecessary(1);
Buffers.puti(buffer, v);
}
@Override
- public void putx(int v) {
+ public void putx(final int v) {
puti(v);
}
@Override
- public void putf(float v) {
+ public void putf(final float v) {
if ( sealed ) return;
growBufferIfNecessary(1);
Buffers.putf(buffer, v);
@@ -349,7 +349,7 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
// non public matters
- protected final boolean growBufferIfNecessary(int spareComponents) {
+ protected final boolean growBufferIfNecessary(final int spareComponents) {
if( buffer==null || buffer.remaining()
*/
- public GLArrayDataClient(GLArrayDataClient src) {
+ public GLArrayDataClient(final GLArrayDataClient src) {
super(src);
this.isValidated = src.isValidated;
this.sealed = src.sealed;
@@ -481,7 +481,7 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
try {
final Constructor extends GLArrayHandler> ctor = clazz.getConstructor(GLArrayDataEditable.class);
this.glArrayHandler = ctor.newInstance(this);
- } catch (Exception e) {
+ } catch (final Exception e) {
throw new RuntimeException("Could not ctor "+clazz.getName()+"("+this.getClass().getName()+")", e);
}
} else {
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataServer.java b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataServer.java
index 833f1ccda..51c55e326 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataServer.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataServer.java
@@ -81,12 +81,12 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE
*
* @see javax.media.opengl.GLContext#getPredefinedArrayIndexName(int)
*/
- public static GLArrayDataServer createFixed(int index, int compsPerElement, int dataType, boolean normalized, int stride,
- Buffer buffer, int vboUsage)
+ public static GLArrayDataServer createFixed(final int index, final int compsPerElement, final int dataType, final boolean normalized, final int stride,
+ final Buffer buffer, final int vboUsage)
throws GLException
{
- GLArrayDataServer ads = new GLArrayDataServer();
- GLArrayHandler glArrayHandler = new GLFixedArrayHandler(ads);
+ final GLArrayDataServer ads = new GLArrayDataServer();
+ final GLArrayHandler glArrayHandler = new GLFixedArrayHandler(ads);
ads.init(null, index, compsPerElement, dataType, normalized, stride, buffer, buffer.limit(), 0 /* mappedElementCount */, false,
glArrayHandler, 0, 0, vboUsage, GL.GL_ARRAY_BUFFER, false);
return ads;
@@ -113,12 +113,12 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE
*
* @see javax.media.opengl.GLContext#getPredefinedArrayIndexName(int)
*/
- public static GLArrayDataServer createFixed(int index, int compsPerElement, int dataType, boolean normalized, int initialElementCount,
- int vboUsage)
+ public static GLArrayDataServer createFixed(final int index, final int compsPerElement, final int dataType, final boolean normalized, final int initialElementCount,
+ final int vboUsage)
throws GLException
{
- GLArrayDataServer ads = new GLArrayDataServer();
- GLArrayHandler glArrayHandler = new GLFixedArrayHandler(ads);
+ final GLArrayDataServer ads = new GLArrayDataServer();
+ final GLArrayHandler glArrayHandler = new GLFixedArrayHandler(ads);
ads.init(null, index, compsPerElement, dataType, normalized, 0, null, initialElementCount, 0 /* mappedElementCount */, false,
glArrayHandler, 0, 0, vboUsage, GL.GL_ARRAY_BUFFER, false);
return ads;
@@ -134,12 +134,12 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE
* @param initialElementCount
* @param vboUsage {@link GL2ES2#GL_STREAM_DRAW}, {@link GL#GL_STATIC_DRAW} or {@link GL#GL_DYNAMIC_DRAW}
*/
- public static GLArrayDataServer createGLSL(String name, int compsPerElement,
- int dataType, boolean normalized, int initialElementCount, int vboUsage)
+ public static GLArrayDataServer createGLSL(final String name, final int compsPerElement,
+ final int dataType, final boolean normalized, final int initialElementCount, final int vboUsage)
throws GLException
{
- GLArrayDataServer ads = new GLArrayDataServer();
- GLArrayHandler glArrayHandler = new GLSLArrayHandler(ads);
+ final GLArrayDataServer ads = new GLArrayDataServer();
+ final GLArrayHandler glArrayHandler = new GLSLArrayHandler(ads);
ads.init(name, -1, compsPerElement, dataType, normalized, 0, null, initialElementCount,
0 /* mappedElementCount */, true, glArrayHandler, 0, 0, vboUsage, GL.GL_ARRAY_BUFFER, true);
return ads;
@@ -155,12 +155,12 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE
* @param mappedElementCount
* @param vboUsage {@link GL2ES2#GL_STREAM_DRAW}, {@link GL#GL_STATIC_DRAW} or {@link GL#GL_DYNAMIC_DRAW}
*/
- public static GLArrayDataServer createGLSLMapped(String name, int compsPerElement,
- int dataType, boolean normalized, int mappedElementCount, int vboUsage)
+ public static GLArrayDataServer createGLSLMapped(final String name, final int compsPerElement,
+ final int dataType, final boolean normalized, final int mappedElementCount, final int vboUsage)
throws GLException
{
- GLArrayDataServer ads = new GLArrayDataServer();
- GLArrayHandler glArrayHandler = new GLSLArrayHandler(ads);
+ final GLArrayDataServer ads = new GLArrayDataServer();
+ final GLArrayHandler glArrayHandler = new GLSLArrayHandler(ads);
ads.init(name, -1, compsPerElement, dataType, normalized, 0, null, 0 /* initialElementCount */,
mappedElementCount, true, glArrayHandler, 0, 0, vboUsage, GL.GL_ARRAY_BUFFER, true);
ads.seal(true);
@@ -178,13 +178,13 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE
* @param buffer the user define data
* @param vboUsage {@link GL2ES2#GL_STREAM_DRAW}, {@link GL#GL_STATIC_DRAW} or {@link GL#GL_DYNAMIC_DRAW}
*/
- public static GLArrayDataServer createGLSL(String name, int compsPerElement,
- int dataType, boolean normalized, int stride, Buffer buffer,
- int vboUsage)
+ public static GLArrayDataServer createGLSL(final String name, final int compsPerElement,
+ final int dataType, final boolean normalized, final int stride, final Buffer buffer,
+ final int vboUsage)
throws GLException
{
- GLArrayDataServer ads = new GLArrayDataServer();
- GLArrayHandler glArrayHandler = new GLSLArrayHandler(ads);
+ final GLArrayDataServer ads = new GLArrayDataServer();
+ final GLArrayHandler glArrayHandler = new GLSLArrayHandler(ads);
ads.init(name, -1, compsPerElement, dataType, normalized, stride, buffer, buffer.limit(), 0 /* mappedElementCount */, true,
glArrayHandler, 0, 0, vboUsage, GL.GL_ARRAY_BUFFER, true);
return ads;
@@ -203,12 +203,12 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE
* @param vboTarget {@link GL#GL_ELEMENT_ARRAY_BUFFER}, ..
* {@link GL#glGenBuffers(int, int[], int)
*/
- public static GLArrayDataServer createData(int compsPerElement, int dataType, int stride,
- Buffer buffer, int vboUsage, int vboTarget)
+ public static GLArrayDataServer createData(final int compsPerElement, final int dataType, final int stride,
+ final Buffer buffer, final int vboUsage, final int vboTarget)
throws GLException
{
- GLArrayDataServer ads = new GLArrayDataServer();
- GLArrayHandler glArrayHandler = new GLDataArrayHandler(ads);
+ final GLArrayDataServer ads = new GLArrayDataServer();
+ final GLArrayHandler glArrayHandler = new GLDataArrayHandler(ads);
ads.init(null, -1, compsPerElement, dataType, false, stride, buffer, buffer.limit(), 0 /* mappedElementCount */, false,
glArrayHandler, 0, 0, vboUsage, vboTarget, false);
return ads;
@@ -225,12 +225,12 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE
* @param vboUsage {@link GL2ES2#GL_STREAM_DRAW}, {@link GL#GL_STATIC_DRAW} or {@link GL#GL_DYNAMIC_DRAW}
* @param vboTarget {@link GL#GL_ELEMENT_ARRAY_BUFFER}, ..
*/
- public static GLArrayDataServer createData(int compsPerElement, int dataType, int initialElementCount,
- int vboUsage, int vboTarget)
+ public static GLArrayDataServer createData(final int compsPerElement, final int dataType, final int initialElementCount,
+ final int vboUsage, final int vboTarget)
throws GLException
{
- GLArrayDataServer ads = new GLArrayDataServer();
- GLArrayHandler glArrayHandler = new GLDataArrayHandler(ads);
+ final GLArrayDataServer ads = new GLArrayDataServer();
+ final GLArrayHandler glArrayHandler = new GLDataArrayHandler(ads);
ads.init(null, -1, compsPerElement, dataType, false, 0, null, initialElementCount, 0 /* mappedElementCount */, false,
glArrayHandler, 0, 0, vboUsage, vboTarget, false);
return ads;
@@ -249,12 +249,12 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE
* @param vboUsage {@link GL2ES2#GL_STREAM_DRAW}, {@link GL#GL_STATIC_DRAW} or {@link GL#GL_DYNAMIC_DRAW}
* @param vboTarget {@link GL#GL_ELEMENT_ARRAY_BUFFER}, ..
*/
- public static GLArrayDataServer createDataMapped(int compsPerElement, int dataType, int mappedElementCount,
- int vboUsage, int vboTarget)
+ public static GLArrayDataServer createDataMapped(final int compsPerElement, final int dataType, final int mappedElementCount,
+ final int vboUsage, final int vboTarget)
throws GLException
{
- GLArrayDataServer ads = new GLArrayDataServer();
- GLArrayHandler glArrayHandler = new GLDataArrayHandler(ads);
+ final GLArrayDataServer ads = new GLArrayDataServer();
+ final GLArrayHandler glArrayHandler = new GLDataArrayHandler(ads);
ads.init(null, -1, compsPerElement, dataType, false, 0, null, 0 /* initialElementCount */, mappedElementCount, false,
glArrayHandler, 0, 0, vboUsage, vboTarget, false);
return ads;
@@ -271,12 +271,12 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE
* @param initialElementCount The initial number of all interleaved elements
* @param vboUsage {@link GL2ES2#GL_STREAM_DRAW}, {@link GL#GL_STATIC_DRAW} or {@link GL#GL_DYNAMIC_DRAW}
*/
- public static GLArrayDataServer createFixedInterleaved(int compsPerElement, int dataType, boolean normalized, int initialElementCount,
- int vboUsage)
+ public static GLArrayDataServer createFixedInterleaved(final int compsPerElement, final int dataType, final boolean normalized, final int initialElementCount,
+ final int vboUsage)
throws GLException
{
- GLArrayDataServer ads = new GLArrayDataServer();
- GLArrayHandler glArrayHandler = new GLArrayHandlerInterleaved(ads);
+ final GLArrayDataServer ads = new GLArrayDataServer();
+ final GLArrayHandler glArrayHandler = new GLArrayHandlerInterleaved(ads);
ads.init(GLPointerFuncUtil.mgl_InterleaveArray, -1, compsPerElement, dataType, false, 0, null, initialElementCount, 0 /* mappedElementCount */, false,
glArrayHandler, 0, 0, vboUsage, GL.GL_ARRAY_BUFFER, false);
return ads;
@@ -293,12 +293,12 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE
* @param mappedElementCount The total number of all interleaved elements
* @param vboUsage {@link GL2ES2#GL_STREAM_DRAW}, {@link GL#GL_STATIC_DRAW} or {@link GL#GL_DYNAMIC_DRAW}
*/
- public static GLArrayDataServer createFixedInterleavedMapped(int compsPerElement, int dataType, boolean normalized, int mappedElementCount,
- int vboUsage)
+ public static GLArrayDataServer createFixedInterleavedMapped(final int compsPerElement, final int dataType, final boolean normalized, final int mappedElementCount,
+ final int vboUsage)
throws GLException
{
- GLArrayDataServer ads = new GLArrayDataServer();
- GLArrayHandler glArrayHandler = new GLArrayHandlerInterleaved(ads);
+ final GLArrayDataServer ads = new GLArrayDataServer();
+ final GLArrayHandler glArrayHandler = new GLArrayHandlerInterleaved(ads);
ads.init(GLPointerFuncUtil.mgl_InterleaveArray, -1, compsPerElement, dataType, false, 0, null, 0 /* initialElementCount */, mappedElementCount, false,
glArrayHandler, 0, 0, vboUsage, GL.GL_ARRAY_BUFFER, false);
ads.seal(true);
@@ -317,12 +317,12 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE
* @param buffer The user define data of all interleaved elements
* @param vboUsage {@link GL2ES2#GL_STREAM_DRAW}, {@link GL#GL_STATIC_DRAW} or {@link GL#GL_DYNAMIC_DRAW}
*/
- public static GLArrayDataServer createFixedInterleaved(int compsPerElement, int dataType, boolean normalized, int stride, Buffer buffer,
- int vboUsage)
+ public static GLArrayDataServer createFixedInterleaved(final int compsPerElement, final int dataType, final boolean normalized, final int stride, final Buffer buffer,
+ final int vboUsage)
throws GLException
{
- GLArrayDataServer ads = new GLArrayDataServer();
- GLArrayHandler glArrayHandler = new GLArrayHandlerInterleaved(ads);
+ final GLArrayDataServer ads = new GLArrayDataServer();
+ final GLArrayHandler glArrayHandler = new GLArrayHandlerInterleaved(ads);
ads.init(GLPointerFuncUtil.mgl_InterleaveArray, -1, compsPerElement, dataType, normalized, stride, buffer, buffer.limit(), 0 /* mappedElementCount */, false,
glArrayHandler, 0, 0, vboUsage, GL.GL_ARRAY_BUFFER, false);
return ads;
@@ -342,7 +342,7 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE
* @param comps This interleaved array segment's component count per element
* @param vboTarget {@link GL#GL_ARRAY_BUFFER} or {@link GL#GL_ELEMENT_ARRAY_BUFFER}
*/
- public GLArrayData addFixedSubArray(int index, int comps, int vboTarget) {
+ public GLArrayData addFixedSubArray(final int index, final int comps, final int vboTarget) {
if(interleavedOffset >= getComponentCount() * getComponentSizeInBytes()) {
final int iOffC = interleavedOffset / getComponentSizeInBytes();
throw new GLException("Interleaved offset > total components ("+iOffC+" > "+getComponentCount()+")");
@@ -382,12 +382,12 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE
* @param initialElementCount The initial number of all interleaved elements
* @param vboUsage {@link GL2ES2#GL_STREAM_DRAW}, {@link GL#GL_STATIC_DRAW} or {@link GL#GL_DYNAMIC_DRAW}
*/
- public static GLArrayDataServer createGLSLInterleaved(int compsPerElement, int dataType, boolean normalized, int initialElementCount,
- int vboUsage)
+ public static GLArrayDataServer createGLSLInterleaved(final int compsPerElement, final int dataType, final boolean normalized, final int initialElementCount,
+ final int vboUsage)
throws GLException
{
- GLArrayDataServer ads = new GLArrayDataServer();
- GLArrayHandler glArrayHandler = new GLSLArrayHandlerInterleaved(ads);
+ final GLArrayDataServer ads = new GLArrayDataServer();
+ final GLArrayHandler glArrayHandler = new GLSLArrayHandlerInterleaved(ads);
ads.init(GLPointerFuncUtil.mgl_InterleaveArray, -1, compsPerElement, dataType, normalized, 0, null, initialElementCount, 0 /* mappedElementCount */, false,
glArrayHandler, 0, 0, vboUsage, GL.GL_ARRAY_BUFFER, true);
return ads;
@@ -404,11 +404,11 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE
* @param mappedElementCount The total number of all interleaved elements
* @param vboUsage {@link GL2ES2#GL_STREAM_DRAW}, {@link GL#GL_STATIC_DRAW} or {@link GL#GL_DYNAMIC_DRAW}
*/
- public static GLArrayDataServer createGLSLInterleavedMapped(int compsPerElement, int dataType, boolean normalized, int mappedElementCount, int vboUsage)
+ public static GLArrayDataServer createGLSLInterleavedMapped(final int compsPerElement, final int dataType, final boolean normalized, final int mappedElementCount, final int vboUsage)
throws GLException
{
- GLArrayDataServer ads = new GLArrayDataServer();
- GLArrayHandler glArrayHandler = new GLSLArrayHandlerInterleaved(ads);
+ final GLArrayDataServer ads = new GLArrayDataServer();
+ final GLArrayHandler glArrayHandler = new GLSLArrayHandlerInterleaved(ads);
ads.init(GLPointerFuncUtil.mgl_InterleaveArray, -1, compsPerElement, dataType, normalized, 0, null, 0 /* initialElementCount */, mappedElementCount, false,
glArrayHandler, 0, 0, vboUsage, GL.GL_ARRAY_BUFFER, true);
ads.seal(true);
@@ -427,12 +427,12 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE
* @param buffer The user define data of all interleaved elements
* @param vboUsage {@link GL2ES2#GL_STREAM_DRAW}, {@link GL#GL_STATIC_DRAW} or {@link GL#GL_DYNAMIC_DRAW}
*/
- public static GLArrayDataServer createGLSLInterleaved(int compsPerElement, int dataType, boolean normalized, int stride, Buffer buffer,
- int vboUsage)
+ public static GLArrayDataServer createGLSLInterleaved(final int compsPerElement, final int dataType, final boolean normalized, final int stride, final Buffer buffer,
+ final int vboUsage)
throws GLException
{
- GLArrayDataServer ads = new GLArrayDataServer();
- GLArrayHandler glArrayHandler = new GLSLArrayHandlerInterleaved(ads);
+ final GLArrayDataServer ads = new GLArrayDataServer();
+ final GLArrayHandler glArrayHandler = new GLSLArrayHandlerInterleaved(ads);
ads.init(GLPointerFuncUtil.mgl_InterleaveArray, -1, compsPerElement, dataType, normalized, stride, buffer, buffer.limit(), 0 /* mappedElementCount */, false,
glArrayHandler, 0, 0, vboUsage, GL.GL_ARRAY_BUFFER, true);
return ads;
@@ -451,7 +451,7 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE
* @param comps This interleaved array segment's component count per element
* @param vboTarget {@link GL#GL_ARRAY_BUFFER} or {@link GL#GL_ELEMENT_ARRAY_BUFFER}
*/
- public GLArrayData addGLSLSubArray(String name, int comps, int vboTarget) {
+ public GLArrayData addGLSLSubArray(final String name, final int comps, final int vboTarget) {
if(interleavedOffset >= getComponentCount() * getComponentSizeInBytes()) {
final int iOffC = interleavedOffset / getComponentSizeInBytes();
throw new GLException("Interleaved offset > total components ("+iOffC+" > "+getComponentCount()+")");
@@ -480,7 +480,7 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE
return ad;
}
- public final void setInterleavedOffset(int interleavedOffset) {
+ public final void setInterleavedOffset(final int interleavedOffset) {
this.interleavedOffset = interleavedOffset;
}
@@ -497,11 +497,11 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE
//
@Override
- public void destroy(GL gl) {
+ public void destroy(final GL gl) {
// super.destroy(gl):
// - GLArrayDataClient.destroy(gl): disables & clears client-side buffer
// - GLArrayDataWrapper.destroy(gl) (clears all values 'vboName' ..)
- int _vboName = vboName;
+ final int _vboName = vboName;
super.destroy(gl);
if(_vboName!=0) {
final int[] tmp = new int[] { _vboName } ;
@@ -520,12 +520,12 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE
* Only possible if buffer is defined.
*/
@Override
- public void setVBOEnabled(boolean vboUsage) {
+ public void setVBOEnabled(final boolean vboUsage) {
checkSeal(false);
super.setVBOEnabled(vboUsage);
}
- public GLBufferStorage mapStorage(GL gl, int access) {
+ public GLBufferStorage mapStorage(final GL gl, final int access) {
if( null != this.getBuffer() ) {
throw new IllegalStateException("user buffer not null");
}
@@ -542,7 +542,7 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE
rewind();
return storage;
}
- public GLBufferStorage mapStorage(GL gl, long offset, long length, int access) {
+ public GLBufferStorage mapStorage(final GL gl, final long offset, final long length, final int access) {
if( null != this.getBuffer() ) {
throw new IllegalStateException("user buffer not null");
}
@@ -559,7 +559,7 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE
rewind();
return storage;
}
- private final void setMappedBuffer(GLBufferStorage storage) {
+ private final void setMappedBuffer(final GLBufferStorage storage) {
mappedStorage = storage;
final ByteBuffer bb = storage.getMappedBuffer();
if(componentClazz==ByteBuffer.class) {
@@ -575,7 +575,7 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE
}
}
- public void unmapStorage(GL gl) {
+ public void unmapStorage(final GL gl) {
if( null == mappedStorage ) {
throw new IllegalStateException("not mapped");
}
@@ -621,10 +621,10 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE
//
@Override
- protected void init(String name, int index, int comps, int dataType, boolean normalized,
- int stride, Buffer data, int initialElementCount, int mappedElementCount,
- boolean isVertexAttribute,
- GLArrayHandler glArrayHandler, int vboName, long vboOffset, int vboUsage, int vboTarget, boolean usesGLSL)
+ protected void init(final String name, final int index, final int comps, final int dataType, final boolean normalized,
+ final int stride, final Buffer data, final int initialElementCount, final int mappedElementCount,
+ final boolean isVertexAttribute,
+ final GLArrayHandler glArrayHandler, final int vboName, final long vboOffset, final int vboUsage, final int vboTarget, final boolean usesGLSL)
throws GLException
{
super.init(name, index, comps, dataType, normalized, stride, data, initialElementCount, mappedElementCount, isVertexAttribute,
@@ -634,10 +634,10 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE
}
@Override
- protected void init_vbo(GL gl) {
+ protected void init_vbo(final GL gl) {
super.init_vbo(gl);
if(vboEnabled && vboName==0) {
- int[] tmp = new int[1];
+ final int[] tmp = new int[1];
gl.glGenBuffers(1, tmp, 0);
vboName = tmp[0];
if(0 < interleavedOffset) {
@@ -657,7 +657,7 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE
* All other values are simply copied.
*
*/
- public GLArrayDataServer(GLArrayDataServer src) {
+ public GLArrayDataServer(final GLArrayDataServer src) {
super(src);
this.interleavedOffset = src.interleavedOffset;
this.mappedStorage = src.mappedStorage;
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataWrapper.java b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataWrapper.java
index f617fed73..867bc00ac 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataWrapper.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataWrapper.java
@@ -66,11 +66,11 @@ public class GLArrayDataWrapper implements GLArrayData {
*
* @throws GLException
*/
- public static GLArrayDataWrapper createFixed(int index, int comps, int dataType, boolean normalized, int stride,
- Buffer buffer, int vboName, long vboOffset, int vboUsage, int vboTarget)
+ public static GLArrayDataWrapper createFixed(final int index, final int comps, final int dataType, final boolean normalized, final int stride,
+ final Buffer buffer, final int vboName, final long vboOffset, final int vboUsage, final int vboTarget)
throws GLException
{
- GLArrayDataWrapper adc = new GLArrayDataWrapper();
+ final GLArrayDataWrapper adc = new GLArrayDataWrapper();
adc.init(null, index, comps, dataType, normalized, stride, buffer, 0 /* mappedElementCount */,
false, vboName, vboOffset, vboUsage, vboTarget);
return adc;
@@ -93,11 +93,11 @@ public class GLArrayDataWrapper implements GLArrayData {
*
* @throws GLException
*/
- public static GLArrayDataWrapper createFixed(int index, int comps, int dataType, boolean normalized, int stride,
- int mappedElementCount, int vboName, long vboOffset, int vboUsage, int vboTarget)
+ public static GLArrayDataWrapper createFixed(final int index, final int comps, final int dataType, final boolean normalized, final int stride,
+ final int mappedElementCount, final int vboName, final long vboOffset, final int vboUsage, final int vboTarget)
throws GLException
{
- GLArrayDataWrapper adc = new GLArrayDataWrapper();
+ final GLArrayDataWrapper adc = new GLArrayDataWrapper();
adc.init(null, index, comps, dataType, normalized, stride, null, mappedElementCount,
false, vboName, vboOffset, vboUsage, vboTarget);
return adc;
@@ -119,11 +119,11 @@ public class GLArrayDataWrapper implements GLArrayData {
* @return the new create instance
* @throws GLException
*/
- public static GLArrayDataWrapper createGLSL(String name, int comps, int dataType, boolean normalized, int stride,
- Buffer buffer, int vboName, long vboOffset, int vboUsage, int vboTarget)
+ public static GLArrayDataWrapper createGLSL(final String name, final int comps, final int dataType, final boolean normalized, final int stride,
+ final Buffer buffer, final int vboName, final long vboOffset, final int vboUsage, final int vboTarget)
throws GLException
{
- GLArrayDataWrapper adc = new GLArrayDataWrapper();
+ final GLArrayDataWrapper adc = new GLArrayDataWrapper();
adc.init(name, -1, comps, dataType, normalized, stride, buffer, 0 /* mappedElementCount */,
true, vboName, vboOffset, vboUsage, vboTarget);
return adc;
@@ -145,11 +145,11 @@ public class GLArrayDataWrapper implements GLArrayData {
* @return the new create instance
* @throws GLException
*/
- public static GLArrayDataWrapper createGLSL(String name, int comps, int dataType, boolean normalized, int stride,
- int mappedElementCount, int vboName, long vboOffset, int vboUsage, int vboTarget)
+ public static GLArrayDataWrapper createGLSL(final String name, final int comps, final int dataType, final boolean normalized, final int stride,
+ final int mappedElementCount, final int vboName, final long vboOffset, final int vboUsage, final int vboTarget)
throws GLException
{
- GLArrayDataWrapper adc = new GLArrayDataWrapper();
+ final GLArrayDataWrapper adc = new GLArrayDataWrapper();
adc.init(name, -1, comps, dataType, normalized, stride, null, mappedElementCount,
true, vboName, vboOffset, vboUsage, vboTarget);
return adc;
@@ -163,7 +163,7 @@ public class GLArrayDataWrapper implements GLArrayData {
* @param throwException whether to throw an exception if this instance has invalid parameter or not
* @return true if this instance has invalid parameter, otherwise false
*/
- public final boolean validate(GLProfile glp, boolean throwException) {
+ public final boolean validate(final GLProfile glp, final boolean throwException) {
if(!alive) {
if(throwException) {
throw new GLException("Instance !alive "+this);
@@ -180,7 +180,7 @@ public class GLArrayDataWrapper implements GLArrayData {
}
@Override
- public void associate(Object obj, boolean enable) {
+ public void associate(final Object obj, final boolean enable) {
// nop
}
@@ -198,16 +198,16 @@ public class GLArrayDataWrapper implements GLArrayData {
public final int getLocation() { return location; }
@Override
- public final int setLocation(int v) { location = v; return location; }
+ public final int setLocation(final int v) { location = v; return location; }
@Override
- public final int setLocation(GL2ES2 gl, int program) {
+ public final int setLocation(final GL2ES2 gl, final int program) {
location = gl.glGetAttribLocation(program, name);
return location;
}
@Override
- public final int setLocation(GL2ES2 gl, int program, int location) {
+ public final int setLocation(final GL2ES2 gl, final int program, final int location) {
this.location = location;
gl.glBindAttribLocation(program, location, name);
return location;
@@ -275,7 +275,7 @@ public class GLArrayDataWrapper implements GLArrayData {
public final Class> getBufferClass() { return componentClazz; }
@Override
- public void destroy(GL gl) {
+ public void destroy(final GL gl) {
buffer = null;
vboName=0;
vboEnabled=false;
@@ -305,7 +305,7 @@ public class GLArrayDataWrapper implements GLArrayData {
"]";
}
- public static final Class> getBufferClass(int dataType) {
+ public static final Class> getBufferClass(final int dataType) {
switch(dataType) {
case GL.GL_BYTE:
case GL.GL_UNSIGNED_BYTE:
@@ -314,7 +314,7 @@ public class GLArrayDataWrapper implements GLArrayData {
case GL.GL_UNSIGNED_SHORT:
return ShortBuffer.class;
case GL.GL_UNSIGNED_INT:
- case GL2ES1.GL_FIXED:
+ case GL.GL_FIXED:
case GL2ES2.GL_INT:
return IntBuffer.class;
case GL.GL_FLOAT:
@@ -325,7 +325,7 @@ public class GLArrayDataWrapper implements GLArrayData {
}
@Override
- public void setName(String newName) {
+ public void setName(final String newName) {
location = -1;
name = newName;
}
@@ -335,7 +335,7 @@ public class GLArrayDataWrapper implements GLArrayData {
* Only possible if a VBO buffer name is defined.
* @see #setVBOName(int)
*/
- public void setVBOEnabled(boolean vboEnabled) {
+ public void setVBOEnabled(final boolean vboEnabled) {
this.vboEnabled=vboEnabled;
}
@@ -345,7 +345,7 @@ public class GLArrayDataWrapper implements GLArrayData {
*
* @see #setVBOEnabled(boolean)
*/
- public void setVBOName(int vboName) {
+ public void setVBOName(final int vboName) {
this.vboName=vboName;
setVBOEnabled(0!=vboName);
}
@@ -353,20 +353,20 @@ public class GLArrayDataWrapper implements GLArrayData {
/**
* @param vboUsage {@link GL2ES2#GL_STREAM_DRAW}, {@link GL#GL_STATIC_DRAW} or {@link GL#GL_DYNAMIC_DRAW}
*/
- public void setVBOUsage(int vboUsage) {
+ public void setVBOUsage(final int vboUsage) {
this.vboUsage = vboUsage;
}
/**
* @param vboTarget either {@link GL#GL_ARRAY_BUFFER} or {@link GL#GL_ELEMENT_ARRAY_BUFFER}
*/
- public void setVBOTarget(int vboTarget) {
+ public void setVBOTarget(final int vboTarget) {
this.vboTarget = vboTarget;
}
- protected void init(String name, int index, int componentsPerElement, int componentType,
- boolean normalized, int stride, Buffer data, int mappedElementCount,
- boolean isVertexAttribute, int vboName, long vboOffset, int vboUsage, int vboTarget)
+ protected void init(final String name, final int index, final int componentsPerElement, final int componentType,
+ final boolean normalized, final int stride, final Buffer data, final int mappedElementCount,
+ final boolean isVertexAttribute, final int vboName, final long vboOffset, final int vboUsage, final int vboTarget)
throws GLException
{
if( 0
*/
- public GLArrayDataWrapper(GLArrayDataWrapper src) {
+ public GLArrayDataWrapper(final GLArrayDataWrapper src) {
this.alive = src.alive;
this.index = src.index;
this.location = src.location;
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLBuffers.java b/src/jogl/classes/com/jogamp/opengl/util/GLBuffers.java
index b9903ac6d..67dc08450 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/GLBuffers.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/GLBuffers.java
@@ -44,6 +44,7 @@ import java.nio.ByteBuffer;
import javax.media.opengl.GL;
import javax.media.opengl.GL2;
import javax.media.opengl.GL2ES2;
+import javax.media.opengl.GL2ES3;
import javax.media.opengl.GL2GL3;
import javax.media.opengl.GLES2;
import javax.media.opengl.GLException;
@@ -65,7 +66,7 @@ public class GLBuffers extends Buffers {
* GL_UNSIGNED_INT,
* GL_HILO16_NV
*/
- public static final boolean isSignedGLType(int glType) {
+ public static final boolean isSignedGLType(final int glType) {
switch (glType) { // 29
case GL.GL_UNSIGNED_BYTE:
case GL.GL_UNSIGNED_SHORT:
@@ -85,7 +86,7 @@ public class GLBuffers extends Buffers {
* GL_HALF_FLOAT_OES,
* GL_DOUBLE
*/
- public static final boolean isGLTypeFixedPoint(int glType) {
+ public static final boolean isGLTypeFixedPoint(final int glType) {
switch(glType) {
case GL.GL_FLOAT:
case GL.GL_HALF_FLOAT:
@@ -123,7 +124,7 @@ public class GLBuffers extends Buffers {
*
* @return -1 if glType is unhandled, otherwise the actual value > 0
*/
- public static final int sizeOfGLType(int glType) {
+ public static final int sizeOfGLType(final int glType) {
switch (glType) { // 29
// case GL2.GL_BITMAP:
case GL.GL_BYTE:
@@ -136,9 +137,9 @@ public class GLBuffers extends Buffers {
case GL.GL_UNSIGNED_SHORT:
case GL.GL_UNSIGNED_SHORT_5_6_5:
case GL2GL3.GL_UNSIGNED_SHORT_5_6_5_REV:
- case GL2GL3.GL_UNSIGNED_SHORT_4_4_4_4:
+ case GL.GL_UNSIGNED_SHORT_4_4_4_4:
case GL2GL3.GL_UNSIGNED_SHORT_4_4_4_4_REV:
- case GL2GL3.GL_UNSIGNED_SHORT_5_5_5_1:
+ case GL.GL_UNSIGNED_SHORT_5_5_5_1:
case GL2GL3.GL_UNSIGNED_SHORT_1_5_5_5_REV:
case GL2.GL_UNSIGNED_SHORT_8_8_APPLE:
case GL2.GL_UNSIGNED_SHORT_8_8_REV_APPLE:
@@ -151,16 +152,16 @@ public class GLBuffers extends Buffers {
case GL.GL_UNSIGNED_INT:
case GL2GL3.GL_UNSIGNED_INT_8_8_8_8:
case GL2GL3.GL_UNSIGNED_INT_8_8_8_8_REV:
- case GL2GL3.GL_UNSIGNED_INT_10_10_10_2:
- case GL2GL3.GL_UNSIGNED_INT_2_10_10_10_REV:
- case GL2GL3.GL_UNSIGNED_INT_24_8:
- case GL2GL3.GL_UNSIGNED_INT_10F_11F_11F_REV:
- case GL2GL3.GL_UNSIGNED_INT_5_9_9_9_REV:
+ case GL2ES2.GL_UNSIGNED_INT_10_10_10_2:
+ case GL2ES2.GL_UNSIGNED_INT_2_10_10_10_REV:
+ case GL.GL_UNSIGNED_INT_24_8:
+ case GL.GL_UNSIGNED_INT_10F_11F_11F_REV:
+ case GL2ES3.GL_UNSIGNED_INT_5_9_9_9_REV:
case GL2.GL_HILO16_NV:
case GL2.GL_SIGNED_HILO16_NV:
return SIZEOF_INT;
- case GL2GL3.GL_FLOAT_32_UNSIGNED_INT_24_8_REV:
+ case GL2ES3.GL_FLOAT_32_UNSIGNED_INT_24_8_REV:
return SIZEOF_LONG;
case GL.GL_FLOAT:
@@ -197,7 +198,7 @@ public class GLBuffers extends Buffers {
*
* @return null if glType is unhandled, otherwise the new Buffer object
*/
- public static final Buffer newDirectGLBuffer(int glType, int numElements) {
+ public static final Buffer newDirectGLBuffer(final int glType, final int numElements) {
switch (glType) { // 29
case GL.GL_BYTE:
case GL.GL_UNSIGNED_BYTE:
@@ -209,9 +210,9 @@ public class GLBuffers extends Buffers {
case GL.GL_UNSIGNED_SHORT:
case GL.GL_UNSIGNED_SHORT_5_6_5:
case GL2GL3.GL_UNSIGNED_SHORT_5_6_5_REV:
- case GL2GL3.GL_UNSIGNED_SHORT_4_4_4_4:
+ case GL.GL_UNSIGNED_SHORT_4_4_4_4:
case GL2GL3.GL_UNSIGNED_SHORT_4_4_4_4_REV:
- case GL2GL3.GL_UNSIGNED_SHORT_5_5_5_1:
+ case GL.GL_UNSIGNED_SHORT_5_5_5_1:
case GL2GL3.GL_UNSIGNED_SHORT_1_5_5_5_REV:
case GL2.GL_UNSIGNED_SHORT_8_8_APPLE:
case GL2.GL_UNSIGNED_SHORT_8_8_REV_APPLE:
@@ -224,22 +225,22 @@ public class GLBuffers extends Buffers {
case GL.GL_UNSIGNED_INT:
case GL2GL3.GL_UNSIGNED_INT_8_8_8_8:
case GL2GL3.GL_UNSIGNED_INT_8_8_8_8_REV:
- case GL2GL3.GL_UNSIGNED_INT_10_10_10_2:
- case GL2GL3.GL_UNSIGNED_INT_2_10_10_10_REV:
- case GL2GL3.GL_UNSIGNED_INT_24_8:
- case GL2GL3.GL_UNSIGNED_INT_10F_11F_11F_REV:
- case GL2GL3.GL_UNSIGNED_INT_5_9_9_9_REV:
+ case GL2ES2.GL_UNSIGNED_INT_10_10_10_2:
+ case GL2ES2.GL_UNSIGNED_INT_2_10_10_10_REV:
+ case GL.GL_UNSIGNED_INT_24_8:
+ case GL.GL_UNSIGNED_INT_10F_11F_11F_REV:
+ case GL2ES3.GL_UNSIGNED_INT_5_9_9_9_REV:
case GL2.GL_HILO16_NV:
case GL2.GL_SIGNED_HILO16_NV:
return newDirectIntBuffer(numElements);
- case GL2GL3.GL_FLOAT_32_UNSIGNED_INT_24_8_REV:
+ case GL2ES3.GL_FLOAT_32_UNSIGNED_INT_24_8_REV:
return newDirectLongBuffer(numElements);
case GL.GL_FLOAT:
return newDirectFloatBuffer(numElements);
- case GL2.GL_DOUBLE:
+ case GL2GL3.GL_DOUBLE:
return newDirectDoubleBuffer(numElements);
}
return null;
@@ -269,7 +270,7 @@ public class GLBuffers extends Buffers {
* GL_FLOAT, GL_DOUBLE
* @return null if glType is unhandled or parent is null or bufLen is 0, otherwise the new Buffer object
*/
- public static final Buffer sliceGLBuffer(ByteBuffer parent, int bytePos, int byteLen, int glType) {
+ public static final Buffer sliceGLBuffer(final ByteBuffer parent, final int bytePos, final int byteLen, final int glType) {
if (parent == null || byteLen == 0) {
return null;
}
@@ -292,9 +293,9 @@ public class GLBuffers extends Buffers {
case GL.GL_UNSIGNED_SHORT:
case GL.GL_UNSIGNED_SHORT_5_6_5:
case GL2GL3.GL_UNSIGNED_SHORT_5_6_5_REV:
- case GL2GL3.GL_UNSIGNED_SHORT_4_4_4_4:
+ case GL.GL_UNSIGNED_SHORT_4_4_4_4:
case GL2GL3.GL_UNSIGNED_SHORT_4_4_4_4_REV:
- case GL2GL3.GL_UNSIGNED_SHORT_5_5_5_1:
+ case GL.GL_UNSIGNED_SHORT_5_5_5_1:
case GL2GL3.GL_UNSIGNED_SHORT_1_5_5_5_REV:
case GL2.GL_UNSIGNED_SHORT_8_8_APPLE:
case GL2.GL_UNSIGNED_SHORT_8_8_REV_APPLE:
@@ -304,21 +305,21 @@ public class GLBuffers extends Buffers {
break;
case GL.GL_FIXED:
- case GL2GL3.GL_INT:
- case GL2ES2.GL_UNSIGNED_INT:
+ case GL2ES2.GL_INT:
+ case GL.GL_UNSIGNED_INT:
case GL2GL3.GL_UNSIGNED_INT_8_8_8_8:
case GL2GL3.GL_UNSIGNED_INT_8_8_8_8_REV:
- case GL2GL3.GL_UNSIGNED_INT_10_10_10_2:
- case GL2GL3.GL_UNSIGNED_INT_2_10_10_10_REV:
- case GL2GL3.GL_UNSIGNED_INT_24_8:
- case GL2GL3.GL_UNSIGNED_INT_10F_11F_11F_REV:
- case GL2GL3.GL_UNSIGNED_INT_5_9_9_9_REV:
+ case GL2ES2.GL_UNSIGNED_INT_10_10_10_2:
+ case GL2ES2.GL_UNSIGNED_INT_2_10_10_10_REV:
+ case GL.GL_UNSIGNED_INT_24_8:
+ case GL.GL_UNSIGNED_INT_10F_11F_11F_REV:
+ case GL2ES3.GL_UNSIGNED_INT_5_9_9_9_REV:
case GL2.GL_HILO16_NV:
case GL2.GL_SIGNED_HILO16_NV:
res = parent.slice().order(parent.order()).asIntBuffer(); // slice and duplicate may change byte order
break;
- case GL2GL3.GL_FLOAT_32_UNSIGNED_INT_24_8_REV:
+ case GL2ES3.GL_FLOAT_32_UNSIGNED_INT_24_8_REV:
res = parent.slice().order(parent.order()).asLongBuffer(); // slice and duplicate may change byte order
break;
@@ -326,7 +327,7 @@ public class GLBuffers extends Buffers {
res = parent.slice().order(parent.order()).asFloatBuffer(); // slice and duplicate may change byte order
break;
- case GL2.GL_DOUBLE:
+ case GL2GL3.GL_DOUBLE:
res = parent.slice().order(parent.order()).asDoubleBuffer(); // slice and duplicate may change byte order
break;
}
@@ -334,7 +335,7 @@ public class GLBuffers extends Buffers {
return res;
}
- private static final int glGetInteger(GL gl, int pname, int[] tmp) {
+ private static final int glGetInteger(final GL gl, final int pname, final int[] tmp) {
gl.glGetIntegerv(pname, tmp, 0);
return tmp[0];
}
@@ -359,9 +360,9 @@ public class GLBuffers extends Buffers {
* @return required minimum size of the buffer in bytes
* @throws GLException if alignment is invalid. Please contact the maintainer if this is our bug.
*/
- public static final int sizeof(GL gl, int tmp[],
- int bytesPerPixel, int width, int height, int depth,
- boolean pack) {
+ public static final int sizeof(final GL gl, final int tmp[],
+ final int bytesPerPixel, int width, int height, int depth,
+ final boolean pack) {
int rowLength = 0;
int skipRows = 0;
int skipPixels = 0;
@@ -372,9 +373,9 @@ public class GLBuffers extends Buffers {
if (pack) {
alignment = glGetInteger(gl, GL.GL_PACK_ALIGNMENT, tmp);
if(gl.isGL2GL3()) {
- rowLength = glGetInteger(gl, GL2GL3.GL_PACK_ROW_LENGTH, tmp);
- skipRows = glGetInteger(gl, GL2GL3.GL_PACK_SKIP_ROWS, tmp);
- skipPixels = glGetInteger(gl, GL2GL3.GL_PACK_SKIP_PIXELS, tmp);
+ rowLength = glGetInteger(gl, GL2ES3.GL_PACK_ROW_LENGTH, tmp);
+ skipRows = glGetInteger(gl, GL2ES3.GL_PACK_SKIP_ROWS, tmp);
+ skipPixels = glGetInteger(gl, GL2ES3.GL_PACK_SKIP_PIXELS, tmp);
if (depth > 1) {
imageHeight = glGetInteger(gl, GL2GL3.GL_PACK_IMAGE_HEIGHT, tmp);
skipImages = glGetInteger(gl, GL2GL3.GL_PACK_SKIP_IMAGES, tmp);
@@ -383,12 +384,12 @@ public class GLBuffers extends Buffers {
} else {
alignment = glGetInteger(gl, GL.GL_UNPACK_ALIGNMENT, tmp);
if(gl.isGL2GL3 ()) {
- rowLength = glGetInteger(gl, GL2GL3.GL_UNPACK_ROW_LENGTH, tmp);
- skipRows = glGetInteger(gl, GL2GL3.GL_UNPACK_SKIP_ROWS, tmp);
- skipPixels = glGetInteger(gl, GL2GL3.GL_UNPACK_SKIP_PIXELS, tmp);
+ rowLength = glGetInteger(gl, GL2ES2.GL_UNPACK_ROW_LENGTH, tmp);
+ skipRows = glGetInteger(gl, GL2ES2.GL_UNPACK_SKIP_ROWS, tmp);
+ skipPixels = glGetInteger(gl, GL2ES2.GL_UNPACK_SKIP_PIXELS, tmp);
if (depth > 1) {
- imageHeight = glGetInteger(gl, GL2GL3.GL_UNPACK_IMAGE_HEIGHT, tmp);
- skipImages = glGetInteger(gl, GL2GL3.GL_UNPACK_SKIP_IMAGES, tmp);
+ imageHeight = glGetInteger(gl, GL2ES3.GL_UNPACK_IMAGE_HEIGHT, tmp);
+ skipImages = glGetInteger(gl, GL2ES3.GL_UNPACK_SKIP_IMAGES, tmp);
}
}
}
@@ -511,9 +512,9 @@ public class GLBuffers extends Buffers {
* @return required minimum size of the buffer in bytes
* @throws GLException if format, type or alignment is not handled. Please contact the maintainer if this is our bug.
*/
- public static final int sizeof(GL gl, int tmp[],
- int format, int type, int width, int height, int depth,
- boolean pack) throws GLException {
+ public static final int sizeof(final GL gl, final int tmp[],
+ final int format, final int type, final int width, final int height, final int depth,
+ final boolean pack) throws GLException {
if (width < 0) return 0;
if (height < 0) return 0;
if (depth < 0) return 0;
@@ -578,14 +579,14 @@ public class GLBuffers extends Buffers {
* @return required size of one pixel in bytes
* @throws GLException if format or type alignment is not handled. Please contact the maintainer if this is our bug.
*/
- public static final int bytesPerPixel(int format, int type) throws GLException {
+ public static final int bytesPerPixel(final int format, final int type) throws GLException {
int compSize = 0;
int compCount = componentCount(format);
switch (type) /* 30 */ {
case GL2.GL_BITMAP:
- if (GL2.GL_COLOR_INDEX == format || GL2GL3.GL_STENCIL_INDEX == format) {
+ if (GL2.GL_COLOR_INDEX == format || GL2ES2.GL_STENCIL_INDEX == format) {
compSize = 1;
}
case GL.GL_BYTE:
@@ -615,9 +616,9 @@ public class GLBuffers extends Buffers {
break;
case GL.GL_UNSIGNED_SHORT_5_6_5:
case GL2GL3.GL_UNSIGNED_SHORT_5_6_5_REV:
- case GL2GL3.GL_UNSIGNED_SHORT_4_4_4_4:
+ case GL.GL_UNSIGNED_SHORT_4_4_4_4:
case GL2GL3.GL_UNSIGNED_SHORT_4_4_4_4_REV:
- case GL2GL3.GL_UNSIGNED_SHORT_5_5_5_1:
+ case GL.GL_UNSIGNED_SHORT_5_5_5_1:
case GL2GL3.GL_UNSIGNED_SHORT_1_5_5_5_REV:
case GL2.GL_UNSIGNED_SHORT_8_8_APPLE:
case GL2.GL_UNSIGNED_SHORT_8_8_REV_APPLE:
@@ -631,15 +632,15 @@ public class GLBuffers extends Buffers {
break;
case GL2GL3.GL_UNSIGNED_INT_8_8_8_8:
case GL2GL3.GL_UNSIGNED_INT_8_8_8_8_REV:
- case GL2GL3.GL_UNSIGNED_INT_10_10_10_2:
- case GL2GL3.GL_UNSIGNED_INT_2_10_10_10_REV:
- case GL2GL3.GL_UNSIGNED_INT_24_8:
- case GL2GL3.GL_UNSIGNED_INT_10F_11F_11F_REV:
- case GL2GL3.GL_UNSIGNED_INT_5_9_9_9_REV:
+ case GL2ES2.GL_UNSIGNED_INT_10_10_10_2:
+ case GL2ES2.GL_UNSIGNED_INT_2_10_10_10_REV:
+ case GL.GL_UNSIGNED_INT_24_8:
+ case GL.GL_UNSIGNED_INT_10F_11F_11F_REV:
+ case GL2ES3.GL_UNSIGNED_INT_5_9_9_9_REV:
compSize = 4;
compCount = 1;
break;
- case GL2GL3.GL_FLOAT_32_UNSIGNED_INT_24_8_REV:
+ case GL2ES3.GL_FLOAT_32_UNSIGNED_INT_24_8_REV:
compSize = 8;
compCount = 1;
break;
@@ -681,33 +682,33 @@ public class GLBuffers extends Buffers {
* @return number of components required for the given OpenGL format
* @throws GLException if format is not handled. Please contact the maintainer if this is our bug.
*/
- public static final int componentCount(int format) throws GLException {
+ public static final int componentCount(final int format) throws GLException {
final int compCount;
switch (format) /* 26 */ {
case GL2.GL_COLOR_INDEX:
- case GL2GL3.GL_STENCIL_INDEX:
- case GL2GL3.GL_DEPTH_COMPONENT:
- case GL2GL3.GL_DEPTH_STENCIL:
- case GL2GL3.GL_RED:
- case GL2GL3.GL_RED_INTEGER:
- case GL2GL3.GL_GREEN:
+ case GL2ES2.GL_STENCIL_INDEX:
+ case GL2ES2.GL_DEPTH_COMPONENT:
+ case GL.GL_DEPTH_STENCIL:
+ case GL2ES2.GL_RED:
+ case GL2ES3.GL_RED_INTEGER:
+ case GL2ES3.GL_GREEN:
case GL2GL3.GL_GREEN_INTEGER:
- case GL2GL3.GL_BLUE:
+ case GL2ES3.GL_BLUE:
case GL2GL3.GL_BLUE_INTEGER:
case GL.GL_ALPHA:
case GL.GL_LUMINANCE:
compCount = 1;
break;
case GL.GL_LUMINANCE_ALPHA:
- case GL2GL3.GL_RG:
- case GL2GL3.GL_RG_INTEGER:
+ case GL2ES2.GL_RG:
+ case GL2ES3.GL_RG_INTEGER:
case GL2.GL_HILO_NV:
case GL2.GL_SIGNED_HILO_NV:
compCount = 2;
break;
case GL.GL_RGB:
- case GL2GL3.GL_RGB_INTEGER:
+ case GL2ES3.GL_RGB_INTEGER:
case GL2GL3.GL_BGR:
case GL2GL3.GL_BGR_INTEGER:
compCount = 3;
@@ -716,7 +717,7 @@ public class GLBuffers extends Buffers {
compCount = 3;
break;
case GL.GL_RGBA:
- case GL2GL3.GL_RGBA_INTEGER:
+ case GL2ES3.GL_RGBA_INTEGER:
case GL.GL_BGRA:
case GL2GL3.GL_BGRA_INTEGER:
case GL2.GL_ABGR_EXT:
@@ -748,9 +749,9 @@ public class GLBuffers extends Buffers {
//----------------------------------------------------------------------
// Conversion routines
//
- public final static float[] getFloatArray(double[] source) {
+ public final static float[] getFloatArray(final double[] source) {
int i = source.length;
- float[] dest = new float[i--];
+ final float[] dest = new float[i--];
while (i >= 0) {
dest[i] = (float) source[i];
i--;
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLDrawableUtil.java b/src/jogl/classes/com/jogamp/opengl/util/GLDrawableUtil.java
index cf88e7bf6..c74284299 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/GLDrawableUtil.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/GLDrawableUtil.java
@@ -47,19 +47,19 @@ import jogamp.opengl.Debug;
public class GLDrawableUtil {
protected static final boolean DEBUG = Debug.debug("GLDrawable");
- public static final boolean isAnimatorStartedOnOtherThread(GLAnimatorControl animatorCtrl) {
+ public static final boolean isAnimatorStartedOnOtherThread(final GLAnimatorControl animatorCtrl) {
return ( null != animatorCtrl ) ? animatorCtrl.isStarted() && animatorCtrl.getThread() != Thread.currentThread() : false ;
}
- public static final boolean isAnimatorStarted(GLAnimatorControl animatorCtrl) {
+ public static final boolean isAnimatorStarted(final GLAnimatorControl animatorCtrl) {
return ( null != animatorCtrl ) ? animatorCtrl.isStarted() : false ;
}
- public static final boolean isAnimatorAnimatingOnOtherThread(GLAnimatorControl animatorCtrl) {
+ public static final boolean isAnimatorAnimatingOnOtherThread(final GLAnimatorControl animatorCtrl) {
return ( null != animatorCtrl ) ? animatorCtrl.isAnimating() && animatorCtrl.getThread() != Thread.currentThread() : false ;
}
- public static final boolean isAnimatorAnimating(GLAnimatorControl animatorCtrl) {
+ public static final boolean isAnimatorAnimating(final GLAnimatorControl animatorCtrl) {
return ( null != animatorCtrl ) ? animatorCtrl.isAnimating() : false ;
}
@@ -79,7 +79,7 @@ public class GLDrawableUtil {
* @param listener
* @param preserveInitState
*/
- public static final void moveGLEventListener(GLAutoDrawable src, GLAutoDrawable dest, GLEventListener listener, boolean preserveInitState) {
+ public static final void moveGLEventListener(final GLAutoDrawable src, final GLAutoDrawable dest, final GLEventListener listener, final boolean preserveInitState) {
final boolean initialized = src.getGLEventListenerInitState(listener);
src.removeGLEventListener(listener);
dest.addGLEventListener(listener);
@@ -105,7 +105,7 @@ public class GLDrawableUtil {
* @param listener
* @param preserveInitState
*/
- public static final void moveAllGLEventListener(GLAutoDrawable src, GLAutoDrawable dest, boolean preserveInitState) {
+ public static final void moveAllGLEventListener(final GLAutoDrawable src, final GLAutoDrawable dest, final boolean preserveInitState) {
for(int count = src.getGLEventListenerCount(); 0true, allow row-stride, otherwise not.
* See {@link #getAllowRowStride()} and {@link GLPixelBuffer#requiresNewBuffer(GL, int, int, int)}.
*/
- public DefaultGLPixelBufferProvider(boolean allowRowStride) {
+ public DefaultGLPixelBufferProvider(final boolean allowRowStride) {
this.allowRowStride = allowRowStride;
}
@@ -111,7 +111,7 @@ public class GLPixelBuffer {
public boolean getAllowRowStride() { return allowRowStride; }
@Override
- public GLPixelAttributes getAttributes(GL gl, int componentCount) {
+ public GLPixelAttributes getAttributes(final GL gl, final int componentCount) {
final GLContext ctx = gl.getContext();
final int dFormat, dType;
@@ -121,14 +121,14 @@ public class GLPixelBuffer {
dFormat = GL2ES2.GL_RED;
} else {
// ALPHA is supported on ES2 and GL2, i.e. <= GL3 [core] or compatibility
- dFormat = GL2ES2.GL_ALPHA;
+ dFormat = GL.GL_ALPHA;
}
dType = GL.GL_UNSIGNED_BYTE;
} else if( 3 == componentCount ) {
dFormat = GL.GL_RGB;
dType = GL.GL_UNSIGNED_BYTE;
} else if( 4 == componentCount ) {
- int _dFormat = ctx.getDefaultPixelDataFormat();
+ final int _dFormat = ctx.getDefaultPixelDataFormat();
final int dComps = GLBuffers.componentCount(_dFormat);
if( dComps == componentCount ) {
dFormat = _dFormat;
@@ -150,11 +150,11 @@ public class GLPixelBuffer {
*
*/
@Override
- public GLPixelBuffer allocate(GL gl, GLPixelAttributes pixelAttributes, int width, int height, int depth, boolean pack, int minByteSize) {
+ public GLPixelBuffer allocate(final GL gl, final GLPixelAttributes pixelAttributes, final int width, final int height, final int depth, final boolean pack, final int minByteSize) {
if( minByteSize > 0 ) {
return new GLPixelBuffer(pixelAttributes, width, height, depth, pack, Buffers.newDirectByteBuffer(minByteSize), getAllowRowStride());
} else {
- int[] tmp = { 0 };
+ final int[] tmp = { 0 };
final int byteSize = GLBuffers.sizeof(gl, tmp, pixelAttributes.bytesPerPixel, width, height, depth, pack);
return new GLPixelBuffer(pixelAttributes, width, height, depth, pack, Buffers.newDirectByteBuffer(byteSize), getAllowRowStride());
}
@@ -194,7 +194,7 @@ public class GLPixelBuffer {
* @param dataFormat GL data format
* @param dataType GL data type
*/
- public GLPixelAttributes(int dataFormat, int dataType) {
+ public GLPixelAttributes(final int dataFormat, final int dataType) {
this(0 < dataFormat ? GLBuffers.componentCount(dataFormat) : 0, dataFormat, dataType);
}
/**
@@ -203,7 +203,7 @@ public class GLPixelBuffer {
* @param dataFormat GL data format
* @param dataType GL data type
*/
- public GLPixelAttributes(int componentCount, int dataFormat, int dataType) {
+ public GLPixelAttributes(final int componentCount, final int dataFormat, final int dataType) {
this(componentCount, dataFormat, dataType, true);
}
@@ -211,7 +211,7 @@ public class GLPixelBuffer {
* Returns the matching {@link GLPixelAttributes} for the given {@link PixelFormat} and {@link GLProfile} if exists,
* otherwise returns null.
*/
- public static final GLPixelAttributes convert(PixelFormat pixFmt, GLProfile glp) {
+ public static final GLPixelAttributes convert(final PixelFormat pixFmt, final GLProfile glp) {
int df = 0; // format
int dt = GL.GL_UNSIGNED_BYTE; // data type
switch(pixFmt) {
@@ -221,7 +221,7 @@ public class GLPixelBuffer {
df = GL2ES2.GL_RED;
} else {
// ALPHA/LUMINANCE is supported on ES2 and GL2, i.e. <= GL3 [core] or compatibility
- df = GL2ES2.GL_LUMINANCE;
+ df = GL.GL_LUMINANCE;
}
break;
case BGR888:
@@ -256,7 +256,7 @@ public class GLPixelBuffer {
}
return null;
}
- private GLPixelAttributes(int componentCount, int dataFormat, int dataType, boolean checkArgs) {
+ private GLPixelAttributes(final int componentCount, final int dataFormat, final int dataType, final boolean checkArgs) {
this.componentCount = componentCount;
this.format = dataFormat;
this.type = dataType;
@@ -290,7 +290,7 @@ public class GLPixelBuffer {
case GL.GL_RGBA:
pixFmt = PixelFormat.RGBA8888;
break;
- case GL2.GL_BGR:
+ case GL2GL3.GL_BGR:
pixFmt = PixelFormat.BGR888;
break;
case GL.GL_BGRA:
@@ -383,7 +383,7 @@ public class GLPixelBuffer {
* @param buffer the backing array
* @param allowRowStride If true, allow row-stride, otherwise not. See {@link #requiresNewBuffer(GL, int, int, int)}.
*/
- public GLPixelBuffer(GLPixelAttributes pixelAttributes, int width, int height, int depth, boolean pack, Buffer buffer, boolean allowRowStride) {
+ public GLPixelBuffer(final GLPixelAttributes pixelAttributes, final int width, final int height, final int depth, final boolean pack, final Buffer buffer, final boolean allowRowStride) {
this.pixelAttributes = pixelAttributes;
this.width = width;
this.height = height;
@@ -414,7 +414,7 @@ public class GLPixelBuffer {
}
/** Sets the byte position of the {@link #buffer}. */
- public Buffer position(int bytePos) {
+ public Buffer position(final int bytePos) {
return buffer.position( bytePos / bufferElemSize );
}
@@ -465,7 +465,7 @@ public class GLPixelBuffer {
* @param newByteSize if > 0, the pre-calculated minimum byte-size for the resulting buffer, otherwise ignore.
* @see GLPixelBufferProvider#allocate(GL, GLPixelAttributes, int, int, int, boolean, int)
*/
- public boolean requiresNewBuffer(GL gl, int newWidth, int newHeight, int newByteSize) {
+ public boolean requiresNewBuffer(final GL gl, final int newWidth, final int newHeight, int newByteSize) {
if( !isValid() ) {
return true;
}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLPixelStorageModes.java b/src/jogl/classes/com/jogamp/opengl/util/GLPixelStorageModes.java
index 34b493586..52612d224 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/GLPixelStorageModes.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/GLPixelStorageModes.java
@@ -171,7 +171,7 @@ public class GLPixelStorageModes {
*/
public final void resetPack(final GL gl) {
// Compared w/ ES2, ES3 and GL3-core spec
- gl.glPixelStorei(GL2ES2.GL_PACK_ALIGNMENT, 4); // es2, es3, gl3
+ gl.glPixelStorei(GL.GL_PACK_ALIGNMENT, 4); // es2, es3, gl3
if( gl.isGL2ES3() ) {
gl.glPixelStorei(GL2ES3.GL_PACK_ROW_LENGTH, 0); // es3, gl3
gl.glPixelStorei(GL2ES3.GL_PACK_SKIP_ROWS, 0); // es3, gl3
@@ -202,7 +202,7 @@ public class GLPixelStorageModes {
gl.getGL2().glPushClientAttrib(GL2.GL_CLIENT_PIXEL_STORE_BIT);
} else {
// ES1 or ES2 deals with pack/unpack alignment only
- gl.glGetIntegerv(GL2ES2.GL_PACK_ALIGNMENT, cachePack, 0);
+ gl.glGetIntegerv(GL.GL_PACK_ALIGNMENT, cachePack, 0);
if( gl.isGL2ES3() ) {
gl.glGetIntegerv(GL2ES3.GL_PACK_ROW_LENGTH, cachePack, 1);
gl.glGetIntegerv(GL2ES3.GL_PACK_SKIP_ROWS, cachePack, 2);
@@ -222,7 +222,7 @@ public class GLPixelStorageModes {
if( gl.isGL2() ) {
gl.getGL2().glPopClientAttrib();
} else {
- gl.glPixelStorei(GL2ES2.GL_PACK_ALIGNMENT, cachePack[0]);
+ gl.glPixelStorei(GL.GL_PACK_ALIGNMENT, cachePack[0]);
if( gl.isGL2ES3() ) {
gl.glPixelStorei(GL2ES3.GL_PACK_ROW_LENGTH, cachePack[1]);
gl.glPixelStorei(GL2ES3.GL_PACK_SKIP_ROWS, cachePack[2]);
@@ -242,7 +242,7 @@ public class GLPixelStorageModes {
*/
public final void resetUnpack(final GL gl) {
// Compared w/ ES2, ES3 and GL3-core spec
- gl.glPixelStorei(GL2ES2.GL_UNPACK_ALIGNMENT, 4); // es2, es3, gl3
+ gl.glPixelStorei(GL.GL_UNPACK_ALIGNMENT, 4); // es2, es3, gl3
if( gl.isGL2ES3() ) {
gl.glPixelStorei(GL2ES2.GL_UNPACK_ROW_LENGTH, 0); // es3, gl3
gl.glPixelStorei(GL2ES2.GL_UNPACK_SKIP_ROWS, 0); // es3, gl3
@@ -273,7 +273,7 @@ public class GLPixelStorageModes {
gl.getGL2().glPushClientAttrib(GL2.GL_CLIENT_PIXEL_STORE_BIT);
} else {
// ES1 or ES2 deals with pack/unpack alignment only
- gl.glGetIntegerv(GL2ES2.GL_UNPACK_ALIGNMENT, cacheUnpack, 0);
+ gl.glGetIntegerv(GL.GL_UNPACK_ALIGNMENT, cacheUnpack, 0);
if( gl.isGL2ES3() ) {
gl.glGetIntegerv(GL2ES2.GL_UNPACK_ROW_LENGTH, cacheUnpack, 1);
gl.glGetIntegerv(GL2ES2.GL_UNPACK_SKIP_ROWS, cacheUnpack, 2);
@@ -293,7 +293,7 @@ public class GLPixelStorageModes {
if( gl.isGL2() ) {
gl.getGL2().glPopClientAttrib();
} else {
- gl.glPixelStorei(GL2ES2.GL_UNPACK_ALIGNMENT, cacheUnpack[0]);
+ gl.glPixelStorei(GL.GL_UNPACK_ALIGNMENT, cacheUnpack[0]);
if( gl.isGL2ES3() ) {
gl.glPixelStorei(GL2ES2.GL_UNPACK_ROW_LENGTH, cacheUnpack[1]);
gl.glPixelStorei(GL2ES2.GL_UNPACK_SKIP_ROWS, cacheUnpack[2]);
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java b/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java
index 680984cdb..abdb7c5f9 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java
@@ -62,11 +62,11 @@ public class GLReadBufferUtil {
* @param alpha true for RGBA readPixels, otherwise RGB readPixels. Disclaimer: Alpha maybe forced on ES platforms!
* @param write2Texture true if readPixel's TextureData shall be written to a 2d Texture
*/
- public GLReadBufferUtil(boolean alpha, boolean write2Texture) {
+ public GLReadBufferUtil(final boolean alpha, final boolean write2Texture) {
this(GLPixelBuffer.defaultProviderNoRowStride, alpha, write2Texture);
}
- public GLReadBufferUtil(GLPixelBufferProvider pixelBufferProvider, boolean alpha, boolean write2Texture) {
+ public GLReadBufferUtil(final GLPixelBufferProvider pixelBufferProvider, final boolean alpha, final boolean write2Texture) {
this.pixelBufferProvider = pixelBufferProvider;
this.componentCount = alpha ? 4 : 3 ;
this.alignment = alpha ? 4 : 1 ;
@@ -110,11 +110,11 @@ public class GLReadBufferUtil {
/**
* Write the TextureData filled by {@link #readPixels(GLAutoDrawable, boolean)} to file
*/
- public void write(File dest) {
+ public void write(final File dest) {
try {
TextureIO.write(readTextureData, dest);
rewindPixelBuffer();
- } catch (IOException ex) {
+ } catch (final IOException ex) {
throw new RuntimeException("can not write to file: " + dest.getAbsolutePath(), ex);
}
}
@@ -131,7 +131,7 @@ public class GLReadBufferUtil {
*
* @see #GLReadBufferUtil(boolean, boolean)
*/
- public boolean readPixels(GL gl, boolean mustFlipVertically) {
+ public boolean readPixels(final GL gl, final boolean mustFlipVertically) {
return readPixels(gl, 0, 0, 0, 0, mustFlipVertically);
}
@@ -150,7 +150,7 @@ public class GLReadBufferUtil {
* and handled in a efficient manner there (TextureCoordinates and TextureIO writer).
* @see #GLReadBufferUtil(boolean, boolean)
*/
- public boolean readPixels(GL gl, int inX, int inY, int inWidth, int inHeight, boolean mustFlipVertically) {
+ public boolean readPixels(final GL gl, final int inX, final int inY, final int inWidth, final int inHeight, final boolean mustFlipVertically) {
final GLDrawable drawable = gl.getContext().getGLReadDrawable();
final int width, height;
if( 0 >= inWidth || drawable.getSurfaceWidth() < inWidth ) {
@@ -207,7 +207,7 @@ public class GLReadBufferUtil {
readPixelBuffer.buffer,
null /* Flusher */);
newData = true;
- } catch (Exception e) {
+ } catch (final Exception e) {
readTextureData = null;
readPixelBuffer = null;
throw new RuntimeException("can not fetch offscreen texture", e);
@@ -229,7 +229,7 @@ public class GLReadBufferUtil {
readPixelBuffer.clear();
try {
gl.glReadPixels(inX, inY, width, height, pixelAttribs.format, pixelAttribs.type, readPixelBuffer.buffer);
- } catch(GLException gle) { res = false; gle.printStackTrace(); }
+ } catch(final GLException gle) { res = false; gle.printStackTrace(); }
readPixelBuffer.position( readPixelSize );
readPixelBuffer.flip();
final int glerr1 = gl.glGetError();
@@ -256,7 +256,7 @@ public class GLReadBufferUtil {
return res;
}
- public void dispose(GL gl) {
+ public void dispose(final GL gl) {
if(null != readTexture) {
readTexture.destroy(gl);
readTextureData = null;
diff --git a/src/jogl/classes/com/jogamp/opengl/util/Gamma.java b/src/jogl/classes/com/jogamp/opengl/util/Gamma.java
index 966781906..4e44c997a 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/Gamma.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/Gamma.java
@@ -87,7 +87,7 @@ public class Gamma {
* @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 {
+ public static boolean setDisplayGamma(final GL gl, final float gamma, final float brightness, final float contrast) throws IllegalArgumentException {
return GLDrawableFactoryImpl.getFactoryImpl(gl.getContext().getGLDrawable().getGLProfile()).setDisplayGamma(gamma, brightness, contrast);
}
@@ -101,7 +101,7 @@ public class Gamma {
* exiting, calling it is recommended because of the inevitable
* unspecified behavior during JVM teardown.
*/
- public static void resetDisplayGamma(GL gl) {
+ public static void resetDisplayGamma(final 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
index 986f6d8d3..150e92c2e 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/ImmModeSink.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/ImmModeSink.java
@@ -18,6 +18,7 @@ import jogamp.opengl.Debug;
import com.jogamp.common.nio.Buffers;
import com.jogamp.common.os.Platform;
+import com.jogamp.common.util.PropertyAccess;
import com.jogamp.opengl.util.glsl.ShaderState;
/**
@@ -54,9 +55,9 @@ public class ImmModeSink {
static {
Debug.initSingleton();
- DEBUG_BEGIN_END = Debug.isPropertyDefined("jogl.debug.ImmModeSink.BeginEnd", true);
- DEBUG_DRAW = Debug.isPropertyDefined("jogl.debug.ImmModeSink.Draw", true);
- DEBUG_BUFFER = Debug.isPropertyDefined("jogl.debug.ImmModeSink.Buffer", true);
+ DEBUG_BEGIN_END = PropertyAccess.isPropertyDefined("jogl.debug.ImmModeSink.BeginEnd", true);
+ DEBUG_DRAW = PropertyAccess.isPropertyDefined("jogl.debug.ImmModeSink.Draw", true);
+ DEBUG_BUFFER = PropertyAccess.isPropertyDefined("jogl.debug.ImmModeSink.Buffer", true);
}
public static final int GL_QUADS = 0x0007; // Needs data manipulation on ES1/ES2
@@ -81,12 +82,12 @@ public class ImmModeSink {
* @param glBufferUsage VBO usage parameter for {@link GL#glBufferData(int, long, Buffer, int)}, e.g. {@link GL#GL_STATIC_DRAW},
* set to 0 for no VBO usage
*/
- public static ImmModeSink createFixed(int initialElementCount,
- int vComps, int vDataType,
- int cComps, int cDataType,
- int nComps, int nDataType,
- int tComps, int tDataType,
- int glBufferUsage) {
+ public static ImmModeSink createFixed(final int initialElementCount,
+ final int vComps, final int vDataType,
+ final int cComps, final int cDataType,
+ final int nComps, final int nDataType,
+ final int tComps, final int tDataType,
+ final int glBufferUsage) {
return new ImmModeSink(initialElementCount,
vComps, vDataType, cComps, cDataType, nComps, nDataType, tComps, tDataType,
false, glBufferUsage, null, 0);
@@ -114,12 +115,12 @@ public class ImmModeSink {
* @see com.jogamp.opengl.util.glsl.ShaderState#useProgram(GL2ES2, boolean)
* @see com.jogamp.opengl.util.glsl.ShaderState#getCurrentShaderState()
*/
- public static ImmModeSink createGLSL(int initialElementCount,
- int vComps, int vDataType,
- int cComps, int cDataType,
- int nComps, int nDataType,
- int tComps, int tDataType,
- int glBufferUsage, ShaderState st) {
+ public static ImmModeSink createGLSL(final int initialElementCount,
+ final int vComps, final int vDataType,
+ final int cComps, final int cDataType,
+ final int nComps, final int nDataType,
+ final int tComps, final int tDataType,
+ final int glBufferUsage, final ShaderState st) {
return new ImmModeSink(initialElementCount,
vComps, vDataType, cComps, cDataType, nComps, nDataType, tComps, tDataType,
true, glBufferUsage, st, 0);
@@ -147,18 +148,18 @@ public class ImmModeSink {
* @see com.jogamp.opengl.util.glsl.ShaderState#useProgram(GL2ES2, boolean)
* @see com.jogamp.opengl.util.glsl.ShaderState#getCurrentShaderState()
*/
- public static ImmModeSink createGLSL(int initialElementCount,
- int vComps, int vDataType,
- int cComps, int cDataType,
- int nComps, int nDataType,
- int tComps, int tDataType,
- int glBufferUsage, int shaderProgram) {
+ public static ImmModeSink createGLSL(final int initialElementCount,
+ final int vComps, final int vDataType,
+ final int cComps, final int cDataType,
+ final int nComps, final int nDataType,
+ final int tComps, final int tDataType,
+ final int glBufferUsage, final int shaderProgram) {
return new ImmModeSink(initialElementCount,
vComps, vDataType, cComps, cDataType, nComps, nDataType, tComps, tDataType,
true, glBufferUsage, null, shaderProgram);
}
- public void destroy(GL gl) {
+ public void destroy(final GL gl) {
destroyList(gl);
vboSet.destroy(gl);
@@ -168,16 +169,16 @@ public class ImmModeSink {
reset(null);
}
- public void reset(GL gl) {
+ public void reset(final GL gl) {
destroyList(gl);
vboSet.reset(gl);
}
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("ImmModeSink[");
+ final StringBuilder sb = new StringBuilder("ImmModeSink[");
sb.append(",\n\tVBO list: "+vboSetList.size()+" [");
- for(Iterator i=vboSetList.iterator(); i.hasNext() ; ) {
+ for(final Iterator i=vboSetList.iterator(); i.hasNext() ; ) {
sb.append("\n\t");
sb.append( i.next() );
}
@@ -191,7 +192,7 @@ public class ImmModeSink {
return sb.toString();
}
- public void draw(GL gl, boolean disableBufferAfterDraw) {
+ public void draw(final GL gl, final boolean disableBufferAfterDraw) {
if(DEBUG_DRAW) {
System.err.println("ImmModeSink.draw(disableBufferAfterDraw: "+disableBufferAfterDraw+"):\n\t"+this);
}
@@ -201,7 +202,7 @@ public class ImmModeSink {
}
}
- public void draw(GL gl, Buffer indices, boolean disableBufferAfterDraw) {
+ public void draw(final GL gl, final Buffer indices, final boolean disableBufferAfterDraw) {
if(DEBUG_DRAW) {
System.err.println("ImmModeSink.draw(disableBufferAfterDraw: "+disableBufferAfterDraw+"):\n\t"+this);
}
@@ -228,19 +229,19 @@ public class ImmModeSink {
vboSet.checkSeal(false);
}
- public final void glEnd(GL gl) {
+ public final void glEnd(final GL gl) {
glEnd(gl, null, true);
}
- public void glEnd(GL gl, boolean immediateDraw) {
+ public void glEnd(final GL gl, final boolean immediateDraw) {
glEnd(gl, null, immediateDraw);
}
- public final void glEnd(GL gl, Buffer indices) {
+ public final void glEnd(final GL gl, final Buffer indices) {
glEnd(gl, indices, true);
}
- private void glEnd(GL gl, Buffer indices, boolean immediateDraw) {
+ private void glEnd(final GL gl, final Buffer indices, final boolean immediateDraw) {
if(DEBUG_BEGIN_END) {
System.err.println("ImmModeSink START glEnd(immediate: "+immediateDraw+")");
}
@@ -259,117 +260,117 @@ public class ImmModeSink {
}
}
- public void glVertexv(Buffer v) {
+ public void glVertexv(final Buffer v) {
vboSet.glVertexv(v);
}
- public void glNormalv(Buffer v) {
+ public void glNormalv(final Buffer v) {
vboSet.glNormalv(v);
}
- public void glColorv(Buffer v) {
+ public void glColorv(final Buffer v) {
vboSet.glColorv(v);
}
- public void glTexCoordv(Buffer v) {
+ public void glTexCoordv(final Buffer v) {
vboSet.glTexCoordv(v);
}
- public final void glVertex2f(float x, float y) {
+ public final void glVertex2f(final float x, final float y) {
vboSet.glVertex2f(x,y);
}
- public final void glVertex3f(float x, float y, float z) {
+ public final void glVertex3f(final float x, final float y, final float z) {
vboSet.glVertex3f(x,y,z);
}
- public final void glNormal3f(float x, float y, float z) {
+ public final void glNormal3f(final float x, final float y, final float z) {
vboSet.glNormal3f(x,y,z);
}
- public final void glColor3f(float x, float y, float z) {
+ public final void glColor3f(final float x, final float y, final float z) {
vboSet.glColor3f(x,y,z);
}
- public final void glColor4f(float x, float y, float z, float a) {
+ public final void glColor4f(final float x, final float y, final float z, final float a) {
vboSet.glColor4f(x,y,z, a);
}
- public final void glTexCoord2f(float x, float y) {
+ public final void glTexCoord2f(final float x, final float y) {
vboSet.glTexCoord2f(x,y);
}
- public final void glTexCoord3f(float x, float y, float z) {
+ public final void glTexCoord3f(final float x, final float y, final float z) {
vboSet.glTexCoord3f(x,y,z);
}
- public final void glVertex2s(short x, short y) {
+ public final void glVertex2s(final short x, final short y) {
vboSet.glVertex2s(x,y);
}
- public final void glVertex3s(short x, short y, short z) {
+ public final void glVertex3s(final short x, final short y, final short z) {
vboSet.glVertex3s(x,y,z);
}
- public final void glNormal3s(short x, short y, short z) {
+ public final void glNormal3s(final short x, final short y, final short z) {
vboSet.glNormal3s(x,y,z);
}
- public final void glColor3s(short x, short y, short z) {
+ public final void glColor3s(final short x, final short y, final short z) {
vboSet.glColor3s(x,y,z);
}
- public final void glColor4s(short x, short y, short z, short a) {
+ public final void glColor4s(final short x, final short y, final short z, final short a) {
vboSet.glColor4s(x,y,z,a);
}
- public final void glTexCoord2s(short x, short y) {
+ public final void glTexCoord2s(final short x, final short y) {
vboSet.glTexCoord2s(x,y);
}
- public final void glTexCoord3s(short x, short y, short z) {
+ public final void glTexCoord3s(final short x, final short y, final short z) {
vboSet.glTexCoord3s(x,y,z);
}
- public final void glVertex2b(byte x, byte y) {
+ public final void glVertex2b(final byte x, final byte y) {
vboSet.glVertex2b(x,y);
}
- public final void glVertex3b(byte x, byte y, byte z) {
+ public final void glVertex3b(final byte x, final byte y, final byte z) {
vboSet.glVertex3b(x,y,z);
}
- public final void glNormal3b(byte x, byte y, byte z) {
+ public final void glNormal3b(final byte x, final byte y, final byte z) {
vboSet.glNormal3b(x,y,z);
}
- public final void glColor3b(byte x, byte y, byte z) {
+ public final void glColor3b(final byte x, final byte y, final byte z) {
vboSet.glColor3b(x,y,z);
}
- public final void glColor3ub(byte x, byte y, byte z) {
+ public final void glColor3ub(final byte x, final byte y, final byte z) {
vboSet.glColor3ub(x,y,z);
}
- public final void glColor4b(byte x, byte y, byte z, byte a) {
+ public final void glColor4b(final byte x, final byte y, final byte z, final byte a) {
vboSet.glColor4b(x,y,z,a);
}
- public final void glColor4ub(byte x, byte y, byte z, byte a) {
+ public final void glColor4ub(final byte x, final byte y, final byte z, final byte a) {
vboSet.glColor4ub(x,y,z,a);
}
- public final void glTexCoord2b(byte x, byte y) {
+ public final void glTexCoord2b(final byte x, final byte y) {
vboSet.glTexCoord2b(x,y);
}
- public final void glTexCoord3b(byte x, byte y, byte z) {
+ public final void glTexCoord3b(final byte x, final byte y, final byte z) {
vboSet.glTexCoord3b(x,y,z);
}
- protected ImmModeSink(int initialElementCount,
- int vComps, int vDataType,
- int cComps, int cDataType,
- int nComps, int nDataType,
- int tComps, int tDataType,
- boolean useGLSL, int glBufferUsage, ShaderState st, int shaderProgram) {
+ protected ImmModeSink(final int initialElementCount,
+ final int vComps, final int vDataType,
+ final int cComps, final int cDataType,
+ final int nComps, final int nDataType,
+ final int tComps, final int tDataType,
+ final boolean useGLSL, final int glBufferUsage, final ShaderState st, final int shaderProgram) {
vboSet = new VBOSet(initialElementCount,
vComps, vDataType, cComps, cDataType, nComps, nDataType, tComps, tDataType,
useGLSL, glBufferUsage, st, shaderProgram);
@@ -390,9 +391,9 @@ public class ImmModeSink {
* @see #createFixed(int, int, int, int, int, int, int, int, int, int)
* @see #createGLSL(int, int, int, int, int, int, int, int, int, int, ShaderState)
*/
- public void setResizeElementCount(int v) { vboSet.setResizeElementCount(v); }
+ public void setResizeElementCount(final int v) { vboSet.setResizeElementCount(v); }
- private void destroyList(GL gl) {
+ private void destroyList(final GL gl) {
for(int i=0; i vboSetList;
protected static class VBOSet {
- protected VBOSet (int initialElementCount,
- int vComps, int vDataType,
- int cComps, int cDataType,
- int nComps, int nDataType,
- int tComps, int tDataType,
- boolean useGLSL, int glBufferUsage, ShaderState st, int shaderProgram) {
+ protected VBOSet (final int initialElementCount,
+ final int vComps, final int vDataType,
+ final int cComps, final int cDataType,
+ final int nComps, final int nDataType,
+ final int tComps, final int tDataType,
+ final boolean useGLSL, final int glBufferUsage, final ShaderState st, final int shaderProgram) {
// final ..
this.glBufferUsage=glBufferUsage;
this.initialElementCount=initialElementCount;
@@ -465,17 +466,17 @@ public class ImmModeSink {
}
protected int getResizeElementCount() { return resizeElementCount; }
- protected void setResizeElementCount(int v) { resizeElementCount=v; }
+ protected void setResizeElementCount(final int v) { resizeElementCount=v; }
protected boolean getUseVBO() { return useVBO; }
- protected final VBOSet regenerate(GL gl) {
+ protected final VBOSet regenerate(final GL gl) {
return new VBOSet(initialElementCount, vComps,
vDataType, cComps, cDataType, nComps, nDataType, tComps, tDataType,
useGLSL, glBufferUsage, shaderState, shaderProgram);
}
- protected void checkSeal(boolean test) throws GLException {
+ protected void checkSeal(final boolean test) throws GLException {
if(0==mode) {
throw new GLException("No mode set yet, call glBegin(mode) first:\n\t"+this);
}
@@ -490,7 +491,7 @@ public class ImmModeSink {
private boolean usingShaderProgram = false;
- protected void useShaderProgram(GL2ES2 gl, boolean force) {
+ protected void useShaderProgram(final GL2ES2 gl, final boolean force) {
if( force || !usingShaderProgram ) {
if(null != shaderState) {
shaderState.useProgram(gl, true);
@@ -501,7 +502,7 @@ public class ImmModeSink {
}
}
- protected void draw(GL gl, Buffer indices, boolean disableBufferAfterDraw, int i)
+ protected void draw(final GL gl, final Buffer indices, final boolean disableBufferAfterDraw, final int i)
{
enableBuffer(gl, true);
@@ -544,17 +545,17 @@ public class ImmModeSink {
if( GL.GL_UNSIGNED_BYTE == type ) {
final ByteBuffer b = (ByteBuffer) indices;
for (int j = 0; j < idxLen; j++) {
- gl.glDrawArrays(GL.GL_TRIANGLE_FAN, (int)(0x000000ff & b.get(idx0+j)), 4);
+ gl.glDrawArrays(GL.GL_TRIANGLE_FAN, 0x000000ff & b.get(idx0+j), 4);
}
} else if( GL.GL_UNSIGNED_SHORT == type ){
final ShortBuffer b = (ShortBuffer) indices;
for (int j = 0; j < idxLen; j++) {
- gl.glDrawArrays(GL.GL_TRIANGLE_FAN, (int)(0x0000ffff & b.get(idx0+j)), 4);
+ gl.glDrawArrays(GL.GL_TRIANGLE_FAN, 0x0000ffff & b.get(idx0+j), 4);
}
} else {
final IntBuffer b = (IntBuffer) indices;
for (int j = 0; j < idxLen; j++) {
- gl.glDrawArrays(GL.GL_TRIANGLE_FAN, (int)(0xffffffff & b.get(idx0+j)), 4);
+ gl.glDrawArrays(GL.GL_TRIANGLE_FAN, 0xffffffff & b.get(idx0+j), 4);
}
}
} else {
@@ -573,24 +574,24 @@ public class ImmModeSink {
}
}
- public void glVertexv(Buffer v) {
+ public void glVertexv(final Buffer v) {
checkSeal(false);
Buffers.put(vertexArray, v);
}
- public void glNormalv(Buffer v) {
+ public void glNormalv(final Buffer v) {
checkSeal(false);
Buffers.put(normalArray, v);
}
- public void glColorv(Buffer v) {
+ public void glColorv(final Buffer v) {
checkSeal(false);
Buffers.put(colorArray, v);
}
- public void glTexCoordv(Buffer v) {
+ public void glTexCoordv(final Buffer v) {
checkSeal(false);
Buffers.put(textCoordArray, v);
}
- public void glVertex2b(byte x, byte y) {
+ public void glVertex2b(final byte x, final byte y) {
checkSeal(false);
growBuffer(VERTEX);
if(vComps>0)
@@ -599,7 +600,7 @@ public class ImmModeSink {
Buffers.putNb(vertexArray, vDataTypeSigned, y, true);
countAndPadding(VERTEX, vComps-2);
}
- public void glVertex3b(byte x, byte y, byte z) {
+ public void glVertex3b(final byte x, final byte y, final byte z) {
checkSeal(false);
growBuffer(VERTEX);
if(vComps>0)
@@ -610,7 +611,7 @@ public class ImmModeSink {
Buffers.putNb(vertexArray, vDataTypeSigned, z, true);
countAndPadding(VERTEX, vComps-3);
}
- public void glVertex2s(short x, short y) {
+ public void glVertex2s(final short x, final short y) {
checkSeal(false);
growBuffer(VERTEX);
if(vComps>0)
@@ -619,7 +620,7 @@ public class ImmModeSink {
Buffers.putNs(vertexArray, vDataTypeSigned, y, true);
countAndPadding(VERTEX, vComps-2);
}
- public void glVertex3s(short x, short y, short z) {
+ public void glVertex3s(final short x, final short y, final short z) {
checkSeal(false);
growBuffer(VERTEX);
if(vComps>0)
@@ -630,7 +631,7 @@ public class ImmModeSink {
Buffers.putNs(vertexArray, vDataTypeSigned, z, true);
countAndPadding(VERTEX, vComps-3);
}
- public void glVertex2f(float x, float y) {
+ public void glVertex2f(final float x, final float y) {
checkSeal(false);
growBuffer(VERTEX);
if(vComps>0)
@@ -639,7 +640,7 @@ public class ImmModeSink {
Buffers.putNf(vertexArray, vDataTypeSigned, y);
countAndPadding(VERTEX, vComps-2);
}
- public void glVertex3f(float x, float y, float z) {
+ public void glVertex3f(final float x, final float y, final float z) {
checkSeal(false);
growBuffer(VERTEX);
if(vComps>0)
@@ -651,7 +652,7 @@ public class ImmModeSink {
countAndPadding(VERTEX, vComps-3);
}
- public void glNormal3b(byte x, byte y, byte z) {
+ public void glNormal3b(final byte x, final byte y, final byte z) {
checkSeal(false);
growBuffer(NORMAL);
if(nComps>0)
@@ -662,7 +663,7 @@ public class ImmModeSink {
Buffers.putNb(normalArray, nDataTypeSigned, z, true);
countAndPadding(NORMAL, nComps-3);
}
- public void glNormal3s(short x, short y, short z) {
+ public void glNormal3s(final short x, final short y, final short z) {
checkSeal(false);
growBuffer(NORMAL);
if(nComps>0)
@@ -673,7 +674,7 @@ public class ImmModeSink {
Buffers.putNs(normalArray, nDataTypeSigned, z, true);
countAndPadding(NORMAL, nComps-3);
}
- public void glNormal3f(float x, float y, float z) {
+ public void glNormal3f(final float x, final float y, final float z) {
checkSeal(false);
growBuffer(NORMAL);
if(nComps>0)
@@ -685,7 +686,7 @@ public class ImmModeSink {
countAndPadding(NORMAL, nComps-3);
}
- public void glColor3b(byte r, byte g, byte b) {
+ public void glColor3b(final byte r, final byte g, final byte b) {
checkSeal(false);
growBuffer(COLOR);
if(cComps>0)
@@ -696,7 +697,7 @@ public class ImmModeSink {
Buffers.putNb(colorArray, cDataTypeSigned, b, true);
countAndPadding(COLOR, cComps-3);
}
- public void glColor3ub(byte r, byte g, byte b) {
+ public void glColor3ub(final byte r, final byte g, final byte b) {
checkSeal(false);
growBuffer(COLOR);
if(cComps>0)
@@ -707,7 +708,7 @@ public class ImmModeSink {
Buffers.putNb(colorArray, cDataTypeSigned, b, false);
countAndPadding(COLOR, cComps-3);
}
- public void glColor4b(byte r, byte g, byte b, byte a) {
+ public void glColor4b(final byte r, final byte g, final byte b, final byte a) {
checkSeal(false);
growBuffer(COLOR);
if(cComps>0)
@@ -720,7 +721,7 @@ public class ImmModeSink {
Buffers.putNb(colorArray, cDataTypeSigned, a, true);
countAndPadding(COLOR, cComps-4);
}
- public void glColor4ub(byte r, byte g, byte b, byte a) {
+ public void glColor4ub(final byte r, final byte g, final byte b, final byte a) {
checkSeal(false);
growBuffer(COLOR);
if(cComps>0)
@@ -733,7 +734,7 @@ public class ImmModeSink {
Buffers.putNb(colorArray, cDataTypeSigned, a, false);
countAndPadding(COLOR, cComps-4);
}
- public void glColor3s(short r, short g, short b) {
+ public void glColor3s(final short r, final short g, final short b) {
checkSeal(false);
growBuffer(COLOR);
if(cComps>0)
@@ -744,7 +745,7 @@ public class ImmModeSink {
Buffers.putNs(colorArray, cDataTypeSigned, b, true);
countAndPadding(COLOR, cComps-3);
}
- public void glColor4s(short r, short g, short b, short a) {
+ public void glColor4s(final short r, final short g, final short b, final short a) {
checkSeal(false);
growBuffer(COLOR);
if(cComps>0)
@@ -757,7 +758,7 @@ public class ImmModeSink {
Buffers.putNs(colorArray, cDataTypeSigned, a, true);
countAndPadding(COLOR, cComps-4);
}
- public void glColor3f(float r, float g, float b) {
+ public void glColor3f(final float r, final float g, final float b) {
checkSeal(false);
growBuffer(COLOR);
if(cComps>0)
@@ -768,7 +769,7 @@ public class ImmModeSink {
Buffers.putNf(colorArray, cDataTypeSigned, b);
countAndPadding(COLOR, cComps-3);
}
- public void glColor4f(float r, float g, float b, float a) {
+ public void glColor4f(final float r, final float g, final float b, final float a) {
checkSeal(false);
growBuffer(COLOR);
if(cComps>0)
@@ -782,7 +783,7 @@ public class ImmModeSink {
countAndPadding(COLOR, cComps-4);
}
- public void glTexCoord2b(byte x, byte y) {
+ public void glTexCoord2b(final byte x, final byte y) {
checkSeal(false);
growBuffer(TEXTCOORD);
if(tComps>0)
@@ -791,7 +792,7 @@ public class ImmModeSink {
Buffers.putNb(textCoordArray, tDataTypeSigned, y, true);
countAndPadding(TEXTCOORD, tComps-2);
}
- public void glTexCoord3b(byte x, byte y, byte z) {
+ public void glTexCoord3b(final byte x, final byte y, final byte z) {
checkSeal(false);
growBuffer(TEXTCOORD);
if(tComps>0)
@@ -802,7 +803,7 @@ public class ImmModeSink {
Buffers.putNb(textCoordArray, tDataTypeSigned, z, true);
countAndPadding(TEXTCOORD, tComps-3);
}
- public void glTexCoord2s(short x, short y) {
+ public void glTexCoord2s(final short x, final short y) {
checkSeal(false);
growBuffer(TEXTCOORD);
if(tComps>0)
@@ -811,7 +812,7 @@ public class ImmModeSink {
Buffers.putNs(textCoordArray, tDataTypeSigned, y, true);
countAndPadding(TEXTCOORD, tComps-2);
}
- public void glTexCoord3s(short x, short y, short z) {
+ public void glTexCoord3s(final short x, final short y, final short z) {
checkSeal(false);
growBuffer(TEXTCOORD);
if(tComps>0)
@@ -822,7 +823,7 @@ public class ImmModeSink {
Buffers.putNs(textCoordArray, tDataTypeSigned, z, true);
countAndPadding(TEXTCOORD, tComps-3);
}
- public void glTexCoord2f(float x, float y) {
+ public void glTexCoord2f(final float x, final float y) {
checkSeal(false);
growBuffer(TEXTCOORD);
if(tComps>0)
@@ -831,7 +832,7 @@ public class ImmModeSink {
Buffers.putNf(textCoordArray, tDataTypeSigned, y);
countAndPadding(TEXTCOORD, tComps-2);
}
- public void glTexCoord3f(float x, float y, float z) {
+ public void glTexCoord3f(final float x, final float y, final float z) {
checkSeal(false);
growBuffer(TEXTCOORD);
if(tComps>0)
@@ -858,7 +859,7 @@ public class ImmModeSink {
}
}
- public void setShaderProgram(int program) {
+ public void setShaderProgram(final int program) {
if(null == shaderState && 0 == program) {
throw new IllegalArgumentException("Not allowed to zero shader program if no ShaderState is set");
}
@@ -871,7 +872,7 @@ public class ImmModeSink {
* @return true if all locations for all used arrays are found (min 1 array), otherwise false.
* Also sets 'glslLocationSet' to the return value!
*/
- private boolean resetGLSLArrayLocation(GL2ES2 gl) {
+ private boolean resetGLSLArrayLocation(final GL2ES2 gl) {
int iA = 0;
int iL = 0;
@@ -903,7 +904,7 @@ public class ImmModeSink {
return glslLocationSet;
}
- public void destroy(GL gl) {
+ public void destroy(final GL gl) {
reset(gl);
vCount=0; cCount=0; nCount=0; tCount=0;
@@ -912,7 +913,7 @@ public class ImmModeSink {
buffer=null;
}
- public void reset(GL gl) {
+ public void reset(final GL gl) {
enableBuffer(gl, false);
reset();
}
@@ -935,16 +936,16 @@ public class ImmModeSink {
this.tElems=0;
}
- public void seal(GL glObj, boolean seal)
+ public void seal(final GL glObj, final boolean seal)
{
seal(seal);
if(sealedGL==seal) return;
sealedGL = seal;
- GL gl = glObj.getGL();
+ final GL gl = glObj.getGL();
if(seal) {
if(useVBO) {
if(0 == vboName) {
- int[] tmp = new int[1];
+ final int[] tmp = new int[1];
gl.glGenBuffers(1, tmp, 0);
vboName = tmp[0];
}
@@ -967,7 +968,7 @@ public class ImmModeSink {
}
}
- public void seal(boolean seal)
+ public void seal(final boolean seal)
{
if(sealed==seal) return;
sealed = seal;
@@ -977,7 +978,7 @@ public class ImmModeSink {
}
}
- public void enableBuffer(GL gl, boolean enable) {
+ public void enableBuffer(final GL gl, final boolean enable) {
if( bufferEnabled != enable && vElems>0 ) {
if(enable) {
checkSeal(true);
@@ -996,7 +997,7 @@ public class ImmModeSink {
}
}
- private final void writeBuffer(GL gl) {
+ private final void writeBuffer(final GL gl) {
final int vBytes = vElems * vCompsBytes;
final int cBytes = cElems * cCompsBytes;
final int nBytes = nElems * nCompsBytes;
@@ -1021,8 +1022,8 @@ public class ImmModeSink {
}
}
- private void enableBufferFixed(GL gl, boolean enable) {
- GL2ES1 glf = gl.getGL2ES1();
+ private void enableBufferFixed(final GL gl, final boolean enable) {
+ final GL2ES1 glf = gl.getGL2ES1();
final boolean useV = vComps>0 && vElems>0 ;
final boolean useC = cComps>0 && cElems>0 ;
@@ -1089,8 +1090,8 @@ public class ImmModeSink {
}
}
- private void enableBufferGLSLShaderState(GL gl, boolean enable) {
- GL2ES2 glsl = gl.getGL2ES2();
+ private void enableBufferGLSLShaderState(final GL gl, final boolean enable) {
+ final GL2ES2 glsl = gl.getGL2ES2();
final boolean useV = vComps>0 && vElems>0 ;
final boolean useC = cComps>0 && cElems>0 ;
@@ -1157,8 +1158,8 @@ public class ImmModeSink {
}
}
- private void enableBufferGLSLSimple(GL gl, boolean enable) {
- GL2ES2 glsl = gl.getGL2ES2();
+ private void enableBufferGLSLSimple(final GL gl, final boolean enable) {
+ final GL2ES2 glsl = gl.getGL2ES2();
final boolean useV = vComps>0 && vElems>0 ;
final boolean useC = cComps>0 && cElems>0 ;
@@ -1267,7 +1268,7 @@ public class ImmModeSink {
return "[v "+vElems+"/"+vCount+", c "+cElems+"/"+cCount+", n "+nElems+"/"+nCount+", t "+tElems+"/"+tCount+"]";
}
- protected boolean fitElementInBuffer(int type) {
+ protected boolean fitElementInBuffer(final int type) {
final int addElems = 1;
switch (type) {
case VERTEX:
@@ -1283,7 +1284,7 @@ public class ImmModeSink {
}
}
- protected boolean reallocateBuffer(int addElems) {
+ protected boolean reallocateBuffer(final int addElems) {
final int vAdd = addElems - ( vCount - vElems );
final int cAdd = addElems - ( cCount - cElems );
final int nAdd = addElems - ( nCount - nElems );
@@ -1381,7 +1382,7 @@ public class ImmModeSink {
}
/** grow buffer by initialElementCount if there is no space for one more element in the designated buffer */
- protected final boolean growBuffer(int type) {
+ protected final boolean growBuffer(final int type) {
if( null !=buffer && !sealed ) {
if( !fitElementInBuffer(type) ) {
// save olde values ..
@@ -1422,7 +1423,7 @@ public class ImmModeSink {
* @param type
* @param fill
*/
- private void countAndPadding(int type, int fill) {
+ private void countAndPadding(final int type, int fill) {
if ( sealed ) return;
final Buffer dest;
diff --git a/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java b/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java
index 71d880a44..39608b116 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java
@@ -41,8 +41,9 @@ import javax.media.opengl.GL;
import javax.media.opengl.GLException;
import javax.media.opengl.fixedfunc.GLMatrixFunc;
+import jogamp.common.os.PlatformPropsImpl;
+
import com.jogamp.common.nio.Buffers;
-import com.jogamp.common.os.Platform;
import com.jogamp.common.util.FloatStack;
import com.jogamp.opengl.math.FloatUtil;
import com.jogamp.opengl.math.Quaternion;
@@ -852,19 +853,19 @@ public final class PMVMatrix implements GLMatrixFunc {
final boolean modT = 0 != ( MODIFIED_TEXTURE & modifiedBits );
sb.append("PMVMatrix[modified[P ").append(modP).append(", Mv ").append(modMv).append(", T ").append(modT);
- sb.append("], dirty/req[Mvi ").append(mviDirty).append("/").append(mviReq).append(", Mvit ").append(mvitDirty).append("/").append(mvitReq).append(", Frustum ").append(frustumDirty).append("/").append(frustumReq).append("]").append(Platform.NEWLINE);
- sb.append(", Projection").append(Platform.NEWLINE);
+ sb.append("], dirty/req[Mvi ").append(mviDirty).append("/").append(mviReq).append(", Mvit ").append(mvitDirty).append("/").append(mvitReq).append(", Frustum ").append(frustumDirty).append("/").append(frustumReq).append("]").append(PlatformPropsImpl.NEWLINE);
+ sb.append(", Projection").append(PlatformPropsImpl.NEWLINE);
matrixToString(sb, f, matrixP);
- sb.append(", Modelview").append(Platform.NEWLINE);
+ sb.append(", Modelview").append(PlatformPropsImpl.NEWLINE);
matrixToString(sb, f, matrixMv);
- sb.append(", Texture").append(Platform.NEWLINE);
+ sb.append(", Texture").append(PlatformPropsImpl.NEWLINE);
matrixToString(sb, f, matrixTex);
if( 0 != ( requestMask & DIRTY_INVERSE_MODELVIEW ) ) {
- sb.append(", Inverse Modelview").append(Platform.NEWLINE);
+ sb.append(", Inverse Modelview").append(PlatformPropsImpl.NEWLINE);
matrixToString(sb, f, matrixMvi);
}
if( 0 != ( requestMask & DIRTY_INVERSE_TRANSPOSED_MODELVIEW ) ) {
- sb.append(", Inverse Transposed Modelview").append(Platform.NEWLINE);
+ sb.append(", Inverse Transposed Modelview").append(PlatformPropsImpl.NEWLINE);
matrixToString(sb, f, matrixMvit);
}
sb.append("]");
diff --git a/src/jogl/classes/com/jogamp/opengl/util/PNGPixelRect.java b/src/jogl/classes/com/jogamp/opengl/util/PNGPixelRect.java
index fd8f54152..64da547c2 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/PNGPixelRect.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/PNGPixelRect.java
@@ -192,7 +192,7 @@ public class PNGPixelRect extends PixelRectangle.GenericPixelRect {
return new PNGPixelRect(destFmt, new Dimension(width, height), destStrideInBytes, destIsGLOriented, destPixels, dpiX, dpiY);
}
- private static final int getPixelLUMToAny(PixelFormat dest_fmt, ByteBuffer d, int dOff, byte lum, byte alpha) {
+ private static final int getPixelLUMToAny(final PixelFormat dest_fmt, final ByteBuffer d, int dOff, final byte lum, final byte alpha) {
switch(dest_fmt) {
case LUMINANCE:
d.put(dOff++, lum);
diff --git a/src/jogl/classes/com/jogamp/opengl/util/RandomTileRenderer.java b/src/jogl/classes/com/jogamp/opengl/util/RandomTileRenderer.java
index 0a3a9d513..3b65b0824 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/RandomTileRenderer.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/RandomTileRenderer.java
@@ -51,7 +51,7 @@ public class RandomTileRenderer extends TileRendererBase {
}
@Override
- public final int getParam(int pname) {
+ public final int getParam(final int pname) {
switch (pname) {
case TR_IMAGE_WIDTH:
return imageSize.getWidth();
@@ -75,7 +75,7 @@ public class RandomTileRenderer extends TileRendererBase {
*
* @throws IllegalArgumentException is tile x/y are < 0 or tile size is <= 0x0
*/
- public void setTileRect(int tX, int tY, int tWidth, int tHeight) throws IllegalStateException, IllegalArgumentException {
+ public void setTileRect(final int tX, final int tY, final int tWidth, final int tHeight) throws IllegalStateException, IllegalArgumentException {
if( 0 > tX || 0 > tY ) {
throw new IllegalArgumentException("Tile pos must be >= 0/0");
}
@@ -120,7 +120,7 @@ public class RandomTileRenderer extends TileRendererBase {
* {@link #setTileRect(int, int, int, int) tile-rect} has not been set.
*/
@Override
- public final void beginTile(GL gl) throws IllegalStateException, GLException {
+ public final void beginTile(final GL gl) throws IllegalStateException, GLException {
if( 0 >= imageSize.getWidth() || 0 >= imageSize.getHeight() ) {
throw new IllegalStateException("Image size has not been set");
}
@@ -143,7 +143,7 @@ public class RandomTileRenderer extends TileRendererBase {
}
@Override
- public void endTile( GL gl ) throws IllegalStateException, GLException {
+ public void endTile( final GL gl ) throws IllegalStateException, GLException {
if( !beginCalled ) {
throw new IllegalStateException("beginTile(..) has not been called");
}
@@ -229,7 +229,7 @@ public class RandomTileRenderer extends TileRendererBase {
* @throws IllegalStateException if no {@link GLAutoDrawable} is {@link #attachAutoDrawable(GLAutoDrawable) attached}
* or imageSize is not set
*/
- public void display(int tX, int tY, int tWidth, int tHeight) throws IllegalStateException {
+ public void display(final int tX, final int tY, final int tWidth, final int tHeight) throws IllegalStateException {
setTileRect(tX, tY, tWidth, tHeight);
display();
}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/TGAWriter.java b/src/jogl/classes/com/jogamp/opengl/util/TGAWriter.java
index 47d56bcb1..6e31c78a0 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/TGAWriter.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/TGAWriter.java
@@ -70,18 +70,18 @@ public class TGAWriter {
* @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");
+ public void open(final File file,
+ final int width,
+ final int height,
+ final boolean alpha) throws IOException {
+ final RandomAccessFile out = new RandomAccessFile(file, "rw");
ch = out.getChannel();
- int pixelSize = (alpha ? 32 : 24);
- int numChannels = (alpha ? 4 : 3);
+ final int pixelSize = (alpha ? 32 : 24);
+ final int numChannels = (alpha ? 4 : 3);
- int fileLength = TARGA_HEADER_SIZE + width * height * numChannels;
+ final int fileLength = TARGA_HEADER_SIZE + width * height * numChannels;
out.setLength(fileLength);
- MappedByteBuffer image = ch.map(FileChannel.MapMode.READ_WRITE, 0, fileLength);
+ final MappedByteBuffer image = ch.map(FileChannel.MapMode.READ_WRITE, 0, fileLength);
// write the TARGA header
image.put(0, (byte) 0).put(1, (byte) 0);
diff --git a/src/jogl/classes/com/jogamp/opengl/util/TileRenderer.java b/src/jogl/classes/com/jogamp/opengl/util/TileRenderer.java
index 887312a64..d8410a102 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/TileRenderer.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/TileRenderer.java
@@ -145,7 +145,7 @@ public class TileRenderer extends TileRendererBase {
private int offsetY;
@Override
- protected StringBuilder tileDetails(StringBuilder sb) {
+ protected StringBuilder tileDetails(final StringBuilder sb) {
sb.append("# "+currentTile+": ["+currentColumn+"]["+currentRow+"] / "+columns+"x"+rows+", ")
.append("rowOrder "+rowOrder+", offset/size "+offsetX+"/"+offsetY+" "+tileSize.getWidth()+"x"+tileSize.getHeight()+" brd "+tileBorder+", ");
return super.tileDetails(sb);
@@ -165,7 +165,7 @@ public class TileRenderer extends TileRendererBase {
*
*/
@Override
- public final void setImageSize(int width, int height) {
+ public final void setImageSize(final int width, final int height) {
super.setImageSize(width, height);
reset();
}
@@ -184,7 +184,7 @@ public class TileRenderer extends TileRendererBase {
* @param height The image-clipping.height
* @see #getClippedImageSize()
*/
- public final void clipImageSize(int width, int height) {
+ public final void clipImageSize(final int width, final int height) {
if( null == imageClippingDim ) {
imageClippingDim = new Dimension(width, height);
} else {
@@ -236,7 +236,7 @@ public class TileRenderer extends TileRendererBase {
* to avoid artifacts when rendering lines or points with
* thickness > 1.
*/
- public final void setTileSize(int width, int height, int border) {
+ public final void setTileSize(final int width, final int height, final int border) {
if( 0 > border ) {
throw new IllegalArgumentException("Tile border must be >= 0");
}
@@ -255,7 +255,7 @@ public class TileRenderer extends TileRendererBase {
* @see #TR_TILE_X_OFFSET
* @see #TR_TILE_Y_OFFSET
**/
- public void setTileOffset(int xoff, int yoff) {
+ public void setTileOffset(final int xoff, final int yoff) {
offsetX = xoff;
offsetY = yoff;
}
@@ -299,7 +299,7 @@ public class TileRenderer extends TileRendererBase {
/* pp */ final int getCurrentTile() { return currentTile; }
@Override
- public final int getParam(int pname) {
+ public final int getParam(final int pname) {
switch (pname) {
case TR_IMAGE_WIDTH:
return imageSize.getWidth();
@@ -349,7 +349,7 @@ public class TileRenderer extends TileRendererBase {
*
* @param order The row traversal order, must be either {@link #TR_TOP_TO_BOTTOM} or {@link #TR_BOTTOM_TO_TOP}.
*/
- public final void setRowOrder(int order) {
+ public final void setRowOrder(final int order) {
if (order == TR_TOP_TO_BOTTOM || order == TR_BOTTOM_TO_TOP) {
rowOrder = order;
} else {
@@ -388,7 +388,7 @@ public class TileRenderer extends TileRendererBase {
* {@link #eot() end-of-tiling} has been reached.
*/
@Override
- public final void beginTile( GL gl ) throws IllegalStateException, GLException {
+ public final void beginTile( final GL gl ) throws IllegalStateException, GLException {
if( !isSetup() ) {
throw new IllegalStateException("Image size has not been set: "+this);
}
@@ -408,7 +408,7 @@ public class TileRenderer extends TileRendererBase {
assert ( currentRow < rows );
assert ( currentColumn < columns );
- int border = tileBorder;
+ final int border = tileBorder;
final DimensionImmutable clippedImageSize = getClippedImageSize();
int tH, tW;
@@ -446,7 +446,7 @@ public class TileRenderer extends TileRendererBase {
}
@Override
- public void endTile( GL gl ) throws IllegalStateException, GLException {
+ public void endTile( final GL gl ) throws IllegalStateException, GLException {
if( !beginCalled ) {
throw new IllegalStateException("beginTile(..) has not been called");
}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/TimeFrameI.java b/src/jogl/classes/com/jogamp/opengl/util/TimeFrameI.java
index b29846d91..99def6f5c 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/TimeFrameI.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/TimeFrameI.java
@@ -60,7 +60,7 @@ public class TimeFrameI {
pts = INVALID_PTS;
duration = 0;
}
- public TimeFrameI(int pts, int duration) {
+ public TimeFrameI(final int pts, final int duration) {
this.pts = pts;
this.duration = duration;
}
@@ -68,11 +68,11 @@ public class TimeFrameI {
/** Get this frame's presentation timestamp (PTS) in milliseconds. */
public final int getPTS() { return pts; }
/** Set this frame's presentation timestamp (PTS) in milliseconds. */
- public final void setPTS(int pts) { this.pts = pts; }
+ public final void setPTS(final int pts) { this.pts = pts; }
/** Get this frame's duration in milliseconds. */
public final int getDuration() { return duration; }
/** Set this frame's duration in milliseconds. */
- public final void setDuration(int duration) { this.duration = duration; }
+ public final void setDuration(final int duration) { this.duration = duration; }
@Override
public String toString() {
diff --git a/src/jogl/classes/com/jogamp/opengl/util/av/AudioSink.java b/src/jogl/classes/com/jogamp/opengl/util/av/AudioSink.java
index 1d835dd33..6d875fcf5 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/av/AudioSink.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/av/AudioSink.java
@@ -61,7 +61,7 @@ public interface AudioSink {
* @param planar true for planar data package (each channel in own data buffer), false for packed data channels interleaved in one buffer.
* @param littleEndian true for little-endian, false for big endian
*/
- public AudioFormat(int sampleRate, int sampleSize, int channelCount, boolean signed, boolean fixedP, boolean planar, boolean littleEndian) {
+ public AudioFormat(final int sampleRate, final int sampleSize, final int channelCount, final boolean signed, final boolean fixedP, final boolean planar, final boolean littleEndian) {
this.sampleRate = sampleRate;
this.sampleSize = sampleSize;
this.channelCount = channelCount;
@@ -104,7 +104,7 @@ public interface AudioSink {
* Time -> Byte Count
*
*/
- public final int getDurationsByteSize(int millisecs) {
+ public final int getDurationsByteSize(final int millisecs) {
final int bytesPerSample = sampleSize >>> 3; // /8
return millisecs * ( channelCount * bytesPerSample * ( sampleRate / 1000 ) );
}
@@ -116,7 +116,7 @@ public interface AudioSink {
* Byte Count -> Time
*
*/
- public final int getBytesDuration(int byteCount) {
+ public final int getBytesDuration(final int byteCount) {
final int bytesPerSample = sampleSize >>> 3; // /8
return byteCount / ( channelCount * bytesPerSample * ( sampleRate / 1000 ) );
}
@@ -132,7 +132,7 @@ public interface AudioSink {
*
* @param sampleCount sample count per frame and channel
*/
- public final float getSamplesDuration(int sampleCount) {
+ public final float getSamplesDuration(final int sampleCount) {
return ( 1000f * sampleCount ) / sampleRate;
}
@@ -151,7 +151,7 @@ public interface AudioSink {
* @param millisecs time in milliseconds
* @param frameDuration duration per frame in milliseconds.
*/
- public final int getFrameCount(int millisecs, float frameDuration) {
+ public final int getFrameCount(final int millisecs, final float frameDuration) {
return Math.max(1, (int) ( millisecs / frameDuration + 0.5f ));
}
@@ -170,7 +170,7 @@ public interface AudioSink {
*
* @param sampleCount sample count
*/
- public final int getSamplesByteCount(int sampleCount) {
+ public final int getSamplesByteCount(final int sampleCount) {
return sampleCount * ( sampleSize >>> 3 );
}
@@ -189,7 +189,7 @@ public interface AudioSink {
*
* @param byteCount number of bytes
*/
- public final int getBytesSampleCount(int byteCount) {
+ public final int getBytesSampleCount(final int byteCount) {
return ( byteCount << 3 ) / sampleSize;
}
@@ -208,7 +208,7 @@ public interface AudioSink {
public AudioFrame() {
this.byteSize = 0;
}
- public AudioFrame(int pts, int duration, int byteCount) {
+ public AudioFrame(final int pts, final int duration, final int byteCount) {
super(pts, duration);
this.byteSize=byteCount;
}
@@ -216,7 +216,7 @@ public interface AudioSink {
/** Get this frame's size in bytes. */
public final int getByteSize() { return byteSize; }
/** Set this frame's size in bytes. */
- public final void setByteSize(int size) { this.byteSize=size; }
+ public final void setByteSize(final int size) { this.byteSize=size; }
@Override
public String toString() {
@@ -226,7 +226,7 @@ public interface AudioSink {
public static class AudioDataFrame extends AudioFrame {
protected final ByteBuffer data;
- public AudioDataFrame(int pts, int duration, ByteBuffer bytes, int byteCount) {
+ public AudioDataFrame(final int pts, final int duration, final ByteBuffer bytes, final int byteCount) {
super(pts, duration, byteCount);
if( byteCount > bytes.remaining() ) {
throw new IllegalArgumentException("Give size "+byteCount+" exceeds remaining bytes in ls "+bytes+". "+this);
diff --git a/src/jogl/classes/com/jogamp/opengl/util/av/AudioSinkFactory.java b/src/jogl/classes/com/jogamp/opengl/util/av/AudioSinkFactory.java
index 386b1e085..a2b29b4eb 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/av/AudioSinkFactory.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/av/AudioSinkFactory.java
@@ -50,7 +50,7 @@ public class AudioSinkFactory {
return new NullAudioSink();
}
- public static AudioSink create(final ClassLoader cl, String implName) {
+ public static AudioSink create(final ClassLoader cl, final String implName) {
final AudioSink audioSink;
if(ReflectionUtil.isClassAvailable(implName, cl)){
try {
@@ -58,7 +58,7 @@ public class AudioSinkFactory {
if( audioSink.isInitialized() ) {
return audioSink;
}
- } catch (Throwable t) {
+ } catch (final Throwable t) {
if(AudioSink.DEBUG) { System.err.println("Caught "+t.getClass().getName()+": "+t.getMessage()); t.printStackTrace(); }
}
}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java b/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java
index 215275951..4fffd9fab 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java
@@ -246,10 +246,10 @@ public interface GLMediaPlayer extends TextureSequence {
*/
@SuppressWarnings("serial")
public static class StreamException extends Exception {
- public StreamException(Throwable cause) {
+ public StreamException(final Throwable cause) {
super(cause);
}
- public StreamException(String message, Throwable cause) {
+ public StreamException(final String message, final Throwable cause) {
super(message, cause);
}
}
@@ -318,7 +318,7 @@ public interface GLMediaPlayer extends TextureSequence {
public final int id;
- State(int id){
+ State(final int id){
this.id = id;
}
}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayerFactory.java b/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayerFactory.java
index 558d59630..9378cec91 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayerFactory.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayerFactory.java
@@ -55,12 +55,12 @@ public class GLMediaPlayerFactory {
return new NullGLMediaPlayer();
}
- public static GLMediaPlayer create(final ClassLoader cl, String implName) {
+ public static GLMediaPlayer create(final ClassLoader cl, final String implName) {
try {
if(((Boolean)ReflectionUtil.callStaticMethod(implName, isAvailableMethodName, null, null, cl)).booleanValue()) {
return (GLMediaPlayer) ReflectionUtil.createInstance(implName, cl);
}
- } catch (Throwable t) { if(GLMediaPlayer.DEBUG) { System.err.println("Caught "+t.getClass().getName()+": "+t.getMessage()); t.printStackTrace(); } }
+ } catch (final Throwable t) { if(GLMediaPlayer.DEBUG) { System.err.println("Caught "+t.getClass().getName()+": "+t.getMessage()); t.printStackTrace(); } }
return null;
}
}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/awt/AWTGLPixelBuffer.java b/src/jogl/classes/com/jogamp/opengl/util/awt/AWTGLPixelBuffer.java
index a33356067..04bc0a15d 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/awt/AWTGLPixelBuffer.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/awt/AWTGLPixelBuffer.java
@@ -31,6 +31,7 @@ import java.awt.image.BufferedImage;
import java.awt.image.ColorModel;
import java.awt.image.DataBuffer;
import java.awt.image.DataBufferInt;
+import java.awt.image.Raster;
import java.awt.image.SinglePixelPackedSampleModel;
import java.awt.image.WritableRaster;
import java.nio.Buffer;
@@ -78,8 +79,8 @@ public class AWTGLPixelBuffer extends GLPixelBuffer {
* @param allowRowStride If true, allow row-stride, otherwise not. See {@link #requiresNewBuffer(GL, int, int, int)}.
* If true, user shall decide whether to use a {@link #getAlignedImage(int, int) width-aligned image}.
*/
- public AWTGLPixelBuffer(GLPixelAttributes pixelAttributes, int width, int height, int depth, boolean pack, BufferedImage image,
- Buffer buffer, boolean allowRowStride) {
+ public AWTGLPixelBuffer(final GLPixelAttributes pixelAttributes, final int width, final int height, final int depth, final boolean pack, final BufferedImage image,
+ final Buffer buffer, final boolean allowRowStride) {
super(pixelAttributes, width, height, depth, pack, buffer, allowRowStride);
this.image = image;
}
@@ -97,7 +98,7 @@ public class AWTGLPixelBuffer extends GLPixelBuffer {
* @return
* @throws IllegalArgumentException if requested size exceeds image size
*/
- public BufferedImage getAlignedImage(int width, int height) throws IllegalArgumentException {
+ public BufferedImage getAlignedImage(final int width, final int height) throws IllegalArgumentException {
if( width * height > image.getWidth() * image.getHeight() ) {
throw new IllegalArgumentException("Requested size exceeds image size: "+width+"x"+height+" > "+image.getWidth()+"x"+image.getHeight());
}
@@ -110,12 +111,12 @@ public class AWTGLPixelBuffer extends GLPixelBuffer {
final SinglePixelPackedSampleModel sppsm0 = (SinglePixelPackedSampleModel) raster0.getSampleModel();
final SinglePixelPackedSampleModel sppsm1 = new SinglePixelPackedSampleModel(dataBuffer.getDataType(),
width, height, width /* scanLineStride */, sppsm0.getBitMasks());
- final WritableRaster raster1 = WritableRaster.createWritableRaster(sppsm1, dataBuffer, null);
+ final WritableRaster raster1 = Raster.createWritableRaster(sppsm1, dataBuffer, null);
return new BufferedImage (cm, raster1, cm.isAlphaPremultiplied(), null);
}
}
- public final boolean isDataBufferSource(BufferedImage imageU) {
+ public final boolean isDataBufferSource(final BufferedImage imageU) {
final DataBuffer dataBuffer0 = image.getRaster().getDataBuffer();
final DataBuffer dataBufferU = imageU.getRaster().getDataBuffer();
return dataBufferU == dataBuffer0;
@@ -143,14 +144,14 @@ public class AWTGLPixelBuffer extends GLPixelBuffer {
* See {@link #getAllowRowStride()} and {@link AWTGLPixelBuffer#requiresNewBuffer(GL, int, int, int)}.
* If true, user shall decide whether to use a {@link AWTGLPixelBuffer#getAlignedImage(int, int) width-aligned image}.
*/
- public AWTGLPixelBufferProvider(boolean allowRowStride) {
+ public AWTGLPixelBufferProvider(final boolean allowRowStride) {
this.allowRowStride = allowRowStride;
}
@Override
public boolean getAllowRowStride() { return allowRowStride; }
@Override
- public GLPixelAttributes getAttributes(GL gl, int componentCount) {
+ public GLPixelAttributes getAttributes(final GL gl, final int componentCount) {
return 4 == componentCount ? awtPixelAttributesIntRGBA4 : awtPixelAttributesIntRGB3;
}
@@ -161,7 +162,7 @@ public class AWTGLPixelBuffer extends GLPixelBuffer {
*
*/
@Override
- public AWTGLPixelBuffer allocate(GL gl, GLPixelAttributes pixelAttributes, int width, int height, int depth, boolean pack, int minByteSize) {
+ public AWTGLPixelBuffer allocate(final GL gl, final GLPixelAttributes pixelAttributes, final int width, final int height, final int depth, final boolean pack, final int minByteSize) {
final BufferedImage image = new BufferedImage(width, height, 4 == pixelAttributes.componentCount ? BufferedImage.TYPE_INT_ARGB : BufferedImage.TYPE_INT_RGB);
final int[] readBackIntBuffer = ((DataBufferInt) image.getRaster().getDataBuffer()).getData();
final Buffer ibuffer = IntBuffer.wrap( readBackIntBuffer );
@@ -186,7 +187,7 @@ public class AWTGLPixelBuffer extends GLPixelBuffer {
/**
* @param allowRowStride If true, allow row-stride, otherwise not. See {@link AWTGLPixelBuffer#requiresNewBuffer(GL, int, int, int)}.
*/
- public SingleAWTGLPixelBufferProvider(boolean allowRowStride) {
+ public SingleAWTGLPixelBufferProvider(final boolean allowRowStride) {
super(allowRowStride);
}
@@ -197,7 +198,7 @@ public class AWTGLPixelBuffer extends GLPixelBuffer {
*
*/
@Override
- public AWTGLPixelBuffer allocate(GL gl, GLPixelAttributes pixelAttributes, int width, int height, int depth, boolean pack, int minByteSize) {
+ public AWTGLPixelBuffer allocate(final GL gl, final GLPixelAttributes pixelAttributes, final int width, final int height, final int depth, final boolean pack, final int minByteSize) {
if( 4 == pixelAttributes.componentCount ) {
if( null == singleRGBA4 || singleRGBA4.requiresNewBuffer(gl, width, height, minByteSize) ) {
singleRGBA4 = allocateImpl(pixelAttributes, width, height, depth, pack, minByteSize);
@@ -211,7 +212,7 @@ public class AWTGLPixelBuffer extends GLPixelBuffer {
}
}
- private AWTGLPixelBuffer allocateImpl(GLPixelAttributes pixelAttributes, int width, int height, int depth, boolean pack, int minByteSize) {
+ private AWTGLPixelBuffer allocateImpl(final GLPixelAttributes pixelAttributes, final int width, final int height, final int depth, final boolean pack, final int minByteSize) {
final BufferedImage image = new BufferedImage(width, height, 4 == pixelAttributes.componentCount ? BufferedImage.TYPE_INT_ARGB : BufferedImage.TYPE_INT_RGB);
final int[] readBackIntBuffer = ((DataBufferInt) image.getRaster().getDataBuffer()).getData();
final Buffer ibuffer = IntBuffer.wrap( readBackIntBuffer );
@@ -220,7 +221,7 @@ public class AWTGLPixelBuffer extends GLPixelBuffer {
/** Return the last {@link #allocate(GL, GLPixelAttributes, int, int, int, boolean, int) allocated} {@link AWTGLPixelBuffer} w/ {@link GLPixelAttributes#componentCount}. */
@Override
- public AWTGLPixelBuffer getSingleBuffer(GLPixelAttributes pixelAttributes) {
+ public AWTGLPixelBuffer getSingleBuffer(final GLPixelAttributes pixelAttributes) {
return 4 == pixelAttributes.componentCount ? singleRGBA4 : singleRGB3;
}
@@ -229,7 +230,7 @@ public class AWTGLPixelBuffer extends GLPixelBuffer {
* @return the newly initialized single {@link AWTGLPixelBuffer}, or null if already allocated.
*/
@Override
- public AWTGLPixelBuffer initSingleton(int componentCount, int width, int height, int depth, boolean pack) {
+ public AWTGLPixelBuffer initSingleton(final int componentCount, final int width, final int height, final int depth, final boolean pack) {
if( 4 == componentCount ) {
if( null != singleRGBA4 ) {
return null;
diff --git a/src/jogl/classes/com/jogamp/opengl/util/awt/AWTGLReadBufferUtil.java b/src/jogl/classes/com/jogamp/opengl/util/awt/AWTGLReadBufferUtil.java
index 3c5d6be2d..06e3ccda5 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/awt/AWTGLReadBufferUtil.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/awt/AWTGLReadBufferUtil.java
@@ -46,7 +46,7 @@ public class AWTGLReadBufferUtil extends GLReadBufferUtil {
*
* @param alpha
*/
- public AWTGLReadBufferUtil(GLProfile glp, boolean alpha) {
+ public AWTGLReadBufferUtil(final GLProfile glp, final boolean alpha) {
super(new AWTGLPixelBuffer.AWTGLPixelBufferProvider( glp.isGL2ES3() /* allowRowStride */ ), alpha, false);
}
@@ -64,7 +64,7 @@ public class AWTGLReadBufferUtil extends GLReadBufferUtil {
* and handled in a efficient manner there (TextureCoordinates and TextureIO writer).
* @see #AWTGLReadBufferUtil(GLProfile, boolean)
*/
- public BufferedImage readPixelsToBufferedImage(GL gl, boolean awtOrientation) {
+ public BufferedImage readPixelsToBufferedImage(final GL gl, final boolean awtOrientation) {
return readPixelsToBufferedImage(gl, 0, 0, 0, 0, awtOrientation);
}
@@ -84,7 +84,7 @@ public class AWTGLReadBufferUtil extends GLReadBufferUtil {
* and handled in a efficient manner there (TextureCoordinates and TextureIO writer).
* @see #AWTGLReadBufferUtil(GLProfile, boolean)
*/
- public BufferedImage readPixelsToBufferedImage(GL gl, int inX, int inY, int inWidth, int inHeight, boolean awtOrientation) {
+ public BufferedImage readPixelsToBufferedImage(final GL gl, final int inX, final int inY, final int inWidth, final int inHeight, final boolean awtOrientation) {
final GLDrawable drawable = gl.getContext().getGLReadDrawable();
final int width, height;
if( 0 >= inWidth || drawable.getSurfaceWidth() < inWidth ) {
diff --git a/src/jogl/classes/com/jogamp/opengl/util/awt/ImageUtil.java b/src/jogl/classes/com/jogamp/opengl/util/awt/ImageUtil.java
index df3cc4a39..4023a06f0 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/awt/ImageUtil.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/awt/ImageUtil.java
@@ -50,8 +50,8 @@ public class 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();
+ public static void flipImageVertically(final BufferedImage image) {
+ final WritableRaster raster = image.getRaster();
Object scanline1 = null;
Object scanline2 = null;
@@ -73,8 +73,8 @@ public class ImageUtil {
*
* @return A instance of BufferedImage with a type compatible with the graphics card.
*/
- public static BufferedImage createCompatibleImage(int width, int height) {
- GraphicsConfiguration configuration =
+ public static BufferedImage createCompatibleImage(final int width, final int height) {
+ final GraphicsConfiguration configuration =
GraphicsEnvironment.getLocalGraphicsEnvironment().
getDefaultScreenDevice().getDefaultConfiguration();
return configuration.createCompatibleImage(width, height);
@@ -92,7 +92,7 @@ public class ImageUtil {
*
* @return A thumbnail with the requested width or the original picture if thumbWidth = image.getWidth()
*/
- public static BufferedImage createThumbnail(BufferedImage image, int thumbWidth) {
+ public static BufferedImage createThumbnail(final BufferedImage image, final int thumbWidth) {
// Thanks to Romain Guy for this utility
if (thumbWidth > image.getWidth()) {
throw new IllegalArgumentException("Thumbnail width must be greater than image width");
@@ -102,7 +102,7 @@ public class ImageUtil {
return image;
}
- float ratio = (float) image.getWidth() / (float) image.getHeight();
+ final float ratio = (float) image.getWidth() / (float) image.getHeight();
int width = image.getWidth();
BufferedImage thumb = image;
@@ -112,8 +112,8 @@ public class ImageUtil {
width = thumbWidth;
}
- BufferedImage temp = createCompatibleImage(width, (int) (width / ratio));
- Graphics2D g2 = temp.createGraphics();
+ final BufferedImage temp = createCompatibleImage(width, (int) (width / ratio));
+ final Graphics2D g2 = temp.createGraphics();
g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
RenderingHints.VALUE_INTERPOLATION_BILINEAR);
g2.drawImage(thumb, 0, 0, temp.getWidth(), temp.getHeight(), null);
diff --git a/src/jogl/classes/com/jogamp/opengl/util/awt/Overlay.java b/src/jogl/classes/com/jogamp/opengl/util/awt/Overlay.java
index 1ad7b9987..a78bc9bb3 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/awt/Overlay.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/awt/Overlay.java
@@ -49,13 +49,13 @@ import javax.media.opengl.*;
efficiency. */
public class Overlay {
- private GLDrawable drawable;
+ private final GLDrawable drawable;
private TextureRenderer renderer;
private boolean contentsLost;
/** Creates a new Java 2D overlay on top of the specified
GLDrawable. */
- public Overlay(GLDrawable drawable) {
+ public Overlay(final GLDrawable drawable) {
this.drawable = drawable;
}
@@ -103,7 +103,7 @@ public class Overlay {
@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) {
+ public void markDirty(final int x, final int y, final int width, final int height) {
renderer.markDirty(x, y, width, height);
}
@@ -159,7 +159,7 @@ public class Overlay {
@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 {
+ public void draw(final int x, final int y, final int width, final int height) throws GLException {
draw(x, y, x, y, width, height);
}
@@ -184,9 +184,9 @@ public class Overlay {
@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 {
+ public void draw(final int screenx, final int screeny,
+ final int overlayx, final int overlayy,
+ final int width, final int height) throws GLException {
renderer.drawOrthoRect(screenx, screeny,
overlayx, overlayy,
width, height);
diff --git a/src/jogl/classes/com/jogamp/opengl/util/awt/Screenshot.java b/src/jogl/classes/com/jogamp/opengl/util/awt/Screenshot.java
index f686b672a..ac208044b 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/awt/Screenshot.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/awt/Screenshot.java
@@ -88,9 +88,9 @@ public class Screenshot {
* @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 {
+ public static void writeToTargaFile(final File file,
+ final int width,
+ final int height) throws GLException, IOException {
writeToTargaFile(file, width, height, false);
}
@@ -115,10 +115,10 @@ public class Screenshot {
* @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 {
+ public static void writeToTargaFile(final File file,
+ final int width,
+ final int height,
+ final boolean alpha) throws GLException, IOException {
writeToTargaFile(file, 0, 0, width, height, alpha);
}
@@ -145,27 +145,27 @@ public class Screenshot {
* @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 {
+ public static void writeToTargaFile(final File file,
+ final int x,
+ final int y,
+ final int width,
+ final int height,
+ final boolean alpha) throws GLException, IOException {
if (alpha) {
checkExtABGR();
}
- TGAWriter writer = new TGAWriter();
+ final TGAWriter writer = new TGAWriter();
writer.open(file, width, height, alpha);
- ByteBuffer bgr = writer.getImageData();
+ final ByteBuffer bgr = writer.getImageData();
- GL gl = GLContext.getCurrentGL();
+ final GL gl = GLContext.getCurrentGL();
// Set up pixel storage modes
- GLPixelStorageModes psm = new GLPixelStorageModes();
+ final GLPixelStorageModes psm = new GLPixelStorageModes();
psm.setPackAlignment(gl, 1);
- int readbackType = (alpha ? GL2.GL_ABGR_EXT : GL2GL3.GL_BGR);
+ final int readbackType = (alpha ? GL2.GL_ABGR_EXT : GL2GL3.GL_BGR);
// read the BGR values into the image buffer
gl.glReadPixels(x, y, width, height, readbackType,
@@ -198,8 +198,8 @@ public class Screenshot {
* @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 {
+ public static BufferedImage readToBufferedImage(final int width,
+ final int height) throws GLException {
return readToBufferedImage(width, height, false);
}
@@ -223,9 +223,9 @@ public class Screenshot {
* @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 {
+ public static BufferedImage readToBufferedImage(final int width,
+ final int height,
+ final boolean alpha) throws GLException {
return readToBufferedImage(0, 0, width, height, alpha);
}
@@ -251,26 +251,26 @@ public class Screenshot {
* @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 : GL2GL3.GL_BGR);
+ public static BufferedImage readToBufferedImage(final int x,
+ final int y,
+ final int width,
+ final int height,
+ final boolean alpha) throws GLException {
+ final int bufImgType = (alpha ? BufferedImage.TYPE_4BYTE_ABGR : BufferedImage.TYPE_3BYTE_BGR);
+ final int readbackType = (alpha ? GL2.GL_ABGR_EXT : GL2GL3.GL_BGR);
if (alpha) {
checkExtABGR();
}
// Allocate necessary storage
- BufferedImage image = new BufferedImage(width, height, bufImgType);
+ final BufferedImage image = new BufferedImage(width, height, bufImgType);
- GLContext glc = GLContext.getCurrent();
- GL gl = glc.getGL();
+ final GLContext glc = GLContext.getCurrent();
+ final GL gl = glc.getGL();
// Set up pixel storage modes
- GLPixelStorageModes psm = new GLPixelStorageModes();
+ final GLPixelStorageModes psm = new GLPixelStorageModes();
psm.setPackAlignment(gl, 1);
// read the BGR values into the image
@@ -313,9 +313,9 @@ public class Screenshot {
* 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 {
+ public static void writeToFile(final File file,
+ final int width,
+ final int height) throws IOException, GLException {
writeToFile(file, width, height, false);
}
@@ -348,10 +348,10 @@ public class Screenshot {
* 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 {
+ public static void writeToFile(final File file,
+ final int width,
+ final int height,
+ final boolean alpha) throws IOException, GLException {
writeToFile(file, 0, 0, width, height, alpha);
}
@@ -386,26 +386,26 @@ public class Screenshot {
* 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,
+ public static void writeToFile(final File file,
+ final int x,
+ final int y,
+ final int width,
+ final int height,
boolean alpha) throws IOException, GLException {
- String fileSuffix = IOUtil.getFileSuffix(file);
+ final String fileSuffix = IOUtil.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);
+ final BufferedImage image = readToBufferedImage(x, y, width, height, alpha);
if (!ImageIO.write(image, fileSuffix, file)) {
throw new IOException("Unsupported file format " + fileSuffix);
}
}
private static void checkExtABGR() {
- GL gl = GLContext.getCurrentGL();
+ final GL gl = GLContext.getCurrentGL();
if (!gl.isExtensionAvailable(GLExtensions.EXT_abgr)) {
throw new IllegalArgumentException("Saving alpha channel requires GL_EXT_abgr");
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 a5c8f66af..660d3bc6a 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java
@@ -40,7 +40,7 @@
package com.jogamp.opengl.util.awt;
import com.jogamp.common.nio.Buffers;
-
+import com.jogamp.common.util.PropertyAccess;
import com.jogamp.opengl.GLExtensions;
import com.jogamp.opengl.util.*;
import com.jogamp.opengl.util.packrect.*;
@@ -60,14 +60,12 @@ 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.fixedfunc.GLPointerFunc;
import javax.media.opengl.glu.*;
import javax.media.opengl.awt.*;
@@ -132,7 +130,7 @@ public class TextRenderer {
static {
Debug.initSingleton();
- DEBUG = Debug.isPropertyDefined("jogl.debug.TextRenderer", true);
+ DEBUG = PropertyAccess.isPropertyDefined("jogl.debug.TextRenderer", true);
}
// These are occasionally useful for more in-depth debugging
@@ -218,7 +216,7 @@ public class TextRenderer {
@param font the font to render with
*/
- public TextRenderer(Font font) {
+ public TextRenderer(final Font font) {
this(font, false, false, null, false);
}
@@ -232,7 +230,7 @@ public class TextRenderer {
@param font the font to render with
@param mipmap whether to attempt use of automatic mipmap generation
*/
- public TextRenderer(Font font, boolean mipmap) {
+ public TextRenderer(final Font font, final boolean mipmap) {
this(font, false, false, null, mipmap);
}
@@ -249,8 +247,8 @@ public class TextRenderer {
@param useFractionalMetrics whether to use fractional font
metrics at the Java 2D level
*/
- public TextRenderer(Font font, boolean antialiased,
- boolean useFractionalMetrics) {
+ public TextRenderer(final Font font, final boolean antialiased,
+ final boolean useFractionalMetrics) {
this(font, antialiased, useFractionalMetrics, null, false);
}
@@ -268,8 +266,8 @@ public class TextRenderer {
@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) {
+ public TextRenderer(final Font font, final boolean antialiased,
+ final boolean useFractionalMetrics, final RenderDelegate renderDelegate) {
this(font, antialiased, useFractionalMetrics, renderDelegate, false);
}
@@ -290,9 +288,9 @@ public class TextRenderer {
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) {
+ public TextRenderer(final Font font, final boolean antialiased,
+ final boolean useFractionalMetrics, RenderDelegate renderDelegate,
+ final boolean mipmap) {
this.font = font;
this.antialiased = antialiased;
this.useFractionalMetrics = useFractionalMetrics;
@@ -314,7 +312,7 @@ public class TextRenderer {
/** 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) {
+ public Rectangle2D getBounds(final String str) {
return getBounds((CharSequence) str);
}
@@ -333,12 +331,12 @@ public class TextRenderer {
{@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) {
+ public Rectangle2D getBounds(final CharSequence str) {
// FIXME: this should be more optimized and use the glyph cache
- Rect r = stringLocations.get(str);
+ final Rect r = stringLocations.get(str);
if (r != null) {
- TextData data = (TextData) r.getUserData();
+ final 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,
@@ -385,7 +383,7 @@ public class TextRenderer {
@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 {
+ public void beginRendering(final int width, final int height) throws GLException {
beginRendering(width, height, true);
}
@@ -405,7 +403,7 @@ public class TextRenderer {
@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)
+ public void beginRendering(final int width, final int height, final boolean disableDepthTest)
throws GLException {
beginRendering(true, width, height, disableDepthTest);
}
@@ -432,8 +430,8 @@ public class TextRenderer {
@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) &&
+ public void setColor(final Color color) throws GLException {
+ final boolean noNeedForFlush = (haveCachedColor && (cachedColor != null) &&
color.equals(cachedColor));
if (!noNeedForFlush) {
@@ -460,9 +458,9 @@ public class TextRenderer {
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)
+ public void setColor(final float r, final float g, final float b, final float a)
throws GLException {
- boolean noNeedForFlush = (haveCachedColor && (cachedColor == null) &&
+ final boolean noNeedForFlush = (haveCachedColor && (cachedColor == null) &&
(r == cachedR) && (g == cachedG) && (b == cachedB) &&
(a == cachedA));
@@ -490,14 +488,14 @@ public class TextRenderer {
@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 {
+ public void draw(final CharSequence str, final int x, final 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 {
+ public void draw(final String str, final int x, final int y) throws GLException {
draw3D(str, x, y, 0, 1);
}
@@ -513,8 +511,8 @@ public class TextRenderer {
@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) {
+ public void draw3D(final CharSequence str, final float x, final float y, final float z,
+ final float scaleFactor) {
internal_draw3D(str, x, y, z, scaleFactor);
}
@@ -522,12 +520,12 @@ public class TextRenderer {
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) {
+ public void draw3D(final String str, final float x, final float y, final float z, final float scaleFactor) {
internal_draw3D(str, x, y, z, scaleFactor);
}
/** Returns the pixel width of the given character. */
- public float getCharWidth(char inChar) {
+ public float getCharWidth(final char inChar) {
return mGlyphProducer.getGlyphPixelWidth(inChar);
}
@@ -582,20 +580,20 @@ public class TextRenderer {
// Internals only below this point
//
- private static Rectangle2D preNormalize(Rectangle2D src) {
+ private static Rectangle2D preNormalize(final 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;
+ final int minX = (int) Math.floor(src.getMinX()) - 1;
+ final int minY = (int) Math.floor(src.getMinY()) - 1;
+ final int maxX = (int) Math.ceil(src.getMaxX()) + 1;
+ final int maxY = (int) Math.ceil(src.getMaxY()) + 1;
return new Rectangle2D.Double(minX, minY, maxX - minX, maxY - minY);
}
- private Rectangle2D normalize(Rectangle2D src) {
+ private Rectangle2D normalize(final 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
@@ -603,7 +601,7 @@ public class TextRenderer {
// 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());
+ final 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),
@@ -612,7 +610,7 @@ public class TextRenderer {
}
private TextureRenderer getBackingStore() {
- TextureRenderer renderer = (TextureRenderer) packer.getBackingStore();
+ final TextureRenderer renderer = (TextureRenderer) packer.getBackingStore();
if (renderer != cachedBackingStore) {
// Backing store changed since last time; discard any cached Graphics2D
@@ -629,7 +627,7 @@ public class TextRenderer {
}
private Graphics2D getGraphics2D() {
- TextureRenderer renderer = getBackingStore();
+ final TextureRenderer renderer = getBackingStore();
if (cachedGraphics == null) {
cachedGraphics = renderer.createGraphics();
@@ -650,9 +648,9 @@ public class TextRenderer {
return cachedGraphics;
}
- private void beginRendering(boolean ortho, int width, int height,
- boolean disableDepthTestForOrtho) {
- GL2 gl = GLContext.getCurrentGL().getGL2();
+ private void beginRendering(final boolean ortho, final int width, final int height,
+ final boolean disableDepthTestForOrtho) {
+ final GL2 gl = GLContext.getCurrentGL().getGL2();
if (DEBUG && !debugged) {
debug(gl);
@@ -677,8 +675,8 @@ public class TextRenderer {
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);
+ final int[] sz = new int[1];
+ gl.glGetIntegerv(GL.GL_MAX_TEXTURE_SIZE, sz, 0);
packer.setMaxSize(sz[0], sz[0]);
haveMaxSize = true;
}
@@ -711,12 +709,12 @@ public class TextRenderer {
* @param ortho
* @throws GLException
*/
- private void endRendering(boolean ortho) throws GLException {
+ private void endRendering(final boolean ortho) throws GLException {
flushGlyphPipeline();
inBeginEndPair = false;
- GL2 gl = GLContext.getCurrentGL().getGL2();
+ final GL2 gl = GLContext.getCurrentGL().getGL2();
// Pop client attrib bits used by the pipelined quad renderer
gl.glPopClientAttrib();
@@ -726,8 +724,8 @@ public class TextRenderer {
// binding
if (getUseVertexArrays() && is15Available(gl)) {
try {
- gl.glBindBuffer(GL2.GL_ARRAY_BUFFER, 0);
- } catch (Exception e) {
+ gl.glBindBuffer(GL.GL_ARRAY_BUFFER, 0);
+ } catch (final Exception e) {
isExtensionAvailable_GL_VERSION_1_5 = false;
}
}
@@ -756,8 +754,8 @@ public class TextRenderer {
// text strings that haven't been used recently
packer.visit(new RectVisitor() {
@Override
- public void visit(Rect rect) {
- TextData data = (TextData) rect.getUserData();
+ public void visit(final Rect rect) {
+ final TextData data = (TextData) rect.getUserData();
if (data.used()) {
data.clearUsed();
@@ -767,11 +765,11 @@ public class TextRenderer {
}
});
- for (Rect r : deadRects) {
+ for (final Rect r : deadRects) {
packer.remove(r);
stringLocations.remove(((TextData) r.getUserData()).string());
- int unicodeToClearFromCache = ((TextData) r.getUserData()).unicodeID;
+ final int unicodeToClearFromCache = ((TextData) r.getUserData()).unicodeID;
if (unicodeToClearFromCache > 0) {
mGlyphProducer.clearCacheEntry(unicodeToClearFromCache);
@@ -786,7 +784,7 @@ public class TextRenderer {
}
// If we removed dead rectangles this cycle, try to do a compaction
- float frag = packer.verticalFragmentationRatio();
+ final float frag = packer.verticalFragmentationRatio();
if (!deadRects.isEmpty() && (frag > MAX_VERTICAL_FRAGMENTATION)) {
if (DEBUG) {
@@ -804,10 +802,10 @@ public class TextRenderer {
}
}
- private void internal_draw3D(CharSequence str, float x, float y, float z,
- float scaleFactor) {
- for (Glyph glyph : mGlyphProducer.getGlyphs(str)) {
- float advance = glyph.draw3D(x, y, z, scaleFactor);
+ private void internal_draw3D(final CharSequence str, float x, final float y, final float z,
+ final float scaleFactor) {
+ for (final Glyph glyph : mGlyphProducer.getGlyphs(str)) {
+ final float advance = glyph.draw3D(x, y, z, scaleFactor);
x += advance * scaleFactor;
}
}
@@ -818,8 +816,8 @@ public class TextRenderer {
}
}
- private void draw3D_ROBUST(CharSequence str, float x, float y, float z,
- float scaleFactor) {
+ private void draw3D_ROBUST(final CharSequence str, final float x, final float y, final float z,
+ final float scaleFactor) {
String curStr;
if (str instanceof String) {
curStr = (String) str;
@@ -833,9 +831,9 @@ public class TextRenderer {
if (rect == null) {
// Rasterize this string and place it on the backing store
Graphics2D g = getGraphics2D();
- Rectangle2D origBBox = preNormalize(renderDelegate.getBounds(curStr, font, getFontRenderContext()));
- Rectangle2D bbox = normalize(origBBox);
- Point origin = new Point((int) -bbox.getMinX(),
+ final Rectangle2D origBBox = preNormalize(renderDelegate.getBounds(curStr, font, getFontRenderContext()));
+ final Rectangle2D bbox = normalize(origBBox);
+ final Point origin = new Point((int) -bbox.getMinX(),
(int) -bbox.getMinY());
rect = new Rect(0, 0, (int) bbox.getWidth(),
(int) bbox.getHeight(),
@@ -850,8 +848,8 @@ public class TextRenderer {
// OK, should now have an (x, y) for this rectangle; rasterize
// the String
- int strx = rect.x() + origin.x;
- int stry = rect.y() + origin.y;
+ final int strx = rect.x() + origin.x;
+ final int stry = rect.y() + origin.y;
// Clear out the area we're going to draw into
g.setComposite(AlphaComposite.Clear);
@@ -862,7 +860,7 @@ public class TextRenderer {
renderDelegate.draw(g, curStr, strx, stry);
if (DRAW_BBOXES) {
- TextData data = (TextData) rect.getUserData();
+ final TextData data = (TextData) rect.getUserData();
// Draw a bounding box on the backing store
g.drawRect(strx - data.origOriginX(),
stry - data.origOriginY(),
@@ -880,15 +878,15 @@ public class TextRenderer {
}
// OK, now draw the portion of the backing store to the screen
- TextureRenderer renderer = getBackingStore();
+ final TextureRenderer renderer = getBackingStore();
// NOTE that the rectangles managed by the packer have their
// origin at the upper-left but the TextureRenderer's origin is
// at its lower left!!!
- TextData data = (TextData) rect.getUserData();
+ final TextData data = (TextData) rect.getUserData();
data.markUsed();
- Rectangle2D origRect = data.origRect();
+ final Rectangle2D origRect = data.origRect();
// Align the leftmost point of the baseline to the (x, y, z) coordinate requested
renderer.draw3DRect(x - (scaleFactor * data.origOriginX()),
@@ -902,10 +900,10 @@ public class TextRenderer {
//----------------------------------------------------------------------
// Debugging functionality
//
- private void debug(GL gl) {
+ private void debug(final GL gl) {
dbgFrame = new Frame("TextRenderer Debug Output");
- GLCanvas dbgCanvas = new GLCanvas(new GLCapabilities(gl.getGLProfile()));
+ final GLCanvas dbgCanvas = new GLCanvas(new GLCapabilities(gl.getGLProfile()));
dbgCanvas.setSharedContext(GLContext.getCurrent());
dbgCanvas.addGLEventListener(new DebugListener(gl, dbgFrame));
dbgFrame.add(dbgCanvas);
@@ -913,7 +911,7 @@ public class TextRenderer {
final FPSAnimator anim = new FPSAnimator(dbgCanvas, 10);
dbgFrame.addWindowListener(new WindowAdapter() {
@Override
- public void windowClosing(WindowEvent e) {
+ public void windowClosing(final WindowEvent e) {
// Run this on another thread than the AWT event queue to
// make sure the call to Animator.stop() completes before
// exiting
@@ -999,11 +997,11 @@ public class TextRenderer {
CharSequenceIterator() {
}
- CharSequenceIterator(CharSequence sequence) {
+ CharSequenceIterator(final CharSequence sequence) {
initFromCharSequence(sequence);
}
- public void initFromCharSequence(CharSequence sequence) {
+ public void initFromCharSequence(final CharSequence sequence) {
mSequence = sequence;
mLength = mSequence.length();
mCurrentIndex = 0;
@@ -1040,7 +1038,7 @@ public class TextRenderer {
}
@Override
- public char setIndex(int position) {
+ public char setIndex(final int position) {
mCurrentIndex = position;
return current();
@@ -1063,7 +1061,7 @@ public class TextRenderer {
@Override
public Object clone() {
- CharSequenceIterator iter = new CharSequenceIterator(mSequence);
+ final CharSequenceIterator iter = new CharSequenceIterator(mSequence);
iter.mCurrentIndex = mCurrentIndex;
return iter;
@@ -1108,7 +1106,7 @@ public class TextRenderer {
private boolean used; // Whether this text was used recently
- TextData(String str, Point origin, Rectangle2D origRect, int unicodeID) {
+ TextData(final String str, final Point origin, final Rectangle2D origRect, final int unicodeID) {
this.str = str;
this.origin = origin;
this.origRect = origRect;
@@ -1154,7 +1152,7 @@ public class TextRenderer {
private Graphics2D g;
@Override
- public Object allocateBackingStore(int w, int h) {
+ public Object allocateBackingStore(final int w, final int h) {
// FIXME: should consider checking Font's attributes to see
// whether we're likely to need to support a full RGBA backing
// store (i.e., non-default Paint, foreground color, etc.), but
@@ -1177,12 +1175,12 @@ public class TextRenderer {
}
@Override
- public void deleteBackingStore(Object backingStore) {
+ public void deleteBackingStore(final Object backingStore) {
((TextureRenderer) backingStore).dispose();
}
@Override
- public boolean preExpand(Rect cause, int attemptNumber) {
+ public boolean preExpand(final Rect cause, final int attemptNumber) {
// Only try this one time; clear out potentially obsolete entries
// NOTE: this heuristic and the fact that it clears the used bit
// of all entries seems to cause cycling of entries in some
@@ -1218,7 +1216,7 @@ public class TextRenderer {
}
@Override
- public boolean additionFailed(Rect cause, int attemptNumber) {
+ public boolean additionFailed(final Rect cause, final int attemptNumber) {
// Heavy hammer -- might consider doing something different
packer.clear();
stringLocations.clear();
@@ -1242,13 +1240,13 @@ public class TextRenderer {
}
@Override
- public void beginMovement(Object oldBackingStore, Object newBackingStore) {
+ public void beginMovement(final Object oldBackingStore, final Object newBackingStore) {
// Exit the begin / end pair if necessary
if (inBeginEndPair) {
// Draw any outstanding glyphs
flush();
- GL2 gl = GLContext.getCurrentGL().getGL2();
+ final GL2 gl = GLContext.getCurrentGL().getGL2();
// Pop client attrib bits used by the pipelined quad renderer
gl.glPopClientAttrib();
@@ -1258,8 +1256,8 @@ public class TextRenderer {
// binding
if (getUseVertexArrays() && is15Available(gl)) {
try {
- gl.glBindBuffer(GL2.GL_ARRAY_BUFFER, 0);
- } catch (Exception e) {
+ gl.glBindBuffer(GL.GL_ARRAY_BUFFER, 0);
+ } catch (final Exception e) {
isExtensionAvailable_GL_VERSION_1_5 = false;
}
}
@@ -1271,15 +1269,15 @@ public class TextRenderer {
}
}
- TextureRenderer newRenderer = (TextureRenderer) newBackingStore;
+ final TextureRenderer newRenderer = (TextureRenderer) newBackingStore;
g = newRenderer.createGraphics();
}
@Override
- public void move(Object oldBackingStore, Rect oldLocation,
- Object newBackingStore, Rect newLocation) {
- TextureRenderer oldRenderer = (TextureRenderer) oldBackingStore;
- TextureRenderer newRenderer = (TextureRenderer) newBackingStore;
+ public void move(final Object oldBackingStore, final Rect oldLocation,
+ final Object newBackingStore, final Rect newLocation) {
+ final TextureRenderer oldRenderer = (TextureRenderer) oldBackingStore;
+ final TextureRenderer newRenderer = (TextureRenderer) newBackingStore;
if (oldRenderer == newRenderer) {
// Movement on the same backing store -- easy case
@@ -1288,7 +1286,7 @@ public class TextRenderer {
newLocation.y() - oldLocation.y());
} else {
// Need to draw from the old renderer's image into the new one
- Image img = oldRenderer.getImage();
+ final Image img = oldRenderer.getImage();
g.drawImage(img, newLocation.x(), newLocation.y(),
newLocation.x() + newLocation.w(),
newLocation.y() + newLocation.h(), oldLocation.x(),
@@ -1298,11 +1296,11 @@ public class TextRenderer {
}
@Override
- public void endMovement(Object oldBackingStore, Object newBackingStore) {
+ public void endMovement(final Object oldBackingStore, final Object newBackingStore) {
g.dispose();
// Sync the whole surface
- TextureRenderer newRenderer = (TextureRenderer) newBackingStore;
+ final TextureRenderer newRenderer = (TextureRenderer) newBackingStore;
newRenderer.markDirty(0, 0, newRenderer.getWidth(),
newRenderer.getHeight());
@@ -1316,7 +1314,7 @@ public class TextRenderer {
}
// Push client attrib bits used by the pipelined quad renderer
- GL2 gl = GLContext.getCurrentGL().getGL2();
+ final GL2 gl = GLContext.getCurrentGL().getGL2();
gl.glPushClientAttrib((int) GL2.GL_ALL_CLIENT_ATTRIB_BITS);
if (haveCachedColor) {
@@ -1340,32 +1338,32 @@ public class TextRenderer {
}
@Override
- public Rectangle2D getBounds(CharSequence str, Font font,
- FontRenderContext frc) {
+ public Rectangle2D getBounds(final CharSequence str, final Font font,
+ final FontRenderContext frc) {
return getBounds(font.createGlyphVector(frc,
new CharSequenceIterator(str)),
frc);
}
@Override
- public Rectangle2D getBounds(String str, Font font,
- FontRenderContext frc) {
+ public Rectangle2D getBounds(final String str, final Font font,
+ final FontRenderContext frc) {
return getBounds(font.createGlyphVector(frc, str), frc);
}
@Override
- public Rectangle2D getBounds(GlyphVector gv, FontRenderContext frc) {
+ public Rectangle2D getBounds(final GlyphVector gv, final FontRenderContext frc) {
return gv.getVisualBounds();
}
@Override
- public void drawGlyphVector(Graphics2D graphics, GlyphVector str,
- int x, int y) {
+ public void drawGlyphVector(final Graphics2D graphics, final GlyphVector str,
+ final int x, final int y) {
graphics.drawGlyphVector(str, x, y);
}
@Override
- public void draw(Graphics2D graphics, String str, int x, int y) {
+ public void draw(final Graphics2D graphics, final String str, final int x, final int y) {
graphics.drawString(str, x, y);
}
}
@@ -1415,11 +1413,11 @@ public class TextRenderer {
private boolean needAdvance;
// Creates a Glyph representing an individual Unicode character
- public Glyph(int unicodeID,
- int glyphCode,
- float advance,
- GlyphVector singleUnicodeGlyphVector,
- GlyphProducer producer) {
+ public Glyph(final int unicodeID,
+ final int glyphCode,
+ final float advance,
+ final GlyphVector singleUnicodeGlyphVector,
+ final GlyphProducer producer) {
this.unicodeID = unicodeID;
this.glyphCode = glyphCode;
this.advance = advance;
@@ -1430,7 +1428,7 @@ public class TextRenderer {
// 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) {
+ public Glyph(final String str, final boolean needAdvance) {
this.str = str;
this.needAdvance = needAdvance;
}
@@ -1451,14 +1449,14 @@ public class TextRenderer {
}
/** Draws this glyph and returns the (x) advance for this glyph */
- public float draw3D(float inX, float inY, float z, float scaleFactor) {
+ public float draw3D(final float inX, final float inY, final float z, final 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);
+ final GlyphVector gv = font.createGlyphVector(getFontRenderContext(), str);
float totalAdvance = 0;
for (int i = 0; i < gv.getNumGlyphs(); i++) {
totalAdvance += gv.getGlyphMetrics(i).getAdvance();
@@ -1476,32 +1474,32 @@ public class TextRenderer {
mPipelinedQuadRenderer = new Pipelined_QuadRenderer();
}
- TextureRenderer renderer = getBackingStore();
+ final 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();
+ final TextureCoords wholeImageTexCoords = renderer.getTexture().getImageTexCoords();
+ final float xScale = wholeImageTexCoords.right();
+ final float yScale = wholeImageTexCoords.bottom();
- Rect rect = glyphRectForTextureMapping;
- TextData data = (TextData) rect.getUserData();
+ final Rect rect = glyphRectForTextureMapping;
+ final TextData data = (TextData) rect.getUserData();
data.markUsed();
- Rectangle2D origRect = data.origRect();
+ final Rectangle2D origRect = data.origRect();
- float x = inX - (scaleFactor * data.origOriginX());
- float y = inY - (scaleFactor * ((float) origRect.getHeight() - data.origOriginY()));
+ final float x = inX - (scaleFactor * data.origOriginX());
+ final 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() -
+ final int texturex = rect.x() + (data.origin().x - data.origOriginX());
+ final int texturey = renderer.getHeight() - rect.y() - (int) origRect.getHeight() -
(data.origin().y - data.origOriginY());
- int width = (int) origRect.getWidth();
- int height = (int) origRect.getHeight();
+ final int width = (int) origRect.getWidth();
+ final int height = (int) origRect.getHeight();
- float tx1 = xScale * texturex / renderer.getWidth();
- float ty1 = yScale * (1.0f -
+ final float tx1 = xScale * texturex / renderer.getWidth();
+ final float ty1 = yScale * (1.0f -
((float) texturey / (float) renderer.getHeight()));
- float tx2 = xScale * (texturex + width) / renderer.getWidth();
- float ty2 = yScale * (1.0f -
+ final float tx2 = xScale * (texturex + width) / renderer.getWidth();
+ final float ty2 = yScale * (1.0f -
((float) (texturey + height) / (float) renderer.getHeight()));
mPipelinedQuadRenderer.glTexCoord2f(tx1, ty1);
@@ -1515,7 +1513,7 @@ public class TextRenderer {
mPipelinedQuadRenderer.glTexCoord2f(tx1, ty2);
mPipelinedQuadRenderer.glVertex3f(x,
y + (height * scaleFactor), z);
- } catch (Exception e) {
+ } catch (final Exception e) {
e.printStackTrace();
}
return advance;
@@ -1527,21 +1525,21 @@ public class TextRenderer {
}
private void upload() {
- GlyphVector gv = getGlyphVector();
- Rectangle2D origBBox = preNormalize(renderDelegate.getBounds(gv, getFontRenderContext()));
- Rectangle2D bbox = normalize(origBBox);
- Point origin = new Point((int) -bbox.getMinX(),
+ final GlyphVector gv = getGlyphVector();
+ final Rectangle2D origBBox = preNormalize(renderDelegate.getBounds(gv, getFontRenderContext()));
+ final Rectangle2D bbox = normalize(origBBox);
+ final Point origin = new Point((int) -bbox.getMinX(),
(int) -bbox.getMinY());
- Rect rect = new Rect(0, 0, (int) bbox.getWidth(),
+ final 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();
+ final 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;
+ final int strx = rect.x() + origin.x;
+ final int stry = rect.y() + origin.y;
// Clear out the area we're going to draw into
g.setComposite(AlphaComposite.Clear);
@@ -1552,7 +1550,7 @@ public class TextRenderer {
renderDelegate.drawGlyphVector(g, gv, strx, stry);
if (DRAW_BBOXES) {
- TextData data = (TextData) rect.getUserData();
+ final TextData data = (TextData) rect.getUserData();
// Draw a bounding box on the backing store
g.drawRect(strx - data.origOriginX(),
stry - data.origOriginY(),
@@ -1572,7 +1570,7 @@ public class TextRenderer {
}
private GlyphVector getGlyphVector() {
- GlyphVector gv = singleUnicodeGlyphVector;
+ final GlyphVector gv = singleUnicodeGlyphVector;
if (gv != null) {
singleUnicodeGlyphVector = null; // Don't need this anymore
return gv;
@@ -1595,13 +1593,13 @@ public class TextRenderer {
// We re-use this for each incoming string
CharSequenceIterator iter = new CharSequenceIterator();
- GlyphProducer(int fontLengthInGlyphs) {
+ GlyphProducer(final int fontLengthInGlyphs) {
unicodes2Glyphs = new int[512];
glyphCache = new Glyph[fontLengthInGlyphs];
clearAllCacheEntries();
}
- public List getGlyphs(CharSequence inString) {
+ public List getGlyphs(final CharSequence inString) {
glyphsOutput.clear();
GlyphVector fullRunGlyphVector;
fullRunGlyphVector = fullGlyphVectorCache.get(inString.toString());
@@ -1610,30 +1608,30 @@ public class TextRenderer {
fullRunGlyphVector = font.createGlyphVector(getFontRenderContext(), iter);
fullGlyphVectorCache.put(inString.toString(), fullRunGlyphVector);
}
- boolean complex = (fullRunGlyphVector.getLayoutFlags() != 0);
+ final boolean complex = (fullRunGlyphVector.getLayoutFlags() != 0);
if (complex || DISABLE_GLYPH_CACHE) {
// Punt to the robust version of the renderer
glyphsOutput.add(new Glyph(inString.toString(), false));
return glyphsOutput;
}
- int lengthInGlyphs = fullRunGlyphVector.getNumGlyphs();
+ final int lengthInGlyphs = fullRunGlyphVector.getNumGlyphs();
int i = 0;
while (i < lengthInGlyphs) {
- Character letter = CharacterCache.valueOf(inString.charAt(i));
+ final Character letter = CharacterCache.valueOf(inString.charAt(i));
GlyphMetrics metrics = glyphMetricsCache.get(letter);
if (metrics == null) {
metrics = fullRunGlyphVector.getGlyphMetrics(i);
glyphMetricsCache.put(letter, metrics);
}
- Glyph glyph = getGlyph(inString, metrics, i);
+ final Glyph glyph = getGlyph(inString, metrics, i);
if (glyph != null) {
glyphsOutput.add(glyph);
i++;
} else {
// Assemble a run of characters that don't fit in
// the cache
- StringBuilder buf = new StringBuilder();
+ final StringBuilder buf = new StringBuilder();
while (i < lengthInGlyphs &&
getGlyph(inString, fullRunGlyphVector.getGlyphMetrics(i), i) == null) {
buf.append(inString.charAt(i++));
@@ -1646,10 +1644,10 @@ public class TextRenderer {
return glyphsOutput;
}
- public void clearCacheEntry(int unicodeID) {
- int glyphID = unicodes2Glyphs[unicodeID];
+ public void clearCacheEntry(final int unicodeID) {
+ final int glyphID = unicodes2Glyphs[unicodeID];
if (glyphID != undefined) {
- Glyph glyph = glyphCache[glyphID];
+ final Glyph glyph = glyphCache[glyphID];
if (glyph != null) {
glyph.clear();
}
@@ -1664,20 +1662,20 @@ public class TextRenderer {
}
}
- public void register(Glyph glyph) {
+ public void register(final Glyph glyph) {
unicodes2Glyphs[glyph.getUnicodeID()] = glyph.getGlyphCode();
glyphCache[glyph.getGlyphCode()] = glyph;
}
- public float getGlyphPixelWidth(char unicodeID) {
- Glyph glyph = getGlyph(unicodeID);
+ public float getGlyphPixelWidth(final char unicodeID) {
+ final Glyph glyph = getGlyph(unicodeID);
if (glyph != null) {
return glyph.getAdvance();
}
// Have to do this the hard / uncached way
singleUnicode[0] = unicodeID;
- GlyphVector gv = font.createGlyphVector(fontRenderContext,
+ final GlyphVector gv = font.createGlyphVector(fontRenderContext,
singleUnicode);
return gv.getGlyphMetrics(0).getAdvance();
}
@@ -1685,52 +1683,52 @@ public class TextRenderer {
// Returns a glyph object for this single glyph. Returns null
// if the unicode or glyph ID would be out of bounds of the
// glyph cache.
- private Glyph getGlyph(CharSequence inString,
- GlyphMetrics glyphMetrics,
- int index) {
- char unicodeID = inString.charAt(index);
+ private Glyph getGlyph(final CharSequence inString,
+ final GlyphMetrics glyphMetrics,
+ final int index) {
+ final char unicodeID = inString.charAt(index);
if (unicodeID >= unicodes2Glyphs.length) {
return null;
}
- int glyphID = unicodes2Glyphs[unicodeID];
+ final int glyphID = unicodes2Glyphs[unicodeID];
if (glyphID != undefined) {
return glyphCache[glyphID];
}
// Must fabricate the glyph
singleUnicode[0] = unicodeID;
- GlyphVector gv = font.createGlyphVector(getFontRenderContext(), singleUnicode);
+ final GlyphVector gv = font.createGlyphVector(getFontRenderContext(), singleUnicode);
return getGlyph(unicodeID, gv, glyphMetrics);
}
// It's unclear whether this variant might produce less
// optimal results than if we can see the entire GlyphVector
// for the incoming string
- private Glyph getGlyph(int unicodeID) {
+ private Glyph getGlyph(final int unicodeID) {
if (unicodeID >= unicodes2Glyphs.length) {
return null;
}
- int glyphID = unicodes2Glyphs[unicodeID];
+ final int glyphID = unicodes2Glyphs[unicodeID];
if (glyphID != undefined) {
return glyphCache[glyphID];
}
singleUnicode[0] = (char) unicodeID;
- GlyphVector gv = font.createGlyphVector(getFontRenderContext(), singleUnicode);
+ final GlyphVector gv = font.createGlyphVector(getFontRenderContext(), singleUnicode);
return getGlyph(unicodeID, gv, gv.getGlyphMetrics(0));
}
- private Glyph getGlyph(int unicodeID,
- GlyphVector singleUnicodeGlyphVector,
- GlyphMetrics metrics) {
- int glyphCode = singleUnicodeGlyphVector.getGlyphCode(0);
+ private Glyph getGlyph(final int unicodeID,
+ final GlyphVector singleUnicodeGlyphVector,
+ final GlyphMetrics metrics) {
+ final int glyphCode = singleUnicodeGlyphVector.getGlyphCode(0);
// Have seen huge glyph codes (65536) coming out of some fonts in some Unicode situations
if (glyphCode >= glyphCache.length) {
return null;
}
- Glyph glyph = new Glyph(unicodeID,
+ final Glyph glyph = new Glyph(unicodeID,
glyphCode,
metrics.getAdvance(),
singleUnicodeGlyphVector,
@@ -1752,7 +1750,7 @@ public class TextRenderer {
}
}
- public static Character valueOf(char c) {
+ public static Character valueOf(final char c) {
if (c <= 127) { // must cache
return CharacterCache.cache[c];
}
@@ -1769,7 +1767,7 @@ public class TextRenderer {
int mVBO_For_ResuableTileTexCoords;
Pipelined_QuadRenderer() {
- GL2 gl = GLContext.getCurrentGL().getGL2();
+ final GL2 gl = GLContext.getCurrentGL().getGL2();
mVertCoords = Buffers.newDirectFloatBuffer(kTotalBufferSizeCoordsVerts);
mTexCoords = Buffers.newDirectFloatBuffer(kTotalBufferSizeCoordsTex);
@@ -1777,34 +1775,34 @@ public class TextRenderer {
if (usingVBOs) {
try {
- int[] vbos = new int[2];
+ final int[] vbos = new int[2];
gl.glGenBuffers(2, IntBuffer.wrap(vbos));
mVBO_For_ResuableTileVertices = vbos[0];
mVBO_For_ResuableTileTexCoords = vbos[1];
- gl.glBindBuffer(GL2.GL_ARRAY_BUFFER,
+ gl.glBindBuffer(GL.GL_ARRAY_BUFFER,
mVBO_For_ResuableTileVertices);
- gl.glBufferData(GL2.GL_ARRAY_BUFFER, kTotalBufferSizeBytesVerts,
- null, GL2.GL_STREAM_DRAW); // stream draw because this is a single quad use pipeline
+ gl.glBufferData(GL.GL_ARRAY_BUFFER, kTotalBufferSizeBytesVerts,
+ null, GL2ES2.GL_STREAM_DRAW); // stream draw because this is a single quad use pipeline
- gl.glBindBuffer(GL2.GL_ARRAY_BUFFER,
+ gl.glBindBuffer(GL.GL_ARRAY_BUFFER,
mVBO_For_ResuableTileTexCoords);
- gl.glBufferData(GL2.GL_ARRAY_BUFFER, kTotalBufferSizeBytesTex,
- null, GL2.GL_STREAM_DRAW); // stream draw because this is a single quad use pipeline
- } catch (Exception e) {
+ gl.glBufferData(GL.GL_ARRAY_BUFFER, kTotalBufferSizeBytesTex,
+ null, GL2ES2.GL_STREAM_DRAW); // stream draw because this is a single quad use pipeline
+ } catch (final Exception e) {
isExtensionAvailable_GL_VERSION_1_5 = false;
usingVBOs = false;
}
}
}
- public void glTexCoord2f(float v, float v1) {
+ public void glTexCoord2f(final float v, final float v1) {
mTexCoords.put(v);
mTexCoords.put(v1);
}
- public void glVertex3f(float inX, float inY, float inZ) {
+ public void glVertex3f(final float inX, final float inY, final float inZ) {
mVertCoords.put(inX);
mVertCoords.put(inY);
mVertCoords.put(inZ);
@@ -1826,41 +1824,41 @@ public class TextRenderer {
private void drawVertexArrays() {
if (mOutstandingGlyphsVerticesPipeline > 0) {
- GL2 gl = GLContext.getCurrentGL().getGL2();
+ final GL2 gl = GLContext.getCurrentGL().getGL2();
- TextureRenderer renderer = getBackingStore();
+ final TextureRenderer renderer = getBackingStore();
renderer.getTexture(); // triggers texture uploads. Maybe this should be more obvious?
mVertCoords.rewind();
mTexCoords.rewind();
- gl.glEnableClientState(GL2.GL_VERTEX_ARRAY);
+ gl.glEnableClientState(GLPointerFunc.GL_VERTEX_ARRAY);
if (usingVBOs) {
- gl.glBindBuffer(GL2.GL_ARRAY_BUFFER,
+ gl.glBindBuffer(GL.GL_ARRAY_BUFFER,
mVBO_For_ResuableTileVertices);
- gl.glBufferSubData(GL2.GL_ARRAY_BUFFER, 0,
+ gl.glBufferSubData(GL.GL_ARRAY_BUFFER, 0,
mOutstandingGlyphsVerticesPipeline * kSizeInBytes_OneVertices_VertexData,
mVertCoords); // upload only the new stuff
- gl.glVertexPointer(3, GL2.GL_FLOAT, 0, 0);
+ gl.glVertexPointer(3, GL.GL_FLOAT, 0, 0);
} else {
- gl.glVertexPointer(3, GL2.GL_FLOAT, 0, mVertCoords);
+ gl.glVertexPointer(3, GL.GL_FLOAT, 0, mVertCoords);
}
- gl.glEnableClientState(GL2.GL_TEXTURE_COORD_ARRAY);
+ gl.glEnableClientState(GLPointerFunc.GL_TEXTURE_COORD_ARRAY);
if (usingVBOs) {
- gl.glBindBuffer(GL2.GL_ARRAY_BUFFER,
+ gl.glBindBuffer(GL.GL_ARRAY_BUFFER,
mVBO_For_ResuableTileTexCoords);
- gl.glBufferSubData(GL2.GL_ARRAY_BUFFER, 0,
+ gl.glBufferSubData(GL.GL_ARRAY_BUFFER, 0,
mOutstandingGlyphsVerticesPipeline * kSizeInBytes_OneVertices_TexData,
mTexCoords); // upload only the new stuff
- gl.glTexCoordPointer(2, GL2.GL_FLOAT, 0, 0);
+ gl.glTexCoordPointer(2, GL.GL_FLOAT, 0, 0);
} else {
- gl.glTexCoordPointer(2, GL2.GL_FLOAT, 0, mTexCoords);
+ gl.glTexCoordPointer(2, GL.GL_FLOAT, 0, mTexCoords);
}
- gl.glDrawArrays(GL2.GL_QUADS, 0,
+ gl.glDrawArrays(GL2GL3.GL_QUADS, 0,
mOutstandingGlyphsVerticesPipeline);
mVertCoords.rewind();
@@ -1871,14 +1869,14 @@ public class TextRenderer {
private void drawIMMEDIATE() {
if (mOutstandingGlyphsVerticesPipeline > 0) {
- TextureRenderer renderer = getBackingStore();
+ final TextureRenderer renderer = getBackingStore();
renderer.getTexture(); // triggers texture uploads. Maybe this should be more obvious?
- GL2 gl = GLContext.getCurrentGL().getGL2();
- gl.glBegin(GL2.GL_QUADS);
+ final GL2 gl = GLContext.getCurrentGL().getGL2();
+ gl.glBegin(GL2GL3.GL_QUADS);
try {
- int numberOfQuads = mOutstandingGlyphsVerticesPipeline / 4;
+ final int numberOfQuads = mOutstandingGlyphsVerticesPipeline / 4;
mVertCoords.rewind();
mTexCoords.rewind();
@@ -1899,7 +1897,7 @@ public class TextRenderer {
gl.glVertex3f(mVertCoords.get(), mVertCoords.get(),
mVertCoords.get());
}
- } catch (Exception e) {
+ } catch (final Exception e) {
e.printStackTrace();
} finally {
gl.glEnd();
@@ -1915,21 +1913,21 @@ public class TextRenderer {
private GLU glu;
private Frame frame;
- DebugListener(GL gl, Frame frame) {
+ DebugListener(final GL gl, final Frame frame) {
this.glu = GLU.createGLU(gl);
this.frame = frame;
}
@Override
- public void display(GLAutoDrawable drawable) {
- GL2 gl = GLContext.getCurrentGL().getGL2();
- gl.glClear(GL2.GL_DEPTH_BUFFER_BIT | GL2.GL_COLOR_BUFFER_BIT);
+ public void display(final GLAutoDrawable drawable) {
+ final GL2 gl = GLContext.getCurrentGL().getGL2();
+ gl.glClear(GL.GL_DEPTH_BUFFER_BIT | GL.GL_COLOR_BUFFER_BIT);
if (packer == null) {
return;
}
- TextureRenderer rend = getBackingStore();
+ final TextureRenderer rend = getBackingStore();
final int w = rend.getWidth();
final int h = rend.getHeight();
rend.beginOrthoRendering(w, h);
@@ -1947,23 +1945,23 @@ public class TextRenderer {
}
@Override
- public void dispose(GLAutoDrawable drawable) {
+ public void dispose(final GLAutoDrawable drawable) {
glu=null;
frame=null;
}
// Unused methods
@Override
- public void init(GLAutoDrawable drawable) {
+ public void init(final GLAutoDrawable drawable) {
}
@Override
- public void reshape(GLAutoDrawable drawable, int x, int y, int width,
- int height) {
+ public void reshape(final GLAutoDrawable drawable, final int x, final int y, final int width,
+ final int height) {
}
- public void displayChanged(GLAutoDrawable drawable,
- boolean modeChanged, boolean deviceChanged) {
+ public void displayChanged(final GLAutoDrawable drawable,
+ final boolean modeChanged, final boolean deviceChanged) {
}
}
@@ -1974,7 +1972,7 @@ public class TextRenderer {
* certain graphics cards which have poor vertex array
* performance. Defaults to true.
*/
- public void setUseVertexArrays(boolean useVertexArrays) {
+ public void setUseVertexArrays(final boolean useVertexArrays) {
this.useVertexArrays = useVertexArrays;
}
@@ -1993,7 +1991,7 @@ public class TextRenderer {
* graphics cards do not behave well when this is enabled,
* resulting in fuzzy text. Defaults to true.
*/
- public void setSmoothing(boolean smoothing) {
+ public void setSmoothing(final boolean smoothing) {
this.smoothing = smoothing;
getBackingStore().setSmoothing(smoothing);
}
@@ -2008,7 +2006,7 @@ public class TextRenderer {
return smoothing;
}
- private final boolean is15Available(GL gl) {
+ private final boolean is15Available(final GL gl) {
if (!checkFor_isExtensionAvailable_GL_VERSION_1_5) {
isExtensionAvailable_GL_VERSION_1_5 = gl.isExtensionAvailable(GLExtensions.VERSION_1_5);
checkFor_isExtensionAvailable_GL_VERSION_1_5 = true;
diff --git a/src/jogl/classes/com/jogamp/opengl/util/awt/TextureRenderer.java b/src/jogl/classes/com/jogamp/opengl/util/awt/TextureRenderer.java
index 26e1eb041..ef59f9fa0 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/awt/TextureRenderer.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/awt/TextureRenderer.java
@@ -48,7 +48,10 @@ import java.awt.Rectangle;
import java.awt.image.*;
import javax.media.opengl.*;
+import javax.media.opengl.fixedfunc.GLLightingFunc;
+import javax.media.opengl.fixedfunc.GLMatrixFunc;
import javax.media.opengl.glu.gl2.*;
+
import com.jogamp.opengl.util.texture.*;
import com.jogamp.opengl.util.texture.awt.*;
@@ -70,10 +73,10 @@ public class TextureRenderer {
// appropriate threads, which would be somewhat unfortunate.
// Whether we have an alpha channel in the (RGB/A) backing store
- private boolean alpha;
+ private final boolean alpha;
// Whether we're using only a GL_INTENSITY backing store
- private boolean intensity;
+ private final boolean intensity;
// Whether we're attempting to use automatic mipmap generation support
private boolean mipmap;
@@ -91,7 +94,7 @@ public class TextureRenderer {
private boolean mustReallocateTexture;
private Rectangle dirtyRegion;
- private GLUgl2 glu = new GLUgl2();
+ private final GLUgl2 glu = new GLUgl2();
// Current color
private float r = 1.0f;
@@ -108,7 +111,7 @@ public class TextureRenderer {
@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) {
+ public TextureRenderer(final int width, final int height, final boolean alpha) {
this(width, height, alpha, false);
}
@@ -123,13 +126,13 @@ public class TextureRenderer {
@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) {
+ public TextureRenderer(final int width, final int height, final boolean alpha, final 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) {
+ private TextureRenderer(final int width, final int height, final boolean alpha, final boolean intensity, final boolean mipmap) {
this.alpha = alpha;
this.intensity = intensity;
this.mipmap = mipmap;
@@ -140,7 +143,7 @@ public class TextureRenderer {
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) {
+ public static TextureRenderer createAlphaOnlyRenderer(final int width, final int height) {
return createAlphaOnlyRenderer(width, height, false);
}
@@ -150,7 +153,7 @@ public class TextureRenderer {
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) {
+ public static TextureRenderer createAlphaOnlyRenderer(final int width, final int height, final boolean mipmap) {
return new TextureRenderer(width, height, false, true, mipmap);
}
@@ -205,7 +208,7 @@ public class TextureRenderer {
@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 {
+ public void setSize(final int width, final int height) throws GLException {
init(width, height);
}
@@ -216,7 +219,7 @@ public class TextureRenderer {
@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 {
+ public void setSize(final Dimension d) throws GLException {
setSize(d.width, d.height);
}
@@ -228,7 +231,7 @@ public class TextureRenderer {
@param smoothing whether smoothing is enabled for the OpenGL texture
*/
- public void setSmoothing(boolean smoothing) {
+ public void setSmoothing(final boolean smoothing) {
this.smoothing = smoothing;
smoothingChanged = true;
}
@@ -275,8 +278,8 @@ public class TextureRenderer {
@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);
+ public void markDirty(final int x, final int y, final int width, final int height) {
+ final Rectangle curRegion = new Rectangle(x, y, width, height);
if (dirtyRegion == null) {
dirtyRegion = curRegion;
} else {
@@ -333,7 +336,7 @@ public class TextureRenderer {
@throws GLException If an OpenGL context is not current when this method is called
*/
- public void beginOrthoRendering(int width, int height) throws GLException {
+ public void beginOrthoRendering(final int width, final int height) throws GLException {
beginOrthoRendering(width, height, true);
}
@@ -355,7 +358,7 @@ public class TextureRenderer {
@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 {
+ public void beginOrthoRendering(final int width, final int height, final boolean disableDepthTest) throws GLException {
beginRendering(true, width, height, disableDepthTest);
}
@@ -399,8 +402,8 @@ public class TextureRenderer {
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();
+ public void setColor(final float r, final float g, final float b, final float a) throws GLException {
+ final GL2 gl = GLContext.getCurrentGL().getGL2();
this.r = r * a;
this.g = g * a;
this.b = b * a;
@@ -417,7 +420,7 @@ public class TextureRenderer {
@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 {
+ public void setColor(final Color color) throws GLException {
// Get color's RGBA components as floats in the range [0,1].
if (compArray == null) {
compArray = new float[4];
@@ -440,7 +443,7 @@ public class TextureRenderer {
@throws GLException If an OpenGL context is not current when this method is called
*/
- public void drawOrthoRect(int screenx, int screeny) throws GLException {
+ public void drawOrthoRect(final int screenx, final int screeny) throws GLException {
drawOrthoRect(screenx, screeny, 0, 0, getWidth(), getHeight());
}
@@ -462,9 +465,9 @@ public class TextureRenderer {
@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 {
+ public void drawOrthoRect(final int screenx, final int screeny,
+ final int texturex, final int texturey,
+ final int width, final int height) throws GLException {
draw3DRect(screenx, screeny, 0, texturex, texturey, width, height, 1);
}
@@ -493,16 +496,16 @@ public class TextureRenderer {
@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,
+ public void draw3DRect(final float x, final float y, final float z,
+ final int texturex, final int texturey,
+ final int width, final int height,
+ final float scaleFactor) throws GLException {
+ final GL2 gl = GLContext.getCurrentGL().getGL2();
+ final Texture texture = getTexture();
+ final TextureCoords coords = texture.getSubImageTexCoords(texturex, texturey,
texturex + width,
texturey + height);
- gl.glBegin(GL2.GL_QUADS);
+ gl.glBegin(GL2GL3.GL_QUADS);
gl.glTexCoord2f(coords.left(), coords.bottom());
gl.glVertex3f(x, y, z);
gl.glTexCoord2f(coords.right(), coords.bottom());
@@ -550,70 +553,70 @@ public class TextureRenderer {
// 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);
+ private void beginRendering(final boolean ortho, final int width, final int height, final boolean disableDepthTestForOrtho) {
+ final GL2 gl = GLContext.getCurrentGL().getGL2();
+ final int attribBits =
+ GL2.GL_ENABLE_BIT | GL2.GL_TEXTURE_BIT | GL.GL_COLOR_BUFFER_BIT |
+ (ortho ? (GL.GL_DEPTH_BUFFER_BIT | GL2.GL_TRANSFORM_BIT) : 0);
gl.glPushAttrib(attribBits);
- gl.glDisable(GL2.GL_LIGHTING);
+ gl.glDisable(GLLightingFunc.GL_LIGHTING);
if (ortho) {
if (disableDepthTestForOrtho) {
- gl.glDisable(GL2.GL_DEPTH_TEST);
+ gl.glDisable(GL.GL_DEPTH_TEST);
}
- gl.glDisable(GL2.GL_CULL_FACE);
- gl.glMatrixMode(GL2.GL_PROJECTION);
+ gl.glDisable(GL.GL_CULL_FACE);
+ gl.glMatrixMode(GLMatrixFunc.GL_PROJECTION);
gl.glPushMatrix();
gl.glLoadIdentity();
glu.gluOrtho2D(0, width, 0, height);
- gl.glMatrixMode(GL2.GL_MODELVIEW);
+ gl.glMatrixMode(GLMatrixFunc.GL_MODELVIEW);
gl.glPushMatrix();
gl.glLoadIdentity();
- gl.glMatrixMode(GL2.GL_TEXTURE);
+ gl.glMatrixMode(GL.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();
+ gl.glEnable(GL.GL_BLEND);
+ gl.glBlendFunc(GL.GL_ONE, GL.GL_ONE_MINUS_SRC_ALPHA);
+ final Texture texture = getTexture();
texture.enable(gl);
texture.bind(gl);
- gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL2.GL_MODULATE);
+ gl.glTexEnvi(GL2ES1.GL_TEXTURE_ENV, GL2ES1.GL_TEXTURE_ENV_MODE, GL2ES1.GL_MODULATE);
// Change polygon color to last saved
gl.glColor4f(r, g, b, a);
if (smoothingChanged) {
smoothingChanged = false;
if (smoothing) {
- texture.setTexParameteri(gl, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_LINEAR);
+ texture.setTexParameteri(gl, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR);
if (mipmap) {
- texture.setTexParameteri(gl, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_LINEAR_MIPMAP_LINEAR);
+ texture.setTexParameteri(gl, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR_MIPMAP_LINEAR);
} else {
- texture.setTexParameteri(gl, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_LINEAR);
+ texture.setTexParameteri(gl, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR);
}
} else {
- texture.setTexParameteri(gl, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_NEAREST);
- texture.setTexParameteri(gl, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_NEAREST);
+ texture.setTexParameteri(gl, GL.GL_TEXTURE_MIN_FILTER, GL.GL_NEAREST);
+ texture.setTexParameteri(gl, GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST);
}
}
}
- private void endRendering(boolean ortho) {
- GL2 gl = GLContext.getCurrentGL().getGL2();
- Texture texture = getTexture();
+ private void endRendering(final boolean ortho) {
+ final GL2 gl = GLContext.getCurrentGL().getGL2();
+ final Texture texture = getTexture();
texture.disable(gl);
if (ortho) {
- gl.glMatrixMode(GL2.GL_PROJECTION);
+ gl.glMatrixMode(GLMatrixFunc.GL_PROJECTION);
gl.glPopMatrix();
- gl.glMatrixMode(GL2.GL_MODELVIEW);
+ gl.glMatrixMode(GLMatrixFunc.GL_MODELVIEW);
gl.glPopMatrix();
- gl.glMatrixMode(GL2.GL_TEXTURE);
+ gl.glMatrixMode(GL.GL_TEXTURE);
gl.glPopMatrix();
}
gl.glPopAttrib();
}
- private void init(int width, int height) {
- GL2 gl = GLContext.getCurrentGL().getGL2();
+ private void init(final int width, final int height) {
+ final GL2 gl = GLContext.getCurrentGL().getGL2();
// Discard previous BufferedImage if any
if (image != null) {
image.flush();
@@ -621,8 +624,8 @@ public class TextureRenderer {
}
// Infer the internal format if not an intensity texture
- int internalFormat = (intensity ? GL2.GL_INTENSITY : 0);
- int imageType =
+ final int internalFormat = (intensity ? GL2.GL_INTENSITY : 0);
+ final int imageType =
(intensity ? BufferedImage.TYPE_BYTE_GRAY :
(alpha ? BufferedImage.TYPE_INT_ARGB_PRE : BufferedImage.TYPE_INT_RGB));
image = new BufferedImage(width, height, imageType);
@@ -650,9 +653,9 @@ public class TextureRenderer {
@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 {
+ private void sync(final int x, final int y, final int width, final int height) throws GLException {
// Force allocation if necessary
- boolean canSkipUpdate = ensureTexture();
+ final boolean canSkipUpdate = ensureTexture();
if (!canSkipUpdate) {
// Update specified region.
@@ -667,7 +670,7 @@ public class TextureRenderer {
// Returns true if the texture was newly allocated, false if not
private boolean ensureTexture() {
- GL gl = GLContext.getCurrentGL();
+ final GL gl = GLContext.getCurrentGL();
if (mustReallocateTexture) {
if (texture != null) {
texture.destroy(gl);
@@ -688,8 +691,8 @@ public class TextureRenderer {
if (!smoothing) {
// The TextureIO classes default to GL_LINEAR filtering
- texture.setTexParameteri(gl, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_NEAREST);
- texture.setTexParameteri(gl, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_NEAREST);
+ texture.setTexParameteri(gl, GL.GL_TEXTURE_MIN_FILTER, GL.GL_NEAREST);
+ texture.setTexParameteri(gl, GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST);
}
return true;
}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/gl2/BitmapCharRec.java b/src/jogl/classes/com/jogamp/opengl/util/gl2/BitmapCharRec.java
index e8df6aaec..1f055211d 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/gl2/BitmapCharRec.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/gl2/BitmapCharRec.java
@@ -53,12 +53,12 @@ class BitmapCharRec {
public float advance;
public byte[] bitmap;
- public BitmapCharRec(int width,
- int height,
- float xorig,
- float yorig,
- float advance,
- byte[] bitmap) {
+ public BitmapCharRec(final int width,
+ final int height,
+ final float xorig,
+ final float yorig,
+ final float advance,
+ final byte[] bitmap) {
this.width = width;
this.height = height;
this.xorig = xorig;
diff --git a/src/jogl/classes/com/jogamp/opengl/util/gl2/BitmapFontRec.java b/src/jogl/classes/com/jogamp/opengl/util/gl2/BitmapFontRec.java
index d4ee12b32..7b8418704 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/gl2/BitmapFontRec.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/gl2/BitmapFontRec.java
@@ -51,10 +51,10 @@ class BitmapFontRec {
public int first;
public BitmapCharRec[] ch;
- public BitmapFontRec(String name,
- int num_chars,
- int first,
- BitmapCharRec[] ch) {
+ public BitmapFontRec(final String name,
+ final int num_chars,
+ final int first,
+ final BitmapCharRec[] ch) {
this.name = name;
this.num_chars = num_chars;
this.first = first;
diff --git a/src/jogl/classes/com/jogamp/opengl/util/gl2/CoordRec.java b/src/jogl/classes/com/jogamp/opengl/util/gl2/CoordRec.java
index 5e26e0d14..d79f16638 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/gl2/CoordRec.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/gl2/CoordRec.java
@@ -49,7 +49,7 @@ class CoordRec {
public float x;
public float y;
- public CoordRec(float x, float y) {
+ public CoordRec(final float x, final 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
index 42529f3f1..92cbd66da 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUT.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUT.java
@@ -40,6 +40,7 @@
package com.jogamp.opengl.util.gl2;
import javax.media.opengl.*;
+import javax.media.opengl.fixedfunc.GLLightingFunc;
import javax.media.opengl.glu.*;
import javax.media.opengl.glu.gl2.*;
@@ -103,13 +104,13 @@ public class GLUT {
public static final int BITMAP_HELVETICA_12 = 7;
public static final int BITMAP_HELVETICA_18 = 8;
- private GLUgl2 glu = new GLUgl2();
+ private final GLUgl2 glu = new GLUgl2();
//----------------------------------------------------------------------
// Shapes
//
- public void glutWireSphere(double radius, int slices, int stacks) {
+ public void glutWireSphere(final double radius, final int slices, final int stacks) {
quadObjInit(glu);
glu.gluQuadricDrawStyle(quadObj, GLU.GLU_LINE);
glu.gluQuadricNormals(quadObj, GLU.GLU_SMOOTH);
@@ -119,7 +120,7 @@ public class GLUT {
glu.gluSphere(quadObj, radius, slices, stacks);
}
- public void glutSolidSphere(double radius, int slices, int stacks) {
+ public void glutSolidSphere(final double radius, final int slices, final int stacks) {
quadObjInit(glu);
glu.gluQuadricDrawStyle(quadObj, GLU.GLU_FILL);
glu.gluQuadricNormals(quadObj, GLU.GLU_SMOOTH);
@@ -129,8 +130,8 @@ public class GLUT {
glu.gluSphere(quadObj, radius, slices, stacks);
}
- public void glutWireCone(double base, double height,
- int slices, int stacks) {
+ public void glutWireCone(final double base, final double height,
+ final int slices, final int stacks) {
quadObjInit(glu);
glu.gluQuadricDrawStyle(quadObj, GLU.GLU_LINE);
glu.gluQuadricNormals(quadObj, GLU.GLU_SMOOTH);
@@ -140,8 +141,8 @@ public class GLUT {
glu.gluCylinder(quadObj, base, 0.0, height, slices, stacks);
}
- public void glutSolidCone(double base, double height,
- int slices, int stacks) {
+ public void glutSolidCone(final double base, final double height,
+ final int slices, final int stacks) {
quadObjInit(glu);
glu.gluQuadricDrawStyle(quadObj, GLU.GLU_FILL);
glu.gluQuadricNormals(quadObj, GLU.GLU_SMOOTH);
@@ -151,7 +152,7 @@ public class GLUT {
glu.gluCylinder(quadObj, base, 0.0, height, slices, stacks);
}
- public void glutWireCylinder(double radius, double height, int slices, int stacks) {
+ public void glutWireCylinder(final double radius, final double height, final int slices, final int stacks) {
quadObjInit(glu);
glu.gluQuadricDrawStyle(quadObj, GLU.GLU_LINE);
glu.gluQuadricNormals(quadObj, GLU.GLU_SMOOTH);
@@ -161,13 +162,13 @@ public class GLUT {
glu.gluCylinder(quadObj, radius, radius, height, slices, stacks);
}
- public void glutSolidCylinder(double radius, double height, int slices, int stacks) {
- GL2 gl = GLUgl2.getCurrentGL2();
+ public void glutSolidCylinder(final double radius, final double height, final int slices, final int stacks) {
+ final 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;
+ final double [] x = new double[slices];
+ final double [] y = new double[slices];
+ final double angleDelta = Math.PI * 2 / slices;
double angle = 0;
for (int i = 0 ; i < slices ; i ++) {
angle = i * angleDelta;
@@ -176,7 +177,7 @@ public class GLUT {
}
// Draw bottom cap
- gl.glBegin(GL2.GL_TRIANGLE_FAN);
+ gl.glBegin(GL.GL_TRIANGLE_FAN);
gl.glNormal3d(0,0,-1);
gl.glVertex3d(0,0,0);
for (int i = 0 ; i < slices ; i ++) {
@@ -186,7 +187,7 @@ public class GLUT {
gl.glEnd();
// Draw top cap
- gl.glBegin(GL2.GL_TRIANGLE_FAN);
+ gl.glBegin(GL.GL_TRIANGLE_FAN);
gl.glNormal3d(0,0,1);
gl.glVertex3d(0,0,height);
for (int i = 0 ; i < slices ; i ++) {
@@ -205,58 +206,58 @@ public class GLUT {
glu.gluCylinder(quadObj, radius, radius, height, slices, stacks);
}
- public void glutWireCube(float size) {
- drawBox(GLUgl2.getCurrentGL2(), size, GL2.GL_LINE_LOOP);
+ public void glutWireCube(final float size) {
+ drawBox(GLUgl2.getCurrentGL2(), size, GL.GL_LINE_LOOP);
}
- public void glutSolidCube(float size) {
- drawBox(GLUgl2.getCurrentGL2(), size, GL2.GL_QUADS);
+ public void glutSolidCube(final float size) {
+ drawBox(GLUgl2.getCurrentGL2(), size, GL2GL3.GL_QUADS);
}
- public void glutWireTorus(double innerRadius, double outerRadius,
- int nsides, int rings) {
- GL2 gl = GLUgl2.getCurrentGL2();
+ public void glutWireTorus(final double innerRadius, final double outerRadius,
+ final int nsides, final int rings) {
+ final GL2 gl = GLUgl2.getCurrentGL2();
gl.glPushAttrib(GL2.GL_POLYGON_BIT);
- gl.glPolygonMode(GL2.GL_FRONT_AND_BACK, GL2.GL_LINE);
+ gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL2GL3.GL_LINE);
doughnut(gl, innerRadius, outerRadius, nsides, rings);
gl.glPopAttrib();
}
- public void glutSolidTorus(double innerRadius, double outerRadius,
- int nsides, int rings) {
+ public void glutSolidTorus(final double innerRadius, final double outerRadius,
+ final int nsides, final int rings) {
doughnut(GLUgl2.getCurrentGL2(), innerRadius, outerRadius, nsides, rings);
}
public void glutWireDodecahedron() {
- dodecahedron(GLUgl2.getCurrentGL2(), GL2.GL_LINE_LOOP);
+ dodecahedron(GLUgl2.getCurrentGL2(), GL.GL_LINE_LOOP);
}
public void glutSolidDodecahedron() {
- dodecahedron(GLUgl2.getCurrentGL2(), GL2.GL_TRIANGLE_FAN);
+ dodecahedron(GLUgl2.getCurrentGL2(), GL.GL_TRIANGLE_FAN);
}
public void glutWireOctahedron() {
- octahedron(GLUgl2.getCurrentGL2(), GL2.GL_LINE_LOOP);
+ octahedron(GLUgl2.getCurrentGL2(), GL.GL_LINE_LOOP);
}
public void glutSolidOctahedron() {
- octahedron(GLUgl2.getCurrentGL2(), GL2.GL_TRIANGLES);
+ octahedron(GLUgl2.getCurrentGL2(), GL.GL_TRIANGLES);
}
public void glutWireIcosahedron() {
- icosahedron(GLUgl2.getCurrentGL2(), GL2.GL_LINE_LOOP);
+ icosahedron(GLUgl2.getCurrentGL2(), GL.GL_LINE_LOOP);
}
public void glutSolidIcosahedron() {
- icosahedron(GLUgl2.getCurrentGL2(), GL2.GL_TRIANGLES);
+ icosahedron(GLUgl2.getCurrentGL2(), GL.GL_TRIANGLES);
}
public void glutWireTetrahedron() {
- tetrahedron(GLUgl2.getCurrentGL2(), GL2.GL_LINE_LOOP);
+ tetrahedron(GLUgl2.getCurrentGL2(), GL.GL_LINE_LOOP);
}
public void glutSolidTetrahedron() {
- tetrahedron(GLUgl2.getCurrentGL2(), GL2.GL_TRIANGLES);
+ tetrahedron(GLUgl2.getCurrentGL2(), GL.GL_TRIANGLES);
}
/**
@@ -266,7 +267,7 @@ public class GLUT {
* @param scale
* the factor by which to scale the teapot
*/
- public void glutSolidTeapot(double scale) {
+ public void glutSolidTeapot(final double scale) {
glutSolidTeapot(scale, true);
}
@@ -285,8 +286,8 @@ public class GLUT {
* 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);
+ public void glutSolidTeapot(final double scale, final boolean cStyle) {
+ teapot(GLUgl2.getCurrentGL2(), 14, scale, GL2GL3.GL_FILL, cStyle);
}
/**
@@ -296,7 +297,7 @@ public class GLUT {
* @param scale
* the factor by which to scale the teapot
*/
- public void glutWireTeapot(double scale) {
+ public void glutWireTeapot(final double scale) {
glutWireTeapot(scale, true);
}
@@ -315,22 +316,22 @@ public class GLUT {
* 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);
+ public void glutWireTeapot(final double scale, final boolean cStyle) {
+ teapot(GLUgl2.getCurrentGL2(), 10, scale, GL2GL3.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];
+ public void glutBitmapCharacter(final int font, final char character) {
+ final GL2 gl = GLUgl2.getCurrentGL2();
+ final int[] swapbytes = new int[1];
+ final int[] lsbfirst = new int[1];
+ final int[] rowlength = new int[1];
+ final int[] skiprows = new int[1];
+ final int[] skippixels = new int[1];
+ final int[] alignment = new int[1];
beginBitmap(gl,
swapbytes,
lsbfirst,
@@ -348,14 +349,14 @@ public class GLUT {
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];
+ public void glutBitmapString (final int font, final String string) {
+ final GL2 gl = GLUgl2.getCurrentGL2();
+ final int[] swapbytes = new int[1];
+ final int[] lsbfirst = new int[1];
+ final int[] rowlength = new int[1];
+ final int[] skiprows = new int[1];
+ final int[] skippixels = new int[1];
+ final int[] alignment = new int[1];
beginBitmap(gl,
swapbytes,
lsbfirst,
@@ -363,7 +364,7 @@ public class GLUT {
skiprows,
skippixels,
alignment);
- int len = string.length();
+ final int len = string.length();
for (int i = 0; i < len; i++) {
bitmapCharacterImpl(gl, font, string.charAt(i));
}
@@ -376,31 +377,31 @@ public class GLUT {
alignment);
}
- public int glutBitmapWidth (int font, char character) {
- BitmapFontRec fontinfo = getBitmapFont(font);
- int c = character & 0xFFFF;
+ public int glutBitmapWidth (final int font, final char character) {
+ final BitmapFontRec fontinfo = getBitmapFont(font);
+ final int c = character & 0xFFFF;
if (c < fontinfo.first || c >= fontinfo.first + fontinfo.num_chars)
return 0;
- BitmapCharRec ch = fontinfo.ch[c - fontinfo.first];
+ final 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;
+ public void glutStrokeCharacter(final int font, final char character) {
+ final GL2 gl = GLUgl2.getCurrentGL2();
+ final StrokeFontRec fontinfo = getStrokeFont(font);
+ final int c = character & 0xFFFF;
if (c < 0 || c >= fontinfo.num_chars)
return;
- StrokeCharRec ch = fontinfo.ch[c];
+ final 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);
+ final StrokeRec stroke = ch.stroke[i];
+ gl.glBegin(GL.GL_LINE_STRIP);
for (int j = 0; j < stroke.num_coords; j++) {
- CoordRec coord = stroke.coord[j];
+ final CoordRec coord = stroke.coord[j];
gl.glVertex2f(coord.x, coord.y);
}
gl.glEnd();
@@ -409,21 +410,21 @@ public class GLUT {
}
}
- public void glutStrokeString(int font, String string) {
- GL2 gl = GLUgl2.getCurrentGL2();
- StrokeFontRec fontinfo = getStrokeFont(font);
- int len = string.length();
+ public void glutStrokeString(final int font, final String string) {
+ final GL2 gl = GLUgl2.getCurrentGL2();
+ final StrokeFontRec fontinfo = getStrokeFont(font);
+ final int len = string.length();
for (int pos = 0; pos < len; pos++) {
- int c = string.charAt(pos) & 0xFFFF;
+ final int c = string.charAt(pos) & 0xFFFF;
if (c < 0 || c >= fontinfo.num_chars)
continue;
- StrokeCharRec ch = fontinfo.ch[c];
+ final 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);
+ final StrokeRec stroke = ch.stroke[i];
+ gl.glBegin(GL.GL_LINE_STRIP);
for (int j = 0; j < stroke.num_coords; j++) {
- CoordRec coord = stroke.coord[j];
+ final CoordRec coord = stroke.coord[j];
gl.glVertex2f(coord.x, coord.y);
}
gl.glEnd();
@@ -433,30 +434,30 @@ public class GLUT {
}
}
- public int glutStrokeWidth (int font, char character) {
+ public int glutStrokeWidth (final int font, final char character) {
return (int) glutStrokeWidthf(font, character);
}
- public float glutStrokeWidthf (int font, char character) {
- StrokeFontRec fontinfo = getStrokeFont(font);
- int c = character & 0xFFFF;
+ public float glutStrokeWidthf (final int font, final char character) {
+ final StrokeFontRec fontinfo = getStrokeFont(font);
+ final int c = character & 0xFFFF;
if (c < 0 || c >= fontinfo.num_chars)
return 0;
- StrokeCharRec ch = fontinfo.ch[c];
+ final 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);
+ public int glutBitmapLength (final int font, final String string) {
+ final BitmapFontRec fontinfo = getBitmapFont(font);
int length = 0;
- int len = string.length();
+ final int len = string.length();
for (int pos = 0; pos < len; pos++) {
- int c = string.charAt(pos) & 0xFFFF;
+ final int c = string.charAt(pos) & 0xFFFF;
if (c >= fontinfo.first && c < fontinfo.first + fontinfo.num_chars) {
- BitmapCharRec ch = fontinfo.ch[c - fontinfo.first];
+ final BitmapCharRec ch = fontinfo.ch[c - fontinfo.first];
if (ch != null)
length += ch.advance;
}
@@ -464,18 +465,18 @@ public class GLUT {
return length;
}
- public int glutStrokeLength (int font, String string) {
+ public int glutStrokeLength (final int font, final String string) {
return (int) glutStrokeLengthf(font, string);
}
- public float glutStrokeLengthf (int font, String string) {
- StrokeFontRec fontinfo = getStrokeFont(font);
+ public float glutStrokeLengthf (final int font, final String string) {
+ final StrokeFontRec fontinfo = getStrokeFont(font);
float length = 0;
- int len = string.length();
+ final int len = string.length();
for (int i = 0; i < len; i++) {
- char c = string.charAt(i);
+ final char c = string.charAt(i);
if (c >= 0 && c < fontinfo.num_chars) {
- StrokeCharRec ch = fontinfo.ch[c];
+ final StrokeCharRec ch = fontinfo.ch[c];
if (ch != null)
length += ch.right;
}
@@ -491,9 +492,9 @@ public class GLUT {
The polyhedron is centered at the origin.
*/
public void glutWireRhombicDodecahedron() {
- GL2 gl = GLUgl2.getCurrentGL2();
+ final GL2 gl = GLUgl2.getCurrentGL2();
for( int i = 0; i < 12; i++ ) {
- gl.glBegin( GL2.GL_LINE_LOOP );
+ gl.glBegin( GL.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 );
@@ -511,8 +512,8 @@ public class GLUT {
The polyhedron is centered at the origin.
*/
public void glutSolidRhombicDodecahedron() {
- GL2 gl = GLUgl2.getCurrentGL2();
- gl.glBegin( GL2.GL_QUADS );
+ final GL2 gl = GLUgl2.getCurrentGL2();
+ gl.glBegin( GL2GL3.GL_QUADS );
for( int i = 0; i < 12; i++ ) {
gl.glNormal3dv( rdod_n[ i ],0 );
gl.glVertex3dv( rdod_r[ rdod_v[ i ][ 0 ] ],0 );
@@ -532,7 +533,7 @@ public class GLUT {
//
private GLUquadric quadObj;
- private void quadObjInit(GLUgl2 glu) {
+ private void quadObjInit(final GLUgl2 glu) {
if (quadObj == null) {
quadObj = glu.gluNewQuadric();
}
@@ -541,7 +542,7 @@ public class GLUT {
}
}
- private static void doughnut(GL2 gl, double r, double R, int nsides, int rings) {
+ private static void doughnut(final GL2 gl, final double r, final double R, final int nsides, final int rings) {
int i, j;
float theta, phi, theta1;
float cosTheta, sinTheta;
@@ -597,9 +598,9 @@ public class GLUT {
{5, 6, 2, 1},
{7, 4, 0, 3}
};
- private void drawBox(GL2 gl, float size, int type) {
+ private void drawBox(final GL2 gl, final float size, final int type) {
if (boxVertices == null) {
- float[][] v = new float[8][];
+ final float[][] v = new float[8][];
for (int i = 0; i < 8; i++) {
v[i] = new float[3];
}
@@ -611,9 +612,9 @@ public class GLUT {
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;
+ final float[][] v = boxVertices;
+ final float[][] n = boxNormals;
+ final int[][] faces = boxFaces;
for (int i = 5; i >= 0; i--) {
gl.glBegin(type);
gl.glNormal3fv(n[i], 0);
@@ -664,14 +665,14 @@ public class GLUT {
dodec[19][0] = 0; dodec[19][1] = -beta; dodec[19][2] = -alpha;
}
- private static void diff3(float[] a, float[] b, float[] c) {
+ private static void diff3(final float[] a, final float[] b, final 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 */
+ private static void crossprod(final float[] v1, final float[] v2, final float[] prod) {
+ final 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];
@@ -681,7 +682,7 @@ public class GLUT {
prod[2] = p[2];
}
- private static void normalize(float[] v) {
+ private static void normalize(final float[] v) {
float d;
d = (float) Math.sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
@@ -694,10 +695,10 @@ public class GLUT {
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];
+ private void pentagon(final GL2 gl, final int a, final int b, final int c, final int d, final int e, final int shadeType) {
+ final float[] n0 = new float[3];
+ final float[] d1 = new float[3];
+ final float[] d2 = new float[3];
diff3(dodec[a], dodec[b], d1);
diff3(dodec[b], dodec[c], d2);
@@ -714,7 +715,7 @@ public class GLUT {
gl.glEnd();
}
- private void dodecahedron(GL2 gl, int type) {
+ private void dodecahedron(final GL2 gl, final int type) {
if (dodec == null) {
initDodecahedron();
}
@@ -732,9 +733,9 @@ public class GLUT {
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];
+ private static void recorditem(final GL2 gl, final float[] n1, final float[] n2, final float[] n3, final int shadeType) {
+ final float[] q0 = new float[3];
+ final float[] q1 = new float[3];
diff3(n1, n2, q0);
diff3(n2, n3, q1);
@@ -749,11 +750,11 @@ public class GLUT {
gl.glEnd();
}
- private static void subdivide(GL2 gl, float[] v0, float[] v1, float[] v2, int shadeType) {
+ private static void subdivide(final GL2 gl, final float[] v0, final float[] v1, final float[] v2, final int shadeType) {
int depth;
- float[] w0 = new float[3];
- float[] w1 = new float[3];
- float[] w2 = new float[3];
+ final float[] w0 = new float[3];
+ final float[] w1 = new float[3];
+ final float[] w2 = new float[3];
float l;
int i, j, k, n;
@@ -785,10 +786,10 @@ public class GLUT {
}
}
- 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]];
+ private static void drawtriangle(final GL2 gl, final int i, final float[][] data, final int[][] ndx, final int shadeType) {
+ final float[] x0 = data[ndx[i][0]];
+ final float[] x1 = data[ndx[i][1]];
+ final float[] x2 = data[ndx[i][2]];
subdivide(gl, x0, x1, x2, shadeType);
}
@@ -816,7 +817,7 @@ public class GLUT {
{1, 3, 5}
};
- private static void octahedron(GL2 gl, int shadeType) {
+ private static void octahedron(final GL2 gl, final int shadeType) {
int i;
for (i = 7; i >= 0; i--) {
@@ -870,7 +871,7 @@ public class GLUT {
{7, 2, 11},
};
- private static void icosahedron(GL2 gl, int shadeType) {
+ private static void icosahedron(final GL2 gl, final int shadeType) {
int i;
for (i = 19; i >= 0; i--) {
@@ -950,7 +951,7 @@ public class GLUT {
{1, 2, 3}
};
- private static final void tetrahedron(GL2 gl, int shadeType) {
+ private static final void tetrahedron(final GL2 gl, final int shadeType) {
for (int i = 3; i >= 0; i--)
drawtriangle(gl, i, tdata, tndex, shadeType);
}
@@ -1112,28 +1113,28 @@ public class GLUT {
0, 0, 1, 0, 0, 1, 1, 1
};
- private static void teapot(GL2 gl,
- int grid,
- double scale,
- int type,
- boolean backCompatible)
+ private static void teapot(final GL2 gl,
+ final int grid,
+ final double scale,
+ final int type,
+ final 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];
+ final float[] p = new float[4*4*3];
+ final float[] q = new float[4*4*3];
+ final float[] r = new float[4*4*3];
+ final 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(GLLightingFunc.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.glFrontFace(GL.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
@@ -1184,29 +1185,29 @@ public class GLUT {
gl.glPopAttrib();
}
- private static void evaluateTeapotMesh(GL2 gl,
- int grid,
- int type,
- int partNum,
- boolean repairSingularities)
+ private static void evaluateTeapotMesh(final GL2 gl,
+ final int grid,
+ final int type,
+ final int partNum,
+ final 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);
+ gl.glPolygonMode(GL.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.glBegin(GL.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.glEvalCoord2f(nu / (float)grid, (1f / grid) / grid);
}
}
gl.glEnd();
@@ -1219,7 +1220,7 @@ public class GLUT {
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);
+ / grid);
}
}
gl.glEnd();
@@ -1233,13 +1234,13 @@ public class GLUT {
// Font implementation
//
- private static void bitmapCharacterImpl(GL2 gl, int font, char cin) {
- BitmapFontRec fontinfo = getBitmapFont(font);
- int c = cin & 0xFFFF;
+ private static void bitmapCharacterImpl(final GL2 gl, final int font, final char cin) {
+ final BitmapFontRec fontinfo = getBitmapFont(font);
+ final int c = cin & 0xFFFF;
if (c < fontinfo.first ||
c >= fontinfo.first + fontinfo.num_chars)
return;
- BitmapCharRec ch = fontinfo.ch[c - fontinfo.first];
+ final 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);
@@ -1249,7 +1250,7 @@ public class GLUT {
private static final BitmapFontRec[] bitmapFonts = new BitmapFontRec[9];
private static final StrokeFontRec[] strokeFonts = new StrokeFontRec[9];
- private static BitmapFontRec getBitmapFont(int font) {
+ private static BitmapFontRec getBitmapFont(final int font) {
BitmapFontRec rec = bitmapFonts[font];
if (rec == null) {
switch (font) {
@@ -1282,7 +1283,7 @@ public class GLUT {
return rec;
}
- private static StrokeFontRec getStrokeFont(int font) {
+ private static StrokeFontRec getStrokeFont(final int font) {
StrokeFontRec rec = strokeFonts[font];
if (rec == null) {
switch (font) {
@@ -1299,44 +1300,44 @@ public class GLUT {
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);
+ private static void beginBitmap(final GL2 gl,
+ final int[] swapbytes,
+ final int[] lsbfirst,
+ final int[] rowlength,
+ final int[] skiprows,
+ final int[] skippixels,
+ final int[] alignment) {
+ gl.glGetIntegerv(GL2GL3.GL_UNPACK_SWAP_BYTES, swapbytes, 0);
+ gl.glGetIntegerv(GL2GL3.GL_UNPACK_LSB_FIRST, lsbfirst, 0);
+ gl.glGetIntegerv(GL2ES2.GL_UNPACK_ROW_LENGTH, rowlength, 0);
+ gl.glGetIntegerv(GL2ES2.GL_UNPACK_SKIP_ROWS, skiprows, 0);
+ gl.glGetIntegerv(GL2ES2.GL_UNPACK_SKIP_PIXELS, skippixels, 0);
+ gl.glGetIntegerv(GL.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);
+ gl.glPixelStorei(GL2GL3.GL_UNPACK_SWAP_BYTES, GL.GL_FALSE);
+ gl.glPixelStorei(GL2GL3.GL_UNPACK_LSB_FIRST, GL.GL_FALSE);
+ gl.glPixelStorei(GL2ES2.GL_UNPACK_ROW_LENGTH, 0);
+ gl.glPixelStorei(GL2ES2.GL_UNPACK_SKIP_ROWS, 0);
+ gl.glPixelStorei(GL2ES2.GL_UNPACK_SKIP_PIXELS, 0);
+ gl.glPixelStorei(GL.GL_UNPACK_ALIGNMENT, 1);
}
- private static void endBitmap(GL2 gl,
- int[] swapbytes,
- int[] lsbfirst,
- int[] rowlength,
- int[] skiprows,
- int[] skippixels,
- int[] alignment) {
+ private static void endBitmap(final GL2 gl,
+ final int[] swapbytes,
+ final int[] lsbfirst,
+ final int[] rowlength,
+ final int[] skiprows,
+ final int[] skippixels,
+ final 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]);
+ gl.glPixelStorei(GL2GL3.GL_UNPACK_SWAP_BYTES, swapbytes[0]);
+ gl.glPixelStorei(GL2GL3.GL_UNPACK_LSB_FIRST, lsbfirst[0]);
+ gl.glPixelStorei(GL2ES2.GL_UNPACK_ROW_LENGTH, rowlength[0]);
+ gl.glPixelStorei(GL2ES2.GL_UNPACK_SKIP_ROWS, skiprows[0]);
+ gl.glPixelStorei(GL2ES2.GL_UNPACK_SKIP_PIXELS, skippixels[0]);
+ gl.glPixelStorei(GL.GL_UNPACK_ALIGNMENT, alignment[0]);
}
}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTStrokeMonoRoman.java b/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTStrokeMonoRoman.java
index 3587ca992..a191efdb4 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTStrokeMonoRoman.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTStrokeMonoRoman.java
@@ -46,14 +46,14 @@ class GLUTStrokeMonoRoman {
/* char: 33 '!' */
static final CoordRec char33_stroke0[] = {
- new CoordRec((float) 52.381, (float) 100 ),
+ new CoordRec((float) 52.381, 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) 52.381, 0 ),
new CoordRec((float) 57.1429, (float) 4.7619 ),
new CoordRec((float) 52.381, (float) 9.5238 ),
};
@@ -66,12 +66,12 @@ static final StrokeRec char33[] = {
/* char: 34 '"' */
static final CoordRec char34_stroke0[] = {
- new CoordRec((float) 33.3334, (float) 100 ),
+ new CoordRec((float) 33.3334, 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, 100 ),
new CoordRec((float) 71.4286, (float) 66.6667 ),
};
@@ -89,7 +89,7 @@ static final CoordRec char35_stroke0[] = {
static final CoordRec char35_stroke1[] = {
new CoordRec((float) 83.3334, (float) 119.048 ),
- new CoordRec((float) 50, (float) -33.3333 ),
+ new CoordRec(50, (float) -33.3333 ),
};
static final CoordRec char35_stroke2[] = {
@@ -124,8 +124,8 @@ static final CoordRec char36_stroke1[] = {
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) 61.9047, 100 ),
+ new CoordRec((float) 42.8571, 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 ),
@@ -138,8 +138,8 @@ static final CoordRec char36_stroke2[] = {
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) 61.9047, 0 ),
+ new CoordRec((float) 42.8571, 0 ),
new CoordRec((float) 28.5714, (float) 4.7619 ),
new CoordRec((float) 19.0476, (float) 14.2857 ),
};
@@ -153,12 +153,12 @@ static final StrokeRec char36[] = {
/* char: 37 '%' */
static final CoordRec char37_stroke0[] = {
- new CoordRec((float) 95.2381, (float) 100 ),
- new CoordRec((float) 9.5238, (float) 0 ),
+ new CoordRec((float) 95.2381, 100 ),
+ new CoordRec((float) 9.5238, 0 ),
};
static final CoordRec char37_stroke1[] = {
- new CoordRec((float) 33.3333, (float) 100 ),
+ new CoordRec((float) 33.3333, 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 ),
@@ -167,13 +167,13 @@ static final CoordRec char37_stroke1[] = {
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) 23.8095, 100 ),
+ new CoordRec((float) 33.3333, 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 ),
+ new CoordRec((float) 95.2381, 100 ),
};
static final CoordRec char37_stroke2[] = {
@@ -181,8 +181,8 @@ static final CoordRec char37_stroke2[] = {
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) 71.4286, 0 ),
+ new CoordRec((float) 80.9524, 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 ),
@@ -199,8 +199,8 @@ static final StrokeRec char37[] = {
/* char: 38 '&' */
static final CoordRec char38_stroke0[] = {
- new CoordRec((float) 100, (float) 57.1429 ),
- new CoordRec((float) 100, (float) 61.9048 ),
+ new CoordRec(100, (float) 57.1429 ),
+ new CoordRec(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 ),
@@ -208,8 +208,8 @@ static final CoordRec char38_stroke0[] = {
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) 42.8571, 0 ),
+ new CoordRec((float) 23.8095, 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 ),
@@ -221,7 +221,7 @@ static final CoordRec char38_stroke0[] = {
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) 42.8571, 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 ),
@@ -229,10 +229,10 @@ static final CoordRec char38_stroke0[] = {
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 ),
+ new CoordRec((float) 85.7143, 0 ),
+ new CoordRec((float) 95.2381, 0 ),
+ new CoordRec(100, (float) 4.7619 ),
+ new CoordRec(100, (float) 9.5238 ),
};
static final StrokeRec char38[] = {
@@ -242,7 +242,7 @@ static final StrokeRec char38[] = {
/* char: 39 ''' */
static final CoordRec char39_stroke0[] = {
- new CoordRec((float) 52.381, (float) 100 ),
+ new CoordRec((float) 52.381, 100 ),
new CoordRec((float) 52.381, (float) 66.6667 ),
};
@@ -255,12 +255,12 @@ static final StrokeRec char39[] = {
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(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(50, (float) -9.5238 ),
new CoordRec((float) 59.5238, (float) -23.8095 ),
new CoordRec((float) 69.0476, (float) -33.3333 ),
};
@@ -315,7 +315,7 @@ static final StrokeRec char42[] = {
static final CoordRec char43_stroke0[] = {
new CoordRec((float) 52.3809, (float) 85.7143 ),
- new CoordRec((float) 52.3809, (float) 0 ),
+ new CoordRec((float) 52.3809, 0 ),
};
static final CoordRec char43_stroke1[] = {
@@ -332,7 +332,7 @@ static final StrokeRec char43[] = {
static final CoordRec char44_stroke0[] = {
new CoordRec((float) 57.1429, (float) 4.7619 ),
- new CoordRec((float) 52.381, (float) 0 ),
+ new CoordRec((float) 52.381, 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 ),
@@ -361,7 +361,7 @@ static final StrokeRec char45[] = {
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) 52.381, 0 ),
new CoordRec((float) 57.1429, (float) 4.7619 ),
new CoordRec((float) 52.381, (float) 9.5238 ),
};
@@ -374,7 +374,7 @@ static final StrokeRec char46[] = {
static final CoordRec char47_stroke0[] = {
new CoordRec((float) 19.0476, (float) -14.2857 ),
- new CoordRec((float) 85.7143, (float) 100 ),
+ new CoordRec((float) 85.7143, 100 ),
};
static final StrokeRec char47[] = {
@@ -384,23 +384,23 @@ static final StrokeRec char47[] = {
/* char: 48 '0' */
static final CoordRec char48_stroke0[] = {
- new CoordRec((float) 47.619, (float) 100 ),
+ new CoordRec((float) 47.619, 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) 47.619, 0 ),
+ new CoordRec((float) 57.1428, 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 ),
+ new CoordRec((float) 57.1428, 100 ),
+ new CoordRec((float) 47.619, 100 ),
};
static final StrokeRec char48[] = {
@@ -411,9 +411,9 @@ static final StrokeRec char48[] = {
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 ),
+ new CoordRec(50, (float) 85.7143 ),
+ new CoordRec((float) 64.2857, 100 ),
+ new CoordRec((float) 64.2857, 0 ),
};
static final StrokeRec char49[] = {
@@ -427,16 +427,16 @@ static final CoordRec char50_stroke0[] = {
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) 42.8571, 100 ),
+ new CoordRec((float) 61.9047, 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 ),
+ new CoordRec((float) 19.0476, 0 ),
+ new CoordRec((float) 85.7143, 0 ),
};
static final StrokeRec char50[] = {
@@ -446,8 +446,8 @@ static final StrokeRec char50[] = {
/* 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) 28.5714, 100 ),
+ new CoordRec((float) 80.9524, 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 ),
@@ -456,8 +456,8 @@ static final CoordRec char51_stroke0[] = {
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) 57.1428, 0 ),
+ new CoordRec((float) 42.8571, 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 ),
@@ -470,14 +470,14 @@ static final StrokeRec char51[] = {
/* char: 52 '4' */
static final CoordRec char52_stroke0[] = {
- new CoordRec((float) 64.2857, (float) 100 ),
+ new CoordRec((float) 64.2857, 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 ),
+ new CoordRec((float) 64.2857, 100 ),
+ new CoordRec((float) 64.2857, 0 ),
};
static final StrokeRec char52[] = {
@@ -488,8 +488,8 @@ static final StrokeRec char52[] = {
/* 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) 76.1905, 100 ),
+ new CoordRec((float) 28.5714, 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 ),
@@ -500,8 +500,8 @@ static final CoordRec char53_stroke0[] = {
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) 57.1428, 0 ),
+ new CoordRec((float) 42.8571, 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 ),
@@ -516,16 +516,16 @@ static final StrokeRec char53[] = {
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) 59.5238, 100 ),
+ new CoordRec(50, 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(50, 0 ),
+ new CoordRec((float) 54.7619, 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 ),
@@ -533,7 +533,7 @@ static final CoordRec char54_stroke0[] = {
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(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 ),
@@ -546,13 +546,13 @@ static final StrokeRec char54[] = {
/* char: 55 '7' */
static final CoordRec char55_stroke0[] = {
- new CoordRec((float) 85.7143, (float) 100 ),
- new CoordRec((float) 38.0952, (float) 0 ),
+ new CoordRec((float) 85.7143, 100 ),
+ new CoordRec((float) 38.0952, 0 ),
};
static final CoordRec char55_stroke1[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 85.7143, (float) 100 ),
+ new CoordRec((float) 19.0476, 100 ),
+ new CoordRec((float) 85.7143, 100 ),
};
static final StrokeRec char55[] = {
@@ -563,7 +563,7 @@ static final StrokeRec char55[] = {
/* char: 56 '8' */
static final CoordRec char56_stroke0[] = {
- new CoordRec((float) 42.8571, (float) 100 ),
+ new CoordRec((float) 42.8571, 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 ),
@@ -576,8 +576,8 @@ static final CoordRec char56_stroke0[] = {
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) 61.9047, 0 ),
+ new CoordRec((float) 42.8571, 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 ),
@@ -590,8 +590,8 @@ static final CoordRec char56_stroke0[] = {
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 ),
+ new CoordRec((float) 61.9047, 100 ),
+ new CoordRec((float) 42.8571, 100 ),
};
static final StrokeRec char56[] = {
@@ -605,23 +605,23 @@ static final CoordRec char57_stroke0[] = {
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(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(50, 100 ),
+ new CoordRec((float) 54.7619, 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) 54.7619, 0 ),
+ new CoordRec((float) 45.2381, 0 ),
new CoordRec((float) 30.9524, (float) 4.7619 ),
new CoordRec((float) 26.1905, (float) 14.2857 ),
};
@@ -643,7 +643,7 @@ static final CoordRec char58_stroke0[] = {
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) 52.381, 0 ),
new CoordRec((float) 57.1429, (float) 4.7619 ),
new CoordRec((float) 52.381, (float) 9.5238 ),
};
@@ -665,7 +665,7 @@ static final CoordRec char59_stroke0[] = {
static final CoordRec char59_stroke1[] = {
new CoordRec((float) 57.1429, (float) 4.7619 ),
- new CoordRec((float) 52.381, (float) 0 ),
+ new CoordRec((float) 52.381, 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 ),
@@ -684,7 +684,7 @@ static final StrokeRec char59[] = {
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 ),
+ new CoordRec((float) 90.4762, 0 ),
};
static final StrokeRec char60[] = {
@@ -713,7 +713,7 @@ static final StrokeRec char61[] = {
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 ),
+ new CoordRec((float) 14.2857, 0 ),
};
static final StrokeRec char62[] = {
@@ -727,8 +727,8 @@ static final CoordRec char63_stroke0[] = {
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) 42.8571, 100 ),
+ new CoordRec((float) 61.9047, 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 ),
@@ -742,7 +742,7 @@ static final CoordRec char63_stroke0[] = {
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) 52.3809, 0 ),
new CoordRec((float) 57.1428, (float) 4.7619 ),
new CoordRec((float) 52.3809, (float) 9.5238 ),
};
@@ -775,14 +775,14 @@ static final CoordRec char64_stroke1[] = {
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(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(50, (float) 14.2857 ),
new CoordRec((float) 54.7619, (float) 14.2857 ),
new CoordRec((float) 69.0476, (float) 19.0476 ),
};
@@ -795,13 +795,13 @@ static final StrokeRec char64[] = {
/* char: 65 'A' */
static final CoordRec char65_stroke0[] = {
- new CoordRec((float) 52.3809, (float) 100 ),
- new CoordRec((float) 14.2857, (float) 0 ),
+ new CoordRec((float) 52.3809, 100 ),
+ new CoordRec((float) 14.2857, 0 ),
};
static final CoordRec char65_stroke1[] = {
- new CoordRec((float) 52.3809, (float) 100 ),
- new CoordRec((float) 90.4762, (float) 0 ),
+ new CoordRec((float) 52.3809, 100 ),
+ new CoordRec((float) 90.4762, 0 ),
};
static final CoordRec char65_stroke2[] = {
@@ -818,13 +818,13 @@ static final StrokeRec char65[] = {
/* char: 66 'B' */
static final CoordRec char66_stroke0[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 19.0476, (float) 0 ),
+ new CoordRec((float) 19.0476, 100 ),
+ new CoordRec((float) 19.0476, 0 ),
};
static final CoordRec char66_stroke1[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 61.9047, (float) 100 ),
+ new CoordRec((float) 19.0476, 100 ),
+ new CoordRec((float) 61.9047, 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 ),
@@ -843,8 +843,8 @@ static final CoordRec char66_stroke2[] = {
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 ),
+ new CoordRec((float) 61.9047, 0 ),
+ new CoordRec((float) 19.0476, 0 ),
};
static final StrokeRec char66[] = {
@@ -859,8 +859,8 @@ 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) 64.2857, 100 ),
+ new CoordRec((float) 45.2381, 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 ),
@@ -869,8 +869,8 @@ static final CoordRec char67_stroke0[] = {
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) 45.2381, 0 ),
+ new CoordRec((float) 64.2857, 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 ),
@@ -883,13 +883,13 @@ static final StrokeRec char67[] = {
/* char: 68 'D' */
static final CoordRec char68_stroke0[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 19.0476, (float) 0 ),
+ new CoordRec((float) 19.0476, 100 ),
+ new CoordRec((float) 19.0476, 0 ),
};
static final CoordRec char68_stroke1[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 52.3809, (float) 100 ),
+ new CoordRec((float) 19.0476, 100 ),
+ new CoordRec((float) 52.3809, 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 ),
@@ -898,8 +898,8 @@ static final CoordRec char68_stroke1[] = {
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 ),
+ new CoordRec((float) 52.3809, 0 ),
+ new CoordRec((float) 19.0476, 0 ),
};
static final StrokeRec char68[] = {
@@ -910,13 +910,13 @@ static final StrokeRec char68[] = {
/* char: 69 'E' */
static final CoordRec char69_stroke0[] = {
- new CoordRec((float) 21.4286, (float) 100 ),
- new CoordRec((float) 21.4286, (float) 0 ),
+ new CoordRec((float) 21.4286, 100 ),
+ new CoordRec((float) 21.4286, 0 ),
};
static final CoordRec char69_stroke1[] = {
- new CoordRec((float) 21.4286, (float) 100 ),
- new CoordRec((float) 83.3334, (float) 100 ),
+ new CoordRec((float) 21.4286, 100 ),
+ new CoordRec((float) 83.3334, 100 ),
};
static final CoordRec char69_stroke2[] = {
@@ -925,8 +925,8 @@ static final CoordRec char69_stroke2[] = {
};
static final CoordRec char69_stroke3[] = {
- new CoordRec((float) 21.4286, (float) 0 ),
- new CoordRec((float) 83.3334, (float) 0 ),
+ new CoordRec((float) 21.4286, 0 ),
+ new CoordRec((float) 83.3334, 0 ),
};
static final StrokeRec char69[] = {
@@ -939,13 +939,13 @@ static final StrokeRec char69[] = {
/* char: 70 'F' */
static final CoordRec char70_stroke0[] = {
- new CoordRec((float) 21.4286, (float) 100 ),
- new CoordRec((float) 21.4286, (float) 0 ),
+ new CoordRec((float) 21.4286, 100 ),
+ new CoordRec((float) 21.4286, 0 ),
};
static final CoordRec char70_stroke1[] = {
- new CoordRec((float) 21.4286, (float) 100 ),
- new CoordRec((float) 83.3334, (float) 100 ),
+ new CoordRec((float) 21.4286, 100 ),
+ new CoordRec((float) 83.3334, 100 ),
};
static final CoordRec char70_stroke2[] = {
@@ -965,8 +965,8 @@ 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) 64.2857, 100 ),
+ new CoordRec((float) 45.2381, 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 ),
@@ -975,8 +975,8 @@ static final CoordRec char71_stroke0[] = {
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) 45.2381, 0 ),
+ new CoordRec((float) 64.2857, 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 ),
@@ -996,13 +996,13 @@ static final StrokeRec char71[] = {
/* char: 72 'H' */
static final CoordRec char72_stroke0[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 19.0476, (float) 0 ),
+ new CoordRec((float) 19.0476, 100 ),
+ new CoordRec((float) 19.0476, 0 ),
};
static final CoordRec char72_stroke1[] = {
- new CoordRec((float) 85.7143, (float) 100 ),
- new CoordRec((float) 85.7143, (float) 0 ),
+ new CoordRec((float) 85.7143, 100 ),
+ new CoordRec((float) 85.7143, 0 ),
};
static final CoordRec char72_stroke2[] = {
@@ -1019,8 +1019,8 @@ static final StrokeRec char72[] = {
/* char: 73 'I' */
static final CoordRec char73_stroke0[] = {
- new CoordRec((float) 52.381, (float) 100 ),
- new CoordRec((float) 52.381, (float) 0 ),
+ new CoordRec((float) 52.381, 100 ),
+ new CoordRec((float) 52.381, 0 ),
};
static final StrokeRec char73[] = {
@@ -1030,12 +1030,12 @@ static final StrokeRec char73[] = {
/* char: 74 'J' */
static final CoordRec char74_stroke0[] = {
- new CoordRec((float) 76.1905, (float) 100 ),
+ new CoordRec((float) 76.1905, 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) 57.1429, 0 ),
+ new CoordRec((float) 47.6191, 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 ),
@@ -1049,18 +1049,18 @@ static final StrokeRec char74[] = {
/* char: 75 'K' */
static final CoordRec char75_stroke0[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 19.0476, (float) 0 ),
+ new CoordRec((float) 19.0476, 100 ),
+ new CoordRec((float) 19.0476, 0 ),
};
static final CoordRec char75_stroke1[] = {
- new CoordRec((float) 85.7143, (float) 100 ),
+ new CoordRec((float) 85.7143, 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 ),
+ new CoordRec((float) 85.7143, 0 ),
};
static final StrokeRec char75[] = {
@@ -1072,13 +1072,13 @@ static final StrokeRec char75[] = {
/* char: 76 'L' */
static final CoordRec char76_stroke0[] = {
- new CoordRec((float) 23.8095, (float) 100 ),
- new CoordRec((float) 23.8095, (float) 0 ),
+ new CoordRec((float) 23.8095, 100 ),
+ new CoordRec((float) 23.8095, 0 ),
};
static final CoordRec char76_stroke1[] = {
- new CoordRec((float) 23.8095, (float) 0 ),
- new CoordRec((float) 80.9524, (float) 0 ),
+ new CoordRec((float) 23.8095, 0 ),
+ new CoordRec((float) 80.9524, 0 ),
};
static final StrokeRec char76[] = {
@@ -1089,23 +1089,23 @@ static final StrokeRec char76[] = {
/* char: 77 'M' */
static final CoordRec char77_stroke0[] = {
- new CoordRec((float) 14.2857, (float) 100 ),
- new CoordRec((float) 14.2857, (float) 0 ),
+ new CoordRec((float) 14.2857, 100 ),
+ new CoordRec((float) 14.2857, 0 ),
};
static final CoordRec char77_stroke1[] = {
- new CoordRec((float) 14.2857, (float) 100 ),
- new CoordRec((float) 52.3809, (float) 0 ),
+ new CoordRec((float) 14.2857, 100 ),
+ new CoordRec((float) 52.3809, 0 ),
};
static final CoordRec char77_stroke2[] = {
- new CoordRec((float) 90.4762, (float) 100 ),
- new CoordRec((float) 52.3809, (float) 0 ),
+ new CoordRec((float) 90.4762, 100 ),
+ new CoordRec((float) 52.3809, 0 ),
};
static final CoordRec char77_stroke3[] = {
- new CoordRec((float) 90.4762, (float) 100 ),
- new CoordRec((float) 90.4762, (float) 0 ),
+ new CoordRec((float) 90.4762, 100 ),
+ new CoordRec((float) 90.4762, 0 ),
};
static final StrokeRec char77[] = {
@@ -1118,18 +1118,18 @@ static final StrokeRec char77[] = {
/* char: 78 'N' */
static final CoordRec char78_stroke0[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 19.0476, (float) 0 ),
+ new CoordRec((float) 19.0476, 100 ),
+ new CoordRec((float) 19.0476, 0 ),
};
static final CoordRec char78_stroke1[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 85.7143, (float) 0 ),
+ new CoordRec((float) 19.0476, 100 ),
+ new CoordRec((float) 85.7143, 0 ),
};
static final CoordRec char78_stroke2[] = {
- new CoordRec((float) 85.7143, (float) 100 ),
- new CoordRec((float) 85.7143, (float) 0 ),
+ new CoordRec((float) 85.7143, 100 ),
+ new CoordRec((float) 85.7143, 0 ),
};
static final StrokeRec char78[] = {
@@ -1141,7 +1141,7 @@ static final StrokeRec char78[] = {
/* char: 79 'O' */
static final CoordRec char79_stroke0[] = {
- new CoordRec((float) 42.8571, (float) 100 ),
+ new CoordRec((float) 42.8571, 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 ),
@@ -1150,8 +1150,8 @@ static final CoordRec char79_stroke0[] = {
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) 42.8571, 0 ),
+ new CoordRec((float) 61.9047, 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 ),
@@ -1160,8 +1160,8 @@ static final CoordRec char79_stroke0[] = {
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 ),
+ new CoordRec((float) 61.9047, 100 ),
+ new CoordRec((float) 42.8571, 100 ),
};
static final StrokeRec char79[] = {
@@ -1171,13 +1171,13 @@ static final StrokeRec char79[] = {
/* char: 80 'P' */
static final CoordRec char80_stroke0[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 19.0476, (float) 0 ),
+ new CoordRec((float) 19.0476, 100 ),
+ new CoordRec((float) 19.0476, 0 ),
};
static final CoordRec char80_stroke1[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 61.9047, (float) 100 ),
+ new CoordRec((float) 19.0476, 100 ),
+ new CoordRec((float) 61.9047, 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 ),
@@ -1196,7 +1196,7 @@ static final StrokeRec char80[] = {
/* char: 81 'Q' */
static final CoordRec char81_stroke0[] = {
- new CoordRec((float) 42.8571, (float) 100 ),
+ new CoordRec((float) 42.8571, 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 ),
@@ -1205,8 +1205,8 @@ static final CoordRec char81_stroke0[] = {
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) 42.8571, 0 ),
+ new CoordRec((float) 61.9047, 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 ),
@@ -1215,8 +1215,8 @@ static final CoordRec char81_stroke0[] = {
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 ),
+ new CoordRec((float) 61.9047, 100 ),
+ new CoordRec((float) 42.8571, 100 ),
};
static final CoordRec char81_stroke1[] = {
@@ -1232,13 +1232,13 @@ static final StrokeRec char81[] = {
/* char: 82 'R' */
static final CoordRec char82_stroke0[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 19.0476, (float) 0 ),
+ new CoordRec((float) 19.0476, 100 ),
+ new CoordRec((float) 19.0476, 0 ),
};
static final CoordRec char82_stroke1[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 61.9047, (float) 100 ),
+ new CoordRec((float) 19.0476, 100 ),
+ new CoordRec((float) 61.9047, 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 ),
@@ -1251,7 +1251,7 @@ static final CoordRec char82_stroke1[] = {
static final CoordRec char82_stroke2[] = {
new CoordRec((float) 52.3809, (float) 52.381 ),
- new CoordRec((float) 85.7143, (float) 0 ),
+ new CoordRec((float) 85.7143, 0 ),
};
static final StrokeRec char82[] = {
@@ -1265,8 +1265,8 @@ static final StrokeRec char82[] = {
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) 61.9047, 100 ),
+ new CoordRec((float) 42.8571, 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 ),
@@ -1279,8 +1279,8 @@ static final CoordRec char83_stroke0[] = {
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) 61.9047, 0 ),
+ new CoordRec((float) 42.8571, 0 ),
new CoordRec((float) 28.5714, (float) 4.7619 ),
new CoordRec((float) 19.0476, (float) 14.2857 ),
};
@@ -1292,13 +1292,13 @@ static final StrokeRec char83[] = {
/* char: 84 'T' */
static final CoordRec char84_stroke0[] = {
- new CoordRec((float) 52.3809, (float) 100 ),
- new CoordRec((float) 52.3809, (float) 0 ),
+ new CoordRec((float) 52.3809, 100 ),
+ new CoordRec((float) 52.3809, 0 ),
};
static final CoordRec char84_stroke1[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 85.7143, (float) 100 ),
+ new CoordRec((float) 19.0476, 100 ),
+ new CoordRec((float) 85.7143, 100 ),
};
static final StrokeRec char84[] = {
@@ -1309,16 +1309,16 @@ static final StrokeRec char84[] = {
/* char: 85 'U' */
static final CoordRec char85_stroke0[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 19.0476, 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) 47.619, 0 ),
+ new CoordRec((float) 57.1428, 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 ),
+ new CoordRec((float) 85.7143, 100 ),
};
static final StrokeRec char85[] = {
@@ -1328,13 +1328,13 @@ static final StrokeRec char85[] = {
/* char: 86 'V' */
static final CoordRec char86_stroke0[] = {
- new CoordRec((float) 14.2857, (float) 100 ),
- new CoordRec((float) 52.3809, (float) 0 ),
+ new CoordRec((float) 14.2857, 100 ),
+ new CoordRec((float) 52.3809, 0 ),
};
static final CoordRec char86_stroke1[] = {
- new CoordRec((float) 90.4762, (float) 100 ),
- new CoordRec((float) 52.3809, (float) 0 ),
+ new CoordRec((float) 90.4762, 100 ),
+ new CoordRec((float) 52.3809, 0 ),
};
static final StrokeRec char86[] = {
@@ -1345,23 +1345,23 @@ static final StrokeRec char86[] = {
/* char: 87 'W' */
static final CoordRec char87_stroke0[] = {
- new CoordRec((float) 4.7619, (float) 100 ),
- new CoordRec((float) 28.5714, (float) 0 ),
+ new CoordRec((float) 4.7619, 100 ),
+ new CoordRec((float) 28.5714, 0 ),
};
static final CoordRec char87_stroke1[] = {
- new CoordRec((float) 52.3809, (float) 100 ),
- new CoordRec((float) 28.5714, (float) 0 ),
+ new CoordRec((float) 52.3809, 100 ),
+ new CoordRec((float) 28.5714, 0 ),
};
static final CoordRec char87_stroke2[] = {
- new CoordRec((float) 52.3809, (float) 100 ),
- new CoordRec((float) 76.1905, (float) 0 ),
+ new CoordRec((float) 52.3809, 100 ),
+ new CoordRec((float) 76.1905, 0 ),
};
static final CoordRec char87_stroke3[] = {
- new CoordRec((float) 100, (float) 100 ),
- new CoordRec((float) 76.1905, (float) 0 ),
+ new CoordRec(100, 100 ),
+ new CoordRec((float) 76.1905, 0 ),
};
static final StrokeRec char87[] = {
@@ -1374,13 +1374,13 @@ static final StrokeRec char87[] = {
/* char: 88 'X' */
static final CoordRec char88_stroke0[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 85.7143, (float) 0 ),
+ new CoordRec((float) 19.0476, 100 ),
+ new CoordRec((float) 85.7143, 0 ),
};
static final CoordRec char88_stroke1[] = {
- new CoordRec((float) 85.7143, (float) 100 ),
- new CoordRec((float) 19.0476, (float) 0 ),
+ new CoordRec((float) 85.7143, 100 ),
+ new CoordRec((float) 19.0476, 0 ),
};
static final StrokeRec char88[] = {
@@ -1391,13 +1391,13 @@ static final StrokeRec char88[] = {
/* char: 89 'Y' */
static final CoordRec char89_stroke0[] = {
- new CoordRec((float) 14.2857, (float) 100 ),
+ new CoordRec((float) 14.2857, 100 ),
new CoordRec((float) 52.3809, (float) 52.381 ),
- new CoordRec((float) 52.3809, (float) 0 ),
+ new CoordRec((float) 52.3809, 0 ),
};
static final CoordRec char89_stroke1[] = {
- new CoordRec((float) 90.4762, (float) 100 ),
+ new CoordRec((float) 90.4762, 100 ),
new CoordRec((float) 52.3809, (float) 52.381 ),
};
@@ -1409,18 +1409,18 @@ static final StrokeRec char89[] = {
/* char: 90 'Z' */
static final CoordRec char90_stroke0[] = {
- new CoordRec((float) 85.7143, (float) 100 ),
- new CoordRec((float) 19.0476, (float) 0 ),
+ new CoordRec((float) 85.7143, 100 ),
+ new CoordRec((float) 19.0476, 0 ),
};
static final CoordRec char90_stroke1[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
- new CoordRec((float) 85.7143, (float) 100 ),
+ new CoordRec((float) 19.0476, 100 ),
+ new CoordRec((float) 85.7143, 100 ),
};
static final CoordRec char90_stroke2[] = {
- new CoordRec((float) 19.0476, (float) 0 ),
- new CoordRec((float) 85.7143, (float) 0 ),
+ new CoordRec((float) 19.0476, 0 ),
+ new CoordRec((float) 85.7143, 0 ),
};
static final StrokeRec char90[] = {
@@ -1461,7 +1461,7 @@ static final StrokeRec char91[] = {
/* char: 92 '\' */
static final CoordRec char92_stroke0[] = {
- new CoordRec((float) 19.0476, (float) 100 ),
+ new CoordRec((float) 19.0476, 100 ),
new CoordRec((float) 85.7143, (float) -14.2857 ),
};
@@ -1518,11 +1518,11 @@ static final StrokeRec char94[] = {
/* char: 95 '_' */
static final CoordRec char95_stroke0[] = {
- new CoordRec((float) 0, (float) -33.3333 ),
+ new CoordRec(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 ),
+ new CoordRec(0, (float) -28.5714 ),
+ new CoordRec(0, (float) -33.3333 ),
};
static final StrokeRec char95[] = {
@@ -1532,12 +1532,12 @@ static final StrokeRec char95[] = {
/* char: 96 '`' */
static final CoordRec char96_stroke0[] = {
- new CoordRec((float) 42.8572, (float) 100 ),
+ new CoordRec((float) 42.8572, 100 ),
new CoordRec((float) 66.6667, (float) 71.4286 ),
};
static final CoordRec char96_stroke1[] = {
- new CoordRec((float) 42.8572, (float) 100 ),
+ new CoordRec((float) 42.8572, 100 ),
new CoordRec((float) 38.0953, (float) 95.2381 ),
new CoordRec((float) 66.6667, (float) 71.4286 ),
};
@@ -1551,7 +1551,7 @@ static final StrokeRec char96[] = {
static final CoordRec char97_stroke0[] = {
new CoordRec((float) 80.9524, (float) 66.6667 ),
- new CoordRec((float) 80.9524, (float) 0 ),
+ new CoordRec((float) 80.9524, 0 ),
};
static final CoordRec char97_stroke1[] = {
@@ -1565,8 +1565,8 @@ static final CoordRec char97_stroke1[] = {
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) 47.619, 0 ),
+ new CoordRec((float) 61.9047, 0 ),
new CoordRec((float) 71.4285, (float) 4.7619 ),
new CoordRec((float) 80.9524, (float) 14.2857 ),
};
@@ -1579,8 +1579,8 @@ static final StrokeRec char97[] = {
/* char: 98 'b' */
static final CoordRec char98_stroke0[] = {
- new CoordRec((float) 23.8095, (float) 100 ),
- new CoordRec((float) 23.8095, (float) 0 ),
+ new CoordRec((float) 23.8095, 100 ),
+ new CoordRec((float) 23.8095, 0 ),
};
static final CoordRec char98_stroke1[] = {
@@ -1594,8 +1594,8 @@ static final CoordRec char98_stroke1[] = {
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) 57.1428, 0 ),
+ new CoordRec((float) 42.8571, 0 ),
new CoordRec((float) 33.3333, (float) 4.7619 ),
new CoordRec((float) 23.8095, (float) 14.2857 ),
};
@@ -1618,8 +1618,8 @@ static final CoordRec char99_stroke0[] = {
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) 47.619, 0 ),
+ new CoordRec((float) 61.9047, 0 ),
new CoordRec((float) 71.4285, (float) 4.7619 ),
new CoordRec((float) 80.9524, (float) 14.2857 ),
};
@@ -1631,8 +1631,8 @@ static final StrokeRec char99[] = {
/* char: 100 'd' */
static final CoordRec char100_stroke0[] = {
- new CoordRec((float) 80.9524, (float) 100 ),
- new CoordRec((float) 80.9524, (float) 0 ),
+ new CoordRec((float) 80.9524, 100 ),
+ new CoordRec((float) 80.9524, 0 ),
};
static final CoordRec char100_stroke1[] = {
@@ -1646,8 +1646,8 @@ static final CoordRec char100_stroke1[] = {
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) 47.619, 0 ),
+ new CoordRec((float) 61.9047, 0 ),
new CoordRec((float) 71.4285, (float) 4.7619 ),
new CoordRec((float) 80.9524, (float) 14.2857 ),
};
@@ -1673,8 +1673,8 @@ static final CoordRec char101_stroke0[] = {
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) 47.619, 0 ),
+ new CoordRec((float) 61.9047, 0 ),
new CoordRec((float) 71.4285, (float) 4.7619 ),
new CoordRec((float) 80.9524, (float) 14.2857 ),
};
@@ -1686,11 +1686,11 @@ static final StrokeRec char101[] = {
/* 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) 71.4286, 100 ),
+ new CoordRec((float) 61.9048, 100 ),
new CoordRec((float) 52.381, (float) 95.2381 ),
new CoordRec((float) 47.6191, (float) 80.9524 ),
- new CoordRec((float) 47.6191, (float) 0 ),
+ new CoordRec((float) 47.6191, 0 ),
};
static final CoordRec char102_stroke1[] = {
@@ -1726,8 +1726,8 @@ static final CoordRec char103_stroke1[] = {
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) 47.619, 0 ),
+ new CoordRec((float) 61.9047, 0 ),
new CoordRec((float) 71.4285, (float) 4.7619 ),
new CoordRec((float) 80.9524, (float) 14.2857 ),
};
@@ -1740,18 +1740,18 @@ static final StrokeRec char103[] = {
/* char: 104 'h' */
static final CoordRec char104_stroke0[] = {
- new CoordRec((float) 26.1905, (float) 100 ),
- new CoordRec((float) 26.1905, (float) 0 ),
+ new CoordRec((float) 26.1905, 100 ),
+ new CoordRec((float) 26.1905, 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(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 ),
+ new CoordRec((float) 78.5715, 0 ),
};
static final StrokeRec char104[] = {
@@ -1762,16 +1762,16 @@ static final StrokeRec char104[] = {
/* char: 105 'i' */
static final CoordRec char105_stroke0[] = {
- new CoordRec((float) 47.6191, (float) 100 ),
+ new CoordRec((float) 47.6191, 100 ),
new CoordRec((float) 52.381, (float) 95.2381 ),
- new CoordRec((float) 57.1429, (float) 100 ),
+ new CoordRec((float) 57.1429, 100 ),
new CoordRec((float) 52.381, (float) 104.762 ),
- new CoordRec((float) 47.6191, (float) 100 ),
+ new CoordRec((float) 47.6191, 100 ),
};
static final CoordRec char105_stroke1[] = {
new CoordRec((float) 52.381, (float) 66.6667 ),
- new CoordRec((float) 52.381, (float) 0 ),
+ new CoordRec((float) 52.381, 0 ),
};
static final StrokeRec char105[] = {
@@ -1782,11 +1782,11 @@ static final StrokeRec char105[] = {
/* char: 106 'j' */
static final CoordRec char106_stroke0[] = {
- new CoordRec((float) 57.1429, (float) 100 ),
+ new CoordRec((float) 57.1429, 100 ),
new CoordRec((float) 61.9048, (float) 95.2381 ),
- new CoordRec((float) 66.6667, (float) 100 ),
+ new CoordRec((float) 66.6667, 100 ),
new CoordRec((float) 61.9048, (float) 104.762 ),
- new CoordRec((float) 57.1429, (float) 100 ),
+ new CoordRec((float) 57.1429, 100 ),
};
static final CoordRec char106_stroke1[] = {
@@ -1805,8 +1805,8 @@ static final StrokeRec char106[] = {
/* char: 107 'k' */
static final CoordRec char107_stroke0[] = {
- new CoordRec((float) 26.1905, (float) 100 ),
- new CoordRec((float) 26.1905, (float) 0 ),
+ new CoordRec((float) 26.1905, 100 ),
+ new CoordRec((float) 26.1905, 0 ),
};
static final CoordRec char107_stroke1[] = {
@@ -1816,7 +1816,7 @@ static final CoordRec char107_stroke1[] = {
static final CoordRec char107_stroke2[] = {
new CoordRec((float) 45.2381, (float) 38.0952 ),
- new CoordRec((float) 78.5715, (float) 0 ),
+ new CoordRec((float) 78.5715, 0 ),
};
static final StrokeRec char107[] = {
@@ -1828,8 +1828,8 @@ static final StrokeRec char107[] = {
/* char: 108 'l' */
static final CoordRec char108_stroke0[] = {
- new CoordRec((float) 52.381, (float) 100 ),
- new CoordRec((float) 52.381, (float) 0 ),
+ new CoordRec((float) 52.381, 100 ),
+ new CoordRec((float) 52.381, 0 ),
};
static final StrokeRec char108[] = {
@@ -1839,18 +1839,18 @@ static final StrokeRec char108[] = {
/* char: 109 'm' */
static final CoordRec char109_stroke0[] = {
- new CoordRec((float) 0, (float) 66.6667 ),
- new CoordRec((float) 0, (float) 0 ),
+ new CoordRec(0, (float) 66.6667 ),
+ new CoordRec(0, 0 ),
};
static final CoordRec char109_stroke1[] = {
- new CoordRec((float) 0, (float) 47.619 ),
+ new CoordRec(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 ),
+ new CoordRec((float) 52.381, 0 ),
};
static final CoordRec char109_stroke2[] = {
@@ -1858,9 +1858,9 @@ static final CoordRec char109_stroke2[] = {
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(100, (float) 61.9048 ),
new CoordRec((float) 104.762, (float) 47.619 ),
- new CoordRec((float) 104.762, (float) 0 ),
+ new CoordRec((float) 104.762, 0 ),
};
static final StrokeRec char109[] = {
@@ -1873,17 +1873,17 @@ static final StrokeRec char109[] = {
static final CoordRec char110_stroke0[] = {
new CoordRec((float) 26.1905, (float) 66.6667 ),
- new CoordRec((float) 26.1905, (float) 0 ),
+ new CoordRec((float) 26.1905, 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(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 ),
+ new CoordRec((float) 78.5715, 0 ),
};
static final StrokeRec char110[] = {
@@ -1901,8 +1901,8 @@ static final CoordRec char111_stroke0[] = {
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) 45.2381, 0 ),
+ new CoordRec((float) 59.5238, 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 ),
@@ -1935,8 +1935,8 @@ static final CoordRec char112_stroke1[] = {
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) 57.1428, 0 ),
+ new CoordRec((float) 42.8571, 0 ),
new CoordRec((float) 33.3333, (float) 4.7619 ),
new CoordRec((float) 23.8095, (float) 14.2857 ),
};
@@ -1964,8 +1964,8 @@ static final CoordRec char113_stroke1[] = {
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) 47.619, 0 ),
+ new CoordRec((float) 61.9047, 0 ),
new CoordRec((float) 71.4285, (float) 4.7619 ),
new CoordRec((float) 80.9524, (float) 14.2857 ),
};
@@ -1979,7 +1979,7 @@ static final StrokeRec char113[] = {
static final CoordRec char114_stroke0[] = {
new CoordRec((float) 33.3334, (float) 66.6667 ),
- new CoordRec((float) 33.3334, (float) 0 ),
+ new CoordRec((float) 33.3334, 0 ),
};
static final CoordRec char114_stroke1[] = {
@@ -2011,8 +2011,8 @@ static final CoordRec char115_stroke0[] = {
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) 59.5238, 0 ),
+ new CoordRec((float) 45.2381, 0 ),
new CoordRec((float) 30.9524, (float) 4.7619 ),
new CoordRec((float) 26.1905, (float) 14.2857 ),
};
@@ -2024,11 +2024,11 @@ static final StrokeRec char115[] = {
/* char: 116 't' */
static final CoordRec char116_stroke0[] = {
- new CoordRec((float) 47.6191, (float) 100 ),
+ new CoordRec((float) 47.6191, 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 ),
+ new CoordRec((float) 61.9048, 0 ),
+ new CoordRec((float) 71.4286, 0 ),
};
static final CoordRec char116_stroke1[] = {
@@ -2047,15 +2047,15 @@ 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) 40.4762, 0 ),
+ new CoordRec((float) 54.7619, 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 ),
+ new CoordRec((float) 78.5715, 0 ),
};
static final StrokeRec char117[] = {
@@ -2067,12 +2067,12 @@ static final StrokeRec char117[] = {
static final CoordRec char118_stroke0[] = {
new CoordRec((float) 23.8095, (float) 66.6667 ),
- new CoordRec((float) 52.3809, (float) 0 ),
+ new CoordRec((float) 52.3809, 0 ),
};
static final CoordRec char118_stroke1[] = {
new CoordRec((float) 80.9524, (float) 66.6667 ),
- new CoordRec((float) 52.3809, (float) 0 ),
+ new CoordRec((float) 52.3809, 0 ),
};
static final StrokeRec char118[] = {
@@ -2084,22 +2084,22 @@ static final StrokeRec char118[] = {
static final CoordRec char119_stroke0[] = {
new CoordRec((float) 14.2857, (float) 66.6667 ),
- new CoordRec((float) 33.3333, (float) 0 ),
+ new CoordRec((float) 33.3333, 0 ),
};
static final CoordRec char119_stroke1[] = {
new CoordRec((float) 52.3809, (float) 66.6667 ),
- new CoordRec((float) 33.3333, (float) 0 ),
+ new CoordRec((float) 33.3333, 0 ),
};
static final CoordRec char119_stroke2[] = {
new CoordRec((float) 52.3809, (float) 66.6667 ),
- new CoordRec((float) 71.4286, (float) 0 ),
+ new CoordRec((float) 71.4286, 0 ),
};
static final CoordRec char119_stroke3[] = {
new CoordRec((float) 90.4762, (float) 66.6667 ),
- new CoordRec((float) 71.4286, (float) 0 ),
+ new CoordRec((float) 71.4286, 0 ),
};
static final StrokeRec char119[] = {
@@ -2113,12 +2113,12 @@ static final StrokeRec char119[] = {
static final CoordRec char120_stroke0[] = {
new CoordRec((float) 26.1905, (float) 66.6667 ),
- new CoordRec((float) 78.5715, (float) 0 ),
+ new CoordRec((float) 78.5715, 0 ),
};
static final CoordRec char120_stroke1[] = {
new CoordRec((float) 78.5715, (float) 66.6667 ),
- new CoordRec((float) 26.1905, (float) 0 ),
+ new CoordRec((float) 26.1905, 0 ),
};
static final StrokeRec char120[] = {
@@ -2130,12 +2130,12 @@ static final StrokeRec char120[] = {
static final CoordRec char121_stroke0[] = {
new CoordRec((float) 26.1905, (float) 66.6667 ),
- new CoordRec((float) 54.7619, (float) 0 ),
+ new CoordRec((float) 54.7619, 0 ),
};
static final CoordRec char121_stroke1[] = {
new CoordRec((float) 83.3334, (float) 66.6667 ),
- new CoordRec((float) 54.7619, (float) 0 ),
+ new CoordRec((float) 54.7619, 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 ),
@@ -2151,7 +2151,7 @@ static final StrokeRec char121[] = {
static final CoordRec char122_stroke0[] = {
new CoordRec((float) 78.5715, (float) 66.6667 ),
- new CoordRec((float) 26.1905, (float) 0 ),
+ new CoordRec((float) 26.1905, 0 ),
};
static final CoordRec char122_stroke1[] = {
@@ -2160,8 +2160,8 @@ static final CoordRec char122_stroke1[] = {
};
static final CoordRec char122_stroke2[] = {
- new CoordRec((float) 26.1905, (float) 0 ),
- new CoordRec((float) 78.5715, (float) 0 ),
+ new CoordRec((float) 26.1905, 0 ),
+ new CoordRec((float) 78.5715, 0 ),
};
static final StrokeRec char122[] = {
@@ -2175,20 +2175,20 @@ static final StrokeRec char122[] = {
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(50, (float) 109.524 ),
+ new CoordRec((float) 45.2381, 100 ),
new CoordRec((float) 45.2381, (float) 90.4762 ),
- new CoordRec((float) 50, (float) 80.9524 ),
+ new CoordRec(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 ),
+ new CoordRec(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(50, (float) 104.762 ),
+ new CoordRec(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 ),
@@ -2199,21 +2199,21 @@ static final CoordRec char123_stroke1[] = {
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, 0 ),
+ new CoordRec(50, (float) -9.5238 ),
+ new CoordRec(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(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(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(50, (float) -23.8095 ),
new CoordRec((float) 54.7619, (float) -28.5714 ),
new CoordRec((float) 64.2857, (float) -33.3333 ),
};
@@ -2239,22 +2239,22 @@ static final StrokeRec char124[] = {
static final CoordRec char125_stroke0[] = {
new CoordRec((float) 40.4762, (float) 119.048 ),
- new CoordRec((float) 50, (float) 114.286 ),
+ new CoordRec(50, (float) 114.286 ),
new CoordRec((float) 54.7619, (float) 109.524 ),
- new CoordRec((float) 59.5238, (float) 100 ),
+ new CoordRec((float) 59.5238, 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(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(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(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 ),
@@ -2264,22 +2264,22 @@ static final CoordRec char125_stroke1[] = {
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(50, 0 ),
new CoordRec((float) 54.7619, (float) -9.5238 ),
new CoordRec((float) 54.7619, (float) -19.0476 ),
- new CoordRec((float) 50, (float) -28.5714 ),
+ new CoordRec(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(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(50, (float) -28.5714 ),
new CoordRec((float) 40.4762, (float) -33.3333 ),
};
@@ -2327,7 +2327,7 @@ static final StrokeRec char126[] = {
/* char: 127 */
static final CoordRec char127_stroke0[] = {
- new CoordRec((float) 71.4286, (float) 100 ),
+ new CoordRec((float) 71.4286, 100 ),
new CoordRec((float) 33.3333, (float) -33.3333 ),
};
@@ -2339,8 +2339,8 @@ static final CoordRec char127_stroke1[] = {
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) 47.619, 0 ),
+ new CoordRec((float) 57.1428, 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 ),
@@ -2357,38 +2357,38 @@ static final StrokeRec char127[] = {
};
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, /* char0 */ null, 0, 0 ),
+ new StrokeCharRec(0, /* char1 */ null, 0, 0 ),
+ new StrokeCharRec(0, /* char2 */ null, 0, 0 ),
+ new StrokeCharRec(0, /* char3 */ null, 0, 0 ),
+ new StrokeCharRec(0, /* char4 */ null, 0, 0 ),
+ new StrokeCharRec(0, /* char5 */ null, 0, 0 ),
+ new StrokeCharRec(0, /* char6 */ null, 0, 0 ),
+ new StrokeCharRec(0, /* char7 */ null, 0, 0 ),
+ new StrokeCharRec(0, /* char8 */ null, 0, 0 ),
+ new StrokeCharRec(0, /* char9 */ null, 0, 0 ),
+ new StrokeCharRec(0, /* char10 */ null, 0, 0 ),
+ new StrokeCharRec(0, /* char11 */ null, 0, 0 ),
+ new StrokeCharRec(0, /* char12 */ null, 0, 0 ),
+ new StrokeCharRec(0, /* char13 */ null, 0, 0 ),
+ new StrokeCharRec(0, /* char14 */ null, 0, 0 ),
+ new StrokeCharRec(0, /* char15 */ null, 0, 0 ),
+ new StrokeCharRec(0, /* char16 */ null, 0, 0 ),
+ new StrokeCharRec(0, /* char17 */ null, 0, 0 ),
+ new StrokeCharRec(0, /* char18 */ null, 0, 0 ),
+ new StrokeCharRec(0, /* char19 */ null, 0, 0 ),
+ new StrokeCharRec(0, /* char20 */ null, 0, 0 ),
+ new StrokeCharRec(0, /* char21 */ null, 0, 0 ),
+ new StrokeCharRec(0, /* char22 */ null, 0, 0 ),
+ new StrokeCharRec(0, /* char23 */ null, 0, 0 ),
+ new StrokeCharRec(0, /* char24 */ null, 0, 0 ),
+ new StrokeCharRec(0, /* char25 */ null, 0, 0 ),
+ new StrokeCharRec(0, /* char26 */ null, 0, 0 ),
+ new StrokeCharRec(0, /* char27 */ null, 0, 0 ),
+ new StrokeCharRec(0, /* char28 */ null, 0, 0 ),
+ new StrokeCharRec(0, /* char29 */ null, 0, 0 ),
+ new StrokeCharRec(0, /* char30 */ null, 0, 0 ),
+ new StrokeCharRec(0, /* char31 */ null, 0, 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 ),
diff --git a/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTStrokeRoman.java b/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTStrokeRoman.java
index cf51ddd3c..5b614c64e 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTStrokeRoman.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUTStrokeRoman.java
@@ -46,14 +46,14 @@ class GLUTStrokeRoman {
/* char: 33 '!' */
static final CoordRec char33_stroke0[] = {
- new CoordRec((float) 13.3819, (float) 100),
+ new CoordRec((float) 13.3819, 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) 13.3819, 0),
new CoordRec((float) 18.1438, (float) 4.7619),
new CoordRec((float) 13.3819, (float) 9.5238),
};
@@ -66,12 +66,12 @@ static final StrokeRec char33[] = {
/* char: 34 '"' */
static final CoordRec char34_stroke0[] = {
- new CoordRec((float) 4.02, (float) 100),
+ new CoordRec((float) 4.02, 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, 100),
new CoordRec((float) 42.1152, (float) 66.6667),
};
@@ -124,8 +124,8 @@ static final CoordRec char36_stroke1[] = {
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) 47.6771, 100),
+ new CoordRec((float) 28.6295, 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),
@@ -138,8 +138,8 @@ static final CoordRec char36_stroke2[] = {
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) 47.6771, 0),
+ new CoordRec((float) 28.6295, 0),
new CoordRec((float) 14.3438, (float) 4.7619),
new CoordRec((float) 4.82, (float) 14.2857),
};
@@ -153,12 +153,12 @@ static final StrokeRec char36[] = {
/* char: 37 '%' */
static final CoordRec char37_stroke0[] = {
- new CoordRec((float) 92.0743, (float) 100),
- new CoordRec((float) 6.36, (float) 0),
+ new CoordRec((float) 92.0743, 100),
+ new CoordRec((float) 6.36, 0),
};
static final CoordRec char37_stroke1[] = {
- new CoordRec((float) 30.1695, (float) 100),
+ new CoordRec((float) 30.1695, 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),
@@ -167,13 +167,13 @@ static final CoordRec char37_stroke1[] = {
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) 20.6457, 100),
+ new CoordRec((float) 30.1695, 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),
+ new CoordRec((float) 92.0743, 100),
};
static final CoordRec char37_stroke2[] = {
@@ -181,8 +181,8 @@ static final CoordRec char37_stroke2[] = {
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) 68.2648, 0),
+ new CoordRec((float) 77.7886, 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),
@@ -208,8 +208,8 @@ static final CoordRec char38_stroke0[] = {
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) 44.0752, 0),
+ new CoordRec((float) 25.0276, 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),
@@ -221,7 +221,7 @@ static final CoordRec char38_stroke0[] = {
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) 44.0752, 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),
@@ -229,8 +229,8 @@ static final CoordRec char38_stroke0[] = {
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) 86.9324, 0),
+ new CoordRec((float) 96.4562, 0),
new CoordRec((float) 101.218, (float) 4.7619),
new CoordRec((float) 101.218, (float) 9.5238),
};
@@ -242,7 +242,7 @@ static final StrokeRec char38[] = {
/* char: 39 ''' */
static final CoordRec char39_stroke0[] = {
- new CoordRec((float) 4.44, (float) 100),
+ new CoordRec((float) 4.44, 100),
new CoordRec((float) 4.44, (float) 66.6667),
};
@@ -315,7 +315,7 @@ static final StrokeRec char42[] = {
static final CoordRec char43_stroke0[] = {
new CoordRec((float) 48.8371, (float) 85.7143),
- new CoordRec((float) 48.8371, (float) 0),
+ new CoordRec((float) 48.8371, 0),
};
static final CoordRec char43_stroke1[] = {
@@ -332,7 +332,7 @@ static final StrokeRec char43[] = {
static final CoordRec char44_stroke0[] = {
new CoordRec((float) 18.2838, (float) 4.7619),
- new CoordRec((float) 13.5219, (float) 0),
+ new CoordRec((float) 13.5219, 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),
@@ -361,7 +361,7 @@ static final StrokeRec char45[] = {
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) 13.1019, 0),
new CoordRec((float) 17.8638, (float) 4.7619),
new CoordRec((float) 13.1019, (float) 9.5238),
};
@@ -374,7 +374,7 @@ static final StrokeRec char46[] = {
static final CoordRec char47_stroke0[] = {
new CoordRec((float) 7.24, (float) -14.2857),
- new CoordRec((float) 73.9067, (float) 100),
+ new CoordRec((float) 73.9067, 100),
};
static final StrokeRec char47[] = {
@@ -384,23 +384,23 @@ static final StrokeRec char47[] = {
/* char: 48 '0' */
static final CoordRec char48_stroke0[] = {
- new CoordRec((float) 33.5514, (float) 100),
+ new CoordRec((float) 33.5514, 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) 33.5514, 0),
+ new CoordRec((float) 43.0752, 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),
+ new CoordRec((float) 43.0752, 100),
+ new CoordRec((float) 33.5514, 100),
};
static final StrokeRec char48[] = {
@@ -412,8 +412,8 @@ static final StrokeRec char48[] = {
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),
+ new CoordRec((float) 35.6295, 100),
+ new CoordRec((float) 35.6295, 0),
};
static final StrokeRec char49[] = {
@@ -427,16 +427,16 @@ static final CoordRec char50_stroke0[] = {
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) 29.2295, 100),
+ new CoordRec((float) 48.2771, 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),
+ new CoordRec((float) 5.42, 0),
+ new CoordRec((float) 72.0867, 0),
};
static final StrokeRec char50[] = {
@@ -446,8 +446,8 @@ static final StrokeRec char50[] = {
/* 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) 14.5238, 100),
+ new CoordRec((float) 66.9048, 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),
@@ -456,11 +456,11 @@ static final CoordRec char51_stroke0[] = {
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) 43.0952, 0),
+ new CoordRec((float) 28.8095, 0),
new CoordRec((float) 14.5238, (float) 4.7619),
new CoordRec((float) 9.7619, (float) 9.5238),
- new CoordRec((float) 5, (float) 19.0476),
+ new CoordRec(5, (float) 19.0476),
};
static final StrokeRec char51[] = {
@@ -470,14 +470,14 @@ static final StrokeRec char51[] = {
/* char: 52 '4' */
static final CoordRec char52_stroke0[] = {
- new CoordRec((float) 51.499, (float) 100),
+ new CoordRec((float) 51.499, 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),
+ new CoordRec((float) 51.499, 100),
+ new CoordRec((float) 51.499, 0),
};
static final StrokeRec char52[] = {
@@ -488,8 +488,8 @@ static final StrokeRec char52[] = {
/* 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) 62.0029, 100),
+ new CoordRec((float) 14.3838, 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),
@@ -500,8 +500,8 @@ static final CoordRec char53_stroke0[] = {
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) 42.9552, 0),
+ new CoordRec((float) 28.6695, 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),
@@ -516,16 +516,16 @@ static final StrokeRec char53[] = {
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) 43.6752, 100),
+ new CoordRec((float) 34.1514, 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) 34.1514, 0),
+ new CoordRec((float) 38.9133, 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),
@@ -546,13 +546,13 @@ static final StrokeRec char54[] = {
/* char: 55 '7' */
static final CoordRec char55_stroke0[] = {
- new CoordRec((float) 72.2267, (float) 100),
- new CoordRec((float) 24.6076, (float) 0),
+ new CoordRec((float) 72.2267, 100),
+ new CoordRec((float) 24.6076, 0),
};
static final CoordRec char55_stroke1[] = {
- new CoordRec((float) 5.56, (float) 100),
- new CoordRec((float) 72.2267, (float) 100),
+ new CoordRec((float) 5.56, 100),
+ new CoordRec((float) 72.2267, 100),
};
static final StrokeRec char55[] = {
@@ -563,7 +563,7 @@ static final StrokeRec char55[] = {
/* char: 56 '8' */
static final CoordRec char56_stroke0[] = {
- new CoordRec((float) 29.4095, (float) 100),
+ new CoordRec((float) 29.4095, 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),
@@ -576,8 +576,8 @@ static final CoordRec char56_stroke0[] = {
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) 48.4571, 0),
+ new CoordRec((float) 29.4095, 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),
@@ -590,8 +590,8 @@ static final CoordRec char56_stroke0[] = {
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),
+ new CoordRec((float) 48.4571, 100),
+ new CoordRec((float) 29.4095, 100),
};
static final StrokeRec char56[] = {
@@ -612,16 +612,16 @@ static final CoordRec char57_stroke0[] = {
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) 35.1714, 100),
+ new CoordRec((float) 39.9333, 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) 39.9333, 0),
+ new CoordRec((float) 30.4095, 0),
new CoordRec((float) 16.1238, (float) 4.7619),
new CoordRec((float) 11.3619, (float) 14.2857),
};
@@ -643,7 +643,7 @@ static final CoordRec char58_stroke0[] = {
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) 14.0819, 0),
new CoordRec((float) 18.8438, (float) 4.7619),
new CoordRec((float) 14.0819, (float) 9.5238),
};
@@ -665,7 +665,7 @@ static final CoordRec char59_stroke0[] = {
static final CoordRec char59_stroke1[] = {
new CoordRec((float) 17.7238, (float) 4.7619),
- new CoordRec((float) 12.9619, (float) 0),
+ new CoordRec((float) 12.9619, 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),
@@ -684,7 +684,7 @@ static final StrokeRec char59[] = {
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),
+ new CoordRec((float) 79.2505, 0),
};
static final StrokeRec char60[] = {
@@ -713,7 +713,7 @@ static final StrokeRec char61[] = {
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),
+ new CoordRec((float) 2.78, 0),
};
static final StrokeRec char62[] = {
@@ -727,8 +727,8 @@ static final CoordRec char63_stroke0[] = {
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) 27.4676, 100),
+ new CoordRec((float) 46.5152, 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),
@@ -742,7 +742,7 @@ static final CoordRec char63_stroke0[] = {
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) 36.9914, 0),
new CoordRec((float) 41.7533, (float) 4.7619),
new CoordRec((float) 36.9914, (float) 9.5238),
};
@@ -795,13 +795,13 @@ static final StrokeRec char64[] = {
/* char: 65 'A' */
static final CoordRec char65_stroke0[] = {
- new CoordRec((float) 40.5952, (float) 100),
- new CoordRec((float) 2.5, (float) 0),
+ new CoordRec((float) 40.5952, 100),
+ new CoordRec((float) 2.5, 0),
};
static final CoordRec char65_stroke1[] = {
- new CoordRec((float) 40.5952, (float) 100),
- new CoordRec((float) 78.6905, (float) 0),
+ new CoordRec((float) 40.5952, 100),
+ new CoordRec((float) 78.6905, 0),
};
static final CoordRec char65_stroke2[] = {
@@ -818,13 +818,13 @@ static final StrokeRec char65[] = {
/* char: 66 'B' */
static final CoordRec char66_stroke0[] = {
- new CoordRec((float) 11.42, (float) 100),
- new CoordRec((float) 11.42, (float) 0),
+ new CoordRec((float) 11.42, 100),
+ new CoordRec((float) 11.42, 0),
};
static final CoordRec char66_stroke1[] = {
- new CoordRec((float) 11.42, (float) 100),
- new CoordRec((float) 54.2771, (float) 100),
+ new CoordRec((float) 11.42, 100),
+ new CoordRec((float) 54.2771, 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),
@@ -843,8 +843,8 @@ static final CoordRec char66_stroke2[] = {
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),
+ new CoordRec((float) 54.2771, 0),
+ new CoordRec((float) 11.42, 0),
};
static final StrokeRec char66[] = {
@@ -859,8 +859,8 @@ 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) 54.279, 100),
+ new CoordRec((float) 35.2314, 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),
@@ -869,8 +869,8 @@ static final CoordRec char67_stroke0[] = {
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) 35.2314, 0),
+ new CoordRec((float) 54.279, 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),
@@ -883,13 +883,13 @@ static final StrokeRec char67[] = {
/* char: 68 'D' */
static final CoordRec char68_stroke0[] = {
- new CoordRec((float) 11.96, (float) 100),
- new CoordRec((float) 11.96, (float) 0),
+ new CoordRec((float) 11.96, 100),
+ new CoordRec((float) 11.96, 0),
};
static final CoordRec char68_stroke1[] = {
- new CoordRec((float) 11.96, (float) 100),
- new CoordRec((float) 45.2933, (float) 100),
+ new CoordRec((float) 11.96, 100),
+ new CoordRec((float) 45.2933, 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),
@@ -898,8 +898,8 @@ static final CoordRec char68_stroke1[] = {
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),
+ new CoordRec((float) 45.2933, 0),
+ new CoordRec((float) 11.96, 0),
};
static final StrokeRec char68[] = {
@@ -910,13 +910,13 @@ static final StrokeRec char68[] = {
/* char: 69 'E' */
static final CoordRec char69_stroke0[] = {
- new CoordRec((float) 11.42, (float) 100),
- new CoordRec((float) 11.42, (float) 0),
+ new CoordRec((float) 11.42, 100),
+ new CoordRec((float) 11.42, 0),
};
static final CoordRec char69_stroke1[] = {
- new CoordRec((float) 11.42, (float) 100),
- new CoordRec((float) 73.3248, (float) 100),
+ new CoordRec((float) 11.42, 100),
+ new CoordRec((float) 73.3248, 100),
};
static final CoordRec char69_stroke2[] = {
@@ -925,8 +925,8 @@ static final CoordRec char69_stroke2[] = {
};
static final CoordRec char69_stroke3[] = {
- new CoordRec((float) 11.42, (float) 0),
- new CoordRec((float) 73.3248, (float) 0),
+ new CoordRec((float) 11.42, 0),
+ new CoordRec((float) 73.3248, 0),
};
static final StrokeRec char69[] = {
@@ -939,13 +939,13 @@ static final StrokeRec char69[] = {
/* char: 70 'F' */
static final CoordRec char70_stroke0[] = {
- new CoordRec((float) 11.42, (float) 100),
- new CoordRec((float) 11.42, (float) 0),
+ new CoordRec((float) 11.42, 100),
+ new CoordRec((float) 11.42, 0),
};
static final CoordRec char70_stroke1[] = {
- new CoordRec((float) 11.42, (float) 100),
- new CoordRec((float) 73.3248, (float) 100),
+ new CoordRec((float) 11.42, 100),
+ new CoordRec((float) 73.3248, 100),
};
static final CoordRec char70_stroke2[] = {
@@ -965,8 +965,8 @@ 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) 54.679, 100),
+ new CoordRec((float) 35.6314, 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),
@@ -975,8 +975,8 @@ static final CoordRec char71_stroke0[] = {
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) 35.6314, 0),
+ new CoordRec((float) 54.679, 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),
@@ -996,13 +996,13 @@ static final StrokeRec char71[] = {
/* char: 72 'H' */
static final CoordRec char72_stroke0[] = {
- new CoordRec((float) 11.42, (float) 100),
- new CoordRec((float) 11.42, (float) 0),
+ new CoordRec((float) 11.42, 100),
+ new CoordRec((float) 11.42, 0),
};
static final CoordRec char72_stroke1[] = {
- new CoordRec((float) 78.0867, (float) 100),
- new CoordRec((float) 78.0867, (float) 0),
+ new CoordRec((float) 78.0867, 100),
+ new CoordRec((float) 78.0867, 0),
};
static final CoordRec char72_stroke2[] = {
@@ -1019,8 +1019,8 @@ static final StrokeRec char72[] = {
/* char: 73 'I' */
static final CoordRec char73_stroke0[] = {
- new CoordRec((float) 10.86, (float) 100),
- new CoordRec((float) 10.86, (float) 0),
+ new CoordRec((float) 10.86, 100),
+ new CoordRec((float) 10.86, 0),
};
static final StrokeRec char73[] = {
@@ -1030,12 +1030,12 @@ static final StrokeRec char73[] = {
/* char: 74 'J' */
static final CoordRec char74_stroke0[] = {
- new CoordRec((float) 50.119, (float) 100),
+ new CoordRec((float) 50.119, 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) 31.0714, 0),
+ new CoordRec((float) 21.5476, 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),
@@ -1049,18 +1049,18 @@ static final StrokeRec char74[] = {
/* char: 75 'K' */
static final CoordRec char75_stroke0[] = {
- new CoordRec((float) 11.28, (float) 100),
- new CoordRec((float) 11.28, (float) 0),
+ new CoordRec((float) 11.28, 100),
+ new CoordRec((float) 11.28, 0),
};
static final CoordRec char75_stroke1[] = {
- new CoordRec((float) 77.9467, (float) 100),
+ new CoordRec((float) 77.9467, 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),
+ new CoordRec((float) 77.9467, 0),
};
static final StrokeRec char75[] = {
@@ -1072,13 +1072,13 @@ static final StrokeRec char75[] = {
/* char: 76 'L' */
static final CoordRec char76_stroke0[] = {
- new CoordRec((float) 11.68, (float) 100),
- new CoordRec((float) 11.68, (float) 0),
+ new CoordRec((float) 11.68, 100),
+ new CoordRec((float) 11.68, 0),
};
static final CoordRec char76_stroke1[] = {
- new CoordRec((float) 11.68, (float) 0),
- new CoordRec((float) 68.8229, (float) 0),
+ new CoordRec((float) 11.68, 0),
+ new CoordRec((float) 68.8229, 0),
};
static final StrokeRec char76[] = {
@@ -1089,23 +1089,23 @@ static final StrokeRec char76[] = {
/* char: 77 'M' */
static final CoordRec char77_stroke0[] = {
- new CoordRec((float) 10.86, (float) 100),
- new CoordRec((float) 10.86, (float) 0),
+ new CoordRec((float) 10.86, 100),
+ new CoordRec((float) 10.86, 0),
};
static final CoordRec char77_stroke1[] = {
- new CoordRec((float) 10.86, (float) 100),
- new CoordRec((float) 48.9552, (float) 0),
+ new CoordRec((float) 10.86, 100),
+ new CoordRec((float) 48.9552, 0),
};
static final CoordRec char77_stroke2[] = {
- new CoordRec((float) 87.0505, (float) 100),
- new CoordRec((float) 48.9552, (float) 0),
+ new CoordRec((float) 87.0505, 100),
+ new CoordRec((float) 48.9552, 0),
};
static final CoordRec char77_stroke3[] = {
- new CoordRec((float) 87.0505, (float) 100),
- new CoordRec((float) 87.0505, (float) 0),
+ new CoordRec((float) 87.0505, 100),
+ new CoordRec((float) 87.0505, 0),
};
static final StrokeRec char77[] = {
@@ -1118,18 +1118,18 @@ static final StrokeRec char77[] = {
/* char: 78 'N' */
static final CoordRec char78_stroke0[] = {
- new CoordRec((float) 11.14, (float) 100),
- new CoordRec((float) 11.14, (float) 0),
+ new CoordRec((float) 11.14, 100),
+ new CoordRec((float) 11.14, 0),
};
static final CoordRec char78_stroke1[] = {
- new CoordRec((float) 11.14, (float) 100),
- new CoordRec((float) 77.8067, (float) 0),
+ new CoordRec((float) 11.14, 100),
+ new CoordRec((float) 77.8067, 0),
};
static final CoordRec char78_stroke2[] = {
- new CoordRec((float) 77.8067, (float) 100),
- new CoordRec((float) 77.8067, (float) 0),
+ new CoordRec((float) 77.8067, 100),
+ new CoordRec((float) 77.8067, 0),
};
static final StrokeRec char78[] = {
@@ -1141,7 +1141,7 @@ static final StrokeRec char78[] = {
/* char: 79 'O' */
static final CoordRec char79_stroke0[] = {
- new CoordRec((float) 34.8114, (float) 100),
+ new CoordRec((float) 34.8114, 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),
@@ -1150,8 +1150,8 @@ static final CoordRec char79_stroke0[] = {
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) 34.8114, 0),
+ new CoordRec((float) 53.859, 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),
@@ -1160,8 +1160,8 @@ static final CoordRec char79_stroke0[] = {
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),
+ new CoordRec((float) 53.859, 100),
+ new CoordRec((float) 34.8114, 100),
};
static final StrokeRec char79[] = {
@@ -1171,13 +1171,13 @@ static final StrokeRec char79[] = {
/* char: 80 'P' */
static final CoordRec char80_stroke0[] = {
- new CoordRec((float) 12.1, (float) 100),
- new CoordRec((float) 12.1, (float) 0),
+ new CoordRec((float) 12.1, 100),
+ new CoordRec((float) 12.1, 0),
};
static final CoordRec char80_stroke1[] = {
- new CoordRec((float) 12.1, (float) 100),
- new CoordRec((float) 54.9571, (float) 100),
+ new CoordRec((float) 12.1, 100),
+ new CoordRec((float) 54.9571, 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),
@@ -1196,7 +1196,7 @@ static final StrokeRec char80[] = {
/* char: 81 'Q' */
static final CoordRec char81_stroke0[] = {
- new CoordRec((float) 33.8714, (float) 100),
+ new CoordRec((float) 33.8714, 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),
@@ -1205,8 +1205,8 @@ static final CoordRec char81_stroke0[] = {
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) 33.8714, 0),
+ new CoordRec((float) 52.919, 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),
@@ -1215,8 +1215,8 @@ static final CoordRec char81_stroke0[] = {
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),
+ new CoordRec((float) 52.919, 100),
+ new CoordRec((float) 33.8714, 100),
};
static final CoordRec char81_stroke1[] = {
@@ -1232,13 +1232,13 @@ static final StrokeRec char81[] = {
/* char: 82 'R' */
static final CoordRec char82_stroke0[] = {
- new CoordRec((float) 11.68, (float) 100),
- new CoordRec((float) 11.68, (float) 0),
+ new CoordRec((float) 11.68, 100),
+ new CoordRec((float) 11.68, 0),
};
static final CoordRec char82_stroke1[] = {
- new CoordRec((float) 11.68, (float) 100),
- new CoordRec((float) 54.5371, (float) 100),
+ new CoordRec((float) 11.68, 100),
+ new CoordRec((float) 54.5371, 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),
@@ -1251,7 +1251,7 @@ static final CoordRec char82_stroke1[] = {
static final CoordRec char82_stroke2[] = {
new CoordRec((float) 45.0133, (float) 52.381),
- new CoordRec((float) 78.3467, (float) 0),
+ new CoordRec((float) 78.3467, 0),
};
static final StrokeRec char82[] = {
@@ -1265,11 +1265,11 @@ static final StrokeRec char82[] = {
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) 50.8571, 100),
+ new CoordRec((float) 31.8095, 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(8, (float) 85.7143),
+ new CoordRec(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),
@@ -1279,10 +1279,10 @@ static final CoordRec char83_stroke0[] = {
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) 50.8571, 0),
+ new CoordRec((float) 31.8095, 0),
new CoordRec((float) 17.5238, (float) 4.7619),
- new CoordRec((float) 8, (float) 14.2857),
+ new CoordRec(8, (float) 14.2857),
};
static final StrokeRec char83[] = {
@@ -1292,13 +1292,13 @@ static final StrokeRec char83[] = {
/* char: 84 'T' */
static final CoordRec char84_stroke0[] = {
- new CoordRec((float) 35.6933, (float) 100),
- new CoordRec((float) 35.6933, (float) 0),
+ new CoordRec((float) 35.6933, 100),
+ new CoordRec((float) 35.6933, 0),
};
static final CoordRec char84_stroke1[] = {
- new CoordRec((float) 2.36, (float) 100),
- new CoordRec((float) 69.0267, (float) 100),
+ new CoordRec((float) 2.36, 100),
+ new CoordRec((float) 69.0267, 100),
};
static final StrokeRec char84[] = {
@@ -1309,16 +1309,16 @@ static final StrokeRec char84[] = {
/* char: 85 'U' */
static final CoordRec char85_stroke0[] = {
- new CoordRec((float) 11.54, (float) 100),
+ new CoordRec((float) 11.54, 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) 40.1114, 0),
+ new CoordRec((float) 49.6352, 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),
+ new CoordRec((float) 78.2067, 100),
};
static final StrokeRec char85[] = {
@@ -1328,13 +1328,13 @@ static final StrokeRec char85[] = {
/* char: 86 'V' */
static final CoordRec char86_stroke0[] = {
- new CoordRec((float) 2.36, (float) 100),
- new CoordRec((float) 40.4552, (float) 0),
+ new CoordRec((float) 2.36, 100),
+ new CoordRec((float) 40.4552, 0),
};
static final CoordRec char86_stroke1[] = {
- new CoordRec((float) 78.5505, (float) 100),
- new CoordRec((float) 40.4552, (float) 0),
+ new CoordRec((float) 78.5505, 100),
+ new CoordRec((float) 40.4552, 0),
};
static final StrokeRec char86[] = {
@@ -1345,23 +1345,23 @@ static final StrokeRec char86[] = {
/* char: 87 'W' */
static final CoordRec char87_stroke0[] = {
- new CoordRec((float) 2.22, (float) 100),
- new CoordRec((float) 26.0295, (float) 0),
+ new CoordRec((float) 2.22, 100),
+ new CoordRec((float) 26.0295, 0),
};
static final CoordRec char87_stroke1[] = {
- new CoordRec((float) 49.839, (float) 100),
- new CoordRec((float) 26.0295, (float) 0),
+ new CoordRec((float) 49.839, 100),
+ new CoordRec((float) 26.0295, 0),
};
static final CoordRec char87_stroke2[] = {
- new CoordRec((float) 49.839, (float) 100),
- new CoordRec((float) 73.6486, (float) 0),
+ new CoordRec((float) 49.839, 100),
+ new CoordRec((float) 73.6486, 0),
};
static final CoordRec char87_stroke3[] = {
- new CoordRec((float) 97.4581, (float) 100),
- new CoordRec((float) 73.6486, (float) 0),
+ new CoordRec((float) 97.4581, 100),
+ new CoordRec((float) 73.6486, 0),
};
static final StrokeRec char87[] = {
@@ -1374,13 +1374,13 @@ static final StrokeRec char87[] = {
/* char: 88 'X' */
static final CoordRec char88_stroke0[] = {
- new CoordRec((float) 2.5, (float) 100),
- new CoordRec((float) 69.1667, (float) 0),
+ new CoordRec((float) 2.5, 100),
+ new CoordRec((float) 69.1667, 0),
};
static final CoordRec char88_stroke1[] = {
- new CoordRec((float) 69.1667, (float) 100),
- new CoordRec((float) 2.5, (float) 0),
+ new CoordRec((float) 69.1667, 100),
+ new CoordRec((float) 2.5, 0),
};
static final StrokeRec char88[] = {
@@ -1391,13 +1391,13 @@ static final StrokeRec char88[] = {
/* char: 89 'Y' */
static final CoordRec char89_stroke0[] = {
- new CoordRec((float) 1.52, (float) 100),
+ new CoordRec((float) 1.52, 100),
new CoordRec((float) 39.6152, (float) 52.381),
- new CoordRec((float) 39.6152, (float) 0),
+ new CoordRec((float) 39.6152, 0),
};
static final CoordRec char89_stroke1[] = {
- new CoordRec((float) 77.7105, (float) 100),
+ new CoordRec((float) 77.7105, 100),
new CoordRec((float) 39.6152, (float) 52.381),
};
@@ -1409,18 +1409,18 @@ static final StrokeRec char89[] = {
/* char: 90 'Z' */
static final CoordRec char90_stroke0[] = {
- new CoordRec((float) 69.1667, (float) 100),
- new CoordRec((float) 2.5, (float) 0),
+ new CoordRec((float) 69.1667, 100),
+ new CoordRec((float) 2.5, 0),
};
static final CoordRec char90_stroke1[] = {
- new CoordRec((float) 2.5, (float) 100),
- new CoordRec((float) 69.1667, (float) 100),
+ new CoordRec((float) 2.5, 100),
+ new CoordRec((float) 69.1667, 100),
};
static final CoordRec char90_stroke2[] = {
- new CoordRec((float) 2.5, (float) 0),
- new CoordRec((float) 69.1667, (float) 0),
+ new CoordRec((float) 2.5, 0),
+ new CoordRec((float) 69.1667, 0),
};
static final StrokeRec char90[] = {
@@ -1461,7 +1461,7 @@ static final StrokeRec char91[] = {
/* char: 92 '\' */
static final CoordRec char92_stroke0[] = {
- new CoordRec((float) 5.84, (float) 100),
+ new CoordRec((float) 5.84, 100),
new CoordRec((float) 72.5067, (float) -14.2857),
};
@@ -1532,12 +1532,12 @@ static final StrokeRec char95[] = {
/* char: 96 '`' */
static final CoordRec char96_stroke0[] = {
- new CoordRec((float) 33.0219, (float) 100),
+ new CoordRec((float) 33.0219, 100),
new CoordRec((float) 56.8314, (float) 71.4286),
};
static final CoordRec char96_stroke1[] = {
- new CoordRec((float) 33.0219, (float) 100),
+ new CoordRec((float) 33.0219, 100),
new CoordRec((float) 28.26, (float) 95.2381),
new CoordRec((float) 56.8314, (float) 71.4286),
};
@@ -1551,7 +1551,7 @@ static final StrokeRec char96[] = {
static final CoordRec char97_stroke0[] = {
new CoordRec((float) 63.8229, (float) 66.6667),
- new CoordRec((float) 63.8229, (float) 0),
+ new CoordRec((float) 63.8229, 0),
};
static final CoordRec char97_stroke1[] = {
@@ -1565,8 +1565,8 @@ static final CoordRec char97_stroke1[] = {
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) 30.4895, 0),
+ new CoordRec((float) 44.7752, 0),
new CoordRec((float) 54.299, (float) 4.7619),
new CoordRec((float) 63.8229, (float) 14.2857),
};
@@ -1579,8 +1579,8 @@ static final StrokeRec char97[] = {
/* char: 98 'b' */
static final CoordRec char98_stroke0[] = {
- new CoordRec((float) 8.76, (float) 100),
- new CoordRec((float) 8.76, (float) 0),
+ new CoordRec((float) 8.76, 100),
+ new CoordRec((float) 8.76, 0),
};
static final CoordRec char98_stroke1[] = {
@@ -1594,8 +1594,8 @@ static final CoordRec char98_stroke1[] = {
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) 42.0933, 0),
+ new CoordRec((float) 27.8076, 0),
new CoordRec((float) 18.2838, (float) 4.7619),
new CoordRec((float) 8.76, (float) 14.2857),
};
@@ -1618,8 +1618,8 @@ static final CoordRec char99_stroke0[] = {
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) 29.3295, 0),
+ new CoordRec((float) 43.6152, 0),
new CoordRec((float) 53.139, (float) 4.7619),
new CoordRec((float) 62.6629, (float) 14.2857),
};
@@ -1631,8 +1631,8 @@ static final StrokeRec char99[] = {
/* char: 100 'd' */
static final CoordRec char100_stroke0[] = {
- new CoordRec((float) 61.7829, (float) 100),
- new CoordRec((float) 61.7829, (float) 0),
+ new CoordRec((float) 61.7829, 100),
+ new CoordRec((float) 61.7829, 0),
};
static final CoordRec char100_stroke1[] = {
@@ -1646,8 +1646,8 @@ static final CoordRec char100_stroke1[] = {
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) 28.4495, 0),
+ new CoordRec((float) 42.7352, 0),
new CoordRec((float) 52.259, (float) 4.7619),
new CoordRec((float) 61.7829, (float) 14.2857),
};
@@ -1673,8 +1673,8 @@ static final CoordRec char101_stroke0[] = {
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) 29.5295, 0),
+ new CoordRec((float) 43.8152, 0),
new CoordRec((float) 53.339, (float) 4.7619),
new CoordRec((float) 62.8629, (float) 14.2857),
};
@@ -1686,11 +1686,11 @@ static final StrokeRec char101[] = {
/* 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) 38.7752, 100),
+ new CoordRec((float) 29.2514, 100),
new CoordRec((float) 19.7276, (float) 95.2381),
new CoordRec((float) 14.9657, (float) 80.9524),
- new CoordRec((float) 14.9657, (float) 0),
+ new CoordRec((float) 14.9657, 0),
};
static final CoordRec char102_stroke1[] = {
@@ -1726,8 +1726,8 @@ static final CoordRec char103_stroke1[] = {
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) 29.1695, 0),
+ new CoordRec((float) 43.4552, 0),
new CoordRec((float) 52.979, (float) 4.7619),
new CoordRec((float) 62.5029, (float) 14.2857),
};
@@ -1740,8 +1740,8 @@ static final StrokeRec char103[] = {
/* char: 104 'h' */
static final CoordRec char104_stroke0[] = {
- new CoordRec((float) 9.6, (float) 100),
- new CoordRec((float) 9.6, (float) 0),
+ new CoordRec((float) 9.6, 100),
+ new CoordRec((float) 9.6, 0),
};
static final CoordRec char104_stroke1[] = {
@@ -1751,7 +1751,7 @@ static final CoordRec char104_stroke1[] = {
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),
+ new CoordRec((float) 61.981, 0),
};
static final StrokeRec char104[] = {
@@ -1762,16 +1762,16 @@ static final StrokeRec char104[] = {
/* char: 105 'i' */
static final CoordRec char105_stroke0[] = {
- new CoordRec((float) 10.02, (float) 100),
+ new CoordRec((float) 10.02, 100),
new CoordRec((float) 14.7819, (float) 95.2381),
- new CoordRec((float) 19.5438, (float) 100),
+ new CoordRec((float) 19.5438, 100),
new CoordRec((float) 14.7819, (float) 104.762),
- new CoordRec((float) 10.02, (float) 100),
+ new CoordRec((float) 10.02, 100),
};
static final CoordRec char105_stroke1[] = {
new CoordRec((float) 14.7819, (float) 66.6667),
- new CoordRec((float) 14.7819, (float) 0),
+ new CoordRec((float) 14.7819, 0),
};
static final StrokeRec char105[] = {
@@ -1782,11 +1782,11 @@ static final StrokeRec char105[] = {
/* char: 106 'j' */
static final CoordRec char106_stroke0[] = {
- new CoordRec((float) 17.3876, (float) 100),
+ new CoordRec((float) 17.3876, 100),
new CoordRec((float) 22.1495, (float) 95.2381),
- new CoordRec((float) 26.9114, (float) 100),
+ new CoordRec((float) 26.9114, 100),
new CoordRec((float) 22.1495, (float) 104.762),
- new CoordRec((float) 17.3876, (float) 100),
+ new CoordRec((float) 17.3876, 100),
};
static final CoordRec char106_stroke1[] = {
@@ -1805,8 +1805,8 @@ static final StrokeRec char106[] = {
/* char: 107 'k' */
static final CoordRec char107_stroke0[] = {
- new CoordRec((float) 9.6, (float) 100),
- new CoordRec((float) 9.6, (float) 0),
+ new CoordRec((float) 9.6, 100),
+ new CoordRec((float) 9.6, 0),
};
static final CoordRec char107_stroke1[] = {
@@ -1816,7 +1816,7 @@ static final CoordRec char107_stroke1[] = {
static final CoordRec char107_stroke2[] = {
new CoordRec((float) 28.6476, (float) 38.0952),
- new CoordRec((float) 61.981, (float) 0),
+ new CoordRec((float) 61.981, 0),
};
static final StrokeRec char107[] = {
@@ -1828,8 +1828,8 @@ static final StrokeRec char107[] = {
/* char: 108 'l' */
static final CoordRec char108_stroke0[] = {
- new CoordRec((float) 10.02, (float) 100),
- new CoordRec((float) 10.02, (float) 0),
+ new CoordRec((float) 10.02, 100),
+ new CoordRec((float) 10.02, 0),
};
static final StrokeRec char108[] = {
@@ -1840,7 +1840,7 @@ static final StrokeRec char108[] = {
static final CoordRec char109_stroke0[] = {
new CoordRec((float) 9.6, (float) 66.6667),
- new CoordRec((float) 9.6, (float) 0),
+ new CoordRec((float) 9.6, 0),
};
static final CoordRec char109_stroke1[] = {
@@ -1850,7 +1850,7 @@ static final CoordRec char109_stroke1[] = {
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),
+ new CoordRec((float) 61.981, 0),
};
static final CoordRec char109_stroke2[] = {
@@ -1860,7 +1860,7 @@ static final CoordRec char109_stroke2[] = {
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),
+ new CoordRec((float) 114.362, 0),
};
static final StrokeRec char109[] = {
@@ -1873,7 +1873,7 @@ static final StrokeRec char109[] = {
static final CoordRec char110_stroke0[] = {
new CoordRec((float) 9.18, (float) 66.6667),
- new CoordRec((float) 9.18, (float) 0),
+ new CoordRec((float) 9.18, 0),
};
static final CoordRec char110_stroke1[] = {
@@ -1883,7 +1883,7 @@ static final CoordRec char110_stroke1[] = {
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),
+ new CoordRec((float) 61.561, 0),
};
static final StrokeRec char110[] = {
@@ -1901,8 +1901,8 @@ static final CoordRec char111_stroke0[] = {
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) 28.7895, 0),
+ new CoordRec((float) 43.0752, 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),
@@ -1935,8 +1935,8 @@ static final CoordRec char112_stroke1[] = {
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) 42.7933, 0),
+ new CoordRec((float) 28.5076, 0),
new CoordRec((float) 18.9838, (float) 4.7619),
new CoordRec((float) 9.46, (float) 14.2857),
};
@@ -1964,8 +1964,8 @@ static final CoordRec char113_stroke1[] = {
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) 28.6495, 0),
+ new CoordRec((float) 42.9352, 0),
new CoordRec((float) 52.459, (float) 4.7619),
new CoordRec((float) 61.9829, (float) 14.2857),
};
@@ -1979,7 +1979,7 @@ static final StrokeRec char113[] = {
static final CoordRec char114_stroke0[] = {
new CoordRec((float) 9.46, (float) 66.6667),
- new CoordRec((float) 9.46, (float) 0),
+ new CoordRec((float) 9.46, 0),
};
static final CoordRec char114_stroke1[] = {
@@ -2011,8 +2011,8 @@ static final CoordRec char115_stroke0[] = {
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) 38.0333, 0),
+ new CoordRec((float) 23.7476, 0),
new CoordRec((float) 9.4619, (float) 4.7619),
new CoordRec((float) 4.7, (float) 14.2857),
};
@@ -2024,11 +2024,11 @@ static final StrokeRec char115[] = {
/* char: 116 't' */
static final CoordRec char116_stroke0[] = {
- new CoordRec((float) 14.8257, (float) 100),
+ new CoordRec((float) 14.8257, 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),
+ new CoordRec((float) 29.1114, 0),
+ new CoordRec((float) 38.6352, 0),
};
static final CoordRec char116_stroke1[] = {
@@ -2047,15 +2047,15 @@ 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) 23.7457, 0),
+ new CoordRec((float) 38.0314, 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),
+ new CoordRec((float) 61.841, 0),
};
static final StrokeRec char117[] = {
@@ -2067,12 +2067,12 @@ static final StrokeRec char117[] = {
static final CoordRec char118_stroke0[] = {
new CoordRec((float) 1.8, (float) 66.6667),
- new CoordRec((float) 30.3714, (float) 0),
+ new CoordRec((float) 30.3714, 0),
};
static final CoordRec char118_stroke1[] = {
new CoordRec((float) 58.9429, (float) 66.6667),
- new CoordRec((float) 30.3714, (float) 0),
+ new CoordRec((float) 30.3714, 0),
};
static final StrokeRec char118[] = {
@@ -2084,22 +2084,22 @@ static final StrokeRec char118[] = {
static final CoordRec char119_stroke0[] = {
new CoordRec((float) 2.5, (float) 66.6667),
- new CoordRec((float) 21.5476, (float) 0),
+ new CoordRec((float) 21.5476, 0),
};
static final CoordRec char119_stroke1[] = {
new CoordRec((float) 40.5952, (float) 66.6667),
- new CoordRec((float) 21.5476, (float) 0),
+ new CoordRec((float) 21.5476, 0),
};
static final CoordRec char119_stroke2[] = {
new CoordRec((float) 40.5952, (float) 66.6667),
- new CoordRec((float) 59.6429, (float) 0),
+ new CoordRec((float) 59.6429, 0),
};
static final CoordRec char119_stroke3[] = {
new CoordRec((float) 78.6905, (float) 66.6667),
- new CoordRec((float) 59.6429, (float) 0),
+ new CoordRec((float) 59.6429, 0),
};
static final StrokeRec char119[] = {
@@ -2113,12 +2113,12 @@ static final StrokeRec char119[] = {
static final CoordRec char120_stroke0[] = {
new CoordRec((float) 1.66, (float) 66.6667),
- new CoordRec((float) 54.041, (float) 0),
+ new CoordRec((float) 54.041, 0),
};
static final CoordRec char120_stroke1[] = {
new CoordRec((float) 54.041, (float) 66.6667),
- new CoordRec((float) 1.66, (float) 0),
+ new CoordRec((float) 1.66, 0),
};
static final StrokeRec char120[] = {
@@ -2130,12 +2130,12 @@ static final StrokeRec char120[] = {
static final CoordRec char121_stroke0[] = {
new CoordRec((float) 6.5619, (float) 66.6667),
- new CoordRec((float) 35.1333, (float) 0),
+ new CoordRec((float) 35.1333, 0),
};
static final CoordRec char121_stroke1[] = {
new CoordRec((float) 63.7048, (float) 66.6667),
- new CoordRec((float) 35.1333, (float) 0),
+ new CoordRec((float) 35.1333, 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),
@@ -2151,7 +2151,7 @@ static final StrokeRec char121[] = {
static final CoordRec char122_stroke0[] = {
new CoordRec((float) 56.821, (float) 66.6667),
- new CoordRec((float) 4.44, (float) 0),
+ new CoordRec((float) 4.44, 0),
};
static final CoordRec char122_stroke1[] = {
@@ -2160,8 +2160,8 @@ static final CoordRec char122_stroke1[] = {
};
static final CoordRec char122_stroke2[] = {
- new CoordRec((float) 4.44, (float) 0),
- new CoordRec((float) 56.821, (float) 0),
+ new CoordRec((float) 4.44, 0),
+ new CoordRec((float) 56.821, 0),
};
static final StrokeRec char122[] = {
@@ -2176,7 +2176,7 @@ 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, 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),
@@ -2199,7 +2199,7 @@ static final CoordRec char123_stroke1[] = {
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) 21.6657, 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),
@@ -2241,7 +2241,7 @@ 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, 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),
@@ -2264,7 +2264,7 @@ static final CoordRec char125_stroke1[] = {
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) 18.7038, 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),
@@ -2327,7 +2327,7 @@ static final StrokeRec char126[] = {
/* char: 127 */
static final CoordRec char127_stroke0[] = {
- new CoordRec((float) 52.381, (float) 100),
+ new CoordRec((float) 52.381, 100),
new CoordRec((float) 14.2857, (float) -33.3333),
};
@@ -2335,12 +2335,12 @@ 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(0, (float) 38.0952),
+ new CoordRec(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) 28.5714, 0),
+ new CoordRec((float) 38.0952, 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),
@@ -2357,38 +2357,38 @@ static final StrokeRec char127[] = {
};
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, /* char0 */ null, 0, 0 ),
+ new StrokeCharRec( 0, /* char1 */ null, 0, 0 ),
+ new StrokeCharRec( 0, /* char2 */ null, 0, 0 ),
+ new StrokeCharRec( 0, /* char3 */ null, 0, 0 ),
+ new StrokeCharRec( 0, /* char4 */ null, 0, 0 ),
+ new StrokeCharRec( 0, /* char5 */ null, 0, 0 ),
+ new StrokeCharRec( 0, /* char6 */ null, 0, 0 ),
+ new StrokeCharRec( 0, /* char7 */ null, 0, 0 ),
+ new StrokeCharRec( 0, /* char8 */ null, 0, 0 ),
+ new StrokeCharRec( 0, /* char9 */ null, 0, 0 ),
+ new StrokeCharRec( 0, /* char10 */ null, 0, 0 ),
+ new StrokeCharRec( 0, /* char11 */ null, 0, 0 ),
+ new StrokeCharRec( 0, /* char12 */ null, 0, 0 ),
+ new StrokeCharRec( 0, /* char13 */ null, 0, 0 ),
+ new StrokeCharRec( 0, /* char14 */ null, 0, 0 ),
+ new StrokeCharRec( 0, /* char15 */ null, 0, 0 ),
+ new StrokeCharRec( 0, /* char16 */ null, 0, 0 ),
+ new StrokeCharRec( 0, /* char17 */ null, 0, 0 ),
+ new StrokeCharRec( 0, /* char18 */ null, 0, 0 ),
+ new StrokeCharRec( 0, /* char19 */ null, 0, 0 ),
+ new StrokeCharRec( 0, /* char20 */ null, 0, 0 ),
+ new StrokeCharRec( 0, /* char21 */ null, 0, 0 ),
+ new StrokeCharRec( 0, /* char22 */ null, 0, 0 ),
+ new StrokeCharRec( 0, /* char23 */ null, 0, 0 ),
+ new StrokeCharRec( 0, /* char24 */ null, 0, 0 ),
+ new StrokeCharRec( 0, /* char25 */ null, 0, 0 ),
+ new StrokeCharRec( 0, /* char26 */ null, 0, 0 ),
+ new StrokeCharRec( 0, /* char27 */ null, 0, 0 ),
+ new StrokeCharRec( 0, /* char28 */ null, 0, 0 ),
+ new StrokeCharRec( 0, /* char29 */ null, 0, 0 ),
+ new StrokeCharRec( 0, /* char30 */ null, 0, 0 ),
+ new StrokeCharRec( 0, /* char31 */ null, 0, 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 ),
diff --git a/src/jogl/classes/com/jogamp/opengl/util/gl2/StrokeCharRec.java b/src/jogl/classes/com/jogamp/opengl/util/gl2/StrokeCharRec.java
index 515212f0e..59935e358 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/gl2/StrokeCharRec.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/gl2/StrokeCharRec.java
@@ -51,10 +51,10 @@ class StrokeCharRec {
public float center;
public float right;
- public StrokeCharRec(int num_strokes,
- StrokeRec[] stroke,
- float center,
- float right) {
+ public StrokeCharRec(final int num_strokes,
+ final StrokeRec[] stroke,
+ final float center,
+ final float right) {
this.num_strokes = num_strokes;
this.stroke = stroke;
this.center = center;
diff --git a/src/jogl/classes/com/jogamp/opengl/util/gl2/StrokeFontRec.java b/src/jogl/classes/com/jogamp/opengl/util/gl2/StrokeFontRec.java
index 5335c8523..5810ac38a 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/gl2/StrokeFontRec.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/gl2/StrokeFontRec.java
@@ -52,11 +52,11 @@ class StrokeFontRec {
public float top;
public float bottom;
- public StrokeFontRec(String name,
- int num_chars,
- StrokeCharRec[] ch,
- float top,
- float bottom) {
+ public StrokeFontRec(final String name,
+ final int num_chars,
+ final StrokeCharRec[] ch,
+ final float top,
+ final float bottom) {
this.name = name;
this.num_chars = num_chars;
this.ch = ch;
diff --git a/src/jogl/classes/com/jogamp/opengl/util/gl2/StrokeRec.java b/src/jogl/classes/com/jogamp/opengl/util/gl2/StrokeRec.java
index b0c91c696..fcb7c912a 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/gl2/StrokeRec.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/gl2/StrokeRec.java
@@ -49,8 +49,8 @@ class StrokeRec {
public int num_coords;
public CoordRec[] coord;
- public StrokeRec(int num_coords,
- CoordRec[] coord) {
+ public StrokeRec(final int num_coords,
+ final CoordRec[] coord) {
this.num_coords = num_coords;
this.coord = coord;
}
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 7c6a40468..4a3e5b2e1 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java
@@ -96,7 +96,7 @@ public class ShaderCode {
*
* @throws IllegalArgumentException if count and source.length do not match
*/
- public ShaderCode(int type, int count, CharSequence[][] source) {
+ public ShaderCode(final int type, final int count, final CharSequence[][] source) {
if(source.length != count) {
throw new IllegalArgumentException("shader number ("+count+") and sourceFiles array ("+source.length+") of different lenght.");
}
@@ -126,7 +126,7 @@ public class ShaderCode {
* @param count number of shaders
* @param binary binary buffer containing the shader binaries,
*/
- public ShaderCode(int type, int count, int binFormat, Buffer binary) {
+ public ShaderCode(final int type, final int count, final int binFormat, final Buffer binary) {
switch (type) {
case GL2ES2.GL_VERTEX_SHADER:
case GL2ES2.GL_FRAGMENT_SHADER:
@@ -162,7 +162,7 @@ public class ShaderCode {
* @throws IllegalArgumentException if count and sourceFiles.length do not match
* @see #readShaderSource(Class, String)
*/
- public static ShaderCode create(GL2ES2 gl, int type, int count, Class> context, String[] sourceFiles, boolean mutableStringBuilder) {
+ public static ShaderCode create(final GL2ES2 gl, final int type, final int count, final Class> context, final String[] sourceFiles, final boolean mutableStringBuilder) {
if(null != gl && !ShaderUtil.isShaderCompilerAvailable(gl)) {
return null;
}
@@ -174,7 +174,7 @@ public class ShaderCode {
for(int i=0; i context, int binFormat, String binaryFile) {
+ public static ShaderCode create(final int type, final int count, final Class> context, int binFormat, final String binaryFile) {
ByteBuffer shaderBinary = null;
if(null!=binaryFile && 0<=binFormat) {
try {
shaderBinary = readShaderBinary(context, binaryFile);
- } catch (IOException ioe) {
+ } catch (final IOException ioe) {
throw new RuntimeException("readShaderBinary("+binaryFile+") error: ", ioe);
}
if(null == shaderBinary) {
@@ -238,7 +238,7 @@ public class ShaderCode {
*
* @see #create(GL2ES2, int, Class, String, String, String, boolean)
*/
- public static String getFileSuffix(boolean binary, int type) {
+ public static String getFileSuffix(final boolean binary, final int type) {
switch (type) {
case GL2ES2.GL_VERTEX_SHADER:
return binary?SUFFIX_VERTEX_BINARY:SUFFIX_VERTEX_SOURCE;
@@ -261,7 +261,7 @@ public class ShaderCode {
*
* @see #create(GL2ES2, int, Class, String, String, String, boolean)
*/
- public static String getBinarySubPath(int binFormat) {
+ public static String getBinarySubPath(final int binFormat) {
switch (binFormat) {
case GLES2.GL_NVIDIA_PLATFORM_BINARY_NV:
return SUB_PATH_NVIDIA;
@@ -347,9 +347,9 @@ public class ShaderCode {
* @see ShaderUtil#getShaderBinaryFormats(GL)
* @see #getBinarySubPath(int)
*/
- public static ShaderCode create(GL2ES2 gl, int type, int count, Class> context,
- String srcRoot, String[] srcBasenames, String binRoot, String binBasename,
- boolean mutableStringBuilder) {
+ public static ShaderCode create(final GL2ES2 gl, final int type, final int count, final Class> context,
+ final String srcRoot, final String[] srcBasenames, final String binRoot, final String binBasename,
+ final boolean mutableStringBuilder) {
ShaderCode res = null;
final String srcPath[];
String srcPathString = null;
@@ -376,10 +376,10 @@ public class ShaderCode {
srcPath = null;
}
if( null!=binBasename ) {
- Set binFmts = ShaderUtil.getShaderBinaryFormats(gl);
+ final Set binFmts = ShaderUtil.getShaderBinaryFormats(gl);
final String binSuffix = getFileSuffix(true, type);
- for(Iterator iter=binFmts.iterator(); iter.hasNext(); ) {
- int bFmt = iter.next().intValue();
+ for(final Iterator iter=binFmts.iterator(); iter.hasNext(); ) {
+ final int bFmt = iter.next().intValue();
final String bFmtPath = getBinarySubPath(bFmt);
if(null==bFmtPath) continue;
binFileName = binRoot + '/' + bFmtPath + '/' + binBasename + "." + binSuffix;
@@ -447,8 +447,8 @@ public class ShaderCode {
*
* @see #create(GL2ES2, int, int, Class, String, String[], String, String)
*/
- public static ShaderCode create(GL2ES2 gl, int type, Class> context,
- String srcRoot, String binRoot, String basename, boolean mutableStringBuilder) {
+ public static ShaderCode create(final GL2ES2 gl, final int type, final Class> context,
+ final String srcRoot, final String binRoot, final String basename, final boolean mutableStringBuilder) {
return create(gl, type, 1, context, srcRoot, new String[] { basename }, binRoot, basename, mutableStringBuilder );
}
@@ -460,7 +460,7 @@ public class ShaderCode {
public int shaderType() { return shaderType; }
public String shaderTypeStr() { return shaderTypeStr(shaderType); }
- public static String shaderTypeStr(int type) {
+ public static String shaderTypeStr(final int type) {
switch (type) {
case GL2ES2.GL_VERTEX_SHADER:
return "VERTEX_SHADER";
@@ -480,10 +480,10 @@ public class ShaderCode {
public IntBuffer shader() { return shader; }
- public boolean compile(GL2ES2 gl) {
+ public boolean compile(final GL2ES2 gl) {
return compile(gl, null);
}
- public boolean compile(GL2ES2 gl, PrintStream verboseOut) {
+ public boolean compile(final GL2ES2 gl, final PrintStream verboseOut) {
if(isValid()) return true;
// Create & Compile the vertex/fragment shader objects
@@ -503,7 +503,7 @@ public class ShaderCode {
return valid;
}
- public void destroy(GL2ES2 gl) {
+ public void destroy(final GL2ES2 gl) {
if(isValid()) {
if(null!=gl) {
ShaderUtil.deleteShader(gl, shader());
@@ -521,7 +521,7 @@ public class ShaderCode {
}
@Override
- public boolean equals(Object obj) {
+ public boolean equals(final Object obj) {
if(this==obj) { return true; }
if(obj instanceof ShaderCode) {
return id()==((ShaderCode)obj).id();
@@ -534,7 +534,7 @@ public class ShaderCode {
}
@Override
public String toString() {
- StringBuilder buf = new StringBuilder("ShaderCode[id="+id+", type="+shaderTypeStr()+", valid="+valid+", shader: ");
+ final StringBuilder buf = new StringBuilder("ShaderCode[id="+id+", type="+shaderTypeStr()+", valid="+valid+", shader: ");
for(int i=0; i");
return;
@@ -560,7 +560,7 @@ public class ShaderCode {
if(i>=sourceCount) {
out.println("");
} else {
- CharSequence[] src = shaderSource[i];
+ final CharSequence[] src = shaderSource[i];
int lineno=0;
for(int j=0; jStringBuilder
*/
- public int insertShaderSource(int shaderIdx, String tag, int fromIndex, CharSequence data) {
+ public int insertShaderSource(final int shaderIdx, final String tag, final int fromIndex, final CharSequence data) {
if(null==shaderSource) {
throw new IllegalStateException("no shader source");
}
@@ -650,7 +650,7 @@ public class ShaderCode {
*
* @throws IllegalStateException if the shader source's CharSequence is immutable, i.e. not of type StringBuilder
*/
- public int replaceInShaderSource(String oldName, String newName) {
+ public int replaceInShaderSource(final String oldName, final String newName) {
if(null==shaderSource) {
throw new IllegalStateException("no shader source");
}
@@ -670,9 +670,9 @@ public class ShaderCode {
final StringBuilder sb = (StringBuilder)src[j];
int curPos = 0;
while(curPosStringBuilder
*/
- public int insertShaderSource(int shaderIdx, int position, CharSequence data) {
+ public int insertShaderSource(final int shaderIdx, int position, final CharSequence data) {
if(null==shaderSource) {
throw new IllegalStateException("no shader source");
}
@@ -750,7 +750,7 @@ public class ShaderCode {
* @throws IllegalStateException if the shader source's CharSequence is immutable, i.e. not of type StringBuilder
* @see IOUtil#getResource(Class, String)
*/
- public int insertShaderSource(int shaderIdx, int position, Class> context, String path) throws IOException {
+ public int insertShaderSource(final int shaderIdx, final int position, final Class> context, final String path) throws IOException {
final CharSequence data = readShaderSource(context, path, true);
if( null != data ) {
return insertShaderSource(shaderIdx, position, data);
@@ -760,7 +760,7 @@ public class ShaderCode {
}
@SuppressWarnings("resource")
- private static int readShaderSource(Class> context, URLConnection conn, StringBuilder result, int lineno) throws IOException {
+ private static int readShaderSource(final Class> context, final URLConnection conn, final StringBuilder result, int lineno) throws IOException {
if(DEBUG_CODE) {
if(0 == lineno) {
result.append("// "+conn.getURL().toExternalForm()+"\n");
@@ -774,7 +774,7 @@ public class ShaderCode {
while ((line = reader.readLine()) != null) {
lineno++;
if (line.startsWith("#include ")) {
- String includeFile = line.substring(9).trim();
+ final String includeFile = line.substring(9).trim();
URLConnection nextConn = null;
// Try relative of current shader location
@@ -805,7 +805,7 @@ public class ShaderCode {
* @param result
* @throws IOException
*/
- public static void readShaderSource(Class> context, URLConnection conn, StringBuilder result) throws IOException {
+ public static void readShaderSource(final Class> context, final URLConnection conn, final StringBuilder result) throws IOException {
readShaderSource(context, conn, result, 0);
}
@@ -829,12 +829,12 @@ public class ShaderCode {
*
* @see IOUtil#getResource(Class, String)
*/
- public static CharSequence readShaderSource(Class> context, String path, boolean mutableStringBuilder) throws IOException {
- URLConnection conn = IOUtil.getResource(context, path);
+ public static CharSequence readShaderSource(final Class> context, final String path, final boolean mutableStringBuilder) throws IOException {
+ final URLConnection conn = IOUtil.getResource(context, path);
if (conn == null) {
return null;
}
- StringBuilder result = new StringBuilder();
+ final StringBuilder result = new StringBuilder();
readShaderSource(context, conn, result);
return mutableStringBuilder ? result : result.toString();
}
@@ -853,7 +853,7 @@ public class ShaderCode {
*
* @see IOUtil#getResource(Class, String)
*/
- public static ByteBuffer readShaderBinary(Class> context, String path) throws IOException {
+ public static ByteBuffer readShaderBinary(final Class> context, final String path) throws IOException {
final URLConnection conn = IOUtil.getResource(context, path);
if (conn == null) {
return null;
@@ -901,7 +901,7 @@ public class ShaderCode {
* @param behavior shall be either {@link #REQUIRE}, {@link #ENABLE}, {@link #DISABLE} or {@link #WARN}
* @return the complete extension directive
*/
- public static String createExtensionDirective(String extensionName, String behavior) {
+ public static String createExtensionDirective(final String extensionName, final String behavior) {
return "#extension " + extensionName + " : " + behavior + "\n";
}
@@ -913,7 +913,7 @@ public class ShaderCode {
* @param gl a GL context, which must have been made current once
* @return the index after the inserted data, maybe 0 if nothing has be inserted.
*/
- public final int addGLSLVersion(GL2ES2 gl) {
+ public final int addGLSLVersion(final GL2ES2 gl) {
return insertShaderSource(0, 0, gl.getContext().getGLSLVersionString());
}
@@ -929,7 +929,7 @@ public class ShaderCode {
* @param pos position within this mutable shader source.
* @return the index after the inserted data, maybe 0 if nothing has be inserted.
*/
- public final int addDefaultShaderPrecision(GL2ES2 gl, int pos) {
+ public final int addDefaultShaderPrecision(final GL2ES2 gl, int pos) {
final String defaultPrecision;
if( gl.isGLES3() ) {
switch ( shaderType ) {
@@ -973,7 +973,7 @@ public class ShaderCode {
}
/** Returns true, if GLSL version requires default precision, i.e. ES2 or GLSL [1.30 .. 1.50[. */
- public static final boolean requiresDefaultPrecision(GL2ES2 gl) {
+ public static final boolean requiresDefaultPrecision(final GL2ES2 gl) {
if( gl.isGLES() ) {
return true;
}
@@ -981,7 +981,7 @@ public class ShaderCode {
}
/** Returns true, if GL3 GLSL version requires default precision, i.e. GLSL [1.30 .. 1.50[. */
- public static final boolean requiresGL3DefaultPrecision(GL2ES2 gl) {
+ public static final boolean requiresGL3DefaultPrecision(final GL2ES2 gl) {
if( gl.isGL3() ) {
final VersionNumber glslVersion = gl.getContext().getGLSLVersionNumber();
return glslVersion.compareTo(GLContext.Version130) >= 0 && glslVersion.compareTo(GLContext.Version150) < 0 ;
@@ -1005,7 +1005,7 @@ public class ShaderCode {
* @see #addGLSLVersion(GL2ES2)
* @see #addDefaultShaderPrecision(GL2ES2, int)
*/
- public final int defaultShaderCustomization(GL2ES2 gl, boolean preludeVersion, boolean addDefaultPrecision) {
+ public final int defaultShaderCustomization(final GL2ES2 gl, final boolean preludeVersion, final boolean addDefaultPrecision) {
int pos;
if( preludeVersion ) {
pos = addGLSLVersion(gl);
@@ -1031,7 +1031,7 @@ public class ShaderCode {
* @see #addGLSLVersion(GL2ES2)
* @see #addDefaultShaderPrecision(GL2ES2, int)
*/
- public final int defaultShaderCustomization(GL2ES2 gl, boolean preludeVersion, String esDefaultPrecision) {
+ public final int defaultShaderCustomization(final GL2ES2 gl, final boolean preludeVersion, final String esDefaultPrecision) {
int pos;
if( preludeVersion ) {
pos = addGLSLVersion(gl);
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 3ac17b0c5..a9b0bddc6 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderProgram.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderProgram.java
@@ -65,7 +65,7 @@ public class ShaderProgram {
*
* @see #release(GL2ES2, boolean)
*/
- public synchronized void destroy(GL2ES2 gl) {
+ public synchronized void destroy(final GL2ES2 gl) {
release(gl, true);
}
@@ -76,7 +76,7 @@ public class ShaderProgram {
*
* @see #release(GL2ES2, boolean)
*/
- public synchronized void release(GL2ES2 gl) {
+ public synchronized void release(final GL2ES2 gl) {
release(gl, false);
}
@@ -84,12 +84,12 @@ public class ShaderProgram {
* Detaches all shader codes and deletes the program.
* If destroyShaderCode is true it destroys the shader codes as well.
*/
- public synchronized void release(GL2ES2 gl, boolean destroyShaderCode) {
+ public synchronized void release(final GL2ES2 gl, final boolean destroyShaderCode) {
if( programLinked ) {
useProgram(gl, false);
}
- for(Iterator iter=allShaderCode.iterator(); iter.hasNext(); ) {
- ShaderCode shaderCode = iter.next();
+ for(final Iterator iter=allShaderCode.iterator(); iter.hasNext(); ) {
+ final ShaderCode shaderCode = iter.next();
if(attachedShaderCode.remove(shaderCode)) {
ShaderUtil.detachShader(gl, shaderProgram, shaderCode.shader());
}
@@ -115,11 +115,11 @@ public class ShaderProgram {
*
This command does not compile and attach the shader,
* use {@link #add(GL2ES2, ShaderCode)} for this purpose.
*/
- public synchronized void add(ShaderCode shaderCode) throws GLException {
+ public synchronized void add(final ShaderCode shaderCode) throws GLException {
allShaderCode.add(shaderCode);
}
- public synchronized boolean contains(ShaderCode shaderCode) {
+ public synchronized boolean contains(final ShaderCode shaderCode) {
return allShaderCode.contains(shaderCode);
}
@@ -128,9 +128,9 @@ public class ShaderProgram {
* @param id
* @return
*/
- public synchronized ShaderCode getShader(int id) {
- for(Iterator iter=allShaderCode.iterator(); iter.hasNext(); ) {
- ShaderCode shaderCode = iter.next();
+ public synchronized ShaderCode getShader(final int id) {
+ for(final Iterator iter=allShaderCode.iterator(); iter.hasNext(); ) {
+ final ShaderCode shaderCode = iter.next();
if(shaderCode.id() == id) {
return shaderCode;
}
@@ -149,7 +149,7 @@ public class ShaderProgram {
* @param gl
* @return true if shader program is valid, i.e. not zero
*/
- public synchronized final boolean init(GL2ES2 gl) {
+ public synchronized final boolean init(final GL2ES2 gl) {
if( 0 == shaderProgram ) {
shaderProgram = gl.glCreateProgram();
}
@@ -163,7 +163,7 @@ public class ShaderProgram {
*
* @return true if the shader was successfully added, false if compilation failed.
*/
- public synchronized boolean add(GL2ES2 gl, ShaderCode shaderCode, PrintStream verboseOut) {
+ public synchronized boolean add(final GL2ES2 gl, final ShaderCode shaderCode, final PrintStream verboseOut) {
if( !init(gl) ) { return false; }
if( allShaderCode.add(shaderCode) ) {
if( !shaderCode.compile(gl, verboseOut) ) {
@@ -195,12 +195,12 @@ public class ShaderProgram {
* @see ShaderState#glResetAllVertexAttributes
* @see ShaderState#glResetAllVertexAttributes
*/
- public synchronized boolean replaceShader(GL2ES2 gl, ShaderCode oldShader, ShaderCode newShader, PrintStream verboseOut) {
+ public synchronized boolean replaceShader(final GL2ES2 gl, final ShaderCode oldShader, final ShaderCode newShader, final PrintStream verboseOut) {
if(!init(gl) || !newShader.compile(gl, verboseOut)) {
return false;
}
- boolean shaderWasInUse = inUse();
+ final boolean shaderWasInUse = inUse();
if(shaderWasInUse) {
useProgram(gl, false);
}
@@ -238,13 +238,13 @@ public class ShaderProgram {
*
* @see #init(GL2ES2)
*/
- public synchronized boolean link(GL2ES2 gl, PrintStream verboseOut) {
+ public synchronized boolean link(final GL2ES2 gl, final PrintStream verboseOut) {
if( !init(gl) ) {
programLinked = false; // mark unlinked due to user attempt to [re]link
return false;
}
- for(Iterator iter=allShaderCode.iterator(); iter.hasNext(); ) {
+ for(final Iterator iter=allShaderCode.iterator(); iter.hasNext(); ) {
final ShaderCode shaderCode = iter.next();
if(!shaderCode.compile(gl, verboseOut)) {
programLinked = false; // mark unlinked due to user attempt to [re]link
@@ -264,7 +264,7 @@ public class ShaderProgram {
}
@Override
- public boolean equals(Object obj) {
+ public boolean equals(final Object obj) {
if(this == obj) { return true; }
if(obj instanceof ShaderProgram) {
return id()==((ShaderProgram)obj).id();
@@ -283,7 +283,7 @@ public class ShaderProgram {
}
sb.append("ShaderProgram[id=").append(id);
sb.append(", linked="+programLinked+", inUse="+programInUse+", program: "+shaderProgram+",");
- for(Iterator iter=allShaderCode.iterator(); iter.hasNext(); ) {
+ for(final Iterator iter=allShaderCode.iterator(); iter.hasNext(); ) {
sb.append(Platform.getNewline()).append(" ").append(iter.next());
}
sb.append("]");
@@ -299,11 +299,11 @@ public class ShaderProgram {
* Performs {@link GL2ES2#glValidateProgram(int)} via {@link ShaderUtil#isProgramExecStatusValid(GL, int, PrintStream)}.
* @see ShaderUtil#isProgramExecStatusValid(GL, int, PrintStream)
**/
- public synchronized boolean validateProgram(GL2ES2 gl, PrintStream verboseOut) {
+ public synchronized boolean validateProgram(final GL2ES2 gl, final PrintStream verboseOut) {
return ShaderUtil.isProgramExecStatusValid(gl, shaderProgram, verboseOut);
}
- public synchronized void useProgram(GL2ES2 gl, boolean on) {
+ public synchronized void useProgram(final GL2ES2 gl, boolean on) {
if(!programLinked) { throw new GLException("Program is not linked"); }
if(programInUse==on) { return; }
if( 0 == shaderProgram ) {
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 64dd589b8..c841f2f09 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderState.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderState.java
@@ -41,6 +41,7 @@ import javax.media.opengl.GLUniformData;
import jogamp.opengl.Debug;
import com.jogamp.common.os.Platform;
+import com.jogamp.common.util.PropertyAccess;
import com.jogamp.opengl.util.GLArrayDataEditable;
/**
@@ -60,7 +61,7 @@ public class ShaderState {
static {
Debug.initSingleton();
- DEBUG = Debug.isPropertyDefined("jogl.debug.GLSLState", true);
+ DEBUG = PropertyAccess.isPropertyDefined("jogl.debug.GLSLState", true);
}
public ShaderState() {
@@ -68,12 +69,12 @@ public class ShaderState {
public boolean verbose() { return verbose; }
- public void setVerbose(boolean v) { verbose = DEBUG || v; }
+ public void setVerbose(final boolean v) { verbose = DEBUG || v; }
/**
* Returns the attached user object for the given name to this ShaderState.
*/
- public final Object getAttachedObject(String name) {
+ public final Object getAttachedObject(final String name) {
return attachedObjectsByString.get(name);
}
@@ -83,7 +84,7 @@ public class ShaderState {
*
* @return the previous mapped object or null if none
*/
- public final Object attachObject(String name, Object obj) {
+ public final Object attachObject(final String name, final Object obj) {
return attachedObjectsByString.put(name, obj);
}
@@ -92,7 +93,7 @@ public class ShaderState {
*
* @return the previous mapped object or null if none
*/
- public final Object detachObject(String name) {
+ public final Object detachObject(final String name) {
return attachedObjectsByString.remove(name);
}
@@ -103,7 +104,7 @@ public class ShaderState {
*
* @see com.jogamp.opengl.util.glsl.ShaderState#useProgram(GL2ES2, boolean)
*/
- public synchronized void useProgram(GL2ES2 gl, boolean on) throws GLException {
+ public synchronized void useProgram(final GL2ES2 gl, final boolean on) throws GLException {
if(null==shaderProgram) { throw new GLException("No program is attached"); }
if(on) {
if(shaderProgram.linked()) {
@@ -154,10 +155,10 @@ public class ShaderState {
*
* @throws GLException if program was not linked and linking fails
*/
- public synchronized boolean attachShaderProgram(GL2ES2 gl, ShaderProgram prog, boolean enable) throws GLException {
+ public synchronized boolean attachShaderProgram(final GL2ES2 gl, final ShaderProgram prog, final boolean enable) throws GLException {
if(verbose) {
- int curId = (null!=shaderProgram)?shaderProgram.id():-1;
- int newId = (null!=prog)?prog.id():-1;
+ final int curId = (null!=shaderProgram)?shaderProgram.id():-1;
+ final int newId = (null!=prog)?prog.id():-1;
System.err.println("ShaderState: attachShaderProgram: "+curId+" -> "+newId+" (enable: "+enable+")\n\t"+shaderProgram+"\n\t"+prog);
if(DEBUG) {
Thread.dumpStack();
@@ -213,7 +214,7 @@ public class ShaderState {
* @see #glReleaseAllUniforms
* @see #release(GL2ES2, boolean, boolean, boolean)
*/
- public synchronized void destroy(GL2ES2 gl) {
+ public synchronized void destroy(final GL2ES2 gl) {
release(gl, true, true, true);
attachedObjectsByString.clear();
}
@@ -225,7 +226,7 @@ public class ShaderState {
* @see #glReleaseAllUniforms
* @see #release(GL2ES2, boolean, boolean, boolean)
*/
- public synchronized void releaseAllData(GL2ES2 gl) {
+ public synchronized void releaseAllData(final GL2ES2 gl) {
release(gl, false, false, false);
}
@@ -234,12 +235,12 @@ public class ShaderState {
* @see #glReleaseAllUniforms
* @see ShaderProgram#release(GL2ES2, boolean)
*/
- public synchronized void release(GL2ES2 gl, boolean destroyBoundAttributes, boolean destroyShaderProgram, boolean destroyShaderCode) {
+ public synchronized void release(final GL2ES2 gl, final boolean destroyBoundAttributes, final boolean destroyShaderProgram, final boolean destroyShaderCode) {
if(null!=shaderProgram && shaderProgram.linked() ) {
shaderProgram.useProgram(gl, false);
}
if(destroyBoundAttributes) {
- for(Iterator iter = managedAttributes.iterator(); iter.hasNext(); ) {
+ for(final Iterator iter = managedAttributes.iterator(); iter.hasNext(); ) {
iter.next().destroy(gl);
}
}
@@ -265,8 +266,8 @@ public class ShaderState {
* @see #getAttribLocation(GL2ES2, String)
* @see GL2ES2#glGetAttribLocation(int, String)
*/
- public int getCachedAttribLocation(String name) {
- Integer idx = activeAttribLocationMap.get(name);
+ public int getCachedAttribLocation(final String name) {
+ final Integer idx = activeAttribLocationMap.get(name);
return (null!=idx)?idx.intValue():-1;
}
@@ -285,11 +286,11 @@ public class ShaderState {
* @see #glResetAllVertexAttributes
* @see ShaderProgram#glReplaceShader
*/
- public GLArrayData getAttribute(String name) {
+ public GLArrayData getAttribute(final String name) {
return activeAttribDataMap.get(name);
}
- public boolean isActiveAttribute(GLArrayData attribute) {
+ public boolean isActiveAttribute(final GLArrayData attribute) {
return attribute == activeAttribDataMap.get(attribute.getName());
}
@@ -313,7 +314,7 @@ public class ShaderState {
* @see #getAttribute(String)
* @see GLArrayData#associate(Object, boolean)
*/
- public void ownAttribute(GLArrayData attribute, boolean own) {
+ public void ownAttribute(final GLArrayData attribute, final boolean own) {
if(own) {
final int location = getCachedAttribLocation(attribute.getName());
if(0<=location) {
@@ -326,7 +327,7 @@ public class ShaderState {
attribute.associate(this, own);
}
- public boolean ownsAttribute(GLArrayData attribute) {
+ public boolean ownsAttribute(final GLArrayData attribute) {
return managedAttributes.contains(attribute);
}
@@ -343,7 +344,7 @@ public class ShaderState {
* @see #getAttribLocation(GL2ES2, String)
* @see #getCachedAttribLocation(String)
*/
- public void bindAttribLocation(GL2ES2 gl, int location, String name) {
+ public void bindAttribLocation(final GL2ES2 gl, final int location, final String name) {
if(null==shaderProgram) throw new GLException("No program is attached");
if(shaderProgram.linked()) throw new GLException("Program is already linked");
final Integer loc = new Integer(location);
@@ -366,7 +367,7 @@ public class ShaderState {
* @see #getCachedAttribLocation(String)
* @see #getAttribute(String)
*/
- public void bindAttribLocation(GL2ES2 gl, int location, GLArrayData data) {
+ public void bindAttribLocation(final GL2ES2 gl, final int location, final GLArrayData data) {
if(null==shaderProgram) throw new GLException("No program is attached");
if(shaderProgram.linked()) throw new GLException("Program is already linked");
final String name = data.getName();
@@ -391,7 +392,7 @@ public class ShaderState {
* @see #bindAttribLocation(GL2ES2, int, String)
* @see GL2ES2#glGetAttribLocation(int, String)
*/
- public int getAttribLocation(GL2ES2 gl, String name) {
+ public int getAttribLocation(final GL2ES2 gl, final String name) {
if(null==shaderProgram) throw new GLException("No program is attached");
int location = getCachedAttribLocation(name);
if(0>location) {
@@ -431,7 +432,7 @@ public class ShaderState {
* @see GL2ES2#glGetAttribLocation(int, String)
* @see #getAttribute(String)
*/
- public int getAttribLocation(GL2ES2 gl, GLArrayData data) {
+ public int getAttribLocation(final GL2ES2 gl, final GLArrayData data) {
if(null==shaderProgram) throw new GLException("No program is attached");
final String name = data.getName();
int location = getCachedAttribLocation(name);
@@ -441,7 +442,7 @@ public class ShaderState {
if(!shaderProgram.linked()) throw new GLException("Program is not linked");
location = data.setLocation(gl, shaderProgram.program());
if(0<=location) {
- Integer idx = new Integer(location);
+ final Integer idx = new Integer(location);
activeAttribLocationMap.put(name, idx);
if(DEBUG) {
System.err.println("ShaderState: glGetAttribLocation: "+name+", loc: "+location);
@@ -464,7 +465,7 @@ public class ShaderState {
/**
* @return true if the named attribute is enable
*/
- public final boolean isVertexAttribArrayEnabled(String name) {
+ public final boolean isVertexAttribArrayEnabled(final String name) {
final Boolean v = activedAttribEnabledMap.get(name);
return null != v && v.booleanValue();
}
@@ -472,11 +473,11 @@ public class ShaderState {
/**
* @return true if the {@link GLArrayData} attribute is enable
*/
- public final boolean isVertexAttribArrayEnabled(GLArrayData data) {
+ public final boolean isVertexAttribArrayEnabled(final GLArrayData data) {
return isVertexAttribArrayEnabled(data.getName());
}
- private boolean enableVertexAttribArray(GL2ES2 gl, String name, int location) {
+ private boolean enableVertexAttribArray(final GL2ES2 gl, final String name, int location) {
activedAttribEnabledMap.put(name, Boolean.TRUE);
if(0>location) {
location = getAttribLocation(gl, name);
@@ -515,7 +516,7 @@ public class ShaderState {
* @see #glVertexAttribPointer
* @see #getVertexAttribPointer
*/
- public boolean enableVertexAttribArray(GL2ES2 gl, String name) {
+ public boolean enableVertexAttribArray(final GL2ES2 gl, final String name) {
return enableVertexAttribArray(gl, name, -1);
}
@@ -541,7 +542,7 @@ public class ShaderState {
* @see #getVertexAttribPointer
* @see GLArrayDataEditable#enableBuffer(GL, boolean)
*/
- public boolean enableVertexAttribArray(GL2ES2 gl, GLArrayData data) {
+ public boolean enableVertexAttribArray(final GL2ES2 gl, final GLArrayData data) {
if(0 > data.getLocation()) {
getAttribLocation(gl, data);
} else {
@@ -551,7 +552,7 @@ public class ShaderState {
return enableVertexAttribArray(gl, data.getName(), data.getLocation());
}
- private boolean disableVertexAttribArray(GL2ES2 gl, String name, int location) {
+ private boolean disableVertexAttribArray(final GL2ES2 gl, final String name, int location) {
activedAttribEnabledMap.put(name, Boolean.FALSE);
if(0>location) {
location = getAttribLocation(gl, name);
@@ -591,7 +592,7 @@ public class ShaderState {
* @see #glVertexAttribPointer
* @see #getVertexAttribPointer
*/
- public boolean disableVertexAttribArray(GL2ES2 gl, String name) {
+ public boolean disableVertexAttribArray(final GL2ES2 gl, final String name) {
return disableVertexAttribArray(gl, name, -1);
}
@@ -616,7 +617,7 @@ public class ShaderState {
* @see #glVertexAttribPointer
* @see #getVertexAttribPointer
*/
- public boolean disableVertexAttribArray(GL2ES2 gl, GLArrayData data) {
+ public boolean disableVertexAttribArray(final GL2ES2 gl, final GLArrayData data) {
if(0 > data.getLocation()) {
getAttribLocation(gl, data);
}
@@ -641,7 +642,7 @@ public class ShaderState {
* @see #glVertexAttribPointer
* @see #getVertexAttribPointer
*/
- public boolean vertexAttribPointer(GL2ES2 gl, GLArrayData data) {
+ public boolean vertexAttribPointer(final GL2ES2 gl, final GLArrayData data) {
int location = data.getLocation();
if(0 > location) {
location = getAttribLocation(gl, data);
@@ -670,12 +671,12 @@ public class ShaderState {
* @see #glResetAllVertexAttributes
* @see ShaderProgram#glReplaceShader
*/
- public void releaseAllAttributes(GL2ES2 gl) {
+ public void releaseAllAttributes(final GL2ES2 gl) {
if(null!=shaderProgram) {
- for(Iterator iter = activeAttribDataMap.values().iterator(); iter.hasNext(); ) {
+ for(final Iterator iter = activeAttribDataMap.values().iterator(); iter.hasNext(); ) {
disableVertexAttribArray(gl, iter.next());
}
- for(Iterator iter = activedAttribEnabledMap.keySet().iterator(); iter.hasNext(); ) {
+ for(final Iterator iter = activedAttribEnabledMap.keySet().iterator(); iter.hasNext(); ) {
disableVertexAttribArray(gl, iter.next());
}
}
@@ -702,8 +703,8 @@ public class ShaderState {
* @see #glResetAllVertexAttributes
* @see ShaderProgram#glReplaceShader
*/
- public void disableAllVertexAttributeArrays(GL2ES2 gl, boolean removeFromState) {
- for(Iterator iter = activedAttribEnabledMap.keySet().iterator(); iter.hasNext(); ) {
+ public void disableAllVertexAttributeArrays(final GL2ES2 gl, final boolean removeFromState) {
+ for(final Iterator iter = activedAttribEnabledMap.keySet().iterator(); iter.hasNext(); ) {
final String name = iter.next();
if(removeFromState) {
activedAttribEnabledMap.remove(name);
@@ -715,7 +716,7 @@ public class ShaderState {
}
}
- private final void relocateAttribute(GL2ES2 gl, GLArrayData attribute) {
+ private final void relocateAttribute(final GL2ES2 gl, final GLArrayData attribute) {
// get new location .. note: 'activeAttribLocationMap' is cleared before
final String name = attribute.getName();
final int loc = attribute.setLocation(gl, shaderProgram.program());
@@ -760,19 +761,19 @@ public class ShaderState {
*
* @see #attachShaderProgram(GL2ES2, ShaderProgram)
*/
- private final void resetAllAttributes(GL2ES2 gl) {
+ private final void resetAllAttributes(final GL2ES2 gl) {
if(!shaderProgram.linked()) throw new GLException("Program is not linked");
activeAttribLocationMap.clear();
for(int i=0; i iter = activeAttribDataMap.values().iterator(); iter.hasNext(); ) {
+ for(final Iterator iter = activeAttribDataMap.values().iterator(); iter.hasNext(); ) {
relocateAttribute(gl, iter.next());
}
}
- private final void setAttribute(GL2ES2 gl, GLArrayData attribute) {
+ private final void setAttribute(final GL2ES2 gl, final GLArrayData attribute) {
// get new location ..
final String name = attribute.getName();
final int loc = attribute.getLocation();
@@ -798,8 +799,8 @@ public class ShaderState {
/**
* preserves the attribute location .. (program not linked)
*/
- private final void setAllAttributes(GL2ES2 gl) {
- for(Iterator iter = activeAttribDataMap.values().iterator(); iter.hasNext(); ) {
+ private final void setAllAttributes(final GL2ES2 gl) {
+ for(final Iterator iter = activeAttribDataMap.values().iterator(); iter.hasNext(); ) {
setAttribute(gl, iter.next());
}
}
@@ -814,8 +815,8 @@ public class ShaderState {
* @return -1 if there is no such uniform available,
* otherwise >= 0
*/
- public final int getCachedUniformLocation(String name) {
- Integer idx = activeUniformLocationMap.get(name);
+ public final int getCachedUniformLocation(final String name) {
+ final Integer idx = activeUniformLocationMap.get(name);
return (null!=idx)?idx.intValue():-1;
}
@@ -833,7 +834,7 @@ public class ShaderState {
*
* @see #getUniform(String)
*/
- public void ownUniform(GLUniformData uniform) {
+ public void ownUniform(final GLUniformData uniform) {
final int location = getCachedUniformLocation(uniform.getName());
if(0<=location) {
uniform.setLocation(location);
@@ -842,7 +843,7 @@ public class ShaderState {
managedUniforms.add(uniform);
}
- public boolean ownsUniform(GLUniformData uniform) {
+ public boolean ownsUniform(final GLUniformData uniform) {
return managedUniforms.contains(uniform);
}
@@ -865,14 +866,14 @@ public class ShaderState {
* @see #getUniformLocation
* @see ShaderProgram#glReplaceShader
*/
- public final int getUniformLocation(GL2ES2 gl, String name) {
+ public final int getUniformLocation(final GL2ES2 gl, final String name) {
if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
int location = getCachedUniformLocation(name);
if(0>location) {
if(!shaderProgram.linked()) throw new GLException("Program is not linked");
location = gl.glGetUniformLocation(shaderProgram.program(), name);
if(0<=location) {
- Integer idx = new Integer(location);
+ final Integer idx = new Integer(location);
activeUniformLocationMap.put(name, idx);
} else if(verbose) {
System.err.println("ShaderState: glUniform failed, no location for: "+name+", index: "+location);
@@ -904,7 +905,7 @@ public class ShaderState {
* @see #getUniformLocation
* @see ShaderProgram#glReplaceShader
*/
- public int getUniformLocation(GL2ES2 gl, GLUniformData data) {
+ public int getUniformLocation(final GL2ES2 gl, final GLUniformData data) {
if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
final String name = data.getName();
int location = getCachedUniformLocation(name);
@@ -942,7 +943,7 @@ public class ShaderState {
* @see #getUniformLocation
* @see ShaderProgram#glReplaceShader
*/
- public boolean uniform(GL2ES2 gl, GLUniformData data) {
+ public boolean uniform(final GL2ES2 gl, final GLUniformData data) {
if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
int location = data.getLocation();
if(0>location) {
@@ -964,7 +965,7 @@ public class ShaderState {
*
* @return the GLUniformData object, null if not previously set.
*/
- public GLUniformData getUniform(String name) {
+ public GLUniformData getUniform(final String name) {
return activeUniformDataMap.get(name);
}
@@ -972,7 +973,7 @@ public class ShaderState {
* Releases all mapped uniform data
* and loses all indices
*/
- public void releaseAllUniforms(GL2ES2 gl) {
+ public void releaseAllUniforms(final GL2ES2 gl) {
activeUniformDataMap.clear();
activeUniformLocationMap.clear();
managedUniforms.clear();
@@ -993,13 +994,13 @@ public class ShaderState {
*
* @see #attachShaderProgram(GL2ES2, ShaderProgram)
*/
- private final void resetAllUniforms(GL2ES2 gl) {
+ private final void resetAllUniforms(final GL2ES2 gl) {
if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
activeUniformLocationMap.clear();
- for(Iterator iter = managedUniforms.iterator(); iter.hasNext(); ) {
+ for(final Iterator iter = managedUniforms.iterator(); iter.hasNext(); ) {
iter.next().setLocation(-1);
}
- for(Iterator iter = activeUniformDataMap.values().iterator(); iter.hasNext(); ) {
+ for(final Iterator iter = activeUniformDataMap.values().iterator(); iter.hasNext(); ) {
final GLUniformData data = iter.next();
final int loc = data.setLocation(gl, shaderProgram.program());
if( 0 <= loc ) {
@@ -1013,7 +1014,7 @@ public class ShaderState {
}
}
- public StringBuilder toString(StringBuilder sb, boolean alsoUnlocated) {
+ public StringBuilder toString(StringBuilder sb, final boolean alsoUnlocated) {
if(null==sb) {
sb = new StringBuilder();
}
@@ -1028,35 +1029,35 @@ public class ShaderState {
}
sb.append(Platform.getNewline()).append(" enabledAttributes [");
{
- Iterator names = activedAttribEnabledMap.keySet().iterator();
- Iterator values = activedAttribEnabledMap.values().iterator();
+ final Iterator names = activedAttribEnabledMap.keySet().iterator();
+ final Iterator values = activedAttribEnabledMap.values().iterator();
while( names.hasNext() ) {
sb.append(Platform.getNewline()).append(" ").append(names.next()).append(": ").append(values.next());
}
}
sb.append(Platform.getNewline()).append(" ],").append(" activeAttributes [");
- for(Iterator iter = activeAttribDataMap.values().iterator(); iter.hasNext(); ) {
+ for(final Iterator iter = activeAttribDataMap.values().iterator(); iter.hasNext(); ) {
final GLArrayData ad = iter.next();
if( alsoUnlocated || 0 <= ad.getLocation() ) {
sb.append(Platform.getNewline()).append(" ").append(ad);
}
}
sb.append(Platform.getNewline()).append(" ],").append(" managedAttributes [");
- for(Iterator iter = managedAttributes.iterator(); iter.hasNext(); ) {
+ for(final Iterator iter = managedAttributes.iterator(); iter.hasNext(); ) {
final GLArrayData ad = iter.next();
if( alsoUnlocated || 0 <= ad.getLocation() ) {
sb.append(Platform.getNewline()).append(" ").append(ad);
}
}
sb.append(Platform.getNewline()).append(" ],").append(" activeUniforms [");
- for(Iterator iter=activeUniformDataMap.values().iterator(); iter.hasNext(); ) {
+ for(final Iterator iter=activeUniformDataMap.values().iterator(); iter.hasNext(); ) {
final GLUniformData ud = iter.next();
if( alsoUnlocated || 0 <= ud.getLocation() ) {
sb.append(Platform.getNewline()).append(" ").append(ud);
}
}
sb.append(Platform.getNewline()).append(" ],").append(" managedUniforms [");
- for(Iterator iter = managedUniforms.iterator(); iter.hasNext(); ) {
+ for(final Iterator iter = managedUniforms.iterator(); iter.hasNext(); ) {
final GLUniformData ud = iter.next();
if( alsoUnlocated || 0 <= ud.getLocation() ) {
sb.append(Platform.getNewline()).append(" ").append(ud);
diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java
index ad5331a28..b927e8ceb 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java
@@ -43,49 +43,49 @@ import com.jogamp.common.nio.Buffers;
import com.jogamp.opengl.GLExtensions;
public class ShaderUtil {
- public static String getShaderInfoLog(GL _gl, int shaderObj) {
+ public static String getShaderInfoLog(final GL _gl, final int shaderObj) {
final GL2ES2 gl = _gl.getGL2ES2();
- int[] infoLogLength=new int[1];
+ final int[] infoLogLength=new int[1];
gl.glGetShaderiv(shaderObj, GL2ES2.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]];
+ final int[] charsWritten=new int[1];
+ final byte[] infoLogBytes = new byte[infoLogLength[0]];
gl.glGetShaderInfoLog(shaderObj, infoLogLength[0], charsWritten, 0, infoLogBytes, 0);
return new String(infoLogBytes, 0, charsWritten[0]);
}
- public static String getProgramInfoLog(GL _gl, int programObj) {
+ public static String getProgramInfoLog(final GL _gl, final int programObj) {
final GL2ES2 gl = _gl.getGL2ES2();
- int[] infoLogLength=new int[1];
+ final int[] infoLogLength=new int[1];
gl.glGetProgramiv(programObj, GL2ES2.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]];
+ final int[] charsWritten=new int[1];
+ final byte[] infoLogBytes = new byte[infoLogLength[0]];
gl.glGetProgramInfoLog(programObj, infoLogLength[0], charsWritten, 0, infoLogBytes, 0);
return new String(infoLogBytes, 0, charsWritten[0]);
}
- public static boolean isShaderStatusValid(GL _gl, int shaderObj, int name, PrintStream verboseOut) {
+ public static boolean isShaderStatusValid(final GL _gl, final int shaderObj, final int name, final PrintStream verboseOut) {
final GL2ES2 gl = _gl.getGL2ES2();
- int[] ires = new int[1];
+ final int[] ires = new int[1];
gl.glGetShaderiv(shaderObj, name, ires, 0);
- boolean res = ires[0]==1;
+ final boolean res = ires[0]==1;
if(!res && null!=verboseOut) {
verboseOut.println("Shader status invalid: "+ getShaderInfoLog(gl, shaderObj));
}
return res;
}
- public static boolean isShaderStatusValid(GL _gl, IntBuffer shaders, int name, PrintStream verboseOut) {
+ public static boolean isShaderStatusValid(final GL _gl, final IntBuffer shaders, final int name, final PrintStream verboseOut) {
boolean res = true;
for (int i = shaders.position(); i < shaders.limit(); i++) {
res = isShaderStatusValid(_gl, shaders.get(i), name, verboseOut) && res;
@@ -93,15 +93,15 @@ public class ShaderUtil {
return res;
}
- public static boolean isProgramStatusValid(GL _gl, int programObj, int name) {
+ public static boolean isProgramStatusValid(final GL _gl, final int programObj, final int name) {
final GL2ES2 gl = _gl.getGL2ES2();
- int[] ires = new int[1];
+ final int[] ires = new int[1];
gl.glGetProgramiv(programObj, name, ires, 0);
return ires[0]==1;
}
- public static boolean isProgramLinkStatusValid(GL _gl, int programObj, PrintStream verboseOut) {
+ public static boolean isProgramLinkStatusValid(final GL _gl, final int programObj, final PrintStream verboseOut) {
final GL2ES2 gl = _gl.getGL2ES2();
if(!gl.glIsProgram(programObj)) {
if(null!=verboseOut) {
@@ -130,7 +130,7 @@ public class ShaderUtil {
*
* @see GL2ES2#glValidateProgram(int)
**/
- public static boolean isProgramExecStatusValid(GL _gl, int programObj, PrintStream verboseOut) {
+ public static boolean isProgramExecStatusValid(final GL _gl, final int programObj, final PrintStream verboseOut) {
final GL2ES2 gl = _gl.getGL2ES2();
gl.glValidateProgram(programObj);
if(!isProgramStatusValid(gl, programObj, GL2ES2.GL_VALIDATE_STATUS)) {
@@ -142,7 +142,7 @@ public class ShaderUtil {
return true;
}
- public static void createShader(GL _gl, int type, IntBuffer shaders) {
+ public static void createShader(final GL _gl, final int type, final IntBuffer shaders) {
final GL2ES2 gl = _gl.getGL2ES2();
for (int i = shaders.position(); i < shaders.limit(); i++) {
shaders.put(i, gl.glCreateShader(type));
@@ -154,7 +154,7 @@ public class ShaderUtil {
* {@link GL2ES2#GL_NUM_SHADER_BINARY_FORMATS} and {@link GL2ES2#GL_SHADER_BINARY_FORMATS}
* via {@link GL2ES2#glGetIntegerv(int, int[], int)}.
*/
- public static Set getShaderBinaryFormats(GL _gl) {
+ public static Set getShaderBinaryFormats(final GL _gl) {
final GL2ES2 gl = _gl.getGL2ES2();
final ProfileInformation info = getProfileInformation(gl);
if(null == info.shaderBinaryFormats) {
@@ -166,13 +166,13 @@ public class ShaderUtil {
final int err = gl.glGetError();
final int numFormats = GL.GL_NO_ERROR == err ? param[0] : 0;
if(numFormats>0) {
- int[] formats = new int[numFormats];
+ final int[] formats = new int[numFormats];
gl.glGetIntegerv(GL2ES2.GL_SHADER_BINARY_FORMATS, formats, 0);
for(int i=0; i= 0 ||
ctx.isExtensionAvailable(GLExtensions.ARB_geometry_shader4);
}
- public static void shaderSource(GL _gl, int shader, CharSequence[] source)
+ public static void shaderSource(final GL _gl, final int shader, final CharSequence[] source)
{
final GL2ES2 gl = _gl.getGL2ES2();
if(!isShaderCompilerAvailable(_gl)) {
throw new GLException("No compiler is available");
}
- int count = (null!=source)?source.length:0;
+ final int count = (null!=source)?source.length:0;
if(count==0) {
throw new GLException("No sources specified");
}
- IntBuffer lengths = Buffers.newDirectIntBuffer(count);
+ final IntBuffer lengths = Buffers.newDirectIntBuffer(count);
for(int i=0; i=binLength) {
throw new GLException("Empty shader binary (remaining == 0)");
}
gl.glShaderBinary(shaderNum, shaders, binFormat, bin, binLength);
}
- public static void compileShader(GL _gl, IntBuffer shaders)
+ public static void compileShader(final GL _gl, final IntBuffer shaders)
{
final GL2ES2 gl = _gl.getGL2ES2();
for (int i = shaders.position(); i < shaders.limit(); i++) {
@@ -302,7 +302,7 @@ public class ShaderUtil {
}
}
- public static void attachShader(GL _gl, int program, IntBuffer shaders)
+ public static void attachShader(final GL _gl, final int program, final IntBuffer shaders)
{
final GL2ES2 gl = _gl.getGL2ES2();
for (int i = shaders.position(); i < shaders.limit(); i++) {
@@ -310,7 +310,7 @@ public class ShaderUtil {
}
}
- public static void detachShader(GL _gl, int program, IntBuffer shaders)
+ public static void detachShader(final GL _gl, final int program, final IntBuffer shaders)
{
final GL2ES2 gl = _gl.getGL2ES2();
for (int i = shaders.position(); i < shaders.limit(); i++) {
@@ -318,7 +318,7 @@ public class ShaderUtil {
}
}
- public static void deleteShader(GL _gl, IntBuffer shaders)
+ public static void deleteShader(final GL _gl, final IntBuffer shaders)
{
final GL2ES2 gl = _gl.getGL2ES2();
for (int i = shaders.position(); i < shaders.limit(); i++) {
@@ -327,9 +327,9 @@ public class ShaderUtil {
}
}
- public static boolean createAndLoadShader(GL _gl, IntBuffer shader, int shaderType,
- int binFormat, java.nio.Buffer bin,
- PrintStream verboseOut)
+ public static boolean createAndLoadShader(final GL _gl, final IntBuffer shader, final int shaderType,
+ final int binFormat, final java.nio.Buffer bin,
+ final PrintStream verboseOut)
{
final GL2ES2 gl = _gl.getGL2ES2();
int err = gl.glGetError(); // flush previous errors ..
@@ -352,9 +352,9 @@ public class ShaderUtil {
return err == GL.GL_NO_ERROR;
}
- public static boolean createAndCompileShader(GL _gl, IntBuffer shader, int shaderType,
- CharSequence[][] sources,
- PrintStream verboseOut)
+ public static boolean createAndCompileShader(final GL _gl, final IntBuffer shader, final int shaderType,
+ final CharSequence[][] sources,
+ final PrintStream verboseOut)
{
final GL2ES2 gl = _gl.getGL2ES2();
int err = gl.glGetError(); // flush previous errors ..
@@ -390,7 +390,7 @@ public class ShaderUtil {
Set shaderBinaryFormats = null;
}
- private static ProfileInformation getProfileInformation(GL gl) {
+ private static ProfileInformation getProfileInformation(final GL gl) {
final GLContext context = gl.getContext();
context.validateCurrent();
ProfileInformation data = (ProfileInformation) context.getAttachedObject(implObjectKey);
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 2f8884a3a..1ed875f27 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
@@ -37,7 +37,7 @@ public class FixedFuncUtil {
* @see ShaderSelectionMode#COLOR_TEXTURE
* @see ShaderSelectionMode#COLOR_TEXTURE_LIGHT_PER_VERTEX
*/
- public static final GL2ES1 wrapFixedFuncEmul(GL gl, ShaderSelectionMode mode, PMVMatrix pmvMatrix, boolean force, boolean verbose) {
+ public static final GL2ES1 wrapFixedFuncEmul(final GL gl, final ShaderSelectionMode mode, final PMVMatrix pmvMatrix, final boolean force, final boolean verbose) {
if(gl.isGL2ES2() && ( !gl.isGL2ES1() || force ) ) {
final GL2ES2 es2 = gl.getGL2ES2();
final FixedFuncHook hook = new FixedFuncHook(es2, mode, pmvMatrix);
@@ -66,7 +66,7 @@ public class FixedFuncUtil {
* @see ShaderSelectionMode#COLOR_TEXTURE
* @see ShaderSelectionMode#COLOR_TEXTURE_LIGHT_PER_VERTEX
*/
- public static final GL2ES1 wrapFixedFuncEmul(GL gl, ShaderSelectionMode mode, PMVMatrix pmvMatrix) {
+ public static final GL2ES1 wrapFixedFuncEmul(final GL gl, final ShaderSelectionMode mode, final PMVMatrix pmvMatrix) {
return wrapFixedFuncEmul(gl, mode, null, false, false);
}
@@ -90,7 +90,7 @@ public class FixedFuncUtil {
* @see javax.media.opengl.fixedfunc.GLPointerFunc#glNormalPointer
* @see javax.media.opengl.fixedfunc.GLPointerFunc#glTexCoordPointer
*/
- public static String getPredefinedArrayIndexName(int glArrayIndex) {
+ public static String getPredefinedArrayIndexName(final int glArrayIndex) {
return GLPointerFuncUtil.getPredefinedArrayIndexName(glArrayIndex);
}
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 44fbf1c6d..f113be2b2 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/glsl/sdk/CompileShader.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/sdk/CompileShader.java
@@ -30,7 +30,7 @@ public abstract class CompileShader {
public abstract String getFragmentShaderCompiler();
- public void processOneShader(String resourceName)
+ public void processOneShader(final String resourceName)
throws IOException, UnsupportedEncodingException, InterruptedException
{
int type = -1;
@@ -49,11 +49,11 @@ public abstract class CompileShader {
suffixLen = 4;
type = GL2ES2.GL_VERTEX_SHADER;
}
- String justName = basename(resourceName);
+ final String justName = basename(resourceName);
outName = justName.substring(0, justName.length() - suffixLen) +
ShaderCode.getFileSuffix(true, type);
- URL resourceURL = IOUtil.getResource(null, resourceName).getURL();
- String dirName = dirname(resourceURL.getPath());
+ final URL resourceURL = IOUtil.getResource(null, resourceName).getURL();
+ final String dirName = dirname(resourceURL.getPath());
outName = dirName + File.separator + "bin" + File.separator +
ShaderCode.getBinarySubPath(getBinaryFormat()) + File.separator +
@@ -61,19 +61,19 @@ public abstract class CompileShader {
processOneShader(resourceName, outName, type);
}
- public void processOneShader(String resourceName, String outName, int type)
+ public void processOneShader(final String resourceName, final String outName, final int type)
throws IOException, UnsupportedEncodingException, InterruptedException
{
- URL resourceURL = IOUtil.getResource(null, resourceName).getURL();
- String dirName = dirname(resourceURL.getPath());
+ final URL resourceURL = IOUtil.getResource(null, resourceName).getURL();
+ final String dirName = dirname(resourceURL.getPath());
- CharSequence shader = ShaderCode.readShaderSource(null, resourceName, false);
+ final CharSequence shader = ShaderCode.readShaderSource(null, resourceName, false);
if(null==shader) {
System.err.println("Can't find shader source " + resourceName + " - ignored");
return;
}
System.err.println("Preprocessing: "+ resourceName+", in dir: "+dirName);
- String justName = basename(resourceName);
+ final String justName = basename(resourceName);
String processor;
switch (type) {
case GL2ES2.GL_VERTEX_SHADER:
@@ -85,26 +85,26 @@ public abstract class CompileShader {
default:
throw new GLException("Unknown shader type: "+type);
}
- File outputFile = new File(outName);
+ final File outputFile = new File(outName);
// Write shader to a file in java.io.tmpdir
- File tmpDir = new File(dirName+File.separator+"tmp");
+ final File tmpDir = new File(dirName+File.separator+"tmp");
tmpDir.mkdirs();
- File tmpFile = new File(tmpDir, justName);
- Writer writer = new BufferedWriter(new FileWriter(tmpFile));
+ final File tmpFile = new File(tmpDir, justName);
+ final Writer writer = new BufferedWriter(new FileWriter(tmpFile));
writer.write(shader.toString(), 0, shader.length());
writer.flush();
writer.close();
System.err.println("Preprocessed: "+ tmpFile.getAbsolutePath());
- File processorDir = getSDKCompilerDir();
+ final File processorDir = getSDKCompilerDir();
System.err.println("SDK: "+ processorDir.getAbsolutePath() + ", compiler: "+processor);
System.err.println("Output: "+ outputFile.getAbsolutePath());
// Run the tool
- Process process = Runtime.getRuntime().exec(new String[] {
+ final Process process = Runtime.getRuntime().exec(new String[] {
processorDir.getAbsolutePath() + File.separator + processor,
tmpFile.getAbsolutePath(),
outputFile.getAbsolutePath()
@@ -116,7 +116,7 @@ public abstract class CompileShader {
// tmpFile.delete();
}
- protected static String basename(String path) {
+ protected static String basename(final String path) {
int lastSlash = path.lastIndexOf("/");
if (lastSlash < 0) {
lastSlash = path.lastIndexOf("\\");
@@ -130,7 +130,7 @@ public abstract class CompileShader {
return basename;
}
- protected static String dirname(String path) {
+ protected static String dirname(final String path) {
int lastSlash = path.lastIndexOf("/");
if (lastSlash < 0) {
lastSlash = path.lastIndexOf("\\");
@@ -144,19 +144,19 @@ public abstract class CompileShader {
return dirname;
}
- public void run(String[] args) {
+ public void run(final String[] args) {
try {
for (int i = 0; i < args.length; i++) {
processOneShader(args[i]);
}
- } catch (Exception e) {
+ } catch (final Exception e) {
e.printStackTrace();
}
}
private static class StreamMonitor implements Runnable {
- private InputStream istream;
- public StreamMonitor(InputStream stream) {
+ private final InputStream istream;
+ public StreamMonitor(final InputStream stream) {
istream = stream;
new Thread(this, "Output Reader Thread").start();
}
@@ -164,7 +164,7 @@ public abstract class CompileShader {
@Override
public void run()
{
- byte[] buffer = new byte[4096];
+ final byte[] buffer = new byte[4096];
try {
int numRead = 0;
do {
@@ -175,10 +175,10 @@ public abstract class CompileShader {
}
} while (numRead >= 0);
}
- catch (IOException e) {
+ catch (final IOException e) {
try {
istream.close();
- } catch (IOException e2) {
+ } catch (final IOException e2) {
}
// Should allow clean exit when process shuts down
}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/sdk/CompileShaderNVidia.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/sdk/CompileShaderNVidia.java
index 215cf592b..9ff37c7ee 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/glsl/sdk/CompileShaderNVidia.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/sdk/CompileShaderNVidia.java
@@ -13,7 +13,7 @@ public class CompileShaderNVidia extends CompileShader {
private static final String NVAPSDK;
static {
- String nvapSDKProp = System.getProperty("NVAPSDK");
+ final String nvapSDKProp = System.getProperty("NVAPSDK");
if (nvapSDKProp != null) {
NVAPSDK = nvapSDKProp;
} else {
@@ -51,7 +51,7 @@ public class CompileShaderNVidia extends CompileShader {
return "glslf.bat";
}
- public static void main(String[] args) {
+ public static void main(final String[] args) {
new CompileShaderNVidia().run(args);
}
}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/packrect/Level.java b/src/jogl/classes/com/jogamp/opengl/util/packrect/Level.java
index 9aadfba93..e694f1b33 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/packrect/Level.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/packrect/Level.java
@@ -42,29 +42,29 @@ package com.jogamp.opengl.util.packrect;
import java.util.*;
public class Level {
- private int width;
+ private final int width;
private int height;
- private int yPos;
- private LevelSet holder;
+ private final int yPos;
+ private final LevelSet holder;
- private List rects = new ArrayList();
+ private final List rects = new ArrayList();
private List freeList;
private int nextAddX;
static class RectXComparator implements Comparator {
@Override
- public int compare(Rect r1, Rect r2) {
+ public int compare(final Rect r1, final Rect r2) {
return r1.x() - r2.x();
}
@Override
- public boolean equals(Object obj) {
+ public boolean equals(final Object obj) {
return this == obj;
}
}
private static final Comparator rectXComparator = new RectXComparator();
- public Level(int width, int height, int yPos, LevelSet holder) {
+ public Level(final int width, final int height, final int yPos, final LevelSet holder) {
this.width = width;
this.height = height;
this.yPos = yPos;
@@ -80,7 +80,7 @@ public class Level {
in the RectanglePacker and allocation from the free list. More
disruptive changes like compaction of the level must be
requested explicitly. */
- public boolean add(Rect rect) {
+ public boolean add(final Rect rect) {
if (rect.h() > height) {
// See whether it's worth trying to expand vertically
if (nextAddX + rect.w() > width) {
@@ -108,8 +108,8 @@ public class Level {
// See whether we can add from the free list
if (freeList != null) {
Rect candidate = null;
- for (Iterator iter = freeList.iterator(); iter.hasNext(); ) {
- Rect cur = iter.next();
+ for (final Iterator iter = freeList.iterator(); iter.hasNext(); ) {
+ final Rect cur = iter.next();
if (cur.canContain(rect)) {
candidate = cur;
break;
@@ -139,7 +139,7 @@ public class Level {
}
/** Removes the given Rect from this Level. */
- public boolean remove(Rect rect) {
+ public boolean remove(final Rect rect) {
if (!rects.remove(rect))
return false;
@@ -165,14 +165,14 @@ public class Level {
/** Indicates whether this Level could satisfy an allocation request
if it were compacted. */
- public boolean couldAllocateIfCompacted(Rect rect) {
+ public boolean couldAllocateIfCompacted(final Rect rect) {
if (rect.h() > height)
return false;
if (freeList == null)
return false;
int freeListWidth = 0;
- for (Iterator iter = freeList.iterator(); iter.hasNext(); ) {
- Rect cur = iter.next();
+ for (final Iterator iter = freeList.iterator(); iter.hasNext(); ) {
+ final Rect cur = iter.next();
freeListWidth += cur.w();
}
// Add on the remaining space at the end
@@ -180,12 +180,12 @@ public class Level {
return (freeListWidth >= rect.w());
}
- public void compact(Object backingStore, BackingStoreManager manager) {
+ public void compact(final Object backingStore, final BackingStoreManager manager) {
Collections.sort(rects, rectXComparator);
int nextCompactionDest = 0;
manager.beginMovement(backingStore, backingStore);
- for (Iterator iter = rects.iterator(); iter.hasNext(); ) {
- Rect cur = iter.next();
+ for (final Iterator iter = rects.iterator(); iter.hasNext(); ) {
+ final Rect cur = iter.next();
if (cur.x() != nextCompactionDest) {
manager.move(backingStore, cur,
backingStore, new Rect(nextCompactionDest, cur.y(), cur.w(), cur.h(), null));
@@ -203,9 +203,9 @@ public class Level {
}
/** Visits all Rects contained in this Level. */
- public void visit(RectVisitor visitor) {
- for (Iterator iter = rects.iterator(); iter.hasNext(); ) {
- Rect rect = iter.next();
+ public void visit(final RectVisitor visitor) {
+ for (final Iterator iter = rects.iterator(); iter.hasNext(); ) {
+ final Rect rect = iter.next();
visitor.visit(rect);
}
}
@@ -216,8 +216,8 @@ public class Level {
original Rects. */
public void updateRectangleReferences() {
for (int i = 0; i < rects.size(); i++) {
- Rect cur = rects.get(i);
- Rect next = cur.getNextLocation();
+ final Rect cur = rects.get(i);
+ final Rect next = cur.getNextLocation();
next.setPosition(cur.x(), cur.y());
if (cur.w() != next.w() || cur.h() != next.h())
throw new RuntimeException("Unexpected disparity in rectangle sizes during updateRectangleReferences");
@@ -235,8 +235,8 @@ public class Level {
Collections.sort(freeList, rectXComparator);
int i = 0;
while (i < freeList.size() - 1) {
- Rect r1 = freeList.get(i);
- Rect r2 = freeList.get(i+1);
+ final Rect r1 = freeList.get(i);
+ final Rect r2 = freeList.get(i+1);
if (r1.maxX() + 1 == r2.x()) {
// Coalesce r1 and r2 into one block
freeList.remove(i+1);
@@ -246,7 +246,7 @@ public class Level {
}
}
// See whether the last block bumps up against the addition point
- Rect last = freeList.get(freeList.size() - 1);
+ final Rect last = freeList.get(freeList.size() - 1);
if (last.maxX() + 1 == nextAddX) {
nextAddX -= last.w();
freeList.remove(freeList.size() - 1);
@@ -262,8 +262,8 @@ public class Level {
public void dumpFreeSpace() {
int freeListWidth = 0;
- for (Iterator iter = freeList.iterator(); iter.hasNext(); ) {
- Rect cur = iter.next();
+ for (final Iterator iter = freeList.iterator(); iter.hasNext(); ) {
+ final Rect cur = iter.next();
System.err.println(" Free rectangle at " + cur);
freeListWidth += cur.w();
}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/packrect/LevelSet.java b/src/jogl/classes/com/jogamp/opengl/util/packrect/LevelSet.java
index 433421f1a..803ca28cf 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/packrect/LevelSet.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/packrect/LevelSet.java
@@ -47,14 +47,14 @@ import java.util.*;
public class LevelSet {
// Maintained in sorted order by increasing Y coordinate
- private List levels = new ArrayList();
+ private final List levels = new ArrayList();
private int nextAddY;
- private int w;
+ private final int w;
private int h;
/** A LevelSet manages all of the backing store for a region of a
specified width and height. */
- public LevelSet(int w, int h) {
+ public LevelSet(final int w, final int h) {
this.w = w;
this.h = h;
}
@@ -66,14 +66,14 @@ public class LevelSet {
the LevelSet given its current dimensions, false if not. Caller
is responsible for performing compaction, expansion, etc. as a
consequence. */
- public boolean add(Rect rect) {
+ public boolean add(final Rect rect) {
if (rect.w() > w)
return false;
// Go in reverse order through the levels seeing whether we can
// trivially satisfy the allocation request
for (int i = levels.size() - 1; i >= 0; --i) {
- Level level = levels.get(i);
+ final Level level = levels.get(i);
if (level.add(rect))
return true;
}
@@ -82,7 +82,7 @@ public class LevelSet {
// increases the computational complexity of the addition process,
// but prevents us from expanding unnecessarily.
for (int i = levels.size() - 1; i >= 0; --i) {
- Level level = levels.get(i);
+ final Level level = levels.get(i);
if (level.couldAllocateIfCompacted(rect))
return false;
}
@@ -92,19 +92,19 @@ public class LevelSet {
if (nextAddY + rect.h() > h)
return false;
- Level newLevel = new Level(w, rect.h(), nextAddY, this);
+ final Level newLevel = new Level(w, rect.h(), nextAddY, this);
levels.add(newLevel);
nextAddY += rect.h();
- boolean res = newLevel.add(rect);
+ final boolean res = newLevel.add(rect);
if (!res)
throw new RuntimeException("Unexpected failure in addition to new Level");
return true;
}
/** Removes the given Rect from this LevelSet. */
- public boolean remove(Rect rect) {
+ public boolean remove(final Rect rect) {
for (int i = levels.size() - 1; i >= 0; --i) {
- Level level = levels.get(i);
+ final Level level = levels.get(i);
if (level.remove(rect))
return true;
}
@@ -116,14 +116,14 @@ public class LevelSet {
if necessary. This is the correct fallback path to {@link
#add(Rect)} above. Returns true if allocated successfully, false
otherwise (indicating the need to expand the backing store). */
- public boolean compactAndAdd(Rect rect,
- Object backingStore,
- BackingStoreManager manager) {
+ public boolean compactAndAdd(final Rect rect,
+ final Object backingStore,
+ final BackingStoreManager manager) {
for (int i = levels.size() - 1; i >= 0; --i) {
- Level level = levels.get(i);
+ final Level level = levels.get(i);
if (level.couldAllocateIfCompacted(rect)) {
level.compact(backingStore, manager);
- boolean res = level.add(rect);
+ final boolean res = level.add(rect);
if (!res)
throw new RuntimeException("Unexpected failure to add after compaction");
return true;
@@ -136,7 +136,7 @@ public class LevelSet {
/** Indicates whether it's legal to trivially increase the height of
the given Level. This is only possible if it's the last Level
added and there's enough room in the backing store. */
- public boolean canExpand(Level level, int height) {
+ public boolean canExpand(final Level level, final int height) {
if (levels.isEmpty())
return false; // Should not happen
if (levels.get(levels.size() - 1) == level &&
@@ -145,7 +145,7 @@ public class LevelSet {
return false;
}
- public void expand(Level level, int oldHeight, int newHeight) {
+ public void expand(final Level level, final int oldHeight, final int newHeight) {
nextAddY += (newHeight - oldHeight);
}
@@ -156,7 +156,7 @@ public class LevelSet {
/** Sets the height of this LevelSet. It is only legal to reduce the
height to greater than or equal to the currently used height. */
- public void setHeight(int height) throws IllegalArgumentException {
+ public void setHeight(final int height) throws IllegalArgumentException {
if (height < getUsedHeight()) {
throw new IllegalArgumentException("May not reduce height below currently used height");
}
@@ -170,11 +170,11 @@ public class LevelSet {
it may be profitable to perform a compaction. */
public float verticalFragmentationRatio() {
int freeHeight = 0;
- int usedHeight = getUsedHeight();
+ final int usedHeight = getUsedHeight();
if (usedHeight == 0)
return 0.0f;
- for (Iterator iter = iterator(); iter.hasNext(); ) {
- Level level = iter.next();
+ for (final Iterator iter = iterator(); iter.hasNext(); ) {
+ final Level level = iter.next();
if (level.isEmpty()) {
freeHeight += level.h();
}
@@ -187,9 +187,9 @@ public class LevelSet {
}
/** Visits all Rects contained in this LevelSet. */
- public void visit(RectVisitor visitor) {
- for (Iterator iter = levels.iterator(); iter.hasNext(); ) {
- Level level = iter.next();
+ public void visit(final RectVisitor visitor) {
+ for (final Iterator iter = levels.iterator(); iter.hasNext(); ) {
+ final Level level = iter.next();
level.visit(visitor);
}
}
@@ -199,8 +199,8 @@ public class LevelSet {
update the new Rects in a newly laid-out LevelSet with the
original Rects. */
public void updateRectangleReferences() {
- for (Iterator iter = levels.iterator(); iter.hasNext(); ) {
- Level level = iter.next();
+ for (final Iterator iter = levels.iterator(); iter.hasNext(); ) {
+ final Level level = iter.next();
level.updateRectangleReferences();
}
}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/packrect/Rect.java b/src/jogl/classes/com/jogamp/opengl/util/packrect/Rect.java
index 89f594230..cbf6b933c 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/packrect/Rect.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/packrect/Rect.java
@@ -77,11 +77,11 @@ public class Rect {
this(null);
}
- public Rect(Object userData) {
+ public Rect(final Object userData) {
this(0, 0, 0, 0, userData);
}
- public Rect(int x, int y, int w, int h, Object userData) {
+ public Rect(final int x, final int y, final int w, final int h, final Object userData) {
setPosition(x, y);
setSize(w, h);
setUserData(userData);
@@ -94,7 +94,7 @@ public class Rect {
public Object getUserData() { return userData; }
public Rect getNextLocation() { return nextLocation; }
- public void setPosition(int x, int y) {
+ public void setPosition(final int x, final int y) {
if (x < 0)
throw new IllegalArgumentException("Negative x");
if (y < 0)
@@ -103,7 +103,7 @@ public class Rect {
this.y = y;
}
- public void setSize(int w, int h) throws IllegalArgumentException {
+ public void setSize(final int w, final int h) throws IllegalArgumentException {
if (w < 0)
throw new IllegalArgumentException("Negative width");
if (h < 0)
@@ -112,8 +112,8 @@ public class Rect {
this.h = h;
}
- public void setUserData(Object obj) { userData = obj; }
- public void setNextLocation(Rect nextLocation) { this.nextLocation = nextLocation; }
+ public void setUserData(final Object obj) { userData = obj; }
+ public void setNextLocation(final Rect nextLocation) { this.nextLocation = nextLocation; }
// Helpers for computations.
@@ -139,7 +139,7 @@ public class Rect {
return y() + h() - 1;
}
- public boolean canContain(Rect other) {
+ public boolean canContain(final Rect other) {
return (w() >= other.w() &&
h() >= other.h());
}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/packrect/RectanglePacker.java b/src/jogl/classes/com/jogamp/opengl/util/packrect/RectanglePacker.java
index 44faa44b0..65f59ba53 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/packrect/RectanglePacker.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/packrect/RectanglePacker.java
@@ -48,34 +48,34 @@ import java.util.*;
backing store, when necessary. */
public class RectanglePacker {
- private BackingStoreManager manager;
+ private final BackingStoreManager manager;
private Object backingStore;
private LevelSet levels;
- private float EXPANSION_FACTOR = 0.5f;
- private float SHRINK_FACTOR = 0.3f;
+ private final float EXPANSION_FACTOR = 0.5f;
+ private final float SHRINK_FACTOR = 0.3f;
- private int initialWidth;
- private int initialHeight;
+ private final int initialWidth;
+ private final int initialHeight;
private int maxWidth = -1;
private int maxHeight = -1;
static class RectHComparator implements Comparator {
@Override
- public int compare(Rect r1, Rect r2) {
+ public int compare(final Rect r1, final Rect r2) {
return r2.h() - r1.h();
}
@Override
- public boolean equals(Object obj) {
+ public boolean equals(final Object obj) {
return this == obj;
}
}
private static final Comparator rectHComparator = new RectHComparator();
- public RectanglePacker(BackingStoreManager manager,
- int initialWidth,
- int initialHeight) {
+ public RectanglePacker(final BackingStoreManager manager,
+ final int initialWidth,
+ final int initialHeight) {
this.manager = manager;
levels = new LevelSet(initialWidth, initialHeight);
this.initialWidth = initialWidth;
@@ -95,7 +95,7 @@ public class RectanglePacker {
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) {
+ public void setMaxSize(final int maxWidth, final int maxHeight) {
this.maxWidth = maxWidth;
this.maxHeight = maxHeight;
}
@@ -107,7 +107,7 @@ public class RectanglePacker {
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 {
+ public void add(final Rect rect) throws RuntimeException {
// Allocate backing store if we don't have any yet
if (backingStore == null)
backingStore = manager.allocateBackingStore(levels.w(), levels.h());
@@ -143,12 +143,12 @@ public class RectanglePacker {
}
/** Removes the given rectangle from this RectanglePacker. */
- public void remove(Rect rect) {
+ public void remove(final Rect rect) {
levels.remove(rect);
}
/** Visits all Rects contained in this RectanglePacker. */
- public void visit(RectVisitor visitor) {
+ public void visit(final RectVisitor visitor) {
levels.visit(visitor);
}
@@ -168,7 +168,7 @@ public class RectanglePacker {
}
// The "cause" rect may be null
- private void compactImpl(Rect cause) {
+ private void compactImpl(final 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:
@@ -205,12 +205,12 @@ public class RectanglePacker {
nextLevelSet = new LevelSet(newWidth, newHeight);
// Make copies of all existing rectangles
- List newRects = new ArrayList();
- for (Iterator i1 = levels.iterator(); i1.hasNext(); ) {
- Level level = i1.next();
- for (Iterator i2 = level.iterator(); i2.hasNext(); ) {
- Rect cur = i2.next();
- Rect newRect = new Rect(0, 0, cur.w(), cur.h(), null);
+ final List newRects = new ArrayList();
+ for (final Iterator i1 = levels.iterator(); i1.hasNext(); ) {
+ final Level level = i1.next();
+ for (final Iterator i2 = level.iterator(); i2.hasNext(); ) {
+ final Rect cur = i2.next();
+ final Rect newRect = new Rect(0, 0, cur.w(), cur.h(), null);
cur.setNextLocation(newRect);
// Hook up the reverse mapping too for easier replacement
newRect.setNextLocation(cur);
@@ -222,7 +222,7 @@ public class RectanglePacker {
Collections.sort(newRects, rectHComparator);
// Try putting all of these rectangles into the new level set
done = true;
- for (Iterator iter = newRects.iterator(); iter.hasNext(); ) {
+ for (final Iterator iter = newRects.iterator(); iter.hasNext(); ) {
if (!nextLevelSet.add(iter.next())) {
done = false;
break;
@@ -268,13 +268,13 @@ public class RectanglePacker {
// new locations of rectangles on the backing store. Allocate a
// new backing store, move the contents over and deallocate the
// old one.
- Object newBackingStore = manager.allocateBackingStore(nextLevelSet.w(),
+ final Object newBackingStore = manager.allocateBackingStore(nextLevelSet.w(),
nextLevelSet.h());
manager.beginMovement(backingStore, newBackingStore);
- for (Iterator i1 = levels.iterator(); i1.hasNext(); ) {
- Level level = i1.next();
- for (Iterator i2 = level.iterator(); i2.hasNext(); ) {
- Rect cur = i2.next();
+ for (final Iterator i1 = levels.iterator(); i1.hasNext(); ) {
+ final Level level = i1.next();
+ for (final Iterator i2 = level.iterator(); i2.hasNext(); ) {
+ final Rect cur = i2.next();
manager.move(backingStore, cur,
newBackingStore, cur.getNextLocation());
}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/ImageSequence.java b/src/jogl/classes/com/jogamp/opengl/util/texture/ImageSequence.java
index a2d202d11..f5ef5672f 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/ImageSequence.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/ImageSequence.java
@@ -77,7 +77,7 @@ public class ImageSequence implements TextureSequence {
}
public final void addFrame(final GL gl, final Class> context, final String imageResourcePath, final String imageSuffix) throws IOException {
- URLConnection urlConn = IOUtil.getResource(context, imageResourcePath);
+ final URLConnection urlConn = IOUtil.getResource(context, imageResourcePath);
if(null != urlConn) {
final TextureData texData = TextureIO.newTextureData(GLProfile.getGL2ES2(), urlConn.getInputStream(), false, imageSuffix);
final Texture tex = new Texture(getTextureTarget());
@@ -97,7 +97,7 @@ public class ImageSequence implements TextureSequence {
public final boolean getManualStepping() { return manualStepping; }
public final TextureSequence.TextureFrame getFrame(final int idx) { return frames.get(idx); }
- public void destroy(GL gl) throws GLException {
+ public void destroy(final GL gl) throws GLException {
for(int i=frames.size()-1; i>=0; i--) {
frames.get(i).getTexture().destroy(gl);
}
@@ -133,7 +133,7 @@ public class ImageSequence implements TextureSequence {
}
@Override
- public TextureSequence.TextureFrame getNextTexture(GL gl) throws IllegalStateException {
+ public TextureSequence.TextureFrame getNextTexture(final GL gl) throws IllegalStateException {
if( !manualStepping ) {
frameIdx = ( frameIdx + 1 ) % frames.size();
}
@@ -153,7 +153,7 @@ public class ImageSequence implements TextureSequence {
private String textureLookupFunctionName = "myTexture2D";
@Override
- public String getTextureLookupFunctionName(String desiredFuncName) throws IllegalStateException {
+ public String getTextureLookupFunctionName(final String desiredFuncName) throws IllegalStateException {
if(useBuildInTexLookup) {
return "texture2D";
}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java b/src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java
index 47be0714e..e7693f4a6 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java
@@ -205,7 +205,7 @@ public class Texture {
private static final boolean disableNPOT = Debug.isPropertyDefined("jogl.texture.nonpot", true);
private static final boolean disableTexRect = Debug.isPropertyDefined("jogl.texture.notexrect", true);
- public Texture(GL gl, TextureData data) throws GLException {
+ public Texture(final GL gl, final TextureData data) throws GLException {
texID = 0;
updateImage(gl, data);
}
@@ -216,7 +216,7 @@ public class Texture {
* @param target the OpenGL texture target, eg GL.GL_TEXTURE_2D,
* GL2.GL_TEXTURE_RECTANGLE
*/
- public Texture(int target) {
+ public Texture(final int target) {
texID = 0;
this.target = target;
}
@@ -278,7 +278,7 @@ public class Texture {
* @throws GLException if no OpenGL context was current or if any
* OpenGL-related errors occurred
*/
- public void enable(GL gl) throws GLException {
+ public void enable(final GL gl) throws GLException {
if( !gl.isGLcore() && GLES2.GL_TEXTURE_EXTERNAL_OES != target) {
gl.glEnable(target);
}
@@ -305,7 +305,7 @@ public class Texture {
* @throws GLException if no OpenGL context was current or if any
* OpenGL-related errors occurred
*/
- public void disable(GL gl) throws GLException {
+ public void disable(final GL gl) throws GLException {
if( !gl.isGLcore() && GLES2.GL_TEXTURE_EXTERNAL_OES != target ) {
gl.glDisable(target);
}
@@ -325,7 +325,7 @@ public class Texture {
* @throws GLException if no OpenGL context was current or if any
* OpenGL-related errors occurred
*/
- public void bind(GL gl) throws GLException {
+ public void bind(final GL gl) throws GLException {
validateTexID(gl, true);
gl.glBindTexture(target, texID);
}
@@ -335,7 +335,7 @@ public class Texture {
*
* @throws GLException if any OpenGL-related errors occurred
*/
- public void destroy(GL gl) throws GLException {
+ public void destroy(final GL gl) throws GLException {
if(0!=texID) {
gl.glDeleteTextures(1, new int[] {texID}, 0);
texID = 0;
@@ -437,7 +437,7 @@ public class Texture {
*
* @return the texture coordinates corresponding to the specified sub-image
*/
- public TextureCoords getSubImageTexCoords(int x1, int y1, int x2, int y2) {
+ public TextureCoords getSubImageTexCoords(final int x1, final int y1, final int x2, final int y2) {
if (target == GL2.GL_TEXTURE_RECTANGLE_ARB) {
if (mustFlipVertically) {
return new TextureCoords(x1, texHeight - y1, x2, texHeight - y2);
@@ -445,12 +445,12 @@ public class Texture {
return new TextureCoords(x1, y1, x2, y2);
}
} else {
- float tx1 = (float)x1 / (float)texWidth;
- float ty1 = (float)y1 / (float)texHeight;
- float tx2 = (float)x2 / (float)texWidth;
- float ty2 = (float)y2 / (float)texHeight;
+ final float tx1 = (float)x1 / (float)texWidth;
+ final float ty1 = (float)y1 / (float)texHeight;
+ final float tx2 = (float)x2 / (float)texWidth;
+ final float ty2 = (float)y2 / (float)texHeight;
if (mustFlipVertically) {
- float yMax = (float) imgHeight / (float) texHeight;
+ final float yMax = (float) imgHeight / (float) texHeight;
return new TextureCoords(tx1, yMax - ty1, tx2, yMax - ty2);
} else {
return new TextureCoords(tx1, ty1, tx2, ty2);
@@ -464,7 +464,7 @@ public class Texture {
*
* @throws GLException if any OpenGL-related errors occurred
*/
- public void updateImage(GL gl, TextureData data) throws GLException {
+ public void updateImage(final GL gl, final TextureData data) throws GLException {
updateImage(gl, data, 0);
}
@@ -487,7 +487,7 @@ public class Texture {
* No-op if no change, otherwise generates new {@link TextureCoords}.
*
*/
- public void setMustFlipVertically(boolean v) {
+ public void setMustFlipVertically(final boolean v) {
if( v != mustFlipVertically ) {
mustFlipVertically = v;
updateTexCoords();
@@ -501,7 +501,7 @@ public class Texture {
*
* @throws GLException if any OpenGL-related errors occurred
*/
- public void updateImage(GL gl, TextureData data, int targetOverride) throws GLException {
+ public void updateImage(final GL gl, final TextureData data, final int targetOverride) throws GLException {
validateTexID(gl, true);
imgWidth = data.getWidth();
@@ -522,7 +522,7 @@ public class Texture {
data.setHaveGL12(gl.isExtensionAvailable(GLExtensions.VERSION_1_2));
// Indicates whether both width and height are power of two
- boolean isPOT = isPowerOfTwo(imgWidth) && isPowerOfTwo(imgHeight);
+ final boolean isPOT = isPowerOfTwo(imgWidth) && isPowerOfTwo(imgHeight);
// Note that automatic mipmap generation doesn't work for
// GL_ARB_texture_rectangle
@@ -634,7 +634,7 @@ public class Texture {
}
if (data.getMipmap() && !haveAutoMipmapGeneration) {
- int[] align = new int[1];
+ final int[] align = new int[1];
gl.glGetIntegerv(GL.GL_UNPACK_ALIGNMENT, align, 0); // save alignment
gl.glPixelStorei(GL.GL_UNPACK_ALIGNMENT, data.getAlignment());
@@ -644,7 +644,7 @@ public class Texture {
try {
// FIXME: may need check for GLUnsupportedException
- GLU glu = GLU.createGLU(gl);
+ final GLU glu = GLU.createGLU(gl);
glu.gluBuild2DMipmaps(texTarget, data.getInternalFormat(),
data.getWidth(), data.getHeight(),
data.getPixelFormat(), data.getPixelType(), data.getBuffer());
@@ -653,7 +653,7 @@ public class Texture {
}
} else {
checkCompressedTextureExtensions(gl, data);
- Buffer[] mipmapData = data.getMipmapData();
+ final Buffer[] mipmapData = data.getMipmapData();
if (mipmapData != null) {
int width = texWidth;
int height = texHeight;
@@ -684,7 +684,7 @@ public class Texture {
texWidth, texHeight, data.getBorder(),
data.getBuffer().capacity(), data.getBuffer());
} else {
- ByteBuffer buf = DDSImage.allocateBlankBuffer(texWidth,
+ final ByteBuffer buf = DDSImage.allocateBlankBuffer(texWidth,
texHeight,
data.getInternalFormat());
gl.glCompressedTexImage2D(texTarget, 0, data.getInternalFormat(),
@@ -710,9 +710,9 @@ public class Texture {
}
}
- int minFilter = (data.getMipmap() ? GL.GL_LINEAR_MIPMAP_LINEAR : GL.GL_LINEAR);
- int magFilter = GL.GL_LINEAR;
- int wrapMode = (gl.isExtensionAvailable(GLExtensions.VERSION_1_2) || !gl.isGL2()) ? GL.GL_CLAMP_TO_EDGE : GL2.GL_CLAMP;
+ final int minFilter = (data.getMipmap() ? GL.GL_LINEAR_MIPMAP_LINEAR : GL.GL_LINEAR);
+ final int magFilter = GL.GL_LINEAR;
+ final int wrapMode = (gl.isExtensionAvailable(GLExtensions.VERSION_1_2) || !gl.isGL2()) ? GL.GL_CLAMP_TO_EDGE : GL2.GL_CLAMP;
// REMIND: figure out what to do for GL_TEXTURE_RECTANGLE_ARB
if (texTarget != GL2.GL_TEXTURE_RECTANGLE_ARB) {
@@ -720,8 +720,8 @@ public class Texture {
gl.glTexParameteri(texParamTarget, GL.GL_TEXTURE_MAG_FILTER, magFilter);
gl.glTexParameteri(texParamTarget, GL.GL_TEXTURE_WRAP_S, wrapMode);
gl.glTexParameteri(texParamTarget, GL.GL_TEXTURE_WRAP_T, wrapMode);
- if (this.target == GL2.GL_TEXTURE_CUBE_MAP) {
- gl.glTexParameteri(texParamTarget, GL2.GL_TEXTURE_WRAP_R, wrapMode);
+ if (this.target == GL.GL_TEXTURE_CUBE_MAP) {
+ gl.glTexParameteri(texParamTarget, GL2ES2.GL_TEXTURE_WRAP_R, wrapMode);
}
}
@@ -758,7 +758,7 @@ public class Texture {
*
* @throws GLException if any OpenGL-related errors occurred
*/
- public void updateSubImage(GL gl, TextureData data, int mipmapLevel, int x, int y) throws GLException {
+ public void updateSubImage(final GL gl, final TextureData data, final int mipmapLevel, final int x, final int y) throws GLException {
if (usingAutoMipmapGeneration && mipmapLevel != 0) {
// When we're using mipmap generation via GL_GENERATE_MIPMAP, we
// don't need to update other mipmap levels
@@ -798,10 +798,10 @@ public class Texture {
* @throws GLException if no OpenGL context was current or if any
* OpenGL-related errors occurred
*/
- public void updateSubImage(GL gl, TextureData data, int mipmapLevel,
- int dstx, int dsty,
- int srcx, int srcy,
- int width, int height) throws GLException {
+ public void updateSubImage(final GL gl, final TextureData data, final int mipmapLevel,
+ final int dstx, final int dsty,
+ final int srcx, final int srcy,
+ final int width, final int height) throws GLException {
if (data.isDataCompressed()) {
throw new GLException("updateSubImage specifying a sub-rectangle is not supported for compressed TextureData");
}
@@ -823,8 +823,8 @@ public class Texture {
* @throws GLException if no OpenGL context was current or if any
* OpenGL-related errors occurred
*/
- public void setTexParameterf(GL gl, int parameterName,
- float value) {
+ public void setTexParameterf(final GL gl, final int parameterName,
+ final float value) {
bind(gl);
gl.glTexParameterf(target, parameterName, value);
}
@@ -836,8 +836,8 @@ public class Texture {
*
* @throws GLException if any OpenGL-related errors occurred
*/
- public void setTexParameterfv(GL gl, int parameterName,
- FloatBuffer params) {
+ public void setTexParameterfv(final GL gl, final int parameterName,
+ final FloatBuffer params) {
bind(gl);
gl.glTexParameterfv(target, parameterName, params);
}
@@ -849,8 +849,8 @@ public class Texture {
*
* @throws GLException if any OpenGL-related errors occurred
*/
- public void setTexParameterfv(GL gl, int parameterName,
- float[] params, int params_offset) {
+ public void setTexParameterfv(final GL gl, final int parameterName,
+ final float[] params, final int params_offset) {
bind(gl);
gl.glTexParameterfv(target, parameterName, params, params_offset);
}
@@ -865,8 +865,8 @@ public class Texture {
*
* @throws GLException if any OpenGL-related errors occurred
*/
- public void setTexParameteri(GL gl, int parameterName,
- int value) {
+ public void setTexParameteri(final GL gl, final int parameterName,
+ final int value) {
bind(gl);
gl.glTexParameteri(target, parameterName, value);
}
@@ -878,8 +878,8 @@ public class Texture {
*
* @throws GLException if any OpenGL-related errors occurred
*/
- public void setTexParameteriv(GL gl, int parameterName,
- IntBuffer params) {
+ public void setTexParameteriv(final GL gl, final int parameterName,
+ final IntBuffer params) {
bind(gl);
gl.glTexParameteriv(target, parameterName, params);
}
@@ -891,8 +891,8 @@ public class Texture {
*
* @throws GLException if any OpenGL-related errors occurred
*/
- public void setTexParameteriv(GL gl, int parameterName,
- int[] params, int params_offset) {
+ public void setTexParameteriv(final GL gl, final int parameterName,
+ final int[] params, final int params_offset) {
bind(gl);
gl.glTexParameteriv(target, parameterName, params, params_offset);
}
@@ -908,7 +908,7 @@ public class Texture {
* otherwise it may be null.
* @see #getTextureObject()
*/
- public int getTextureObject(GL gl) {
+ public int getTextureObject(final GL gl) {
validateTexID(gl, false);
return texID;
}
@@ -957,7 +957,7 @@ public class Texture {
*
* @return true if the given value is a power of two, false otherwise
*/
- private static boolean isPowerOfTwo(int val) {
+ private static boolean isPowerOfTwo(final int val) {
return ((val & (val - 1)) == 0);
}
@@ -969,7 +969,7 @@ public class Texture {
* @param val the value
* @return the next power of two
*/
- private static int nextPowerOfTwo(int val) {
+ private static int nextPowerOfTwo(final int val) {
int ret = 1;
while (ret < val) {
ret <<= 1;
@@ -981,7 +981,7 @@ public class Texture {
* Updates the actual image dimensions; usually only called from
* updateImage.
*/
- private void setImageSize(int width, int height, int target) {
+ private void setImageSize(final int width, final int height, final int target) {
imgWidth = width;
imgHeight = height;
updateTexCoords();
@@ -1010,7 +1010,7 @@ public class Texture {
}
}
- private void updateSubImageImpl(GL gl, TextureData data, int newTarget, int mipmapLevel,
+ private void updateSubImageImpl(final GL gl, final TextureData data, final int newTarget, final int mipmapLevel,
int dstx, int dsty,
int srcx, int srcy, int width, int height) throws GLException {
data.setHaveEXTABGR(gl.isExtensionAvailable(GLExtensions.EXT_abgr));
@@ -1081,15 +1081,15 @@ public class Texture {
data.getInternalFormat(),
buffer.remaining(), buffer);
} else {
- int[] align = { 0 };
- int[] rowLength = { 0 };
- int[] skipRows = { 0 };
- int[] skipPixels = { 0 };
+ final int[] align = { 0 };
+ final int[] rowLength = { 0 };
+ final int[] skipRows = { 0 };
+ final int[] skipPixels = { 0 };
gl.glGetIntegerv(GL.GL_UNPACK_ALIGNMENT, align, 0); // save alignment
if(gl.isGL2GL3()) {
- gl.glGetIntegerv(GL2GL3.GL_UNPACK_ROW_LENGTH, rowLength, 0); // save row length
- gl.glGetIntegerv(GL2GL3.GL_UNPACK_SKIP_ROWS, skipRows, 0); // save skipped rows
- gl.glGetIntegerv(GL2GL3.GL_UNPACK_SKIP_PIXELS, skipPixels, 0); // save skipped pixels
+ gl.glGetIntegerv(GL2ES2.GL_UNPACK_ROW_LENGTH, rowLength, 0); // save row length
+ gl.glGetIntegerv(GL2ES2.GL_UNPACK_SKIP_ROWS, skipRows, 0); // save skipped rows
+ gl.glGetIntegerv(GL2ES2.GL_UNPACK_SKIP_PIXELS, skipPixels, 0); // save skipped pixels
}
gl.glPixelStorei(GL.GL_UNPACK_ALIGNMENT, data.getAlignment());
if (DEBUG && VERBOSE) {
@@ -1102,9 +1102,9 @@ public class Texture {
System.out.println("height = " + height);
}
if(gl.isGL2GL3()) {
- gl.glPixelStorei(GL2GL3.GL_UNPACK_ROW_LENGTH, rowlen);
- gl.glPixelStorei(GL2GL3.GL_UNPACK_SKIP_ROWS, srcy);
- gl.glPixelStorei(GL2GL3.GL_UNPACK_SKIP_PIXELS, srcx);
+ gl.glPixelStorei(GL2ES2.GL_UNPACK_ROW_LENGTH, rowlen);
+ gl.glPixelStorei(GL2ES2.GL_UNPACK_SKIP_ROWS, srcy);
+ gl.glPixelStorei(GL2ES2.GL_UNPACK_SKIP_PIXELS, srcx);
} else {
if ( rowlen!=0 && rowlen!=width &&
srcy!=0 && srcx!=0 ) {
@@ -1118,14 +1118,14 @@ public class Texture {
buffer);
gl.glPixelStorei(GL.GL_UNPACK_ALIGNMENT, align[0]); // restore alignment
if(gl.isGL2GL3()) {
- gl.glPixelStorei(GL2GL3.GL_UNPACK_ROW_LENGTH, rowLength[0]); // restore row length
- gl.glPixelStorei(GL2GL3.GL_UNPACK_SKIP_ROWS, skipRows[0]); // restore skipped rows
- gl.glPixelStorei(GL2GL3.GL_UNPACK_SKIP_PIXELS, skipPixels[0]); // restore skipped pixels
+ gl.glPixelStorei(GL2ES2.GL_UNPACK_ROW_LENGTH, rowLength[0]); // restore row length
+ gl.glPixelStorei(GL2ES2.GL_UNPACK_SKIP_ROWS, skipRows[0]); // restore skipped rows
+ gl.glPixelStorei(GL2ES2.GL_UNPACK_SKIP_PIXELS, skipPixels[0]); // restore skipped pixels
}
}
}
- private void checkCompressedTextureExtensions(GL gl, TextureData data) {
+ private void checkCompressedTextureExtensions(final GL gl, final TextureData data) {
if (data.isDataCompressed()) {
switch (data.getInternalFormat()) {
case GL.GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
@@ -1145,10 +1145,10 @@ public class Texture {
}
}
- private boolean validateTexID(GL gl, boolean throwException) {
+ private boolean validateTexID(final GL gl, final boolean throwException) {
if( 0 == texID ) {
if( null != gl ) {
- int[] tmp = new int[1];
+ final int[] tmp = new int[1];
gl.glGenTextures(1, tmp, 0);
texID = tmp[0];
if ( 0 == texID && throwException ) {
@@ -1162,22 +1162,22 @@ public class Texture {
}
// Helper routines for disabling certain codepaths
- private static boolean haveNPOT(GL gl) {
+ private static boolean haveNPOT(final GL gl) {
return !disableNPOT && gl.isNPOTTextureAvailable();
}
- private static boolean haveTexRect(GL gl) {
+ private static boolean haveTexRect(final GL gl) {
return (!disableTexRect &&
TextureIO.isTexRectEnabled() &&
gl.isExtensionAvailable(GLExtensions.ARB_texture_rectangle));
}
- private static boolean preferTexRect(GL gl) {
+ private static boolean preferTexRect(final GL gl) {
// Prefer GL_ARB_texture_rectangle on ATI hardware on Mac OS X
// due to software fallbacks
if (NativeWindowFactory.TYPE_MACOSX == NativeWindowFactory.getNativeWindowType(false)) {
- String vendor = gl.glGetString(GL.GL_VENDOR);
+ final String vendor = gl.glGetString(GL.GL_VENDOR);
if (vendor != null && vendor.startsWith("ATI")) {
return true;
}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureCoords.java b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureCoords.java
index ba59f89c5..17fcc7016 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureCoords.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureCoords.java
@@ -48,14 +48,14 @@ package com.jogamp.opengl.util.texture;
public class TextureCoords {
// These represent the lower-left point
- private float left;
- private float bottom;
+ private final float left;
+ private final float bottom;
// These represent the upper-right point
- private float right;
- private float top;
+ private final float right;
+ private final float top;
- public TextureCoords(float left, float bottom,
- float right, float top) {
+ public TextureCoords(final float left, final float bottom,
+ final float right, final float top) {
this.left = left;
this.bottom = bottom;
this.right = right;
@@ -70,7 +70,7 @@ public class TextureCoords {
* right top
*
*/
- public float[] getST_LB_RB_LT_RT(float[] d, int d_off, float ss, float ts) {
+ public float[] getST_LB_RB_LT_RT(final float[] d, final int d_off, final float ss, final float ts) {
d[0+d_off] = left *ss; d[1+d_off] = bottom*ts;
d[2+d_off] = right *ss; d[3+d_off] = bottom*ts;
d[4+d_off] = left *ss; d[5+d_off] = top *ts;
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureData.java b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureData.java
index 5d88a76c0..5b2e4fc00 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureData.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureData.java
@@ -41,6 +41,7 @@ import java.nio.Buffer;
import javax.media.opengl.GLProfile;
+import com.jogamp.common.nio.Buffers;
import com.jogamp.opengl.util.GLBuffers;
import com.jogamp.opengl.util.GLPixelBuffer.GLPixelAttributes;
@@ -123,18 +124,18 @@ public class TextureData {
* data were invalid, such as requesting mipmap generation for a
* compressed texture
*/
- public TextureData(GLProfile glp,
- int internalFormat,
- int width,
- int height,
- int border,
- int pixelFormat,
- int pixelType,
- boolean mipmap,
- boolean dataIsCompressed,
- boolean mustFlipVertically,
- Buffer buffer,
- Flusher flusher) throws IllegalArgumentException {
+ public TextureData(final GLProfile glp,
+ final int internalFormat,
+ final int width,
+ final int height,
+ final int border,
+ final int pixelFormat,
+ final int pixelType,
+ final boolean mipmap,
+ final boolean dataIsCompressed,
+ final boolean mustFlipVertically,
+ final Buffer buffer,
+ final Flusher flusher) throws IllegalArgumentException {
this(glp, internalFormat, width, height, border, new GLPixelAttributes(pixelFormat, pixelType),
mipmap, dataIsCompressed, mustFlipVertically, buffer, flusher);
}
@@ -178,17 +179,17 @@ public class TextureData {
* data were invalid, such as requesting mipmap generation for a
* compressed texture
*/
- public TextureData(GLProfile glp,
- int internalFormat,
- int width,
- int height,
- int border,
- GLPixelAttributes pixelAttributes,
- boolean mipmap,
- boolean dataIsCompressed,
- boolean mustFlipVertically,
- Buffer buffer,
- Flusher flusher) throws IllegalArgumentException {
+ public TextureData(final GLProfile glp,
+ final int internalFormat,
+ final int width,
+ final int height,
+ final int border,
+ final GLPixelAttributes pixelAttributes,
+ final boolean mipmap,
+ final boolean dataIsCompressed,
+ final boolean mustFlipVertically,
+ final Buffer buffer,
+ final Flusher flusher) throws IllegalArgumentException {
if (mipmap && dataIsCompressed) {
throw new IllegalArgumentException("Can not generate mipmaps for compressed textures");
}
@@ -247,17 +248,17 @@ public class TextureData {
* data were invalid, such as requesting mipmap generation for a
* compressed texture
*/
- public TextureData(GLProfile glp,
- int internalFormat,
- int width,
- int height,
- int border,
- int pixelFormat,
- int pixelType,
- boolean dataIsCompressed,
- boolean mustFlipVertically,
- Buffer[] mipmapData,
- Flusher flusher) throws IllegalArgumentException {
+ public TextureData(final GLProfile glp,
+ final int internalFormat,
+ final int width,
+ final int height,
+ final int border,
+ final int pixelFormat,
+ final int pixelType,
+ final boolean dataIsCompressed,
+ final boolean mustFlipVertically,
+ final Buffer[] mipmapData,
+ final Flusher flusher) throws IllegalArgumentException {
this(glp, internalFormat, width, height, border, new GLPixelAttributes(pixelFormat, pixelType),
dataIsCompressed, mustFlipVertically, mipmapData, flusher);
}
@@ -300,16 +301,16 @@ public class TextureData {
* data were invalid, such as requesting mipmap generation for a
* compressed texture
*/
- public TextureData(GLProfile glp,
- int internalFormat,
- int width,
- int height,
- int border,
- GLPixelAttributes pixelAttributes,
- boolean dataIsCompressed,
- boolean mustFlipVertically,
- Buffer[] mipmapData,
- Flusher flusher) throws IllegalArgumentException {
+ public TextureData(final GLProfile glp,
+ final int internalFormat,
+ final int width,
+ final int height,
+ final int border,
+ final GLPixelAttributes pixelAttributes,
+ final boolean dataIsCompressed,
+ final boolean mustFlipVertically,
+ final Buffer[] mipmapData,
+ final Flusher flusher) throws IllegalArgumentException {
this.glProfile = glp;
this.width = width;
this.height = height;
@@ -318,7 +319,7 @@ public class TextureData {
this.internalFormat = internalFormat;
this.dataIsCompressed = dataIsCompressed;
this.mustFlipVertically = mustFlipVertically;
- this.mipmapData = (Buffer[]) mipmapData.clone();
+ this.mipmapData = mipmapData.clone();
this.flusher = flusher;
alignment = 1; // FIXME: is this correct enough in all situations?
for (int i = 0; i < mipmapData.length; i++) {
@@ -336,10 +337,10 @@ public class TextureData {
* Set the color space of the pixel data, which defaults to {@link ColorSpace#RGB}.
* @see #getColorSpace()
*/
- public void setColorSpace(ColorSpace cs) { pixelCS = cs; }
+ public void setColorSpace(final ColorSpace cs) { pixelCS = cs; }
/** Used only by subclasses */
- protected TextureData(GLProfile glp) { this.glProfile = glp; this.pixelAttributes = GLPixelAttributes.UNDEF; }
+ protected TextureData(final GLProfile glp) { this.glProfile = glp; this.pixelAttributes = GLPixelAttributes.UNDEF; }
/** Returns the width in pixels of the texture data. */
public int getWidth() { return width; }
@@ -399,20 +400,20 @@ public class TextureData {
}
/** Sets the width in pixels of the texture data. */
- public void setWidth(int width) { this.width = width; }
+ public void setWidth(final int width) { this.width = width; }
/** Sets the height in pixels of the texture data. */
- public void setHeight(int height) { this.height = height; }
+ public void setHeight(final int height) { this.height = height; }
/** Sets the border in pixels of the texture data. */
- public void setBorder(int border) { this.border = border; }
+ public void setBorder(final int border) { this.border = border; }
/** Sets the intended OpenGL pixel format of the texture data. */
- public void setPixelAttributes(GLPixelAttributes pixelAttributes) { this.pixelAttributes = pixelAttributes; }
+ public void setPixelAttributes(final GLPixelAttributes pixelAttributes) { this.pixelAttributes = pixelAttributes; }
/**
* Sets the intended OpenGL pixel format component of {@link GLPixelAttributes} of the texture data.
*
* Use {@link #setPixelAttributes(GLPixelAttributes)}, if setting format and type.
*
*/
- public void setPixelFormat(int pixelFormat) {
+ public void setPixelFormat(final int pixelFormat) {
if( pixelAttributes.format != pixelFormat ) {
pixelAttributes = new GLPixelAttributes(pixelFormat, pixelAttributes.type);
}
@@ -423,42 +424,42 @@ public class TextureData {
* Use {@link #setPixelAttributes(GLPixelAttributes)}, if setting format and type.
*
*/
- public void setPixelType(int pixelType) {
+ public void setPixelType(final int pixelType) {
if( pixelAttributes.type != pixelType) {
pixelAttributes = new GLPixelAttributes(pixelAttributes.format, pixelType);
}
}
/** Sets the intended OpenGL internal format of the texture data. */
- public void setInternalFormat(int internalFormat) { this.internalFormat = internalFormat; }
+ public void setInternalFormat(final int internalFormat) { this.internalFormat = internalFormat; }
/** Sets whether mipmaps should be generated for the texture data. */
- public void setMipmap(boolean mipmap) { this.mipmap = mipmap; }
+ public void setMipmap(final boolean mipmap) { this.mipmap = mipmap; }
/** Sets whether the texture data is in compressed form. */
- public void setIsDataCompressed(boolean compressed) { this.dataIsCompressed = compressed; }
+ public void setIsDataCompressed(final boolean compressed) { this.dataIsCompressed = compressed; }
/** Sets whether the texture coordinates must be flipped vertically
for proper display. */
- public void setMustFlipVertically(boolean mustFlipVertically) { this.mustFlipVertically = mustFlipVertically; }
+ public void setMustFlipVertically(final boolean mustFlipVertically) { this.mustFlipVertically = mustFlipVertically; }
/** Sets the texture data. */
- public void setBuffer(Buffer buffer) {
+ public void setBuffer(final Buffer buffer) {
this.buffer = buffer;
estimatedMemorySize = estimatedMemorySize(buffer);
}
/** Sets the required byte alignment for the texture data. */
- public void setAlignment(int alignment) { this.alignment = alignment; }
+ public void setAlignment(final int alignment) { this.alignment = alignment; }
/** Sets the row length needed for correct GL_UNPACK_ROW_LENGTH
specification. This is currently only supported for
non-mipmapped, non-compressed textures. */
- public void setRowLength(int rowLength) { this.rowLength = rowLength; }
+ public void setRowLength(final int rowLength) { this.rowLength = rowLength; }
/** Indicates to this TextureData whether the GL_EXT_abgr extension
is available. Used for optimization along some code paths to
avoid data copies. */
- public void setHaveEXTABGR(boolean haveEXTABGR) {
+ public void setHaveEXTABGR(final boolean haveEXTABGR) {
this.haveEXTABGR = haveEXTABGR;
}
/** Indicates to this TextureData whether OpenGL version 1.2 is
available. If not, falls back to relatively inefficient code
paths for several input data types (several kinds of packed
pixel formats, in particular). */
- public void setHaveGL12(boolean haveGL12) {
+ public void setHaveGL12(final boolean haveGL12) {
this.haveGL12 = haveGL12;
}
@@ -509,10 +510,10 @@ public class TextureData {
// Internals only below this point
//
- protected static int estimatedMemorySize(Buffer buffer) {
+ protected static int estimatedMemorySize(final Buffer buffer) {
if (buffer == null) {
return 0;
}
- return buffer.capacity() * GLBuffers.sizeOfBufferElem(buffer);
+ return buffer.capacity() * Buffers.sizeOfBufferElem(buffer);
}
}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java
index b2bcd0de3..19f2fc05b 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java
@@ -60,6 +60,7 @@ import javax.media.nativewindow.util.DimensionImmutable;
import javax.media.nativewindow.util.PixelFormat;
import javax.media.opengl.GL;
import javax.media.opengl.GL2;
+import javax.media.opengl.GL2ES3;
import javax.media.opengl.GL2GL3;
import javax.media.opengl.GLContext;
import javax.media.opengl.GLException;
@@ -209,8 +210,8 @@ public class TextureIO {
* 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,
+ public static TextureData newTextureData(final GLProfile glp, final File file,
+ final boolean mipmap,
String fileSuffix) throws IOException {
if (fileSuffix == null) {
fileSuffix = IOUtil.getFileSuffix(file);
@@ -239,9 +240,9 @@ public class TextureIO {
* 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 {
+ public static TextureData newTextureData(final GLProfile glp, final InputStream stream,
+ final boolean mipmap,
+ final String fileSuffix) throws IOException {
return newTextureDataImpl(glp, stream, 0, 0, mipmap, fileSuffix);
}
@@ -266,8 +267,8 @@ public class TextureIO {
* 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,
+ public static TextureData newTextureData(final GLProfile glp, final URL url,
+ final boolean mipmap,
String fileSuffix) throws IOException {
if (fileSuffix == null) {
fileSuffix = IOUtil.getFileSuffix(url.getPath());
@@ -314,10 +315,10 @@ public class TextureIO {
* 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,
+ public static TextureData newTextureData(final GLProfile glp, final File file,
+ final int internalFormat,
+ final int pixelFormat,
+ final boolean mipmap,
String fileSuffix) throws IOException, IllegalArgumentException {
if ((internalFormat == 0) || (pixelFormat == 0)) {
throw new IllegalArgumentException("internalFormat and pixelFormat must be non-zero");
@@ -362,11 +363,11 @@ public class TextureIO {
* 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 {
+ public static TextureData newTextureData(final GLProfile glp, final InputStream stream,
+ final int internalFormat,
+ final int pixelFormat,
+ final boolean mipmap,
+ final String fileSuffix) throws IOException, IllegalArgumentException {
if ((internalFormat == 0) || (pixelFormat == 0)) {
throw new IllegalArgumentException("internalFormat and pixelFormat must be non-zero");
}
@@ -406,10 +407,10 @@ public class TextureIO {
* 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,
+ public static TextureData newTextureData(final GLProfile glp, final URL url,
+ final int internalFormat,
+ final int pixelFormat,
+ final boolean mipmap,
String fileSuffix) throws IOException, IllegalArgumentException {
if ((internalFormat == 0) || (pixelFormat == 0)) {
throw new IllegalArgumentException("internalFormat and pixelFormat must be non-zero");
@@ -435,7 +436,7 @@ public class TextureIO {
* OpenGL error occurred
* @throws IllegalArgumentException if the passed TextureData was null
*/
- public static Texture newTexture(TextureData data) throws GLException, IllegalArgumentException {
+ public static Texture newTexture(final TextureData data) throws GLException, IllegalArgumentException {
return newTexture(GLContext.getCurrentGL(), data);
}
@@ -448,7 +449,7 @@ public class TextureIO {
* OpenGL error occurred
* @throws IllegalArgumentException if the passed TextureData was null
*/
- public static Texture newTexture(GL gl, TextureData data) throws GLException, IllegalArgumentException {
+ public static Texture newTexture(final GL gl, final TextureData data) throws GLException, IllegalArgumentException {
if (data == null) {
throw new IllegalArgumentException("Null TextureData");
}
@@ -470,11 +471,11 @@ public class TextureIO {
* @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 {
- GL gl = GLContext.getCurrentGL();
- GLProfile glp = gl.getGLProfile();
- TextureData data = newTextureData(glp, file, mipmap, IOUtil.getFileSuffix(file));
- Texture texture = newTexture(gl, data);
+ public static Texture newTexture(final File file, final boolean mipmap) throws IOException, GLException {
+ final GL gl = GLContext.getCurrentGL();
+ final GLProfile glp = gl.getGLProfile();
+ final TextureData data = newTextureData(glp, file, mipmap, IOUtil.getFileSuffix(file));
+ final Texture texture = newTexture(gl, data);
data.flush();
return texture;
}
@@ -499,11 +500,11 @@ public class TextureIO {
* @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 {
- GL gl = GLContext.getCurrentGL();
- GLProfile glp = gl.getGLProfile();
- TextureData data = newTextureData(glp, stream, mipmap, fileSuffix);
- Texture texture = newTexture(gl, data);
+ public static Texture newTexture(final InputStream stream, final boolean mipmap, final String fileSuffix) throws IOException, GLException {
+ final GL gl = GLContext.getCurrentGL();
+ final GLProfile glp = gl.getGLProfile();
+ final TextureData data = newTextureData(glp, stream, mipmap, fileSuffix);
+ final Texture texture = newTexture(gl, data);
data.flush();
return texture;
}
@@ -528,14 +529,14 @@ public class TextureIO {
* @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 {
+ public static Texture newTexture(final URL url, final boolean mipmap, String fileSuffix) throws IOException, GLException {
if (fileSuffix == null) {
fileSuffix = IOUtil.getFileSuffix(url.getPath());
}
- GL gl = GLContext.getCurrentGL();
- GLProfile glp = gl.getGLProfile();
- TextureData data = newTextureData(glp, url, mipmap, fileSuffix);
- Texture texture = newTexture(gl, data);
+ final GL gl = GLContext.getCurrentGL();
+ final GLProfile glp = gl.getGLProfile();
+ final TextureData data = newTextureData(glp, url, mipmap, fileSuffix);
+ final Texture texture = newTexture(gl, data);
data.flush();
return texture;
}
@@ -549,7 +550,7 @@ public class TextureIO {
* @param target the OpenGL target type, eg GL.GL_TEXTURE_2D,
* GL.GL_TEXTURE_RECTANGLE_ARB
*/
- public static Texture newTexture(int target) {
+ public static Texture newTexture(final int target) {
return new Texture(target);
}
@@ -579,31 +580,31 @@ public class TextureIO {
* @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 {
+ public static void write(final Texture texture, final 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();
+ final GL _gl = GLContext.getCurrentGL();
if (!_gl.isGL2GL3()) {
throw new GLException("Implementation only supports GL2GL3 (Use GLReadBufferUtil and the TextureData variant), have: " + _gl);
}
- GL2GL3 gl = _gl.getGL2();
+ final GL2GL3 gl = _gl.getGL2();
texture.bind(gl);
- 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);
+ final int internalFormat = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2GL3.GL_TEXTURE_INTERNAL_FORMAT);
+ final int width = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2GL3.GL_TEXTURE_WIDTH);
+ final int height = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2GL3.GL_TEXTURE_HEIGHT);
+ final 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);
+ final int size = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2GL3.GL_TEXTURE_COMPRESSED_IMAGE_SIZE);
+ final 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);
@@ -612,7 +613,7 @@ public class TextureIO {
int fetchedFormat = 0;
switch (internalFormat) {
case GL.GL_RGB:
- case GL2.GL_BGR:
+ case GL2GL3.GL_BGR:
case GL.GL_RGB8:
bytesPerPixel = 3;
fetchedFormat = GL.GL_RGB;
@@ -629,19 +630,19 @@ public class TextureIO {
}
// Fetch using glGetTexImage
- int packAlignment = glGetInteger(gl, GL.GL_PACK_ALIGNMENT);
- int packRowLength = glGetInteger(gl, GL2.GL_PACK_ROW_LENGTH);
- int packSkipRows = glGetInteger(gl, GL2.GL_PACK_SKIP_ROWS);
- int packSkipPixels = glGetInteger(gl, GL2.GL_PACK_SKIP_PIXELS);
- int packSwapBytes = glGetInteger(gl, GL2.GL_PACK_SWAP_BYTES);
+ final int packAlignment = glGetInteger(gl, GL.GL_PACK_ALIGNMENT);
+ final int packRowLength = glGetInteger(gl, GL2ES3.GL_PACK_ROW_LENGTH);
+ final int packSkipRows = glGetInteger(gl, GL2ES3.GL_PACK_SKIP_ROWS);
+ final int packSkipPixels = glGetInteger(gl, GL2ES3.GL_PACK_SKIP_PIXELS);
+ final int packSwapBytes = glGetInteger(gl, GL2GL3.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);
+ gl.glPixelStorei(GL2ES3.GL_PACK_ROW_LENGTH, 0);
+ gl.glPixelStorei(GL2ES3.GL_PACK_SKIP_ROWS, 0);
+ gl.glPixelStorei(GL2ES3.GL_PACK_SKIP_PIXELS, 0);
+ gl.glPixelStorei(GL2GL3.GL_PACK_SWAP_BYTES, 0);
- ByteBuffer res = ByteBuffer.allocate((width + (2 * border)) *
+ final ByteBuffer res = ByteBuffer.allocate((width + (2 * border)) *
(height + (2 * border)) *
bytesPerPixel);
if (DEBUG) {
@@ -651,10 +652,10 @@ public class TextureIO {
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);
+ gl.glPixelStorei(GL2ES3.GL_PACK_ROW_LENGTH, packRowLength);
+ gl.glPixelStorei(GL2ES3.GL_PACK_SKIP_ROWS, packSkipRows);
+ gl.glPixelStorei(GL2ES3.GL_PACK_SKIP_PIXELS, packSkipPixels);
+ gl.glPixelStorei(GL2GL3.GL_PACK_SWAP_BYTES, packSwapBytes);
data = new TextureData(gl.getGLProfile(), internalFormat, width, height, border, fetchedFormat, GL.GL_UNSIGNED_BYTE,
false, false, false, res, null);
@@ -668,9 +669,9 @@ public class TextureIO {
write(data, file);
}
- public static void write(TextureData data, File file) throws IOException, GLException {
- for (Iterator iter = textureWriters.iterator(); iter.hasNext(); ) {
- TextureWriter writer = iter.next();
+ public static void write(final TextureData data, final File file) throws IOException, GLException {
+ for (final Iterator iter = textureWriters.iterator(); iter.hasNext(); ) {
+ final TextureWriter writer = iter.next();
if (writer.write(file, data)) {
return;
}
@@ -689,7 +690,7 @@ public class TextureIO {
* The last provider added, will be the first provider to be tested.
*
*/
- public static void addTextureProvider(TextureProvider provider) {
+ public static void addTextureProvider(final 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
@@ -702,7 +703,7 @@ public class TextureIO {
* The last provider added, will be the first provider to be tested.
*
*/
- public static void addTextureWriter(TextureWriter writer) {
+ public static void addTextureWriter(final 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
@@ -727,7 +728,7 @@ public class TextureIO {
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) {
+ public static void setTexRectEnabled(final boolean enabled) {
texRectEnabled = enabled;
}
@@ -750,10 +751,10 @@ public class TextureIO {
if(GLProfile.isAWTAvailable()) {
try {
// Use reflection to avoid compile-time dependencies on AWT-related classes
- TextureProvider provider = (TextureProvider)
+ final TextureProvider provider = (TextureProvider)
Class.forName("com.jogamp.opengl.util.texture.spi.awt.IIOTextureProvider").newInstance();
addTextureProvider(provider);
- } catch (Exception e) {
+ } catch (final Exception e) {
if (DEBUG) {
e.printStackTrace();
}
@@ -771,14 +772,14 @@ public class TextureIO {
if(GLProfile.isAWTAvailable()) {
try {
// Use reflection to avoid compile-time dependencies on AWT-related classes
- TextureWriter writer = (TextureWriter)
+ final TextureWriter writer = (TextureWriter)
Class.forName("com.jogamp.opengl.util.texture.spi.awt.IIOTextureWriter").newInstance();
addTextureWriter(writer);
- } catch (Exception e) {
+ } catch (final Exception e) {
if (DEBUG) {
e.printStackTrace();
}
- } catch (Error e) {
+ } catch (final Error e) {
if (DEBUG) {
e.printStackTrace();
}
@@ -794,10 +795,10 @@ public class TextureIO {
}
// Implementation methods
- private static TextureData newTextureDataImpl(GLProfile glp, File file,
- int internalFormat,
- int pixelFormat,
- boolean mipmap,
+ private static TextureData newTextureDataImpl(final GLProfile glp, final File file,
+ final int internalFormat,
+ final int pixelFormat,
+ final boolean mipmap,
String fileSuffix) throws IOException {
if (file == null) {
throw new IOException("File was null");
@@ -805,9 +806,9 @@ public class TextureIO {
fileSuffix = toLowerCase(fileSuffix);
- for (Iterator iter = textureProviders.iterator(); iter.hasNext(); ) {
- TextureProvider provider = iter.next();
- TextureData data = provider.newTextureData(glp, file,
+ for (final Iterator iter = textureProviders.iterator(); iter.hasNext(); ) {
+ final TextureProvider provider = iter.next();
+ final TextureData data = provider.newTextureData(glp, file,
internalFormat,
pixelFormat,
mipmap,
@@ -820,10 +821,10 @@ public class TextureIO {
throw new IOException("No suitable reader for given file "+file.getAbsolutePath());
}
- private static TextureData newTextureDataImpl(GLProfile glp, InputStream stream,
- int internalFormat,
- int pixelFormat,
- boolean mipmap,
+ private static TextureData newTextureDataImpl(final GLProfile glp, InputStream stream,
+ final int internalFormat,
+ final int pixelFormat,
+ final boolean mipmap,
String fileSuffix) throws IOException {
if (stream == null) {
throw new IOException("Stream was null");
@@ -836,9 +837,9 @@ public class TextureIO {
stream = new BufferedInputStream(stream);
}
- for (Iterator iter = textureProviders.iterator(); iter.hasNext(); ) {
- TextureProvider provider = iter.next();
- TextureData data = provider.newTextureData(glp, stream,
+ for (final Iterator iter = textureProviders.iterator(); iter.hasNext(); ) {
+ final TextureProvider provider = iter.next();
+ final TextureData data = provider.newTextureData(glp, stream,
internalFormat,
pixelFormat,
mipmap,
@@ -851,10 +852,10 @@ public class TextureIO {
throw new IOException("No suitable reader for given stream");
}
- private static TextureData newTextureDataImpl(GLProfile glp, URL url,
- int internalFormat,
- int pixelFormat,
- boolean mipmap,
+ private static TextureData newTextureDataImpl(final GLProfile glp, final URL url,
+ final int internalFormat,
+ final int pixelFormat,
+ final boolean mipmap,
String fileSuffix) throws IOException {
if (url == null) {
throw new IOException("URL was null");
@@ -862,9 +863,9 @@ public class TextureIO {
fileSuffix = toLowerCase(fileSuffix);
- for (Iterator iter = textureProviders.iterator(); iter.hasNext(); ) {
- TextureProvider provider = iter.next();
- TextureData data = provider.newTextureData(glp, url,
+ for (final Iterator iter = textureProviders.iterator(); iter.hasNext(); ) {
+ final TextureProvider provider = iter.next();
+ final TextureData data = provider.newTextureData(glp, url,
internalFormat,
pixelFormat,
mipmap,
@@ -881,14 +882,14 @@ public class TextureIO {
// DDS provider -- supports files only for now
static class DDSTextureProvider implements TextureProvider {
@Override
- public TextureData newTextureData(GLProfile glp, File file,
- int internalFormat,
- int pixelFormat,
- boolean mipmap,
- String fileSuffix) throws IOException {
+ public TextureData newTextureData(final GLProfile glp, final File file,
+ final int internalFormat,
+ final int pixelFormat,
+ final boolean mipmap,
+ final String fileSuffix) throws IOException {
if (DDS.equals(fileSuffix) ||
DDS.equals(IOUtil.getFileSuffix(file))) {
- DDSImage image = DDSImage.read(file);
+ final DDSImage image = DDSImage.read(file);
return newTextureData(glp, image, internalFormat, pixelFormat, mipmap);
}
@@ -896,16 +897,16 @@ public class TextureIO {
}
@Override
- public TextureData newTextureData(GLProfile glp, InputStream stream,
- int internalFormat,
- int pixelFormat,
- boolean mipmap,
- String fileSuffix) throws IOException {
+ public TextureData newTextureData(final GLProfile glp, final InputStream stream,
+ final int internalFormat,
+ final int pixelFormat,
+ final boolean mipmap,
+ final String fileSuffix) throws IOException {
if (DDS.equals(fileSuffix) ||
DDSImage.isDDSImage(stream)) {
- byte[] data = IOUtil.copyStream2ByteArray(stream);
- ByteBuffer buf = ByteBuffer.wrap(data);
- DDSImage image = DDSImage.read(buf);
+ final byte[] data = IOUtil.copyStream2ByteArray(stream);
+ final ByteBuffer buf = ByteBuffer.wrap(data);
+ final DDSImage image = DDSImage.read(buf);
return newTextureData(glp, image, internalFormat, pixelFormat, mipmap);
}
@@ -913,12 +914,12 @@ public class TextureIO {
}
@Override
- public TextureData newTextureData(GLProfile glp, URL url,
- int internalFormat,
- int pixelFormat,
- boolean mipmap,
- String fileSuffix) throws IOException {
- InputStream stream = new BufferedInputStream(url.openStream());
+ public TextureData newTextureData(final GLProfile glp, final URL url,
+ final int internalFormat,
+ final int pixelFormat,
+ final boolean mipmap,
+ final String fileSuffix) throws IOException {
+ final InputStream stream = new BufferedInputStream(url.openStream());
try {
return newTextureData(glp, stream, internalFormat, pixelFormat, mipmap, fileSuffix);
} finally {
@@ -926,11 +927,11 @@ public class TextureIO {
}
}
- private TextureData newTextureData(GLProfile glp, final DDSImage image,
+ private TextureData newTextureData(final GLProfile glp, final DDSImage image,
int internalFormat,
int pixelFormat,
boolean mipmap) {
- DDSImage.ImageInfo info = image.getMipMap(0);
+ final DDSImage.ImageInfo info = image.getMipMap(0);
if (pixelFormat == 0) {
switch (image.getPixelFormat()) {
case DDSImage.D3DFMT_R8G8B8:
@@ -967,7 +968,7 @@ public class TextureIO {
break;
}
}
- TextureData.Flusher flusher = new TextureData.Flusher() {
+ final TextureData.Flusher flusher = new TextureData.Flusher() {
@Override
public void flush() {
image.close();
@@ -975,7 +976,7 @@ public class TextureIO {
};
TextureData data;
if (mipmap && image.getNumMipMaps() > 0) {
- Buffer[] mipmapData = new Buffer[image.getNumMipMaps()];
+ final Buffer[] mipmapData = new Buffer[image.getNumMipMaps()];
for (int i = 0; i < image.getNumMipMaps(); i++) {
mipmapData[i] = image.getMipMap(i).getData();
}
@@ -1013,12 +1014,12 @@ public class TextureIO {
// Base class for SGI RGB and TGA image providers
static abstract class StreamBasedTextureProvider implements TextureProvider {
@Override
- public TextureData newTextureData(GLProfile glp, File file,
- int internalFormat,
- int pixelFormat,
- boolean mipmap,
- String fileSuffix) throws IOException {
- InputStream inStream = new BufferedInputStream(new FileInputStream(file));
+ public TextureData newTextureData(final GLProfile glp, final File file,
+ final int internalFormat,
+ final int pixelFormat,
+ final boolean mipmap,
+ final String fileSuffix) throws IOException {
+ final InputStream inStream = new BufferedInputStream(new FileInputStream(file));
try {
// The SGIImage and TGAImage implementations use InputStreams
// anyway so there isn't much point in having a separate code
@@ -1034,12 +1035,12 @@ public class TextureIO {
}
@Override
- public TextureData newTextureData(GLProfile glp, URL url,
- int internalFormat,
- int pixelFormat,
- boolean mipmap,
- String fileSuffix) throws IOException {
- InputStream stream = new BufferedInputStream(url.openStream());
+ public TextureData newTextureData(final GLProfile glp, final URL url,
+ final int internalFormat,
+ final int pixelFormat,
+ final boolean mipmap,
+ final String fileSuffix) throws IOException {
+ final InputStream stream = new BufferedInputStream(url.openStream());
try {
return newTextureData(glp, stream, internalFormat, pixelFormat, mipmap, fileSuffix);
} finally {
@@ -1052,15 +1053,15 @@ public class TextureIO {
// SGI RGB image provider
static class SGITextureProvider extends StreamBasedTextureProvider {
@Override
- public TextureData newTextureData(GLProfile glp, InputStream stream,
+ public TextureData newTextureData(final GLProfile glp, final InputStream stream,
int internalFormat,
int pixelFormat,
- boolean mipmap,
- String fileSuffix) throws IOException {
+ final boolean mipmap,
+ final String fileSuffix) throws IOException {
if (SGI.equals(fileSuffix) ||
SGI_RGB.equals(fileSuffix) ||
SGIImage.isSGIImage(stream)) {
- SGIImage image = SGIImage.read(stream);
+ final SGIImage image = SGIImage.read(stream);
if (pixelFormat == 0) {
pixelFormat = image.getFormat();
}
@@ -1088,13 +1089,13 @@ public class TextureIO {
// TGA (Targa) image provider
static class TGATextureProvider extends StreamBasedTextureProvider {
@Override
- public TextureData newTextureData(GLProfile glp, InputStream stream,
+ public TextureData newTextureData(final GLProfile glp, final InputStream stream,
int internalFormat,
int pixelFormat,
- boolean mipmap,
- String fileSuffix) throws IOException {
+ final boolean mipmap,
+ final String fileSuffix) throws IOException {
if (TGA.equals(fileSuffix)) {
- TGAImage image = TGAImage.read(glp, stream);
+ final TGAImage image = TGAImage.read(glp, stream);
if (pixelFormat == 0) {
pixelFormat = image.getGLFormat();
}
@@ -1126,11 +1127,11 @@ public class TextureIO {
// PNG image provider
static class PNGTextureProvider extends StreamBasedTextureProvider {
@Override
- public TextureData newTextureData(GLProfile glp, InputStream stream,
+ public TextureData newTextureData(final GLProfile glp, final InputStream stream,
int internalFormat,
int pixelFormat,
- boolean mipmap,
- String fileSuffix) throws IOException {
+ final boolean mipmap,
+ final String fileSuffix) throws IOException {
if (PNG.equals(fileSuffix)) {
final PNGPixelRect image = PNGPixelRect.read(stream, null, true /* directBuffer */, 0 /* destMinStrideInBytes */, true /* destIsGLOriented */);
final GLPixelAttributes glpa = GLPixelAttributes.convert(image.getPixelformat(), glp);
@@ -1166,13 +1167,13 @@ public class TextureIO {
// JPEG image provider
static class JPGTextureProvider extends StreamBasedTextureProvider {
@Override
- public TextureData newTextureData(GLProfile glp, InputStream stream,
+ public TextureData newTextureData(final GLProfile glp, final InputStream stream,
int internalFormat,
int pixelFormat,
- boolean mipmap,
- String fileSuffix) throws IOException {
+ final boolean mipmap,
+ final String fileSuffix) throws IOException {
if (JPG.equals(fileSuffix)) {
- JPEGImage image = JPEGImage.read(/*glp, */ stream);
+ final JPEGImage image = JPEGImage.read(/*glp, */ stream);
if (pixelFormat == 0) {
pixelFormat = image.getGLFormat();
}
@@ -1205,8 +1206,8 @@ public class TextureIO {
//
static class DDSTextureWriter implements TextureWriter {
@Override
- public boolean write(File file,
- TextureData data) throws IOException {
+ public boolean write(final File file,
+ final TextureData data) throws IOException {
if (DDS.equals(IOUtil.getFileSuffix(file))) {
// See whether the DDS writer can handle this TextureData
final GLPixelAttributes pixelAttribs = data.getPixelAttributes();
@@ -1239,7 +1240,7 @@ public class TextureIO {
mipmaps = new ByteBuffer[] { (ByteBuffer) data.getBuffer() };
}
- DDSImage image = DDSImage.createFromData(d3dFormat,
+ final DDSImage image = DDSImage.createFromData(d3dFormat,
data.getWidth(),
data.getHeight(),
mipmaps);
@@ -1256,9 +1257,9 @@ public class TextureIO {
//
static class SGITextureWriter implements TextureWriter {
@Override
- public boolean write(File file,
- TextureData data) throws IOException {
- String fileSuffix = IOUtil.getFileSuffix(file);
+ public boolean write(final File file,
+ final TextureData data) throws IOException {
+ final String fileSuffix = IOUtil.getFileSuffix(file);
if (SGI.equals(fileSuffix) ||
SGI_RGB.equals(fileSuffix)) {
// See whether the SGI writer can handle this TextureData
@@ -1269,7 +1270,7 @@ public class TextureIO {
pixelFormat == GL.GL_RGBA) &&
(pixelType == GL.GL_BYTE ||
pixelType == GL.GL_UNSIGNED_BYTE)) {
- ByteBuffer buf = ((data.getBuffer() != null) ?
+ final ByteBuffer buf = ((data.getBuffer() != null) ?
(ByteBuffer) data.getBuffer() :
(ByteBuffer) data.getMipmapData()[0]);
byte[] bytes;
@@ -1282,7 +1283,7 @@ public class TextureIO {
buf.rewind();
}
- SGIImage image = SGIImage.createFromData(data.getWidth(),
+ final SGIImage image = SGIImage.createFromData(data.getWidth(),
data.getHeight(),
(pixelFormat == GL.GL_RGBA),
bytes);
@@ -1302,8 +1303,8 @@ public class TextureIO {
static class TGATextureWriter implements TextureWriter {
@Override
- public boolean write(File file,
- TextureData data) throws IOException {
+ public boolean write(final File file,
+ final TextureData data) throws IOException {
if (TGA.equals(IOUtil.getFileSuffix(file))) {
// See whether the TGA writer can handle this TextureData
final GLPixelAttributes pixelAttribs = data.getPixelAttributes();
@@ -1311,7 +1312,7 @@ public class TextureIO {
final int pixelType = pixelAttribs.type;
if ((pixelFormat == GL.GL_RGB ||
pixelFormat == GL.GL_RGBA ||
- pixelFormat == GL2.GL_BGR ||
+ pixelFormat == GL2GL3.GL_BGR ||
pixelFormat == GL.GL_BGRA ) &&
(pixelType == GL.GL_BYTE ||
pixelType == GL.GL_UNSIGNED_BYTE)) {
@@ -1324,16 +1325,16 @@ public class TextureIO {
if( pixelFormat == GL.GL_RGB || pixelFormat == GL.GL_RGBA ) {
// Must reverse order of red and blue channels to get correct results
- int skip = ((pixelFormat == GL.GL_RGB) ? 3 : 4);
+ final int skip = ((pixelFormat == GL.GL_RGB) ? 3 : 4);
for (int i = 0; i < buf.remaining(); i += skip) {
- byte red = buf.get(i + 0);
- byte blue = buf.get(i + 2);
+ final byte red = buf.get(i + 0);
+ final byte blue = buf.get(i + 2);
buf.put(i + 0, blue);
buf.put(i + 2, red);
}
}
- TGAImage image = TGAImage.createFromData(data.getWidth(),
+ final TGAImage image = TGAImage.createFromData(data.getWidth(),
data.getHeight(),
(pixelFormat == GL.GL_RGBA || pixelFormat == GL.GL_BGRA),
false, buf);
@@ -1353,7 +1354,7 @@ public class TextureIO {
static class PNGTextureWriter implements TextureWriter {
@Override
- public boolean write(File file, TextureData data) throws IOException {
+ public boolean write(final File file, final TextureData data) throws IOException {
if (PNG.equals(IOUtil.getFileSuffix(file))) {
// See whether the PNG writer can handle this TextureData
final GLPixelAttributes pixelAttribs = data.getPixelAttributes();
@@ -1403,19 +1404,19 @@ public class TextureIO {
// Helper routines
//
- private static int glGetInteger(GL gl, int pname) {
- int[] tmp = new int[1];
+ private static int glGetInteger(final GL gl, final int pname) {
+ final int[] tmp = new int[1];
gl.glGetIntegerv(pname, tmp, 0);
return tmp[0];
}
- private static int glGetTexLevelParameteri(GL2GL3 gl, int target, int level, int pname) {
- int[] tmp = new int[1];
+ private static int glGetTexLevelParameteri(final GL2GL3 gl, final int target, final int level, final int pname) {
+ final int[] tmp = new int[1];
gl.glGetTexLevelParameteriv(target, 0, pname, tmp, 0);
return tmp[0];
}
- private static String toLowerCase(String arg) {
+ private static String toLowerCase(final String arg) {
if (arg == null) {
return null;
}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureSequence.java b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureSequence.java
index ee3b600a5..5add4f695 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureSequence.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureSequence.java
@@ -114,11 +114,11 @@ public interface TextureSequence {
* to associated related data.
*/
public static class TextureFrame extends TimeFrameI {
- public TextureFrame(Texture t, int pts, int duration) {
+ public TextureFrame(final Texture t, final int pts, final int duration) {
super(pts, duration);
texture = t;
}
- public TextureFrame(Texture t) {
+ public TextureFrame(final Texture t) {
texture = t;
}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureState.java b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureState.java
index d8320c690..467ab41c5 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureState.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureState.java
@@ -53,7 +53,7 @@ public class TextureState {
* Returns 0 is textureTarget is not supported.
*
*/
- public static final int getTextureTargetQueryName(int textureTarget) {
+ public static final int getTextureTargetQueryName(final int textureTarget) {
final int texBindQName;
switch(textureTarget) {
case GL.GL_TEXTURE_2D: texBindQName = GL.GL_TEXTURE_BINDING_2D; break;
@@ -61,7 +61,7 @@ public class TextureState {
case GL2ES2.GL_TEXTURE_3D: texBindQName = GL2ES2.GL_TEXTURE_BINDING_3D; break;
case GL2GL3.GL_TEXTURE_1D: texBindQName = GL2GL3.GL_TEXTURE_BINDING_1D; break;
case GL2GL3.GL_TEXTURE_1D_ARRAY: texBindQName = GL2GL3.GL_TEXTURE_BINDING_1D_ARRAY; break;
- case GL2GL3.GL_TEXTURE_2D_ARRAY: texBindQName = GL2GL3.GL_TEXTURE_BINDING_2D_ARRAY; break;
+ case GL.GL_TEXTURE_2D_ARRAY: texBindQName = GL.GL_TEXTURE_BINDING_2D_ARRAY; break;
case GL2GL3.GL_TEXTURE_RECTANGLE: texBindQName = GL2GL3.GL_TEXTURE_BINDING_RECTANGLE; break;
case GL2GL3.GL_TEXTURE_BUFFER: texBindQName = GL2GL3.GL_TEXTURE_BINDING_BUFFER; break;
case GL3.GL_TEXTURE_2D_MULTISAMPLE: texBindQName = GL3.GL_TEXTURE_BINDING_2D_MULTISAMPLE; break;
@@ -84,9 +84,9 @@ public class TextureState {
*/
private final int[] state = new int[] { 0, 0, 0, 0, 0, 0 };
- private static final String toHexString(int i) { return "0x"+Integer.toHexString(i); }
+ private static final String toHexString(final int i) { return "0x"+Integer.toHexString(i); }
- private static final int activeTexture(GL gl) {
+ private static final int activeTexture(final GL gl) {
final int[] vi = { 0 };
gl.glGetIntegerv(GL.GL_ACTIVE_TEXTURE, vi, 0);
return vi[0];
@@ -99,7 +99,7 @@ public class TextureState {
* @param textureTarget
* @throws GLException if textureTarget is not supported
*/
- public TextureState(GL gl, int textureTarget) throws GLException {
+ public TextureState(final GL gl, final int textureTarget) throws GLException {
this(gl, activeTexture(gl), textureTarget);
}
@@ -111,7 +111,7 @@ public class TextureState {
* @param textureTarget
* @throws GLException if textureTarget is not supported
*/
- public TextureState(GL gl, int textureUnit, int textureTarget) throws GLException {
+ public TextureState(final GL gl, final int textureUnit, final int textureTarget) throws GLException {
target = textureTarget;
state[0] = textureUnit;
final int texBindQName = getTextureTargetQueryName(textureTarget);
@@ -132,7 +132,7 @@ public class TextureState {
*
* @param gl current GL context's GL object
*/
- public final void restore(GL gl) {
+ public final void restore(final GL gl) {
gl.glActiveTexture(state[0]);
gl.glBindTexture(target, state[1]);
gl.glTexParameteri(target, GL.GL_TEXTURE_MAG_FILTER, state[2]);
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/awt/AWTTextureData.java b/src/jogl/classes/com/jogamp/opengl/util/texture/awt/AWTTextureData.java
index 202c08e4e..ccb3ecc3c 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/awt/AWTTextureData.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/awt/AWTTextureData.java
@@ -113,11 +113,11 @@ public class AWTTextureData extends TextureData {
* texture
* @param image the image containing the texture data
*/
- public AWTTextureData(GLProfile glp,
- int internalFormat,
- int pixelFormat,
- boolean mipmap,
- BufferedImage image) {
+ public AWTTextureData(final GLProfile glp,
+ final int internalFormat,
+ final int pixelFormat,
+ final boolean mipmap,
+ final BufferedImage image) {
super(glp);
if (internalFormat == 0) {
this.internalFormat = image.getColorModel().hasAlpha() ? GL.GL_RGBA : GL.GL_RGB;
@@ -176,7 +176,7 @@ public class AWTTextureData extends TextureData {
return buffer;
}
- private void createFromImage(GLProfile glp, BufferedImage image) {
+ private void createFromImage(final GLProfile glp, final BufferedImage image) {
pixelAttributes = GLPixelAttributes.UNDEF; // Determine from image
mustFlipVertically = true;
@@ -185,7 +185,7 @@ public class AWTTextureData extends TextureData {
int scanlineStride;
- SampleModel sm = image.getRaster().getSampleModel();
+ final SampleModel sm = image.getRaster().getSampleModel();
if (sm instanceof SinglePixelPackedSampleModel) {
scanlineStride =
((SinglePixelPackedSampleModel)sm).getScanlineStride();
@@ -300,7 +300,7 @@ public class AWTTextureData extends TextureData {
case BufferedImage.TYPE_BYTE_INDEXED:
case BufferedImage.TYPE_CUSTOM:
default:
- java.awt.image.ColorModel cm = image.getColorModel();
+ final java.awt.image.ColorModel cm = image.getColorModel();
if (cm.equals(rgbColorModel)) {
pixelAttributes = new GLPixelAttributes(GL.GL_RGB, GL.GL_UNSIGNED_BYTE);
rowLength = scanlineStride / 3;
@@ -362,7 +362,7 @@ public class AWTTextureData extends TextureData {
case BufferedImage.TYPE_BYTE_INDEXED:
case BufferedImage.TYPE_CUSTOM:
default:
- java.awt.image.ColorModel cm = image.getColorModel();
+ final java.awt.image.ColorModel cm = image.getColorModel();
if (cm.equals(rgbColorModel)) {
pixelAttributes = new GLPixelAttributes(GL.GL_RGB, GL.GL_UNSIGNED_BYTE);
rowLength = scanlineStride / 3;
@@ -382,9 +382,9 @@ public class AWTTextureData extends TextureData {
createNIOBufferFromImage(image);
}
- private void setupLazyCustomConversion(BufferedImage image) {
+ private void setupLazyCustomConversion(final BufferedImage image) {
imageForLazyCustomConversion = image;
- boolean hasAlpha = image.getColorModel().hasAlpha();
+ final boolean hasAlpha = image.getColorModel().hasAlpha();
int pixelFormat = pixelAttributes.format;
int pixelType = pixelAttributes.type;
if (pixelFormat == 0) {
@@ -395,7 +395,7 @@ public class AWTTextureData extends TextureData {
// Allow previously-selected pixelType (if any) to override that
// we can infer from the DataBuffer
- DataBuffer data = image.getRaster().getDataBuffer();
+ final DataBuffer data = image.getRaster().getDataBuffer();
if (data instanceof DataBufferByte || isPackedInt(image)) {
// Don't use GL_UNSIGNED_INT for BufferedImage packed int images
if (pixelType == 0) pixelType = GL.GL_UNSIGNED_BYTE;
@@ -405,7 +405,7 @@ public class AWTTextureData extends TextureData {
if (pixelType == 0) pixelType = GL.GL_FLOAT;
} else if (data instanceof DataBufferInt) {
// FIXME: should we support signed ints?
- if (pixelType == 0) pixelType = GL2GL3.GL_UNSIGNED_INT;
+ if (pixelType == 0) pixelType = GL.GL_UNSIGNED_INT;
} else if (data instanceof DataBufferShort) {
if (pixelType == 0) pixelType = GL.GL_SHORT;
} else if (data instanceof DataBufferUShort) {
@@ -416,12 +416,12 @@ public class AWTTextureData extends TextureData {
pixelAttributes = new GLPixelAttributes(pixelFormat, pixelType);
}
- private void createFromCustom(BufferedImage image) {
- int width = image.getWidth();
- int height = image.getHeight();
+ private void createFromCustom(final BufferedImage image) {
+ final int width = image.getWidth();
+ final int height = image.getHeight();
// create a temporary image that is compatible with OpenGL
- boolean hasAlpha = image.getColorModel().hasAlpha();
+ final boolean hasAlpha = image.getColorModel().hasAlpha();
java.awt.image.ColorModel cm = null;
int dataBufferType = image.getRaster().getDataBuffer().getDataType();
// Don't use integer components for packed int images
@@ -444,13 +444,13 @@ public class AWTTextureData extends TextureData {
}
}
- boolean premult = cm.isAlphaPremultiplied();
- WritableRaster raster =
+ final boolean premult = cm.isAlphaPremultiplied();
+ final WritableRaster raster =
cm.createCompatibleWritableRaster(width, height);
- BufferedImage texImage = new BufferedImage(cm, raster, premult, null);
+ final BufferedImage texImage = new BufferedImage(cm, raster, premult, null);
// copy the source image into the temporary image
- Graphics2D g = texImage.createGraphics();
+ final Graphics2D g = texImage.createGraphics();
g.setComposite(AlphaComposite.Src);
g.drawImage(image, 0, 0, null);
g.dispose();
@@ -459,8 +459,8 @@ public class AWTTextureData extends TextureData {
createNIOBufferFromImage(texImage);
}
- private boolean isPackedInt(BufferedImage image) {
- int imgType = image.getType();
+ private boolean isPackedInt(final BufferedImage image) {
+ final int imgType = image.getType();
return (imgType == BufferedImage.TYPE_INT_RGB ||
imgType == BufferedImage.TYPE_INT_BGR ||
imgType == BufferedImage.TYPE_INT_ARGB ||
@@ -476,11 +476,11 @@ public class AWTTextureData extends TextureData {
setupLazyCustomConversion(imageForLazyCustomConversion);
}
- private void createNIOBufferFromImage(BufferedImage image) {
+ private void createNIOBufferFromImage(final BufferedImage image) {
buffer = wrapImageDataBuffer(image);
}
- private Buffer wrapImageDataBuffer(BufferedImage image) {
+ private Buffer wrapImageDataBuffer(final BufferedImage image) {
//
// Note: Grabbing the DataBuffer will defeat Java2D's image
// management mechanism (as of JDK 5/6, at least). This shouldn't
@@ -490,7 +490,7 @@ public class AWTTextureData extends TextureData {
// it could be.
//
- DataBuffer data = image.getRaster().getDataBuffer();
+ final DataBuffer data = image.getRaster().getDataBuffer();
if (data instanceof DataBufferByte) {
return ByteBuffer.wrap(((DataBufferByte) data).getData());
} else if (data instanceof DataBufferDouble) {
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/awt/AWTTextureIO.java b/src/jogl/classes/com/jogamp/opengl/util/texture/awt/AWTTextureIO.java
index c70f5d0f3..c3b3adc75 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/awt/AWTTextureIO.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/awt/AWTTextureIO.java
@@ -59,8 +59,8 @@ public class AWTTextureIO extends TextureIO {
*
* @see #newTextureData(GLProfile, BufferedImage, boolean)
*/
- public static TextureData newTextureData(GLProfile glp, BufferedImage image,
- boolean mipmap) {
+ public static TextureData newTextureData(final GLProfile glp, final BufferedImage image,
+ final boolean mipmap) {
return newTextureDataImpl(glp, image, 0, 0, mipmap);
}
@@ -89,10 +89,10 @@ public class AWTTextureIO extends TextureIO {
* @throws IllegalArgumentException if either internalFormat or
* pixelFormat was 0
*/
- public static TextureData newTextureData(GLProfile glp, BufferedImage image,
- int internalFormat,
- int pixelFormat,
- boolean mipmap) throws IllegalArgumentException {
+ public static TextureData newTextureData(final GLProfile glp, final BufferedImage image,
+ final int internalFormat,
+ final int pixelFormat,
+ final boolean mipmap) throws IllegalArgumentException {
if ((internalFormat == 0) || (pixelFormat == 0)) {
throw new IllegalArgumentException("internalFormat and pixelFormat must be non-zero");
}
@@ -112,18 +112,18 @@ public class AWTTextureIO extends TextureIO {
* @throws GLException if no OpenGL context is current or if an
* OpenGL error occurred
*/
- public static Texture newTexture(GLProfile glp, BufferedImage image, boolean mipmap) throws GLException {
- TextureData data = newTextureData(glp, image, mipmap);
- Texture texture = newTexture(data);
+ public static Texture newTexture(final GLProfile glp, final BufferedImage image, final boolean mipmap) throws GLException {
+ final TextureData data = newTextureData(glp, image, mipmap);
+ final Texture texture = newTexture(data);
data.flush();
return texture;
}
- private static TextureData newTextureDataImpl(GLProfile glp,
- BufferedImage image,
- int internalFormat,
- int pixelFormat,
- boolean mipmap) {
+ private static TextureData newTextureDataImpl(final GLProfile glp,
+ final BufferedImage image,
+ final int internalFormat,
+ final int pixelFormat,
+ final boolean mipmap) {
return new AWTTextureData(glp, internalFormat, pixelFormat, mipmap, image);
}
}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/DDSImage.java b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/DDSImage.java
index 7311f20b3..20fc92819 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/DDSImage.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/DDSImage.java
@@ -52,6 +52,7 @@ import java.nio.channels.FileChannel;
import javax.media.opengl.GL;
+import com.jogamp.common.nio.Buffers;
import com.jogamp.common.util.IOUtil;
import com.jogamp.opengl.util.GLBuffers;
@@ -67,13 +68,13 @@ public class DDSImage {
that information in another way. */
public static class ImageInfo {
- private ByteBuffer data;
- private int width;
- private int height;
- private boolean isCompressed;
- private int compressionFormat;
+ private final ByteBuffer data;
+ private final int width;
+ private final int height;
+ private final boolean isCompressed;
+ private final int compressionFormat;
- public ImageInfo(ByteBuffer data, int width, int height, boolean compressed, int compressionFormat) {
+ public ImageInfo(final ByteBuffer data, final int width, final int height, final boolean compressed, final int compressionFormat) {
this.data = data; this.width = width; this.height = height;
this.isCompressed = compressed; this.compressionFormat = compressionFormat;
}
@@ -163,7 +164,7 @@ public class DDSImage {
@return DDS image object
@throws java.io.IOException if an I/O exception occurred
*/
- public static DDSImage read(String filename) throws IOException {
+ public static DDSImage read(final String filename) throws IOException {
return read(new File(filename));
}
@@ -174,8 +175,8 @@ public class DDSImage {
@return DDS image object
@throws java.io.IOException if an I/O exception occurred
*/
- public static DDSImage read(File file) throws IOException {
- DDSImage image = new DDSImage();
+ public static DDSImage read(final File file) throws IOException {
+ final DDSImage image = new DDSImage();
image.readFromFile(file);
return image;
}
@@ -187,8 +188,8 @@ public class DDSImage {
@return DDS image object
@throws java.io.IOException if an I/O exception occurred
*/
- public static DDSImage read(ByteBuffer buf) throws IOException {
- DDSImage image = new DDSImage();
+ public static DDSImage read(final ByteBuffer buf) throws IOException {
+ final DDSImage image = new DDSImage();
image.readFromBuffer(buf);
return image;
}
@@ -207,7 +208,7 @@ public class DDSImage {
fis = null;
}
buf = null;
- } catch (IOException e) {
+ } catch (final IOException e) {
e.printStackTrace();
}
}
@@ -228,11 +229,11 @@ public class DDSImage {
* specified arguments
* @return DDS image object
*/
- public static DDSImage createFromData(int d3dFormat,
- int width,
- int height,
- ByteBuffer[] mipmapData) throws IllegalArgumentException {
- DDSImage image = new DDSImage();
+ public static DDSImage createFromData(final int d3dFormat,
+ final int width,
+ final int height,
+ final ByteBuffer[] mipmapData) throws IllegalArgumentException {
+ final DDSImage image = new DDSImage();
image.initFromData(d3dFormat, width, height, mipmapData);
return image;
}
@@ -256,7 +257,7 @@ public class DDSImage {
in.mark(4);
int magic = 0;
for (int i = 0; i < 4; i++) {
- int tmp = in.read();
+ final int tmp = in.read();
if (tmp < 0) {
in.reset();
return false;
@@ -272,7 +273,7 @@ public class DDSImage {
* @param filename File name to write to
* @throws java.io.IOException if an I/O exception occurred
*/
- public void write(String filename) throws IOException {
+ public void write(final String filename) throws IOException {
write(new File(filename));
}
@@ -281,12 +282,12 @@ public class DDSImage {
* @param file File object to write to
* @throws java.io.IOException if an I/O exception occurred
*/
- public void write(File file) throws IOException {
- FileOutputStream stream = IOUtil.getFileOutputStream(file, true);
- FileChannel chan = stream.getChannel();
+ public void write(final File file) throws IOException {
+ final FileOutputStream stream = IOUtil.getFileOutputStream(file, true);
+ final FileChannel chan = stream.getChannel();
// Create ByteBuffer for header in case the start of our
// ByteBuffer isn't actually memory-mapped
- ByteBuffer hdr = ByteBuffer.allocate(Header.writtenSize());
+ final ByteBuffer hdr = ByteBuffer.allocate(Header.writtenSize());
hdr.order(ByteOrder.LITTLE_ENDIAN);
header.write(hdr);
hdr.rewind();
@@ -302,12 +303,12 @@ public class DDSImage {
* @param flag DDSD_* flags set to test
* @return true if flag present or false otherwise
*/
- public boolean isSurfaceDescFlagSet(int flag) {
+ public boolean isSurfaceDescFlagSet(final int flag) {
return ((header.flags & flag) != 0);
}
/** Test for presence/absence of pixel format flags (DDPF_*) */
- public boolean isPixelFormatFlagSet(int flag) {
+ public boolean isPixelFormatFlagSet(final int flag) {
return ((header.pfFlags & flag) != 0);
}
@@ -357,7 +358,7 @@ public class DDSImage {
* @param side Side to test
* @return true if side present or false otherwise
*/
- public boolean isCubemapSidePresent(int side) {
+ public boolean isCubemapSidePresent(final int side) {
return isCubemap() && (header.ddsCaps2 & side) != 0;
}
@@ -402,7 +403,7 @@ public class DDSImage {
* @param map Mipmap index
* @return Image object
*/
- public ImageInfo getMipMap(int map) {
+ public ImageInfo getMipMap(final int map) {
return getMipMap( 0, map );
}
@@ -412,7 +413,7 @@ public class DDSImage {
* @param map Mipmap index
* @return Image object
*/
- public ImageInfo getMipMap(int side, int map) {
+ public ImageInfo getMipMap(final int side, final int map) {
if (!isCubemap() && (side != 0)) {
throw new RuntimeException( "Illegal side for 2D texture: " + side );
}
@@ -434,7 +435,7 @@ public class DDSImage {
}
buf.limit(seek + mipMapSizeInBytes(map));
buf.position(seek);
- ByteBuffer next = buf.slice();
+ final ByteBuffer next = buf.slice();
buf.position(0);
buf.limit(buf.capacity());
return new ImageInfo(next, mipMapWidth(map), mipMapHeight(map), isCompressed(), getCompressionFormat());
@@ -454,12 +455,12 @@ public class DDSImage {
* @param side Cubemap side or 0 for 2D texture
* @return Mipmap image objects set
*/
- public ImageInfo[] getAllMipMaps( int side ) {
+ public ImageInfo[] getAllMipMaps( final int side ) {
int numLevels = getNumMipMaps();
if (numLevels == 0) {
numLevels = 1;
}
- ImageInfo[] result = new ImageInfo[numLevels];
+ final ImageInfo[] result = new ImageInfo[numLevels];
for (int i = 0; i < numLevels; i++) {
result[i] = getMipMap(side, i);
}
@@ -472,9 +473,9 @@ public class DDSImage {
@return String format code
*/
public static String getCompressionFormatName(int compressionFormat) {
- StringBuilder buf = new StringBuilder();
+ final StringBuilder buf = new StringBuilder();
for (int i = 0; i < 4; i++) {
- char c = (char) (compressionFormat & 0xFF);
+ final char c = (char) (compressionFormat & 0xFF);
buf.append(c);
compressionFormat = compressionFormat >> 8;
}
@@ -491,9 +492,9 @@ public class DDSImage {
GL_COMPRESSED_RGBA_S3TC_DXT3_EXT, or
GL_COMPRESSED_RGBA_S3TC_DXT5_EXT.
*/
- public static ByteBuffer allocateBlankBuffer(int width,
- int height,
- int openGLInternalFormat) {
+ public static ByteBuffer allocateBlankBuffer(final int width,
+ final int height,
+ final int openGLInternalFormat) {
int size = width * height;
switch (openGLInternalFormat) {
case GL.GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
@@ -511,15 +512,15 @@ public class DDSImage {
}
if (size == 0)
size = 1;
- return GLBuffers.newDirectByteBuffer(size);
+ return Buffers.newDirectByteBuffer(size);
}
public void debugPrint() {
- PrintStream tty = System.err;
+ final PrintStream tty = System.err;
tty.println("Compressed texture: " + isCompressed());
if (isCompressed()) {
- int fmt = getCompressionFormat();
- String name = getCompressionFormatName(fmt);
+ final int fmt = getCompressionFormat();
+ final String name = getCompressionFormatName(fmt);
tty.println("Compression format: 0x" + Integer.toHexString(fmt) + " (" + name + ")");
}
tty.println("Width: " + header.width + " Height: " + header.height);
@@ -567,7 +568,7 @@ public class DDSImage {
tty.println("Raw pixel format flags: 0x" + Integer.toHexString(header.pfFlags));
tty.println("Depth: " + getDepth());
tty.println("Number of mip maps: " + getNumMipMaps());
- int fmt = getPixelFormat();
+ final int fmt = getPixelFormat();
tty.print("Pixel format: ");
switch (fmt) {
case D3DFMT_R8G8B8: tty.println("D3DFMT_R8G8B8"); break;
@@ -629,8 +630,8 @@ public class DDSImage {
int ddsCapsReserved2;
int textureStage; // stage in multitexture cascade
- void read(ByteBuffer buf) throws IOException {
- int magic = buf.getInt();
+ void read(final ByteBuffer buf) throws IOException {
+ final int magic = buf.getInt();
if (magic != MAGIC) {
throw new IOException("Incorrect magic number 0x" +
Integer.toHexString(magic) +
@@ -671,7 +672,7 @@ public class DDSImage {
}
// buf must be in little-endian byte order
- void write(ByteBuffer buf) {
+ void write(final ByteBuffer buf) {
buf.putInt(MAGIC);
buf.putInt(size);
buf.putInt(flags);
@@ -722,15 +723,15 @@ public class DDSImage {
private DDSImage() {
}
- private void readFromFile(File file) throws IOException {
+ private void readFromFile(final File file) throws IOException {
fis = new FileInputStream(file);
chan = fis.getChannel();
- ByteBuffer buf = chan.map(FileChannel.MapMode.READ_ONLY,
+ final ByteBuffer buf = chan.map(FileChannel.MapMode.READ_ONLY,
0, (int) file.length());
readFromBuffer(buf);
}
- private void readFromBuffer(ByteBuffer buf) throws IOException {
+ private void readFromBuffer(final ByteBuffer buf) throws IOException {
this.buf = buf;
buf.order(ByteOrder.LITTLE_ENDIAN);
header = new Header();
@@ -738,10 +739,10 @@ public class DDSImage {
fixupHeader();
}
- private void initFromData(int d3dFormat,
- int width,
- int height,
- ByteBuffer[] mipmapData) throws IllegalArgumentException {
+ private void initFromData(final int d3dFormat,
+ final int width,
+ final int height,
+ final ByteBuffer[] mipmapData) throws IllegalArgumentException {
// Check size of mipmap data compared against format, width and
// height
int topmostMipmapSize = width * height;
@@ -784,7 +785,7 @@ public class DDSImage {
// OK, create one large ByteBuffer to hold all of the mipmap data
totalSize += Header.writtenSize();
- ByteBuffer buf = ByteBuffer.allocate(totalSize);
+ final ByteBuffer buf = ByteBuffer.allocate(totalSize);
buf.position(Header.writtenSize());
for (int i = 0; i < mipmapData.length; i++) {
buf.put(mipmapData[i]);
@@ -845,10 +846,10 @@ public class DDSImage {
}
}
- private static int computeCompressedBlockSize(int width,
- int height,
- int depth,
- int compressionFormat) {
+ private static int computeCompressedBlockSize(final int width,
+ final int height,
+ final int depth,
+ final int compressionFormat) {
int blockSize = ((width + 3)/4) * ((height + 3)/4) * ((depth + 3)/4);
switch (compressionFormat) {
case D3DFMT_DXT1: blockSize *= 8; break;
@@ -857,10 +858,10 @@ public class DDSImage {
return blockSize;
}
- private static int computeBlockSize(int width,
- int height,
- int depth,
- int pixelFormat) {
+ private static int computeBlockSize(final int width,
+ final int height,
+ final int depth,
+ final int pixelFormat) {
int blocksize;
switch (pixelFormat) {
case D3DFMT_R8G8B8:
@@ -883,7 +884,7 @@ public class DDSImage {
return blocksize;
}
- private int mipMapWidth(int map) {
+ private int mipMapWidth(final int map) {
int width = getWidth();
for (int i = 0; i < map; i++) {
width >>= 1;
@@ -891,7 +892,7 @@ public class DDSImage {
return Math.max(width, 1);
}
- private int mipMapHeight(int map) {
+ private int mipMapHeight(final int map) {
int height = getHeight();
for (int i = 0; i < map; i++) {
height >>= 1;
@@ -899,11 +900,11 @@ public class DDSImage {
return Math.max(height, 1);
}
- private int mipMapSizeInBytes(int map) {
- int width = mipMapWidth(map);
- int height = mipMapHeight(map);
+ private int mipMapSizeInBytes(final int map) {
+ final int width = mipMapWidth(map);
+ final int height = mipMapHeight(map);
if (isCompressed()) {
- int blockSize = (getCompressionFormat() == D3DFMT_DXT1 ? 8 : 16);
+ final int blockSize = (getCompressionFormat() == D3DFMT_DXT1 ? 8 : 16);
return ((width+3)/4)*((height+3)/4)*blockSize;
} else {
return width * height * (getDepth() / 8);
@@ -924,8 +925,8 @@ public class DDSImage {
return size;
}
- private int sideShiftInBytes(int side) {
- int[] sides = {
+ private int sideShiftInBytes(final int side) {
+ final int[] sides = {
DDSCAPS2_CUBEMAP_POSITIVEX,
DDSCAPS2_CUBEMAP_NEGATIVEX,
DDSCAPS2_CUBEMAP_POSITIVEY,
@@ -935,9 +936,9 @@ public class DDSImage {
};
int shift = 0;
- int sideSize = sideSizeInBytes();
+ final int sideSize = sideSizeInBytes();
for (int i = 0; i < sides.length; i++) {
- int temp = sides[i];
+ final int temp = sides[i];
if ((temp & side) != 0) {
return shift;
}
@@ -948,7 +949,7 @@ public class DDSImage {
throw new RuntimeException("Illegal side: " + side);
}
- private boolean printIfRecognized(PrintStream tty, int flags, int flag, String what) {
+ private boolean printIfRecognized(final PrintStream tty, final int flags, final int flag, final String what) {
if ((flags & flag) != 0) {
tty.println(what);
return true;
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/JPEGImage.java b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/JPEGImage.java
index 2081788ba..66a486f9b 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/JPEGImage.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/JPEGImage.java
@@ -51,12 +51,12 @@ public class JPEGImage {
* @return
* @throws IOException
*/
- public static JPEGImage read(InputStream in, ColorSpace cs) throws IOException {
+ public static JPEGImage read(final InputStream in, final ColorSpace cs) throws IOException {
return new JPEGImage(in, cs);
}
/** Reads a JPEG image from the specified InputStream, using the {@link ColorSpace#RGB}. */
- public static JPEGImage read(InputStream in) throws IOException {
+ public static JPEGImage read(final InputStream in) throws IOException {
return new JPEGImage(in, ColorSpace.RGB);
}
@@ -68,7 +68,7 @@ public class JPEGImage {
final ColorSpace storageCS;
ByteBuffer data = null;
- JPEGColorSink(ColorSpace storageCM) {
+ JPEGColorSink(final ColorSpace storageCM) {
this.storageCS = storageCM;
switch(storageCS) {
case RGB:
@@ -81,7 +81,7 @@ public class JPEGImage {
}
@Override
- public final ColorSpace allocate(int width, int height, ColorSpace sourceCM, int sourceComponents) throws RuntimeException {
+ public final ColorSpace allocate(final int width, final int height, final ColorSpace sourceCM, final int sourceComponents) throws RuntimeException {
this.width = width;
this.height = height;
this.sourceComponents = sourceComponents;
@@ -91,7 +91,7 @@ public class JPEGImage {
}
@Override
- public final void storeRGB(int x, int y, byte r, byte g, byte b) {
+ public final void storeRGB(final int x, final int y, final byte r, final byte g, final byte b) {
int i = ( ( height - y - 1 ) * width + x ) * storageComponents;
data.put(i++, r);
data.put(i++, g);
@@ -100,12 +100,12 @@ public class JPEGImage {
}
@Override
- public final void store2(int x, int y, byte c1, byte c2) {
+ public final void store2(final int x, final int y, final byte c1, final byte c2) {
throw new RuntimeException("not supported yet");
}
@Override
- public final void storeYCbCr(int x, int y, byte Y, byte Cb, byte Cr) {
+ public final void storeYCbCr(final int x, final int y, final byte Y, final byte Cb, final byte Cr) {
int i = ( ( height - y - 1 ) * width + x ) * storageComponents;
data.put(i++, Y);
data.put(i++, Cb);
@@ -118,7 +118,7 @@ public class JPEGImage {
}
};
- private JPEGImage(InputStream in, ColorSpace cs) throws IOException {
+ private JPEGImage(final InputStream in, final ColorSpace cs) throws IOException {
pixelStorage = new JPEGColorSink(cs);
final JPEGDecoder decoder = new JPEGDecoder();
decoder.parse(in);
@@ -139,9 +139,9 @@ public class JPEGImage {
}
decoder.clear(null);
}
- private JPEGColorSink pixelStorage;
+ private final JPEGColorSink pixelStorage;
private final int pixelWidth, pixelHeight, glFormat, bytesPerPixel;
- private boolean reversedChannels;
+ private final boolean reversedChannels;
private final ByteBuffer data;
/** Returns the color space of the pixel data */
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/LEDataInputStream.java b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/LEDataInputStream.java
index 3c90d96e4..f121478e7 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/LEDataInputStream.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/LEDataInputStream.java
@@ -76,7 +76,7 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
*/
DataInputStream dataIn;
- public LEDataInputStream(InputStream in)
+ public LEDataInputStream(final InputStream in)
{
super(in);
dataIn = new DataInputStream(in);
@@ -90,32 +90,32 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
}
@Override
- public synchronized final int read(byte b[]) throws IOException
+ public synchronized final int read(final byte b[]) throws IOException
{
return dataIn.read(b, 0, b.length);
}
@Override
- public synchronized final int read(byte b[], int off, int len) throws IOException
+ public synchronized final int read(final byte b[], final int off, final int len) throws IOException
{
- int rl = dataIn.read(b, off, len);
+ final int rl = dataIn.read(b, off, len);
return rl;
}
@Override
- public final void readFully(byte b[]) throws IOException
+ public final void readFully(final byte b[]) throws IOException
{
dataIn.readFully(b, 0, b.length);
}
@Override
- public final void readFully(byte b[], int off, int len) throws IOException
+ public final void readFully(final byte b[], final int off, final int len) throws IOException
{
dataIn.readFully(b, off, len);
}
@Override
- public final int skipBytes(int n) throws IOException
+ public final int skipBytes(final int n) throws IOException
{
return dataIn.skipBytes(n);
}
@@ -123,7 +123,7 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
@Override
public final boolean readBoolean() throws IOException
{
- int ch = dataIn.read();
+ final int ch = dataIn.read();
if (ch < 0)
throw new EOFException();
return (ch != 0);
@@ -132,7 +132,7 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
@Override
public final byte readByte() throws IOException
{
- int ch = dataIn.read();
+ final int ch = dataIn.read();
if (ch < 0)
throw new EOFException();
return (byte)(ch);
@@ -141,7 +141,7 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
@Override
public final int readUnsignedByte() throws IOException
{
- int ch = dataIn.read();
+ final int ch = dataIn.read();
if (ch < 0)
throw new EOFException();
return ch;
@@ -150,8 +150,8 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
@Override
public final short readShort() throws IOException
{
- int ch1 = dataIn.read();
- int ch2 = dataIn.read();
+ final int ch1 = dataIn.read();
+ final int ch2 = dataIn.read();
if ((ch1 | ch2) < 0)
throw new EOFException();
return (short)((ch1 << 0) + (ch2 << 8));
@@ -160,8 +160,8 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
@Override
public final int readUnsignedShort() throws IOException
{
- int ch1 = dataIn.read();
- int ch2 = dataIn.read();
+ final int ch1 = dataIn.read();
+ final int ch2 = dataIn.read();
if ((ch1 | ch2) < 0)
throw new EOFException();
return (ch1 << 0) + (ch2 << 8);
@@ -170,8 +170,8 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
@Override
public final char readChar() throws IOException
{
- int ch1 = dataIn.read();
- int ch2 = dataIn.read();
+ final int ch1 = dataIn.read();
+ final int ch2 = dataIn.read();
if ((ch1 | ch2) < 0)
throw new EOFException();
return (char)((ch1 << 0) + (ch2 << 8));
@@ -180,10 +180,10 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
@Override
public final int readInt() throws IOException
{
- int ch1 = dataIn.read();
- int ch2 = dataIn.read();
- int ch3 = dataIn.read();
- int ch4 = dataIn.read();
+ final int ch1 = dataIn.read();
+ final int ch2 = dataIn.read();
+ final int ch3 = dataIn.read();
+ final int ch4 = dataIn.read();
if ((ch1 | ch2 | ch3 | ch4) < 0)
throw new EOFException();
return ((ch1 << 0) + (ch2 << 8) + (ch3 << 16) + (ch4 << 24));
@@ -192,9 +192,9 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
@Override
public final long readLong() throws IOException
{
- int i1 = readInt();
- int i2 = readInt();
- return ((long)i1 & 0xFFFFFFFFL) + ((long)i2 << 32);
+ final int i1 = readInt();
+ final int i2 = readInt();
+ return (i1 & 0xFFFFFFFFL) + ((long)i2 << 32);
}
@Override
@@ -233,7 +233,7 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
* dont call this it is not implemented
* @return empty new string
**/
- public final static String readUTF(DataInput in) throws IOException
+ public final static String readUTF(final 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
index 93b097500..add177546 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/LEDataOutputStream.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/LEDataOutputStream.java
@@ -72,7 +72,7 @@ public class LEDataOutputStream extends FilterOutputStream implements DataOutput
*/
DataOutputStream dataOut;
- public LEDataOutputStream(OutputStream out)
+ public LEDataOutputStream(final OutputStream out)
{
super(out);
dataOut = new DataOutputStream(out);
@@ -86,44 +86,44 @@ public class LEDataOutputStream extends FilterOutputStream implements DataOutput
}
@Override
- public synchronized final void write(byte b[]) throws IOException
+ public synchronized final void write(final byte b[]) throws IOException
{
dataOut.write(b, 0, b.length);
}
@Override
- public synchronized final void write(byte b[], int off, int len) throws IOException
+ public synchronized final void write(final byte b[], final int off, final int len) throws IOException
{
dataOut.write(b, off, len);
}
@Override
- public final void write(int b) throws IOException
+ public final void write(final int b) throws IOException
{
dataOut.write(b);
}
@Override
- public final void writeBoolean(boolean v) throws IOException
+ public final void writeBoolean(final boolean v) throws IOException
{
dataOut.writeBoolean(v);
}
@Override
- public final void writeByte(int v) throws IOException
+ public final void writeByte(final int v) throws IOException
{
dataOut.writeByte(v);
}
/** Don't call this -- not implemented */
@Override
- public final void writeBytes(String s) throws IOException
+ public final void writeBytes(final String s) throws IOException
{
throw new UnsupportedOperationException();
}
@Override
- public final void writeChar(int v) throws IOException
+ public final void writeChar(final int v) throws IOException
{
dataOut.writeChar(((v >> 8) & 0xff) |
((v & 0xff) << 8));
@@ -131,25 +131,25 @@ public class LEDataOutputStream extends FilterOutputStream implements DataOutput
/** Don't call this -- not implemented */
@Override
- public final void writeChars(String s) throws IOException
+ public final void writeChars(final String s) throws IOException
{
throw new UnsupportedOperationException();
}
@Override
- public final void writeDouble(double v) throws IOException
+ public final void writeDouble(final double v) throws IOException
{
writeLong(Double.doubleToRawLongBits(v));
}
@Override
- public final void writeFloat(float v) throws IOException
+ public final void writeFloat(final float v) throws IOException
{
writeInt(Float.floatToRawIntBits(v));
}
@Override
- public final void writeInt(int v) throws IOException
+ public final void writeInt(final int v) throws IOException
{
dataOut.writeInt((v >>> 24) |
((v >>> 8) & 0xff00) |
@@ -158,14 +158,14 @@ public class LEDataOutputStream extends FilterOutputStream implements DataOutput
}
@Override
- public final void writeLong(long v) throws IOException
+ public final void writeLong(final long v) throws IOException
{
writeInt((int) v);
writeInt((int) (v >>> 32));
}
@Override
- public final void writeShort(int v) throws IOException
+ public final void writeShort(final int v) throws IOException
{
dataOut.writeShort(((v >> 8) & 0xff) |
((v & 0xff) << 8));
@@ -173,7 +173,7 @@ public class LEDataOutputStream extends FilterOutputStream implements DataOutput
/** Don't call this -- not implemented */
@Override
- public final void writeUTF(String s) throws IOException
+ public final void writeUTF(final 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
index cabf4ebc5..461ddceb8 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/NetPbmTextureWriter.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/NetPbmTextureWriter.java
@@ -63,7 +63,7 @@ public class NetPbmTextureWriter implements TextureWriter {
* magic 7 - PAM binary RGB or RGBA
*
*/
- public NetPbmTextureWriter(int magic) {
+ public NetPbmTextureWriter(final int magic) {
switch(magic) {
case 0:
case 6:
@@ -85,7 +85,7 @@ public class NetPbmTextureWriter implements TextureWriter {
public String getSuffix() { return (magic==6)?PPM:PAM; }
@Override
- public boolean write(File file, TextureData data) throws IOException {
+ public boolean write(final File file, final TextureData data) throws IOException {
boolean res;
final int magic_old = magic;
@@ -107,12 +107,12 @@ public class NetPbmTextureWriter implements TextureWriter {
return res;
}
- private boolean writeImpl(File file, TextureData data) throws IOException {
+ private boolean writeImpl(final File file, final TextureData data) throws IOException {
int pixelFormat = data.getPixelFormat();
final int pixelType = data.getPixelType();
if ((pixelFormat == GL.GL_RGB ||
pixelFormat == GL.GL_RGBA ||
- pixelFormat == GL2.GL_BGR ||
+ pixelFormat == GL2GL3.GL_BGR ||
pixelFormat == GL.GL_BGRA ) &&
(pixelType == GL.GL_BYTE ||
pixelType == GL.GL_UNSIGNED_BYTE)) {
@@ -123,13 +123,13 @@ public class NetPbmTextureWriter implements TextureWriter {
}
buf.rewind();
- int comps = ( pixelFormat == GL.GL_RGBA || pixelFormat == GL.GL_BGRA ) ? 4 : 3 ;
+ final int comps = ( pixelFormat == GL.GL_RGBA || pixelFormat == GL.GL_BGRA ) ? 4 : 3 ;
- if( pixelFormat == GL2.GL_BGR || pixelFormat == GL.GL_BGRA ) {
+ if( pixelFormat == GL2GL3.GL_BGR || pixelFormat == GL.GL_BGRA ) {
// Must reverse order of red and blue channels to get correct results
for (int i = 0; i < buf.remaining(); i += comps) {
- byte red = buf.get(i + 0);
- byte blue = buf.get(i + 2);
+ final byte red = buf.get(i + 0);
+ final byte blue = buf.get(i + 2);
buf.put(i + 0, blue);
buf.put(i + 2, red);
}
@@ -141,9 +141,9 @@ public class NetPbmTextureWriter implements TextureWriter {
throw new IOException("NetPbmTextureWriter magic 6 (PPM) doesn't RGBA pixel format, use magic 7 (PAM)");
}
- FileOutputStream fos = IOUtil.getFileOutputStream(file, true);
+ final FileOutputStream fos = IOUtil.getFileOutputStream(file, true);
- StringBuilder header = new StringBuilder();
+ final StringBuilder header = new StringBuilder();
header.append("P");
header.append(magic);
header.append("\n");
@@ -173,7 +173,7 @@ public class NetPbmTextureWriter implements TextureWriter {
fos.write(header.toString().getBytes());
- FileChannel fosc = fos.getChannel();
+ final FileChannel fosc = fos.getChannel();
fosc.write(buf);
fosc.force(true);
fosc.close();
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
index cbc8e652f..27549dfe3 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/SGIImage.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/SGIImage.java
@@ -54,7 +54,7 @@ import com.jogamp.common.util.IOUtil;
*/
public class SGIImage {
- private Header header;
+ private final Header header;
private int format;
private byte[] data;
// Used for decoding RLE-compressed images
@@ -105,7 +105,7 @@ public class SGIImage {
magic = MAGIC;
}
- Header(DataInputStream in) throws IOException {
+ Header(final DataInputStream in) throws IOException {
magic = in.readShort();
storage = in.readByte();
bpc = in.readByte();
@@ -116,13 +116,13 @@ public class SGIImage {
pixmin = in.readInt();
pixmax = in.readInt();
dummy = in.readInt();
- byte[] tmpname = new byte[80];
+ final byte[] tmpname = new byte[80];
in.read(tmpname);
int numChars = 0;
while (tmpname[numChars++] != 0);
imagename = new String(tmpname, 0, numChars);
colormap = in.readInt();
- byte[] tmp = new byte[404];
+ final byte[] tmp = new byte[404];
in.read(tmp);
}
@@ -142,21 +142,21 @@ public class SGIImage {
}
}
- private SGIImage(Header header) {
+ private SGIImage(final Header header) {
this.header = header;
}
/** Reads an SGI image from the specified file. */
- public static SGIImage read(String filename) throws IOException {
+ public static SGIImage read(final String filename) throws IOException {
return read(new FileInputStream(filename));
}
/** Reads an SGI image from the specified InputStream. */
- public static SGIImage read(InputStream in) throws IOException {
- DataInputStream dIn = new DataInputStream(new BufferedInputStream(in));
+ public static SGIImage read(final InputStream in) throws IOException {
+ final DataInputStream dIn = new DataInputStream(new BufferedInputStream(in));
- Header header = new Header(dIn);
- SGIImage res = new SGIImage(header);
+ final Header header = new Header(dIn);
+ final SGIImage res = new SGIImage(header);
res.decodeImage(dIn);
return res;
}
@@ -164,28 +164,28 @@ public class SGIImage {
/** Writes this SGIImage to the specified file name. If
flipVertically is set, outputs the scanlines from top to bottom
rather than the default bottom to top order. */
- public void write(String filename, boolean flipVertically) throws IOException {
+ public void write(final String filename, final boolean flipVertically) throws IOException {
write(new File(filename), flipVertically);
}
/** Writes this SGIImage to the specified file. If flipVertically is
set, outputs the scanlines from top to bottom rather than the
default bottom to top order. */
- public void write(File file, boolean flipVertically) throws IOException {
+ public void write(final File file, final boolean flipVertically) throws IOException {
writeImage(file, data, header.xsize, header.ysize, header.zsize, flipVertically);
}
/** Creates an SGIImage from the specified data in either RGB or
RGBA format. */
- public static SGIImage createFromData(int width,
- int height,
- boolean hasAlpha,
- byte[] data) {
- Header header = new Header();
+ public static SGIImage createFromData(final int width,
+ final int height,
+ final boolean hasAlpha,
+ final byte[] data) {
+ final Header header = new Header();
header.xsize = (short) width;
header.ysize = (short) height;
header.zsize = (short) (hasAlpha ? 4 : 3);
- SGIImage image = new SGIImage(header);
+ final SGIImage image = new SGIImage(header);
image.data = data;
return image;
}
@@ -201,9 +201,9 @@ public class SGIImage {
if (!in.markSupported()) {
throw new IOException("Can not test non-destructively whether given InputStream is an SGI RGB image");
}
- DataInputStream dIn = new DataInputStream(in);
+ final DataInputStream dIn = new DataInputStream(in);
dIn.mark(4);
- short magic = dIn.readShort();
+ final short magic = dIn.readShort();
dIn.reset();
return (magic == MAGIC);
}
@@ -236,10 +236,10 @@ public class SGIImage {
// Internals only below this point
//
- private void decodeImage(DataInputStream in) throws IOException {
+ private void decodeImage(final DataInputStream in) throws IOException {
if (header.storage == 1) {
// Read RLE compression data; row starts and sizes
- int x = header.ysize * header.zsize;
+ final int x = header.ysize * header.zsize;
rowStart = new int[x];
rowSize = new int[x];
rleEnd = 4 * 2 * x + 512;
@@ -253,16 +253,16 @@ public class SGIImage {
}
tmpData = readAll(in);
- int xsize = header.xsize;
- int ysize = header.ysize;
- int zsize = header.zsize;
+ final int xsize = header.xsize;
+ final int ysize = header.ysize;
+ final int zsize = header.zsize;
int lptr = 0;
data = new byte[xsize * ysize * 4];
- byte[] rbuf = new byte[xsize];
- byte[] gbuf = new byte[xsize];
- byte[] bbuf = new byte[xsize];
- byte[] abuf = new byte[xsize];
+ final byte[] rbuf = new byte[xsize];
+ final byte[] gbuf = new byte[xsize];
+ final byte[] bbuf = new byte[xsize];
+ final byte[] abuf = new byte[xsize];
for (int y = 0; y < ysize; y++) {
if (zsize >= 4) {
getRow(rbuf, y, 0);
@@ -293,15 +293,15 @@ public class SGIImage {
header.zsize = 4;
}
- private void getRow(byte[] buf, int y, int z) {
+ private void getRow(final byte[] buf, final int y, final int z) {
if (header.storage == 1) {
- int offs = rowStart[y + z * header.ysize] - rleEnd;
+ final int offs = rowStart[y + z * header.ysize] - rleEnd;
System.arraycopy(tmpData, offs, tmpRead, 0, rowSize[y + z * header.ysize]);
int iPtr = 0;
int oPtr = 0;
for (;;) {
byte pixel = tmpRead[iPtr++];
- int count = (int) (pixel & 0x7F);
+ int count = pixel & 0x7F;
if (count == 0) {
return;
}
@@ -317,12 +317,12 @@ public class SGIImage {
}
}
} else {
- int offs = (y * header.xsize) + (z * header.xsize * header.ysize);
+ final int offs = (y * header.xsize) + (z * header.xsize * header.ysize);
System.arraycopy(tmpData, offs, buf, 0, header.xsize);
}
}
- private void bwtorgba(byte[] b, byte[] dest, int lptr) {
+ private void bwtorgba(final byte[] b, final byte[] dest, final int lptr) {
for (int i = 0; i < b.length; i++) {
dest[4 * i + lptr + 0] = b[i];
dest[4 * i + lptr + 1] = b[i];
@@ -331,7 +331,7 @@ public class SGIImage {
}
}
- private void latorgba(byte[] b, byte[] a, byte[] dest, int lptr) {
+ private void latorgba(final byte[] b, final byte[] a, final byte[] dest, final int lptr) {
for (int i = 0; i < b.length; i++) {
dest[4 * i + lptr + 0] = b[i];
dest[4 * i + lptr + 1] = b[i];
@@ -340,7 +340,7 @@ public class SGIImage {
}
}
- private void rgbtorgba(byte[] r, byte[] g, byte[] b, byte[] dest, int lptr) {
+ private void rgbtorgba(final byte[] r, final byte[] g, final byte[] b, final byte[] dest, final int lptr) {
for (int i = 0; i < b.length; i++) {
dest[4 * i + lptr + 0] = r[i];
dest[4 * i + lptr + 1] = g[i];
@@ -349,7 +349,7 @@ public class SGIImage {
}
}
- private void rgbatorgba(byte[] r, byte[] g, byte[] b, byte[] a, byte[] dest, int lptr) {
+ private void rgbatorgba(final byte[] r, final byte[] g, final byte[] b, final byte[] a, final byte[] dest, final int lptr) {
for (int i = 0; i < b.length; i++) {
dest[4 * i + lptr + 0] = r[i];
dest[4 * i + lptr + 1] = g[i];
@@ -358,19 +358,19 @@ public class SGIImage {
}
}
- private static byte imgref(byte[] i,
- int x,
- int y,
- int z,
- int xs,
- int ys,
- int zs) {
+ private static byte imgref(final byte[] i,
+ final int x,
+ final int y,
+ final int z,
+ final int xs,
+ final int ys,
+ final int zs) {
return i[(xs*ys*z)+(xs*y)+x];
}
- private void writeHeader(DataOutputStream stream,
- int xsize, int ysize, int zsize, boolean rle) throws IOException {
+ private void writeHeader(final DataOutputStream stream,
+ final int xsize, final int ysize, final int zsize, final boolean rle) throws IOException {
// effects: outputs the 512-byte IRIS RGB header to STREAM, using xsize,
// ysize, and depth as the dimensions of the image. NOTE that
// the following defaults are used:
@@ -415,14 +415,14 @@ public class SGIImage {
stream.write(0);
}
- private void writeImage(File file,
+ private void writeImage(final File file,
byte[] data,
- int xsize,
- int ysize,
- int zsize,
- boolean yflip) throws IOException {
+ final int xsize,
+ final int ysize,
+ final int zsize,
+ final boolean yflip) throws IOException {
// Input data is in RGBRGBRGB or RGBARGBARGBA format; first unswizzle it
- byte[] tmpData = new byte[xsize * ysize * zsize];
+ final byte[] tmpData = new byte[xsize * ysize * zsize];
int dest = 0;
for (int i = 0; i < zsize; i++) {
for (int j = i; j < (xsize * ysize * zsize); j += zsize) {
@@ -447,8 +447,8 @@ public class SGIImage {
// x axis).
// Build the offset tables
- int[] starttab = new int[ysize * zsize];
- int[] lengthtab = new int[ysize * zsize];
+ final int[] starttab = new int[ysize * zsize];
+ final int[] lengthtab = new int[ysize * zsize];
// Temporary buffer for holding RLE data.
// Note that this makes the assumption that RLE-compressed data will
@@ -459,8 +459,8 @@ public class SGIImage {
// empirical evidence here; the break-even point seems to be a look-
// ahead of 3. (That is, if the three values following this one are all
// the same as the current value, switch to repeat mode.)
- int lookahead = 3;
- byte[] rlebuf = new byte[2 * xsize * ysize * zsize];
+ final int lookahead = 3;
+ final byte[] rlebuf = new byte[2 * xsize * ysize * zsize];
int cur_loc = 0; // current offset location.
int ptr = 0;
@@ -475,7 +475,7 @@ public class SGIImage {
yincr = -1;
}
- boolean DEBUG = false;
+ final boolean DEBUG = false;
for (int z = 0; z < zsize; z++) {
for (int y = ystart; y != yend; y += yincr) {
@@ -485,7 +485,7 @@ public class SGIImage {
byte count = 0;
boolean repeat_mode = false;
boolean should_switch = false;
- int start_ptr = ptr;
+ final int start_ptr = ptr;
int num_ptr = ptr++;
byte repeat_val = 0;
@@ -566,7 +566,7 @@ public class SGIImage {
x++;
}
// output this row's length into the length table
- int rowlen = ptr - start_ptr;
+ final int rowlen = ptr - start_ptr;
if (yflip)
lengthtab[ysize*z+(ysize-y-1)] = rowlen;
else
@@ -587,11 +587,11 @@ public class SGIImage {
if (DEBUG)
System.err.println("total_size was " + total_size);
- DataOutputStream stream = new DataOutputStream(new BufferedOutputStream(IOUtil.getFileOutputStream(file, true)));
+ final DataOutputStream stream = new DataOutputStream(new BufferedOutputStream(IOUtil.getFileOutputStream(file, true)));
writeHeader(stream, xsize, ysize, zsize, true);
- int SIZEOF_INT = 4;
+ final int SIZEOF_INT = 4;
for (int i = 0; i < (ysize * zsize); i++)
stream.writeInt(starttab[i] + 512 + (2 * ysize * zsize * SIZEOF_INT));
for (int i = 0; i < (ysize * zsize); i++)
@@ -602,7 +602,7 @@ public class SGIImage {
stream.close();
}
- private byte[] readAll(DataInputStream in) throws IOException {
+ private byte[] readAll(final DataInputStream in) throws IOException {
byte[] dest = new byte[16384];
int pos = 0;
int numRead = 0;
@@ -613,7 +613,7 @@ public class SGIImage {
numRead = in.read(dest, pos, dest.length - pos);
if (pos == dest.length) {
// Resize destination buffer
- byte[] newDest = new byte[2 * dest.length];
+ final byte[] newDest = new byte[2 * dest.length];
System.arraycopy(dest, 0, newDest, 0, pos);
dest = newDest;
}
@@ -626,7 +626,7 @@ public class SGIImage {
// Trim destination buffer
if (pos != dest.length) {
- byte[] finalDest = new byte[pos];
+ final byte[] finalDest = new byte[pos];
System.arraycopy(dest, 0, finalDest, 0, pos);
dest = finalDest;
}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/TGAImage.java b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/TGAImage.java
index 15cd63eb3..28823abb3 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/TGAImage.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/TGAImage.java
@@ -71,12 +71,12 @@ import com.jogamp.common.util.IOUtil;
*/
public class TGAImage {
- private Header header;
+ private final Header header;
private int format;
private int bpp;
private ByteBuffer data;
- private TGAImage(Header header) {
+ private TGAImage(final Header header) {
this.header = header;
}
@@ -114,7 +114,7 @@ public class TGAImage {
public final static int I_FOURWAY = 2;
/** Type of this TGA file format */
- private int tgaType;
+ private final int tgaType;
/** initial TGA image data fields */
private int idLength; // byte value
@@ -142,7 +142,7 @@ public class TGAImage {
tgaType = TYPE_OLD; // dont try and get footer.
}
- Header(LEDataInputStream in) throws IOException {
+ Header(final LEDataInputStream in) throws IOException {
tgaType = TYPE_OLD; // dont try and get footer.
// initial header fields
@@ -220,24 +220,24 @@ public class TGAImage {
public int size() { return 18 + idLength; }
// buf must be in little-endian byte order
- private void write(ByteBuffer buf) {
+ private void write(final 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.put(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);
+ buf.put(pixelDepth);
+ buf.put(imageDescriptor);
if (idLength > 0) {
try {
- byte[] chars = imageID.getBytes("US-ASCII");
+ final byte[] chars = imageID.getBytes("US-ASCII");
buf.put(chars);
- } catch (UnsupportedEncodingException e) {
+ } catch (final UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
}
@@ -250,7 +250,7 @@ public class TGAImage {
* it into the JimiImage structure. This was taken from the
* prototype and modified for the new Jimi structure
*/
- private void decodeImage(GLProfile glp, LEDataInputStream dIn) throws IOException {
+ private void decodeImage(final GLProfile glp, final LEDataInputStream dIn) throws IOException {
switch (header.imageType()) {
case Header.UCOLORMAPPED:
throw new IOException("TGADecoder Uncompressed Colormapped images not supported");
@@ -294,14 +294,14 @@ public class TGAImage {
* This assumes that the body is for a 24 bit or 32 bit for a
* RGB or ARGB image respectively.
*/
- private void decodeRGBImageU24_32(GLProfile glp, LEDataInputStream dIn) throws IOException {
+ private void decodeRGBImageU24_32(final GLProfile glp, final LEDataInputStream dIn) throws IOException {
setupImage24_32(glp);
int i; // row index
int y; // output row index
- int rawWidth = header.width() * bpp;
- byte[] rawBuf = new byte[rawWidth];
- byte[] tmpData = new byte[rawWidth * header.height()];
+ final int rawWidth = header.width() * bpp;
+ final byte[] rawBuf = new byte[rawWidth];
+ final byte[] tmpData = new byte[rawWidth * header.height()];
for (i = 0; i < header.height(); ++i) {
dIn.readFully(rawBuf, 0, rawWidth);
@@ -323,12 +323,12 @@ public class TGAImage {
* This assumes that the body is for a 24 bit or 32 bit for a
* RGB or ARGB image respectively.
*/
- private void decodeRGBImageRLE24_32(GLProfile glp, LEDataInputStream dIn) throws IOException {
+ private void decodeRGBImageRLE24_32(final GLProfile glp, final LEDataInputStream dIn) throws IOException {
setupImage24_32(glp);
- byte[] pixel = new byte[bpp];
- int rawWidth = header.width() * bpp;
- byte[] tmpData = new byte[rawWidth * header.height()];
+ final byte[] pixel = new byte[bpp];
+ final int rawWidth = header.width() * bpp;
+ final byte[] tmpData = new byte[rawWidth * header.height()];
int i = 0, j;
int packet, len;
while (i < tmpData.length) {
@@ -348,7 +348,7 @@ public class TGAImage {
data = ByteBuffer.wrap(tmpData);
}
- private void setupImage24_32(GLProfile glp) {
+ private void setupImage24_32(final GLProfile glp) {
bpp = header.pixelDepth / 8;
switch (header.pixelDepth) {
case 24:
@@ -367,7 +367,7 @@ public class TGAImage {
}
}
- private static void swapBGR(byte[] data, int bWidth, int height, int bpp) {
+ private static void swapBGR(final byte[] data, final int bWidth, final int height, final int bpp) {
byte r,b;
int k;
for(int i=0; i
*/
public class DebugGL2 extends DebugGL4bc {
- public DebugGL2(GL2 downstream) {
+ public DebugGL2(final GL2 downstream) {
super((GL4bc)downstream);
}
}
diff --git a/src/jogl/classes/javax/media/opengl/DebugGL3.java b/src/jogl/classes/javax/media/opengl/DebugGL3.java
index b490a63f4..678e800f6 100644
--- a/src/jogl/classes/javax/media/opengl/DebugGL3.java
+++ b/src/jogl/classes/javax/media/opengl/DebugGL3.java
@@ -15,7 +15,7 @@ package javax.media.opengl;
*
*/
public class DebugGL3 extends DebugGL4bc {
- public DebugGL3(GL3 downstream) {
+ public DebugGL3(final GL3 downstream) {
super((GL4bc)downstream);
}
}
diff --git a/src/jogl/classes/javax/media/opengl/DebugGL3bc.java b/src/jogl/classes/javax/media/opengl/DebugGL3bc.java
index 1d42afbc6..2636e9428 100644
--- a/src/jogl/classes/javax/media/opengl/DebugGL3bc.java
+++ b/src/jogl/classes/javax/media/opengl/DebugGL3bc.java
@@ -15,7 +15,7 @@ package javax.media.opengl;
*
*/
public class DebugGL3bc extends DebugGL4bc {
- public DebugGL3bc(GL3bc downstream) {
+ public DebugGL3bc(final GL3bc downstream) {
super((GL4bc)downstream);
}
}
diff --git a/src/jogl/classes/javax/media/opengl/DebugGL4.java b/src/jogl/classes/javax/media/opengl/DebugGL4.java
index 249d850a3..c4f8764cb 100644
--- a/src/jogl/classes/javax/media/opengl/DebugGL4.java
+++ b/src/jogl/classes/javax/media/opengl/DebugGL4.java
@@ -15,7 +15,7 @@ package javax.media.opengl;
*
*/
public class DebugGL4 extends DebugGL4bc {
- public DebugGL4(GL4 downstream) {
+ public DebugGL4(final GL4 downstream) {
super((GL4bc)downstream);
}
}
diff --git a/src/jogl/classes/javax/media/opengl/DebugGLES2.java b/src/jogl/classes/javax/media/opengl/DebugGLES2.java
index 6d666d82a..c4e06f347 100644
--- a/src/jogl/classes/javax/media/opengl/DebugGLES2.java
+++ b/src/jogl/classes/javax/media/opengl/DebugGLES2.java
@@ -15,7 +15,7 @@ package javax.media.opengl;
*
*/
public class DebugGLES2 extends DebugGLES3 {
- public DebugGLES2(GLES2 downstream) {
+ public DebugGLES2(final GLES2 downstream) {
super((GLES3)downstream);
}
}
diff --git a/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java b/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java
index 7e243471e..412af25e0 100644
--- a/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java
+++ b/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java
@@ -41,9 +41,13 @@
package javax.media.opengl;
import javax.media.nativewindow.NativeWindowException;
+
import java.util.List;
+
import javax.media.nativewindow.CapabilitiesImmutable;
+import com.jogamp.common.util.PropertyAccess;
+
import jogamp.opengl.Debug;
/**
The default implementation of the {@link
@@ -89,7 +93,7 @@ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser {
static {
Debug.initSingleton();
- DEBUG = Debug.isPropertyDefined("jogl.debug.CapabilitiesChooser", true);
+ DEBUG = PropertyAccess.isPropertyDefined("jogl.debug.CapabilitiesChooser", true);
}
private final static int NO_SCORE = -9999999;
@@ -142,7 +146,7 @@ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser {
}
// Create score array
- int[] scores = new int[availnum];
+ final int[] scores = new int[availnum];
for (int i = 0; i < scores.length; i++) {
scores[i] = NO_SCORE;
@@ -218,13 +222,13 @@ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser {
boolean gotHW = false;
int maxAbsoluteHWScore = 0;
for (int i = 0; i < availnum; i++) {
- int score = scores[i];
+ final int score = scores[i];
if (score == NO_SCORE) {
continue;
}
final GLCapabilitiesImmutable cur = (GLCapabilitiesImmutable) available.get(i);
if (cur.getHardwareAccelerated()) {
- int absScore = Math.abs(score);
+ final int absScore = Math.abs(score);
if (!gotHW ||
(absScore > maxAbsoluteHWScore)) {
gotHW = true;
@@ -265,7 +269,7 @@ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser {
int scoreClosestToZero = NO_SCORE;
int chosenIndex = -1;
for (int i = 0; i < availnum; i++) {
- int score = scores[i];
+ final int score = scores[i];
if (score == NO_SCORE) {
continue;
}
@@ -289,7 +293,7 @@ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser {
return chosenIndex;
}
- private static int sign(int score) {
+ private static int sign(final int score) {
if (score < 0) {
return -1;
}
diff --git a/src/jogl/classes/javax/media/opengl/GLCapabilities.java b/src/jogl/classes/javax/media/opengl/GLCapabilities.java
index 4dafe5262..0d65d35cb 100644
--- a/src/jogl/classes/javax/media/opengl/GLCapabilities.java
+++ b/src/jogl/classes/javax/media/opengl/GLCapabilities.java
@@ -80,7 +80,7 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
* @param glp GLProfile, or null for the default GLProfile
* @throws GLException if no profile is given and no default profile is available for the default device.
*/
- public GLCapabilities(GLProfile glp) throws GLException {
+ public GLCapabilities(final GLProfile glp) throws GLException {
glProfile = (null!=glp)?glp:GLProfile.getDefault(GLProfile.getDefaultDevice());
}
@@ -93,7 +93,7 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
public Object clone() {
try {
return super.clone();
- } catch (RuntimeException e) {
+ } catch (final RuntimeException e) {
throw new GLException(e);
}
}
@@ -103,7 +103,7 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
* from source into this instance.
* @return this instance
*/
- public GLCapabilities copyFrom(GLCapabilitiesImmutable source) {
+ public GLCapabilities copyFrom(final GLCapabilitiesImmutable source) {
super.copyFrom(source);
glProfile = source.getGLProfile();
isPBuffer = source.isPBuffer();
@@ -145,12 +145,12 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
}
@Override
- public boolean equals(Object obj) {
+ public boolean equals(final Object obj) {
if(this == obj) { return true; }
if(!(obj instanceof GLCapabilitiesImmutable)) {
return false;
}
- GLCapabilitiesImmutable other = (GLCapabilitiesImmutable)obj;
+ final GLCapabilitiesImmutable other = (GLCapabilitiesImmutable)obj;
boolean res = super.equals(obj) &&
other.getGLProfile()==glProfile &&
other.isPBuffer()==isPBuffer &&
@@ -176,7 +176,7 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
@Override
public int compareTo(final CapabilitiesImmutable o) {
if ( ! ( o instanceof GLCapabilitiesImmutable ) ) {
- Class> c = (null != o) ? o.getClass() : null ;
+ final Class> c = (null != o) ? o.getClass() : null ;
throw new ClassCastException("Not a GLCapabilitiesImmutable object, but " + c);
}
final GLCapabilitiesImmutable caps = (GLCapabilitiesImmutable) o;
@@ -235,7 +235,7 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
}
/** Sets the GL profile you desire */
- public void setGLProfile(GLProfile profile) {
+ public void setGLProfile(final GLProfile profile) {
glProfile=profile;
}
@@ -256,7 +256,7 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
* Requesting offscreen pbuffer mode disables the offscreen auto selection.
*
*/
- public void setPBuffer(boolean enable) {
+ public void setPBuffer(final boolean enable) {
if(enable) {
setOnscreen(false);
}
@@ -280,7 +280,7 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
* Requesting offscreen FBO mode disables the offscreen auto selection.
*
*/
- public void setFBO(boolean enable) {
+ public void setFBO(final boolean enable) {
if(enable) {
setOnscreen(false);
}
@@ -293,7 +293,7 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
}
/** Enables or disables double buffering. */
- public void setDoubleBuffered(boolean enable) {
+ public void setDoubleBuffered(final boolean enable) {
doubleBuffered = enable;
}
@@ -303,7 +303,7 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
}
/** Enables or disables stereo viewing. */
- public void setStereo(boolean enable) {
+ public void setStereo(final boolean enable) {
stereo = enable;
}
@@ -313,7 +313,7 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
}
/** Enables or disables hardware acceleration. */
- public void setHardwareAccelerated(boolean enable) {
+ public void setHardwareAccelerated(final boolean enable) {
hardwareAccelerated = enable;
}
@@ -323,7 +323,7 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
}
/** Sets the number of bits requested for the depth buffer. */
- public void setDepthBits(int depthBits) {
+ public void setDepthBits(final int depthBits) {
this.depthBits = depthBits;
}
@@ -333,7 +333,7 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
}
/** Sets the number of bits requested for the stencil buffer. */
- public void setStencilBits(int stencilBits) {
+ public void setStencilBits(final int stencilBits) {
this.stencilBits = stencilBits;
}
@@ -346,7 +346,7 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
red component. On some systems only the accumulation buffer
depth, which is the sum of the red, green, and blue bits, is
considered. */
- public void setAccumRedBits(int accumRedBits) {
+ public void setAccumRedBits(final int accumRedBits) {
this.accumRedBits = accumRedBits;
}
@@ -359,7 +359,7 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
green component. On some systems only the accumulation buffer
depth, which is the sum of the red, green, and blue bits, is
considered. */
- public void setAccumGreenBits(int accumGreenBits) {
+ public void setAccumGreenBits(final int accumGreenBits) {
this.accumGreenBits = accumGreenBits;
}
@@ -372,7 +372,7 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
blue component. On some systems only the accumulation buffer
depth, which is the sum of the red, green, and blue bits, is
considered. */
- public void setAccumBlueBits(int accumBlueBits) {
+ public void setAccumBlueBits(final int accumBlueBits) {
this.accumBlueBits = accumBlueBits;
}
@@ -385,7 +385,7 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
component. On some systems only the accumulation buffer depth,
which is the sum of the red, green, and blue bits, is
considered. */
- public void setAccumAlphaBits(int accumAlphaBits) {
+ public void setAccumAlphaBits(final int accumAlphaBits) {
this.accumAlphaBits = accumAlphaBits;
}
@@ -393,7 +393,7 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
* Sets the desired extension for full-scene antialiasing
* (FSAA), default is {@link #DEFAULT_SAMPLE_EXTENSION}.
*/
- public void setSampleExtension(String se) {
+ public void setSampleExtension(final String se) {
sampleExtension = se;
}
@@ -410,7 +410,7 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
* If enabled this method also invokes {@link #setAlphaBits(int) setAlphaBits(1)}
* if {@link #getAlphaBits()} == 0.
*/
- public void setSampleBuffers(boolean enable) {
+ public void setSampleBuffers(final boolean enable) {
sampleBuffers = enable;
if(sampleBuffers && getAlphaBits()==0) {
setAlphaBits(1);
@@ -427,7 +427,7 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
* to be allocated. Defaults to 2.
* @see #getNumSamples()
*/
- public void setNumSamples(int numSamples) {
+ public void setNumSamples(final int numSamples) {
this.numSamples = numSamples;
}
@@ -503,7 +503,7 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
object. */
@Override
public String toString() {
- StringBuilder msg = new StringBuilder();
+ final StringBuilder msg = new StringBuilder();
msg.append("GLCaps[");
toString(msg);
msg.append("]");
diff --git a/src/jogl/classes/javax/media/opengl/GLContext.java b/src/jogl/classes/javax/media/opengl/GLContext.java
index 9a4311772..16399799f 100644
--- a/src/jogl/classes/javax/media/opengl/GLContext.java
+++ b/src/jogl/classes/javax/media/opengl/GLContext.java
@@ -227,7 +227,7 @@ public abstract class GLContext {
/**
* @param isInit true if called for class initialization, otherwise false (re-init or destruction).
*/
- protected void resetStates(boolean isInit) {
+ protected void resetStates(final boolean isInit) {
if (DEBUG) {
System.err.println(getThreadName() + ": GLContext.resetStates(isInit "+isInit+")");
// Thread.dumpStack();
@@ -277,7 +277,7 @@ public abstract class GLContext {
* @param quirk the quirk to be tested, e.g. {@link GLRendererQuirks#NoDoubleBufferedPBuffer}.
* @throws IllegalArgumentException if the quirk is out of range
*/
- public final boolean hasRendererQuirk(int quirk) throws IllegalArgumentException {
+ public final boolean hasRendererQuirk(final int quirk) throws IllegalArgumentException {
return null != glRendererQuirks ? glRendererQuirks.exist(quirk) : false ;
}
@@ -460,7 +460,7 @@ public abstract class GLContext {
* @throws GLException if no context is current
*/
public static GL getCurrentGL() throws GLException {
- GLContext glc = getCurrent();
+ final GLContext glc = getCurrent();
if(null==glc) {
throw new GLException(getThreadName()+": No OpenGL context current on this thread");
}
@@ -495,7 +495,7 @@ public abstract class GLContext {
}
/** Returns a String representation of the {@link #makeCurrent()} result. */
- public static final String makeCurrentResultToString(int res) {
+ public static final String makeCurrentResultToString(final int res) {
switch(res) {
case CONTEXT_NOT_CURRENT: return "CONTEXT_NOT_CURRENT";
case CONTEXT_CURRENT: return "CONTEXT_CURRENT";
@@ -509,7 +509,7 @@ public abstract class GLContext {
* and has no other side-effects. For use by third parties adding
* new GLContext implementations; not for use by end users.
*/
- protected static void setCurrent(GLContext cur) {
+ protected static void setCurrent(final GLContext cur) {
if( TRACE_SWITCH ) {
if(null == cur) {
System.err.println(getThreadName()+": GLContext.ContextSwitch: - setCurrent() - NULL");
@@ -570,7 +570,7 @@ public abstract class GLContext {
/**
* Returns the attached user object for the given name to this GLContext.
*/
- public final Object getAttachedObject(String name) {
+ public final Object getAttachedObject(final String name) {
return attachedObjects.get(name);
}
@@ -578,11 +578,11 @@ public abstract class GLContext {
* Sets the attached user object for the given name to this GLContext.
* Returns the previously set object or null.
*/
- public final Object attachObject(String name, Object obj) {
+ public final Object attachObject(final String name, final Object obj) {
return attachedObjects.put(name, obj);
}
- public final Object detachObject(String name) {
+ public final Object detachObject(final String name) {
return attachedObjects.remove(name);
}
@@ -591,7 +591,7 @@ public abstract class GLContext {
*/
@Override
public String toString() {
- StringBuilder sb = new StringBuilder();
+ final StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
this.append(sb);
@@ -599,7 +599,7 @@ public abstract class GLContext {
return sb.toString();
}
- public final StringBuilder append(StringBuilder sb) {
+ public final StringBuilder append(final StringBuilder sb) {
sb.append("Version ").append(getGLVersion()).append(" [GL ").append(getGLVersionNumber()).append(", vendor ").append(getGLVendorVersionNumber());
sb.append("], options 0x");
sb.append(Integer.toHexString(ctxOptions));
@@ -816,7 +816,7 @@ public abstract class GLContext {
return "#version " + ctxGLSLVersion.getMajor() + ( minor < 10 ? "0"+minor : minor ) + esSuffix + "\n" ;
}
- protected static final VersionNumber getStaticGLSLVersionNumber(int glMajorVersion, int glMinorVersion, int ctxOptions) {
+ protected static final VersionNumber getStaticGLSLVersionNumber(final int glMajorVersion, final int glMinorVersion, final int ctxOptions) {
if( 0 != ( CTX_PROFILE_ES & ctxOptions ) ) {
if( 3 == glMajorVersion ) {
return Version300; // ES 3.0 -> GLSL 3.00
@@ -938,14 +938,14 @@ public abstract class GLContext {
final GL gl = getGL();
final int[] val = new int[] { 0 } ;
try {
- gl.glGetIntegerv(GL2GL3.GL_MAX_SAMPLES, val, 0);
+ gl.glGetIntegerv(GL2ES3.GL_MAX_SAMPLES, val, 0);
final int glerr = gl.glGetError();
if(GL.GL_NO_ERROR == glerr) {
return val[0];
} else if(DEBUG) {
System.err.println("GLContext.getMaxRenderbufferSamples: GL_MAX_SAMPLES query GL Error 0x"+Integer.toHexString(glerr));
}
- } catch (GLException gle) { gle.printStackTrace(); }
+ } catch (final GLException gle) { gle.printStackTrace(); }
}
return 0;
}
@@ -1188,7 +1188,7 @@ public abstract class GLContext {
*
* @throws GLException if the context is not current.
*/
- public final boolean setSwapInterval(int interval) throws GLException {
+ public final boolean setSwapInterval(final int interval) throws GLException {
validateCurrent();
if(0<=interval) {
if( !drawableRetargeted || !hasRendererQuirk(GLRendererQuirks.NoSetSwapIntervalPostRetarget) ) {
@@ -1200,7 +1200,7 @@ public abstract class GLContext {
}
return false;
}
- protected boolean setSwapIntervalImpl(int interval) {
+ protected boolean setSwapIntervalImpl(final int interval) {
return false;
}
/** Return the current swap interval.
@@ -1225,27 +1225,27 @@ public abstract class GLContext {
}
}
- public final boolean queryMaxSwapGroups(int[] maxGroups, int maxGroups_offset,
- int[] maxBarriers, int maxBarriers_offset) {
+ public final boolean queryMaxSwapGroups(final int[] maxGroups, final int maxGroups_offset,
+ final int[] maxBarriers, final int maxBarriers_offset) {
validateCurrent();
return queryMaxSwapGroupsImpl(maxGroups, maxGroups_offset, maxBarriers, maxBarriers_offset);
}
- protected boolean queryMaxSwapGroupsImpl(int[] maxGroups, int maxGroups_offset,
- int[] maxBarriers, int maxBarriers_offset) { return false; }
- public final boolean joinSwapGroup(int group) {
+ protected boolean queryMaxSwapGroupsImpl(final int[] maxGroups, final int maxGroups_offset,
+ final int[] maxBarriers, final int maxBarriers_offset) { return false; }
+ public final boolean joinSwapGroup(final int group) {
validateCurrent();
return joinSwapGroupImpl(group);
}
- protected boolean joinSwapGroupImpl(int group) { /** nop per default .. **/ return false; }
+ protected boolean joinSwapGroupImpl(final int group) { /** nop per default .. **/ return false; }
protected int currentSwapGroup = -1; // default: not set yet ..
public int getSwapGroup() {
return currentSwapGroup;
}
- public final boolean bindSwapBarrier(int group, int barrier) {
+ public final boolean bindSwapBarrier(final int group, final int barrier) {
validateCurrent();
return bindSwapBarrierImpl(group, barrier);
}
- protected boolean bindSwapBarrierImpl(int group, int barrier) { /** nop per default .. **/ return false; }
+ protected boolean bindSwapBarrierImpl(final int group, final int barrier) { /** nop per default .. **/ return false; }
/**
* Return the framebuffer name bound to this context,
@@ -1406,11 +1406,11 @@ public abstract class GLContext {
/* 2.*/ { 0 },
/* 3.*/ { 0 } };
- public static final int getMaxMajor(int ctxProfile) {
+ public static final int getMaxMajor(final int ctxProfile) {
return ( 0 != ( CTX_PROFILE_ES & ctxProfile ) ) ? ES_VERSIONS.length-1 : GL_VERSIONS.length-1;
}
- public static final int getMaxMinor(int ctxProfile, int major) {
+ public static final int getMaxMinor(final int ctxProfile, final int major) {
if( 1>major ) {
return -1;
}
@@ -1439,7 +1439,7 @@ public abstract class GLContext {
* and {@link #decrementGLVersion(int, int[], int[])} until invalid.
*
*/
- public static final boolean isValidGLVersion(int ctxProfile, int major, int minor) {
+ public static final boolean isValidGLVersion(final int ctxProfile, final int major, final int minor) {
if( 1>major || 0>minor ) {
return false;
}
@@ -1455,7 +1455,7 @@ public abstract class GLContext {
* Clip the given GL version to the maximum known valid version if exceeding.
* @return true if clipped, i.e. given value exceeds maximum, otherwise false.
*/
- public static final boolean clipGLVersion(int ctxProfile, int major[], int minor[]) {
+ public static final boolean clipGLVersion(final int ctxProfile, final int major[], final int minor[]) {
final int m = major[0];
final int n = minor[0];
@@ -1494,7 +1494,7 @@ public abstract class GLContext {
* @param minor
* @return
*/
- public static final boolean decrementGLVersion(int ctxProfile, int major[], int minor[]) {
+ public static final boolean decrementGLVersion(final int ctxProfile, final int major[], final int minor[]) {
if( !clipGLVersion(ctxProfile, major, minor) ) {
int m = major[0];
int n = minor[0] - 1;
@@ -1520,13 +1520,13 @@ public abstract class GLContext {
return true;
}
- protected static int composeBits(int a8, int b8, int c16) {
+ protected static int composeBits(final int a8, final int b8, final int c16) {
return ( ( a8 & 0x000000FF ) << 24 ) |
( ( b8 & 0x000000FF ) << 16 ) |
( ( c16 & 0x0000FFFF ) ) ;
}
- private static void validateProfileBits(int bits, String argName) {
+ private static void validateProfileBits(final int bits, final String argName) {
int num = 0;
if( 0 != ( CTX_PROFILE_COMPAT & bits ) ) { num++; }
if( 0 != ( CTX_PROFILE_CORE & bits ) ) { num++; }
@@ -1557,13 +1557,13 @@ public abstract class GLContext {
GLContextImpl.shutdownImpl(); // well ..
}
- protected static boolean getAvailableGLVersionsSet(AbstractGraphicsDevice device) {
+ protected static boolean getAvailableGLVersionsSet(final AbstractGraphicsDevice device) {
synchronized ( deviceVersionsAvailableSet ) {
return deviceVersionsAvailableSet.containsKey(device.getUniqueID());
}
}
- protected static void setAvailableGLVersionsSet(AbstractGraphicsDevice device) {
+ protected static void setAvailableGLVersionsSet(final AbstractGraphicsDevice device) {
synchronized ( deviceVersionsAvailableSet ) {
final String devKey = device.getUniqueID();
if( null != deviceVersionsAvailableSet.put(devKey, devKey) ) {
@@ -1580,7 +1580,7 @@ public abstract class GLContext {
* Returns a unique String object using {@link String#intern()} for the given arguments,
* which object reference itself can be used as a key.
*/
- protected static String getDeviceVersionAvailableKey(AbstractGraphicsDevice device, int major, int profile) {
+ protected static String getDeviceVersionAvailableKey(final AbstractGraphicsDevice device, final int major, final int profile) {
final String r = device.getUniqueID() + "-" + toHexString(composeBits(major, profile, 0));
return r.intern();
}
@@ -1597,8 +1597,8 @@ public abstract class GLContext {
*
* @see #createContextARBMapVersionsAvailable
*/
- protected static Integer mapAvailableGLVersion(AbstractGraphicsDevice device,
- int reqMajor, int profile, int resMajor, int resMinor, int resCtp)
+ protected static Integer mapAvailableGLVersion(final AbstractGraphicsDevice device,
+ final int reqMajor, final int profile, final int resMajor, final int resMinor, int resCtp)
{
validateProfileBits(profile, "profile");
validateProfileBits(resCtp, "resCtp");
@@ -1624,7 +1624,7 @@ public abstract class GLContext {
synchronized(deviceVersionAvailable) {
final Set keys = deviceVersionAvailable.keySet();
boolean needsSeparator = false;
- for(Iterator i = keys.iterator(); i.hasNext(); ) {
+ for(final Iterator i = keys.iterator(); i.hasNext(); ) {
if(needsSeparator) {
sb.append(Platform.getNewline());
}
@@ -1652,7 +1652,7 @@ public abstract class GLContext {
* @param reqProfile Key Value either {@link #CTX_PROFILE_COMPAT}, {@link #CTX_PROFILE_CORE} or {@link #CTX_PROFILE_ES}
* @return the available GL version as encoded with {@link #composeBits(int, int, int), otherwise null
*/
- protected static Integer getAvailableGLVersion(AbstractGraphicsDevice device, int reqMajor, int reqProfile) {
+ protected static Integer getAvailableGLVersion(final AbstractGraphicsDevice device, final int reqMajor, final int reqProfile) {
final String objectKey = getDeviceVersionAvailableKey(device, reqMajor, reqProfile);
Integer val;
synchronized(deviceVersionAvailable) {
@@ -1668,8 +1668,8 @@ public abstract class GLContext {
* @param minor if not null, returns the used minor version
* @param ctp if not null, returns the used context profile
*/
- protected static boolean getAvailableGLVersion(AbstractGraphicsDevice device, int reqMajor, int reqProfile,
- int[] major, int minor[], int ctp[]) {
+ protected static boolean getAvailableGLVersion(final AbstractGraphicsDevice device, final int reqMajor, final int reqProfile,
+ final int[] major, final int minor[], final int ctp[]) {
final Integer valI = getAvailableGLVersion(device, reqMajor, reqProfile);
if(null==valI) {
@@ -1694,7 +1694,7 @@ public abstract class GLContext {
* returns the highest GLProfile string regarding the implementation version and context profile bits.
* @throws GLException if version and context profile bits could not be mapped to a GLProfile
*/
- protected static String getGLProfile(int major, int minor, int ctp)
+ protected static String getGLProfile(final int major, final int minor, final int ctp)
throws GLException {
if(0 != ( CTX_PROFILE_COMPAT & ctp )) {
if(major >= 4) { return GLProfile.GL4bc; }
@@ -1714,7 +1714,7 @@ public abstract class GLContext {
/**
* Returns the GLProfile's major version number at reqMajorCTP[0] and it's context property (CTP) at reqMajorCTP[1] for availability mapping request.
*/
- protected static final void getRequestMajorAndCompat(final GLProfile glp, int[/*2*/] reqMajorCTP) {
+ protected static final void getRequestMajorAndCompat(final GLProfile glp, final int[/*2*/] reqMajorCTP) {
final GLProfile glpImpl = glp.getImpl();
if( glpImpl.isGL4() ) {
reqMajorCTP[0]=4;
@@ -1743,9 +1743,9 @@ public abstract class GLContext {
final int[] reqMajorCTP = new int[] { 0, 0 };
getRequestMajorAndCompat(glp, reqMajorCTP);
- int _major[] = { 0 };
- int _minor[] = { 0 };
- int _ctp[] = { 0 };
+ final int _major[] = { 0 };
+ final int _minor[] = { 0 };
+ final int _ctp[] = { 0 };
if( GLContext.getAvailableGLVersion(device, reqMajorCTP[0], reqMajorCTP[1], _major, _minor, _ctp)) {
return _ctp[0];
}
@@ -1758,7 +1758,7 @@ public abstract class GLContext {
* @param profile Key Value either {@link #CTX_PROFILE_COMPAT}, {@link #CTX_PROFILE_CORE} or {@link #CTX_PROFILE_ES}
* @return the highest GLProfile for the device regarding availability, version and profile bits.
*/
- protected static GLProfile getAvailableGLProfile(AbstractGraphicsDevice device, int reqMajor, int reqProfile)
+ protected static GLProfile getAvailableGLProfile(final AbstractGraphicsDevice device, final int reqMajor, final int reqProfile)
throws GLException {
final String glpName = getAvailableGLProfileName(device, reqMajor, reqProfile);
return null != glpName ? GLProfile.get(device, glpName) : null;
@@ -1770,11 +1770,11 @@ public abstract class GLContext {
* @param profile Key Value either {@link #CTX_PROFILE_COMPAT}, {@link #CTX_PROFILE_CORE} or {@link #CTX_PROFILE_ES}
* @return the highest GLProfile name for the device regarding availability, version and profile bits.
*/
- /* package */ static String getAvailableGLProfileName(AbstractGraphicsDevice device, int reqMajor, int reqProfile)
+ /* package */ static String getAvailableGLProfileName(final AbstractGraphicsDevice device, final int reqMajor, final int reqProfile)
throws GLException {
- int major[] = { 0 };
- int minor[] = { 0 };
- int ctp[] = { 0 };
+ final int major[] = { 0 };
+ final int minor[] = { 0 };
+ final int ctp[] = { 0 };
if(GLContext.getAvailableGLVersion(device, reqMajor, reqProfile, major, minor, ctp)) {
return GLContext.getGLProfile(major[0], minor[0], ctp[0]);
}
@@ -1786,10 +1786,10 @@ public abstract class GLContext {
* @param major Key Value either 1, 2, 3 or 4
* @param profile Key Value either {@link #CTX_PROFILE_COMPAT}, {@link #CTX_PROFILE_CORE} or {@link #CTX_PROFILE_ES}
*/
- protected static String getAvailableGLVersionAsString(AbstractGraphicsDevice device, int major, int profile) {
- int _major[] = { 0 };
- int _minor[] = { 0 };
- int _ctp[] = { 0 };
+ protected static String getAvailableGLVersionAsString(final AbstractGraphicsDevice device, final int major, final int profile) {
+ final int _major[] = { 0 };
+ final int _minor[] = { 0 };
+ final int _ctp[] = { 0 };
if(getAvailableGLVersion(device, major, profile, _major, _minor, _ctp)) {
return getGLVersion(_major[0], _minor[0], _ctp[0], null);
}
@@ -1809,7 +1809,7 @@ public abstract class GLContext {
* @param glp {@link GLProfile} to check for FBO capabilities
* @see GLContext#hasBasicFBOSupport()
*/
- public static final boolean isFBOAvailable(AbstractGraphicsDevice device, GLProfile glp) {
+ public static final boolean isFBOAvailable(final AbstractGraphicsDevice device, final GLProfile glp) {
return 0 != ( CTX_IMPL_FBO & getAvailableContextProperties(device, glp) );
}
@@ -1818,7 +1818,7 @@ public abstract class GLContext {
* @see GLContext#isHardwareRasterizer()
* @see GLProfile#isHardwareRasterizer()
*/
- public static final int isHardwareRasterizer(AbstractGraphicsDevice device, GLProfile glp) {
+ public static final int isHardwareRasterizer(final AbstractGraphicsDevice device, final GLProfile glp) {
final int r;
final int ctp = getAvailableContextProperties(device, glp);
if(0 == ctp) {
@@ -1838,8 +1838,8 @@ public abstract class GLContext {
* @param isHardware return value of one boolean, whether the profile is a hardware rasterizer or not
* @return true if the requested GL version is available regardless of a software or hardware rasterizer, otherwise false.
*/
- protected static boolean isGLVersionAvailable(AbstractGraphicsDevice device, int reqMajor, int reqProfile, boolean isHardware[]) {
- Integer valI = getAvailableGLVersion(device, reqMajor, reqProfile);
+ protected static boolean isGLVersionAvailable(final AbstractGraphicsDevice device, final int reqMajor, final int reqProfile, final boolean isHardware[]) {
+ final Integer valI = getAvailableGLVersion(device, reqMajor, reqProfile);
if(null==valI) {
return false;
}
@@ -1847,15 +1847,15 @@ public abstract class GLContext {
return true;
}
- public static boolean isGLES1Available(AbstractGraphicsDevice device, boolean isHardware[]) {
+ public static boolean isGLES1Available(final AbstractGraphicsDevice device, final boolean isHardware[]) {
return isGLVersionAvailable(device, 1, GLContext.CTX_PROFILE_ES, isHardware);
}
- public static boolean isGLES2Available(AbstractGraphicsDevice device, boolean isHardware[]) {
+ public static boolean isGLES2Available(final AbstractGraphicsDevice device, final boolean isHardware[]) {
return isGLVersionAvailable(device, 2, GLContext.CTX_PROFILE_ES, isHardware);
}
- public static boolean isGLES3Available(AbstractGraphicsDevice device, boolean isHardware[]) {
+ public static boolean isGLES3Available(final AbstractGraphicsDevice device, final boolean isHardware[]) {
return isGLVersionAvailable(device, 3, GLContext.CTX_PROFILE_ES, isHardware);
}
@@ -1867,10 +1867,10 @@ public abstract class GLContext {
* Includes [ GL ≥ 4.3, GL ≥ 3.1 w/ GL_ARB_ES3_compatibility and GLES3 ]
*
*/
- public static final boolean isGLES3CompatibleAvailable(AbstractGraphicsDevice device) {
- int major[] = { 0 };
- int minor[] = { 0 };
- int ctp[] = { 0 };
+ public static final boolean isGLES3CompatibleAvailable(final AbstractGraphicsDevice device) {
+ final int major[] = { 0 };
+ final int minor[] = { 0 };
+ final int ctp[] = { 0 };
boolean ok;
ok = GLContext.getAvailableGLVersion(device, 3, GLContext.CTX_PROFILE_ES, major, minor, ctp);
@@ -1883,29 +1883,29 @@ public abstract class GLContext {
return 0 != ( ctp[0] & CTX_IMPL_ES3_COMPAT );
}
- public static boolean isGL4bcAvailable(AbstractGraphicsDevice device, boolean isHardware[]) {
+ public static boolean isGL4bcAvailable(final AbstractGraphicsDevice device, final boolean isHardware[]) {
return isGLVersionAvailable(device, 4, CTX_PROFILE_COMPAT, isHardware);
}
- public static boolean isGL4Available(AbstractGraphicsDevice device, boolean isHardware[]) {
+ public static boolean isGL4Available(final AbstractGraphicsDevice device, final boolean isHardware[]) {
return isGLVersionAvailable(device, 4, CTX_PROFILE_CORE, isHardware);
}
- public static boolean isGL3bcAvailable(AbstractGraphicsDevice device, boolean isHardware[]) {
+ public static boolean isGL3bcAvailable(final AbstractGraphicsDevice device, final boolean isHardware[]) {
return isGLVersionAvailable(device, 3, CTX_PROFILE_COMPAT, isHardware);
}
- public static boolean isGL3Available(AbstractGraphicsDevice device, boolean isHardware[]) {
+ public static boolean isGL3Available(final AbstractGraphicsDevice device, final boolean isHardware[]) {
return isGLVersionAvailable(device, 3, CTX_PROFILE_CORE, isHardware);
}
- public static boolean isGL2Available(AbstractGraphicsDevice device, boolean isHardware[]) {
+ public static boolean isGL2Available(final AbstractGraphicsDevice device, final boolean isHardware[]) {
return isGLVersionAvailable(device, 2, CTX_PROFILE_COMPAT, isHardware);
}
- protected static String getGLVersion(int major, int minor, int ctp, String gl_version) {
+ protected static String getGLVersion(final int major, final int minor, final int ctp, final String gl_version) {
boolean needColon = false;
- StringBuilder sb = new StringBuilder();
+ final StringBuilder sb = new StringBuilder();
sb.append(major);
sb.append(".");
sb.append(minor);
@@ -1937,15 +1937,15 @@ public abstract class GLContext {
// internal string utils
//
- protected static String toHexString(int hex) {
+ protected static String toHexString(final int hex) {
return "0x" + Integer.toHexString(hex);
}
- protected static String toHexString(long hex) {
+ protected static String toHexString(final long hex) {
return "0x" + Long.toHexString(hex);
}
- private static boolean appendString(StringBuilder sb, String string, boolean needColon, boolean condition) {
+ private static boolean appendString(final StringBuilder sb, final String string, boolean needColon, final boolean condition) {
if(condition) {
if(needColon) {
sb.append(", ");
diff --git a/src/jogl/classes/javax/media/opengl/GLDebugMessage.java b/src/jogl/classes/javax/media/opengl/GLDebugMessage.java
index acb33b058..325345012 100644
--- a/src/jogl/classes/javax/media/opengl/GLDebugMessage.java
+++ b/src/jogl/classes/javax/media/opengl/GLDebugMessage.java
@@ -51,7 +51,7 @@ public class GLDebugMessage {
* @param dbgSeverity The ARB severity level
* @param dbgMsg The debug message
*/
- public GLDebugMessage(GLContext source, long when, int dbgSource, int dbgType, int dbgId, int dbgSeverity, String dbgMsg) {
+ public GLDebugMessage(final GLContext source, final long when, final int dbgSource, final int dbgType, final int dbgId, final int dbgSeverity, final String dbgMsg) {
this.source = source;
this.when = when;
this.dbgSource = dbgSource;
@@ -71,14 +71,14 @@ public class GLDebugMessage {
* @param dbgMsg
* @return
*/
- public static GLDebugMessage translateAMDEvent(GLContext source, long when, int dbgId, int amdDbgCategory, int dbgSeverity, String dbgMsg) {
+ public static GLDebugMessage translateAMDEvent(final GLContext source, final long when, final int dbgId, final int amdDbgCategory, final int dbgSeverity, final String dbgMsg) {
int dbgSource, dbgType;
// AMD category == ARB source/type
switch(amdDbgCategory) {
case GL2GL3.GL_DEBUG_CATEGORY_API_ERROR_AMD:
- dbgSource = GL2GL3.GL_DEBUG_SOURCE_API;
- dbgType = GL2GL3.GL_DEBUG_TYPE_ERROR;
+ dbgSource = GL2ES2.GL_DEBUG_SOURCE_API;
+ dbgType = GL2ES2.GL_DEBUG_TYPE_ERROR;
break;
//
@@ -86,18 +86,18 @@ public class GLDebugMessage {
//
case GL2GL3.GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD:
- dbgSource = GL2GL3.GL_DEBUG_SOURCE_WINDOW_SYSTEM;
- dbgType = GL2GL3.GL_DEBUG_TYPE_OTHER;
+ dbgSource = GL2ES2.GL_DEBUG_SOURCE_WINDOW_SYSTEM;
+ dbgType = GL2ES2.GL_DEBUG_TYPE_OTHER;
break;
case GL2GL3.GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD:
- dbgSource = GL2GL3.GL_DEBUG_SOURCE_SHADER_COMPILER;
- dbgType = GL2GL3.GL_DEBUG_TYPE_OTHER;
+ dbgSource = GL2ES2.GL_DEBUG_SOURCE_SHADER_COMPILER;
+ dbgType = GL2ES2.GL_DEBUG_TYPE_OTHER;
break;
case GL2GL3.GL_DEBUG_CATEGORY_APPLICATION_AMD:
- dbgSource = GL2GL3.GL_DEBUG_SOURCE_APPLICATION;
- dbgType = GL2GL3.GL_DEBUG_TYPE_OTHER;
+ dbgSource = GL2ES2.GL_DEBUG_SOURCE_APPLICATION;
+ dbgType = GL2ES2.GL_DEBUG_TYPE_OTHER;
break;
@@ -106,49 +106,49 @@ public class GLDebugMessage {
//
case GL2GL3.GL_DEBUG_CATEGORY_DEPRECATION_AMD:
- dbgSource = GL2GL3.GL_DEBUG_SOURCE_OTHER;
- dbgType = GL2GL3.GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR;
+ dbgSource = GL2ES2.GL_DEBUG_SOURCE_OTHER;
+ dbgType = GL2ES2.GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR;
break;
case GL2GL3.GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD:
- dbgSource = GL2GL3.GL_DEBUG_SOURCE_OTHER;
- dbgType = GL2GL3.GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR;
+ dbgSource = GL2ES2.GL_DEBUG_SOURCE_OTHER;
+ dbgType = GL2ES2.GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR;
break;
case GL2GL3.GL_DEBUG_CATEGORY_PERFORMANCE_AMD:
- dbgSource = GL2GL3.GL_DEBUG_SOURCE_OTHER;
- dbgType = GL2GL3.GL_DEBUG_TYPE_PERFORMANCE;
+ dbgSource = GL2ES2.GL_DEBUG_SOURCE_OTHER;
+ dbgType = GL2ES2.GL_DEBUG_TYPE_PERFORMANCE;
break;
case GL2GL3.GL_DEBUG_CATEGORY_OTHER_AMD:
default:
- dbgSource = GL2GL3.GL_DEBUG_SOURCE_OTHER;
- dbgType = GL2GL3.GL_DEBUG_TYPE_OTHER;
+ dbgSource = GL2ES2.GL_DEBUG_SOURCE_OTHER;
+ dbgType = GL2ES2.GL_DEBUG_TYPE_OTHER;
}
return new GLDebugMessage(source, when, dbgSource, dbgType, dbgId, dbgSeverity, dbgMsg);
}
- public static int translateARB2AMDCategory(int dbgSource, int dbgType) {
+ public static int translateARB2AMDCategory(final int dbgSource, final int dbgType) {
switch (dbgSource) {
- case GL2GL3.GL_DEBUG_SOURCE_WINDOW_SYSTEM:
+ case GL2ES2.GL_DEBUG_SOURCE_WINDOW_SYSTEM:
return GL2GL3.GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD;
- case GL2GL3.GL_DEBUG_SOURCE_SHADER_COMPILER:
+ case GL2ES2.GL_DEBUG_SOURCE_SHADER_COMPILER:
return GL2GL3.GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD;
- case GL2GL3.GL_DEBUG_SOURCE_APPLICATION:
+ case GL2ES2.GL_DEBUG_SOURCE_APPLICATION:
return GL2GL3.GL_DEBUG_CATEGORY_APPLICATION_AMD;
}
switch(dbgType) {
- case GL2GL3.GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR:
+ case GL2ES2.GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR:
return GL2GL3.GL_DEBUG_CATEGORY_DEPRECATION_AMD;
- case GL2GL3.GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR:
+ case GL2ES2.GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR:
return GL2GL3.GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD;
- case GL2GL3.GL_DEBUG_TYPE_PERFORMANCE:
+ case GL2ES2.GL_DEBUG_TYPE_PERFORMANCE:
return GL2GL3.GL_DEBUG_CATEGORY_PERFORMANCE_AMD;
}
@@ -207,46 +207,46 @@ public class GLDebugMessage {
return toString(null).toString();
}
- public static String getDbgSourceString(int dbgSource) {
+ public static String getDbgSourceString(final int dbgSource) {
switch(dbgSource) {
- case GL2GL3.GL_DEBUG_SOURCE_API: return "GL API";
- case GL2GL3.GL_DEBUG_SOURCE_SHADER_COMPILER: return "GLSL or extension compiler";
- case GL2GL3.GL_DEBUG_SOURCE_WINDOW_SYSTEM: return "Native Windowing binding";
- case GL2GL3.GL_DEBUG_SOURCE_THIRD_PARTY: return "Third party";
- case GL2GL3.GL_DEBUG_SOURCE_APPLICATION: return "Application";
- case GL2GL3.GL_DEBUG_SOURCE_OTHER: return "generic";
+ case GL2ES2.GL_DEBUG_SOURCE_API: return "GL API";
+ case GL2ES2.GL_DEBUG_SOURCE_SHADER_COMPILER: return "GLSL or extension compiler";
+ case GL2ES2.GL_DEBUG_SOURCE_WINDOW_SYSTEM: return "Native Windowing binding";
+ case GL2ES2.GL_DEBUG_SOURCE_THIRD_PARTY: return "Third party";
+ case GL2ES2.GL_DEBUG_SOURCE_APPLICATION: return "Application";
+ case GL2ES2.GL_DEBUG_SOURCE_OTHER: return "generic";
default: return "Unknown (" + toHexString(dbgSource) + ")";
}
}
- public static String getDbgTypeString(int dbgType) {
+ public static String getDbgTypeString(final int dbgType) {
switch(dbgType) {
- case GL2GL3.GL_DEBUG_TYPE_ERROR: return "Error";
- case GL2GL3.GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR: return "Warning: marked for deprecation";
- case GL2GL3.GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR: return "Warning: undefined behavior";
- case GL2GL3.GL_DEBUG_TYPE_PERFORMANCE: return "Warning: implementation dependent performance";
- case GL2GL3.GL_DEBUG_TYPE_PORTABILITY: return "Warning: vendor-specific extension use";
- case GL2GL3.GL_DEBUG_TYPE_OTHER: return "Warning: generic";
+ case GL2ES2.GL_DEBUG_TYPE_ERROR: return "Error";
+ case GL2ES2.GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR: return "Warning: marked for deprecation";
+ case GL2ES2.GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR: return "Warning: undefined behavior";
+ case GL2ES2.GL_DEBUG_TYPE_PERFORMANCE: return "Warning: implementation dependent performance";
+ case GL2ES2.GL_DEBUG_TYPE_PORTABILITY: return "Warning: vendor-specific extension use";
+ case GL2ES2.GL_DEBUG_TYPE_OTHER: return "Warning: generic";
default: return "Unknown (" + toHexString(dbgType) + ")";
}
}
- public static String getDbgSeverityString(int dbgSeverity) {
+ public static String getDbgSeverityString(final int dbgSeverity) {
switch(dbgSeverity) {
- case GL2GL3.GL_DEBUG_SEVERITY_HIGH: return "High: dangerous undefined behavior";
- case GL2GL3.GL_DEBUG_SEVERITY_MEDIUM: return "Medium: Severe performance/deprecation/other warnings";
- case GL2GL3.GL_DEBUG_SEVERITY_LOW: return "Low: Performance warnings (redundancy/undefined)";
+ case GL2ES2.GL_DEBUG_SEVERITY_HIGH: return "High: dangerous undefined behavior";
+ case GL2ES2.GL_DEBUG_SEVERITY_MEDIUM: return "Medium: Severe performance/deprecation/other warnings";
+ case GL2ES2.GL_DEBUG_SEVERITY_LOW: return "Low: Performance warnings (redundancy/undefined)";
default: return "Unknown (" + toHexString(dbgSeverity) + ")";
}
}
- public static StringBuilder toHexString(StringBuilder sb, int i) {
+ public static StringBuilder toHexString(StringBuilder sb, final int i) {
if(null==sb) {
sb = new StringBuilder();
}
return sb.append("0x").append(Integer.toHexString(i));
}
- public static String toHexString(int i) {
+ public static String toHexString(final int i) {
return "0x"+Integer.toHexString(i);
}
diff --git a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
index 077daf6e9..6e7caf8f8 100644
--- a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
+++ b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
@@ -43,6 +43,7 @@ package javax.media.opengl;
import java.util.ArrayList;
import java.util.List;
+import com.jogamp.common.util.PropertyAccess;
import com.jogamp.common.util.ReflectionUtil;
import com.jogamp.opengl.GLAutoDrawableDelegate;
import com.jogamp.opengl.GLRendererQuirks;
@@ -142,8 +143,8 @@ public abstract class GLDrawableFactory {
final String nwt = NativeWindowFactory.getNativeWindowType(true);
GLDrawableFactory tmp = null;
- String factoryClassName = Debug.getProperty("jogl.gldrawablefactory.class.name", true);
- ClassLoader cl = GLDrawableFactory.class.getClassLoader();
+ String factoryClassName = PropertyAccess.getProperty("jogl.gldrawablefactory.class.name", true);
+ final ClassLoader cl = GLDrawableFactory.class.getClassLoader();
if (null == factoryClassName) {
if ( nwt == NativeWindowFactory.TYPE_X11 ) {
factoryClassName = "jogamp.opengl.x11.glx.X11GLXDrawableFactory";
@@ -164,7 +165,7 @@ public abstract class GLDrawableFactory {
}
try {
tmp = (GLDrawableFactory) ReflectionUtil.createInstance(factoryClassName, cl);
- } catch (Exception jre) {
+ } catch (final Exception jre) {
if (DEBUG || GLProfile.DEBUG) {
System.err.println("Info: GLDrawableFactory.static - Native Platform: "+nwt+" - not available: "+factoryClassName);
jre.printStackTrace();
@@ -179,7 +180,7 @@ public abstract class GLDrawableFactory {
if(!disableOpenGLES) {
try {
tmp = (GLDrawableFactory) ReflectionUtil.createInstance("jogamp.opengl.egl.EGLDrawableFactory", cl);
- } catch (Exception jre) {
+ } catch (final Exception jre) {
if (DEBUG || GLProfile.DEBUG) {
System.err.println("Info: GLDrawableFactory.static - EGLDrawableFactory - not available");
jre.printStackTrace();
@@ -221,7 +222,7 @@ public abstract class GLDrawableFactory {
try {
gldf.resetDisplayGamma();
gldf.shutdownImpl();
- } catch (Throwable t) {
+ } catch (final Throwable t) {
System.err.println("GLDrawableFactory.shutdownImpl: Caught "+t.getClass().getName()+" during factory shutdown #"+(i+1)+"/"+gldfCount+" "+gldf.getClass().getName());
if( DEBUG ) {
t.printStackTrace();
@@ -322,7 +323,7 @@ public abstract class GLDrawableFactory {
* @param device which {@link AbstractGraphicsDevice#getConnection() connection} denotes the shared the target device, may be null for the platform's default device.
* @return true if a shared resource could been created, otherwise false.
*/
- protected final boolean createSharedResource(AbstractGraphicsDevice device) {
+ protected final boolean createSharedResource(final AbstractGraphicsDevice device) {
return createSharedResourceImpl(device);
}
protected abstract boolean createSharedResourceImpl(AbstractGraphicsDevice device);
@@ -343,7 +344,7 @@ public abstract class GLDrawableFactory {
* @see #getRendererQuirks(AbstractGraphicsDevice)
* @see GLRendererQuirks
*/
- public final boolean hasRendererQuirk(AbstractGraphicsDevice device, int quirk) {
+ public final boolean hasRendererQuirk(final AbstractGraphicsDevice device, final int quirk) {
final GLRendererQuirks glrq = getRendererQuirks(device);
return null != glrq ? glrq.exist(quirk) : false;
}
@@ -385,11 +386,11 @@ public abstract class GLDrawableFactory {
* @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 GLDrawableFactory getFactory(GLProfile glProfile) throws GLException {
+ public static GLDrawableFactory getFactory(final GLProfile glProfile) throws GLException {
return getFactoryImpl(glProfile.getImplName());
}
- protected static GLDrawableFactory getFactoryImpl(String glProfileImplName) throws GLException {
+ protected static GLDrawableFactory getFactoryImpl(final String glProfileImplName) throws GLException {
if ( GLProfile.usesNativeGLES(glProfileImplName) ) {
if(null!=eglFactory) {
return eglFactory;
@@ -400,7 +401,7 @@ public abstract class GLDrawableFactory {
throw new GLException("No GLDrawableFactory available for profile: "+glProfileImplName);
}
- protected static GLDrawableFactory getFactoryImpl(AbstractGraphicsDevice device) throws GLException {
+ protected static GLDrawableFactory getFactoryImpl(final AbstractGraphicsDevice device) throws GLException {
if(null != nativeOSFactory && nativeOSFactory.getIsDeviceCompatible(device)) {
return nativeOSFactory;
}
diff --git a/src/jogl/classes/javax/media/opengl/GLException.java b/src/jogl/classes/javax/media/opengl/GLException.java
index 460f17be9..6a287c969 100644
--- a/src/jogl/classes/javax/media/opengl/GLException.java
+++ b/src/jogl/classes/javax/media/opengl/GLException.java
@@ -50,19 +50,19 @@ public class GLException extends RuntimeException {
/** Constructs a GLException object with the specified detail
message. */
- public GLException(String message) {
+ public GLException(final String message) {
super(message);
}
/** Constructs a GLException object with the specified detail
message and root cause. */
- public GLException(String message, Throwable cause) {
+ public GLException(final String message, final Throwable cause) {
super(message, cause);
}
/** Constructs a GLException object with the specified root
cause. */
- public GLException(Throwable cause) {
+ public GLException(final Throwable cause) {
super(cause);
}
}
diff --git a/src/jogl/classes/javax/media/opengl/GLPipelineFactory.java b/src/jogl/classes/javax/media/opengl/GLPipelineFactory.java
index d947bada2..ab12ba17c 100644
--- a/src/jogl/classes/javax/media/opengl/GLPipelineFactory.java
+++ b/src/jogl/classes/javax/media/opengl/GLPipelineFactory.java
@@ -88,7 +88,7 @@ public class GLPipelineFactory {
* @param downstream is always the 1st argument for the upstream constructor
* @param additionalArgs additional arguments for the upstream constructor
*/
- public static final GL create(String pipelineClazzBaseName, Class> reqInterface, GL downstream, Object[] additionalArgs) {
+ public static final GL create(final String pipelineClazzBaseName, final Class> reqInterface, final GL downstream, final Object[] additionalArgs) {
Class> downstreamClazz = downstream.getClass();
Class> upstreamClazz = null;
Class> interfaceClazz = null;
@@ -101,7 +101,7 @@ public class GLPipelineFactory {
do {
// For all interfaces: right -> left == child -> parent
// It is important that this matches with the gluegen cfg file's 'Implements' clause !
- Class>[] clazzes = downstreamClazz.getInterfaces();
+ final Class>[] clazzes = downstreamClazz.getInterfaces();
for(int i=clazzes.length-1; null==upstreamClazz && i>=0; i--) {
if(DEBUG) {
System.out.println("GLPipelineFactory: Try "+downstreamClazz.getName()+" Interface["+i+"]: "+clazzes[i].getName());
@@ -142,7 +142,7 @@ public class GLPipelineFactory {
System.out.println("GLPipelineFactory: Got : "+ upstreamClazz.getName()+", base interface: "+interfaceClazz.getName());
}
- Class>[] cstrArgTypes = new Class>[ 1 + ( ( null==additionalArgs ) ? 0 : additionalArgs.length ) ] ;
+ final Class>[] cstrArgTypes = new Class>[ 1 + ( ( null==additionalArgs ) ? 0 : additionalArgs.length ) ] ;
{
int i = 0;
cstrArgTypes[i++] = interfaceClazz;
@@ -151,10 +151,10 @@ public class GLPipelineFactory {
}
}
// throws exception if cstr not found!
- Constructor> cstr = ReflectionUtil.getConstructor(upstreamClazz, cstrArgTypes);
+ final Constructor> cstr = ReflectionUtil.getConstructor(upstreamClazz, cstrArgTypes);
Object instance = null;
try {
- Object[] cstrArgs = new Object[ 1 + ( ( null==additionalArgs ) ? 0 : additionalArgs.length ) ] ;
+ final Object[] cstrArgs = new Object[ 1 + ( ( null==additionalArgs ) ? 0 : additionalArgs.length ) ] ;
{
int i = 0;
cstrArgs[i++] = downstream;
@@ -163,7 +163,7 @@ public class GLPipelineFactory {
}
}
instance = cstr.newInstance( cstrArgs ) ;
- } catch (Throwable t) { t.printStackTrace(); }
+ } catch (final Throwable t) { t.printStackTrace(); }
if(null==instance) {
throw new GLException("Error: Couldn't create instance of pipeline: "+upstreamClazz.getName()+
" ( "+getArgsClassNameList(downstreamClazz, additionalArgs) +" )");
@@ -174,8 +174,8 @@ public class GLPipelineFactory {
return (GL) instance;
}
- private static final String getArgsClassNameList(Class> arg0, Object[] args) {
- StringBuilder sb = new StringBuilder();
+ private static final String getArgsClassNameList(final Class> arg0, final Object[] args) {
+ final StringBuilder sb = new StringBuilder();
sb.append(arg0.getName());
if(args!=null) {
for(int j=0; j getUpstreamClazz(Class> downstreamClazz, String pipelineClazzBaseName) {
- String downstreamClazzName = downstreamClazz.getName();
+ private static final Class> getUpstreamClazz(final Class> downstreamClazz, final String pipelineClazzBaseName) {
+ final String downstreamClazzName = downstreamClazz.getName();
- StringTokenizer st = new StringTokenizer(downstreamClazzName, ".");
+ final StringTokenizer st = new StringTokenizer(downstreamClazzName, ".");
String downstreamClazzBaseName = downstreamClazzName;
while(st.hasMoreTokens()) {
downstreamClazzBaseName = st.nextToken();
}
- String upstreamClazzName = pipelineClazzBaseName+downstreamClazzBaseName;
+ final String upstreamClazzName = pipelineClazzBaseName+downstreamClazzBaseName;
Class> upstreamClazz = null;
try {
upstreamClazz = Class.forName(upstreamClazzName, true, GLPipelineFactory.class.getClassLoader());
- } catch (Throwable e) { e.printStackTrace(); }
+ } catch (final Throwable e) { e.printStackTrace(); }
return upstreamClazz;
}
diff --git a/src/jogl/classes/javax/media/opengl/GLProfile.java b/src/jogl/classes/javax/media/opengl/GLProfile.java
index addc977d8..57367adcc 100644
--- a/src/jogl/classes/javax/media/opengl/GLProfile.java
+++ b/src/jogl/classes/javax/media/opengl/GLProfile.java
@@ -167,7 +167,7 @@ public class GLProfile {
*
* @throws GLException if no profile for the given device is available.
*/
- public static void initProfiles(AbstractGraphicsDevice device) throws GLException {
+ public static void initProfiles(final AbstractGraphicsDevice device) throws GLException {
getProfileMap(device, true);
}
@@ -208,11 +208,11 @@ public class GLProfile {
* or [ null, GL ] for the default profile.
* @return true if the profile is available for the device, otherwise false.
*/
- public static boolean isAvailable(AbstractGraphicsDevice device, String profile) {
+ public static boolean isAvailable(final AbstractGraphicsDevice device, final String profile) {
initSingleton();
return isAvailableImpl(getProfileMap(device, false), profile);
}
- private static boolean isAvailableImpl(HashMap map, String profile) {
+ private static boolean isAvailableImpl(final HashMap map, final String profile) {
return null != map && null != map.get(profile);
}
@@ -223,7 +223,7 @@ public class GLProfile {
* or [ null, GL ] for the default profile.
* @return true if the profile is available for the default device, otherwise false.
*/
- public static boolean isAvailable(String profile) {
+ public static boolean isAvailable(final String profile) {
return isAvailable(null, profile);
}
@@ -236,21 +236,21 @@ public class GLProfile {
return isAvailable(null, null);
}
- public static String glAvailabilityToString(AbstractGraphicsDevice device) {
+ public static String glAvailabilityToString(final AbstractGraphicsDevice device) {
return glAvailabilityToString(device, null).toString();
}
- public static StringBuilder glAvailabilityToString(AbstractGraphicsDevice device, StringBuilder sb) {
+ public static StringBuilder glAvailabilityToString(final AbstractGraphicsDevice device, final StringBuilder sb) {
return glAvailabilityToString(device, sb, null, 0);
}
- private static StringBuilder doIndent(StringBuilder sb, String indent, int indentCount) {
+ private static StringBuilder doIndent(final StringBuilder sb, final String indent, int indentCount) {
while(indentCount>0) {
sb.append(indent);
indentCount--;
}
return sb;
}
- public static StringBuilder glAvailabilityToString(AbstractGraphicsDevice device, StringBuilder sb, String indent, int indentCount) {
+ public static StringBuilder glAvailabilityToString(AbstractGraphicsDevice device, StringBuilder sb, final String indent, int indentCount) {
boolean avail;
if(null == sb) {
sb = new StringBuilder();
@@ -425,7 +425,7 @@ public class GLProfile {
int profileCount = 0;
if(null != map) {
- for (Map.Entry entry : map.entrySet()) {
+ for (final Map.Entry entry : map.entrySet()) {
if( !GL_DEFAULT.equals(entry.getKey()) ) {
if(useIndent) {
doIndent(sb.append(Platform.getNewline()), indent, indentCount);
@@ -444,7 +444,7 @@ public class GLProfile {
}
try {
sb.append(getDefault(device));
- } catch (GLException gle) {
+ } catch (final GLException gle) {
sb.append("n/a");
}
}
@@ -628,8 +628,8 @@ public class GLProfile {
* @throws GLException if no profile is available for the device.
* @see #GL_PROFILE_LIST_ALL
*/
- public static GLProfile getDefault(AbstractGraphicsDevice device) {
- GLProfile glp = get(device, GL_DEFAULT);
+ public static GLProfile getDefault(final AbstractGraphicsDevice device) {
+ final GLProfile glp = get(device, GL_DEFAULT);
return glp;
}
@@ -650,7 +650,7 @@ public class GLProfile {
* @throws GLException if no profile is available for the device.
* @see #GL_PROFILE_LIST_MAX
*/
- public static GLProfile getMaximum(AbstractGraphicsDevice device, boolean favorHardwareRasterizer)
+ public static GLProfile getMaximum(final AbstractGraphicsDevice device, final boolean favorHardwareRasterizer)
throws GLException
{
return get(device, GL_PROFILE_LIST_MAX, favorHardwareRasterizer);
@@ -660,7 +660,7 @@ public class GLProfile {
* @throws GLException if no profile is available for the default device.
* @see #GL_PROFILE_LIST_MAX
*/
- public static GLProfile getMaximum(boolean favorHardwareRasterizer)
+ public static GLProfile getMaximum(final boolean favorHardwareRasterizer)
throws GLException
{
return get(GL_PROFILE_LIST_MAX, favorHardwareRasterizer);
@@ -673,7 +673,7 @@ public class GLProfile {
* @throws GLException if no desktop profile is available for the device.
* @see #GL_PROFILE_LIST_MIN
*/
- public static GLProfile getMinimum(AbstractGraphicsDevice device, boolean favorHardwareRasterizer)
+ public static GLProfile getMinimum(final AbstractGraphicsDevice device, final boolean favorHardwareRasterizer)
throws GLException
{
return get(device, GL_PROFILE_LIST_MIN, favorHardwareRasterizer);
@@ -683,7 +683,7 @@ public class GLProfile {
* @throws GLException if no desktop profile is available for the default device.
* @see #GL_PROFILE_LIST_MIN
*/
- public static GLProfile getMinimum(boolean favorHardwareRasterizer)
+ public static GLProfile getMinimum(final boolean favorHardwareRasterizer)
throws GLException
{
return get(GL_PROFILE_LIST_MIN, favorHardwareRasterizer);
@@ -697,7 +697,7 @@ public class GLProfile {
* @throws GLException if no fixed function profile is available for the device.
* @see #GL_PROFILE_LIST_MAX_FIXEDFUNC
*/
- public static GLProfile getMaxFixedFunc(AbstractGraphicsDevice device, boolean favorHardwareRasterizer)
+ public static GLProfile getMaxFixedFunc(final AbstractGraphicsDevice device, final boolean favorHardwareRasterizer)
throws GLException
{
return get(device, GL_PROFILE_LIST_MAX_FIXEDFUNC, favorHardwareRasterizer);
@@ -707,7 +707,7 @@ public class GLProfile {
* @throws GLException if no fixed function profile is available for the default device.
* @see #GL_PROFILE_LIST_MAX_FIXEDFUNC
*/
- public static GLProfile getMaxFixedFunc(boolean favorHardwareRasterizer)
+ public static GLProfile getMaxFixedFunc(final boolean favorHardwareRasterizer)
throws GLException
{
return get(GL_PROFILE_LIST_MAX_FIXEDFUNC, favorHardwareRasterizer);
@@ -720,7 +720,7 @@ public class GLProfile {
* @throws GLException if no programmable profile is available for the device.
* @see #GL_PROFILE_LIST_MAX_PROGSHADER
*/
- public static GLProfile getMaxProgrammable(AbstractGraphicsDevice device, boolean favorHardwareRasterizer)
+ public static GLProfile getMaxProgrammable(final AbstractGraphicsDevice device, final boolean favorHardwareRasterizer)
throws GLException
{
return get(device, GL_PROFILE_LIST_MAX_PROGSHADER, favorHardwareRasterizer);
@@ -730,7 +730,7 @@ public class GLProfile {
* @throws GLException if no programmable profile is available for the default device.
* @see #GL_PROFILE_LIST_MAX_PROGSHADER
*/
- public static GLProfile getMaxProgrammable(boolean favorHardwareRasterizer)
+ public static GLProfile getMaxProgrammable(final boolean favorHardwareRasterizer)
throws GLException
{
return get(GL_PROFILE_LIST_MAX_PROGSHADER, favorHardwareRasterizer);
@@ -743,7 +743,7 @@ public class GLProfile {
* @throws GLException if no programmable core profile is available for the device.
* @see #GL_PROFILE_LIST_MAX_PROGSHADER_CORE
*/
- public static GLProfile getMaxProgrammableCore(AbstractGraphicsDevice device, boolean favorHardwareRasterizer)
+ public static GLProfile getMaxProgrammableCore(final AbstractGraphicsDevice device, final boolean favorHardwareRasterizer)
throws GLException
{
return get(device, GL_PROFILE_LIST_MAX_PROGSHADER_CORE, favorHardwareRasterizer);
@@ -753,7 +753,7 @@ public class GLProfile {
* @throws GLException if no programmable core profile is available for the default device.
* @see #GL_PROFILE_LIST_MAX_PROGSHADER_CORE
*/
- public static GLProfile getMaxProgrammableCore(boolean favorHardwareRasterizer)
+ public static GLProfile getMaxProgrammableCore(final boolean favorHardwareRasterizer)
throws GLException
{
return get(GL_PROFILE_LIST_MAX_PROGSHADER_CORE, favorHardwareRasterizer);
@@ -772,7 +772,7 @@ public class GLProfile {
* @see #get(AbstractGraphicsDevice, String)
* @see #getImpl()
*/
- public static GLProfile getGL2ES1(AbstractGraphicsDevice device)
+ public static GLProfile getGL2ES1(final AbstractGraphicsDevice device)
throws GLException
{
return get(device, GL2ES1).getImpl();
@@ -802,7 +802,7 @@ public class GLProfile {
* @see #get(AbstractGraphicsDevice, String)
* @see #getImpl()
*/
- public static GLProfile getGL2ES2(AbstractGraphicsDevice device)
+ public static GLProfile getGL2ES2(final AbstractGraphicsDevice device)
throws GLException
{
return get(device, GL2ES2).getImpl();
@@ -832,7 +832,7 @@ public class GLProfile {
* @see #get(AbstractGraphicsDevice, String)
* @see #getImpl()
*/
- public static GLProfile getGL4ES3(AbstractGraphicsDevice device)
+ public static GLProfile getGL4ES3(final AbstractGraphicsDevice device)
throws GLException
{
return get(device, GL4ES3).getImpl();
@@ -862,7 +862,7 @@ public class GLProfile {
* @see #get(AbstractGraphicsDevice, String)
* @see #getImpl()
*/
- public static GLProfile getGL2GL3(AbstractGraphicsDevice device)
+ public static GLProfile getGL2GL3(final AbstractGraphicsDevice device)
throws GLException
{
return get(device, GL2GL3).getImpl();
@@ -889,7 +889,7 @@ public class GLProfile {
* or [ null, GL ] for the default profile.
* @throws GLException if the requested profile is not available for the device.
*/
- public static GLProfile get(AbstractGraphicsDevice device, String profile)
+ public static GLProfile get(final AbstractGraphicsDevice device, String profile)
throws GLException
{
if(null==profile || profile.equals("GL")) {
@@ -908,7 +908,7 @@ public class GLProfile {
* or [ null, GL ] for the default profile.
* @throws GLException if the requested profile is not available for the default device.
*/
- public static GLProfile get(String profile)
+ public static GLProfile get(final String profile)
throws GLException
{
return get(defaultDevice, profile);
@@ -923,12 +923,12 @@ public class GLProfile {
* @param favorHardwareRasterizer set to true, if hardware rasterizer shall be favored, otherwise false.
* @throws GLException if the non of the requested profiles is available for the device.
*/
- public static GLProfile get(AbstractGraphicsDevice device, String[] profiles, boolean favorHardwareRasterizer)
+ public static GLProfile get(final AbstractGraphicsDevice device, final String[] profiles, final boolean favorHardwareRasterizer)
throws GLException
{
GLProfile glProfileAny = null;
- HashMap map = getProfileMap(device, true);
+ final HashMap map = getProfileMap(device, true);
for(int i=0; i getGLCtor(boolean glObject) {
+ public final Constructor> getGLCtor(final boolean glObject) {
return getGLCtor(getImplName(), glObject);
}
- private static final Constructor> getGLCtor(String profileImpl, boolean glObject) {
+ private static final Constructor> getGLCtor(final String profileImpl, final boolean glObject) {
if( GLES2 == profileImpl || GLES3 == profileImpl ) {
return glObject ? ctorGLES3Impl : ctorGLES3ProcAddr;
} else if( GLES1 == profileImpl ) {
@@ -1078,7 +1078,7 @@ public class GLProfile {
* if both, profile and profileImpl is equal with this.
*/
@Override
- public final boolean equals(Object o) {
+ public final boolean equals(final Object o) {
if(this==o) { return true; }
if(o instanceof GLProfile) {
final GLProfile glp = (GLProfile)o;
@@ -1099,7 +1099,7 @@ public class GLProfile {
* @param glp GLProfile to compare with
* @throws GLException if given GLProfile and this aren't equal
*/
- public final void verifyEquality(GLProfile glp) throws GLException {
+ public final void verifyEquality(final GLProfile glp) throws GLException {
if(!this.equals(glp)) {
throw new GLException("GLProfiles are not equal: "+this+" != "+glp);
}
@@ -1235,7 +1235,7 @@ public class GLProfile {
* General validation if type is a valid GL data type
* for the current profile
*/
- public boolean isValidDataType(int type, boolean throwException) {
+ public boolean isValidDataType(final int type, final boolean throwException) {
switch(type) {
case GL.GL_UNSIGNED_BYTE:
case GL.GL_BYTE:
@@ -1245,11 +1245,11 @@ public class GLProfile {
case GL.GL_FIXED:
return true;
case javax.media.opengl.GL2ES2.GL_INT:
- case javax.media.opengl.GL2ES2.GL_UNSIGNED_INT:
+ case GL.GL_UNSIGNED_INT:
if( isGL2ES2() ) {
return true;
}
- case javax.media.opengl.GL2.GL_DOUBLE:
+ case javax.media.opengl.GL2GL3.GL_DOUBLE:
if( isGL3() ) {
return true;
}
@@ -1266,8 +1266,8 @@ public class GLProfile {
return false;
}
- public boolean isValidArrayDataType(int index, int comps, int type,
- boolean isVertexAttribPointer, boolean throwException) {
+ public boolean isValidArrayDataType(final int index, final int comps, final int type,
+ final boolean isVertexAttribPointer, final boolean throwException) {
final String arrayName = getGLArrayName(index);
if( isGLES1() ) {
if(isVertexAttribPointer) {
@@ -1391,8 +1391,8 @@ public class GLProfile {
case GL.GL_SHORT:
case GL.GL_FLOAT:
case javax.media.opengl.GL2ES2.GL_INT:
- case javax.media.opengl.GL2ES2.GL_UNSIGNED_INT:
- case javax.media.opengl.GL2.GL_DOUBLE:
+ case GL.GL_UNSIGNED_INT:
+ case javax.media.opengl.GL2GL3.GL_DOUBLE:
break;
default:
if(throwException) {
@@ -1420,7 +1420,7 @@ public class GLProfile {
case GL.GL_SHORT:
case GL.GL_FLOAT:
case javax.media.opengl.GL2ES2.GL_INT:
- case javax.media.opengl.GL2.GL_DOUBLE:
+ case javax.media.opengl.GL2GL3.GL_DOUBLE:
break;
default:
if(throwException) {
@@ -1447,7 +1447,7 @@ public class GLProfile {
case GL.GL_SHORT:
case GL.GL_FLOAT:
case javax.media.opengl.GL2ES2.GL_INT:
- case javax.media.opengl.GL2.GL_DOUBLE:
+ case javax.media.opengl.GL2GL3.GL_DOUBLE:
break;
default:
if(throwException) {
@@ -1474,8 +1474,8 @@ public class GLProfile {
case GL.GL_SHORT:
case GL.GL_FLOAT:
case javax.media.opengl.GL2ES2.GL_INT:
- case javax.media.opengl.GL2ES2.GL_UNSIGNED_INT:
- case javax.media.opengl.GL2.GL_DOUBLE:
+ case GL.GL_UNSIGNED_INT:
+ case javax.media.opengl.GL2GL3.GL_DOUBLE:
break;
default:
if(throwException) {
@@ -1500,7 +1500,7 @@ public class GLProfile {
case GL.GL_SHORT:
case GL.GL_FLOAT:
case javax.media.opengl.GL2ES2.GL_INT:
- case javax.media.opengl.GL2.GL_DOUBLE:
+ case javax.media.opengl.GL2GL3.GL_DOUBLE:
break;
default:
if(throwException) {
@@ -1566,7 +1566,7 @@ public class GLProfile {
private static final Constructor> getCtor(final String clazzName, final boolean glObject, final ClassLoader cl) {
try {
return ReflectionUtil.getConstructor(clazzName, glObject ? ctorGLArgs : ctorProcArgs, false, cl);
- } catch (Throwable t) {
+ } catch (final Throwable t) {
if( DEBUG ) {
System.err.println("Caught: "+t.getMessage());
t.printStackTrace();
@@ -1656,16 +1656,16 @@ public class GLProfile {
try {
desktopFactory = (GLDrawableFactoryImpl) GLDrawableFactory.getFactoryImpl(GL2);
if(null != desktopFactory) {
- DesktopGLDynamicLookupHelper glLookupHelper = (DesktopGLDynamicLookupHelper) desktopFactory.getGLDynamicLookupHelper(0);
+ final DesktopGLDynamicLookupHelper glLookupHelper = (DesktopGLDynamicLookupHelper) desktopFactory.getGLDynamicLookupHelper(0);
if(null!=glLookupHelper) {
hasDesktopGLFactory = glLookupHelper.isLibComplete() && hasGL234Impl;
}
}
- } catch (LinkageError le) {
+ } catch (final LinkageError le) {
t=le;
- } catch (RuntimeException re) {
+ } catch (final RuntimeException re) {
t=re;
- } catch (Throwable tt) {
+ } catch (final Throwable tt) {
t=tt;
}
if(DEBUG) {
@@ -1696,13 +1696,13 @@ public class GLProfile {
hasGLES3Impl = null!=eglFactory.getGLDynamicLookupHelper(2) && hasGLES3Impl;
hasGLES1Impl = null!=eglFactory.getGLDynamicLookupHelper(1) && hasGLES1Impl;
}
- } catch (LinkageError le) {
+ } catch (final LinkageError le) {
t=le;
- } catch (SecurityException se) {
+ } catch (final SecurityException se) {
t=se;
- } catch (NullPointerException npe) {
+ } catch (final NullPointerException npe) {
t=npe;
- } catch (RuntimeException re) {
+ } catch (final RuntimeException re) {
t=re;
}
if(DEBUG) {
@@ -1765,13 +1765,13 @@ public class GLProfile {
* @param device the device for which profiles shall be initialized
* @return true if any profile for the device exists, otherwise false
*/
- private static boolean initProfilesForDevice(AbstractGraphicsDevice device) {
+ private static boolean initProfilesForDevice(final AbstractGraphicsDevice device) {
if(null == device) {
return false;
}
initLock.lock();
try {
- GLDrawableFactory factory = GLDrawableFactory.getFactoryImpl(device);
+ final GLDrawableFactory factory = GLDrawableFactory.getFactoryImpl(device);
factory.enterThreadCriticalZone();
try {
return initProfilesForDeviceCritical(device);
@@ -1782,8 +1782,8 @@ public class GLProfile {
initLock.unlock();
}
}
- private static boolean initProfilesForDeviceCritical(AbstractGraphicsDevice device) {
- boolean isSet = GLContext.getAvailableGLVersionsSet(device);
+ private static boolean initProfilesForDeviceCritical(final AbstractGraphicsDevice device) {
+ final boolean isSet = GLContext.getAvailableGLVersionsSet(device);
if(DEBUG) {
System.err.println("Info: GLProfile.initProfilesForDevice: "+device+" ("+device.getClass().getName()+"), isSet "+isSet+", hasDesktopGLFactory "+hasDesktopGLFactory+", hasEGLFactory "+hasEGLFactory);
@@ -1791,7 +1791,7 @@ public class GLProfile {
if(isSet) {
// Avoid recursion and check whether impl. is sane!
final String deviceKey = device.getUniqueID();
- HashMap map = deviceConn2ProfileMap.get(deviceKey);
+ final HashMap map = deviceConn2ProfileMap.get(deviceKey);
if( null == map ) {
throw new InternalError("GLContext Avail. GLVersion is set - but no profile map for device: "+device);
}
@@ -1813,7 +1813,7 @@ public class GLProfile {
if(null != sharedResourceThread) {
initLock.addOwner(sharedResourceThread);
}
- boolean desktopSharedCtxAvail = desktopFactory.createSharedResource(device);
+ final boolean desktopSharedCtxAvail = desktopFactory.createSharedResource(device);
if(null != sharedResourceThread) {
initLock.removeOwner(sharedResourceThread);
}
@@ -1841,7 +1841,7 @@ public class GLProfile {
if(null != sharedResourceThread) {
initLock.addOwner(sharedResourceThread);
}
- boolean eglSharedCtxAvail = eglFactory.createSharedResource(device);
+ final boolean eglSharedCtxAvail = eglFactory.createSharedResource(device);
if(null != sharedResourceThread) {
initLock.removeOwner(sharedResourceThread);
}
@@ -1881,13 +1881,13 @@ public class GLProfile {
System.err.println("GLProfile.initProfilesForDevice: "+device.getConnection()+": "+glAvailabilityToString(device));
if(addedDesktopProfile) {
dumpGLInfo(desktopFactory, device);
- List availCaps = desktopFactory.getAvailableCapabilities(device);
+ final List availCaps = desktopFactory.getAvailableCapabilities(device);
for(int i=0; i availCaps = eglFactory.getAvailableCapabilities(device);
+ final List availCaps = eglFactory.getAvailableCapabilities(device);
for(int i=0; i 0)
@@ -1929,8 +1929,8 @@ public class GLProfile {
return msg.toString();
}
- private static void glAvailabilityToString(AbstractGraphicsDevice device, StringBuilder sb, int major, int profile) {
- String str = GLContext.getAvailableGLVersionAsString(device, major, profile);
+ private static void glAvailabilityToString(final AbstractGraphicsDevice device, final StringBuilder sb, final int major, final int profile) {
+ final String str = GLContext.getAvailableGLVersionAsString(device, major, profile);
if(null==str) {
throw new GLException("Internal Error");
}
@@ -1939,7 +1939,7 @@ public class GLProfile {
sb.append("]");
}
- private static boolean computeProfileMap(AbstractGraphicsDevice device, boolean desktopCtxUndef, boolean esCtxUndef) {
+ private static boolean computeProfileMap(final AbstractGraphicsDevice device, final boolean desktopCtxUndef, final boolean esCtxUndef) {
if (DEBUG) {
System.err.println("GLProfile.init map "+device.getConnection()+", desktopCtxUndef "+desktopCtxUndef+", esCtxUndef "+esCtxUndef);
}
@@ -1994,7 +1994,7 @@ public class GLProfile {
/**
* Returns the profile implementation
*/
- private static String computeProfileImpl(AbstractGraphicsDevice device, String profile, boolean desktopCtxUndef, boolean esCtxUndef, boolean isHardwareRasterizer[]) {
+ private static String computeProfileImpl(final AbstractGraphicsDevice device, final String profile, final boolean desktopCtxUndef, final boolean esCtxUndef, final boolean isHardwareRasterizer[]) {
if (GL2ES1.equals(profile)) {
final boolean es1HardwareRasterizer[] = new boolean[1];
final boolean gles1Available = hasGLES1Impl && ( esCtxUndef || GLContext.isGLES1Available(device, es1HardwareRasterizer) );
@@ -2143,7 +2143,7 @@ public class GLProfile {
* @return the GLProfile HashMap if exists, otherwise null
* @throws GLException if no profile for the given device is available.
*/
- private static HashMap getProfileMap(AbstractGraphicsDevice device, boolean throwExceptionOnZeroProfile)
+ private static HashMap getProfileMap(AbstractGraphicsDevice device, final boolean throwExceptionOnZeroProfile)
throws GLException
{
initSingleton();
@@ -2175,13 +2175,13 @@ public class GLProfile {
return map;
}
- private static void setProfileMap(AbstractGraphicsDevice device, HashMap mappedProfiles) {
+ private static void setProfileMap(final AbstractGraphicsDevice device, final HashMap mappedProfiles) {
synchronized ( deviceConn2ProfileMap ) {
deviceConn2ProfileMap.put(device.getUniqueID(), mappedProfiles);
}
}
- private GLProfile(String profile, GLProfile profileImpl, boolean isHardwareRasterizer) {
+ private GLProfile(final String profile, final GLProfile profileImpl, final boolean isHardwareRasterizer) {
this.profile = profile;
this.profileImpl = profileImpl;
this.isHardwareRasterizer = isHardwareRasterizer;
diff --git a/src/jogl/classes/javax/media/opengl/GLUniformData.java b/src/jogl/classes/javax/media/opengl/GLUniformData.java
index fac8b7a1f..67cc4c999 100644
--- a/src/jogl/classes/javax/media/opengl/GLUniformData.java
+++ b/src/jogl/classes/javax/media/opengl/GLUniformData.java
@@ -14,7 +14,7 @@ public class GLUniformData {
* Number of objects is 1
*
*/
- public GLUniformData(String name, int val) {
+ public GLUniformData(final String name, final int val) {
initScalar(name, 1, new Integer(val));
}
@@ -24,7 +24,7 @@ public class GLUniformData {
* Number of objects is 1
*
*/
- public GLUniformData(String name, float val) {
+ public GLUniformData(final String name, final float val) {
initScalar(name, 1, new Float(val));
}
@@ -35,7 +35,7 @@ public class GLUniformData {
*
* @param components number of elements of one object, ie 4 for GL_FLOAT_VEC4,
*/
- public GLUniformData(String name, int components, IntBuffer data) {
+ public GLUniformData(final String name, final int components, final IntBuffer data) {
initBuffer(name, components, data);
}
@@ -46,19 +46,19 @@ public class GLUniformData {
*
* @param components number of elements of one object, ie 4 for GL_FLOAT_VEC4,
*/
- public GLUniformData(String name, int components, FloatBuffer data) {
+ public GLUniformData(final String name, final int components, final FloatBuffer data) {
initBuffer(name, components, data);
}
- private GLUniformData(int components, String name) {
+ private GLUniformData(final int components, final String name) {
initBuffer(name, components, null);
}
- public static GLUniformData creatEmptyVector(String name, int components) {
+ public static GLUniformData creatEmptyVector(final String name, final int components) {
return new GLUniformData(components, name);
}
- public static GLUniformData creatEmptyMatrix(String name, int rows, int columns) {
+ public static GLUniformData creatEmptyMatrix(final String name, final int rows, final int columns) {
return new GLUniformData(name, rows, columns, null);
}
@@ -70,7 +70,7 @@ public class GLUniformData {
* @param rows the matrix rows
* @param column the matrix column
*/
- public GLUniformData(String name, int rows, int columns, FloatBuffer data) {
+ public GLUniformData(final String name, final int rows, final int columns, final FloatBuffer data) {
initBuffer(name, rows, columns, data);
}
@@ -114,7 +114,7 @@ public class GLUniformData {
return toString(null).toString();
}
- private void initBuffer(String name, int rows, int columns, Buffer buffer) {
+ private void initBuffer(final String name, final int rows, final int columns, final Buffer buffer) {
if( 2>rows || rows>4 || 2>columns || columns>4 ) {
throw new GLException("rowsXcolumns must be within [2..4]X[2..4], is: "+rows+"X"+columns);
}
@@ -125,7 +125,7 @@ public class GLUniformData {
this.location=-1;
initBuffer(buffer);
}
- private void initScalar(String name, int components, Object data) {
+ private void initScalar(final String name, final int components, final Object data) {
if( 1>components || components>4 ) {
throw new GLException("components must be within [1..4], is: "+components);
}
@@ -136,7 +136,7 @@ public class GLUniformData {
this.location=-1;
initScalar(data);
}
- private void initBuffer(String name, int components, Buffer buffer) {
+ private void initBuffer(final String name, final int components, final Buffer buffer) {
if( 1>components || components>4 ) {
throw new GLException("components must be within [1..4], is: "+components);
}
@@ -148,7 +148,7 @@ public class GLUniformData {
initBuffer(buffer);
}
- private void initScalar(Object data) {
+ private void initScalar(final Object data) {
if(data instanceof Buffer) {
initBuffer((Buffer)data);
} else if( null != data ) {
@@ -185,7 +185,7 @@ public class GLUniformData {
* Sets the given location of the shader uniform.
* @return the given location
*/
- public int setLocation(int location) { this.location=location; return location; }
+ public int setLocation(final int location) { this.location=location; return location; }
/**
* Retrieves the location of the shader uniform from the linked shader program.
@@ -197,7 +197,7 @@ public class GLUniformData {
* @return ≥0 denotes a valid uniform location as found and used in the given shader program.
* <0 denotes an invalid location, i.e. not found or used in the given shader program.
*/
- public int setLocation(GL2ES2 gl, int program) {
+ public int setLocation(final GL2ES2 gl, final int program) {
location = gl.glGetUniformLocation(program, name);
return location;
}
diff --git a/src/jogl/classes/javax/media/opengl/Threading.java b/src/jogl/classes/javax/media/opengl/Threading.java
index 7503e9cf7..3ee233303 100644
--- a/src/jogl/classes/javax/media/opengl/Threading.java
+++ b/src/jogl/classes/javax/media/opengl/Threading.java
@@ -168,7 +168,7 @@ public class Threading {
current thread is the OpenGL thread and either execute the
Runnable directly or perform the work inside it.
**/
- public static final void invokeOnOpenGLThread(boolean wait, Runnable r) throws GLException {
+ public static final void invokeOnOpenGLThread(final boolean wait, final Runnable r) throws GLException {
ThreadingImpl.invokeOnOpenGLThread(wait, r);
}
@@ -185,7 +185,7 @@ public class Threading {
* @param lock optional lock object to be tested
* @throws GLException
*/
- public static final void invoke(boolean wait, Runnable r, Object lock) throws GLException {
+ public static final void invoke(final boolean wait, final Runnable r, final Object lock) throws GLException {
if ( isSingleThreaded() && !isOpenGLThread() &&
( null == lock || !Thread.holdsLock(lock) ) ) {
invokeOnOpenGLThread(wait, r);
diff --git a/src/jogl/classes/javax/media/opengl/TraceGL2.java b/src/jogl/classes/javax/media/opengl/TraceGL2.java
index c577332e9..94d391d43 100644
--- a/src/jogl/classes/javax/media/opengl/TraceGL2.java
+++ b/src/jogl/classes/javax/media/opengl/TraceGL2.java
@@ -17,7 +17,7 @@ import java.io.PrintStream;
*
*/
public class TraceGL2 extends TraceGL4bc {
- public TraceGL2(GL2 downstream, PrintStream stream) {
+ public TraceGL2(final GL2 downstream, final PrintStream stream) {
super((GL4bc)downstream, stream);
}
}
diff --git a/src/jogl/classes/javax/media/opengl/TraceGL3.java b/src/jogl/classes/javax/media/opengl/TraceGL3.java
index 5fccf40c7..96e655902 100644
--- a/src/jogl/classes/javax/media/opengl/TraceGL3.java
+++ b/src/jogl/classes/javax/media/opengl/TraceGL3.java
@@ -17,7 +17,7 @@ import java.io.PrintStream;
*
*/
public class TraceGL3 extends TraceGL4bc {
- public TraceGL3(GL3 downstream, PrintStream stream) {
+ public TraceGL3(final GL3 downstream, final PrintStream stream) {
super((GL4bc)downstream, stream);
}
}
diff --git a/src/jogl/classes/javax/media/opengl/TraceGL3bc.java b/src/jogl/classes/javax/media/opengl/TraceGL3bc.java
index 84f537f60..2a8590236 100644
--- a/src/jogl/classes/javax/media/opengl/TraceGL3bc.java
+++ b/src/jogl/classes/javax/media/opengl/TraceGL3bc.java
@@ -17,7 +17,7 @@ import java.io.PrintStream;
*
*/
public class TraceGL3bc extends TraceGL4bc {
- public TraceGL3bc(GL3bc downstream, PrintStream stream) {
+ public TraceGL3bc(final GL3bc downstream, final PrintStream stream) {
super((GL4bc)downstream, stream);
}
}
diff --git a/src/jogl/classes/javax/media/opengl/TraceGL4.java b/src/jogl/classes/javax/media/opengl/TraceGL4.java
index afe2cd9a1..d48f9926a 100644
--- a/src/jogl/classes/javax/media/opengl/TraceGL4.java
+++ b/src/jogl/classes/javax/media/opengl/TraceGL4.java
@@ -17,7 +17,7 @@ import java.io.PrintStream;
*
*/
public class TraceGL4 extends TraceGL4bc {
- public TraceGL4(GL4 downstream, PrintStream stream) {
+ public TraceGL4(final GL4 downstream, final PrintStream stream) {
super((GL4bc)downstream, stream);
}
}
diff --git a/src/jogl/classes/javax/media/opengl/TraceGLES2.java b/src/jogl/classes/javax/media/opengl/TraceGLES2.java
index 4740e2e72..b58f169a7 100644
--- a/src/jogl/classes/javax/media/opengl/TraceGLES2.java
+++ b/src/jogl/classes/javax/media/opengl/TraceGLES2.java
@@ -17,7 +17,7 @@ import java.io.PrintStream;
*
*/
public class TraceGLES2 extends TraceGLES3 {
- public TraceGLES2(GLES2 downstream, PrintStream stream) {
+ public TraceGLES2(final GLES2 downstream, final PrintStream stream) {
super((GLES3)downstream, stream);
}
}
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
index e3a7838e7..9d2d21ce5 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
@@ -184,7 +184,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
private volatile boolean isShowing;
private final HierarchyListener hierarchyListener = new HierarchyListener() {
@Override
- public void hierarchyChanged(HierarchyEvent e) {
+ public void hierarchyChanged(final HierarchyEvent e) {
isShowing = GLCanvas.this.isShowing();
}
};
@@ -212,7 +212,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
* @throws GLException if no GLCapabilities are given and no default profile is available for the default desktop device.
* @see GLCanvas#GLCanvas(javax.media.opengl.GLCapabilitiesImmutable, javax.media.opengl.GLCapabilitiesChooser, javax.media.opengl.GLContext, java.awt.GraphicsDevice)
*/
- public GLCanvas(GLCapabilitiesImmutable capsReqUser) throws GLException {
+ public GLCanvas(final GLCapabilitiesImmutable capsReqUser) throws GLException {
this(capsReqUser, null, null, null);
}
@@ -226,7 +226,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
* @deprecated Use {@link #GLCanvas(GLCapabilitiesImmutable)}
* and set shared GLContext via {@link #setSharedContext(GLContext)} or {@link #setSharedAutoDrawable(GLAutoDrawable)}.
*/
- public GLCanvas(GLCapabilitiesImmutable capsReqUser, GLContext shareWith)
+ public GLCanvas(final GLCapabilitiesImmutable capsReqUser, final GLContext shareWith)
throws GLException
{
this(capsReqUser, null, shareWith, null);
@@ -244,9 +244,9 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
is passed for this argument.
* @throws GLException if no GLCapabilities are given and no default profile is available for the default desktop device.
*/
- public GLCanvas(GLCapabilitiesImmutable capsReqUser,
- GLCapabilitiesChooser chooser,
- GraphicsDevice device)
+ public GLCanvas(final GLCapabilitiesImmutable capsReqUser,
+ final GLCapabilitiesChooser chooser,
+ final GraphicsDevice device)
throws GLException
{
this(capsReqUser, chooser, null, device);
@@ -272,8 +272,8 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
* and set shared GLContext via {@link #setSharedContext(GLContext)} or {@link #setSharedAutoDrawable(GLAutoDrawable)}.
*/
public GLCanvas(GLCapabilitiesImmutable capsReqUser,
- GLCapabilitiesChooser chooser,
- GLContext shareWith,
+ final GLCapabilitiesChooser chooser,
+ final GLContext shareWith,
GraphicsDevice device)
throws GLException
{
@@ -297,7 +297,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
}
if(null==device) {
- GraphicsConfiguration gc = super.getGraphicsConfiguration();
+ final GraphicsConfiguration gc = super.getGraphicsConfiguration();
if(null!=gc) {
device = gc.getDevice();
}
@@ -316,12 +316,12 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public final void setSharedContext(GLContext sharedContext) throws IllegalStateException {
+ public final void setSharedContext(final GLContext sharedContext) throws IllegalStateException {
helper.setSharedContext(this.context, sharedContext);
}
@Override
- public final void setSharedAutoDrawable(GLAutoDrawable sharedAutoDrawable) throws IllegalStateException {
+ public final void setSharedAutoDrawable(final GLAutoDrawable sharedAutoDrawable) throws IllegalStateException {
helper.setSharedAutoDrawable(this, sharedAutoDrawable);
}
@@ -331,7 +331,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public void setShallUseOffscreenLayer(boolean v) {
+ public void setShallUseOffscreenLayer(final boolean v) {
shallUseOffscreenLayer = v;
}
@@ -410,11 +410,11 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
* block, both devices should have the same visual list, and the
* same configuration should be selected here.
*/
- AWTGraphicsConfiguration config = chooseGraphicsConfiguration( (GLCapabilitiesImmutable)awtConfig.getChosenCapabilities(),
+ final AWTGraphicsConfiguration config = chooseGraphicsConfiguration( (GLCapabilitiesImmutable)awtConfig.getChosenCapabilities(),
(GLCapabilitiesImmutable)awtConfig.getRequestedCapabilities(),
chooser, gc.getDevice());
final GraphicsConfiguration compatible = (null!=config)?config.getAWTGraphicsConfiguration():null;
- boolean equalCaps = config.getChosenCapabilities().equals(awtConfig.getChosenCapabilities());
+ final boolean equalCaps = config.getChosenCapabilities().equals(awtConfig.getChosenCapabilities());
if(DEBUG) {
System.err.println(getThreadName()+": Info:");
System.err.println("Created Config (n): HAVE GC "+chosen);
@@ -487,7 +487,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
}
}
- private final void setRealizedImpl(boolean realized) {
+ private final void setRealizedImpl(final boolean realized) {
final RecursiveLock _lock = lock;
_lock.lock();
try {
@@ -514,7 +514,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
};
@Override
- public final void setRealized(boolean realized) {
+ public final void setRealized(final boolean realized) {
// Make sure drawable realization happens on AWT-EDT and only there. Consider the AWTTree lock!
AWTEDTExecutor.singleton.invoke(getTreeLock(), false /* allowOnNonEDT */, true /* wait */, realized ? realizeOnEDTAction : unrealizeOnEDTAction);
}
@@ -531,7 +531,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public WindowClosingMode setDefaultCloseOperation(WindowClosingMode op) {
+ public WindowClosingMode setDefaultCloseOperation(final WindowClosingMode op) {
return awtWindowClosingProtocol.setDefaultCloseOperation(op);
}
@@ -565,7 +565,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
destroyImpl( false );
}
- protected void destroyImpl(boolean destroyJAWTWindowAndAWTDevice) {
+ protected void destroyImpl(final boolean destroyJAWTWindowAndAWTDevice) {
Threading.invoke(true, destroyOnEDTAction, getTreeLock());
if( destroyJAWTWindowAndAWTDevice ) {
AWTEDTExecutor.singleton.invoke(getTreeLock(), true /* allowOnNonEDT */, true /* wait */, disposeJAWTWindowAndAWTDeviceOnEDT);
@@ -578,21 +578,21 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
properly.
*/
@Override
- public void paint(Graphics g) {
+ public void paint(final Graphics g) {
if( Beans.isDesignTime() ) {
// Make GLCanvas behave better in NetBeans GUI builder
g.setColor(Color.BLACK);
g.fillRect(0, 0, getWidth(), getHeight());
- FontMetrics fm = g.getFontMetrics();
+ final FontMetrics fm = g.getFontMetrics();
String name = getName();
if (name == null) {
name = getClass().getName();
- int idx = name.lastIndexOf('.');
+ final int idx = name.lastIndexOf('.');
if (idx >= 0) {
name = name.substring(idx + 1);
}
}
- Rectangle2D bounds = fm.getStringBounds(name, g);
+ final Rectangle2D bounds = fm.getStringBounds(name, g);
g.setColor(Color.WHITE);
g.drawString(name,
(int) ((getWidth() - bounds.getWidth()) / 2),
@@ -801,7 +801,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
reshape in class java.awt.Component
*/
@SuppressWarnings("deprecation")
@Override
- public void reshape(int x, int y, int width, int height) {
+ public void reshape(final int x, final int y, final int width, final int height) {
synchronized (getTreeLock()) { // super.reshape(..) claims tree lock, so we do extend it's lock over reshape
super.reshape(x, y, width, height);
reshapeImpl(width, height);
@@ -845,7 +845,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
* canvas from interfering with the OpenGL rendering.
*/
@Override
- public void update(Graphics g) {
+ public void update(final Graphics g) {
paint(g);
}
@@ -855,7 +855,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
private AWTTilePainter printAWTTiles = null;
@Override
- public void setupPrint(double scaleMatX, double scaleMatY, int numSamples, int tileWidth, int tileHeight) {
+ public void setupPrint(final double scaleMatX, final double scaleMatY, final int numSamples, final int tileWidth, final int tileHeight) {
printActive = true;
final int componentCount = isOpaque() ? 3 : 4;
final TileRenderer printRenderer = new TileRenderer();
@@ -960,7 +960,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
};
@Override
- public void print(Graphics graphics) {
+ public void print(final Graphics graphics) {
if( !printActive || null == printGLAD ) {
throw new IllegalStateException("setupPrint() not called");
}
@@ -994,7 +994,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
printAWTTiles.resetGraphics2D();
}
}
- } catch (NoninvertibleTransformException nte) {
+ } catch (final NoninvertibleTransformException nte) {
System.err.println("Caught: Inversion failed of: "+g2d.getTransform());
nte.printStackTrace();
}
@@ -1004,12 +1004,12 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public void addGLEventListener(GLEventListener listener) {
+ public void addGLEventListener(final GLEventListener listener) {
helper.addGLEventListener(listener);
}
@Override
- public void addGLEventListener(int index, GLEventListener listener) throws IndexOutOfBoundsException {
+ public void addGLEventListener(final int index, final GLEventListener listener) throws IndexOutOfBoundsException {
helper.addGLEventListener(index, listener);
}
@@ -1019,7 +1019,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public GLEventListener getGLEventListener(int index) throws IndexOutOfBoundsException {
+ public GLEventListener getGLEventListener(final int index) throws IndexOutOfBoundsException {
return helper.getGLEventListener(index);
}
@@ -1029,29 +1029,29 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public boolean getGLEventListenerInitState(GLEventListener listener) {
+ public boolean getGLEventListenerInitState(final GLEventListener listener) {
return helper.getGLEventListenerInitState(listener);
}
@Override
- public void setGLEventListenerInitState(GLEventListener listener, boolean initialized) {
+ public void setGLEventListenerInitState(final GLEventListener listener, final boolean initialized) {
helper.setGLEventListenerInitState(listener, initialized);
}
@Override
- public GLEventListener disposeGLEventListener(GLEventListener listener, boolean remove) {
+ public GLEventListener disposeGLEventListener(final GLEventListener listener, final boolean remove) {
final DisposeGLEventListenerAction r = new DisposeGLEventListenerAction(listener, remove);
Threading.invoke(true, r, getTreeLock());
return r.listener;
}
@Override
- public GLEventListener removeGLEventListener(GLEventListener listener) {
+ public GLEventListener removeGLEventListener(final GLEventListener listener) {
return helper.removeGLEventListener(listener);
}
@Override
- public void setAnimator(GLAnimatorControl animatorControl) {
+ public void setAnimator(final GLAnimatorControl animatorControl) {
helper.setAnimator(animatorControl);
}
@@ -1061,7 +1061,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public final Thread setExclusiveContextThread(Thread t) throws GLException {
+ public final Thread setExclusiveContextThread(final Thread t) throws GLException {
return helper.setExclusiveContextThread(t, context);
}
@@ -1071,7 +1071,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public boolean invoke(boolean wait, GLRunnable glRunnable) {
+ public boolean invoke(final boolean wait, final GLRunnable glRunnable) {
return helper.invoke(this, wait, glRunnable);
}
@@ -1081,7 +1081,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public GLContext setContext(GLContext newCtx, boolean destroyPrevCtx) {
+ public GLContext setContext(final GLContext newCtx, final boolean destroyPrevCtx) {
final RecursiveLock _lock = lock;
_lock.lock();
try {
@@ -1114,7 +1114,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public GL setGL(GL gl) {
+ public GL setGL(final GL gl) {
final GLContext _context = context;
if (_context != null) {
_context.setGL(gl);
@@ -1125,7 +1125,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
@Override
- public void setAutoSwapBufferMode(boolean onOrOff) {
+ public void setAutoSwapBufferMode(final boolean onOrOff) {
helper.setAutoSwapBufferMode(onOrOff);
}
@@ -1140,7 +1140,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public void setContextCreationFlags(int flags) {
+ public void setContextCreationFlags(final int flags) {
additionalCtxCreationFlags = flags;
final GLContext _context = context;
if(null != _context) {
@@ -1263,7 +1263,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
if(DEBUG) {
System.err.println(getThreadName()+": destroyOnEDTAction() - post ctx: "+context);
}
- } catch (GLException gle) {
+ } catch (final GLException gle) {
gle.printStackTrace();
}
}
@@ -1327,7 +1327,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
} else {
adeviceMsg = null;
}
- boolean closed = adevice.close();
+ final boolean closed = adevice.close();
if(DEBUG) {
System.err.println(getThreadName()+": GLCanvas.disposeJAWTWindowAndAWTDeviceOnEDT(): post GraphicsDevice: "+adeviceMsg+", result: "+closed);
}
@@ -1393,7 +1393,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
private class DisposeGLEventListenerAction implements Runnable {
GLEventListener listener;
private final boolean remove;
- private DisposeGLEventListenerAction(GLEventListener listener, boolean remove) {
+ private DisposeGLEventListenerAction(final GLEventListener listener, final boolean remove) {
this.listener = listener;
this.remove = remove;
}
@@ -1431,16 +1431,16 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
clazz.getDeclaredMethod("disableBackgroundErase",
new Class[] { Canvas.class });
disableBackgroundEraseMethod.setAccessible(true);
- } catch (Exception e) {
+ } catch (final Exception e) {
clazz = clazz.getSuperclass();
}
}
- } catch (Exception e) {
+ } catch (final Exception e) {
}
return null;
}
});
- } catch (Exception e) {
+ } catch (final Exception e) {
}
disableBackgroundEraseInitialized = true;
if(DEBUG) {
@@ -1452,7 +1452,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
Throwable t=null;
try {
disableBackgroundEraseMethod.invoke(getToolkit(), new Object[] { this });
- } catch (Exception e) {
+ } catch (final Exception e) {
t = e;
}
if(DEBUG) {
@@ -1498,7 +1498,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
EventQueue.invokeAndWait(new Runnable() {
@Override
public void run() {
- AWTGraphicsConfiguration c = (AWTGraphicsConfiguration)
+ final AWTGraphicsConfiguration c = (AWTGraphicsConfiguration)
GraphicsConfigurationFactory.getFactory(AWTGraphicsDevice.class, GLCapabilitiesImmutable.class).chooseGraphicsConfiguration(capsChosen,
capsRequested,
chooser, aScreen, VisualIDHolder.VID_UNDEFINED);
@@ -1506,9 +1506,9 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
}
});
config = ( bucket.size() > 0 ) ? bucket.get(0) : null ;
- } catch (InvocationTargetException e) {
+ } catch (final InvocationTargetException e) {
throw new GLException(e.getTargetException());
- } catch (InterruptedException e) {
+ } catch (final InterruptedException e) {
throw new GLException(e);
}
}
@@ -1525,7 +1525,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
/**
* A most simple JOGL AWT test entry
*/
- public static void main(String args[]) {
+ public static void main(final String args[]) {
System.err.println(VersionUtil.getPlatformInfo());
System.err.println(GlueGenVersion.getInstance());
// System.err.println(NativeWindowVersion.getInstance());
@@ -1542,16 +1542,16 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
glCanvas.addGLEventListener(new GLEventListener() {
@Override
- public void init(GLAutoDrawable drawable) {
- GL gl = drawable.getGL();
+ public void init(final GLAutoDrawable drawable) {
+ final GL gl = drawable.getGL();
System.err.println(JoglVersion.getGLInfo(gl, null));
}
@Override
- public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { }
+ public void reshape(final GLAutoDrawable drawable, final int x, final int y, final int width, final int height) { }
@Override
- public void display(GLAutoDrawable drawable) { }
+ public void display(final GLAutoDrawable drawable) { }
@Override
- public void dispose(GLAutoDrawable drawable) { }
+ public void dispose(final GLAutoDrawable drawable) { }
});
try {
@@ -1560,7 +1560,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
public void run() {
frame.setVisible(true);
}});
- } catch (Throwable t) {
+ } catch (final Throwable t) {
t.printStackTrace();
}
glCanvas.display();
@@ -1570,7 +1570,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
public void run() {
frame.dispose();
}});
- } catch (Throwable t) {
+ } catch (final Throwable t) {
t.printStackTrace();
}
}
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
index 558970df6..eca99c6c0 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
@@ -96,6 +96,7 @@ import jogamp.opengl.awt.AWTTilePainter;
import jogamp.opengl.awt.Java2D;
import jogamp.opengl.util.glsl.GLSLTextureRaster;
+import com.jogamp.common.util.PropertyAccess;
import com.jogamp.common.util.awt.AWTEDTExecutor;
import com.jogamp.nativewindow.awt.AWTPrintLifecycle;
import com.jogamp.nativewindow.awt.AWTWindowClosingProtocol;
@@ -190,11 +191,11 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
static {
Debug.initSingleton();
DEBUG = Debug.debug("GLJPanel");
- DEBUG_VIEWPORT = Debug.isPropertyDefined("jogl.debug.GLJPanel.Viewport", true);
- USE_GLSL_TEXTURE_RASTERIZER = !Debug.isPropertyDefined("jogl.gljpanel.noglsl", true);
- SKIP_VERTICAL_FLIP_DEFAULT = Debug.isPropertyDefined("jogl.gljpanel.noverticalflip", true);
- boolean enabled = Debug.getBooleanProperty("sun.java2d.opengl", false);
- java2dOGLEnabledByProp = enabled && !Debug.isPropertyDefined("jogl.gljpanel.noogl", true);
+ DEBUG_VIEWPORT = PropertyAccess.isPropertyDefined("jogl.debug.GLJPanel.Viewport", true);
+ USE_GLSL_TEXTURE_RASTERIZER = !PropertyAccess.isPropertyDefined("jogl.gljpanel.noglsl", true);
+ SKIP_VERTICAL_FLIP_DEFAULT = PropertyAccess.isPropertyDefined("jogl.gljpanel.noverticalflip", true);
+ boolean enabled = PropertyAccess.getBooleanProperty("sun.java2d.opengl", false);
+ java2dOGLEnabledByProp = enabled && !PropertyAccess.isPropertyDefined("jogl.gljpanel.noogl", true);
enabled = false;
if( java2dOGLEnabledByProp ) {
@@ -281,7 +282,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
private volatile boolean isShowing;
private final HierarchyListener hierarchyListener = new HierarchyListener() {
@Override
- public void hierarchyChanged(HierarchyEvent e) {
+ public void hierarchyChanged(final HierarchyEvent e) {
isShowing = GLJPanel.this.isShowing();
}
};
@@ -308,7 +309,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
selection mechanism.
* @throws GLException if no GLCapabilities are given and no default profile is available for the default desktop device.
*/
- public GLJPanel(GLCapabilitiesImmutable userCapsRequest) throws GLException {
+ public GLJPanel(final GLCapabilitiesImmutable userCapsRequest) throws GLException {
this(userCapsRequest, null, null);
}
@@ -320,7 +321,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
is used if null is passed for this argument.
* @throws GLException if no GLCapabilities are given and no default profile is available for the default desktop device.
*/
- public GLJPanel(GLCapabilitiesImmutable userCapsRequest, GLCapabilitiesChooser chooser)
+ public GLJPanel(final GLCapabilitiesImmutable userCapsRequest, final GLCapabilitiesChooser chooser)
throws GLException
{
this(userCapsRequest, chooser, null);
@@ -343,7 +344,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
* @deprecated Use {@link #GLJPanel(GLCapabilitiesImmutable, GLCapabilitiesChooser)}
* and set shared GLContext via {@link #setSharedContext(GLContext)} or {@link #setSharedAutoDrawable(GLAutoDrawable)}.
*/
- public GLJPanel(GLCapabilitiesImmutable userCapsRequest, GLCapabilitiesChooser chooser, GLContext shareWith)
+ public GLJPanel(final GLCapabilitiesImmutable userCapsRequest, final GLCapabilitiesChooser chooser, final GLContext shareWith)
throws GLException
{
super();
@@ -393,7 +394,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
*
* @param offthread
*/
- public final boolean initializeBackend(boolean offthread) {
+ public final boolean initializeBackend(final boolean offthread) {
if( offthread ) {
new Thread(getThreadName()+"-GLJPanel_Init") {
public void run() {
@@ -412,12 +413,12 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public final void setSharedContext(GLContext sharedContext) throws IllegalStateException {
+ public final void setSharedContext(final GLContext sharedContext) throws IllegalStateException {
helper.setSharedContext(this.getContext(), sharedContext);
}
@Override
- public final void setSharedAutoDrawable(GLAutoDrawable sharedAutoDrawable) throws IllegalStateException {
+ public final void setSharedAutoDrawable(final GLAutoDrawable sharedAutoDrawable) throws IllegalStateException {
helper.setSharedAutoDrawable(this, sharedAutoDrawable);
}
@@ -428,7 +429,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
* @throws IllegalArgumentException if custom is null
* @throws IllegalStateException if backend is already realized, i.e. this instanced already painted once.
*/
- public void setPixelBufferProvider(AWTGLPixelBufferProvider custom) throws IllegalArgumentException, IllegalStateException {
+ public void setPixelBufferProvider(final AWTGLPixelBufferProvider custom) throws IllegalArgumentException, IllegalStateException {
if( null == custom ) {
throw new IllegalArgumentException("Null PixelBufferProvider");
}
@@ -454,7 +455,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
// so do everything on the event dispatch thread
try {
EventQueue.invokeAndWait(paintImmediatelyAction);
- } catch (Exception e) {
+ } catch (final Exception e) {
throw new GLException(e);
}
}
@@ -469,7 +470,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
if (backend != null && backend.getContext() != null) {
boolean animatorPaused = false;
- GLAnimatorControl animator = getAnimator();
+ final GLAnimatorControl animator = getAnimator();
if(null!=animator) {
animatorPaused = animator.pause();
}
@@ -517,16 +518,16 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
// Make GLJPanel behave better in NetBeans GUI builder
g.setColor(Color.BLACK);
g.fillRect(0, 0, getWidth(), getHeight());
- FontMetrics fm = g.getFontMetrics();
+ final FontMetrics fm = g.getFontMetrics();
String name = getName();
if (name == null) {
name = getClass().getName();
- int idx = name.lastIndexOf('.');
+ final int idx = name.lastIndexOf('.');
if (idx >= 0) {
name = name.substring(idx + 1);
}
}
- Rectangle2D bounds = fm.getStringBounds(name, g);
+ final Rectangle2D bounds = fm.getStringBounds(name, g);
g.setColor(Color.WHITE);
g.drawString(name,
(int) ((getWidth() - bounds.getWidth()) / 2),
@@ -647,7 +648,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
*/
@SuppressWarnings("deprecation")
@Override
- public void reshape(int x, int y, int width, int height) {
+ public void reshape(final int x, final int y, final int width, final int height) {
super.reshape(x, y, width, height);
reshapeImpl(width, height);
}
@@ -675,7 +676,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
private AWTTilePainter printAWTTiles = null;
@Override
- public void setupPrint(double scaleMatX, double scaleMatY, int numSamples, int tileWidth, int tileHeight) {
+ public void setupPrint(final double scaleMatX, final double scaleMatY, final int numSamples, final int tileWidth, final int tileHeight) {
printActive = true;
final int componentCount = isOpaque() ? 3 : 4;
final TileRenderer printRenderer = new TileRenderer();
@@ -802,7 +803,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
};
@Override
- public void print(Graphics graphics) {
+ public void print(final Graphics graphics) {
if( !printActive ) {
throw new IllegalStateException("setupPrint() not called");
}
@@ -837,7 +838,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
printAWTTiles.resetGraphics2D();
}
}
- } catch (NoninvertibleTransformException nte) {
+ } catch (final NoninvertibleTransformException nte) {
System.err.println("Caught: Inversion failed of: "+g2d.getTransform());
nte.printStackTrace();
}
@@ -846,7 +847,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
}
@Override
- protected void printComponent(Graphics g) {
+ protected void printComponent(final Graphics g) {
if( DEBUG ) {
System.err.println("AWT printComponent.X: "+printAWTTiles);
}
@@ -854,7 +855,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public void setOpaque(boolean opaque) {
+ public void setOpaque(final boolean opaque) {
if (backend != null) {
backend.setOpaque(opaque);
}
@@ -862,12 +863,12 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public void addGLEventListener(GLEventListener listener) {
+ public void addGLEventListener(final GLEventListener listener) {
helper.addGLEventListener(listener);
}
@Override
- public void addGLEventListener(int index, GLEventListener listener) {
+ public void addGLEventListener(final int index, final GLEventListener listener) {
helper.addGLEventListener(index, listener);
}
@@ -877,7 +878,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public GLEventListener getGLEventListener(int index) throws IndexOutOfBoundsException {
+ public GLEventListener getGLEventListener(final int index) throws IndexOutOfBoundsException {
return helper.getGLEventListener(index);
}
@@ -887,17 +888,17 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public boolean getGLEventListenerInitState(GLEventListener listener) {
+ public boolean getGLEventListenerInitState(final GLEventListener listener) {
return helper.getGLEventListenerInitState(listener);
}
@Override
- public void setGLEventListenerInitState(GLEventListener listener, boolean initialized) {
+ public void setGLEventListenerInitState(final GLEventListener listener, final boolean initialized) {
helper.setGLEventListenerInitState(listener, initialized);
}
@Override
- public GLEventListener disposeGLEventListener(GLEventListener listener, boolean remove) {
+ public GLEventListener disposeGLEventListener(final GLEventListener listener, final boolean remove) {
final DisposeGLEventListenerAction r = new DisposeGLEventListenerAction(listener, remove);
if (EventQueue.isDispatchThread()) {
r.run();
@@ -906,7 +907,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
// so do everything on the event dispatch thread
try {
EventQueue.invokeAndWait(r);
- } catch (Exception e) {
+ } catch (final Exception e) {
throw new GLException(e);
}
}
@@ -914,12 +915,12 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public GLEventListener removeGLEventListener(GLEventListener listener) {
+ public GLEventListener removeGLEventListener(final GLEventListener listener) {
return helper.removeGLEventListener(listener);
}
@Override
- public void setAnimator(GLAnimatorControl animatorControl) {
+ public void setAnimator(final GLAnimatorControl animatorControl) {
helper.setAnimator(animatorControl);
}
@@ -929,7 +930,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public final Thread setExclusiveContextThread(Thread t) throws GLException {
+ public final Thread setExclusiveContextThread(final Thread t) throws GLException {
return helper.setExclusiveContextThread(t, getContext());
}
@@ -939,7 +940,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public boolean invoke(boolean wait, GLRunnable glRunnable) {
+ public boolean invoke(final boolean wait, final GLRunnable glRunnable) {
return helper.invoke(this, wait, glRunnable);
}
@@ -949,7 +950,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public GLContext createContext(GLContext shareWith) {
+ public GLContext createContext(final GLContext shareWith) {
final Backend b = backend;
if ( null == b ) {
return null;
@@ -958,7 +959,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public void setRealized(boolean realized) {
+ public void setRealized(final boolean realized) {
}
@Override
@@ -967,7 +968,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public GLContext setContext(GLContext newCtx, boolean destroyPrevCtx) {
+ public GLContext setContext(final GLContext newCtx, final boolean destroyPrevCtx) {
final Backend b = backend;
if ( null == b ) {
return null;
@@ -1002,13 +1003,13 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
if (Beans.isDesignTime()) {
return null;
}
- GLContext context = getContext();
+ final GLContext context = getContext();
return (context == null) ? null : context.getGL();
}
@Override
- public GL setGL(GL gl) {
- GLContext context = getContext();
+ public GL setGL(final GL gl) {
+ final GLContext context = getContext();
if (context != null) {
context.setGL(gl);
return gl;
@@ -1017,7 +1018,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public void setAutoSwapBufferMode(boolean enable) {
+ public void setAutoSwapBufferMode(final boolean enable) {
this.autoSwapBufferMode = enable;
boolean backendHandlesSwapBuffer = false;
if( isInitialized ) {
@@ -1047,7 +1048,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public void setContextCreationFlags(int flags) {
+ public void setContextCreationFlags(final int flags) {
additionalCtxCreationFlags = flags;
}
@@ -1111,7 +1112,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
* See constraints of {@link #isGLOriented()}.
*
*/
- public final void setSkipGLOrientationVerticalFlip(boolean v) {
+ public final void setSkipGLOrientationVerticalFlip(final boolean v) {
skipGLOrientationVerticalFlip = v;
}
/** See {@link #setSkipGLOrientationVerticalFlip(boolean)}. */
@@ -1186,7 +1187,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
* @param v requested texture unit
* @see #getTextureUnit()
*/
- public final void setTextureUnit(int v) {
+ public final void setTextureUnit(final int v) {
requestedTextureUnit = v;
}
@@ -1244,7 +1245,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public WindowClosingMode setDefaultCloseOperation(WindowClosingMode op) {
+ public WindowClosingMode setDefaultCloseOperation(final WindowClosingMode op) {
return awtWindowClosingProtocol.setDefaultCloseOperation(op);
}
@@ -1265,12 +1266,12 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
class Updater implements GLEventListener {
private Graphics g;
- public void setGraphics(Graphics g) {
+ public void setGraphics(final Graphics g) {
this.g = g;
}
@Override
- public void init(GLAutoDrawable drawable) {
+ public void init(final GLAutoDrawable drawable) {
if (!backend.preGL(g)) {
return;
}
@@ -1279,12 +1280,12 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public void dispose(GLAutoDrawable drawable) {
+ public void dispose(final GLAutoDrawable drawable) {
helper.disposeAllGLEventListener(GLJPanel.this, false);
}
@Override
- public void display(GLAutoDrawable drawable) {
+ public void display(final GLAutoDrawable drawable) {
if (!backend.preGL(g)) {
return;
}
@@ -1300,12 +1301,12 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
backend.postGL(g, true);
}
- public void plainPaint(GLAutoDrawable drawable) {
+ public void plainPaint(final GLAutoDrawable drawable) {
helper.display(GLJPanel.this);
}
@Override
- public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
+ public void reshape(final GLAutoDrawable drawable, final int x, final int y, final int width, final int height) {
// This is handled above and dispatched directly to the appropriate context
}
}
@@ -1329,7 +1330,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
// so we can continue with the destruction.
try {
helper.disposeGL(GLJPanel.this, _context, !backendDestroy);
- } catch (GLException gle) {
+ } catch (final GLException gle) {
gle.printStackTrace();
}
}
@@ -1373,7 +1374,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
private class DisposeGLEventListenerAction implements Runnable {
GLEventListener listener;
private final boolean remove;
- private DisposeGLEventListenerAction(GLEventListener listener, boolean remove) {
+ private DisposeGLEventListenerAction(final GLEventListener listener, final boolean remove) {
this.listener = listener;
this.remove = remove;
}
@@ -1387,8 +1388,8 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
};
- private int getGLInteger(GL gl, int which) {
- int[] tmp = new int[1];
+ private int getGLInteger(final GL gl, final int which) {
+ final int[] tmp = new int[1];
gl.glGetIntegerv(which, tmp, 0);
return tmp[0];
}
@@ -1507,7 +1508,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
// For saving/restoring of OpenGL state during ReadPixels
private final GLPixelStorageModes psm = new GLPixelStorageModes();
- OffscreenBackend(GLProfile glp, AWTGLPixelBufferProvider custom) {
+ OffscreenBackend(final GLProfile glp, final AWTGLPixelBufferProvider custom) {
if(null == custom) {
pixelBufferProvider = getSingleAWTGLPixelBufferProvider();
} else {
@@ -1543,7 +1544,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
if( DEBUG ) {
offscreenDrawable.getNativeSurface().addSurfaceUpdatedListener(new SurfaceUpdatedListener() {
@Override
- public final void surfaceUpdated(Object updater, NativeSurface ns, long when) {
+ public final void surfaceUpdated(final Object updater, final NativeSurface ns, final long when) {
System.err.println(getThreadName()+": OffscreenBackend.swapBuffers - frameCount "+frameCount);
} } );
}
@@ -1577,7 +1578,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
glslTextureRaster = new GLSLTextureRaster(fboDrawable.getTextureUnit(), true);
glslTextureRaster.init(gl.getGL2ES2());
glslTextureRaster.reshape(gl.getGL2ES2(), 0, 0, fboDrawable.getSurfaceWidth(), fboDrawable.getSurfaceHeight());
- } catch (Exception ex) {
+ } catch (final Exception ex) {
ex.printStackTrace();
if(null != glslTextureRaster) {
glslTextureRaster.dispose(gl.getGL2ES2());
@@ -1659,7 +1660,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public final void setOpaque(boolean opaque) {
+ public final void setOpaque(final boolean opaque) {
if ( opaque != isOpaque() && !useSingletonBuffer ) {
pixelBuffer.dispose();
pixelBuffer = null;
@@ -1668,7 +1669,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public final boolean preGL(Graphics g) {
+ public final boolean preGL(final Graphics g) {
// Empty in this implementation
return true;
}
@@ -1687,7 +1688,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public final void postGL(Graphics g, boolean isDisplay) {
+ public final void postGL(final Graphics g, final boolean isDisplay) {
if (isDisplay) {
if(DEBUG) {
System.err.println(getThreadName()+": GLJPanel.OffscreenBackend.postGL.0: - frameCount "+frameCount);
@@ -1871,7 +1872,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public final void doPaintComponent(Graphics g) {
+ public final void doPaintComponent(final Graphics g) {
helper.invokeGL(offscreenDrawable, offscreenContext, updaterDisplayAction, updaterInitAction);
if ( null != alignedImage ) {
@@ -1922,12 +1923,12 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public final GLContext createContext(GLContext shareWith) {
+ public final GLContext createContext(final GLContext shareWith) {
return (null != offscreenDrawable) ? offscreenDrawable.createContext(shareWith) : null;
}
@Override
- public final void setContext(GLContext ctx) {
+ public final void setContext(final GLContext ctx) {
offscreenContext=(GLContextImpl)ctx;
}
@@ -2041,12 +2042,12 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public final void setOpaque(boolean opaque) {
+ public final void setOpaque(final boolean opaque) {
// Empty in this implementation
}
@Override
- public final GLContext createContext(GLContext shareWith) {
+ public final GLContext createContext(final GLContext shareWith) {
if(null != shareWith) {
throw new GLException("J2DOGLBackend cannot create context w/ additional shared context, since it already needs to share the context w/ J2D.");
}
@@ -2054,7 +2055,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public final void setContext(GLContext ctx) {
+ public final void setContext(final GLContext ctx) {
joglContext=ctx;
}
@@ -2090,11 +2091,11 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public final boolean preGL(Graphics g) {
+ public final boolean preGL(final Graphics g) {
final GL2 gl = joglContext.getGL().getGL2();
// Set up needed state in JOGL context from Java2D context
- gl.glEnable(GL2.GL_SCISSOR_TEST);
- Rectangle r = Java2D.getOGLScissorBox(g);
+ gl.glEnable(GL.GL_SCISSOR_TEST);
+ final Rectangle r = Java2D.getOGLScissorBox(g);
if (r == null) {
if (DEBUG) {
@@ -2107,7 +2108,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
gl.glScissor(r.x, r.y, r.width, r.height);
- Rectangle oglViewport = Java2D.getOGLViewport(g, panelWidth, panelHeight);
+ final Rectangle oglViewport = Java2D.getOGLViewport(g, panelWidth, panelHeight);
// If the viewport X or Y changes, in addition to the panel's
// width or height, we need to send a reshape operation to the
// client
@@ -2132,13 +2133,13 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
// The texture target for Java2D's OpenGL pipeline when using FBOs
// -- either GL_TEXTURE_2D or GL_TEXTURE_RECTANGLE_ARB
- int fboTextureTarget = Java2D.getOGLTextureType(g);
+ final int fboTextureTarget = Java2D.getOGLTextureType(g);
if (!checkedForFBObjectWorkarounds) {
checkedForFBObjectWorkarounds = true;
gl.glBindTexture(fboTextureTarget, 0);
- gl.glBindFramebuffer(GL2.GL_FRAMEBUFFER, frameBuffer[0]);
- int status = gl.glCheckFramebufferStatus(GL.GL_FRAMEBUFFER);
+ gl.glBindFramebuffer(GL.GL_FRAMEBUFFER, frameBuffer[0]);
+ final int status = gl.glCheckFramebufferStatus(GL.GL_FRAMEBUFFER);
if (status != GL.GL_FRAMEBUFFER_COMPLETE) {
// Need to do workarounds
fbObjectWorkarounds = true;
@@ -2168,10 +2169,10 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
gl.glBindTexture(fboTextureTarget, frameBufferTexture[0]);
- int[] width = new int[1];
- int[] height = new int[1];
- gl.glGetTexLevelParameteriv(fboTextureTarget, 0, GL2.GL_TEXTURE_WIDTH, width, 0);
- gl.glGetTexLevelParameteriv(fboTextureTarget, 0, GL2.GL_TEXTURE_HEIGHT, height, 0);
+ final int[] width = new int[1];
+ final int[] height = new int[1];
+ gl.glGetTexLevelParameteriv(fboTextureTarget, 0, GL2GL3.GL_TEXTURE_WIDTH, width, 0);
+ gl.glGetTexLevelParameteriv(fboTextureTarget, 0, GL2GL3.GL_TEXTURE_HEIGHT, height, 0);
gl.glGenRenderbuffers(1, frameBufferDepthBuffer, 0);
if (DEBUG) {
@@ -2181,9 +2182,9 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
gl.glBindRenderbuffer(GL.GL_RENDERBUFFER, frameBufferDepthBuffer[0]);
// FIXME: may need a loop here like in Java2D
- gl.glRenderbufferStorage(GL.GL_RENDERBUFFER, GL2GL3.GL_DEPTH_COMPONENT24, width[0], height[0]);
+ gl.glRenderbufferStorage(GL.GL_RENDERBUFFER, GL.GL_DEPTH_COMPONENT24, width[0], height[0]);
- gl.glBindRenderbuffer(GL2.GL_RENDERBUFFER, 0);
+ gl.glBindRenderbuffer(GL.GL_RENDERBUFFER, 0);
createNewDepthBuffer = false;
}
@@ -2207,7 +2208,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
if (DEBUG) {
- int status = gl.glCheckFramebufferStatus(GL.GL_FRAMEBUFFER);
+ final int status = gl.glCheckFramebufferStatus(GL.GL_FRAMEBUFFER);
if (status != GL.GL_FRAMEBUFFER_COMPLETE) {
throw new GLException("Error: framebuffer was incomplete: status = 0x" +
Integer.toHexString(status));
@@ -2240,11 +2241,11 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
@Override
- public final void postGL(Graphics g, boolean isDisplay) {
+ public final void postGL(final Graphics g, final boolean isDisplay) {
// Cause OpenGL pipeline to flush its results because
// otherwise it's possible we will buffer up multiple frames'
// rendering results, resulting in apparent mouse lag
- GL gl = joglContext.getGL();
+ final GL gl = joglContext.getGL();
gl.glFinish();
if (Java2D.isFBOEnabled() &&
@@ -2308,7 +2309,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
// FIXME: add more checks?
j2dContext.makeCurrent();
- GL gl = j2dContext.getGL();
+ final GL gl = j2dContext.getGL();
if ((getGLInteger(gl, GL.GL_RED_BITS) < offscreenCaps.getRedBits()) ||
(getGLInteger(gl, GL.GL_GREEN_BITS) < offscreenCaps.getGreenBits()) ||
(getGLInteger(gl, GL.GL_BLUE_BITS) < offscreenCaps.getBlueBits()) ||
@@ -2346,7 +2347,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
try {
captureJ2DState(j2dContext.getGL(), g);
- Object curSurface = Java2D.getOGLSurfaceIdentifier(g);
+ final Object curSurface = Java2D.getOGLSurfaceIdentifier(g);
if (curSurface != null) {
if (j2dSurface != curSurface) {
if (joglContext != null) {
@@ -2362,7 +2363,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
j2dSurface = curSurface;
if (DEBUG) {
System.err.print(getThreadName()+": Surface type: ");
- int surfaceType = Java2D.getOGLSurfaceType(g);
+ final int surfaceType = Java2D.getOGLSurfaceType(g);
if (surfaceType == Java2D.UNDEFINED) {
System.err.println("UNDEFINED");
} else if (surfaceType == Java2D.WINDOW) {
@@ -2381,7 +2382,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
}
if (joglContext == null) {
- AbstractGraphicsDevice device = j2dContext.getGLDrawable().getNativeSurface().getGraphicsConfiguration().getScreen().getDevice();
+ final AbstractGraphicsDevice device = j2dContext.getGLDrawable().getNativeSurface().getGraphicsConfiguration().getScreen().getDevice();
if (factory.canCreateExternalGLDrawable(device)) {
joglDrawable = factory.createExternalGLDrawable();
joglContext = joglDrawable.createContext(j2dContext);
@@ -2410,9 +2411,9 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
helper.invokeGL(joglDrawable, joglContext, updaterPlainDisplayAction, updaterInitAction);
}
- private final void captureJ2DState(GL gl, Graphics g) {
- gl.glGetIntegerv(GL2.GL_DRAW_BUFFER, drawBuffer, 0);
- gl.glGetIntegerv(GL2.GL_READ_BUFFER, readBuffer, 0);
+ private final void captureJ2DState(final GL gl, final Graphics g) {
+ gl.glGetIntegerv(GL2GL3.GL_DRAW_BUFFER, drawBuffer, 0);
+ gl.glGetIntegerv(GL2ES3.GL_READ_BUFFER, readBuffer, 0);
if (Java2D.isFBOEnabled() &&
Java2D.getOGLSurfaceType(g) == Java2D.FBOBJECT) {
gl.glGetIntegerv(GL.GL_FRAMEBUFFER_BINDING, frameBuffer, 0);
@@ -2446,7 +2447,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
if (!checkedGLVendor) {
checkedGLVendor = true;
- String vendor = gl.glGetString(GL.GL_VENDOR);
+ final String vendor = gl.glGetString(GL.GL_VENDOR);
if ((vendor != null) &&
vendor.startsWith("ATI")) {
diff --git a/src/jogl/classes/javax/media/opengl/fixedfunc/GLPointerFuncUtil.java b/src/jogl/classes/javax/media/opengl/fixedfunc/GLPointerFuncUtil.java
index 9bd644223..3264062e8 100644
--- a/src/jogl/classes/javax/media/opengl/fixedfunc/GLPointerFuncUtil.java
+++ b/src/jogl/classes/javax/media/opengl/fixedfunc/GLPointerFuncUtil.java
@@ -39,7 +39,7 @@ public class GLPointerFuncUtil {
* @param glArrayIndex the fixed function array index
* @return default fixed function array name
*/
- public static String getPredefinedArrayIndexName(int glArrayIndex) {
+ public static String getPredefinedArrayIndexName(final int glArrayIndex) {
return getPredefinedArrayIndexName(glArrayIndex, -1);
}
@@ -48,7 +48,7 @@ public class GLPointerFuncUtil {
* @param multiTexCoordIndex index for multiTexCoordIndex
* @return default fixed function array name
*/
- public static String getPredefinedArrayIndexName(int glArrayIndex, int multiTexCoordIndex) {
+ public static String getPredefinedArrayIndexName(final int glArrayIndex, final int multiTexCoordIndex) {
switch(glArrayIndex) {
case GLPointerFunc.GL_VERTEX_ARRAY:
return mgl_Vertex;
diff --git a/src/jogl/classes/javax/media/opengl/glu/GLUtessellatorCallbackAdapter.java b/src/jogl/classes/javax/media/opengl/glu/GLUtessellatorCallbackAdapter.java
index 15a7bb2a1..c293fbe18 100644
--- a/src/jogl/classes/javax/media/opengl/glu/GLUtessellatorCallbackAdapter.java
+++ b/src/jogl/classes/javax/media/opengl/glu/GLUtessellatorCallbackAdapter.java
@@ -65,32 +65,32 @@ package javax.media.opengl.glu;
public class GLUtessellatorCallbackAdapter implements GLUtessellatorCallback {
@Override
- public void begin(int type) {}
+ public void begin(final int type) {}
@Override
- public void edgeFlag(boolean boundaryEdge) {}
+ public void edgeFlag(final boolean boundaryEdge) {}
@Override
- public void vertex(Object vertexData) {}
+ public void vertex(final Object vertexData) {}
@Override
public void end() {}
// public void mesh(jogamp.opengl.tessellator.GLUmesh mesh) {}
@Override
- public void error(int errnum) {}
+ public void error(final int errnum) {}
@Override
- public void combine(double[] coords, Object[] data,
- float[] weight, Object[] outData) {}
+ public void combine(final double[] coords, final Object[] data,
+ final float[] weight, final Object[] outData) {}
@Override
- public void beginData(int type, Object polygonData) {}
+ public void beginData(final int type, final Object polygonData) {}
@Override
- public void edgeFlagData(boolean boundaryEdge,
- Object polygonData) {}
+ public void edgeFlagData(final boolean boundaryEdge,
+ final Object polygonData) {}
@Override
- public void vertexData(Object vertexData, Object polygonData) {}
+ public void vertexData(final Object vertexData, final Object polygonData) {}
@Override
- public void endData(Object polygonData) {}
+ public void endData(final Object polygonData) {}
@Override
- public void errorData(int errnum, Object polygonData) {}
+ public void errorData(final int errnum, final Object polygonData) {}
@Override
- public void combineData(double[] coords, Object[] data,
- float[] weight, Object[] outData,
- Object polygonData) {}
+ public void combineData(final double[] coords, final Object[] data,
+ final float[] weight, final Object[] outData,
+ final Object polygonData) {}
}
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PMSAAES2.java b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PMSAAES2.java
index b56a69b28..118c9b136 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PMSAAES2.java
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PMSAAES2.java
@@ -142,16 +142,16 @@ public class VBORegion2PMSAAES2 extends GLRegion {
final int initialElementCount = 256;
// Pass 1:
- indicesBuffer = GLArrayDataServer.createData(3, GL2ES2.GL_SHORT, initialElementCount, GL.GL_STATIC_DRAW, GL.GL_ELEMENT_ARRAY_BUFFER);
+ indicesBuffer = GLArrayDataServer.createData(3, GL.GL_SHORT, initialElementCount, GL.GL_STATIC_DRAW, GL.GL_ELEMENT_ARRAY_BUFFER);
- gca_VerticesAttr = GLArrayDataServer.createGLSL(AttributeNames.VERTEX_ATTR_NAME, 3, GL2ES2.GL_FLOAT,
+ gca_VerticesAttr = GLArrayDataServer.createGLSL(AttributeNames.VERTEX_ATTR_NAME, 3, GL.GL_FLOAT,
false, initialElementCount, GL.GL_STATIC_DRAW);
- gca_CurveParamsAttr = GLArrayDataServer.createGLSL(AttributeNames.CURVEPARAMS_ATTR_NAME, 3, GL2ES2.GL_FLOAT,
+ gca_CurveParamsAttr = GLArrayDataServer.createGLSL(AttributeNames.CURVEPARAMS_ATTR_NAME, 3, GL.GL_FLOAT,
false, initialElementCount, GL.GL_STATIC_DRAW);
if( hasColorChannel() ) {
- gca_ColorsAttr = GLArrayDataServer.createGLSL(AttributeNames.COLOR_ATTR_NAME, 4, GL2ES2.GL_FLOAT,
+ gca_ColorsAttr = GLArrayDataServer.createGLSL(AttributeNames.COLOR_ATTR_NAME, 4, GL.GL_FLOAT,
false, initialElementCount, GL.GL_STATIC_DRAW);
} else {
gca_ColorsAttr = null;
@@ -173,12 +173,12 @@ public class VBORegion2PMSAAES2 extends GLRegion {
// Pass 2:
gcu_FboTexUnit = new GLUniformData(UniformNames.gcu_FboTexUnit, pass2TexUnit);
- indicesFbo = GLArrayDataServer.createData(3, GL2ES2.GL_SHORT, 2, GL.GL_STATIC_DRAW, GL.GL_ELEMENT_ARRAY_BUFFER);
+ indicesFbo = GLArrayDataServer.createData(3, GL.GL_SHORT, 2, GL.GL_STATIC_DRAW, GL.GL_ELEMENT_ARRAY_BUFFER);
indicesFbo.puts((short) 0); indicesFbo.puts((short) 1); indicesFbo.puts((short) 3);
indicesFbo.puts((short) 1); indicesFbo.puts((short) 2); indicesFbo.puts((short) 3);
indicesFbo.seal(true);
- gca_FboTexCoordsAttr = GLArrayDataServer.createGLSL(AttributeNames.FBO_TEXCOORDS_ATTR_NAME, 2, GL2ES2.GL_FLOAT,
+ gca_FboTexCoordsAttr = GLArrayDataServer.createGLSL(AttributeNames.FBO_TEXCOORDS_ATTR_NAME, 2, GL.GL_FLOAT,
false, 4, GL.GL_STATIC_DRAW);
gca_FboTexCoordsAttr.putf(0); gca_FboTexCoordsAttr.putf(0);
gca_FboTexCoordsAttr.putf(0); gca_FboTexCoordsAttr.putf(1);
@@ -186,7 +186,7 @@ public class VBORegion2PMSAAES2 extends GLRegion {
gca_FboTexCoordsAttr.putf(1); gca_FboTexCoordsAttr.putf(0);
gca_FboTexCoordsAttr.seal(true);
- gca_FboVerticesAttr = GLArrayDataServer.createGLSL(AttributeNames.FBO_VERTEX_ATTR_NAME, 3, GL2ES2.GL_FLOAT,
+ gca_FboVerticesAttr = GLArrayDataServer.createGLSL(AttributeNames.FBO_VERTEX_ATTR_NAME, 3, GL.GL_FLOAT,
false, 4, GL.GL_STATIC_DRAW);
}
@@ -234,7 +234,7 @@ public class VBORegion2PMSAAES2 extends GLRegion {
}
@Override
- protected final void pushIndex(int idx) {
+ protected final void pushIndex(final int idx) {
indicesBuffer.puts((short)idx);
}
@@ -432,7 +432,7 @@ public class VBORegion2PMSAAES2 extends GLRegion {
gca_FboTexCoordsAttr.enableBuffer(gl, true);
indicesFbo.bindBuffer(gl, true); // keeps VBO binding
- gl.glDrawElements(GL2ES2.GL_TRIANGLES, indicesFbo.getElementCount() * indicesFbo.getComponentCount(), GL2ES2.GL_UNSIGNED_SHORT, 0);
+ gl.glDrawElements(GL.GL_TRIANGLES, indicesFbo.getElementCount() * indicesFbo.getComponentCount(), GL.GL_UNSIGNED_SHORT, 0);
indicesFbo.bindBuffer(gl, false);
gca_FboTexCoordsAttr.enableBuffer(gl, false);
@@ -463,7 +463,7 @@ public class VBORegion2PMSAAES2 extends GLRegion {
ssink.reset(gl, fboWidth, fboHeight);
// FIXME: shall not use bilinear (GL_LINEAR), due to MSAA ???
// ssink.attachTexture2D(gl, 0, true, GL2ES2.GL_LINEAR, GL2ES2.GL_LINEAR, GL2ES2.GL_CLAMP_TO_EDGE, GL2ES2.GL_CLAMP_TO_EDGE);
- ssink.attachTexture2D(gl, 0, true, GL2ES2.GL_NEAREST, GL2ES2.GL_NEAREST, GL2ES2.GL_CLAMP_TO_EDGE, GL2ES2.GL_CLAMP_TO_EDGE);
+ ssink.attachTexture2D(gl, 0, true, GL.GL_NEAREST, GL.GL_NEAREST, GL.GL_CLAMP_TO_EDGE, GL.GL_CLAMP_TO_EDGE);
if( !blendingEnabled ) {
// no depth-buffer w/ blending
ssink.attachRenderbuffer(gl, Attachment.Type.DEPTH, 24);
@@ -489,7 +489,7 @@ public class VBORegion2PMSAAES2 extends GLRegion {
gl.glViewport(0, 0, fboWidth, fboHeight);
if( blendingEnabled ) {
gl.glClearColor(0f, 0f, 0f, 0.0f);
- gl.glClear(GL2ES2.GL_COLOR_BUFFER_BIT); // no depth-buffer w/ blending
+ gl.glClear(GL.GL_COLOR_BUFFER_BIT); // no depth-buffer w/ blending
// For already pre-multiplied alpha values, use:
// gl.glBlendFunc(GL.GL_ONE, GL.GL_ONE_MINUS_SRC_ALPHA);
@@ -500,7 +500,7 @@ public class VBORegion2PMSAAES2 extends GLRegion {
gl.glDisable(GL.GL_DEPTH_TEST);
}
} else {
- gl.glClear(GL2ES2.GL_COLOR_BUFFER_BIT | GL2ES2.GL_DEPTH_BUFFER_BIT);
+ gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
}
renderRegion(gl);
@@ -526,10 +526,10 @@ public class VBORegion2PMSAAES2 extends GLRegion {
gcu_ColorTexUnit.setData(colorTexSeq.getTextureUnit());
gl.glUniform(gcu_ColorTexUnit); // Always update, since program maybe used by multiple regions
gl.glUniform(gcu_ColorTexBBox); // Always update, since program maybe used by multiple regions
- gl.glDrawElements(GL2ES2.GL_TRIANGLES, indicesBuffer.getElementCount() * indicesBuffer.getComponentCount(), GL2ES2.GL_UNSIGNED_SHORT, 0);
+ gl.glDrawElements(GL.GL_TRIANGLES, indicesBuffer.getElementCount() * indicesBuffer.getComponentCount(), GL.GL_UNSIGNED_SHORT, 0);
tex.disable(gl); // nop on core
} else {
- gl.glDrawElements(GL2ES2.GL_TRIANGLES, indicesBuffer.getElementCount() * indicesBuffer.getComponentCount(), GL2ES2.GL_UNSIGNED_SHORT, 0);
+ gl.glDrawElements(GL.GL_TRIANGLES, indicesBuffer.getElementCount() * indicesBuffer.getComponentCount(), GL.GL_UNSIGNED_SHORT, 0);
}
indicesBuffer.bindBuffer(gl, false);
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java
index 861d889c1..8f75e7115 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java
@@ -37,6 +37,7 @@ import jogamp.graph.curve.opengl.shader.AttributeNames;
import jogamp.graph.curve.opengl.shader.UniformNames;
import jogamp.opengl.Debug;
+import com.jogamp.common.util.PropertyAccess;
import com.jogamp.graph.curve.Region;
import com.jogamp.graph.curve.opengl.GLRegion;
import com.jogamp.graph.curve.opengl.RegionRenderer;
@@ -79,7 +80,7 @@ public class VBORegion2PVBAAES2 extends GLRegion {
static {
Debug.initSingleton();
final String key = "jogl.debug.graph.curve.vbaa.resizeLowerBoundary";
- RESIZE_BOUNDARY = Math.max(0, Debug.getIntProperty(key, true, 0));
+ RESIZE_BOUNDARY = Math.max(0, PropertyAccess.getIntProperty(key, true, 0));
if( RESIZE_BOUNDARY > 0 ) {
System.err.println("key: "+RESIZE_BOUNDARY);
}
@@ -178,15 +179,15 @@ public class VBORegion2PVBAAES2 extends GLRegion {
final int initialElementCount = 256;
// Pass 1:
- indicesBuffer = GLArrayDataServer.createData(3, GL2ES2.GL_SHORT, initialElementCount, GL.GL_STATIC_DRAW, GL.GL_ELEMENT_ARRAY_BUFFER);
+ indicesBuffer = GLArrayDataServer.createData(3, GL.GL_SHORT, initialElementCount, GL.GL_STATIC_DRAW, GL.GL_ELEMENT_ARRAY_BUFFER);
- gca_VerticesAttr = GLArrayDataServer.createGLSL(AttributeNames.VERTEX_ATTR_NAME, 3, GL2ES2.GL_FLOAT,
+ gca_VerticesAttr = GLArrayDataServer.createGLSL(AttributeNames.VERTEX_ATTR_NAME, 3, GL.GL_FLOAT,
false, initialElementCount, GL.GL_STATIC_DRAW);
- gca_CurveParamsAttr = GLArrayDataServer.createGLSL(AttributeNames.CURVEPARAMS_ATTR_NAME, 3, GL2ES2.GL_FLOAT,
+ gca_CurveParamsAttr = GLArrayDataServer.createGLSL(AttributeNames.CURVEPARAMS_ATTR_NAME, 3, GL.GL_FLOAT,
false, initialElementCount, GL.GL_STATIC_DRAW);
if( hasColorChannel() ) {
- gca_ColorsAttr = GLArrayDataServer.createGLSL(AttributeNames.COLOR_ATTR_NAME, 4, GL2ES2.GL_FLOAT,
+ gca_ColorsAttr = GLArrayDataServer.createGLSL(AttributeNames.COLOR_ATTR_NAME, 4, GL.GL_FLOAT,
false, initialElementCount, GL.GL_STATIC_DRAW);
} else {
gca_ColorsAttr = null;
@@ -209,12 +210,12 @@ public class VBORegion2PVBAAES2 extends GLRegion {
gcu_FboTexUnit = new GLUniformData(UniformNames.gcu_FboTexUnit, pass2TexUnit);
gcu_FboTexSize = new GLUniformData(UniformNames.gcu_FboTexSize, 2, FloatBuffer.wrap(new float[2]));
- indicesFbo = GLArrayDataServer.createData(3, GL2ES2.GL_SHORT, 2, GL.GL_STATIC_DRAW, GL.GL_ELEMENT_ARRAY_BUFFER);
+ indicesFbo = GLArrayDataServer.createData(3, GL.GL_SHORT, 2, GL.GL_STATIC_DRAW, GL.GL_ELEMENT_ARRAY_BUFFER);
indicesFbo.puts((short) 0); indicesFbo.puts((short) 1); indicesFbo.puts((short) 3);
indicesFbo.puts((short) 1); indicesFbo.puts((short) 2); indicesFbo.puts((short) 3);
indicesFbo.seal(true);
- gca_FboTexCoordsAttr = GLArrayDataServer.createGLSL(AttributeNames.FBO_TEXCOORDS_ATTR_NAME, 2, GL2ES2.GL_FLOAT,
+ gca_FboTexCoordsAttr = GLArrayDataServer.createGLSL(AttributeNames.FBO_TEXCOORDS_ATTR_NAME, 2, GL.GL_FLOAT,
false, 4, GL.GL_STATIC_DRAW);
gca_FboTexCoordsAttr.putf(0); gca_FboTexCoordsAttr.putf(0);
gca_FboTexCoordsAttr.putf(0); gca_FboTexCoordsAttr.putf(1);
@@ -222,7 +223,7 @@ public class VBORegion2PVBAAES2 extends GLRegion {
gca_FboTexCoordsAttr.putf(1); gca_FboTexCoordsAttr.putf(0);
gca_FboTexCoordsAttr.seal(true);
- gca_FboVerticesAttr = GLArrayDataServer.createGLSL(AttributeNames.FBO_VERTEX_ATTR_NAME, 3, GL2ES2.GL_FLOAT,
+ gca_FboVerticesAttr = GLArrayDataServer.createGLSL(AttributeNames.FBO_VERTEX_ATTR_NAME, 3, GL.GL_FLOAT,
false, 4, GL.GL_STATIC_DRAW);
}
@@ -274,7 +275,7 @@ public class VBORegion2PVBAAES2 extends GLRegion {
}
@Override
- protected final void pushIndex(int idx) {
+ protected final void pushIndex(final int idx) {
indicesBuffer.puts((short)idx);
}
@@ -549,7 +550,7 @@ public class VBORegion2PVBAAES2 extends GLRegion {
gca_FboTexCoordsAttr.enableBuffer(gl, true);
indicesFbo.bindBuffer(gl, true); // keeps VBO binding
- gl.glDrawElements(GL2ES2.GL_TRIANGLES, indicesFbo.getElementCount() * indicesFbo.getComponentCount(), GL2ES2.GL_UNSIGNED_SHORT, 0);
+ gl.glDrawElements(GL.GL_TRIANGLES, indicesFbo.getElementCount() * indicesFbo.getComponentCount(), GL.GL_UNSIGNED_SHORT, 0);
indicesFbo.bindBuffer(gl, false);
gca_FboTexCoordsAttr.enableBuffer(gl, false);
@@ -581,7 +582,7 @@ public class VBORegion2PVBAAES2 extends GLRegion {
// Shall not use bilinear (GL_LINEAR), due to own VBAA. Result is smooth w/o it now!
// FIXME: FXAA requires bilinear filtering!
// texA = fbo.attachTexture2D(gl, 0, true, GL2ES2.GL_LINEAR, GL2ES2.GL_LINEAR, GL2ES2.GL_CLAMP_TO_EDGE, GL2ES2.GL_CLAMP_TO_EDGE);
- texA = fbo.attachTexture2D(gl, 0, true, GL2ES2.GL_NEAREST, GL2ES2.GL_NEAREST, GL2ES2.GL_CLAMP_TO_EDGE, GL2ES2.GL_CLAMP_TO_EDGE);
+ texA = fbo.attachTexture2D(gl, 0, true, GL.GL_NEAREST, GL.GL_NEAREST, GL.GL_CLAMP_TO_EDGE, GL.GL_CLAMP_TO_EDGE);
if( !blendingEnabled ) {
// no depth-buffer w/ blending
fbo.attachRenderbuffer(gl, Attachment.Type.DEPTH, 24);
@@ -610,14 +611,14 @@ public class VBORegion2PVBAAES2 extends GLRegion {
gl.glViewport(0, 0, fboWidth, fboHeight);
if( blendingEnabled ) {
gl.glClearColor(0f, 0f, 0f, 0.0f);
- gl.glClear(GL2ES2.GL_COLOR_BUFFER_BIT); // no depth-buffer w/ blending
+ gl.glClear(GL.GL_COLOR_BUFFER_BIT); // no depth-buffer w/ blending
// For already pre-multiplied alpha values, use:
// gl.glBlendFunc(GL.GL_ONE, GL.GL_ONE_MINUS_SRC_ALPHA);
// Multiply RGB w/ Alpha, preserve alpha for renderFBO(..)
gl.glBlendFuncSeparate(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA, GL.GL_ONE, GL.GL_ONE_MINUS_SRC_ALPHA);
} else {
- gl.glClear(GL2ES2.GL_COLOR_BUFFER_BIT | GL2ES2.GL_DEPTH_BUFFER_BIT);
+ gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
}
renderRegion(gl);
@@ -644,10 +645,10 @@ public class VBORegion2PVBAAES2 extends GLRegion {
gcu_ColorTexUnit.setData(colorTexSeq.getTextureUnit());
gl.glUniform(gcu_ColorTexUnit); // Always update, since program maybe used by multiple regions
gl.glUniform(gcu_ColorTexBBox); // Always update, since program maybe used by multiple regions
- gl.glDrawElements(GL2ES2.GL_TRIANGLES, indicesBuffer.getElementCount() * indicesBuffer.getComponentCount(), GL2ES2.GL_UNSIGNED_SHORT, 0);
+ gl.glDrawElements(GL.GL_TRIANGLES, indicesBuffer.getElementCount() * indicesBuffer.getComponentCount(), GL.GL_UNSIGNED_SHORT, 0);
tex.disable(gl); // nop on core
} else {
- gl.glDrawElements(GL2ES2.GL_TRIANGLES, indicesBuffer.getElementCount() * indicesBuffer.getComponentCount(), GL2ES2.GL_UNSIGNED_SHORT, 0);
+ gl.glDrawElements(GL.GL_TRIANGLES, indicesBuffer.getElementCount() * indicesBuffer.getComponentCount(), GL.GL_UNSIGNED_SHORT, 0);
}
indicesBuffer.bindBuffer(gl, false);
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java
index 8265b014a..46e991866 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java
@@ -64,16 +64,16 @@ public class VBORegionSPES2 extends GLRegion {
rsLocal = new RenderState.ProgramLocal();
final int initialElementCount = 256;
- indicesBuffer = GLArrayDataServer.createData(3, GL2ES2.GL_SHORT, initialElementCount, GL.GL_STATIC_DRAW, GL.GL_ELEMENT_ARRAY_BUFFER);
+ indicesBuffer = GLArrayDataServer.createData(3, GL.GL_SHORT, initialElementCount, GL.GL_STATIC_DRAW, GL.GL_ELEMENT_ARRAY_BUFFER);
- gca_VerticesAttr = GLArrayDataServer.createGLSL(AttributeNames.VERTEX_ATTR_NAME, 3, GL2ES2.GL_FLOAT,
+ gca_VerticesAttr = GLArrayDataServer.createGLSL(AttributeNames.VERTEX_ATTR_NAME, 3, GL.GL_FLOAT,
false, initialElementCount, GL.GL_STATIC_DRAW);
- gca_CurveParamsAttr = GLArrayDataServer.createGLSL(AttributeNames.CURVEPARAMS_ATTR_NAME, 3, GL2ES2.GL_FLOAT,
+ gca_CurveParamsAttr = GLArrayDataServer.createGLSL(AttributeNames.CURVEPARAMS_ATTR_NAME, 3, GL.GL_FLOAT,
false, initialElementCount, GL.GL_STATIC_DRAW);
if( hasColorChannel() ) {
- gca_ColorsAttr = GLArrayDataServer.createGLSL(AttributeNames.COLOR_ATTR_NAME, 4, GL2ES2.GL_FLOAT,
+ gca_ColorsAttr = GLArrayDataServer.createGLSL(AttributeNames.COLOR_ATTR_NAME, 4, GL.GL_FLOAT,
false, initialElementCount, GL.GL_STATIC_DRAW);
} else {
gca_ColorsAttr = null;
@@ -135,7 +135,7 @@ public class VBORegionSPES2 extends GLRegion {
}
@Override
- protected final void pushIndex(int idx) {
+ protected final void pushIndex(final int idx) {
indicesBuffer.puts((short)idx);
}
@@ -244,10 +244,10 @@ public class VBORegionSPES2 extends GLRegion {
gcu_ColorTexUnit.setData(colorTexSeq.getTextureUnit());
gl.glUniform(gcu_ColorTexUnit); // Always update, since program maybe used by multiple regions
gl.glUniform(gcu_ColorTexBBox); // Always update, since program maybe used by multiple regions
- gl.glDrawElements(GL2ES2.GL_TRIANGLES, indicesBuffer.getElementCount() * indicesBuffer.getComponentCount(), GL2ES2.GL_UNSIGNED_SHORT, 0);
+ gl.glDrawElements(GL.GL_TRIANGLES, indicesBuffer.getElementCount() * indicesBuffer.getComponentCount(), GL.GL_UNSIGNED_SHORT, 0);
tex.disable(gl); // nop on core
} else {
- gl.glDrawElements(GL2ES2.GL_TRIANGLES, indicesBuffer.getElementCount() * indicesBuffer.getComponentCount(), GL2ES2.GL_UNSIGNED_SHORT, 0);
+ gl.glDrawElements(GL.GL_TRIANGLES, indicesBuffer.getElementCount() * indicesBuffer.getComponentCount(), GL.GL_UNSIGNED_SHORT, 0);
}
indicesBuffer.bindBuffer(gl, false);
diff --git a/src/jogl/classes/jogamp/graph/curve/tess/CDTriangulator2D.java b/src/jogl/classes/jogamp/graph/curve/tess/CDTriangulator2D.java
index d2cfa42a1..4473d040f 100644
--- a/src/jogl/classes/jogamp/graph/curve/tess/CDTriangulator2D.java
+++ b/src/jogl/classes/jogamp/graph/curve/tess/CDTriangulator2D.java
@@ -100,7 +100,7 @@ public class CDTriangulator2D implements Triangulator {
}
@Override
- public final void generate(List sink) {
+ public final void generate(final List sink) {
final int loopsSize = loops.size();
for(int i=0;i vertices = polyline.getVertices();
for(int i=0; i < loops.size(); i++) {
final Loop loop = loops.get(i);
diff --git a/src/jogl/classes/jogamp/graph/curve/tess/GraphOutline.java b/src/jogl/classes/jogamp/graph/curve/tess/GraphOutline.java
index 2e8d4f58f..81e6efdad 100644
--- a/src/jogl/classes/jogamp/graph/curve/tess/GraphOutline.java
+++ b/src/jogl/classes/jogamp/graph/curve/tess/GraphOutline.java
@@ -44,9 +44,9 @@ public class GraphOutline {
* the curve pieces can be identified by onCurve flag
* of each cp the control polyline is open by default
*/
- public GraphOutline(Outline ol){
+ public GraphOutline(final Outline ol){
this.outline = ol;
- ArrayList vertices = this.outline.getVertices();
+ final ArrayList vertices = this.outline.getVertices();
for(int i = 0; i< vertices.size(); i++){
this.controlpoints.add(new GraphVertex(vertices.get(i)));
}
@@ -64,7 +64,7 @@ public class GraphOutline {
return outline.getVertices();
}
- public void addVertex(GraphVertex v) {
+ public void addVertex(final GraphVertex v) {
controlpoints.add(v);
outline.addVertex(v.getPoint());
}
diff --git a/src/jogl/classes/jogamp/graph/curve/tess/GraphVertex.java b/src/jogl/classes/jogamp/graph/curve/tess/GraphVertex.java
index 89ad3edf1..391e71011 100644
--- a/src/jogl/classes/jogamp/graph/curve/tess/GraphVertex.java
+++ b/src/jogl/classes/jogamp/graph/curve/tess/GraphVertex.java
@@ -36,7 +36,7 @@ public class GraphVertex {
private ArrayList edges = null;
private boolean boundaryContained = false;
- public GraphVertex(Vertex point) {
+ public GraphVertex(final Vertex point) {
this.point = point;
}
@@ -59,7 +59,7 @@ public class GraphVertex {
return point.getCoord();
}
- public void setPoint(Vertex point) {
+ public void setPoint(final Vertex point) {
this.point = point;
}
@@ -67,17 +67,17 @@ public class GraphVertex {
return edges;
}
- public void setEdges(ArrayList edges) {
+ public void setEdges(final ArrayList edges) {
this.edges = edges;
}
- public void addEdge(HEdge edge){
+ public void addEdge(final HEdge edge){
if(edges == null){
edges = new ArrayList();
}
edges.add(edge);
}
- public void removeEdge(HEdge edge){
+ public void removeEdge(final HEdge edge){
if(edges == null)
return;
edges.remove(edge);
@@ -85,9 +85,9 @@ public class GraphVertex {
edges = null;
}
}
- public HEdge findNextEdge(GraphVertex nextVert){
+ public HEdge findNextEdge(final GraphVertex nextVert){
for(int i=0; i void connect(HEdge first, HEdge next){
+ public static void connect(final HEdge first, final HEdge next){
first.setNext(next);
next.setPrev(first);
}
- public static void makeSiblings(HEdge first, HEdge second){
+ public static void makeSiblings(final HEdge first, final HEdge second){
first.setSibling(second);
second.setSibling(first);
}
diff --git a/src/jogl/classes/jogamp/graph/curve/tess/Loop.java b/src/jogl/classes/jogamp/graph/curve/tess/Loop.java
index 1f038a930..6563219cc 100644
--- a/src/jogl/classes/jogamp/graph/curve/tess/Loop.java
+++ b/src/jogl/classes/jogamp/graph/curve/tess/Loop.java
@@ -40,7 +40,7 @@ public class Loop {
private final AABBox box = new AABBox();
private GraphOutline initialOutline = null;
- public Loop(GraphOutline polyline, VectorUtil.Winding winding){
+ public Loop(final GraphOutline polyline, final VectorUtil.Winding winding){
initialOutline = polyline;
this.root = initFromPolyline(initialOutline, winding);
}
@@ -67,7 +67,7 @@ public class Loop {
final GraphVertex v2 = next1.getGraphPoint();
final GraphVertex v3 = next2.getGraphPoint();
- HEdge v3Edge = new HEdge(v3, HEdge.INNER);
+ final HEdge v3Edge = new HEdge(v3, HEdge.INNER);
HEdge.connect(v3Edge, root);
HEdge.connect(next1, v3Edge);
@@ -94,8 +94,8 @@ public class Loop {
* from the boundary profile
* @param reqWinding requested winding of edges (CCW or CW)
*/
- private HEdge initFromPolyline(GraphOutline outline, VectorUtil.Winding reqWinding){
- ArrayList vertices = outline.getGraphPoint();
+ private HEdge initFromPolyline(final GraphOutline outline, final VectorUtil.Winding reqWinding){
+ final ArrayList vertices = outline.getGraphPoint();
if(vertices.size()<3) {
throw new IllegalArgumentException("outline's vertices < 3: " + vertices.size());
@@ -124,10 +124,10 @@ public class Loop {
}
while(index != max){
- GraphVertex v1 = vertices.get(index);
+ final GraphVertex v1 = vertices.get(index);
box.resize(v1.getX(), v1.getY(), v1.getZ());
- HEdge edge = new HEdge(v1, edgeType);
+ final HEdge edge = new HEdge(v1, edgeType);
v1.addEdge(edge);
if(lastEdge != null) {
@@ -155,15 +155,15 @@ public class Loop {
return firstEdge;
}
- public void addConstraintCurve(GraphOutline polyline) {
+ public void addConstraintCurve(final GraphOutline polyline) {
// GraphOutline outline = new GraphOutline(polyline);
/**needed to generate vertex references.*/
initFromPolyline(polyline, VectorUtil.Winding.CW);
- GraphVertex v3 = locateClosestVertex(polyline);
- HEdge v3Edge = v3.findBoundEdge();
- HEdge v3EdgeP = v3Edge.getPrev();
- HEdge crossEdge = new HEdge(root.getGraphPoint(), HEdge.INNER);
+ final GraphVertex v3 = locateClosestVertex(polyline);
+ final HEdge v3Edge = v3.findBoundEdge();
+ final HEdge v3EdgeP = v3Edge.getPrev();
+ final HEdge crossEdge = new HEdge(root.getGraphPoint(), HEdge.INNER);
HEdge.connect(root.getPrev(), crossEdge);
HEdge.connect(crossEdge, v3Edge);
@@ -184,7 +184,7 @@ public class Loop {
* to search for closestvertices
* @return the vertex that is closest to the newly set root Hedge.
*/
- private GraphVertex locateClosestVertex(GraphOutline polyline) {
+ private GraphVertex locateClosestVertex(final GraphOutline polyline) {
HEdge closestE = null;
GraphVertex closestV = null;
@@ -200,7 +200,7 @@ public class Loop {
final GraphVertex cand = vertices.get(pos);
final float distance = VectorUtil.distVec3(v.getCoord(), cand.getCoord());
if(distance < minDistance){
- for (GraphVertex vert:vertices){
+ for (final GraphVertex vert:vertices){
if(vert == v || vert == nextV || vert == cand)
continue;
inValid = VectorUtil.isInCircleVec2(v.getPoint(), nextV.getPoint(),
@@ -226,19 +226,19 @@ public class Loop {
return closestV;
}
- private HEdge findClosestValidNeighbor(HEdge edge, boolean delaunay) {
- HEdge next = root.getNext();
+ private HEdge findClosestValidNeighbor(final HEdge edge, final boolean delaunay) {
+ final HEdge next = root.getNext();
if(!VectorUtil.ccw(root.getGraphPoint().getPoint(), next.getGraphPoint().getPoint(),
edge.getGraphPoint().getPoint())){
return null;
}
- HEdge candEdge = edge;
+ final HEdge candEdge = edge;
boolean inValid = false;
if(delaunay){
- Vertex cand = candEdge.getGraphPoint().getPoint();
+ final Vertex cand = candEdge.getGraphPoint().getPoint();
HEdge e = candEdge.getNext();
while (e != candEdge){
if(e.getGraphPoint() == root.getGraphPoint()
@@ -269,7 +269,7 @@ public class Loop {
* @param root and edge of this triangle
* @return the triangle iff it satisfies, null otherwise
*/
- private Triangle createTriangle(Vertex v1, Vertex v2, Vertex v3, HEdge rootT){
+ private Triangle createTriangle(final Vertex v1, final Vertex v2, final Vertex v3, final HEdge rootT){
return new Triangle(v1, v2, v3, checkVerticesBoundary(rootT));
}
@@ -287,7 +287,7 @@ public class Loop {
return boundary;
}
- public boolean checkInside(Vertex v) {
+ public boolean checkInside(final Vertex v) {
if(!box.contains(v.getX(), v.getY(), v.getZ())){
return false;
}
@@ -296,8 +296,8 @@ public class Loop {
HEdge current = root;
HEdge next = root.getNext();
do {
- Vertex v2 = current.getGraphPoint().getPoint();
- Vertex v1 = next.getGraphPoint().getPoint();
+ final Vertex v2 = current.getGraphPoint().getPoint();
+ final Vertex v1 = next.getGraphPoint().getPoint();
if ( ((v1.getY() > v.getY()) != (v2.getY() > v.getY())) &&
(v.getX() < (v2.getX() - v1.getX()) * (v.getY() - v1.getY()) / (v2.getY() - v1.getY()) + v1.getX()) ){
diff --git a/src/jogl/classes/jogamp/graph/font/JavaFontLoader.java b/src/jogl/classes/jogamp/graph/font/JavaFontLoader.java
index e3df0af1d..1bb2bb5f3 100644
--- a/src/jogl/classes/jogamp/graph/font/JavaFontLoader.java
+++ b/src/jogl/classes/jogamp/graph/font/JavaFontLoader.java
@@ -78,7 +78,7 @@ public class JavaFontLoader implements FontSet {
}
}
- static boolean is(int bits, int bit) {
+ static boolean is(final int bits, final int bit) {
return 0 != ( bits & bit ) ;
}
@@ -88,7 +88,7 @@ public class JavaFontLoader implements FontSet {
}
@Override
- public Font get(int family, int style) throws IOException {
+ public Font get(final int family, final int style) throws IOException {
Font font = (Font)fontMap.get( ( family << 8 ) | style );
if (font != null) {
return font;
@@ -138,7 +138,7 @@ public class JavaFontLoader implements FontSet {
return font;
}
- Font abspath(String fname, int family, int style) throws IOException {
+ Font abspath(final String fname, final int family, final int style) throws IOException {
if(null == javaFontPath) {
throw new GLException("java font path undefined");
}
@@ -151,7 +151,7 @@ public class JavaFontLoader implements FontSet {
return f;
}
throw new IOException (err);
- } catch (IOException ioe) {
+ } catch (final IOException ioe) {
throw new IOException(err, ioe);
}
}
diff --git a/src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java b/src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java
index c7efe143b..76947873e 100644
--- a/src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java
+++ b/src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java
@@ -76,7 +76,7 @@ public class UbuntuFontLoader implements FontSet {
private UbuntuFontLoader() {
}
- static boolean is(int bits, int bit) {
+ static boolean is(final int bits, final int bit) {
return 0 != ( bits & bit ) ;
}
@@ -86,7 +86,7 @@ public class UbuntuFontLoader implements FontSet {
}
@Override
- public Font get(int family, int style) throws IOException {
+ public Font get(final int family, final int style) throws IOException {
Font font = (Font)fontMap.get( ( family << 8 ) | style );
if (font != null) {
return font;
@@ -132,7 +132,7 @@ public class UbuntuFontLoader implements FontSet {
private static boolean attemptedJARLoading = false;
private static boolean useTempJarCache = false;
- private synchronized Font abspath(String fname, int family, int style) throws IOException {
+ private synchronized Font abspath(final String fname, final int family, final int style) throws IOException {
final String err = "Problem loading font "+fname+", stream "+relFontPath+fname;
final Exception[] privErr = { null };
try {
@@ -150,7 +150,7 @@ public class UbuntuFontLoader implements FontSet {
public Object run() {
try {
TempJarCache.addResources(UbuntuFontLoader.class, uri);
- } catch (Exception e) { privErr[0] = e; }
+ } catch (final Exception e) { privErr[0] = e; }
return null;
} } );
if( null == privErr[0] ) {
@@ -162,7 +162,7 @@ public class UbuntuFontLoader implements FontSet {
}
}
}
- } catch(Exception e) {
+ } catch(final Exception e) {
throw new IOException(err, e);
}
if( null != privErr[0] ) {
@@ -182,7 +182,7 @@ public class UbuntuFontLoader implements FontSet {
try {
final URI uri = TempJarCache.getResource(absFontPath+fname);
privConn[0] = null != uri ? uri.toURL().openConnection() : null;
- } catch (Exception e) { privErr[0] = e; }
+ } catch (final Exception e) { privErr[0] = e; }
return null;
} } );
if( null != privErr[0] ) {
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java
index 5fb61387a..c48ef99ca 100644
--- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java
+++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java
@@ -63,15 +63,15 @@ class TypecastFont implements Font {
// FIXME: Generic attempt to find the best CmapTable,
// which is assumed to be the one with the most entries (stupid 'eh?)
- CmapTable cmapTable = font.getCmapTable();
- CmapFormat[] _cmapFormatP = { null, null, null, null };
+ final CmapTable cmapTable = font.getCmapTable();
+ final CmapFormat[] _cmapFormatP = { null, null, null, null };
int platform = -1;
int platformLength = -1;
int encoding = -1;
for(int i=0; i 0) {
@@ -350,7 +350,7 @@ class TypecastFont implements Font {
}
@Override
- public boolean isPrintableChar( char c ) {
+ public boolean isPrintableChar( final char c ) {
return FontFactory.isPrintableChar(c);
}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFontConstructor.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFontConstructor.java
index d7db981b0..6154484d5 100644
--- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFontConstructor.java
+++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFontConstructor.java
@@ -45,14 +45,14 @@ public class TypecastFontConstructor implements FontConstructor {
@Override
public Font create(final File ffile) throws IOException {
- Object o = AccessController.doPrivileged(new PrivilegedAction