Revision fe59d375
Added by Leszek Koltunski about 7 years ago
src/main/java/org/distorted/examples/catanddog/CatAndDogRenderer.java | ||
---|---|---|
28 | 28 |
import org.distorted.examples.R; |
29 | 29 |
import org.distorted.library.Distorted; |
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.DistortedTexture; |
34 | 33 |
import org.distorted.library.MeshFlat; |
... | ... | |
50 | 49 |
{ |
51 | 50 |
private GLSurfaceView mView; |
52 | 51 |
private DistortedEffects mEffects; |
53 |
private DistortedTexture mTexture; |
|
54 | 52 |
private MeshFlat mMesh; |
55 | 53 |
private DistortedScreen mScreen; |
56 | 54 |
private int bmpHeight, bmpWidth; |
... | ... | |
87 | 85 |
public void onDrawFrame(GL10 glUnused) |
88 | 86 |
{ |
89 | 87 |
GLES30.glClear( GLES30.GL_DEPTH_BUFFER_BIT | GLES30.GL_COLOR_BUFFER_BIT); |
90 |
mScreen.renderTo(mTexture, mMesh, mEffects, System.currentTimeMillis() );
|
|
88 |
mScreen.render( System.currentTimeMillis() );
|
|
91 | 89 |
} |
92 | 90 |
|
93 | 91 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
115 | 113 |
bmpHeight = bitmap.getHeight(); |
116 | 114 |
bmpWidth = bitmap.getWidth(); |
117 | 115 |
|
118 |
mTexture = new DistortedTexture(bmpWidth,bmpHeight); |
|
119 |
mTexture.setTexture(bitmap); |
|
116 |
DistortedTexture texture = new DistortedTexture(bmpWidth,bmpHeight); |
|
117 |
texture.setTexture(bitmap); |
|
118 |
|
|
119 |
mScreen.detachAll(); |
|
120 |
mScreen.attach(texture,mEffects,mMesh); |
|
120 | 121 |
|
121 | 122 |
try |
122 | 123 |
{ |
Also available in: Unified diff
Change the the render() API!
THis introduces some regressions with the Effects3D app.