diff --git a/src/java/org/lwjgl/opengl/BaseReferences.java b/src/java/org/lwjgl/opengl/BaseReferences.java index a3a202bc..584246ad 100644 --- a/src/java/org/lwjgl/opengl/BaseReferences.java +++ b/src/java/org/lwjgl/opengl/BaseReferences.java @@ -58,7 +58,10 @@ class BaseReferences { glVertexAttribPointer_buffer = new Buffer[max_vertex_attribs]; int max_texture_units; - if (caps.OpenGL13 || caps.GL_ARB_multitexture) { + if (caps.OpenGL20) { + GL11.glGetInteger(GL20.GL_MAX_TEXTURE_IMAGE_UNITS, temp); + max_texture_units = temp.get(0); + } else if (caps.OpenGL13 || caps.GL_ARB_multitexture) { GL11.glGetInteger(GL13.GL_MAX_TEXTURE_UNITS, temp); max_texture_units = temp.get(0); } else diff --git a/src/java/org/lwjgl/opengl/Display.java b/src/java/org/lwjgl/opengl/Display.java index c498f84c..12328dc3 100644 --- a/src/java/org/lwjgl/opengl/Display.java +++ b/src/java/org/lwjgl/opengl/Display.java @@ -881,7 +881,11 @@ public final class Display { private static void makeCurrentAndSetSwapInterval() throws LWJGLException { makeCurrent(); - Util.checkGLError(); + try { + Util.checkGLError(); + } catch (OpenGLException e) { + LWJGLUtil.log("OpenGL error during context creation: " + e.getMessage()); + } setSwapInterval(swap_interval); }