Revision 47316d20
Added by Leszek Koltunski over 7 years ago
src/main/java/org/distorted/library/effect/Effect.java | ||
---|---|---|
125 | 125 |
|
126 | 126 |
Effect(EffectType type, EffectName name, int dimension, boolean center, boolean region, float[] unity) |
127 | 127 |
{ |
128 |
mID = mNextID++;
|
|
128 |
mID = (mNextID++)<<EffectType.LENGTH + type.ordinal();
|
|
129 | 129 |
|
130 | 130 |
mName = name; |
131 | 131 |
mType = type; |
src/main/java/org/distorted/library/main/DistortedEffects.java | ||
---|---|---|
466 | 466 |
default : return 0; |
467 | 467 |
} |
468 | 468 |
} |
469 |
|
|
469 |
|
|
470 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
471 |
/** |
|
472 |
* Aborts all Effect by its ID. |
|
473 |
* |
|
474 |
* @param id the Id of the Effect to be removed, as returned by getID(). |
|
475 |
* @return Number of effects aborted. |
|
476 |
*/ |
|
477 |
public int abortById(long id) |
|
478 |
{ |
|
479 |
long type = id&EffectType.MASK; |
|
480 |
|
|
481 |
if( type == EffectType.MATRIX.ordinal() ) return mM.abortAll(true); |
|
482 |
if( type == EffectType.VERTEX.ordinal() ) return mV.abortAll(true); |
|
483 |
if( type == EffectType.FRAGMENT.ordinal() ) return mF.abortAll(true); |
|
484 |
// if( type == EffectType.POSTPROCESS.ordinal() ) return mP.abortAll(true); |
|
485 |
|
|
486 |
return 0; |
|
487 |
} |
|
488 |
|
|
470 | 489 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
471 | 490 |
/** |
472 | 491 |
* Aborts a single Effect. |
Also available in: Unified diff
Some progress with Effect classes.
11 apps compile now.