I have posted this in troubleshooting section a couple of weeks ago, but since it was overlooked, I think I will try to get it applied myself…
Currently when one uses the TransitionGameState to fade from one gamestate to the next there is a small flicker in the very beginning of the transition. This is so due to the alpha state being still at 1.0f. Anyways here are patches for both version 1.0 and 2.0 that correct this alphastate problem and removes the flicker. If need be, I can provide testcases also.
jME 2.0
Index: C:/My Workspace/jME v2/src/com/jmex/game/state/load/TransitionGameState.java
===================================================================
--- C:/My Workspace/jME v2/src/com/jmex/game/state/load/TransitionGameState.java (revision 4006)
+++ C:/My Workspace/jME v2/src/com/jmex/game/state/load/TransitionGameState.java (working copy)
@@ -127,6 +127,7 @@
super(lifeInSeconds);
this.leadIn = leadIn;
this.transition = transition;
+ this.transition.setAlpha(0.0f);
}
public void updatePercentage(float percentComplete) {
jME 1.0
### Eclipse Workspace Patch 1.0
#P jME v1
Index: src/com/jmex/game/state/load/TransitionGameState.java
===================================================================
RCS file: /cvs/jme/src/com/jmex/game/state/load/TransitionGameState.java,v
retrieving revision 1.1
diff -u -r1.1 TransitionGameState.java
--- src/com/jmex/game/state/load/TransitionGameState.java 20 Oct 2006 00:39:02 -0000 1.1
+++ src/com/jmex/game/state/load/TransitionGameState.java 14 Aug 2008 12:41:37 -0000
@@ -127,6 +127,7 @@
super(lifeInSeconds);
this.leadIn = leadIn;
this.transition = transition;
+ this.transition.setAlpha(0.0f);
}
public void updatePercentage(float percentComplete) {