From 4b2552af6ba4b92a039cc1514194d8066e8e1f44 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 7 Oct 2014 09:48:36 +0200 Subject: AnimatorBase thread-name: Add instance sequence number --- src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/jogl') diff --git a/src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java b/src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java index 3d5935457..2c058fc5c 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java +++ b/src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java @@ -89,6 +89,8 @@ public abstract class AnimatorBase implements GLAnimatorControl { boolean blockUntilDone(final Thread thread); } + private static int seqInstanceNumber = 0; + protected int modeBits; protected AnimatorImpl impl; protected String baseName; @@ -146,15 +148,16 @@ public abstract class AnimatorBase implements GLAnimatorControl { */ protected final synchronized void initImpl(final boolean force) { if( force || null == impl ) { + final String seqSuffix = String.format("#%02d", seqInstanceNumber++); if( useAWTAnimatorImpl( modeBits ) ) { try { impl = (AnimatorImpl) awtAnimatorImplClazz.newInstance(); - baseName = getBaseName("AWT"); + baseName = getBaseName("AWT")+seqSuffix; } catch (final Exception e) { e.printStackTrace(); } } if( null == impl ) { impl = new DefaultAnimatorImpl(); - baseName = getBaseName(""); + baseName = getBaseName("")+seqSuffix; } if(DEBUG) { System.err.println("Animator.initImpl: baseName "+baseName+", implClazz "+impl.getClass().getName()+" - "+toString()+" - "+getThreadName()); -- cgit v1.2.3