Revision c0f27889
Added by Leszek Koltunski over 4 years ago
src/main/java/org/distorted/examples/aroundtheworld/AroundTheWorldActivity.java | ||
---|---|---|
56 | 56 |
@Override |
57 | 57 |
protected void onPause() |
58 | 58 |
{ |
59 |
super.onPause(); |
|
59 | 60 |
AroundTheWorldSurfaceView view = findViewById(R.id.aroundTheWorldSurfaceView); |
60 | 61 |
view.onPause(); |
61 | 62 |
DistortedLibrary.onPause(); |
62 |
super.onPause(); |
|
63 | 63 |
} |
64 | 64 |
|
65 | 65 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
68 | 68 |
protected void onResume() |
69 | 69 |
{ |
70 | 70 |
super.onResume(); |
71 |
|
|
72 | 71 |
AroundTheWorldSurfaceView view = findViewById(R.id.aroundTheWorldSurfaceView); |
73 | 72 |
view.onResume(); |
74 | 73 |
} |
src/main/java/org/distorted/examples/bean/BeanActivity.java | ||
---|---|---|
45 | 45 |
@Override |
46 | 46 |
protected void onPause() |
47 | 47 |
{ |
48 |
DistortedLibrary.onPause(); |
|
49 |
mView.onPause(); |
|
50 | 48 |
super.onPause(); |
49 |
mView.onPause(); |
|
50 |
DistortedLibrary.onPause(); |
|
51 | 51 |
} |
52 | 52 |
|
53 | 53 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/examples/blur/BlurActivity.java | ||
---|---|---|
53 | 53 |
@Override |
54 | 54 |
protected void onPause() |
55 | 55 |
{ |
56 |
super.onPause(); |
|
56 | 57 |
GLSurfaceView view = findViewById(R.id.blurSurfaceView); |
57 | 58 |
view.onPause(); |
58 | 59 |
DistortedLibrary.onPause(); |
59 |
super.onPause(); |
|
60 | 60 |
} |
61 | 61 |
|
62 | 62 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
84 | 84 |
{ |
85 | 85 |
BlurSurfaceView view = findViewById(R.id.blurSurfaceView); |
86 | 86 |
|
87 |
switch (bar.getId())
|
|
87 |
if (bar.getId() == R.id.blurSeek)
|
|
88 | 88 |
{ |
89 |
case R.id.blurSeek: int level = view.getRenderer().setBlur(progress); |
|
90 |
textBlur.setText(getString(R.string.blur_placeholder,level)); |
|
91 |
break; |
|
89 |
int level = view.getRenderer().setBlur(progress); |
|
90 |
textBlur.setText(getString(R.string.blur_placeholder,level)); |
|
92 | 91 |
} |
93 | 92 |
} |
94 | 93 |
|
src/main/java/org/distorted/examples/catanddog/CatAndDogActivity.java | ||
---|---|---|
45 | 45 |
@Override |
46 | 46 |
protected void onPause() |
47 | 47 |
{ |
48 |
DistortedLibrary.onPause(); |
|
49 |
mView.onPause(); |
|
50 | 48 |
super.onPause(); |
49 |
mView.onPause(); |
|
50 |
DistortedLibrary.onPause(); |
|
51 | 51 |
} |
52 | 52 |
|
53 | 53 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/examples/check/CheckActivity.java | ||
---|---|---|
76 | 76 |
@Override |
77 | 77 |
protected void onPause() |
78 | 78 |
{ |
79 |
GLSurfaceView mView = findViewById(R.id.checkSurfaceView); |
|
80 |
if( mView!=null ) mView.onPause(); |
|
81 |
|
|
82 |
DistortedLibrary.onPause(); |
|
83 | 79 |
super.onPause(); |
80 |
GLSurfaceView view = findViewById(R.id.checkSurfaceView); |
|
81 |
if( view!=null ) view.onPause(); |
|
82 |
DistortedLibrary.onPause(); |
|
84 | 83 |
} |
85 | 84 |
|
86 | 85 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
89 | 88 |
protected void onResume() |
90 | 89 |
{ |
91 | 90 |
super.onResume(); |
92 |
|
|
93 |
GLSurfaceView mView = findViewById(R.id.checkSurfaceView); |
|
94 |
if( mView!=null ) mView.onResume(); |
|
91 |
GLSurfaceView view = findViewById(R.id.checkSurfaceView); |
|
92 |
if( view!=null ) view.onResume(); |
|
95 | 93 |
} |
96 | 94 |
|
97 | 95 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/examples/deferredjob/DeferredJobActivity.java | ||
---|---|---|
24 | 24 |
import android.os.Bundle; |
25 | 25 |
import android.view.View; |
26 | 26 |
import android.widget.Button; |
27 |
import android.widget.CheckBox; |
|
28 | 27 |
|
29 | 28 |
import org.distorted.examples.R; |
30 | 29 |
import org.distorted.library.main.DistortedLibrary; |
... | ... | |
45 | 44 |
@Override |
46 | 45 |
protected void onPause() |
47 | 46 |
{ |
47 |
super.onPause(); |
|
48 | 48 |
GLSurfaceView view = this.findViewById(R.id.deferredjobSurfaceView); |
49 | 49 |
view.onPause(); |
50 | 50 |
DistortedLibrary.onPause(); |
51 |
super.onPause(); |
|
52 | 51 |
} |
53 | 52 |
|
54 | 53 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/examples/deform/DeformActivity.java | ||
---|---|---|
66 | 66 |
@Override |
67 | 67 |
protected void onPause() |
68 | 68 |
{ |
69 |
super.onPause(); |
|
69 | 70 |
DeformSurfaceView view = findViewById(R.id.deformSurfaceView); |
70 |
|
|
71 |
DistortedLibrary.onPause(); |
|
72 | 71 |
view.onPause(); |
73 |
super.onPause();
|
|
72 |
DistortedLibrary.onPause();
|
|
74 | 73 |
} |
75 | 74 |
|
76 | 75 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
79 | 78 |
protected void onResume() |
80 | 79 |
{ |
81 | 80 |
super.onResume(); |
82 |
|
|
83 | 81 |
GLSurfaceView view = findViewById(R.id.deformSurfaceView); |
84 | 82 |
view.onResume(); |
85 | 83 |
} |
src/main/java/org/distorted/examples/differentbitmaps/DifferentBitmapsActivity.java | ||
---|---|---|
45 | 45 |
@Override |
46 | 46 |
protected void onPause() |
47 | 47 |
{ |
48 |
DistortedLibrary.onPause(); |
|
49 |
mView.onPause(); |
|
50 | 48 |
super.onPause(); |
49 |
mView.onPause(); |
|
50 |
DistortedLibrary.onPause(); |
|
51 | 51 |
} |
52 | 52 |
|
53 | 53 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/examples/differenteffects/DifferentEffectsActivity.java | ||
---|---|---|
45 | 45 |
@Override |
46 | 46 |
protected void onPause() |
47 | 47 |
{ |
48 |
DistortedLibrary.onPause(); |
|
49 |
mView.onPause(); |
|
50 | 48 |
super.onPause(); |
49 |
mView.onPause(); |
|
50 |
DistortedLibrary.onPause(); |
|
51 | 51 |
} |
52 | 52 |
|
53 | 53 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/examples/dynamic/DynamicActivity.java | ||
---|---|---|
111 | 111 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
112 | 112 |
|
113 | 113 |
@Override |
114 |
protected void onResume()
|
|
114 |
protected void onPause()
|
|
115 | 115 |
{ |
116 |
super.onResume();
|
|
117 |
|
|
116 |
super.onPause();
|
|
117 |
|
|
118 | 118 |
GLSurfaceView v1 = findViewById(R.id.dynamicSurfaceView); |
119 |
v1.onResume();
|
|
119 |
v1.onPause();
|
|
120 | 120 |
DynamicSpeedSurfaceView v2 = findViewById(R.id.dynamicSpeedSurfaceView); |
121 |
v2.onResume(); |
|
121 |
v2.onPause(); |
|
122 |
|
|
123 |
DistortedLibrary.onPause(); |
|
122 | 124 |
} |
123 | 125 |
|
124 | 126 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
125 | 127 |
|
126 | 128 |
@Override |
127 |
protected void onPause()
|
|
129 |
protected void onResume()
|
|
128 | 130 |
{ |
131 |
super.onResume(); |
|
132 |
|
|
129 | 133 |
GLSurfaceView v1 = findViewById(R.id.dynamicSurfaceView); |
130 |
v1.onPause();
|
|
134 |
v1.onResume();
|
|
131 | 135 |
DynamicSpeedSurfaceView v2 = findViewById(R.id.dynamicSpeedSurfaceView); |
132 |
v2.onPause(); |
|
133 |
|
|
134 |
DistortedLibrary.onPause(); |
|
135 |
super.onPause(); |
|
136 |
v2.onResume(); |
|
136 | 137 |
} |
137 |
|
|
138 |
|
|
138 | 139 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
139 | 140 |
|
140 | 141 |
@Override |
src/main/java/org/distorted/examples/earth/EarthActivity.java | ||
---|---|---|
65 | 65 |
@Override |
66 | 66 |
protected void onPause() |
67 | 67 |
{ |
68 |
GLSurfaceView view = this.findViewById(R.id.earthSurfaceView); |
|
69 |
if( view!=null ) view.onPause(); |
|
68 |
super.onPause(); |
|
69 |
|
|
70 |
GLSurfaceView view = findViewById(R.id.earthSurfaceView); |
|
71 |
view.onPause(); |
|
70 | 72 |
|
71 |
EarthSurfaceViewPicker pick = this.findViewById(R.id.earthSurfaceViewPicker);
|
|
72 |
if( pick!=null ) pick.onPause();
|
|
73 |
EarthSurfaceViewPicker pick = findViewById(R.id.earthSurfaceViewPicker); |
|
74 |
pick.onPause(); |
|
73 | 75 |
|
74 | 76 |
DistortedLibrary.onPause(); |
75 |
super.onPause(); |
|
76 | 77 |
} |
77 | 78 |
|
78 | 79 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
82 | 83 |
{ |
83 | 84 |
super.onResume(); |
84 | 85 |
|
85 |
GLSurfaceView view = this.findViewById(R.id.earthSurfaceView);
|
|
86 |
if( view!=null ) view.onResume();
|
|
86 |
GLSurfaceView view = findViewById(R.id.earthSurfaceView); |
|
87 |
view.onResume(); |
|
87 | 88 |
|
88 |
EarthSurfaceViewPicker pick = this.findViewById(R.id.earthSurfaceViewPicker);
|
|
89 |
if( pick!=null ) pick.onResume();
|
|
89 |
EarthSurfaceViewPicker pick = findViewById(R.id.earthSurfaceViewPicker); |
|
90 |
pick.onResume(); |
|
90 | 91 |
} |
91 | 92 |
|
92 | 93 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
105 | 106 |
{ |
106 | 107 |
super.onSaveInstanceState(savedInstanceState); |
107 | 108 |
|
108 |
EarthSurfaceViewPicker pick = this.findViewById(R.id.earthSurfaceViewPicker);
|
|
109 |
EarthSurfaceViewPicker pick = findViewById(R.id.earthSurfaceViewPicker); |
|
109 | 110 |
pick.save(savedInstanceState); |
110 | 111 |
} |
111 | 112 |
|
... | ... | |
116 | 117 |
{ |
117 | 118 |
super.onRestoreInstanceState(savedInstanceState); |
118 | 119 |
|
119 |
EarthSurfaceViewPicker pick = this.findViewById(R.id.earthSurfaceViewPicker);
|
|
120 |
EarthSurfaceViewPicker pick = findViewById(R.id.earthSurfaceViewPicker); |
|
120 | 121 |
pick.restore(savedInstanceState); |
121 | 122 |
} |
122 | 123 |
|
... | ... | |
124 | 125 |
|
125 | 126 |
public void onProgressChanged(SeekBar bar, int progress, boolean fromUser) |
126 | 127 |
{ |
127 |
switch (bar.getId())
|
|
128 |
if (bar.getId() == R.id.earthInflateLevel )
|
|
128 | 129 |
{ |
129 |
case R.id.earthInflateLevel: EarthSurfaceView view = this.findViewById(R.id.earthSurfaceView); |
|
130 |
view.getRenderer().setLevel(progress); |
|
131 |
break; |
|
130 |
EarthSurfaceView view = findViewById(R.id.earthSurfaceView); |
|
131 |
view.getRenderer().setLevel(progress); |
|
132 | 132 |
} |
133 | 133 |
} |
134 | 134 |
|
... | ... | |
136 | 136 |
|
137 | 137 |
public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) |
138 | 138 |
{ |
139 |
EarthSurfaceViewPicker mPick = this.findViewById(R.id.earthSurfaceViewPicker);
|
|
139 |
EarthSurfaceViewPicker mPick = findViewById(R.id.earthSurfaceViewPicker); |
|
140 | 140 |
mPick.setEffectMode(mEffectNames[pos]); |
141 | 141 |
} |
142 | 142 |
|
... | ... | |
144 | 144 |
|
145 | 145 |
public void Remove(View v) |
146 | 146 |
{ |
147 |
EarthSurfaceViewPicker mPick = this.findViewById(R.id.earthSurfaceViewPicker);
|
|
147 |
EarthSurfaceViewPicker mPick = findViewById(R.id.earthSurfaceViewPicker); |
|
148 | 148 |
mPick.clearPoints(); |
149 | 149 |
|
150 |
EarthSurfaceView view = this.findViewById(R.id.earthSurfaceView);
|
|
150 |
EarthSurfaceView view = findViewById(R.id.earthSurfaceView); |
|
151 | 151 |
EarthRenderer renderer = view.getRenderer(); |
152 | 152 |
|
153 | 153 |
renderer.removeAll(); |
src/main/java/org/distorted/examples/effectqueue/EffectQueueActivity.java | ||
---|---|---|
119 | 119 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
120 | 120 |
|
121 | 121 |
@Override |
122 |
protected void onResume()
|
|
122 |
protected void onPause()
|
|
123 | 123 |
{ |
124 |
super.onResume();
|
|
125 |
|
|
126 |
GLSurfaceView mView = findViewById(R.id.effects2dSurfaceView);
|
|
127 |
mView.onResume();
|
|
124 |
super.onPause();
|
|
125 |
GLSurfaceView view = findViewById(R.id.effects2dSurfaceView); |
|
126 |
view.onPause();
|
|
127 |
DistortedLibrary.onPause();
|
|
128 | 128 |
} |
129 | 129 |
|
130 | 130 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
131 | 131 |
|
132 | 132 |
@Override |
133 |
protected void onPause()
|
|
133 |
protected void onResume()
|
|
134 | 134 |
{ |
135 |
GLSurfaceView mView = findViewById(R.id.effects2dSurfaceView); |
|
136 |
mView.onPause(); |
|
137 |
|
|
138 |
DistortedLibrary.onPause(); |
|
139 |
super.onPause(); |
|
135 |
super.onResume(); |
|
136 |
GLSurfaceView view = findViewById(R.id.effects2dSurfaceView); |
|
137 |
view.onResume(); |
|
140 | 138 |
} |
141 |
|
|
139 |
|
|
142 | 140 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
143 | 141 |
|
144 | 142 |
@Override |
src/main/java/org/distorted/examples/flag/FlagActivity.java | ||
---|---|---|
99 | 99 |
@Override |
100 | 100 |
protected void onPause() |
101 | 101 |
{ |
102 |
GLSurfaceView mView = findViewById(R.id.flagSurfaceView); |
|
103 |
mView.onPause(); |
|
104 |
|
|
105 |
DistortedLibrary.onPause(); |
|
106 | 102 |
super.onPause(); |
103 |
GLSurfaceView view = findViewById(R.id.flagSurfaceView); |
|
104 |
view.onPause(); |
|
105 |
DistortedLibrary.onPause(); |
|
107 | 106 |
} |
108 | 107 |
|
109 | 108 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
112 | 111 |
protected void onResume() |
113 | 112 |
{ |
114 | 113 |
super.onResume(); |
115 |
|
|
116 |
GLSurfaceView mView = findViewById(R.id.flagSurfaceView); |
|
117 |
mView.onResume(); |
|
114 |
GLSurfaceView view = findViewById(R.id.flagSurfaceView); |
|
115 |
view.onResume(); |
|
118 | 116 |
} |
119 | 117 |
|
120 | 118 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/examples/generic/GenericActivity2.java | ||
---|---|---|
35 | 35 |
import org.distorted.library.main.DistortedEffects; |
36 | 36 |
import org.distorted.library.main.DistortedTexture; |
37 | 37 |
import org.distorted.library.mesh.MeshBase; |
38 |
import org.distorted.library.type.Static3D; |
|
39 | 38 |
import org.distorted.library.type.Static4D; |
40 | 39 |
|
41 | 40 |
import java.io.IOException; |
... | ... | |
116 | 115 |
{ |
117 | 116 |
is.close(); |
118 | 117 |
} |
119 |
catch(IOException e) { }
|
|
118 |
catch(IOException ignored) { }
|
|
120 | 119 |
} |
121 | 120 |
} |
122 | 121 |
else |
... | ... | |
280 | 279 |
@Override |
281 | 280 |
protected void onPause() |
282 | 281 |
{ |
283 |
GLSurfaceView mView = findViewById(R.id.genericSurfaceView); |
|
284 |
if( mView!=null ) mView.onPause(); |
|
285 |
|
|
286 |
DistortedLibrary.onPause(); |
|
287 | 282 |
super.onPause(); |
283 |
GLSurfaceView view = findViewById(R.id.genericSurfaceView); |
|
284 |
view.onPause(); |
|
285 |
DistortedLibrary.onPause(); |
|
288 | 286 |
} |
289 | 287 |
|
290 | 288 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
293 | 291 |
protected void onResume() |
294 | 292 |
{ |
295 | 293 |
super.onResume(); |
296 |
GLSurfaceView mView = findViewById(R.id.genericSurfaceView);
|
|
297 |
if( mView!=null ) mView.onResume();
|
|
294 |
GLSurfaceView view = findViewById(R.id.genericSurfaceView);
|
|
295 |
view.onResume();
|
|
298 | 296 |
} |
299 | 297 |
|
300 | 298 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/examples/girl/GirlActivity.java | ||
---|---|---|
70 | 70 |
@Override |
71 | 71 |
protected void onPause() |
72 | 72 |
{ |
73 |
super.onPause(); |
|
73 | 74 |
GLSurfaceView view = findViewById(R.id.girlSurfaceView); |
74 | 75 |
view.onPause(); |
75 |
|
|
76 | 76 |
DistortedLibrary.onPause(); |
77 |
super.onPause(); |
|
78 | 77 |
} |
79 | 78 |
|
80 | 79 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
83 | 82 |
protected void onResume() |
84 | 83 |
{ |
85 | 84 |
super.onResume(); |
86 |
|
|
87 | 85 |
GLSurfaceView view = findViewById(R.id.girlSurfaceView); |
88 | 86 |
view.onResume(); |
89 | 87 |
} |
src/main/java/org/distorted/examples/glow/GlowActivity.java | ||
---|---|---|
45 | 45 |
super.onCreate(savedState); |
46 | 46 |
setContentView(R.layout.glowlayout); |
47 | 47 |
|
48 |
textRadius = (TextView)findViewById(R.id.glowTextRadius);
|
|
49 |
SeekBar bar = (SeekBar)findViewById(R.id.glowSeekRadius);
|
|
48 |
textRadius = findViewById(R.id.glowTextRadius);
|
|
49 |
SeekBar bar = findViewById(R.id.glowSeekRadius); |
|
50 | 50 |
bar.setOnSeekBarChangeListener(this); |
51 | 51 |
if( savedState==null ) bar.setProgress(50); |
52 | 52 |
|
53 |
textAlpha = (TextView)findViewById(R.id.glowTextAlpha);
|
|
54 |
bar = (SeekBar)findViewById(R.id.glowSeekAlpha);
|
|
53 |
textAlpha = findViewById(R.id.glowTextAlpha); |
|
54 |
bar = findViewById(R.id.glowSeekAlpha); |
|
55 | 55 |
bar.setOnSeekBarChangeListener(this); |
56 | 56 |
if( savedState==null ) bar.setProgress(50); |
57 | 57 |
|
... | ... | |
63 | 63 |
@Override |
64 | 64 |
protected void onPause() |
65 | 65 |
{ |
66 |
GLSurfaceView view = (GLSurfaceView) this.findViewById(R.id.glowSurfaceView); |
|
66 |
super.onPause(); |
|
67 |
GLSurfaceView view = findViewById(R.id.glowSurfaceView); |
|
67 | 68 |
view.onPause(); |
68 | 69 |
DistortedLibrary.onPause(); |
69 |
super.onPause(); |
|
70 | 70 |
} |
71 | 71 |
|
72 | 72 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
75 | 75 |
protected void onResume() |
76 | 76 |
{ |
77 | 77 |
super.onResume(); |
78 |
GLSurfaceView view = (GLSurfaceView) this.findViewById(R.id.glowSurfaceView);
|
|
78 |
GLSurfaceView view = findViewById(R.id.glowSurfaceView); |
|
79 | 79 |
view.onResume(); |
80 | 80 |
} |
81 | 81 |
|
... | ... | |
121 | 121 |
|
122 | 122 |
public void onProgressChanged(SeekBar bar, int progress, boolean fromUser) |
123 | 123 |
{ |
124 |
GlowSurfaceView view = (GlowSurfaceView) this.findViewById(R.id.glowSurfaceView);
|
|
124 |
GlowSurfaceView view = findViewById(R.id.glowSurfaceView); |
|
125 | 125 |
|
126 | 126 |
switch (bar.getId()) |
127 | 127 |
{ |
... | ... | |
146 | 146 |
|
147 | 147 |
public void quality0(View v) |
148 | 148 |
{ |
149 |
GlowSurfaceView view = (GlowSurfaceView) this.findViewById(R.id.glowSurfaceView);
|
|
149 |
GlowSurfaceView view = findViewById(R.id.glowSurfaceView); |
|
150 | 150 |
GlowRenderer renderer = view.getRenderer(); |
151 | 151 |
renderer.setQuality(EffectQuality.HIGHEST); |
152 | 152 |
mQuality = EffectQuality.HIGHEST.ordinal(); |
... | ... | |
156 | 156 |
|
157 | 157 |
public void quality1(View v) |
158 | 158 |
{ |
159 |
GlowSurfaceView view = (GlowSurfaceView) this.findViewById(R.id.glowSurfaceView);
|
|
159 |
GlowSurfaceView view = findViewById(R.id.glowSurfaceView); |
|
160 | 160 |
GlowRenderer renderer = view.getRenderer(); |
161 | 161 |
renderer.setQuality(EffectQuality.HIGH); |
162 | 162 |
mQuality = EffectQuality.HIGH.ordinal(); |
... | ... | |
166 | 166 |
|
167 | 167 |
public void quality2(View v) |
168 | 168 |
{ |
169 |
GlowSurfaceView view = (GlowSurfaceView) this.findViewById(R.id.glowSurfaceView);
|
|
169 |
GlowSurfaceView view = findViewById(R.id.glowSurfaceView); |
|
170 | 170 |
GlowRenderer renderer = view.getRenderer(); |
171 | 171 |
renderer.setQuality(EffectQuality.MEDIUM); |
172 | 172 |
mQuality = EffectQuality.MEDIUM.ordinal(); |
... | ... | |
176 | 176 |
|
177 | 177 |
public void quality3(View v) |
178 | 178 |
{ |
179 |
GlowSurfaceView view = (GlowSurfaceView) this.findViewById(R.id.glowSurfaceView);
|
|
179 |
GlowSurfaceView view = findViewById(R.id.glowSurfaceView); |
|
180 | 180 |
GlowRenderer renderer = view.getRenderer(); |
181 | 181 |
renderer.setQuality(EffectQuality.LOW); |
182 | 182 |
mQuality = EffectQuality.LOW.ordinal(); |
src/main/java/org/distorted/examples/inflate/InflateActivity2.java | ||
---|---|---|
56 | 56 |
@Override |
57 | 57 |
protected void onPause() |
58 | 58 |
{ |
59 |
GLSurfaceView mView = this.findViewById(R.id.inflateSurfaceView); |
|
60 |
if( mView!=null ) mView.onPause(); |
|
61 |
|
|
62 |
DistortedLibrary.onPause(); |
|
63 | 59 |
super.onPause(); |
60 |
GLSurfaceView view = findViewById(R.id.inflateSurfaceView); |
|
61 |
view.onPause(); |
|
62 |
DistortedLibrary.onPause(); |
|
64 | 63 |
} |
65 | 64 |
|
66 | 65 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
69 | 68 |
protected void onResume() |
70 | 69 |
{ |
71 | 70 |
super.onResume(); |
72 |
|
|
73 |
GLSurfaceView mView = this.findViewById(R.id.inflateSurfaceView); |
|
74 |
if( mView!=null ) mView.onResume(); |
|
71 |
GLSurfaceView view = findViewById(R.id.inflateSurfaceView); |
|
72 |
view.onResume(); |
|
75 | 73 |
} |
76 | 74 |
|
77 | 75 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/examples/listener/ListenerActivity.java | ||
---|---|---|
45 | 45 |
@Override |
46 | 46 |
protected void onPause() |
47 | 47 |
{ |
48 |
super.onPause(); |
|
48 | 49 |
mView.onPause(); |
49 | 50 |
DistortedLibrary.onPause(); |
50 |
super.onPause(); |
|
51 | 51 |
} |
52 | 52 |
|
53 | 53 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/examples/meshfile/MeshFileActivity.java | ||
---|---|---|
69 | 69 |
@Override |
70 | 70 |
protected void onPause() |
71 | 71 |
{ |
72 |
GLSurfaceView view = this.findViewById(R.id.meshfileSurfaceView); |
|
72 |
super.onPause(); |
|
73 |
GLSurfaceView view = findViewById(R.id.meshfileSurfaceView); |
|
73 | 74 |
view.onPause(); |
74 | 75 |
DistortedLibrary.onPause(); |
75 |
super.onPause(); |
|
76 | 76 |
} |
77 | 77 |
|
78 | 78 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
81 | 81 |
protected void onResume() |
82 | 82 |
{ |
83 | 83 |
super.onResume(); |
84 |
GLSurfaceView view = this.findViewById(R.id.meshfileSurfaceView);
|
|
84 |
GLSurfaceView view = findViewById(R.id.meshfileSurfaceView); |
|
85 | 85 |
view.onResume(); |
86 | 86 |
|
87 | 87 |
if( mResource!=0 ) Open(null); |
src/main/java/org/distorted/examples/meshjoin/MeshJoinActivity.java | ||
---|---|---|
44 | 44 |
@Override |
45 | 45 |
protected void onPause() |
46 | 46 |
{ |
47 |
GLSurfaceView view = this.findViewById(R.id.meshjoinSurfaceView); |
|
47 |
super.onPause(); |
|
48 |
GLSurfaceView view = findViewById(R.id.meshjoinSurfaceView); |
|
48 | 49 |
view.onPause(); |
49 | 50 |
DistortedLibrary.onPause(); |
50 |
super.onPause(); |
|
51 | 51 |
} |
52 | 52 |
|
53 | 53 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
56 | 56 |
protected void onResume() |
57 | 57 |
{ |
58 | 58 |
super.onResume(); |
59 |
GLSurfaceView view = this.findViewById(R.id.meshjoinSurfaceView);
|
|
59 |
GLSurfaceView view = findViewById(R.id.meshjoinSurfaceView); |
|
60 | 60 |
view.onResume(); |
61 | 61 |
} |
62 | 62 |
|
src/main/java/org/distorted/examples/mirror/MirrorActivity.java | ||
---|---|---|
52 | 52 |
@Override |
53 | 53 |
protected void onPause() |
54 | 54 |
{ |
55 |
super.onPause(); |
|
55 | 56 |
GLSurfaceView view = findViewById(R.id.mirrorSurfaceView); |
56 | 57 |
view.onPause(); |
57 |
|
|
58 | 58 |
DistortedLibrary.onPause(); |
59 |
super.onPause(); |
|
60 | 59 |
} |
61 | 60 |
|
62 | 61 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
83 | 82 |
|
84 | 83 |
public void onProgressChanged(SeekBar bar, int progress, boolean fromUser) |
85 | 84 |
{ |
86 |
switch (bar.getId())
|
|
85 |
if (bar.getId() == R.id.mirrorSeek )
|
|
87 | 86 |
{ |
88 |
case R.id.mirrorSeek: MirrorSurfaceView view = findViewById(R.id.mirrorSurfaceView); |
|
89 |
view.getRenderer().setPosition(progress); |
|
90 |
break; |
|
87 |
MirrorSurfaceView view = findViewById(R.id.mirrorSurfaceView); |
|
88 |
view.getRenderer().setPosition(progress); |
|
91 | 89 |
} |
92 | 90 |
} |
93 | 91 |
|
src/main/java/org/distorted/examples/monalisa/MonaLisaActivity.java | ||
---|---|---|
45 | 45 |
@Override |
46 | 46 |
protected void onPause() |
47 | 47 |
{ |
48 |
super.onPause(); |
|
48 | 49 |
mView.onPause(); |
49 | 50 |
DistortedLibrary.onPause(); |
50 |
super.onPause(); |
|
51 | 51 |
} |
52 | 52 |
|
53 | 53 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/examples/movingeffects/MovingEffectsActivity.java | ||
---|---|---|
70 | 70 |
/////////////////////////////////////////////////////////////////// |
71 | 71 |
|
72 | 72 |
@Override |
73 |
protected void onResume()
|
|
73 |
protected void onPause()
|
|
74 | 74 |
{ |
75 |
super.onResume(); |
|
76 |
|
|
75 |
Abort(null); |
|
76 |
|
|
77 |
super.onPause(); |
|
77 | 78 |
GLSurfaceView view = findViewById(R.id.movingeffectsSurfaceView); |
78 |
view.onResume(); |
|
79 |
view.onPause(); |
|
80 |
DistortedLibrary.onPause(); |
|
79 | 81 |
} |
80 | 82 |
|
81 | 83 |
/////////////////////////////////////////////////////////////////// |
82 | 84 |
|
83 | 85 |
@Override |
84 |
protected void onPause()
|
|
86 |
protected void onResume()
|
|
85 | 87 |
{ |
86 |
Abort(null); |
|
87 |
|
|
88 |
super.onResume(); |
|
88 | 89 |
GLSurfaceView view = findViewById(R.id.movingeffectsSurfaceView); |
89 |
view.onPause(); |
|
90 |
|
|
91 |
DistortedLibrary.onPause(); |
|
92 |
super.onPause(); |
|
90 |
view.onResume(); |
|
93 | 91 |
} |
94 |
|
|
92 |
|
|
95 | 93 |
/////////////////////////////////////////////////////////////////// |
96 | 94 |
|
97 | 95 |
@Override |
src/main/java/org/distorted/examples/movingglow/MovingGlowActivity.java | ||
---|---|---|
44 | 44 |
@Override |
45 | 45 |
protected void onPause() |
46 | 46 |
{ |
47 |
super.onPause(); |
|
47 | 48 |
mView.onPause(); |
48 | 49 |
DistortedLibrary.onPause(); |
49 |
super.onPause(); |
|
50 | 50 |
} |
51 | 51 |
|
52 | 52 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/examples/multiblur/MultiblurActivity.java | ||
---|---|---|
116 | 116 |
@Override |
117 | 117 |
protected void onPause() |
118 | 118 |
{ |
119 |
GLSurfaceView view = this.findViewById(R.id.multiblurSurfaceView); |
|
119 |
super.onPause(); |
|
120 |
GLSurfaceView view = findViewById(R.id.multiblurSurfaceView); |
|
120 | 121 |
view.onPause(); |
121 | 122 |
DistortedLibrary.onPause(); |
122 |
super.onPause(); |
|
123 | 123 |
} |
124 | 124 |
|
125 | 125 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/examples/objecttree/ObjectTreeActivity.java | ||
---|---|---|
51 | 51 |
@Override |
52 | 52 |
protected void onPause() |
53 | 53 |
{ |
54 |
super.onPause(); |
|
54 | 55 |
ObjectTreeSurfaceView view = findViewById(R.id.objecttreeSurfaceView); |
55 |
|
|
56 | 56 |
view.onPause(); |
57 | 57 |
DistortedLibrary.onPause(); |
58 |
super.onPause(); |
|
59 | 58 |
} |
60 | 59 |
|
61 | 60 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
63 | 62 |
@Override |
64 | 63 |
protected void onResume() |
65 | 64 |
{ |
66 |
ObjectTreeSurfaceView view = findViewById(R.id.objecttreeSurfaceView); |
|
67 |
|
|
68 | 65 |
super.onResume(); |
66 |
ObjectTreeSurfaceView view = findViewById(R.id.objecttreeSurfaceView); |
|
69 | 67 |
view.onResume(); |
70 | 68 |
} |
71 | 69 |
|
src/main/java/org/distorted/examples/olimpic/OlimpicActivity.java | ||
---|---|---|
141 | 141 |
@Override |
142 | 142 |
protected void onPause() |
143 | 143 |
{ |
144 |
super.onPause(); |
|
144 | 145 |
GLSurfaceView view = findViewById(R.id.olimpicSurfaceView); |
145 | 146 |
view.onPause(); |
146 | 147 |
DistortedLibrary.onPause(); |
147 |
super.onPause(); |
|
148 | 148 |
} |
149 | 149 |
|
150 | 150 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/examples/postprocesstree/PostprocessTreeActivity.java | ||
---|---|---|
52 | 52 |
@Override |
53 | 53 |
protected void onPause() |
54 | 54 |
{ |
55 |
super.onPause(); |
|
55 | 56 |
GLSurfaceView view = findViewById(R.id.postprocesstreeSurfaceView); |
56 | 57 |
view.onPause(); |
57 | 58 |
DistortedLibrary.onPause(); |
58 |
super.onPause(); |
|
59 | 59 |
} |
60 | 60 |
|
61 | 61 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
83 | 83 |
{ |
84 | 84 |
PostprocessTreeSurfaceView view = findViewById(R.id.postprocesstreeSurfaceView); |
85 | 85 |
|
86 |
switch (bar.getId())
|
|
86 |
if (bar.getId() == R.id.postprocesstreeSeek)
|
|
87 | 87 |
{ |
88 |
case R.id.postprocesstreeSeek: int level = view.getRenderer().setBlur(progress); |
|
89 |
mText.setText(getString(R.string.blur_placeholder,level)); |
|
90 |
break; |
|
88 |
int level = view.getRenderer().setBlur(progress); |
|
89 |
mText.setText(getString(R.string.blur_placeholder,level)); |
|
91 | 90 |
} |
92 | 91 |
} |
93 | 92 |
|
src/main/java/org/distorted/examples/predeform/PredeformActivity2.java | ||
---|---|---|
54 | 54 |
@Override |
55 | 55 |
protected void onPause() |
56 | 56 |
{ |
57 |
GLSurfaceView mView = findViewById(R.id.predeformSurfaceView); |
|
58 |
if( mView!=null ) mView.onPause(); |
|
59 |
|
|
60 |
DistortedLibrary.onPause(); |
|
61 | 57 |
super.onPause(); |
58 |
GLSurfaceView view = findViewById(R.id.predeformSurfaceView); |
|
59 |
view.onPause(); |
|
60 |
DistortedLibrary.onPause(); |
|
62 | 61 |
} |
63 | 62 |
|
64 | 63 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
67 | 66 |
protected void onResume() |
68 | 67 |
{ |
69 | 68 |
super.onResume(); |
70 |
|
|
71 |
GLSurfaceView mView = findViewById(R.id.predeformSurfaceView); |
|
72 |
if( mView!=null ) mView.onResume(); |
|
69 |
GLSurfaceView view = findViewById(R.id.predeformSurfaceView); |
|
70 |
view.onResume(); |
|
73 | 71 |
} |
74 | 72 |
|
75 | 73 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/examples/projection/ProjectionActivity.java | ||
---|---|---|
69 | 69 |
@Override |
70 | 70 |
protected void onPause() |
71 | 71 |
{ |
72 |
GLSurfaceView mView = findViewById(R.id.surfaceViewProjection); |
|
73 |
mView.onPause(); |
|
74 |
|
|
75 |
DistortedLibrary.onPause(); |
|
76 | 72 |
super.onPause(); |
73 |
GLSurfaceView view = findViewById(R.id.surfaceViewProjection); |
|
74 |
view.onPause(); |
|
75 |
DistortedLibrary.onPause(); |
|
77 | 76 |
} |
78 | 77 |
|
79 | 78 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
82 | 81 |
protected void onResume() |
83 | 82 |
{ |
84 | 83 |
super.onResume(); |
85 |
|
|
86 |
GLSurfaceView mView = findViewById(R.id.surfaceViewProjection); |
|
87 |
mView.onResume(); |
|
84 |
GLSurfaceView view = findViewById(R.id.surfaceViewProjection); |
|
85 |
view.onResume(); |
|
88 | 86 |
} |
89 | 87 |
|
90 | 88 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/examples/quaternion/QuaternionActivity.java | ||
---|---|---|
45 | 45 |
@Override |
46 | 46 |
protected void onPause() |
47 | 47 |
{ |
48 |
super.onPause(); |
|
48 | 49 |
mView.onPause(); |
49 | 50 |
DistortedLibrary.onPause(); |
50 |
super.onPause(); |
|
51 | 51 |
} |
52 | 52 |
|
53 | 53 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/examples/rubik/RubikActivity.java | ||
---|---|---|
51 | 51 |
@Override |
52 | 52 |
protected void onPause() |
53 | 53 |
{ |
54 |
super.onPause(); |
|
54 | 55 |
GLSurfaceView view = findViewById(R.id.rubikSurfaceView); |
55 | 56 |
view.onPause(); |
56 | 57 |
DistortedLibrary.onPause(); |
57 |
super.onPause(); |
|
58 | 58 |
} |
59 | 59 |
|
60 | 60 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/examples/save/SaveActivity.java | ||
---|---|---|
79 | 79 |
@Override |
80 | 80 |
protected void onPause() |
81 | 81 |
{ |
82 |
super.onPause(); |
|
82 | 83 |
GLSurfaceView view = findViewById(R.id.saveSurfaceView); |
83 | 84 |
view.onPause(); |
84 |
|
|
85 | 85 |
DistortedLibrary.onPause(); |
86 |
super.onPause(); |
|
87 | 86 |
} |
88 | 87 |
|
89 | 88 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
92 | 91 |
protected void onResume() |
93 | 92 |
{ |
94 | 93 |
super.onResume(); |
95 |
|
|
96 | 94 |
GLSurfaceView view = findViewById(R.id.saveSurfaceView); |
97 | 95 |
view.onResume(); |
98 | 96 |
|
src/main/java/org/distorted/examples/singlemesh/SingleMeshActivity.java | ||
---|---|---|
44 | 44 |
@Override |
45 | 45 |
protected void onPause() |
46 | 46 |
{ |
47 |
GLSurfaceView view = this.findViewById(R.id.singlemeshSurfaceView); |
|
47 |
super.onPause(); |
|
48 |
GLSurfaceView view = findViewById(R.id.singlemeshSurfaceView); |
|
48 | 49 |
view.onPause(); |
49 | 50 |
DistortedLibrary.onPause(); |
50 |
super.onPause(); |
|
51 | 51 |
} |
52 | 52 |
|
53 | 53 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
56 | 56 |
protected void onResume() |
57 | 57 |
{ |
58 | 58 |
super.onResume(); |
59 |
GLSurfaceView view = this.findViewById(R.id.singlemeshSurfaceView);
|
|
59 |
GLSurfaceView view = findViewById(R.id.singlemeshSurfaceView); |
|
60 | 60 |
view.onResume(); |
61 | 61 |
} |
62 | 62 |
|
src/main/java/org/distorted/examples/sink/SinkActivity.java | ||
---|---|---|
45 | 45 |
@Override |
46 | 46 |
protected void onPause() |
47 | 47 |
{ |
48 |
super.onPause(); |
|
48 | 49 |
mView.onPause(); |
49 | 50 |
DistortedLibrary.onPause(); |
50 |
super.onPause(); |
|
51 | 51 |
} |
52 | 52 |
|
53 | 53 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/examples/starwars/StarWarsActivity.java | ||
---|---|---|
45 | 45 |
@Override |
46 | 46 |
protected void onPause() |
47 | 47 |
{ |
48 |
super.onPause(); |
|
48 | 49 |
mView.onPause(); |
49 | 50 |
mView.getRenderer().onPause(); |
50 | 51 |
DistortedLibrary.onPause(); |
51 |
super.onPause(); |
|
52 | 52 |
} |
53 | 53 |
|
54 | 54 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/examples/stencil/StencilActivity.java | ||
---|---|---|
51 | 51 |
@Override |
52 | 52 |
protected void onPause() |
53 | 53 |
{ |
54 |
super.onPause(); |
|
54 | 55 |
StencilSurfaceView view = findViewById(R.id.stencilSurfaceView); |
55 |
|
|
56 | 56 |
view.onPause(); |
57 | 57 |
DistortedLibrary.onPause(); |
58 |
super.onPause(); |
|
59 | 58 |
} |
60 | 59 |
|
61 | 60 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
63 | 62 |
@Override |
64 | 63 |
protected void onResume() |
65 | 64 |
{ |
66 |
StencilSurfaceView view = findViewById(R.id.stencilSurfaceView); |
|
67 |
|
|
68 | 65 |
super.onResume(); |
66 |
StencilSurfaceView view = findViewById(R.id.stencilSurfaceView); |
|
69 | 67 |
view.onResume(); |
70 | 68 |
} |
71 | 69 |
|
src/main/java/org/distorted/examples/surfaceview/SurfaceViewActivity.java | ||
---|---|---|
45 | 45 |
@Override |
46 | 46 |
protected void onPause() |
47 | 47 |
{ |
48 |
super.onPause(); |
|
48 | 49 |
mView.onPause(); |
49 | 50 |
DistortedLibrary.onPause(); |
50 |
super.onPause(); |
|
51 | 51 |
} |
52 | 52 |
|
53 | 53 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/examples/transparency/TransparencyActivity.java | ||
---|---|---|
102 | 102 |
@Override |
103 | 103 |
protected void onPause() |
104 | 104 |
{ |
105 |
super.onPause(); |
|
105 | 106 |
GLSurfaceView view = findViewById(R.id.transparencySurfaceView); |
106 | 107 |
view.onPause(); |
107 | 108 |
DistortedLibrary.onPause(); |
108 |
super.onPause(); |
|
109 | 109 |
} |
110 | 110 |
|
111 | 111 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/examples/triblur/TriblurActivity.java | ||
---|---|---|
123 | 123 |
@Override |
124 | 124 |
protected void onPause() |
125 | 125 |
{ |
126 |
super.onPause(); |
|
126 | 127 |
GLSurfaceView view = findViewById(R.id.triblurSurfaceView); |
127 | 128 |
view.onPause(); |
128 | 129 |
DistortedLibrary.onPause(); |
129 |
super.onPause(); |
|
130 | 130 |
} |
131 | 131 |
|
132 | 132 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/examples/wind/WindActivity.java | ||
---|---|---|
20 | 20 |
package org.distorted.examples.wind; |
21 | 21 |
|
22 | 22 |
import android.app.Activity; |
23 |
import android.opengl.GLSurfaceView; |
|
24 | 23 |
import android.os.Bundle; |
25 | 24 |
import android.widget.SeekBar; |
26 | 25 |
import android.widget.SeekBar.OnSeekBarChangeListener; |
... | ... | |
56 | 55 |
@Override |
57 | 56 |
protected void onPause() |
58 | 57 |
{ |
58 |
super.onPause(); |
|
59 | 59 |
WindSurfaceView view = findViewById(R.id.windSurfaceView); |
60 | 60 |
view.onPause(); |
61 | 61 |
view.getRenderer().pauseWind(); |
62 | 62 |
DistortedLibrary.onPause(); |
63 |
super.onPause(); |
|
64 | 63 |
} |
65 | 64 |
|
66 | 65 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
87 | 86 |
|
88 | 87 |
public void onProgressChanged(SeekBar bar, int progress, boolean fromUser) |
89 | 88 |
{ |
90 |
switch (bar.getId())
|
|
89 |
if (bar.getId() == R.id.windSeek)
|
|
91 | 90 |
{ |
92 |
case R.id.windSeek:WindSurfaceView view = findViewById(R.id.windSurfaceView); |
|
93 |
view.getRenderer().setWind(progress); |
|
94 |
windText.setText(getString(R.string.wind_placeholder,progress)); |
|
95 |
break; |
|
91 |
WindSurfaceView view = findViewById(R.id.windSurfaceView); |
|
92 |
view.getRenderer().setWind(progress); |
|
93 |
windText.setText(getString(R.string.wind_placeholder,progress)); |
|
96 | 94 |
} |
97 | 95 |
} |
98 | 96 |
|
Also available in: Unified diff
We need to pause an Activity in the following way:
1) Activity.onPause()
2) View.onPause()
3) Library.onPause()
otherwise sometimes there are artifacts when pausing!