當前位置: 首頁>>代碼示例>>Java>>正文


Java EGL14.eglTerminate方法代碼示例

本文整理匯總了Java中android.opengl.EGL14.eglTerminate方法的典型用法代碼示例。如果您正苦於以下問題:Java EGL14.eglTerminate方法的具體用法?Java EGL14.eglTerminate怎麽用?Java EGL14.eglTerminate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.opengl.EGL14的用法示例。


在下文中一共展示了EGL14.eglTerminate方法的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: release

import android.opengl.EGL14; //導入方法依賴的package包/類
public void release() {
	EGL14.eglDestroySurface(mEGLDisplay, mEGLSurface);
	EGL14.eglDestroyContext(mEGLDisplay, mEGLContext);
	
	if(Build.VERSION.SDK_INT > 19){
		EGL14.eglReleaseThread();
	}
	
	EGL14.eglTerminate(mEGLDisplay);

	//mSurface.release();

	mSurface    = null;
	mEGLDisplay = null;
	mEGLContext = null;
	mEGLSurface = null;
}
 
開發者ID:lzmlsfe,項目名稱:19porn,代碼行數:18,代碼來源:InputSurface.java

示例2: release

import android.opengl.EGL14; //導入方法依賴的package包/類
/**
 * Discard all resources held by this class, notably the EGL context.
 */
public void release() {
    if (mEGLDisplay != EGL14.EGL_NO_DISPLAY) {
        EGL14.eglDestroySurface(mEGLDisplay, mEGLSurface);
        EGL14.eglDestroyContext(mEGLDisplay, mEGLContext);
        EGL14.eglReleaseThread();
        EGL14.eglTerminate(mEGLDisplay);
    }
    mSurface.release();
    // this causes a bunch of warnings that appear harmless but might confuse someone:
    //  W BufferQueue: [unnamed-3997-2] cancelBuffer: BufferQueue has been abandoned!
    //mSurfaceTexture.release();
    mEGLDisplay = EGL14.EGL_NO_DISPLAY;
    mEGLContext = EGL14.EGL_NO_CONTEXT;
    mEGLSurface = EGL14.EGL_NO_SURFACE;
    mTextureRender = null;
    mSurface = null;
    mSurfaceTexture = null;
}
 
開發者ID:SavorGit,項目名稱:Hotspot-master-devp,代碼行數:22,代碼來源:OutputSurface.java

示例3: release

import android.opengl.EGL14; //導入方法依賴的package包/類
/**
 * Discards all resources held by this class, notably the EGL context.  This must be
 * called from the thread where the context was created.
 * <p>
 * On completion, no context will be current.
 */
public void release() {
    if (mEGLDisplay != EGL14.EGL_NO_DISPLAY) {
        // Android is unusual in that it uses a reference-counted EGLDisplay.  So for
        // every eglInitialize() we need an eglTerminate().
        EGL14.eglMakeCurrent(mEGLDisplay, EGL14.EGL_NO_SURFACE, EGL14.EGL_NO_SURFACE,
                EGL14.EGL_NO_CONTEXT);
        EGL14.eglDestroyContext(mEGLDisplay, mEGLContext);
        EGL14.eglReleaseThread();
        EGL14.eglTerminate(mEGLDisplay);
    }

    mEGLDisplay = EGL14.EGL_NO_DISPLAY;
    mEGLContext = EGL14.EGL_NO_CONTEXT;
    mEGLConfig = null;
}
 
開發者ID:zhangyaqiang,項目名稱:Fatigue-Detection,代碼行數:22,代碼來源:EglCore.java

示例4: destroyGLES

import android.opengl.EGL14; //導入方法依賴的package包/類
public boolean destroyGLES(EGLSurface surface,EGLContext context){
    EGL14.eglMakeCurrent(mEGLDisplay, EGL14.EGL_NO_SURFACE, EGL14.EGL_NO_SURFACE, EGL14.EGL_NO_CONTEXT);
    if(surface!=null){
        EGL14.eglDestroySurface(mEGLDisplay,surface);
    }
    if(context!=null){
        EGL14.eglDestroyContext(mEGLDisplay,context);
    }
    EGL14.eglTerminate(mEGLDisplay);
    log("gl destroy gles");
    return true;
}
 
開發者ID:aiyaapp,項目名稱:AAVT,代碼行數:13,代碼來源:EglHelper.java

示例5: release

import android.opengl.EGL14; //導入方法依賴的package包/類
void release() {
    EGL14.eglDestroySurface(mEGLDisplay, mEGLSurface);
    EGL14.eglDestroyContext(mEGLDisplay, mEGLContext);
    EGL14.eglReleaseThread();
    EGL14.eglTerminate(mEGLDisplay);

    mSurface.release();

    mSurface = null;
    mEGLDisplay = null;
    mEGLContext = null;
    mEGLSurface = null;
}
 
開發者ID:wuyisheng,項目名稱:libRtmp,代碼行數:14,代碼來源:RecorderImpl.java

示例6: release

import android.opengl.EGL14; //導入方法依賴的package包/類
/**
 * Discard all resources held by this class, notably the EGL context.  Also releases the
 * Surface that was passed to our constructor.
 */
public void release() {
    if (mEGLDisplay != EGL14.EGL_NO_DISPLAY) {
        EGL14.eglDestroySurface(mEGLDisplay, mEGLSurface);
        EGL14.eglDestroyContext(mEGLDisplay, mEGLContext);
        EGL14.eglReleaseThread();
        EGL14.eglTerminate(mEGLDisplay);
    }
    mSurface.release();
    mEGLDisplay = EGL14.EGL_NO_DISPLAY;
    mEGLContext = EGL14.EGL_NO_CONTEXT;
    mEGLSurface = EGL14.EGL_NO_SURFACE;
    mSurface = null;
}
 
開發者ID:SavorGit,項目名稱:Hotspot-master-devp,代碼行數:18,代碼來源:InputSurface.java

示例7: release

import android.opengl.EGL14; //導入方法依賴的package包/類
public void release() {
if (DEBUG) Log.v(TAG, "release:");
      if (mEglDisplay != EGL14.EGL_NO_DISPLAY) {
   	destroyContext();
       EGL14.eglTerminate(mEglDisplay);
       EGL14.eglReleaseThread();
      }
      mEglDisplay = EGL14.EGL_NO_DISPLAY;
      mEglContext = EGL14.EGL_NO_CONTEXT;
  }
 
開發者ID:zhangyaqiang,項目名稱:Fatigue-Detection,代碼行數:11,代碼來源:EGLBase.java

示例8: closeDisplay

import android.opengl.EGL14; //導入方法依賴的package包/類
/**
 * Close an EGL display connection.
 * @param display an EGL display connection instance
 */
public static void closeDisplay(@NonNull EGLDisplay display) {
    if (!EGL14.eglTerminate(display)) {
        logError();
        throw new RuntimeException("Unable to terminate EGL14 " + getDisplayString(display));
    } else {
        logDebug(getDisplayString(display) + " destroyed");
    }
}
 
開發者ID:Nik-Gleb,項目名稱:mpeg-encoder,代碼行數:13,代碼來源:GLTools.java

示例9: release

import android.opengl.EGL14; //導入方法依賴的package包/類
public void release() {
    if (mEGLDisplay != EGL14.EGL_NO_DISPLAY) {
        EGL14.eglMakeCurrent(mEGLDisplay, EGL14.EGL_NO_SURFACE, EGL14.EGL_NO_SURFACE, EGL14.EGL_NO_CONTEXT);
        EGL14.eglDestroyContext(mEGLDisplay, mEGLContext);
        EGL14.eglReleaseThread();
        EGL14.eglTerminate(mEGLDisplay);
    }

    mEGLDisplay = EGL14.EGL_NO_DISPLAY;
    mEGLContext = EGL14.EGL_NO_CONTEXT;
    mEGLConfig = null;
}
 
開發者ID:LeonHover,項目名稱:MediaCodecRecorder,代碼行數:13,代碼來源:GLContext.java

示例10: release

import android.opengl.EGL14; //導入方法依賴的package包/類
@Override
public void release() {
  checkIsNotReleased();
  releaseSurface();
  detachCurrent();
  EGL14.eglDestroyContext(eglDisplay, eglContext);
  EGL14.eglReleaseThread();
  EGL14.eglTerminate(eglDisplay);
  eglContext = EGL14.EGL_NO_CONTEXT;
  eglDisplay = EGL14.EGL_NO_DISPLAY;
  eglConfig = null;
}
 
開發者ID:Piasy,項目名稱:VideoCRE,代碼行數:13,代碼來源:EglBase14.java

示例11: getMaxTextureEgl14

import android.opengl.EGL14; //導入方法依賴的package包/類
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
private static int getMaxTextureEgl14() {
    EGLDisplay dpy = EGL14.eglGetDisplay(EGL14.EGL_DEFAULT_DISPLAY);
    int[] vers = new int[2];
    EGL14.eglInitialize(dpy, vers, 0, vers, 1);

    int[] configAttr = {
            EGL14.EGL_COLOR_BUFFER_TYPE, EGL14.EGL_RGB_BUFFER,
            EGL14.EGL_LEVEL, 0,
            EGL14.EGL_RENDERABLE_TYPE, EGL14.EGL_OPENGL_ES2_BIT,
            EGL14.EGL_SURFACE_TYPE, EGL14.EGL_PBUFFER_BIT,
            EGL14.EGL_NONE
    };
    EGLConfig[] configs = new EGLConfig[1];
    int[] numConfig = new int[1];
    EGL14.eglChooseConfig(dpy, configAttr, 0,
            configs, 0, 1, numConfig, 0);
    if (numConfig[0] == 0) {
        return 0;
    }
    EGLConfig config = configs[0];

    int[] surfAttr = {
            EGL14.EGL_WIDTH, 64,
            EGL14.EGL_HEIGHT, 64,
            EGL14.EGL_NONE
    };
    EGLSurface surf = EGL14.eglCreatePbufferSurface(dpy, config, surfAttr, 0);

    int[] ctxAttrib = {
            EGL14.EGL_CONTEXT_CLIENT_VERSION, 2,
            EGL14.EGL_NONE
    };
    EGLContext ctx = EGL14.eglCreateContext(dpy, config, EGL14.EGL_NO_CONTEXT, ctxAttrib, 0);

    EGL14.eglMakeCurrent(dpy, surf, surf, ctx);

    int[] maxSize = new int[1];
    GLES20.glGetIntegerv(GLES20.GL_MAX_TEXTURE_SIZE, maxSize, 0);

    EGL14.eglMakeCurrent(dpy, EGL14.EGL_NO_SURFACE, EGL14.EGL_NO_SURFACE,
            EGL14.EGL_NO_CONTEXT);
    EGL14.eglDestroySurface(dpy, surf);
    EGL14.eglDestroyContext(dpy, ctx);
    EGL14.eglTerminate(dpy);

    return maxSize[0];
}
 
開發者ID:Alcatraz323,項目名稱:MaterialOCR,代碼行數:49,代碼來源:EglUtils.java

示例12: release

import android.opengl.EGL14; //導入方法依賴的package包/類
public void release() {
    if (mEglDisplay != EGL14.EGL_NO_DISPLAY) {
        destroyContext();
        EGL14.eglTerminate(mEglDisplay);
        EGL14.eglReleaseThread();
    }
    mEglDisplay = EGL14.EGL_NO_DISPLAY;
    mEglContext = EGL14.EGL_NO_CONTEXT;
}
 
開發者ID:uestccokey,項目名稱:EZFilter,代碼行數:10,代碼來源:EGLEnvironment.java

示例13: destroyGL

import android.opengl.EGL14; //導入方法依賴的package包/類
private void destroyGL(EglHelper egl){
    mGLThreadFlag=false;
    EGL14.eglMakeCurrent(egl.getDisplay(), EGL14.EGL_NO_SURFACE, EGL14.EGL_NO_SURFACE, EGL14.EGL_NO_CONTEXT);
    EGL14.eglDestroyContext(egl.getDisplay(),egl.getDefaultContext());
    EGL14.eglTerminate(egl.getDisplay());
}
 
開發者ID:aiyaapp,項目名稱:AAVT,代碼行數:7,代碼來源:VideoSurfaceProcessor.java


注:本文中的android.opengl.EGL14.eglTerminate方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。