Revision 66d31749
Added by Leszek Koltunski almost 7 years ago
src/main/java/org/distorted/examples/blur/BlurRenderer.java | ||
---|---|---|
30 | 30 |
import org.distorted.library.effect.PostprocessEffectBlur; |
31 | 31 |
import org.distorted.library.main.Distorted; |
32 | 32 |
import org.distorted.library.main.DistortedEffects; |
33 |
import org.distorted.library.main.DistortedEffectsPostprocess; |
|
34 | 33 |
import org.distorted.library.main.DistortedNode; |
35 | 34 |
import org.distorted.library.main.DistortedScreen; |
36 | 35 |
import org.distorted.library.main.DistortedTexture; |
... | ... | |
52 | 51 |
private GLSurfaceView mView; |
53 | 52 |
private DistortedTexture mTexture; |
54 | 53 |
private DistortedEffects mEffects; |
55 |
private DistortedEffectsPostprocess mPostEffects; |
|
56 | 54 |
private DistortedScreen mScreen; |
57 | 55 |
private MeshFlat mMesh; |
58 | 56 |
private Static1D mRadiusSta; |
... | ... | |
63 | 61 |
|
64 | 62 |
BlurRenderer(GLSurfaceView v) |
65 | 63 |
{ |
66 |
mView = v; |
|
67 |
mMesh = new MeshFlat(1,1); |
|
68 |
mEffects = new DistortedEffects(); |
|
69 |
mPostEffects = new DistortedEffectsPostprocess(); |
|
70 |
mScreen = new DistortedScreen(mView); |
|
64 |
mView = v; |
|
65 |
mMesh = new MeshFlat(1,1); |
|
66 |
mScreen = new DistortedScreen(mView); |
|
71 | 67 |
|
72 | 68 |
mRadiusSta = new Static1D(5); |
73 | 69 |
Dynamic1D radiusDyn = new Dynamic1D(); |
... | ... | |
76 | 72 |
mMove = new Static3D(0,0,0); |
77 | 73 |
mScale= new Static3D(1,1,1); |
78 | 74 |
|
79 |
mPostEffects.apply( new PostprocessEffectBlur(radiusDyn) ); |
|
75 |
mEffects = new DistortedEffects(); |
|
76 |
mEffects.apply( new PostprocessEffectBlur(radiusDyn) ); |
|
80 | 77 |
mEffects.apply(new MatrixEffectMove(mMove)); |
81 | 78 |
mEffects.apply(new MatrixEffectScale(mScale)); |
82 | 79 |
} |
... | ... | |
146 | 143 |
mTexture.setTexture(bitmap); |
147 | 144 |
|
148 | 145 |
mScreen.detachAll(); |
149 |
DistortedNode node = new DistortedNode(mTexture,mEffects,mMesh); |
|
150 |
node.setPostprocessEffects(mPostEffects); |
|
151 |
mScreen.attach(node); |
|
146 |
mScreen.attach(new DistortedNode(mTexture,mEffects,mMesh)); |
|
152 | 147 |
|
153 | 148 |
DistortedEffects.enableEffect(EffectName.BLUR); |
154 | 149 |
|
Also available in: Unified diff
Remove DistortedEffectsPostprocess and unify it with DistortedEffects.
Job not finished - doesn't compile now!