Revision fe59d375
Added by Leszek Koltunski about 7 years ago
src/main/java/org/distorted/examples/movingeffects/MovingEffectsRenderer.java | ||
---|---|---|
29 | 29 |
import android.opengl.GLES30; |
30 | 30 |
import android.opengl.GLSurfaceView; |
31 | 31 |
|
32 |
import org.distorted.library.DistortedFramebuffer; |
|
33 | 32 |
import org.distorted.library.DistortedScreen; |
34 | 33 |
import org.distorted.library.DistortedTexture; |
35 | 34 |
import org.distorted.library.DistortedEffects; |
... | ... | |
46 | 45 |
private Paint mPaint; |
47 | 46 |
private int texW, texH; |
48 | 47 |
|
49 |
private MeshFlat mMesh; |
|
50 | 48 |
private DistortedEffects mEffects; |
51 | 49 |
private DistortedTexture mTexture; |
52 | 50 |
private DistortedScreen mScreen; |
... | ... | |
127 | 125 |
texW = width; |
128 | 126 |
texH = height; |
129 | 127 |
|
130 |
mMesh = new MeshFlat(80,80*texH/texW); |
|
131 | 128 |
mTexture = new DistortedTexture(texW,texH); |
132 | 129 |
mBitmap = Bitmap.createBitmap(texW,texH, Bitmap.Config.ARGB_8888); |
133 | 130 |
mCanvas = new Canvas(mBitmap); |
134 | 131 |
|
132 |
mScreen.detachAll(); |
|
133 |
mScreen.attach(mTexture,mEffects,new MeshFlat(80,80*texH/texW)); |
|
135 | 134 |
mScreen.resize(texW, texH); |
136 | 135 |
mView.onSurfaceChanged(texW,texH); |
137 | 136 |
|
... | ... | |
154 | 153 |
mRefresh = false; |
155 | 154 |
} |
156 | 155 |
|
157 |
mScreen.renderTo(mTexture, mMesh, mEffects, time );
|
|
156 |
mScreen.render(time);
|
|
158 | 157 |
} |
159 | 158 |
|
160 | 159 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Change the the render() API!
THis introduces some regressions with the Effects3D app.