Revision 43814a57
Added by Leszek Koltunski over 3 years ago
src/main/java/org/distorted/library/effectqueue/EffectQueue.java | ||
---|---|---|
260 | 260 |
if( mNumEffects>pos ) |
261 | 261 |
{ |
262 | 262 |
mNumEffects--; |
263 |
mEffects[pos].remQueue(this); |
|
263 | 264 |
System.arraycopy(mEffects, pos+1, mEffects, pos, mNumEffects-pos); |
264 | 265 |
System.arraycopy(mIntUniforms, mNumIntUniforms*(pos+1), mIntUniforms, mNumIntUniforms*pos, mNumIntUniforms*(mNumEffects-pos) ); |
265 | 266 |
mEffects[mNumEffects] = null; |
... | ... | |
273 | 274 |
mEffects[pos] = effect; |
274 | 275 |
mIntUniforms[mNumIntUniforms*pos] = effect.getName().ordinal(); |
275 | 276 |
|
277 |
effect.addQueue(this); |
|
278 |
|
|
276 | 279 |
if( mIndex==EffectType.VERTEX.ordinal() ) |
277 | 280 |
{ |
278 | 281 |
effect.writeAssociations(mIntUniforms, mNumIntUniforms*pos+1, mNumIntUniforms*pos+3); |
... | ... | |
410 | 413 |
} |
411 | 414 |
} |
412 | 415 |
|
416 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
417 |
|
|
418 |
public void setAssociation(long effectID) |
|
419 |
{ |
|
420 |
for(int j=0; j<mNumEffects; j++) |
|
421 |
{ |
|
422 |
if (mEffects[j].getID() == effectID) |
|
423 |
{ |
|
424 |
mEffects[j].writeAssociations(mIntUniforms, mNumIntUniforms*j+1, mNumIntUniforms*j+3); |
|
425 |
} |
|
426 |
} |
|
427 |
} |
|
428 |
|
|
413 | 429 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
414 | 430 |
|
415 | 431 |
public void doWork() |
Also available in: Unified diff
Fix the fact that the static DistortedEffects.mAllQueues was global, shared between all Activities.
Completely replace this mechanism with a non-static list of links from a VertexEffect to all VertexEffectQueues this effect is a member of.