本文整理汇总了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();
}
}