mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-05 14:35:58 +00:00
Removed GL_CHECK_ERROR
This commit is contained in:
parent
5dc7761920
commit
497b9735f5
58 changed files with 700 additions and 721 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -209,6 +209,7 @@ public final class Window {
|
|||
*/
|
||||
public static void paint() {
|
||||
assert isCreated() : "Cannot paint uncreated window";
|
||||
Util.checkGLError();
|
||||
swapBuffers();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue