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


Java EGL14.eglGetError方法代碼示例

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


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

示例1: makeCurrent

import android.opengl.EGL14; //導入方法依賴的package包/類
/**
	 * change context to draw this window surface
	 * @return
	 */
	private boolean makeCurrent(final EGLSurface surface) {
//		if (DEBUG) Log.v(TAG, "makeCurrent:");
        if (mEglDisplay == null) {
            if (DEBUG) Log.d(TAG, "makeCurrent:eglDisplay not initialized");
        }
        if (surface == null || surface == EGL14.EGL_NO_SURFACE) {
            final int error = EGL14.eglGetError();
            if (error == EGL14.EGL_BAD_NATIVE_WINDOW) {
                Log.e(TAG, "makeCurrent:returned EGL_BAD_NATIVE_WINDOW.");
            }
            return false;
        }
        // attach EGL renderring context to specific EGL window surface
        if (!EGL14.eglMakeCurrent(mEglDisplay, surface, surface, mEglContext)) {
            Log.w(TAG, "eglMakeCurrent:" + EGL14.eglGetError());
            return false;
        }
        return true;
	}
 
開發者ID:zhangyaqiang,項目名稱:Fatigue-Detection,代碼行數:24,代碼來源:EGLBase.java

示例2: checkEglError

import android.opengl.EGL14; //導入方法依賴的package包/類
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
public static void checkEglError(String op) {
    int error;
    while ((error = EGL14.eglGetError()) != EGL14.EGL_SUCCESS) {
        Lg.e( op + ": eglGetError: 0x" + Integer.toHexString(error));
        throw new RuntimeException("eglGetError encountered (see log)");
    }
}
 
開發者ID:wuyisheng,項目名稱:libRtmp,代碼行數:9,代碼來源:AndroidUntil.java

示例3: checkEglError

import android.opengl.EGL14; //導入方法依賴的package包/類
private void checkEglError(String msg) {
    boolean failed = false;
    while (EGL14.eglGetError() != EGL14.EGL_SUCCESS) {
        failed = true;
    }
    if (failed) {
        throw new RuntimeException("EGL error encountered (see log)");
    }
}
 
開發者ID:MLNO,項目名稱:airgram,代碼行數:10,代碼來源:InputSurface.java

示例4: checkEglError

import android.opengl.EGL14; //導入方法依賴的package包/類
/**
 * Checks for EGL errors.
 */
private void checkEglError(String msg) {
    int error;
    if ((error = EGL14.eglGetError()) != EGL14.EGL_SUCCESS) {
        throw new RuntimeException(msg + ": EGL error: 0x" + Integer.toHexString(error));
    }
}
 
開發者ID:SavorGit,項目名稱:Hotspot-master-devp,代碼行數:10,代碼來源:OutputSurface.java

示例5: swap

import android.opengl.EGL14; //導入方法依賴的package包/類
private int swap(final EGLSurface surface) {
//		if (DEBUG) Log.v(TAG, "swap:");
        if (!EGL14.eglSwapBuffers(mEglDisplay, surface)) {
        	final int err = EGL14.eglGetError();
        	if (DEBUG) Log.w(TAG, "swap:err=" + err);
            return err;
        }
        return EGL14.EGL_SUCCESS;
    }
 
開發者ID:zhangyaqiang,項目名稱:Fatigue-Detection,代碼行數:10,代碼來源:EGLBase.java

示例6: checkEglError

import android.opengl.EGL14; //導入方法依賴的package包/類
/**
 * Checks for EGL errors.  Throws an exception if an error has been raised.
 */
private void checkEglError(String msg) {
    int error;
    if ((error = EGL14.eglGetError()) != EGL14.EGL_SUCCESS) {
        throw new RuntimeException(msg + ": EGL error: 0x" + Integer.toHexString(error));
    }
}
 
開發者ID:zhangyaqiang,項目名稱:Fatigue-Detection,代碼行數:10,代碼來源:EglCore.java

示例7: logError

import android.opengl.EGL14; //導入方法依賴的package包/類
/** Log GL-Error. */
private static void logError() {
    final int error = EGL14.eglGetError();
    if (error != EGL14.EGL_SUCCESS) {
        if (WARNINGS) {
            Log.w(TAG, android.opengl.GLUtils.getEGLErrorString(error));
        }
    }
}
 
開發者ID:Nik-Gleb,項目名稱:mpeg-encoder,代碼行數:10,代碼來源:GLTools.java

示例8: checkEglError

import android.opengl.EGL14; //導入方法依賴的package包/類
private void checkEglError(String msg) {
    boolean failed = false;
    int error;
    while ((error = EGL14.eglGetError()) != EGL14.EGL_SUCCESS) {
        failed = true;
    }
    if (failed) {
        throw new RuntimeException("EGL error encountered (see log)");
    }
}
 
開發者ID:fishwjy,項目名稱:VideoCompressor,代碼行數:11,代碼來源:InputSurface.java

示例9: makeCurrent

import android.opengl.EGL14; //導入方法依賴的package包/類
/**
 * Makes our EGL context current, using the supplied surface for both "draw" and "read".
 */
public void makeCurrent(EGLSurface eglSurface) {
    if (mEGLDisplay == EGL14.EGL_NO_DISPLAY) {
        // called makeCurrent() before create?
        Log.d(TAG, "NOTE: makeCurrent w/o display");
    }
    if (!EGL14.eglMakeCurrent(mEGLDisplay, eglSurface, eglSurface, mEGLContext)) {
        int error = EGL14.eglGetError();
        throw new RuntimeException("eglMakeCurrent failed with error = " + error);
    }
}
 
開發者ID:vipycm,項目名稱:mao-android,代碼行數:14,代碼來源:EglCore.java

示例10: checkEglError

import android.opengl.EGL14; //導入方法依賴的package包/類
private void checkEglError(final String msg) {
    int error;
    if ((error = EGL14.eglGetError()) != EGL14.EGL_SUCCESS) {
        throw new RuntimeException(msg + ": EGL error: 0x" + Integer.toHexString(error));
    }
}
 
開發者ID:zhangyaqiang,項目名稱:Fatigue-Detection,代碼行數:7,代碼來源:EGLBase.java

示例11: checkEGLError

import android.opengl.EGL14; //導入方法依賴的package包/類
private void checkEGLError(String msg) {
    int error;
    if ((error = EGL14.eglGetError()) != EGL14.EGL_SUCCESS) {
        throw new RuntimeException(msg + ": EGL error: 0x" + Integer.toHexString(error));
    }
}
 
開發者ID:LeonHover,項目名稱:MediaCodecRecorder,代碼行數:7,代碼來源:GLContext.java

示例12: checkEglError

import android.opengl.EGL14; //導入方法依賴的package包/類
private void checkEglError(String msg) {
    int error;
    if ((error = EGL14.eglGetError()) != EGL14.EGL_SUCCESS) {
        throw new RuntimeException(msg + ": EGL error: 0x" + Integer.toHexString(error));
    }
}
 
開發者ID:AgoraIO,項目名稱:Agora-Screen-Sharing-Android,代碼行數:7,代碼來源:EglCore.java


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