Fixed Context init when using the debug library.

Removed glGetError call before buffer swapping.
This commit is contained in:
Ioannis Tsakpinis 2009-09-08 12:27:59 +00:00
parent 58703c742d
commit f4eb23f860
2 changed files with 3 additions and 1 deletions

View File

@ -637,7 +637,8 @@ public final class Display {
if ( !isCreated() )
throw new IllegalStateException("Display not created");
Util.checkGLError();
if ( LWJGLUtil.DEBUG )
Util.checkGLError();
Context.swapBuffers();
}
}

View File

@ -118,6 +118,7 @@ public class ContextCapabilitiesGenerator {
writer.println("\tprivate Set " + ALL_INIT_METHOD_NAME + "(boolean forwardCompatible) throws LWJGLException {");
// Load the basic pointers we need to detect OpenGL version and supported extensions.
writer.println("\t\tGL11_glGetError_pointer = GLContext.getFunctionAddress(\"glGetError\");");
writer.println("\t\tGL11_glGetString_pointer = GLContext.getFunctionAddress(\"glGetString\");");
// Initialize GL11.glGetIntegerv and GL30.glGetStringi here, in case we have created an OpenGL 3.0 context.