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


Java GL.GL_NO_ERROR屬性代碼示例

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


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

示例1: checkGLError

/** Utility method to check for GL errors. Prints stacked up errors up to a limit.
   @param g the GL context
   @param glu the GLU used to obtain the error strings
   @param msg an error message to log to e.g., show the context
 */
private void checkGLError(GL2 g, String msg) {
	int error = g.glGetError();
	int nerrors = 3;
	while ((error != GL.GL_NO_ERROR) && (nerrors-- != 0)) {
		StackTraceElement[] trace = Thread.currentThread().getStackTrace();
		if (trace.length > 1) {
			String className = trace[2].getClassName();
			String methodName = trace[2].getMethodName();
			int lineNumber = trace[2].getLineNumber();
			log.warning("GL error number " + error + " " + glu.gluErrorString(error) + " : " + msg + " at " + className + "." + methodName + " (line " + lineNumber + ")");
		} else {
			log.warning("GL error number " + error + " " + glu.gluErrorString(error) + " : " + msg);
		}
		error = g.glGetError();
	}
}
 
開發者ID:SensorsINI,項目名稱:jaer,代碼行數:21,代碼來源:ImageDisplay.java

示例2: checkGLError

/**
 * Utility method to check for GL errors. Prints stacked up errors up to a
 * limit.
 *
 * @param g the GL context
 * @param glu the GLU used to obtain the error strings
 * @param msg an error message to log to e.g., show the context
 */
private void checkGLError(GL2 g, String msg) {
    int error = g.glGetError();
    int nerrors = 3;
    while ((error != GL.GL_NO_ERROR) && (nerrors-- != 0)) {
        StackTraceElement[] trace = Thread.currentThread().getStackTrace();
        if (trace.length > 1) {
            String className = trace[2].getClassName();
            String methodName = trace[2].getMethodName();
            int lineNumber = trace[2].getLineNumber();
            log.warning("GL error number " + error + " " + glu.gluErrorString(error) + " : " + msg + " at " + className + "." + methodName + " (line " + lineNumber + ")");
        } else {
            log.warning("GL error number " + error + " " + glu.gluErrorString(error) + " : " + msg);
        }
        error = g.glGetError();
    }
}
 
開發者ID:SensorsINI,項目名稱:jaer,代碼行數:24,代碼來源:ImageDisplay.java

示例3: checkGLError

/**
 * Utility method to check for GL errors. Prints stacked up errors up to a
 * limit.
 *
 * @param g the GL context
 * @param glu the GLU used to obtain the error strings
 * @param msg an error message to log to e.g., show the context
 */
public void checkGLError(final GL2 g, final GLU glu, final String msg) {
    int error = g.glGetError();
    int nerrors = 3;
    while ((error != GL.GL_NO_ERROR) && (nerrors-- != 0)) {
        final StackTraceElement[] trace = Thread.currentThread().getStackTrace();
        if (trace.length > 1) {
            final String className = trace[2].getClassName();
            final String methodName = trace[2].getMethodName();
            final int lineNumber = trace[2].getLineNumber();
            log.warning("GL error number " + error + " " + glu.gluErrorString(error) + " : " + msg + " at "
                    + className + "." + methodName + " (line " + lineNumber + ")");
        } else {
            log.warning("GL error number " + error + " " + glu.gluErrorString(error) + " : " + msg);
        }
        // Thread.dumpStack();
        error = g.glGetError();
    }
}
 
開發者ID:SensorsINI,項目名稱:jaer,代碼行數:26,代碼來源:ChipCanvas.java

示例4: checkGLError

/** Utility method to check for GL errors. Prints stacked up errors up to a limit.
   @param g the GL context
   @param glu the GLU used to obtain the error strings
   @param msg an error message to log to e.g., show the context
 */
public void checkGLError(GL2 g, GLU glu, String msg) {
	if (g == null) {
		log.warning("null GL");
		return;
	}
	int error = g.glGetError();
	int nerrors = 3;
	while ((error != GL.GL_NO_ERROR) && (nerrors-- != 0)) {
		StackTraceElement[] trace = Thread.currentThread().getStackTrace();
		if (trace.length > 1) {
			String className = trace[2].getClassName();
			String methodName = trace[2].getMethodName();
			int lineNumber = trace[2].getLineNumber();
			log.warning("GL error number " + error + " " + glu.gluErrorString(error) + " : " + msg + " at " + className + "." + methodName + " (line " + lineNumber + ")");
		} else {
			log.warning("GL error number " + error + " " + glu.gluErrorString(error) + " : " + msg);
		}
		//             Thread.dumpStack();
		error = g.glGetError();
	}
}
 
開發者ID:SensorsINI,項目名稱:jaer,代碼行數:26,代碼來源:Series.java


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