Revision fe59d375
Added by Leszek Koltunski about 7 years ago
src/main/java/org/distorted/examples/bean/BeanRenderer.java | ||
---|---|---|
28 | 28 |
import org.distorted.examples.R; |
29 | 29 |
|
30 | 30 |
import org.distorted.library.DistortedEffects; |
31 |
import org.distorted.library.DistortedFramebuffer; |
|
32 | 31 |
import org.distorted.library.DistortedScreen; |
33 | 32 |
import org.distorted.library.EffectTypes; |
34 | 33 |
import org.distorted.library.Distorted; |
... | ... | |
48 | 47 |
class BeanRenderer implements GLSurfaceView.Renderer |
49 | 48 |
{ |
50 | 49 |
private GLSurfaceView mView; |
51 |
private DistortedTexture mTexture; |
|
52 | 50 |
private DistortedEffects mEffects; |
53 | 51 |
private DistortedScreen mScreen; |
54 |
private MeshFlat mMesh; |
|
55 | 52 |
private int bmpHeight, bmpWidth; |
56 | 53 |
|
57 | 54 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
98 | 95 |
public void onDrawFrame(GL10 glUnused) |
99 | 96 |
{ |
100 | 97 |
GLES30.glClear( GLES30.GL_DEPTH_BUFFER_BIT | GLES30.GL_COLOR_BUFFER_BIT); |
101 |
mScreen.renderTo(mTexture, mMesh, mEffects, System.currentTimeMillis() );
|
|
98 |
mScreen.render( System.currentTimeMillis() );
|
|
102 | 99 |
} |
103 | 100 |
|
104 | 101 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
152 | 149 |
bmpHeight = bitmap.getHeight(); |
153 | 150 |
bmpWidth = bitmap.getWidth(); |
154 | 151 |
|
155 |
mTexture = new DistortedTexture(bmpWidth,bmpHeight); |
|
156 |
mTexture.setTexture(bitmap); |
|
157 |
mMesh = new MeshFlat(25,25*bmpHeight/bmpWidth); |
|
152 |
DistortedTexture texture = new DistortedTexture(bmpWidth,bmpHeight); |
|
153 |
texture.setTexture(bitmap); |
|
154 |
MeshFlat mesh = new MeshFlat(25,25*bmpHeight/bmpWidth); |
|
155 |
|
|
156 |
mScreen.detachAll(); |
|
157 |
mScreen.attach(texture,mEffects,mesh); |
|
158 | 158 |
|
159 | 159 |
try |
160 | 160 |
{ |
Also available in: Unified diff
Change the the render() API!
THis introduces some regressions with the Effects3D app.