Project

General

Profile

« Previous | Next » 

Revision ae77d55e

Added by Leszek Koltunski over 7 years ago

Further progress with Apps.

View differences:

src/main/java/org/distorted/library/main/DistortedEffects.java
627 627
 * Add a new Effect to our queue.
628 628
 *
629 629
 * @param effect The Effect to add.
630
 * @return <code>true</code> if operation was successful, <code>false</code> otherwise.
630 631
 */
631
  public void apply(Effect effect)
632
  public boolean apply(Effect effect)
632 633
    {
633 634
    switch(effect.getType())
634 635
      {
635
      case VERTEX      : mV.add(effect); break;
636
      case FRAGMENT    : mF.add(effect); break;
637
      case MATRIX      : mM.add(effect); break;
638
   // case POSTPROCESS : mP.add(effect); break;
636
      case VERTEX      : return mV.add(effect);
637
      case FRAGMENT    : return mF.add(effect);
638
      case MATRIX      : return mM.add(effect);
639
   // case POSTPROCESS : return mP.add(effect);
639 640
      }
641

  
642
    return false;
640 643
    }
641 644
  }
src/main/java/org/distorted/library/main/DistortedEffectsPostprocess.java
324 324
 * Add a new Effect to our queue.
325 325
 *
326 326
 * @param effect The Effect to add.
327
 * <code>true</code> if operation was successful, <code>false</code> otherwise.
327 328
 */
328
  public void apply(Effect effect)
329
  public boolean apply(Effect effect)
329 330
    {
330 331
    switch(effect.getType())
331 332
      {
332
      case POSTPROCESS : mP.add(effect); break;
333
      case POSTPROCESS : return mP.add(effect);
333 334
      }
335

  
336
    return false;
334 337
    }
335 338
  }
src/main/java/org/distorted/library/main/EffectQueue.java
227 227
  
228 228
///////////////////////////////////////////////////////////////////////////////////////////////////
229 229
  
230
  public void add(Effect effect)
230
  boolean add(Effect effect)
231 231
    {
232 232
    if( mMax[mIndex]>mNumEffects )
233 233
      {
......
235 235
      mEffects[mNumEffects] = effect;
236 236
      mName[mNumEffects] = effect.getName().ordinal();
237 237
      mNumEffects++;
238
      return true;
238 239
      }
240

  
241
    return false;
239 242
    }
240 243
  }

Also available in: Unified diff