aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-09-05 09:56:40 +0200
committerSven Gothel <[email protected]>2013-09-05 09:56:40 +0200
commit7ee9b87bdb025f98651c2685d416029a17fc3937 (patch)
tree7a533a3080da97bdfa11cc2d31c95976574f9e52 /src/jogl/classes/com/jogamp/opengl
parent604434f8a1ea43f306e21fe81ac7471f27e3c9cf (diff)
TileRendererBase: Add toString(), Proper tile unit test names, i.e. add NEWT for UI agnostic (no-awt tests).
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/GLPixelBuffer.java3
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/TileRendererBase.java11
2 files changed, 12 insertions, 2 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLPixelBuffer.java b/src/jogl/classes/com/jogamp/opengl/util/GLPixelBuffer.java
index 9a9b94fa9..71e284101 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/GLPixelBuffer.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/GLPixelBuffer.java
@@ -254,7 +254,8 @@ public class GLPixelBuffer {
sb = new StringBuilder();
}
sb.append(pixelAttributes).append(", dim ").append(width).append("x").append(height).append("x").append(depth).append(", pack ").append(pack)
- .append(", disposed ").append(disposed).append(", valid ").append(isValid()).append(", buffer[sz [bytes ").append(byteSize).append(", elemSize ").append(bufferElemSize).append(", ").append(buffer).append("]");
+ .append(", disposed ").append(disposed).append(", valid ").append(isValid())
+ .append(", buffer[bytes ").append(byteSize).append(", elemSize ").append(bufferElemSize).append(", ").append(buffer).append("]");
return sb;
}
public String toString() {
diff --git a/src/jogl/classes/com/jogamp/opengl/util/TileRendererBase.java b/src/jogl/classes/com/jogamp/opengl/util/TileRendererBase.java
index 8779fa59f..b6774b6b7 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/TileRendererBase.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/TileRendererBase.java
@@ -37,6 +37,7 @@
package com.jogamp.opengl.util;
import javax.media.nativewindow.util.Dimension;
+import javax.media.nativewindow.util.DimensionImmutable;
import javax.media.opengl.GL2ES3;
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLEventListener;
@@ -109,6 +110,14 @@ public abstract class TileRendererBase {
protected GLEventListener glEventListenerPre = null;
protected GLEventListener glEventListenerPost = null;
+ public String toString() {
+ final int gladListenerCount = null != listeners ? listeners.length : 0;
+ return getClass().getSimpleName()+
+ "[tile["+currentTileXPos+"/"+currentTileYPos+" "+currentTileWidth+"x"+currentTileHeight+", buffer "+tileBuffer+"], "+
+ ", image[size "+imageSize+", buffer "+imageBuffer+"], glad["+
+ gladListenerCount+" listener, pre "+(null!=glEventListenerPre)+", post "+(null!=glEventListenerPost)+"]]";
+ }
+
protected TileRendererBase() {
}
@@ -147,7 +156,7 @@ public abstract class TileRendererBase {
}
/** @see #setImageSize(int, int) */
- public final Dimension getImageSize() { return imageSize; }
+ public final DimensionImmutable getImageSize() { return imageSize; }
/**
* Sets the buffer in which to store the final image