Project

General

Profile

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

examples / src / main / java / org / distorted / examples / flatblur / FlatBlurActivity.java @ 36532c7f

1 0e65f4da Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
2
// Copyright 2016 Leszek Koltunski                                                               //
3
//                                                                                               //
4
// This file is part of Distorted.                                                               //
5
//                                                                                               //
6
// Distorted is free software: you can redistribute it and/or modify                             //
7
// it under the terms of the GNU General Public License as published by                          //
8
// the Free Software Foundation, either version 2 of the License, or                             //
9
// (at your option) any later version.                                                           //
10
//                                                                                               //
11
// Distorted is distributed in the hope that it will be useful,                                  //
12
// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
14
// GNU General Public License for more details.                                                  //
15
//                                                                                               //
16
// You should have received a copy of the GNU General Public License                             //
17
// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
18
///////////////////////////////////////////////////////////////////////////////////////////////////
19
20
package org.distorted.examples.flatblur;
21
22
import android.app.Activity;
23
import android.opengl.GLSurfaceView;
24
import android.os.Bundle;
25
import android.view.View;
26
27
import org.distorted.examples.R;
28
import org.distorted.library.main.DistortedLibrary;
29
30
///////////////////////////////////////////////////////////////////////////////////////////////////
31
32 36532c7f Leszek Koltunski
public class FlatBlurActivity extends Activity
33 0e65f4da Leszek Koltunski
{
34
    @Override
35
    protected void onCreate(Bundle savedState) 
36
      {
37
      super.onCreate(savedState);
38
      DistortedLibrary.onCreate();
39
      setContentView(R.layout.flatblurlayout);
40
      }
41
42
///////////////////////////////////////////////////////////////////////////////////////////////////
43
    
44
    @Override
45
    protected void onPause() 
46
      {
47
      super.onPause();
48
      GLSurfaceView view = findViewById(R.id.flatblurSurfaceView);
49
      view.onPause();
50
      DistortedLibrary.onPause();
51
      }
52
53
///////////////////////////////////////////////////////////////////////////////////////////////////
54
    
55
    @Override
56
    protected void onResume() 
57
      {
58
      super.onResume();
59
      GLSurfaceView view = findViewById(R.id.flatblurSurfaceView);
60
      view.onResume();
61
      }
62
    
63
///////////////////////////////////////////////////////////////////////////////////////////////////
64
    
65
    @Override
66
    protected void onDestroy() 
67
      {
68
      DistortedLibrary.onDestroy();
69
      super.onDestroy();
70
      }
71
72
///////////////////////////////////////////////////////////////////////////////////////////////////
73
74 36532c7f Leszek Koltunski
    public void button1(View view)
75 0e65f4da Leszek Koltunski
      {
76
      FlatBlurSurfaceView v = findViewById(R.id.flatblurSurfaceView);
77
      FlatBlurRenderer renderer = v.getRenderer();
78 36532c7f Leszek Koltunski
      renderer.button1();
79 0e65f4da Leszek Koltunski
      }
80
81
///////////////////////////////////////////////////////////////////////////////////////////////////
82
83 36532c7f Leszek Koltunski
    public void button2(View view)
84
      {
85
      FlatBlurSurfaceView v = findViewById(R.id.flatblurSurfaceView);
86
      FlatBlurRenderer renderer = v.getRenderer();
87
      renderer.button2();
88
      }
89 0e65f4da Leszek Koltunski
}