本文整理匯總了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();
}
}
示例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();
}
}
示例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();
}
}
示例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();
}
}