From: <eli...@us...> - 2007-04-03 10:06:13
|
Revision: 2756 http://svn.sourceforge.net/java-game-lib/?rev=2756&view=rev Author: elias_naur Date: 2007-04-03 03:06:12 -0700 (Tue, 03 Apr 2007) Log Message: ----------- Removed generated files from version control - all platforms have support for the java 1.5 apt tool Modified Paths: -------------- trunk/LWJGL/build.xml Removed Paths: ------------- trunk/LWJGL/src/generated/ trunk/LWJGL/src/native/generated/ Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2007-04-03 08:21:46 UTC (rev 2755) +++ trunk/LWJGL/build.xml 2007-04-03 10:06:12 UTC (rev 2756) @@ -255,7 +255,7 @@ </target> <!-- Cleans up any files created during the execution of this script --> - <target name="clean" description="Cleans the diectories controlled by this ant script"> + <target name="clean" description="Cleans the diectories controlled by this ant script" depends="clean-generated"> <delete dir="${lwjgl.temp}" quiet="true" failonerror="false" taskname="cleaning temp folder" /> <delete dir="${lwjgl.docs}/javadoc" quiet="true" failonerror="false" taskname="cleaning javadoc folder" /> <delete dir="${lwjgl.bin}" quiet="true" failonerror="false" taskname="cleaning bin folder" /> @@ -307,7 +307,7 @@ <target name="all" description="Creates the Java archives and the natives for the current platform" depends="jars, compile_native"/> <!-- Create ONLY the jar archives --> - <target name="jars" description="Creates the Java archives ONLY and places them in libs/" depends="-initialize, compile, -createjars"> + <target name="jars" description="Creates the Java archives ONLY and places them in libs/" depends="-initialize, generate-all, compile, -createjars"> <move todir="libs/"> <fileset dir="${lwjgl.temp}/jar"> <include name="*.jar"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2007-04-07 19:10:24
|
Revision: 2758 http://svn.sourceforge.net/java-game-lib/?rev=2758&view=rev Author: matzon Date: 2007-04-07 12:10:22 -0700 (Sat, 07 Apr 2007) Log Message: ----------- 1.0.1 version string Modified Paths: -------------- trunk/LWJGL/build.xml trunk/LWJGL/src/java/org/lwjgl/Sys.java trunk/LWJGL/src/java/org/lwjgl/devil/ILNative.java trunk/LWJGL/src/java/org/lwjgl/fmod3/FMOD.java Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2007-04-07 10:19:22 UTC (rev 2757) +++ trunk/LWJGL/build.xml 2007-04-07 19:10:22 UTC (rev 2758) @@ -13,7 +13,7 @@ <property name="lwjgl.docs" location="doc" /> <property name="lwjgl.temp" location="temp" /> <property name="lwjgl.res" location="res" /> - <property name="lwjgl.version" value="1.0" /> + <property name="lwjgl.version" value="1.0.1" /> <property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java"/> <!-- ================================================================== --> Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2007-04-07 10:19:22 UTC (rev 2757) +++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2007-04-07 19:10:22 UTC (rev 2758) @@ -54,7 +54,7 @@ private static final String JNI_LIBRARY_NAME = "lwjgl"; /** Current version of library */ - private static final String VERSION = "1.0"; + private static final String VERSION = "1.0.1"; /** Current version of the JNI library */ static final int JNI_VERSION = 8; Modified: trunk/LWJGL/src/java/org/lwjgl/devil/ILNative.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/devil/ILNative.java 2007-04-07 10:19:22 UTC (rev 2757) +++ trunk/LWJGL/src/java/org/lwjgl/devil/ILNative.java 2007-04-07 19:10:22 UTC (rev 2758) @@ -53,7 +53,7 @@ private static String JNI_LIBRARY_NAME = "lwjgl-devil"; /** Version of IL */ - static final String VERSION = "1.0"; + static final String VERSION = "1.0.1"; /** Current version of the JNI library */ static final int JNI_VERSION = 2; Modified: trunk/LWJGL/src/java/org/lwjgl/fmod3/FMOD.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/fmod3/FMOD.java 2007-04-07 10:19:22 UTC (rev 2757) +++ trunk/LWJGL/src/java/org/lwjgl/fmod3/FMOD.java 2007-04-07 19:10:22 UTC (rev 2758) @@ -193,7 +193,7 @@ private static String JNI_LIBRARY_NAME = "lwjgl-fmod3"; /** Version of FMOD */ - private static final String VERSION = "1.0"; + private static final String VERSION = "1.0.1"; /** Current version of the JNI library */ static final int JNI_VERSION = 1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2007-04-11 20:32:47
|
Revision: 2764 http://svn.sourceforge.net/java-game-lib/?rev=2764&view=rev Author: matzon Date: 2007-04-11 13:32:12 -0700 (Wed, 11 Apr 2007) Log Message: ----------- 1.1 version string Modified Paths: -------------- trunk/LWJGL/build.xml trunk/LWJGL/src/java/org/lwjgl/Sys.java trunk/LWJGL/src/java/org/lwjgl/devil/ILNative.java trunk/LWJGL/src/java/org/lwjgl/fmod3/FMOD.java Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2007-04-11 17:30:13 UTC (rev 2763) +++ trunk/LWJGL/build.xml 2007-04-11 20:32:12 UTC (rev 2764) @@ -13,7 +13,7 @@ <property name="lwjgl.docs" location="doc" /> <property name="lwjgl.temp" location="temp" /> <property name="lwjgl.res" location="res" /> - <property name="lwjgl.version" value="1.0.1" /> + <property name="lwjgl.version" value="1.1" /> <property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java"/> <!-- ================================================================== --> Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2007-04-11 17:30:13 UTC (rev 2763) +++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2007-04-11 20:32:12 UTC (rev 2764) @@ -54,7 +54,7 @@ private static final String JNI_LIBRARY_NAME = "lwjgl"; /** Current version of library */ - private static final String VERSION = "1.0.1"; + private static final String VERSION = "1.1"; /** Current version of the JNI library */ static final int JNI_VERSION = 8; Modified: trunk/LWJGL/src/java/org/lwjgl/devil/ILNative.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/devil/ILNative.java 2007-04-11 17:30:13 UTC (rev 2763) +++ trunk/LWJGL/src/java/org/lwjgl/devil/ILNative.java 2007-04-11 20:32:12 UTC (rev 2764) @@ -53,7 +53,7 @@ private static String JNI_LIBRARY_NAME = "lwjgl-devil"; /** Version of IL */ - static final String VERSION = "1.0.1"; + static final String VERSION = "1.1"; /** Current version of the JNI library */ static final int JNI_VERSION = 2; Modified: trunk/LWJGL/src/java/org/lwjgl/fmod3/FMOD.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/fmod3/FMOD.java 2007-04-11 17:30:13 UTC (rev 2763) +++ trunk/LWJGL/src/java/org/lwjgl/fmod3/FMOD.java 2007-04-11 20:32:12 UTC (rev 2764) @@ -193,7 +193,7 @@ private static String JNI_LIBRARY_NAME = "lwjgl-fmod3"; /** Version of FMOD */ - private static final String VERSION = "1.0.1"; + private static final String VERSION = "1.1"; /** Current version of the JNI library */ static final int JNI_VERSION = 1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eli...@us...> - 2007-04-26 05:58:37
|
Revision: 2805 http://svn.sourceforge.net/java-game-lib/?rev=2805&view=rev Author: elias_naur Date: 2007-04-25 22:58:35 -0700 (Wed, 25 Apr 2007) Log Message: ----------- Simplified ALC10.nalcOpenDevice Modified Paths: -------------- trunk/LWJGL/build.xml trunk/LWJGL/src/native/common/org_lwjgl_openal_ALC10.c Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2007-04-24 14:41:17 UTC (rev 2804) +++ trunk/LWJGL/build.xml 2007-04-26 05:58:35 UTC (rev 2805) @@ -306,7 +306,7 @@ <target name="all" description="Creates the Java archives and the natives for the current platform" depends="jars, compile_native"/> <!-- Create ONLY the jar archives --> - <target name="jars" description="Creates the Java archives ONLY and places them in libs/" depends="-initialize, generate-all, compile, -createjars"> + <target name="jars" description="Creates the Java archives ONLY and places them in libs/" depends="-initialize, compile, -createjars"> <move todir="libs/"> <fileset dir="${lwjgl.temp}/jar"> <include name="*.jar"/> Modified: trunk/LWJGL/src/native/common/org_lwjgl_openal_ALC10.c =================================================================== --- trunk/LWJGL/src/native/common/org_lwjgl_openal_ALC10.c 2007-04-24 14:41:17 UTC (rev 2804) +++ trunk/LWJGL/src/native/common/org_lwjgl_openal_ALC10.c 2007-04-26 05:58:35 UTC (rev 2805) @@ -139,18 +139,10 @@ /* get device */ device = alcOpenDevice((ALubyte *) tokenstring); - /* if error - cleanup and get out */ - if(device == NULL) { - if(tokenstring != NULL) { - free(tokenstring); - } - return (jlong) NULL; + if(tokenstring != NULL) { + free(tokenstring); } - /* clean up */ - if (tokenstring != NULL) - free(tokenstring); - return (jlong)((intptr_t)device); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2007-06-10 20:30:06
|
Revision: 2848 http://svn.sourceforge.net/java-game-lib/?rev=2848&view=rev Author: matzon Date: 2007-06-10 13:30:03 -0700 (Sun, 10 Jun 2007) Log Message: ----------- initial checking on AppletLoader Added Paths: ----------- trunk/LWJGL/res/appletlogo.png trunk/LWJGL/res/appletprogress.gif trunk/LWJGL/src/java/org/lwjgl/test/applet/AppletLoaderTest.java trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java Added: trunk/LWJGL/res/appletlogo.png =================================================================== (Binary files differ) Property changes on: trunk/LWJGL/res/appletlogo.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/LWJGL/res/appletprogress.gif =================================================================== (Binary files differ) Property changes on: trunk/LWJGL/res/appletprogress.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/LWJGL/src/java/org/lwjgl/test/applet/AppletLoaderTest.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/test/applet/AppletLoaderTest.java (rev 0) +++ trunk/LWJGL/src/java/org/lwjgl/test/applet/AppletLoaderTest.java 2007-06-10 20:30:03 UTC (rev 2848) @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2006 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.applet; + +import java.applet.Applet; +import java.awt.BorderLayout; +import java.awt.Canvas; + +import org.lwjgl.opengl.AWTInputAdapter; + +public class AppletLoaderTest extends Applet { + + Test test = null; + + public void destroy() { + super.destroy(); + System.out.println("*** destroy ***"); + AWTInputAdapter.destroy(); + } + + public void start() { + super.start(); + System.out.println("*** start ***"); + } + + public void stop() { + super.stop(); + System.out.println("*** stop ***"); + test.stop(); + } + + public void init() { + System.out.println("*** init ***"); + + setLayout(new BorderLayout()); + try { + test = (Test) Class.forName(getParameter("test")).newInstance(); + Canvas canvas = (Canvas) test; + canvas.setSize(getWidth(), getHeight()); + add(canvas); + } catch (Exception e) { + e.printStackTrace(); + } + test.start(); + } +} Added: trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java (rev 0) +++ trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2007-06-10 20:30:03 UTC (rev 2848) @@ -0,0 +1,907 @@ +/* + * Copyright (c) 2002-2007 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.applet; + +import java.applet.Applet; +import java.applet.AppletStub; +import java.awt.Color; +import java.awt.FontMetrics; +import java.awt.Graphics; +import java.awt.GridLayout; +import java.awt.Image; +import java.awt.Toolkit; +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.InputStream; +import java.io.OutputStream; +import java.lang.reflect.Method; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLClassLoader; +import java.net.URLConnection; +import java.security.AccessControlException; +import java.security.AccessController; +import java.security.PrivilegedExceptionAction; +import java.security.cert.Certificate; +import java.util.Enumeration; +import java.util.StringTokenizer; +import java.util.jar.JarEntry; +import java.util.jar.JarFile; + +/** + * <p> + * The AppletLoader enables deployment of LWJGL to applets in an easy + * and polished way. The loader will display a configurable logo and progressbar + * while the relevant jars (generic and native) are downloaded from a specified source. + * </p> + * <p> + * The downloaded are extracted to the users temporary directory - and if enabled, cached for + * faster loading in future uses. + * </p> + * <p> + * The following applet parameters are required: + * <ul> + * <li>al_main - [String] Full package and class the applet to instantiate and display when loaded.</li> + * <li>al_logo - [String Path of of the logo resource to paint while loading.</li> + * <li>al_progressbar - [String] Path of the progressbar resource to paint on top of the logo, width clipped by percentage.</li> + * <li>al_jars - [String] Comma seperated list of jars to download.</li> + * <li>al_windows - [String] Jar containing native files for windows.</li> + * <li>al_linux - [String] Jar containing native files for linux.</li> + * <li>al_mac - [String] Jar containing native files for mac.</li> + * </ul> + * </p> + * <p> + * Additionally the following parameters can be supplied to tweak the behaviour of the AppletLoader. + * <ul> + * <li>al_version - [int or float] Version of deployment. If this is specified, the jars will be cached and + * reused if the version matches. If version doesn't match all of the files are reloaded.</li> + * <li>al_bgcolor - [String] Hex formated color to use as background. <i>Default: ffffff</i>.</li> + * <li>al_fgcolor - [String] Hex formated color to use as foreground. <i>Default: 000000</i>.</li> + * <li>al_errorcolor - [String] Hex formated color to use as foreground color on error. <i>Default: ff0000</i>.</li> + * <li>al_debug - [boolean] Whether to enable debug mode. <i>Default: false</i>.</li> + * </ul> + * </p> + * @author kappaOne + * @author Brian Matzon <br...@ma...> + * @version $Revision$ + * $Id$ + */ +public class AppletLoader extends Applet implements Runnable, AppletStub { + /** initializing */ + public static final int STATE_INIT = 1; + + /** determining which packages that are required */ + public static final int STATE_DETERMINING_PACKAGES = 2; + + /** checking for already downloaded files */ + public static final int STATE_CHECKING_CACHE = 3; + + /** downloading packages */ + public static final int STATE_DOWNLOADING = 4; + + /** extracting packages */ + public static final int STATE_EXTRACTING_PACKAGES = 5; + + /** updating the classpath */ + public static final int STATE_UPDATING_CLASSPATH = 6; + + /** switching to real applet */ + public static final int STATE_SWITCHING_APPLET = 7; + + /** initializing real applet */ + public static final int STATE_INITIALIZE_REAL_APPLET = 8; + + /** stating real applet */ + public static final int STATE_START_REAL_APPLET = 9; + + /** done */ + public static final int STATE_DONE = 10; + + /** used to calculate length of progress bar */ + protected int percentage; + + /** current size of download in bytes */ + protected int currentSizeDownload; + + /** total size of download in bytes */ + protected int totalSizeDownload; + + /** current size of extracted in bytes */ + protected int currentSizeExtract; + + /** total size of extracted in bytes */ + protected int totalSizeExtract; + + /** logo to be shown while loading */ + protected Image logo; + + /** progressbar to render while loading */ + protected Image progressbar; + + /** offscreen image used */ + protected Image offscreen; + + /** background color of applet */ + protected Color bgColor = Color.white; + + /** Color to write errors in */ + protected Color errorColor = Color.red; + + /** color to write forground in */ + protected Color fgColor = Color.black; + + /** urls of the jars to download */ + protected URL[] urlList; + + /** list of jars to download */ + protected String jarList; + + /** actual thread that does the loading */ + protected Thread loaderThread; + + /** animation thread that renders our loaderscreen while loading */ + protected Thread animationThread; + + /** applet to load after all downloads are complete */ + protected Applet lwjglApplet; + + /** whether a fatal error occured */ + protected boolean fatalError; + + /** fatal error that occured */ + protected String fatalErrorDescription; + + /** whether we're running in debug mode */ + protected boolean debugMode; + + /** String to display as a subtask */ + protected String subtaskMessage = ""; + + /** state of applet loader */ + protected int state = STATE_INIT; + + /** generic error message to display on error */ + protected String[] genericErrorMessage = { "An error occured while loading the applet.", + "Plese contact support to resolve this issue.", + "<placeholder for error message>"}; + + /* + * @see java.applet.Applet#init() + */ + public void init() { + + // sanity check + String[] requiredArgs = {"al_main", "al_logo", "al_progressbar", "al_jars"}; + for(int i=0; i<requiredArgs.length; i++) { + if(getParameter(requiredArgs[i]) == null) { + fatalErrorOccured("missing required applet parameter: " + requiredArgs[i]); + return; + } + } + + // whether to run in debug mode + debugMode = getBooleanParameter("al_debug", false); + + // get colors of applet + bgColor = getColor("al_bgcolor", Color.white); + fgColor = getColor("al_fgcolor", Color.black); + errorColor = getColor("al_errorcolor", Color.red); + + // load logos + logo = getImage("/" + getParameter("al_logo")); + progressbar = getImage("/" + getParameter("al_progressbar")); + + // jars to load + jarList = getParameter("al_jars"); + + //sanity check + if(logo == null || progressbar == null) { + fatalErrorOccured("Unable to load logo and progressbar images"); + return; + } + + // parse the urls for the jars into the url list + loadJarURLs(); + } + + /* + * @see java.applet.Applet#start() + */ + public void start() { + if(loaderThread == null && !fatalError) { + loaderThread = new Thread(this); + loaderThread.setName("AppletLoader.loaderThread"); + loaderThread.start(); + + animationThread = new Thread() { + public void run() { + while(state != STATE_DONE) { + repaint(); + AppletLoader.this.sleep(100); + } + animationThread = null; + } + }; + animationThread.setName("AppletLoader.animationthread"); + animationThread.start(); + } + } + + /* + * @see java.applet.Applet#stop() + */ + public void stop() { + if (lwjglApplet != null) { + lwjglApplet.stop(); + } + super.stop(); + } + + /* + * @see java.applet.Applet#destroy() + */ + public void destroy() { + if (lwjglApplet != null) { + lwjglApplet.destroy(); + } + + progressbar = null; + logo = null; + + super.destroy(); + } + + /** + * Retrieves the applet that has been loaded. Usefull for liveconnect. + */ + public Applet getApplet() { + return lwjglApplet; + } + + /* + * @see java.applet.AppletStub#appletResize(int, int) + */ + public void appletResize(int width, int height) { + /* uhm? */ + } + + /* + * @see java.awt.Container#update(java.awt.Graphics) + */ + public final void update(Graphics g) { + paint(g); + } + + /* + * @see java.awt.Container#paint(java.awt.Graphics) + */ + public final synchronized void paint(Graphics g) { + + // paint applet if available + if(lwjglApplet != null && state == STATE_DONE) { + lwjglApplet.paint(g); + return; + } + + // create offscreen if missing + if (offscreen == null) { + offscreen = createImage(getWidth(), getHeight()); + } + + // draw everything onto an image before drawing to avoid flicker + Graphics og = offscreen.getGraphics(); + FontMetrics fm = og.getFontMetrics(); + + // set background color + og.setColor(bgColor); + og.fillRect(0, 0, getWidth(), getHeight()); + + // get logo position so its in the middle of applet + int x = 0, y = 0; + + if(logo != null && !fatalError) { + x = (getWidth() - logo.getWidth(this)) / 2; + y = (getHeight() - logo.getHeight(this)) / 2; + } + + og.setColor(fgColor); + String message = null; + + switch (state) { + case STATE_INIT: + message = "Initializing loader"; + break; + case STATE_DETERMINING_PACKAGES: + message = "Determining packages to load"; + break; + case STATE_CHECKING_CACHE: + message = "Checking cache for existing files"; + break; + case STATE_DOWNLOADING: + message = "Downloading packages"; + break; + case STATE_EXTRACTING_PACKAGES: + message = "Extracting downloaded packages"; + break; + case STATE_UPDATING_CLASSPATH: + message = "Updating classpath"; + break; + case STATE_SWITCHING_APPLET: + message = "Switching applet"; + break; + case STATE_INITIALIZE_REAL_APPLET: + message = "Initializing real applet"; + break; + case STATE_START_REAL_APPLET: + message = "Starting real applet"; + break; + case STATE_DONE: + message = "Done loading"; + break; + } + + if (fatalError) { + genericErrorMessage[genericErrorMessage.length-1] = fatalErrorDescription; + for(int i=0; i<genericErrorMessage.length; i++) { + int messageX = (getWidth() - fm.stringWidth(genericErrorMessage[i])) / 2; + int messageY = (getHeight() - (fm.getHeight() * genericErrorMessage.length)) / 2; + + og.setColor(errorColor); + og.drawString(genericErrorMessage[i], messageX, messageY + i*fm.getHeight()); + } + } else { + og.setColor(fgColor); + + // draw logo + og.drawImage(logo, x, y, null); + + // draw message + int messageX = (getWidth() - fm.stringWidth(message)) / 2; + int messageY = y + logo.getHeight(null) + 20; + og.drawString(message, messageX, messageY); + + // draw subtaskmessage, if any + if(subtaskMessage.length() > 0) { + messageX = (getWidth() - fm.stringWidth(subtaskMessage)) / 2; + og.drawString(subtaskMessage, messageX, messageY+20); + } + + // draw loading bar, clipping it depending on percentage done + int barSize = (progressbar.getWidth(this) * percentage) / 100; + og.clipRect(0, 0, x + barSize, getHeight()); + og.drawImage(progressbar, x, y, null); + } + + og.dispose(); + + // finally draw it all + g.drawImage(offscreen, 0, 0, null); + } + + /** + * Reads list of jars to download and adds the urls to urlList + * also finds out which OS you are on and adds appropriate native + * jar to the urlList + */ + protected void loadJarURLs() { + state = STATE_DETERMINING_PACKAGES; + + StringTokenizer jar = new StringTokenizer(jarList, ", "); + + int jarCount = jar.countTokens() + 1; + + urlList = new URL[jarCount]; + + try { + URL path = getCodeBase(); + + // set jars urls + for (int i = 0; i < jarCount - 1; i++) { + urlList[i] = new URL(path, jar.nextToken()); + } + + // native jar url + String osName = System.getProperty("os.name"); + String nativeJar = null; + + if (osName.startsWith("Win")) { + nativeJar = getParameter("al_windows"); + } else if (osName.startsWith("Linux") || osName.startsWith("FreeBSD") || osName.startsWith("SunOS")) { + nativeJar = getParameter("al_linux"); + } else if (osName.startsWith("Mac")) { + nativeJar = getParameter("al_mac"); + } else { + fatalErrorOccured("OS (" + osName + ") not supported"); + } + + if (nativeJar == null) { + fatalErrorOccured("no lwjgl natives files found"); + } else { + urlList[jarCount - 1] = new URL(path, nativeJar); + } + + } catch (MalformedURLException e) { + fatalErrorOccured(e.getMessage()); + } + } + + /** + * 4 steps + * + * 1) check version of applet and decide whether to download jars + * 2) download the jars + * 3) extract natives + * 4) add to jars to class path + * 5) switch applets + * + */ + public void run() { + + state = STATE_CHECKING_CACHE; + + percentage = 5; + + try { + if(debugMode) { + sleep(2000); + } + + // get path where applet will be stored + String path = (String) AccessController.doPrivileged(new PrivilegedExceptionAction() { + public Object run() throws Exception { + return System.getProperty("java.io.tmpdir") + File.separator + getParameter("al_title") + File.separator; + } + }); + + File dir = new File(path); + + // create directory + if (!dir.exists()) { + dir.mkdir(); + } + dir = new File(dir, "version"); + + // if applet already available don't download anything + boolean cacheAvailable = false; + + // version of applet + String version = getParameter("al_version"); + float latestVersion = 0; + + // if applet version specifed, check if you have latest version of applet + if (version != null) { + + latestVersion = Float.parseFloat(version); + + // if version file exists + if (dir.exists()) { + // compare to new version + if (latestVersion <= readVersionFile(dir)) { + cacheAvailable = true; + percentage = 90; + if(debugMode) { + sleep(2000); + } + } + } + } + + // if jars not available or need updating download them + if (!cacheAvailable) { + // downloads jars from the server + downloadJars(path); // 10-65% + + // Extracts Native Files + extractNatives(path); // 65-85% + + // add version information once jars downloaded successfully + if (version != null) { + percentage = 90; + writeVersionFile(dir, latestVersion); + } + } + + // add the downloaded jars and natives to classpath + updateClassPath(path); + + // switch to LWJGL Applet + switchApplet(); + + state = STATE_DONE; + } catch (AccessControlException ace) { + fatalErrorOccured(ace.getMessage()); + } catch (Exception e) { + fatalErrorOccured(e.getMessage()); + } finally { + loaderThread = null; + } + } + + /** + * read the current version file + * + * @param file the file to read + * @return the version value of saved file + * @throws Exception if it fails to read value + */ + protected float readVersionFile(File file) throws Exception { + DataInputStream dis = new DataInputStream(new FileInputStream(file)); + float version = dis.readFloat(); + dis.close(); + return version; + } + + /** + * write out version file of applet + * + * @param file the file to write out to + * @param version the version of the applet as a float + * @throws Exception if it fails to write file + */ + protected void writeVersionFile(File file, float version) throws Exception { + DataOutputStream dos = new DataOutputStream(new FileOutputStream(file)); + dos.writeFloat(version); + dos.close(); + } + + /** + * Edits the ClassPath at runtime to include the jars + * that have just been downloaded and then adds the + * lwjgl natives folder property. + * + * @param path location where applet is stored + * @throws Exception if it fails to add classpath + */ + protected void updateClassPath(String path) throws Exception { + + state = STATE_UPDATING_CLASSPATH; + + percentage = 95; + + Class[] parameters = new Class[] { URL.class}; + + // modify class path by adding downloaded jars to it + for (int i = 0; i < urlList.length; i++) { + // get location of jar as a url + URL u = new URL("file:" + path + getFileName(urlList[i])); + + // add to class path + Method method = URLClassLoader.class.getDeclaredMethod("addURL", parameters); + method.setAccessible(true); + method.invoke((URLClassLoader) ClassLoader.getSystemClassLoader(), new Object[] { u}); + } + + if(debugMode) { + sleep(2000); + } + + // add natives files path to native class path + System.setProperty("org.lwjgl.librarypath", path + "natives"); + + // Make sure jinput knows about the new path too + System.setProperty("net.java.games.input.librarypath", path + "natives"); + + // replace security system to avoid bug where vm fails to + // recognise downloaded jars as signed, when they are + System.setSecurityManager(null); + } + + /** + * replace the current applet with the lwjgl applet + * using AppletStub and initialise and start it + */ + protected void switchApplet() throws Exception { + + state = STATE_SWITCHING_APPLET; + percentage = 100; + + if(debugMode) { + sleep(2000); + } + + Class appletClass = Class.forName(getParameter("al_main")); + lwjglApplet = (Applet) appletClass.newInstance(); + + lwjglApplet.setStub(this); + + setLayout(new GridLayout(1, 1)); + add(lwjglApplet); + validate(); + + state = STATE_INITIALIZE_REAL_APPLET; + lwjglApplet.init(); + + state = STATE_START_REAL_APPLET; + lwjglApplet.start(); + } + + /** + * Will download the jars from the server using the list of urls + * in urlList, while at the same time updating progress bar + * + * @param path location of the directory to save to + * @throws Exception if download fails + */ + protected void downloadJars(String path) throws Exception { + + state = STATE_DOWNLOADING; + + URLConnection urlconnection; + + // calculate total size of jars to download + for (int i = 0; i < urlList.length; i++) { + urlconnection = urlList[i].openConnection(); + totalSizeDownload += urlconnection.getContentLength(); + } + + int initialPercentage = percentage = 10; + + // download each jar + byte buffer[] = new byte[65536]; + for (int i = 0; i < urlList.length; i++) { + if(debugMode) { + sleep(2000); + } + + urlconnection = urlList[i].openConnection(); + + String currentFile = getFileName(urlList[i]); + InputStream inputstream = urlconnection.getInputStream(); + FileOutputStream fos = new FileOutputStream(path + currentFile); + + + int bufferSize; + while ((bufferSize = inputstream.read(buffer, 0, buffer.length)) != -1) { + if(debugMode) { + sleep(10); + } + fos.write(buffer, 0, bufferSize); + currentSizeDownload += bufferSize; + percentage = initialPercentage + ((currentSizeDownload * 55) / totalSizeDownload); + subtaskMessage = "Retrieving: " + currentFile + " " + ((currentSizeDownload * 100) / totalSizeDownload) + "%"; + } + } + subtaskMessage = ""; + } + + /** + * This method will extract all file from the native jar and extract them + * to the subdirectory called "natives" in the local path, will also check + * to see if the native jar files is signed properly + * + * @param path base folder containing all downloaded jars + * @throws Exception if it fails to extract files + */ + protected void extractNatives(String path) throws Exception { + + state = STATE_EXTRACTING_PACKAGES; + + int initialPercentage = percentage; + + // get name of jar file with natives from urlList, it will be the last url + String nativeJar = getFileName(urlList[urlList.length - 1]); + + // get the current certificate to compare against native files + Certificate[] certificate = AppletLoader.class.getProtectionDomain().getCodeSource().getCertificates(); + + // create native folder + File nativeFolder = new File(path + "natives"); + if (!nativeFolder.exists()) { + nativeFolder.mkdir(); + } + + // open jar file + JarFile jarFile = new JarFile(path + nativeJar, true); + + // get list of files in jar + Enumeration entities = jarFile.entries(); + + totalSizeExtract = 0; + + // calculate the size of the files to extract for progress bar + while (entities.hasMoreElements()) { + JarEntry entry = (JarEntry) entities.nextElement(); + + // skip directories and anything in directories + // conveniently ignores the manifest + if (entry.isDirectory() || entry.getName().indexOf('/') != -1) { + continue; + } + totalSizeExtract += entry.getSize(); + } + + currentSizeExtract = 0; + + // reset point to begining by getting list of file again + entities = jarFile.entries(); + + // extract all files from the jar + while (entities.hasMoreElements()) { + JarEntry entry = (JarEntry) entities.nextElement(); + + // skip directories and anything in directories + // conveniently ignores the manifest + if (entry.isDirectory() || entry.getName().indexOf('/') != -1) { + continue; + } + + // check if native file already exists if so delete it to make room for new one + // useful when using the reload button on the browser + File f = new File(path + "natives" + File.separator + entry.getName()); + if (f.exists()) { + if (!f.delete()) { + continue; // unable to delete file, it is in use, skip extracting it + } + } + + if(debugMode) { + sleep(1000); + } + + InputStream in = jarFile.getInputStream(jarFile.getEntry(entry.getName())); + OutputStream out = new FileOutputStream(path + "natives" + File.separator + entry.getName()); + + int bufferSize; + byte buffer[] = new byte[65536]; + + while ((bufferSize = in.read(buffer, 0, buffer.length)) != -1) { + if(debugMode) { + sleep(10); + } + out.write(buffer, 0, bufferSize); + currentSizeExtract += bufferSize; + + // update progress bar + percentage = initialPercentage + ((currentSizeExtract * 20) / totalSizeExtract); + subtaskMessage = "Extracting: " + entry.getName() + " " + ((currentSizeExtract * 100) / totalSizeExtract) + "%"; + } + + // validate if the certificate for native file is correct + validateCertificateChain(certificate, entry.getCertificates()); + + in.close(); + out.close(); + } + subtaskMessage = ""; + + jarFile.close(); + } + + /** + * Validates the certificate chain for a single file + * + * @param ownCerts Chain of certificates to check against + * @param native_certs Chain of certificates to check + * @return true if the chains match + */ + protected static void validateCertificateChain(Certificate[] ownCerts, Certificate[] native_certs) throws Exception { + if (native_certs == null) + throw new Exception("Unable to validate certificate chain. Native entry did not have a certificate chain at all"); + + if (ownCerts.length != native_certs.length) + throw new Exception("Unable to validate certificate chain. Chain differs in length [" + ownCerts.length + " vs " + native_certs.length + "]"); + + for (int i = 0; i < ownCerts.length; i++) { + if (!ownCerts[i].equals(native_certs[i])) { + throw new Exception("Certificate mismatch: " + ownCerts[i] + " != " + native_certs[i]); + } + } + } + + /** + * Get Image from path provided + * + * @param s location of the image + * @return the Image file + */ + protected Image getImage(String s) { + try { + DataInputStream datainputstream = new DataInputStream(getClass().getResourceAsStream(s)); + byte abyte0[] = new byte[datainputstream.available()]; + datainputstream.readFully(abyte0); + datainputstream.close(); + return Toolkit.getDefaultToolkit().createImage(abyte0); + } catch (Exception e) { + /* */ + } + return null; + } + + + /** + * Get file name portion of URL. + * + * @param url Get file name from this url + * @return file name as string + */ + protected String getFileName(URL url) { + String fileName = url.getFile(); + return fileName.substring(fileName.lastIndexOf('/') + 1); + } + + /** + * Retrieves the color + * + * @param color Color to load + * @param defaultColor Default color to use if no color to load + * @return Color to use + */ + protected Color getColor(String color, Color defaultColor) { + String param_color = getParameter(color); + if (param_color != null) { + return new Color(Integer.parseInt(param_color, 16)); + } + return defaultColor; + } + + /** + * Retrieves the boolean value for the applet + * @param name Name of parameter + * @param defaultValue default value to return if no such parameter + * @return value of parameter or defaultValue + */ + protected boolean getBooleanParameter(String name, boolean defaultValue) { + String parameter = getParameter(name); + if(parameter != null) { + return Boolean.parseBoolean(parameter); + } + return defaultValue; + } + + /** + * Sets the state of the loaded and prints some debug information + * + * @param error Error message to print + * @param state State to enter + */ + protected void fatalErrorOccured(String error) { + fatalError = true; + fatalErrorDescription = "Fatal error occured (" + state + "): " + error; + System.out.println(fatalErrorDescription); + repaint(); + } + + /** + * Utility method for sleeping + * @param ms milliseconds to sleep + */ + protected void sleep(long ms) { + try { + Thread.sleep(ms); + } catch (Exception e) { + /* ignored */ + } + } +} \ 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: <eli...@us...> - 2007-06-20 08:57:46
|
Revision: 2854 http://svn.sourceforge.net/java-game-lib/?rev=2854&view=rev Author: elias_naur Date: 2007-06-20 01:57:45 -0700 (Wed, 20 Jun 2007) Log Message: ----------- Mac OS X: Add a Toolkit.getDefaultToolkit() incantation to MacOSXSysImplementation to avoid hangs on Mac OS X 10.3 Modified Paths: -------------- trunk/LWJGL/build.xml trunk/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2007-06-15 06:58:38 UTC (rev 2853) +++ trunk/LWJGL/build.xml 2007-06-20 08:57:45 UTC (rev 2854) @@ -307,7 +307,8 @@ <target name="all" description="Creates the Java archives and the natives for the current platform" depends="jars, compile_native"/> <!-- Create ONLY the jar archives --> - <target name="jars" description="Creates the Java archives ONLY and places them in libs/" depends="-initialize, generate-all, compile, -createjars"> + <target name="jars" description="Creates the Java archives ONLY and places them in libs/" depends="-initialize, compile, -createjars"> + <!-- <target name="jars" description="Creates the Java archives ONLY and places them in libs/" depends="-initialize, generate-all, compile, -createjars">--> <move todir="libs/"> <fileset dir="${lwjgl.temp}/jar"> <include name="*.jar"/> Modified: trunk/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java 2007-06-15 06:58:38 UTC (rev 2853) +++ trunk/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java 2007-06-20 08:57:45 UTC (rev 2854) @@ -34,6 +34,7 @@ import java.lang.reflect.Method; import java.security.AccessController; import java.security.PrivilegedExceptionAction; +import java.awt.Toolkit; /** * @@ -42,6 +43,11 @@ * $Id$ */ class MacOSXSysImplementation extends J2SESysImplementation { + static { + // Make sure AWT is properly initialized. This avoids hangs on Mac OS X 10.3 + Toolkit.getDefaultToolkit(); + } + public boolean openURL(String url) { try { Method openURL_method = (Method)AccessController.doPrivileged(new PrivilegedExceptionAction() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2007-08-17 18:49:51
|
Revision: 2880 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=2880&view=rev Author: matzon Date: 2007-08-17 11:41:00 -0700 (Fri, 17 Aug 2007) Log Message: ----------- 1.1.2 Modified Paths: -------------- trunk/LWJGL/build.xml trunk/LWJGL/src/java/org/lwjgl/Sys.java trunk/LWJGL/src/java/org/lwjgl/devil/ILNative.java trunk/LWJGL/src/java/org/lwjgl/fmod3/FMOD.java Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2007-08-17 06:14:40 UTC (rev 2879) +++ trunk/LWJGL/build.xml 2007-08-17 18:41:00 UTC (rev 2880) @@ -13,7 +13,7 @@ <property name="lwjgl.docs" location="doc" /> <property name="lwjgl.temp" location="temp" /> <property name="lwjgl.res" location="res" /> - <property name="lwjgl.version" value="1.1.1" /> + <property name="lwjgl.version" value="1.1.2" /> <property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java"/> <!-- ================================================================== --> Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2007-08-17 06:14:40 UTC (rev 2879) +++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2007-08-17 18:41:00 UTC (rev 2880) @@ -54,7 +54,7 @@ private static final String JNI_LIBRARY_NAME = "lwjgl"; /** Current version of library */ - private static final String VERSION = "1.1.1"; + private static final String VERSION = "1.1.2"; /** Current version of the JNI library */ static final int JNI_VERSION = 11; Modified: trunk/LWJGL/src/java/org/lwjgl/devil/ILNative.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/devil/ILNative.java 2007-08-17 06:14:40 UTC (rev 2879) +++ trunk/LWJGL/src/java/org/lwjgl/devil/ILNative.java 2007-08-17 18:41:00 UTC (rev 2880) @@ -53,7 +53,7 @@ private static String JNI_LIBRARY_NAME = "lwjgl-devil"; /** Version of IL */ - static final String VERSION = "1.1.1"; + static final String VERSION = "1.1.2"; /** Current version of the JNI library */ static final int JNI_VERSION = 2; Modified: trunk/LWJGL/src/java/org/lwjgl/fmod3/FMOD.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/fmod3/FMOD.java 2007-08-17 06:14:40 UTC (rev 2879) +++ trunk/LWJGL/src/java/org/lwjgl/fmod3/FMOD.java 2007-08-17 18:41:00 UTC (rev 2880) @@ -193,7 +193,7 @@ private static String JNI_LIBRARY_NAME = "lwjgl-fmod3"; /** Version of FMOD */ - private static final String VERSION = "1.1.1"; + private static final String VERSION = "1.1.2"; /** Current version of the JNI library */ static final int JNI_VERSION = 1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eli...@us...> - 2007-09-05 12:04:10
|
Revision: 2886 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=2886&view=rev Author: elias_naur Date: 2007-08-25 07:47:24 -0700 (Sat, 25 Aug 2007) Log Message: ----------- tweaked build.xml to get compile working again Modified Paths: -------------- trunk/LWJGL/build.xml trunk/LWJGL/src/java/org/lwjgl/d3d/DisplayImplementation.java Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2007-08-25 12:57:50 UTC (rev 2885) +++ trunk/LWJGL/build.xml 2007-08-25 14:47:24 UTC (rev 2886) @@ -309,6 +309,7 @@ <!-- Create ONLY the jar archives --> <target name="jars" description="Creates the Java archives ONLY and places them in libs/" depends="-initialize, generate-all, compile, -createjars"> + <!--<target name="jars" description="Creates the Java archives ONLY and places them in libs/" depends="-initialize, compile, -createjars">--> <move todir="libs/"> <fileset dir="${lwjgl.temp}/jar"> <include name="*.jar"/> @@ -532,11 +533,12 @@ <!-- Compiles the Java source code --> <target name="compile" description="Compiles the java source code" depends="-initialize"> - <javac debug="yes" destdir="${lwjgl.bin}" includes="org/lwjgl/opengl/**" source="1.4" target="1.4" classpath="${lwjgl.lib}/jinput.jar" taskname="core"> + <javac debug="yes" destdir="${lwjgl.bin}" source="1.4" target="1.4" classpath="${lwjgl.lib}/jinput.jar" taskname="core"> <src path="${lwjgl.src}/java/"/> <src path="${lwjgl.src}/generated/"/> <include name="org/lwjgl/*.java"/> <include name="org/lwjgl/input/**"/> + <include name="org/lwjgl/d3d/**"/> <include name="org/lwjgl/opengl/**"/> <include name="org/lwjgl/openal/**"/> <include name="org/lwjgl/util/**"/> Modified: trunk/LWJGL/src/java/org/lwjgl/d3d/DisplayImplementation.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/d3d/DisplayImplementation.java 2007-08-25 12:57:50 UTC (rev 2885) +++ trunk/LWJGL/src/java/org/lwjgl/d3d/DisplayImplementation.java 2007-08-25 14:47:24 UTC (rev 2886) @@ -36,7 +36,6 @@ import java.nio.IntBuffer; import org.lwjgl.LWJGLException; -import org.lwjgl.input.InputImplementation; interface DisplayImplementation extends InputImplementation { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2007-10-20 19:02:50
|
Revision: 2902 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=2902&view=rev Author: matzon Date: 2007-10-20 12:02:48 -0700 (Sat, 20 Oct 2007) Log Message: ----------- removing direct x, can be picked up in the lwjgl-directx tag Modified Paths: -------------- trunk/LWJGL/build.xml trunk/LWJGL/platform_build/windows_ant/build.xml Removed Paths: ------------- trunk/LWJGL/src/java/org/lwjgl/d3d/ trunk/LWJGL/src/java/org/lwjgl/test/d3d/ trunk/LWJGL/src/native/windows/org_lwjgl_d3d_D3DUtil.c trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3D9.c trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3D9Ex.c trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DBaseTexture9.c trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DCubeTexture9.c trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DDevice9.c trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DDevice9Ex.c trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DIndexBuffer9.c trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DPixelShader9.c trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DQuery9.c trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DResource9.c trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DStateBlock9.c trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DSurface9.c trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DSwapChain9.c trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DSwapChain9Ex.c trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DTexture9.c trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DVertexBuffer9.c trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DVertexDeclaration9.c trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DVertexShader9.c trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DVolume9.c trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DVolumeTexture9.c trunk/LWJGL/src/native/windows/org_lwjgl_d3d_WindowsContextImplementation.c trunk/LWJGL/src/native/windows/org_lwjgl_d3d_WindowsDirectInput3.c trunk/LWJGL/src/native/windows/org_lwjgl_d3d_WindowsDirectInput8.c trunk/LWJGL/src/native/windows/org_lwjgl_d3d_WindowsDirectInputDevice3.c trunk/LWJGL/src/native/windows/org_lwjgl_d3d_WindowsDirectInputDevice8.c trunk/LWJGL/src/native/windows/org_lwjgl_d3d_WindowsDisplay.c trunk/LWJGL/src/native/windows/org_lwjgl_d3d_WindowsDisplayPeerInfo.c trunk/LWJGL/src/native/windows/org_lwjgl_d3d_WindowsKeyboard.c trunk/LWJGL/src/native/windows/org_lwjgl_d3d_WindowsPeerInfo.c trunk/LWJGL/src/native/windows/org_lwjgl_d3d_WindowsRegistry.c Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2007-10-20 15:57:41 UTC (rev 2901) +++ trunk/LWJGL/build.xml 2007-10-20 19:02:48 UTC (rev 2902) @@ -539,7 +539,6 @@ <src path="${lwjgl.src}/generated/"/> <include name="org/lwjgl/*.java"/> <include name="org/lwjgl/input/**"/> - <include name="org/lwjgl/d3d/**"/> <include name="org/lwjgl/opengl/**"/> <include name="org/lwjgl/openal/**"/> <include name="org/lwjgl/util/**"/> @@ -584,38 +583,6 @@ <class name="org.lwjgl.opengl.WindowsPeerInfo" /> <class name="org.lwjgl.opengl.WindowsDisplayPeerInfo" /> <class name="org.lwjgl.opengl.WindowsContextImplementation" /> - <!-- Direct 3D --> - <class name="org.lwjgl.d3d.D3DUtil" /> - <class name="org.lwjgl.d3d.IDirect3D9" /> - <class name="org.lwjgl.d3d.IDirect3D9Ex" /> - <class name="org.lwjgl.d3d.IDirect3DBaseTexture9" /> - <class name="org.lwjgl.d3d.IDirect3DCubeTexture9" /> - <class name="org.lwjgl.d3d.IDirect3DDevice9" /> - <class name="org.lwjgl.d3d.IDirect3DDevice9Ex" /> - <class name="org.lwjgl.d3d.IDirect3DIndexBuffer9" /> - <class name="org.lwjgl.d3d.IDirect3DPixelShader9" /> - <class name="org.lwjgl.d3d.IDirect3DQuery9" /> - <class name="org.lwjgl.d3d.IDirect3DResource9" /> - <class name="org.lwjgl.d3d.IDirect3DStateBlock9" /> - <class name="org.lwjgl.d3d.IDirect3DSurface9" /> - <class name="org.lwjgl.d3d.IDirect3DSwapChain9" /> - <class name="org.lwjgl.d3d.IDirect3DSwapChain9Ex" /> - <class name="org.lwjgl.d3d.IDirect3DTexture9" /> - <class name="org.lwjgl.d3d.IDirect3DVertexBuffer9" /> - <class name="org.lwjgl.d3d.IDirect3DVertexDeclaration9" /> - <class name="org.lwjgl.d3d.IDirect3DVertexShader9" /> - <class name="org.lwjgl.d3d.IDirect3DVolume9" /> - <class name="org.lwjgl.d3d.IDirect3DVolumeTexture9" /> - <class name="org.lwjgl.d3d.WindowsDisplay" /> - <class name="org.lwjgl.d3d.WindowsContextImplementation" /> - <class name="org.lwjgl.d3d.WindowsDirectInput3" /> - <class name="org.lwjgl.d3d.WindowsDirectInputDevice3" /> - <class name="org.lwjgl.d3d.WindowsDirectInput8" /> - <class name="org.lwjgl.d3d.WindowsDirectInputDevice8" /> - <class name="org.lwjgl.d3d.WindowsPeerInfo" /> - <class name="org.lwjgl.d3d.WindowsDisplayPeerInfo" /> - <class name="org.lwjgl.d3d.WindowsRegistry" /> - <class name="org.lwjgl.d3d.WindowsKeyboard" /> </javah> <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/macosx" force="yes"> Modified: trunk/LWJGL/platform_build/windows_ant/build.xml =================================================================== --- trunk/LWJGL/platform_build/windows_ant/build.xml 2007-10-20 15:57:41 UTC (rev 2901) +++ trunk/LWJGL/platform_build/windows_ant/build.xml 2007-10-20 19:02:48 UTC (rev 2902) @@ -53,7 +53,7 @@ </target> <target name="compile"> - <property name="libs" value="Kernel32.lib ole32.lib dinput.lib dxguid.lib OpenGL32.Lib Version.lib user32.lib Gdi32.lib Advapi32.lib jawt.lib delayimp.lib winmm.lib d3dx9.lib d3d9.lib"/> + <property name="libs" value="Kernel32.lib ole32.lib dinput.lib dxguid.lib OpenGL32.Lib Version.lib user32.lib Gdi32.lib Advapi32.lib jawt.lib delayimp.lib winmm.lib"/> <antcall target="compile_dir"/> <antcall target="link"/> </target> Deleted: trunk/LWJGL/src/native/windows/org_lwjgl_d3d_D3DUtil.c =================================================================== --- trunk/LWJGL/src/native/windows/org_lwjgl_d3d_D3DUtil.c 2007-10-20 15:57:41 UTC (rev 2901) +++ trunk/LWJGL/src/native/windows/org_lwjgl_d3d_D3DUtil.c 2007-10-20 19:02:48 UTC (rev 2902) @@ -1,121 +0,0 @@ -#include <D3dx9math.h> -#include "org_lwjgl_d3d_D3DUtil.h" - -/* - * Class: org_lwjgl_d3d_D3DUtil - * Method: nD3DXMatrixLookAtLH - * Signature: (Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_d3d_D3DUtil_nD3DXMatrixLookAtLH - (JNIEnv *env, jclass clazz, jobject outBuffer, jobject eyeBuffer, jobject atBuffer, jobject upBuffer) { - - D3DXMATRIX* out = (D3DXMATRIX*)((*env)->GetDirectBufferAddress(env, outBuffer)); - CONST D3DXVECTOR3 *eye = (D3DXVECTOR3*)((*env)->GetDirectBufferAddress(env, eyeBuffer)); - CONST D3DXVECTOR3 *at = (D3DXVECTOR3*)((*env)->GetDirectBufferAddress(env, atBuffer)); - CONST D3DXVECTOR3 *up = (D3DXVECTOR3*)((*env)->GetDirectBufferAddress(env, upBuffer)); - - D3DXMatrixLookAtLH(out, eye, at, up); -} - -/* - * Class: org_lwjgl_d3d_D3DUtil - * Method: nD3DXMatrixPerspectiveFovLH - * Signature: (Ljava/nio/ByteBuffer;FFFF)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_d3d_D3DUtil_nD3DXMatrixPerspectiveFovLH - (JNIEnv *env, jclass clazz, jobject outBuffer, jfloat fovy, jfloat aspect, jfloat zn, jfloat zf) { - D3DXMATRIX *out = (D3DXMATRIX*)((*env)->GetDirectBufferAddress(env, outBuffer)); - - D3DXMatrixPerspectiveFovLH(out, fovy, aspect, zn, zf); -} - -/* - * Class: org_lwjgl_d3d_D3DUtil - * Method: nD3DXMatrixIdentity - * Signature: (Ljava/nio/ByteBuffer;)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_d3d_D3DUtil_nD3DXMatrixIdentity - (JNIEnv *env, jclass clazz, jobject outBuffer) { - D3DXMATRIX *out = (D3DXMATRIX*)((*env)->GetDirectBufferAddress(env, outBuffer)); - - D3DXMatrixIdentity(out); -} - -/* - * Class: org_lwjgl_d3d_D3DUtil - * Method: nD3DXMatrixScaling - * Signature: (Ljava/nio/ByteBuffer;FFF)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_d3d_D3DUtil_nD3DXMatrixScaling - (JNIEnv *env, jclass clazz, jobject outBuffer, jfloat sx, jfloat sy, jfloat sz) { - D3DXMATRIX *out = (D3DXMATRIX*)((*env)->GetDirectBufferAddress(env, outBuffer)); - - D3DXMatrixScaling(out, sx, sy, sz); -} - -/* - * Class: org_lwjgl_d3d_D3DUtil - * Method: nD3DXMatrixTranslation - * Signature: (Ljava/nio/ByteBuffer;FFF)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_d3d_D3DUtil_nD3DXMatrixTranslation - (JNIEnv *env, jclass clazz, jobject outBuffer, jfloat x, jfloat y, jfloat z) { - D3DXMATRIX *out = (D3DXMATRIX*)((*env)->GetDirectBufferAddress(env, outBuffer)); - - D3DXMatrixTranslation(out, x, y, z); -} - - -/* - * Class: org_lwjgl_d3d_D3DUtil - * Method: nD3DXMatrixRotationX - * Signature: (Ljava/nio/ByteBuffer;F)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_d3d_D3DUtil_nD3DXMatrixRotationX - (JNIEnv *env, jclass clazz, jobject outBuffer, jfloat angle) { - D3DXMATRIX *out = (D3DXMATRIX*)((*env)->GetDirectBufferAddress(env, outBuffer)); - - D3DXMatrixRotationY(out, angle); -} - -/* - * Class: org_lwjgl_d3d_D3DUtil - * Method: nD3DXMatrixRotationY - * Signature: (Ljava/nio/ByteBuffer;F)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_d3d_D3DUtil_nD3DXMatrixRotationY - (JNIEnv *env, jclass clazz, jobject outBuffer, jfloat angle) { - D3DXMATRIX *out = (D3DXMATRIX*)((*env)->GetDirectBufferAddress(env, outBuffer)); - - D3DXMatrixRotationY(out, angle); -} - -/* - * Class: org_lwjgl_d3d_D3DUtil - * Method: nD3DXMatrixRotationZ - * Signature: (Ljava/nio/ByteBuffer;F)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_d3d_D3DUtil_nD3DXMatrixRotationZ - (JNIEnv *env, jclass clazz, jobject outBuffer, jfloat angle) { - D3DXMATRIX *out = (D3DXMATRIX*)((*env)->GetDirectBufferAddress(env, outBuffer)); - - D3DXMatrixRotationY(out, angle); -} - -/* - * Class: org_lwjgl_d3d_D3DUtil - * Method: nD3DXMatrixMultiply - * Signature: (Ljava/nio/ByteBuffer;Lorg/lwjgl/d3d/D3DMatrix;Lorg/lwjgl/d3d/D3DMatrix;)Ljava/nio/ByteBuffer; - */ -JNIEXPORT jobject JNICALL Java_org_lwjgl_d3d_D3DUtil_nD3DXMatrixMultiply - (JNIEnv *env, jclass clazz, jobject outBuffer, jobject m1Buffer, jobject m2Buffer) { - D3DXMATRIX *out = (D3DXMATRIX*)((*env)->GetDirectBufferAddress(env, outBuffer)); - CONST D3DXMATRIX *m1 = (D3DXMATRIX*)((*env)->GetDirectBufferAddress(env, m1Buffer)); - CONST D3DXMATRIX *m2 = (D3DXMATRIX*)((*env)->GetDirectBufferAddress(env, m2Buffer)); - - D3DXMATRIX *result = D3DXMatrixMultiply(out, m1, m2); - - jobject resultBuffer = (*env)->NewDirectByteBuffer(env, result, sizeof(D3DXMATRIX)); - - return resultBuffer; -} Deleted: trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3D9.c =================================================================== --- trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3D9.c 2007-10-20 15:57:41 UTC (rev 2901) +++ trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3D9.c 2007-10-20 19:02:48 UTC (rev 2902) @@ -1,213 +0,0 @@ -#include <windows.h> -#include <windowsx.h> -#include <d3d9.h> -#include <stdio.h> -#include "org_lwjgl_d3d_IDirect3D9.h" -#include "context.h" - -extern void setPointer(JNIEnv *env, jobject classInstance, const char* methodName, jlong pointer); -//void setPointer(JNIEnv *env, jobject classInstance, const char* methodName, jlong pointer) { -// jclass clazz = (*env)->GetObjectClass(env, classInstance); -// jmethodID mid = (*env)->GetMethodID(env, clazz, methodName, "(J)V"); -// if (mid != NULL) { -// (*env)->CallVoidMethod(env, classInstance, mid, pointer); -// } -//} - -/* - * Class: org_lwjgl_d3d_IDirect3D9 - * Method: nCheckDepthStencilMatch - * Signature: (IIIII)I - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9_nCheckDepthStencilMatch - (JNIEnv *env, jobject object, jlong iDirect3D9, jint adapter, jint deviceType, jint adapterFormat, jint renderTargetFormat, jint depthStencilFormat) { - - return IDirect3D9_CheckDepthStencilMatch((IDirect3D9 *)iDirect3D9, adapter, deviceType, adapterFormat, renderTargetFormat, depthStencilFormat); -} - -/* - * Class: org_lwjgl_d3d_IDirect3D9 - * Method: nCheckDeviceFormat - * Signature: (IIIJII)I - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9_nCheckDeviceFormat - (JNIEnv *env, jobject object, jlong iDirect3D9, jint adapter, jint deviceType, jint adapterFormat, jint usage, jint resoruceType, jint checkFormat) { - - return IDirect3D9_CheckDeviceFormat((IDirect3D9 *)iDirect3D9, adapter, deviceType, adapterFormat, usage, resoruceType, checkFormat); -} - -/* - * Class: org_lwjgl_d3d_IDirect3D9 - * Method: nCheckDeviceFormatConversion - * Signature: (IIII)I - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9_nCheckDeviceFormatConversion - (JNIEnv *env, jobject object, jlong iDirect3D9, jint adapter, jint deviceType, jint sourceFormat, jint targetFormat) { - - return IDirect3D9_CheckDeviceFormatConversion((IDirect3D9 *)iDirect3D9, adapter, deviceType, sourceFormat, targetFormat); -} - -/* - * Class: org_lwjgl_d3d_IDirect3D9 - * Method: nCheckDeviceMultiSampleType - * Signature: (IIIZILjava/nio/IntBuffer;)I - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9_nCheckDeviceMultiSampleType - (JNIEnv *env, jobject object, jlong iDirect3D9, jint adapter, jint deviceType, jint surfaceFormat, boolean windowed, jint multiSampleType, jobject qualityLevels) { - - DWORD * quality = NULL; - - if(qualityLevels != NULL) { - DWORD * quality = (DWORD *)((*env)->GetDirectBufferAddress(env, qualityLevels)); - } - - return IDirect3D9_CheckDeviceMultiSampleType((IDirect3D9 *)iDirect3D9, adapter, deviceType, surfaceFormat, windowed, multiSampleType, quality); -} - -/* - * Class: org_lwjgl_d3d_IDirect3D9 - * Method: nCheckDeviceType - * Signature: (IIIIZ)I - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9_nCheckDeviceType - (JNIEnv *env, jobject object, jlong iDirect3D9, jint adapter, jint deviceType, jint displayFormat, jint backBufferFormat, boolean windowed) { - - return IDirect3D9_CheckDeviceType((IDirect3D9 *)iDirect3D9, adapter, deviceType, displayFormat, backBufferFormat, windowed); -} - -/* - * Class: org_lwjgl_d3d_IDirect3D9 - * Method: nCreateDevice - * Signature: (IIJJLorg/lwjgl/d3d/IDirect3D9$D3DPRESENT_PARAMETERS;Lorg/lwjgl/d3d/IDirect3DDevice9;)I - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9_nCreateDevice - (JNIEnv *env, jobject object, jlong iDirect3D9, jint adapter, jint deviceType, jlong focusWindow, jint behaviorFlags, jobject presentationParameters, jobject returnedDeviceInterface) { - - IDirect3DDevice9 *iDirect3DDevice9; - HWND myHwnd = (HWND)(INT_PTR)focusWindow; - D3DPRESENT_PARAMETERS* pPresentationParameters = (D3DPRESENT_PARAMETERS*)((*env)->GetDirectBufferAddress(env, presentationParameters)); - - HRESULT hResult = IDirect3D9_CreateDevice((IDirect3D9 *)iDirect3D9, adapter, deviceType, - myHwnd, behaviorFlags, pPresentationParameters, &iDirect3DDevice9); - - setPointer(env, returnedDeviceInterface, "setIDirect3DDevice9", (jlong)iDirect3DDevice9); - - return hResult; -} - -/* - * Class: org_lwjgl_d3d_IDirect3D9 - * Method: nEnumAdapterModes - * Signature: (IIILorg/lwjgl/d3d/IDirect3D9$D3DDISPLAYMODE;)I - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9_nEnumAdapterModes - (JNIEnv *env, jobject object, jlong iDirect3D9, jint adapter, jint format, jint modeIndex, jobject mode) { - - D3DDISPLAYMODE * displayMode = (D3DDISPLAYMODE *)((*env)->GetDirectBufferAddress(env, mode)); - - return IDirect3D9_EnumAdapterModes((IDirect3D9 *)iDirect3D9, adapter, format, modeIndex, displayMode); -} - -/* - * Class: org_lwjgl_d3d_IDirect3D9 - * Method: nGetAdapterCount - * Signature: (J)I - */ -JNIEXPORT jint JNICALL Java_org_lwjgl_d3d_IDirect3D9_nGetAdapterCount - (JNIEnv *env, jobject object, jlong iDirect3D9) { - - return IDirect3D9_GetAdapterCount((IDirect3D9 *)iDirect3D9); -} - -/* - * Class: org_lwjgl_d3d_IDirect3D9 - * Method: nGetAdapterDisplayMode - * Signature: (ILorg/lwjgl/d3d/IDirect3D9$D3DDISPLAYMODE;)I - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9_nGetAdapterDisplayMode - (JNIEnv *env, jobject object, jlong iDirect3D9, jint adapter, jobject mode) { - - D3DDISPLAYMODE * displayMode = (D3DDISPLAYMODE *)((*env)->GetDirectBufferAddress(env, mode)); - - return IDirect3D9_GetAdapterDisplayMode((IDirect3D9 *)iDirect3D9, adapter, displayMode); -} - -/* - * Class: org_lwjgl_d3d_IDirect3D9 - * Method: nGetAdapterIdentifier - * Signature: (IJLorg/lwjgl/d3d/IDirect3D9$D3DADAPTER_IDENTIFIER9;)I - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9_nGetAdapterIdentifier - (JNIEnv *env, jobject object, jlong iDirect3D9, jint adapter, jint flags, jobject identifier) { - - D3DADAPTER_IDENTIFIER9 * adapterIdentifier = (D3DADAPTER_IDENTIFIER9 *)((*env)->GetDirectBufferAddress(env, identifier)); - - return IDirect3D9_GetAdapterIdentifier((IDirect3D9 *)iDirect3D9, adapter, flags, adapterIdentifier); -} - -/* - * Class: org_lwjgl_d3d_IDirect3D9 - * Method: nGetAdapterModeCount - * Signature: (II)I - */ -JNIEXPORT jint JNICALL Java_org_lwjgl_d3d_IDirect3D9_nGetAdapterModeCount - (JNIEnv *env, jobject object, jlong iDirect3D9, jint adapter, jint format) { - - return IDirect3D9_GetAdapterModeCount((IDirect3D9 *)iDirect3D9, adapter, format); -} - -/* - * Class: org_lwjgl_d3d_IDirect3D9 - * Method: nGetAdapterMonitor - * Signature: (I)I - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9_nGetAdapterMonitor - (JNIEnv *env, jobject object, jlong iDirect3D9, jint adapter) { - - return (jlong)IDirect3D9_GetAdapterMonitor((IDirect3D9 *)iDirect3D9, adapter); -} - -/* - * Class: org_lwjgl_d3d_IDirect3D9 - * Method: nGetDeviceCaps - * Signature: (IILorg/lwjgl/d3d/IDirect3D9$D3DCAPS9;)I - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9_nGetDeviceCaps - (JNIEnv *env, jobject object, jlong iDirect3D9, jint adapter, jint deviceType, jobject caps) { - D3DCAPS9 * d3dCaps = (D3DCAPS9 *)((*env)->GetDirectBufferAddress(env, caps)); - - return IDirect3D9_GetDeviceCaps((IDirect3D9 *)iDirect3D9, adapter, deviceType, d3dCaps); -} - -/* - * Class: org_lwjgl_d3d_IDirect3D9 - * Method: nRegisterSoftwareDevice - * Signature: ()I - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9_nRegisterSoftwareDevice - (JNIEnv *env, jobject object, jlong iDirect3D9) { - - return 0; -} - -/* - * Class: org_lwjgl_d3d_IDirect3D9 - * Method: nRelease - * Signature: (J)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_d3d_IDirect3D9_nRelease - (JNIEnv *env, jobject object, jlong iDirect3D9) { - IDirect3D9_Release((IDirect3D9 *)iDirect3D9); -} - -/* - * Class: org_lwjgl_d3d_IDirect3D9 - * Method: nCreate - * Signature: ()J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9_nCreate - (JNIEnv *env, jclass clazz) { - IDirect3D9 *direct3DInterface = Direct3DCreate9(D3D_SDK_VERSION); - - return (jlong)direct3DInterface; -} Deleted: trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3D9Ex.c =================================================================== --- trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3D9Ex.c 2007-10-20 15:57:41 UTC (rev 2901) +++ trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3D9Ex.c 2007-10-20 19:02:48 UTC (rev 2902) @@ -1,56 +0,0 @@ -#include "org_lwjgl_d3d_IDirect3D9Ex.h" - -/* - * Class: org_lwjgl_d3d_IDirect3D9Ex - * Method: nCreateDeviceEx - * Signature: (JIIJJLorg/lwjgl/d3d/D3DPresentParameters;Lorg/lwjgl/d3d/D3DDisplaymodeEx;Lorg/lwjgl/d3d/IDirect3DDevice9Ex;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9Ex_nCreateDeviceEx - (JNIEnv *env, jobject obj, jlong IDirect3D9Ex, jint adapter, jint deviceType, jlong focusWindow, jlong behaviorFlags, jobject presentationParameters, jobject fullscreenDisplayMode, jobject returnedDeviceInterface) { - - return 0; -} - -/* - * Class: org_lwjgl_d3d_IDirect3D9Ex - * Method: nEnumAdapterModesEx - * Signature: (JILorg/lwjgl/d3d/D3DDisplaymodeFilter;ILorg/lwjgl/d3d/D3DDisplaymodeEx;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9Ex_nEnumAdapterModesEx - (JNIEnv *env, jobject obj, jlong IDirect3D9Ex, jint adapter, jobject filter, jint mode, jobject displayMode) { - - return 0; -} - -/* - * Class: org_lwjgl_d3d_IDirect3D9Ex - * Method: nGetAdapterDisplayModeEx - * Signature: (JILorg/lwjgl/d3d/D3DDisplaymodeEx;I)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9Ex_nGetAdapterDisplayModeEx - (JNIEnv *env, jobject obj, jlong IDirect3D9Ex, jint adapter, jobject mode, jint rotation) { - - return 0; -} - -/* - * Class: org_lwjgl_d3d_IDirect3D9Ex - * Method: nGetAdapterLUID - * Signature: (JILorg/lwjgl/d3d/LUID;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3D9Ex_nGetAdapterLUID - (JNIEnv *env, jobject obj, jlong IDirect3D9Ex, jint adapter, jobject LUID) { - - return 0; -} - -/* - * Class: org_lwjgl_d3d_IDirect3D9Ex - * Method: nGetAdapterModeCountEx - * Signature: (JILorg/lwjgl/d3d/D3DDisplaymodeFilter;)I - */ -JNIEXPORT jint JNICALL Java_org_lwjgl_d3d_IDirect3D9Ex_nGetAdapterModeCountEx - (JNIEnv *env, jobject obj, jlong IDirect3D9Ex, jint adapter, jobject filter) { - - return 0; -} Deleted: trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DBaseTexture9.c =================================================================== --- trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DBaseTexture9.c 2007-10-20 15:57:41 UTC (rev 2901) +++ trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DBaseTexture9.c 2007-10-20 19:02:48 UTC (rev 2902) @@ -1,66 +0,0 @@ -#include "org_lwjgl_d3d_IDirect3DBaseTexture9.h" - -/* - * Class: org_lwjgl_d3d_IDirect3DBaseTexture9 - * Method: nGenerateMipSubLevels - * Signature: (J)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_d3d_IDirect3DBaseTexture9_nGenerateMipSubLevels - (JNIEnv *env, jobject obj, jlong IDirect3DBaseTexture9) { - -} - -/* - * Class: org_lwjgl_d3d_IDirect3DBaseTexture9 - * Method: nGetAutoGenFilterType - * Signature: (J)I - */ -JNIEXPORT jint JNICALL Java_org_lwjgl_d3d_IDirect3DBaseTexture9_nGetAutoGenFilterType - (JNIEnv *env, jobject obj, jlong IDirect3DBaseTexture9) { - - return 0; -} - -/* - * Class: org_lwjgl_d3d_IDirect3DBaseTexture9 - * Method: nGetLevelCount - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DBaseTexture9_nGetLevelCount - (JNIEnv *env, jobject obj, jlong IDirect3DBaseTexture9) { - - return 0; -} - -/* - * Class: org_lwjgl_d3d_IDirect3DBaseTexture9 - * Method: nGetLOD - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DBaseTexture9_nGetLOD - (JNIEnv *env, jobject obj, jlong IDirect3DBaseTexture9) { - - return 0; -} - -/* - * Class: org_lwjgl_d3d_IDirect3DBaseTexture9 - * Method: nSetAutoGenFilterType - * Signature: (JI)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DBaseTexture9_nSetAutoGenFilterType - (JNIEnv *env, jobject obj, jlong IDirect3DBaseTexture9, jint filterType) { - - return 0; -} - -/* - * Class: org_lwjgl_d3d_IDirect3DBaseTexture9 - * Method: nSetLOD - * Signature: (JJ)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DBaseTexture9_nSetLOD - (JNIEnv *env, jobject obj, jlong IDirect3DBaseTexture9, jlong LODNew) { - - return 0; -} Deleted: trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DCubeTexture9.c =================================================================== --- trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DCubeTexture9.c 2007-10-20 15:57:41 UTC (rev 2901) +++ trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DCubeTexture9.c 2007-10-20 19:02:48 UTC (rev 2902) @@ -1,56 +0,0 @@ -#include "org_lwjgl_d3d_IDirect3DCubeTexture9.h" - -/* - * Class: org_lwjgl_d3d_IDirect3DCubeTexture9 - * Method: nAddDirtyRect - * Signature: (JILorg/lwjgl/d3d/Rectangle;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DCubeTexture9_nAddDirtyRect - (JNIEnv *env, jobject obj, jlong IDirect3DCubeTexture9, jint faceType, jobject dirtyRect) { - - return 0; -} - -/* - * Class: org_lwjgl_d3d_IDirect3DCubeTexture9 - * Method: nGetCubeMapSurface - * Signature: (JIILorg/lwjgl/d3d/IDirect3DSurface9;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DCubeTexture9_nGetCubeMapSurface - (JNIEnv *env, jobject obj, jlong IDirect3DCubeTexture9, jint faceType, jint level, jobject cubeMapSurface) { - - return 0; -} - -/* - * Class: org_lwjgl_d3d_IDirect3DCubeTexture9 - * Method: nGetLevelDesc - * Signature: (JILorg/lwjgl/d3d/D3DSsurfaceDesc;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DCubeTexture9_nGetLevelDesc - (JNIEnv *env, jobject obj, jlong IDirect3DCubeTexture9, jint level, jobject desc) { - - return 0; -} - -/* - * Class: org_lwjgl_d3d_IDirect3DCubeTexture9 - * Method: nLockRect - * Signature: (JIILorg/lwjgl/d3d/D3DLockedRect;Lorg/lwjgl/d3d/Rectangle;J)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DCubeTexture9_nLockRect - (JNIEnv *env, jobject obj, jlong IDirect3DCubeTexture9, jint faceType, jint level, jobject lockedRect, jobject rect, jlong flags) { - - return 0; -} - -/* - * Class: org_lwjgl_d3d_IDirect3DCubeTexture9 - * Method: nUnlockRect - * Signature: (JII)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DCubeTexture9_nUnlockRect - (JNIEnv *env, jobject obj, jlong IDirect3DCubeTexture9, jint faceType, jint level) { - - return 0; -} Deleted: trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DDevice9.c =================================================================== --- trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DDevice9.c 2007-10-20 15:57:41 UTC (rev 2901) +++ trunk/LWJGL/src/native/windows/org_lwjgl_d3d_IDirect3DDevice9.c 2007-10-20 19:02:48 UTC (rev 2902) @@ -1,1616 +0,0 @@ -#include <d3d9.h> -#include "org_lwjgl_d3d_IDirect3DDevice9.h" - -void setPointer(JNIEnv *env, jobject classInstance, const char* methodName, jlong pointer) { - jclass clazz = (*env)->GetObjectClass(env, classInstance); - jmethodID mid = (*env)->GetMethodID(env, clazz, methodName, "(J)V"); - if (mid != NULL) { - (*env)->CallVoidMethod(env, classInstance, mid, pointer); - } -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nBeginScene - * Signature: ()J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nBeginScene - (JNIEnv *env, jobject object, jlong iDirect3DDevice9) { - - return IDirect3DDevice9_BeginScene((IDirect3DDevice9*)iDirect3DDevice9); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nBeginStateBlock - * Signature: ()J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nBeginStateBlock - (JNIEnv *env, jobject object, jlong iDirect3DDevice9) { - - return IDirect3DDevice9_BeginStateBlock((IDirect3DDevice9*)iDirect3DDevice9); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nClear - * Signature: (JLjava/nio/LongBuffer;JIFJ)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nClear - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jlong count, jobject rects, jlong flags, jint color, jfloat z, jlong stencil) { - - //fix rects - return IDirect3DDevice9_Clear((IDirect3DDevice9*)iDirect3DDevice9, count, NULL, flags, color, z, stencil); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nColorFill - * Signature: (Lorg/lwjgl/d3d/IDirect3DSurface9;Lorg/lwjgl/d3d/Rectangle;I)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nColorFill - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jlong surface, jobject rectBuffer, jint color) { - - RECT *rect = (RECT*)((*env)->GetDirectBufferAddress(env, rectBuffer)); - - return IDirect3DDevice9_ColorFill((IDirect3DDevice9*)iDirect3DDevice9, (IDirect3DSurface9*)surface, rect, color); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nCreateAdditionalSwapChain - * Signature: (Lorg/lwjgl/d3d/D3DPresentParameters;Lorg/lwjgl/d3d/IDirect3DSwapChain9;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nCreateAdditionalSwapChain - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jobject presentationParametersBuffer, jobject swapChain) { - - D3DPRESENT_PARAMETERS *presentationParameters = (D3DPRESENT_PARAMETERS*)((*env)->GetDirectBufferAddress(env, presentationParametersBuffer)); - IDirect3DSwapChain9 *iDirect3DSwapChain9; - - HRESULT hResult = IDirect3DDevice9_CreateAdditionalSwapChain((IDirect3DDevice9*)iDirect3DDevice9, presentationParameters, &iDirect3DSwapChain9); - - setPointer(env, swapChain, "setIDirect3DSwapChain9", (jlong)iDirect3DSwapChain9); - - return hResult; -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nCreateCubeTexture - * Signature: (IIJIILorg/lwjgl/d3d/IDirect3DCubeTexture9;J)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nCreateCubeTexture - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint edgeLength, jint levels, jlong usage, jint format, jint pool, jobject cubeTexture, jlong shareHandle) { - - IDirect3DCubeTexture9 *iDirect3DCubeTexture9; - - HRESULT hResult = IDirect3DDevice9_CreateCubeTexture((IDirect3DDevice9*)iDirect3DDevice9, edgeLength, levels, - usage, format, pool, &iDirect3DCubeTexture9, (HANDLE*)shareHandle); - - setPointer(env, cubeTexture, "setIDirect3DCubeTexture9", (jlong)iDirect3DCubeTexture9); - - return hResult; -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nCreateDepthStencilSurface - * Signature: (IIIIJZLorg/lwjgl/d3d/IDirect3DSurface9;J)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nCreateDepthStencilSurface - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint width, jint height, jint format, jint multiSample, jlong multiSampleQuality, jboolean discard, jobject surface, jlong sharedHandle) { - - IDirect3DSurface9 *iDirect3DSurface9; - - HRESULT hResult = IDirect3DDevice9_CreateDepthStencilSurface((IDirect3DDevice9*)iDirect3DDevice9, width, height, format, - multiSample, multiSampleQuality, discard, &iDirect3DSurface9, (HANDLE*)sharedHandle); - - setPointer(env, surface, "setIDirect3DSurface9", (jlong)iDirect3DSurface9); - - return hResult; -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nCreateIndexBuffer - * Signature: (IJIILorg/lwjgl/d3d/IDirect3DIndexBuffer9;J)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nCreateIndexBuffer - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint length, jlong usage, jint format, jint pool, jobject indexBuffer, jlong shareHandle) { - - IDirect3DIndexBuffer9 *iDirect3DIndexBuffer9; - - HRESULT hResult = IDirect3DDevice9_CreateIndexBuffer((IDirect3DDevice9*)iDirect3DDevice9, length, usage, format, - pool, &iDirect3DIndexBuffer9, (HANDLE*)shareHandle); - - setPointer(env, indexBuffer, "setIDirect3DIndexBuffer9", (jlong)iDirect3DIndexBuffer9); - - return hResult; -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nCreateOffscreenPlainSurface - * Signature: (IIIJLorg/lwjgl/d3d/IDirect3DSurface9;J)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nCreateOffscreenPlainSurface - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint width, jint height, jint format, jlong pool, jobject surface, jlong sharedHandle) { - - IDirect3DSurface9 *iDirect3DSurface9; - - HRESULT hResult = IDirect3DDevice9_CreateOffscreenPlainSurface((IDirect3DDevice9*)iDirect3DDevice9, width, height, format, - pool, &iDirect3DSurface9, (HANDLE*)sharedHandle); - - setPointer(env, surface, "setIDirect3DSurface9", (jlong)iDirect3DSurface9); - - return hResult; -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nCreatePixelShader - * Signature: (JLorg/lwjgl/d3d/IDirect3DPixelShader9;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nCreatePixelShader - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jlong function, jobject shader) { - - IDirect3DPixelShader9 *iDirect3DPixelShader9; - - HRESULT hResult = IDirect3DDevice9_CreatePixelShader((IDirect3DDevice9*)iDirect3DDevice9, (const DWORD*)function, &iDirect3DPixelShader9); - - setPointer(env, shader, "setIDirect3DPixelShader9", (jlong)iDirect3DPixelShader9); - - return hResult; -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nCreateQuery - * Signature: (ILorg/lwjgl/d3d/IDirect3DQuery9;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nCreateQuery - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint type, jobject query) { - - IDirect3DQuery9 *iDirect3DQuery9; - - HRESULT hResult = IDirect3DDevice9_CreateQuery((IDirect3DDevice9*)iDirect3DDevice9, type, &iDirect3DQuery9); - - setPointer(env, query, "setIDirect3DQuery9", (jlong)iDirect3DQuery9); - - return hResult; -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nCreateRenderTarget - * Signature: (IIIIJZLorg/lwjgl/d3d/IDirect3DSurface9;J)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nCreateRenderTarget - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint width, jint height, jint format, jint multiSample, jlong multiSampleQuality, jboolean lockable, jobject surface, jlong sharedHandle) { - - IDirect3DSurface9 *iDirect3DSurface9; - - HRESULT hResult = IDirect3DDevice9_CreateRenderTarget((IDirect3DDevice9*)iDirect3DDevice9, width, height, format, - multiSample, multiSampleQuality, lockable, &iDirect3DSurface9, (HANDLE*)sharedHandle); - - setPointer(env, surface, "setIDirect3DSurface9", (jlong)iDirect3DSurface9); - - return hResult; -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nCreateStateBlock - * Signature: (ILorg/lwjgl/d3d/IDirect3DStateBlock9;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nCreateStateBlock - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint type, jobject stateBlock) { - - IDirect3DStateBlock9 *iDirect3DStateBlock9; - - HRESULT hResult = IDirect3DDevice9_CreateStateBlock((IDirect3DDevice9*)iDirect3DDevice9, type, &iDirect3DStateBlock9); - - setPointer(env, stateBlock, "setIDirect3DStateBlock9", (jlong)iDirect3DStateBlock9); - - return hResult; -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nCreateTexture - * Signature: (IIIJIILorg/lwjgl/d3d/IDirect3DTexture9;J)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nCreateTexture - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint width, jint height, jint levels, jlong usage, jint format, jint pool, jobject texture, jlong sharedHandle) { - - IDirect3DTexture9 *iDirect3DTexture9; - - HRESULT hResult = IDirect3DDevice9_CreateTexture((IDirect3DDevice9*)iDirect3DDevice9, width, height, levels, - usage, format, pool, &iDirect3DTexture9, (HANDLE*)sharedHandle); - - setPointer(env, texture, "setIDirect3DTexture9", (jlong)iDirect3DTexture9); - - return hResult; -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nCreateVertexBuffer - * Signature: (IJJILorg/lwjgl/d3d/IDirect3DVertexBuffer9;J)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nCreateVertexBuffer - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint length, jint usage, jint FVF, jint pool, jobject vertexBuffer, jlong sharedHandle) { - - IDirect3DVertexBuffer9 *iDirect3DVertexBuffer9; - - HRESULT hResult = IDirect3DDevice9_CreateVertexBuffer((IDirect3DDevice9*)iDirect3DDevice9, length, usage, FVF, - pool, &iDirect3DVertexBuffer9, (HANDLE*)sharedHandle); - - setPointer(env, vertexBuffer, "setIDirect3DVertexBuffer9", (jlong)iDirect3DVertexBuffer9); - - return hResult; -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nCreateVertexDeclaration - * Signature: (Lorg/lwjgl/d3d/D3DVertexElement9;Lorg/lwjgl/d3d/IDirect3DVertexDeclaration9;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nCreateVertexDeclaration - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jobject vertexElementsBuffer, jobject decl) { - - IDirect3DVertexDeclaration9 *iDirect3DVertexDeclaration9; - D3DVERTEXELEMENT9* vertexElements = (D3DVERTEXELEMENT9*)((*env)->GetDirectBufferAddress(env, vertexElementsBuffer)); - - HRESULT hResult = IDirect3DDevice9_CreateVertexDeclaration((IDirect3DDevice9*)iDirect3DDevice9, vertexElements, - &iDirect3DVertexDeclaration9); - - setPointer(env, decl, "setIDirect3DVertexDeclaration9", (jlong)iDirect3DVertexDeclaration9); - - return hResult; -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nCreateVertexShader - * Signature: (JLorg/lwjgl/d3d/IDirect3DVertexShader9;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nCreateVertexShader - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jlong function, jobject shader) { - - IDirect3DVertexShader9 *iDirect3DVertexShader9; - - HRESULT hResult = IDirect3DDevice9_CreateVertexShader((IDirect3DDevice9*)iDirect3DDevice9, (DWORD*)function, - &iDirect3DVertexShader9); - - setPointer(env, shader, "setIDirect3DVertexShader9", (jlong)iDirect3DVertexShader9); - - return hResult; -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nCreateVolumeTexture - * Signature: (IIIIJIILorg/lwjgl/d3d/IDirect3DVolumeTexture9;J)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nCreateVolumeTexture - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint width, jint height, jint depth, jint levels, jlong usage, jint format, jint pool, jobject volumeTexture, jlong sharedHandle) { - - IDirect3DVolumeTexture9 *iDirect3DVolumeTexture9; - - HRESULT hResult = IDirect3DDevice9_CreateVolumeTexture((IDirect3DDevice9*)iDirect3DDevice9, width, height, depth, - levels, usage, format, pool, &iDirect3DVolumeTexture9, (HANDLE*)sharedHandle); - - setPointer(env, volumeTexture, "setIDirect3DVolumeTexture9", (jlong)iDirect3DVolumeTexture9); - - return hResult; -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nDeletePatch - * Signature: (I)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nDeletePatch - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint handle) { - - return IDirect3DDevice9_DeletePatch((IDirect3DDevice9*)iDirect3DDevice9, handle); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nDrawIndexedPrimitive - * Signature: (IIIIII)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nDrawIndexedPrimitive - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint type, jint baseVertexIndex, jint minIndex, jint numVertices, jint startIndex, jint primitiveCount) { - - return IDirect3DDevice9_DrawIndexedPrimitive((IDirect3DDevice9*)iDirect3DDevice9, type, baseVertexIndex, minIndex, - numVertices, startIndex, primitiveCount); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nDrawIndexedPrimitiveUP - * Signature: (IIIILjava/nio/ByteBuffer;ILjava/nio/ByteBuffer;I)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nDrawIndexedPrimitiveUP - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint primitiveType, jint minVertexIndex, jint numVertices, jint primitiveCount, jobject indexDataBuffer, jint indexDataFormat, jobject vertexStreamZeroDataBuffer, jint vertexStreamZeroStride) { - - CONST void *indexData = (CONST void *)((*env)->GetDirectBufferAddress(env, indexDataBuffer)); - CONST void *vertexStreamZeroData = (CONST void *)((*env)->GetDirectBufferAddress(env, vertexStreamZeroDataBuffer)); - - return IDirect3DDevice9_DrawIndexedPrimitiveUP((IDirect3DDevice9*)iDirect3DDevice9, primitiveType, minVertexIndex, - numVertices, primitiveCount, indexData, indexDataFormat, vertexStreamZeroData, vertexStreamZeroStride); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nDrawPrimitive - * Signature: (III)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nDrawPrimitive - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint primitiveType, jint startVertex, jint primitiveCount) { - - return IDirect3DDevice9_DrawPrimitive((IDirect3DDevice9*)iDirect3DDevice9, primitiveType, startVertex, primitiveCount); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nDrawPrimitiveUP - * Signature: (IILjava/nio/ByteBuffer;I)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nDrawPrimitiveUP - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint primitiveType, jint primitiveCount, jobject vertexStreamZeroData, jint vertexStreamZeroStride) { - - void* vertex = (void*)((*env)->GetDirectBufferAddress(env, vertexStreamZeroData)); - - return IDirect3DDevice9_DrawPrimitiveUP((IDirect3DDevice9*)iDirect3DDevice9, primitiveType, primitiveCount, vertex, vertexStreamZeroStride); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nDrawRectPatch - * Signature: (ILjava/nio/FloatBuffer;Lorg/lwjgl/d3d/D3DRectPatchInfo;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nDrawRectPatch - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint handle, jobject numSegsBuffer, jobject rectPatchInfoBuffer) { - - const float *numSegs = (const float *)((*env)->GetDirectBufferAddress(env, numSegsBuffer)); - const D3DRECTPATCH_INFO *rectPatchInfo = (const D3DRECTPATCH_INFO *)((*env)->GetDirectBufferAddress(env, rectPatchInfoBuffer)); - - return IDirect3DDevice9_DrawRectPatch((IDirect3DDevice9*)iDirect3DDevice9, handle, numSegs, rectPatchInfo); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nDrawTriPatch - * Signature: (ILjava/nio/FloatBuffer;Lorg/lwjgl/d3d/D3DTriPatchInfo;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nDrawTriPatch - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint handle, jobject numSegsBuffer, jobject triPatchInfoBuffer) { - - const float *numSegs = (const float *)((*env)->GetDirectBufferAddress(env, numSegsBuffer)); - const D3DTRIPATCH_INFO *triPatchInfo = (const D3DTRIPATCH_INFO *)((*env)->GetDirectBufferAddress(env, triPatchInfoBuffer)); - - return IDirect3DDevice9_DrawTriPatch((IDirect3DDevice9*)iDirect3DDevice9, handle, numSegs, triPatchInfo); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nEndScene - * Signature: ()J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nEndScene - (JNIEnv *env, jobject object, jlong iDirect3DDevice9) { - - return IDirect3DDevice9_EndScene((IDirect3DDevice9*)iDirect3DDevice9); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nEndStateBlock - * Signature: (Lorg/lwjgl/d3d/IDirect3DStateBlock9;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nEndStateBlock - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jobject stateBlock) { - - IDirect3DStateBlock9 *iDirect3DStateBlock9; - - HRESULT hResult = IDirect3DDevice9_EndStateBlock((IDirect3DDevice9*)iDirect3DDevice9, &iDirect3DStateBlock9); - - setPointer(env, stateBlock, "setIDirect3DStateBlock9", (jlong)iDirect3DStateBlock9); - - return hResult; -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nEvictManagedResources - * Signature: ()J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nEvictManagedResources - (JNIEnv *env, jobject object, jlong iDirect3DDevice9) { - - return IDirect3DDevice9_EvictManagedResources((IDirect3DDevice9*)iDirect3DDevice9); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nGetAvailableTextureMem - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetAvailableTextureMem - (JNIEnv *env, jobject object, jlong iDirect3DDevice9) { - - return IDirect3DDevice9_GetAvailableTextureMem((IDirect3DDevice9*)iDirect3DDevice9); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nGetBackBuffer - * Signature: (IIILorg/lwjgl/d3d/IDirect3DSurface9;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetBackBuffer - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint swapChain, jint backBuffer, jint type, jobject backBufferSurface) { - - IDirect3DSurface9 *iDirect3DSurface9; - - HRESULT hResult = IDirect3DDevice9_GetBackBuffer((IDirect3DDevice9*)iDirect3DDevice9, swapChain, backBuffer, type, - &iDirect3DSurface9); - - setPointer(env, backBufferSurface, "setIDirect3DSurface9", (jlong)iDirect3DSurface9); - - return hResult; -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nGetClipPlane - * Signature: (JLjava/nio/FloatBuffer;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetClipPlane - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jlong index, jobject planeBuffer) { - - float* plane = (float*)((*env)->GetDirectBufferAddress(env, planeBuffer)); - - return IDirect3DDevice9_GetClipPlane((IDirect3DDevice9*)iDirect3DDevice9, index, plane); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nGetClipStatus - * Signature: (Lorg/lwjgl/d3d/D3DClipStatus9;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetClipStatus - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jobject clipStatusBuffer) { - - D3DCLIPSTATUS9* planeBuffer = (D3DCLIPSTATUS9*)((*env)->GetDirectBufferAddress(env, clipStatusBuffer)); - - return IDirect3DDevice9_GetClipStatus((IDirect3DDevice9*)iDirect3DDevice9, planeBuffer); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nGetCreationParameters - * Signature: (Lorg/lwjgl/d3d/D3DDeviceCreationParameters;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetCreationParameters - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jobject parametersBuffer) { - - D3DDEVICE_CREATION_PARAMETERS* parameters = (D3DDEVICE_CREATION_PARAMETERS*)((*env)->GetDirectBufferAddress(env, parametersBuffer)); - - return IDirect3DDevice9_GetCreationParameters((IDirect3DDevice9*)iDirect3DDevice9, parameters); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nGetCurrentTexturePalette - * Signature: (Ljava/nio/IntBuffer;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetCurrentTexturePalette - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jobject paletteNumberBuffer) { - - UINT* paletteNumber = (UINT*)((*env)->GetDirectBufferAddress(env, paletteNumberBuffer)); - - return IDirect3DDevice9_GetCurrentTexturePalette((IDirect3DDevice9*)iDirect3DDevice9, paletteNumber); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nGetDepthStencilSurface - * Signature: (Lorg/lwjgl/d3d/IDirect3DSurface9;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetDepthStencilSurface - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jobject zStencilSurface) { - - IDirect3DSurface9 *iDirect3DSurface9; - - HRESULT hResult = IDirect3DDevice9_GetDepthStencilSurface((IDirect3DDevice9*)iDirect3DDevice9, &iDirect3DSurface9); - - setPointer(env, zStencilSurface, "setIDirect3DSurface9", (jlong)iDirect3DSurface9); - - return hResult; -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nGetDeviceCaps - * Signature: (Lorg/lwjgl/d3d/D3DCaps9;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetDeviceCaps - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jobject capsBuffer) { - - D3DCAPS9* caps = (D3DCAPS9*)((*env)->GetDirectBufferAddress(env, capsBuffer)); - - return IDirect3DDevice9_GetDeviceCaps((IDirect3DDevice9*)iDirect3DDevice9, caps); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nGetDirect3D - * Signature: (Lorg/lwjgl/d3d/IDirect3D9;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetDirect3D - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jobject D3D9) { - - IDirect3D9 *iDirect3D9; - - HRESULT hResult = IDirect3DDevice9_GetDirect3D((IDirect3DDevice9*)iDirect3DDevice9, &iDirect3D9); - - setPointer(env, D3D9, "setIDirect3D9", (jlong)iDirect3D9); - - return hResult; -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nGetDisplayMode - * Signature: (ILorg/lwjgl/d3d/D3DDisplaymode;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetDisplayMode - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint swapChain, jobject modeBuffer) { - - D3DDISPLAYMODE* mode = (D3DDISPLAYMODE*)((*env)->GetDirectBufferAddress(env, modeBuffer)); - - return IDirect3DDevice9_GetDisplayMode((IDirect3DDevice9*)iDirect3DDevice9, swapChain, mode); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nGetFrontBufferData - * Signature: (ILorg/lwjgl/d3d/IDirect3DSurface9;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetFrontBufferData - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint swapChain, jlong destSurface) { - - return IDirect3DDevice9_GetFrontBufferData((IDirect3DDevice9*)iDirect3DDevice9, swapChain, - (IDirect3DSurface9 *)destSurface); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nGetFVF - * Signature: (Ljava/nio/LongBuffer;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetFVF - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jobject FVFBuffer) { - - DWORD* FVF = (DWORD*)((*env)->GetDirectBufferAddress(env, FVFBuffer)); - - return IDirect3DDevice9_GetFVF((IDirect3DDevice9*)iDirect3DDevice9, FVF); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nGetGammaRamp - * Signature: (ILorg/lwjgl/d3d/D3DGammaRamp;)J - */ -JNIEXPORT void JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetGammaRamp - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint swapChain, jobject rampBuffer) { - - D3DGAMMARAMP* ramp = (D3DGAMMARAMP*)((*env)->GetDirectBufferAddress(env, rampBuffer)); - - IDirect3DDevice9_GetGammaRamp((IDirect3DDevice9*)iDirect3DDevice9, swapChain, ramp); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nGetIndices - * Signature: (Lorg/lwjgl/d3d/IDirect3DIndexBuffer9;Ljava/nio/IntBuffer;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetIndices - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jobject indexData) { - - IDirect3DIndexBuffer9 *iDirect3DIndexBuffer9; - - HRESULT hResult = IDirect3DDevice9_GetIndices((IDirect3DDevice9*)iDirect3DDevice9, &iDirect3DIndexBuffer9); - - setPointer(env, indexData, "setIDirect3DIndexBuffer9", (jlong)iDirect3DIndexBuffer9); - - return hResult; -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nGetLight - * Signature: (JLorg/lwjgl/d3d/D3DLight9;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetLight - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jlong index, jobject lightBuffer) { - - D3DLIGHT9* light = (D3DLIGHT9*)((*env)->GetDirectBufferAddress(env, lightBuffer)); - - return IDirect3DDevice9_GetLight((IDirect3DDevice9*)iDirect3DDevice9, index, light); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nGetLightEnable - * Signature: (JZ)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetLightEnable - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jlong index, jobject enableBuffer) { - - BOOL* enable = (BOOL*)((*env)->GetDirectBufferAddress(env, enableBuffer)); - - return IDirect3DDevice9_GetLightEnable((IDirect3DDevice9*)iDirect3DDevice9, index, enable); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nGetMaterial - * Signature: (Lorg/lwjgl/d3d/D3DMaterial9;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetMaterial - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jobject materialBuffer) { - - D3DMATERIAL9* material = (D3DMATERIAL9*)((*env)->GetDirectBufferAddress(env, materialBuffer)); - - return IDirect3DDevice9_GetMaterial((IDirect3DDevice9*)iDirect3DDevice9, material); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nGetNPatchMode - * Signature: ()F - */ -JNIEXPORT jfloat JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetNPatchMode - (JNIEnv *env, jobject object, jlong iDirect3DDevice9) { - - return IDirect3DDevice9_GetNPatchMode((IDirect3DDevice9*)iDirect3DDevice9); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nGetNumberOfSwapChains - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetNumberOfSwapChains - (JNIEnv *env, jobject object, jlong iDirect3DDevice9) { - - return IDirect3DDevice9_GetNumberOfSwapChains((IDirect3DDevice9*)iDirect3DDevice9); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nGetPaletteEntries - * Signature: (ILorg/lwjgl/d3d/PaletteEntry;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetPaletteEntries - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint paletteNumber, jobject entriesBuffer) { - - PALETTEENTRY* entries = (PALETTEENTRY*)((*env)->GetDirectBufferAddress(env, entriesBuffer)); - - return IDirect3DDevice9_GetPaletteEntries((IDirect3DDevice9*)iDirect3DDevice9, paletteNumber, entries); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nGetPixelShader - * Signature: (Lorg/lwjgl/d3d/IDirect3DPixelShader9;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetPixelShader - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jobject shader) { - - IDirect3DPixelShader9 *iDirect3DPixelShader9; - - HRESULT hResult = IDirect3DDevice9_GetPixelShader((IDirect3DDevice9*)iDirect3DDevice9, &iDirect3DPixelShader9); - - setPointer(env, shader, "setIDirect3DPixelShader9", (jlong)iDirect3DPixelShader9); - - return hResult; -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nGetPixelShaderConstantB - * Signature: (IZI)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetPixelShaderConstantB - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint startRegister, jobject constantDataBuffer, jint boolCount) { - - BOOL* constantData = (BOOL*)((*env)->GetDirectBufferAddress(env, constantDataBuffer)); - - return IDirect3DDevice9_GetPixelShaderConstantB((IDirect3DDevice9*)iDirect3DDevice9, startRegister, constantData, - boolCount); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nGetPixelShaderConstantF - * Signature: (ILjava/nio/FloatBuffer;I)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetPixelShaderConstantF - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint startRegister, jobject constantDataBuffer, jint vector4fCount) { - - float* constantData = (float*)((*env)->GetDirectBufferAddress(env, constantDataBuffer)); - - return IDirect3DDevice9_GetPixelShaderConstantF((IDirect3DDevice9*)iDirect3DDevice9, startRegister, constantData, - vector4fCount); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nGetPixelShaderConstantI - * Signature: (ILjava/nio/IntBuffer;I)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetPixelShaderConstantI - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint startRegister, jobject constantDataBuffer, jint vector4iCount) { - - int* constantData = (int*)((*env)->GetDirectBufferAddress(env, constantDataBuffer)); - - return IDirect3DDevice9_GetPixelShaderConstantI((IDirect3DDevice9*)iDirect3DDevice9, startRegister, constantData, - vector4iCount); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nGetRasterStatus - * Signature: (ILorg/lwjgl/d3d/D3DRasterStatus;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetRasterStatus - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint swapChain, jobject rasterStatusBuffer) { - - D3DRASTER_STATUS* rasterStatus = (D3DRASTER_STATUS*)((*env)->GetDirectBufferAddress(env, rasterStatusBuffer)); - - return IDirect3DDevice9_GetRasterStatus((IDirect3DDevice9*)iDirect3DDevice9, swapChain, rasterStatus); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nGetRenderState - * Signature: (IJ)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetRenderState - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint state, jobject valueBuffer) { - - DWORD* value = (DWORD*)((*env)->GetDirectBufferAddress(env, valueBuffer)); - - return IDirect3DDevice9_GetRenderState((IDirect3DDevice9*)iDirect3DDevice9, state, value); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nGetRenderTarget - * Signature: (JLorg/lwjgl/d3d/IDirect3DSurface9;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetRenderTarget - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jlong renderTargetIndex, jobject renderTarget) { - - IDirect3DSurface9 *iDirect3DSurface9; - - HRESULT hResult = IDirect3DDevice9_GetRenderTarget((IDirect3DDevice9*)iDirect3DDevice9, renderTargetIndex, - &iDirect3DSurface9); - - setPointer(env, renderTarget, "setIDirect3DSurface9", (jlong)iDirect3DSurface9); - - return hResult; -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nGetRenderTargetData - * Signature: (Lorg/lwjgl/d3d/IDirect3DSurface9;Lorg/lwjgl/d3d/IDirect3DSurface9;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetRenderTargetData - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jlong renderTarget, jlong destSurface) { - - return IDirect3DDevice9_GetRenderTargetData((IDirect3DDevice9*)iDirect3DDevice9, (IDirect3DSurface9 *)renderTarget, - (IDirect3DSurface9 *)destSurface); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nGetSamplerState - * Signature: (JILjava/nio/LongBuffer;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetSamplerState - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jlong sampler, jint type, jobject valueBuffer) { - - DWORD* value = (DWORD*)((*env)->GetDirectBufferAddress(env, valueBuffer)); - - return IDirect3DDevice9_GetSamplerState((IDirect3DDevice9*)iDirect3DDevice9, sampler, type, value); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nGetScissorRect - * Signature: (Lorg/lwjgl/d3d/Rectangle;)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetScissorRect - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jobject rectBuffer) { - - RECT* rect = (RECT*)((*env)->GetDirectBufferAddress(env, rectBuffer)); - - return IDirect3DDevice9_GetScissorRect((IDirect3DDevice9*)iDirect3DDevice9, rect); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nGetSoftwareVertexProcessing - * Signature: ()Z - */ -JNIEXPORT jboolean JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetSoftwareVertexProcessing - (JNIEnv *env, jobject object, jlong iDirect3DDevice9) { - - return IDirect3DDevice9_GetSoftwareVertexProcessing((IDirect3DDevice9*)iDirect3DDevice9); -} - -/* - * Class: org_lwjgl_d3d_IDirect3DDevice9 - * Method: nGetStreamSource - * Signature: (ILorg/lwjgl/d3d/IDirect3DVertexBuffer9;II)J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_d3d_IDirect3DDevice9_nGetStreamSource - (JNIEnv *env, jobject object, jlong iDirect3DDevice9, jint streamNumber, jobject streamData, jobject offsetInBytesBuffer, jobject strideBuffer) { - - IDirect3DVertexBuffer9 *iDirect3DVertexBuffer9; - UINT* offsetInBytes = (UINT*)((*env)->GetDirectBufferAddress(env, offsetInBytesBuffer)); - UINT* stride = (UINT*)((*env)->GetDirectBufferAddress(env, strideBuffer)); - - HRESULT hResult = IDirect3DDevice9_GetStreamSource((IDirect3DDevice9*)iD... [truncated message content] |
From: <ma...@us...> - 2007-10-28 21:42:47
|
Revision: 2910 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=2910&view=rev Author: matzon Date: 2007-10-28 14:42:43 -0700 (Sun, 28 Oct 2007) Log Message: ----------- updating version string to 1.1.3 Modified Paths: -------------- trunk/LWJGL/build.xml trunk/LWJGL/src/java/org/lwjgl/Sys.java trunk/LWJGL/src/java/org/lwjgl/devil/ILNative.java trunk/LWJGL/src/java/org/lwjgl/fmod3/FMOD.java Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2007-10-24 21:55:39 UTC (rev 2909) +++ trunk/LWJGL/build.xml 2007-10-28 21:42:43 UTC (rev 2910) @@ -13,7 +13,7 @@ <property name="lwjgl.docs" location="doc" /> <property name="lwjgl.temp" location="temp" /> <property name="lwjgl.res" location="res" /> - <property name="lwjgl.version" value="1.1.2" /> + <property name="lwjgl.version" value="1.1.3" /> <property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java"/> <!-- ================================================================== --> Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2007-10-24 21:55:39 UTC (rev 2909) +++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2007-10-28 21:42:43 UTC (rev 2910) @@ -54,7 +54,7 @@ private static final String JNI_LIBRARY_NAME = "lwjgl"; /** Current version of library */ - private static final String VERSION = "1.1.2"; + private static final String VERSION = "1.1.3"; /** Current version of the JNI library */ static final int JNI_VERSION = 11; Modified: trunk/LWJGL/src/java/org/lwjgl/devil/ILNative.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/devil/ILNative.java 2007-10-24 21:55:39 UTC (rev 2909) +++ trunk/LWJGL/src/java/org/lwjgl/devil/ILNative.java 2007-10-28 21:42:43 UTC (rev 2910) @@ -53,7 +53,7 @@ private static String JNI_LIBRARY_NAME = "lwjgl-devil"; /** Version of IL */ - static final String VERSION = "1.1.2"; + static final String VERSION = "1.1.3"; /** Current version of the JNI library */ static final int JNI_VERSION = 2; Modified: trunk/LWJGL/src/java/org/lwjgl/fmod3/FMOD.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/fmod3/FMOD.java 2007-10-24 21:55:39 UTC (rev 2909) +++ trunk/LWJGL/src/java/org/lwjgl/fmod3/FMOD.java 2007-10-28 21:42:43 UTC (rev 2910) @@ -193,7 +193,7 @@ private static String JNI_LIBRARY_NAME = "lwjgl-fmod3"; /** Version of FMOD */ - private static final String VERSION = "1.1.2"; + private static final String VERSION = "1.1.3"; /** Current version of the JNI library */ static final int JNI_VERSION = 1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2008-01-20 08:21:14
|
Revision: 2935 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=2935&view=rev Author: matzon Date: 2008-01-20 00:20:54 -0800 (Sun, 20 Jan 2008) Log Message: ----------- 1.1.4 version string Modified Paths: -------------- trunk/LWJGL/build.xml trunk/LWJGL/src/java/org/lwjgl/Sys.java trunk/LWJGL/src/java/org/lwjgl/devil/ILNative.java trunk/LWJGL/src/java/org/lwjgl/fmod3/FMOD.java Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2008-01-19 09:53:14 UTC (rev 2934) +++ trunk/LWJGL/build.xml 2008-01-20 08:20:54 UTC (rev 2935) @@ -13,7 +13,7 @@ <property name="lwjgl.docs" location="doc" /> <property name="lwjgl.temp" location="temp" /> <property name="lwjgl.res" location="res" /> - <property name="lwjgl.version" value="1.1.3" /> + <property name="lwjgl.version" value="1.1.4" /> <property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java"/> <!-- ================================================================== --> Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2008-01-19 09:53:14 UTC (rev 2934) +++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2008-01-20 08:20:54 UTC (rev 2935) @@ -54,7 +54,7 @@ private static final String JNI_LIBRARY_NAME = "lwjgl"; /** Current version of library */ - private static final String VERSION = "1.1.3"; + private static final String VERSION = "1.1.4"; /** Current version of the JNI library */ static final int JNI_VERSION = 12; Modified: trunk/LWJGL/src/java/org/lwjgl/devil/ILNative.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/devil/ILNative.java 2008-01-19 09:53:14 UTC (rev 2934) +++ trunk/LWJGL/src/java/org/lwjgl/devil/ILNative.java 2008-01-20 08:20:54 UTC (rev 2935) @@ -53,7 +53,7 @@ private static String JNI_LIBRARY_NAME = "lwjgl-devil"; /** Version of IL */ - static final String VERSION = "1.1.3"; + static final String VERSION = "1.1.4"; /** Current version of the JNI library */ static final int JNI_VERSION = 2; Modified: trunk/LWJGL/src/java/org/lwjgl/fmod3/FMOD.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/fmod3/FMOD.java 2008-01-19 09:53:14 UTC (rev 2934) +++ trunk/LWJGL/src/java/org/lwjgl/fmod3/FMOD.java 2008-01-20 08:20:54 UTC (rev 2935) @@ -193,7 +193,7 @@ private static String JNI_LIBRARY_NAME = "lwjgl-fmod3"; /** Version of FMOD */ - private static final String VERSION = "1.1.3"; + private static final String VERSION = "1.1.4"; /** Current version of the JNI library */ static final int JNI_VERSION = 1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eli...@us...> - 2008-01-21 21:38:33
|
Revision: 2941 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=2941&view=rev Author: elias_naur Date: 2008-01-21 13:38:29 -0800 (Mon, 21 Jan 2008) Log Message: ----------- Removed devil and fmod support. yay. Modified Paths: -------------- trunk/LWJGL/build.xml Removed Paths: ------------- trunk/LWJGL/doc/3rdparty/openil_license.txt trunk/LWJGL/platform_build/linux_ant/build_devil.xml trunk/LWJGL/platform_build/linux_ant/build_fmod3.xml trunk/LWJGL/platform_build/macosx_ant/build_devil.xml trunk/LWJGL/platform_build/macosx_ant/build_fmod3.xml trunk/LWJGL/platform_build/windows_ant/build_devil.xml trunk/LWJGL/platform_build/windows_ant/build_fmod3.xml trunk/LWJGL/src/java/org/lwjgl/devil/ trunk/LWJGL/src/java/org/lwjgl/fmod3/ trunk/LWJGL/src/java/org/lwjgl/test/applet/Optional.java trunk/LWJGL/src/java/org/lwjgl/test/devil/ trunk/LWJGL/src/java/org/lwjgl/test/fmod3/ trunk/LWJGL/src/native/common/devil/ trunk/LWJGL/src/native/common/fmod3/ Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2008-01-21 21:27:03 UTC (rev 2940) +++ trunk/LWJGL/build.xml 2008-01-21 21:38:29 UTC (rev 2941) @@ -24,10 +24,8 @@ <fileset id="lwjgl.fileset" dir="${lwjgl.bin}"> <include name="org/**/*" /> <exclude name="org/lwjgl/d3d/**" /> - <exclude name="org/lwjgl/fmod3/**" /> <exclude name="org/lwjgl/test/**" /> <exclude name="org/lwjgl/util/**" /> - <exclude name="org/lwjgl/devil/**" /> <exclude name="org/lwjgl/examples/**" /> </fileset> @@ -62,18 +60,6 @@ <include name="org/lwjgl/util/**" /> </fileset> - <!-- Files to include in the lwjgl_fmod3.jar file --> - <fileset id="lwjgl_fmod3.fileset" dir="${lwjgl.bin}"> - <exclude name="**.*" /> - <include name="org/lwjgl/fmod3/**" /> - </fileset> - - <!-- Files to include in the lwjgl_devil.jar file --> - <fileset id="lwjgl_devil.fileset" dir="${lwjgl.bin}"> - <exclude name="**.*"/> - <include name="org/lwjgl/devil/**"/> - </fileset> - <!-- Files to include in the lwjgl_applet.jar file --> <fileset id="lwjgl_applet.fileset" dir="${lwjgl.bin}"> <exclude name="**.*"/> @@ -108,15 +94,6 @@ <include name="jinput-raw.dll" /> </patternset> - <!-- Files to include in win32 optional package --> - <patternset id="lwjgl-win32_optional.fileset"> - <include name="lwjgl-fmod3.dll" /> - <include name="lwjgl-devil.dll" /> - <include name="DevIL.dll" /> - <include name="ILU.dll" /> - <include name="ILUT.dll" /> - </patternset> - <!-- Files to include in linux, glibc2.3 package --> <patternset id="lwjgl-linux.fileset"> <include name="liblwjgl*.so" /> @@ -124,15 +101,6 @@ <include name="libjinput-linux.so" /> </patternset> - <!-- Files to include in linux optional, glibc2.3 package --> - <patternset id="lwjgl-linux_optional.fileset"> - <include name="liblwjgl-fmod3.so" /> - <include name="liblwjgl-devil.so" /> - <include name="libIL.so" /> - <include name="libILU.so" /> - <include name="libILUT.so" /> - </patternset> - <!-- Files to include in mac os x package --> <patternset id="lwjgl-macosx.fileset"> <include name="liblwjgl.jnilib" /> @@ -141,15 +109,6 @@ <include name="libjinput-osx-legacy.jnilib" /> </patternset> - <!-- Files to include in mac os x optional package --> - <patternset id="lwjgl-macosx_optional.fileset"> - <include name="liblwjgl-fmod3.jnilib" /> - <include name="liblwjgl-devil.jnilib" /> - <include name="libIL.dylib" /> - <include name="libILU.dylib" /> - <include name="libILUT.dylib" /> - </patternset> - <!-- Files to include in source distribution --> <fileset id="lwjgl.source.fileset" dir="."> <include name="build.xml" /> @@ -160,40 +119,18 @@ <!-- files in the base package --> <patternset id="lwjgl_base"> <include name="**" /> - <exclude name="jar/lwjgl_fmod3.jar" /> - <exclude name="jar/lwjgl_devil.jar" /> - <exclude name="native/win32/lwjgl-*.dll" /> - <exclude name="native/win32/DevIL.dll" /> - <exclude name="native/win32/ILU.dll" /> - <exclude name="native/win32/ILUT.dll" /> - <exclude name="native/linux/libIL*.so" /> - <exclude name="native/linux/liblwjgl-*.so" /> - <exclude name="native/macosx/libIL*.dylib" /> - <exclude name="native/macosx/liblwjgl-*.jnilib" /> <exclude name="res/ILtest.*" /> <exclude name="res/Missing_you.mod" /> <exclude name="res/phero*.*" /> - <exclude name="doc/3rdparty/openil_license.txt" /> </patternset> <!-- files in the optional package --> <patternset id="lwjgl_optional"> - <include name="jar/lwjgl_fmod3.jar" /> - <include name="jar/lwjgl_devil.jar" /> - <include name="native/win32/lwjgl-*.dll" /> - <include name="native/win32/DevIL.dll" /> - <include name="native/win32/ILU.dll" /> - <include name="native/win32/ILUT.dll" /> - <include name="native/linux/libIL*.so" /> - <include name="native/linux/liblwjgl-*.so" /> - <include name="native/macosx/libIL*.dylib" /> - <include name="native/macosx/liblwjgl-*.jnilib" /> <include name="res/**" /> <exclude name="res/logo/**" /> <exclude name="res/spaceinvaders/**" /> <exclude name="res/*.wav" /> <exclude name="res/*.xpm" /> - <include name="doc/3rdparty/openil_license.txt" /> <include name="doc/CREDITS" /> <include name="doc/LICENSE" /> <include name="doc/README" /> @@ -211,16 +148,6 @@ <srcfiles dir= "${lwjgl.src.native}/windows" includes="*.c"/> </uptodate> - <uptodate property="lwjgl.fmod.built" targetfile="${lwjgl.lib}/win32/lwjgl-fmod3.dll" > - <srcfiles dir= "${lwjgl.src.native}/common" includes="*.c"/> - <srcfiles dir= "${lwjgl.src.native}/common/fmod3" includes="*.c"/> - </uptodate> - - <uptodate property="lwjgl.devil.built" targetfile="${lwjgl.lib}/win32/lwjgl-devil.dll" > - <srcfiles dir= "${lwjgl.src.native}/common" includes="*.c"/> - <srcfiles dir= "${lwjgl.src.native}/common/devil" includes="*.c"/> - </uptodate> - <!-- ================================================================== --> <!-- Everything below this line is targets. --> <!-- Do not modify, unless you know what you're doing --> @@ -232,8 +159,6 @@ <target name="-initialize"> <mkdir dir="${lwjgl.bin}" taskname="initialiazing bin folder" /> <mkdir dir="${lwjgl.bin}/lwjgl" taskname="initialiazing bin folder" /> - <mkdir dir="${lwjgl.bin}/devil" taskname="initialiazing bin folder" /> - <mkdir dir="${lwjgl.bin}/fmod3" taskname="initialiazing bin folder" /> <mkdir dir="${lwjgl.lib}" taskname="initialiazing lib folder" /> <mkdir dir="${lwjgl.dist}" taskname="initialiazing dist folder" /> <mkdir dir="${lwjgl.docs}/javadoc" taskname="initialiazing docs folder" /> @@ -310,6 +235,7 @@ <!-- Create ONLY the jar archives --> <target name="jars" description="Creates the Java archives ONLY and places them in libs/" depends="-initialize, generate-all, compile, -createjars"> + <!-- <target name="jars" description="Creates the Java archives ONLY and places them in libs/" depends="-initialize, compile, -createjars">--> <!--<target name="jars" description="Creates the Java archives ONLY and places them in libs/" depends="-initialize, compile, -createjars">--> <move todir="libs/"> <fileset dir="${lwjgl.temp}/jar"> @@ -346,22 +272,6 @@ <jar destfile="${lwjgl.temp}/jar/lwjgl_util.jar" taskname="lwjgl_util.jar"> <fileset refid="lwjgl_util.fileset" /> </jar> - - <!-- Create lwjgl_fmod.jar --> - <jar destfile="${lwjgl.temp}/jar/lwjgl_fmod3.jar" taskname="lwjgl_fmod3.jar"> - <fileset refid="lwjgl_fmod3.fileset" /> - <manifest> - <attribute name="Sealed" value="true"/> - </manifest> - </jar> - - <!-- Create lwjgl_devil.jar --> - <jar destfile="${lwjgl.temp}/jar/lwjgl_devil.jar" taskname="lwjgl_devil.jar"> - <fileset refid="lwjgl_devil.fileset" /> - <manifest> - <attribute name="Sealed" value="false"/> - </manifest> - </jar> </target> <target name="applettest" depends="applet"> @@ -420,8 +330,6 @@ <jar destfile="applet/windows_natives.jar" taskname="windows_natives.jar"> <fileset dir="${lwjgl.lib}/win32"> <patternset refid="lwjgl-win32.fileset"/> - <patternset refid="lwjgl-win32_optional.fileset"/> - <include name="fmod.dll"/> </fileset> </jar> <signjar jar="applet/windows_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> @@ -429,8 +337,6 @@ <jar destfile="applet/linux_natives.jar" taskname="linux_natives.jar"> <fileset dir="${lwjgl.lib}/linux"> <patternset refid="lwjgl-linux.fileset"/> - <patternset refid="lwjgl-linux_optional.fileset"/> - <include name="libfmod.so"/> </fileset> </jar> <signjar jar="applet/linux_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> @@ -438,8 +344,6 @@ <jar destfile="applet/macosx_natives.jar" taskname="macosx_natives.jar"> <fileset dir="${lwjgl.lib}/macosx"> <patternset refid="lwjgl-macosx.fileset"/> - <patternset refid="lwjgl-macosx_optional.fileset"/> - <include name="libfmod.dylib"/> </fileset> </jar> <signjar jar="applet/macosx_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> @@ -460,8 +364,6 @@ <copy file="${lwjgl.lib}/lwjgl.jar" todir="applet"/> <copy file="${lwjgl.lib}/lwjgl_util_applet.jar" todir="applet"/> <copy file="${lwjgl.lib}/lwjgl_util.jar" todir="applet"/> - <copy file="${lwjgl.lib}/lwjgl_fmod3.jar" todir="applet"/> - <copy file="${lwjgl.lib}/lwjgl_devil.jar" todir="applet"/> <copy file="${lwjgl.lib}/jinput.jar" todir="applet"/> <zip destfile="applet/res.jar"> <zipfileset dir="${lwjgl.res}" includes="Footsteps.wav, ILtest.tga, Missing_you.mod"/> @@ -469,8 +371,6 @@ <signjar jar="applet/lwjgl.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> <signjar jar="applet/jinput.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> <signjar jar="applet/lwjgl_util_applet.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> - <signjar jar="applet/lwjgl_fmod3.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> - <signjar jar="applet/lwjgl_devil.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> </target> <!-- Distributes files --> @@ -483,19 +383,16 @@ <copy todir="${lwjgl.temp}/native/win32"> <fileset dir="${lwjgl.lib}/win32"> <patternset refid="lwjgl-win32.fileset" /> - <patternset refid="lwjgl-win32_optional.fileset" /> </fileset> </copy> <copy todir="${lwjgl.temp}/native/linux"> <fileset dir="${lwjgl.lib}/linux"> <patternset refid="lwjgl-linux.fileset" /> - <patternset refid="lwjgl-linux_optional.fileset" /> </fileset> </copy> <copy todir="${lwjgl.temp}/native/macosx"> <fileset dir="${lwjgl.lib}/macosx"> <patternset refid="lwjgl-macosx.fileset" /> - <patternset refid="lwjgl-macosx_optional.fileset" /> </fileset> </copy> @@ -506,13 +403,6 @@ </zipfileset> </zip> - <!-- create optional package --> - <zip destfile="${lwjgl.dist}/lwjgl_optional-${lwjgl.version}.zip"> - <zipfileset dir="${lwjgl.temp}" prefix="lwjgl_optional-${lwjgl.version}/"> - <patternset refid="lwjgl_optional"/> - </zipfileset> - </zip> - <!-- create applet package --> <zip destfile="${lwjgl.dist}/lwjgl_applet-${lwjgl.version}.zip"> <zipfileset dir="." prefix="lwjgl_applet-${lwjgl.version}/"> @@ -547,8 +437,6 @@ </javac> <javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/test/**" source="1.4" target="1.4" taskname="test" /> <javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/examples/**" source="1.4" target="1.4" taskname="examples" /> - <javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/fmod3/**" source="1.4" target="1.4" taskname="fmod" /> - <javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/devil/**" source="1.4" target="1.4" taskname="devil"/> </target> <!-- Generates the native headers from source files --> @@ -608,18 +496,6 @@ <class name="org.lwjgl.opengl.GLContext" /> <class name="org.lwjgl.opengl.Pbuffer" /> </javah> - - <!-- fmod --> - <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.headers}/fmod3" force="yes"> - <class name="org.lwjgl.fmod3.FMOD" /> - <class name="org.lwjgl.fmod3.FMusic" /> - <class name="org.lwjgl.fmod3.FSound" /> - </javah> - - <!-- DevIL --> - <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.headers}/devil" force="yes"> - <class name="org.lwjgl.devil.ILNative" /> - </javah> </target> <!-- Creates the Javadoc --> @@ -670,7 +546,7 @@ <arg path="${lwjgl.src}/generated"/> <arg value="-d"/> <arg path="${lwjgl.src.native}/generated"/> - <!--<arg value="-Ageneratechecks"/>--> + <arg value="-Ageneratechecks"/> <arg value="-Acontextspecific"/> <arg value="-Atypemap=org.lwjgl.util.generator.GLTypeMap"/> <fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/> @@ -706,7 +582,7 @@ </apply> </target> - <target name="compile_native_all" depends="compile_native, compile_native_optional" description="Compiles the native files"/> + <target name="compile_native_all" depends="compile_native" description="Compiles the native files"/> <!-- Compiles the native files --> <target name="compile_native" depends="headers" description="Compiles the native files"> @@ -727,37 +603,12 @@ <antcall target="-compile_native_macosx" /> </target> - <target name="compile_native_optional" depends="headers" description="Compiles the native files"> - <!-- check each platform, and run their build target --> - <condition property="lwjgl.platform.windows"> - <os family="windows" /> - </condition> - <antcall target="-compile_native_win32_optional" /> - - <condition property="lwjgl.platform.linux"> - <os name="Linux" /> - </condition> - <antcall target="-compile_native_linux_optional" /> - <condition property="lwjgl.platform.macosx"> - <os name="Mac OS X" /> - </condition> - <antcall target="-compile_native_macosx_optional" /> - </target> - <!-- Compiles LWJGL on Win32 platforms --> <target name="-compile_native_win32" if="lwjgl.platform.windows"> <ant antfile="platform_build/windows_ant/build.xml" inheritAll="false"/> <copy file="${lwjgl.bin}/lwjgl/lwjgl.dll" todir="${lwjgl.lib}/win32"/> </target> - <target name="-compile_native_win32_optional" if="lwjgl.platform.windows"> - <ant antfile="platform_build/windows_ant/build_fmod3.xml" inheritAll="false"/> - <copy file="${lwjgl.bin}/fmod3/lwjgl-fmod3.dll" todir="${lwjgl.lib}/win32"/> - - <ant antfile="platform_build/windows_ant/build_devil.xml" inheritAll="false"/> - <copy file="${lwjgl.bin}/devil/lwjgl-devil.dll" todir="${lwjgl.lib}/win32"/> - </target> - <!-- Compiles LWJGL on Linux platforms --> <target name="-compile_native_linux" if="lwjgl.platform.linux"> <ant antfile="platform_build/linux_ant/build.xml" inheritAll="false"/> @@ -766,32 +617,11 @@ </copy> </target> - <target name="-compile_native_linux_optional" if="lwjgl.platform.linux"> - <ant antfile="platform_build/linux_ant/build_fmod3.xml" inheritAll="false"/> - <copy file="${lwjgl.bin}/fmod3/liblwjgl-fmod3.so" todir="${lwjgl.lib}/linux"/> - - <ant antfile="platform_build/linux_ant/build_devil.xml" inheritAll="false"/> - <copy file="${lwjgl.bin}/devil/liblwjgl-devil.so" todir="${lwjgl.lib}/linux"/> - </target> - <target name="-compile_native_macosx" if="lwjgl.platform.macosx"> <ant antfile="platform_build/macosx_ant/build.xml" inheritAll="false"/> <copy file="${lwjgl.bin}/lwjgl/liblwjgl.jnilib" todir="${lwjgl.lib}/macosx"/> </target> - <!-- Compiles LWJGL on Mac OS X platforms --> - <target name="-compile_native_macosx_optional" if="lwjgl.platform.macosx"> - - <!-- check for required properties --> - <property environment="env"/> - <fail message="Missing FMOD path environment property" unless="env.FMOD"/> - <ant antfile="platform_build/macosx_ant/build_fmod3.xml" inheritAll="false"/> - <ant antfile="platform_build/macosx_ant/build_devil.xml" inheritAll="false"/> - <copy file="${lwjgl.bin}/fmod3/liblwjgl-fmod3.jnilib" todir="${lwjgl.lib}/macosx"/> - <copy file="${lwjgl.bin}/devil/liblwjgl-devil.jnilib" todir="${lwjgl.lib}/macosx"/> - </target> - - <target name="webstart_demo" depends="jars"> <antcall target="-webstart_demo"> <param name="keystore" value="applet/lwjglkeystore"/> @@ -818,22 +648,14 @@ <!-- unzip common files --> <unzip src="${lwjgl.dist}/lwjgl-${lwjgl.version}.zip" dest="${lwjgl.temp}/jnlp/temp" overwrite="true"/> - <unzip src="${lwjgl.dist}/lwjgl_optional-${lwjgl.version}.zip" dest="${lwjgl.temp}/jnlp/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> - <fileset dir="${lwjgl.temp}/jnlp/temp/lwjgl_optional-${lwjgl.version}/"> - <include name="**"/> - </fileset> </move> - <!-- copy fmod dependent files --> - <copy file="${lwjgl.lib}/win32/fmod.dll" tofile="${lwjgl.temp}/jnlp/temp/native/win32/fmod.dll"/> - <copy file="${lwjgl.lib}/linux/libfmod.so" tofile="${lwjgl.temp}/jnlp/temp/native/linux/libfmod.so"/> - <!-- move relevant files to root --> <move todir="${lwjgl.temp}/jnlp/" flatten="true"> <fileset dir="${lwjgl.temp}/jnlp/temp"> @@ -851,8 +673,6 @@ <!-- sign 'em --> <signjar jar="${lwjgl.temp}/jnlp/lwjgl.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> - <signjar jar="${lwjgl.temp}/jnlp/lwjgl_devil.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> - <signjar jar="${lwjgl.temp}/jnlp/lwjgl_fmod3.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/native_linux.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> <signjar jar="${lwjgl.temp}/jnlp/native_macosx.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> Deleted: trunk/LWJGL/doc/3rdparty/openil_license.txt =================================================================== --- trunk/LWJGL/doc/3rdparty/openil_license.txt 2008-01-21 21:27:03 UTC (rev 2940) +++ trunk/LWJGL/doc/3rdparty/openil_license.txt 2008-01-21 21:38:29 UTC (rev 2941) @@ -1,506 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - <one line to give the library's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - <signature of Ty Coon>, 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - - - Deleted: trunk/LWJGL/platform_build/linux_ant/build_devil.xml =================================================================== --- trunk/LWJGL/platform_build/linux_ant/build_devil.xml 2008-01-21 21:27:03 UTC (rev 2940) +++ trunk/LWJGL/platform_build/linux_ant/build_devil.xml 2008-01-21 21:38:29 UTC (rev 2941) @@ -1,51 +0,0 @@ -<?xml version="1.0"?> - -<project name="devil" basedir="../../bin/devil" default="compile"> - <property name="native" location="../../src/native"/> - <property name="libname32" value="liblwjgl-devil.so"/> - <property name="libname64" value="liblwjgl64-devil.so"/> - <property name="libs32" value="-lpthread"/> - <property name="libs64" value="-lpthread"/> - <property name="cflags" value="-O2 -Wall -c -fPIC -std=c99 -pthread"/> - - <target name="clean"> - <delete> - <fileset dir="." includes="*.o"/> - <fileset dir="." includes="*.so"/> - </delete> - </target> - - <target name="compile"> - <exec executable="uname" outputproperty="hwplatform"> - <arg value="-m"/> - </exec> - <condition property="libs" value="${libs64}" else="${libs32}"> - <equals arg1="${hwplatform}" arg2="x86_64"/> - </condition> - <condition property="libname" value="${libname64}" else="${libname32}"> - <equals arg1="${hwplatform}" arg2="x86_64"/> - </condition> - <property name="linker_flags" value="-Wl,--version-script=${native}/linux/lwjgl.map -shared -O2 -Wall -o ${libname} ${libs}"/> - <apply dir="." executable="cc" dest="." skipemptyfilesets="true" failonerror="true"> - <arg line="${cflags}"/> - <arg value="-I${java.home}/../include"/> - <arg value="-I${java.home}/../include/linux"/> - <arg value="-I${java.home}/include"/> - <arg value="-I${java.home}/include/linux"/> - <arg value="-I${native}/common"/> - <arg value="-I${native}/common/devil"/> - <mapper type="glob" from="*.c" to="*.o"/> - <fileset dir="${native}/common" includes="*common*.c"/> - <fileset dir="${native}/common/devil" includes="*.c"/> - </apply> - <apply dir="." parallel="true" executable="cc" failonerror="true"> - <srcfile/> - <arg line="${linker_flags}"/> - <fileset dir="." includes="*.o"/> - </apply> - <apply dir="." parallel="true" executable="strip" failonerror="true"> - <fileset file="${libname}"/> - </apply> - </target> -</project> - Deleted: trunk/LWJGL/platform_build/linux_ant/build_fmod3.xml =================================================================== --- trunk/LWJGL/platform_build/linux_ant/build_fmod3.xml 2008-01-21 21:27:03 UTC (rev 2940) +++ trunk/LWJGL/platform_build/linux_ant/build_fmod3.xml 2008-01-21 21:38:29 UTC (rev 2941) @@ -1,56 +0,0 @@ -<?xml version="1.0"?> - -<project name="fmod3" basedir="../../bin/fmod3" default="compile"> - <property name="native" location="../../src/native"/> - <property environment="env"/> - <property name="fmod.home" location="${env.FMOD}"/> - <property name="libname32" value="liblwjgl-fmod3.so"/> - <property name="libname64" value="liblwjgl64-fmod3.so"/> - <property name="libs32" value="-lpthread"/> - <property name="libs64" value="-lpthread"/> - <property name="cflags" value="-O2 -Wall -c -fPIC -std=c99 -pthread"/> - - <fail message="Missing FMOD path environment property" unless="env.FMOD"/> - - <target name="clean"> - <delete> - <fileset dir="." includes="*.o"/> - <fileset dir="." includes="*.so"/> - </delete> - </target> - - <target name="compile"> - <exec executable="uname" outputproperty="hwplatform"> - <arg value="-m"/> - </exec> - <condition property="libs" value="${libs64}" else="${libs32}"> - <equals arg1="${hwplatform}" arg2="x86_64"/> - </condition> - <condition property="libname" value="${libname64}" else="${libname32}"> - <equals arg1="${hwplatform}" arg2="x86_64"/> - </condition> - <property name="linker_flags" value="-Wl,--version-script=${native}/linux/lwjgl.map -shared -O2 -Wall -o ${libname} ${libs}"/> - <apply dir="." executable="cc" dest="." skipemptyfilesets="true" failonerror="true"> - <arg line="${cflags}"/> - <arg value="-I${java.home}/../include"/> - <arg value="-I${java.home}/../include/linux"/> - <arg value="-I${java.home}/include"/> - <arg value="-I${java.home}/include/linux"/> - <arg value="-I${fmod.home}/api/inc"/> - <arg value="-I${native}/common"/> - <arg value="-I${native}/common/fmod3"/> - <mapper type="glob" from="*.c" to="*.o"/> - <fileset dir="${native}/common" includes="*common*.c"/> - <fileset dir="${native}/common/fmod3" includes="*.c"/> - </apply> - <apply dir="." parallel="true" executable="cc" failonerror="true"> - <srcfile/> - <arg line="${linker_flags}"/> - <fileset dir="." includes="*.o"/> - </apply> - <apply dir="." parallel="true" executable="strip" failonerror="true"> - <fileset file="${libname}"/> - </apply> - </target> -</project> - Deleted: trunk/LWJGL/platform_build/macosx_ant/build_devil.xml =================================================================== --- trunk/LWJGL/platform_build/macosx_ant/build_devil.xml 2008-01-21 21:27:03 UTC (rev 2940) +++ trunk/LWJGL/platform_build/macosx_ant/build_devil.xml 2008-01-21 21:38:29 UTC (rev 2941) @@ -1,81 +0,0 @@ -<?xml version="1.0" ?> -<project name="OS X Native code" basedir="../../bin/devil" default="nativelibrary"> - <property name="native" location="../../src/native"/> - - <target name="init"> - <mkdir dir="ppc"/> - <mkdir dir="intel"/> - </target> - - <target name="clean"> - <delete failonerror="false"> - <fileset dir="intel"/> - <fileset dir="ppc"/> - <fileset dir="." includes="liblwjgl-devil.jnilib"/> - <fileset dir="." includes="devil.symbols"/> - </delete> - </target> - - <target name="compile"> - <apply dir="${dstdir}" executable="${compiler}" os="Mac OS X" skipemptyfilesets="true" failonerror="true" dest="${dstdir}"> - <arg line="${cflags} -O2 -Wall -c -fPIC -I${sdkroot}/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers -I${native}/common"/> - <!-- Map from *.m and *.c to .o --> - <mapper type="regexp" from="^(.*)\.(c)" to="\1.o"/> - <fileset dir="${native}/common" includes="common_tools.c"/> - <fileset dir="${native}/common/devil" includes="*.c"/> - </apply> - </target> - - <target name="link"> - <apply dir="${objdir}" parallel="true" executable="${linker}" os="Mac OS X" failonerror="true" skipemptyfilesets="true"> - <arg line="${linkerflags} -exported_symbols_list ../devil.symbols -dynamiclib -o ${libname} -framework Foundation -framework AppKit -framework JavaVM -framework Carbon"/> - <fileset dir="${objdir}" includes="*.o"/> - </apply> - <apply dir="${objdir}" executable="strip" os="Mac OS X" failonerror="true"> - <arg line="-S -X"/> - <fileset dir="." file="${libname}"/> - </apply> - </target> - - <target name="nativelibrary" depends="init"> - <property name="universal_sdkroot" location="/Developer/SDKs/MacOSX10.4u.sdk"/> - <property name="legacy_sdkroot" location="/Developer/SDKs/MacOSX10.3.9.sdk"/> - <property name="universal_flags" value="-isysroot ${universal_sdkroot} -arch i386"/> - <property name="legacy_flags" value="-arch ppc"/> - <antcall target="compile"> - <param name="dstdir" location="intel"/> - <param name="compiler" value="gcc-4.0"/> - <param name="sdkroot" location="${universal_sdkroot}"/> - <param name="cflags" value="${universal_flags}"/> - </antcall> - <antcall target="compile"> - <param name="dstdir" location="ppc"/> - <param name="compiler" value="gcc-3.3"/> - <param name="sdkroot" location="${legacy_sdkroot}"/> - <param name="cflags" value="${legacy_flags}"/> - </antcall> - <exec vmlauncher="false" executable="../../platform_build/macosx_ant/build-symbol-list" output="devil.symbols" failonerror="true"> - <arg path="intel"/> - </exec> - <antcall target="link"> - <param name="objdir" location="intel"/> - <param name="libname" value="liblwjgl-devil-intel.jnilib"/> - <param name="linker" value="gcc-4.0"/> - <param name="linkerflags" value="${universal_flags}"/> - </antcall> - <antcall target="link"> - <param name="objdir" location="ppc"/> - <param name="libname" value="liblwjgl-devil-ppc.jnilib"/> - <param name="linker" value="gcc-3.3"/> - <param name="linkerflags" value="${legacy_flags}"/> - </antcall> - <apply dir="." parallel="true" executable="lipo" os="Mac OS X" failonerror="true" skipemptyfilesets="true" > - <arg value="-create"/> - <srcfile/> - <arg value="-output"/> - <arg path="liblwjgl-devil.jnilib"/> - <fileset file="ppc/liblwjgl-devil-ppc.jnilib"/> - <fileset file="intel/liblwjgl-devil-intel.jnilib"/> - </apply> - </target> -</project> Deleted: trunk/LWJGL/platform_build/macosx_ant/build_fmod3.xml =================================================================== --- trunk/LWJGL/platform_build/macosx_ant/build_fmod3.xml 2008-01-21 21:27:03 UTC (rev 2940) +++ trunk/LWJGL/platform_build/macosx_ant/build_fmod3.xml 2008-01-21 21:38:29 UTC (rev 2941) @@ -1,86 +0,0 @@ -<?xml version="1.0" ?> -<project name="OS X Native code" basedir="../../bin/fmod3" default="nativelibrary"> - <property environment="env"/> - <property name="native" location="../../src/native"/> - <property name="fmod.home" location="${env.FMOD}"/> - - - <target name="init"> - <mkdir dir="ppc"/> - <mkdir dir="intel"/> - </target> - - <target name="clean"> - <delete failonerror="false"> - <fileset dir="intel"/> - <fileset dir="ppc"/> - <fileset dir="." includes="liblwjgl-fmod3.jnilib"/> - <fileset dir="." includes="fmod3.symbols"/> - </delete> - </target> - - <target name="compile"> - <apply dir="${dstdir}" executable="${compiler}" os="Mac OS X" skipemptyfilesets="true" failonerror="true" dest="${dstdir}"> - <arg line="${cflags} -O2 -Wall -c -fno-common -fPIC -I${sdkroot}/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers -I${native}/common -I${fmod.home}/api/inc"/> - <!-- Map from *.m and *.c to .o --> - <mapper type="regexp" from="^(.*)\.(c)" to="\1.o"/> - <fileset dir="${native}/common" includes="common_tools.c"/> - <fileset dir="${native}/common/fmod3" includes="*.c"/> - </apply> - </target> - - <target name="link"> - <apply dir="${objdir}" parallel="true" executable="${linker}" os="Mac OS X" failonerror="true" skipemptyfilesets="true"> - <arg line="${linkerflags} -single_module -exported_symbols_list ../fmod3.symbols -dynamiclib -o ${libname} -framework Foundation -framework AppKit -framework JavaVM -framework Carbon ${staticlibs}"/> - <fileset dir="${objdir}" includes="*.o"/> - </apply> - <apply dir="${objdir}" executable="strip" os="Mac OS X" failonerror="true"> - <arg line="-S -X"/> - <fileset dir="." file="${libname}"/> - </apply> - </target> - - <target name="nativelibrary" depends="init"> - <property name="universal_sdkroot" location="/Developer/SDKs/MacOSX10.4u.sdk"/> - <property name="legacy_sdkroot" location="/Developer/SDKs/MacOSX10.3.9.sdk"/> - <property name="universal_flags" value="-isysroot ${universal_sdkroot} -arch i386"/> - <property name="legacy_flags" value="-arch ppc"/> - <antcall target="compile"> - <param name="dstdir" location="intel"/> - <param name="compiler" value="gcc-4.0"/> - <param name="sdkroot" location="${universal_sdkroot}"/> - <param name="cflags" value="${universal_flags}"/> - </antcall> - <antcall target="compile"> - <param name="dstdir" location="ppc"/> - <param name="compiler" value="gcc-3.3"/> - <param name="sdkroot" location="${legacy_sdkroot}"/> - <param name="cflags" value="${legacy_flags}"/> - </antcall> - <exec vmlauncher="false" executable="../../platform_build/macosx_ant/build-symbol-list" output="fmod3.symbols" failonerror="true"> - <arg path="intel"/> - </exec> - <antcall target="link"> - <param name="objdir" location="intel"/> - <param name="libname" value="liblwjgl-fmod3-intel.jnilib"/> - <param name="linker" value="gcc-4.0"/> - <param name="linkerflags" value="${universal_flags}"/> - <param name="staticlibs" value="${fmod.home}/api/lib/libfmodx86.a"/> - </antcall> - <antcall target="link"> - <param name="objdir" location="ppc"/> - <param name="libname" value="liblwjgl-fmod3-ppc.jnilib"/> - <param name="linker" value="gcc-3.3"/> - <param name="linkerflags" value="${legacy_flags}"/> - <param name="staticlibs" value="${fmod.home}/api/lib/libfmod.a"/> - </antcall> - <apply dir="." parallel="true" executable="lipo" os="Mac OS X" failonerror="true" skipemptyfilesets="true" > - <arg value="-create"/> - <srcfile/> - <arg value="-output"/> - <arg path="liblwjgl-fmod3.jnilib"/> - <fileset file="ppc/liblwjgl-fmod3-ppc.jnilib"/> - <fileset file="intel/liblwjgl-fmod3-intel.jnilib"/> - </apply> - </target> -</project> Deleted: trunk/LWJGL/platform_build/windows_ant/build_devil.xml =================================================================== --- trunk/LWJGL/platform_build/windows_ant/build_devil.xml 2008-01-21 21:27:03 UTC (rev 2940) +++ trunk/LWJGL/platform_build/windows_ant/build_devil.xml 2008-01-21 21:38:29 UTC (rev 2941) @@ -1,52 +0,0 @@ -<?xml version="1.0"?> - -<project name="devil" basedir="../../bin/devil" default="compile"> - <property name="native" location="../../src/native"/> - <property environment="env"/> - <property name="sdkhome" location="${env.MSSDK}"/> - <property name="fmodhome" location="${env.FMODHOME}"/> - <property name="dllname" value="lwjgl-devil.dll"/> - - <target name="compile_dir"> - <apply dir="." failonerror="true" executable="cl" dest="." skipemptyfilesets="true"> - <arg line="/Ox /Wp64 /W2 /nologo /Ox /Ob2 /Oi /Ot /Oy /FD /EHsc /MT /Gy /W2 /nologo /c /D WIN32 /c"/> - <arg value="/I${sdkhome}\include"/> - <arg value="/I${java.home}\..\include"/> - <arg value="/I${java.home}\..\include\win32"/> - <arg value="/I${native}\common"/> - <srcfile/> - <fileset dir="${native}/common/devil" includes="*.c"/> - <fileset dir="${native}/common" includes="*common*.c"/> - <mapper type="glob" from="*.c" to="*.obj"/> - </apply> - </target> - - <target name="link"> - <apply dir="." parallel="true" executable="cl" failonerror="true"> - <arg line="/LD /nologo"/> - <srcfile/> - <arg line="/Fe${dllname} /link"/> - <arg value="/LIBPATH:${java.home}\..\lib"/> - <arg value="/LIBPATH:${sdkhome}\lib"/> - <arg value="/OPT:REF"/> - <arg value="/OPT:ICF"/> - <fileset dir="." includes="*.obj"/> - </apply> - </target> - - <target name="clean"> - <delete> - <fileset dir="." includes="*.obj"/> - <fileset dir="." includes="*.dll"/> - <fileset dir="." includes="*.exp"/> - <fileset dir="." includes="*.lib"/> - </delete> - </target> - - <target name="compile" depends="clean"> - <property name="libs" value="user32.lib Gdi32.lib Advapi32.lib"/> - <antcall target="compile_dir"/> - <antcall target="link"/> - </target> -</project> - Deleted: trunk/LWJGL/platform_build/windows_ant/build_fmod3.xml =================================================================== --- trunk/LWJGL/platform_build/windows_ant/build_fmod3.xml 2008-01-21 21:27:03 UTC (rev 2940) +++... [truncated message content] |
From: <ma...@us...> - 2008-01-21 22:56:39
|
Revision: 2958 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=2958&view=rev Author: matzon Date: 2008-01-21 14:56:37 -0800 (Mon, 21 Jan 2008) Log Message: ----------- 2.0a version string Modified Paths: -------------- trunk/LWJGL/build.xml trunk/LWJGL/src/java/org/lwjgl/Sys.java Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2008-01-21 22:47:32 UTC (rev 2957) +++ trunk/LWJGL/build.xml 2008-01-21 22:56:37 UTC (rev 2958) @@ -13,7 +13,7 @@ <property name="lwjgl.docs" location="doc" /> <property name="lwjgl.temp" location="temp" /> <property name="lwjgl.res" location="res" /> - <property name="lwjgl.version" value="2.0" /> + <property name="lwjgl.version" value="2.0a" /> <property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java"/> <!-- ================================================================== --> Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2008-01-21 22:47:32 UTC (rev 2957) +++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2008-01-21 22:56:37 UTC (rev 2958) @@ -54,7 +54,7 @@ private static final String JNI_LIBRARY_NAME = "lwjgl"; /** Current version of library */ - private static final String VERSION = "2.0"; + private static final String VERSION = "2.0a"; /** Current version of the JNI library */ static final int JNI_VERSION = 12; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2008-01-31 19:22:41
|
Revision: 2961 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=2961&view=rev Author: matzon Date: 2008-01-31 11:22:32 -0800 (Thu, 31 Jan 2008) Log Message: ----------- second 2.0 alpha Modified Paths: -------------- trunk/LWJGL/build.xml trunk/LWJGL/src/java/org/lwjgl/Sys.java Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2008-01-28 08:48:25 UTC (rev 2960) +++ trunk/LWJGL/build.xml 2008-01-31 19:22:32 UTC (rev 2961) @@ -13,7 +13,7 @@ <property name="lwjgl.docs" location="doc" /> <property name="lwjgl.temp" location="temp" /> <property name="lwjgl.res" location="res" /> - <property name="lwjgl.version" value="2.0a" /> + <property name="lwjgl.version" value="2.0a2" /> <property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java"/> <!-- ================================================================== --> Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2008-01-28 08:48:25 UTC (rev 2960) +++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2008-01-31 19:22:32 UTC (rev 2961) @@ -54,7 +54,7 @@ private static final String JNI_LIBRARY_NAME = "lwjgl"; /** Current version of library */ - private static final String VERSION = "2.0a"; + private static final String VERSION = "2.0a2"; /** Current version of the JNI library */ static final int JNI_VERSION = 12; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2008-04-07 19:47:43
|
Revision: 2990 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=2990&view=rev Author: matzon Date: 2008-04-07 12:47:40 -0700 (Mon, 07 Apr 2008) Log Message: ----------- 2.0a3 version string Modified Paths: -------------- trunk/LWJGL/build.xml trunk/LWJGL/src/java/org/lwjgl/Sys.java Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2008-04-07 19:40:53 UTC (rev 2989) +++ trunk/LWJGL/build.xml 2008-04-07 19:47:40 UTC (rev 2990) @@ -13,7 +13,7 @@ <property name="lwjgl.docs" location="doc" /> <property name="lwjgl.temp" location="temp" /> <property name="lwjgl.res" location="res" /> - <property name="lwjgl.version" value="2.0a2" /> + <property name="lwjgl.version" value="2.0a3" /> <property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java"/> <!-- ================================================================== --> @@ -347,16 +347,7 @@ </fileset> </jar> <signjar jar="applet/macosx_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> - - <!-- add it to a natives jar --> - <jar destfile="applet/natives.jar" taskname="natives.jar"> - <fileset dir="applet"> - <include name="windows_natives.jar"/> - <include name="linux_natives.jar"/> - <include name="macosx_natives.jar"/> - </fileset> - </jar> - + <jar destfile="${lwjgl.lib}/lwjgl_util_applet.jar" update="true"> <fileset dir="${lwjgl.res}" includes="applet*"/> </jar> Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2008-04-07 19:40:53 UTC (rev 2989) +++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2008-04-07 19:47:40 UTC (rev 2990) @@ -54,7 +54,7 @@ private static final String JNI_LIBRARY_NAME = "lwjgl"; /** Current version of library */ - private static final String VERSION = "2.0a2"; + private static final String VERSION = "2.0a3"; /** Current version of the JNI library */ static final int JNI_VERSION = 13; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eli...@us...> - 2008-04-10 20:47:39
|
Revision: 3003 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3003&view=rev Author: elias_naur Date: 2008-04-10 13:47:29 -0700 (Thu, 10 Apr 2008) Log Message: ----------- Windows: Removed directinput files, since they are now unused. Fixed headers build.xml target Modified Paths: -------------- trunk/LWJGL/build.xml trunk/LWJGL/platform_build/windows_ant/build.xml trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java Removed Paths: ------------- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInput.java trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInput3.java trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInput8.java trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInputDevice.java trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInputDevice3.java trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInputDevice8.java trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInputDeviceObjectCallback.java trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInputMouse.java trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsDirectInput3.c trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsDirectInput8.c trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsDirectInputDevice3.c trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsDirectInputDevice8.c Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2008-04-10 20:25:54 UTC (rev 3002) +++ trunk/LWJGL/build.xml 2008-04-10 20:47:29 UTC (rev 3003) @@ -435,7 +435,6 @@ <target name="headers" description="invokes javah on java classes" depends="compile"> <!-- platform specific classes --> <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/linux" force="yes"> - <class name="org.lwjgl.opengl.LinuxAWTInput" /> <class name="org.lwjgl.opengl.LinuxEvent" /> <class name="org.lwjgl.opengl.LinuxMouse" /> <class name="org.lwjgl.opengl.LinuxKeyboard" /> @@ -450,12 +449,7 @@ <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/windows" force="yes"> <!-- OpenGL --> - <class name="org.lwjgl.opengl.WindowsAWTInput" /> <class name="org.lwjgl.opengl.WindowsKeyboard" /> - <class name="org.lwjgl.opengl.WindowsDirectInput8" /> - <class name="org.lwjgl.opengl.WindowsDirectInputDevice8" /> - <class name="org.lwjgl.opengl.WindowsDirectInput3" /> - <class name="org.lwjgl.opengl.WindowsDirectInputDevice3" /> <class name="org.lwjgl.opengl.WindowsPbufferPeerInfo" /> <class name="org.lwjgl.opengl.WindowsDisplay" /> <class name="org.lwjgl.opengl.WindowsRegistry" /> Modified: trunk/LWJGL/platform_build/windows_ant/build.xml =================================================================== --- trunk/LWJGL/platform_build/windows_ant/build.xml 2008-04-10 20:25:54 UTC (rev 3002) +++ trunk/LWJGL/platform_build/windows_ant/build.xml 2008-04-10 20:47:29 UTC (rev 3003) @@ -4,7 +4,7 @@ <property name="native" location="../../src/native"/> <property environment="env"/> <property name="dxhome" location="${env.DXSDK_DIR}"/> - <property name="sdkhome" location="${env.MSSdk}"/> + <property name="sdkhome" location="${env.MSSDK}"/> <property name="program_files" location="${env.ProgramFiles}"/> <property name="alhome" location="${program_files}\OpenAL 1.1 with EFX SDK"/> <property name="dllname" value="lwjgl.dll"/> @@ -53,6 +53,9 @@ </target> <target name="compile"> + <echo message="${dxhome}"/> + <echo message="${sdkhome}"/> + <echo message="${program_files}"/> <property name="libs" value="Kernel32.lib ole32.lib dinput.lib dxguid.lib OpenGL32.Lib Version.lib user32.lib Gdi32.lib Advapi32.lib jawt.lib delayimp.lib winmm.lib"/> <antcall target="compile_dir"/> <antcall target="link"/> Deleted: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInput.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInput.java 2008-04-10 20:25:54 UTC (rev 3002) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInput.java 2008-04-10 20:47:29 UTC (rev 3003) @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package org.lwjgl.opengl; - -/** - * This is the DirectInput base class - * @author elias_naur - */ - -import org.lwjgl.LWJGLException; - -abstract class WindowsDirectInput { - public final static int KEYBOARD_TYPE = 1; - public final static int MOUSE_TYPE = 2; - - /* DirectInput constants */ - public final static int DI_OK = 0x00000000; - public final static int DI_NOEFFECT = 0x00000001; - public final static int DI_PROPNOEFFECT = 0x00000001; - public final static int DI_POLLEDDEVICE = 0x00000002; - - public final static int DI_DOWNLOADSKIPPED = 0x00000003; - public final static int DI_EFFECTRESTARTED = 0x00000004; - public final static int DI_TRUNCATED = 0x00000008; - public final static int DI_SETTINGSNOTSAVED = 0x0000000B; - public final static int DI_TRUNCATEDANDRESTARTED = 0x0000000C; - - public final static int DI_BUFFEROVERFLOW = 0x00000001; - public final static int DIERR_INPUTLOST = 0x8007001E; - public final static int DIERR_NOTACQUIRED = 0x8007001C; - public final static int DIERR_OTHERAPPHASPRIO = 0x80070005; - - private final long di_interface; - - public WindowsDirectInput(long hinst) throws LWJGLException { - di_interface = createDirectInput(hinst); - } - protected abstract long createDirectInput(long hinst) throws LWJGLException; - - public WindowsDirectInputDevice createDevice(int type) throws LWJGLException { - return createDevice(di_interface, type); - } - protected abstract WindowsDirectInputDevice createDevice(long di_interface, int type) throws LWJGLException; - - public void release() { - release(di_interface); - } - protected abstract void release(long di_interface); -} Deleted: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInput3.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInput3.java 2008-04-10 20:25:54 UTC (rev 3002) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInput3.java 2008-04-10 20:47:29 UTC (rev 3003) @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package org.lwjgl.opengl; - -/** - * This is the DirectInput3 interface - * @author elias_naur - */ - -import org.lwjgl.LWJGLException; - -final class WindowsDirectInput3 extends WindowsDirectInput { - /* Re-define device types to get them included in the native headers */ - public final static int KEYBOARD_TYPE = WindowsDirectInput.KEYBOARD_TYPE; - public final static int MOUSE_TYPE = WindowsDirectInput.MOUSE_TYPE; - - public WindowsDirectInput3(long hinst) throws LWJGLException { - super(hinst); - } - - protected native long createDirectInput(long hinst) throws LWJGLException; - - protected WindowsDirectInputDevice createDevice(long di_interface, int type) throws LWJGLException { - long device = nCreateDevice(di_interface, type); - return new WindowsDirectInputDevice3(device); - } - private static native long nCreateDevice(long di_interface, int type) throws LWJGLException; - - protected native void release(long di_interface); -} Deleted: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInput8.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInput8.java 2008-04-10 20:25:54 UTC (rev 3002) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInput8.java 2008-04-10 20:47:29 UTC (rev 3003) @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package org.lwjgl.opengl; - -/** - * This is the DirectInput8 interface - * @author elias_naur - */ - -import org.lwjgl.LWJGLException; - -final class WindowsDirectInput8 extends WindowsDirectInput { - /* Re-define device types to get them included in the native headers */ - public final static int KEYBOARD_TYPE = WindowsDirectInput.KEYBOARD_TYPE; - public final static int MOUSE_TYPE = WindowsDirectInput.MOUSE_TYPE; - - public WindowsDirectInput8(long hinst) throws LWJGLException { - super(hinst); - } - - protected native long createDirectInput(long hinst) throws LWJGLException; - - protected WindowsDirectInputDevice createDevice(long di_interface, int type) throws LWJGLException { - long device = nCreateDevice(di_interface, type); - return new WindowsDirectInputDevice8(device); - } - private static native long nCreateDevice(long di_interface, int type) throws LWJGLException; - - protected native void release(long di_interface); -} Deleted: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInputDevice.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInputDevice.java 2008-04-10 20:25:54 UTC (rev 3002) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInputDevice.java 2008-04-10 20:47:29 UTC (rev 3003) @@ -1,132 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package org.lwjgl.opengl; - -/** - * This is the DirectInputDevice interface - * @author elias_naur - */ - -import java.nio.ByteBuffer; -import java.nio.IntBuffer; -import org.lwjgl.LWJGLException; -import org.lwjgl.BufferUtils; - -abstract class WindowsDirectInputDevice { - public final static int DISCL_EXCLUSIVE = 0x00000001; - public final static int DISCL_NONEXCLUSIVE = 0x00000002; - public final static int DISCL_FOREGROUND = 0x00000004; - public final static int DISCL_BACKGROUND = 0x00000008; - public final static int DISCL_NOWINKEY = 0x00000010; - - public final static int GUID_XAxis = 1; - public final static int GUID_YAxis = 2; - public final static int GUID_ZAxis = 3; - public final static int GUID_Button = 4; - public final static int GUID_Unknown = 5; - - public final static int DATA_SIZE = 3; - - private final long di_device; - private ByteBuffer event_buffer; - - public WindowsDirectInputDevice(long di_device) { - this.di_device = di_device; - } - - public void release() { - release(di_device); - } - protected abstract void release(long di_device); - - public int poll() { - return poll(di_device); - } - protected abstract int poll(long di_device); - - public void setDataFormat(int type) throws LWJGLException { - int ret = setDataFormat(di_device, type); - if (ret != WindowsDirectInput.DI_OK) - throw new LWJGLException("Failed to set data format (" + Integer.toHexString(ret) + ")"); - } - protected abstract int setDataFormat(long di_device, int type); - - public void setCooperateLevel(long hwnd, int flags) throws LWJGLException { - int ret = setCooperativeLevel(di_device, hwnd, flags); - if (ret != WindowsDirectInput.DI_OK) - throw new LWJGLException("Failed to set cooperative level (" + Integer.toHexString(ret) + ")"); - } - protected abstract int setCooperativeLevel(long di_device, long hwnd, int flags); - - public int acquire() { - return acquire(di_device); - } - protected abstract int acquire(long di_device); - - public void setBufferSize(int buffer_size) throws LWJGLException { - int ret = setBufferSize(di_device, buffer_size); - if (ret != WindowsDirectInput.DI_OK && ret != WindowsDirectInput.DI_PROPNOEFFECT && ret != WindowsDirectInput.DI_POLLEDDEVICE) - throw new LWJGLException("Failed to set buffer size (" + Integer.toHexString(ret) + ")"); - int event_buffer_size = getEventSize()*buffer_size; - event_buffer = BufferUtils.createByteBuffer(event_buffer_size); - } - protected abstract int setBufferSize(long di_device, int buffer_size); - - public int getDeviceData(IntBuffer buffer) { - int events_remaining = buffer.remaining()/DATA_SIZE; - if (event_buffer == null || events_remaining > event_buffer.remaining()/getEventSize()) - event_buffer = BufferUtils.createByteBuffer(events_remaining*getEventSize()); - return getDeviceData(di_device, event_buffer, event_buffer.capacity(), buffer, buffer.position(), buffer.remaining()); - } - protected abstract int getDeviceData(long di_device, ByteBuffer event_buffer, int event_buffer_size, IntBuffer buffer, int position, int size); - - /** - * Device data is returned in tuples of the form <dwOfs, dwData>. - * buffer position() is moved accordingly to number of events. - */ - public int getDeviceState(ByteBuffer buffer) { - return getDeviceState(di_device, buffer, buffer.position(), buffer.remaining()); - } - protected abstract int getDeviceState(long di_device, ByteBuffer buffer, int position, int size); - - public void unacquire() { - unacquire(di_device); - } - protected abstract int unacquire(long di_device); - - public int enumObjects(WindowsDirectInputDeviceObjectCallback enumerator) { - return enumObjects(di_device, enumerator); - } - protected abstract int enumObjects(long di_device, WindowsDirectInputDeviceObjectCallback enumerator); - - protected abstract int getEventSize(); -} Deleted: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInputDevice3.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInputDevice3.java 2008-04-10 20:25:54 UTC (rev 3002) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInputDevice3.java 2008-04-10 20:47:29 UTC (rev 3003) @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package org.lwjgl.opengl; - -/** - * This is the DirectInputDevice3 interface - * @author elias_naur - */ - -import java.nio.ByteBuffer; -import java.nio.IntBuffer; - -final class WindowsDirectInputDevice3 extends WindowsDirectInputDevice { - /** Re-declare to get the constants into the native headers */ - public final static int GUID_XAxis = WindowsDirectInputDevice.GUID_XAxis; - public final static int GUID_YAxis = WindowsDirectInputDevice.GUID_YAxis; - public final static int GUID_ZAxis = WindowsDirectInputDevice.GUID_ZAxis; - public final static int GUID_Button = WindowsDirectInputDevice.GUID_Button; - public final static int GUID_Unknown = WindowsDirectInputDevice.GUID_Unknown; - - public final static int DATA_SIZE = WindowsDirectInputDevice.DATA_SIZE; - - public WindowsDirectInputDevice3(long di_device) { - super(di_device); - } - - protected native int setDataFormat(long di_device, int type); - - protected native int setCooperativeLevel(long di_device, long hwnd, int flags); - - protected native int acquire(long di_device); - - protected native int getDeviceState(long di_device, ByteBuffer buffer, int position, int size); - - protected native int getDeviceData(long di_device, ByteBuffer event_buffer, int event_buffer_size, IntBuffer buffer, int position, int size); - - protected native int unacquire(long di_device); - - protected int poll(long di_device) { - return WindowsDirectInput.DI_OK; - } - - protected native int setBufferSize(long di_device, int buffer_size); - protected native int getEventSize(); - - protected native void release(long di_device); - - protected native int enumObjects(long di_device, WindowsDirectInputDeviceObjectCallback enumerator); -} Deleted: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInputDevice8.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInputDevice8.java 2008-04-10 20:25:54 UTC (rev 3002) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInputDevice8.java 2008-04-10 20:47:29 UTC (rev 3003) @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package org.lwjgl.opengl; - -/** - * This is the DirectInputDevice3 interface - * @author elias_naur - */ - -import java.nio.ByteBuffer; -import java.nio.IntBuffer; - -final class WindowsDirectInputDevice8 extends WindowsDirectInputDevice { - /** Re-declare to get the constants into the native headers */ - public final static int GUID_XAxis = WindowsDirectInputDevice.GUID_XAxis; - public final static int GUID_YAxis = WindowsDirectInputDevice.GUID_YAxis; - public final static int GUID_ZAxis = WindowsDirectInputDevice.GUID_ZAxis; - public final static int GUID_Button = WindowsDirectInputDevice.GUID_Button; - public final static int GUID_Unknown = WindowsDirectInputDevice.GUID_Unknown; - - public final static int DATA_SIZE = WindowsDirectInputDevice.DATA_SIZE; - - public WindowsDirectInputDevice8(long di_device) { - super(di_device); - } - - protected native int setDataFormat(long di_device, int type); - - protected native int setCooperativeLevel(long di_device, long hwnd, int flags); - - protected native int acquire(long di_device); - - protected native int getDeviceState(long di_device, ByteBuffer buffer, int position, int size); - - protected native int getDeviceData(long di_device, ByteBuffer event_buffer, int event_buffer_size, IntBuffer buffer, int position, int size); - - protected native int unacquire(long di_device); - - protected native int poll(long di_device); - - protected native int setBufferSize(long di_device, int buffer_size); - protected native int getEventSize(); - - protected native void release(long di_device); - - protected native int enumObjects(long di_device, WindowsDirectInputDeviceObjectCallback enumerator); -} Deleted: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInputDeviceObjectCallback.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInputDeviceObjectCallback.java 2008-04-10 20:25:54 UTC (rev 3002) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInputDeviceObjectCallback.java 2008-04-10 20:47:29 UTC (rev 3003) @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package org.lwjgl.opengl; - -/** - * This is the DirectInputDevice callback interface - * @author elias_naur - */ - -interface WindowsDirectInputDeviceObjectCallback { - public boolean nextObject(int type, String name); -} Deleted: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInputMouse.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInputMouse.java 2008-04-10 20:25:54 UTC (rev 3002) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInputMouse.java 2008-04-10 20:47:29 UTC (rev 3003) @@ -1,352 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package org.lwjgl.opengl; - -/** - * This is the Windows implementation of the Mouse. - * @author elias_naur - */ - -import java.nio.ByteBuffer; -import java.nio.IntBuffer; - -import org.lwjgl.BufferUtils; -import org.lwjgl.LWJGLException; -import org.lwjgl.LWJGLUtil; -import org.lwjgl.input.Mouse; - -final class WindowsDirectInputMouse { - private final static int BUFFER_SIZE = 50; - private final static int BUTTON_STATES_SIZE = 7; - - private final static int DIMOFS_X = 0; - private final static int DIMOFS_Y = 4; - private final static int DIMOFS_Z = 8; - private final static int DIMOFS_BUTTON0 = 12; - private final static int DIMOFS_BUTTON1 = 13; - private final static int DIMOFS_BUTTON2 = 14; - private final static int DIMOFS_BUTTON3 = 15; - - private final long hwnd; - private final WindowsDirectInput dinput; - private final WindowsDirectInputDevice mouse; - - private final int mouse_button_count; - private final boolean has_wheel; - - private final EventQueue event_queue = new EventQueue(Mouse.EVENT_SIZE); - /* Buffer to hold a DIMOUSESTATE */ - private final ByteBuffer mouse_state; - private final IntBuffer temp_data_buffer; - - private final ByteBuffer mouse_event = ByteBuffer.allocate(Mouse.EVENT_SIZE); - - private boolean mouse_grabbed; - private byte[] win32_message_button_states = new byte[BUTTON_STATES_SIZE]; - private int accum_dwheel; - private int last_x; - private int last_y; - - public WindowsDirectInputMouse(WindowsDirectInput dinput, long hwnd) throws LWJGLException { - this.hwnd = hwnd; - this.dinput = dinput; - try { - mouse = dinput.createDevice(WindowsDirectInput.MOUSE_TYPE); - try { - mouse.setDataFormat(WindowsDirectInput.MOUSE_TYPE); - mouse.setBufferSize(BUFFER_SIZE); - if (!acquireNonExclusive()) - throw new LWJGLException("Failed to acquire mouse non-exclusive"); - } catch (LWJGLException e) { - mouse.release(); - throw e; - } - } catch (LWJGLException e) { - dinput.release(); - throw e; - } - MouseEnumerator enumerator = new MouseEnumerator(); - mouse.enumObjects(enumerator); - this.mouse_button_count = Math.min(enumerator.getButtonCount(), 4); - this.has_wheel = enumerator.hasWheel(); - mouse_state = BufferUtils.createByteBuffer(3*4 + 4); - temp_data_buffer = BufferUtils.createIntBuffer(BUFFER_SIZE*WindowsDirectInputDevice.DATA_SIZE); - } - - public boolean hasWheel() { - return has_wheel; - } - - public int getButtonCount() { - return mouse_button_count; - } - - private boolean acquire(int flags) { - try { - mouse.setCooperateLevel(hwnd, flags); - mouse.acquire(); - return true; - } catch (LWJGLException e) { - LWJGLUtil.log("Failed to acquire mouse: " + e); - return false; - } - } - - private boolean acquireNonExclusive() { - return acquire(WindowsDirectInputDevice.DISCL_NONEXCLUSIVE | WindowsDirectInputDevice.DISCL_FOREGROUND) || - acquire(WindowsDirectInputDevice.DISCL_NONEXCLUSIVE | WindowsDirectInputDevice.DISCL_BACKGROUND); - } - - public void destroy() { - mouse.unacquire(); - mouse.release(); - dinput.release(); - } - - public void poll(IntBuffer coord_buffer, ByteBuffer buttons) { - int ret = mouse.acquire(); - if (ret != WindowsDirectInput.DI_OK && ret != WindowsDirectInput.DI_NOEFFECT) - return; - mouse.poll(); - for (int i = 0; i < coord_buffer.remaining(); i++) - coord_buffer.put(coord_buffer.position() + i, 0); - mouse_state.clear(); - ret = mouse.getDeviceState(mouse_state); - int mouse_state_lx = mouse_state.getInt(); - int mouse_state_ly = mouse_state.getInt(); - int mouse_state_lz = mouse_state.getInt(); - int num_buttons = mouse_button_count; - if (mouse_grabbed || ret == WindowsDirectInput.DI_OK) { - if (ret != WindowsDirectInput.DI_OK) { - LWJGLUtil.log("Error getting mouse state: (0x" + Integer.toHexString(ret) + ")"); - return; - } - - coord_buffer.put(coord_buffer.position() + 2, mouse_state_lz); - if (num_buttons > buttons.remaining()) - num_buttons = buttons.remaining(); - for (int j = 0; j < num_buttons; j++) { - byte button_state = (mouse_state.get() & 0x80) != 0 ? (byte)1 : (byte)0; - buttons.put(buttons.position() + j, button_state); - // track the button state in the windows message buffer state array - // to get accurate button information when releasing a grab - win32_message_button_states[j] = button_state; - } - } else { - coord_buffer.put(coord_buffer.position() + 2, accum_dwheel); - if (num_buttons > win32_message_button_states.length) - num_buttons = win32_message_button_states.length; - for (int j = 0; j < num_buttons; j++) { - buttons.put(buttons.position() + j, win32_message_button_states[j]); - } - } - accum_dwheel = 0; - if (mouse_grabbed) { - coord_buffer.put(coord_buffer.position() + 0, mouse_state_lx); - coord_buffer.put(coord_buffer.position() + 1, -mouse_state_ly); - } else { - coord_buffer.put(coord_buffer.position() + 0, last_x); - coord_buffer.put(coord_buffer.position() + 1, last_y); - } - } - - private void putMouseEventWithCoords(byte button, byte state, int coord1, int coord2, int dz, long nanos) { - mouse_event.clear(); - mouse_event.put(button).put(state).putInt(coord1).putInt(coord2).putInt(dz).putLong(nanos); - mouse_event.flip(); - event_queue.putEvent(mouse_event); - } - - private void putMouseEvent(byte button, byte state, int dz, long nanos) { - if (mouse_grabbed) - putMouseEventWithCoords(button, state, 0, 0, dz, nanos); - else - putMouseEventWithCoords(button, state, last_x, last_y, dz, nanos); - } - - private void copyDXEvents(IntBuffer buffer) { - int buffer_index = 0; - int dx = 0, dy = 0, dwheel = 0; - byte button_state; - int i; - long nanos = 0; - while (buffer.hasRemaining()) { - int dwOfs = buffer.get(); - int dwData = buffer.get(); - long dwTimeStamp = ((long)buffer.get()) & 0xFFFFFFFF; - nanos = dwTimeStamp*1000000; - button_state = (dwData & 0x80) != 0 ? (byte)1 : (byte)0; - switch (dwOfs) { - case DIMOFS_BUTTON0: - putMouseEventWithCoords((byte)0, button_state, dx, -dy, dwheel, nanos); - dx = dy = dwheel = 0; - break; - case DIMOFS_BUTTON1: - putMouseEventWithCoords((byte)1, button_state, dx, -dy, dwheel, nanos); - dx = dy = dwheel = 0; - break; - case DIMOFS_BUTTON2: - putMouseEventWithCoords((byte)2, button_state, dx, -dy, dwheel, nanos); - dx = dy = dwheel = 0; - break; - case DIMOFS_BUTTON3: - putMouseEventWithCoords((byte)3, button_state, dx, -dy, dwheel, nanos); - dx = dy = dwheel = 0; - break; - case DIMOFS_X: - dx += dwData; - break; - case DIMOFS_Y: - dy += dwData; - break; - case DIMOFS_Z: - dwheel += dwData; - break; - } - } - if (dx != 0 || dy != 0 || dwheel != 0) - putMouseEventWithCoords((byte)-1, (byte)0, dx, -dy, dwheel, nanos); - } - - private void readDXBuffer() { - int ret = mouse.acquire(); - if (ret != WindowsDirectInput.DI_OK && ret != WindowsDirectInput.DI_NOEFFECT) - return; - mouse.poll(); - temp_data_buffer.clear(); - ret = mouse.getDeviceData(temp_data_buffer); - - switch (ret) { - case WindowsDirectInput.DI_OK: - break; - case WindowsDirectInput.DI_BUFFEROVERFLOW: - LWJGLUtil.log("Mouse buffer overflowed"); - break; - case WindowsDirectInput.DIERR_INPUTLOST: - LWJGLUtil.log("Mouse input lost"); - break; - case WindowsDirectInput.DIERR_NOTACQUIRED: - LWJGLUtil.log("Mouse not acquired"); - break; - default: - LWJGLUtil.log("unknown mouse error (" + Integer.toHexString(ret) + ")"); - break; - } - } - - public final void flush() { - readDXBuffer(); - temp_data_buffer.clear(); - } - - public void read(ByteBuffer buffer) { - readDXBuffer(); - if (mouse_grabbed) { - temp_data_buffer.flip(); - copyDXEvents(temp_data_buffer); - } - event_queue.copyEvents(buffer); - } - - public void grab(boolean grab) { - if(grab) { - if (!mouse_grabbed) { - flush(); - mouse_grabbed = true; - mouse.unacquire(); - if (!acquire(WindowsDirectInputDevice.DISCL_EXCLUSIVE | WindowsDirectInputDevice.DISCL_FOREGROUND)) - LWJGLUtil.log("Failed to reset cooperative mode"); - } - } else { - if (mouse_grabbed) { - mouse_grabbed = false; - mouse.unacquire(); - acquireNonExclusive(); - } - } - event_queue.clearEvents(); - } - - public void handleMouseScrolled(int event_dwheel, long millis) { - accum_dwheel += event_dwheel; - putMouseEvent((byte)-1, (byte)0, event_dwheel, millis*1000000); - } - - public void handleMouseMoved(int x, int y, long millis) { - int dx; - int dy; - dx = x - last_x; - dy = y - last_y; - last_x = x; - last_y = y; - long nanos = millis*1000000; - if (mouse_grabbed) { - putMouseEventWithCoords((byte)-1, (byte)0, dx, dy, 0, nanos); - } else { - putMouseEventWithCoords((byte)-1, (byte)0, x, y, 0, nanos); - } - } - - public void handleMouseButton(byte button, byte state, long millis) { - putMouseEvent(button, state, 0, millis*1000000); - if (button < BUTTON_STATES_SIZE) - win32_message_button_states[button] = state != 0 ? (byte)1 : (byte)0; - } - - private static class MouseEnumerator implements WindowsDirectInputDeviceObjectCallback { - private int button_count; - private boolean has_wheel; - - public int getButtonCount() { - return button_count; - } - - public boolean hasWheel() { - return has_wheel; - } - - public boolean nextObject(int type, String name) { - LWJGLUtil.log("Found mouse object: " + name); - switch (type) { - case WindowsDirectInputDevice.GUID_ZAxis: - has_wheel = true; - break; - case WindowsDirectInputDevice.GUID_Button: - button_count++; - break; - default: - break; - } - return true; - } - } -} Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java 2008-04-10 20:25:54 UTC (rev 3002) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java 2008-04-10 20:47:29 UTC (rev 3003) @@ -205,15 +205,6 @@ rect.offset(offset_x, offset_y); } - static WindowsDirectInput createDirectInput() throws LWJGLException { - try { - return new WindowsDirectInput8(getDllInstance()); - } catch (LWJGLException e) { - LWJGLUtil.log("Failed to create DirectInput 8 interface, falling back to DirectInput 3"); - return new WindowsDirectInput3(getDllInstance()); - } - } - static void setupCursorClipping(long hwnd) throws LWJGLException { cursor_clipped = true; getGlobalClientRect(hwnd, rect); Deleted: trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsDirectInput3.c =================================================================== --- trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsDirectInput3.c 2008-04-10 20:25:54 UTC (rev 3002) +++ trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsDirectInput3.c 2008-04-10 20:47:29 UTC (rev 3003) @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * $Id: org_lwjgl_input_Keyboard.c 2385 2006-06-23 16:45:21Z elias_naur $ - * - * @author elias_naur <eli...@us...> - * @version $Revision: 2385 $ - */ - -#undef DIRECTINPUT_VERSION -#define DIRECTINPUT_VERSION 0x0300 -#include "Window.h" -#include <dinput.h> -#include <jni.h> -#include "org_lwjgl_opengl_WindowsDirectInput3.h" - -JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsDirectInput3_createDirectInput(JNIEnv *env, jobject unused, jlong hinst_int) { - HINSTANCE hinst = (HINSTANCE)(LONG_PTR)hinst_int; - LPDIRECTINPUT lpdi; - HRESULT ret; - - ret = DirectInputCreate(hinst, DIRECTINPUT_VERSION, &lpdi, NULL); - if (ret != DI_OK) { - throwFormattedException(env, "Failed to create DirectInput (%x)", ret); - return (LONG_PTR)NULL; - } - return (LONG_PTR)lpdi; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsDirectInput3_nCreateDevice(JNIEnv *env, jclass unused, jlong di_interface, jint type) { - LPDIRECTINPUT lpdi = (LPDIRECTINPUT)(LONG_PTR)di_interface; - LPDIRECTINPUTDEVICE lpdevice; - GUID device_guid; - HRESULT ret; - - switch (type) { - case org_lwjgl_opengl_WindowsDirectInput3_KEYBOARD_TYPE: - device_guid = GUID_SysKeyboard; - break; - case org_lwjgl_opengl_WindowsDirectInput3_MOUSE_TYPE: - device_guid = GUID_SysMouse; - break; - default: - throwFormattedException(env, "Unknown device type (%d)", type); - return (LONG_PTR)NULL; - } - ret = IDirectInput_CreateDevice(lpdi, &device_guid, &lpdevice, NULL); - if (ret != DI_OK) { - throwFormattedException(env, "Failed to create keyboard (%x).", ret); - return (LONG_PTR)NULL; - } - return (LONG_PTR)lpdevice; -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDirectInput3_release(JNIEnv *env, jobject unused, jlong di_interface) { - LPDIRECTINPUT lpdi = (LPDIRECTINPUT)(LONG_PTR)di_interface; - IDirectInput_Release(lpdi); -} Deleted: trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsDirectInput8.c =================================================================== --- trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsDirectInput8.c 2008-04-10 20:25:54 UTC (rev 3002) +++ trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsDirectInput8.c 2008-04-10 20:47:29 UTC (rev 3003) @@ -1,101 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * $Id: org_lwjgl_input_Keyboard.c 2385 2006-06-23 16:45:21Z elias_naur $ - * - * @author elias_naur <eli...@us...> - * @version $Revision: 2385 $ - */ - -#undef DIRECTINPUT_VERSION -#define DIRECTINPUT_VERSION 0x0800 -#include "Window.h" -#include <dinput.h> -#include <jni.h> -#include "org_lwjgl_opengl_WindowsDirectInput8.h" - -JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsDirectInput8_createDirectInput(JNIEnv *env, jobject unused, jlong hinst_int) { - HINSTANCE hinst = (HINSTANCE)(LONG_PTR)hinst_int; - LPDIRECTINPUT8 lpdi; - HRESULT ret; - - ret = CoInitialize(NULL); - if (ret != S_OK && ret != S_FALSE) { - throwFormattedException(env, "CoInitialize failed (%x)", ret); - return (LONG_PTR)NULL; - } - ret = CoCreateInstance(&CLSID_DirectInput8, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectInput8, (void *)&lpdi); - if (ret != DI_OK && ret != DIERR_BETADIRECTINPUTVERSION) { - throwFormattedException(env, "Failed to create DirectInput (%x)", ret); - return (LONG_PTR)NULL; - } - - ret = IDirectInput8_Initialize(lpdi, hinst, DIRECTINPUT_VERSION); - if (FAILED(ret)) { - throwFormattedException(env, "Failed to initialize DirectInput (%x)", ret); - IDirectInput8_Release(lpdi); - return (LONG_PTR)NULL; - } - return (LONG_PTR)lpdi; -} - -JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsDirectInput8_nCreateDevice(JNIEnv *env, jclass unused, jlong di_interface, jint type) { - LPDIRECTINPUT8 lpdi = (LPDIRECTINPUT8)(LONG_PTR)di_interface; - LPDIRECTINPUTDEVICE8 lpdevice; - GUID device_guid; - HRESULT ret; - - switch (type) { - case org_lwjgl_opengl_WindowsDirectInput8_KEYBOARD_TYPE: - device_guid = GUID_SysKeyboard; - break; - case org_lwjgl_opengl_WindowsDirectInput8_MOUSE_TYPE: - device_guid = GUID_SysMouse; - break; - default: - throwFormattedException(env, "Unknown device type (%d)", type); - return (LONG_PTR)NULL; - } - ret = IDirectInput8_CreateDevice(lpdi, &device_guid, &lpdevice, NULL); - if (ret != DI_OK) { - throwFormattedException(env, "Failed to create keyboard (%x).", ret); - return (LONG_PTR)NULL; - } - return (LONG_PTR)lpdevice; -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDirectInput8_release(JNIEnv *env, jobject unused, jlong di_interface) { - LPDIRECTINPUT8 lpdi = (LPDIRECTINPUT8)(LONG_PTR)di_interface; - IDirectInput8_Release(lpdi); - CoUninitialize(); -} Deleted: trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsDirectInputDevice3.c =================================================================== --- trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsDirectInputDevice3.c 2008-04-10 20:25:54 UTC (rev 3002) +++ trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsDirectInputDevice3.c 2008-04-10 20:47:29 UTC (rev 3003) @@ -1,160 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * $Id: org_lwjgl_input_Keyboard.c 2385 2006-06-23 16:45:21Z elias_naur $ - * - * @author elias_naur <eli...@us...> - * @version $Revision: 2385 $ - */ - -#undef DIRECTINPUT_VERSION -#define DIRECTINPUT_VERSION 0x0300 -#include "Window.h" -#include "dinputhelper.h" -#include <dinput.h> -#include <jni.h> -#include "org_lwjgl_opengl_WindowsDirectInput3.h" -#include "org_lwjgl_opengl_WindowsDirectInputDevice3.h" - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsDirectInputDevice3_unacquire(JNIEnv *env, jobject unused, jlong di_device) { - LPDIRECTINPUTDEVICE lpdevice = (LPDIRECTINPUTDEVICE)(LONG_PTR)di_device; - return IDirectInputDevice_Unacquire(lpdevice); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsDirectInputDevice3_setDataFormat(JNIEnv *env, jobject unused, jlong di_device, jint type) { - LPDIRECTINPUTDEVICE lpdevice = (LPDIRECTINPUTDEVICE)(LONG_PTR)di_device; - LPCDIDATAFORMAT format; - - switch (type) { - case org_lwjgl_opengl_WindowsDirectInput3_KEYBOARD_TYPE: - format = &c_dfDIKeyboard; - break; - case org_lwjgl_opengl_WindowsDirectInput3_MOUSE_TYPE: - format = &c_dfDIMouse; - break; - default: - throwFormattedException(env, "Unknown device type (%d)", type); - return DIERR_INVALIDPARAM; - } - return IDirectInputDevice_SetDataFormat(lpdevice, format); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsDirectInputDevice3_getDeviceState(JNIEnv *env, jobject unused, jlong di_device, jobject buffer_obj, jint pos, jint size) { - LPDIRECTINPUTDEVICE lpdevice = (LPDIRECTINPUTDEVICE)(LONG_PTR)di_device; - jbyte *buffer = pos + (jbyte *)(*env)->GetDirectBufferAddress(env, buffer_obj); - return IDirectInputDevice_GetDeviceState(lpdevice, size, buffer); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsDirectInputDevice3_getEventSize(JNIEnv *env, jobject unused) { - return sizeof(DIDEVICEOBJECTDATA); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsDirectInputDevice3_getDeviceData(JNIEnv *env, jobject unused, jlong di_device, jobject event_buffer_obj, jint event_buffer_size, jobject buffer_obj, jint buffer_pos, jint buffer_size) { - LPDIRECTINPUTDEVICE lpdevice = (LPDIRECTINPUTDEVICE)(LONG_PTR)di_device; - jint *buffer = buffer_pos + (jint *)(*env)->GetDirectBufferAddress(env, buffer_obj); - DIDEVICEOBJECTDATA *event_buffer = (*env)->GetDirectBufferAddress(env, event_buffer_obj); - DIDEVICEOBJECTDATA *current_event; - DWORD num_events = event_buffer_size/sizeof(DIDEVICEOBJECTDATA); - HRESULT ret = IDirectInputDevice_GetDeviceData(lpdevice, sizeof(DIDEVICEOBJECTDATA), event_buffer, &num_events, 0); - jint num_buffer_events = buffer_size/org_lwjgl_opengl_WindowsDirectInputDevice3_DATA_SIZE; - jint i; - if (ret != DI_OK && ret != DI_BUFFEROVERFLOW) - return ret; - - if (num_buffer_events < num_events) { - num_events = num_buffer_events; - ret = DI_BUFFEROVERFLOW; - } - for (i = 0; i < num_events; i++) { - current_event = event_buffer + i; - buffer[buffer_pos++] = current_event->dwOfs; - buffer[buffer_pos++] = current_event->dwData; - buffer[buffer_pos++] = current_event->dwTimeStamp; - } - positionBuffer(env, buffer_obj, buffer_pos); - return ret; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsDirectInputDevice3_acquire(JNIEnv *env, jobject unused, jlong di_device) { - LPDIRECTINPUTDEVICE lpdevice = (LPDIRECTINPUTDEVICE)(LONG_PTR)di_device; - return IDirectInputDevice_Acquire(lpdevice); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsDirectInputDevice3_setBufferSize(JNIEnv *env, jobject unused, jlong di_device, jint buffer_size) { - LPDIRECTINPUTDEVICE lpdevice = (LPDIRECTINPUTDEVICE)(LONG_PTR)di_device; - DIPROPDWORD dipropdw; - dipropdw.diph.dwSize = sizeof(DIPROPDWORD); - dipropdw.diph.dwHeaderSize = sizeof(DIPROPHEADER); - dipropdw.diph.dwObj = 0; - dipropdw.diph.dwHow = DIPH_DEVICE; - dipropdw.dwData = buffer_size; - return IDirectInputDevice_SetProperty(lpdevice, DIPROP_BUFFERSIZE, &dipropdw.diph); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsDirectInputDevice3_setCooperativeLevel(JNIEnv *env, jobject unused, jlong di_device, jlong hwnd_int, jint flags) { - LPDIRECTINPUTDEVICE lpdevice = (LPDIRECTINPUTDEVICE)(LONG_PTR)di_device; - HWND hwnd = (HWND)(LONG_PTR)hwnd_int; - return IDirectInputDevice_SetCooperativeLevel(lpdevice, hwnd, flags); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDirectInputDevice3_release(JNIEnv *env, jobject unused, jlong di_device) { - LPDIRECTINPUTDEVICE lpdevice = (LPDIRECTINPUTDEVICE)(LONG_PTR)di_device; - IDirectInputDevice_Release(lpdevice); -} - -static BOOL CALLBACK EnumMouseObjectsCallback(LPCDIDEVICEOBJECTINSTANCE lpddoi, LPVOID pvRef) { - enum_context_t *enum_context = (enum_context_t *)pvRef; - jint object_type; - - if (IsEqualGUID(&lpddoi->guidType, &GUID_Button)) { - object_type = org_lwjgl_opengl_WindowsDirectInputDevice3_GUID_Button; - } else if(IsEqualGUID(&lpddoi->guidType, &GUID_XAxis)) { - object_type = org_lwjgl_opengl_WindowsDirectInputDevice3_GUID_XAxis; - } else if(IsEqualGUID(&lpddoi->guidType, &GUID_YAxis)) { - object_type = org_lwjgl_opengl_WindowsDirectInputDevice3_GUID_YAxis; - } else if(IsEqualGUID(&lpddoi->guidType, &GUID_ZAxis)) { - object_type = org_lwjgl_opengl_WindowsDirectInputDevice3_GUID_ZAxis; - } else { - object_type = org_lwjgl_opengl_WindowsDirectInputDevice3_GUID_Unknown; - } - - return objectCallback(enum_context->env, enum_context->enumerator, object_type, lpddoi->tszName) ? DIENUM_CONTINUE : DIENUM_STOP; -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsDirectInputDevice3_enumObjects(JNIEnv *env, jobject unused, jlong di_device, jobject enumerator) { - LPDIRECTINPUTDEVICE lpdevice = (LPDIRECTINPUTDEVICE)(LONG_PTR)di_device; - enum_context_t enum_context; - enum_context.env = env; - enum_context.enumerator = enumerator; - return IDirectInputDevice_EnumObjects(lpdevice, EnumMouseObjectsCallback, &enum_context, DIDFT_ALL); -} Deleted: trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsDirectInputDevice8.c =================================================================== --- trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsDirectInputDevice8.c 2008-04-10 20:25:54 UTC (rev 3002) +++ trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsDirectInputDevice8.c 2008-04-10 20:47:29 UTC (rev 3003) @@ -1,165 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * $Id: org_lwjgl_input_Keyboard.c 2385 2006-06-23 16:45:21Z elias_naur $ - * - * @author elias_naur <eli...@us...> - * @version $Revision: 2385 $ - */ - -#undef DIRECTINPUT_VERSION -#define DIRECTINPUT_VERSION 0x0800 -#include "Window.h" -#include "dinputhelper.h" -#include <dinput.h> -#include <jni.h> -#include "org_lwjgl_opengl_WindowsDirectInput8.h" -#include "org_lwjgl_opengl_WindowsDirectInputDevice8.h" - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsDirectInputDevice8_unacquire(JNIEnv *env, jobject unused, jlong di_device) { - LPDIRECTINPUTDEVICE8 lpdevice = (LPDIRECTINPUTDEVICE8)(LONG_PTR)di_device; - return IDirectInputDevice8_Unacquire(lpdevice); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsDirectInputDevice8_poll(JNIEnv *env, jobject unused, jlong di_device) { - LPDIRECTINPUTDEVICE8 lpdevice = (LPDIRECTINPUTDEVICE8)(LONG_PTR)di_device; - return IDirectInputDevice8_Poll(lpdevice); -} - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsDirectInputDevice8_setDataFormat(JNIEnv *env, jobject unused, jlong di_device, jint type) { - LPDIRECTINPUTDEVI... [truncated message content] |
From: <ma...@us...> - 2008-04-10 21:02:32
|
Revision: 3004 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3004&view=rev Author: matzon Date: 2008-04-10 14:02:04 -0700 (Thu, 10 Apr 2008) Log Message: ----------- support for prepending host to cache path (defaults to true) Modified Paths: -------------- trunk/LWJGL/applet/appletloader.html trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java Modified: trunk/LWJGL/applet/appletloader.html =================================================================== --- trunk/LWJGL/applet/appletloader.html 2008-04-10 20:47:29 UTC (rev 3003) +++ trunk/LWJGL/applet/appletloader.html 2008-04-10 21:02:04 UTC (rev 3004) @@ -50,6 +50,9 @@ <!-- whether to run in debug mode --> <!-- <param name="al_debug" value="false"> --> + <!-- whether to prepend host to cache path - defaults to true --> + <param name="al_prepend_host" value="false"> + <!-- main applet specific params --> <param name="test" value="org.lwjgl.test.opengl.awt.AWTGearsCanvas"> Modified: trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2008-04-10 20:47:29 UTC (rev 3003) +++ trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2008-04-10 21:02:04 UTC (rev 3004) @@ -183,6 +183,9 @@ /** whether we're running in debug mode */ protected boolean debugMode; + /** whether to prepend host to cache path */ + protected boolean prependHost; + /** String to display as a subtask */ protected String subtaskMessage = ""; @@ -221,6 +224,9 @@ // whether to run in debug mode debugMode = getBooleanParameter("al_debug", false); + // whether to prepend host to cache path + prependHost = getBooleanParameter("al_prepend_host", true); + // get colors of applet bgColor = getColor("al_bgcolor", Color.white); setBackground(bgColor); @@ -486,7 +492,17 @@ // get path where applet will be stored String path = (String) AccessController.doPrivileged(new PrivilegedExceptionAction() { public Object run() throws Exception { - return System.getProperty("java.io.tmpdir") + File.separator + getParameter("al_title") + File.separator; + + // we append the code base to avoid naming collisions with al_title + String codebase = ""; + if(prependHost) { + codebase = getCodeBase().getHost(); + if(codebase == null || codebase.length() == 0) { + codebase = "localhost"; + } + codebase += File.separator; + } + return System.getProperty("java.io.tmpdir") + File.separator + codebase + getParameter("al_title") + File.separator; } }); @@ -494,7 +510,7 @@ // create directory if (!dir.exists()) { - dir.mkdir(); + dir.mkdirs(); } dir = new File(dir, "version"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2008-04-11 12:21:30
|
Revision: 3005 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3005&view=rev Author: matzon Date: 2008-04-11 05:21:25 -0700 (Fri, 11 Apr 2008) Log Message: ----------- alpha 4 Modified Paths: -------------- trunk/LWJGL/build.xml trunk/LWJGL/src/java/org/lwjgl/Sys.java Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2008-04-10 21:02:04 UTC (rev 3004) +++ trunk/LWJGL/build.xml 2008-04-11 12:21:25 UTC (rev 3005) @@ -13,7 +13,7 @@ <property name="lwjgl.docs" location="doc" /> <property name="lwjgl.temp" location="temp" /> <property name="lwjgl.res" location="res" /> - <property name="lwjgl.version" value="2.0a3" /> + <property name="lwjgl.version" value="2.0a4" /> <property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java"/> <!-- ================================================================== --> Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2008-04-10 21:02:04 UTC (rev 3004) +++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2008-04-11 12:21:25 UTC (rev 3005) @@ -54,7 +54,7 @@ private static final String JNI_LIBRARY_NAME = "lwjgl"; /** Current version of library */ - private static final String VERSION = "2.0a3"; + private static final String VERSION = "2.0a4"; /** Current version of the JNI library */ static final int JNI_VERSION = 15; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2008-04-18 22:41:11
|
Revision: 3024 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3024&view=rev Author: matzon Date: 2008-04-18 15:41:05 -0700 (Fri, 18 Apr 2008) Log Message: ----------- lzma support for appletloader Added Paths: ----------- trunk/LWJGL/doc/3rdparty/lzma_license.txt trunk/LWJGL/libs/lzma.jar Added: trunk/LWJGL/doc/3rdparty/lzma_license.txt =================================================================== --- trunk/LWJGL/doc/3rdparty/lzma_license.txt (rev 0) +++ trunk/LWJGL/doc/3rdparty/lzma_license.txt 2008-04-18 22:41:05 UTC (rev 3024) @@ -0,0 +1,15 @@ +LZMA# SDK is licensed under two licenses: + +1) GNU Lesser General Public License (GNU LGPL) +2) Common Public License (CPL) + +It means that you can select one of these two licenses and +follow rules of that license. + +SPECIAL EXCEPTION +Igor Pavlov, as the author of this code, expressly permits you +to statically or dynamically link your code (or bind by name) +to the files from LZMA# SDK without subjecting your linked +code to the terms of the CPL or GNU LGPL. +Any modifications or additions to files from LZMA# SDK, however, +are subject to the GNU LGPL or CPL terms. \ No newline at end of file Property changes on: trunk/LWJGL/doc/3rdparty/lzma_license.txt ___________________________________________________________________ Name: svn:mime-type + text/plain Added: trunk/LWJGL/libs/lzma.jar =================================================================== (Binary files differ) Property changes on: trunk/LWJGL/libs/lzma.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2008-04-20 18:46:39
|
Revision: 3028 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3028&view=rev Author: matzon Date: 2008-04-20 11:46:34 -0700 (Sun, 20 Apr 2008) Log Message: ----------- split build file into components Modified Paths: -------------- trunk/LWJGL/build.xml Added Paths: ----------- trunk/LWJGL/platform_build/build-applet.xml trunk/LWJGL/platform_build/build-definitions.xml trunk/LWJGL/platform_build/build-generator.xml trunk/LWJGL/platform_build/build-webstart.xml Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2008-04-20 16:59:57 UTC (rev 3027) +++ trunk/LWJGL/build.xml 2008-04-20 18:46:34 UTC (rev 3028) @@ -1,155 +1,11 @@ <project name="LWJGL" default="all" basedir="."> - <!-- ================================================================== --> - <!-- Global properties for build --> - <!-- ================================================================== --> - <property name="lwjgl.src" location="src" /> - <property name="lwjgl.src.native" location="${lwjgl.src}/native" /> - <property name="lwjgl.src.headers" location="${lwjgl.src.native}/common" /> - <property name="lwjgl.src.templates" location="${lwjgl.src}/templates" /> - <property name="lwjgl.bin" location="bin" /> - <property name="lwjgl.lib" location="libs" /> - <property name="lwjgl.dist" location="dist" /> - <property name="lwjgl.docs" location="doc" /> - <property name="lwjgl.temp" location="temp" /> - <property name="lwjgl.res" location="res" /> - <property name="lwjgl.version" value="2.0a4" /> + <import file="platform_build/build-definitions.xml"/> + <import file="platform_build/build-generator.xml"/> + <import file="platform_build/build-applet.xml"/> + <import file="platform_build/build-webstart.xml"/> - <property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java"/> <!-- ================================================================== --> - <!-- Filesets used for targets --> - <!-- ================================================================== --> - - <!-- Files to include in the lwjgl.jar file --> - <fileset id="lwjgl.fileset" dir="${lwjgl.bin}"> - <include name="org/**/*" /> - <exclude name="org/lwjgl/d3d/**" /> - <exclude name="org/lwjgl/test/**" /> - <exclude name="org/lwjgl/util/**" /> - <exclude name="org/lwjgl/examples/**" /> - </fileset> - - <fileset id="lwjgl_util_applet.fileset" dir="${lwjgl.bin}"> - <exclude name="**.*"/> - <include name="org/lwjgl/util/applet/**"/> - </fileset> - - <!-- Files to include in the lwjgl_test.jar file --> - <fileset id="lwjgl_test.fileset" dir="${lwjgl.bin}"> - <exclude name="**.*" /> - <include name="org/lwjgl/test/**" /> - <include name="org/lwjgl/examples/**" /> - </fileset> - - <!-- More files to include in the lwjgl_test.jar file --> - <fileset id="lwjgl_test_extra.fileset" dir="${lwjgl.src}/java"> - <exclude name="**.*" /> - <include name="org/lwjgl/test/opengl/shaders/shaderFP.fp" /> - <include name="org/lwjgl/test/opengl/shaders/shaderFP.vp" /> - <include name="org/lwjgl/test/opengl/shaders/shaderFSH.fsh" /> - <include name="org/lwjgl/test/opengl/shaders/shaderFSH.vsh" /> - <include name="org/lwjgl/test/opengl/shaders/shaderVP.vp" /> - <include name="org/lwjgl/test/opengl/shaders/shaderVSH.vsh" /> - </fileset> - - <!-- Files to include in the lwjgl_util.jar file --> - <fileset id="lwjgl_util.fileset" dir="${lwjgl.bin}"> - <exclude name="**.*" /> - <exclude name="org/lwjgl/util/generator/**" /> - <exclude name="org/lwjgl/util/applet/**" /> - <include name="org/lwjgl/util/**" /> - </fileset> - - <!-- Files to include in the lwjgl_applet.jar file --> - <fileset id="lwjgl_applet.fileset" dir="${lwjgl.bin}"> - <exclude name="**.*"/> - <include name="org/lwjgl/test/applet/**"/> - <include name="org/lwjgl/test/opengl/awt/AWTGearsCanvas.class"/> - </fileset> - - <!-- Files to make Javadoc from --> - <fileset id="lwjgl.javadoc.fileset" dir="${lwjgl.src}"> - <include name="**/*.java" /> - <exclude name="native/**" /> - <exclude name="templates/**" /> - <exclude name="java/org/lwjgl/test/**" /> - <exclude name="java/org/lwjgl/examples/**" /> - <exclude name="java/org/lwjgl/util/generator/**" /> - </fileset> - - <!-- Files to include in doc package --> - <patternset id="lwjgl-docs.fileset"> - <include name="CREDITS" /> - <include name="LICENSE" /> - <include name="README" /> - <include name="lwjgl_hidden_switches.text" /> - <include name="3rdparty/*" /> - </patternset> - - <!-- Files to include in win32 package --> - <patternset id="lwjgl-win32.fileset"> - <include name="lwjgl.dll" /> - <include name="OpenAL32.dll" /> - <include name="jinput-dx8.dll" /> - <include name="jinput-raw.dll" /> - </patternset> - - <!-- Files to include in linux, glibc2.3 package --> - <patternset id="lwjgl-linux.fileset"> - <include name="liblwjgl*.so" /> - <include name="libopenal.so" /> - <include name="libjinput-linux.so" /> - <include name="libjinput-linux64.so" /> - </patternset> - - <!-- Files to include in mac os x package --> - <patternset id="lwjgl-macosx.fileset"> - <include name="liblwjgl.jnilib" /> - <include name="openal.dylib" /> - <include name="libjinput-osx.jnilib" /> - <include name="libjinput-osx-legacy.jnilib" /> - </patternset> - - <!-- Files to include in source distribution --> - <fileset id="lwjgl.source.fileset" dir="."> - <include name="build.xml" /> - <include name="src/**" /> - <include name="platform_build/**/*" /> - </fileset> - - <!-- files in the base package --> - <patternset id="lwjgl_base"> - <include name="**" /> - <exclude name="res/ILtest.*" /> - <exclude name="res/Missing_you.mod" /> - <exclude name="res/phero*.*" /> - </patternset> - - <!-- files in the optional package --> - <patternset id="lwjgl_optional"> - <include name="res/**" /> - <exclude name="res/logo/**" /> - <exclude name="res/spaceinvaders/**" /> - <exclude name="res/*.wav" /> - <exclude name="res/*.xpm" /> - <include name="doc/CREDITS" /> - <include name="doc/LICENSE" /> - <include name="doc/README" /> - </patternset> - - <!-- files in the lwjgl_applet package --> - <patternset id="lwjgl_applet"> - <include name="applet/**" /> - <exclude name="applet/appletviewer.policy" /> - <exclude name="applet/lwjglkeystore" /> - </patternset> - - <uptodate property="lwjgl.main.built" targetfile="${lwjgl.lib}/win32/lwjgl.dll" > - <srcfiles dir= "${lwjgl.src.native}/common" includes="*.c*"/> - <srcfiles dir= "${lwjgl.src.native}/windows" includes="*.c"/> - </uptodate> - - <!-- ================================================================== --> <!-- Everything below this line is targets. --> <!-- Do not modify, unless you know what you're doing --> <!-- ================================================================== --> @@ -158,28 +14,21 @@ <!-- Initialize build --> <!-- ================================================================== --> <target name="-initialize"> - <mkdir dir="${lwjgl.bin}" taskname="initialiazing bin folder" /> - <mkdir dir="${lwjgl.bin}/lwjgl" taskname="initialiazing bin folder" /> - <mkdir dir="${lwjgl.lib}" taskname="initialiazing lib folder" /> - <mkdir dir="${lwjgl.dist}" taskname="initialiazing dist folder" /> - <mkdir dir="${lwjgl.docs}/javadoc" taskname="initialiazing docs folder" /> - <mkdir dir="${lwjgl.res}" taskname="initialiazing res folder" /> - <mkdir dir="${lwjgl.temp}" taskname="initialiazing temp folder" /> - <mkdir dir="${lwjgl.temp}/jar" taskname="initialiazing temp/jar folder" /> - <mkdir dir="${lwjgl.temp}/doc" taskname="initialiazing temp/doc folder" /> - <mkdir dir="${lwjgl.temp}/res" taskname="initialiazing temp/res folder" /> - <mkdir dir="${lwjgl.temp}/native" taskname="initialiazing temp/native folder" /> - <mkdir dir="${lwjgl.temp}/native/win32" taskname="initialiazing temp/win32 folder" /> - <mkdir dir="${lwjgl.temp}/native/linux" taskname="initialiazing temp/linux folder" /> - <mkdir dir="${lwjgl.temp}/native/macosx" taskname="initialiazing temp/macosx folder" /> + <mkdir dir="${lwjgl.bin}" taskname="initialiazing bin folder" /> + <mkdir dir="${lwjgl.bin}/lwjgl" taskname="initialiazing bin folder" /> + <mkdir dir="${lwjgl.lib}" taskname="initialiazing lib folder" /> + <mkdir dir="${lwjgl.dist}" taskname="initialiazing dist folder" /> + <mkdir dir="${lwjgl.docs}/javadoc" taskname="initialiazing docs folder" /> + <mkdir dir="${lwjgl.res}" taskname="initialiazing res folder" /> + <mkdir dir="${lwjgl.temp}" taskname="initialiazing temp folder" /> + <mkdir dir="${lwjgl.temp}/jar" taskname="initialiazing temp/jar folder" /> + <mkdir dir="${lwjgl.temp}/doc" taskname="initialiazing temp/doc folder" /> + <mkdir dir="${lwjgl.temp}/res" taskname="initialiazing temp/res folder" /> + <mkdir dir="${lwjgl.temp}/native" taskname="initialiazing temp/native folder" /> + <mkdir dir="${lwjgl.temp}/native/win32" taskname="initialiazing temp/win32 folder" /> + <mkdir dir="${lwjgl.temp}/native/linux" taskname="initialiazing temp/linux folder" /> + <mkdir dir="${lwjgl.temp}/native/macosx" taskname="initialiazing temp/macosx folder" /> </target> - - <target name="clean-generated" description="Deletes the generated java and native source"> - <delete quiet="true" failonerror="false"> - <fileset dir="${lwjgl.src}/generated" includes="**"/> - <fileset dir="${lwjgl.src.native}/generated" includes="**"/> - </delete> - </target> <!-- Cleans up any files created during the execution of this script --> <target name="clean" description="Cleans the diectories controlled by this ant script" depends="clean-generated"> @@ -208,11 +57,11 @@ <antcall target="-initialize" /> <!-- compile and create jars --> - <antcall target="generate-all"/> + <antcall target="generate-all"/> <antcall target="compile" /> - <antcall target="javadoc" /> + <antcall target="javadoc" /> <antcall target="-createjars" /> - <antcall target="applet-release" /> + <antcall target="applet-release" /> <!-- copy resources to res folder --> <copy todir="${lwjgl.temp}/res"> @@ -274,97 +123,7 @@ <fileset refid="lwjgl_util.fileset" /> </jar> </target> - - <target name="applettest" depends="applet"> - <exec executable="appletviewer"> - <arg value="-J-Djava.security.policy=applet/appletviewer.policy"/> - <arg path="applet/applet.html"/> - </exec> - </target> - <target name="runtest" depends="all"> - <fail message="test.mainclass is not set. Use 'ant -Dtest.mainclass=<main-class> runtest'" unless="test.mainclass"/> - <condition property="native_path" value="libs/win32"> - <os family="windows" /> - </condition> - - <condition property="native_path" value="libs/linux"> - <os name="Linux" /> - </condition> - - <condition property="native_path" value="libs/macosx"> - <os name="Mac OS X" /> - </condition> - <property name="native_path_expanded" location="${native_path}"/> - <java classname="${test.mainclass}" classpath="res:${lwjgl.lib}/lwjgl.jar:${lwjgl.lib}/lwjgl_util.jar:${lwjgl.lib}/lwjgl_test.jar:${lwjgl.lib}/jinput.jar" fork="true"> - <sysproperty key="org.lwjgl.util.Debug" value="true"/> - <sysproperty key="java.library.path" value="${native_path_expanded}"/> - </java> - </target> - - <target name="applet" depends="all"> - <antcall target="-applet"> - <param name="keystore" value="applet/lwjglkeystore"/> - <param name="alias" value="lwjgl"/> - <param name="password" value="123456"/> - </antcall> - </target> - - <target name="applet-release"> - <input message="Please type the password for the keystore" addproperty="sign.pwd"/> - - <antcall target="-applet"> - <param name="keystore" value="signing/matzon_java_code_signing.keystore"/> - <param name="alias" value="oddlabs_java_code_signing"/> - <param name="password" value="${sign.pwd}"/> - </antcall> - </target> - - <target name="-applet"> - - <!-- Create lwjgl_applet.jar --> - <jar destfile="applet/lwjgl_applet.jar" taskname="lwjgl_applet.jar"> - <fileset refid="lwjgl_applet.fileset" /> - </jar> - - <!-- create each of the native jars --> - <jar destfile="applet/windows_natives.jar" taskname="windows_natives.jar"> - <fileset dir="${lwjgl.lib}/win32"> - <patternset refid="lwjgl-win32.fileset"/> - </fileset> - </jar> - <signjar jar="applet/windows_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> - - <jar destfile="applet/linux_natives.jar" taskname="linux_natives.jar"> - <fileset dir="${lwjgl.lib}/linux"> - <patternset refid="lwjgl-linux.fileset"/> - </fileset> - </jar> - <signjar jar="applet/linux_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> - - <jar destfile="applet/macosx_natives.jar" taskname="macosx_natives.jar"> - <fileset dir="${lwjgl.lib}/macosx"> - <patternset refid="lwjgl-macosx.fileset"/> - </fileset> - </jar> - <signjar jar="applet/macosx_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> - - <jar destfile="${lwjgl.lib}/lwjgl_util_applet.jar" update="true"> - <fileset dir="${lwjgl.res}" includes="applet*"/> - </jar> - - <copy file="${lwjgl.lib}/lwjgl.jar" todir="applet"/> - <copy file="${lwjgl.lib}/lwjgl_util_applet.jar" todir="applet"/> - <copy file="${lwjgl.lib}/lwjgl_util.jar" todir="applet"/> - <copy file="${lwjgl.lib}/jinput.jar" todir="applet"/> - <zip destfile="applet/res.jar"> - <zipfileset dir="${lwjgl.res}" includes="Footsteps.wav, ILtest.tga, Missing_you.mod"/> - </zip> - <signjar jar="applet/lwjgl.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> - <signjar jar="applet/jinput.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> - <signjar jar="applet/lwjgl_util_applet.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> - </target> - <!-- Distributes files --> <target name="-distribute"> <delete> @@ -413,27 +172,10 @@ <zip destfile="${lwjgl.dist}/lwjgl-source-${lwjgl.version}.zip"> <fileset refid="lwjgl.source.fileset" /> </zip> - </target> - - <!-- Compiles the Java source code --> - <target name="compile" description="Compiles the java source code" depends="-initialize"> - <javac debug="yes" destdir="${lwjgl.bin}" source="1.4" target="1.4" classpath="${lwjgl.lib}/jinput.jar" taskname="core"> - <src path="${lwjgl.src}/java/"/> - <src path="${lwjgl.src}/generated/"/> - <include name="org/lwjgl/*.java"/> - <include name="org/lwjgl/input/**"/> - <include name="org/lwjgl/opengl/**"/> - <include name="org/lwjgl/openal/**"/> - <include name="org/lwjgl/util/**"/> - <exclude name="org/lwjgl/util/generator/**"/> - </javac> - <javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/test/**" source="1.4" target="1.4" taskname="test" /> - <javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/examples/**" source="1.4" target="1.4" taskname="examples" /> - </target> + </target> <!-- Generates the native headers from source files --> <target name="headers" description="invokes javah on java classes" depends="compile"> - <!-- platform specific classes --> <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/linux" force="yes"> <class name="org.lwjgl.opengl.LinuxEvent" /> <class name="org.lwjgl.opengl.LinuxMouse" /> @@ -448,7 +190,6 @@ </javah> <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/windows" force="yes"> - <!-- OpenGL --> <class name="org.lwjgl.opengl.WindowsKeyboard" /> <class name="org.lwjgl.opengl.WindowsPbufferPeerInfo" /> <class name="org.lwjgl.opengl.WindowsDisplay" /> @@ -469,110 +210,35 @@ <class name="org.lwjgl.opengl.MacOSXContextImplementation" /> </javah> - <!-- lwjgl --> <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.headers}" force="yes"> <class name="org.lwjgl.opengl.AWTSurfaceLock" /> <class name="org.lwjgl.DefaultSysImplementation" /> <class name="org.lwjgl.input.Cursor" /> <class name="org.lwjgl.input.Keyboard" /> <class name="org.lwjgl.input.Mouse" /> - <class name="org.lwjgl.openal.AL" /> - <class name="org.lwjgl.opengl.GLContext" /> <class name="org.lwjgl.opengl.Pbuffer" /> </javah> - </target> - - <!-- Creates the Javadoc --> - <target name="javadoc" description="Creates javadoc from java source code"> - <javadoc destdir="${lwjgl.docs}/javadoc" classpath="${lwjgl.lib}/jinput.jar" author="true" version="true" use="true" source="1.4" windowtitle="LWJGL API"> - <fileset refid="lwjgl.javadoc.fileset" /> - <doctitle><![CDATA[<h1>Lightweight Java Game Toolkit</h1>]]></doctitle> - <bottom><![CDATA[<i>Copyright © 2002-2008 lwjgl.org. All Rights Reserved.</i>]]></bottom> - </javadoc> </target> - + <!-- Compiles the Java source code --> - <target name="generators" description="Compiles the native method generators"> - <javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/util/generator/**.java" source="1.5" target="1.5" taskname="generator"> - <compilerarg value="-Xlint:all"/> + <target name="compile" description="Compiles the java source code" depends="-initialize"> + <javac debug="yes" destdir="${lwjgl.bin}" source="1.4" target="1.4" classpath="${lwjgl.lib}/jinput.jar" taskname="core"> + <src path="${lwjgl.src}/java/"/> + <src path="${lwjgl.src}/generated/"/> + <include name="org/lwjgl/*.java"/> + <include name="org/lwjgl/input/**"/> + <include name="org/lwjgl/opengl/**"/> + <include name="org/lwjgl/openal/**"/> + <include name="org/lwjgl/util/**"/> + <exclude name="org/lwjgl/util/generator/**"/> </javac> - </target> - - <target name="generate-all" depends="generate-openal, generate-opengl, generate-opengl-capabilities, generate-opengl-references" description="Generates java and native source"/> - - <target name="generate-openal" depends="generators" description="Generates java and native source for AL"> - <!-- Generate OpenAL --> - <apply executable="apt" parallel="true"> - <arg value="-nocompile"/> - <arg value="-factory"/> - <arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/> - <arg value="-cp"/> - <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/> - <arg value="-s"/> - <arg path="${lwjgl.src}/generated"/> - <arg value="-d"/> - <arg path="${lwjgl.src.native}/generated"/> - <arg value="-Atypemap=org.lwjgl.util.generator.ALTypeMap"/> - <arg value="-Ageneratechecks"/> - <fileset dir="${lwjgl.src.templates}" includes="org/lwjgl/openal/AL10.java, org/lwjgl/openal/AL11.java"/> - </apply> - </target> - - <target name="generate-opengl" depends="generators" description="Generates java and native source for GL"> - <!-- there's no apt task in ant yet, so we'll just invoke it manually for now --> - <apply executable="apt" parallel="true"> - <arg value="-nocompile"/> - <arg value="-factory"/> - <arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/> - <arg value="-cp"/> - <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/> - <arg value="-s"/> - <arg path="${lwjgl.src}/generated"/> - <arg value="-d"/> - <arg path="${lwjgl.src.native}/generated"/> - <!-- <arg value="-Ageneratechecks"/>--> - <arg value="-Acontextspecific"/> - <arg value="-Atypemap=org.lwjgl.util.generator.GLTypeMap"/> - <fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/> - </apply> - </target> - - <target name="generate-opengl-references" depends="generators" description="Generates java and native source for GL"> - <!-- Generate context capabilities --> - <apply executable="apt" parallel="true"> - <arg value="-nocompile"/> - <arg value="-factory"/> - <arg value="org.lwjgl.util.generator.ReferencesGeneratorProcessorFactory"/> - <arg value="-cp"/> - <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/> - <arg value="-s"/> - <arg path="${lwjgl.src}/generated"/> - <fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/> - </apply> - </target> + <javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/test/**" source="1.4" target="1.4" taskname="test" /> + <javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/examples/**" source="1.4" target="1.4" taskname="examples" /> + </target> - <target name="generate-opengl-capabilities" depends="generators" description="Generates java and native source for GL"> - <!-- Generate context capabilities --> - <apply executable="apt" parallel="true"> - <arg value="-nocompile"/> - <arg value="-factory"/> - <arg value="org.lwjgl.util.generator.ContextGeneratorProcessorFactory"/> - <arg value="-cp"/> - <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/> - <arg value="-s"/> - <arg path="${lwjgl.src}/generated"/> - <arg value="-Acontextspecific"/> - <fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/> - </apply> - </target> - - <target name="compile_native_all" depends="compile_native" description="Compiles the native files"/> - - <!-- Compiles the native files --> <target name="compile_native" depends="headers" description="Compiles the native files"> - <!-- check each platform, and run their build target --> <condition property="lwjgl.platform.windows"> <os family="windows" /> </condition> @@ -603,75 +269,65 @@ </copy> </target> + <!-- Compiles LWJGL on Mac platforms --> <target name="-compile_native_macosx" if="lwjgl.platform.macosx"> <ant antfile="platform_build/macosx_ant/build.xml" inheritAll="false"/> <copy file="${lwjgl.bin}/lwjgl/liblwjgl.jnilib" todir="${lwjgl.lib}/macosx"/> </target> + + <target name="repack200" description="Pack200-repack a jar file"> + <pack200 src="${input}" destfile="${output}" repack="true"/> + </target> - <target name="webstart_demo" depends="jars"> - <antcall target="-webstart_demo"> - <param name="keystore" value="applet/lwjglkeystore"/> - <param name="alias" value="lwjgl"/> - <param name="password" value="123456"/> - </antcall> + <target name="pack200" description="Pack200 a jar file"> + <pack200 src="${input}" destfile="${output}"/> </target> - - <target name="webstart_demo-release" depends="jars"> - <input message="Please type the password for the keystore" addproperty="sign.pwd"/> - <antcall target="-webstart_demo"> - <param name="keystore" value="signing/matzon_java_code_signing.keystore"/> - <param name="alias" value="oddlabs_java_code_signing"/> - <param name="password" value="${sign.pwd}"/> - </antcall> + <target name="lzma" description="LZMA compress a file"> + <java fork="true" classname="SevenZip.LzmaAlone"> + <classpath> + <pathelement location="platform_build/JLzma.jar"/> + </classpath> + <jvmarg value="-Xmx512m"/> + <arg value="e"/> + <arg value="${input}"/> + <arg value="${output}"/> + </java> </target> - <!-- --> - <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"/> - - <!-- move files to unified structure --> - <move todir="${lwjgl.temp}/jnlp/temp"> - <fileset dir="${lwjgl.temp}/jnlp/temp/lwjgl-${lwjgl.version}/"> - <include name="**"/> - </fileset> - </move> - - <!-- move relevant files to root --> - <move todir="${lwjgl.temp}/jnlp/" flatten="true"> - <fileset dir="${lwjgl.temp}/jnlp/temp"> - <include name="**/**.jar"/> - </fileset> - </move> - - <!-- create native jars --> - <jar destfile="${lwjgl.temp}/jnlp/native_win32.jar" basedir="${lwjgl.temp}/jnlp/temp/native/win32"/> - <jar destfile="${lwjgl.temp}/jnlp/native_linux.jar" basedir="${lwjgl.temp}/jnlp/temp/native/linux"/> - <jar destfile="${lwjgl.temp}/jnlp/native_macosx.jar" basedir="${lwjgl.temp}/jnlp/temp/native/macosx"/> - - <!-- create media jar --> - <jar destfile="${lwjgl.temp}/jnlp/media.jar" basedir="${lwjgl.res}"/> - - <!-- 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/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_win32.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> - <signjar jar="${lwjgl.temp}/jnlp/jinput.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> + <target name="applettest" depends="applet"> + <exec executable="appletviewer"> + <arg value="-J-Djava.security.policy=applet/appletviewer.policy"/> + <arg path="applet/applet.html"/> + </exec> </target> + + <target name="runtest" depends="all"> + <fail message="test.mainclass is not set. Use 'ant -Dtest.mainclass=<main-class> runtest'" unless="test.mainclass"/> + <condition property="native_path" value="libs/win32"> + <os family="windows" /> + </condition> + + <condition property="native_path" value="libs/linux"> + <os name="Linux" /> + </condition> + + <condition property="native_path" value="libs/macosx"> + <os name="Mac OS X" /> + </condition> + <property name="native_path_expanded" location="${native_path}"/> + <java classname="${test.mainclass}" classpath="res:${lwjgl.lib}/lwjgl.jar:${lwjgl.lib}/lwjgl_util.jar:${lwjgl.lib}/lwjgl_test.jar:${lwjgl.lib}/jinput.jar" fork="true"> + <sysproperty key="org.lwjgl.util.Debug" value="true"/> + <sysproperty key="java.library.path" value="${native_path_expanded}"/> + </java> + </target> - <target name="changelog"> - <cvschangelog destfile="changelog.xml"/> - <style in="changelog.xml" out="changelog.html" style="${ant.home}/etc/changelog.xsl"> - <param name="title" expression="LWJGL ChangeLog"/> - <param name="module" expression="LWJGL"/> - <param name="cvsweb" expression="http://cvs.sourceforge.net/viewcvs.py/java-game-lib/"/> - </style> - </target> + <!-- Creates the Javadoc --> + <target name="javadoc" description="Creates javadoc from java source code"> + <javadoc destdir="${lwjgl.docs}/javadoc" classpath="${lwjgl.lib}/jinput.jar" author="true" version="true" use="true" source="1.4" windowtitle="LWJGL API"> + <fileset refid="lwjgl.javadoc.fileset" /> + <doctitle><![CDATA[<h1>Lightweight Java Game Toolkit</h1>]]></doctitle> + <bottom><![CDATA[<i>Copyright © 2002-2008 lwjgl.org. All Rights Reserved.</i>]]></bottom> + </javadoc> + </target> </project> Added: trunk/LWJGL/platform_build/build-applet.xml =================================================================== --- trunk/LWJGL/platform_build/build-applet.xml (rev 0) +++ trunk/LWJGL/platform_build/build-applet.xml 2008-04-20 18:46:34 UTC (rev 3028) @@ -0,0 +1,94 @@ +<project name="applet"> + + <!-- Create our packer task --> + <taskdef name="pack200" classname="com.sun.tools.apache.ant.pack200.Pack200Task" classpath="platform_build/Pack200Task.jar"/> + + <target name="applet" depends="all"> + <antcall target="-applet"> + <param name="keystore" value="applet/lwjglkeystore"/> + <param name="alias" value="lwjgl"/> + <param name="password" value="123456"/> + </antcall> + </target> + + <target name="applet-release"> + <input message="Please type the password for the keystore" addproperty="sign.pwd"/> + + <antcall target="-applet"> + <param name="keystore" value="signing/matzon_java_code_signing.keystore"/> + <param name="alias" value="oddlabs_java_code_signing"/> + <param name="password" value="${sign.pwd}"/> + </antcall> + </target> + + <target name="-applet"> + + <!-- Create lwjgl_applet.jar --> + <jar destfile="applet/lwjgl_applet.jar" taskname="lwjgl_applet.jar"> + <fileset refid="lwjgl_applet.fileset" /> + </jar> + + <!-- create each of the native jars --> + <jar destfile="applet/windows_natives.jar" taskname="windows_natives.jar"> + <fileset dir="${lwjgl.lib}/win32"> + <patternset refid="lwjgl-win32.fileset"/> + </fileset> + </jar> + <signjar jar="applet/windows_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> + + <jar destfile="applet/linux_natives.jar" taskname="linux_natives.jar"> + <fileset dir="${lwjgl.lib}/linux"> + <patternset refid="lwjgl-linux.fileset"/> + </fileset> + </jar> + <signjar jar="applet/linux_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> + + <jar destfile="applet/macosx_natives.jar" taskname="macosx_natives.jar"> + <fileset dir="${lwjgl.lib}/macosx"> + <patternset refid="lwjgl-macosx.fileset"/> + </fileset> + </jar> + <signjar jar="applet/macosx_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> + + <jar destfile="${lwjgl.lib}/lwjgl_util_applet.jar" update="true"> + <fileset dir="${lwjgl.res}" includes="applet*"/> + </jar> + + <copy file="${lwjgl.lib}/lwjgl.jar" todir="applet"/> + <copy file="${lwjgl.lib}/lwjgl_util_applet.jar" todir="applet"/> + <copy file="${lwjgl.lib}/lwjgl_util.jar" todir="applet"/> + <copy file="${lwjgl.lib}/jinput.jar" todir="applet"/> + <copy file="${lwjgl.lib}/lzma.jar" todir="applet"/> + <zip destfile="applet/res.jar"> + <zipfileset dir="${lwjgl.res}" includes="Footsteps.wav, ILtest.tga, Missing_you.mod"/> + </zip> + + <!--<antcall target="applet-compress"> + <param name="dir" value="applet/"/> + <param name="jarfile" value="lwjgl"/> + </antcall> + <fail/>--> + </target> + + <target name="applet-compress"> + <antcall target="repack"> + <param name="input" value="${dir}${jarfile}.jar"/> + <param name="output" value="${dir}${jarfile}-repack.jar"/> + </antcall> + <signjar jar="${dir}${jarfile}.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> + <signjar jar="${dir}${jarfile}-repack.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> + <antcall target="pack"> + <param name="input" value="${dir}${jarfile}-repack.jar"/> + <param name="output" value="${dir}${jarfile}.jar.pack"/> + </antcall> + <antcall target="lzma"> + <param name="input" value="${dir}${jarfile}.jar.pack"/> + <param name="output" value="${dir}${jarfile}.jar.pack.lzma"/> + </antcall> + <antcall target="lzma"> + <param name="input" value="${dir}${jarfile}.jar"/> + <param name="output" value="${dir}${jarfile}.jar.lzma"/> + </antcall> + <delete file="${dir}${jarfile}-repack.jar"/> + </target> +</project> \ No newline at end of file Property changes on: trunk/LWJGL/platform_build/build-applet.xml ___________________________________________________________________ Name: svn:mime-type + text/plain Added: trunk/LWJGL/platform_build/build-definitions.xml =================================================================== --- trunk/LWJGL/platform_build/build-definitions.xml (rev 0) +++ trunk/LWJGL/platform_build/build-definitions.xml 2008-04-20 18:46:34 UTC (rev 3028) @@ -0,0 +1,150 @@ +<project name="definitions"> + <!-- ================================================================== --> + <!-- Global properties for build --> + <!-- ================================================================== --> + <property name="lwjgl.src" location="src" /> + <property name="lwjgl.src.native" location="${lwjgl.src}/native" /> + <property name="lwjgl.src.headers" location="${lwjgl.src.native}/common" /> + <property name="lwjgl.src.templates" location="${lwjgl.src}/templates" /> + <property name="lwjgl.bin" location="bin" /> + <property name="lwjgl.lib" location="libs" /> + <property name="lwjgl.dist" location="dist" /> + <property name="lwjgl.docs" location="doc" /> + <property name="lwjgl.temp" location="temp" /> + <property name="lwjgl.res" location="res" /> + <property name="lwjgl.version" value="2.0a4" /> + + <property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java"/> + <!-- ================================================================== --> + <!-- Filesets used for targets --> + <!-- ================================================================== --> + + <!-- Files to include in the lwjgl.jar file --> + <fileset id="lwjgl.fileset" dir="${lwjgl.bin}"> + <include name="org/**/*" /> + <exclude name="org/lwjgl/d3d/**" /> + <exclude name="org/lwjgl/test/**" /> + <exclude name="org/lwjgl/util/**" /> + <exclude name="org/lwjgl/examples/**" /> + </fileset> + + <fileset id="lwjgl_util_applet.fileset" dir="${lwjgl.bin}"> + <exclude name="**.*"/> + <include name="org/lwjgl/util/applet/**"/> + </fileset> + + <!-- Files to include in the lwjgl_test.jar file --> + <fileset id="lwjgl_test.fileset" dir="${lwjgl.bin}"> + <exclude name="**.*" /> + <include name="org/lwjgl/test/**" /> + <include name="org/lwjgl/examples/**" /> + </fileset> + + <!-- More files to include in the lwjgl_test.jar file --> + <fileset id="lwjgl_test_extra.fileset" dir="${lwjgl.src}/java"> + <exclude name="**.*" /> + <include name="org/lwjgl/test/opengl/shaders/shaderFP.fp" /> + <include name="org/lwjgl/test/opengl/shaders/shaderFP.vp" /> + <include name="org/lwjgl/test/opengl/shaders/shaderFSH.fsh" /> + <include name="org/lwjgl/test/opengl/shaders/shaderFSH.vsh" /> + <include name="org/lwjgl/test/opengl/shaders/shaderVP.vp" /> + <include name="org/lwjgl/test/opengl/shaders/shaderVSH.vsh" /> + </fileset> + + <!-- Files to include in the lwjgl_util.jar file --> + <fileset id="lwjgl_util.fileset" dir="${lwjgl.bin}"> + <exclude name="**.*" /> + <exclude name="org/lwjgl/util/generator/**" /> + <exclude name="org/lwjgl/util/applet/**" /> + <include name="org/lwjgl/util/**" /> + </fileset> + + <!-- Files to include in the lwjgl_applet.jar file --> + <fileset id="lwjgl_applet.fileset" dir="${lwjgl.bin}"> + <exclude name="**.*"/> + <include name="org/lwjgl/test/applet/**"/> + <include name="org/lwjgl/test/opengl/awt/AWTGearsCanvas.class"/> + </fileset> + + <!-- Files to make Javadoc from --> + <fileset id="lwjgl.javadoc.fileset" dir="${lwjgl.src}"> + <include name="**/*.java" /> + <exclude name="native/**" /> + <exclude name="templates/**" /> + <exclude name="java/org/lwjgl/test/**" /> + <exclude name="java/org/lwjgl/examples/**" /> + <exclude name="java/org/lwjgl/util/generator/**" /> + </fileset> + + <!-- Files to include in doc package --> + <patternset id="lwjgl-docs.fileset"> + <include name="CREDITS" /> + <include name="LICENSE" /> + <include name="README" /> + <include name="lwjgl_hidden_switches.text" /> + <include name="3rdparty/*" /> + </patternset> + + <!-- Files to include in win32 package --> + <patternset id="lwjgl-win32.fileset"> + <include name="lwjgl.dll" /> + <include name="OpenAL32.dll" /> + <include name="jinput-dx8.dll" /> + <include name="jinput-raw.dll" /> + </patternset> + + <!-- Files to include in linux, glibc2.3 package --> + <patternset id="lwjgl-linux.fileset"> + <include name="liblwjgl*.so" /> + <include name="libopenal.so" /> + <include name="libjinput-linux.so" /> + <include name="libjinput-linux64.so" /> + </patternset> + + <!-- Files to include in mac os x package --> + <patternset id="lwjgl-macosx.fileset"> + <include name="liblwjgl.jnilib" /> + <include name="openal.dylib" /> + <include name="libjinput-osx.jnilib" /> + <include name="libjinput-osx-legacy.jnilib" /> + </patternset> + + <!-- Files to include in source distribution --> + <fileset id="lwjgl.source.fileset" dir="."> + <include name="build.xml" /> + <include name="src/**" /> + <include name="platform_build/**/*" /> + </fileset> + + <!-- files in the base package --> + <patternset id="lwjgl_base"> + <include name="**" /> + <exclude name="res/ILtest.*" /> + <exclude name="res/Missing_you.mod" /> + <exclude name="res/phero*.*" /> + </patternset> + + <!-- files in the optional package --> + <patternset id="lwjgl_optional"> + <include name="res/**" /> + <exclude name="res/logo/**" /> + <exclude name="res/spaceinvaders/**" /> + <exclude name="res/*.wav" /> + <exclude name="res/*.xpm" /> + <include name="doc/CREDITS" /> + <include name="doc/LICENSE" /> + <include name="doc/README" /> + </patternset> + + <!-- files in the lwjgl_applet package --> + <patternset id="lwjgl_applet"> + <include name="applet/**" /> + <exclude name="applet/appletviewer.policy" /> + <exclude name="applet/lwjglkeystore" /> + </patternset> + + <uptodate property="lwjgl.main.built" targetfile="${lwjgl.lib}/win32/lwjgl.dll" > + <srcfiles dir= "${lwjgl.src.native}/common" includes="*.c*"/> + <srcfiles dir= "${lwjgl.src.native}/windows" includes="*.c"/> + </uptodate> +</project> \ No newline at end of file Property changes on: trunk/LWJGL/platform_build/build-definitions.xml ___________________________________________________________________ Name: svn:mime-type + text/plain Added: trunk/LWJGL/platform_build/build-generator.xml =================================================================== --- trunk/LWJGL/platform_build/build-generator.xml (rev 0) +++ trunk/LWJGL/platform_build/build-generator.xml 2008-04-20 18:46:34 UTC (rev 3028) @@ -0,0 +1,86 @@ +<project name="generator"> + + <!-- clean the generated files --> + <target name="clean-generated" description="Deletes the generated java and native source"> + <delete quiet="true" failonerror="false"> + <fileset dir="${lwjgl.src}/generated" includes="**"/> + <fileset dir="${lwjgl.src.native}/generated" includes="**"/> + </delete> + </target> + + <!-- Compiles the Java generator source code --> + <target name="generators" description="Compiles the native method generators"> + <javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/util/generator/**.java" source="1.5" target="1.5" taskname="generator"> + <compilerarg value="-Xlint:all"/> + </javac> + </target> + + <!-- Proxy target to generate it all --> + <target name="generate-all" depends="generate-openal, generate-opengl, generate-opengl-capabilities, generate-opengl-references" description="Generates java and native source"/> + + <!-- Generate OpenAL --> + <target name="generate-openal" depends="generators" description="Generates java and native source for AL"> + <apply executable="apt" parallel="true"> + <arg value="-nocompile"/> + <arg value="-factory"/> + <arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/> + <arg value="-cp"/> + <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/> + <arg value="-s"/> + <arg path="${lwjgl.src}/generated"/> + <arg value="-d"/> + <arg path="${lwjgl.src.native}/generated"/> + <arg value="-Atypemap=org.lwjgl.util.generator.ALTypeMap"/> + <arg value="-Ageneratechecks"/> + <fileset dir="${lwjgl.src.templates}" includes="org/lwjgl/openal/AL10.java, org/lwjgl/openal/AL11.java"/> + </apply> + </target> + + <!-- Generate OpenGL --> + <target name="generate-opengl" depends="generators" description="Generates java and native source for GL"> + <apply executable="apt" parallel="true"> + <arg value="-nocompile"/> + <arg value="-factory"/> + <arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/> + <arg value="-cp"/> + <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/> + <arg value="-s"/> + <arg path="${lwjgl.src}/generated"/> + <arg value="-d"/> + <arg path="${lwjgl.src.native}/generated"/> + <!-- <arg value="-Ageneratechecks"/>--> + <arg value="-Acontextspecific"/> + <arg value="-Atypemap=org.lwjgl.util.generator.GLTypeMap"/> + <fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/> + </apply> + </target> + + <!-- Generate context capabilities --> + <target name="generate-opengl-references" depends="generators" description="Generates java and native source for GL"> + <apply executable="apt" parallel="true"> + <arg value="-nocompile"/> + <arg value="-factory"/> + <arg value="org.lwjgl.util.generator.ReferencesGeneratorProcessorFactory"/> + <arg value="-cp"/> + <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/> + <arg value="-s"/> + <arg path="${lwjgl.src}/generated"/> + <fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/> + </apply> + </target> + + <!-- Generate context capabilities --> + <target name="generate-opengl-capabilities" depends="generators" description="Generates java and native source for GL"> + <apply executable="apt" parallel="true"> + <arg value="-nocompile"/> + <arg value="-factory"/> + <arg value="org.lwjgl.util.generator.ContextGeneratorProcessorFactory"/> + <arg value="-cp"/> + <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/> + <arg value="-s"/> + <arg path="${lwjgl.src}/generated"/> + <arg value="-Acontextspecific"/> + <fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/> + </apply> + </target> +</project> \ No newline at end of file Property changes on: trunk/LWJGL/platform_build/build-generator.xml ___________________________________________________________________ Name: svn:mime-type + text/plain Added: trunk/LWJGL/platform_build/build-webstart.xml =================================================================== --- trunk/LWJGL/platform_build/build-webstart.xml (rev 0) +++ trunk/LWJGL/platform_build/build-webstart.xml 2008-04-20 18:46:34 UTC (rev 3028) @@ -0,0 +1,59 @@ +<project name="webstart"> + <target name="webstart_demo" depends="jars"> + <antcall target="-webstart_demo"> + <param name="keystore" value="applet/lwjglkeystore"/> + <param name="alias" value="lwjgl"/> + <param name="password" value="123456"/> + </antcall> + </target> + + <target name="webstart_demo-release" depends="jars"> + <input message="Please type the password for the keystore" addproperty="sign.pwd"/> + + <antcall target="-webstart_demo"> + <param name="keystore" value="signing/matzon_java_code_signing.keystore"/> + <param name="alias" value="oddlabs_java_code_signing"/> + <param name="password" value="${sign.pwd}"/> + </antcall> + </target> + + <!-- --> + <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"/> + + <!-- move files to unified structure --> + <move todir="${lwjgl.temp}/jnlp/temp"> + <fileset dir="${lwjgl.temp}/jnlp/temp/lwjgl-${lwjgl.version}/"> + <include name="**"/> + </fileset> + </move> + + <!-- move relevant files to root --> + <move todir="${lwjgl.temp}/jnlp/" flatten="true"> + <fileset dir="${lwjgl.temp}/jnlp/temp"> + <include name="**/**.jar"/> + </fileset> + </move> + + <!-- create native jars --> + <jar destfile="${lwjgl.temp}/jnlp/native_win32.jar" basedir="${lwjgl.temp}/jnlp/temp/native/win32"/> + <jar destfile="${lwjgl.temp}/jnlp/native_linux.jar" basedir="${lwjgl.temp}/jnlp/temp/native/linux"/> + <jar destfile="${lwjgl.temp}/jnlp/native_macosx.jar" basedir="${lwjgl.temp}/jnlp/temp/native/macosx"/> + + <!-- create media jar --> + <jar destfile="${lwjgl.temp}/jnlp/media.jar" basedir="${lwjgl.res}"/> + + <!-- 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/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_win32.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> + <signjar jar="${lwjgl.temp}/jnlp/jinput.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> + </target> +</project> \ No newline at end of file Property changes on: trunk/LWJGL/platform_build/build-webstart.xml ___________________________________________________________________ Name: svn:mime-type + text/plain This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2008-04-20 20:02:06
|
Revision: 3030 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3030&view=rev Author: matzon Date: 2008-04-20 13:02:02 -0700 (Sun, 20 Apr 2008) Log Message: ----------- use lzma and pack200 compression for applet distribution Modified Paths: -------------- trunk/LWJGL/build.xml trunk/LWJGL/platform_build/build-applet.xml Added Paths: ----------- trunk/LWJGL/platform_build/JLzma.jar trunk/LWJGL/platform_build/Pack200Task.jar Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2008-04-20 19:55:55 UTC (rev 3029) +++ trunk/LWJGL/build.xml 2008-04-20 20:02:02 UTC (rev 3030) @@ -293,8 +293,35 @@ <arg value="${input}"/> <arg value="${output}"/> </java> - </target> + </target> + <target name="compress-sign-class"> + <antcall target="repack200"> + <param name="input" value="${dir}${jarfile}.jar"/> + <param name="output" value="${dir}${jarfile}-repack.jar"/> + </antcall> + <signjar jar="${dir}${jarfile}-repack.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> + <antcall target="pack200"> + <param name="input" value="${dir}${jarfile}-repack.jar"/> + <param name="output" value="${dir}${jarfile}.jar.pack"/> + </antcall> + <antcall target="lzma"> + <param name="input" value="${dir}${jarfile}.jar.pack"/> + <param name="output" value="${dir}${jarfile}.jar.pack.lzma"/> + </antcall> + <delete file="${dir}${jarfile}-repack.jar"/> + <delete file="${dir}${jarfile}.jar.pack"/> + <delete file="${dir}${jarfile}.jar"/> + </target> + + <target name="compress-resource"> + <antcall target="lzma"> + <param name="input" value="${input}"/> + <param name="output" value="${output}"/> + </antcall> + <delete file="${input}"/> + </target> + <target name="applettest" depends="applet"> <exec executable="appletviewer"> <arg value="-J-Djava.security.policy=applet/appletviewer.policy"/> Added: trunk/LWJGL/platform_build/JLzma.jar =================================================================== (Binary files differ) Property changes on: trunk/LWJGL/platform_build/JLzma.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/LWJGL/platform_build/Pack200Task.jar =================================================================== (Binary files differ) Property changes on: trunk/LWJGL/platform_build/Pack200Task.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/LWJGL/platform_build/build-applet.xml =================================================================== --- trunk/LWJGL/platform_build/build-applet.xml 2008-04-20 19:55:55 UTC (rev 3029) +++ trunk/LWJGL/platform_build/build-applet.xml 2008-04-20 20:02:02 UTC (rev 3030) @@ -50,9 +50,9 @@ </jar> <signjar jar="applet/macosx_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> - <jar destfile="${lwjgl.lib}/lwjgl_util_applet.jar" update="true"> - <fileset dir="${lwjgl.res}" includes="applet*"/> - </jar> + <jar destfile="${lwjgl.lib}/lwjgl_util_applet.jar" update="true"> + <fileset dir="${lwjgl.res}" includes="applet*"/> + </jar> <copy file="${lwjgl.lib}/lwjgl.jar" todir="applet"/> <copy file="${lwjgl.lib}/lwjgl_util_applet.jar" todir="applet"/> @@ -62,33 +62,39 @@ <zip destfile="applet/res.jar"> <zipfileset dir="${lwjgl.res}" includes="Footsteps.wav, ILtest.tga, Missing_you.mod"/> </zip> + <signjar jar="applet/lwjgl_util_applet.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> - <!--<antcall target="applet-compress"> + <antcall target="compress-sign-class"> <param name="dir" value="applet/"/> <param name="jarfile" value="lwjgl"/> </antcall> - <fail/>--> - </target> - - <target name="applet-compress"> - <antcall target="repack"> - <param name="input" value="${dir}${jarfile}.jar"/> - <param name="output" value="${dir}${jarfile}-repack.jar"/> + <antcall target="compress-sign-class"> + <param name="dir" value="applet/"/> + <param name="jarfile" value="lwjgl_util"/> </antcall> - <signjar jar="${dir}${jarfile}.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> - <signjar jar="${dir}${jarfile}-repack.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> - <antcall target="pack"> - <param name="input" value="${dir}${jarfile}-repack.jar"/> - <param name="output" value="${dir}${jarfile}.jar.pack"/> + <antcall target="compress-sign-class"> + <param name="dir" value="applet/"/> + <param name="jarfile" value="jinput"/> </antcall> - <antcall target="lzma"> - <param name="input" value="${dir}${jarfile}.jar.pack"/> - <param name="output" value="${dir}${jarfile}.jar.pack.lzma"/> + <antcall target="compress-sign-class"> + <param name="dir" value="applet/"/> + <param name="jarfile" value="lwjgl_applet"/> </antcall> - <antcall target="lzma"> - <param name="input" value="${dir}${jarfile}.jar"/> - <param name="output" value="${dir}${jarfile}.jar.lzma"/> + <antcall target="compress-resource"> + <param name="input" value="applet/windows_natives.jar"/> + <param name="output" value="applet/windows_natives.jar.lzma"/> </antcall> - <delete file="${dir}${jarfile}-repack.jar"/> + <antcall target="compress-resource"> + <param name="input" value="applet/macosx_natives.jar"/> + <param name="output" value="applet/macosx_natives.jar.lzma"/> + </antcall> + <antcall target="compress-resource"> + <param name="input" value="applet/linux_natives.jar"/> + <param name="output" value="applet/linux_natives.jar.lzma"/> + </antcall> + <antcall target="compress-resource"> + <param name="input" value="applet/res.jar"/> + <param name="output" value="applet/res.jar.lzma"/> + </antcall> </target> </project> \ 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...> - 2008-04-20 20:06:44
|
Revision: 3033 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3033&view=rev Author: matzon Date: 2008-04-20 13:06:42 -0700 (Sun, 20 Apr 2008) Log Message: ----------- update version string to 2.0 beta 1 Modified Paths: -------------- trunk/LWJGL/platform_build/build-definitions.xml trunk/LWJGL/src/java/org/lwjgl/Sys.java Modified: trunk/LWJGL/platform_build/build-definitions.xml =================================================================== --- trunk/LWJGL/platform_build/build-definitions.xml 2008-04-20 20:05:09 UTC (rev 3032) +++ trunk/LWJGL/platform_build/build-definitions.xml 2008-04-20 20:06:42 UTC (rev 3033) @@ -12,7 +12,7 @@ <property name="lwjgl.docs" location="doc" /> <property name="lwjgl.temp" location="temp" /> <property name="lwjgl.res" location="res" /> - <property name="lwjgl.version" value="2.0a4" /> + <property name="lwjgl.version" value="2.0b1" /> <property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java"/> <!-- ================================================================== --> Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2008-04-20 20:05:09 UTC (rev 3032) +++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2008-04-20 20:06:42 UTC (rev 3033) @@ -54,7 +54,7 @@ private static final String JNI_LIBRARY_NAME = "lwjgl"; /** Current version of library */ - private static final String VERSION = "2.0a4"; + private static final String VERSION = "2.0b1"; /** Current version of the JNI library */ static final int JNI_VERSION = 16; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eli...@us...> - 2008-04-22 16:52:24
|
Revision: 3037 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3037&view=rev Author: elias_naur Date: 2008-04-22 09:52:16 -0700 (Tue, 22 Apr 2008) Log Message: ----------- Added ApplejavaExtensions.jar to be able to use apple extensions without reflection Modified Paths: -------------- trunk/LWJGL/build.xml trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java Added Paths: ----------- trunk/LWJGL/libs/AppleJavaExtensions.jar Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2008-04-21 20:53:18 UTC (rev 3036) +++ trunk/LWJGL/build.xml 2008-04-22 16:52:16 UTC (rev 3037) @@ -224,7 +224,7 @@ <!-- Compiles the Java source code --> <target name="compile" description="Compiles the java source code" depends="-initialize"> - <javac debug="yes" destdir="${lwjgl.bin}" source="1.4" target="1.4" classpath="${lwjgl.lib}/jinput.jar" taskname="core"> + <javac debug="yes" destdir="${lwjgl.bin}" source="1.4" target="1.4" classpath="${lwjgl.lib}/jinput.jar:${lwjgl.lib}/AppleJavaExtensions.jar" taskname="core"> <src path="${lwjgl.src}/java/"/> <src path="${lwjgl.src}/generated/"/> <include name="org/lwjgl/*.java"/> Added: trunk/LWJGL/libs/AppleJavaExtensions.jar =================================================================== (Binary files differ) Property changes on: trunk/LWJGL/libs/AppleJavaExtensions.jar ___________________________________________________________________ Name: svn:executable + * Name: svn:mime-type + application/octet-stream Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java 2008-04-21 20:53:18 UTC (rev 3036) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java 2008-04-22 16:52:16 UTC (rev 3037) @@ -57,6 +57,8 @@ import org.lwjgl.LWJGLException; import org.lwjgl.LWJGLUtil; +import com.apple.eawt.*; + final class MacOSXDisplay implements DisplayImplementation { private static final int PBUFFER_HANDLE_SIZE = 24; private static final int GAMMA_LENGTH = 256; @@ -73,7 +75,24 @@ private boolean close_requested; MacOSXDisplay() { - new MacOSXApplicationListener(); + try { + AccessController.doPrivileged(new PrivilegedExceptionAction() { + public Object run() throws Exception { + Application.getApplication().addApplicationListener(new ApplicationAdapter() { + public final void handleQuit(ApplicationEvent event) { + doHandleQuit(); + } + }); + return null; + } + }); + } catch (Throwable e) { + /** + * In an applet environment, referencing com.apple.eawt.Application can fail with + * a native exception. So log any exceptions instead of re-throwing. + */ + LWJGLUtil.log("Failed to register quit handler: " + e.getMessage()); + } } public void createWindow(DisplayMode mode, boolean fullscreen, Canvas parent, int x, int y) throws LWJGLException { @@ -96,7 +115,7 @@ } } - private void handleQuit() { + private void doHandleQuit() { synchronized (this) { close_requested = true; } @@ -407,51 +426,6 @@ return 0; } - /** - * This class captures com.apple.eawt.ApplicationEvents through reflection - * to enable compilation on other platforms than Mac OS X - */ - private class MacOSXApplicationListener implements InvocationHandler { - private final Method handleQuit; - - public MacOSXApplicationListener() { - Method m = null; - try { - m = (Method)AccessController.doPrivileged(new PrivilegedExceptionAction() { - public Object run() throws Exception { - /* Get the com.apple.eawt.Application class */ - Class com_apple_eawt_Application = Class.forName("com.apple.eawt.Application"); - /* Call the static Application.getApplication() method */ - Object application = com_apple_eawt_Application.getMethod("getApplication", null).invoke(null, null); - /* Create a proxy implementing com.apple.eawt.ApplicationListener */ - Class com_apple_eawt_ApplicationListener = Class.forName("com.apple.eawt.ApplicationListener"); - Object listener_proxy = Proxy.newProxyInstance(getClass().getClassLoader(), new Class[] {com_apple_eawt_ApplicationListener}, MacOSXApplicationListener.this); - /* Invoke the method application.addApplicationListener(proxy) */ - Method addApplicationListener = com_apple_eawt_Application.getMethod("addApplicationListener", new Class[]{com_apple_eawt_ApplicationListener}); - addApplicationListener.invoke(application, new Object[]{listener_proxy}); - /* Finally, get the handleQuit method we want to react to */ - Class com_apple_eawt_ApplicationEvent = Class.forName("com.apple.eawt.ApplicationEvent"); - return com_apple_eawt_ApplicationListener.getMethod("handleQuit", new Class[]{com_apple_eawt_ApplicationEvent}); - } - }); - } catch (Throwable e) { - /** - * In an applet environment, referencing com.apple.eawt.Application can fail with - * a native exception. So log any exceptions instead of re-throwing. - */ - LWJGLUtil.log("Failed to register quit handler: " + e.getMessage()); -// throw new RuntimeException(e); - } - handleQuit = m; - } - - public Object invoke(Object proxy, Method method, Object[] args) { - if (method.equals(handleQuit)) - handleQuit(); - return null; - } - } - public boolean isBufferLost(PeerInfo handle) { return false; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eli...@us...> - 2008-04-22 18:09:48
|
Revision: 3039 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3039&view=rev Author: elias_naur Date: 2008-04-22 11:09:45 -0700 (Tue, 22 Apr 2008) Log Message: ----------- Added GearsApplet test Modified Paths: -------------- trunk/LWJGL/applet/appletloader.html Added Paths: ----------- trunk/LWJGL/src/java/org/lwjgl/test/applet/GearsApplet.java Modified: trunk/LWJGL/applet/appletloader.html =================================================================== --- trunk/LWJGL/applet/appletloader.html 2008-04-22 17:56:41 UTC (rev 3038) +++ trunk/LWJGL/applet/appletloader.html 2008-04-22 18:09:45 UTC (rev 3039) @@ -13,7 +13,7 @@ <param name="al_title" value="appletloadertest"> <!-- Main Applet Class --> - <param name="al_main" value="org.lwjgl.test.applet.AppletLoaderTest"> + <param name="al_main" value="org.lwjgl.test.applet.GearsApplet"> <!-- logo to paint while loading, will be centered --> <param name="al_logo" value="appletlogo.png"> @@ -63,4 +63,4 @@ </p> </body> -</html> \ No newline at end of file +</html> Added: trunk/LWJGL/src/java/org/lwjgl/test/applet/GearsApplet.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/test/applet/GearsApplet.java (rev 0) +++ trunk/LWJGL/src/java/org/lwjgl/test/applet/GearsApplet.java 2008-04-22 18:09:45 UTC (rev 3039) @@ -0,0 +1,340 @@ +package org.lwjgl.test.applet; + +import java.applet.Applet; +import java.awt.BorderLayout; +import java.awt.Canvas; +import java.nio.FloatBuffer; +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLException; +import org.lwjgl.opengl.ARBTransposeMatrix; +import org.lwjgl.opengl.Display; +import org.lwjgl.input.Keyboard; +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GLContext; + +public class GearsApplet extends Applet { + + Canvas display_parent; + Thread gameThread; + + boolean running = false; + + private float view_rotx = 20.0f; + private float view_roty = 30.0f; + private float view_rotz = 0.0f; + private int gear1; + private int gear2; + private int gear3; + private float angle = 0.0f; + + + boolean keyDown = false; + + public void destroy() { + remove(display_parent); + super.destroy(); + System.out.println("Clear up"); + } + + private void destroyLWJGL() { + stopApplet(); + try { + gameThread.join(); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + /** + * @see java.applet.Applet#start() + */ + public void start() { + gameThread = new Thread() { + public void run() { + running = true; + try { + System.out.println("display_parent.isDisplayable() = " + display_parent.isDisplayable()); + Display.setParent(display_parent); + //Display.setVSyncEnabled(true); + Display.create(); + initGL(); + } catch (LWJGLException e) { + e.printStackTrace(); + } + gameLoop(); + } + }; + gameThread.start(); + } + + public void stop() { + } + + public void stopApplet() { + running = false; + } + + public void init() { + setLayout(new BorderLayout()); + try { + display_parent = new Canvas() { + public final void removeNotify() { + destroyLWJGL(); + super.removeNotify(); + } + }; + display_parent.setSize(getWidth(),getHeight()); + add(display_parent); + display_parent.setFocusable(true); + display_parent.requestFocus(); + display_parent.setIgnoreRepaint(true); + //setResizable(true); + setVisible(true); + } catch (Exception e) { + System.err.println(e); + throw new RuntimeException("Unable to create display"); + } + } + + public void gameLoop() { + long startTime = System.currentTimeMillis() + 5000; + long fps = 0; + + while(running) { + angle += 2.0f; + + // draw the gears + drawLoop(); + + Display.update(); + + if (startTime > System.currentTimeMillis()) { + fps++; + } else { + long timeUsed = 5000 + (startTime - System.currentTimeMillis()); + startTime = System.currentTimeMillis() + 5000; +/* System.out.println(fps + " frames 2 in " + (float) (timeUsed / 1000f) + " seconds = " + + (fps / (timeUsed / 1000f)));*/ + fps = 0; + } + + if (Keyboard.isKeyDown(Keyboard.KEY_LEFT)) + view_roty += .1f; + else if (Keyboard.isKeyDown(Keyboard.KEY_RIGHT)) + view_roty -= .1f; + + if (Keyboard.isKeyDown(Keyboard.KEY_F)) { + keyDown = true; + } + + // F Key Pressed (i.e. released) + if (keyDown && !Keyboard.isKeyDown(Keyboard.KEY_F)) { + keyDown = false; + + try { + if (Display.isFullscreen()) { + Display.setFullscreen(false); + } + else { + Display.setFullscreen(true); + } + } catch (LWJGLException e) { + e.printStackTrace(); + } + } + } + + Display.destroy(); + } + + public void drawLoop() { + GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT); + GL11.glPushMatrix(); + GL11.glRotatef(view_rotx, 1.0f, 0.0f, 0.0f); + GL11.glRotatef(view_roty, 0.0f, 1.0f, 0.0f); + GL11.glRotatef(view_rotz, 0.0f, 0.0f, 1.0f); + GL11.glPushMatrix(); + GL11.glTranslatef(-3.0f, -2.0f, 0.0f); + GL11.glRotatef(angle, 0.0f, 0.0f, 1.0f); + GL11.glCallList(gear1); + GL11.glPopMatrix(); + GL11.glPushMatrix(); + GL11.glTranslatef(3.1f, -2.0f, 0.0f); + GL11.glRotatef(-2.0f * angle - 9.0f, 0.0f, 0.0f, 1.0f); + GL11.glCallList(gear2); + GL11.glPopMatrix(); + GL11.glPushMatrix(); + GL11.glTranslatef(-3.1f, 4.2f, 0.0f); + GL11.glRotatef(-2.0f * angle - 25.0f, 0.0f, 0.0f, 1.0f); + GL11.glCallList(gear3); + GL11.glPopMatrix(); + GL11.glPopMatrix(); + } + + protected void initGL() { + try { + // setup ogl + FloatBuffer pos = FloatBuffer.wrap(new float[] { 5.0f, 5.0f, 10.0f, 0.0f}); + FloatBuffer red = FloatBuffer.wrap(new float[] { 0.8f, 0.1f, 0.0f, 1.0f}); + FloatBuffer green = FloatBuffer.wrap(new float[] { 0.0f, 0.8f, 0.2f, 1.0f}); + FloatBuffer blue = FloatBuffer.wrap(new float[] { 0.2f, 0.2f, 1.0f, 1.0f}); + GL11.glLight(GL11.GL_LIGHT0, GL11.GL_POSITION, pos); + GL11.glEnable(GL11.GL_CULL_FACE); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glEnable(GL11.GL_LIGHT0); + GL11.glEnable(GL11.GL_DEPTH_TEST); + + /* make the gears */ + gear1 = GL11.glGenLists(1); + GL11.glNewList(gear1, GL11.GL_COMPILE); + GL11.glMaterial(GL11.GL_FRONT, GL11.GL_AMBIENT_AND_DIFFUSE, red); + gear(1.0f, 4.0f, 1.0f, 20, 0.7f); + GL11.glEndList(); + gear2 = GL11.glGenLists(1); + GL11.glNewList(gear2, GL11.GL_COMPILE); + GL11.glMaterial(GL11.GL_FRONT, GL11.GL_AMBIENT_AND_DIFFUSE, green); + gear(0.5f, 2.0f, 2.0f, 10, 0.7f); + GL11.glEndList(); + gear3 = GL11.glGenLists(1); + GL11.glNewList(gear3, GL11.GL_COMPILE); + GL11.glMaterial(GL11.GL_FRONT, GL11.GL_AMBIENT_AND_DIFFUSE, blue); + gear(1.3f, 2.0f, 0.5f, 10, 0.7f); + GL11.glEndList(); + GL11.glEnable(GL11.GL_NORMALIZE); + GL11.glMatrixMode(GL11.GL_PROJECTION); +/* System.err.println("GL_VENDOR: " + GL11.glGetString(GL11.GL_VENDOR)); + System.err.println("GL_RENDERER: " + GL11.glGetString(GL11.GL_RENDERER)); + System.err.println("GL_VERSION: " + GL11.glGetString(GL11.GL_VERSION)); + System.err.println(); + System.err.println("glLoadTransposeMatrixfARB() supported: " + GLContext.getCapabilities().GL_ARB_transpose_matrix);*/ + if (!GLContext.getCapabilities().GL_ARB_transpose_matrix) { + // --- not using extensions + GL11.glLoadIdentity(); + } else { + // --- using extensions + final FloatBuffer identityTranspose = BufferUtils.createFloatBuffer(16).put( + new float[] { 1, 0, 0, 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 1}); + identityTranspose.flip(); + ARBTransposeMatrix.glLoadTransposeMatrixARB(identityTranspose); + } + float h = (float) 300 / (float) 300; + GL11.glFrustum(-1.0f, 1.0f, -h, h, 5.0f, 60.0f); + GL11.glMatrixMode(GL11.GL_MODELVIEW); + GL11.glLoadIdentity(); + GL11.glTranslatef(0.0f, 0.0f, -40.0f); + } catch (Exception e) { + System.err.println(e); + stopApplet(); + } + } + + /** + * Draw a gear wheel. You'll probably want to call this function when + * building a display list since we do a lot of trig here. + * + * @param inner_radius radius of hole at center + * @param outer_radius radius at center of teeth + * @param width width of gear + * @param teeth number of teeth + * @param tooth_depth depth of tooth + */ + private void gear(float inner_radius, float outer_radius, float width, int teeth, float tooth_depth) { + int i; + float r0, r1, r2; + float angle, da; + float u, v, len; + + r0 = inner_radius; + r1 = outer_radius - tooth_depth / 2.0f; + r2 = outer_radius + tooth_depth / 2.0f; + da = 2.0f * (float) Math.PI / teeth / 4.0f; + GL11.glShadeModel(GL11.GL_FLAT); + GL11.glNormal3f(0.0f, 0.0f, 1.0f); + /* draw front face */ + GL11.glBegin(GL11.GL_QUAD_STRIP); + for (i = 0; i <= teeth; i++) { + angle = i * 2.0f * (float) Math.PI / teeth; + GL11.glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), width * 0.5f); + GL11.glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), width * 0.5f); + if (i < teeth) { + GL11.glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), width * 0.5f); + GL11.glVertex3f(r1 * (float) Math.cos(angle + 3.0f * da), r1 * (float) Math.sin(angle + 3.0f * da), + width * 0.5f); + } + } + GL11.glEnd(); + + /* draw front sides of teeth */ + GL11.glBegin(GL11.GL_QUADS); + for (i = 0; i < teeth; i++) { + angle = i * 2.0f * (float) Math.PI / teeth; + GL11.glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), width * 0.5f); + GL11.glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), width * 0.5f); + GL11.glVertex3f(r2 * (float) Math.cos(angle + 2.0f * da), r2 * (float) Math.sin(angle + 2.0f * da), width * 0.5f); + GL11.glVertex3f(r1 * (float) Math.cos(angle + 3.0f * da), r1 * (float) Math.sin(angle + 3.0f * da), width * 0.5f); + } + GL11.glEnd(); + + /* draw back face */ + GL11.glBegin(GL11.GL_QUAD_STRIP); + for (i = 0; i <= teeth; i++) { + angle = i * 2.0f * (float) Math.PI / teeth; + GL11.glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), -width * 0.5f); + GL11.glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), -width * 0.5f); + GL11.glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), -width * 0.5f); + GL11.glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), -width * 0.5f); + } + GL11.glEnd(); + + /* draw back sides of teeth */ + GL11.glBegin(GL11.GL_QUADS); + for (i = 0; i < teeth; i++) { + angle = i * 2.0f * (float) Math.PI / teeth; + GL11.glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), -width * 0.5f); + GL11.glVertex3f(r2 * (float) Math.cos(angle + 2 * da), r2 * (float) Math.sin(angle + 2 * da), -width * 0.5f); + GL11.glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), -width * 0.5f); + GL11.glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), -width * 0.5f); + } + GL11.glEnd(); + + /* draw outward faces of teeth */ + GL11.glBegin(GL11.GL_QUAD_STRIP); + for (i = 0; i < teeth; i++) { + angle = i * 2.0f * (float) Math.PI / teeth; + GL11.glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), width * 0.5f); + GL11.glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), -width * 0.5f); + u = r2 * (float) Math.cos(angle + da) - r1 * (float) Math.cos(angle); + v = r2 * (float) Math.sin(angle + da) - r1 * (float) Math.sin(angle); + len = (float) Math.sqrt(u * u + v * v); + u /= len; + v /= len; + GL11.glNormal3f(v, -u, 0.0f); + GL11.glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), width * 0.5f); + GL11.glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), -width * 0.5f); + GL11.glNormal3f((float) Math.cos(angle), (float) Math.sin(angle), 0.0f); + GL11.glVertex3f(r2 * (float) Math.cos(angle + 2 * da), r2 * (float) Math.sin(angle + 2 * da), width * 0.5f); + GL11.glVertex3f(r2 * (float) Math.cos(angle + 2 * da), r2 * (float) Math.sin(angle + 2 * da), -width * 0.5f); + u = r1 * (float) Math.cos(angle + 3 * da) - r2 * (float) Math.cos(angle + 2 * da); + v = r1 * (float) Math.sin(angle + 3 * da) - r2 * (float) Math.sin(angle + 2 * da); + GL11.glNormal3f(v, -u, 0.0f); + GL11.glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), width * 0.5f); + GL11.glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), -width * 0.5f); + GL11.glNormal3f((float) Math.cos(angle), (float) Math.sin(angle), 0.0f); + } + GL11.glVertex3f(r1 * (float) Math.cos(0), r1 * (float) Math.sin(0), width * 0.5f); + GL11.glVertex3f(r1 * (float) Math.cos(0), r1 * (float) Math.sin(0), -width * 0.5f); + GL11.glEnd(); + + GL11.glShadeModel(GL11.GL_SMOOTH); + /* draw inside radius cylinder */ + GL11.glBegin(GL11.GL_QUAD_STRIP); + for (i = 0; i <= teeth; i++) { + angle = i * 2.0f * (float) Math.PI / teeth; + GL11.glNormal3f(-(float) Math.cos(angle), -(float) Math.sin(angle), 0.0f); + GL11.glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), -width * 0.5f); + GL11.glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), width * 0.5f); + } + GL11.glEnd(); + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <eli...@us...> - 2008-04-30 14:58:52
|
Revision: 3055 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3055&view=rev Author: elias_naur Date: 2008-04-30 07:58:47 -0700 (Wed, 30 Apr 2008) Log Message: ----------- Added platform specific getJNIVersion implementations Modified Paths: -------------- trunk/LWJGL/build.xml trunk/LWJGL/src/java/org/lwjgl/DefaultSysImplementation.java trunk/LWJGL/src/java/org/lwjgl/LinuxSysImplementation.java trunk/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java trunk/LWJGL/src/java/org/lwjgl/WindowsSysImplementation.java trunk/LWJGL/src/native/common/common_tools.c trunk/LWJGL/src/native/linux/org_lwjgl_opengl_Display.c trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_Display.m trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Display.c Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2008-04-30 14:34:54 UTC (rev 3054) +++ trunk/LWJGL/build.xml 2008-04-30 14:58:47 UTC (rev 3055) @@ -177,6 +177,7 @@ <!-- Generates the native headers from source files --> <target name="headers" description="invokes javah on java classes" depends="compile"> <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/linux" force="yes"> + <class name="org.lwjgl.LinuxSysImplementation" /> <class name="org.lwjgl.opengl.LinuxEvent" /> <class name="org.lwjgl.opengl.LinuxMouse" /> <class name="org.lwjgl.opengl.LinuxKeyboard" /> @@ -202,6 +203,7 @@ </javah> <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/macosx" force="yes"> + <class name="org.lwjgl.MacOSXSysImplementation" /> <class name="org.lwjgl.opengl.MacOSXMouseEventQueue" /> <class name="org.lwjgl.opengl.MacOSXCanvasPeerInfo" /> <class name="org.lwjgl.opengl.MacOSXPeerInfo" /> Modified: trunk/LWJGL/src/java/org/lwjgl/DefaultSysImplementation.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/DefaultSysImplementation.java 2008-04-30 14:34:54 UTC (rev 3054) +++ trunk/LWJGL/src/java/org/lwjgl/DefaultSysImplementation.java 2008-04-30 14:58:47 UTC (rev 3055) @@ -39,9 +39,6 @@ * $Id$ */ abstract class DefaultSysImplementation implements SysImplementation { - /** Included to let native have easy access to Sys.JNI_VERSION */ - private final static int JNI_VERSION = Sys.JNI_VERSION; - public native int getJNIVersion(); public native void setDebug(boolean debug); Modified: trunk/LWJGL/src/java/org/lwjgl/LinuxSysImplementation.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/LinuxSysImplementation.java 2008-04-30 14:34:54 UTC (rev 3054) +++ trunk/LWJGL/src/java/org/lwjgl/LinuxSysImplementation.java 2008-04-30 14:58:47 UTC (rev 3055) @@ -39,12 +39,14 @@ * $Id$ */ final class LinuxSysImplementation extends J2SESysImplementation { + private final static int JNI_VERSION = 16; + static { java.awt.Toolkit.getDefaultToolkit(); // This will make sure libjawt.so is loaded } public int getRequiredJNIVersion() { - return 16; + return JNI_VERSION; } public boolean openURL(final String url) { Modified: trunk/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java 2008-04-30 14:34:54 UTC (rev 3054) +++ trunk/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java 2008-04-30 14:58:47 UTC (rev 3055) @@ -45,13 +45,15 @@ * $Id$ */ final class MacOSXSysImplementation extends J2SESysImplementation { + private final static int JNI_VERSION = 16; + static { // Make sure AWT is properly initialized. This avoids hangs on Mac OS X 10.3 Toolkit.getDefaultToolkit(); } public int getRequiredJNIVersion() { - return 16; + return JNI_VERSION; } public boolean openURL(String url) { Modified: trunk/LWJGL/src/java/org/lwjgl/WindowsSysImplementation.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/WindowsSysImplementation.java 2008-04-30 14:34:54 UTC (rev 3054) +++ trunk/LWJGL/src/java/org/lwjgl/WindowsSysImplementation.java 2008-04-30 14:58:47 UTC (rev 3055) @@ -39,12 +39,14 @@ * $Id$ */ final class WindowsSysImplementation extends DefaultSysImplementation { + private final static int JNI_VERSION = 16; + static { Sys.initialize(); } public int getRequiredJNIVersion() { - return 16; + return JNI_VERSION; } public long getTimerResolution() { Modified: trunk/LWJGL/src/native/common/common_tools.c =================================================================== --- trunk/LWJGL/src/native/common/common_tools.c 2008-04-30 14:34:54 UTC (rev 3054) +++ trunk/LWJGL/src/native/common/common_tools.c 2008-04-30 14:58:47 UTC (rev 3055) @@ -58,11 +58,6 @@ list->current_index++; } -JNIEXPORT jint JNICALL Java_org_lwjgl_DefaultSysImplementation_getJNIVersion - (JNIEnv *env, jobject ignored) { - return org_lwjgl_DefaultSysImplementation_JNI_VERSION; -} - JNIEXPORT void JNICALL Java_org_lwjgl_DefaultSysImplementation_setDebug (JNIEnv *env, jobject ignored, jboolean enable) { debug = enable == JNI_TRUE ? true : false; Modified: trunk/LWJGL/src/native/linux/org_lwjgl_opengl_Display.c =================================================================== --- trunk/LWJGL/src/native/linux/org_lwjgl_opengl_Display.c 2008-04-30 14:34:54 UTC (rev 3054) +++ trunk/LWJGL/src/native/linux/org_lwjgl_opengl_Display.c 2008-04-30 14:58:47 UTC (rev 3055) @@ -54,6 +54,7 @@ #include "context.h" #include "org_lwjgl_opengl_LinuxDisplay.h" #include "org_lwjgl_opengl_LinuxDisplayPeerInfo.h" +#include "org_lwjgl_LinuxSysImplementation.h" #define ERR_MSG_SIZE 1024 @@ -108,6 +109,11 @@ return (intptr_t)display_connection; } +JNIEXPORT jint JNICALL Java_org_lwjgl_DefaultSysImplementation_getJNIVersion + (JNIEnv *env, jobject ignored) { + return org_lwjgl_LinuxSysImplementation_JNI_VERSION; +} + JNIEXPORT jstring JNICALL Java_org_lwjgl_opengl_LinuxDisplay_getErrorText(JNIEnv *env, jclass unused, jlong display_ptr, jlong error_code) { Display *disp = (Display *)(intptr_t)display_ptr; char err_msg_buffer[ERR_MSG_SIZE]; Modified: trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_Display.m =================================================================== --- trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_Display.m 2008-04-30 14:34:54 UTC (rev 3054) +++ trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_Display.m 2008-04-30 14:58:47 UTC (rev 3055) @@ -47,9 +47,15 @@ //#import "display.h" #import "common_tools.h" #import "org_lwjgl_opengl_MacOSXDisplay.h" +#import "org_lwjgl_MacOSXSysImplementation.h" #define WAIT_DELAY 100 +JNIEXPORT jint JNICALL Java_org_lwjgl_DefaultSysImplementation_getJNIVersion + (JNIEnv *env, jobject ignored) { + return org_lwjgl_MacOSXSysImplementation_JNI_VERSION; +} + JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_restoreGamma(JNIEnv *env, jobject this) { CGDisplayRestoreColorSyncSettings(); } Modified: trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Display.c =================================================================== --- trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Display.c 2008-04-30 14:34:54 UTC (rev 3054) +++ trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Display.c 2008-04-30 14:58:47 UTC (rev 3055) @@ -47,6 +47,7 @@ #include "common_tools.h" #include "display.h" #include "org_lwjgl_opengl_WindowsDisplay.h" +#include "org_lwjgl_WindowsSysImplementation.h" #include "context.h" static HICON small_icon = NULL; @@ -178,6 +179,11 @@ return getAvailableDisplayModes(env); } +JNIEXPORT jint JNICALL Java_org_lwjgl_DefaultSysImplementation_getJNIVersion + (JNIEnv *env, jobject ignored) { + return org_lwjgl_WindowsSysImplementation_JNI_VERSION; +} + static void destroyWindow(JNIEnv *env) { jclass display_class_global = (jclass)(LONG_PTR)GetWindowLongPtr(display_hwnd, GWLP_USERDATA); closeWindow(&display_hwnd, &display_hdc); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |