Status:
2(3) days left until Inspire08
Timeline, ColorFades, Flashes!!
Well, if you re-checked my
previous log you know that I found a quick way to put together the whole demo. There is still hope! :D
I did a quick test of having
100 effects checking if they had to be rendered or not per frame and the
performance was really good, like 60fps. So, as I don't think I'll get 100 effects on the timeline I guess it's good enough to use this way for this prod. God bless Eclipse and it's refactoring/rename tool, because I've renamed the SceneManager class a couple of times... It's now called
Timeline and it looks like this:
import javax.media.opengl.GL;
import java.util.ArrayList;
import effects.*;
public class Timeline
{
private ArrayList effects;
public Timeline(GL gl)
{
effects = new ArrayList();
effects.add( new EffectRandomPolys(gl, 0, 27700) );
effects.add( new EffectColourFade(gl, 0, 10000, 1.0f, 0.0f, new float[] {0.0f,0.0f,0.0f}) );
effects.add( new EffectFlash(gl, 14450, 2000, 0.5f, 0.0f, new float[] {0.0f,0.0f,1.0f}) );
effects.add( new EffectRandomPolys(gl, 27700, 30000) );
effects.add( new EffectFlash(gl, 27700, 2000, 1.0f, 0.0f, new float[] {1.0f,1.0f,1.0f}) );
effects.add( new DebugInfo(gl, 0, 0) );
effects.add( new DebugLogger(gl, 0, 0) );
}
public void init()
{
for (int i = 0; i < effects.size(); i++)
((Effect)effects.get(i)).init();
}
public void render()
{
for (int i = 0; i < effects.size(); i++)
((Effect)effects.get(i)).render();
}
}
Yep! I have
ColourFades and also
Flashes :D (The diference is that one is on additive blending ant the other isn't).
This is how the thing looks like now:
/projects/inspire08/06/
Not much there yet, but it's a base. Now, it's really about time to do more effects, learn how to load/display images and find out how to jump to a middle part in the tune.