Project

General

Profile

« Previous | Next » 

Revision a4d59c0b

Added by Leszek Koltunski over 5 years ago

Massive: make the coordinate system agree with that of OpenGL (i.e. invert the Y axis).

View differences:

src/main/java/org/distorted/examples/movingeffects/MovingEffectsActivity.java
47 47
  
48 48
      setContentView(R.layout.movingeffectslayout);
49 49
      
50
      mAbort = (Button)findViewById(R.id.movingeffectsAbort);
51
      mChroma= (Button)findViewById(R.id.movingeffectsChroma);
52
      mTrans = (Button)findViewById(R.id.movingeffectsTrans);
53
      mSink  = (Button)findViewById(R.id.movingeffectsSink);
54
      mBubble= (Button)findViewById(R.id.movingeffectsBubble);
55
      mSwirl= (Button)findViewById(R.id.movingeffectsSwirl);
50
      mAbort = findViewById(R.id.movingeffectsAbort);
51
      mChroma= findViewById(R.id.movingeffectsChroma);
52
      mTrans = findViewById(R.id.movingeffectsTrans);
53
      mSink  = findViewById(R.id.movingeffectsSink);
54
      mBubble= findViewById(R.id.movingeffectsBubble);
55
      mSwirl = findViewById(R.id.movingeffectsSwirl);
56 56
      
57 57
      mAbort.setBackgroundColor(COLOR_PRESSED);
58 58
      mChroma.setBackgroundColor(COLOR_UNPRESSED);
......
68 68
      }
69 69

  
70 70
///////////////////////////////////////////////////////////////////
71

  
71 72
    @Override
72 73
    protected void onResume() 
73 74
      {
74 75
      super.onResume();
75 76
      
76
      GLSurfaceView view = (GLSurfaceView) this.findViewById(R.id.movingeffectsSurfaceView);
77
      GLSurfaceView view = findViewById(R.id.movingeffectsSurfaceView);
77 78
      view.onResume();
78 79
      }
79 80

  
80 81
///////////////////////////////////////////////////////////////////
82

  
81 83
    @Override
82 84
    protected void onPause() 
83 85
      {
84 86
      Abort(null);   
85 87
      
86
      GLSurfaceView view = (GLSurfaceView) this.findViewById(R.id.movingeffectsSurfaceView);
88
      GLSurfaceView view = findViewById(R.id.movingeffectsSurfaceView);
87 89
      view.onPause();
88 90

  
89 91
      Distorted.onPause();
......
91 93
      }
92 94
    
93 95
///////////////////////////////////////////////////////////////////
96

  
94 97
    @Override
95 98
    public void onStop()
96 99
      {
......
117 120
    
118 121
    public void Bubble(View v)
119 122
      {
120
      MovingEffectsSurfaceView view = (MovingEffectsSurfaceView) this.findViewById(R.id.movingeffectsSurfaceView);
123
      MovingEffectsSurfaceView view = findViewById(R.id.movingeffectsSurfaceView);
121 124
      view.Bubble();
122 125
      
123 126
      mAbort.setBackgroundColor(COLOR_UNPRESSED);
......
132 135

  
133 136
    public void Sink(View v)
134 137
      {
135
      MovingEffectsSurfaceView view = (MovingEffectsSurfaceView) this.findViewById(R.id.movingeffectsSurfaceView);
138
      MovingEffectsSurfaceView view = findViewById(R.id.movingeffectsSurfaceView);
136 139
      view.Sink();
137 140
      
138 141
      mAbort.setBackgroundColor(COLOR_UNPRESSED);
......
147 150
    
148 151
    public void Transparency(View v)
149 152
      {
150
      MovingEffectsSurfaceView view = (MovingEffectsSurfaceView) this.findViewById(R.id.movingeffectsSurfaceView);
153
      MovingEffectsSurfaceView view = findViewById(R.id.movingeffectsSurfaceView);
151 154
      view.Transparency();
152 155
      
153 156
      mAbort.setBackgroundColor(COLOR_UNPRESSED);
......
162 165

  
163 166
    public void Chroma(View v)
164 167
      {
165
      MovingEffectsSurfaceView view = (MovingEffectsSurfaceView) this.findViewById(R.id.movingeffectsSurfaceView);
168
      MovingEffectsSurfaceView view = findViewById(R.id.movingeffectsSurfaceView);
166 169
      view.Chroma();
167 170
      
168 171
      mAbort.setBackgroundColor(COLOR_UNPRESSED);
......
177 180

  
178 181
    public void Swirl(View v)
179 182
      {
180
      MovingEffectsSurfaceView view = (MovingEffectsSurfaceView) this.findViewById(R.id.movingeffectsSurfaceView);
183
      MovingEffectsSurfaceView view = findViewById(R.id.movingeffectsSurfaceView);
181 184
      view.Swirl();
182 185
      
183 186
      mAbort.setBackgroundColor(COLOR_UNPRESSED);
......
192 195

  
193 196
    public void Abort(View v)
194 197
      {
195
      MovingEffectsSurfaceView view = (MovingEffectsSurfaceView) this.findViewById(R.id.movingeffectsSurfaceView);
198
      MovingEffectsSurfaceView view = findViewById(R.id.movingeffectsSurfaceView);
196 199
      view.Abort();
197 200
      
198 201
      mAbort.setBackgroundColor(COLOR_PRESSED);
......
202 205
      mBubble.setBackgroundColor(COLOR_UNPRESSED);
203 206
      mSwirl.setBackgroundColor(COLOR_UNPRESSED);
204 207
      }
205

  
206
///////////////////////////////////////////////////////////////////
207
// end of file
208 208
}

Also available in: Unified diff