mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-08 16:04:39 +00:00
Added gluErrorString
This commit is contained in:
parent
eeb01b8da5
commit
09e51d6bed
3 changed files with 41 additions and 1 deletions
|
|
@ -32,6 +32,8 @@
|
|||
|
||||
package org.lwjgl.opengl;
|
||||
|
||||
import org.lwjgl.opengl.glu.GLU;
|
||||
|
||||
/**
|
||||
* $Id$
|
||||
*
|
||||
|
|
@ -47,7 +49,12 @@ public class OpenGLException extends RuntimeException {
|
|||
* Constructor for OpenGLException.
|
||||
*/
|
||||
public OpenGLException(int gl_error_code) {
|
||||
super("GL error code: " + gl_error_code);
|
||||
this(createErrorMessage(gl_error_code));
|
||||
}
|
||||
|
||||
private final static String createErrorMessage(int gl_error_code) {
|
||||
String error_string = GLU.gluErrorString(gl_error_code);
|
||||
return error_string + " (" + gl_error_code + ")";
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue