|
From: <eli...@us...> - 2006-07-22 14:58:42
|
Revision: 2533 Author: elias_naur Date: 2006-07-22 07:58:13 -0700 (Sat, 22 Jul 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2533&view=rev Log Message: ----------- Fix comment Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java 2006-07-21 20:35:27 UTC (rev 2532) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java 2006-07-22 14:58:13 UTC (rev 2533) @@ -79,7 +79,7 @@ * * 'fast_path_cache' is the most recent ContextCapabilities (potentially null) and its owner. By * recent I mean the last thread setting the value in setCapabilities(). When getCapabilities() - * is called, a check to see if the current is the owner of the ContextCapabilities instance inf + * is called, a check to see if the current is the owner of the ContextCapabilities instance in * fast_path_cache. If so, the instance is returned, if not, some thread has since taken ownership * of the cache entry and the slower current_capabilities ThreadLocal is queried instead. * @@ -87,7 +87,7 @@ * from multiple threads at once, we are guaranteed by the JVM spec that its value is always valid. * Furthermore, if the ownership test in getCapabilities() succeeds, the cache entry can only contain * the correct ContextCapabilites (that is, the one from getThreadLocalCapabilites()), - * since no other thread can sets the owner to anyone else than itself. + * since no other thread can set the owner to anyone else than itself. */ private static CapabilitiesCacheEntry fast_path_cache = new CapabilitiesCacheEntry(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <eli...@us...> - 2006-07-22 15:05:42
|
Revision: 2534 Author: elias_naur Date: 2006-07-22 08:05:36 -0700 (Sat, 22 Jul 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2534&view=rev Log Message: ----------- Make sure OpenGL versions with major >= 3 is properly supported. Make sure major >= 1 in any case Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java 2006-07-22 14:58:13 UTC (rev 2533) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java 2006-07-22 15:05:36 UTC (rev 2534) @@ -208,7 +208,7 @@ LWJGLUtil.log("The major and/or minor OpenGL version is malformed: " + e.getMessage()); } - if (majorVersion == 2) { + if (majorVersion >= 2) { // ----------------------[ 2.X ]---------------------- supported_extensions.add("OpenGL20"); // ----------------------[ 1.X ]---------------------- @@ -217,7 +217,7 @@ supported_extensions.add("OpenGL13"); supported_extensions.add("OpenGL14"); supported_extensions.add("OpenGL15"); - } else { + } else if (majorVersion == 1) { switch (minorVersion) { case 5: supported_extensions.add("OpenGL15"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sp...@us...> - 2006-08-03 10:00:20
|
Revision: 2544 Author: spasi Date: 2006-08-03 03:00:11 -0700 (Thu, 03 Aug 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2544&view=rev Log Message: ----------- Added OpenGL 2.1 support Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java 2006-08-03 09:51:45 UTC (rev 2543) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java 2006-08-03 10:00:11 UTC (rev 2544) @@ -52,7 +52,7 @@ * pointers. * * This class is thread-safe in the sense that multiple threads can safely call all public methods. The class is also - * thread-aware in the sense that it tracks a per-thread current context (including capabilities and function pointers). + * thread-aware in the sense that it tracks a per-thread current context (including capabilities and function pointers). * That way, multiple threads can have multiple contexts current and render to them concurrently. * * @author elias_naur <eli...@us...> @@ -64,7 +64,7 @@ * Maps threads to their current context's ContextCapabilities, if any */ private final static ThreadLocal current_capabilities = new ThreadLocal(); - + /** * The getCapabilities() method is a potential hot spot in any LWJGL application, since * it is needed for context capability discovery (e.g. is OpenGL 2.0 supported?), and @@ -90,14 +90,14 @@ * since no other thread can set the owner to anyone else than itself. */ private static CapabilitiesCacheEntry fast_path_cache = new CapabilitiesCacheEntry(); - + /** * Simple lock-free cache of CapabilitesEntryCache to avoid allocating more than one * cache entry per thread */ private final static ThreadLocal thread_cache_entries = new ThreadLocal(); - - /** + + /** * The weak mapping from context Object instances to ContextCapabilities. Used * to avoid recreating a ContextCapabilities every time a context is made current. */ @@ -121,14 +121,14 @@ CapabilitiesCacheEntry recent_cache_entry = fast_path_cache; // Check owner of cache entry if (recent_cache_entry.owner == Thread.currentThread()) { - /* The owner ship test succeeded, so the cache must contain the current ContextCapabilities instance + /* The owner ship test succeeded, so the cache must contain the current ContextCapabilities instance * assert recent_cache_entry.capabilities == getThreadLocalCapabilities(); */ return recent_cache_entry.capabilities; } else // Some other thread has written to the cache since, and we fall back to the slower path return getThreadLocalCapabilities(); } - + private static ContextCapabilities getThreadLocalCapabilities() { return ((ContextCapabilities)current_capabilities.get()); } @@ -152,7 +152,7 @@ fast_path_cache = thread_cache_entry; } - + /** * Helper method to get a pointer to a named function in the OpenGL library * with a name dependent on the current platform @@ -210,7 +210,13 @@ if (majorVersion >= 2) { // ----------------------[ 2.X ]---------------------- - supported_extensions.add("OpenGL20"); + switch (minorVersion) { + case 1: + supported_extensions.add("OpenGL21"); + // Intentional fall through + case 0: + supported_extensions.add("OpenGL20"); + } // ----------------------[ 1.X ]---------------------- supported_extensions.add("OpenGL11"); supported_extensions.add("OpenGL12"); @@ -335,4 +341,4 @@ Thread owner; ContextCapabilities capabilities; } -} +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |