You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(134) |
Sep
(52) |
Oct
(13) |
Nov
(342) |
Dec
(163) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(44) |
Feb
(62) |
Mar
(158) |
Apr
(38) |
May
(70) |
Jun
(58) |
Jul
(104) |
Aug
(207) |
Sep
(83) |
Oct
(122) |
Nov
(23) |
Dec
(49) |
| 2004 |
Jan
(119) |
Feb
(132) |
Mar
(192) |
Apr
(140) |
May
(77) |
Jun
(74) |
Jul
(201) |
Aug
(63) |
Sep
(102) |
Oct
(70) |
Nov
(173) |
Dec
(78) |
| 2005 |
Jan
(174) |
Feb
(197) |
Mar
(105) |
Apr
(59) |
May
(77) |
Jun
(43) |
Jul
(21) |
Aug
(18) |
Sep
(47) |
Oct
(37) |
Nov
(74) |
Dec
(50) |
| 2006 |
Jan
(44) |
Feb
(19) |
Mar
(32) |
Apr
(24) |
May
(31) |
Jun
(55) |
Jul
(138) |
Aug
(28) |
Sep
(12) |
Oct
(41) |
Nov
(58) |
Dec
(24) |
| 2007 |
Jan
(28) |
Feb
(14) |
Mar
(10) |
Apr
(68) |
May
(30) |
Jun
(26) |
Jul
(18) |
Aug
(63) |
Sep
(19) |
Oct
(29) |
Nov
(20) |
Dec
(10) |
| 2008 |
Jan
(38) |
Feb
(7) |
Mar
(37) |
Apr
(120) |
May
(41) |
Jun
(36) |
Jul
(39) |
Aug
(24) |
Sep
(28) |
Oct
(30) |
Nov
(36) |
Dec
(75) |
| 2009 |
Jan
(46) |
Feb
(22) |
Mar
(50) |
Apr
(70) |
May
(134) |
Jun
(105) |
Jul
(75) |
Aug
(34) |
Sep
(38) |
Oct
(34) |
Nov
(19) |
Dec
(20) |
| 2010 |
Jan
(11) |
Feb
(20) |
Mar
(65) |
Apr
(83) |
May
(104) |
Jun
(73) |
Jul
(78) |
Aug
(57) |
Sep
(43) |
Oct
(35) |
Nov
(9) |
Dec
(4) |
| 2011 |
Jan
(21) |
Feb
(11) |
Mar
(18) |
Apr
(10) |
May
(18) |
Jun
(15) |
Jul
(48) |
Aug
(25) |
Sep
(17) |
Oct
(45) |
Nov
(15) |
Dec
(12) |
| 2012 |
Jan
(21) |
Feb
(9) |
Mar
(12) |
Apr
(9) |
May
(9) |
Jun
(5) |
Jul
(1) |
Aug
(10) |
Sep
(12) |
Oct
(1) |
Nov
(28) |
Dec
(5) |
| 2013 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2016 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
1
(5) |
2
(2) |
|
3
|
4
(2) |
5
(1) |
6
|
7
(2) |
8
(2) |
9
|
|
10
|
11
|
12
(8) |
13
(5) |
14
(1) |
15
(1) |
16
(1) |
|
17
|
18
(2) |
19
|
20
|
21
|
22
|
23
|
|
24
(1) |
25
|
26
|
27
|
28
(2) |
29
|
30
|
|
31
|
|
|
|
|
|
|
|
From: <sp...@us...> - 2010-10-12 21:13:09
|
Revision: 3443
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3443&view=rev
Author: spasi
Date: 2010-10-12 21:13:03 +0000 (Tue, 12 Oct 2010)
Log Message:
-----------
Fixed Strings, seriously now.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/util/generator/SignatureTranslator.java
trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java
Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/SignatureTranslator.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/generator/SignatureTranslator.java 2010-10-12 20:49:29 UTC (rev 3442)
+++ trunk/LWJGL/src/java/org/lwjgl/util/generator/SignatureTranslator.java 2010-10-12 21:13:03 UTC (rev 3443)
@@ -94,7 +94,7 @@
signature.append("L");
signature.append(getNativeNameFromClassName(type_name));
signature.append(";");
- if ( add_position_signature && Utils.isAddressableType(type) )
+ if ( add_position_signature && Utils.isAddressableType(type) && !String.class.equals(type) )
signature.append("I");
}
Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java 2010-10-12 20:49:29 UTC (rev 3442)
+++ trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java 2010-10-12 21:13:03 UTC (rev 3443)
@@ -137,7 +137,7 @@
}
private static boolean isAddressableTypeImpl(Class type) {
- return Buffer.class.isAssignableFrom(type) || PointerBuffer.class.isAssignableFrom(type) || (CharSequence.class.isAssignableFrom(type) && !String.class.equals(type));
+ return Buffer.class.isAssignableFrom(type) || PointerBuffer.class.isAssignableFrom(type) || CharSequence.class.isAssignableFrom(type);
}
public static Class getJavaType(TypeMirror type_mirror) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2010-10-12 20:49:36
|
Revision: 3442
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3442&view=rev
Author: spasi
Date: 2010-10-12 20:49:29 +0000 (Tue, 12 Oct 2010)
Log Message:
-----------
Another String signature fix.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java
Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java 2010-10-12 20:25:33 UTC (rev 3441)
+++ trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java 2010-10-12 20:49:29 UTC (rev 3442)
@@ -137,7 +137,7 @@
}
private static boolean isAddressableTypeImpl(Class type) {
- return Buffer.class.isAssignableFrom(type) || PointerBuffer.class.isAssignableFrom(type) || CharSequence.class.isAssignableFrom(type);
+ return Buffer.class.isAssignableFrom(type) || PointerBuffer.class.isAssignableFrom(type) || (CharSequence.class.isAssignableFrom(type) && !String.class.equals(type));
}
public static Class getJavaType(TypeMirror type_mirror) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2010-10-12 20:25:39
|
Revision: 3441
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3441&view=rev
Author: spasi
Date: 2010-10-12 20:25:33 +0000 (Tue, 12 Oct 2010)
Log Message:
-----------
Fixed String signatures.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/util/generator/SignatureTranslator.java
Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/SignatureTranslator.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/generator/SignatureTranslator.java 2010-10-12 19:21:35 UTC (rev 3440)
+++ trunk/LWJGL/src/java/org/lwjgl/util/generator/SignatureTranslator.java 2010-10-12 20:25:33 UTC (rev 3441)
@@ -83,7 +83,7 @@
public void visitClassType(ClassType t) {
Class type = NativeTypeTranslator.getClassFromType(t);
String type_name;
- if ( CharSequence.class.isAssignableFrom(type) || CharSequence[].class.isAssignableFrom(type) || PointerBuffer.class.isAssignableFrom(type) )
+ if ( (CharSequence.class.isAssignableFrom(type) && !String.class.equals(type)) || CharSequence[].class.isAssignableFrom(type) || PointerBuffer.class.isAssignableFrom(type) )
type_name = ByteBuffer.class.getName();
else if ( org.lwjgl.PointerWrapper.class.isAssignableFrom(type) ) {
signature.append("J");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2010-10-12 19:21:42
|
Revision: 3440
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3440&view=rev
Author: matzon
Date: 2010-10-12 19:21:35 +0000 (Tue, 12 Oct 2010)
Log Message:
-----------
updates to webstart to streamline process
Modified Paths:
--------------
trunk/LWJGL/platform_build/build-definitions.xml
trunk/LWJGL/platform_build/build-webstart.xml
Added Paths:
-----------
trunk/LWJGL/www/webstart/
trunk/LWJGL/www/webstart/demo.php
trunk/LWJGL/www/webstart/extension.jnlp
trunk/LWJGL/www/webstart/logo.png
trunk/LWJGL/www/webstart/source.php
Modified: trunk/LWJGL/platform_build/build-definitions.xml
===================================================================
--- trunk/LWJGL/platform_build/build-definitions.xml 2010-10-12 17:44:19 UTC (rev 3439)
+++ trunk/LWJGL/platform_build/build-definitions.xml 2010-10-12 19:21:35 UTC (rev 3440)
@@ -13,6 +13,7 @@
<property name="lwjgl.temp" location="temp" />
<property name="lwjgl.res" location="res" />
<property name="lwjgl.version" value="2.6" />
+ <property name="lwjgl.web" location="www" />
<property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/AMD*.java,org/lwjgl/opengl/APPLE*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/NVX*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java,org/lwjgl/opengl/GREMEDY*.java"/>
<property name="opencl-template-pattern-extensions" value="org/lwjgl/opencl/KHR*.java,org/lwjgl/opencl/EXT*.java,org/lwjgl/opencl/APPLE*.java,org/lwjgl/opencl/AMD*.java,org/lwjgl/opencl/NV*.java"/>
Modified: trunk/LWJGL/platform_build/build-webstart.xml
===================================================================
--- trunk/LWJGL/platform_build/build-webstart.xml 2010-10-12 17:44:19 UTC (rev 3439)
+++ trunk/LWJGL/platform_build/build-webstart.xml 2010-10-12 19:21:35 UTC (rev 3440)
@@ -17,32 +17,39 @@
</antcall>
</target>
- <!-- -->
+ <!-- Create webstart demo and extension from release files -->
<target name="-webstart_demo" description="Using released files, creates the necessary files used for jnlp demos">
<!-- delete existing temp -->
<delete dir="${lwjgl.temp}"/>
- <!-- unzip common files -->
- <unzip src="${lwjgl.dist}/lwjgl-${lwjgl.version}.zip" dest="${lwjgl.temp}/jnlp/temp" overwrite="true"/>
+ <!-- unzip release to temp dir -->
+ <unzip src="${lwjgl.dist}/lwjgl-${lwjgl.version}.zip" dest="${lwjgl.temp}/webstart/temp" overwrite="true"/>
- <!-- move files to unified structure -->
- <move todir="${lwjgl.temp}/jnlp/temp">
- <fileset dir="${lwjgl.temp}/jnlp/temp/lwjgl-${lwjgl.version}/">
- <include name="**"/>
- </fileset>
- </move>
+ <!-- DEMO SECTION -->
+ <move file="${lwjgl.temp}/webstart/temp/lwjgl-${lwjgl.version}/jar/lwjgl_test.jar" tofile="${lwjgl.temp}/webstart/lwjgl_test.jar"/>
+ <jar destfile="${lwjgl.temp}/webstart/lwjgl_test.jar" update="true">
+ <manifest>
+ <attribute name="Sealed" value="true"/>
+ </manifest>
+ </jar>
+ <jar destfile="${lwjgl.temp}/webstart/media.jar" basedir="${lwjgl.res}">
+ <manifest>
+ <attribute name="Sealed" value="true"/>
+ </manifest>
+ </jar>
- <!-- move relevant files to root -->
- <move todir="${lwjgl.temp}/jnlp/" flatten="true">
- <fileset dir="${lwjgl.temp}/jnlp/temp">
+ <!-- EXTENSION SECTION -->
+ <move todir="${lwjgl.temp}/webstart/${lwjgl.version}/" flatten="true">
+ <fileset dir="${lwjgl.temp}/webstart/temp">
<include name="**/jinput.jar"/>
<include name="**/lwjgl*.jar"/>
+ <exclude name="**/lwjgl_util_applet.jar"/>
+ <exclude name="**/lwjgl-debug.jar"/>
</fileset>
</move>
- <!-- update Trusted-Library -->
- <jar destfile="${lwjgl.temp}/jnlp/lwjgl.jar" update="true">
+ <jar destfile="${lwjgl.temp}/webstart/${lwjgl.version}/lwjgl.jar" update="true">
<manifest>
<attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/>
<attribute name="Specification-Version" value="${lwjgl.version}"/>
@@ -57,7 +64,7 @@
</manifest>
</jar>
- <jar destfile="${lwjgl.temp}/jnlp/jinput.jar" update="true">
+ <jar destfile="${lwjgl.temp}/webstart/${lwjgl.version}/jinput.jar" update="true">
<manifest>
<attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/>
<attribute name="Specification-Version" value="${lwjgl.version}"/>
@@ -72,7 +79,7 @@
</manifest>
</jar>
- <jar destfile="${lwjgl.temp}/jnlp/lwjgl_util.jar" update="true">
+ <jar destfile="${lwjgl.temp}/webstart/${lwjgl.version}/lwjgl_util.jar" update="true">
<manifest>
<attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/>
<attribute name="Specification-Version" value="${lwjgl.version}"/>
@@ -87,14 +94,8 @@
</manifest>
</jar>
- <jar destfile="${lwjgl.temp}/jnlp/lwjgl_test.jar" update="true">
- <manifest>
- <attribute name="Sealed" value="true"/>
- </manifest>
- </jar>
-
<!-- create native jars -->
- <jar destfile="${lwjgl.temp}/jnlp/native_windows.jar" basedir="${lwjgl.temp}/jnlp/temp/native/windows">
+ <jar destfile="${lwjgl.temp}/webstart/${lwjgl.version}/native_windows.jar" basedir="${lwjgl.temp}/webstart/temp/lwjgl-${lwjgl.version}/native/windows">
<manifest>
<attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/>
<attribute name="Specification-Version" value="${lwjgl.version}"/>
@@ -109,7 +110,7 @@
</manifest>
</jar>
- <jar destfile="${lwjgl.temp}/jnlp/native_linux.jar" basedir="${lwjgl.temp}/jnlp/temp/native/linux">
+ <jar destfile="${lwjgl.temp}/webstart/${lwjgl.version}/native_linux.jar" basedir="${lwjgl.temp}/webstart/temp/lwjgl-${lwjgl.version}/native/linux">
<manifest>
<attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/>
<attribute name="Specification-Version" value="${lwjgl.version}"/>
@@ -124,7 +125,7 @@
</manifest>
</jar>
- <jar destfile="${lwjgl.temp}/jnlp/native_macosx.jar" basedir="${lwjgl.temp}/jnlp/temp/native/macosx">
+ <jar destfile="${lwjgl.temp}/webstart/${lwjgl.version}/native_macosx.jar" basedir="${lwjgl.temp}/webstart/temp/lwjgl-${lwjgl.version}/native/macosx">
<manifest>
<attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/>
<attribute name="Specification-Version" value="${lwjgl.version}"/>
@@ -139,7 +140,7 @@
</manifest>
</jar>
- <jar destfile="${lwjgl.temp}/jnlp/native_solaris.jar" basedir="${lwjgl.temp}/jnlp/temp/native/solaris">
+ <jar destfile="${lwjgl.temp}/webstart/${lwjgl.version}/native_solaris.jar" basedir="${lwjgl.temp}/webstart/temp/lwjgl-${lwjgl.version}/native/solaris">
<manifest>
<attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/>
<attribute name="Specification-Version" value="${lwjgl.version}"/>
@@ -153,21 +154,28 @@
<attribute name="Trusted-Library" value="true"/>
</manifest>
</jar>
-
- <!-- create media jar -->
- <jar destfile="${lwjgl.temp}/jnlp/media.jar" basedir="${lwjgl.res}">
- <manifest>
- <attribute name="Sealed" value="true"/>
- </manifest>
- </jar>
<!-- sign 'em -->
- <signjar jar="${lwjgl.temp}/jnlp/lwjgl.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
- <signjar jar="${lwjgl.temp}/jnlp/lwjgl_util.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
- <signjar jar="${lwjgl.temp}/jnlp/jinput.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
- <signjar jar="${lwjgl.temp}/jnlp/native_solaris.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
- <signjar jar="${lwjgl.temp}/jnlp/native_linux.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
- <signjar jar="${lwjgl.temp}/jnlp/native_macosx.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
- <signjar jar="${lwjgl.temp}/jnlp/native_windows.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
+ <signjar jar="${lwjgl.temp}/webstart/${lwjgl.version}/lwjgl.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
+ <signjar jar="${lwjgl.temp}/webstart/${lwjgl.version}/lwjgl_util.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
+ <signjar jar="${lwjgl.temp}/webstart/${lwjgl.version}/jinput.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
+ <signjar jar="${lwjgl.temp}/webstart/${lwjgl.version}/native_solaris.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
+ <signjar jar="${lwjgl.temp}/webstart/${lwjgl.version}/native_linux.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
+ <signjar jar="${lwjgl.temp}/webstart/${lwjgl.version}/native_macosx.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
+ <signjar jar="${lwjgl.temp}/webstart/${lwjgl.version}/native_windows.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
+
+ <!-- copy over extension jnlp file -->
+ <copy todir="${lwjgl.temp}/webstart/${lwjgl.version}">
+ <fileset dir="${lwjgl.web}/webstart">
+ <include name="extension.jnlp"/>
+ </fileset>
+ <filterset>
+ <filter token="LWJGL_VERSION" value="${lwjgl.version}"/>
+ </filterset>
+ </copy>
+
+ <!-- nuke extracted dir -->
+ <delete dir="${lwjgl.temp}/webstart/temp"/>
+
</target>
</project>
\ No newline at end of file
Added: trunk/LWJGL/www/webstart/demo.php
===================================================================
--- trunk/LWJGL/www/webstart/demo.php (rev 0)
+++ trunk/LWJGL/www/webstart/demo.php 2010-10-12 19:21:35 UTC (rev 3440)
@@ -0,0 +1,35 @@
+<?
+header("Content-type: application/x-java-jnlp-file");
+?>
+
+<!-- JNLP File for LWJGL Demos -->
+<jnlp
+ spec="1.0+"
+ codebase="http://lwjgl.org/webstart/"
+ href="demo.php/<?php echo substr($_SERVER["PATH_INFO"], 1, strlen($_SERVER["PATH_INFO"])-1); ?>">
+ <information>
+ <title>LWJGL Demo [<?php echo substr($_SERVER["PATH_INFO"], 1, strlen($_SERVER["PATH_INFO"])-1); ?>]</title>
+ <vendor>LWJGL</vendor>
+ <homepage href="http://lwjgl.org/"/>
+ <description>Demonstration of LWJGL</description>
+ <description kind="short">Technology Preview</description>
+ <icon kind="splash" href="logo.png" />
+ <offline-allowed/>
+ </information>
+ <resources>
+ <j2se version="1.4+"/>
+ <jar href="lwjgl_test.jar" main="true"/>
+ <jar href="media.jar"/>
+ <extension name="lwjgl" href="http://lwjgl.org/webstart/2.5/extension.jnlp" />
+ </resources>
+ <application-desc main-class="org.lwjgl.<?php echo substr($_SERVER["PATH_INFO"], 1, strlen($_SERVER["PATH_INFO"])-1); ?>">
+ <?php
+ if(isset($HTTP_GET_VARS['arguments'])) {
+ $arguments = $HTTP_GET_VARS['arguments'];
+ foreach ($arguments as $argument) {
+ echo "<argument>" . $argument . "</argument>\n";
+ }
+ }
+ ?>
+ </application-desc>
+</jnlp>
Added: trunk/LWJGL/www/webstart/extension.jnlp
===================================================================
--- trunk/LWJGL/www/webstart/extension.jnlp (rev 0)
+++ trunk/LWJGL/www/webstart/extension.jnlp 2010-10-12 19:21:35 UTC (rev 3440)
@@ -0,0 +1,36 @@
+<jnlp codebase="http://lwjgl.org/webstart/@LWJGL_VERSION@" href="extension.jnlp">
+ <information>
+ <title>LWJGL</title>
+ <vendor>lwjgl.org</vendor>
+ <homepage href="http://lwjgl.org/"/>
+ <description>LWJGL webstart extension</description>
+ <description kind="short">LWJGL webstart extension</description>
+ <offline-allowed/>
+ </information>
+ <update check="background" policy="always"/>
+ <security>
+ <all-permissions/>
+ </security>
+ <resources>
+ <jar href="lwjgl.jar"/>
+ <jar href="lwjgl_util.jar"/>
+ <jar href="jinput.jar"/>
+ </resources>
+ <resources os="Windows">
+ <j2se version="1.4+"/>
+ <nativelib href="native_windows.jar"/>
+ </resources>
+ <resources os="Linux">
+ <j2se version="1.4+"/>
+ <nativelib href="native_linux.jar"/>
+ </resources>
+ <resources os="Mac OS X">
+ <j2se version="1.4+"/>
+ <nativelib href="native_macosx.jar"/>
+ </resources>
+ <resources os="SunOS" arch="x86">
+ <j2se version="1.4+"/>
+ <nativelib href="native_solaris.jar"/>
+ </resources>
+ <component-desc />
+</jnlp>
Added: trunk/LWJGL/www/webstart/logo.png
===================================================================
(Binary files differ)
Property changes on: trunk/LWJGL/www/webstart/logo.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/LWJGL/www/webstart/source.php
===================================================================
--- trunk/LWJGL/www/webstart/source.php (rev 0)
+++ trunk/LWJGL/www/webstart/source.php 2010-10-12 19:21:35 UTC (rev 3440)
@@ -0,0 +1,4 @@
+<?php
+ header("Location: http://java-game-lib.svn.sourceforge.net/viewvc/java-game-lib/trunk/LWJGL/src/java/org/lwjgl/" . $_GET['path'] . "?rev=HEAD&content-type=text/vnd.viewcvs-markup");
+ exit;
+?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2010-10-12 17:44:25
|
Revision: 3439
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3439&view=rev
Author: matzon
Date: 2010-10-12 17:44:19 +0000 (Tue, 12 Oct 2010)
Log Message:
-----------
updates to jnlp to work as installable unit
Modified Paths:
--------------
trunk/LWJGL/platform_build/build-webstart.xml
Modified: trunk/LWJGL/platform_build/build-webstart.xml
===================================================================
--- trunk/LWJGL/platform_build/build-webstart.xml 2010-10-12 15:34:26 UTC (rev 3438)
+++ trunk/LWJGL/platform_build/build-webstart.xml 2010-10-12 17:44:19 UTC (rev 3439)
@@ -25,8 +25,6 @@
<!-- unzip common files -->
<unzip src="${lwjgl.dist}/lwjgl-${lwjgl.version}.zip" dest="${lwjgl.temp}/jnlp/temp" overwrite="true"/>
- <copy file="${lwjgl.lib}/lwjgl_test.jar" tofile="${lwjgl.temp}/jnlp/temp/lwjgl-${lwjgl.version}/lwjgl_test.jar"/>
- <copy file="${lwjgl.lib}/lwjgl_util.jar" tofile="${lwjgl.temp}/jnlp/temp/lwjgl-${lwjgl.version}/lwjgl_util.jar"/>
<!-- move files to unified structure -->
<move todir="${lwjgl.temp}/jnlp/temp">
@@ -46,6 +44,14 @@
<!-- update Trusted-Library -->
<jar destfile="${lwjgl.temp}/jnlp/lwjgl.jar" update="true">
<manifest>
+ <attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/>
+ <attribute name="Specification-Version" value="${lwjgl.version}"/>
+ <attribute name="Specification-Vendor" value="lwjgl.org"/>
+ <attribute name="Implementation-Title" value="LWJGL ${lwjgl.version}"/>
+ <attribute name="Implementation-Version" value="${lwjgl.version}"/>
+ <attribute name="Implementation-Vendor" value="lwjgl.org"/>
+ <attribute name="Implementation-Vendor-Id" value="org.lwjgl"/>
+ <attribute name="Extension-Name" value="org.lwjgl"/>
<attribute name="Sealed" value="true"/>
<attribute name="Trusted-Library" value="true"/>
</manifest>
@@ -53,6 +59,14 @@
<jar destfile="${lwjgl.temp}/jnlp/jinput.jar" update="true">
<manifest>
+ <attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/>
+ <attribute name="Specification-Version" value="${lwjgl.version}"/>
+ <attribute name="Specification-Vendor" value="lwjgl.org"/>
+ <attribute name="Implementation-Title" value="LWJGL ${lwjgl.version}"/>
+ <attribute name="Implementation-Version" value="${lwjgl.version}"/>
+ <attribute name="Implementation-Vendor" value="lwjgl.org"/>
+ <attribute name="Implementation-Vendor-Id" value="org.lwjgl"/>
+ <attribute name="Extension-Name" value="org.lwjgl"/>
<attribute name="Sealed" value="true"/>
<attribute name="Trusted-Library" value="true"/>
</manifest>
@@ -60,6 +74,14 @@
<jar destfile="${lwjgl.temp}/jnlp/lwjgl_util.jar" update="true">
<manifest>
+ <attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/>
+ <attribute name="Specification-Version" value="${lwjgl.version}"/>
+ <attribute name="Specification-Vendor" value="lwjgl.org"/>
+ <attribute name="Implementation-Title" value="LWJGL ${lwjgl.version}"/>
+ <attribute name="Implementation-Version" value="${lwjgl.version}"/>
+ <attribute name="Implementation-Vendor" value="lwjgl.org"/>
+ <attribute name="Implementation-Vendor-Id" value="org.lwjgl"/>
+ <attribute name="Extension-Name" value="org.lwjgl"/>
<attribute name="Sealed" value="true"/>
<attribute name="Trusted-Library" value="true"/>
</manifest>
@@ -68,32 +90,67 @@
<jar destfile="${lwjgl.temp}/jnlp/lwjgl_test.jar" update="true">
<manifest>
<attribute name="Sealed" value="true"/>
- <attribute name="Trusted-Library" value="true"/>
</manifest>
</jar>
<!-- create native jars -->
<jar destfile="${lwjgl.temp}/jnlp/native_windows.jar" basedir="${lwjgl.temp}/jnlp/temp/native/windows">
<manifest>
+ <attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/>
+ <attribute name="Specification-Version" value="${lwjgl.version}"/>
+ <attribute name="Specification-Vendor" value="lwjgl.org"/>
+ <attribute name="Implementation-Title" value="LWJGL ${lwjgl.version}"/>
+ <attribute name="Implementation-Version" value="${lwjgl.version}"/>
+ <attribute name="Implementation-Vendor" value="lwjgl.org"/>
+ <attribute name="Implementation-Vendor-Id" value="org.lwjgl"/>
+ <attribute name="Extension-Name" value="org.lwjgl"/>
<attribute name="Sealed" value="true"/>
+ <attribute name="Trusted-Library" value="true"/>
</manifest>
</jar>
<jar destfile="${lwjgl.temp}/jnlp/native_linux.jar" basedir="${lwjgl.temp}/jnlp/temp/native/linux">
<manifest>
+ <attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/>
+ <attribute name="Specification-Version" value="${lwjgl.version}"/>
+ <attribute name="Specification-Vendor" value="lwjgl.org"/>
+ <attribute name="Implementation-Title" value="LWJGL ${lwjgl.version}"/>
+ <attribute name="Implementation-Version" value="${lwjgl.version}"/>
+ <attribute name="Implementation-Vendor" value="lwjgl.org"/>
+ <attribute name="Implementation-Vendor-Id" value="org.lwjgl"/>
+ <attribute name="Extension-Name" value="org.lwjgl"/>
<attribute name="Sealed" value="true"/>
+ <attribute name="Trusted-Library" value="true"/>
</manifest>
</jar>
<jar destfile="${lwjgl.temp}/jnlp/native_macosx.jar" basedir="${lwjgl.temp}/jnlp/temp/native/macosx">
<manifest>
+ <attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/>
+ <attribute name="Specification-Version" value="${lwjgl.version}"/>
+ <attribute name="Specification-Vendor" value="lwjgl.org"/>
+ <attribute name="Implementation-Title" value="LWJGL ${lwjgl.version}"/>
+ <attribute name="Implementation-Version" value="${lwjgl.version}"/>
+ <attribute name="Implementation-Vendor" value="lwjgl.org"/>
+ <attribute name="Implementation-Vendor-Id" value="org.lwjgl"/>
+ <attribute name="Extension-Name" value="org.lwjgl"/>
<attribute name="Sealed" value="true"/>
+ <attribute name="Trusted-Library" value="true"/>
</manifest>
</jar>
<jar destfile="${lwjgl.temp}/jnlp/native_solaris.jar" basedir="${lwjgl.temp}/jnlp/temp/native/solaris">
<manifest>
+ <attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/>
+ <attribute name="Specification-Version" value="${lwjgl.version}"/>
+ <attribute name="Specification-Vendor" value="lwjgl.org"/>
+ <attribute name="Implementation-Title" value="LWJGL ${lwjgl.version}"/>
+ <attribute name="Implementation-Version" value="${lwjgl.version}"/>
+ <attribute name="Implementation-Vendor" value="lwjgl.org"/>
+ <attribute name="Implementation-Vendor-Id" value="org.lwjgl"/>
+ <attribute name="Extension-Name" value="org.lwjgl"/>
<attribute name="Sealed" value="true"/>
+ <attribute name="Trusted-Library" value="true"/>
</manifest>
</jar>
@@ -101,7 +158,6 @@
<jar destfile="${lwjgl.temp}/jnlp/media.jar" basedir="${lwjgl.res}">
<manifest>
<attribute name="Sealed" value="true"/>
- <attribute name="Trusted-Library" value="true"/>
</manifest>
</jar>
@@ -109,8 +165,6 @@
<signjar jar="${lwjgl.temp}/jnlp/lwjgl.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
<signjar jar="${lwjgl.temp}/jnlp/lwjgl_util.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
<signjar jar="${lwjgl.temp}/jnlp/jinput.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
- <signjar jar="${lwjgl.temp}/jnlp/lwjgl_test.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
- <signjar jar="${lwjgl.temp}/jnlp/media.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
<signjar jar="${lwjgl.temp}/jnlp/native_solaris.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
<signjar jar="${lwjgl.temp}/jnlp/native_linux.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
<signjar jar="${lwjgl.temp}/jnlp/native_macosx.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2010-10-12 15:34:33
|
Revision: 3438
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3438&view=rev
Author: matzon
Date: 2010-10-12 15:34:26 +0000 (Tue, 12 Oct 2010)
Log Message:
-----------
fixed issue with signed/unsigned code dialog popping up
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/examples/spaceinvaders/TextureLoader.java
trunk/LWJGL/src/java/org/lwjgl/util/WaveData.java
Modified: trunk/LWJGL/src/java/org/lwjgl/examples/spaceinvaders/TextureLoader.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/examples/spaceinvaders/TextureLoader.java 2010-10-12 09:32:34 UTC (rev 3437)
+++ trunk/LWJGL/src/java/org/lwjgl/examples/spaceinvaders/TextureLoader.java 2010-10-12 15:34:26 UTC (rev 3438)
@@ -33,6 +33,7 @@
import java.awt.Color;
import java.awt.Graphics;
+import java.awt.Image;
import java.awt.color.ColorSpace;
import java.awt.image.BufferedImage;
import java.awt.image.ColorModel;
@@ -41,7 +42,6 @@
import java.awt.image.DataBufferByte;
import java.awt.image.Raster;
import java.awt.image.WritableRaster;
-import java.io.BufferedInputStream;
import java.io.IOException;
import java.net.URL;
import java.nio.ByteBuffer;
@@ -50,7 +50,7 @@
import java.util.HashMap;
import java.util.Hashtable;
-import javax.imageio.ImageIO;
+import javax.swing.ImageIcon;
import org.lwjgl.BufferUtils;
@@ -277,7 +277,14 @@
throw new IOException("Cannot find: " + ref);
}
- BufferedImage bufferedImage = ImageIO.read(new BufferedInputStream(getClass().getClassLoader().getResourceAsStream(ref)));
+ // due to an issue with ImageIO and mixed signed code
+ // we are now using good oldfashioned ImageIcon to load
+ // images and the paint it on top of a new BufferedImage
+ Image img = new ImageIcon(url).getImage();
+ BufferedImage bufferedImage = new BufferedImage(img.getWidth(null), img.getHeight(null), BufferedImage.TYPE_INT_RGB);
+ Graphics g = bufferedImage.getGraphics();
+ g.drawImage(img, 0, 0, null);
+ g.dispose();
return bufferedImage;
}
Modified: trunk/LWJGL/src/java/org/lwjgl/util/WaveData.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/WaveData.java 2010-10-12 09:32:34 UTC (rev 3437)
+++ trunk/LWJGL/src/java/org/lwjgl/util/WaveData.java 2010-10-12 15:34:26 UTC (rev 3438)
@@ -46,6 +46,8 @@
import org.lwjgl.openal.AL10;
+import com.sun.media.sound.WaveFileReader;
+
/**
*
* Utitlity class for loading wavefiles.
@@ -92,9 +94,11 @@
*/
public static WaveData create(URL path) {
try {
- return create(
- AudioSystem.getAudioInputStream(
- new BufferedInputStream(path.openStream())));
+ // due to an issue with AudioSystem.getAudioInputStream
+ // and mixing unsigned and signed code
+ // we will use the reader directly
+ WaveFileReader wfr = new WaveFileReader();
+ return create(wfr.getAudioInputStream(new BufferedInputStream(path.openStream())));
} catch (Exception e) {
org.lwjgl.LWJGLUtil.log("Unable to create from: " + path + ", " + e.getMessage());
return null;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2010-10-12 09:32:41
|
Revision: 3437
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3437&view=rev
Author: spasi
Date: 2010-10-12 09:32:34 +0000 (Tue, 12 Oct 2010)
Log Message:
-----------
Calling convention is ignored on x64.
Modified Paths:
--------------
trunk/LWJGL/src/native/common/extcl.h
Modified: trunk/LWJGL/src/native/common/extcl.h
===================================================================
--- trunk/LWJGL/src/native/common/extcl.h 2010-10-12 01:35:33 UTC (rev 3436)
+++ trunk/LWJGL/src/native/common/extcl.h 2010-10-12 09:32:34 UTC (rev 3437)
@@ -60,7 +60,7 @@
#endif
// TODO: This is a bug in current CL implementations (AMD's only?), remove when fixed. (used for cl_native_kernel_func)
-#if defined(_WIN32) || defined(_WIN64)
+#if defined(_WIN32)
#define CL_USER_FUNC_CALLBACK __cdecl
#else
#define CL_USER_FUNC_CALLBACK CL_CALLBACK
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2010-10-12 01:35:40
|
Revision: 3436
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3436&view=rev
Author: spasi
Date: 2010-10-12 01:35:33 +0000 (Tue, 12 Oct 2010)
Log Message:
-----------
Replaced HashMap<Long, T> with FastLongMap in the OpenCL package.
Replaced CharsetEncoder with simple ASCII encoding in APIUtil.
Attempt to fix CL native kernels on x64.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opencl/APIUtil.java
trunk/LWJGL/src/java/org/lwjgl/opencl/CLContext.java
trunk/LWJGL/src/java/org/lwjgl/opencl/CLObjectRegistry.java
trunk/LWJGL/src/java/org/lwjgl/opencl/CLObjectRegistryGlobal.java
trunk/LWJGL/src/java/org/lwjgl/opencl/CLPlatform.java
trunk/LWJGL/src/java/org/lwjgl/opengl/APIUtil.java
trunk/LWJGL/src/native/common/org_lwjgl_opencl_CallbackUtil.c
trunk/LWJGL/src/templates/org/lwjgl/opencl/CL10.java
Added Paths:
-----------
trunk/LWJGL/src/java/org/lwjgl/opencl/FastLongMap.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opencl/APIUtil.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opencl/APIUtil.java 2010-10-08 20:57:23 UTC (rev 3435)
+++ trunk/LWJGL/src/java/org/lwjgl/opencl/APIUtil.java 2010-10-12 01:35:33 UTC (rev 3436)
@@ -34,10 +34,9 @@
import org.lwjgl.BufferUtils;
import org.lwjgl.LWJGLUtil;
import org.lwjgl.PointerBuffer;
+import org.lwjgl.opencl.FastLongMap.Entry;
import java.nio.*;
-import java.nio.charset.Charset;
-import java.nio.charset.CharsetEncoder;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;
@@ -75,16 +74,10 @@
protected PointerBuffer initialValue() { return BufferUtils.createPointerBuffer(INITIAL_LENGTHS_SIZE); }
};
- private static final ThreadLocal<InfiniteCharSequence> infiniteSeqTL = new ThreadLocal<InfiniteCharSequence>() {
- protected InfiniteCharSequence initialValue() { return new InfiniteCharSequence(); }
- };
-
private static final ThreadLocal<Buffers> buffersTL = new ThreadLocal<Buffers>() {
protected Buffers initialValue() { return new Buffers(); }
};
- private static final CharsetEncoder encoder = Charset.forName("US-ASCII").newEncoder();
-
private APIUtil() {
}
@@ -188,15 +181,22 @@
return lengths;
}
- private static InfiniteCharSequence getInfiniteSeq() {
- return infiniteSeqTL.get();
- }
+ /**
+ * Simple ASCII encoding.
+ *
+ * @param buffer The target buffer
+ * @param string The source string
+ */
+ private static ByteBuffer encode(final ByteBuffer buffer, final CharSequence string) {
+ for ( int i = 0; i < string.length(); i++ ) {
+ final char c = string.charAt(i);
+ if ( LWJGLUtil.DEBUG && 0x80 <= c ) // Silently ignore and map to 0x1A.
+ buffer.put((byte)0x1A);
+ else
+ buffer.put((byte)c);
+ }
- private static void encode(final ByteBuffer buffer, final CharSequence string) {
- final InfiniteCharSequence infiniteSeq = getInfiniteSeq();
- infiniteSeq.setString(string);
- encoder.encode(infiniteSeq.buffer, buffer, true);
- infiniteSeq.clear();
+ return buffer;
}
/**
@@ -224,10 +224,7 @@
* @return the String as a ByteBuffer
*/
static ByteBuffer getBuffer(final CharSequence string) {
- final ByteBuffer buffer = getBufferByte(string.length());
-
- encode(buffer, string);
-
+ final ByteBuffer buffer = encode(getBufferByte(string.length()), string);
buffer.flip();
return buffer;
}
@@ -240,10 +237,7 @@
* @return the String as a ByteBuffer
*/
static ByteBuffer getBuffer(final CharSequence string, final int offset) {
- final ByteBuffer buffer = getBufferByteOffset(offset + string.length());
-
- encode(buffer, string);
-
+ final ByteBuffer buffer = encode(getBufferByteOffset(offset + string.length()), string);
buffer.flip();
return buffer;
}
@@ -256,10 +250,7 @@
* @return the String as a ByteBuffer
*/
static ByteBuffer getBufferNT(final CharSequence string) {
- final ByteBuffer buffer = getBufferByte(string.length() + 1);
-
- encode(buffer, string);
-
+ final ByteBuffer buffer = encode(getBufferByte(string.length() + 1), string);
buffer.put((byte)0);
buffer.flip();
return buffer;
@@ -283,12 +274,8 @@
static ByteBuffer getBuffer(final CharSequence[] strings) {
final ByteBuffer buffer = getBufferByte(getTotalLength(strings));
- final InfiniteCharSequence infiniteSeq = getInfiniteSeq();
- for ( CharSequence string : strings ) {
- infiniteSeq.setString(string);
- encoder.encode(infiniteSeq.buffer, buffer, true);
- }
- infiniteSeq.clear();
+ for ( CharSequence string : strings )
+ encode(buffer, string);
buffer.flip();
return buffer;
@@ -304,13 +291,10 @@
static ByteBuffer getBufferNT(final CharSequence[] strings) {
final ByteBuffer buffer = getBufferByte(getTotalLength(strings) + strings.length);
- final InfiniteCharSequence infiniteSeq = getInfiniteSeq();
for ( CharSequence string : strings ) {
- infiniteSeq.setString(string);
- encoder.encode(infiniteSeq.buffer, buffer, true);
+ encode(buffer, string);
buffer.put((byte)0);
}
- infiniteSeq.clear();
buffer.flip();
return buffer;
@@ -358,43 +342,6 @@
return (int)size;
}
- /**
- * A mutable CharSequence with very large initial length. We can wrap this in a re-usable CharBuffer for decoding.
- * We cannot subclass CharBuffer because of {@link java.nio.CharBuffer#toString(int,int)}.
- */
- private static class InfiniteCharSequence implements CharSequence {
-
- final CharBuffer buffer;
-
- CharSequence string;
-
- InfiniteCharSequence() {
- buffer = CharBuffer.wrap(this);
- }
-
- void setString(final CharSequence string) {
- this.string = string;
- this.buffer.position(0);
- this.buffer.limit(string.length());
- }
-
- void clear() {
- this.string = null;
- }
-
- public int length() {
- return Integer.MAX_VALUE;
- }
-
- public char charAt(final int index) {
- return string.charAt(index);
- }
-
- public CharSequence subSequence(final int start, final int end) {
- return string.subSequence(start, end);
- }
- }
-
private static class Buffers {
final ShortBuffer shorts;
@@ -559,7 +506,8 @@
if ( registry.isEmpty() )
return;
- for ( final T object : registry.getAll() ) {
+ for ( Entry<T> entry : registry.getAll() ) {
+ final T object = entry.value;
while ( object.isValid() )
destructor.release(object);
}
Modified: trunk/LWJGL/src/java/org/lwjgl/opencl/CLContext.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opencl/CLContext.java 2010-10-08 20:57:23 UTC (rev 3435)
+++ trunk/LWJGL/src/java/org/lwjgl/opencl/CLContext.java 2010-10-12 01:35:33 UTC (rev 3436)
@@ -37,9 +37,7 @@
import org.lwjgl.opengl.Drawable;
import java.nio.IntBuffer;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
/**
* This class is a wrapper around a cl_context pointer.
@@ -57,10 +55,10 @@
private final CLObjectRegistry<CLEvent> clEvents;
/** Global registry for build callbacks. */
- static final Map<Long, CLProgram> clProgramsGlobal = new HashMap<Long, CLProgram>();
+ static final FastLongMap<CLProgram> clProgramsGlobal = new FastLongMap<CLProgram>();
/** Global registry for event callbacks. */
- static final Map<Long, CLEvent> clEventsGlobal = new HashMap<Long, CLEvent>();
+ static final FastLongMap<CLEvent> clEventsGlobal = new FastLongMap<CLEvent>();
CLContext(final long pointer, final CLPlatform platform) {
super(pointer, platform);
Modified: trunk/LWJGL/src/java/org/lwjgl/opencl/CLObjectRegistry.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opencl/CLObjectRegistry.java 2010-10-08 20:57:23 UTC (rev 3435)
+++ trunk/LWJGL/src/java/org/lwjgl/opencl/CLObjectRegistry.java 2010-10-12 01:35:33 UTC (rev 3436)
@@ -2,11 +2,6 @@
import org.lwjgl.LWJGLUtil;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
/**
* A CLObjectChild container.
*
@@ -14,7 +9,7 @@
*/
class CLObjectRegistry<T extends CLObjectChild> {
- private Map<Long, T> registry;
+ private FastLongMap<T> registry;
CLObjectRegistry() {
}
@@ -31,12 +26,12 @@
return registry != null && registry.containsKey(id);
}
- final List<T> getAll() {
- return registry == null ? null : new ArrayList<T>(registry.values());
+ final Iterable<FastLongMap.Entry<T>> getAll() {
+ return registry;
}
void registerObject(final T object) {
- final Map<Long, T> map = getMap();
+ final FastLongMap<T> map = getMap();
final Long key = object.getPointer();
if ( LWJGLUtil.DEBUG && map.containsKey(key) )
@@ -49,9 +44,9 @@
getMap().remove(object.getPointerUnsafe());
}
- private Map<Long, T> getMap() {
+ private FastLongMap<T> getMap() {
if ( registry == null )
- registry = new HashMap<Long, T>();
+ registry = new FastLongMap<T>();
return registry;
}
Modified: trunk/LWJGL/src/java/org/lwjgl/opencl/CLObjectRegistryGlobal.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opencl/CLObjectRegistryGlobal.java 2010-10-08 20:57:23 UTC (rev 3435)
+++ trunk/LWJGL/src/java/org/lwjgl/opencl/CLObjectRegistryGlobal.java 2010-10-12 01:35:33 UTC (rev 3436)
@@ -31,8 +31,6 @@
*/
package org.lwjgl.opencl;
-import java.util.Map;
-
/**
* A CLObject registry that also registers/unregisters objects to/from a global registry.
*
@@ -40,9 +38,9 @@
*/
final class CLObjectRegistryGlobal<T extends CLObjectChild> extends CLObjectRegistry<T> {
- private final Map<Long, T> globalRegistry;
+ private final FastLongMap<T> globalRegistry;
- CLObjectRegistryGlobal(final Map<Long, T> globalRegistry) {
+ CLObjectRegistryGlobal(final FastLongMap<T> globalRegistry) {
this.globalRegistry = globalRegistry;
}
Modified: trunk/LWJGL/src/java/org/lwjgl/opencl/CLPlatform.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opencl/CLPlatform.java 2010-10-08 20:57:23 UTC (rev 3435)
+++ trunk/LWJGL/src/java/org/lwjgl/opencl/CLPlatform.java 2010-10-12 01:35:33 UTC (rev 3436)
@@ -36,9 +36,7 @@
import java.nio.ByteBuffer;
import java.nio.IntBuffer;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
import static java.lang.Math.*;
@@ -51,12 +49,12 @@
private static final CLPlatformUtil util = (CLPlatformUtil)getInfoUtilInstance(CLPlatform.class, "CL_PLATFORM_UTIL");
- private static final Map<Long, CLPlatform> clPlatforms = new HashMap<Long, CLPlatform>();
+ private static final FastLongMap<CLPlatform> clPlatforms = new FastLongMap<CLPlatform>();
private final CLObjectRegistry<CLDevice> clDevices;
/** Global registry for build callbacks. */
- static final Map<Long, CLDevice> clDevicesGlobal = new HashMap<Long, CLDevice>();
+ static final FastLongMap<CLDevice> clDevicesGlobal = new FastLongMap<CLDevice>();
private Object caps;
Added: trunk/LWJGL/src/java/org/lwjgl/opencl/FastLongMap.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opencl/FastLongMap.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/opencl/FastLongMap.java 2010-10-12 01:35:33 UTC (rev 3436)
@@ -0,0 +1,239 @@
+/*
+ * Copyright 2002-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
+ * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+package org.lwjgl.opencl;
+
+import java.util.Iterator;
+
+/**
+ * A hash map using primitive longs as keys rather than objects.
+ *
+ * @author Justin Couch
+ * @author Alex Chaffee (al...@ap...)
+ * @author Stephen Colebourne
+ * @author Nathan Sweet
+ */
+final class FastLongMap<V> implements Iterable<FastLongMap.Entry<V>> {
+
+ private Entry[] table;
+ private int size, mask, capacity, threshold;
+
+ /** Same as: FastLongMap(16, 0.75f); */
+ FastLongMap() {
+ this(16, 0.75f);
+ }
+
+ /** Same as: FastLongMap(initialCapacity, 0.75f); */
+ FastLongMap(int initialCapacity) {
+ this(initialCapacity, 0.75f);
+ }
+
+ FastLongMap(int initialCapacity, float loadFactor) {
+ if ( initialCapacity > 1 << 30 ) throw new IllegalArgumentException("initialCapacity is too large.");
+ if ( initialCapacity < 0 ) throw new IllegalArgumentException("initialCapacity must be greater than zero.");
+ if ( loadFactor <= 0 ) throw new IllegalArgumentException("initialCapacity must be greater than zero.");
+ capacity = 1;
+ while ( capacity < initialCapacity )
+ capacity <<= 1;
+ this.threshold = (int)(capacity * loadFactor);
+ this.table = new Entry[capacity];
+ this.mask = capacity - 1;
+ }
+
+ private int index(final long key) {
+ return index(key, mask);
+ }
+
+ private static int index(final long key, final int mask) {
+ final int hash = (int)(key ^ (key >>> 32));
+ return hash & mask;
+ }
+
+ public V put(long key, V value) {
+ final Entry<V>[] table = this.table;
+ int index = index(key);
+
+ // Check if key already exists.
+ for ( Entry<V> e = table[index]; e != null; e = e.next ) {
+ if ( e.key != key ) continue;
+ V oldValue = e.value;
+ e.value = value;
+ return oldValue;
+ }
+
+ table[index] = new Entry<V>(key, value, table[index]);
+
+ if ( size++ >= threshold )
+ rehash(table);
+
+ return null;
+ }
+
+ private void rehash(final Entry<V>[] table) {
+ final int newCapacity = 2 * capacity;
+ final int newMask = newCapacity - 1;
+
+ final Entry<V>[] newTable = new Entry[newCapacity];
+
+ for ( int i = 0, index; i < table.length; i++ ) {
+ Entry<V> e = table[i];
+ if ( e == null ) continue;
+ do {
+ final Entry<V> next = e.next;
+ index = index(e.key, newMask);
+ e.next = newTable[index];
+ newTable[index] = e;
+ e = next;
+ } while ( e != null );
+ }
+
+ this.table = newTable;
+ capacity = newCapacity;
+ mask = newMask;
+ threshold *= 2;
+ }
+
+ public V get(long key) {
+ final int index = index(key);
+ for ( Entry<V> e = table[index]; e != null; e = e.next )
+ if ( e.key == key ) return e.value;
+ return null;
+ }
+
+ public boolean containsValue(Object value) {
+ final Entry<V>[] table = this.table;
+ for ( int i = table.length - 1; i >= 0; i-- )
+ for ( Entry<V> e = table[i]; e != null; e = e.next )
+ if ( e.value.equals(value) ) return true;
+ return false;
+ }
+
+ public boolean containsKey(long key) {
+ final int index = index(key);
+ for ( Entry<V> e = table[index]; e != null; e = e.next )
+ if ( e.key == key ) return true;
+ return false;
+ }
+
+ public V remove(long key) {
+ final int index = index(key);
+
+ Entry<V> prev = table[index];
+ Entry<V> e = prev;
+ while ( e != null ) {
+ Entry<V> next = e.next;
+ if ( e.key == key ) {
+ size--;
+ if ( prev == e )
+ table[index] = next;
+ else
+ prev.next = next;
+ return e.value;
+ }
+ prev = e;
+ e = next;
+ }
+ return null;
+ }
+
+ public int size() {
+ return size;
+ }
+
+ public boolean isEmpty() {
+ return size == 0;
+ }
+
+ public void clear() {
+ final Entry<V>[] table = this.table;
+ for ( int index = table.length - 1; index >= 0; index-- )
+ table[index] = null;
+ size = 0;
+ }
+
+ public EntryIterator iterator() {
+ return new EntryIterator();
+ }
+
+ public class EntryIterator implements Iterator<Entry<V>> {
+
+ private int nextIndex;
+ private Entry<V> current;
+
+ EntryIterator() {
+ reset();
+ }
+
+ public void reset() {
+ current = null;
+ // Find first bucket.
+ final Entry<V>[] table = FastLongMap.this.table;
+ int i;
+ for ( i = table.length - 1; i >= 0; i-- )
+ if ( table[i] != null ) break;
+ nextIndex = i;
+ }
+
+ public boolean hasNext() {
+ if ( nextIndex >= 0 ) return true;
+ Entry e = current;
+ return e != null && e.next != null;
+ }
+
+ public Entry<V> next() {
+ // Next entry in current bucket.
+ Entry<V> e = current;
+ if ( e != null ) {
+ e = e.next;
+ if ( e != null ) {
+ current = e;
+ return e;
+ }
+ }
+ // Use the bucket at nextIndex and find the next nextIndex.
+ final Entry<V>[] table = FastLongMap.this.table;
+ int i = nextIndex;
+ e = current = table[i];
+ while ( --i >= 0 )
+ if ( table[i] != null ) break;
+ nextIndex = i;
+ return e;
+ }
+
+ public void remove() {
+ FastLongMap.this.remove(current.key);
+ }
+ }
+
+ static final class Entry<T> {
+
+ final long key;
+ T value;
+ Entry<T> next;
+
+ Entry(long key, T value, Entry<T> next) {
+ this.key = key;
+ this.value = value;
+ this.next = next;
+ }
+
+ public long getKey() {
+ return key;
+ }
+
+ public T getValue() {
+ return value;
+ }
+
+ }
+
+}
\ No newline at end of file
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/APIUtil.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/APIUtil.java 2010-10-08 20:57:23 UTC (rev 3435)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/APIUtil.java 2010-10-12 01:35:33 UTC (rev 3436)
@@ -32,10 +32,9 @@
package org.lwjgl.opengl;
import org.lwjgl.BufferUtils;
+import org.lwjgl.LWJGLUtil;
import java.nio.*;
-import java.nio.charset.Charset;
-import java.nio.charset.CharsetEncoder;
/** @author spasi */
final class APIUtil {
@@ -57,16 +56,10 @@
protected IntBuffer initialValue() { return BufferUtils.createIntBuffer(INITIAL_LENGTHS_SIZE); }
};
- private static final ThreadLocal<InfiniteCharSequence> infiniteSeqTL = new ThreadLocal<InfiniteCharSequence>() {
- protected InfiniteCharSequence initialValue() { return new InfiniteCharSequence(); }
- };
-
private static final ThreadLocal<Buffers> buffersTL = new ThreadLocal<Buffers>() {
protected Buffers initialValue() { return new Buffers(); }
};
- private static CharsetEncoder encoder = Charset.forName("US-ASCII").newEncoder();
-
private APIUtil() {
}
@@ -150,15 +143,22 @@
return lengths;
}
- private static InfiniteCharSequence getInfiniteSeq() {
- return infiniteSeqTL.get();
- }
+ /**
+ * Simple ASCII encoding.
+ *
+ * @param buffer The target buffer
+ * @param string The source string
+ */
+ private static ByteBuffer encode(final ByteBuffer buffer, final CharSequence string) {
+ for ( int i = 0; i < string.length(); i++ ) {
+ final char c = string.charAt(i);
+ if ( LWJGLUtil.DEBUG && 0x80 <= c ) // Silently ignore and map to 0x1A.
+ buffer.put((byte)0x1A);
+ else
+ buffer.put((byte)c);
+ }
- private static void encode(final ByteBuffer buffer, final CharSequence string) {
- final InfiniteCharSequence infiniteSeq = getInfiniteSeq();
- infiniteSeq.setString(string);
- encoder.encode(infiniteSeq.buffer, buffer, true);
- infiniteSeq.clear();
+ return buffer;
}
/**
@@ -186,10 +186,7 @@
* @return the String as a ByteBuffer
*/
static ByteBuffer getBuffer(final CharSequence string) {
- final ByteBuffer buffer = getBufferByte(string.length());
-
- encode(buffer, string);
-
+ final ByteBuffer buffer = encode(getBufferByte(string.length()), string);
buffer.flip();
return buffer;
}
@@ -202,10 +199,7 @@
* @return the String as a ByteBuffer
*/
static ByteBuffer getBuffer(final CharSequence string, final int offset) {
- final ByteBuffer buffer = getBufferByteOffset(offset + string.length());
-
- encode(buffer, string);
-
+ final ByteBuffer buffer = encode(getBufferByteOffset(offset + string.length()), string);
buffer.flip();
return buffer;
}
@@ -218,10 +212,7 @@
* @return the String as a ByteBuffer
*/
static ByteBuffer getBufferNT(final CharSequence string) {
- final ByteBuffer buffer = getBufferByte(string.length() + 1);
-
- encode(buffer, string);
-
+ final ByteBuffer buffer = encode(getBufferByte(string.length() + 1), string);
buffer.put((byte)0);
buffer.flip();
return buffer;
@@ -245,12 +236,8 @@
static ByteBuffer getBuffer(final CharSequence[] strings) {
final ByteBuffer buffer = getBufferByte(getTotalLength(strings));
- final InfiniteCharSequence infiniteSeq = getInfiniteSeq();
- for ( CharSequence string : strings ) {
- infiniteSeq.setString(string);
- encoder.encode(infiniteSeq.buffer, buffer, true);
- }
- infiniteSeq.clear();
+ for ( CharSequence string : strings )
+ encode(buffer, string);
buffer.flip();
return buffer;
@@ -266,13 +253,10 @@
static ByteBuffer getBufferNT(final CharSequence[] strings) {
final ByteBuffer buffer = getBufferByte(getTotalLength(strings) + strings.length);
- final InfiniteCharSequence infiniteSeq = getInfiniteSeq();
for ( CharSequence string : strings ) {
- infiniteSeq.setString(string);
- encoder.encode(infiniteSeq.buffer, buffer, true);
+ encode(buffer, string);
buffer.put((byte)0);
}
- infiniteSeq.clear();
buffer.flip();
return buffer;
@@ -295,43 +279,6 @@
return buffer;
}
- /**
- * A mutable CharSequence with very large initial length. We can wrap this in a re-usable CharBuffer for decoding.
- * We cannot subclass CharBuffer because of {@link CharBuffer#toString(int,int)}.
- */
- private static class InfiniteCharSequence implements CharSequence {
-
- final CharBuffer buffer;
-
- CharSequence string;
-
- InfiniteCharSequence() {
- buffer = CharBuffer.wrap(this);
- }
-
- void setString(final CharSequence string) {
- this.string = string;
- this.buffer.position(0);
- this.buffer.limit(string.length());
- }
-
- void clear() {
- this.string = null;
- }
-
- public int length() {
- return Integer.MAX_VALUE;
- }
-
- public char charAt(final int index) {
- return string.charAt(index);
- }
-
- public CharSequence subSequence(final int start, final int end) {
- return string.subSequence(start, end);
- }
- }
-
private static class Buffers {
final ShortBuffer shorts;
Modified: trunk/LWJGL/src/native/common/org_lwjgl_opencl_CallbackUtil.c
===================================================================
--- trunk/LWJGL/src/native/common/org_lwjgl_opencl_CallbackUtil.c 2010-10-08 20:57:23 UTC (rev 3435)
+++ trunk/LWJGL/src/native/common/org_lwjgl_opencl_CallbackUtil.c 2010-10-12 01:35:33 UTC (rev 3436)
@@ -156,9 +156,9 @@
for ( i = 0; i < num_mem_objects; i++ ) {
buffer = (*env)->NewDirectByteBuffer(env,
// Pointer to cl_mem buffer
- (void *)((char *)args + (12 + 4 + (i * (4 + sizeof(size_t))))),
+ (void *)((char *)args + (12 + 4 + (i * (4 + sizeof(void *))))),
// cl_mem buffer size
- *((jint *)((char *)args + (12 + (i * (4 + sizeof(size_t))))))
+ *((jint *)((char *)args + (12 + (i * (4 + sizeof(void *))))))
);
(*env)->SetObjectArrayElement(env, memobjs, i, buffer);
}
Modified: trunk/LWJGL/src/templates/org/lwjgl/opencl/CL10.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opencl/CL10.java 2010-10-08 20:57:23 UTC (rev 3435)
+++ trunk/LWJGL/src/templates/org/lwjgl/opencl/CL10.java 2010-10-12 01:35:33 UTC (rev 3436)
@@ -1061,7 +1061,7 @@
nativeAfterVars = "\tvoid **args_mem_loc = num_mem_objects == 0 ? NULL : (void **)malloc(num_mem_objects * sizeof(void *));",
nativeBeforeCall = "\t_ptr_i = 0;\n" +
"\twhile ( _ptr_i < num_mem_objects ) {\n" +
- "\t\targs_mem_loc[_ptr_i] = (cl_void *)((char *)args_address + (4 + _ptr_i * (4 + sizeof(size_t))));\n" +
+ "\t\targs_mem_loc[_ptr_i] = (cl_void *)((char *)args_address + (4 + _ptr_i * (4 + sizeof(void *))));\n" +
"\t\t_ptr_i++;\n" +
"\t}",
nativeAfterCall = "\tfree(args_mem_loc);"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|