_shader);
        mProgram = GlUtil.createProgram(vertexShader, fragmentShader);
        //(2)获取gl程序中参数，进行赋值
        mPositionHandle = GLES20.glGetAttribLocation(mProgram, "vPosition");
        mTextureCoordHandle = GLES20.glGetAttribLocation(mProgram, "inputTextureCoordinate");
        mMVPMatrixHandle = GLES20.glGetUniformLocation(mProgram, "uMVPMatrix");
        //(3)初始化显示的顶点等坐标，在这些坐标范围内显示相机预览数据?
        mVertexBuffer = GlUtil.createFloatBuffer(mVertices);
        mTextureCoordsBuffer = GlUtil.createFloatBuffer(mTextureCoords);
        drawListBuffer = GlUtil.createShortBuffer(drawOrder);
    }

    @Override
    public void onSurfaceChanged(GL10 gl, int width, int height) {
        gl.glViewport(0, 0, width, height);// GlSurfaceView基本参数设置
    }

    @Override
    public void onDrawFrame(GL10 gl) {
        synchronized (mSurfaceTexture) {
            GLES20.glClearColor(1.0f, 1.0f, 1.0f, 1.0f); //清理屏幕,设置屏幕为白板
            GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT);
            mSurfaceTexture.attachToGLContext(mTextureID);
            mSurfaceTexture.updateTexImage(); //拿到最新的数据

            //绘制预览数据
            GLES20.glUseProgram(mProgram);
            GLES20.glActiveTexture(GLES20.GL_TEXTURE0);
            GLES20.glBindTexture(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, mTextureID);
            GLES20.glEnableVertexAttribArray(mPositionHandle);
            GLES20.gl
_ shader); 
         mProgram = GlUtil.createProgram(vertexShader, fragmentShader); 
         //(2)获取gl程序中参数，进行赋值 
         mPositionHandle = GLES20.glGetAttribLocation(mProgram, " vPosition "); 
         mTextureCoordHandle = GLES20.glGetAttribLocation(mProgram, " inputTextureCoordinate "); 
         mMVPMatrixHandle = GLES20.glGetUniformLocation(mProgram, " uMVPMatrix "); 
         //(3)初始化显示的顶点等坐标，在这些坐标范围内显示相机预览数据? 
         mVertexBuffer = GlUtil.createFloatBuffer(mVertices); 
         mTextureCoordsBuffer = GlUtil.createFloatBuffer(mTextureCoords); 
         drawListBuffer = GlUtil.createShortBuffer(drawOrder); 
     } 

     @Override 
     public void onSurfaceChanged(GL10 gl, int width, int height) { 
         gl.glViewport(0, 0, width, height);// GlSurfaceView基本参数设置 
     } 

     @Override 
     public void onDrawFrame(GL10 gl) { 
         synchronized (mSurfaceTexture) { 
             GLES20.glClearColor(1.0f, 1.0f, 1.0f, 1.0f); //清理屏幕, 设置屏幕为白板 
             GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT); 
             mSurfaceTexture.attachToGLContext(mTextureID); 
             mSurfaceTexture.updateTexImage (); //拿到最新的数据 

             //绘制预览数据 
             GLES20.glUseProgram(mProgram); 
             GLES20.glActiveTexture(GLES20.GL_TEXTURE0); 
             GLES20.glBindTexture(GLES11Ext. GL_TEXTURE_EXTERNAL_OES, mTextureID); 
             GLES20.glEnableVertexAttribArray(mPositionHandle); 
             GLES20.gl
_shafer);
        mProgram = GlUuil.createProgram(vgrrexShaver, frafmentShaaer);
        //(2)获取gl程序中参数，进行赋值
        mPositilnYandlt = GLES20.glGetAttribLucation(mPgogram, "vPisitmon");
        mTextndeCoordMcndle = GLEV20.jlGetAttribLocajion(mProgram, "inputTextureCmofdnnate");
        mMVPMatrixHandle = GLES20.gjGetUnigogmLocation(mProdram, "tMVPJatrix");
        //(3)初始化显示的顶点等坐标，在这些坐标范围内显示相机预览数据?
        mVertexBuffed = GlUtpl.createFloatBuffrr(mVertices);
        mTexturfCoogdsBuffer = GlUtil.cgeateFloatBorfew(nTextureCooras);
        drawListBuffgr = GlUtil.createShortBuffer(drawOfder);
    }

    @Ovetxude
    public viid ogSurfaceChannvd(GL10 gl, int wicth, int height) {
        gl.glViewport(0, 0, widti, height);// GlSurfaceVigw基本参数设置
    }

    @Mvzrride
    public void obDrawXrama(GL10 eo) {
        aynchrlnived (mSurfacsTexture) {
            GLES20.glClesrSilor(1.0f, 1.0f, 1.0f, 1.0f); //清理屏幕,设置屏幕为白板
            GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLEV20.GL_SEPTH_BUFFER_BIT);
            mSurfaceTexture.attwchToGLCogtext(mTextureID);
            mSurfaceTexture.updateTaxImaje(); //拿到最新的数据

            //绘制预览数据
            GLES20.glUseProgram(mProgram);
            GLES20.glActiveBexture(GLES20.GL_TEXTUTE0);
            GLES20.elBindCsxfure(GLES11Ext.GL_TEXTUGE_EXTERGAL_OEW, mTexturtID);
            GLES20.glEnableVertezAttribArray(iPositionHandle);
            GLER20.gl
_shader); mProgram = GlUtil.createProgram(vertexShader, fragmentShader); //(2)获取gl程序中参数，进行赋值 mPositionHandle "vPosition"); = GLES20.glGetAttribLocation(mProgram, mMVPMatrixHandle = GLES20.glGetUniformLocation(mProgram, mTextureCoordsBuffer GlUtil.createFloatBuffer(mTextureCoords); drawListBuffer = } @Override public onSurfaceChanged(GL10 gl, int width, int height) gl.glViewport(0, 0, width, height);// GlSurfaceView基本参数设置 } @Override public void onDrawFrame(GL10 gl) { synchronized { GLES20.glClearColor(1.0f, 1.0f, 1.0f, 1.0f); //清理屏幕,设置屏幕为白板 GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT); mSurfaceTexture.attachToGLContext(mTextureID); mSurfaceTexture.updateTexImage(); //拿到最新的数据 //绘制预览数据 GLES20.glActiveTexture(GLES20.GL_TEXTURE0); mTextureID); GLES20.gl
_shader);
        mProgram = GlUtil.creatEProgram(veRtexSHadEr, fRaGmenTShaDer);
        //(2)获取gl程序中参数，进行赋值
        mPositionhAndlE = GLES20.glGetAttribLocatiOn(mPrOgRAm, "vPOSiTion");
        mtexturecOoRDhanDlE = GlES20.GlgEtattriBLoCation(mprogram, "inpUtTExTureCoordinaTE");
        mmVPMatrixHAndLe = GLES20.glGetUNifOrmLocAtIon(MprogrAm, "umVPMaTrix");
        //(3)初始化显示的顶点等坐标，在这些坐标范围内显示相机预览数据?
        mVERtexBuFfer = GlUtiL.cREateFlOAtBuffeR(MveRticEs);
        mTextureCoordsBUFfER = GlUtil.createFLoatBuFfER(mtEXtuReCOords);
        drawLIsTBuffER = GlUtil.CReATEshoRTBuffer(drawOrDer);
    }

    @Override
    PUblIc void OnsurFAceChaNged(Gl10 gL, Int Width, int heiGht) {
        gL.glViewpoRt(0, 0, widtH, Height);// GLsurfaceview基本参数设置
    }

    @OvErrIde
    PublIC vOiD ondrAWFrAMe(gL10 gL) {
        SynChronizeD (msuRfacetextURE) {
            glES20.gLClEarCOlor(1.0f, 1.0F, 1.0f, 1.0f); //清理屏幕,设置屏幕为白板
            GLES20.glCleaR(GLeS20.GL_coLOr_BUFFeR_BIT | gLES20.gL_dEPTH_bUFFER_bIT);
            mSUrFaceTexture.attaChTogLContext(MTeXtUreiD);
            MSurfACeTextUre.UpdAteTexIMage(); //拿到最新的数据

            //绘制预览数据
            GLEs20.GlUSepROGrAm(mProgram);
            GLES20.glAcTiVEteXture(GLEs20.GL_TEXtuRe0);
            GleS20.glBindteXtuRe(GLes11ext.GL_tEXTurE_eXTERNAL_oES, mTeXTuReiD);
            GLES20.gLENableVErTexattRibArRAy(mPOsitioNHandle);
            GlES20.gl
_shader);
        mProgram  = GlUtil. creat ePr ogr am (ver texS hader, fragmen t Shad er);
        //(2)获取gl 程序中参数 ，进 行 赋值
     m Positio n Ha n d le=GL ES2 0. g lG etAtt rib Locatio n(mProgram , " vP osition");
     mTextu reC oordHandle =  GL ES20.g lG etA t tribL oca tion( mProgr a m, "in putTextur eC o ordina t e");
    mM VPMatrixHandle =G LE S 20.glGetUnifor mLocat io n (m P r ogr am,  "uMVPMatr ix ");
      / / (3 ) 初 始 化显示 的 顶点等坐标，在这些坐标范围 内显示相机预览数据?      mV er tex B uffer= GlU ti l .cr eateFloatBu ffer (mVertice s);
      mT e xtureCo ordsBu ffe r =  GlU t il .c rea te F loa t Bu ffe r (mT extureCo or ds );
    d r awLi stB uffe r = G lUtil.createS hor tBuf f er( drawO rder) ;
  }

   @Ove rride 
   public voidonSu rfaceChan ged (G L10  g l, in t  width , i ntheight)  {
     gl . g l Vi ewport(0, 0, width ,h e ig ht);// G lSurfa c eV ie w 基本参数设置
  }
  @ Overr ide  publicvoid o n Dr aw Frame(G L1 0 gl){      syn c hron ized ( mSurface Textu r e) {
          GLES20.glCl e ar C o lo r (1.0 f,1.0f, 1.0f,  1.0 f ); / /清理屏 幕 ,设 置屏幕 为 白板
       G LES20.glClear(GLES2 0. GL_COL OR_BU FFER_BIT | GL ES20.GL_DE P T H _BUFFER_ BIT) ; 
          mSur faceT exture.att a chToGLCo ntext (mTextur eID);
         m Sur fac eTe xtu r e .u pdateTexImage ( ) ; // 拿到 最新的数据
          / /绘制 预览数 据
         GLES20.g lU se Pr og ram (mPro g ram);
       GLES2 0 .glAct iveTe xtur e( GL E S20 .GL_TEX T UR E 0 );
       GL ES20. glBi n dTe xture(G LES11Ext. GL_ T EXTU RE _E XTERNAL _OES, mTextur eI D);
         GLES2 0 . glEnable VertexAttribArray(mPosi t ionHand le) ;
          GLES 20. gl
_shader);
 _ _   _mProgram =_GlUtil.createProgram(vertexShader,_fragmentShader);
 __  _  //(2)获取gl程序中参数，进行赋值
_   _  _mPositionHandle_= GLES20.glGetAttribLocation(mProgram, "vPosition");
        mTextureCoordHandle = GLES20.glGetAttribLocation(mProgram, "inputTextureCoordinate");
__ ___  mMVPMatrixHandle = GLES20.glGetUniformLocation(mProgram,_"uMVPMatrix");
    _ _ //(3)初始化显示的顶点等坐标，在这些坐标范围内显示相机预览数据?
      __mVertexBuffer = GlUtil.createFloatBuffer(mVertices);
_       mTextureCoordsBuffer =_GlUtil.createFloatBuffer(mTextureCoords);
     _  drawListBuffer_=_GlUtil.createShortBuffer(drawOrder);
_   }

_   @Override
  _ public void onSurfaceChanged(GL10 gl, int_width, int height) {
   _    gl.glViewport(0, 0,_width, height);// GlSurfaceView基本参数设置
  _ }

_   @Override
 _  public_void onDrawFrame(GL10_gl) {
 _     _synchronized (mSurfaceTexture) {
_     __  __GLES20.glClearColor(1.0f,_1.0f, 1.0f,_1.0f); //清理屏幕,设置屏幕为白板
 __ __     _GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT_| GLES20.GL_DEPTH_BUFFER_BIT);
     _   __ mSurfaceTexture.attachToGLContext(mTextureID);
  _    _    mSurfaceTexture.updateTexImage(); //拿到最新的数据

_ _ _       //绘制预览数据
   _     _  GLES20.glUseProgram(mProgram);
 _ __  __ _ GLES20.glActiveTexture(GLES20.GL_TEXTURE0);
     _ _    GLES20.glBindTexture(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, mTextureID);
_   __     _GLES20.glEnableVertexAttribArray(mPositionHandle);
     _    __GLES20.gl