public void initGL(){
  mEglCore=new EglCore(null,EglCore.FLAG_RECORDABLE | EglCore.FLAG_TRY_GLES3);
  mWindowSurface=new WindowSurface(mEglCore,mSurfaceTexture);
  mWindowSurface.makeCurrent();
  mRecordSurface=new WindowSurface(mEglCore,mMediaRecorder.getSurface(),false);
  initGLComponents();
}

public void initGL ( ) { mEglCore = new EglCore ( null , EglCore . FLAG_RECORDABLE | EglCore . FLAG_TRY_GLES3 ) ; mWindowSurface = new WindowSurface ( mEglCore , mSurfaceTexture ) ; mWindowSurface . makeCurrent ( ) ; mRecordSurface = new WindowSurface ( mEglCore , mMediaRecorder . getSurface ( ) , false ) ; initGLComponents ( ) ; }
initialize all necessary components for gles rendering , creating window surfaces for drawing the preview as well as the surface that will be used by mediarecorder for recording
