From: <sp...@us...> - 2010-02-10 11:22:23
|
Revision: 3272 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3272&view=rev Author: spasi Date: 2010-02-10 11:22:16 +0000 (Wed, 10 Feb 2010) Log Message: ----------- Changed BaseReferences to use GL20.GL_MAX_TEXTURE_IMAGE_UNITS when available (GL13.GL_MAX_TEXTURE_UNITS is deprecated). Catch and log OpenGL errors during context creation, instead of throwing an exception. Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/opengl/BaseReferences.java trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/BaseReferences.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/BaseReferences.java 2010-02-09 15:22:58 UTC (rev 3271) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/BaseReferences.java 2010-02-10 11:22:16 UTC (rev 3272) @@ -58,7 +58,10 @@ 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 Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2010-02-09 15:22:58 UTC (rev 3271) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2010-02-10 11:22:16 UTC (rev 3272) @@ -881,7 +881,11 @@ 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); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |