Project

General

Profile

Download (2.58 KB) Statistics
| Branch: | Revision:

library / src / main / java / org / distorted / library / EffectListOther.java @ 1e438fc7

1
package org.distorted.library;
2

    
3
///////////////////////////////////////////////////////////////////////////////////////////////////
4

    
5
import java.util.Vector;
6

    
7
/**
8
 * Do NOT base this on EffectList - this is an entirely different animal than the first 3 EffectLists.
9
 * The Effects in here will be executed after all the shaders have been executed - thus there are no
10
 * uniforms to send, no real queues to maintain.
11
 * <p>
12
 * Only 2 effects here ATM:
13
 * - save current Surface to a PNG file
14
 * - save current animation to a .MP4 file
15
 *
16
 * In contrast to the other EffectLists, only one instance of each allowed at any given moment - thus
17
 * this is not even a real EffectList, it is named so only for consistency with the others.
18
 */
19
public class EffectListOther
20
  {
21
  private Vector<EffectListener> mListeners =null;
22
  private int mNumListeners=0;  // ==mListeners.length(), but we only create mListeners if the first one gets added
23

    
24
///////////////////////////////////////////////////////////////////////////////////////////////////
25

    
26
  public EffectListOther(DistortedObject obj)
27
    {
28

    
29
    }
30

    
31
///////////////////////////////////////////////////////////////////////////////////////////////////
32

    
33
  synchronized void send()
34
    {
35

    
36
    }
37

    
38
///////////////////////////////////////////////////////////////////////////////////////////////////
39

    
40
  synchronized void abortAll()
41
    {
42

    
43
    }
44

    
45
///////////////////////////////////////////////////////////////////////////////////////////////////
46

    
47
  void addListener(EffectListener el)
48
    {
49
    if( mListeners==null ) mListeners = new Vector<>(2,2);
50

    
51
    mListeners.add(el);
52
    mNumListeners++;
53
    }
54

    
55
///////////////////////////////////////////////////////////////////////////////////////////////////
56

    
57
  void removeListener(EffectListener el)
58
    {
59
    if( mNumListeners>0 )
60
      {
61
      mListeners.remove(el);
62
      mNumListeners--;
63
      }
64
    }
65

    
66
///////////////////////////////////////////////////////////////////////////////////////////////////
67

    
68
  synchronized boolean removeByID(long id)
69
    {
70
    //....
71

    
72
    return false;
73
    }
74

    
75
///////////////////////////////////////////////////////////////////////////////////////////////////
76

    
77
  synchronized boolean removeByType(EffectNames effect)
78
    {
79
    // ...
80

    
81
    return false;
82
    }
83

    
84
///////////////////////////////////////////////////////////////////////////////////////////////////
85

    
86
  protected boolean printByID(long id)
87
    {
88
    return false;
89
    }
90

    
91
///////////////////////////////////////////////////////////////////////////////////////////////////
92

    
93
  synchronized long add(EffectNames eln, String filename)
94
    {
95
    return 0;
96
    }
97
  }
(11-11/30)