Project

General

Profile

« Previous | Next » 

Revision 855ba24e

Added by Leszek Koltunski about 7 years ago

New 'glClearColor' and 'glClearDepthf' APIs in OutputSurface. This fixes the 'transparency' regressions from last commit.

View differences:

src/main/java/org/distorted/examples/plainmonalisa/RenderThread.java
189 189
    eglSurface = eglCore.createWindowSurface(surface);
190 190
    eglCore.makeCurrent(eglSurface);
191 191

  
192
    GLES30.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
193

  
194 192
    InputStream is = mView.getContext().getResources().openRawResource(R.raw.monalisa);
195 193
    Bitmap bmp;
196 194

  
......
268 266
      }
269 267

  
270 268
    eglCore.makeCurrent(eglSurface);
271

  
272
    GLES30.glClear( GLES30.GL_DEPTH_BUFFER_BIT | GLES30.GL_COLOR_BUFFER_BIT);
273
    mScreen.render( System.currentTimeMillis() );
274

  
269
    mScreen.render( frameTimeNs/1000000 );  // 1 nanosecond = 1 millisecond / 10^-6
275 270
    eglCore.swapBuffers(eglSurface);
276 271
    }
277 272

  

Also available in: Unified diff