Removed GL_CHECK_ERROR

This commit is contained in:
Elias Naur 2004-03-07 16:01:45 +00:00
parent 5dc7761920
commit 497b9735f5
58 changed files with 700 additions and 721 deletions

View file

@ -248,8 +248,11 @@ public final class Pbuffer {
*/
public synchronized void destroy() {
makeCurrent();
int error = GL11.glGetError();
VBOTracker.remove(this);
nDestroy(handle);
if (error != GL11.GL_NO_ERROR)
throw new OpenGLException(error);
}
/**

View file

@ -60,6 +60,13 @@ abstract class Util {
return buffer.position();
}
static void checkGLError() {
int err = GL11.glGetError();
if (err != GL11.GL_NO_ERROR) {
throw new OpenGLException(err);
}
}
static int getGLInteger(int gl_enum) {
GL11.glGetInteger(gl_enum, int_buffer);
return int_buffer.get(0);

View file

@ -209,6 +209,7 @@ public final class Window {
*/
public static void paint() {
assert isCreated() : "Cannot paint uncreated window";
Util.checkGLError();
swapBuffers();
}