summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/util')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java18
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/Locator.java2
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java4
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/gl2/GLUT.java8
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java24
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java26
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/texture/spi/LEDataInputStream.java92
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/texture/spi/SGIImage.java10
8 files changed, 92 insertions, 92 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java b/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java
index fc364b67a..f59351ad8 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java
@@ -116,9 +116,9 @@ public class FPSAnimator extends AnimatorBase {
}
private void startTask() {
- if(null != task) {
- return;
- }
+ if(null != task) {
+ return;
+ }
long delay = (long) (1000.0f / (float) fps);
task = new TimerTask() {
public void run() {
@@ -165,12 +165,12 @@ public class FPSAnimator extends AnimatorBase {
try {
shouldRun = false;
if(null != task) {
- task.cancel();
- task = null;
+ task.cancel();
+ task = null;
}
if(null != timer) {
- timer.cancel();
- timer = null;
+ timer.cancel();
+ timer = null;
}
animThread = null;
try {
@@ -190,8 +190,8 @@ public class FPSAnimator extends AnimatorBase {
try {
shouldRun = false;
if(null != task) {
- task.cancel();
- task = null;
+ task.cancel();
+ task = null;
}
animThread = null;
try {
diff --git a/src/jogl/classes/com/jogamp/opengl/util/Locator.java b/src/jogl/classes/com/jogamp/opengl/util/Locator.java
index 8dbd7cd93..291cd770c 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/Locator.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/Locator.java
@@ -109,7 +109,7 @@ public class Locator {
}
if (file != null) {
String res = new File(file, relativeFile).getPath();
- // Handle things on Windows
+ // Handle things on Windows
return res.replace('\\', '/');
} else {
return relativeFile;
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 86882176a..de28dc70a 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java
@@ -1590,7 +1590,7 @@ public class TextRenderer {
int lengthInGlyphs = fullRunGlyphVector.getNumGlyphs();
int i = 0;
while (i < lengthInGlyphs) {
- Character letter = CharacterCache.valueOf(inString.charAt(i));
+ Character letter = CharacterCache.valueOf(inString.charAt(i));
GlyphMetrics metrics = (GlyphMetrics) glyphMetricsCache.get(letter);
if (metrics == null) {
metrics = fullRunGlyphVector.getGlyphMetrics(i);
@@ -1656,7 +1656,7 @@ public class TextRenderer {
// if the unicode or glyph ID would be out of bounds of the
// glyph cache.
private Glyph getGlyph(CharSequence inString,
- GlyphMetrics glyphMetrics,
+ GlyphMetrics glyphMetrics,
int index) {
char unicodeID = inString.charAt(index);
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 8befc13ba..010ce6699 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUT.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUT.java
@@ -163,7 +163,7 @@ public class GLUT {
public void glutSolidCylinder(double radius, double height, int slices, int stacks) {
GL2 gl = GLUgl2.getCurrentGL2();
-
+
// Prepare table of points for drawing end caps
double [] x = new double[slices];
double [] y = new double[slices];
@@ -174,7 +174,7 @@ public class GLUT {
x[i] = Math.cos(angle) * radius;
y[i] = Math.sin(angle) * radius;
}
-
+
// Draw bottom cap
gl.glBegin(GL2.GL_TRIANGLE_FAN);
gl.glNormal3d(0,0,-1);
@@ -184,7 +184,7 @@ public class GLUT {
}
gl.glVertex3d(x[0], y[0], 0);
gl.glEnd();
-
+
// Draw top cap
gl.glBegin(GL2.GL_TRIANGLE_FAN);
gl.glNormal3d(0,0,1);
@@ -194,7 +194,7 @@ public class GLUT {
}
gl.glVertex3d(x[0], y[0], height);
gl.glEnd();
-
+
// Draw walls
quadObjInit(glu);
glu.gluQuadricDrawStyle(quadObj, GLU.GLU_FILL);
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 38f8ff974..c067e5c22 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java
@@ -193,18 +193,18 @@ public class Texture {
// Package-private constructor for creating a texture object which wraps
// an existing texture ID from another package
Texture(int textureID,
- int target,
- int texWidth,
- int texHeight,
- int imgWidth,
- int imgHeight,
- boolean mustFlipVertically) {
- this.texID = textureID;
- this.target = target;
- this.mustFlipVertically = mustFlipVertically;
- this.texWidth = texWidth;
- this.texHeight = texHeight;
- setImageSize(imgWidth, imgHeight, target);
+ int target,
+ int texWidth,
+ int texHeight,
+ int imgWidth,
+ int imgHeight,
+ boolean mustFlipVertically) {
+ this.texID = textureID;
+ this.target = target;
+ this.mustFlipVertically = mustFlipVertically;
+ this.texWidth = texWidth;
+ this.texHeight = texHeight;
+ setImageSize(imgWidth, imgHeight, target);
}
/**
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 e86ff161b..d21e9c577 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java
@@ -528,19 +528,19 @@ public class TextureIO {
* texture
*/
public static Texture newTexture(int textureID,
- int target,
- int texWidth,
- int texHeight,
- int imgWidth,
- int imgHeight,
- boolean mustFlipVertically) {
- return new Texture(textureID,
- target,
- texWidth,
- texHeight,
- imgWidth,
- imgHeight,
- mustFlipVertically);
+ int target,
+ int texWidth,
+ int texHeight,
+ int imgWidth,
+ int imgHeight,
+ boolean mustFlipVertically) {
+ return new Texture(textureID,
+ target,
+ texWidth,
+ texHeight,
+ imgWidth,
+ imgHeight,
+ mustFlipVertically);
}
/**
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 d5f49599c..37dbc54df 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
@@ -37,7 +37,7 @@
* and developed by Kenneth Bradley Russell and Christopher John Kline.
*/
-package com.jogamp.opengl.util.texture.spi;
+package com.jogamp.opengl.util.texture.spi;
import java.io.DataInput;
import java.io.DataInputStream;
@@ -65,16 +65,16 @@ import java.io.IOException;
* for that functionality. It is not clear if it is ever going to be
* functionally required to be able to read UTF data in a LittleEndianManner<p>
*
- * @author Robin Luiten
- * @version 1.1 15/Dec/1997
+ * @author Robin Luiten
+ * @version 1.1 15/Dec/1997
*/
public class LEDataInputStream extends FilterInputStream implements DataInput
{
/**
- * To reuse some of the non endian dependent methods from
- * DataInputStreams methods.
+ * To reuse some of the non endian dependent methods from
+ * DataInputStreams methods.
*/
- DataInputStream dataIn;
+ DataInputStream dataIn;
public LEDataInputStream(InputStream in)
{
@@ -84,29 +84,29 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
public void close() throws IOException
{
- dataIn.close(); // better close as we create it.
+ dataIn.close(); // better close as we create it.
// this will close underlying as well.
}
- public synchronized final int read(byte b[]) throws IOException
+ public synchronized final int read(byte b[]) throws IOException
{
return dataIn.read(b, 0, b.length);
}
- public synchronized final int read(byte b[], int off, int len) throws IOException
+ public synchronized final int read(byte b[], int off, int len) throws IOException
{
- int rl = dataIn.read(b, off, len);
+ int rl = dataIn.read(b, off, len);
return rl;
}
public final void readFully(byte b[]) throws IOException
{
- dataIn.readFully(b, 0, b.length);
+ dataIn.readFully(b, 0, b.length);
}
- public final void readFully(byte b[], int off, int len) throws IOException
+ public final void readFully(byte b[], int off, int len) throws IOException
{
- dataIn.readFully(b, off, len);
+ dataIn.readFully(b, off, len);
}
public final int skipBytes(int n) throws IOException
@@ -116,23 +116,23 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
public final boolean readBoolean() throws IOException
{
- int ch = dataIn.read();
+ int ch = dataIn.read();
if (ch < 0)
throw new EOFException();
return (ch != 0);
}
- public final byte readByte() throws IOException
+ public final byte readByte() throws IOException
{
- int ch = dataIn.read();
+ int ch = dataIn.read();
if (ch < 0)
throw new EOFException();
return (byte)(ch);
}
- public final int readUnsignedByte() throws IOException
+ public final int readUnsignedByte() throws IOException
{
- int ch = dataIn.read();
+ int ch = dataIn.read();
if (ch < 0)
throw new EOFException();
return ch;
@@ -140,47 +140,47 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
public final short readShort() throws IOException
{
- int ch1 = dataIn.read();
- int ch2 = dataIn.read();
- if ((ch1 | ch2) < 0)
+ int ch1 = dataIn.read();
+ int ch2 = dataIn.read();
+ if ((ch1 | ch2) < 0)
throw new EOFException();
- return (short)((ch1 << 0) + (ch2 << 8));
+ return (short)((ch1 << 0) + (ch2 << 8));
}
- public final int readUnsignedShort() throws IOException
+ public final int readUnsignedShort() throws IOException
{
- int ch1 = dataIn.read();
- int ch2 = dataIn.read();
- if ((ch1 | ch2) < 0)
+ int ch1 = dataIn.read();
+ int ch2 = dataIn.read();
+ if ((ch1 | ch2) < 0)
throw new EOFException();
- return (ch1 << 0) + (ch2 << 8);
+ return (ch1 << 0) + (ch2 << 8);
}
- public final char readChar() throws IOException
+ public final char readChar() throws IOException
{
- int ch1 = dataIn.read();
- int ch2 = dataIn.read();
- if ((ch1 | ch2) < 0)
+ int ch1 = dataIn.read();
+ int ch2 = dataIn.read();
+ if ((ch1 | ch2) < 0)
throw new EOFException();
- return (char)((ch1 << 0) + (ch2 << 8));
+ return (char)((ch1 << 0) + (ch2 << 8));
}
public final int readInt() throws IOException
{
- int ch1 = dataIn.read();
- int ch2 = dataIn.read();
- int ch3 = dataIn.read();
- int ch4 = dataIn.read();
- if ((ch1 | ch2 | ch3 | ch4) < 0)
+ int ch1 = dataIn.read();
+ int ch2 = dataIn.read();
+ int ch3 = dataIn.read();
+ int ch4 = dataIn.read();
+ if ((ch1 | ch2 | ch3 | ch4) < 0)
throw new EOFException();
- return ((ch1 << 0) + (ch2 << 8) + (ch3 << 16) + (ch4 << 24));
+ return ((ch1 << 0) + (ch2 << 8) + (ch3 << 16) + (ch4 << 24));
}
- public final long readLong() throws IOException
+ public final long readLong() throws IOException
{
- int i1 = readInt();
- int i2 = readInt();
- return ((long)(i1) & 0xFFFFFFFFL) + (i2 << 32);
+ int i1 = readInt();
+ int i2 = readInt();
+ return ((long)(i1) & 0xFFFFFFFFL) + (i2 << 32);
}
public final float readFloat() throws IOException
@@ -188,7 +188,7 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
return Float.intBitsToFloat(readInt());
}
- public final double readDouble() throws IOException
+ public final double readDouble() throws IOException
{
return Double.longBitsToDouble(readLong());
}
@@ -197,7 +197,7 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
* dont call this it is not implemented.
* @return empty new string
**/
- public final String readLine() throws IOException
+ public final String readLine() throws IOException
{
return new String();
}
@@ -206,7 +206,7 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
* dont call this it is not implemented
* @return empty new string
**/
- public final String readUTF() throws IOException
+ public final String readUTF() throws IOException
{
return new String();
}
@@ -215,7 +215,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(DataInput in) throws IOException
{
return new String();
}
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 bb5040a31..c60c91bda 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
@@ -477,7 +477,7 @@ public class SGIImage {
for (int z = 0; z < zsize; z++) {
for (int y = ystart; y != yend; y += yincr) {
// RLE-compress each row.
-
+
int x = 0;
byte count = 0;
boolean repeat_mode = false;
@@ -485,7 +485,7 @@ public class SGIImage {
int start_ptr = ptr;
int num_ptr = ptr++;
byte repeat_val = 0;
-
+
while (x < xsize) {
// see if we should switch modes
should_switch = false;
@@ -502,7 +502,7 @@ public class SGIImage {
if (DEBUG)
System.err.println("left side was " + ((int) imgref(data, x, y, z, xsize, ysize, zsize)) +
", right side was " + (int)imgref(data, x+i, y, z, xsize, ysize, zsize));
-
+
if (imgref(data, x, y, z, xsize, ysize, zsize) !=
imgref(data, x+i, y, z, xsize, ysize, zsize))
should_switch = false;
@@ -530,7 +530,7 @@ public class SGIImage {
repeat_mode = true;
repeat_val = imgref(data, x, y, z, xsize, ysize, zsize);
}
-
+
if (x > 0) {
// reset the number pointer
num_ptr = ptr++;
@@ -538,7 +538,7 @@ public class SGIImage {
count = 0;
}
}
-
+
// if not in repeat mode, copy element to ptr
if (!repeat_mode) {
rlebuf[ptr++] = imgref(data, x, y, z, xsize, ysize, zsize);