aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/util/texture
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/util/texture')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java1
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/texture/TextureCoords.java1
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/texture/TextureData.java1
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java14
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/texture/TextureSequence.java1
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/texture/TextureState.java1
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/texture/spi/JPEGImage.java2
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/texture/spi/LEDataInputStream.java18
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/texture/spi/LEDataOutputStream.java15
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/texture/spi/NetPbmTextureWriter.java1
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/texture/spi/PNGImage.java1
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/texture/spi/SGIImage.java2
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/texture/spi/TGAImage.java1
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/texture/spi/awt/IIOTextureProvider.java3
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/texture/spi/awt/IIOTextureWriter.java1
15 files changed, 63 insertions, 0 deletions
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 fd026d76e..584cacf8c 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java
@@ -188,6 +188,7 @@ public class Texture {
/** The texture coordinates corresponding to the entire image. */
private TextureCoords coords;
+ @Override
public String toString() {
return "Texture[target 0x"+Integer.toHexString(target)+", name "+texID+", "+
imgWidth+"/"+texWidth+" x "+imgHeight+"/"+texHeight+", y-flip "+mustFlipVertically+
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 63f100630..ba59f89c5 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureCoords.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureCoords.java
@@ -94,5 +94,6 @@ public class TextureCoords {
rectangle. */
public float top() { return top; }
+ @Override
public String toString() { return "TexCoord[h: "+left+" - "+right+", v: "+bottom+" - "+top+"]"; }
}
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 28029efc5..5d88a76c0 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureData.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureData.java
@@ -499,6 +499,7 @@ public class TextureData {
public void flush();
}
+ @Override
public String toString() {
return "TextureData["+width+"x"+height+", y-flip "+mustFlipVertically+", internFormat 0x"+Integer.toHexString(internalFormat)+", "+
pixelAttributes+", border "+border+", estSize "+estimatedMemorySize+", alignment "+alignment+", rowlen "+rowLength;
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 b6d89d6d2..67ab5176d 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java
@@ -914,6 +914,7 @@ 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,
@@ -928,6 +929,7 @@ public class TextureIO {
return null;
}
+ @Override
public TextureData newTextureData(GLProfile glp, InputStream stream,
int internalFormat,
int pixelFormat,
@@ -944,6 +946,7 @@ public class TextureIO {
return null;
}
+ @Override
public TextureData newTextureData(GLProfile glp, URL url,
int internalFormat,
int pixelFormat,
@@ -999,6 +1002,7 @@ public class TextureIO {
}
}
TextureData.Flusher flusher = new TextureData.Flusher() {
+ @Override
public void flush() {
image.close();
}
@@ -1042,6 +1046,7 @@ 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,
@@ -1062,6 +1067,7 @@ public class TextureIO {
}
}
+ @Override
public TextureData newTextureData(GLProfile glp, URL url,
int internalFormat,
int pixelFormat,
@@ -1079,6 +1085,7 @@ public class TextureIO {
//----------------------------------------------------------------------
// SGI RGB image provider
static class SGITextureProvider extends StreamBasedTextureProvider {
+ @Override
public TextureData newTextureData(GLProfile glp, InputStream stream,
int internalFormat,
int pixelFormat,
@@ -1114,6 +1121,7 @@ public class TextureIO {
//----------------------------------------------------------------------
// TGA (Targa) image provider
static class TGATextureProvider extends StreamBasedTextureProvider {
+ @Override
public TextureData newTextureData(GLProfile glp, InputStream stream,
int internalFormat,
int pixelFormat,
@@ -1151,6 +1159,7 @@ public class TextureIO {
//----------------------------------------------------------------------
// PNG image provider
static class PNGTextureProvider extends StreamBasedTextureProvider {
+ @Override
public TextureData newTextureData(GLProfile glp, InputStream stream,
int internalFormat,
int pixelFormat,
@@ -1188,6 +1197,7 @@ public class TextureIO {
//----------------------------------------------------------------------
// JPEG image provider
static class JPGTextureProvider extends StreamBasedTextureProvider {
+ @Override
public TextureData newTextureData(GLProfile glp, InputStream stream,
int internalFormat,
int pixelFormat,
@@ -1226,6 +1236,7 @@ public class TextureIO {
// DDS texture writer
//
static class DDSTextureWriter implements TextureWriter {
+ @Override
public boolean write(File file,
TextureData data) throws IOException {
if (DDS.equals(IOUtil.getFileSuffix(file))) {
@@ -1276,6 +1287,7 @@ public class TextureIO {
// SGI (rgb) texture writer
//
static class SGITextureWriter implements TextureWriter {
+ @Override
public boolean write(File file,
TextureData data) throws IOException {
String fileSuffix = IOUtil.getFileSuffix(file);
@@ -1321,6 +1333,7 @@ public class TextureIO {
// TGA (Targa) texture writer
static class TGATextureWriter implements TextureWriter {
+ @Override
public boolean write(File file,
TextureData data) throws IOException {
if (TGA.equals(IOUtil.getFileSuffix(file))) {
@@ -1371,6 +1384,7 @@ public class TextureIO {
// PNG texture writer
static class PNGTextureWriter implements TextureWriter {
+ @Override
public boolean write(File file, TextureData data) throws IOException {
if (PNG.equals(IOUtil.getFileSuffix(file))) {
// See whether the PNG writer can handle this TextureData
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 e4f72abf0..c34e019c2 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureSequence.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureSequence.java
@@ -124,6 +124,7 @@ public interface TextureSequence {
public final Texture getTexture() { return texture; }
+ @Override
public String toString() {
return "TextureFrame[pts " + pts + " ms, l " + duration + " ms, texID "+ (null != texture ? texture.getTextureObject() : 0) + "]";
}
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 c8437d07c..d8320c690 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureState.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureState.java
@@ -158,6 +158,7 @@ public class TextureState {
public final int getWrapT() { return state[5]; }
+ @Override
public final String toString() {
return "TextureState[unit "+(state[0] - GL.GL_TEXTURE0)+", target "+toHexString(target)+
": obj "+toHexString(state[1])+
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 471938754..2081788ba 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
@@ -112,6 +112,7 @@ public class JPEGImage {
data.put(i++, Cr);
}
+ @Override
public String toString() {
return "JPEGPixels["+width+"x"+height+", sourceComp "+sourceComponents+", sourceCS "+sourceCS+", storageCS "+storageCS+", storageComp "+storageComponents+"]";
}
@@ -171,5 +172,6 @@ public class JPEGImage {
(bottom-to-top) order for calls to glTexImage2D. */
public ByteBuffer getData() { return data; }
+ @Override
public String toString() { return "JPEGImage["+pixelWidth+"x"+pixelHeight+", bytesPerPixel "+bytesPerPixel+", reversedChannels "+reversedChannels+", "+pixelStorage+", "+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 4020ab3c0..3c90d96e4 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
@@ -82,38 +82,45 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
dataIn = new DataInputStream(in);
}
+ @Override
public void close() throws IOException
{
dataIn.close(); // better close as we create it.
// this will close underlying as well.
}
+ @Override
public synchronized final int read(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
{
int rl = dataIn.read(b, off, len);
return rl;
}
+ @Override
public final void readFully(byte b[]) throws IOException
{
dataIn.readFully(b, 0, b.length);
}
+ @Override
public final void readFully(byte b[], int off, int len) throws IOException
{
dataIn.readFully(b, off, len);
}
+ @Override
public final int skipBytes(int n) throws IOException
{
return dataIn.skipBytes(n);
}
+ @Override
public final boolean readBoolean() throws IOException
{
int ch = dataIn.read();
@@ -122,6 +129,7 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
return (ch != 0);
}
+ @Override
public final byte readByte() throws IOException
{
int ch = dataIn.read();
@@ -130,6 +138,7 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
return (byte)(ch);
}
+ @Override
public final int readUnsignedByte() throws IOException
{
int ch = dataIn.read();
@@ -138,6 +147,7 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
return ch;
}
+ @Override
public final short readShort() throws IOException
{
int ch1 = dataIn.read();
@@ -147,6 +157,7 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
return (short)((ch1 << 0) + (ch2 << 8));
}
+ @Override
public final int readUnsignedShort() throws IOException
{
int ch1 = dataIn.read();
@@ -156,6 +167,7 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
return (ch1 << 0) + (ch2 << 8);
}
+ @Override
public final char readChar() throws IOException
{
int ch1 = dataIn.read();
@@ -165,6 +177,7 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
return (char)((ch1 << 0) + (ch2 << 8));
}
+ @Override
public final int readInt() throws IOException
{
int ch1 = dataIn.read();
@@ -176,6 +189,7 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
return ((ch1 << 0) + (ch2 << 8) + (ch3 << 16) + (ch4 << 24));
}
+ @Override
public final long readLong() throws IOException
{
int i1 = readInt();
@@ -183,11 +197,13 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
return ((long)i1 & 0xFFFFFFFFL) + ((long)i2 << 32);
}
+ @Override
public final float readFloat() throws IOException
{
return Float.intBitsToFloat(readInt());
}
+ @Override
public final double readDouble() throws IOException
{
return Double.longBitsToDouble(readLong());
@@ -197,6 +213,7 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
* dont call this it is not implemented.
* @return empty new string
**/
+ @Override
public final String readLine() throws IOException
{
return new String();
@@ -206,6 +223,7 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
* dont call this it is not implemented
* @return empty new string
**/
+ @Override
public final String readUTF() 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 a7101a576..93b097500 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
@@ -78,43 +78,51 @@ public class LEDataOutputStream extends FilterOutputStream implements DataOutput
dataOut = new DataOutputStream(out);
}
+ @Override
public void close() throws IOException
{
dataOut.close(); // better close as we create it.
// this will close underlying as well.
}
+ @Override
public synchronized final void write(byte b[]) throws IOException
{
dataOut.write(b, 0, b.length);
}
+ @Override
public synchronized final void write(byte b[], int off, int len) throws IOException
{
dataOut.write(b, off, len);
}
+ @Override
public final void write(int b) throws IOException
{
dataOut.write(b);
}
+ @Override
public final void writeBoolean(boolean v) throws IOException
{
dataOut.writeBoolean(v);
}
+ @Override
public final void writeByte(int v) throws IOException
{
dataOut.writeByte(v);
}
/** Don't call this -- not implemented */
+ @Override
public final void writeBytes(String s) throws IOException
{
throw new UnsupportedOperationException();
}
+ @Override
public final void writeChar(int v) throws IOException
{
dataOut.writeChar(((v >> 8) & 0xff) |
@@ -122,21 +130,25 @@ public class LEDataOutputStream extends FilterOutputStream implements DataOutput
}
/** Don't call this -- not implemented */
+ @Override
public final void writeChars(String s) throws IOException
{
throw new UnsupportedOperationException();
}
+ @Override
public final void writeDouble(double v) throws IOException
{
writeLong(Double.doubleToRawLongBits(v));
}
+ @Override
public final void writeFloat(float v) throws IOException
{
writeInt(Float.floatToRawIntBits(v));
}
+ @Override
public final void writeInt(int v) throws IOException
{
dataOut.writeInt((v >>> 24) |
@@ -145,12 +157,14 @@ public class LEDataOutputStream extends FilterOutputStream implements DataOutput
(v << 24));
}
+ @Override
public final void writeLong(long v) throws IOException
{
writeInt((int) v);
writeInt((int) (v >>> 32));
}
+ @Override
public final void writeShort(int v) throws IOException
{
dataOut.writeShort(((v >> 8) & 0xff) |
@@ -158,6 +172,7 @@ public class LEDataOutputStream extends FilterOutputStream implements DataOutput
}
/** Don't call this -- not implemented */
+ @Override
public final void writeUTF(String s) throws IOException
{
throw new UnsupportedOperationException();
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/NetPbmTextureWriter.java b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/NetPbmTextureWriter.java
index 43b8eebe6..cabf4ebc5 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
@@ -84,6 +84,7 @@ public class NetPbmTextureWriter implements TextureWriter {
public String getSuffix() { return (magic==6)?PPM:PAM; }
+ @Override
public boolean write(File file, TextureData data) throws IOException {
boolean res;
final int magic_old = magic;
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/PNGImage.java b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/PNGImage.java
index bfde1bfac..71cbbf97e 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/PNGImage.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/PNGImage.java
@@ -314,5 +314,6 @@ public class PNGImage {
}
}
+ @Override
public String toString() { return "PNGImage["+pixelWidth+"x"+pixelHeight+", dpi "+dpi[0]+" x "+dpi[1]+", bytesPerPixel "+bytesPerPixel+", reversedChannels "+reversedChannels+", "+data+"]"; }
}
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 fd96fba80..cbc8e652f 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
@@ -126,6 +126,7 @@ public class SGIImage {
in.read(tmp);
}
+ @Override
public String toString() {
return ("magic: " + magic +
" storage: " + (int) storage +
@@ -226,6 +227,7 @@ public class SGIImage {
(bottom-to-top) order for calls to glTexImage2D. */
public byte[] getData() { return data; }
+ @Override
public String toString() {
return header.toString();
}
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 df9430a26..15cd63eb3 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
@@ -199,6 +199,7 @@ public class TGAImage {
public byte[] imageIDbuf() { return imageIDbuf; }
public String imageID() { return imageID; }
+ @Override
public String toString() {
return "TGA Header " +
" id length: " + idLength +
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/awt/IIOTextureProvider.java b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/awt/IIOTextureProvider.java
index f23cb74bf..18ad429d2 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/awt/IIOTextureProvider.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/awt/IIOTextureProvider.java
@@ -54,6 +54,7 @@ import com.jogamp.opengl.util.texture.spi.*;
public class IIOTextureProvider implements TextureProvider {
private static final boolean DEBUG = Debug.debug("TextureIO");
+ @Override
public TextureData newTextureData(GLProfile glp, File file,
int internalFormat,
int pixelFormat,
@@ -70,6 +71,7 @@ public class IIOTextureProvider implements TextureProvider {
return new AWTTextureData(glp, internalFormat, pixelFormat, mipmap, img);
}
+ @Override
public TextureData newTextureData(GLProfile glp, InputStream stream,
int internalFormat,
int pixelFormat,
@@ -86,6 +88,7 @@ public class IIOTextureProvider implements TextureProvider {
return new AWTTextureData(glp, internalFormat, pixelFormat, mipmap, img);
}
+ @Override
public TextureData newTextureData(GLProfile glp, URL url,
int internalFormat,
int pixelFormat,
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/awt/IIOTextureWriter.java b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/awt/IIOTextureWriter.java
index 438ab6cc2..be82e4fb8 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/awt/IIOTextureWriter.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/awt/IIOTextureWriter.java
@@ -53,6 +53,7 @@ import com.jogamp.opengl.util.texture.*;
import com.jogamp.opengl.util.texture.spi.*;
public class IIOTextureWriter implements TextureWriter {
+ @Override
public boolean write(File file,
TextureData data) throws IOException {
int pixelFormat = data.getPixelFormat();