Revision 835b197e
Added by Leszek Koltunski almost 3 years ago
src/main/java/org/distorted/library/effectqueue/EffectQueueMatrix.java | ||
---|---|---|
68 | 68 |
|
69 | 69 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
70 | 70 |
|
71 |
void compute(long currTime) |
|
71 |
void compute(long currTime, long step)
|
|
72 | 72 |
{ |
73 |
if( currTime==mTime ) return; |
|
74 |
if( mTime==0 ) mTime = currTime; |
|
75 |
long step = (currTime-mTime); |
|
76 |
float[] array = mUBF.getBackingArray(); |
|
77 |
|
|
78 |
for(int i=0; i<mNumEffects; i++) |
|
73 |
if( mNumEffects>0 ) |
|
79 | 74 |
{ |
80 |
if( mEffects[i].compute(array, NUM_FLOAT_UNIFORMS*i, currTime, step) ) |
|
75 |
float[] array = mUBF.getBackingArray(); |
|
76 |
|
|
77 |
for(int i=0; i<mNumEffects; i++) |
|
81 | 78 |
{ |
82 |
EffectMessageSender.newMessage(mEffects[i]); |
|
79 |
if( mEffects[i].compute(array, NUM_FLOAT_UNIFORMS*i, currTime, step) ) |
|
80 |
{ |
|
81 |
EffectMessageSender.newMessage(mEffects[i]); |
|
82 |
} |
|
83 | 83 |
} |
84 | 84 |
} |
85 |
|
|
86 |
mTime = currTime; |
|
87 | 85 |
} |
88 | 86 |
|
89 | 87 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Move the information when was a EffectQueue last time evaluated from the EffectQueues all the way up to the Node which contains them.
The point: we need to reset this time back to 0 every time we attach the Node (and thus start evaluating the Queues inside)