Revision fe59d375
Added by Leszek Koltunski about 7 years ago
src/main/java/org/distorted/examples/listener/ListenerRenderer.java | ||
---|---|---|
29 | 29 |
import org.distorted.examples.R; |
30 | 30 |
|
31 | 31 |
import org.distorted.library.Distorted; |
32 |
import org.distorted.library.DistortedFramebuffer; |
|
33 | 32 |
import org.distorted.library.DistortedScreen; |
34 | 33 |
import org.distorted.library.MeshFlat; |
35 | 34 |
import org.distorted.library.DistortedTexture; |
... | ... | |
54 | 53 |
private final int NUM_BUBBLES = 12; |
55 | 54 |
|
56 | 55 |
private GLSurfaceView mView; |
57 |
private DistortedTexture mTexture; |
|
58 | 56 |
private DistortedEffects mEffects; |
59 | 57 |
private DistortedScreen mScreen; |
60 |
private MeshFlat mMesh; |
|
61 | 58 |
private int bmpHeight, bmpWidth; |
62 | 59 |
private Random mRnd; |
63 | 60 |
|
... | ... | |
107 | 104 |
public void onDrawFrame(GL10 glUnused) |
108 | 105 |
{ |
109 | 106 |
GLES30.glClear( GLES30.GL_DEPTH_BUFFER_BIT | GLES30.GL_COLOR_BUFFER_BIT); |
110 |
mScreen.renderTo(mTexture, mMesh, mEffects, System.currentTimeMillis() );
|
|
107 |
mScreen.render( System.currentTimeMillis() );
|
|
111 | 108 |
} |
112 | 109 |
|
113 | 110 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
161 | 158 |
bmpHeight = bitmap.getHeight(); |
162 | 159 |
bmpWidth = bitmap.getWidth(); |
163 | 160 |
|
164 |
mMesh = new MeshFlat(50,50*bmpHeight/bmpWidth); |
|
165 |
mTexture = new DistortedTexture(bmpWidth,bmpHeight); |
|
166 |
mTexture.setTexture(bitmap); |
|
161 |
MeshFlat mesh = new MeshFlat(50,50*bmpHeight/bmpWidth); |
|
162 |
DistortedTexture texture = new DistortedTexture(bmpWidth,bmpHeight); |
|
163 |
texture.setTexture(bitmap); |
|
164 |
|
|
165 |
mScreen.detachAll(); |
|
166 |
mScreen.attach(texture,mEffects,mesh); |
|
167 | 167 |
|
168 | 168 |
for(int i=0; i<NUM_BUBBLES; i++) randomizeNewBubble(); |
169 | 169 |
|
Also available in: Unified diff
Change the the render() API!
THis introduces some regressions with the Effects3D app.