Project

General

Profile

« Previous | Next » 

Revision fe59d375

Added by Leszek Koltunski about 7 years ago

Change the the render() API!

THis introduces some regressions with the Effects3D app.

View differences:

src/main/java/org/distorted/examples/deform/DeformRenderer.java
24 24

  
25 25
import org.distorted.library.Distorted;
26 26
import org.distorted.library.DistortedEffects;
27
import org.distorted.library.DistortedFramebuffer;
28 27
import org.distorted.library.DistortedScreen;
29 28
import org.distorted.library.DistortedTexture;
30 29
import org.distorted.library.MeshObject;
......
182 181
   public void onDrawFrame(GL10 glUnused)
183 182
     {
184 183
     GLES30.glClear( GLES30.GL_DEPTH_BUFFER_BIT | GLES30.GL_COLOR_BUFFER_BIT);
185
    
186
     long time = System.currentTimeMillis();
187
      
188
     mScreen.renderTo(stretchTexture, stretchMesh,stretchEffects,time);
189
      
184

  
190 185
     mPaint.setColor(0xffffffff);
191 186
     fpsCanvas.drawRect(0, 0, fpsW, fpsH, mPaint);
192 187
     mPaint.setColor(0xff000000);
193 188
     fpsCanvas.drawText(fpsString, fpsW/2, 5*fpsH/6, mPaint);
194
      
195 189
     fpsTexture.setTexture(fpsBitmap);
196
     mScreen.renderTo(fpsTexture, fpsMesh,fpsEffects,time);
197
      
190

  
191
     long time = System.currentTimeMillis();
192

  
193
     mScreen.render(time);
198 194
     computeFPS(time);
199 195
     }
200 196

  
......
215 211
       stretchEffects.move( new Static3D(scrWidth/4,scrHeight/4,0) );
216 212
       fpsEffects.move( new Static3D(5,5,0) );
217 213
       bitmapCreated=true;
214

  
215
       mScreen.detachAll();
216
       mScreen.attach(stretchTexture,stretchEffects,stretchMesh);
217
       mScreen.attach(fpsTexture,fpsEffects,fpsMesh);
218 218
       }
219 219
     else
220 220
       {

Also available in: Unified diff