List of usage examples for org.lwjgl.opengl GL11 glGetError
@NativeType("GLenum") public static int glGetError()
From source file:a1.Render2D.java
License:Open Source License
static public void CheckError() { int error = GL11.glGetError(); if (error != 0) throw (new GLException(error)); }
From source file:com.adavr.player.Utils.java
License:Open Source License
public static void bailIfError(String errorMessage) { int errorValue = GL11.glGetError(); if (errorValue != GL11.GL_NO_ERROR) { System.err.println("ERROR: " + errorValue + ", " + errorMessage); throw new IllegalStateException(errorMessage); }//from w ww. ja v a2 s .c om }
From source file:com.ardor3d.scene.state.lwjgl.LwjglFragmentProgramStateUtil.java
License:Open Source License
/** * Queries OpenGL for errors in the fragment program. Errors are logged as SEVERE, noting both the line number and * message./* ww w .ja v a 2 s . co m*/ */ private static void checkProgramError() { if (GL11.glGetError() == GL11.GL_INVALID_OPERATION) { // retrieve the error position final IntBuffer errorloc = BufferUtils.createIntBuffer(16); GL11.glGetInteger(ARBProgram.GL_PROGRAM_ERROR_POSITION_ARB, errorloc); logger.severe("Error " + GL11.glGetString(ARBProgram.GL_PROGRAM_ERROR_STRING_ARB) + " in fragment program on line " + errorloc.get(0)); } }
From source file:com.ardor3d.scene.state.lwjgl.LwjglVertexProgramStateUtil.java
License:Open Source License
/** * Queries OpenGL for errors in the vertex program. Errors are logged as SEVERE, noting both the line number and * message./*www . ja v a 2 s . com*/ */ private static void checkProgramError() { if (GL11.glGetError() == GL11.GL_INVALID_OPERATION) { // retrieve the error position final IntBuffer errorloc = BufferUtils.createIntBuffer(16); GL11.glGetInteger(ARBProgram.GL_PROGRAM_ERROR_POSITION_ARB, errorloc); logger.severe("Error " + GL11.glGetString(ARBProgram.GL_PROGRAM_ERROR_STRING_ARB) + " in vertex program on line " + errorloc.get(0)); } }
From source file:com.badlogic.gdx.backends.jglfw.JglfwGL20.java
License:Apache License
public int glGetError() { return GL11.glGetError(); }
From source file:com.badlogic.gdx.backends.lwjgl.LwjglGL10.java
License:Apache License
public final int glGetError() { return GL11.glGetError(); }
From source file:com.flowpowered.caustic.lwjgl.LWJGLUtil.java
License:MIT License
/** * Throws an exception if OpenGL reports an error. * * @throws GLException If OpenGL reports an error */// w w w . j a v a 2 s. c o m public static void checkForGLError() { if (CausticUtil.isDebugEnabled()) { final int errorValue = GL11.glGetError(); if (errorValue != GL11.GL_NO_ERROR) { throw new GLException("GL ERROR: " + GLU.gluErrorString(errorValue)); } } }
From source file:com.grillecube.client.opengl.GLH.java
/** call it to check openGL error after a gl call */ public static void glhCheckError(String label) { int err = GL11.glGetError(); String str = GLH.glhGetErrorString(err); if (str == null) { return;//from w w w .j a v a2s . co m } Logger.get().log(Level.ERROR, label + " : GLH error check: " + str); }
From source file:com.mtbs3d.minecrift.FBOParams.java
License:LGPL
/** * Checks for an OpenGL error. If there is one, prints the error ID and error string. *//*from ww w .j a v a 2 s . c o m*/ public void checkGLError(String par1Str) { int i = GL11.glGetError(); if (i != 0) { String s1 = GLU.gluErrorString(i); logger.error("########## GL ERROR ##########"); logger.error("@ " + par1Str); logger.error(i + ": " + s1); } }
From source file:com.n8lm.zener.graphics.GLHelper.java
License:Open Source License
public static boolean checkGLError() { int error = GL11.glGetError(); if (error != GL11.GL_NO_ERROR) { String glerrmsg = GLU.gluErrorString(error); LOGGER.warning("OpenGL Error: (" + error + ") " + glerrmsg); try {//from w w w . java2 s . com throw new Exception(); } catch (Exception e) { e.printStackTrace(); } return true; } return false; }