Revision 06dbccad
Added by Leszek Koltunski over 5 years ago
src/main/java/org/distorted/library/main/EffectQueue.java | ||
---|---|---|
56 | 56 |
private ArrayList<DistortedNode> mNodes = null; |
57 | 57 |
private long mID; |
58 | 58 |
private int mIndex; |
59 |
private boolean mCreated; |
|
59 | 60 |
|
60 | 61 |
private class Job |
61 | 62 |
{ |
... | ... | |
84 | 85 |
|
85 | 86 |
EffectQueue(long id, int numUniforms, int index) |
86 | 87 |
{ |
88 |
mCreated = false; |
|
87 | 89 |
mID = 0; |
88 | 90 |
mNumEffects = 0; |
89 | 91 |
mNumEffectsToBe = 0; |
... | ... | |
311 | 313 |
|
312 | 314 |
boolean add(Effect effect) |
313 | 315 |
{ |
314 |
if( mMax[mIndex]>mNumEffectsToBe ) |
|
316 |
if( mMax[mIndex]>mNumEffectsToBe || !mCreated )
|
|
315 | 317 |
{ |
316 | 318 |
//android.util.Log.e("queue", "scheduling future add of "+effect.getName().name()+" to "+mNumEffectsToBe+" id="+effect.getID()); |
317 | 319 |
//android.util.Log.e("queue", "queue id="+mDistortedEffectsID); |
... | ... | |
353 | 355 |
mEffects = new Effect[max]; |
354 | 356 |
mName = new int[max]; |
355 | 357 |
} |
358 |
mCreated = true; |
|
359 |
|
|
356 | 360 |
break; |
357 | 361 |
case ATTACH: if( mMax[mIndex]>mNumEffects ) // it is possible that we have first |
358 | 362 |
{ // added effects and then lowered mMax |
Also available in: Unified diff
Before we start rendering, effects can always be added.