Revision fe59d375
Added by Leszek Koltunski about 7 years ago
src/main/java/org/distorted/examples/plainmonalisa/RenderThread.java | ||
---|---|---|
32 | 32 |
|
33 | 33 |
import org.distorted.library.Distorted; |
34 | 34 |
import org.distorted.library.DistortedEffects; |
35 |
import org.distorted.library.DistortedFramebuffer; |
|
36 | 35 |
import org.distorted.library.DistortedScreen; |
37 | 36 |
import org.distorted.library.MeshFlat; |
38 | 37 |
import org.distorted.library.DistortedTexture; |
... | ... | |
63 | 62 |
private EglCore eglCore; |
64 | 63 |
private EGLSurface eglSurface; |
65 | 64 |
|
66 |
private DistortedTexture mTexture; |
|
67 | 65 |
private DistortedEffects mEffects; |
68 | 66 |
private DistortedScreen mScreen; |
69 |
private MeshFlat mMesh; |
|
70 | 67 |
private int bmpHeight, bmpWidth; |
71 | 68 |
private SurfaceView mView; |
72 | 69 |
|
... | ... | |
212 | 209 |
bmpHeight = bmp.getHeight(); |
213 | 210 |
bmpWidth = bmp.getWidth(); |
214 | 211 |
|
215 |
mTexture = new DistortedTexture(bmpWidth,bmpHeight); |
|
216 |
mTexture.setTexture(bmp); |
|
212 |
DistortedTexture texture = new DistortedTexture(bmpWidth,bmpHeight); |
|
213 |
texture.setTexture(bmp); |
|
214 |
MeshFlat mesh = new MeshFlat(9,9*bmpHeight/bmpWidth); // more-or-less square Grid with 9 columns. |
|
217 | 215 |
|
218 |
mMesh = new MeshFlat(9,9*bmpHeight/bmpWidth); // more-or-less square Grid with 9 columns. |
|
216 |
mScreen.detachAll(); |
|
217 |
mScreen.attach(texture,mEffects,mesh); |
|
219 | 218 |
|
220 | 219 |
try |
221 | 220 |
{ |
... | ... | |
268 | 267 |
eglCore.makeCurrent(eglSurface); |
269 | 268 |
|
270 | 269 |
GLES30.glClear( GLES30.GL_DEPTH_BUFFER_BIT | GLES30.GL_COLOR_BUFFER_BIT); |
271 |
mScreen.renderTo(mTexture, mMesh, mEffects, System.currentTimeMillis() );
|
|
270 |
mScreen.render( System.currentTimeMillis() );
|
|
272 | 271 |
|
273 | 272 |
eglCore.swapBuffers(eglSurface); |
274 | 273 |
} |
Also available in: Unified diff
Change the the render() API!
THis introduces some regressions with the Effects3D app.