aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/TileRenderer.java7
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/TileRendererBase.java21
2 files changed, 24 insertions, 4 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/TileRenderer.java b/src/jogl/classes/com/jogamp/opengl/util/TileRenderer.java
index 93ac32281..695e2d93d 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/TileRenderer.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/TileRenderer.java
@@ -120,6 +120,13 @@ public class TileRenderer extends TileRendererBase {
private int offsetX;
private int offsetY;
+ @Override
+ protected StringBuilder tileDetails(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);
+ }
+
/**
* Creates a new TileRenderer object
*/
diff --git a/src/jogl/classes/com/jogamp/opengl/util/TileRendererBase.java b/src/jogl/classes/com/jogamp/opengl/util/TileRendererBase.java
index 4127b16e5..5baa1e4a5 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/TileRendererBase.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/TileRendererBase.java
@@ -122,12 +122,25 @@ public abstract class TileRendererBase {
protected GLEventListener glEventListenerPre = null;
protected GLEventListener glEventListenerPost = null;
- public String toString() {
+ private final String hashStr(Object o) {
+ final int h = null != o ? o.hashCode() : 0;
+ return "0x"+Integer.toHexString(h);
+ }
+ protected StringBuilder tileDetails(StringBuilder sb) {
+ return sb.append("cur "+currentTileXPos+"/"+currentTileYPos+" "+currentTileWidth+"x"+currentTileHeight+", buffer "+hashStr(tileBuffer));
+ }
+ public StringBuilder toString(StringBuilder sb) {
final int gladListenerCount = null != listeners ? listeners.length : 0;
+ sb.append("tile[");
+ tileDetails(sb);
+ sb.append("], image[size "+imageSize+", buffer "+hashStr(imageBuffer)+"], glad["+
+ gladListenerCount+" listener, pre "+(null!=glEventListenerPre)+", post "+(null!=glEventListenerPost)+"]");
+ return sb;
+ }
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
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)+"]]";
+ "["+toString(sb).toString()+"]";
}
protected TileRendererBase() {