Revision fe59d375
Added by Leszek Koltunski about 7 years ago
src/main/java/org/distorted/examples/multiblur/MultiblurRenderer.java | ||
---|---|---|
27 | 27 |
import org.distorted.examples.R; |
28 | 28 |
import org.distorted.library.Distorted; |
29 | 29 |
import org.distorted.library.DistortedEffects; |
30 |
import org.distorted.library.DistortedFramebuffer; |
|
31 | 30 |
import org.distorted.library.DistortedScreen; |
32 | 31 |
import org.distorted.library.DistortedTexture; |
33 | 32 |
import org.distorted.library.EffectTypes; |
34 | 33 |
import org.distorted.library.MeshCubes; |
35 |
import org.distorted.library.MeshObject; |
|
36 | 34 |
import org.distorted.library.type.DynamicQuat; |
37 | 35 |
import org.distorted.library.type.Static1D; |
38 | 36 |
import org.distorted.library.type.Static3D; |
... | ... | |
67 | 65 |
private DistortedTexture mTex1, mTex2; |
68 | 66 |
private DistortedEffects[] mEffects; |
69 | 67 |
private Static3D[] mMoveVector; |
70 |
private MeshObject mMesh; |
|
71 | 68 |
private DistortedScreen mScreen; |
72 | 69 |
private DynamicQuat mQuatInt1, mQuatInt2; |
73 | 70 |
|
... | ... | |
88 | 85 |
|
89 | 86 |
mEffects[0].blur(new Static1D(10)); |
90 | 87 |
|
91 |
mMesh = new MeshCubes(1,1,false);
|
|
88 |
MeshCubes mesh = new MeshCubes(1,1,false);
|
|
92 | 89 |
|
93 | 90 |
mTex1 = new DistortedTexture(OBJ_SIZE,OBJ_SIZE); |
94 | 91 |
mTex2 = new DistortedTexture(OBJ_SIZE,OBJ_SIZE); |
... | ... | |
103 | 100 |
mQuatInt2.add(mQuat2); |
104 | 101 |
|
105 | 102 |
mScreen = new DistortedScreen(); |
103 |
|
|
104 |
for(int i=0; i<NUM_OBJECTS; i++) |
|
105 |
mScreen.attach( i<NUM_OBJECTS/2 ? mTex1:mTex2, mEffects[i], mesh); |
|
106 | 106 |
} |
107 | 107 |
|
108 | 108 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
110 | 110 |
public void onDrawFrame(GL10 glUnused) |
111 | 111 |
{ |
112 | 112 |
GLES30.glClear( GLES30.GL_DEPTH_BUFFER_BIT | GLES30.GL_COLOR_BUFFER_BIT); |
113 |
|
|
114 |
long time = System.currentTimeMillis(); |
|
115 |
|
|
116 |
for(int i=0; i<NUM_OBJECTS; i++) |
|
117 |
mScreen.renderTo( i<NUM_OBJECTS/2 ? mTex1:mTex2, mMesh, mEffects[i], time ); |
|
113 |
mScreen.render( System.currentTimeMillis() ); |
|
118 | 114 |
} |
119 | 115 |
|
120 | 116 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Change the the render() API!
THis introduces some regressions with the Effects3D app.