Project

General

Profile

« Previous | Next » 

Revision e52f9d96

Added by Leszek Koltunski almost 8 years ago

Fix a bug in PlainMonaLisa - avoid a crash on screen rotate

View differences:

src/main/java/org/distorted/examples/plainmonalisa/RenderThread.java
237 237

  
238 238
  public void doFrame(long frameTimeNs)
239 239
    {
240
    Trace.beginSection("doFrame draw");
240
    if( PlainMonaLisaSurfaceView.isPaused() )
241
      {
242
      android.util.Log.e("Thread", "Got here after onPaused- ignoring frame draw call!!");
243
      return;
244
      }
245

  
241 246
    eglCore.makeCurrent(eglSurface);
242 247

  
243 248
    GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
......
245 250
    monaLisa.draw(System.currentTimeMillis());
246 251

  
247 252
    eglCore.swapBuffers(eglSurface);
248
    Trace.endSection();
249 253
    }
250 254

  
251 255
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff