Revision 42f65cb4
Added by Leszek Koltunski almost 7 years ago
src/main/java/org/distorted/examples/deform/DeformRenderer.java | ||
---|---|---|
22 | 22 |
import javax.microedition.khronos.egl.EGLConfig; |
23 | 23 |
import javax.microedition.khronos.opengles.GL10; |
24 | 24 |
|
25 |
import org.distorted.library.effect.EffectName; |
|
25 | 26 |
import org.distorted.library.main.Distorted; |
26 | 27 |
import org.distorted.library.main.DistortedEffects; |
27 | 28 |
import org.distorted.library.main.DistortedScreen; |
... | ... | |
29 | 30 |
import org.distorted.library.main.MeshObject; |
30 | 31 |
import org.distorted.library.main.MeshFlat; |
31 | 32 |
|
32 |
import org.distorted.library.EffectNames; |
|
33 | 33 |
import org.distorted.library.type.Dynamic3D; |
34 | 34 |
import org.distorted.library.type.Static3D; |
35 | 35 |
import org.distorted.library.type.Static4D; |
... | ... | |
68 | 68 |
private int scrHeight, scrWidth; |
69 | 69 |
private float mRadius; |
70 | 70 |
|
71 |
private EffectNames mMode = EffectNames.DISTORT;
|
|
72 |
private long mLastEffect = -1;
|
|
71 |
private EffectName mMode = EffectName.DISTORT;
|
|
72 |
private EffectName mLastEffect = EffectName.DISTORT;
|
|
73 | 73 |
|
74 | 74 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
75 | 75 |
|
... | ... | |
134 | 134 |
|
135 | 135 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
136 | 136 |
|
137 |
void setMode(EffectNames mode)
|
|
137 |
void setMode(EffectName mode) |
|
138 | 138 |
{ |
139 | 139 |
mMode = mode; |
140 | 140 |
} |
... | ... | |
203 | 203 |
|
204 | 204 |
public void onSurfaceCreated(GL10 glUnused, EGLConfig config) |
205 | 205 |
{ |
206 |
DistortedEffects.enableEffect(EffectNames.DISTORT);
|
|
207 |
DistortedEffects.enableEffect(EffectNames.DEFORM);
|
|
206 |
DistortedEffects.enableEffect(EffectName.DISTORT); |
|
207 |
DistortedEffects.enableEffect(EffectName.DEFORM); |
|
208 | 208 |
|
209 | 209 |
try |
210 | 210 |
{ |
... | ... | |
263 | 263 |
|
264 | 264 |
void up() |
265 | 265 |
{ |
266 |
stretchEffects.abortEffect(mLastEffect);
|
|
266 |
stretchEffects.abortByName(mLastEffect);
|
|
267 | 267 |
|
268 | 268 |
float damp = -0.65f; |
269 | 269 |
|
Also available in: Unified diff
Further progress with Apps.