Part 1/2
- Remove applet - Remove webstart - Refactor all generation to the `target` folder - Remove eclipse-update - Update java version in `.tool-versions` - Update `.gitignore` - Remove unused `res` folder - Only macOS builds work currently - TODO: finish the aforementioned changes to all other targets - `build.sh` runs in headless mode to avoid the focus stealing and performance issues on macOS
|
@ -1,27 +1,11 @@
|
||||||
*.*~
|
*.*~
|
||||||
.*.sw[a-p]
|
.*.sw[a-p]
|
||||||
/.classpath
|
/target
|
||||||
/.nbattrs
|
|
||||||
/.project
|
|
||||||
/bin
|
|
||||||
/dist
|
|
||||||
/doc/javadoc
|
|
||||||
/libs
|
/libs
|
||||||
/src/generated
|
|
||||||
/src/native/generated
|
|
||||||
/src/native/common/Debug
|
/src/native/common/Debug
|
||||||
/src/native/common/Release
|
/src/native/common/Release
|
||||||
/src/native/windows/Debug
|
/src/native/windows/Debug
|
||||||
/src/native/windows/Release
|
/src/native/windows/Release
|
||||||
/temp
|
|
||||||
/src/native/*/org_lwjgl_*.h
|
/src/native/*/org_lwjgl_*.h
|
||||||
/src/native/*/*/org_lwjgl_*.h
|
/src/native/*/*/org_lwjgl_*.h
|
||||||
/src/native/linux/org_lwjgl_opengl_Display.c
|
/src/native/linux/org_lwjgl_opengl_Display.c
|
||||||
|
|
||||||
nbproject/project.xml
|
|
||||||
/nbproject/private/
|
|
||||||
|
|
||||||
/applet/advance/*.jar
|
|
||||||
/applet/basic/*.jar
|
|
||||||
/applet/advance/*.lzma
|
|
||||||
/applet/basic/*.lzma
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
java adoptopenjdk-8.0.302+8
|
java adoptopenjdk-8.0.322+6
|
||||||
|
|
|
@ -1,70 +0,0 @@
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>AppletLoader</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<applet code="org.lwjgl.util.applet.AppletLoader" archive="lwjgl_util_applet.jar, lzma.jar" codebase="." width="640" height="480">
|
|
||||||
|
|
||||||
<!-- The following tags are mandatory -->
|
|
||||||
|
|
||||||
<!-- Name of Applet, will be used as name of directory it is saved in, and will uniquely identify it in cache -->
|
|
||||||
<param name="al_title" value="appletloadertest">
|
|
||||||
|
|
||||||
<!-- Main Applet Class -->
|
|
||||||
<param name="al_main" value="org.lwjgl.test.applet.GearsApplet">
|
|
||||||
|
|
||||||
<!-- List of Jars to add to classpath -->
|
|
||||||
<param name="al_jars" value="lwjgl_applet.jar.pack.lzma, lwjgl.jar.pack.lzma, jinput.jar.pack.lzma, lwjgl_util.jar.pack.lzma">
|
|
||||||
|
|
||||||
<!-- signed windows natives jar in a jar -->
|
|
||||||
<param name="al_windows" value="windows_natives.jar.lzma">
|
|
||||||
|
|
||||||
<!-- signed linux natives jar in a jar -->
|
|
||||||
<param name="al_linux" value="linux_natives.jar.lzma">
|
|
||||||
|
|
||||||
<!-- signed mac osx natives jar in a jar -->
|
|
||||||
<param name="al_mac" value="macosx_natives.jar.lzma">
|
|
||||||
|
|
||||||
<!-- signed solaris natives jar in a jar -->
|
|
||||||
<param name="al_solaris" value="solaris_natives.jar.lzma">
|
|
||||||
|
|
||||||
<!-- Tags under here are optional -->
|
|
||||||
|
|
||||||
<!-- whether to use cache - defaults to true -->
|
|
||||||
<!-- <param name="al_cache" value="true"> -->
|
|
||||||
|
|
||||||
<!-- Version of Applet (case insensitive String), applet files not redownloaded if same version already in cache -->
|
|
||||||
<!-- <param name="al_version" value="0.1"> -->
|
|
||||||
|
|
||||||
<!-- Specify the minimum JRE version required by your applet, defaults to "1.5" -->
|
|
||||||
<param name="al_min_jre" value="1.8">
|
|
||||||
|
|
||||||
<!-- background color to paint with, defaults to white -->
|
|
||||||
<!-- <param name="boxbgcolor" value="#000000"> -->
|
|
||||||
|
|
||||||
<!-- foreground color to paint with, defaults to black -->
|
|
||||||
<!-- <param name="boxfgcolor" value="#ffffff"> -->
|
|
||||||
|
|
||||||
<!-- logo to paint while loading, will be centered, defaults to "appletlogo.gif" -->
|
|
||||||
<!-- <param name="al_logo" value="appletlogo.gif"> -->
|
|
||||||
|
|
||||||
<!-- progressbar to paint while loading. Will be painted on top of logo, width clipped to percentage done, defaults to "appletprogress.gif" -->
|
|
||||||
<!-- <param name="al_progressbar" value="appletprogress.gif"> -->
|
|
||||||
|
|
||||||
<!-- whether to run in debug mode -->
|
|
||||||
<!-- <param name="al_debug" value="true"> -->
|
|
||||||
|
|
||||||
<!-- whether to prepend host to cache path - defaults to true -->
|
|
||||||
<!-- <param name="al_prepend_host" value="true"> -->
|
|
||||||
|
|
||||||
<param name="separate_jvm" value="true">
|
|
||||||
</applet>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
if <code>al_debug</code> is true the applet will load and extract resources with a delay, to be able to see the loader process.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,5 +0,0 @@
|
||||||
keystore "lwjglkeystore";
|
|
||||||
|
|
||||||
grant SignedBy "lwjgl" {
|
|
||||||
permission java.security.AllPermission;
|
|
||||||
};
|
|
|
@ -1,70 +0,0 @@
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>AppletLoader</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<applet code="org.lwjgl.util.applet.AppletLoader" archive="lwjgl_util_applet.jar" codebase="." width="640" height="480">
|
|
||||||
|
|
||||||
<!-- The following tags are mandatory -->
|
|
||||||
|
|
||||||
<!-- Name of Applet, will be used as name of directory it is saved in, and will uniquely identify it in cache -->
|
|
||||||
<param name="al_title" value="appletloadertest">
|
|
||||||
|
|
||||||
<!-- Main Applet Class -->
|
|
||||||
<param name="al_main" value="org.lwjgl.test.applet.GearsApplet">
|
|
||||||
|
|
||||||
<!-- List of Jars to add to classpath -->
|
|
||||||
<param name="al_jars" value="lwjgl_applet.jar, lwjgl.jar, jinput.jar, lwjgl_util.jar">
|
|
||||||
|
|
||||||
<!-- signed windows natives jar in a jar -->
|
|
||||||
<param name="al_windows" value="windows_natives.jar">
|
|
||||||
|
|
||||||
<!-- signed linux natives jar in a jar -->
|
|
||||||
<param name="al_linux" value="linux_natives.jar">
|
|
||||||
|
|
||||||
<!-- signed mac osx natives jar in a jar -->
|
|
||||||
<param name="al_mac" value="macosx_natives.jar">
|
|
||||||
|
|
||||||
<!-- signed solaris natives jar in a jar -->
|
|
||||||
<param name="al_solaris" value="solaris_natives.jar">
|
|
||||||
|
|
||||||
<!-- Tags under here are optional -->
|
|
||||||
|
|
||||||
<!-- whether to use cache - defaults to true -->
|
|
||||||
<!-- <param name="al_cache" value="true"> -->
|
|
||||||
|
|
||||||
<!-- Version of Applet (case insensitive String), applet files not redownloaded if same version already in cache -->
|
|
||||||
<!-- <param name="al_version" value="0.1"> -->
|
|
||||||
|
|
||||||
<!-- Specify the minimum JRE version required by your applet, defaults to "1.5" -->
|
|
||||||
<param name="al_min_jre" value="1.8">
|
|
||||||
|
|
||||||
<!-- background color to paint with, defaults to white -->
|
|
||||||
<!-- <param name="boxbgcolor" value="#000000"> -->
|
|
||||||
|
|
||||||
<!-- foreground color to paint with, defaults to black -->
|
|
||||||
<!-- <param name="boxfgcolor" value="#ffffff"> -->
|
|
||||||
|
|
||||||
<!-- logo to paint while loading, will be centered, defaults to "appletlogo.gif" -->
|
|
||||||
<!-- <param name="al_logo" value="appletlogo.gif"> -->
|
|
||||||
|
|
||||||
<!-- progressbar to paint while loading. Will be painted on top of logo, width clipped to percentage done, defaults to "appletprogress.gif" -->
|
|
||||||
<!-- <param name="al_progressbar" value="appletprogress.gif"> -->
|
|
||||||
|
|
||||||
<!-- whether to run in debug mode -->
|
|
||||||
<!-- <param name="al_debug" value="true"> -->
|
|
||||||
|
|
||||||
<!-- whether to prepend host to cache path - defaults to true -->
|
|
||||||
<!-- <param name="al_prepend_host" value="true"> -->
|
|
||||||
|
|
||||||
<param name="separate_jvm" value="true">
|
|
||||||
</applet>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
if <code>al_debug</code> is true the applet will load and extract resources with a delay, to be able to see the loader process.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
4
build.sh
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# fixes the focus-stealing bug on macOS and seems to improve performance
|
||||||
|
export JAVA_TOOL_OPTIONS='-Djava.awt.headless=true'
|
||||||
|
|
||||||
|
# ensure that JAVA_HOME is set
|
||||||
export JAVA_HOME=${JAVA_HOME:-`asdf where java`}
|
export JAVA_HOME=${JAVA_HOME:-`asdf where java`}
|
||||||
|
|
||||||
ant generate-all
|
ant generate-all
|
||||||
|
|
227
build.xml
|
@ -4,10 +4,7 @@
|
||||||
|
|
||||||
<import file="platform_build/build-definitions.xml"/>
|
<import file="platform_build/build-definitions.xml"/>
|
||||||
<import file="platform_build/build-generator.xml"/>
|
<import file="platform_build/build-generator.xml"/>
|
||||||
<import file="platform_build/build-applet.xml"/>
|
|
||||||
<import file="platform_build/build-webstart.xml"/>
|
|
||||||
<import file="platform_build/build-maven.xml"/>
|
<import file="platform_build/build-maven.xml"/>
|
||||||
<import file="eclipse-update/org.lwjgl.build/build-updatesite.xml"/>
|
|
||||||
|
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
<!-- Everything below this line is targets. -->
|
<!-- Everything below this line is targets. -->
|
||||||
|
@ -18,41 +15,12 @@
|
||||||
<!-- Initialize build -->
|
<!-- Initialize build -->
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
<target name="-initialize">
|
<target name="-initialize">
|
||||||
<mkdir dir="${lwjgl.bin}" taskname="initialiazing bin folder" />
|
<mkdir dir="${lwjgl.target.bundle}" taskname="initialiazing bundle folder" />
|
||||||
<mkdir dir="${lwjgl.bin}/lwjgl" taskname="initialiazing native bin folder" />
|
|
||||||
<mkdir dir="${lwjgl.bin}/lwjgles" taskname="initialiazing native OpenGL ES 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/windows" taskname="initialiazing temp/windows folder" />
|
|
||||||
<mkdir dir="${lwjgl.temp}/native/linux" taskname="initialiazing temp/linux folder" />
|
|
||||||
<mkdir dir="${lwjgl.temp}/native/freebsd" taskname="initialiazing temp/freebsd folder" />
|
|
||||||
<mkdir dir="${lwjgl.temp}/native/openbsd" taskname="initialiazing temp/openbsd folder" />
|
|
||||||
<mkdir dir="${lwjgl.temp}/native/macosx" taskname="initialiazing temp/macosx folder" />
|
|
||||||
<mkdir dir="${lwjgl.temp}/native/solaris" taskname="initialiazing temp/solaris folder" />
|
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- Cleans up any files created during the execution of this script -->
|
<!-- Cleans up any files created during the execution of this script -->
|
||||||
<target name="clean" description="Cleans all directories controlled by this ant script" depends="clean-java, clean-native"/>
|
<target name="clean" description="Cleans all directories controlled by this ant script">
|
||||||
|
<delete dir="${lwjgl.target}" quiet="true" failonerror="false" taskname="cleaning target folder" />
|
||||||
<!-- Cleans up any non-native files created during the execution of this script -->
|
|
||||||
<target name="clean-java" description="Cleans non-native files generated 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 java classes only to avoid unnecessary native recompilation -->
|
|
||||||
<delete dir="${lwjgl.bin}/org" quiet="true" failonerror="false" taskname="cleaning bin folder" />
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- Useful when we need to force native recompilation -->
|
|
||||||
<target name="clean-native" description="Cleans native files generated by this ant script" depends="clean-generated-native">
|
|
||||||
<delete dir="${lwjgl.bin}/lwjgl" quiet="true" failonerror="false" taskname="cleaning native bin folder" />
|
|
||||||
<delete dir="${lwjgl.bin}/lwjgles" quiet="true" failonerror="false" taskname="cleaning native OpenGL ES bin folder"/>
|
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- Creates a distribution of LWJGL -->
|
<!-- Creates a distribution of LWJGL -->
|
||||||
|
@ -60,7 +28,7 @@
|
||||||
<!-- Warn user -->
|
<!-- Warn user -->
|
||||||
<echo message="Before running the release target, please manually compile all platforms and place required files in ${lwjgl.lib}/windows, ${lwjgl.lib}/linux, ${lwjgl.lib}/freebsd and ${lwjgl.lib}/macosx${line.separator}Missing files will result in a successfull built, but with incomplete release zips"/>
|
<echo message="Before running the release target, please manually compile all platforms and place required files in ${lwjgl.lib}/windows, ${lwjgl.lib}/linux, ${lwjgl.lib}/freebsd and ${lwjgl.lib}/macosx${line.separator}Missing files will result in a successfull built, but with incomplete release zips"/>
|
||||||
<input
|
<input
|
||||||
message="All data in the ${lwjgl.dist} folder will be deleted. Continue? "
|
message="All data in the ${lwjgl.target} folder will be deleted. Continue? "
|
||||||
validargs="yes,no"
|
validargs="yes,no"
|
||||||
addproperty="do.delete"
|
addproperty="do.delete"
|
||||||
/>
|
/>
|
||||||
|
@ -70,8 +38,7 @@
|
||||||
<fail if="do.abort">Build aborted by user.</fail>
|
<fail if="do.abort">Build aborted by user.</fail>
|
||||||
|
|
||||||
<!-- prepare -->
|
<!-- prepare -->
|
||||||
<delete dir="${lwjgl.dist}" quiet="true" failonerror="false" />
|
<antcall target="clean" />
|
||||||
<antcall target="clean-java" />
|
|
||||||
<antcall target="-initialize" />
|
<antcall target="-initialize" />
|
||||||
|
|
||||||
<!-- compile and create debug jars -->
|
<!-- compile and create debug jars -->
|
||||||
|
@ -79,9 +46,6 @@
|
||||||
<antcall target="compile" />
|
<antcall target="compile" />
|
||||||
<antcall target="-createdebugjars" />
|
<antcall target="-createdebugjars" />
|
||||||
|
|
||||||
<!-- Generator will skip all templates if we don't clean -->
|
|
||||||
<delete dir="${lwjgl.bin}/org" quiet="true" failonerror="false" taskname="cleaning bin folder" />
|
|
||||||
|
|
||||||
<!-- compile and create jars -->
|
<!-- compile and create jars -->
|
||||||
<antcall target="generate-all" />
|
<antcall target="generate-all" />
|
||||||
<antcall target="compile" />
|
<antcall target="compile" />
|
||||||
|
@ -89,16 +53,15 @@
|
||||||
|
|
||||||
<antcall target="-jars_NoDEP" />
|
<antcall target="-jars_NoDEP" />
|
||||||
<antcall target="javadoc" />
|
<antcall target="javadoc" />
|
||||||
<antcall target="applet-release" />
|
|
||||||
|
|
||||||
<!-- copy resources to res folder -->
|
<!-- copy resources to res folder -->
|
||||||
<copy todir="${lwjgl.temp}/res">
|
<copy todir="${lwjgl.target.staging}/res">
|
||||||
<fileset dir="res"/>
|
<fileset dir="res"/>
|
||||||
</copy>
|
</copy>
|
||||||
|
|
||||||
<!-- copy docs -->
|
<!-- copy docs -->
|
||||||
<copy todir="${lwjgl.temp}/doc">
|
<copy todir="${lwjgl.target.staging}/doc">
|
||||||
<fileset dir="${lwjgl.docs}">
|
<fileset dir="${lwjgl.target.doc}">
|
||||||
<patternset refid="lwjgl-docs.fileset" />
|
<patternset refid="lwjgl-docs.fileset" />
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
|
@ -124,7 +87,7 @@
|
||||||
|
|
||||||
<target name="-jars_NoDEP">
|
<target name="-jars_NoDEP">
|
||||||
<move todir="libs/">
|
<move todir="libs/">
|
||||||
<fileset dir="${lwjgl.temp}/jar">
|
<fileset dir="${lwjgl.target.staging}/jar">
|
||||||
<include name="*.jar"/>
|
<include name="*.jar"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
</move>
|
</move>
|
||||||
|
@ -133,7 +96,7 @@
|
||||||
<!-- Packages the java files -->
|
<!-- Packages the java files -->
|
||||||
<target name="-createdebugjars">
|
<target name="-createdebugjars">
|
||||||
<!-- Create lwjgl.jar -->
|
<!-- Create lwjgl.jar -->
|
||||||
<jar destfile="${lwjgl.temp}/jar/lwjgl-debug.jar" taskname="lwjgl-debug.jar">
|
<jar destfile="${lwjgl.target.staging}/jar/lwjgl-debug.jar" taskname="lwjgl-debug.jar">
|
||||||
<fileset refid="lwjgl.fileset" />
|
<fileset refid="lwjgl.fileset" />
|
||||||
<fileset refid="lwjgl.fileset.dependencies"/>
|
<fileset refid="lwjgl.fileset.dependencies"/>
|
||||||
<manifest>
|
<manifest>
|
||||||
|
@ -145,7 +108,7 @@
|
||||||
<!-- Packages the java files -->
|
<!-- Packages the java files -->
|
||||||
<target name="-createjars">
|
<target name="-createjars">
|
||||||
<!-- Create lwjgl.jar -->
|
<!-- Create lwjgl.jar -->
|
||||||
<jar destfile="${lwjgl.temp}/jar/lwjgl.jar" taskname="lwjgl.jar">
|
<jar destfile="${lwjgl.target.staging}/jar/lwjgl.jar" taskname="lwjgl.jar">
|
||||||
<fileset refid="lwjgl.fileset" />
|
<fileset refid="lwjgl.fileset" />
|
||||||
<fileset refid="lwjgl.fileset.dependencies"/>
|
<fileset refid="lwjgl.fileset.dependencies"/>
|
||||||
<manifest>
|
<manifest>
|
||||||
|
@ -153,28 +116,14 @@
|
||||||
</manifest>
|
</manifest>
|
||||||
</jar>
|
</jar>
|
||||||
|
|
||||||
<!-- Create lwjgl_util_applet.jar -->
|
|
||||||
<jar destfile="${lwjgl.temp}/jar/lwjgl_util_applet.jar" taskname="lwjgl_util_applet.jar">
|
|
||||||
<fileset dir="${lwjgl.res}" includes="applet*"/>
|
|
||||||
<fileset refid="lwjgl_util_applet.fileset" />
|
|
||||||
<manifest>
|
|
||||||
<attribute name="Sealed" value="true"/>
|
|
||||||
<attribute name="Trusted-Library" value="true"/>
|
|
||||||
<attribute name="Permissions" value="all-permissions"/>
|
|
||||||
<attribute name="Codebase" value="*"/>
|
|
||||||
<attribute name="Caller-Allowable-Codebase" value="*"/>
|
|
||||||
<attribute name="Application-Library-Allowable-Codebase" value="*"/>
|
|
||||||
</manifest>
|
|
||||||
</jar>
|
|
||||||
|
|
||||||
<!-- Create lwjgl_test.jar -->
|
<!-- Create lwjgl_test.jar -->
|
||||||
<jar destfile="${lwjgl.temp}/jar/lwjgl_test.jar" taskname="lwjgl_test.jar">
|
<jar destfile="${lwjgl.target.staging}/jar/lwjgl_test.jar" taskname="lwjgl_test.jar">
|
||||||
<fileset refid="lwjgl_test.fileset" />
|
<fileset refid="lwjgl_test.fileset" />
|
||||||
<fileset refid="lwjgl_test_extra.fileset" />
|
<fileset refid="lwjgl_test_extra.fileset" />
|
||||||
</jar>
|
</jar>
|
||||||
|
|
||||||
<!-- Create lwjgl_util.jar -->
|
<!-- Create lwjgl_util.jar -->
|
||||||
<jar destfile="${lwjgl.temp}/jar/lwjgl_util.jar" taskname="lwjgl_util.jar">
|
<jar destfile="${lwjgl.target.staging}/jar/lwjgl_util.jar" taskname="lwjgl_util.jar">
|
||||||
<fileset refid="lwjgl_util.fileset" />
|
<fileset refid="lwjgl_util.fileset" />
|
||||||
</jar>
|
</jar>
|
||||||
</target>
|
</target>
|
||||||
|
@ -184,7 +133,7 @@
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
<!-- Generate a list of the OpenGL extension classes -->
|
<!-- Generate a list of the OpenGL extension classes -->
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
<fileset id="opengl-template-fileset" dir="${lwjgl.src}/generated/org/lwjgl/opengl" includes="${opengl-template-pattern}"/>
|
<fileset id="opengl-template-fileset" dir="${lwjgl.target.gen.java}/org/lwjgl/opengl" includes="${opengl-template-pattern}"/>
|
||||||
<property name="opengl-template-files" refid="opengl-template-fileset"/>
|
<property name="opengl-template-files" refid="opengl-template-fileset"/>
|
||||||
|
|
||||||
<tempfile property="temp.file"/>
|
<tempfile property="temp.file"/>
|
||||||
|
@ -203,9 +152,9 @@
|
||||||
<delete file="${temp.file}" />
|
<delete file="${temp.file}" />
|
||||||
|
|
||||||
<!-- Create lwjgl.jar -->
|
<!-- Create lwjgl.jar -->
|
||||||
<jar destfile="${lwjgl.temp}/jar/lwjgl.jar" taskname="lwjgl.jar">
|
<jar destfile="${lwjgl.target.staging}/jar/lwjgl.jar" taskname="lwjgl.jar">
|
||||||
<!-- Files to include in the lwjgl.jar file, for the ES build -->
|
<!-- Files to include in the lwjgl.jar file, for the ES build -->
|
||||||
<fileset dir="${lwjgl.bin}" excludes="${opengl-template-classes}">
|
<fileset dir="${lwjgl.target.gen.classes}" excludes="${opengl-template-classes}">
|
||||||
<patternset id="lwjgl_es.package.pattern">
|
<patternset id="lwjgl_es.package.pattern">
|
||||||
<include name="org/**/*"/>
|
<include name="org/**/*"/>
|
||||||
<exclude name="org/lwjgl/d3d/**"/>
|
<exclude name="org/lwjgl/d3d/**"/>
|
||||||
|
@ -221,7 +170,7 @@
|
||||||
</jar>
|
</jar>
|
||||||
|
|
||||||
<!-- Create lwjgl_test.jar -->
|
<!-- Create lwjgl_test.jar -->
|
||||||
<jar destfile="${lwjgl.temp}/jar/lwjgl_test.jar" taskname="lwjgl_test.jar">
|
<jar destfile="${lwjgl.target.staging}/jar/lwjgl_test.jar" taskname="lwjgl_test.jar">
|
||||||
<fileset refid="lwjgl_test_es.fileset"/>
|
<fileset refid="lwjgl_test_es.fileset"/>
|
||||||
</jar>
|
</jar>
|
||||||
</target>
|
</target>
|
||||||
|
@ -229,73 +178,66 @@
|
||||||
<!-- Distributes files -->
|
<!-- Distributes files -->
|
||||||
<target name="-distribute">
|
<target name="-distribute">
|
||||||
<delete>
|
<delete>
|
||||||
<fileset dir="${lwjgl.temp}/native/" includes="**/*"/>
|
<fileset dir="${lwjgl.target.staging}/native/" includes="**/*"/>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<copy todir="${lwjgl.temp}/jar">
|
<copy todir="${lwjgl.target.staging}/jar">
|
||||||
<fileset dir="${lwjgl.lib}/" includes="*.jar"/>
|
<fileset dir="${lwjgl.lib}/" includes="*.jar"/>
|
||||||
</copy>
|
</copy>
|
||||||
<copy todir="${lwjgl.temp}/native/windows">
|
<copy todir="${lwjgl.target.staging}/native/windows">
|
||||||
<fileset dir="${lwjgl.lib}/windows">
|
<fileset dir="${lwjgl.lib}/windows">
|
||||||
<patternset refid="lwjgl-windows.fileset" />
|
<patternset refid="lwjgl-windows.fileset" />
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<copy todir="${lwjgl.temp}/native/linux">
|
<copy todir="${lwjgl.target.staging}/native/linux">
|
||||||
<fileset dir="${lwjgl.lib}/linux">
|
<fileset dir="${lwjgl.lib}/linux">
|
||||||
<patternset refid="lwjgl-linux.fileset" />
|
<patternset refid="lwjgl-linux.fileset" />
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<copy todir="${lwjgl.temp}/native/freebsd" failonerror="false">
|
<copy todir="${lwjgl.target.staging}/native/freebsd" failonerror="false">
|
||||||
<fileset dir="${lwjgl.lib}/freebsd">
|
<fileset dir="${lwjgl.lib}/freebsd">
|
||||||
<patternset refid="lwjgl-freebsd.fileset" />
|
<patternset refid="lwjgl-freebsd.fileset" />
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<copy todir="${lwjgl.temp}/native/openbsd" failonerror="false">
|
<copy todir="${lwjgl.target.staging}/native/openbsd" failonerror="false">
|
||||||
<fileset dir="${lwjgl.lib}/openbsd">
|
<fileset dir="${lwjgl.lib}/openbsd">
|
||||||
<patternset refid="lwjgl-openbsd.fileset" />
|
<patternset refid="lwjgl-openbsd.fileset" />
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<copy todir="${lwjgl.temp}/native/macosx">
|
<copy todir="${lwjgl.target.staging}/native/macosx">
|
||||||
<fileset dir="${lwjgl.lib}/macosx">
|
<fileset dir="${lwjgl.lib}/macosx">
|
||||||
<patternset refid="lwjgl-macosx.fileset" />
|
<patternset refid="lwjgl-macosx.fileset" />
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<copy todir="${lwjgl.temp}/native/solaris">
|
<copy todir="${lwjgl.target.staging}/native/solaris">
|
||||||
<fileset dir="${lwjgl.lib}/solaris">
|
<fileset dir="${lwjgl.lib}/solaris">
|
||||||
<patternset refid="lwjgl-solaris.fileset" />
|
<patternset refid="lwjgl-solaris.fileset" />
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
|
|
||||||
<!-- create base package -->
|
<!-- create base package -->
|
||||||
<zip destfile="${lwjgl.dist}/lwjgl-${lwjgl.version}.zip">
|
<zip destfile="${lwjgl.target.bundle}/lwjgl-${lwjgl.version}.zip">
|
||||||
<zipfileset dir="${lwjgl.temp}" prefix="lwjgl-${lwjgl.version}/">
|
<zipfileset dir="${lwjgl.target.staging}" prefix="lwjgl-${lwjgl.version}/">
|
||||||
<patternset refid="lwjgl_base"/>
|
<patternset refid="lwjgl_base"/>
|
||||||
</zipfileset>
|
</zipfileset>
|
||||||
</zip>
|
</zip>
|
||||||
|
|
||||||
<!-- create applet package -->
|
|
||||||
<zip destfile="${lwjgl.dist}/lwjgl_applet-${lwjgl.version}.zip">
|
|
||||||
<zipfileset dir="." prefix="lwjgl_applet-${lwjgl.version}/">
|
|
||||||
<patternset refid="lwjgl_applet"/>
|
|
||||||
</zipfileset>
|
|
||||||
</zip>
|
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- Creates a versioned distribution of javadocs -->
|
<!-- Creates a versioned distribution of javadocs -->
|
||||||
<target name="-distribution_javadoc">
|
<target name="-distribution_javadoc">
|
||||||
<zip destfile="${lwjgl.dist}/lwjgl-docs-${lwjgl.version}.zip" basedir="${lwjgl.docs}" includes="javadoc/**" />
|
<zip destfile="${lwjgl.target.bundle}/lwjgl-docs-${lwjgl.version}.zip" basedir="${lwjgl.target.doc}" includes="javadoc/**" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- Creates a versioned distribution of the source code -->
|
<!-- Creates a versioned distribution of the source code -->
|
||||||
<target name="-distribution_source">
|
<target name="-distribution_source">
|
||||||
<zip destfile="${lwjgl.dist}/lwjgl-source-${lwjgl.version}.zip">
|
<zip destfile="${lwjgl.target.bundle}/lwjgl-source-${lwjgl.version}.zip">
|
||||||
<fileset refid="lwjgl.source.fileset" />
|
<fileset refid="lwjgl.source.fileset" />
|
||||||
</zip>
|
</zip>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- Generates the native headers from source files -->
|
<!-- Generates the native headers from source files -->
|
||||||
<target name="headers" description="invokes javah on java classes" depends="compile">
|
<target name="headers" description="invokes javah on java classes" depends="compile">
|
||||||
<javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/linux">
|
<javah classpath="${lwjgl.target.gen.classes}" destdir="${lwjgl.src.native}/linux">
|
||||||
<class name="org.lwjgl.LinuxSysImplementation" />
|
<class name="org.lwjgl.LinuxSysImplementation" />
|
||||||
<class name="org.lwjgl.opengl.LinuxEvent" />
|
<class name="org.lwjgl.opengl.LinuxEvent" />
|
||||||
<class name="org.lwjgl.opengl.LinuxMouse" />
|
<class name="org.lwjgl.opengl.LinuxMouse" />
|
||||||
|
@ -304,7 +246,7 @@
|
||||||
<class name="org.lwjgl.opengl.LinuxPeerInfo" />
|
<class name="org.lwjgl.opengl.LinuxPeerInfo" />
|
||||||
</javah>
|
</javah>
|
||||||
|
|
||||||
<javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/linux/opengl">
|
<javah classpath="${lwjgl.target.gen.classes}" destdir="${lwjgl.src.native}/linux/opengl">
|
||||||
<class name="org.lwjgl.opengl.LinuxPbufferPeerInfo"/>
|
<class name="org.lwjgl.opengl.LinuxPbufferPeerInfo"/>
|
||||||
<class name="org.lwjgl.opengl.LinuxDisplayPeerInfo"/>
|
<class name="org.lwjgl.opengl.LinuxDisplayPeerInfo"/>
|
||||||
<class name="org.lwjgl.opengl.LinuxAWTGLCanvasPeerInfo"/>
|
<class name="org.lwjgl.opengl.LinuxAWTGLCanvasPeerInfo"/>
|
||||||
|
@ -312,7 +254,7 @@
|
||||||
<class name="org.lwjgl.opengl.LinuxCanvasImplementation"/>
|
<class name="org.lwjgl.opengl.LinuxCanvasImplementation"/>
|
||||||
</javah>
|
</javah>
|
||||||
|
|
||||||
<javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/windows">
|
<javah classpath="${lwjgl.target.gen.classes}" destdir="${lwjgl.src.native}/windows">
|
||||||
<class name="org.lwjgl.WindowsSysImplementation"/>
|
<class name="org.lwjgl.WindowsSysImplementation"/>
|
||||||
<class name="org.lwjgl.opengl.WindowsKeyboard" />
|
<class name="org.lwjgl.opengl.WindowsKeyboard" />
|
||||||
<class name="org.lwjgl.opengl.WindowsRegistry" />
|
<class name="org.lwjgl.opengl.WindowsRegistry" />
|
||||||
|
@ -321,17 +263,17 @@
|
||||||
<class name="org.lwjgl.opengl.WindowsAWTGLCanvasPeerInfo"/>
|
<class name="org.lwjgl.opengl.WindowsAWTGLCanvasPeerInfo"/>
|
||||||
</javah>
|
</javah>
|
||||||
|
|
||||||
<javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/windows/opengl">
|
<javah classpath="${lwjgl.target.gen.classes}" destdir="${lwjgl.src.native}/windows/opengl">
|
||||||
<class name="org.lwjgl.opengl.WindowsPbufferPeerInfo"/>
|
<class name="org.lwjgl.opengl.WindowsPbufferPeerInfo"/>
|
||||||
<class name="org.lwjgl.opengl.WindowsPeerInfo"/>
|
<class name="org.lwjgl.opengl.WindowsPeerInfo"/>
|
||||||
<class name="org.lwjgl.opengl.WindowsContextImplementation"/>
|
<class name="org.lwjgl.opengl.WindowsContextImplementation"/>
|
||||||
</javah>
|
</javah>
|
||||||
|
|
||||||
<javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/windows/opengles">
|
<javah classpath="${lwjgl.target.gen.classes}" destdir="${lwjgl.src.native}/windows/opengles">
|
||||||
<class name="org.lwjgl.opengl.WindowsPeerInfo"/>
|
<class name="org.lwjgl.opengl.WindowsPeerInfo"/>
|
||||||
</javah>
|
</javah>
|
||||||
|
|
||||||
<javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/macosx">
|
<javah classpath="${lwjgl.target.gen.classes}" destdir="${lwjgl.src.native}/macosx">
|
||||||
<class name="org.lwjgl.MacOSXSysImplementation" />
|
<class name="org.lwjgl.MacOSXSysImplementation" />
|
||||||
<class name="org.lwjgl.opengl.MacOSXCanvasPeerInfo" />
|
<class name="org.lwjgl.opengl.MacOSXCanvasPeerInfo" />
|
||||||
<class name="org.lwjgl.opengl.MacOSXPeerInfo" />
|
<class name="org.lwjgl.opengl.MacOSXPeerInfo" />
|
||||||
|
@ -343,7 +285,7 @@
|
||||||
<class name="org.lwjgl.opengl.MacOSXMouseEventQueue" />
|
<class name="org.lwjgl.opengl.MacOSXMouseEventQueue" />
|
||||||
</javah>
|
</javah>
|
||||||
|
|
||||||
<javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.headers}">
|
<javah classpath="${lwjgl.target.gen.classes}" destdir="${lwjgl.src.headers}">
|
||||||
<class name="org.lwjgl.opengl.AWTSurfaceLock" />
|
<class name="org.lwjgl.opengl.AWTSurfaceLock" />
|
||||||
<class name="org.lwjgl.DefaultSysImplementation" />
|
<class name="org.lwjgl.DefaultSysImplementation" />
|
||||||
<class name="org.lwjgl.input.Cursor" />
|
<class name="org.lwjgl.input.Cursor" />
|
||||||
|
@ -355,7 +297,7 @@
|
||||||
<class name="org.lwjgl.BufferUtils" />
|
<class name="org.lwjgl.BufferUtils" />
|
||||||
</javah>
|
</javah>
|
||||||
|
|
||||||
<javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.headers}/opengl">
|
<javah classpath="${lwjgl.target.gen.classes}" destdir="${lwjgl.src.headers}/opengl">
|
||||||
<class name="org.lwjgl.opengl.GLContext"/>
|
<class name="org.lwjgl.opengl.GLContext"/>
|
||||||
<class name="org.lwjgl.opengl.Pbuffer"/>
|
<class name="org.lwjgl.opengl.Pbuffer"/>
|
||||||
<class name="org.lwjgl.opengl.CallbackUtil"/>
|
<class name="org.lwjgl.opengl.CallbackUtil"/>
|
||||||
|
@ -363,7 +305,7 @@
|
||||||
<class name="org.lwjgl.opengl.NVVideoCaptureUtil"/>
|
<class name="org.lwjgl.opengl.NVVideoCaptureUtil"/>
|
||||||
</javah>
|
</javah>
|
||||||
|
|
||||||
<javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.headers}/opengles">
|
<javah classpath="${lwjgl.target.gen.classes}" destdir="${lwjgl.src.headers}/opengles">
|
||||||
<class name="org.lwjgl.opengles.EGL"/>
|
<class name="org.lwjgl.opengles.EGL"/>
|
||||||
<class name="org.lwjgl.opengles.EGLKHRFenceSync"/>
|
<class name="org.lwjgl.opengles.EGLKHRFenceSync"/>
|
||||||
<class name="org.lwjgl.opengles.EGLKHRReusableSync"/>
|
<class name="org.lwjgl.opengles.EGLKHRReusableSync"/>
|
||||||
|
@ -437,35 +379,31 @@
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<macrodef name="version-check">
|
<macrodef name="version-check">
|
||||||
<attribute name="platform"/>
|
<attribute name="platform"/>
|
||||||
<sequential>
|
<sequential>
|
||||||
<java classname="org.lwjgl.test.NativeTest" logError="false" resultproperty="nativetest.res" outputproperty="nativetest.out" errorproperty="nativetest.err" fork="true">
|
<java classname="org.lwjgl.test.NativeTest" logError="true" resultproperty="nativetest.res" outputproperty="nativetest.out" errorproperty="nativetest.err" fork="true">
|
||||||
<jvmarg value="-Djava.library.path=libs/@{platform}"/>
|
<jvmarg value="-Djava.library.path=libs/@{platform}"/>
|
||||||
<jvmarg value="-Dorg.lwjgl.util.Debug=true"/>
|
<jvmarg value="-Dorg.lwjgl.util.Debug=true"/>
|
||||||
<classpath>
|
<classpath>
|
||||||
<pathelement path="${lwjgl.bin}"/>
|
<pathelement path="${lwjgl.target.gen.classes}"/>
|
||||||
<pathelement path="${java.class.path}"/>
|
<pathelement path="${java.class.path}"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
</java>
|
</java>
|
||||||
|
|
||||||
<fail message="Unable to load native library: ${nativetest.err}">
|
<fail message="Unable to load native library: ${nativetest.err}">
|
||||||
<condition>
|
<condition><not><equals arg1="OK" arg2="${nativetest.out}"/></not></condition>
|
||||||
<not>
|
</fail>
|
||||||
<equals arg1="OK" arg2="${nativetest.out}"/>
|
|
||||||
</not>
|
|
||||||
</condition>
|
|
||||||
</fail>
|
|
||||||
|
|
||||||
<echo message="Successfully executed NativeTest"/>
|
<echo message="Successfully executed NativeTest"/>
|
||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
|
|
||||||
<!-- Compiles the Java source code -->
|
<!-- Compiles the Java source code -->
|
||||||
<target name="compile" description="Compiles the java source code" depends="-initialize">
|
<target name="compile" description="Compiles the java source code" depends="-initialize">
|
||||||
<javac debug="yes" destdir="${lwjgl.bin}" source="1.8" target="1.8" classpath="${lwjgl.lib}/jinput.jar:${lwjgl.lib}/AppleJavaExtensions.jar:${lwjgl.lib}/asm-debug-all.jar" taskname="core">
|
<javac debug="yes" destdir="${lwjgl.target.gen.classes}" source="1.8" target="1.8" classpath="${lwjgl.lib}/jinput.jar:${lwjgl.lib}/AppleJavaExtensions.jar:${lwjgl.lib}/asm-debug-all.jar" taskname="core">
|
||||||
<!--<compilerarg value="-Xlint:unchecked"/>-->
|
<!--<compilerarg value="-Xlint:unchecked"/>-->
|
||||||
<src path="${lwjgl.src}/java/"/>
|
<src path="${lwjgl.src}/java/"/>
|
||||||
<src path="${lwjgl.src}/generated/"/>
|
<src path="${lwjgl.target.gen.java}/"/>
|
||||||
<include name="org/lwjgl/*.java"/>
|
<include name="org/lwjgl/*.java"/>
|
||||||
<include name="org/lwjgl/input/**"/>
|
<include name="org/lwjgl/input/**"/>
|
||||||
<include name="org/lwjgl/opengl/**"/>
|
<include name="org/lwjgl/opengl/**"/>
|
||||||
|
@ -475,8 +413,8 @@
|
||||||
<include name="org/lwjgl/util/**"/>
|
<include name="org/lwjgl/util/**"/>
|
||||||
<exclude name="org/lwjgl/util/generator/**"/>
|
<exclude name="org/lwjgl/util/generator/**"/>
|
||||||
</javac>
|
</javac>
|
||||||
<javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/test/**" source="1.8" target="1.8" taskname="test" />
|
<javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.target.gen.classes}" includes="org/lwjgl/test/**" source="1.8" target="1.8" taskname="test" />
|
||||||
<javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/examples/**" source="1.8" target="1.8" taskname="examples" />
|
<javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.target.gen.classes}" includes="org/lwjgl/examples/**" source="1.8" target="1.8" taskname="examples" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="compile_native" depends="-initialize, headers, touch-version, version-mismatch" description="Compiles the native files">
|
<target name="compile_native" depends="-initialize, headers, touch-version, version-mismatch" description="Compiles the native files">
|
||||||
|
@ -513,35 +451,35 @@
|
||||||
|
|
||||||
<!-- Compiles LWJGL on Win32 platforms -->
|
<!-- Compiles LWJGL on Win32 platforms -->
|
||||||
<target name="-compile_native_win32" if="lwjgl.platform.windows">
|
<target name="-compile_native_win32" if="lwjgl.platform.windows">
|
||||||
<ant antfile="platform_build/windows_ant/build.xml" inheritAll="false"/>
|
<ant antfile="platform_build/windows_ant/build.xml"/>
|
||||||
<copy todir="${lwjgl.lib}/windows">
|
<copy todir="${lwjgl.lib}/windows">
|
||||||
<fileset dir="${lwjgl.bin}/lwjgl" includes="lwjgl*.dll"/>
|
<fileset dir="${lwjgl.target.gen.classes}/lwjgl" includes="lwjgl*.dll"/>
|
||||||
</copy>
|
</copy>
|
||||||
<version-check platform="windows"/>
|
<version-check platform="windows"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- Compiles LWJGL on Linux platforms -->
|
<!-- Compiles LWJGL on Linux platforms -->
|
||||||
<target name="-compile_native_linux" if="lwjgl.platform.linux">
|
<target name="-compile_native_linux" if="lwjgl.platform.linux">
|
||||||
<ant antfile="platform_build/linux_ant/build.xml" inheritAll="false"/>
|
<ant antfile="platform_build/linux_ant/build.xml"/>
|
||||||
<copy todir="${lwjgl.lib}/linux">
|
<copy todir="${lwjgl.lib}/linux">
|
||||||
<fileset dir="${lwjgl.bin}/lwjgl" includes="liblwjgl*.so"/>
|
<fileset dir="${lwjgl.target.gen.classes}/lwjgl" includes="liblwjgl*.so"/>
|
||||||
</copy>
|
</copy>
|
||||||
<!-- headless issues <version-check platform="linux"/> -->
|
<!-- headless issues <version-check platform="linux"/> -->
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- Compiles LWJGL on FreeBSD platforms -->
|
<!-- Compiles LWJGL on FreeBSD platforms -->
|
||||||
<target name="-compile_native_freebsd" if="lwjgl.platform.freebsd">
|
<target name="-compile_native_freebsd" if="lwjgl.platform.freebsd">
|
||||||
<ant antfile="platform_build/bsd_ant/build.xml" inheritAll="false"/>
|
<ant antfile="platform_build/bsd_ant/build.xml"/>
|
||||||
<copy todir="${lwjgl.lib}/freebsd">
|
<copy todir="${lwjgl.lib}/freebsd">
|
||||||
<fileset dir="${lwjgl.bin}/lwjgl" includes="liblwjgl*.so"/>
|
<fileset dir="${lwjgl.target.gen.classes}/lwjgl" includes="liblwjgl*.so"/>
|
||||||
</copy>
|
</copy>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- Compiles LWJGL on OpenBSD platforms -->
|
<!-- Compiles LWJGL on OpenBSD platforms -->
|
||||||
<target name="-compile_native_openbsd" if="lwjgl.platform.openbsd">
|
<target name="-compile_native_openbsd" if="lwjgl.platform.openbsd">
|
||||||
<ant antfile="platform_build/bsd_ant/build.xml" inheritAll="false"/>
|
<ant antfile="platform_build/bsd_ant/build.xml"/>
|
||||||
<copy todir="${lwjgl.lib}/openbsd">
|
<copy todir="${lwjgl.lib}/openbsd">
|
||||||
<fileset dir="${lwjgl.bin}/lwjgl" includes="liblwjgl*.so"/>
|
<fileset dir="${lwjgl.target.gen.classes}/lwjgl" includes="liblwjgl*.so"/>
|
||||||
</copy>
|
</copy>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
@ -549,17 +487,17 @@
|
||||||
<!-- Compiles LWJGL on solaris platforms -->
|
<!-- Compiles LWJGL on solaris platforms -->
|
||||||
<target name="-compile_native_solaris" if="lwjgl.platform.solaris">
|
<target name="-compile_native_solaris" if="lwjgl.platform.solaris">
|
||||||
<!-- Reusing the linux ant task, but copy the output to solaris -->
|
<!-- Reusing the linux ant task, but copy the output to solaris -->
|
||||||
<ant antfile="platform_build/linux_ant/build.xml" inheritAll="false"/>
|
<ant antfile="platform_build/linux_ant/build.xml"/>
|
||||||
<copy todir="${lwjgl.lib}/solaris">
|
<copy todir="${lwjgl.lib}/solaris">
|
||||||
<fileset dir="${lwjgl.bin}/lwjgl" includes="liblwjgl*.so"/>
|
<fileset dir="${lwjgl.target.gen.classes}/lwjgl" includes="liblwjgl*.so"/>
|
||||||
</copy>
|
</copy>
|
||||||
<version-check platform="solaris"/>
|
<version-check platform="solaris"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- Compiles LWJGL on Mac platforms -->
|
<!-- Compiles LWJGL on Mac platforms -->
|
||||||
<target name="-compile_native_macosx" if="lwjgl.platform.macosx">
|
<target name="-compile_native_macosx" if="lwjgl.platform.macosx">
|
||||||
<ant antfile="platform_build/macosx_ant/build.xml" inheritAll="false"/>
|
<ant antfile="platform_build/macosx_ant/build.xml"/>
|
||||||
<copy file="${lwjgl.bin}/lwjgl/liblwjgl.dylib" todir="${lwjgl.lib}/macosx"/>
|
<copy file="${lwjgl.target.bundle}/liblwjgl.dylib" todir="${lwjgl.lib}/macosx"/>
|
||||||
<version-check platform="macosx"/>
|
<version-check platform="macosx"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
@ -577,17 +515,17 @@
|
||||||
|
|
||||||
<!-- Compiles LWJGL ES on Win32 platforms -->
|
<!-- Compiles LWJGL ES on Win32 platforms -->
|
||||||
<target name="-compile_native_win32_es" if="lwjgl.platform.windows">
|
<target name="-compile_native_win32_es" if="lwjgl.platform.windows">
|
||||||
<ant antfile="platform_build/windows_ant/build_es.xml" inheritAll="false"/>
|
<ant antfile="platform_build/windows_ant/build_es.xml"/>
|
||||||
<copy todir="${lwjgl.lib}/windows">
|
<copy todir="${lwjgl.lib}/windows">
|
||||||
<fileset dir="${lwjgl.bin}/lwjgles" includes="lwjgl*.dll"/>
|
<fileset dir="${lwjgl.target.gen.classes}/lwjgles" includes="lwjgl*.dll"/>
|
||||||
</copy>
|
</copy>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- Compiles LWJGL ES on Linux platforms -->
|
<!-- Compiles LWJGL ES on Linux platforms -->
|
||||||
<target name="-compile_native_linux_es" if="lwjgl.platform.linux">
|
<target name="-compile_native_linux_es" if="lwjgl.platform.linux">
|
||||||
<ant antfile="platform_build/linux_ant/build_es.xml" inheritAll="false"/>
|
<ant antfile="platform_build/linux_ant/build_es.xml"/>
|
||||||
<copy todir="${lwjgl.lib}/linux">
|
<copy todir="${lwjgl.lib}/linux">
|
||||||
<fileset dir="${lwjgl.bin}/lwjgles" includes="liblwjgl*.so"/>
|
<fileset dir="${lwjgl.target.gen.classes}/lwjgles" includes="liblwjgl*.so"/>
|
||||||
</copy>
|
</copy>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
@ -638,13 +576,6 @@
|
||||||
</antcall>
|
</antcall>
|
||||||
</target>
|
</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">
|
<target name="runtest" depends="all">
|
||||||
<fail message="test.mainclass is not set. Use 'ant -Dtest.mainclass=<main-class> runtest'" unless="test.mainclass"/>
|
<fail message="test.mainclass is not set. Use 'ant -Dtest.mainclass=<main-class> runtest'" unless="test.mainclass"/>
|
||||||
<condition property="native_path" value="libs/windows">
|
<condition property="native_path" value="libs/windows">
|
||||||
|
@ -671,22 +602,10 @@
|
||||||
|
|
||||||
<!-- Creates the Javadoc -->
|
<!-- Creates the Javadoc -->
|
||||||
<target name="javadoc" description="Creates javadoc from java source code">
|
<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.8" windowtitle="LWJGL API" useexternalfile="true">
|
<javadoc destdir="${lwjgl.target.doc}/javadoc" classpath="${lwjgl.lib}/jinput.jar" author="true" version="true" use="true" source="1.8" windowtitle="LWJGL API" useexternalfile="true">
|
||||||
<fileset refid="lwjgl.javadoc.fileset" />
|
<fileset refid="lwjgl.javadoc.fileset" />
|
||||||
<doctitle><![CDATA[<h1>Lightweight Java Game Toolkit</h1>]]></doctitle>
|
<doctitle><![CDATA[<h1>Lightweight Java Game Toolkit</h1>]]></doctitle>
|
||||||
<bottom><![CDATA[<i>Copyright © 2002-2009 lwjgl.org. All Rights Reserved.</i>]]></bottom>
|
<bottom><![CDATA[<i>Copyright © 2002-2009 lwjgl.org. All Rights Reserved.</i>]]></bottom>
|
||||||
</javadoc>
|
</javadoc>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- get and copy nightly binaries into libs folder -->
|
|
||||||
<target name="copy-nightly-binaries" depends="-initialize" description="Copies latest successful nightly binaries into appropriate libs folder">
|
|
||||||
<delete file="${lwjgl.temp}/lwjgl-${lwjgl.version}.zip" failonerror="false"/>
|
|
||||||
<get src="http://ci.newdawnsoftware.com/job/LWJGL-git-dist/lastBuild/artifact/dist/lwjgl-${lwjgl.version}.zip" dest="${lwjgl.temp}" verbose="true"/>
|
|
||||||
<unzip src="${lwjgl.temp}/lwjgl-${lwjgl.version}.zip" dest="${lwjgl.lib}" overwrite="true">
|
|
||||||
<patternset>
|
|
||||||
<include name="**/native/**/*lwjgl*"/>
|
|
||||||
</patternset>
|
|
||||||
<globmapper from="lwjgl-${lwjgl.version}/native/*" to="*"/>
|
|
||||||
</unzip>
|
|
||||||
</target>
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
../target/doc/javadoc
|
|
@ -1,8 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<classpath>
|
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
|
||||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
|
||||||
<classpathentry kind="src" path="src/java"/>
|
|
||||||
<classpathentry kind="src" path="test/java"/>
|
|
||||||
<classpathentry kind="output" path="anttasks"/>
|
|
||||||
</classpath>
|
|
|
@ -1,28 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<projectDescription>
|
|
||||||
<name>org.lwjgl.build</name>
|
|
||||||
<comment></comment>
|
|
||||||
<projects>
|
|
||||||
</projects>
|
|
||||||
<buildSpec>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
</buildSpec>
|
|
||||||
<natures>
|
|
||||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
|
||||||
<nature>org.eclipse.pde.PluginNature</nature>
|
|
||||||
</natures>
|
|
||||||
</projectDescription>
|
|
|
@ -1,14 +0,0 @@
|
||||||
Manifest-Version: 1.0
|
|
||||||
Bundle-ManifestVersion: 2
|
|
||||||
Bundle-Name: LWJGL Updatesite Build
|
|
||||||
Bundle-SymbolicName: org.lwjgl.build
|
|
||||||
Bundle-Version: 1.0.0
|
|
||||||
Export-Package: org.lwjgl.ant
|
|
||||||
Import-Package: org.apache.tools.ant,
|
|
||||||
org.apache.tools.ant.taskdefs,
|
|
||||||
org.apache.tools.ant.types,
|
|
||||||
org.apache.tools.ant.types.selectors,
|
|
||||||
org.apache.tools.ant.util,
|
|
||||||
org.junit;version="4"
|
|
||||||
Bundle-Vendor: Lightweight Java Game Library Project
|
|
||||||
Require-Bundle: org.junit;bundle-version="4.8.1"
|
|
|
@ -1,98 +0,0 @@
|
||||||
How to build the Eclipse update site
|
|
||||||
------------------------------------
|
|
||||||
Author: Jens von Pilgrim <developer@jevopi.de>
|
|
||||||
|
|
||||||
Building the Eclipse update site is fully integrated into the main LWJGL build script.
|
|
||||||
Here is how to build the update site:
|
|
||||||
|
|
||||||
Run main lwjgl ant script (LWJGL/build.xml) with target "eclipse-updatesite"
|
|
||||||
|
|
||||||
You will find the updatesite in
|
|
||||||
LWJGL/eclipse-update/org.lwjgl.build/build/plugins/org.lwjgl.updatesite
|
|
||||||
|
|
||||||
Note that there are two targets: eclipse-updatesite and
|
|
||||||
eclipse-updatesite-simple. The first one depends from the target "release",
|
|
||||||
defined in the main build file. However, if you are sure the relase target has
|
|
||||||
been called before, you may want to only create the update site without
|
|
||||||
building the release target again. In that case, you can all
|
|
||||||
eclipse-update-simple.
|
|
||||||
|
|
||||||
The update site build requires some Java classes to be precompiled. These classes
|
|
||||||
can be found in some zip archives in folder plugin-classes and anttasks.jar.
|
|
||||||
Building these classes requires Eclipse dependencies (in case of the
|
|
||||||
plugin-classes) or they define anttasks required to be present when running ant.
|
|
||||||
In order to build these classes, open all projects found in subfolder
|
|
||||||
LWJGL/eclipse-update in Eclipse: this way, all Eclipse classes will get
|
|
||||||
automatically compiled. Then run the ant script buildEclipseClasses.xml from
|
|
||||||
within Eclipse. Actually, this is rarely necessary as the archives are all
|
|
||||||
committed to the LWJGL SVN and will be present if you check out everything. You
|
|
||||||
only need to run that build if the Eclise plugin classes (or the anttasks) were
|
|
||||||
changed.
|
|
||||||
|
|
||||||
The build plugin is part of the LWJGL Eclipse plugins. The following plugins are
|
|
||||||
required:
|
|
||||||
|
|
||||||
org.lwjgl
|
|
||||||
Skeleton plugin, that is it contains the Eclipse Activator for setting up the
|
|
||||||
native library path, but the lwjgl jars are missing. These jars are added by
|
|
||||||
the build script later on
|
|
||||||
|
|
||||||
org.lwjgl.source
|
|
||||||
Skeleton plugin for sources, plugin.xml etc are already configured, but again
|
|
||||||
the sources itself are only added by the build script later on
|
|
||||||
|
|
||||||
org.lwjgl.doc
|
|
||||||
Skeleton plugin for documentation, Javadoc is added by build script, however
|
|
||||||
some Eclipse help files are already in place
|
|
||||||
|
|
||||||
org.lwjgl.info
|
|
||||||
This plugin was called org.lwjgl.test in the elder version. I renamed it as it
|
|
||||||
does not really contain a test but Eclipse views. Besides the spinning torus
|
|
||||||
test view, I added an info view printing out current version of driver etc.
|
|
||||||
and capabilities of user's OpenGL system
|
|
||||||
|
|
||||||
org.lwjgl.tools
|
|
||||||
This plugin contains a library set up for plain Java projects, in order to get
|
|
||||||
rid of defining additional parameters in the run configuration. It is
|
|
||||||
documented in the help files. I have sent you this plugin once, but it never
|
|
||||||
made it into the update site. Well, now it is in place
|
|
||||||
|
|
||||||
org.lwjgl.feature
|
|
||||||
Feature plugin referencing the core lwjgl plugin. It contains two
|
|
||||||
feature.xml definitions, one used for playing around in Eclipse, and a
|
|
||||||
template which is used by the build script. If you ever change something
|
|
||||||
here, pay attention to also change the template file.
|
|
||||||
|
|
||||||
org.lwjgl.feature.sdk
|
|
||||||
Feature plugin referencing the src, doc, tools and info lwjgl plugin.
|
|
||||||
It contains two feature.xml definitions, one used for playing around in
|
|
||||||
Eclipse, and a template which is used by the build script. If you ever change
|
|
||||||
something here, pay attention to also change the template file.
|
|
||||||
|
|
||||||
org.lwjgl.updatesite
|
|
||||||
Well, this is the updatesite. As in the feature project, site.xml comes
|
|
||||||
together with a template version used by the build script.
|
|
||||||
|
|
||||||
org.lwjgl.build -- THIS Plugin
|
|
||||||
This is the build script project. Although it is an Eclipse project, you can
|
|
||||||
simply run the build script with ant from command line. See later on.
|
|
||||||
|
|
||||||
Everything is created in LWJGL/eclipse-update/org.lwjgl.build/build.
|
|
||||||
|
|
||||||
Some additional remarks:
|
|
||||||
- The version number is automatically "normalized" to Eclipse standards,
|
|
||||||
that is 2.6 will become 2.6.0 with the current date and time added.
|
|
||||||
- The lwjgl-debug.jar is not added to the org.lwjgl plugin, as I do not know
|
|
||||||
how to select one or the other. But I have not further investigated in
|
|
||||||
that direction.
|
|
||||||
- Note that only the created plugin and feature jars are signed, and not the
|
|
||||||
nested lwjgl.jar etc., as I figure that you will sign these jars yourself
|
|
||||||
when creating the zip files.
|
|
||||||
- When testing the update site and the installation of plugins, pay attention
|
|
||||||
to the Eclipse P2 system, which caches a lot of things. Simply uninstalling
|
|
||||||
a plugin does not remove the plugins from the Eclipse installation. When
|
|
||||||
the very same version is re-installed, instead of loading new files from the
|
|
||||||
update site these pre-installed versions are reused! Since the date and time
|
|
||||||
is added to the plugin version number, this should cause no problems.
|
|
||||||
- default values for keystore, alias and passphrase are the same as in
|
|
||||||
lwjgl-applet
|
|
|
@ -1,500 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Called from main build script.
|
|
||||||
Expects
|
|
||||||
lwjgl.version
|
|
||||||
to be set.
|
|
||||||
|
|
||||||
(C) 2011 LWJGL-Project
|
|
||||||
Author: Jens von Pilgrim, developer@jevopi.de
|
|
||||||
-->
|
|
||||||
|
|
||||||
<project default="eclipse-updatesite" basedir="." name="eclipse.antscript" xmlns:ant4eclipse="antlib:org.ant4eclipse" xmlns:antcontrib="antlib:net.sf.antcontrib">
|
|
||||||
|
|
||||||
<dirname property="eclipse.antscript.basedir" file="${ant.file.eclipse.antscript}" />
|
|
||||||
|
|
||||||
<property name="keystore" value="applet/lwjglkeystore" />
|
|
||||||
<property name="alias" value="lwjgl" />
|
|
||||||
<property name="password" value="123456" />
|
|
||||||
|
|
||||||
<property name="eclipse.updatesite" value="http://www.lwjgl.org/update/" />
|
|
||||||
<property name="eclipse.bundle.vendor" value="lwjgl.org" />
|
|
||||||
|
|
||||||
<taskdef name="packagelist" classname="org.lwjgl.ant.PackageList">
|
|
||||||
<classpath>
|
|
||||||
<pathelement location="${eclipse.antscript.basedir}/anttasks.jar" />
|
|
||||||
</classpath>
|
|
||||||
</taskdef>
|
|
||||||
<taskdef name="normalizeversion" classname="org.lwjgl.ant.NormalizeVersion">
|
|
||||||
<classpath>
|
|
||||||
<pathelement location="${eclipse.antscript.basedir}/anttasks.jar" />
|
|
||||||
</classpath>
|
|
||||||
</taskdef>
|
|
||||||
<taskdef name="publishBundlesAndFeatures" classname="org.lwjgl.ant.StandalonePublisher">
|
|
||||||
<classpath>
|
|
||||||
<pathelement location="${eclipse.antscript.basedir}/anttasks.jar" />
|
|
||||||
</classpath>
|
|
||||||
</taskdef>
|
|
||||||
|
|
||||||
<!-- properties imported from build-definitions.xml:
|
|
||||||
<property name="lwjgl.temp" location="temp" />
|
|
||||||
<property name="lwjgl.src" location="src" />
|
|
||||||
<property name="lwjgl.version" value="2.8.3" />
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- where to build the update site and temporary build files -->
|
|
||||||
<property name="eclipse.build.path" value="${eclipse.antscript.basedir}/build" />
|
|
||||||
<property name="eclipse.build.temp" value="${eclipse.build.path}/temp" />
|
|
||||||
<property name="eclipse.build.plugins" value="${eclipse.build.path}/plugins" />
|
|
||||||
<property name="eclipse.prebuild-plugin-classes" value="${eclipse.antscript.basedir}/plugin-classes" />
|
|
||||||
|
|
||||||
|
|
||||||
<!-- from where to retrieve LWJGL files -->
|
|
||||||
<property name="eclipse.skeletons.dir" value="${eclipse.antscript.basedir}/.." />
|
|
||||||
|
|
||||||
<!-- base: ${lwjgl.temp} : <patternset refid="lwjgl_applet"/>
|
|
||||||
doc: basedir="${lwjgl.docs}" includes="javadoc/**"
|
|
||||||
source: refid="lwjgl.source.fileset"
|
|
||||||
|
|
||||||
-->
|
|
||||||
|
|
||||||
|
|
||||||
<property name="NL" value=" " />
|
|
||||||
|
|
||||||
|
|
||||||
<target name="eclipse-updatesite">
|
|
||||||
<mkdir dir="${lwjgl.temp}"/>
|
|
||||||
<unzip dest="${lwjgl.temp}/eclipse" src="${lwjgl.dist}/lwjgl-${lwjgl.version}.zip" />
|
|
||||||
<antcall target="eclipse-updatesite-simple" />
|
|
||||||
</target>
|
|
||||||
|
|
||||||
|
|
||||||
<target name="eclipse-updatesite-simple">
|
|
||||||
<normalizeversion version="${lwjgl.version}" property="eclipse.normversion" addDateQualifier="yes" />
|
|
||||||
<echo>Building plugins for version ${lwjgl.version}, normalized version ${eclipse.normversion}</echo>
|
|
||||||
|
|
||||||
<mkdir dir="${eclipse.build.temp}" />
|
|
||||||
|
|
||||||
|
|
||||||
<!-- *******************************************************************
|
|
||||||
*
|
|
||||||
* Assemble plugins
|
|
||||||
*
|
|
||||||
******************************************************************** -->
|
|
||||||
|
|
||||||
<!-- Main plugin: lwjgl.org -->
|
|
||||||
<!-- Copy plugin skeletons -->
|
|
||||||
<mkdir dir="${eclipse.build.plugins}" />
|
|
||||||
<copy todir="${eclipse.build.plugins}/org.lwjgl">
|
|
||||||
<fileset dir="${eclipse.skeletons.dir}/org.lwjgl" casesensitive="yes">
|
|
||||||
<exclude name="**/src/**" />
|
|
||||||
<exclude name="**/*.jar" />
|
|
||||||
<!-- do not copy jars used for development -->
|
|
||||||
<exclude name="**/build/**" />
|
|
||||||
<exclude name="**/build.properties" />
|
|
||||||
<!-- do not copy development settings -->
|
|
||||||
<exclude name="**/.settings/**" />
|
|
||||||
<exclude name="**/.classpath" />
|
|
||||||
<exclude name="**/.project" />
|
|
||||||
<!-- do not copy native libraries -->
|
|
||||||
<exclude name="**/native/**" />
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
<!-- Copy LWJGL native files and classes -->
|
|
||||||
<copy todir="${eclipse.build.plugins}/org.lwjgl">
|
|
||||||
<fileset dir="${lwjgl.temp}/eclipse/lwjgl-${lwjgl.version}/">
|
|
||||||
<patternset refid="lwjgl_base"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
<move todir="${eclipse.build.plugins}/org.lwjgl">
|
|
||||||
<fileset dir="${eclipse.build.plugins}/org.lwjgl/jar">
|
|
||||||
<include name="**" />
|
|
||||||
<exclude name="lwjgl-debug.jar" />
|
|
||||||
</fileset>
|
|
||||||
</move>
|
|
||||||
<delete dir="${eclipse.build.plugins}/org.lwjgl/jar" />
|
|
||||||
<!-- unzip Eclipse dependent classes,
|
|
||||||
have to be previously built by buildEclipseClasses.xml, but
|
|
||||||
are also contained in SVN
|
|
||||||
-->
|
|
||||||
<unzip dest="${eclipse.build.plugins}/org.lwjgl" src="${eclipse.prebuild-plugin-classes}/org.lwjgl.zip" />
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Sources plugin: lwjgl.org.source -->
|
|
||||||
<!-- Copy plugin skeletons -->
|
|
||||||
<copy todir="${eclipse.build.plugins}/org.lwjgl.source">
|
|
||||||
<fileset dir="${eclipse.skeletons.dir}/org.lwjgl.source" casesensitive="yes">
|
|
||||||
<exclude name="**/build.properties" />
|
|
||||||
<exclude name="**/.settings/**" />
|
|
||||||
<exclude name="**/.classpath" />
|
|
||||||
<exclude name="**/.project" />
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
<!-- Create zip files containing the source -->
|
|
||||||
<property name="eclipse.org.lwjgl.src.dir" value="${eclipse.build.plugins}/org.lwjgl.source/src/org.lwjgl_${eclipse.normversion}" />
|
|
||||||
<mkdir dir="${eclipse.org.lwjgl.src.dir}" />
|
|
||||||
<!-- Build src zips for plugin org.lwjgl -->
|
|
||||||
<!-- lwjgl sources (only Java sources) -->
|
|
||||||
<zip destfile="${eclipse.org.lwjgl.src.dir}/lwjglsrc.zip">
|
|
||||||
<fileset dir="${lwjgl.src}/generated" />
|
|
||||||
<fileset dir="${lwjgl.src}/java">
|
|
||||||
<exclude name="org/lwjgl/util/**" />
|
|
||||||
</fileset>
|
|
||||||
</zip>
|
|
||||||
<zip destfile="${eclipse.org.lwjgl.src.dir}/lwjgl_utilsrc.zip">
|
|
||||||
<fileset dir="${lwjgl.src}/java">
|
|
||||||
<include name="org/lwjgl/util/**" />
|
|
||||||
<exclude name="org/lwjgl/util/applet/**" />
|
|
||||||
</fileset>
|
|
||||||
</zip>
|
|
||||||
<zip destfile="${eclipse.org.lwjgl.src.dir}/lwjgl_util_applet.zip">
|
|
||||||
<fileset dir="${lwjgl.src}/java">
|
|
||||||
<include name="org/lwjgl/util/applet/**" />
|
|
||||||
</fileset>
|
|
||||||
</zip>
|
|
||||||
<!-- and the Eclipse related sources -->
|
|
||||||
<zip destfile="${eclipse.org.lwjgl.src.dir}/lwjgl_eclipse.zip">
|
|
||||||
<fileset dir="${eclipse.skeletons.dir}/org.lwjgl/src/java" casesensitive="yes">
|
|
||||||
<include name="org/lwjgl/**" />
|
|
||||||
</fileset>
|
|
||||||
</zip>
|
|
||||||
<zip destfile="${eclipse.org.lwjgl.src.dir}/lwjgl_tools.zip">
|
|
||||||
<fileset dir="${eclipse.skeletons.dir}/org.lwjgl.tools/src/java" casesensitive="yes">
|
|
||||||
<include name="org/lwjgl/**" />
|
|
||||||
</fileset>
|
|
||||||
</zip>
|
|
||||||
<zip destfile="${eclipse.org.lwjgl.src.dir}/lwjgl_info.zip">
|
|
||||||
<fileset dir="${eclipse.skeletons.dir}/org.lwjgl.info/src/java" casesensitive="yes">
|
|
||||||
<include name="org/lwjgl/**" />
|
|
||||||
</fileset>
|
|
||||||
</zip>
|
|
||||||
|
|
||||||
<!-- Documentation plugin: lwjgl.org.doc -->
|
|
||||||
<!-- Copy plugin skeletons including Eclipse documentation-->
|
|
||||||
<copy todir="${eclipse.build.plugins}/org.lwjgl.doc">
|
|
||||||
<fileset dir="${eclipse.skeletons.dir}/org.lwjgl.doc" casesensitive="yes">
|
|
||||||
<exclude name="**/build.properties" />
|
|
||||||
<exclude name="**/.settings/**" />
|
|
||||||
<exclude name="**/.classpath" />
|
|
||||||
<exclude name="**/.project" />
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
<copy todir="${eclipse.build.plugins}/org.lwjgl.doc">
|
|
||||||
<fileset dir="${lwjgl.docs}">
|
|
||||||
<exclude name="javadoc/**" />
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
<!-- create JavaDoc archive -->
|
|
||||||
<zip destfile="${eclipse.build.plugins}/org.lwjgl.doc/doc.zip" basedir="${lwjgl.docs}" includes="javadoc/**" />
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Information view plugin: org.lwjgl.info -->
|
|
||||||
<copy todir="${eclipse.build.plugins}/org.lwjgl.info">
|
|
||||||
<fileset dir="${eclipse.skeletons.dir}/org.lwjgl.info" casesensitive="yes">
|
|
||||||
<exclude name="**/src/**" />
|
|
||||||
<exclude name="**/build/**" />
|
|
||||||
<exclude name="**/build.properties" />
|
|
||||||
<exclude name="**/.settings/**" />
|
|
||||||
<exclude name="**/.classpath" />
|
|
||||||
<exclude name="**/.project" />
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
<!-- unzip Eclipse dependent classes,
|
|
||||||
have to be previously built by buildEclipseClasses.xml, but
|
|
||||||
are also contained in SVN
|
|
||||||
-->
|
|
||||||
<unzip dest="${eclipse.build.plugins}/org.lwjgl.info" src="${eclipse.prebuild-plugin-classes}/org.lwjgl.info.zip" />
|
|
||||||
|
|
||||||
<!-- Tools plugin: org.lwjgl.tools -->
|
|
||||||
<copy todir="${eclipse.build.plugins}/org.lwjgl.tools">
|
|
||||||
<fileset dir="${eclipse.skeletons.dir}/org.lwjgl.tools" casesensitive="yes">
|
|
||||||
<exclude name="**/src/**" />
|
|
||||||
<exclude name="**/build/**" />
|
|
||||||
<exclude name="**/build.properties" />
|
|
||||||
<exclude name="**/.settings/**" />
|
|
||||||
<exclude name="**/.classpath" />
|
|
||||||
<exclude name="**/.project" />
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
<!-- unzip Eclipse dependent classes,
|
|
||||||
have to be previously built by buildEclipseClasses.xml, but
|
|
||||||
are also contained in SVN
|
|
||||||
-->
|
|
||||||
<unzip dest="${eclipse.build.plugins}/org.lwjgl.tools" src="${eclipse.prebuild-plugin-classes}/org.lwjgl.tools.zip" />
|
|
||||||
|
|
||||||
<!-- Feature -->
|
|
||||||
<copy todir="${eclipse.build.plugins}/org.lwjgl.feature">
|
|
||||||
<fileset dir="${eclipse.skeletons.dir}/org.lwjgl.feature" casesensitive="yes">
|
|
||||||
<exclude name="**/build.properties" />
|
|
||||||
<exclude name="**/.settings/**" />
|
|
||||||
<exclude name="**/.classpath" />
|
|
||||||
<exclude name="**/.project" />
|
|
||||||
<exclude name="**/*.template" />
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<!-- Update Site -->
|
|
||||||
<copy todir="${eclipse.build.plugins}/org.lwjgl.updatesite">
|
|
||||||
<fileset dir="${eclipse.skeletons.dir}/org.lwjgl.updatesite" casesensitive="yes">
|
|
||||||
<exclude name="**/.settings/**" />
|
|
||||||
<exclude name="**/.classpath" />
|
|
||||||
<exclude name="**/.project" />
|
|
||||||
<exclude name="**/*.template" />
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- *******************************************************************
|
|
||||||
*
|
|
||||||
* Build manifest files
|
|
||||||
*
|
|
||||||
******************************************************************** -->
|
|
||||||
|
|
||||||
<!-- Calculate package export and bundle class paths -->
|
|
||||||
<packagelist property="eclipse.bundle.export-package" pathsep=",${NL} ">
|
|
||||||
<fileset dir="${lwjgl.temp}/eclipse/lwjgl-${lwjgl.version}/jar">
|
|
||||||
<exclude name="**/lwjgl-debug.jar" />
|
|
||||||
</fileset>
|
|
||||||
<patternset>
|
|
||||||
<exclude name="**/test/**" />
|
|
||||||
<exclude name="**/examples/**" />
|
|
||||||
</patternset>
|
|
||||||
</packagelist>
|
|
||||||
<pathconvert property="eclipse.bundle.classpath.jars" pathsep=",${NL} ">
|
|
||||||
<map from="${lwjgl.temp}/eclipse/lwjgl-${lwjgl.version}/jar/" to="" />
|
|
||||||
<fileset dir="${lwjgl.temp}/eclipse/lwjgl-${lwjgl.version}/jar">
|
|
||||||
<exclude name="**/lwjgl-debug.jar" />
|
|
||||||
<exclude name="**/lwjgl_test.jar" />
|
|
||||||
</fileset>
|
|
||||||
</pathconvert>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- *******************************************************************
|
|
||||||
*
|
|
||||||
* org.lwjgl
|
|
||||||
*
|
|
||||||
* Build manifest files, not using manifest task, since manifest wraps
|
|
||||||
* at the wrong positions (at least ant 1.7)
|
|
||||||
*
|
|
||||||
******************************************************************** -->
|
|
||||||
<echo file="${eclipse.build.plugins}/org.lwjgl/META-INF/MANIFEST.MF" encoding="UTF-8">Manifest-Version: 1.0
|
|
||||||
Bundle-ManifestVersion: 2
|
|
||||||
Bundle-Name: LWJGL Lightweight Java Game Library
|
|
||||||
Bundle-SymbolicName: org.lwjgl
|
|
||||||
Bundle-Version: ${eclipse.normversion}
|
|
||||||
Bundle-Vendor: ${eclipse.bundle.vendor}
|
|
||||||
Bundle-Activator: org.lwjgl.Activator
|
|
||||||
Require-Bundle: org.eclipse.ui,
|
|
||||||
org.eclipse.core.runtime
|
|
||||||
Bundle-ActivationPolicy: lazy
|
|
||||||
Export-Package: org.lwjgl.eclipse,${NL} ${eclipse.bundle.export-package}
|
|
||||||
Bundle-RequiredExecutionEnvironment: J2SE-1.5
|
|
||||||
Bundle-ClassPath: .,${NL} ${eclipse.bundle.classpath.jars}
|
|
||||||
</echo>
|
|
||||||
|
|
||||||
<!-- *******************************************************************
|
|
||||||
*
|
|
||||||
* org.lwjgl.doc
|
|
||||||
*
|
|
||||||
* Build manifest files, not using manifest task, since manifest wraps
|
|
||||||
* at the wrong positions (at least ant 1.7)
|
|
||||||
*
|
|
||||||
******************************************************************** -->
|
|
||||||
|
|
||||||
<echo file="${eclipse.build.plugins}/org.lwjgl.doc/META-INF/MANIFEST.MF" encoding="UTF-8">Manifest-Version: 1.0
|
|
||||||
Bundle-Vendor: ${eclipse.bundle.vendor}
|
|
||||||
Bundle-Version: ${eclipse.normversion}
|
|
||||||
Bundle-SymbolicName: org.lwjgl.doc;singleton:=true
|
|
||||||
Bundle-Localization: plugin
|
|
||||||
Require-Bundle: org.eclipse.help;bundle-version="3.2.0"
|
|
||||||
Eclipse-LazyStart: true
|
|
||||||
</echo>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- *******************************************************************
|
|
||||||
*
|
|
||||||
* org.lwjgl.source
|
|
||||||
*
|
|
||||||
* Build manifest files, not using manifest task, since manifest wraps
|
|
||||||
* at the wrong positions (at least ant 1.7)
|
|
||||||
*
|
|
||||||
******************************************************************** -->
|
|
||||||
|
|
||||||
<!-- Build manfest -->
|
|
||||||
<!-- not using manifest task, since manifest wraps at the wrong positions -->
|
|
||||||
<echo file="${eclipse.build.plugins}/org.lwjgl.source/META-INF/MANIFEST.MF" encoding="UTF-8">Manifest-Version: 1.0
|
|
||||||
Bundle-ManifestVersion: 2
|
|
||||||
Bundle-Name: LWJGL Sources
|
|
||||||
Bundle-Vendor: ${eclipse.bundle.vendor}
|
|
||||||
Bundle-Version: ${eclipse.normversion}
|
|
||||||
Bundle-SymbolicName: org.lwjgl.source;singleton:=true
|
|
||||||
Bundle-Localization: plugin
|
|
||||||
</echo>
|
|
||||||
|
|
||||||
<!-- *******************************************************************
|
|
||||||
*
|
|
||||||
* org.lwjgl.info
|
|
||||||
*
|
|
||||||
* Build manifest files, not using manifest task, since manifest wraps
|
|
||||||
* at the wrong positions (at least ant 1.7)
|
|
||||||
*
|
|
||||||
******************************************************************** -->
|
|
||||||
<echo file="${eclipse.build.plugins}/org.lwjgl.info/META-INF/MANIFEST.MF" encoding="UTF-8">Manifest-Version: 1.0
|
|
||||||
Bundle-ManifestVersion: 2
|
|
||||||
Bundle-Name: LWJGL Test and Info View
|
|
||||||
Bundle-Vendor: ${eclipse.bundle.vendor}
|
|
||||||
Bundle-Version: ${eclipse.normversion}
|
|
||||||
Bundle-SymbolicName: org.lwjgl.info;singleton:=true
|
|
||||||
Bundle-Localization: plugin
|
|
||||||
Require-Bundle: org.eclipse.ui,
|
|
||||||
org.eclipse.core.runtime,
|
|
||||||
org.eclipse.ui.views,
|
|
||||||
org.eclipse.core.resources,
|
|
||||||
org.lwjgl
|
|
||||||
Bundle-RequiredExecutionEnvironment: J2SE-1.5
|
|
||||||
</echo>
|
|
||||||
<!-- Files are already in place -->
|
|
||||||
|
|
||||||
<!-- *******************************************************************
|
|
||||||
*
|
|
||||||
* org.lwjgl.tools
|
|
||||||
*
|
|
||||||
* Build manifest files, not using manifest task, since manifest wraps
|
|
||||||
* at the wrong positions (at least ant 1.7)
|
|
||||||
*
|
|
||||||
******************************************************************** -->
|
|
||||||
<!-- Build plugin org.lwjgl.tools -->
|
|
||||||
<echo file="${eclipse.build.plugins}/org.lwjgl.tools/META-INF/MANIFEST.MF" encoding="UTF-8">Manifest-Version: 1.0
|
|
||||||
Bundle-ManifestVersion: 2
|
|
||||||
Bundle-Name: LWJGL Tools Plug-in
|
|
||||||
Bundle-SymbolicName: org.lwjgl.tools;singleton:=true
|
|
||||||
Bundle-Version: ${eclipse.normversion}
|
|
||||||
Bundle-Vendor: ${eclipse.bundle.vendor}
|
|
||||||
Bundle-Activator: org.lwjgl.tools.Activator
|
|
||||||
Require-Bundle: org.eclipse.ui,
|
|
||||||
org.eclipse.core.runtime,
|
|
||||||
org.eclipse.core.resources;bundle-version="3.4.0",
|
|
||||||
org.eclipse.jdt.core;bundle-version="3.4.0",
|
|
||||||
org.eclipse.jdt.ui;bundle-version="3.4.0",
|
|
||||||
org.lwjgl;bundle-version="${eclipse.normversion}",
|
|
||||||
org.eclipse.jdt.launching;bundle-version="3.4.0"
|
|
||||||
Bundle-ActivationPolicy: lazy
|
|
||||||
Bundle-RequiredExecutionEnvironment: J2SE-1.5
|
|
||||||
</echo>
|
|
||||||
<!-- Files are already in place -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Create features -->
|
|
||||||
|
|
||||||
<!-- *******************************************************************
|
|
||||||
*
|
|
||||||
* org.lwjgl.feature
|
|
||||||
*
|
|
||||||
******************************************************************** -->
|
|
||||||
<!-- Build org.lwjgl.feature -->
|
|
||||||
<copy file="${eclipse.skeletons.dir}/org.lwjgl.feature/feature.xml.template" tofile="${eclipse.build.plugins}/org.lwjgl.feature/feature.xml" encoding="UTF-8" overwrite="true">
|
|
||||||
<filterset>
|
|
||||||
<filter token="VERSION" value="${eclipse.normversion}" />
|
|
||||||
<filter token="PROVIDERNAME" value="${eclipse.bundle.vendor}" />
|
|
||||||
<filter token="UPDATEURL" value="${eclipse.updatesite}" />
|
|
||||||
</filterset>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- *******************************************************************
|
|
||||||
*
|
|
||||||
* org.lwjgl.feature.sdk
|
|
||||||
*
|
|
||||||
******************************************************************** -->
|
|
||||||
<!-- Build org.lwjgl.feature -->
|
|
||||||
<copy file="${eclipse.skeletons.dir}/org.lwjgl.feature.sdk/feature.xml.template" tofile="${eclipse.build.plugins}/org.lwjgl.feature.sdk/feature.xml" encoding="UTF-8" overwrite="true">
|
|
||||||
<filterset>
|
|
||||||
<filter token="VERSION" value="${eclipse.normversion}" />
|
|
||||||
<filter token="PROVIDERNAME" value="${eclipse.bundle.vendor}" />
|
|
||||||
<filter token="UPDATEURL" value="${eclipse.updatesite}" />
|
|
||||||
</filterset>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- *******************************************************************
|
|
||||||
*
|
|
||||||
* Build update site, i.e. zip all plugins and feature with version
|
|
||||||
* number to appropriate place
|
|
||||||
*
|
|
||||||
******************************************************************** -->
|
|
||||||
<!-- Build update site -->
|
|
||||||
<copy file="${eclipse.skeletons.dir}/org.lwjgl.updatesite/site.xml.template" tofile="${eclipse.build.plugins}/org.lwjgl.updatesite/site.xml" encoding="UTF-8" overwrite="true">
|
|
||||||
<filterset>
|
|
||||||
<filter token="VERSION" value="${eclipse.normversion}" />
|
|
||||||
<filter token="PROVIDERNAME" value="${eclipse.bundle.vendor}" />
|
|
||||||
<filter token="UPDATEURL" value="${eclipse.updatesite}" />
|
|
||||||
</filterset>
|
|
||||||
</copy>
|
|
||||||
<mkdir dir="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins" />
|
|
||||||
<mkdir dir="${eclipse.build.plugins}/org.lwjgl.updatesite/features" />
|
|
||||||
<jar destfile="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl_${eclipse.normversion}.jar" manifest="${eclipse.build.plugins}/org.lwjgl/META-INF/MANIFEST.MF">
|
|
||||||
<fileset dir="${eclipse.build.plugins}/org.lwjgl" casesensitive="yes" />
|
|
||||||
</jar>
|
|
||||||
<jar destfile="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.doc_${eclipse.normversion}.jar" manifest="${eclipse.build.plugins}/org.lwjgl.doc/META-INF/MANIFEST.MF">
|
|
||||||
<fileset dir="${eclipse.build.plugins}/org.lwjgl.doc" casesensitive="yes" />
|
|
||||||
</jar>
|
|
||||||
<jar destfile="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.source_${eclipse.normversion}.jar" manifest="${eclipse.build.plugins}/org.lwjgl.source/META-INF/MANIFEST.MF">
|
|
||||||
<fileset dir="${eclipse.build.plugins}/org.lwjgl.source" casesensitive="yes" />
|
|
||||||
</jar>
|
|
||||||
<jar destfile="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.info_${eclipse.normversion}.jar" manifest="${eclipse.build.plugins}/org.lwjgl.info/META-INF/MANIFEST.MF">
|
|
||||||
<fileset dir="${eclipse.build.plugins}/org.lwjgl.info" casesensitive="yes" />
|
|
||||||
</jar>
|
|
||||||
<jar destfile="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.tools_${eclipse.normversion}.jar" manifest="${eclipse.build.plugins}/org.lwjgl.tools/META-INF/MANIFEST.MF">
|
|
||||||
<fileset dir="${eclipse.build.plugins}/org.lwjgl.tools" casesensitive="yes" />
|
|
||||||
</jar>
|
|
||||||
<jar destfile="${eclipse.build.plugins}/org.lwjgl.updatesite/features/org.lwjgl_${eclipse.normversion}.jar">
|
|
||||||
<fileset dir="${eclipse.build.plugins}/org.lwjgl.feature" casesensitive="yes" />
|
|
||||||
</jar>
|
|
||||||
<jar destfile="${eclipse.build.plugins}/org.lwjgl.updatesite/features/org.lwjgl.sdk_${eclipse.normversion}.jar">
|
|
||||||
<fileset dir="${eclipse.build.plugins}/org.lwjgl.feature.sdk" casesensitive="yes" />
|
|
||||||
</jar>
|
|
||||||
|
|
||||||
<!-- *******************************************************************
|
|
||||||
*
|
|
||||||
* Sign plugins and feature
|
|
||||||
*
|
|
||||||
******************************************************************** -->
|
|
||||||
|
|
||||||
<signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/features/org.lwjgl_${eclipse.normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${password}" />
|
|
||||||
<signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/features/org.lwjgl.sdk_${eclipse.normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${password}" />
|
|
||||||
<signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl_${eclipse.normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${password}" />
|
|
||||||
<signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.doc_${eclipse.normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${password}" />
|
|
||||||
<signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.source_${eclipse.normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${password}" />
|
|
||||||
<signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.info_${eclipse.normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${password}" />
|
|
||||||
<signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.tools_${eclipse.normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${password}" />
|
|
||||||
|
|
||||||
<!-- *******************************************************************
|
|
||||||
*
|
|
||||||
* Publish plugins and feature
|
|
||||||
* content.xml/jar and artifacts.xml/jar, required for some newer featues
|
|
||||||
* and tools such as Eclipse Tycho.
|
|
||||||
*
|
|
||||||
******************************************************************** -->
|
|
||||||
<publishBundlesAndFeatures compressed="true"
|
|
||||||
updatesitefolder="${eclipse.build.plugins}/org.lwjgl.updatesite"
|
|
||||||
repositoryname="lwjgl.org"
|
|
||||||
repositoryuri="${eclipse.updatesite}" />
|
|
||||||
|
|
||||||
<echo>Created Eclipse update site: ${eclipse.build.plugins}/org.lwjgl.updatesite</echo>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="eclipse-clean">
|
|
||||||
<delete dir="${eclipse.build.path}" />
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="eclipse-help">
|
|
||||||
<echo>This plugin is to be called from main LWJGL build.xml file.</echo>
|
|
||||||
<echo>It creates the update site, the result will be found in</echo>
|
|
||||||
<echo>${eclipse.build.plugins}/org.lwjgl.updatesite</echo>
|
|
||||||
<echo>For more information, read READ.ME</echo>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,3 +0,0 @@
|
||||||
source.. = src/java/
|
|
||||||
bin.includes = META-INF/,\
|
|
||||||
.
|
|
|
@ -1,50 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
ant
|
|
||||||
(C) 2011 LWJGL-Project
|
|
||||||
Author: Jens von Pilgrim, developer@jevopi.de
|
|
||||||
-->
|
|
||||||
|
|
||||||
<project default="buildClasses" basedir="." name="Build Eclipse classes" xmlns:ant4eclipse="antlib:org.ant4eclipse" xmlns:antcontrib="antlib:net.sf.antcontrib">
|
|
||||||
|
|
||||||
<property name="plugin.lwjgl.org" value="org.lwjgl" />
|
|
||||||
<property name="plugin.lwjgl.org.info" value="org.lwjgl.info" />
|
|
||||||
<property name="plugin.lwjgl.org.tools" value="org.lwjgl.tools" />
|
|
||||||
<property name="classes.folder" value="build/classes" />
|
|
||||||
|
|
||||||
<property name="plugin.build.folder" value="plugin-classes" />
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!--
|
|
||||||
<property name="" value="" />
|
|
||||||
-->
|
|
||||||
|
|
||||||
|
|
||||||
<target name="init">
|
|
||||||
<echo></echo>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="buildClasses" depends="init">
|
|
||||||
<mkdir dir="${plugin.build.folder}" />
|
|
||||||
<zip basedir="../${plugin.lwjgl.org}/${classes.folder}" destfile="${plugin.build.folder}/${plugin.lwjgl.org}.zip" />
|
|
||||||
<zip basedir="../${plugin.lwjgl.org.info}/${classes.folder}" destfile="${plugin.build.folder}/${plugin.lwjgl.org.info}.zip" />
|
|
||||||
<zip basedir="../${plugin.lwjgl.org.tools}/${classes.folder}" destfile="${plugin.build.folder}/${plugin.lwjgl.org.tools}.zip" />
|
|
||||||
|
|
||||||
<jar basedir="anttasks" destfile="anttasks.jar" />
|
|
||||||
</target>
|
|
||||||
|
|
||||||
|
|
||||||
<target name="clean">
|
|
||||||
<delete dir="${plugin.build.folder}" />
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="help">
|
|
||||||
<echo>Call this ant script in order to create archives containing the classes of all</echo>
|
|
||||||
<echo>Eclipes plugin related classes, such as Activors.</echo>
|
|
||||||
<echo>This build file removes the burden of building Eclipse dependent classes from</echo>
|
|
||||||
<echo>within the main build script</echo>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,237 +0,0 @@
|
||||||
/*******************************************************************************
|
|
||||||
* Copyright (c) 2011 LWJGL Project and others
|
|
||||||
* All rights reserved. This program and the accompanying materials
|
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
|
||||||
* which accompanies this distribution, and is available at
|
|
||||||
* http://www.eclipse.org/legal/epl-v10.html, and under the terms of the
|
|
||||||
* BSD license, see http://lwjgl.org/license.php for details.
|
|
||||||
*
|
|
||||||
* Contributors:
|
|
||||||
* Jens von Pilgrim - initial implementation
|
|
||||||
******************************************************************************/
|
|
||||||
package org.lwjgl.ant;
|
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
import org.apache.tools.ant.BuildException;
|
|
||||||
import org.apache.tools.ant.Task;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Normalizes a version number and stores result in a property. The version
|
|
||||||
* number is normalized as "%n.%n.%n", e.g. "2.6" becomes "2.6.0"
|
|
||||||
*
|
|
||||||
* @author Jens von Pilgrim
|
|
||||||
* @since Nov 14, 2010
|
|
||||||
* @see http://wiki.eclipse.org/index.php/Version_Numbering
|
|
||||||
*/
|
|
||||||
public class NormalizeVersion extends Task {
|
|
||||||
|
|
||||||
public final static String SEGMENTS[] = { "major", "minor", "service",
|
|
||||||
"qualifier" };
|
|
||||||
|
|
||||||
public final static String VERSION_QUALIFIER_PATTERN = "yyyyMMdd-HHmm";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* name of the property to set
|
|
||||||
*/
|
|
||||||
protected String property;
|
|
||||||
|
|
||||||
protected String version;
|
|
||||||
|
|
||||||
protected boolean addDateQualifier = false;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the addQualifier
|
|
||||||
*/
|
|
||||||
public boolean isAddDateQualifier() {
|
|
||||||
return addDateQualifier;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param i_addQualifier the addQualifier to set
|
|
||||||
*/
|
|
||||||
public void setAddDateQualifier(boolean i_addDateQualifier) {
|
|
||||||
addDateQualifier = i_addDateQualifier;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the property
|
|
||||||
*/
|
|
||||||
public String getProperty() {
|
|
||||||
return property;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param i_property the property to set
|
|
||||||
*/
|
|
||||||
public void setProperty(String i_property) {
|
|
||||||
property = i_property;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the versionNumber
|
|
||||||
*/
|
|
||||||
public String getVersion() {
|
|
||||||
return version;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param i_versionNumber the versionNumber to set
|
|
||||||
*/
|
|
||||||
public void setVersion(String version) {
|
|
||||||
this.version = version;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* check for errors
|
|
||||||
* @throws BuildException if we are not configured right
|
|
||||||
*/
|
|
||||||
private void validate() {
|
|
||||||
//validation
|
|
||||||
if (property == null) {
|
|
||||||
throw new BuildException("attribute property missing");
|
|
||||||
}
|
|
||||||
if (version == null) {
|
|
||||||
throw new BuildException("attribute version missing");
|
|
||||||
}
|
|
||||||
String s = getVersion().trim();
|
|
||||||
int sn = 0;
|
|
||||||
boolean qualifier = false;
|
|
||||||
for (int i = 0; i < s.length(); i++) {
|
|
||||||
if (s.charAt(i) == '.') {
|
|
||||||
sn++;
|
|
||||||
} else {
|
|
||||||
|
|
||||||
qualifier = !Character.isDigit(s.charAt(i));
|
|
||||||
if (sn < 1 && !Character.isDigit(s.charAt(i))) {
|
|
||||||
|
|
||||||
throw new BuildException(
|
|
||||||
"Wrong version format, must contain only digits in the "
|
|
||||||
+ SEGMENTS[sn] + " segment, was "
|
|
||||||
+ s.substring(0, i) + ">>" + s.charAt(i)
|
|
||||||
+ "<<" + s.substring(i + 1));
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ((sn > 2 || qualifier) && isAddDateQualifier()) {
|
|
||||||
throw new BuildException(
|
|
||||||
"Cannot add date qualifier, qualifier already specified");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets given property with normalized version number accoring to
|
|
||||||
* major.minor.service[.qualifier]
|
|
||||||
* {@inheritDoc}
|
|
||||||
* @see org.apache.tools.ant.Task#execute()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void execute() throws BuildException {
|
|
||||||
validate();
|
|
||||||
//now exit here if the property is already set
|
|
||||||
if (getProject().getProperty(property) != null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
String normalizedVersionNumber = doExecute();
|
|
||||||
|
|
||||||
getProject().setNewProperty(property, normalizedVersionNumber);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
protected String doExecute() {
|
|
||||||
String s = getVersion().trim();
|
|
||||||
StringBuilder n = new StringBuilder();
|
|
||||||
int snIndex = 0;
|
|
||||||
boolean qualifier = false;
|
|
||||||
|
|
||||||
String digits = "";
|
|
||||||
for (int i = 0; i < s.length(); i++) {
|
|
||||||
char c = s.charAt(i);
|
|
||||||
if (Character.isDigit(c) && !qualifier) {
|
|
||||||
digits += c;
|
|
||||||
} else if (c == '.') {
|
|
||||||
if (qualifier) {
|
|
||||||
throw new BuildException(
|
|
||||||
"Wrong format, qualifier must not contain a dot in "
|
|
||||||
+ s);
|
|
||||||
}
|
|
||||||
if (snIndex < 3) {
|
|
||||||
if (digits.length() > 0) {
|
|
||||||
if (snIndex > 0)
|
|
||||||
n.append('.');
|
|
||||||
n.append(digits);
|
|
||||||
digits = "";
|
|
||||||
snIndex++;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
throw new BuildException(
|
|
||||||
"Wrong format, expected digit, was " + c
|
|
||||||
+ " at pos " + i + " of " + s);
|
|
||||||
}
|
|
||||||
} else if (Character.isJavaIdentifierPart(c)) {
|
|
||||||
if (digits.length() > 0) {
|
|
||||||
throw new BuildException(
|
|
||||||
"Wrong format, qualifier must not start with digits in "
|
|
||||||
+ s);
|
|
||||||
}
|
|
||||||
if (!qualifier) {
|
|
||||||
switch (snIndex) {
|
|
||||||
case 0: // e.g. "beta"
|
|
||||||
n.append("0");
|
|
||||||
break;
|
|
||||||
case 1: // e.g. "1.beta
|
|
||||||
n.append(".0");
|
|
||||||
case 2: // e.g. "1.2.beta
|
|
||||||
n.append(".0");
|
|
||||||
}
|
|
||||||
qualifier = true;
|
|
||||||
n.append('.');
|
|
||||||
}
|
|
||||||
n.append(c);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!qualifier) {
|
|
||||||
if (digits.length() > 0) {
|
|
||||||
if (snIndex > 0)
|
|
||||||
n.append('.');
|
|
||||||
n.append(digits);
|
|
||||||
snIndex++;
|
|
||||||
}
|
|
||||||
switch (snIndex) {
|
|
||||||
case 0: // e.g. ""
|
|
||||||
n.append("0");
|
|
||||||
break;
|
|
||||||
case 1: // e.g. "1.beta
|
|
||||||
n.append(".0");
|
|
||||||
case 2: // e.g. "1.2.beta
|
|
||||||
n.append(".0");
|
|
||||||
}
|
|
||||||
if (isAddDateQualifier())
|
|
||||||
n.append(createDateQualifier());
|
|
||||||
} else {
|
|
||||||
if (isAddDateQualifier()) {
|
|
||||||
throw new BuildException(
|
|
||||||
"Cannot add date qualifier, qualifier already specified");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return n.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
private String createDateQualifier() {
|
|
||||||
return ".v"
|
|
||||||
+ new SimpleDateFormat(VERSION_QUALIFIER_PATTERN)
|
|
||||||
.format(new Date());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,270 +0,0 @@
|
||||||
/*******************************************************************************
|
|
||||||
* Copyright (c) 2011 LWJGL Project and others
|
|
||||||
* All rights reserved. This program and the accompanying materials
|
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
|
||||||
* which accompanies this distribution, and is available at
|
|
||||||
* http://www.eclipse.org/legal/epl-v10.html, and under the terms of the
|
|
||||||
* BSD license, see http://lwjgl.org/license.php for details.
|
|
||||||
*
|
|
||||||
* Contributors:
|
|
||||||
* Jens von Pilgrim - initial implementation
|
|
||||||
******************************************************************************/
|
|
||||||
package org.lwjgl.ant;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.StringTokenizer;
|
|
||||||
import java.util.TreeMap;
|
|
||||||
import java.util.Vector;
|
|
||||||
|
|
||||||
import org.apache.tools.ant.BuildException;
|
|
||||||
import org.apache.tools.ant.taskdefs.Expand;
|
|
||||||
import org.apache.tools.ant.types.PatternSet;
|
|
||||||
import org.apache.tools.ant.types.selectors.SelectorUtils;
|
|
||||||
import org.apache.tools.ant.util.FileNameMapper;
|
|
||||||
import org.apache.tools.ant.util.FileUtils;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Ant task extracting package names (or generally directory names) into given
|
|
||||||
* property.
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* - just like unzip, except dest can be null and is ignored otherwise
|
|
||||||
* - property - name of property storing the resulting list
|
|
||||||
* - pathsep - path separator, default ","
|
|
||||||
* - dirsep - directory separator, default "."
|
|
||||||
* - includeemptydirs -- whether to include empty directories, default: false
|
|
||||||
*
|
|
||||||
* @author Jens von Pilgrim
|
|
||||||
* @since 12.09.2007
|
|
||||||
*/
|
|
||||||
public class PackageList extends Expand {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The property to receive the conversion
|
|
||||||
*/
|
|
||||||
private String property = null;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* User override on path sep char
|
|
||||||
*/
|
|
||||||
private String pathSep = ",";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* User override on directory sep char
|
|
||||||
*/
|
|
||||||
private String dirSep = ".";
|
|
||||||
|
|
||||||
|
|
||||||
private boolean includeemptydirs = false;
|
|
||||||
|
|
||||||
class IntegerContainer {
|
|
||||||
int value;
|
|
||||||
|
|
||||||
public void inc() {
|
|
||||||
value++;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
TreeMap<String, IntegerContainer> packagelist = new TreeMap<String, IntegerContainer>();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
* @see org.apache.tools.ant.taskdefs.Expand#execute()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void execute() throws BuildException {
|
|
||||||
|
|
||||||
setDest(new File(" no file, files are only listed internaly"));
|
|
||||||
super.execute();
|
|
||||||
|
|
||||||
StringBuffer strb = new StringBuffer();
|
|
||||||
for (String name : packagelist.keySet()) {
|
|
||||||
|
|
||||||
// System.out.println("name: " + name + " (" +packagelist.get(name).value + ")" );
|
|
||||||
|
|
||||||
if (includeemptydirs || packagelist.get(name).value > 0) {
|
|
||||||
if (strb.length() > 0) {
|
|
||||||
strb.append(pathSep);
|
|
||||||
}
|
|
||||||
StringTokenizer stDirectory = new StringTokenizer(name, "/",
|
|
||||||
true);
|
|
||||||
|
|
||||||
while (stDirectory.hasMoreTokens()) {
|
|
||||||
String token = stDirectory.nextToken();
|
|
||||||
strb.append("/".equals(token) ? dirSep : token);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (property != null) {
|
|
||||||
String value = strb.toString();
|
|
||||||
getProject().setNewProperty(property, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private Vector<PatternSet> patternsets = new Vector<PatternSet>();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add a patternset.
|
|
||||||
* @param set a pattern set
|
|
||||||
*/
|
|
||||||
public void addPatternset(PatternSet set) {
|
|
||||||
super.addPatternset(set);
|
|
||||||
patternsets.addElement(set);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
* @see org.apache.tools.ant.taskdefs.Expand#extractFile(org.apache.tools.ant.util.FileUtils, java.io.File, java.io.File, java.io.InputStream, java.lang.String, java.util.Date, boolean, org.apache.tools.ant.util.FileNameMapper)
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
protected void extractFile(FileUtils i_fileUtils, File i_srcF, File i_dir,
|
|
||||||
InputStream i_compressedInputStream, String i_entryName,
|
|
||||||
Date i_entryDate, boolean i_isDirectory, FileNameMapper i_mapper)
|
|
||||||
throws IOException {
|
|
||||||
|
|
||||||
if (!matchPatterns(i_entryName)) {
|
|
||||||
//Do not process this file
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
String strDir = getDir(i_isDirectory, i_entryName);
|
|
||||||
if (strDir != null && !"META-INF".equals(strDir)) {
|
|
||||||
if (!packagelist.containsKey(strDir)) {
|
|
||||||
packagelist.put(strDir, new IntegerContainer());
|
|
||||||
}
|
|
||||||
if (!i_isDirectory) {
|
|
||||||
packagelist.get(strDir).inc();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param i_entryName
|
|
||||||
*/
|
|
||||||
private boolean matchPatterns(String i_entryName) {
|
|
||||||
if (patternsets != null && patternsets.size() > 0) {
|
|
||||||
boolean included = false;
|
|
||||||
String name = i_entryName.replace('/', File.separatorChar).replace(
|
|
||||||
'\\', File.separatorChar);
|
|
||||||
|
|
||||||
Set<String> includePatterns = new HashSet<String>();
|
|
||||||
Set<String> excludePatterns = new HashSet<String>();
|
|
||||||
for (int v = 0, size = patternsets.size(); v < size; v++) {
|
|
||||||
PatternSet p = (PatternSet) patternsets.elementAt(v);
|
|
||||||
String[] incls = p.getIncludePatterns(getProject());
|
|
||||||
if (incls == null || incls.length == 0) {
|
|
||||||
// no include pattern implicitly means includes="**"
|
|
||||||
incls = new String[] { "**" };
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int w = 0; w < incls.length; w++) {
|
|
||||||
String pattern = incls[w].replace('/', File.separatorChar)
|
|
||||||
.replace('\\', File.separatorChar);
|
|
||||||
if (pattern.endsWith(File.separator)) {
|
|
||||||
pattern += "**";
|
|
||||||
}
|
|
||||||
includePatterns.add(pattern);
|
|
||||||
}
|
|
||||||
|
|
||||||
String[] excls = p.getExcludePatterns(getProject());
|
|
||||||
if (excls != null) {
|
|
||||||
for (int w = 0; w < excls.length; w++) {
|
|
||||||
String pattern = excls[w].replace('/',
|
|
||||||
File.separatorChar).replace('\\',
|
|
||||||
File.separatorChar);
|
|
||||||
if (pattern.endsWith(File.separator)) {
|
|
||||||
pattern += "**";
|
|
||||||
}
|
|
||||||
excludePatterns.add(pattern);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (Iterator<String> iter = includePatterns.iterator(); !included
|
|
||||||
&& iter.hasNext();) {
|
|
||||||
String pattern = iter.next();
|
|
||||||
included = SelectorUtils.matchPath(pattern, name);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (Iterator<String> iter = excludePatterns.iterator(); included
|
|
||||||
&& iter.hasNext();) {
|
|
||||||
String pattern = iter.next();
|
|
||||||
included = !SelectorUtils.matchPath(pattern, name);
|
|
||||||
}
|
|
||||||
|
|
||||||
return included;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param i_isDirectory
|
|
||||||
* @param i_entryName
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
private String getDir(boolean i_isDirectory, String i_entryName) {
|
|
||||||
|
|
||||||
if (i_entryName == null)
|
|
||||||
return null;
|
|
||||||
int iIndex = i_entryName.lastIndexOf('/');
|
|
||||||
if (iIndex >= 0) {
|
|
||||||
return i_entryName.substring(0, iIndex);
|
|
||||||
}
|
|
||||||
if (i_isDirectory) {
|
|
||||||
return i_entryName;
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the name of the property into which the converted path will be placed.
|
|
||||||
* @param p the property name.
|
|
||||||
*/
|
|
||||||
public void setProperty(String p) {
|
|
||||||
property = p;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the default path separator string; defaults to current JVM
|
|
||||||
* {@link java.io.File#pathSeparator File.pathSeparator}.
|
|
||||||
* @param sep path separator string.
|
|
||||||
*/
|
|
||||||
public void setPathSep(String sep) {
|
|
||||||
pathSep = sep;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the default directory separator string;
|
|
||||||
* defaults to current JVM {@link java.io.File#separator File.separator}.
|
|
||||||
* @param sep directory separator string.
|
|
||||||
*/
|
|
||||||
public void setDirSep(String sep) {
|
|
||||||
dirSep = sep;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Simple getter for attribute includeemptydirs.
|
|
||||||
* @return the includeemptydirs
|
|
||||||
*/
|
|
||||||
public boolean isIncludeemptydirs() {
|
|
||||||
return includeemptydirs;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Simple setter for attribute includeemptydirs.
|
|
||||||
* @param i_includeemptydirs the includeemptydirs to set
|
|
||||||
*/
|
|
||||||
public void setIncludeemptydirs(boolean i_includeemptydirs) {
|
|
||||||
includeemptydirs = i_includeemptydirs;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,36 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!-- ======================================================================
|
|
||||||
Nov 15, 2010 9:45:57 PM
|
|
||||||
|
|
||||||
project
|
|
||||||
description
|
|
||||||
|
|
||||||
jpilgrim
|
|
||||||
====================================================================== -->
|
|
||||||
<project name="project" default="default">
|
|
||||||
<description>
|
|
||||||
description
|
|
||||||
</description>
|
|
||||||
|
|
||||||
|
|
||||||
<taskdef name="normalizeVersion" classname="de.jevopi.ant.NormalizeVersion" >
|
|
||||||
<classpath>
|
|
||||||
<pathelement location="../../build/classes"/>
|
|
||||||
</classpath>
|
|
||||||
</taskdef>
|
|
||||||
|
|
||||||
<!-- =================================
|
|
||||||
target: default
|
|
||||||
================================= -->
|
|
||||||
<target name="default" depends="depends" description="description">
|
|
||||||
<normalizeVersion property="norm" version="1.2" />
|
|
||||||
<echo>${norm}</echo>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- - - - - - - - - - - - - - - - - -
|
|
||||||
target: depends
|
|
||||||
- - - - - - - - - - - - - - - - - -->
|
|
||||||
<target name="depends">
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,108 +0,0 @@
|
||||||
/*******************************************************************************
|
|
||||||
* Copyright (c) 2008 Jens von Pilgrim and others.
|
|
||||||
* All rights reserved. This program and the accompanying materials
|
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
|
||||||
* which accompanies this distribution, and is available at
|
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
|
||||||
*
|
|
||||||
* Project: de.jevopi.anttasks
|
|
||||||
* File: NormalizeVersionTest.java
|
|
||||||
* Date: Nov 14, 2010
|
|
||||||
*******************************************************************************/
|
|
||||||
package org.lwjgl.ant;
|
|
||||||
|
|
||||||
import org.junit.Assert;
|
|
||||||
|
|
||||||
import org.apache.tools.ant.BuildException;
|
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* NormalizeVersionTest
|
|
||||||
* There should really be more documentation here.
|
|
||||||
*
|
|
||||||
* @author Jens von Pilgrim
|
|
||||||
* @version $Revision$
|
|
||||||
* @since Nov 14, 2010
|
|
||||||
*/
|
|
||||||
public class NormalizeVersionTest {
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testNormalizer() {
|
|
||||||
NormalizeVersion t = new NormalizeVersion();
|
|
||||||
t.setProperty("normalized");
|
|
||||||
|
|
||||||
t.setVersion("1");
|
|
||||||
Assert.assertEquals("1.0.0", t.doExecute());
|
|
||||||
|
|
||||||
t.setVersion("1.2");
|
|
||||||
Assert.assertEquals("1.2.0", t.doExecute());
|
|
||||||
|
|
||||||
t.setVersion("1.2.3");
|
|
||||||
Assert.assertEquals("1.2.3", t.doExecute());
|
|
||||||
|
|
||||||
t.setVersion("1.2.3.beta");
|
|
||||||
Assert.assertEquals("1.2.3.beta", t.doExecute());
|
|
||||||
|
|
||||||
t.setVersion("1.2.beta");
|
|
||||||
Assert.assertEquals("1.2.0.beta", t.doExecute());
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Test(expected= BuildException.class) public void tooManyDots() {
|
|
||||||
NormalizeVersion t = new NormalizeVersion();
|
|
||||||
t.setProperty("normalized");
|
|
||||||
|
|
||||||
t.setVersion("1.2.3.4.5");
|
|
||||||
t.doExecute();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test(expected= BuildException.class) public void qualifierWithNumber() {
|
|
||||||
NormalizeVersion t = new NormalizeVersion();
|
|
||||||
t.setProperty("normalized");
|
|
||||||
|
|
||||||
t.setVersion("1.2beta");
|
|
||||||
t.doExecute();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testQualifier() {
|
|
||||||
NormalizeVersion t = new NormalizeVersion();
|
|
||||||
t.setProperty("normalized");
|
|
||||||
t.setAddDateQualifier(true);
|
|
||||||
|
|
||||||
t.setVersion("1");
|
|
||||||
String s = t.doExecute();
|
|
||||||
Assert.assertEquals(20, s.length());
|
|
||||||
Assert.assertTrue(s.startsWith("1.0.0"));
|
|
||||||
|
|
||||||
t.setVersion("1.2");
|
|
||||||
s = t.doExecute();
|
|
||||||
Assert.assertEquals(20, s.length());
|
|
||||||
Assert.assertTrue(s.startsWith("1.2.0"));
|
|
||||||
|
|
||||||
t.setVersion("1.2.3");
|
|
||||||
s = t.doExecute();
|
|
||||||
Assert.assertEquals(20, s.length());
|
|
||||||
Assert.assertTrue(s.startsWith("1.2.3"));
|
|
||||||
|
|
||||||
t.setVersion("2.8.2");
|
|
||||||
s = t.doExecute();
|
|
||||||
Assert.assertEquals(20, s.length());
|
|
||||||
Assert.assertTrue(s.startsWith("2.8.2"));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test(expected= BuildException.class) public void dateQualifierWithQualifier() {
|
|
||||||
NormalizeVersion t = new NormalizeVersion();
|
|
||||||
t.setProperty("normalized");
|
|
||||||
t.setAddDateQualifier(true);
|
|
||||||
t.setVersion("1.2.beta");
|
|
||||||
t.doExecute();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,22 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<projectDescription>
|
|
||||||
<name>org.lwjgl.doc</name>
|
|
||||||
<comment></comment>
|
|
||||||
<projects>
|
|
||||||
</projects>
|
|
||||||
<buildSpec>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
</buildSpec>
|
|
||||||
<natures>
|
|
||||||
<nature>org.eclipse.pde.PluginNature</nature>
|
|
||||||
</natures>
|
|
||||||
</projectDescription>
|
|
|
@ -1,6 +0,0 @@
|
||||||
Manifest-Version: 1.0
|
|
||||||
Bundle-ManifestVersion: 2
|
|
||||||
Bundle-Name: LWJGL Documentation
|
|
||||||
Bundle-SymbolicName: org.lwjgl.doc; singleton:=true
|
|
||||||
Bundle-Version: 2
|
|
||||||
Bundle-Vendor: Lightweight Java Game Library Project
|
|
|
@ -1,55 +0,0 @@
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>About</title>
|
|
||||||
<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
|
|
||||||
</head>
|
|
||||||
<body lang="EN-US">
|
|
||||||
<img src="lwjgl_logo.png" align="right"/>
|
|
||||||
<h2>About This Content</h2>
|
|
||||||
<p>The <a href="http://lwjgl.org">Lightweight Java Game Library (LWJGL)</a> is a solution aimed
|
|
||||||
directly at professional and amateur Java programmers alike to enable <a
|
|
||||||
href="projects.php">commercial quality games</a> to be written in Java.
|
|
||||||
LWJGL provides developers access to high performance crossplatform
|
|
||||||
libraries such as OpenGL (<a href="http://www.opengl.org/"
|
|
||||||
target="_blank">Open Graphics Library</a>) and OpenAL (<a
|
|
||||||
href="http://www.openal.org" target="_blank">Open Audio Library</a>)
|
|
||||||
allowing for state of the art 3D games and 3D sound. Additionally LWJGL
|
|
||||||
provides access to controllers such as Gamepads, Steering wheel and
|
|
||||||
Joysticks. All in a simple and straight forward API.</p>
|
|
||||||
<p>LWJGL is not meant to make writing games particularly easy; it is
|
|
||||||
primarily an enabling technology which allows developers to get at
|
|
||||||
resources that are simply otherwise unavailable or poorly implemented on
|
|
||||||
the existing <a href="http://java.sun.com" target="_blank">Java
|
|
||||||
platform</a>. We anticipate that the LWJGL will, through evolution and
|
|
||||||
extension, become the foundation for more complete game libraries and
|
|
||||||
"game engines" as they have popularly become known, and hide some of the
|
|
||||||
new evils we have had to expose in the APIs.</p>
|
|
||||||
<p>LWJGL is available under a <a href="http://lwjgl.org/license.php">BSD
|
|
||||||
license</a>, which means it's open source and freely available at no charge.</p>
|
|
||||||
<p>Please visit us on the Freenode IRC Network: <a
|
|
||||||
href="irc://irc.freenode.net/lwjgl" target="_blank">#LWJGL</a>. Do idle
|
|
||||||
if there is no one to answer any of your questions, we are on different
|
|
||||||
timezones.</p>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h2>Plug-Ins</h2>
|
|
||||||
<p>The following plug-ins are provided:
|
|
||||||
<dl>
|
|
||||||
<dt>org.lwjgl</dt>
|
|
||||||
<dd>Platform independent jars and native libraries for Windows, Linux and Mac OS X</dd>
|
|
||||||
<dt>org.lwjgl.doc</dt>
|
|
||||||
<dd>Documentation (JavaDoc)</dd>
|
|
||||||
<dt>org.lwjgl.source</dt>
|
|
||||||
<dd>Source files</dd>
|
|
||||||
<dt>org.lwjgl.tools</dt>
|
|
||||||
<dd>Developer tools</dd>
|
|
||||||
<dt>org.lwjgl.info</dt>
|
|
||||||
<dd>LWJGL test and info view</dd>
|
|
||||||
</dl>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,4 +0,0 @@
|
||||||
bin.includes = plugin.xml,\
|
|
||||||
META-INF/,\
|
|
||||||
html/,\
|
|
||||||
*.xml
|
|
Before Width: | Height: | Size: 84 KiB |
Before Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 86 KiB |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 88 KiB |
Before Width: | Height: | Size: 38 KiB |
|
@ -1,66 +0,0 @@
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
||||||
<title>LWJGL Eclipse Plugins</title>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<div style="background-image:url(fig/mesh.png); height:220px; max-width: 878px"><img src="fig/logo.png" align="left" /></div>
|
|
||||||
|
|
||||||
<h2>Table of Contents</h2>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Plugin documentation
|
|
||||||
<ul>
|
|
||||||
<li><a href="plugins.html">Overview and Core Plugins</a></li>
|
|
||||||
<li><a href="tools.html">LWJGL plugin for Java developers</a></li>
|
|
||||||
<li><a href="views.html">LWJGL Eclipse views</a></li>
|
|
||||||
</ul>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
API
|
|
||||||
<ul>
|
|
||||||
<li><a href="javadoc/index.html">API Reference</a></li>
|
|
||||||
</ul>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
External resources
|
|
||||||
<ul>
|
|
||||||
<li><a href="http://lwjgl.org/">LWJGL Website (extern)</a></li>
|
|
||||||
<li><a href="http://wiki.lwjgl.org/">LWJGL Wiki (extern)</a></li>
|
|
||||||
<li><a href="http://lwjgl.org/forum/">LWJGL Forum (extern)</a></li>
|
|
||||||
</ul>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2>About LWJGL</h2>
|
|
||||||
<p>The <a href="http://lwjgl.org">Lightweight Java Game Library (LWJGL)</a> is a solution aimed
|
|
||||||
directly at professional and amateur Java programmers alike to enable <a
|
|
||||||
href="http://lwjgl.org/projects.php">commercial quality games</a> to be written in Java.
|
|
||||||
LWJGL provides developers access to high performance crossplatform
|
|
||||||
libraries such as OpenGL (<a href="http://www.opengl.org/"
|
|
||||||
target="_blank">Open Graphics Library</a>) and OpenAL (<a
|
|
||||||
href="http://www.openal.org" target="_blank">Open Audio Library</a>)
|
|
||||||
allowing for state of the art 3D games and 3D sound. Additionally LWJGL
|
|
||||||
provides access to controllers such as Gamepads, Steering wheel and
|
|
||||||
Joysticks. All in a simple and straight forward API.</p>
|
|
||||||
<p>LWJGL is not meant to make writing games particularly easy; it is
|
|
||||||
primarily an enabling technology which allows developers to get at
|
|
||||||
resources that are simply otherwise unavailable or poorly implemented on
|
|
||||||
the existing <a href="http://java.sun.com" target="_blank">Java
|
|
||||||
platform</a>. We anticipate that the LWJGL will, through evolution and
|
|
||||||
extension, become the foundation for more complete game libraries and
|
|
||||||
"game engines" as they have popularly become known, and hide some of the
|
|
||||||
new evils we have had to expose in the APIs.</p>
|
|
||||||
<p>LWJGL is available under a <a href="http://lwjgl.org/license.php">BSD
|
|
||||||
license</a>, which means it's open source and freely available at no charge.</p>
|
|
||||||
<p>Please visit us on the Freenode IRC Network: <a
|
|
||||||
href="irc://irc.freenode.net/lwjgl" target="_blank">#LWJGL</a>. Do idle
|
|
||||||
if there is no one to answer any of your questions, we are on different
|
|
||||||
timezones.</p>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,60 +0,0 @@
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
||||||
<title>LWJGL Eclipse Plugins</title>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<img src="fig/lwjgl_logo.png" align="right" />
|
|
||||||
<h1>Overview</h1>
|
|
||||||
<p>The following plug-ins are provided:
|
|
||||||
<dl>
|
|
||||||
<dt>org.lwjgl</dt>
|
|
||||||
<dd>Platform independent jars and native libraries for Windows, Linux, Solaris and Mac OS X</dd>
|
|
||||||
<dt>org.lwjgl.doc</dt>
|
|
||||||
<dd>Documentation, containing API documentation (Javadoc) and additional material such as this document your currently reading.</dd>
|
|
||||||
<dt>org.lwjgl.source</dt>
|
|
||||||
<dd>Source files of LWJGL Java components</dd>
|
|
||||||
<dt>org.lwjgl.info</dt>
|
|
||||||
<dd>Two Eclipse views, one for testing LWJGL and one printing out OpenGL specific information</dd>
|
|
||||||
<dt>org.lwjgl.tools</dt>
|
|
||||||
<dd>Plugin for Java developers, providing a LWJGL library for the Java Build Path settings</dd>
|
|
||||||
</dl>
|
|
||||||
</p>
|
|
||||||
All plugins are briefly described in the following.
|
|
||||||
|
|
||||||
<h2>LWJGL library: org.lwjgl</h2>
|
|
||||||
The most important plugin, which actually is the only one needed by non-developers, is org.lwjgl.
|
|
||||||
It makes the LWJGL library available as an Eclipse plugin. That is if you write an Eclipse plugin using LWJGL,
|
|
||||||
simply add this plugin to the list of required plugins. It does not only provide the necessary jar files,
|
|
||||||
but it also configures the library path in order to automatically load the appropriate native library wihtin
|
|
||||||
the Eclipse workbench.
|
|
||||||
|
|
||||||
<h2>LWJGL documentation and sources</h2>
|
|
||||||
<p>Both, documentation and sources, are only required for developers. Both, Javadoc and sources, are attached to
|
|
||||||
the LWJGL library in order to allow you easy access to these information. That is, you can simply open an LWJGL class,
|
|
||||||
and the source code will be opened. JavaDoc is available via tool-tip and with Shift-F2. You do not have to configure
|
|
||||||
anything in order to access the documentation and the source code.
|
|
||||||
The tools plugin makes JavaDoc and source code available for non-plugin projects as well.</p>
|
|
||||||
<p>
|
|
||||||
Note that only the Java source code is provided, if you want to have a look at the native code, please download
|
|
||||||
the LWJGL sources from the LWJGL website.
|
|
||||||
</p>
|
|
||||||
<h2>LWJGL for Java developers</h2>
|
|
||||||
<p>The org.lwjgl.tools plugin provides an already configured library to be added
|
|
||||||
to a projects build path. It does not only provide the JARs and native libraries,
|
|
||||||
relieving developers from configuring extra VM arguments in the run configuration,
|
|
||||||
but it also configures Javadoc and source code to be available in Java projects just as in
|
|
||||||
plugin projects.</p>
|
|
||||||
Read more about how to set up the library <a href="tools.html">here</a>.
|
|
||||||
|
|
||||||
<h2>Information and test view</h2>
|
|
||||||
<p>In order to test whether your installation is correct and in order to
|
|
||||||
retrieve additional information on your system, two views are provided. The test view
|
|
||||||
draws a spinning torso, while the information view simply prints out available
|
|
||||||
versions and features of your graphics card and OpenGL driver.</p>
|
|
||||||
Read more about how to open the views <a href="views.html">here</a>.
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,72 +0,0 @@
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
||||||
<title>LWJGL Tools</title>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<h1>LWJGL Tools</h1>
|
|
||||||
<p>The org.lwjgl.tools plugin provides an already configured library to be added
|
|
||||||
to a projects build path. It does not only provide the JARs and native libraries,
|
|
||||||
relieving developers from configuring extra VM arguments in the run configuration,
|
|
||||||
but it also configures Javadoc and source code to be available in Java projects just as in
|
|
||||||
plugin projects.
|
|
||||||
</p>
|
|
||||||
<p>You will also need the org.lwjgl plugin. JavaDoc and source code are
|
|
||||||
retrieved from the org.lwjgl.doc and org.lwjgl.source plugins.</p>
|
|
||||||
|
|
||||||
<h2>Configure the LWJGL library</h2>
|
|
||||||
You can configure the LWJGL library for a plain Java project by opening the
|
|
||||||
projects properties. Select "Java Build Path" and "Libraries", such as shown in
|
|
||||||
Figure 1. Note: Click on the images here to show a larger version.
|
|
||||||
|
|
||||||
<div style="text-align:center">
|
|
||||||
<a href="fig/addLib_1.png">
|
|
||||||
<img src="fig/addLib_1.png" style="height:200px; display:block; margin:0px auto 10px; text-align:center;" border="0" alt="
|
|
||||||
"id="Project properties" /></a>
|
|
||||||
<span style="font-weight:bold;font-size:small">Fig. 1: Project properties</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
Select "Add Library..." on the right hand side. This will open a new dialog window as shown in Figure 2.
|
|
||||||
|
|
||||||
<div style="text-align:center">
|
|
||||||
<a href="fig/addLib_2.png">
|
|
||||||
<img src="fig/addLib_2.png" style="height:200px; display:block; margin:0px auto 10px; text-align:center;" border="0" alt="
|
|
||||||
"id="Add library" /></a>
|
|
||||||
<span style="font-weight:bold;font-size:small">Fig. 2: Add library</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
Select "LWJGL Library". You can simply press "Finish". However if you want to have some information about
|
|
||||||
the paths of the added library, simply select "Next". In the latter case, the next wizard page will show
|
|
||||||
you the path settings automatically configured by the tool plugin as shown in Figure 3.
|
|
||||||
|
|
||||||
<div style="text-align:center">
|
|
||||||
<a href="fig/addLib_3.png">
|
|
||||||
<img src="fig/addLib_3.png" style="height:200px; display:block; margin:0px auto 10px; text-align:center;" border="0" alt="
|
|
||||||
"id="Library info" /></a>
|
|
||||||
<span style="font-weight:bold;font-size:small">Fig. 3: Library info</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
You have no successfully configured the LWJGL library, as shown in Figure 4. Press "OK" to finish the set up.
|
|
||||||
|
|
||||||
<div style="text-align:center">
|
|
||||||
<a href="fig/addLib_4.png">
|
|
||||||
<img src="fig/addLib_4.png" style="height:200px; display:block; margin:0px auto 10px; text-align:center;" border="0" alt="
|
|
||||||
"id="Configured library" /></a>
|
|
||||||
<span style="font-weight:bold;font-size:small">Fig. 4: Configured library</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
You can now use the LWJGL library in your Java project, and you can simply start
|
|
||||||
the project by selecting "Run As / Java Application..." in the context menu of a class containing a main method.
|
|
||||||
That is, you do not have to configure some VM arguments in the run configuration anymore, which will hopefully make development
|
|
||||||
much easier.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>Note: At this moment, no further tools, e.g., for exporting an LWJGL application, exists.
|
|
||||||
Feel free to write missing functions and contact us in order to add new functionalty.</p>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,72 +0,0 @@
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
||||||
<title>LWJGL Eclipse Views</title>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<h1>LWJGL Eclipse Views</h1>
|
|
||||||
<p><p>In order to test whether your installation is correct and in order to
|
|
||||||
retrieve additional information on your system, two views are provided. The test view
|
|
||||||
draws a spinning torso, while the information view simply prints out available
|
|
||||||
versions and features of your graphics card and OpenGL driver.</p>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2>Open the views</h2>
|
|
||||||
You can open the views by selecting them from "Windows / Show View / Other..." as shown in
|
|
||||||
Figure 1. Note: Click on the images here to show a larger version.
|
|
||||||
|
|
||||||
<div style="text-align:center">
|
|
||||||
<a href="fig/openView_1.png">
|
|
||||||
<img src="fig/openView_1.png" style="height:200px; display:block; margin:0px auto 10px; text-align:center;" border="0" alt="
|
|
||||||
"id="Show View Others" /></a>
|
|
||||||
<span style="font-weight:bold;font-size:small">Fig. 1: Show View / Others...</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
Under "Other", you will find two LWJGL views: "LWJGL Information View" and "LWJGL Test View" (see Figure 2).
|
|
||||||
|
|
||||||
<div style="text-align:center">
|
|
||||||
<a href="fig/openView_2.png">
|
|
||||||
<img src="fig/openView_2.png" style="height:200px; display:block; margin:0px auto 10px; text-align:center;" border="0" alt="
|
|
||||||
"id="LWJGL views" /></a>
|
|
||||||
<span style="font-weight:bold;font-size:small">Fig. 2: LWJGL views</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
Select "LWJGL Information View" in order to open a simple text view, as shown in Figure 3.
|
|
||||||
|
|
||||||
<div style="text-align:center">
|
|
||||||
<a href="fig/openView_Info.png">
|
|
||||||
<img src="fig/openView_Info.png" style="height:200px; display:block; margin:0px auto 10px; text-align:center;" border="0" alt="
|
|
||||||
"id="LWJGL Information View" /></a>
|
|
||||||
<span style="font-weight:bold;font-size:small">Fig. 3: LWJGL Information View</span>
|
|
||||||
</div>
|
|
||||||
<p>
|
|
||||||
This view shows the version numbers of the LWJGL feature, i.e. the LWJGL plugins, and the LWJGL library. For bug reports, it is usually very
|
|
||||||
useful to provide additional information about your OpenGL configuration. This view provides you with a lot of necessary information. Note that
|
|
||||||
not all information can be retrieved on all systems. Features not supported by your graphics card or OpenGL driver are omitted, you see only the
|
|
||||||
available features and capabilities.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>In order to test whether LWJGL and OpenGL works on your system, open the test view. The view should look similar to Figure 4.
|
|
||||||
|
|
||||||
<div style="text-align:center">
|
|
||||||
<a href="fig/openView_Test.png">
|
|
||||||
<img src="fig/openView_Test.png" style="height:200px; display:block; margin:0px auto 10px; text-align:center;" border="0" alt="
|
|
||||||
"id="LWJGL Test View" /></a>
|
|
||||||
<span style="font-weight:bold;font-size:small">Fig. 4: LWJGL Test View</span>
|
|
||||||
</div>
|
|
||||||
The OpenGL code of this torso actually stems from an Eclipse SWT snippet:
|
|
||||||
<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet195.java?view=markup&content-type=text%2Fvnd.viewcvs-markup&revision=HEAD">snippet 195</a>.
|
|
||||||
|
|
||||||
<p>
|
|
||||||
You should see a spinning torso and the current frames per second (fps) in the status bar. If you do not even see this torso,
|
|
||||||
something has gone seriously wrong when installing the plugins. Note that other OpenGL based applications might cause problems, even if
|
|
||||||
you can see this test view: The test view does not use any extended OpenGL features, such as framebuffer objects. If an application
|
|
||||||
requires an additional feature which is not supported by your system (see Information View to retrieve the supported features), it
|
|
||||||
won't run. Sometimes it helps to update the drive of your graphics card!
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Before Width: | Height: | Size: 24 KiB |
|
@ -1,18 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<?eclipse version="3.4"?>
|
|
||||||
<plugin>
|
|
||||||
|
|
||||||
<extension
|
|
||||||
point="org.eclipse.help.toc">
|
|
||||||
<toc
|
|
||||||
file="toc.xml"
|
|
||||||
primary="true">
|
|
||||||
</toc>
|
|
||||||
</extension>
|
|
||||||
|
|
||||||
<extension point="org.eclipse.pde.core.javadoc">
|
|
||||||
<javadoc path="doc.zip!/javadoc/" archive="true">
|
|
||||||
<plugin id="org.lwjgl"/>
|
|
||||||
</javadoc>
|
|
||||||
</extension>
|
|
||||||
</plugin>
|
|
|
@ -1,16 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<?NLS TYPE="org.eclipse.help.toc"?>
|
|
||||||
|
|
||||||
<toc label="LWJGL Documentation">
|
|
||||||
<topic href="html/overview.html" label="Overview">
|
|
||||||
</topic>
|
|
||||||
<topic href="javadoc/index.html" label="API Reference">
|
|
||||||
</topic>
|
|
||||||
|
|
||||||
<topic href="html/plugins.html" label="LWJGL Plugin Documentation">
|
|
||||||
<topic href="html/tools.html" label="Tools for Java developers">
|
|
||||||
</topic>
|
|
||||||
<topic href="html/views.html" label="LWJGL Eclipse Views">
|
|
||||||
</topic>
|
|
||||||
</topic>
|
|
||||||
</toc>
|
|
|
@ -1,17 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<projectDescription>
|
|
||||||
<name>org.lwjgl.feature.sdk</name>
|
|
||||||
<comment></comment>
|
|
||||||
<projects>
|
|
||||||
</projects>
|
|
||||||
<buildSpec>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.pde.FeatureBuilder</name>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
</buildSpec>
|
|
||||||
<natures>
|
|
||||||
<nature>org.eclipse.pde.FeatureNature</nature>
|
|
||||||
</natures>
|
|
||||||
</projectDescription>
|
|
|
@ -1 +0,0 @@
|
||||||
bin.includes = feature.xml
|
|
|
@ -1,95 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<feature
|
|
||||||
id="org.lwjgl.sdk"
|
|
||||||
label="Lightweight Java Game Library (LWJGL)"
|
|
||||||
version="2"
|
|
||||||
provider-name="Lightweight Java Game Library Project"
|
|
||||||
image="lwjgl_logo.png">
|
|
||||||
|
|
||||||
<description url="http://lwjgl.org">
|
|
||||||
This feature provides easy access to the
|
|
||||||
Lightweight Java Game Library (LWJGL)
|
|
||||||
for Eclipse plugin developers. It includes
|
|
||||||
- source code
|
|
||||||
- javadoc
|
|
||||||
- info plugin
|
|
||||||
- library tool
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<copyright url="http://lwjgl.org/credits.php">
|
|
||||||
Copyright (c) 2002-2011 Lightweight Java Game Library Project
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
LWJGL is available under a BSD license, which means it's open
|
|
||||||
source and freely available at no charge.
|
|
||||||
|
|
||||||
Eclipse feature and plugins, plugin specific code made available under
|
|
||||||
a BSD license and Eclipse Public License (EPL).
|
|
||||||
</copyright>
|
|
||||||
|
|
||||||
<license url="http://lwjgl.org/license.php">
|
|
||||||
Copyright (c) 2002-2011 Lightweight Java Game Library 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 'Light Weight Java Game Library' 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.
|
|
||||||
</license>
|
|
||||||
|
|
||||||
<url>
|
|
||||||
<update label="LWJGL Update Site" url="http://lwjgl.org/update"/>
|
|
||||||
<discovery label="Home of the Lightweight Java Game Library" url="http://lwjgl.org/index.php"/>
|
|
||||||
</url>
|
|
||||||
|
|
||||||
<requires>
|
|
||||||
<import feature="org.lwjgl" version="2"/>
|
|
||||||
</requires>
|
|
||||||
|
|
||||||
<plugin
|
|
||||||
id="org.lwjgl.doc"
|
|
||||||
download-size="2800"
|
|
||||||
install-size="2800"
|
|
||||||
version="2"/>
|
|
||||||
|
|
||||||
<plugin
|
|
||||||
id="org.lwjgl.source"
|
|
||||||
download-size="1200"
|
|
||||||
install-size="1200"
|
|
||||||
version="2"/>
|
|
||||||
|
|
||||||
<plugin
|
|
||||||
id="org.lwjgl.info"
|
|
||||||
download-size="50"
|
|
||||||
install-size="50"
|
|
||||||
version="2"/>
|
|
||||||
|
|
||||||
<plugin
|
|
||||||
id="org.lwjgl.tools"
|
|
||||||
download-size="16"
|
|
||||||
install-size="16"
|
|
||||||
version="2"/>
|
|
||||||
|
|
||||||
</feature>
|
|
|
@ -1,95 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<feature
|
|
||||||
id="org.lwjgl.sdk"
|
|
||||||
label="Lightweight Java Game Library (LWJGL) SDK"
|
|
||||||
version="@VERSION@"
|
|
||||||
provider-name="Lightweight Java Game Library Project"
|
|
||||||
image="lwjgl_logo.png">
|
|
||||||
|
|
||||||
<description url="http://lwjgl.org">
|
|
||||||
This feature provides easy access to the
|
|
||||||
Lightweight Java Game Library (LWJGL) SDK
|
|
||||||
for Eclipse plugin developers. It includes
|
|
||||||
- source code
|
|
||||||
- javadoc
|
|
||||||
- info plugin (Test and Info View)
|
|
||||||
- library tool (Library configuration for plain Java development)
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<copyright url="http://lwjgl.org/credits.php">
|
|
||||||
Copyright (c) 2002-2011 Lightweight Java Game Library Project
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
LWJGL is available under a BSD license, which means it's open
|
|
||||||
source and freely available at no charge.
|
|
||||||
|
|
||||||
Eclipse feature and plugins, plugin specific code made available under a
|
|
||||||
BSD license and Eclipse Public License (EPL).
|
|
||||||
</copyright>
|
|
||||||
|
|
||||||
<license url="http://lwjgl.org/license.php">
|
|
||||||
Copyright (c) 2002-2011 Lightweight Java Game Library 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 'Light Weight Java Game Library' 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.
|
|
||||||
</license>
|
|
||||||
|
|
||||||
<url>
|
|
||||||
<update label="LWJGL Update Site" url="http://lwjgl.org/update" />
|
|
||||||
<discovery label="Home of the Lightweight Java Game Library" url="http://lwjgl.org/index.php"/>
|
|
||||||
</url>
|
|
||||||
|
|
||||||
<requires>
|
|
||||||
<import feature="org.lwjgl" version="@VERSION@"/>
|
|
||||||
</requires>
|
|
||||||
|
|
||||||
<plugin
|
|
||||||
id="org.lwjgl.doc"
|
|
||||||
download-size="2800"
|
|
||||||
install-size="2800"
|
|
||||||
version="@VERSION@"/>
|
|
||||||
|
|
||||||
<plugin
|
|
||||||
id="org.lwjgl.source"
|
|
||||||
download-size="1200"
|
|
||||||
install-size="1200"
|
|
||||||
version="@VERSION@"/>
|
|
||||||
|
|
||||||
<plugin
|
|
||||||
id="org.lwjgl.info"
|
|
||||||
download-size="50"
|
|
||||||
install-size="50"
|
|
||||||
version="@VERSION@"/>
|
|
||||||
|
|
||||||
<plugin
|
|
||||||
id="org.lwjgl.tools"
|
|
||||||
download-size="16"
|
|
||||||
install-size="16"
|
|
||||||
version="@VERSION@"/>
|
|
||||||
|
|
||||||
</feature>
|
|
|
@ -1,17 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<projectDescription>
|
|
||||||
<name>org.lwjgl.feature</name>
|
|
||||||
<comment></comment>
|
|
||||||
<projects>
|
|
||||||
</projects>
|
|
||||||
<buildSpec>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.pde.FeatureBuilder</name>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
</buildSpec>
|
|
||||||
<natures>
|
|
||||||
<nature>org.eclipse.pde.FeatureNature</nature>
|
|
||||||
</natures>
|
|
||||||
</projectDescription>
|
|
|
@ -1,2 +0,0 @@
|
||||||
bin.includes = feature.xml,\
|
|
||||||
lwjgl_logo.png
|
|
|
@ -1,93 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<feature
|
|
||||||
id="org.lwjgl"
|
|
||||||
label="Lightweight Java Game Library Project (LWJGL)"
|
|
||||||
version="2"
|
|
||||||
provider-name="Lightweight Java Game Library Project"
|
|
||||||
image="lwjgl_logo.png">
|
|
||||||
|
|
||||||
<description url="http://lwjgl.org">
|
|
||||||
This feature provides easy access to the
|
|
||||||
Lightweight Java Game Library (LWJGL)
|
|
||||||
for Eclipse plugin developers. It includes
|
|
||||||
- java and native libraries (Windows, Mac OS X, Linux, Solaris)
|
|
||||||
- source code
|
|
||||||
- javadoc
|
|
||||||
- info plugin
|
|
||||||
- library tool
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<copyright url="http://lwjgl.org/credits.php">
|
|
||||||
Copyright (c) 2002-2010 Lightweight Java Game Library Project
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
LWJGL is available under a BSD license, which means it's open
|
|
||||||
source and freely available at no charge.
|
|
||||||
|
|
||||||
Eclipse feature and plugins created by Jens von Pilgrim (developer@jevopi.de),
|
|
||||||
plugin specific code made available under a BSD license and
|
|
||||||
Eclipse Public License (EPL).
|
|
||||||
</copyright>
|
|
||||||
|
|
||||||
<license url="http://lwjgl.org/license.php">
|
|
||||||
Copyright (c) 2002-2010 Lightweight Java Game Library 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 'Light Weight Java Game Library' 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.
|
|
||||||
</license>
|
|
||||||
|
|
||||||
<url>
|
|
||||||
<update label="LWJGL Update Site" url="http://lwjgl.org/update"/>
|
|
||||||
<discovery label="Home of the Lightweight Java Game Library" url="http://lwjgl.org/index.php"/>
|
|
||||||
</url>
|
|
||||||
|
|
||||||
<plugin
|
|
||||||
id="org.lwjgl"
|
|
||||||
download-size="3700"
|
|
||||||
install-size="3700"
|
|
||||||
version="2"/>
|
|
||||||
|
|
||||||
<plugin
|
|
||||||
id="org.lwjgl.doc"
|
|
||||||
download-size="2800"
|
|
||||||
install-size="2800"
|
|
||||||
version="2"/>
|
|
||||||
|
|
||||||
<plugin
|
|
||||||
id="org.lwjgl.source"
|
|
||||||
download-size="1200"
|
|
||||||
install-size="1200"
|
|
||||||
version="2"/>
|
|
||||||
|
|
||||||
<plugin
|
|
||||||
id="org.lwjgl.info"
|
|
||||||
download-size="50"
|
|
||||||
install-size="50"
|
|
||||||
version="2"/>
|
|
||||||
|
|
||||||
</feature>
|
|
|
@ -1,72 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<feature
|
|
||||||
id="org.lwjgl"
|
|
||||||
label="Lightweight Java Game Library (LWJGL)"
|
|
||||||
version="@VERSION@"
|
|
||||||
provider-name="Lightweight Java Game Library Project"
|
|
||||||
image="lwjgl_logo.png">
|
|
||||||
|
|
||||||
<description url="http://lwjgl.org">
|
|
||||||
This feature provides easy access to the
|
|
||||||
Lightweight Java Game Library (LWJGL)
|
|
||||||
for Eclipse plugin developers. It includes
|
|
||||||
- java and native libraries (Windows, Mac OS X, Linux, Solaris)
|
|
||||||
For source, javadoc and more tools install SDK.
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<copyright url="http://lwjgl.org/credits.php">
|
|
||||||
Copyright (c) 2002-2010 Lightweight Java Game Library Project
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
LWJGL is available under a BSD license, which means it's open
|
|
||||||
source and freely available at no charge.
|
|
||||||
|
|
||||||
Eclipse feature and plugins created by Jens von Pilgrim (developer@jevopi.de),
|
|
||||||
plugin specific code made available under a BSD license and
|
|
||||||
Eclipse Public License (EPL).
|
|
||||||
</copyright>
|
|
||||||
|
|
||||||
<license url="http://lwjgl.org/license.php">
|
|
||||||
Copyright (c) 2002-2010 Lightweight Java Game Library 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 'Light Weight Java Game Library' 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.
|
|
||||||
</license>
|
|
||||||
|
|
||||||
<url>
|
|
||||||
<update label="LWJGL Update Site" url="http://lwjgl.org/update" />
|
|
||||||
<discovery label="Home of the Lightweight Java Game Library" url="http://lwjgl.org/index.php"/>
|
|
||||||
</url>
|
|
||||||
|
|
||||||
<plugin
|
|
||||||
id="org.lwjgl"
|
|
||||||
download-size="3700"
|
|
||||||
install-size="3700"
|
|
||||||
version="@VERSION@"/>
|
|
||||||
|
|
||||||
</feature>
|
|
Before Width: | Height: | Size: 24 KiB |
|
@ -1,7 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<classpath>
|
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
|
|
||||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
|
||||||
<classpathentry kind="src" path="src/java"/>
|
|
||||||
<classpathentry kind="output" path="build/classes"/>
|
|
||||||
</classpath>
|
|
|
@ -1,28 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<projectDescription>
|
|
||||||
<name>org.lwjgl.info</name>
|
|
||||||
<comment></comment>
|
|
||||||
<projects>
|
|
||||||
</projects>
|
|
||||||
<buildSpec>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
</buildSpec>
|
|
||||||
<natures>
|
|
||||||
<nature>org.eclipse.pde.PluginNature</nature>
|
|
||||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
|
||||||
</natures>
|
|
||||||
</projectDescription>
|
|
|
@ -1,12 +0,0 @@
|
||||||
#Thu Sep 13 13:53:08 CEST 2007
|
|
||||||
eclipse.preferences.version=1
|
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
|
|
||||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
|
||||||
org.eclipse.jdt.core.compiler.compliance=1.5
|
|
||||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
|
||||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
|
||||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
|
||||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
|
||||||
org.eclipse.jdt.core.compiler.source=1.5
|
|
|
@ -1,16 +0,0 @@
|
||||||
Manifest-Version: 1.0
|
|
||||||
Bundle-ManifestVersion: 2
|
|
||||||
Bundle-Name: LWJGL TestView
|
|
||||||
Bundle-Vendor: Lightweight Java Game Library Project
|
|
||||||
Bundle-SymbolicName: org.lwjgl.info;singleton:=true
|
|
||||||
Bundle-Version: 2.0.0
|
|
||||||
Bundle-Localization: plugin
|
|
||||||
Require-Bundle: org.eclipse.ui,
|
|
||||||
org.eclipse.core.runtime,
|
|
||||||
org.eclipse.ui.views,
|
|
||||||
org.eclipse.core.resources
|
|
||||||
Bundle-RequiredExecutionEnvironment: J2SE-1.5
|
|
||||||
Import-Package: org.lwjgl,
|
|
||||||
org.lwjgl.opengl,
|
|
||||||
org.lwjgl.util,
|
|
||||||
org.lwjgl.util.glu
|
|
|
@ -1,60 +0,0 @@
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>About</title>
|
|
||||||
<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
|
|
||||||
</head>
|
|
||||||
<body lang="EN-US">
|
|
||||||
<img src="lwjgl_logo.png" align="right"/>
|
|
||||||
<h2>About This Content</h2>
|
|
||||||
<p>The <a href="http://lwjgl.org">Lightweight Java Game Library (LWJGL)</a> is a solution aimed
|
|
||||||
directly at professional and amateur Java programmers alike to enable <a
|
|
||||||
href="projects.php">commercial quality games</a> to be written in Java.
|
|
||||||
LWJGL provides developers access to high performance crossplatform
|
|
||||||
libraries such as OpenGL (<a href="http://www.opengl.org/"
|
|
||||||
target="_blank">Open Graphics Library</a>) and OpenAL (<a
|
|
||||||
href="http://www.openal.org" target="_blank">Open Audio Library</a>)
|
|
||||||
allowing for state of the art 3D games and 3D sound. Additionally LWJGL
|
|
||||||
provides access to controllers such as Gamepads, Steering wheel and
|
|
||||||
Joysticks. All in a simple and straight forward API.</p>
|
|
||||||
<p>LWJGL is not meant to make writing games particularly easy; it is
|
|
||||||
primarily an enabling technology which allows developers to get at
|
|
||||||
resources that are simply otherwise unavailable or poorly implemented on
|
|
||||||
the existing <a href="http://java.sun.com" target="_blank">Java
|
|
||||||
platform</a>. We anticipate that the LWJGL will, through evolution and
|
|
||||||
extension, become the foundation for more complete game libraries and
|
|
||||||
"game engines" as they have popularly become known, and hide some of the
|
|
||||||
new evils we have had to expose in the APIs.</p>
|
|
||||||
<p>LWJGL is available under a <a href="http://lwjgl.org/license.php">BSD
|
|
||||||
license</a>, which means it's open source and freely available at no charge.</p>
|
|
||||||
<p>Please visit us on the Freenode IRC Network: <a
|
|
||||||
href="irc://irc.freenode.net/lwjgl" target="_blank">#LWJGL</a>. Do idle
|
|
||||||
if there is no one to answer any of your questions, we are on different
|
|
||||||
timezones.</p>
|
|
||||||
|
|
||||||
<h3>Plugin assembly</h3>
|
|
||||||
<p>The plugins were assembled by Jens von Pilgrim (developer@jevopi.de). All files related to this assembly, such as manifest files or plugin descriptors, are copyright under the Eclipse Public License (EPL) and the BSD license</p>
|
|
||||||
|
|
||||||
<h3>Third party code</h3>
|
|
||||||
|
|
||||||
<h4>IBM</h4>
|
|
||||||
<p>The LWJGL Textview contains code copyright under the Eclipse Public License (EPL):<br/>
|
|
||||||
<pre>
|
|
||||||
Copyright (c) 2000, 2005 IBM Corporation and others.
|
|
||||||
All rights reserved. This program and the accompanying materials
|
|
||||||
are made available under the terms of the Eclipse Public License v1.0
|
|
||||||
which accompanies this distribution, and is available at
|
|
||||||
<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
|
|
||||||
</pre>
|
|
||||||
The source of this code can be found at:
|
|
||||||
<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet195.java?view=markup&content-type=text%2Fvnd.viewcvs-markup&revision=HEAD">http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet195.java?view=markup&content-type=text%2Fvnd.viewcvs-markup&revision=HEAD</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h4>SGI</h4>
|
|
||||||
<p>
|
|
||||||
LWJGL contains code copyright by SGI. This code is copyright under the SGI FreeB v1.1, see <a href="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</a>. Note that this license can be updated to version 2.0.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,9 +0,0 @@
|
||||||
source.. = src/java/
|
|
||||||
output.. = build/classes/
|
|
||||||
bin.includes = META-INF/,\
|
|
||||||
.,\
|
|
||||||
icons/,\
|
|
||||||
lwjgl_logo.png,\
|
|
||||||
plugin.xml,\
|
|
||||||
about.html
|
|
||||||
src.includes = src/
|
|
Before Width: | Height: | Size: 574 B |
Before Width: | Height: | Size: 24 KiB |
|
@ -1,25 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<?eclipse version="3.2"?>
|
|
||||||
<plugin>
|
|
||||||
<extension point="org.eclipse.ui.views" >
|
|
||||||
<view
|
|
||||||
category="org.eclipse.ui"
|
|
||||||
class="org.lwjgl.info.LWJGLTestView"
|
|
||||||
icon="icons/lwjgl_logo_16.gif"
|
|
||||||
id="org.lwjgl.info.LWJGLTestView"
|
|
||||||
name="LWJGL Test View"/>
|
|
||||||
</extension>
|
|
||||||
|
|
||||||
<extension point="org.eclipse.ui.views" >
|
|
||||||
<view
|
|
||||||
category="org.eclipse.ui"
|
|
||||||
class="org.lwjgl.info.LWJGLInfoView"
|
|
||||||
icon="icons/lwjgl_logo_16.gif"
|
|
||||||
id="org.lwjgl.info.LWJGLInfoView"
|
|
||||||
name="LWJGL Information View"/>
|
|
||||||
</extension>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</plugin>
|
|
|
@ -1,186 +0,0 @@
|
||||||
/*******************************************************************************
|
|
||||||
* Copyright (c) 2011 LWJGL Project and others
|
|
||||||
* All rights reserved. This program and the accompanying materials
|
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
|
||||||
* which accompanies this distribution, and is available at
|
|
||||||
* http://www.eclipse.org/legal/epl-v10.html, and under the terms of the
|
|
||||||
* BSD license, see http://lwjgl.org/license.php for details.
|
|
||||||
*
|
|
||||||
* Contributors:
|
|
||||||
* Kristian Duske - FPS Status Line Item
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
package org.lwjgl.info;
|
|
||||||
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
import org.eclipse.jface.action.ContributionItem;
|
|
||||||
import org.eclipse.jface.action.StatusLineLayoutData;
|
|
||||||
import org.eclipse.swt.SWT;
|
|
||||||
import org.eclipse.swt.custom.CLabel;
|
|
||||||
import org.eclipse.swt.graphics.GC;
|
|
||||||
import org.eclipse.swt.widgets.Composite;
|
|
||||||
import org.eclipse.swt.widgets.Display;
|
|
||||||
import org.eclipse.swt.widgets.Label;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Displays FPS information in the Eclipse status bar.
|
|
||||||
*
|
|
||||||
* @author Kristian Duske
|
|
||||||
* @version $Revision$
|
|
||||||
* @since 22.05.2008
|
|
||||||
* @see $HeadURL$
|
|
||||||
*/
|
|
||||||
public class FpsStatusLineItem extends ContributionItem {
|
|
||||||
|
|
||||||
private static final int CHAR_WIDTH = 8;
|
|
||||||
|
|
||||||
private static final int INDENT = 3;
|
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
private static final Logger log = Logger.getLogger(FpsStatusLineItem.class
|
|
||||||
.getName());
|
|
||||||
|
|
||||||
private static final int NUM_FRAMES = 500;
|
|
||||||
|
|
||||||
private static final long TIMEOUT = 300;
|
|
||||||
|
|
||||||
private int m_fixedHeight = -1;
|
|
||||||
|
|
||||||
private int m_fixedWidth = -1;
|
|
||||||
|
|
||||||
private long[] m_frames = new long[NUM_FRAMES];
|
|
||||||
|
|
||||||
private int m_index = 0;
|
|
||||||
|
|
||||||
private int m_count = -1;
|
|
||||||
|
|
||||||
private double avg;
|
|
||||||
|
|
||||||
private long m_lastFrame = -1;
|
|
||||||
|
|
||||||
private CLabel m_label;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public FpsStatusLineItem() {
|
|
||||||
for (int i = 0; i < m_frames.length; i++)
|
|
||||||
m_frames[i] = 0;
|
|
||||||
avg = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param i_id
|
|
||||||
*/
|
|
||||||
public FpsStatusLineItem(String i_id) {
|
|
||||||
super(i_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
*
|
|
||||||
* @see org.eclipse.jface.action.ContributionItem#fill(org.eclipse.swt.widgets.Composite)
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void fill(Composite i_parent) {
|
|
||||||
|
|
||||||
Label sep = new Label(i_parent, SWT.SEPARATOR);
|
|
||||||
m_label = new CLabel(i_parent, SWT.SHADOW_NONE);
|
|
||||||
|
|
||||||
StatusLineLayoutData data = new StatusLineLayoutData();
|
|
||||||
data.widthHint = getWidthHint(i_parent);
|
|
||||||
m_label.setLayoutData(data);
|
|
||||||
|
|
||||||
data = new StatusLineLayoutData();
|
|
||||||
data.heightHint = getHeightHint(i_parent);
|
|
||||||
sep.setLayoutData(data);
|
|
||||||
|
|
||||||
updateCounter();
|
|
||||||
}
|
|
||||||
|
|
||||||
private int getHeightHint(Composite control) {
|
|
||||||
|
|
||||||
if (m_fixedHeight < 0) {
|
|
||||||
GC gc = new GC(control);
|
|
||||||
gc.setFont(control.getFont());
|
|
||||||
m_fixedHeight = gc.getFontMetrics().getHeight();
|
|
||||||
gc.dispose();
|
|
||||||
}
|
|
||||||
return m_fixedHeight;
|
|
||||||
}
|
|
||||||
|
|
||||||
private int getWidthHint(Composite control) {
|
|
||||||
|
|
||||||
if (m_fixedWidth < 0) {
|
|
||||||
GC gc = new GC(control);
|
|
||||||
gc.setFont(control.getFont());
|
|
||||||
m_fixedWidth = gc.getFontMetrics().getAverageCharWidth()
|
|
||||||
* CHAR_WIDTH;
|
|
||||||
m_fixedWidth += INDENT * 2;
|
|
||||||
gc.dispose();
|
|
||||||
}
|
|
||||||
return m_fixedWidth;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
*
|
|
||||||
* @see de.feu.draw3d.RenderListener#renderPassFinished()
|
|
||||||
*/
|
|
||||||
public void renderPassFinished() {
|
|
||||||
|
|
||||||
long time = System.currentTimeMillis();
|
|
||||||
if (m_lastFrame == -1) {
|
|
||||||
m_lastFrame = time;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
long frameTime = time - m_lastFrame;
|
|
||||||
m_lastFrame = time;
|
|
||||||
|
|
||||||
if (frameTime <= TIMEOUT) {
|
|
||||||
|
|
||||||
if (m_count < NUM_FRAMES)
|
|
||||||
m_count++;
|
|
||||||
|
|
||||||
avg -= m_frames[m_index];
|
|
||||||
m_frames[m_index] = frameTime;
|
|
||||||
avg += m_frames[m_index];
|
|
||||||
|
|
||||||
m_index++;
|
|
||||||
if (m_index >= NUM_FRAMES) {
|
|
||||||
m_index = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
updateCounter();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
*
|
|
||||||
* @see de.feu.draw3d.RenderListener#renderPassStarted()
|
|
||||||
*/
|
|
||||||
public void renderPassStarted() {
|
|
||||||
|
|
||||||
// nothing to do
|
|
||||||
}
|
|
||||||
|
|
||||||
private synchronized void updateCounter() {
|
|
||||||
|
|
||||||
long fps = 0;
|
|
||||||
if (m_count > 0)
|
|
||||||
fps = (long) (1000.0 / (avg / ((double) m_count)));
|
|
||||||
// System.out.println("i:"+m_index+", c="+m_count+", avg: " + avg);
|
|
||||||
|
|
||||||
if (m_label != null && !m_label.isDisposed()) {
|
|
||||||
Display display = m_label.getDisplay();
|
|
||||||
|
|
||||||
m_label.setForeground(display
|
|
||||||
.getSystemColor(SWT.COLOR_WIDGET_FOREGROUND));
|
|
||||||
m_label.setText(fps + " FPS");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,609 +0,0 @@
|
||||||
/*******************************************************************************
|
|
||||||
* Copyright (c) 2011 LWJGL Project and others
|
|
||||||
* All rights reserved. This program and the accompanying materials
|
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
|
||||||
* which accompanies this distribution, and is available at
|
|
||||||
* http://www.eclipse.org/legal/epl-v10.html, and under the terms of the
|
|
||||||
* BSD license, see http://lwjgl.org/license.php for details.
|
|
||||||
*
|
|
||||||
* Contributors:
|
|
||||||
* Jens von Pilgrim - initial implementation
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
package org.lwjgl.info;
|
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.TreeMap;
|
|
||||||
import java.util.TreeSet;
|
|
||||||
|
|
||||||
import org.eclipse.core.runtime.IBundleGroup;
|
|
||||||
import org.eclipse.core.runtime.IBundleGroupProvider;
|
|
||||||
import org.eclipse.core.runtime.Platform;
|
|
||||||
import org.eclipse.swt.SWT;
|
|
||||||
import org.eclipse.swt.opengl.GLCanvas;
|
|
||||||
import org.eclipse.swt.opengl.GLData;
|
|
||||||
import org.eclipse.swt.widgets.Composite;
|
|
||||||
import org.eclipse.swt.widgets.Text;
|
|
||||||
import org.eclipse.ui.part.ViewPart;
|
|
||||||
import org.lwjgl.LWJGLException;
|
|
||||||
import org.lwjgl.LWJGLUtil;
|
|
||||||
import org.lwjgl.Sys;
|
|
||||||
import org.lwjgl.opengl.ContextCapabilities;
|
|
||||||
import org.lwjgl.opengl.Display;
|
|
||||||
import org.lwjgl.opengl.GL11;
|
|
||||||
import org.lwjgl.opengl.GLContext;
|
|
||||||
import org.lwjgl.util.glu.GLU;
|
|
||||||
import org.lwjgl.util.glu.Registry;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* LWJGLInfoView
|
|
||||||
* There should really be more documentation here.
|
|
||||||
*
|
|
||||||
* @author Jens von Pilgrim
|
|
||||||
* @version $Revision$
|
|
||||||
* @since Nov 23, 2010
|
|
||||||
*/
|
|
||||||
public class LWJGLInfoView extends ViewPart {
|
|
||||||
|
|
||||||
static final String NL = System.getProperty("line.separator", "\n");
|
|
||||||
|
|
||||||
static final int TAB = 16;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
* @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void createPartControl(Composite i_parent) {
|
|
||||||
|
|
||||||
Text info = new Text(i_parent, SWT.READ_ONLY | SWT.LEFT | SWT.MULTI
|
|
||||||
| SWT.H_SCROLL | SWT.V_SCROLL);
|
|
||||||
|
|
||||||
GLCanvas canvas = new GLCanvas(i_parent, SWT.NONE, new GLData());
|
|
||||||
canvas.setCurrent();
|
|
||||||
try {
|
|
||||||
GLContext.useContext(canvas);
|
|
||||||
} catch (LWJGLException ex) {
|
|
||||||
// TODO Implement catch block for LWJGLException
|
|
||||||
ex.printStackTrace();
|
|
||||||
}
|
|
||||||
|
|
||||||
String infoString = gatherInformation();
|
|
||||||
info.setText(infoString);
|
|
||||||
}
|
|
||||||
|
|
||||||
static String getFeatureVersion(String myFeatureId) {
|
|
||||||
IBundleGroupProvider[] providers = Platform.getBundleGroupProviders();
|
|
||||||
if (providers != null) {
|
|
||||||
for (int i = 0; i < providers.length; ++i) {
|
|
||||||
IBundleGroup[] bundleGroups = providers[i].getBundleGroups();
|
|
||||||
for (IBundleGroup bg : bundleGroups) {
|
|
||||||
if (bg.getIdentifier().equals(myFeatureId)) {
|
|
||||||
return bg.getVersion();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return "Feature not found";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param i_canvas
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
private static String gatherInformation() {
|
|
||||||
StringBuffer strb = new StringBuffer();
|
|
||||||
|
|
||||||
try {
|
|
||||||
infoNL(strb, "LWJGL feature version",
|
|
||||||
getFeatureVersion("org.lwjgl"));
|
|
||||||
} catch (Exception ex) {
|
|
||||||
warnNL(strb, "Error retrieving feature version: " + ex.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
infoNL(strb, "LWJGL version", Sys.getVersion()
|
|
||||||
+ (Sys.is64Bit() ? " (64bit)" : ""));
|
|
||||||
|
|
||||||
infoNL(strb, "Java", System.getProperty("java.version"),
|
|
||||||
System.getProperty("java.vendor"));
|
|
||||||
infoNL(strb, "Platform", LWJGLUtil.getPlatformName());
|
|
||||||
infoNL(strb, "Graphics card", Display.getAdapter());
|
|
||||||
infoNL(strb, "Driver version", Display.getVersion());
|
|
||||||
infoNL(strb, "OpenGL driver version", GL11.glGetString(GL11.GL_VERSION));
|
|
||||||
|
|
||||||
infoNL(strb, "GLU version", Registry.gluGetString(GLU.GLU_VERSION));
|
|
||||||
infoNL(strb, "GLU extensions",
|
|
||||||
Registry.gluGetString(GLU.GLU_EXTENSIONS));
|
|
||||||
|
|
||||||
ContextCapabilities caps = GLContext.getCapabilities();
|
|
||||||
openGLVersions(strb, caps);
|
|
||||||
|
|
||||||
strb.append(NL).append("Capabilities").append(NL);
|
|
||||||
TreeMap<String, Boolean> capInfos = new TreeMap<String, Boolean>();
|
|
||||||
gatherCapabilities(caps, capInfos);
|
|
||||||
infoGroupedCaps(strb, capInfos);
|
|
||||||
|
|
||||||
Display.destroy();
|
|
||||||
|
|
||||||
return strb.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
static void openGLVersions(StringBuffer strb, ContextCapabilities caps) {
|
|
||||||
StringBuffer versions = new StringBuffer();
|
|
||||||
if (caps.OpenGL11)
|
|
||||||
versions.append(", 1.1");
|
|
||||||
if (caps.OpenGL12)
|
|
||||||
versions.append(", 1.2");
|
|
||||||
if (caps.OpenGL13)
|
|
||||||
versions.append(", 1.3");
|
|
||||||
if (caps.OpenGL14)
|
|
||||||
versions.append(", 1.4");
|
|
||||||
if (caps.OpenGL15)
|
|
||||||
versions.append(", 1.5");
|
|
||||||
if (caps.OpenGL20)
|
|
||||||
versions.append(", 2.0");
|
|
||||||
if (caps.OpenGL21)
|
|
||||||
versions.append(", 2.1");
|
|
||||||
if (caps.OpenGL30)
|
|
||||||
versions.append(", 3.0");
|
|
||||||
if (caps.OpenGL31)
|
|
||||||
versions.append(", 3.1");
|
|
||||||
if (caps.OpenGL32)
|
|
||||||
versions.append(", 3.2");
|
|
||||||
if (caps.OpenGL33)
|
|
||||||
versions.append(", 3.3");
|
|
||||||
if (caps.OpenGL40)
|
|
||||||
versions.append(", 4.0");
|
|
||||||
if (caps.OpenGL41)
|
|
||||||
versions.append(", 4.1");
|
|
||||||
if (strb.length() > 2)
|
|
||||||
versions.delete(0, 2);
|
|
||||||
infoNL(strb, "Supported OpenGL versions", versions.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param i_strb
|
|
||||||
* @param i_capInfos
|
|
||||||
*/
|
|
||||||
static void infoGroupedCaps(StringBuffer strb,
|
|
||||||
TreeMap<String, Boolean> capInfos) {
|
|
||||||
String currentGroup = "*NOGROUP*";
|
|
||||||
Set<String> groupInfosSupported = new TreeSet<String>();
|
|
||||||
Set<String> groupInfosNA = new TreeSet<String>();
|
|
||||||
for (String key : capInfos.keySet()) {
|
|
||||||
if (!key.startsWith(currentGroup)) {
|
|
||||||
printGroup(strb, currentGroup, groupInfosSupported,
|
|
||||||
groupInfosNA);
|
|
||||||
currentGroup = key.substring(0, key.indexOf(' '));
|
|
||||||
}
|
|
||||||
if (capInfos.get(key).booleanValue()) {
|
|
||||||
groupInfosSupported.add(key);
|
|
||||||
} else {
|
|
||||||
groupInfosNA.add(key);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
printGroup(strb, currentGroup, groupInfosSupported, groupInfosNA);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param i_currentGroup
|
|
||||||
* @param i_groupInfosSupported
|
|
||||||
* @param i_groupInfosNA
|
|
||||||
*/
|
|
||||||
private static void printGroup(StringBuffer strb, String currentGroup,
|
|
||||||
Set<String> groupInfosSupported, Set<String> groupInfosNA) {
|
|
||||||
String title = currentGroup + " extensions";
|
|
||||||
if (!(groupInfosSupported.isEmpty() && groupInfosNA.isEmpty())) {
|
|
||||||
if (groupInfosSupported.isEmpty()) {
|
|
||||||
infoNL(strb, title, "n.a.");
|
|
||||||
} else {
|
|
||||||
|
|
||||||
strb.append(title).append(": ");
|
|
||||||
for (int i = 0; i < TAB - title.length(); i++) {
|
|
||||||
strb.append(' ');
|
|
||||||
}
|
|
||||||
int c = 1;
|
|
||||||
for (String s : groupInfosSupported) {
|
|
||||||
if (c > 1)
|
|
||||||
strb.append(',');
|
|
||||||
if (c % 4 == 0) {
|
|
||||||
strb.append(NL).append(" ");
|
|
||||||
} else if (c > 1) {
|
|
||||||
strb.append(' ');
|
|
||||||
}
|
|
||||||
strb.append(s.substring(currentGroup.length() + 1));
|
|
||||||
c++;
|
|
||||||
}
|
|
||||||
strb.append(NL);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
groupInfosNA.clear();
|
|
||||||
groupInfosSupported.clear();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param caps
|
|
||||||
* @param capInfos
|
|
||||||
*/
|
|
||||||
private static void gatherCapabilities(ContextCapabilities caps,
|
|
||||||
Map<String, Boolean> capInfos) {
|
|
||||||
capInfos.put("AMD conservative depth", caps.GL_AMD_conservative_depth);
|
|
||||||
capInfos.put("AMD debug output", caps.GL_AMD_debug_output);
|
|
||||||
capInfos.put("AMD draw buffers blend", caps.GL_AMD_draw_buffers_blend);
|
|
||||||
capInfos.put("AMD name gen delete", caps.GL_AMD_name_gen_delete);
|
|
||||||
capInfos.put("AMD performance monitor", caps.GL_AMD_performance_monitor);
|
|
||||||
capInfos.put("AMD seamless cubemap per texture",
|
|
||||||
caps.GL_AMD_seamless_cubemap_per_texture);
|
|
||||||
capInfos.put("AMD shader stencil export",
|
|
||||||
caps.GL_AMD_shader_stencil_export);
|
|
||||||
capInfos.put("AMD texture texture4", caps.GL_AMD_texture_texture4);
|
|
||||||
capInfos.put("AMD transform feedback3 lines triangles",
|
|
||||||
caps.GL_AMD_transform_feedback3_lines_triangles);
|
|
||||||
capInfos.put("AMD vertex shader tessellator",
|
|
||||||
caps.GL_AMD_vertex_shader_tessellator);
|
|
||||||
capInfos.put("APPLE aux depth stencil", caps.GL_APPLE_aux_depth_stencil);
|
|
||||||
capInfos.put("APPLE client storage", caps.GL_APPLE_client_storage);
|
|
||||||
capInfos.put("APPLE element array", caps.GL_APPLE_element_array);
|
|
||||||
capInfos.put("APPLE fence", caps.GL_APPLE_fence);
|
|
||||||
capInfos.put("APPLE float pixels", caps.GL_APPLE_float_pixels);
|
|
||||||
capInfos.put("APPLE flush buffer range",
|
|
||||||
caps.GL_APPLE_flush_buffer_range);
|
|
||||||
capInfos.put("APPLE object purgeable", caps.GL_APPLE_object_purgeable);
|
|
||||||
capInfos.put("APPLE packed pixels", caps.GL_APPLE_packed_pixels);
|
|
||||||
capInfos.put("APPLE rgb 422", caps.GL_APPLE_rgb_422);
|
|
||||||
capInfos.put("APPLE row bytes", caps.GL_APPLE_row_bytes);
|
|
||||||
capInfos.put("APPLE texture range", caps.GL_APPLE_texture_range);
|
|
||||||
capInfos.put("APPLE vertex array object",
|
|
||||||
caps.GL_APPLE_vertex_array_object);
|
|
||||||
capInfos.put("APPLE vertex array range",
|
|
||||||
caps.GL_APPLE_vertex_array_range);
|
|
||||||
capInfos.put("APPLE vertex program evaluators",
|
|
||||||
caps.GL_APPLE_vertex_program_evaluators);
|
|
||||||
capInfos.put("APPLE ycbcr 422", caps.GL_APPLE_ycbcr_422);
|
|
||||||
capInfos.put("ARB ES2 compatibility", caps.GL_ARB_ES2_compatibility);
|
|
||||||
capInfos.put("ARB blend func extended", caps.GL_ARB_blend_func_extended);
|
|
||||||
capInfos.put("ARB cl event", caps.GL_ARB_cl_event);
|
|
||||||
capInfos.put("ARB color buffer float", caps.GL_ARB_color_buffer_float);
|
|
||||||
capInfos.put("ARB compatibility", caps.GL_ARB_compatibility);
|
|
||||||
capInfos.put("ARB copy buffer", caps.GL_ARB_copy_buffer);
|
|
||||||
capInfos.put("ARB debug output", caps.GL_ARB_debug_output);
|
|
||||||
capInfos.put("ARB depth buffer float", caps.GL_ARB_depth_buffer_float);
|
|
||||||
capInfos.put("ARB depth clamp", caps.GL_ARB_depth_clamp);
|
|
||||||
capInfos.put("ARB depth texture", caps.GL_ARB_depth_texture);
|
|
||||||
capInfos.put("ARB draw buffers", caps.GL_ARB_draw_buffers);
|
|
||||||
capInfos.put("ARB draw buffers blend", caps.GL_ARB_draw_buffers_blend);
|
|
||||||
capInfos.put("ARB draw elements base vertex",
|
|
||||||
caps.GL_ARB_draw_elements_base_vertex);
|
|
||||||
capInfos.put("ARB draw indirect", caps.GL_ARB_draw_indirect);
|
|
||||||
capInfos.put("ARB draw instanced", caps.GL_ARB_draw_instanced);
|
|
||||||
capInfos.put("ARB explicit attrib location",
|
|
||||||
caps.GL_ARB_explicit_attrib_location);
|
|
||||||
capInfos.put("ARB fragment coord conventions",
|
|
||||||
caps.GL_ARB_fragment_coord_conventions);
|
|
||||||
capInfos.put("ARB fragment program", caps.GL_ARB_fragment_program);
|
|
||||||
capInfos.put("ARB fragment program shadow",
|
|
||||||
caps.GL_ARB_fragment_program_shadow);
|
|
||||||
capInfos.put("ARB fragment shader", caps.GL_ARB_fragment_shader);
|
|
||||||
capInfos.put("ARB framebuffer object", caps.GL_ARB_framebuffer_object);
|
|
||||||
capInfos.put("ARB framebuffer sRGB", caps.GL_ARB_framebuffer_sRGB);
|
|
||||||
capInfos.put("ARB geometry shader4", caps.GL_ARB_geometry_shader4);
|
|
||||||
capInfos.put("ARB get program binary", caps.GL_ARB_get_program_binary);
|
|
||||||
capInfos.put("ARB gpu shader5", caps.GL_ARB_gpu_shader5);
|
|
||||||
capInfos.put("ARB gpu shader fp64", caps.GL_ARB_gpu_shader_fp64);
|
|
||||||
capInfos.put("ARB half float pixel", caps.GL_ARB_half_float_pixel);
|
|
||||||
capInfos.put("ARB half float vertex", caps.GL_ARB_half_float_vertex);
|
|
||||||
capInfos.put("ARB imaging", caps.GL_ARB_imaging);
|
|
||||||
capInfos.put("ARB instanced arrays", caps.GL_ARB_instanced_arrays);
|
|
||||||
capInfos.put("ARB map buffer range", caps.GL_ARB_map_buffer_range);
|
|
||||||
capInfos.put("ARB matrix palette", caps.GL_ARB_matrix_palette);
|
|
||||||
capInfos.put("ARB multisample", caps.GL_ARB_multisample);
|
|
||||||
capInfos.put("ARB multitexture", caps.GL_ARB_multitexture);
|
|
||||||
capInfos.put("ARB occlusion query", caps.GL_ARB_occlusion_query);
|
|
||||||
capInfos.put("ARB occlusion query2", caps.GL_ARB_occlusion_query2);
|
|
||||||
capInfos.put("ARB pixel buffer object", caps.GL_ARB_pixel_buffer_object);
|
|
||||||
capInfos.put("ARB point parameters", caps.GL_ARB_point_parameters);
|
|
||||||
capInfos.put("ARB point sprite", caps.GL_ARB_point_sprite);
|
|
||||||
capInfos.put("ARB provoking vertex", caps.GL_ARB_provoking_vertex);
|
|
||||||
capInfos.put("ARB robustness", caps.GL_ARB_robustness);
|
|
||||||
capInfos.put("ARB sample shading", caps.GL_ARB_sample_shading);
|
|
||||||
capInfos.put("ARB sampler objects", caps.GL_ARB_sampler_objects);
|
|
||||||
capInfos.put("ARB seamless cube map", caps.GL_ARB_seamless_cube_map);
|
|
||||||
capInfos.put("ARB separate shader objects",
|
|
||||||
caps.GL_ARB_separate_shader_objects);
|
|
||||||
capInfos.put("ARB shader bit encoding", caps.GL_ARB_shader_bit_encoding);
|
|
||||||
capInfos.put("ARB shader objects", caps.GL_ARB_shader_objects);
|
|
||||||
capInfos.put("ARB shader precision", caps.GL_ARB_shader_precision);
|
|
||||||
capInfos.put("ARB shader stencil export",
|
|
||||||
caps.GL_ARB_shader_stencil_export);
|
|
||||||
capInfos.put("ARB shader subroutine", caps.GL_ARB_shader_subroutine);
|
|
||||||
capInfos.put("ARB shader texture lod", caps.GL_ARB_shader_texture_lod);
|
|
||||||
capInfos.put("ARB shading language 100",
|
|
||||||
caps.GL_ARB_shading_language_100);
|
|
||||||
capInfos.put("ARB shading language include",
|
|
||||||
caps.GL_ARB_shading_language_include);
|
|
||||||
capInfos.put("ARB shadow", caps.GL_ARB_shadow);
|
|
||||||
capInfos.put("ARB shadow ambient", caps.GL_ARB_shadow_ambient);
|
|
||||||
capInfos.put("ARB sync", caps.GL_ARB_sync);
|
|
||||||
capInfos.put("ARB tessellation shader", caps.GL_ARB_tessellation_shader);
|
|
||||||
capInfos.put("ARB texture border clamp",
|
|
||||||
caps.GL_ARB_texture_border_clamp);
|
|
||||||
capInfos.put("ARB texture buffer object",
|
|
||||||
caps.GL_ARB_texture_buffer_object);
|
|
||||||
capInfos.put("ARB texture buffer object rgb32",
|
|
||||||
caps.GL_ARB_texture_buffer_object_rgb32);
|
|
||||||
capInfos.put("ARB texture compression", caps.GL_ARB_texture_compression);
|
|
||||||
capInfos.put("ARB texture compression bptc",
|
|
||||||
caps.GL_ARB_texture_compression_bptc);
|
|
||||||
capInfos.put("ARB texture compression rgtc",
|
|
||||||
caps.GL_ARB_texture_compression_rgtc);
|
|
||||||
capInfos.put("ARB texture cube map", caps.GL_ARB_texture_cube_map);
|
|
||||||
capInfos.put("ARB texture cube map array",
|
|
||||||
caps.GL_ARB_texture_cube_map_array);
|
|
||||||
capInfos.put("ARB texture env add", caps.GL_ARB_texture_env_add);
|
|
||||||
capInfos.put("ARB texture env combine", caps.GL_ARB_texture_env_combine);
|
|
||||||
capInfos.put("ARB texture env crossbar",
|
|
||||||
caps.GL_ARB_texture_env_crossbar);
|
|
||||||
capInfos.put("ARB texture env dot3", caps.GL_ARB_texture_env_dot3);
|
|
||||||
capInfos.put("ARB texture float", caps.GL_ARB_texture_float);
|
|
||||||
capInfos.put("ARB texture gather", caps.GL_ARB_texture_gather);
|
|
||||||
capInfos.put("ARB texture mirrored repeat",
|
|
||||||
caps.GL_ARB_texture_mirrored_repeat);
|
|
||||||
capInfos.put("ARB texture multisample", caps.GL_ARB_texture_multisample);
|
|
||||||
capInfos.put("ARB texture non power of two",
|
|
||||||
caps.GL_ARB_texture_non_power_of_two);
|
|
||||||
capInfos.put("ARB texture query lod", caps.GL_ARB_texture_query_lod);
|
|
||||||
capInfos.put("ARB texture rectangle", caps.GL_ARB_texture_rectangle);
|
|
||||||
capInfos.put("ARB texture rg", caps.GL_ARB_texture_rg);
|
|
||||||
capInfos.put("ARB texture rgb10 a2ui", caps.GL_ARB_texture_rgb10_a2ui);
|
|
||||||
capInfos.put("ARB texture swizzle", caps.GL_ARB_texture_swizzle);
|
|
||||||
capInfos.put("ARB timer query", caps.GL_ARB_timer_query);
|
|
||||||
capInfos.put("ARB transform feedback2", caps.GL_ARB_transform_feedback2);
|
|
||||||
capInfos.put("ARB transform feedback3", caps.GL_ARB_transform_feedback3);
|
|
||||||
capInfos.put("ARB transpose matrix", caps.GL_ARB_transpose_matrix);
|
|
||||||
capInfos.put("ARB uniform buffer object",
|
|
||||||
caps.GL_ARB_uniform_buffer_object);
|
|
||||||
capInfos.put("ARB vertex array bgra", caps.GL_ARB_vertex_array_bgra);
|
|
||||||
capInfos.put("ARB vertex array object", caps.GL_ARB_vertex_array_object);
|
|
||||||
capInfos.put("ARB vertex attrib 64bit", caps.GL_ARB_vertex_attrib_64bit);
|
|
||||||
capInfos.put("ARB vertex blend", caps.GL_ARB_vertex_blend);
|
|
||||||
capInfos.put("ARB vertex buffer object",
|
|
||||||
caps.GL_ARB_vertex_buffer_object);
|
|
||||||
capInfos.put("ARB vertex program", caps.GL_ARB_vertex_program);
|
|
||||||
capInfos.put("ARB vertex shader", caps.GL_ARB_vertex_shader);
|
|
||||||
capInfos.put("ARB vertex type 2 10 10 10 rev",
|
|
||||||
caps.GL_ARB_vertex_type_2_10_10_10_rev);
|
|
||||||
capInfos.put("ARB viewport array", caps.GL_ARB_viewport_array);
|
|
||||||
capInfos.put("ARB window pos", caps.GL_ARB_window_pos);
|
|
||||||
capInfos.put("ATI draw buffers", caps.GL_ATI_draw_buffers);
|
|
||||||
capInfos.put("ATI element array", caps.GL_ATI_element_array);
|
|
||||||
capInfos.put("ATI envmap bumpmap", caps.GL_ATI_envmap_bumpmap);
|
|
||||||
capInfos.put("ATI fragment shader", caps.GL_ATI_fragment_shader);
|
|
||||||
capInfos.put("ATI map object buffer", caps.GL_ATI_map_object_buffer);
|
|
||||||
capInfos.put("ATI meminfo", caps.GL_ATI_meminfo);
|
|
||||||
capInfos.put("ATI pn triangles", caps.GL_ATI_pn_triangles);
|
|
||||||
capInfos.put("ATI separate stencil", caps.GL_ATI_separate_stencil);
|
|
||||||
capInfos.put("ATI shader texture lod", caps.GL_ATI_shader_texture_lod);
|
|
||||||
capInfos.put("ATI text fragment shader",
|
|
||||||
caps.GL_ATI_text_fragment_shader);
|
|
||||||
capInfos.put("ATI texture compression 3dc",
|
|
||||||
caps.GL_ATI_texture_compression_3dc);
|
|
||||||
capInfos.put("ATI texture env combine3",
|
|
||||||
caps.GL_ATI_texture_env_combine3);
|
|
||||||
capInfos.put("ATI texture float", caps.GL_ATI_texture_float);
|
|
||||||
capInfos.put("ATI texture mirror once", caps.GL_ATI_texture_mirror_once);
|
|
||||||
capInfos.put("ATI vertex array object", caps.GL_ATI_vertex_array_object);
|
|
||||||
capInfos.put("ATI vertex attrib array object",
|
|
||||||
caps.GL_ATI_vertex_attrib_array_object);
|
|
||||||
capInfos.put("ATI vertex streams", caps.GL_ATI_vertex_streams);
|
|
||||||
capInfos.put("EXT abgr", caps.GL_EXT_abgr);
|
|
||||||
capInfos.put("EXT bgra", caps.GL_EXT_bgra);
|
|
||||||
capInfos.put("EXT bindable uniform", caps.GL_EXT_bindable_uniform);
|
|
||||||
capInfos.put("EXT blend color", caps.GL_EXT_blend_color);
|
|
||||||
capInfos.put("EXT blend equation separate",
|
|
||||||
caps.GL_EXT_blend_equation_separate);
|
|
||||||
capInfos.put("EXT blend func separate", caps.GL_EXT_blend_func_separate);
|
|
||||||
capInfos.put("EXT blend minmax", caps.GL_EXT_blend_minmax);
|
|
||||||
capInfos.put("EXT blend subtract", caps.GL_EXT_blend_subtract);
|
|
||||||
capInfos.put("EXT Cg shader", caps.GL_EXT_Cg_shader);
|
|
||||||
capInfos.put("EXT compiled vertex array",
|
|
||||||
caps.GL_EXT_compiled_vertex_array);
|
|
||||||
capInfos.put("EXT depth bounds test", caps.GL_EXT_depth_bounds_test);
|
|
||||||
capInfos.put("EXT direct state access", caps.GL_EXT_direct_state_access);
|
|
||||||
capInfos.put("EXT draw buffers2", caps.GL_EXT_draw_buffers2);
|
|
||||||
capInfos.put("EXT draw instanced", caps.GL_EXT_draw_instanced);
|
|
||||||
capInfos.put("EXT draw range elements", caps.GL_EXT_draw_range_elements);
|
|
||||||
capInfos.put("EXT fog coord", caps.GL_EXT_fog_coord);
|
|
||||||
capInfos.put("EXT framebuffer blit", caps.GL_EXT_framebuffer_blit);
|
|
||||||
capInfos.put("EXT framebuffer multisample",
|
|
||||||
caps.GL_EXT_framebuffer_multisample);
|
|
||||||
capInfos.put("EXT framebuffer object", caps.GL_EXT_framebuffer_object);
|
|
||||||
capInfos.put("EXT framebuffer sRGB", caps.GL_EXT_framebuffer_sRGB);
|
|
||||||
capInfos.put("EXT geometry shader4", caps.GL_EXT_geometry_shader4);
|
|
||||||
capInfos.put("EXT gpu program parameters",
|
|
||||||
caps.GL_EXT_gpu_program_parameters);
|
|
||||||
capInfos.put("EXT gpu shader4", caps.GL_EXT_gpu_shader4);
|
|
||||||
capInfos.put("EXT multi draw arrays", caps.GL_EXT_multi_draw_arrays);
|
|
||||||
capInfos.put("EXT packed depth stencil",
|
|
||||||
caps.GL_EXT_packed_depth_stencil);
|
|
||||||
capInfos.put("EXT packed float", caps.GL_EXT_packed_float);
|
|
||||||
capInfos.put("EXT packed pixels", caps.GL_EXT_packed_pixels);
|
|
||||||
capInfos.put("EXT paletted texture", caps.GL_EXT_paletted_texture);
|
|
||||||
capInfos.put("EXT pixel buffer object", caps.GL_EXT_pixel_buffer_object);
|
|
||||||
capInfos.put("EXT point parameters", caps.GL_EXT_point_parameters);
|
|
||||||
capInfos.put("EXT provoking vertex", caps.GL_EXT_provoking_vertex);
|
|
||||||
capInfos.put("EXT rescale normal", caps.GL_EXT_rescale_normal);
|
|
||||||
capInfos.put("EXT secondary color", caps.GL_EXT_secondary_color);
|
|
||||||
capInfos.put("EXT separate shader objects",
|
|
||||||
caps.GL_EXT_separate_shader_objects);
|
|
||||||
capInfos.put("EXT separate specular color",
|
|
||||||
caps.GL_EXT_separate_specular_color);
|
|
||||||
capInfos.put("EXT shader image load store",
|
|
||||||
caps.GL_EXT_shader_image_load_store);
|
|
||||||
capInfos.put("EXT shadow funcs", caps.GL_EXT_shadow_funcs);
|
|
||||||
capInfos.put("EXT shared texture palette",
|
|
||||||
caps.GL_EXT_shared_texture_palette);
|
|
||||||
capInfos.put("EXT stencil clear tag", caps.GL_EXT_stencil_clear_tag);
|
|
||||||
capInfos.put("EXT stencil two side", caps.GL_EXT_stencil_two_side);
|
|
||||||
capInfos.put("EXT stencil wrap", caps.GL_EXT_stencil_wrap);
|
|
||||||
capInfos.put("EXT texture 3d", caps.GL_EXT_texture_3d);
|
|
||||||
capInfos.put("EXT texture array", caps.GL_EXT_texture_array);
|
|
||||||
capInfos.put("EXT texture buffer object",
|
|
||||||
caps.GL_EXT_texture_buffer_object);
|
|
||||||
capInfos.put("EXT texture compression latc",
|
|
||||||
caps.GL_EXT_texture_compression_latc);
|
|
||||||
capInfos.put("EXT texture compression rgtc",
|
|
||||||
caps.GL_EXT_texture_compression_rgtc);
|
|
||||||
capInfos.put("EXT texture compression s3tc",
|
|
||||||
caps.GL_EXT_texture_compression_s3tc);
|
|
||||||
capInfos.put("EXT texture env combine", caps.GL_EXT_texture_env_combine);
|
|
||||||
capInfos.put("EXT texture env dot3", caps.GL_EXT_texture_env_dot3);
|
|
||||||
capInfos.put("EXT texture filter anisotropic",
|
|
||||||
caps.GL_EXT_texture_filter_anisotropic);
|
|
||||||
capInfos.put("EXT texture integer", caps.GL_EXT_texture_integer);
|
|
||||||
capInfos.put("EXT texture lod bias", caps.GL_EXT_texture_lod_bias);
|
|
||||||
capInfos.put("EXT texture mirror clamp",
|
|
||||||
caps.GL_EXT_texture_mirror_clamp);
|
|
||||||
capInfos.put("EXT texture rectangle", caps.GL_EXT_texture_rectangle);
|
|
||||||
capInfos.put("EXT texture sRGB", caps.GL_EXT_texture_sRGB);
|
|
||||||
capInfos.put("EXT texture shared exponent",
|
|
||||||
caps.GL_EXT_texture_shared_exponent);
|
|
||||||
capInfos.put("EXT texture snorm", caps.GL_EXT_texture_snorm);
|
|
||||||
capInfos.put("EXT texture swizzle", caps.GL_EXT_texture_swizzle);
|
|
||||||
capInfos.put("EXT timer query", caps.GL_EXT_timer_query);
|
|
||||||
capInfos.put("EXT transform feedback", caps.GL_EXT_transform_feedback);
|
|
||||||
capInfos.put("EXT vertex array bgra", caps.GL_EXT_vertex_array_bgra);
|
|
||||||
capInfos.put("EXT vertex attrib 64bit", caps.GL_EXT_vertex_attrib_64bit);
|
|
||||||
capInfos.put("EXT vertex shader", caps.GL_EXT_vertex_shader);
|
|
||||||
capInfos.put("EXT vertex weighting", caps.GL_EXT_vertex_weighting);
|
|
||||||
|
|
||||||
capInfos.put("GREMEDY string marker", caps.GL_GREMEDY_string_marker);
|
|
||||||
capInfos.put("HP occlusion test", caps.GL_HP_occlusion_test);
|
|
||||||
capInfos.put("IBM rasterpos clip", caps.GL_IBM_rasterpos_clip);
|
|
||||||
capInfos.put("NVX gpu memory info", caps.GL_NVX_gpu_memory_info);
|
|
||||||
capInfos.put("NV blend square", caps.GL_NV_blend_square);
|
|
||||||
capInfos.put("NV conditional render", caps.GL_NV_conditional_render);
|
|
||||||
capInfos.put("NV copy depth to color", caps.GL_NV_copy_depth_to_color);
|
|
||||||
capInfos.put("NV copy image", caps.GL_NV_copy_image);
|
|
||||||
capInfos.put("NV depth buffer float", caps.GL_NV_depth_buffer_float);
|
|
||||||
capInfos.put("NV depth clamp", caps.GL_NV_depth_clamp);
|
|
||||||
capInfos.put("NV evaluators", caps.GL_NV_evaluators);
|
|
||||||
capInfos.put("NV explicit multisample", caps.GL_NV_explicit_multisample);
|
|
||||||
capInfos.put("NV fence", caps.GL_NV_fence);
|
|
||||||
capInfos.put("NV float buffer", caps.GL_NV_float_buffer);
|
|
||||||
capInfos.put("NV fog distance", caps.GL_NV_fog_distance);
|
|
||||||
capInfos.put("NV fragment program", caps.GL_NV_fragment_program);
|
|
||||||
capInfos.put("NV fragment program2", caps.GL_NV_fragment_program2);
|
|
||||||
capInfos.put("NV fragment program4", caps.GL_NV_fragment_program4);
|
|
||||||
capInfos.put("NV fragment program option",
|
|
||||||
caps.GL_NV_fragment_program_option);
|
|
||||||
capInfos.put("NV framebuffer multisample coverage",
|
|
||||||
caps.GL_NV_framebuffer_multisample_coverage);
|
|
||||||
capInfos.put("NV geometry program4", caps.GL_NV_geometry_program4);
|
|
||||||
capInfos.put("NV geometry shader4", caps.GL_NV_geometry_shader4);
|
|
||||||
capInfos.put("NV gpu program4", caps.GL_NV_gpu_program4);
|
|
||||||
capInfos.put("NV gpu program5", caps.GL_NV_gpu_program5);
|
|
||||||
capInfos.put("NV gpu shader5", caps.GL_NV_gpu_shader5);
|
|
||||||
capInfos.put("NV half float", caps.GL_NV_half_float);
|
|
||||||
capInfos.put("NV light max exponent", caps.GL_NV_light_max_exponent);
|
|
||||||
capInfos.put("NV multisample coverage", caps.GL_NV_multisample_coverage);
|
|
||||||
capInfos.put("NV multisample filter hint",
|
|
||||||
caps.GL_NV_multisample_filter_hint);
|
|
||||||
capInfos.put("NV occlusion query", caps.GL_NV_occlusion_query);
|
|
||||||
capInfos.put("NV packed depth stencil", caps.GL_NV_packed_depth_stencil);
|
|
||||||
capInfos.put("NV parameter buffer object",
|
|
||||||
caps.GL_NV_parameter_buffer_object);
|
|
||||||
capInfos.put("NV parameter buffer object2",
|
|
||||||
caps.GL_NV_parameter_buffer_object2);
|
|
||||||
capInfos.put("NV pixel data range", caps.GL_NV_pixel_data_range);
|
|
||||||
capInfos.put("NV point sprite", caps.GL_NV_point_sprite);
|
|
||||||
capInfos.put("NV primitive restart", caps.GL_NV_primitive_restart);
|
|
||||||
capInfos.put("NV register combiners", caps.GL_NV_register_combiners);
|
|
||||||
capInfos.put("NV register combiners2", caps.GL_NV_register_combiners2);
|
|
||||||
capInfos.put("NV shader buffer load", caps.GL_NV_shader_buffer_load);
|
|
||||||
capInfos.put("NV shader buffer store", caps.GL_NV_shader_buffer_store);
|
|
||||||
capInfos.put("NV tessellation program5",
|
|
||||||
caps.GL_NV_tessellation_program5);
|
|
||||||
capInfos.put("NV texgen reflection", caps.GL_NV_texgen_reflection);
|
|
||||||
capInfos.put("NV texture barrier", caps.GL_NV_texture_barrier);
|
|
||||||
capInfos.put("NV texture compression vtc",
|
|
||||||
caps.GL_NV_texture_compression_vtc);
|
|
||||||
capInfos.put("NV texture env combine4", caps.GL_NV_texture_env_combine4);
|
|
||||||
capInfos.put("NV texture expand normal",
|
|
||||||
caps.GL_NV_texture_expand_normal);
|
|
||||||
capInfos.put("NV texture rectangle", caps.GL_NV_texture_rectangle);
|
|
||||||
capInfos.put("NV texture shader", caps.GL_NV_texture_shader);
|
|
||||||
capInfos.put("NV texture shader2", caps.GL_NV_texture_shader2);
|
|
||||||
capInfos.put("NV texture shader3", caps.GL_NV_texture_shader3);
|
|
||||||
capInfos.put("NV transform feedback", caps.GL_NV_transform_feedback);
|
|
||||||
capInfos.put("NV transform feedback2", caps.GL_NV_transform_feedback2);
|
|
||||||
capInfos.put("NV vertex array range", caps.GL_NV_vertex_array_range);
|
|
||||||
capInfos.put("NV vertex array range2", caps.GL_NV_vertex_array_range2);
|
|
||||||
capInfos.put("NV vertex attrib integer 64bit",
|
|
||||||
caps.GL_NV_vertex_attrib_integer_64bit);
|
|
||||||
capInfos.put("NV vertex buffer unified memory",
|
|
||||||
caps.GL_NV_vertex_buffer_unified_memory);
|
|
||||||
capInfos.put("NV vertex program", caps.GL_NV_vertex_program);
|
|
||||||
capInfos.put("NV vertex program1 1", caps.GL_NV_vertex_program1_1);
|
|
||||||
capInfos.put("NV vertex program2", caps.GL_NV_vertex_program2);
|
|
||||||
capInfos.put("NV vertex program2 option",
|
|
||||||
caps.GL_NV_vertex_program2_option);
|
|
||||||
capInfos.put("NV vertex program3", caps.GL_NV_vertex_program3);
|
|
||||||
capInfos.put("NV vertex program4", caps.GL_NV_vertex_program4);
|
|
||||||
capInfos.put("SGIS generate mipmap", caps.GL_SGIS_generate_mipmap);
|
|
||||||
capInfos.put("SGIS texture lod", caps.GL_SGIS_texture_lod);
|
|
||||||
capInfos.put("SUN slice accum", caps.GL_SUN_slice_accum);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param io_strb
|
|
||||||
* @param title
|
|
||||||
* @param available
|
|
||||||
*/
|
|
||||||
static void availableNL(StringBuffer io_strb, String title, boolean flag) {
|
|
||||||
infoNL(io_strb, title, flag ? "supported" : "not available");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static void warnNL(StringBuffer io_strb, String msg) {
|
|
||||||
io_strb.append(msg).append(NL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void infoNL(StringBuffer io_strb, String title, String... msg) {
|
|
||||||
io_strb.append(title).append(":");
|
|
||||||
for (int i = 0; i < TAB - title.length(); i++) {
|
|
||||||
io_strb.append(' ');
|
|
||||||
}
|
|
||||||
for (String s : msg) {
|
|
||||||
io_strb.append(' ');
|
|
||||||
if (s != null)
|
|
||||||
io_strb.append(s);
|
|
||||||
else
|
|
||||||
io_strb.append("n.a.");
|
|
||||||
}
|
|
||||||
io_strb.append(NL);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
|
||||||
|
|
||||||
Display.setFullscreen(false);
|
|
||||||
Display.create();
|
|
||||||
|
|
||||||
String s = gatherInformation();
|
|
||||||
System.out.println(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
* @see org.eclipse.ui.part.WorkbenchPart#setFocus()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void setFocus() {
|
|
||||||
// TODO implement method LWJGLInfoView.setFocus
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,203 +0,0 @@
|
||||||
/*******************************************************************************
|
|
||||||
* Copyright (c) 2011 LWJGL Project and others
|
|
||||||
* All rights reserved. This program and the accompanying materials
|
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
|
||||||
* which accompanies this distribution, and is available at
|
|
||||||
* http://www.eclipse.org/legal/epl-v10.html, and under the terms of the
|
|
||||||
* BSD license, see http://lwjgl.org/license.php for details.
|
|
||||||
*
|
|
||||||
* Contributors:
|
|
||||||
* Jens von Pilgrim - initial implementation
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
package org.lwjgl.info;
|
|
||||||
|
|
||||||
import org.eclipse.core.runtime.IBundleGroup;
|
|
||||||
import org.eclipse.core.runtime.IBundleGroupProvider;
|
|
||||||
import org.eclipse.core.runtime.Platform;
|
|
||||||
import org.eclipse.jface.action.IStatusLineManager;
|
|
||||||
import org.eclipse.swt.SWT;
|
|
||||||
import org.eclipse.swt.graphics.Rectangle;
|
|
||||||
import org.eclipse.swt.opengl.GLCanvas;
|
|
||||||
import org.eclipse.swt.opengl.GLData;
|
|
||||||
import org.eclipse.swt.widgets.Composite;
|
|
||||||
import org.eclipse.swt.widgets.Display;
|
|
||||||
import org.eclipse.swt.widgets.Event;
|
|
||||||
import org.eclipse.swt.widgets.Listener;
|
|
||||||
import org.eclipse.ui.part.ViewPart;
|
|
||||||
import org.lwjgl.LWJGLException;
|
|
||||||
import org.lwjgl.opengl.GL11;
|
|
||||||
import org.lwjgl.opengl.GLContext;
|
|
||||||
import org.lwjgl.util.glu.GLU;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Simple view for testing whether LWJGL is installed correctly on your
|
|
||||||
* system.
|
|
||||||
* The example is based on
|
|
||||||
* <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet195.java?view=markup&content-type=text%2Fvnd.viewcvs-markup&revision=HEAD">snippet 195</a>.
|
|
||||||
*
|
|
||||||
* @author Jens von Pilgrim
|
|
||||||
* @version $Revision$
|
|
||||||
* @since 16.07.2007
|
|
||||||
* @headurl $HeadURL$
|
|
||||||
*/
|
|
||||||
public class LWJGLTestView extends ViewPart {
|
|
||||||
|
|
||||||
GLCanvas canvas;
|
|
||||||
|
|
||||||
FpsStatusLineItem fpsstatuslineitem;
|
|
||||||
|
|
||||||
static String getFeatureVersion(String myFeatureId) {
|
|
||||||
IBundleGroupProvider[] providers = Platform.getBundleGroupProviders();
|
|
||||||
if (providers != null) {
|
|
||||||
for (int i = 0; i < providers.length; ++i) {
|
|
||||||
IBundleGroup[] bundleGroups = providers[i].getBundleGroups();
|
|
||||||
for (IBundleGroup bg : bundleGroups) {
|
|
||||||
if (bg.getIdentifier().equals(myFeatureId)) {
|
|
||||||
return bg.getVersion();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return "Feature not found";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
* @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void createPartControl(Composite parent) {
|
|
||||||
|
|
||||||
String strVersion = getFeatureVersion("org.lwjgl");
|
|
||||||
this.setPartName("org.lwjgl " + strVersion);
|
|
||||||
|
|
||||||
IStatusLineManager statusLine = this.getViewSite().getActionBars()
|
|
||||||
.getStatusLineManager();
|
|
||||||
|
|
||||||
fpsstatuslineitem = new FpsStatusLineItem();
|
|
||||||
statusLine.add(fpsstatuslineitem);
|
|
||||||
|
|
||||||
GLData data = new GLData();
|
|
||||||
data.doubleBuffer = true;
|
|
||||||
canvas = new GLCanvas(parent, SWT.NONE, data);
|
|
||||||
|
|
||||||
canvas.setCurrent();
|
|
||||||
try {
|
|
||||||
GLContext.useContext(canvas);
|
|
||||||
} catch (LWJGLException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
|
|
||||||
canvas.addListener(SWT.Resize, new Listener() {
|
|
||||||
public void handleEvent(Event event) {
|
|
||||||
Rectangle bounds = canvas.getBounds();
|
|
||||||
float fAspect = (float) bounds.width / (float) bounds.height;
|
|
||||||
canvas.setCurrent();
|
|
||||||
try {
|
|
||||||
GLContext.useContext(canvas);
|
|
||||||
} catch (LWJGLException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
GL11.glViewport(0, 0, bounds.width, bounds.height);
|
|
||||||
GL11.glMatrixMode(GL11.GL_PROJECTION);
|
|
||||||
GL11.glLoadIdentity();
|
|
||||||
GLU.gluPerspective(45.0f, fAspect, 0.5f, 400.0f);
|
|
||||||
GL11.glMatrixMode(GL11.GL_MODELVIEW);
|
|
||||||
GL11.glLoadIdentity();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
GL11.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
|
|
||||||
GL11.glColor3f(1.0f, 0.0f, 0.0f);
|
|
||||||
GL11.glHint(GL11.GL_PERSPECTIVE_CORRECTION_HINT, GL11.GL_NICEST);
|
|
||||||
GL11.glClearDepth(1.0);
|
|
||||||
GL11.glLineWidth(2);
|
|
||||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
|
||||||
|
|
||||||
Display.getCurrent().asyncExec(initRunnable());
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
* @see org.eclipse.ui.part.WorkbenchPart#setFocus()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void setFocus() {
|
|
||||||
canvas.setFocus();
|
|
||||||
}
|
|
||||||
|
|
||||||
static void drawTorus(float r, float R, int nsides, int rings) {
|
|
||||||
float ringDelta = 2.0f * (float) Math.PI / rings;
|
|
||||||
float sideDelta = 2.0f * (float) Math.PI / nsides;
|
|
||||||
float theta = 0.0f, cosTheta = 1.0f, sinTheta = 0.0f;
|
|
||||||
for (int i = rings - 1; i >= 0; i--) {
|
|
||||||
float theta1 = theta + ringDelta;
|
|
||||||
float cosTheta1 = (float) Math.cos(theta1);
|
|
||||||
float sinTheta1 = (float) Math.sin(theta1);
|
|
||||||
GL11.glBegin(GL11.GL_QUAD_STRIP);
|
|
||||||
float phi = 0.0f;
|
|
||||||
for (int j = nsides; j >= 0; j--) {
|
|
||||||
phi += sideDelta;
|
|
||||||
float cosPhi = (float) Math.cos(phi);
|
|
||||||
float sinPhi = (float) Math.sin(phi);
|
|
||||||
float dist = R + r * cosPhi;
|
|
||||||
GL11
|
|
||||||
.glNormal3f(cosTheta1 * cosPhi, -sinTheta1 * cosPhi,
|
|
||||||
sinPhi);
|
|
||||||
GL11
|
|
||||||
.glVertex3f(cosTheta1 * dist, -sinTheta1 * dist, r
|
|
||||||
* sinPhi);
|
|
||||||
GL11.glNormal3f(cosTheta * cosPhi, -sinTheta * cosPhi, sinPhi);
|
|
||||||
GL11.glVertex3f(cosTheta * dist, -sinTheta * dist, r * sinPhi);
|
|
||||||
}
|
|
||||||
GL11.glEnd();
|
|
||||||
theta = theta1;
|
|
||||||
cosTheta = cosTheta1;
|
|
||||||
sinTheta = sinTheta1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Runnable initRunnable() {
|
|
||||||
return new Runnable() {
|
|
||||||
int rot = 0;
|
|
||||||
|
|
||||||
public void run() {
|
|
||||||
if (!canvas.isDisposed() && canvas.isVisible()) {
|
|
||||||
|
|
||||||
fpsstatuslineitem.renderPassStarted();
|
|
||||||
|
|
||||||
canvas.setCurrent();
|
|
||||||
try {
|
|
||||||
GLContext.useContext(canvas);
|
|
||||||
} catch (LWJGLException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT
|
|
||||||
| GL11.GL_DEPTH_BUFFER_BIT);
|
|
||||||
GL11.glClearColor(.2f, .7f, .2f, 1.0f);
|
|
||||||
GL11.glLoadIdentity();
|
|
||||||
GL11.glTranslatef(0.0f, 0.0f, -10.0f);
|
|
||||||
float frot = rot;
|
|
||||||
GL11
|
|
||||||
.glRotatef(0.15f * rot, 2.0f * frot, 10.0f * frot,
|
|
||||||
1.0f);
|
|
||||||
GL11.glRotatef(0.3f * rot, 3.0f * frot, 1.0f * frot, 1.0f);
|
|
||||||
rot++;
|
|
||||||
GL11.glPolygonMode(GL11.GL_FRONT_AND_BACK, GL11.GL_LINE);
|
|
||||||
GL11.glColor3f(0.9f, 0.9f, 0.9f);
|
|
||||||
drawTorus(1, 1.9f + ((float) Math.sin((0.004f * frot))),
|
|
||||||
15, 15);
|
|
||||||
|
|
||||||
canvas.swapBuffers();
|
|
||||||
|
|
||||||
fpsstatuslineitem.renderPassFinished();
|
|
||||||
Display.getCurrent().asyncExec(this);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<projectDescription>
|
|
||||||
<name>org.lwjgl.source</name>
|
|
||||||
<comment></comment>
|
|
||||||
<projects>
|
|
||||||
</projects>
|
|
||||||
<buildSpec>
|
|
||||||
</buildSpec>
|
|
||||||
<natures>
|
|
||||||
</natures>
|
|
||||||
</projectDescription>
|
|
|
@ -1,7 +0,0 @@
|
||||||
Manifest-Version: 1.0
|
|
||||||
Bundle-ManifestVersion: 2
|
|
||||||
Bundle-Name: LWJGL Sources
|
|
||||||
Bundle-Vendor: Lightweight Java Game Library Project
|
|
||||||
Bundle-Version: 2
|
|
||||||
Bundle-SymbolicName: org.lwjgl.source;singleton:=true
|
|
||||||
Bundle-Localization: plugin
|
|
|
@ -1,55 +0,0 @@
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>About</title>
|
|
||||||
<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
|
|
||||||
</head>
|
|
||||||
<body lang="EN-US">
|
|
||||||
<img src="lwjgl_logo.png" align="right"/>
|
|
||||||
<h2>About This Content</h2>
|
|
||||||
<p>The <a href="http://lwjgl.org">Lightweight Java Game Library (LWJGL)</a> is a solution aimed
|
|
||||||
directly at professional and amateur Java programmers alike to enable <a
|
|
||||||
href="projects.php">commercial quality games</a> to be written in Java.
|
|
||||||
LWJGL provides developers access to high performance crossplatform
|
|
||||||
libraries such as OpenGL (<a href="http://www.opengl.org/"
|
|
||||||
target="_blank">Open Graphics Library</a>) and OpenAL (<a
|
|
||||||
href="http://www.openal.org" target="_blank">Open Audio Library</a>)
|
|
||||||
allowing for state of the art 3D games and 3D sound. Additionally LWJGL
|
|
||||||
provides access to controllers such as Gamepads, Steering wheel and
|
|
||||||
Joysticks. All in a simple and straight forward API.</p>
|
|
||||||
<p>LWJGL is not meant to make writing games particularly easy; it is
|
|
||||||
primarily an enabling technology which allows developers to get at
|
|
||||||
resources that are simply otherwise unavailable or poorly implemented on
|
|
||||||
the existing <a href="http://java.sun.com" target="_blank">Java
|
|
||||||
platform</a>. We anticipate that the LWJGL will, through evolution and
|
|
||||||
extension, become the foundation for more complete game libraries and
|
|
||||||
"game engines" as they have popularly become known, and hide some of the
|
|
||||||
new evils we have had to expose in the APIs.</p>
|
|
||||||
<p>LWJGL is available under a <a href="http://lwjgl.org/license.php">BSD
|
|
||||||
license</a>, which means it's open source and freely available at no charge.</p>
|
|
||||||
<p>Please visit us on the Freenode IRC Network: <a
|
|
||||||
href="irc://irc.freenode.net/lwjgl" target="_blank">#LWJGL</a>. Do idle
|
|
||||||
if there is no one to answer any of your questions, we are on different
|
|
||||||
timezones.</p>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h2>Plug-Ins</h2>
|
|
||||||
<p>The following plug-ins are provided:
|
|
||||||
<dl>
|
|
||||||
<dt>org.lwjgl</dt>
|
|
||||||
<dd>Platform independent jars and native libraries for Windows, Linux and Mac OS X</dd>
|
|
||||||
<dt>org.lwjgl.doc</dt>
|
|
||||||
<dd>Documentation (JavaDoc)</dd>
|
|
||||||
<dt>org.lwjgl.source</dt>
|
|
||||||
<dd>Source files</dd>
|
|
||||||
<dt>org.lwjgl.tools</dt>
|
|
||||||
<dd>Developer tools</dd>
|
|
||||||
<dt>org.lwjgl.info</dt>
|
|
||||||
<dd>LWJGL test and info view</dd>
|
|
||||||
</dl>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,10 +0,0 @@
|
||||||
bin.includes = META-INF/,\
|
|
||||||
about.html,\
|
|
||||||
lwjgl_logo.png,\
|
|
||||||
plugin.xml,\
|
|
||||||
src/
|
|
||||||
src.includes = src/,\
|
|
||||||
lwjgl_logo.png,\
|
|
||||||
about.html,\
|
|
||||||
plugin.xml,\
|
|
||||||
META-INF/
|
|
Before Width: | Height: | Size: 24 KiB |
|
@ -1,8 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<?eclipse version="3.2"?>
|
|
||||||
<plugin>
|
|
||||||
<extension
|
|
||||||
point="org.eclipse.pde.core.source">
|
|
||||||
<location path="src" />
|
|
||||||
</extension>
|
|
||||||
</plugin>
|
|
|
@ -1,7 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<classpath>
|
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
|
|
||||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
|
||||||
<classpathentry kind="src" path="src/java"/>
|
|
||||||
<classpathentry kind="output" path="build/classes"/>
|
|
||||||
</classpath>
|
|
|
@ -1,28 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<projectDescription>
|
|
||||||
<name>org.lwjgl.tools</name>
|
|
||||||
<comment></comment>
|
|
||||||
<projects>
|
|
||||||
</projects>
|
|
||||||
<buildSpec>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
</buildSpec>
|
|
||||||
<natures>
|
|
||||||
<nature>org.eclipse.pde.PluginNature</nature>
|
|
||||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
|
||||||
</natures>
|
|
||||||
</projectDescription>
|
|
|
@ -1,12 +0,0 @@
|
||||||
#Tue Nov 23 14:40:51 CET 2010
|
|
||||||
eclipse.preferences.version=1
|
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
|
|
||||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
|
||||||
org.eclipse.jdt.core.compiler.compliance=1.5
|
|
||||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
|
||||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
|
||||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
|
||||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
|
||||||
org.eclipse.jdt.core.compiler.source=1.5
|
|
|
@ -1,16 +0,0 @@
|
||||||
Manifest-Version: 1.0
|
|
||||||
Bundle-ManifestVersion: 2
|
|
||||||
Bundle-Name: LWJGL Tools Plug-in
|
|
||||||
Bundle-SymbolicName: org.lwjgl.tools;singleton:=true
|
|
||||||
Bundle-Version: 1.0.0
|
|
||||||
Bundle-Activator: org.lwjgl.tools.Activator
|
|
||||||
Bundle-Vendor: Lightweight Java Game Library Project
|
|
||||||
Require-Bundle: org.eclipse.ui,
|
|
||||||
org.eclipse.core.runtime,
|
|
||||||
org.eclipse.core.resources;bundle-version="3.4.0",
|
|
||||||
org.eclipse.jdt.core;bundle-version="3.4.0",
|
|
||||||
org.eclipse.jdt.ui;bundle-version="3.4.0",
|
|
||||||
org.eclipse.jdt.launching;bundle-version="3.4.0",
|
|
||||||
org.lwjgl;bundle-version="2.0.0"
|
|
||||||
Bundle-ActivationPolicy: lazy
|
|
||||||
Bundle-RequiredExecutionEnvironment: J2SE-1.5
|
|
|
@ -1,33 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
|
|
||||||
<title>About</title>
|
|
||||||
</head>
|
|
||||||
<body lang="EN-US">
|
|
||||||
<h2>About This Content</h2>
|
|
||||||
|
|
||||||
<p>November, 2010</p>
|
|
||||||
<h3>License</h3>
|
|
||||||
|
|
||||||
<p>The LWJGL team makes available all content in this plug-in ("Content"). Unless otherwise
|
|
||||||
indicated below, the Content is provided to you under the terms and conditions of the
|
|
||||||
Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
|
|
||||||
at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
|
|
||||||
For purposes of the EPL, "Program" will mean the Content.</p>
|
|
||||||
|
|
||||||
<p>If you did not receive this Content directly from lwjgl.org, the Content is
|
|
||||||
being redistributed by another party ("Redistributor") and different terms and conditions may
|
|
||||||
apply to your use of any object code in the Content. Check the Redistributor's license that was
|
|
||||||
provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
|
|
||||||
indicated below, the terms and conditions of the EPL still apply to any source code in the Content
|
|
||||||
and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
|
|
||||||
|
|
||||||
<h4>Third party code</h4>
|
|
||||||
<p>This plug-in contains code from the plugin org.eclipse.jdt.junit, this code
|
|
||||||
is provided by the Eclipse Foundation under the terms
|
|
||||||
of the Eclipse Public License Version 1.0.</p>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,6 +0,0 @@
|
||||||
source.. = src/java/
|
|
||||||
output.. = build/classes/
|
|
||||||
bin.includes = META-INF/,\
|
|
||||||
.,\
|
|
||||||
plugin.xml,\
|
|
||||||
about.html
|
|
|
@ -1,25 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<?eclipse version="3.2"?>
|
|
||||||
<plugin>
|
|
||||||
|
|
||||||
|
|
||||||
<extension
|
|
||||||
point="org.eclipse.jdt.core.classpathContainerInitializer">
|
|
||||||
<classpathContainerInitializer
|
|
||||||
class="org.lwjgl.tools.LWJGLClasspathContainerInitializer"
|
|
||||||
id="org.lwjgl.LWJGL_CONTAINER">
|
|
||||||
</classpathContainerInitializer>
|
|
||||||
</extension>
|
|
||||||
|
|
||||||
<extension
|
|
||||||
point="org.eclipse.jdt.ui.classpathContainerPage">
|
|
||||||
<classpathContainerPage
|
|
||||||
class="org.lwjgl.tools.LWJGLClasspathContainerPage"
|
|
||||||
id="org.lwjgl.LWJGL_CONTAINER"
|
|
||||||
name="LWJGL Library">
|
|
||||||
</classpathContainerPage>
|
|
||||||
</extension>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</plugin>
|
|
|
@ -1,64 +0,0 @@
|
||||||
/*******************************************************************************
|
|
||||||
* Copyright (c) 2011 LWJGL Project and others
|
|
||||||
* All rights reserved. This program and the accompanying materials
|
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
|
||||||
* which accompanies this distribution, and is available at
|
|
||||||
* http://www.eclipse.org/legal/epl-v10.html, and under the terms of the
|
|
||||||
* BSD license, see http://lwjgl.org/license.php for details.
|
|
||||||
*
|
|
||||||
* Contributors:
|
|
||||||
* Jens von Pilgrim - initial implementation
|
|
||||||
******************************************************************************/
|
|
||||||
package org.lwjgl.tools;
|
|
||||||
|
|
||||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
|
||||||
import org.osgi.framework.BundleContext;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The activator class controls the plug-in life cycle
|
|
||||||
*
|
|
||||||
* @author Jens von Pilgrim (developer@jevopi.de)
|
|
||||||
* @since Mar 30, 2011
|
|
||||||
*/
|
|
||||||
public class Activator extends AbstractUIPlugin {
|
|
||||||
|
|
||||||
// The plug-in ID
|
|
||||||
public static final String PLUGIN_ID = "org.lwjgl.tools";
|
|
||||||
|
|
||||||
// The shared instance
|
|
||||||
private static Activator plugin;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The constructor
|
|
||||||
*/
|
|
||||||
public Activator() {
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
|
|
||||||
*/
|
|
||||||
public void start(BundleContext context) throws Exception {
|
|
||||||
super.start(context);
|
|
||||||
plugin = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
|
|
||||||
*/
|
|
||||||
public void stop(BundleContext context) throws Exception {
|
|
||||||
plugin = null;
|
|
||||||
super.stop(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the shared instance
|
|
||||||
*
|
|
||||||
* @return the shared instance
|
|
||||||
*/
|
|
||||||
public static Activator getDefault() {
|
|
||||||
return plugin;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,269 +0,0 @@
|
||||||
/*******************************************************************************
|
|
||||||
* Copyright (c) 2011 LWJGL Project and others
|
|
||||||
* All rights reserved. This program and the accompanying materials
|
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
|
||||||
* which accompanies this distribution, and is available at
|
|
||||||
* http://www.eclipse.org/legal/epl-v10.html, and under the terms of the
|
|
||||||
* BSD license, see http://lwjgl.org/license.php for details.
|
|
||||||
*
|
|
||||||
* Contributors:
|
|
||||||
* Jens von Pilgrim - initial implementation
|
|
||||||
******************************************************************************/
|
|
||||||
package org.lwjgl.tools;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.net.URL;
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
import org.eclipse.core.runtime.FileLocator;
|
|
||||||
import org.eclipse.core.runtime.IPath;
|
|
||||||
import org.eclipse.core.runtime.Path;
|
|
||||||
import org.eclipse.core.runtime.Platform;
|
|
||||||
import org.eclipse.jdt.core.IAccessRule;
|
|
||||||
import org.eclipse.jdt.core.IClasspathAttribute;
|
|
||||||
import org.eclipse.jdt.core.IClasspathEntry;
|
|
||||||
import org.eclipse.jdt.core.JavaCore;
|
|
||||||
import org.eclipse.jdt.launching.JavaRuntime;
|
|
||||||
import org.lwjgl.LibraryPathUtil;
|
|
||||||
import org.lwjgl.OSNotSupportedException;
|
|
||||||
import org.osgi.framework.Bundle;
|
|
||||||
import org.osgi.framework.Constants;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This class resolves the actual LWJGL library path, that is the location
|
|
||||||
* of the jars in the org.lwjgl plugin.
|
|
||||||
*
|
|
||||||
* Following the "monkey sees, monkey does"-rule, this code was copied and
|
|
||||||
* modified from the plugin org.eclipse.jdt.junit . This code is published
|
|
||||||
* under the EPL and (c) by IBM and others.
|
|
||||||
*
|
|
||||||
* @see org.eclipse.jdt.internal.ui.wizards.buildpaths.BuildPathSupport
|
|
||||||
* @see org.eclipse.jdt.internal.junit.buildpath.BuildPathSupport
|
|
||||||
*/
|
|
||||||
public class BuildPathSupport {
|
|
||||||
/**
|
|
||||||
* Logger for this class
|
|
||||||
*/
|
|
||||||
private static final Logger log = Logger.getLogger(BuildPathSupport.class.getName());
|
|
||||||
|
|
||||||
public static class LWJGLPluginDescription {
|
|
||||||
private final String strBundleId;
|
|
||||||
|
|
||||||
private Bundle bundle = null;
|
|
||||||
|
|
||||||
public LWJGLPluginDescription(String bundleId) {
|
|
||||||
strBundleId = bundleId;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public Bundle getBundle() {
|
|
||||||
if (bundle == null)
|
|
||||||
bundle = Platform.getBundle(strBundleId);
|
|
||||||
return bundle;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBundleId() {
|
|
||||||
return strBundleId;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public static final LWJGLPluginDescription LWJGL_PLUGIN = new LWJGLPluginDescription(
|
|
||||||
"org.lwjgl"); //$NON-NLS-1$
|
|
||||||
|
|
||||||
public static final LWJGLPluginDescription LWJGL_SRC_PLUGIN = new LWJGLPluginDescription(
|
|
||||||
"org.lwjgl.source"); //$NON-NLS-1$
|
|
||||||
|
|
||||||
public static final LWJGLPluginDescription LWJGL_DOC_PLUGIN = new LWJGLPluginDescription(
|
|
||||||
"org.lwjgl.doc"); //$NON-NLS-1$
|
|
||||||
|
|
||||||
public static final String[] JAR_FILES = { "lwjgl.jar", "lwjgl_util.jar",
|
|
||||||
"lwjgl_util_applet.jar", "jinput.jar" };
|
|
||||||
|
|
||||||
public static final String[] SRC_FILES = { "lwjglsrc.zip",
|
|
||||||
"lwjgl_utilsrc.zip", "lwjgl_util_applet.zip", null };
|
|
||||||
|
|
||||||
public static final String[] DOC_FILES = { "doc.zip", "doc.zip", "doc.zip",
|
|
||||||
"doc.zip" };
|
|
||||||
|
|
||||||
public static String[] NATIVEPATH = new String[] { "windows", "macosx",
|
|
||||||
"linux", "solaris" };
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static IPath getBundleLocation(LWJGLPluginDescription pluginDesc) {
|
|
||||||
Bundle bundle = pluginDesc.getBundle();
|
|
||||||
if (bundle == null)
|
|
||||||
return null;
|
|
||||||
|
|
||||||
URL local = null;
|
|
||||||
try {
|
|
||||||
local = FileLocator.toFileURL(bundle.getEntry("/")); //$NON-NLS-1$
|
|
||||||
} catch (IOException e) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
String fullPath = new File(local.getPath()).getAbsolutePath();
|
|
||||||
return Path.fromOSString(fullPath);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* /Devel/Applications/Eclipse3.4/plugins/org.lwjgl.source_2.0.1/src/org.lwjgl_2.0.1/lwjglsrc.zip
|
|
||||||
* /Devel/Applications/Eclipse3.4/plugins/org.lwjgl.source_2.0.1/src/org.lwjgl_2.0.1/lwjgl_utilsrc.zip
|
|
||||||
* /Devel/Applications/Eclipse3.4/plugins/org.lwjgl.source_2.0.1/src/org.lwjgl_2.0.1/lwjgl_util_applet.zip
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @param pluginDesc
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static IPath getSourceLocation(String filename) {
|
|
||||||
if (filename==null)
|
|
||||||
return null;
|
|
||||||
Bundle bundleSrc = LWJGL_SRC_PLUGIN.getBundle();
|
|
||||||
if (bundleSrc == null)
|
|
||||||
return null;
|
|
||||||
|
|
||||||
String version = (String) bundleSrc.getHeaders().get(
|
|
||||||
Constants.BUNDLE_VERSION);
|
|
||||||
if (version == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
String bundlePath = getURL(bundleSrc);
|
|
||||||
if (bundlePath == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
File bundleLoc = new File(bundlePath);
|
|
||||||
if (bundleLoc.isDirectory()) {
|
|
||||||
String fullPath = bundleLoc.getAbsolutePath() + File.separator
|
|
||||||
+ "src" + File.separator + LWJGL_PLUGIN.getBundleId() + '_'
|
|
||||||
+ version + File.separator + filename;
|
|
||||||
return Path.fromOSString(fullPath);
|
|
||||||
} else if (bundleLoc.isFile()) {
|
|
||||||
return Path.fromOSString(bundleLoc.getAbsolutePath());
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* jar:file:/Devel/Applications/Eclipse3.4/plugins/org.lwjgl.doc_2.0.1/doc.zip!/javadoc
|
|
||||||
*
|
|
||||||
* @param pluginDesc
|
|
||||||
* @param filename
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static String getJavadocLocation(String filename) {
|
|
||||||
if (filename==null)
|
|
||||||
return null;
|
|
||||||
|
|
||||||
Bundle bundleDoc = LWJGL_DOC_PLUGIN.getBundle();
|
|
||||||
if (bundleDoc == null)
|
|
||||||
return null;
|
|
||||||
|
|
||||||
String version = (String) bundleDoc.getHeaders().get(
|
|
||||||
Constants.BUNDLE_VERSION);
|
|
||||||
if (version == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
String bundlePath = getURL(bundleDoc);
|
|
||||||
if (bundlePath == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
File bundleLoc = new File(bundlePath);
|
|
||||||
if (bundleLoc.isDirectory()) {
|
|
||||||
String fullPath = "jar:file:" + bundleLoc.getAbsolutePath()
|
|
||||||
+ File.separator + filename + "!"
|
|
||||||
+ File.separator + "javadoc" + File.separator;
|
|
||||||
return fullPath;
|
|
||||||
} else if (bundleLoc.isFile()) {
|
|
||||||
return bundleLoc.getAbsolutePath();
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getNativeLocation() {
|
|
||||||
|
|
||||||
String basePath;
|
|
||||||
try {
|
|
||||||
basePath = LibraryPathUtil.getRelativeLWJGLLibraryPath();
|
|
||||||
} catch (OSNotSupportedException ex) {
|
|
||||||
log.warning(ex.toString()); //$NON-NLS-1$
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
Bundle bundle = LWJGL_PLUGIN.getBundle();
|
|
||||||
if (bundle == null)
|
|
||||||
return null;
|
|
||||||
|
|
||||||
String bundlePath = getURL(bundle);
|
|
||||||
if (bundlePath == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
File bundleLoc = new File(bundlePath);
|
|
||||||
if (bundleLoc.isDirectory()) {
|
|
||||||
String fullPath = bundleLoc.getAbsolutePath()
|
|
||||||
+ File.separator + basePath;
|
|
||||||
return fullPath;
|
|
||||||
} else if (bundleLoc.isFile()) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static String getURL(Bundle bundle) {
|
|
||||||
try {
|
|
||||||
URL fileURL = FileLocator.toFileURL(bundle.getEntry("/")); //$NON-NLS-1$
|
|
||||||
if (fileURL != null) {
|
|
||||||
return fileURL.getFile();
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
} catch (IOException e) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IClasspathEntry getLWJGLClasspathEntry() {
|
|
||||||
return JavaCore
|
|
||||||
.newContainerEntry(LWJGLClasspathContainerInitializer.LWJGL_LIBRARY_PATH);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IClasspathEntry[] getLWJGLLibraryEntries() {
|
|
||||||
IPath bundleBase = getBundleLocation(LWJGL_PLUGIN);
|
|
||||||
if (bundleBase != null) {
|
|
||||||
IClasspathEntry[] entries = new IClasspathEntry[JAR_FILES.length];
|
|
||||||
for (int i = 0; i < JAR_FILES.length; i++) {
|
|
||||||
IPath jarLocation = bundleBase.append(JAR_FILES[i]); //$NON-NLS-1$
|
|
||||||
IPath srcLocation = getSourceLocation(SRC_FILES[i]);
|
|
||||||
String nativeLocation = getNativeLocation();
|
|
||||||
String javadocLocation = getJavadocLocation(DOC_FILES[i]);
|
|
||||||
IAccessRule[] accessRules = {};
|
|
||||||
IClasspathAttribute[] attributes = { //
|
|
||||||
JavaCore
|
|
||||||
.newClasspathAttribute(
|
|
||||||
IClasspathAttribute.JAVADOC_LOCATION_ATTRIBUTE_NAME,
|
|
||||||
javadocLocation),
|
|
||||||
JavaCore.newClasspathAttribute(
|
|
||||||
JavaRuntime.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY,
|
|
||||||
nativeLocation) };
|
|
||||||
|
|
||||||
// return JavaCore.newClasspathAttribute(JavaRuntime.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY, dialog.getNativeLibraryPath());
|
|
||||||
|
|
||||||
entries[i] = JavaCore.newLibraryEntry(jarLocation, srcLocation,
|
|
||||||
null, accessRules, attributes, false);
|
|
||||||
}
|
|
||||||
return entries;
|
|
||||||
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,233 +0,0 @@
|
||||||
/*******************************************************************************
|
|
||||||
* Copyright (c) 2011 LWJGL Project and others
|
|
||||||
* All rights reserved. This program and the accompanying materials
|
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
|
||||||
* which accompanies this distribution, and is available at
|
|
||||||
* http://www.eclipse.org/legal/epl-v10.html, and under the terms of the
|
|
||||||
* BSD license, see http://lwjgl.org/license.php for details.
|
|
||||||
*
|
|
||||||
* Contributors:
|
|
||||||
* Jens von Pilgrim - initial implementation
|
|
||||||
******************************************************************************/
|
|
||||||
package org.lwjgl.tools;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.eclipse.core.runtime.CoreException;
|
|
||||||
import org.eclipse.core.runtime.IPath;
|
|
||||||
import org.eclipse.core.runtime.IStatus;
|
|
||||||
import org.eclipse.core.runtime.Path;
|
|
||||||
import org.eclipse.core.runtime.Status;
|
|
||||||
import org.eclipse.jdt.core.ClasspathContainerInitializer;
|
|
||||||
import org.eclipse.jdt.core.IClasspathAttribute;
|
|
||||||
import org.eclipse.jdt.core.IClasspathContainer;
|
|
||||||
import org.eclipse.jdt.core.IClasspathEntry;
|
|
||||||
import org.eclipse.jdt.core.IJavaModel;
|
|
||||||
import org.eclipse.jdt.core.IJavaProject;
|
|
||||||
import org.eclipse.jdt.core.JavaCore;
|
|
||||||
import org.eclipse.jdt.core.JavaModelException;
|
|
||||||
import org.eclipse.jdt.launching.JavaRuntime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* LWJGLClasspathContainerInitializer sets up LWJGL library path.
|
|
||||||
*
|
|
||||||
* Parts of this code were copied and modified from
|
|
||||||
* {@link org.eclipse.jdt.internal.junit.buildpath.JUnitContainerInitializer},
|
|
||||||
* which is licensed under the EPL as well.
|
|
||||||
*
|
|
||||||
* @author Jens von Pilgrim
|
|
||||||
* @version $Revision$
|
|
||||||
* @since Dec 5, 2008
|
|
||||||
*/
|
|
||||||
public class LWJGLClasspathContainerInitializer extends
|
|
||||||
ClasspathContainerInitializer {
|
|
||||||
|
|
||||||
public static String LWJGL_LIBRARY_ID = "org.lwjgl.LWJGL_CONTAINER";
|
|
||||||
|
|
||||||
public static IPath LWJGL_LIBRARY_PATH = new Path(LWJGL_LIBRARY_ID);
|
|
||||||
|
|
||||||
private static final IStatus NOT_SUPPORTED = new Status(IStatus.ERROR,
|
|
||||||
Activator.PLUGIN_ID,
|
|
||||||
ClasspathContainerInitializer.ATTRIBUTE_NOT_SUPPORTED,
|
|
||||||
new String(), null);
|
|
||||||
|
|
||||||
private static class LWJGLClasspathContainer implements IClasspathContainer {
|
|
||||||
|
|
||||||
private final IClasspathEntry[] fEntries;
|
|
||||||
|
|
||||||
private final IPath fPath;
|
|
||||||
|
|
||||||
public LWJGLClasspathContainer(IPath path, IClasspathEntry[] entries) {
|
|
||||||
fPath = path;
|
|
||||||
fEntries = entries;
|
|
||||||
}
|
|
||||||
|
|
||||||
public IClasspathEntry[] getClasspathEntries() {
|
|
||||||
return fEntries;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDescription() {
|
|
||||||
return "LWJGL Libraries";
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getKind() {
|
|
||||||
return IClasspathContainer.K_APPLICATION;
|
|
||||||
}
|
|
||||||
|
|
||||||
public IPath getPath() {
|
|
||||||
return fPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public LWJGLClasspathContainerInitializer() {
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
* @see org.eclipse.jdt.core.ClasspathContainerInitializer#initialize(org.eclipse.core.runtime.IPath, org.eclipse.jdt.core.IJavaProject)
|
|
||||||
*/
|
|
||||||
public void initialize(IPath containerPath, IJavaProject project)
|
|
||||||
throws CoreException {
|
|
||||||
if (isValidLWJGLContainerPath(containerPath)) {
|
|
||||||
LWJGLClasspathContainer container = getNewContainer(containerPath);
|
|
||||||
|
|
||||||
JavaCore.setClasspathContainer(containerPath,
|
|
||||||
new IJavaProject[] { project },
|
|
||||||
new IClasspathContainer[] { container }, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private static boolean isValidLWJGLContainerPath(IPath path) {
|
|
||||||
return path != null && path.segmentCount() > 0
|
|
||||||
&& LWJGL_LIBRARY_ID.equals(path.segment(0));
|
|
||||||
}
|
|
||||||
|
|
||||||
private static LWJGLClasspathContainer getNewContainer(IPath containerPath) {
|
|
||||||
IClasspathEntry[] entries = null;
|
|
||||||
// String version = containerPath.segment(1);
|
|
||||||
entries = BuildPathSupport.getLWJGLLibraryEntries();
|
|
||||||
|
|
||||||
if (entries == null)
|
|
||||||
entries = new IClasspathEntry[] {};
|
|
||||||
|
|
||||||
return new LWJGLClasspathContainer(containerPath, entries);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
* @see org.eclipse.jdt.core.ClasspathContainerInitializer#canUpdateClasspathContainer(org.eclipse.core.runtime.IPath, org.eclipse.jdt.core.IJavaProject)
|
|
||||||
*/
|
|
||||||
public boolean canUpdateClasspathContainer(IPath containerPath,
|
|
||||||
IJavaProject project) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
* @see org.eclipse.jdt.core.ClasspathContainerInitializer#getAccessRulesStatus(org.eclipse.core.runtime.IPath, org.eclipse.jdt.core.IJavaProject)
|
|
||||||
*/
|
|
||||||
public IStatus getAccessRulesStatus(IPath containerPath,
|
|
||||||
IJavaProject project) {
|
|
||||||
return NOT_SUPPORTED;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
* @see org.eclipse.jdt.core.ClasspathContainerInitializer#getSourceAttachmentStatus(org.eclipse.core.runtime.IPath, org.eclipse.jdt.core.IJavaProject)
|
|
||||||
*/
|
|
||||||
public IStatus getSourceAttachmentStatus(IPath containerPath,
|
|
||||||
IJavaProject project) {
|
|
||||||
return Status.OK_STATUS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
* @see org.eclipse.jdt.core.ClasspathContainerInitializer#getAttributeStatus(org.eclipse.core.runtime.IPath, org.eclipse.jdt.core.IJavaProject, java.lang.String)
|
|
||||||
*/
|
|
||||||
public IStatus getAttributeStatus(IPath containerPath,
|
|
||||||
IJavaProject project, String attributeKey) {
|
|
||||||
if (attributeKey
|
|
||||||
.equals(IClasspathAttribute.JAVADOC_LOCATION_ATTRIBUTE_NAME)) {
|
|
||||||
return Status.OK_STATUS;
|
|
||||||
}
|
|
||||||
if (attributeKey.equals(JavaRuntime.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY)) {
|
|
||||||
return Status.OK_STATUS;
|
|
||||||
}
|
|
||||||
|
|
||||||
return NOT_SUPPORTED;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
* @see org.eclipse.jdt.core.ClasspathContainerInitializer#requestClasspathContainerUpdate(org.eclipse.core.runtime.IPath, org.eclipse.jdt.core.IJavaProject, org.eclipse.jdt.core.IClasspathContainer)
|
|
||||||
*/
|
|
||||||
public void requestClasspathContainerUpdate(IPath containerPath,
|
|
||||||
IJavaProject project, IClasspathContainer containerSuggestion)
|
|
||||||
throws CoreException {
|
|
||||||
IClasspathEntry[] entries = containerSuggestion.getClasspathEntries();
|
|
||||||
if (entries.length == 1 && isValidLWJGLContainerPath(containerPath)) {
|
|
||||||
// String version = containerPath.segment(1);
|
|
||||||
|
|
||||||
// only modifiable entry in Javadoc location
|
|
||||||
IClasspathAttribute[] extraAttributes = entries[0]
|
|
||||||
.getExtraAttributes();
|
|
||||||
for (int i = 0; i < extraAttributes.length; i++) {
|
|
||||||
IClasspathAttribute attrib = extraAttributes[i];
|
|
||||||
if (attrib.getName().equals(
|
|
||||||
IClasspathAttribute.JAVADOC_LOCATION_ATTRIBUTE_NAME)) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
rebindClasspathEntries(project.getJavaModel(), containerPath);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void rebindClasspathEntries(IJavaModel model,
|
|
||||||
IPath containerPath) throws JavaModelException {
|
|
||||||
List<IJavaProject> affectedProjects = new ArrayList<IJavaProject>();
|
|
||||||
|
|
||||||
IJavaProject[] projects = model.getJavaProjects();
|
|
||||||
for (int i = 0; i < projects.length; i++) {
|
|
||||||
IJavaProject project = projects[i];
|
|
||||||
IClasspathEntry[] entries = project.getRawClasspath();
|
|
||||||
for (int k = 0; k < entries.length; k++) {
|
|
||||||
IClasspathEntry curr = entries[k];
|
|
||||||
if (curr.getEntryKind() == IClasspathEntry.CPE_CONTAINER
|
|
||||||
&& containerPath.equals(curr.getPath())) {
|
|
||||||
affectedProjects.add(project);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!affectedProjects.isEmpty()) {
|
|
||||||
IJavaProject[] affected = (IJavaProject[]) affectedProjects
|
|
||||||
.toArray(new IJavaProject[affectedProjects.size()]);
|
|
||||||
IClasspathContainer[] containers = new IClasspathContainer[affected.length];
|
|
||||||
for (int i = 0; i < containers.length; i++) {
|
|
||||||
containers[i] = getNewContainer(containerPath);
|
|
||||||
}
|
|
||||||
JavaCore.setClasspathContainer(containerPath, affected, containers,
|
|
||||||
null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
* @see org.eclipse.jdt.core.ClasspathContainerInitializer#getDescription(org.eclipse.core.runtime.IPath, org.eclipse.jdt.core.IJavaProject)
|
|
||||||
*/
|
|
||||||
public String getDescription(IPath containerPath, IJavaProject project) {
|
|
||||||
return "LWJGL library settings, including required java libraries "
|
|
||||||
+ "(jars) and native libraries.";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
* @see org.eclipse.jdt.core.ClasspathContainerInitializer#getComparisonID(org.eclipse.core.runtime.IPath, org.eclipse.jdt.core.IJavaProject)
|
|
||||||
*/
|
|
||||||
public Object getComparisonID(IPath containerPath, IJavaProject project) {
|
|
||||||
return containerPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,279 +0,0 @@
|
||||||
/*******************************************************************************
|
|
||||||
* Copyright (c) 2011 LWJGL Project and others
|
|
||||||
* All rights reserved. This program and the accompanying materials
|
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
|
||||||
* which accompanies this distribution, and is available at
|
|
||||||
* http://www.eclipse.org/legal/epl-v10.html, and under the terms of the
|
|
||||||
* BSD license, see http://lwjgl.org/license.php for details.
|
|
||||||
*
|
|
||||||
* Contributors:
|
|
||||||
* Jens von Pilgrim - initial implementation
|
|
||||||
******************************************************************************/
|
|
||||||
package org.lwjgl.tools;
|
|
||||||
|
|
||||||
import java.io.StringWriter;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.TreeSet;
|
|
||||||
|
|
||||||
import org.eclipse.core.resources.IProject;
|
|
||||||
import org.eclipse.core.resources.IWorkspaceRoot;
|
|
||||||
import org.eclipse.core.resources.ResourcesPlugin;
|
|
||||||
import org.eclipse.core.runtime.CoreException;
|
|
||||||
import org.eclipse.core.runtime.IPath;
|
|
||||||
import org.eclipse.core.runtime.IStatus;
|
|
||||||
import org.eclipse.core.runtime.Status;
|
|
||||||
import org.eclipse.jdt.core.IClasspathAttribute;
|
|
||||||
import org.eclipse.jdt.core.IClasspathContainer;
|
|
||||||
import org.eclipse.jdt.core.IClasspathEntry;
|
|
||||||
import org.eclipse.jdt.core.IJavaProject;
|
|
||||||
import org.eclipse.jdt.core.JavaCore;
|
|
||||||
import org.eclipse.jdt.core.JavaModelException;
|
|
||||||
import org.eclipse.jdt.internal.ui.JavaPluginImages;
|
|
||||||
import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels;
|
|
||||||
import org.eclipse.jdt.launching.JavaRuntime;
|
|
||||||
import org.eclipse.jdt.ui.JavaElementLabels;
|
|
||||||
import org.eclipse.jdt.ui.wizards.IClasspathContainerPage;
|
|
||||||
import org.eclipse.jdt.ui.wizards.IClasspathContainerPageExtension;
|
|
||||||
import org.eclipse.jdt.ui.wizards.NewElementWizardPage;
|
|
||||||
import org.eclipse.jface.dialogs.ErrorDialog;
|
|
||||||
import org.eclipse.jface.dialogs.MessageDialog;
|
|
||||||
import org.eclipse.swt.SWT;
|
|
||||||
import org.eclipse.swt.layout.GridData;
|
|
||||||
import org.eclipse.swt.layout.GridLayout;
|
|
||||||
import org.eclipse.swt.widgets.Composite;
|
|
||||||
import org.eclipse.swt.widgets.Label;
|
|
||||||
import org.eclipse.swt.widgets.Shell;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* LWJGLClasspathContainerPage
|
|
||||||
* There should really be more documentation here.
|
|
||||||
*
|
|
||||||
* @author Jens von Pilgrim
|
|
||||||
* @since Dec 5, 2008
|
|
||||||
*/
|
|
||||||
public class LWJGLClasspathContainerPage extends NewElementWizardPage implements
|
|
||||||
IClasspathContainerPage, IClasspathContainerPageExtension {
|
|
||||||
|
|
||||||
private IClasspathEntry containerEntryResult;
|
|
||||||
|
|
||||||
private Label labelResolvedPath;
|
|
||||||
|
|
||||||
private Label labelResolvedSourcePath;
|
|
||||||
|
|
||||||
private Label labelResolvedDocPath;
|
|
||||||
|
|
||||||
private Label labelNativePath;
|
|
||||||
|
|
||||||
public LWJGLClasspathContainerPage() {
|
|
||||||
super("LWJGLContainterPage"); //$NON-NLS-1$
|
|
||||||
setTitle("LWJGL Library");
|
|
||||||
setDescription("Adds LWJGL Java Libraries to build path");
|
|
||||||
setImageDescriptor(JavaPluginImages.DESC_WIZBAN_ADD_LIBRARY);
|
|
||||||
|
|
||||||
containerEntryResult = JavaCore
|
|
||||||
.newContainerEntry(LWJGLClasspathContainerInitializer.LWJGL_LIBRARY_PATH);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IJavaProject getPlaceholderProject() {
|
|
||||||
String name = "####internal"; //$NON-NLS-1$
|
|
||||||
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
|
|
||||||
while (true) {
|
|
||||||
IProject project = root.getProject(name);
|
|
||||||
if (!project.exists()) {
|
|
||||||
return JavaCore.create(project);
|
|
||||||
}
|
|
||||||
name += '1';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean finish() {
|
|
||||||
try {
|
|
||||||
IJavaProject[] javaProjects = new IJavaProject[] { getPlaceholderProject() };
|
|
||||||
IClasspathContainer[] containers = { null };
|
|
||||||
JavaCore.setClasspathContainer(containerEntryResult.getPath(),
|
|
||||||
javaProjects, containers, null);
|
|
||||||
} catch (JavaModelException e) {
|
|
||||||
perform(e, getShell(), e.getMessage());
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public IClasspathEntry getSelection() {
|
|
||||||
return containerEntryResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSelection(IClasspathEntry containerEntry) {
|
|
||||||
containerEntryResult = containerEntry;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void createControl(Composite parent) {
|
|
||||||
|
|
||||||
Composite composite = new Composite(parent, SWT.NONE);
|
|
||||||
composite.setFont(parent.getFont());
|
|
||||||
|
|
||||||
composite.setLayout(new GridLayout(2, false));
|
|
||||||
|
|
||||||
createLabel(composite, "Path");
|
|
||||||
labelResolvedPath = createPathLabel(composite);
|
|
||||||
|
|
||||||
createLabel(composite, "Source Path");
|
|
||||||
labelResolvedSourcePath = createPathLabel(composite);
|
|
||||||
|
|
||||||
createLabel(composite, "JavaDoc Path");
|
|
||||||
labelResolvedDocPath = createPathLabel(composite);
|
|
||||||
|
|
||||||
createLabel(composite, "Native Path");
|
|
||||||
labelNativePath = createPathLabel(composite);
|
|
||||||
|
|
||||||
|
|
||||||
update();
|
|
||||||
|
|
||||||
setControl(composite);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void createLabel(Composite parent, String strLabel) {
|
|
||||||
Label label = new Label(parent, SWT.NONE);
|
|
||||||
label.setFont(parent.getFont());
|
|
||||||
label.setText(strLabel);
|
|
||||||
label.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, false, false, 1, 1));
|
|
||||||
}
|
|
||||||
|
|
||||||
private Label createPathLabel(Composite parent) {
|
|
||||||
Label label = new Label(parent, SWT.WRAP);
|
|
||||||
label.setFont(parent.getFont());
|
|
||||||
label.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, true,
|
|
||||||
true, 1, 1));
|
|
||||||
return label;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void update() {
|
|
||||||
|
|
||||||
IStatus status = null;
|
|
||||||
|
|
||||||
IClasspathEntry[] libEntries = BuildPathSupport
|
|
||||||
.getLWJGLLibraryEntries();
|
|
||||||
|
|
||||||
IPath containerPath = LWJGLClasspathContainerInitializer.LWJGL_LIBRARY_PATH;
|
|
||||||
containerEntryResult = JavaCore.newContainerEntry(containerPath);
|
|
||||||
|
|
||||||
if (libEntries == null) {
|
|
||||||
status = new Status(ERROR, Activator.PLUGIN_ID,
|
|
||||||
"No LWJGL library found");
|
|
||||||
} else
|
|
||||||
|
|
||||||
if (labelResolvedPath != null && !labelResolvedPath.isDisposed()) {
|
|
||||||
// implies all other labels to be created and not yet disposed
|
|
||||||
if (libEntries != null) {
|
|
||||||
Set<String> setLines = new TreeSet<String>();
|
|
||||||
IPath path;
|
|
||||||
for (IClasspathEntry entry : libEntries) {
|
|
||||||
path = entry.getPath();
|
|
||||||
if (path != null) {
|
|
||||||
setLines.add(getPathLabel(path));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
setLabel(labelResolvedPath, setLines);
|
|
||||||
|
|
||||||
setLines.clear();
|
|
||||||
for (IClasspathEntry entry : libEntries) {
|
|
||||||
path = entry.getSourceAttachmentPath();
|
|
||||||
if (path != null) {
|
|
||||||
setLines.add(getPathLabel(path));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
setLabel(labelResolvedSourcePath, setLines);
|
|
||||||
|
|
||||||
setLines.clear();
|
|
||||||
for (IClasspathEntry entry : libEntries) {
|
|
||||||
if (entry.getExtraAttributes() != null) {
|
|
||||||
for (IClasspathAttribute attr : entry
|
|
||||||
.getExtraAttributes()) {
|
|
||||||
if (IClasspathAttribute.JAVADOC_LOCATION_ATTRIBUTE_NAME
|
|
||||||
.equals(attr.getName())) {
|
|
||||||
setLines.add(attr.getValue());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (JavaRuntime.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY.equals(attr.getName())) {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
setLabel(labelResolvedDocPath, setLines);
|
|
||||||
|
|
||||||
setLines.clear();
|
|
||||||
for (IClasspathEntry entry : libEntries) {
|
|
||||||
if (entry.getExtraAttributes() != null) {
|
|
||||||
for (IClasspathAttribute attr : entry
|
|
||||||
.getExtraAttributes()) {
|
|
||||||
if (JavaRuntime.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY.equals(attr.getName())) {
|
|
||||||
setLines.add(attr.getValue());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
setLabel(labelNativePath, setLines);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
labelResolvedPath.setText("not found");
|
|
||||||
labelResolvedSourcePath.setText("not found");
|
|
||||||
labelResolvedDocPath.setText("not found");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (status != null)
|
|
||||||
updateStatus(status);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param i_labelResolvedDocPath
|
|
||||||
* @param i_setDocPaths
|
|
||||||
*/
|
|
||||||
private void setLabel(Label label, Set<String> lines) {
|
|
||||||
StringBuffer strb = new StringBuffer();
|
|
||||||
for (String str : lines) {
|
|
||||||
if (strb.length() > 0) {
|
|
||||||
strb.append("\n");
|
|
||||||
}
|
|
||||||
strb.append(str);
|
|
||||||
}
|
|
||||||
label.setText(strb.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
private String getPathLabel(IPath path) {
|
|
||||||
StringBuffer buf = new StringBuffer(BasicElementLabels
|
|
||||||
.getResourceName(path.lastSegment()));
|
|
||||||
buf.append(JavaElementLabels.CONCAT_STRING);
|
|
||||||
buf.append(BasicElementLabels.getPathLabel(path.removeLastSegments(1),
|
|
||||||
true));
|
|
||||||
return buf.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.jdt.ui.wizards.IClasspathContainerPageExtension#initialize(org.eclipse.jdt.core.IJavaProject, org.eclipse.jdt.core.IClasspathEntry[])
|
|
||||||
*/
|
|
||||||
public void initialize(IJavaProject project,
|
|
||||||
IClasspathEntry[] currentEntries) {
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void perform(CoreException e, Shell shell, String message) {
|
|
||||||
IStatus status = e.getStatus();
|
|
||||||
if (status != null) {
|
|
||||||
ErrorDialog.openError(shell, "LWJGL Library", message, status);
|
|
||||||
} else {
|
|
||||||
|
|
||||||
StringWriter msg = new StringWriter();
|
|
||||||
if (message != null) {
|
|
||||||
msg.write(message);
|
|
||||||
msg.write("\n\n"); //$NON-NLS-1$
|
|
||||||
}
|
|
||||||
if (message == null || message.length() == 0)
|
|
||||||
msg.write("Unknown error adding LWJGL library");
|
|
||||||
else
|
|
||||||
msg.write(message);
|
|
||||||
MessageDialog.openError(shell, "LWJGL Library", msg.toString());
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<projectDescription>
|
|
||||||
<name>org.lwjgl.updatesite</name>
|
|
||||||
<comment></comment>
|
|
||||||
<projects>
|
|
||||||
</projects>
|
|
||||||
<buildSpec>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.pde.UpdateSiteBuilder</name>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
</buildSpec>
|
|
||||||
<natures>
|
|
||||||
<nature>org.eclipse.pde.UpdateSiteNature</nature>
|
|
||||||
</natures>
|
|
||||||
</projectDescription>
|
|
|
@ -1,60 +0,0 @@
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>About</title>
|
|
||||||
<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
|
|
||||||
</head>
|
|
||||||
<body lang="EN-US">
|
|
||||||
<img src="lwjgl_logo.png" align="right"/>
|
|
||||||
<h2>About This Content</h2>
|
|
||||||
<p>The <a href="http://lwjgl.org">Lightweight Java Game Library (LWJGL)</a> is a solution aimed
|
|
||||||
directly at professional and amateur Java programmers alike to enable <a
|
|
||||||
href="projects.php">commercial quality games</a> to be written in Java.
|
|
||||||
LWJGL provides developers access to high performance crossplatform
|
|
||||||
libraries such as OpenGL (<a href="http://www.opengl.org/"
|
|
||||||
target="_blank">Open Graphics Library</a>) and OpenAL (<a
|
|
||||||
href="http://www.openal.org" target="_blank">Open Audio Library</a>)
|
|
||||||
allowing for state of the art 3D games and 3D sound. Additionally LWJGL
|
|
||||||
provides access to controllers such as Gamepads, Steering wheel and
|
|
||||||
Joysticks. All in a simple and straight forward API.</p>
|
|
||||||
<p>LWJGL is not meant to make writing games particularly easy; it is
|
|
||||||
primarily an enabling technology which allows developers to get at
|
|
||||||
resources that are simply otherwise unavailable or poorly implemented on
|
|
||||||
the existing <a href="http://java.sun.com" target="_blank">Java
|
|
||||||
platform</a>. We anticipate that the LWJGL will, through evolution and
|
|
||||||
extension, become the foundation for more complete game libraries and
|
|
||||||
"game engines" as they have popularly become known, and hide some of the
|
|
||||||
new evils we have had to expose in the APIs.</p>
|
|
||||||
<p>LWJGL is available under a <a href="http://lwjgl.org/license.php">BSD
|
|
||||||
license</a>, which means it's open source and freely available at no charge.</p>
|
|
||||||
<p>Please visit us on the Freenode IRC Network: <a
|
|
||||||
href="irc://irc.freenode.net/lwjgl" target="_blank">#LWJGL</a>. Do idle
|
|
||||||
if there is no one to answer any of your questions, we are on different
|
|
||||||
timezones.</p>
|
|
||||||
|
|
||||||
<h3>Plugin assembly</h3>
|
|
||||||
<p>The plugins were assembled by Jens von Pilgrim (developer@jevopi.de). All files related to this assembly, such as manifest files or plugin descriptors, are copyright under the Eclipse Public License (EPL) and the BSD license</p>
|
|
||||||
|
|
||||||
<h3>Third party code</h3>
|
|
||||||
|
|
||||||
<h4>IBM</h4>
|
|
||||||
<p>The LWJGL Textview contains code copyright under the Eclipse Public License (EPL):<br/>
|
|
||||||
<pre>
|
|
||||||
Copyright (c) 2000, 2005 IBM Corporation and others.
|
|
||||||
All rights reserved. This program and the accompanying materials
|
|
||||||
are made available under the terms of the Eclipse Public License v1.0
|
|
||||||
which accompanies this distribution, and is available at
|
|
||||||
<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
|
|
||||||
</pre>
|
|
||||||
The source of this code can be found at:
|
|
||||||
<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet195.java?view=markup&content-type=text%2Fvnd.viewcvs-markup&revision=HEAD">http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet195.java?view=markup&content-type=text%2Fvnd.viewcvs-markup&revision=HEAD</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h4>SGI</h4>
|
|
||||||
<p>
|
|
||||||
LWJGL contains code copyright by SGI. This code is copyright under the SGI FreeB v1.1, see <a href="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</a>. Note that this license can be updated to version 2.0.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,60 +0,0 @@
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>org.lwjgl.updatesite</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
||||||
<style>@import url("web/site.css");</style>
|
|
||||||
<script type="text/javascript">
|
|
||||||
var returnval = 0;
|
|
||||||
var stylesheet, xmlFile, cache, doc;
|
|
||||||
function init(){
|
|
||||||
// NSCP 7.1+ / Mozilla 1.4.1+ / Safari
|
|
||||||
// Use the standard DOM Level 2 technique, if it is supported
|
|
||||||
if (document.implementation && document.implementation.createDocument) {
|
|
||||||
xmlFile = document.implementation.createDocument("", "", null);
|
|
||||||
stylesheet = document.implementation.createDocument("", "", null);
|
|
||||||
if (xmlFile.load){
|
|
||||||
xmlFile.load("site.xml");
|
|
||||||
stylesheet.load("web/site.xsl");
|
|
||||||
} else {
|
|
||||||
alert("Document could not be loaded by browser.");
|
|
||||||
}
|
|
||||||
xmlFile.addEventListener("load", transform, false);
|
|
||||||
stylesheet.addEventListener("load", transform, false);
|
|
||||||
}
|
|
||||||
//IE 6.0+ solution
|
|
||||||
else if (window.ActiveXObject) {
|
|
||||||
xmlFile = new ActiveXObject("msxml2.DOMDocument.3.0");
|
|
||||||
xmlFile.async = false;
|
|
||||||
xmlFile.load("site.xml");
|
|
||||||
stylesheet = new ActiveXObject("msxml2.FreeThreadedDOMDocument.3.0");
|
|
||||||
stylesheet.async = false;
|
|
||||||
stylesheet.load("web/site.xsl");
|
|
||||||
cache = new ActiveXObject("msxml2.XSLTemplate.3.0");
|
|
||||||
cache.stylesheet = stylesheet;
|
|
||||||
transformData();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// separate transformation function for IE 6.0+
|
|
||||||
function transformData(){
|
|
||||||
var processor = cache.createProcessor();
|
|
||||||
processor.input = xmlFile;
|
|
||||||
processor.transform();
|
|
||||||
data.innerHTML = processor.output;
|
|
||||||
}
|
|
||||||
// separate transformation function for NSCP 7.1+ and Mozilla 1.4.1+
|
|
||||||
function transform(){
|
|
||||||
returnval+=1;
|
|
||||||
if (returnval==2){
|
|
||||||
var processor = new XSLTProcessor();
|
|
||||||
processor.importStylesheet(stylesheet);
|
|
||||||
doc = processor.transformToDocument(xmlFile);
|
|
||||||
document.getElementById("data").innerHTML = doc.documentElement.innerHTML;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body onload="init();">
|
|
||||||
<!--[insert static HTML here]-->
|
|
||||||
<div id="data"><!-- this is where the transformed data goes --></div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,17 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<site>
|
|
||||||
<description url="@UPDATEURL@">
|
|
||||||
Update site for LWJGL and related features and plugins.
|
|
||||||
</description>
|
|
||||||
<feature url="features/org.lwjgl_2.jar" id="org.lwjgl" version="2">
|
|
||||||
<category name="3dlibs"/>
|
|
||||||
</feature>
|
|
||||||
<feature url="features/org.lwjgl.sdk_2.jar" id="org.lwjgl" version="2">
|
|
||||||
<category name="3dlibs"/>
|
|
||||||
</feature>
|
|
||||||
<category-def name="3dlibs" label="3D Libraries">
|
|
||||||
<description>
|
|
||||||
Java 3D libraries such as LWJGL.
|
|
||||||
</description>
|
|
||||||
</category-def>
|
|
||||||
</site>
|
|
|
@ -1,17 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<site>
|
|
||||||
<description url="@UPDATEURL@">
|
|
||||||
Update site for LWJGL and related features and plugins.
|
|
||||||
</description>
|
|
||||||
<feature url="features/org.lwjgl_@VERSION@.jar" id="org.lwjgl" version="@VERSION@">
|
|
||||||
<category name="3dlibs"/>
|
|
||||||
</feature>
|
|
||||||
<feature url="features/org.lwjgl.sdk_@VERSION@.jar" id="org.lwjgl.sdk" version="@VERSION@">
|
|
||||||
<category name="3dlibs"/>
|
|
||||||
</feature>
|
|
||||||
<category-def name="3dlibs" label="3D Libraries">
|
|
||||||
<description>
|
|
||||||
Java 3D libraries such as LWJGL.
|
|
||||||
</description>
|
|
||||||
</category-def>
|
|
||||||
</site>
|
|
|
@ -1,12 +0,0 @@
|
||||||
<STYLE type="text/css">
|
|
||||||
td.spacer {padding-bottom: 10px; padding-top: 10px;}
|
|
||||||
.title { font-family: sans-serif; color: #99AACC;}
|
|
||||||
.bodyText { font-family: sans-serif; font-size: 9pt; color:#000000; }
|
|
||||||
.sub-header { font-family: sans-serif; font-style: normal; font-weight: bold; font-size: 9pt; color: white;}
|
|
||||||
.log-text {font-family: sans-serif; font-style: normal; font-weight: lighter; font-size: 8pt; color:black;}
|
|
||||||
.big-header { font-family: sans-serif; font-style: normal; font-weight: bold; font-size: 9pt; color: white; border-top:10px solid white;}
|
|
||||||
.light-row {background:#FFFFFF}
|
|
||||||
.dark-row {background:#EEEEFF}
|
|
||||||
.header {background:#99AADD}
|
|
||||||
#indent {word-wrap : break-word;width :300px;text-indent:10px;}
|
|
||||||
</STYLE>
|
|
|
@ -1,214 +0,0 @@
|
||||||
<xsl:stylesheet version = '1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:msxsl="urn:schemas-microsoft-com:xslt">
|
|
||||||
<xsl:output method="html" encoding="UTF-8"/>
|
|
||||||
<xsl:key name="cat" match="category" use="@name"/>
|
|
||||||
<xsl:template match="/">
|
|
||||||
<xsl:for-each select="site">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>org.lwjgl.updatesite</title>
|
|
||||||
<style>@import url("web/site.css");</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1 class="title">org.lwjgl.updatesite</h1>
|
|
||||||
<p class="bodyText"><xsl:value-of select="description"/></p>
|
|
||||||
<table width="100%" border="0" cellspacing="1" cellpadding="2">
|
|
||||||
<xsl:for-each select="category-def">
|
|
||||||
<xsl:sort select="@label" order="ascending" case-order="upper-first"/>
|
|
||||||
<xsl:sort select="@name" order="ascending" case-order="upper-first"/>
|
|
||||||
<xsl:if test="count(key('cat',@name)) != 0">
|
|
||||||
<tr class="header">
|
|
||||||
<td class="sub-header" width="30%">
|
|
||||||
<xsl:value-of select="@name"/>
|
|
||||||
</td>
|
|
||||||
<td class="sub-header" width="70%">
|
|
||||||
<xsl:value-of select="@label"/>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<xsl:for-each select="key('cat',@name)">
|
|
||||||
<xsl:sort select="ancestor::feature//@version" order="ascending"/>
|
|
||||||
<xsl:sort select="ancestor::feature//@id" order="ascending" case-order="upper-first"/>
|
|
||||||
<tr>
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="(position() mod 2 = 1)">
|
|
||||||
<xsl:attribute name="class">dark-row</xsl:attribute>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:attribute name="class">light-row</xsl:attribute>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
<td class="log-text" id="indent">
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="ancestor::feature//@label">
|
|
||||||
<a href="{ancestor::feature//@url}"><xsl:value-of select="ancestor::feature//@label"/></a>
|
|
||||||
<br/>
|
|
||||||
<div id="indent">
|
|
||||||
(<xsl:value-of select="ancestor::feature//@id"/> - <xsl:value-of select="ancestor::feature//@version"/>)
|
|
||||||
</div>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<a href="{ancestor::feature//@url}"><xsl:value-of select="ancestor::feature//@id"/> - <xsl:value-of select="ancestor::feature//@version"/></a>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
<br />
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<table>
|
|
||||||
<xsl:if test="ancestor::feature//@os">
|
|
||||||
<tr><td class="log-text" id="indent">Operating Systems:</td>
|
|
||||||
<td class="log-text" id="indent"><xsl:value-of select="ancestor::feature//@os"/></td>
|
|
||||||
</tr>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:if test="ancestor::feature//@ws">
|
|
||||||
<tr><td class="log-text" id="indent">Windows Systems:</td>
|
|
||||||
<td class="log-text" id="indent"><xsl:value-of select="ancestor::feature//@ws"/></td>
|
|
||||||
</tr>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:if test="ancestor::feature//@nl">
|
|
||||||
<tr><td class="log-text" id="indent">Languages:</td>
|
|
||||||
<td class="log-text" id="indent"><xsl:value-of select="ancestor::feature//@nl"/></td>
|
|
||||||
</tr>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:if test="ancestor::feature//@arch">
|
|
||||||
<tr><td class="log-text" id="indent">Architecture:</td>
|
|
||||||
<td class="log-text" id="indent"><xsl:value-of select="ancestor::feature//@arch"/></td>
|
|
||||||
</tr>
|
|
||||||
</xsl:if>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</xsl:for-each>
|
|
||||||
<tr><td class="spacer"><br/></td><td class="spacer"><br/></td></tr>
|
|
||||||
</xsl:if>
|
|
||||||
</xsl:for-each>
|
|
||||||
<xsl:if test="count(feature) > count(feature/category)">
|
|
||||||
<tr class="header">
|
|
||||||
<td class="sub-header" colspan="2">
|
|
||||||
Uncategorized
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="function-available('msxsl:node-set')">
|
|
||||||
<xsl:variable name="rtf-nodes">
|
|
||||||
<xsl:for-each select="feature[not(category)]">
|
|
||||||
<xsl:sort select="@id" order="ascending" case-order="upper-first"/>
|
|
||||||
<xsl:sort select="@version" order="ascending" />
|
|
||||||
<xsl:value-of select="."/>
|
|
||||||
<xsl:copy-of select="." />
|
|
||||||
</xsl:for-each>
|
|
||||||
</xsl:variable>
|
|
||||||
<xsl:variable name="myNodeSet" select="msxsl:node-set($rtf-nodes)/*"/>
|
|
||||||
<xsl:for-each select="$myNodeSet">
|
|
||||||
<tr>
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="position() mod 2 = 1">
|
|
||||||
<xsl:attribute name="class">dark-row</xsl:attribute>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:attribute name="class">light-row</xsl:attribute>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
<td class="log-text" id="indent">
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="@label">
|
|
||||||
<a href="{@url}"><xsl:value-of select="@label"/></a>
|
|
||||||
<br />
|
|
||||||
<div id="indent">
|
|
||||||
(<xsl:value-of select="@id"/> - <xsl:value-of select="@version"/>)
|
|
||||||
</div>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<a href="{@url}"><xsl:value-of select="@id"/> - <xsl:value-of select="@version"/></a>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
<br /><br />
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<table>
|
|
||||||
<xsl:if test="@os">
|
|
||||||
<tr><td class="log-text" id="indent">Operating Systems:</td>
|
|
||||||
<td class="log-text" id="indent"><xsl:value-of select="@os"/></td>
|
|
||||||
</tr>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:if test="@ws">
|
|
||||||
<tr><td class="log-text" id="indent">Windows Systems:</td>
|
|
||||||
<td class="log-text" id="indent"><xsl:value-of select="@ws"/></td>
|
|
||||||
</tr>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:if test="@nl">
|
|
||||||
<tr><td class="log-text" id="indent">Languages:</td>
|
|
||||||
<td class="log-text" id="indent"><xsl:value-of select="@nl"/></td>
|
|
||||||
</tr>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:if test="@arch">
|
|
||||||
<tr><td class="log-text" id="indent">Architecture:</td>
|
|
||||||
<td class="log-text" id="indent"><xsl:value-of select="@arch"/></td>
|
|
||||||
</tr>
|
|
||||||
</xsl:if>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</xsl:for-each>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:for-each select="feature[not(category)]">
|
|
||||||
<xsl:sort select="@id" order="ascending" case-order="upper-first"/>
|
|
||||||
<xsl:sort select="@version" order="ascending" />
|
|
||||||
<tr>
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="count(preceding-sibling::feature[not(category)]) mod 2 = 1">
|
|
||||||
<xsl:attribute name="class">dark-row</xsl:attribute>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:attribute name="class">light-row</xsl:attribute>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
<td class="log-text" id="indent">
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="@label">
|
|
||||||
<a href="{@url}"><xsl:value-of select="@label"/></a>
|
|
||||||
<br />
|
|
||||||
<div id="indent">
|
|
||||||
(<xsl:value-of select="@id"/> - <xsl:value-of select="@version"/>)
|
|
||||||
</div>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<a href="{@url}"><xsl:value-of select="@id"/> - <xsl:value-of select="@version"/></a>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
<br /><br />
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<table>
|
|
||||||
<xsl:if test="@os">
|
|
||||||
<tr><td class="log-text" id="indent">Operating Systems:</td>
|
|
||||||
<td class="log-text" id="indent"><xsl:value-of select="@os"/></td>
|
|
||||||
</tr>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:if test="@ws">
|
|
||||||
<tr><td class="log-text" id="indent">Windows Systems:</td>
|
|
||||||
<td class="log-text" id="indent"><xsl:value-of select="@ws"/></td>
|
|
||||||
</tr>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:if test="@nl">
|
|
||||||
<tr><td class="log-text" id="indent">Languages:</td>
|
|
||||||
<td class="log-text" id="indent"><xsl:value-of select="@nl"/></td>
|
|
||||||
</tr>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:if test="@arch">
|
|
||||||
<tr><td class="log-text" id="indent">Architecture:</td>
|
|
||||||
<td class="log-text" id="indent"><xsl:value-of select="@arch"/></td>
|
|
||||||
</tr>
|
|
||||||
</xsl:if>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</xsl:for-each>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
</xsl:for-each>
|
|
||||||
</xsl:template>
|
|
||||||
</xsl:stylesheet>
|
|
|
@ -1,14 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<classpath>
|
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
|
|
||||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
|
||||||
<classpathentry kind="src" path="src/java"/>
|
|
||||||
<classpathentry exported="true" kind="lib" path="AppleJavaExtensions.jar"/>
|
|
||||||
<classpathentry exported="true" kind="lib" path="jinput.jar"/>
|
|
||||||
<classpathentry exported="true" kind="lib" path="lwjgl.jar"/>
|
|
||||||
<classpathentry exported="true" kind="lib" path="lwjgl_test.jar"/>
|
|
||||||
<classpathentry exported="true" kind="lib" path="lwjgl_util.jar"/>
|
|
||||||
<classpathentry exported="true" kind="lib" path="lwjgl_util_applet.jar"/>
|
|
||||||
<classpathentry exported="true" kind="lib" path="lzma.jar"/>
|
|
||||||
<classpathentry kind="output" path="build/classes"/>
|
|
||||||
</classpath>
|
|
|
@ -1,28 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<projectDescription>
|
|
||||||
<name>org.lwjgl</name>
|
|
||||||
<comment></comment>
|
|
||||||
<projects>
|
|
||||||
</projects>
|
|
||||||
<buildSpec>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
</buildSpec>
|
|
||||||
<natures>
|
|
||||||
<nature>org.eclipse.pde.PluginNature</nature>
|
|
||||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
|
||||||
</natures>
|
|
||||||
</projectDescription>
|
|
|
@ -1,12 +0,0 @@
|
||||||
#Tue Nov 23 14:49:20 CET 2010
|
|
||||||
eclipse.preferences.version=1
|
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
|
|
||||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
|
||||||
org.eclipse.jdt.core.compiler.compliance=1.5
|
|
||||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
|
||||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
|
||||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
|
||||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
|
||||||
org.eclipse.jdt.core.compiler.source=1.5
|
|
|
@ -1,38 +0,0 @@
|
||||||
Manifest-Version: 1.0
|
|
||||||
Bundle-ManifestVersion: 2
|
|
||||||
Bundle-Name: LWJGL Lightweight Java Game Library
|
|
||||||
Bundle-SymbolicName: org.lwjgl
|
|
||||||
Bundle-Version: 2.0.0
|
|
||||||
Bundle-Vendor: Lightweight Java Game Library Project
|
|
||||||
Bundle-Activator: org.lwjgl.Activator
|
|
||||||
Require-Bundle: org.eclipse.ui,
|
|
||||||
org.eclipse.core.runtime
|
|
||||||
Bundle-ActivationPolicy: lazy
|
|
||||||
Export-Package: LZMA,
|
|
||||||
com.apple.eawt,
|
|
||||||
com.apple.eio,
|
|
||||||
net.java.games.input,
|
|
||||||
net.java.games.util,
|
|
||||||
net.java.games.util.plugins,
|
|
||||||
org.lwjgl,
|
|
||||||
org.lwjgl.input,
|
|
||||||
org.lwjgl.openal,
|
|
||||||
org.lwjgl.opencl,
|
|
||||||
org.lwjgl.opencl.api,
|
|
||||||
org.lwjgl.opengl,
|
|
||||||
org.lwjgl.util,
|
|
||||||
org.lwjgl.util.applet,
|
|
||||||
org.lwjgl.util.glu,
|
|
||||||
org.lwjgl.util.glu.tessellation,
|
|
||||||
org.lwjgl.util.input,
|
|
||||||
org.lwjgl.util.jinput,
|
|
||||||
org.lwjgl.util.vector
|
|
||||||
Bundle-RequiredExecutionEnvironment: J2SE-1.5
|
|
||||||
Bundle-ClassPath: .,
|
|
||||||
lwjgl.jar,
|
|
||||||
lwjgl_util.jar,
|
|
||||||
lwjgl_util_applet.jar,
|
|
||||||
lwjgl_test.jar,
|
|
||||||
AppleJavaExtensions.jar,
|
|
||||||
jinput.jar,
|
|
||||||
lzma.jar
|
|
|
@ -1,11 +0,0 @@
|
||||||
source.. = src/java/
|
|
||||||
output.. = build/classes/
|
|
||||||
bin.includes = META-INF/,\
|
|
||||||
.,\
|
|
||||||
lzma.jar,\
|
|
||||||
jinput.jar,\
|
|
||||||
lwjgl.jar,\
|
|
||||||
lwjgl_test.jar,\
|
|
||||||
lwjgl_util.jar,\
|
|
||||||
lwjgl_util_applet.jar,\
|
|
||||||
native/
|
|
|
@ -1,83 +0,0 @@
|
||||||
/*******************************************************************************
|
|
||||||
* Copyright (c) 2011 LWJGL Project and others
|
|
||||||
* All rights reserved. This program and the accompanying materials
|
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
|
||||||
* which accompanies this distribution, and is available at
|
|
||||||
* http://www.eclipse.org/legal/epl-v10.html, and under the terms of the
|
|
||||||
* BSD license, see http://lwjgl.org/license.php for details.
|
|
||||||
*
|
|
||||||
* Contributors:
|
|
||||||
* Jens von Pilgrim - initial implementation
|
|
||||||
******************************************************************************/
|
|
||||||
package org.lwjgl;
|
|
||||||
|
|
||||||
import org.eclipse.core.runtime.Plugin;
|
|
||||||
import org.eclipse.core.runtime.Status;
|
|
||||||
import org.osgi.framework.BundleContext;
|
|
||||||
import org.osgi.framework.BundleException;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The activator class controls the plug-in life cycle.
|
|
||||||
*
|
|
||||||
* @author Jens von Pilgrim (developer@jevopi.de)
|
|
||||||
* @since Mar 30, 2011
|
|
||||||
*/
|
|
||||||
public class Activator extends Plugin {
|
|
||||||
|
|
||||||
// The plug-in ID
|
|
||||||
public static final String PLUGIN_ID = "org.lwjgl";
|
|
||||||
|
|
||||||
// The shared instance
|
|
||||||
private static Activator plugin;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The constructor
|
|
||||||
*/
|
|
||||||
public Activator() {
|
|
||||||
plugin = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
* @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void start(BundleContext context) throws Exception {
|
|
||||||
|
|
||||||
super.start(context);
|
|
||||||
|
|
||||||
try {
|
|
||||||
String path = LibraryPathUtil.getLWJGLLibraryPath(context);
|
|
||||||
Status status = new Status(Status.INFO, PLUGIN_ID, Status.INFO,
|
|
||||||
"Set org.lwjgl.librarypath to " + path, null);
|
|
||||||
getLog().log(status);
|
|
||||||
|
|
||||||
} catch (Throwable ex) {
|
|
||||||
Status status = new Status(Status.ERROR, PLUGIN_ID, Status.ERROR,
|
|
||||||
"Error setting native LWJGL libraries path: " + ex.toString(), ex);
|
|
||||||
getLog().log(status);
|
|
||||||
throw new BundleException(status.getMessage(), ex);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
* @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void stop(BundleContext context) throws Exception {
|
|
||||||
plugin = null;
|
|
||||||
super.stop(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the shared instance
|
|
||||||
*
|
|
||||||
* @return the shared instance
|
|
||||||
*/
|
|
||||||
public static Activator getDefault() {
|
|
||||||
return plugin;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,92 +0,0 @@
|
||||||
/*******************************************************************************
|
|
||||||
* Copyright (c) 2011 LWJGL Project and others
|
|
||||||
* All rights reserved. This program and the accompanying materials
|
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
|
||||||
* which accompanies this distribution, and is available at
|
|
||||||
* http://www.eclipse.org/legal/epl-v10.html, and under the terms of the
|
|
||||||
* BSD license, see http://lwjgl.org/license.php for details.
|
|
||||||
*
|
|
||||||
* Contributors:
|
|
||||||
* Jens von Pilgrim - initial implementation
|
|
||||||
******************************************************************************/
|
|
||||||
package org.lwjgl;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.net.URL;
|
|
||||||
|
|
||||||
import org.eclipse.core.runtime.FileLocator;
|
|
||||||
import org.osgi.framework.Bundle;
|
|
||||||
import org.osgi.framework.BundleContext;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Helper class for retrieving plugin relative path of native LWJGL
|
|
||||||
* libraries and setting the path in the system properties.
|
|
||||||
*
|
|
||||||
* @author Jens von Pilgrim
|
|
||||||
* @since Jan 30, 2011
|
|
||||||
*/
|
|
||||||
public class LibraryPathUtil {
|
|
||||||
|
|
||||||
public static final String LWJGL_SYSTEM_PROPERTY = "org.lwjgl.librarypath";
|
|
||||||
|
|
||||||
public static String[] NATIVEPATH = new String[] { "windows", "macosx",
|
|
||||||
"linux", "solaris" };
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns plugin relative path to native libraries according to
|
|
||||||
* current operating system.
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
* @throws OSNotSupportedException
|
|
||||||
*/
|
|
||||||
public static String getRelativeLWJGLLibraryPath()
|
|
||||||
throws OSNotSupportedException {
|
|
||||||
int iOS = -1;
|
|
||||||
String osname = System.getProperty("os.name").toLowerCase();
|
|
||||||
String osarch = System.getProperty("os.arch").toLowerCase();
|
|
||||||
|
|
||||||
// applied patch by Carlo Salinari: ignore osarch on windows
|
|
||||||
// see http://lwjgl.org/forum/index.php/topic,3726.0.html
|
|
||||||
if (osname.startsWith("windows")) {
|
|
||||||
iOS = 0;
|
|
||||||
} else if (osname.startsWith("mac")) {
|
|
||||||
iOS = 1;
|
|
||||||
} else if (osname.startsWith("linux")) {
|
|
||||||
iOS = 2;
|
|
||||||
} else if (osname.startsWith("solaris")) {
|
|
||||||
iOS = 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (iOS >= 0 && iOS < NATIVEPATH.length) {
|
|
||||||
String base = "native" + File.separator + NATIVEPATH[iOS];
|
|
||||||
return base;
|
|
||||||
} else {
|
|
||||||
throw new OSNotSupportedException(osname, osarch);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns absolute path of native LWJGL libraries according to
|
|
||||||
* current operating system, this path is also set as
|
|
||||||
* system property.
|
|
||||||
*
|
|
||||||
* @param context
|
|
||||||
* @return
|
|
||||||
* @throws OSNotSupportedException
|
|
||||||
* @throws IOException
|
|
||||||
*/
|
|
||||||
public static String getLWJGLLibraryPath(BundleContext context)
|
|
||||||
throws OSNotSupportedException, IOException {
|
|
||||||
String base = getRelativeLWJGLLibraryPath();
|
|
||||||
Bundle fragment = context.getBundle();
|
|
||||||
|
|
||||||
URL url = FileLocator.resolve(fragment.getEntry(base));
|
|
||||||
File fileDir = new File(url.getPath());
|
|
||||||
String path = fileDir.getPath();
|
|
||||||
|
|
||||||
System.setProperty(LWJGL_SYSTEM_PROPERTY, path);
|
|
||||||
return path;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,53 +0,0 @@
|
||||||
/*******************************************************************************
|
|
||||||
* Copyright (c) 2011 LWJGL Project and others
|
|
||||||
* All rights reserved. This program and the accompanying materials
|
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
|
||||||
* which accompanies this distribution, and is available at
|
|
||||||
* http://www.eclipse.org/legal/epl-v10.html, and under the terms of the
|
|
||||||
* BSD license, see http://lwjgl.org/license.php for details.
|
|
||||||
*
|
|
||||||
* Contributors:
|
|
||||||
* Jens von Pilgrim - initial implementation
|
|
||||||
******************************************************************************/
|
|
||||||
package org.lwjgl;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Exception thrown by library loader if operating system is not supported.
|
|
||||||
*
|
|
||||||
* @author Jens von Pilgrim (developer@jevopi.de)
|
|
||||||
* @since Jan 30, 2011
|
|
||||||
*/
|
|
||||||
public class OSNotSupportedException extends Exception {
|
|
||||||
|
|
||||||
String strOSName;
|
|
||||||
String strOSArch;
|
|
||||||
/**
|
|
||||||
* @param i_strOSName
|
|
||||||
* @param i_strOSArch
|
|
||||||
*/
|
|
||||||
public OSNotSupportedException(String i_strOSName, String i_strOSArch) {
|
|
||||||
super();
|
|
||||||
strOSName = i_strOSName;
|
|
||||||
strOSArch = i_strOSArch;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
* @see java.lang.Throwable#getMessage()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public String getMessage() {
|
|
||||||
return strOSName + " (" + strOSArch + ") not supported by LWJGL.";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
* @see java.lang.Throwable#toString()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return getMessage();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -80,22 +80,8 @@
|
||||||
<arg value="-Dfiles=lwjgl_util-sources.jar,lwjgl_util-javadoc.jar" />
|
<arg value="-Dfiles=lwjgl_util-sources.jar,lwjgl_util-javadoc.jar" />
|
||||||
<arg value="-Plwjglgpg" />
|
<arg value="-Plwjglgpg" />
|
||||||
</artifact:mvn>
|
</artifact:mvn>
|
||||||
|
|
||||||
<!-- lwjgl_util_applet.jar -->
|
</target>
|
||||||
|
|
||||||
<artifact:mvn>
|
|
||||||
<arg value="${mvncommand}" />
|
|
||||||
<arg value="-Durl=${mavenrepo}" />
|
|
||||||
<arg value="-DrepositoryId=${mavenrepoId}" />
|
|
||||||
<arg value="-DpomFile=lwjgl_util_applet.pom" />
|
|
||||||
<arg value="-Dfile=lwjgl_util_applet.jar" />
|
|
||||||
<arg value="-Dtypes=jar,jar" />
|
|
||||||
<arg value="-Dclassifiers=sources,javadoc" />
|
|
||||||
<arg value="-Dfiles=lwjgl_util_applet-sources.jar,lwjgl_util_applet-javadoc.jar" />
|
|
||||||
<arg value="-Plwjglgpg" />
|
|
||||||
</artifact:mvn>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
|
|
||||||
<target name="execute-install">
|
<target name="execute-install">
|
||||||
|
@ -199,37 +185,8 @@
|
||||||
<arg value="-Dfile=lwjgl_util-javadoc.jar" />
|
<arg value="-Dfile=lwjgl_util-javadoc.jar" />
|
||||||
<arg value="-Dclassifier=javadoc" />
|
<arg value="-Dclassifier=javadoc" />
|
||||||
<arg value="-Dpackaging=jar" />
|
<arg value="-Dpackaging=jar" />
|
||||||
</artifact:mvn>
|
</artifact:mvn>
|
||||||
|
|
||||||
<!-- lwjgl_util_applet.jar -->
|
|
||||||
|
|
||||||
<artifact:mvn>
|
|
||||||
<arg value="${mvncommand}" />
|
|
||||||
<arg value="-Durl=${mavenrepo}" />
|
|
||||||
<arg value="-DrepositoryId=${mavenrepoId}" />
|
|
||||||
<arg value="-DpomFile=lwjgl_util_applet.pom" />
|
|
||||||
<arg value="-Dfile=lwjgl_util_applet.jar" />
|
|
||||||
</artifact:mvn>
|
|
||||||
|
|
||||||
<artifact:mvn>
|
|
||||||
<arg value="${mvncommand}" />
|
|
||||||
<arg value="-Durl=${mavenrepo}" />
|
|
||||||
<arg value="-DrepositoryId=${mavenrepoId}" />
|
|
||||||
<arg value="-DpomFile=lwjgl_util_applet.pom" />
|
|
||||||
<arg value="-Dfile=lwjgl_util_applet-sources.jar" />
|
|
||||||
<arg value="-Dclassifier=sources" />
|
|
||||||
</artifact:mvn>
|
|
||||||
|
|
||||||
<artifact:mvn>
|
|
||||||
<arg value="${mvncommand}" />
|
|
||||||
<arg value="-Durl=${mavenrepo}" />
|
|
||||||
<arg value="-DrepositoryId=${mavenrepoId}" />
|
|
||||||
<arg value="-DpomFile=lwjgl_util_applet.pom" />
|
|
||||||
<arg value="-Dfile=lwjgl_util_applet-javadoc.jar" />
|
|
||||||
<arg value="-Dclassifier=javadoc" />
|
|
||||||
</artifact:mvn>
|
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
<project>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<parent>
|
|
||||||
<groupId>org.lwjgl.lwjgl</groupId>
|
|
||||||
<artifactId>parent</artifactId>
|
|
||||||
<version>@VERSION@</version>
|
|
||||||
</parent>
|
|
||||||
<groupId>org.lwjgl.lwjgl</groupId>
|
|
||||||
<artifactId>lwjgl_util_applet</artifactId>
|
|
||||||
<packaging>jar</packaging>
|
|
||||||
<name>Lighweight Java Game Library</name>
|
|
||||||
<version>@VERSION@</version>
|
|
||||||
<description>Lighweight Java Game Library</description>
|
|
||||||
<url>http://lwjgl.org/</url>
|
|
||||||
<scm>
|
|
||||||
<url>http://java-game-lib.svn.sourceforge.net/viewvc/java-game-lib/trunk/</url>
|
|
||||||
<connection>https://java-game-lib.svn.sourceforge.net/svnroot/java-game-lib </connection>
|
|
||||||
</scm>
|
|
||||||
</project>
|
|
|
@ -94,9 +94,9 @@
|
||||||
<mapper type="glob" from="*.c" to="*.o"/>
|
<mapper type="glob" from="*.c" to="*.o"/>
|
||||||
<fileset dir="${native}/common" includes="*.c"/>
|
<fileset dir="${native}/common" includes="*.c"/>
|
||||||
<fileset dir="${native}/common/opengl" includes="*.c"/>
|
<fileset dir="${native}/common/opengl" includes="*.c"/>
|
||||||
<fileset dir="${native}/generated/openal" includes="*.c"/>
|
<fileset dir="${lwjgl.target.gen.native}/openal" includes="*.c"/>
|
||||||
<fileset dir="${native}/generated/opencl" includes="*.c"/>
|
<fileset dir="${lwjgl.target.gen.native}/opencl" includes="*.c"/>
|
||||||
<fileset dir="${native}/generated/opengl" includes="*.c"/>
|
<fileset dir="${lwjgl.target.gen.native}/opengl" includes="*.c"/>
|
||||||
<fileset dir="${native}/linux" includes="*.c"/>
|
<fileset dir="${native}/linux" includes="*.c"/>
|
||||||
<fileset dir="${native}/linux/opengl" includes="*.c"/>
|
<fileset dir="${native}/linux/opengl" includes="*.c"/>
|
||||||
</apply>
|
</apply>
|
||||||
|
@ -129,9 +129,9 @@
|
||||||
<mapper type="glob" from="*.c" to="*.o"/>
|
<mapper type="glob" from="*.c" to="*.o"/>
|
||||||
<fileset dir="${native}/common" includes="*.c"/>
|
<fileset dir="${native}/common" includes="*.c"/>
|
||||||
<fileset dir="${native}/common/opengl" includes="*.c"/>
|
<fileset dir="${native}/common/opengl" includes="*.c"/>
|
||||||
<fileset dir="${native}/generated/openal" includes="*.c"/>
|
<fileset dir="${lwjgl.target.gen.native}/openal" includes="*.c"/>
|
||||||
<fileset dir="${native}/generated/opencl" includes="*.c"/>
|
<fileset dir="${lwjgl.target.gen.native}/opencl" includes="*.c"/>
|
||||||
<fileset dir="${native}/generated/opengl" includes="*.c"/>
|
<fileset dir="${lwjgl.target.gen.native}/opengl" includes="*.c"/>
|
||||||
<fileset dir="${native}/linux" includes="*.c"/>
|
<fileset dir="${native}/linux" includes="*.c"/>
|
||||||
<fileset dir="${native}/linux/opengl" includes="*.c"/>
|
<fileset dir="${native}/linux/opengl" includes="*.c"/>
|
||||||
</apply>
|
</apply>
|
||||||
|
|
|
@ -1,147 +0,0 @@
|
||||||
<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">
|
|
||||||
<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 enter the keystore" addproperty="keystore.location" defaultvalue="applet/lwjglkeystore"/>
|
|
||||||
<input message="Please enter the keystore alias" addproperty="keystore.alias" defaultvalue="lwjgl"/>
|
|
||||||
<input message="Please type the password for the keystore" addproperty="sign.pwd" defaultvalue="123456"/>
|
|
||||||
|
|
||||||
<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}"/>
|
|
||||||
-->
|
|
||||||
<param name="keystore" value="${keystore.location}"/>
|
|
||||||
<param name="alias" value="${keystore.alias}"/>
|
|
||||||
<param name="password" value="${sign.pwd}"/>
|
|
||||||
</antcall>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="-applet">
|
|
||||||
|
|
||||||
<!-- Create lwjgl_applet.jar -->
|
|
||||||
<jar destfile="applet/basic/lwjgl_applet.jar" taskname="lwjgl_applet.jar">
|
|
||||||
<fileset refid="lwjgl_applet.fileset" />
|
|
||||||
</jar>
|
|
||||||
|
|
||||||
<!-- create each of the native jars -->
|
|
||||||
<jar destfile="applet/basic/windows_natives.jar" taskname="windows_natives.jar">
|
|
||||||
<fileset dir="${lwjgl.lib}/windows">
|
|
||||||
<patternset refid="lwjgl-windows.fileset"/>
|
|
||||||
</fileset>
|
|
||||||
</jar>
|
|
||||||
<signjar jar="applet/basic/windows_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
|
|
||||||
|
|
||||||
<jar destfile="applet/basic/linux_natives.jar" taskname="linux_natives.jar">
|
|
||||||
<fileset dir="${lwjgl.lib}/linux">
|
|
||||||
<patternset refid="lwjgl-linux.fileset"/>
|
|
||||||
</fileset>
|
|
||||||
</jar>
|
|
||||||
<signjar jar="applet/basic/linux_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
|
|
||||||
|
|
||||||
<jar destfile="applet/basic/macosx_natives.jar" taskname="macosx_natives.jar">
|
|
||||||
<fileset dir="${lwjgl.lib}/macosx">
|
|
||||||
<patternset refid="lwjgl-macosx.fileset"/>
|
|
||||||
</fileset>
|
|
||||||
</jar>
|
|
||||||
<signjar jar="applet/basic/macosx_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
|
|
||||||
|
|
||||||
<jar destfile="applet/basic/solaris_natives.jar" taskname="solaris_natives.jar">
|
|
||||||
<fileset dir="${lwjgl.lib}/solaris">
|
|
||||||
<patternset refid="lwjgl-solaris.fileset"/>
|
|
||||||
</fileset>
|
|
||||||
</jar>
|
|
||||||
<signjar jar="applet/basic/solaris_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
|
|
||||||
|
|
||||||
<copy file="${lwjgl.lib}/lwjgl.jar" todir="applet/basic" overwrite="true"/>
|
|
||||||
<copy file="${lwjgl.lib}/lwjgl-debug.jar" todir="applet/basic" overwrite="true"/>
|
|
||||||
<copy file="${lwjgl.lib}/lwjgl_util_applet.jar" todir="applet/basic" overwrite="true"/>
|
|
||||||
<copy file="${lwjgl.lib}/lwjgl_util.jar" todir="applet/basic" overwrite="true"/>
|
|
||||||
<copy file="${lwjgl.lib}/jinput.jar" todir="applet/basic" overwrite="true"/>
|
|
||||||
<copy file="${lwjgl.lib}/lzma.jar" todir="applet/advance" overwrite="true"/>
|
|
||||||
|
|
||||||
<signjar jar="applet/basic/lwjgl_util_applet.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
|
|
||||||
<signjar jar="applet/advance/lzma.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
|
|
||||||
<copy file="applet/basic/lwjgl_util_applet.jar" todir="applet/advance" overwrite="true"/>
|
|
||||||
|
|
||||||
<!-- LZMA only, for 1.4 only clients -->
|
|
||||||
<!--antcall target="compress-resource">
|
|
||||||
<param name="input" value="applet/basic/lwjgl.jar"/>
|
|
||||||
<param name="output" value="applet/advance/lwjgl.jar.lzma"/>
|
|
||||||
</antcall>
|
|
||||||
<antcall target="compress-resource">
|
|
||||||
<param name="input" value="applet/basic/lwjgl-debug.jar"/>
|
|
||||||
<param name="output" value="applet/advance/lwjgl-debug.jar.lzma"/>
|
|
||||||
</antcall>
|
|
||||||
|
|
||||||
<antcall target="compress-resource">
|
|
||||||
<param name="input" value="applet/basic/lwjgl_util.jar"/>
|
|
||||||
<param name="output" value="applet/advance/lwjgl_util.jar.lzma"/>
|
|
||||||
</antcall>
|
|
||||||
<antcall target="compress-resource">
|
|
||||||
<param name="input" value="applet/basic/jinput.jar"/>
|
|
||||||
<param name="output" value="applet/advance/jinput.jar.lzma"/>
|
|
||||||
</antcall>
|
|
||||||
<antcall target="compress-resource">
|
|
||||||
<param name="input" value="applet/basic/lwjgl_applet.jar"/>
|
|
||||||
<param name="output" value="applet/advance/lwjgl_applet.jar.lzma"/>
|
|
||||||
</antcall>
|
|
||||||
<antcall target="compress-resource">
|
|
||||||
<param name="input" value="applet/basic/windows_natives.jar"/>
|
|
||||||
<param name="output" value="applet/advance/windows_natives.jar.lzma"/>
|
|
||||||
</antcall -->
|
|
||||||
|
|
||||||
<antcall target="compress-sign-class">
|
|
||||||
<param name="dir" value="applet/basic/"/>
|
|
||||||
<param name="outputdir" value="applet/advance/"/>
|
|
||||||
<param name="jarfile" value="lwjgl"/>
|
|
||||||
</antcall>
|
|
||||||
<antcall target="compress-sign-class">
|
|
||||||
<param name="dir" value="applet/basic/"/>
|
|
||||||
<param name="outputdir" value="applet/advance/"/>
|
|
||||||
<param name="jarfile" value="lwjgl-debug"/>
|
|
||||||
</antcall>
|
|
||||||
<antcall target="compress-sign-class">
|
|
||||||
<param name="dir" value="applet/basic/"/>
|
|
||||||
<param name="outputdir" value="applet/advance/"/>
|
|
||||||
<param name="jarfile" value="lwjgl_util"/>
|
|
||||||
</antcall>
|
|
||||||
<antcall target="compress-sign-class">
|
|
||||||
<param name="dir" value="applet/basic/"/>
|
|
||||||
<param name="outputdir" value="applet/advance/"/>
|
|
||||||
<param name="jarfile" value="jinput"/>
|
|
||||||
</antcall>
|
|
||||||
<antcall target="compress-sign-class">
|
|
||||||
<param name="dir" value="applet/basic/"/>
|
|
||||||
<param name="outputdir" value="applet/advance/"/>
|
|
||||||
<param name="jarfile" value="lwjgl_applet"/>
|
|
||||||
</antcall>
|
|
||||||
<antcall target="compress-resource">
|
|
||||||
<param name="input" value="applet/basic/windows_natives.jar"/>
|
|
||||||
<param name="output" value="applet/advance/windows_natives.jar.lzma"/>
|
|
||||||
</antcall>
|
|
||||||
<antcall target="compress-resource">
|
|
||||||
<param name="input" value="applet/basic/macosx_natives.jar"/>
|
|
||||||
<param name="output" value="applet/advance/macosx_natives.jar.lzma"/>
|
|
||||||
</antcall>
|
|
||||||
<antcall target="compress-resource">
|
|
||||||
<param name="input" value="applet/basic/linux_natives.jar"/>
|
|
||||||
<param name="output" value="applet/advance/linux_natives.jar.lzma"/>
|
|
||||||
</antcall>
|
|
||||||
<antcall target="compress-resource">
|
|
||||||
<param name="input" value="applet/basic/solaris_natives.jar"/>
|
|
||||||
<param name="output" value="applet/advance/solaris_natives.jar.lzma"/>
|
|
||||||
</antcall>
|
|
||||||
</target>
|
|
||||||
</project>
|
|
|
@ -1,37 +1,42 @@
|
||||||
<project name="definitions">
|
<project name="definitions" basedir="/dev/null">
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
<!-- Global properties for build -->
|
<!-- Global properties for build -->
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
<property name="lwjgl.src" location="src" />
|
<property name="lwjgl.src" location="src" />
|
||||||
<property name="lwjgl.src.native" location="${lwjgl.src}/native" />
|
<property name="lwjgl.src.java" location="${lwjgl.src}/java" />
|
||||||
<property name="lwjgl.src.headers" location="${lwjgl.src.native}/common" />
|
<property name="lwjgl.src.native" location="${lwjgl.src}/native" />
|
||||||
<property name="lwjgl.src.templates" location="${lwjgl.src}/templates" />
|
<property name="lwjgl.src.headers" location="${lwjgl.src.native}/common" />
|
||||||
<property name="lwjgl.bin" location="bin" />
|
<property name="lwjgl.src.templates" location="${lwjgl.src}/templates" />
|
||||||
<property name="lwjgl.lib" location="libs" />
|
<property name="lwjgl.target" location="target" />
|
||||||
<property name="lwjgl.dist" location="dist" />
|
<property name="lwjgl.target.gen" location="${lwjgl.target}/gen" />
|
||||||
<property name="lwjgl.docs" location="doc" />
|
<property name="lwjgl.target.gen.classes" location="${lwjgl.target.gen}/classes" />
|
||||||
<property name="lwjgl.temp" location="temp" />
|
<property name="lwjgl.target.gen.java" location="${lwjgl.target.gen}/java" />
|
||||||
<property name="lwjgl.res" location="res" />
|
<property name="lwjgl.target.gen.native" location="${lwjgl.target.gen}/native" />
|
||||||
<property name="lwjgl.version" value="2.9.4" />
|
<property name="lwjgl.target.gen.obj" location="${lwjgl.target.gen}/obj" />
|
||||||
<property name="lwjgl.web" location="www" />
|
<property name="lwjgl.target.bundle" location="${lwjgl.target}/bundle" />
|
||||||
|
<property name="lwjgl.target.staging" location="${lwjgl.target}/staging" />
|
||||||
|
<property name="lwjgl.target.doc" location="${lwjgl.target}/doc" />
|
||||||
|
<property name="lwjgl.lib" location="libs" />
|
||||||
|
<property name="lwjgl.version" value="2.9.4" />
|
||||||
|
<property name="lwjgl.web" location="www" />
|
||||||
|
|
||||||
<property name="lwjgl.src.templates.al" location="${lwjgl.src.templates}/org/lwjgl/openal"/>
|
<property name="lwjgl.src.templates.al" location="${lwjgl.src.templates}/org/lwjgl/openal"/>
|
||||||
<property name="lwjgl.src.templates.gl" location="${lwjgl.src.templates}/org/lwjgl/opengl"/>
|
<property name="lwjgl.src.templates.gl" location="${lwjgl.src.templates}/org/lwjgl/opengl"/>
|
||||||
<property name="lwjgl.src.templates.gles" location="${lwjgl.src.templates}/org/lwjgl/opengles"/>
|
<property name="lwjgl.src.templates.gles" location="${lwjgl.src.templates}/org/lwjgl/opengles"/>
|
||||||
<property name="lwjgl.src.templates.cl" location="${lwjgl.src.templates}/org/lwjgl/opencl"/>
|
<property name="lwjgl.src.templates.cl" location="${lwjgl.src.templates}/org/lwjgl/opencl"/>
|
||||||
|
|
||||||
<property name="openal-template-pattern" value="AL*.java,EFX*.java"/>
|
<property name="openal-template-pattern" value="AL*.java,EFX*.java"/>
|
||||||
<property name="opengl-template-pattern" value="GL*.java,ARB*.java,EXT*.java,KHR*.java,AMD*.java,APPLE*.java,ATI*.java,NV*.java,NVX*.java,HP*.java,IBM*.java,SUN*.java,SGIS*.java,GREMEDY*.java,INTEL*.java"/>
|
<property name="opengl-template-pattern" value="GL*.java,ARB*.java,EXT*.java,KHR*.java,AMD*.java,APPLE*.java,ATI*.java,NV*.java,NVX*.java,HP*.java,IBM*.java,SUN*.java,SGIS*.java,GREMEDY*.java,INTEL*.java"/>
|
||||||
<property name="opengles-template-pattern" value="GLES*.java,ARB*.java,EXT*.java,KHR*.java,AMD*.java,ANGLE*.java,APPLE*.java,ARM*.java,DMP*.java,IMG*.java,NV*.java,OES*.java,QCOM*.java,VIV*.java"/>
|
<property name="opengles-template-pattern" value="GLES*.java,ARB*.java,EXT*.java,KHR*.java,AMD*.java,ANGLE*.java,APPLE*.java,ARM*.java,DMP*.java,IMG*.java,NV*.java,OES*.java,QCOM*.java,VIV*.java"/>
|
||||||
<property name="opencl-template-pattern-extensions" value="KHR*.java,EXT*.java,APPLE*.java,AMD*.java,INTEL*.java,NV*.java"/>
|
<property name="opencl-template-pattern-extensions" value="KHR*.java,EXT*.java,APPLE*.java,AMD*.java,INTEL*.java,NV*.java"/>
|
||||||
<property name="opencl-template-pattern" value="CL*.java,${opencl-template-pattern-extensions}"/>
|
<property name="opencl-template-pattern" value="CL*.java,${opencl-template-pattern-extensions}"/>
|
||||||
|
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
<!-- Filesets used for targets -->
|
<!-- Filesets used for targets -->
|
||||||
<!-- ================================================================== -->
|
<!-- ================================================================== -->
|
||||||
|
|
||||||
<!-- Files to include in the lwjgl.jar file -->
|
<!-- Files to include in the lwjgl.jar file -->
|
||||||
<fileset id="lwjgl.fileset" dir="${lwjgl.bin}">
|
<fileset id="lwjgl.fileset" dir="${lwjgl.target.gen.classes}">
|
||||||
<patternset id="lwjgl.package.pattern">
|
<patternset id="lwjgl.package.pattern">
|
||||||
<include name="org/**/*" />
|
<include name="org/**/*" />
|
||||||
<exclude name="org/lwjgl/opengles/**"/>
|
<exclude name="org/lwjgl/opengles/**"/>
|
||||||
|
@ -41,22 +46,14 @@
|
||||||
<exclude name="org/lwjgl/examples/**" />
|
<exclude name="org/lwjgl/examples/**" />
|
||||||
</patternset>
|
</patternset>
|
||||||
</fileset>
|
</fileset>
|
||||||
<fileset id="lwjgl.fileset.dependencies" dir="${lwjgl.bin}">
|
<fileset id="lwjgl.fileset.dependencies" dir="${lwjgl.target.gen.classes}">
|
||||||
<patternset id="lwjgl.package.dependencies.pattern">
|
<patternset id="lwjgl.package.dependencies.pattern">
|
||||||
<include name="org/lwjgl/opengles/ContextAttribs*.*"/>
|
<include name="org/lwjgl/opengles/ContextAttribs*.*"/>
|
||||||
</patternset>
|
</patternset>
|
||||||
</fileset>
|
</fileset>
|
||||||
|
|
||||||
<!-- Files to include in the lwjgl_util_applet.jar file -->
|
|
||||||
<fileset id="lwjgl_util_applet.fileset" dir="${lwjgl.bin}">
|
|
||||||
<patternset id="lwjgl_util_applet.package.pattern">
|
|
||||||
<exclude name="**.*"/>
|
|
||||||
<include name="org/lwjgl/util/applet/**"/>
|
|
||||||
</patternset>
|
|
||||||
</fileset>
|
|
||||||
|
|
||||||
<!-- Files to include in the lwjgl_test.jar file -->
|
<!-- Files to include in the lwjgl_test.jar file -->
|
||||||
<fileset id="lwjgl_test.fileset" dir="${lwjgl.bin}">
|
<fileset id="lwjgl_test.fileset" dir="${lwjgl.target.gen.classes}">
|
||||||
<exclude name="**.*" />
|
<exclude name="**.*" />
|
||||||
<include name="org/lwjgl/test/**" />
|
<include name="org/lwjgl/test/**" />
|
||||||
<exclude name="org/lwjgl/test/opengles/**"/>
|
<exclude name="org/lwjgl/test/opengles/**"/>
|
||||||
|
@ -74,7 +71,7 @@
|
||||||
</fileset>
|
</fileset>
|
||||||
|
|
||||||
<!-- Files to include in the lwjgl_test.jar file for the ES build -->
|
<!-- Files to include in the lwjgl_test.jar file for the ES build -->
|
||||||
<fileset id="lwjgl_test_es.fileset" dir="${lwjgl.bin}">
|
<fileset id="lwjgl_test_es.fileset" dir="${lwjgl.target.gen.classes}">
|
||||||
<exclude name="**.*"/>
|
<exclude name="**.*"/>
|
||||||
<include name="org/lwjgl/test/**"/>
|
<include name="org/lwjgl/test/**"/>
|
||||||
<exclude name="org/lwjgl/test/opengl/**"/>
|
<exclude name="org/lwjgl/test/opengl/**"/>
|
||||||
|
@ -82,23 +79,14 @@
|
||||||
</fileset>
|
</fileset>
|
||||||
|
|
||||||
<!-- Files to include in the lwjgl_util.jar file -->
|
<!-- Files to include in the lwjgl_util.jar file -->
|
||||||
<fileset id="lwjgl_util.fileset" dir="${lwjgl.bin}">
|
<fileset id="lwjgl_util.fileset" dir="${lwjgl.target.gen.classes}">
|
||||||
<patternset id="lwjgl_util.package.pattern">
|
<patternset id="lwjgl_util.package.pattern">
|
||||||
<exclude name="**.*" />
|
<exclude name="**.*" />
|
||||||
<exclude name="org/lwjgl/util/generator/**" />
|
<exclude name="org/lwjgl/util/generator/**" />
|
||||||
<exclude name="org/lwjgl/util/applet/**" />
|
|
||||||
<include name="org/lwjgl/util/**" />
|
<include name="org/lwjgl/util/**" />
|
||||||
</patternset>
|
</patternset>
|
||||||
</fileset>
|
</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 -->
|
<!-- Files to make Javadoc from -->
|
||||||
<fileset id="lwjgl.javadoc.fileset" dir="${lwjgl.src}">
|
<fileset id="lwjgl.javadoc.fileset" dir="${lwjgl.src}">
|
||||||
<include name="**/*.java" />
|
<include name="**/*.java" />
|
||||||
|
@ -189,13 +177,6 @@
|
||||||
<include name="doc/README" />
|
<include name="doc/README" />
|
||||||
</patternset>
|
</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}/windows/lwjgl.dll" >
|
<uptodate property="lwjgl.main.built" targetfile="${lwjgl.lib}/windows/lwjgl.dll" >
|
||||||
<srcfiles dir= "${lwjgl.src.native}/common" includes="*.c*"/>
|
<srcfiles dir= "${lwjgl.src.native}/common" includes="*.c*"/>
|
||||||
<srcfiles dir= "${lwjgl.src.native}/windows" includes="*.c"/>
|
<srcfiles dir= "${lwjgl.src.native}/windows" includes="*.c"/>
|
||||||
|
|
|
@ -1,30 +1,16 @@
|
||||||
<project name="generator">
|
<project name="generator" basedir="/dev/null">
|
||||||
|
|
||||||
<import file="build-definitions.xml"/>
|
<import file="build-definitions.xml"/>
|
||||||
|
|
||||||
<!-- clean the generated files -->
|
|
||||||
<target name="clean-generated" description="Deletes the generated java source">
|
|
||||||
<delete quiet="true" failonerror="false">
|
|
||||||
<fileset dir="${lwjgl.src}/generated" includes="**"/>
|
|
||||||
</delete>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="clean-generated-native" description="Deletes the generated native source" depends="clean-generated">
|
|
||||||
<delete quiet="false" failonerror="false">
|
|
||||||
<fileset dir="${lwjgl.src.native}/generated" includes="**"/>
|
|
||||||
</delete>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- Compiles the Java generator source code -->
|
<!-- Compiles the Java generator source code -->
|
||||||
<target name="generators" description="Compiles the native method generators">
|
<target name="generators" description="Compiles the native method generators">
|
||||||
<mkdir dir="${lwjgl.src}/generated/"/>
|
<mkdir dir="${lwjgl.target.gen.java}/"/>
|
||||||
<mkdir dir="${lwjgl.src.native}/generated/openal"/>
|
<mkdir dir="${lwjgl.target.gen.native}/openal"/>
|
||||||
<mkdir dir="${lwjgl.src.native}/generated/opengl"/>
|
<mkdir dir="${lwjgl.target.gen.native}/opengl"/>
|
||||||
<mkdir dir="${lwjgl.src.native}/generated/opengles"/>
|
<mkdir dir="${lwjgl.target.gen.native}/opengles"/>
|
||||||
<mkdir dir="${lwjgl.src.native}/generated/opencl"/>
|
<mkdir dir="${lwjgl.target.gen.native}/opencl"/>
|
||||||
<mkdir dir="${lwjgl.bin}"/>
|
<mkdir dir="${lwjgl.target.gen.classes}"/>
|
||||||
|
|
||||||
<javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" source="1.8" target="1.8" includes="org/lwjgl/util/generator/**.java" taskname="generator">
|
<javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.target.gen.classes}" source="1.8" target="1.8" includes="org/lwjgl/util/generator/**.java" taskname="generator">
|
||||||
<include name="org/lwjgl/util/generator/openal/**.java"/>
|
<include name="org/lwjgl/util/generator/openal/**.java"/>
|
||||||
<include name="org/lwjgl/util/generator/opengl/**.java"/>
|
<include name="org/lwjgl/util/generator/opengl/**.java"/>
|
||||||
<include name="org/lwjgl/util/generator/opengles/**.java"/>
|
<include name="org/lwjgl/util/generator/opengles/**.java"/>
|
||||||
|
@ -33,7 +19,7 @@
|
||||||
</javac>
|
</javac>
|
||||||
|
|
||||||
<!-- Compile helper classes used by the templates -->
|
<!-- Compile helper classes used by the templates -->
|
||||||
<javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" source="1.8" target="1.8" taskname="generator">
|
<javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.target.gen.classes}" source="1.8" target="1.8" taskname="generator">
|
||||||
<include name="org/lwjgl/PointerWrapper.java"/>
|
<include name="org/lwjgl/PointerWrapper.java"/>
|
||||||
<include name="org/lwjgl/PointerBuffer.java"/>
|
<include name="org/lwjgl/PointerBuffer.java"/>
|
||||||
<!-- OpenGL -->
|
<!-- OpenGL -->
|
||||||
|
@ -69,17 +55,17 @@
|
||||||
|
|
||||||
<!-- Generate OpenAL -->
|
<!-- Generate OpenAL -->
|
||||||
<target name="generate-openal" depends="generators" description="Generates java and native source for AL">
|
<target name="generate-openal" depends="generators" description="Generates java and native source for AL">
|
||||||
<javac destdir="${lwjgl.bin}" source="1.8" target="1.8" srcdir="${lwjgl.src.templates.al}" fork="true" taskname="processor">
|
<javac destdir="${lwjgl.target.gen.classes}" source="1.8" target="1.8" srcdir="${lwjgl.src.templates.al}" fork="true" taskname="processor">
|
||||||
<compilerarg value="-proc:only"/>
|
<compilerarg value="-proc:only"/>
|
||||||
<compilerarg value="-processor"/>
|
<compilerarg value="-processor"/>
|
||||||
<compilerarg value="org.lwjgl.util.generator.GeneratorProcessor"/>
|
<compilerarg value="org.lwjgl.util.generator.GeneratorProcessor"/>
|
||||||
<compilerarg value="-cp"/>
|
<compilerarg value="-cp"/>
|
||||||
<compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
|
<compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.target.gen.classes}:${java.class.path}"/>
|
||||||
<compilerarg value="-s"/>
|
<compilerarg value="-s"/>
|
||||||
<compilerarg path="${lwjgl.src}/generated"/>
|
<compilerarg path="${lwjgl.target.gen.java}"/>
|
||||||
<compilerarg value="-d"/>
|
<compilerarg value="-d"/>
|
||||||
<compilerarg path="${lwjgl.src.native}/generated/openal"/>
|
<compilerarg path="${lwjgl.target.gen.native}/openal"/>
|
||||||
<compilerarg value="-Abinpath=${lwjgl.bin}"/>
|
<compilerarg value="-Abinpath=${lwjgl.target.gen.classes}"/>
|
||||||
<compilerarg value="-Atypemap=org.lwjgl.util.generator.openal.ALTypeMap"/>
|
<compilerarg value="-Atypemap=org.lwjgl.util.generator.openal.ALTypeMap"/>
|
||||||
<src>
|
<src>
|
||||||
<fileset dir="${lwjgl.src.templates.al}">
|
<fileset dir="${lwjgl.src.templates.al}">
|
||||||
|
@ -91,17 +77,17 @@
|
||||||
|
|
||||||
<!-- Generate OpenAL [DEBUG] -->
|
<!-- Generate OpenAL [DEBUG] -->
|
||||||
<target name="generate-openal-debug" depends="generators" description="Generates java and native source for AL">
|
<target name="generate-openal-debug" depends="generators" description="Generates java and native source for AL">
|
||||||
<javac destdir="${lwjgl.bin}" source="1.8" target="1.8" srcdir="${lwjgl.src.templates.al}" fork="true" taskname="processor">
|
<javac destdir="${lwjgl.target.gen.classes}" source="1.8" target="1.8" srcdir="${lwjgl.src.templates.al}" fork="true" taskname="processor">
|
||||||
<compilerarg value="-proc:only"/>
|
<compilerarg value="-proc:only"/>
|
||||||
<compilerarg value="-processor"/>
|
<compilerarg value="-processor"/>
|
||||||
<compilerarg value="org.lwjgl.util.generator.GeneratorProcessor"/>
|
<compilerarg value="org.lwjgl.util.generator.GeneratorProcessor"/>
|
||||||
<compilerarg value="-cp"/>
|
<compilerarg value="-cp"/>
|
||||||
<compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
|
<compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.target.gen.classes}:${java.class.path}"/>
|
||||||
<compilerarg value="-s"/>
|
<compilerarg value="-s"/>
|
||||||
<compilerarg path="${lwjgl.src}/generated"/>
|
<compilerarg path="${lwjgl.target.gen.java}"/>
|
||||||
<compilerarg value="-d"/>
|
<compilerarg value="-d"/>
|
||||||
<compilerarg path="${lwjgl.src.native}/generated/openal"/>
|
<compilerarg path="${lwjgl.target.gen.native}/openal"/>
|
||||||
<compilerarg value="-Abinpath=${lwjgl.bin}"/>
|
<compilerarg value="-Abinpath=${lwjgl.target.gen.classes}"/>
|
||||||
<compilerarg value="-Atypemap=org.lwjgl.util.generator.openal.ALTypeMap"/>
|
<compilerarg value="-Atypemap=org.lwjgl.util.generator.openal.ALTypeMap"/>
|
||||||
<compilerarg value="-Ageneratechecks"/>
|
<compilerarg value="-Ageneratechecks"/>
|
||||||
<src>
|
<src>
|
||||||
|
@ -120,17 +106,17 @@
|
||||||
|
|
||||||
<!-- Generate OpenGL -->
|
<!-- Generate OpenGL -->
|
||||||
<target name="generate-opengl" depends="generators" description="Generates java and native source for GL">
|
<target name="generate-opengl" depends="generators" description="Generates java and native source for GL">
|
||||||
<javac destdir="${lwjgl.bin}" source="1.8" target="1.8" srcdir="${lwjgl.src.templates.gl}" fork="true" taskname="processorGL">
|
<javac destdir="${lwjgl.target.gen.classes}" source="1.8" target="1.8" srcdir="${lwjgl.src.templates.gl}" fork="true" taskname="processorGL">
|
||||||
<compilerarg value="-proc:only"/>
|
<compilerarg value="-proc:only"/>
|
||||||
<compilerarg value="-processor"/>
|
<compilerarg value="-processor"/>
|
||||||
<compilerarg value="org.lwjgl.util.generator.GeneratorProcessor"/>
|
<compilerarg value="org.lwjgl.util.generator.GeneratorProcessor"/>
|
||||||
<compilerarg value="-cp"/>
|
<compilerarg value="-cp"/>
|
||||||
<compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
|
<compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.target.gen.classes}:${java.class.path}"/>
|
||||||
<compilerarg value="-s"/>
|
<compilerarg value="-s"/>
|
||||||
<compilerarg path="${lwjgl.src}/generated"/>
|
<compilerarg path="${lwjgl.target.gen.java}"/>
|
||||||
<compilerarg value="-d"/>
|
<compilerarg value="-d"/>
|
||||||
<compilerarg path="${lwjgl.src.native}/generated/opengl"/>
|
<compilerarg path="${lwjgl.target.gen.native}/opengl"/>
|
||||||
<compilerarg value="-Abinpath=${lwjgl.bin}"/>
|
<compilerarg value="-Abinpath=${lwjgl.target.gen.classes}"/>
|
||||||
<compilerarg value="-Atypemap=org.lwjgl.util.generator.opengl.GLTypeMap"/>
|
<compilerarg value="-Atypemap=org.lwjgl.util.generator.opengl.GLTypeMap"/>
|
||||||
<compilerarg value="-Acontextspecific"/>
|
<compilerarg value="-Acontextspecific"/>
|
||||||
<src>
|
<src>
|
||||||
|
@ -143,17 +129,17 @@
|
||||||
|
|
||||||
<!-- Generate OpenGL [DEBUG] -->
|
<!-- Generate OpenGL [DEBUG] -->
|
||||||
<target name="generate-opengl-debug" depends="generators" description="Generates debug java and native source for GL">
|
<target name="generate-opengl-debug" depends="generators" description="Generates debug java and native source for GL">
|
||||||
<javac destdir="${lwjgl.bin}" source="1.8" target="1.8" srcdir="${lwjgl.src.templates.gl}" fork="true" taskname="processor">
|
<javac destdir="${lwjgl.target.gen.classes}" source="1.8" target="1.8" srcdir="${lwjgl.src.templates.gl}" fork="true" taskname="processor">
|
||||||
<compilerarg value="-proc:only"/>
|
<compilerarg value="-proc:only"/>
|
||||||
<compilerarg value="-processor"/>
|
<compilerarg value="-processor"/>
|
||||||
<compilerarg value="org.lwjgl.util.generator.GeneratorProcessor"/>
|
<compilerarg value="org.lwjgl.util.generator.GeneratorProcessor"/>
|
||||||
<compilerarg value="-cp"/>
|
<compilerarg value="-cp"/>
|
||||||
<compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
|
<compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.target.gen.classes}:${java.class.path}"/>
|
||||||
<compilerarg value="-s"/>
|
<compilerarg value="-s"/>
|
||||||
<compilerarg path="${lwjgl.src}/generated"/>
|
<compilerarg path="${lwjgl.target.gen.java}"/>
|
||||||
<compilerarg value="-d"/>
|
<compilerarg value="-d"/>
|
||||||
<compilerarg path="${lwjgl.src.native}/generated/opengl"/>
|
<compilerarg path="${lwjgl.target.gen.native}/opengl"/>
|
||||||
<compilerarg value="-Abinpath=${lwjgl.bin}"/>
|
<compilerarg value="-Abinpath=${lwjgl.target.gen.classes}"/>
|
||||||
<compilerarg value="-Ageneratechecks"/>
|
<compilerarg value="-Ageneratechecks"/>
|
||||||
<compilerarg value="-Acontextspecific"/>
|
<compilerarg value="-Acontextspecific"/>
|
||||||
<compilerarg value="-Atypemap=org.lwjgl.util.generator.opengl.GLTypeMap"/>
|
<compilerarg value="-Atypemap=org.lwjgl.util.generator.opengl.GLTypeMap"/>
|
||||||
|
@ -167,14 +153,14 @@
|
||||||
|
|
||||||
<!-- Generate OpenGL references -->
|
<!-- Generate OpenGL references -->
|
||||||
<target name="generate-opengl-references" depends="generators" description="Generates java and native source for GL">
|
<target name="generate-opengl-references" depends="generators" description="Generates java and native source for GL">
|
||||||
<javac destdir="${lwjgl.bin}" source="1.8" target="1.8" srcdir="${lwjgl.src.templates.gl}" fork="true" taskname="processor">
|
<javac destdir="${lwjgl.target.gen.classes}" source="1.8" target="1.8" srcdir="${lwjgl.src.templates.gl}" fork="true" taskname="processor">
|
||||||
<compilerarg value="-proc:only"/>
|
<compilerarg value="-proc:only"/>
|
||||||
<compilerarg value="-processor"/>
|
<compilerarg value="-processor"/>
|
||||||
<compilerarg value="org.lwjgl.util.generator.opengl.GLReferencesGeneratorProcessor"/>
|
<compilerarg value="org.lwjgl.util.generator.opengl.GLReferencesGeneratorProcessor"/>
|
||||||
<compilerarg value="-cp"/>
|
<compilerarg value="-cp"/>
|
||||||
<compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
|
<compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.target.gen.classes}:${java.class.path}"/>
|
||||||
<compilerarg value="-s"/>
|
<compilerarg value="-s"/>
|
||||||
<compilerarg path="${lwjgl.src}/generated"/>
|
<compilerarg path="${lwjgl.target.gen.java}"/>
|
||||||
<src>
|
<src>
|
||||||
<fileset dir="${lwjgl.src.templates.gl}">
|
<fileset dir="${lwjgl.src.templates.gl}">
|
||||||
<include name="${opengl-template-pattern}"/>
|
<include name="${opengl-template-pattern}"/>
|
||||||
|
@ -185,14 +171,14 @@
|
||||||
|
|
||||||
<!-- Generate OpenGL context capabilities -->
|
<!-- Generate OpenGL context capabilities -->
|
||||||
<target name="generate-opengl-capabilities" depends="generators" description="Generates java and native source for GL">
|
<target name="generate-opengl-capabilities" depends="generators" description="Generates java and native source for GL">
|
||||||
<javac destdir="${lwjgl.bin}" source="1.8" target="1.8" srcdir="${lwjgl.src.templates.gl}" fork="true" taskname="processor">
|
<javac destdir="${lwjgl.target.gen.classes}" source="1.8" target="1.8" srcdir="${lwjgl.src.templates.gl}" fork="true" taskname="processor">
|
||||||
<compilerarg value="-proc:only"/>
|
<compilerarg value="-proc:only"/>
|
||||||
<compilerarg value="-processor"/>
|
<compilerarg value="-processor"/>
|
||||||
<compilerarg value="org.lwjgl.util.generator.opengl.GLGeneratorProcessor"/>
|
<compilerarg value="org.lwjgl.util.generator.opengl.GLGeneratorProcessor"/>
|
||||||
<compilerarg value="-cp"/>
|
<compilerarg value="-cp"/>
|
||||||
<compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
|
<compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.target.gen.classes}:${java.class.path}"/>
|
||||||
<compilerarg value="-s"/>
|
<compilerarg value="-s"/>
|
||||||
<compilerarg path="${lwjgl.src}/generated"/>
|
<compilerarg path="${lwjgl.target.gen.java}"/>
|
||||||
<compilerarg value="-Acontextspecific"/>
|
<compilerarg value="-Acontextspecific"/>
|
||||||
<src>
|
<src>
|
||||||
<fileset dir="${lwjgl.src.templates.gl}">
|
<fileset dir="${lwjgl.src.templates.gl}">
|
||||||
|
@ -204,14 +190,14 @@
|
||||||
|
|
||||||
<!-- Generate OpenGL context capabilities [DEBUG] -->
|
<!-- Generate OpenGL context capabilities [DEBUG] -->
|
||||||
<target name="generate-opengl-capabilities-debug" depends="generators" description="Generates debug java and native source for GL">
|
<target name="generate-opengl-capabilities-debug" depends="generators" description="Generates debug java and native source for GL">
|
||||||
<javac destdir="${lwjgl.bin}" source="1.8" target="1.8" srcdir="${lwjgl.src.templates.gl}" fork="true" taskname="processor">
|
<javac destdir="${lwjgl.target.gen.classes}" source="1.8" target="1.8" srcdir="${lwjgl.src.templates.gl}" fork="true" taskname="processor">
|
||||||
<compilerarg value="-proc:only"/>
|
<compilerarg value="-proc:only"/>
|
||||||
<compilerarg value="-processor"/>
|
<compilerarg value="-processor"/>
|
||||||
<compilerarg value="org.lwjgl.util.generator.opengl.GLGeneratorProcessor"/>
|
<compilerarg value="org.lwjgl.util.generator.opengl.GLGeneratorProcessor"/>
|
||||||
<compilerarg value="-cp"/>
|
<compilerarg value="-cp"/>
|
||||||
<compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
|
<compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.target.gen.classes}:${java.class.path}"/>
|
||||||
<compilerarg value="-s"/>
|
<compilerarg value="-s"/>
|
||||||
<compilerarg path="${lwjgl.src}/generated"/>
|
<compilerarg path="${lwjgl.target.gen.java}"/>
|
||||||
<compilerarg value="-Ageneratechecks"/>
|
<compilerarg value="-Ageneratechecks"/>
|
||||||
<compilerarg value="-Acontextspecific"/>
|
<compilerarg value="-Acontextspecific"/>
|
||||||
<src>
|
<src>
|
||||||
|
@ -230,17 +216,17 @@
|
||||||
|
|
||||||
<!-- Generate OpenGL ES -->
|
<!-- Generate OpenGL ES -->
|
||||||
<target name="generate-opengles" depends="generators" description="Generates java and native source for GL ES">
|
<target name="generate-opengles" depends="generators" description="Generates java and native source for GL ES">
|
||||||
<javac destdir="${lwjgl.bin}" source="1.8" target="1.8" srcdir="${lwjgl.src.templates.gles}" fork="true" taskname="processor">
|
<javac destdir="${lwjgl.target.gen.classes}" source="1.8" target="1.8" srcdir="${lwjgl.src.templates.gles}" fork="true" taskname="processor">
|
||||||
<compilerarg value="-proc:only"/>
|
<compilerarg value="-proc:only"/>
|
||||||
<compilerarg value="-processor"/>
|
<compilerarg value="-processor"/>
|
||||||
<compilerarg value="org.lwjgl.util.generator.GeneratorProcessor"/>
|
<compilerarg value="org.lwjgl.util.generator.GeneratorProcessor"/>
|
||||||
<compilerarg value="-cp"/>
|
<compilerarg value="-cp"/>
|
||||||
<compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
|
<compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.target.gen.classes}:${java.class.path}"/>
|
||||||
<compilerarg value="-s"/>
|
<compilerarg value="-s"/>
|
||||||
<compilerarg path="${lwjgl.src}/generated"/>
|
<compilerarg path="${lwjgl.target.gen.java}"/>
|
||||||
<compilerarg value="-d"/>
|
<compilerarg value="-d"/>
|
||||||
<compilerarg path="${lwjgl.src.native}/generated/opengles"/>
|
<compilerarg path="${lwjgl.target.gen.native}/opengles"/>
|
||||||
<compilerarg value="-Abinpath=${lwjgl.bin}"/>
|
<compilerarg value="-Abinpath=${lwjgl.target.gen.classes}"/>
|
||||||
<!--<compilerarg value="-Acontextspecific"/>-->
|
<!--<compilerarg value="-Acontextspecific"/>-->
|
||||||
<compilerarg value="-Atypemap=org.lwjgl.util.generator.opengl.GLESTypeMap"/>
|
<compilerarg value="-Atypemap=org.lwjgl.util.generator.opengl.GLESTypeMap"/>
|
||||||
<src>
|
<src>
|
||||||
|
@ -253,17 +239,17 @@
|
||||||
|
|
||||||
<!-- Generate OpenGL ES [DEBUG] -->
|
<!-- Generate OpenGL ES [DEBUG] -->
|
||||||
<target name="generate-opengles-debug" depends="generators" description="Generates debug java and native source for GL ES">
|
<target name="generate-opengles-debug" depends="generators" description="Generates debug java and native source for GL ES">
|
||||||
<javac destdir="${lwjgl.bin}" source="1.8" target="1.8" srcdir="${lwjgl.src.templates.gles}" fork="true" taskname="processor">
|
<javac destdir="${lwjgl.target.gen.classes}" source="1.8" target="1.8" srcdir="${lwjgl.src.templates.gles}" fork="true" taskname="processor">
|
||||||
<compilerarg value="-proc:only"/>
|
<compilerarg value="-proc:only"/>
|
||||||
<compilerarg value="-processor"/>
|
<compilerarg value="-processor"/>
|
||||||
<compilerarg value="org.lwjgl.util.generator.GeneratorProcessor"/>
|
<compilerarg value="org.lwjgl.util.generator.GeneratorProcessor"/>
|
||||||
<compilerarg value="-cp"/>
|
<compilerarg value="-cp"/>
|
||||||
<compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
|
<compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.target.gen.classes}:${java.class.path}"/>
|
||||||
<compilerarg value="-s"/>
|
<compilerarg value="-s"/>
|
||||||
<compilerarg path="${lwjgl.src}/generated"/>
|
<compilerarg path="${lwjgl.target.gen.java}"/>
|
||||||
<compilerarg value="-d"/>
|
<compilerarg value="-d"/>
|
||||||
<compilerarg path="${lwjgl.src.native}/generated/opengles"/>
|
<compilerarg path="${lwjgl.target.gen.native}/opengles"/>
|
||||||
<compilerarg value="-Abinpath=${lwjgl.bin}"/>
|
<compilerarg value="-Abinpath=${lwjgl.target.gen.classes}"/>
|
||||||
<compilerarg value="-Ageneratechecks"/>
|
<compilerarg value="-Ageneratechecks"/>
|
||||||
<!--<compilerarg value="-Acontextspecific"/>-->
|
<!--<compilerarg value="-Acontextspecific"/>-->
|
||||||
<compilerarg value="-Atypemap=org.lwjgl.util.generator.opengl.GLESTypeMap"/>
|
<compilerarg value="-Atypemap=org.lwjgl.util.generator.opengl.GLESTypeMap"/>
|
||||||
|
@ -277,14 +263,14 @@
|
||||||
|
|
||||||
<!-- Generate OpenGL ES context capabilities -->
|
<!-- Generate OpenGL ES context capabilities -->
|
||||||
<target name="generate-opengles-capabilities" depends="generators" description="Generates java and native source for GL ES">
|
<target name="generate-opengles-capabilities" depends="generators" description="Generates java and native source for GL ES">
|
||||||
<javac destdir="${lwjgl.bin}" source="1.8" target="1.8" srcdir="${lwjgl.src.templates.gles}" fork="true" taskname="processor">
|
<javac destdir="${lwjgl.target.gen.classes}" source="1.8" target="1.8" srcdir="${lwjgl.src.templates.gles}" fork="true" taskname="processor">
|
||||||
<compilerarg value="-proc:only"/>
|
<compilerarg value="-proc:only"/>
|
||||||
<compilerarg value="-processor"/>
|
<compilerarg value="-processor"/>
|
||||||
<compilerarg value="org.lwjgl.util.generator.opengl.GLESGeneratorProcessor"/>
|
<compilerarg value="org.lwjgl.util.generator.opengl.GLESGeneratorProcessor"/>
|
||||||
<compilerarg value="-cp"/>
|
<compilerarg value="-cp"/>
|
||||||
<compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
|
<compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.target.gen.classes}:${java.class.path}"/>
|
||||||
<compilerarg value="-s"/>
|
<compilerarg value="-s"/>
|
||||||
<compilerarg path="${lwjgl.src}/generated"/>
|
<compilerarg path="${lwjgl.target.gen.java}"/>
|
||||||
<!--<compilerarg value="-Acontextspecific"/>-->
|
<!--<compilerarg value="-Acontextspecific"/>-->
|
||||||
<src>
|
<src>
|
||||||
<fileset dir="${lwjgl.src.templates.gles}">
|
<fileset dir="${lwjgl.src.templates.gles}">
|
||||||
|
@ -296,14 +282,14 @@
|
||||||
|
|
||||||
<!-- Generate OpenGL ES context capabilities [DEBUG] -->
|
<!-- Generate OpenGL ES context capabilities [DEBUG] -->
|
||||||
<target name="generate-opengles-capabilities-debug" depends="generators" description="Generates debug java and native source for GL ES">
|
<target name="generate-opengles-capabilities-debug" depends="generators" description="Generates debug java and native source for GL ES">
|
||||||
<javac destdir="${lwjgl.bin}" source="1.8" target="1.8" srcdir="${lwjgl.src.templates.gles}" fork="true" taskname="processor">
|
<javac destdir="${lwjgl.target.gen.classes}" source="1.8" target="1.8" srcdir="${lwjgl.src.templates.gles}" fork="true" taskname="processor">
|
||||||
<compilerarg value="-proc:only"/>
|
<compilerarg value="-proc:only"/>
|
||||||
<compilerarg value="-processor"/>
|
<compilerarg value="-processor"/>
|
||||||
<compilerarg value="org.lwjgl.util.generator.opengl.GLESGeneratorProcessor"/>
|
<compilerarg value="org.lwjgl.util.generator.opengl.GLESGeneratorProcessor"/>
|
||||||
<compilerarg value="-cp"/>
|
<compilerarg value="-cp"/>
|
||||||
<compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
|
<compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.target.gen.classes}:${java.class.path}"/>
|
||||||
<compilerarg value="-s"/>
|
<compilerarg value="-s"/>
|
||||||
<compilerarg path="${lwjgl.src}/generated"/>
|
<compilerarg path="${lwjgl.target.gen.java}"/>
|
||||||
<compilerarg value="-Ageneratechecks"/>
|
<compilerarg value="-Ageneratechecks"/>
|
||||||
<!--<compilerarg value="-Acontextspecific"/>-->
|
<!--<compilerarg value="-Acontextspecific"/>-->
|
||||||
<src>
|
<src>
|
||||||
|
@ -322,17 +308,17 @@
|
||||||
|
|
||||||
<!-- Generate OpenCL -->
|
<!-- Generate OpenCL -->
|
||||||
<target name="generate-opencl" depends="generators" description="Generates java and native source for CL">
|
<target name="generate-opencl" depends="generators" description="Generates java and native source for CL">
|
||||||
<javac destdir="${lwjgl.bin}" source="1.8" target="1.8" srcdir="${lwjgl.src.templates.cl}" fork="true" taskname="processor">
|
<javac destdir="${lwjgl.target.gen.classes}" source="1.8" target="1.8" srcdir="${lwjgl.src.templates.cl}" fork="true" taskname="processor">
|
||||||
<compilerarg value="-proc:only"/>
|
<compilerarg value="-proc:only"/>
|
||||||
<compilerarg value="-processor"/>
|
<compilerarg value="-processor"/>
|
||||||
<compilerarg value="org.lwjgl.util.generator.GeneratorProcessor"/>
|
<compilerarg value="org.lwjgl.util.generator.GeneratorProcessor"/>
|
||||||
<compilerarg value="-cp"/>
|
<compilerarg value="-cp"/>
|
||||||
<compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
|
<compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.target.gen.classes}:${java.class.path}"/>
|
||||||
<compilerarg value="-s"/>
|
<compilerarg value="-s"/>
|
||||||
<compilerarg path="${lwjgl.src}/generated"/>
|
<compilerarg path="${lwjgl.target.gen.java}"/>
|
||||||
<compilerarg value="-d"/>
|
<compilerarg value="-d"/>
|
||||||
<compilerarg path="${lwjgl.src.native}/generated/opencl"/>
|
<compilerarg path="${lwjgl.target.gen.native}/opencl"/>
|
||||||
<compilerarg value="-Abinpath=${lwjgl.bin}"/>
|
<compilerarg value="-Abinpath=${lwjgl.target.gen.classes}"/>
|
||||||
<compilerarg value="-Acontextspecific"/>
|
<compilerarg value="-Acontextspecific"/>
|
||||||
<compilerarg value="-Atypemap=org.lwjgl.util.generator.opencl.CLTypeMap"/>
|
<compilerarg value="-Atypemap=org.lwjgl.util.generator.opencl.CLTypeMap"/>
|
||||||
<src>
|
<src>
|
||||||
|
@ -345,17 +331,17 @@
|
||||||
|
|
||||||
<!-- Generate OpenCL [DEBUG] -->
|
<!-- Generate OpenCL [DEBUG] -->
|
||||||
<target name="generate-opencl-debug" depends="generators" description="Generates debug java and native source for CL">
|
<target name="generate-opencl-debug" depends="generators" description="Generates debug java and native source for CL">
|
||||||
<javac destdir="${lwjgl.bin}" source="1.8" target="1.8" srcdir="${lwjgl.src.templates.cl}" fork="true" taskname="processor">
|
<javac destdir="${lwjgl.target.gen.classes}" source="1.8" target="1.8" srcdir="${lwjgl.src.templates.cl}" fork="true" taskname="processor">
|
||||||
<compilerarg value="-proc:only"/>
|
<compilerarg value="-proc:only"/>
|
||||||
<compilerarg value="-processor"/>
|
<compilerarg value="-processor"/>
|
||||||
<compilerarg value="org.lwjgl.util.generator.GeneratorProcessor"/>
|
<compilerarg value="org.lwjgl.util.generator.GeneratorProcessor"/>
|
||||||
<compilerarg value="-cp"/>
|
<compilerarg value="-cp"/>
|
||||||
<compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
|
<compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.target.gen.classes}:${java.class.path}"/>
|
||||||
<compilerarg value="-s"/>
|
<compilerarg value="-s"/>
|
||||||
<compilerarg path="${lwjgl.src}/generated"/>
|
<compilerarg path="${lwjgl.target.gen.java}"/>
|
||||||
<compilerarg value="-d"/>
|
<compilerarg value="-d"/>
|
||||||
<compilerarg path="${lwjgl.src.native}/generated/opencl"/>
|
<compilerarg path="${lwjgl.target.gen.native}/opencl"/>
|
||||||
<compilerarg value="-Abinpath=${lwjgl.bin}"/>
|
<compilerarg value="-Abinpath=${lwjgl.target.gen.classes}"/>
|
||||||
<compilerarg value="-Ageneratechecks"/>
|
<compilerarg value="-Ageneratechecks"/>
|
||||||
<compilerarg value="-Acontextspecific"/>
|
<compilerarg value="-Acontextspecific"/>
|
||||||
<compilerarg value="-Atypemap=org.lwjgl.util.generator.opencl.CLTypeMap"/>
|
<compilerarg value="-Atypemap=org.lwjgl.util.generator.opencl.CLTypeMap"/>
|
||||||
|
@ -369,14 +355,14 @@
|
||||||
|
|
||||||
<!-- Generate OpenCL capabilities -->
|
<!-- Generate OpenCL capabilities -->
|
||||||
<target name="generate-opencl-capabilities" depends="generators" description="Generates capabilities for CL">
|
<target name="generate-opencl-capabilities" depends="generators" description="Generates capabilities for CL">
|
||||||
<javac destdir="${lwjgl.bin}" source="1.8" target="1.8" srcdir="${lwjgl.src.templates.cl}" fork="true" taskname="processor">
|
<javac destdir="${lwjgl.target.gen.classes}" source="1.8" target="1.8" srcdir="${lwjgl.src.templates.cl}" fork="true" taskname="processor">
|
||||||
<compilerarg value="-proc:only"/>
|
<compilerarg value="-proc:only"/>
|
||||||
<compilerarg value="-processor"/>
|
<compilerarg value="-processor"/>
|
||||||
<compilerarg value="org.lwjgl.util.generator.opencl.CLGeneratorProcessor"/>
|
<compilerarg value="org.lwjgl.util.generator.opencl.CLGeneratorProcessor"/>
|
||||||
<compilerarg value="-cp"/>
|
<compilerarg value="-cp"/>
|
||||||
<compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
|
<compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.target.gen.classes}:${java.class.path}"/>
|
||||||
<compilerarg value="-s"/>
|
<compilerarg value="-s"/>
|
||||||
<compilerarg path="${lwjgl.src}/generated"/>
|
<compilerarg path="${lwjgl.target.gen.java}"/>
|
||||||
<compilerarg value="-Acontextspecific"/>
|
<compilerarg value="-Acontextspecific"/>
|
||||||
<src>
|
<src>
|
||||||
<fileset dir="${lwjgl.src.templates.cl}">
|
<fileset dir="${lwjgl.src.templates.cl}">
|
||||||
|
@ -388,14 +374,14 @@
|
||||||
|
|
||||||
<!-- Generate OpenCL capabilities [DEBUG] -->
|
<!-- Generate OpenCL capabilities [DEBUG] -->
|
||||||
<target name="generate-opencl-capabilities-debug" depends="generators" description="Generates debug capabilities for CL">
|
<target name="generate-opencl-capabilities-debug" depends="generators" description="Generates debug capabilities for CL">
|
||||||
<javac destdir="${lwjgl.bin}" source="1.8" target="1.8" srcdir="${lwjgl.src.templates.cl}" fork="true" taskname="processor">
|
<javac destdir="${lwjgl.target.gen.classes}" source="1.8" target="1.8" srcdir="${lwjgl.src.templates.cl}" fork="true" taskname="processor">
|
||||||
<compilerarg value="-proc:only"/>
|
<compilerarg value="-proc:only"/>
|
||||||
<compilerarg value="-processor"/>
|
<compilerarg value="-processor"/>
|
||||||
<compilerarg value="org.lwjgl.util.generator.opencl.CLGeneratorProcessor"/>
|
<compilerarg value="org.lwjgl.util.generator.opencl.CLGeneratorProcessor"/>
|
||||||
<compilerarg value="-cp"/>
|
<compilerarg value="-cp"/>
|
||||||
<compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
|
<compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.target.gen.classes}:${java.class.path}"/>
|
||||||
<compilerarg value="-s"/>
|
<compilerarg value="-s"/>
|
||||||
<compilerarg path="${lwjgl.src}/generated"/>
|
<compilerarg path="${lwjgl.target.gen.java}"/>
|
||||||
<compilerarg value="-Ageneratechecks"/>
|
<compilerarg value="-Ageneratechecks"/>
|
||||||
<compilerarg value="-Acontextspecific"/>
|
<compilerarg value="-Acontextspecific"/>
|
||||||
<src>
|
<src>
|
||||||
|
|
|
@ -1,22 +1,17 @@
|
||||||
<project name="maven">
|
<project name="maven" basedir="/dev/null">
|
||||||
<property name="lwjgl.src.java" location="${lwjgl.src}/java" />
|
|
||||||
<property name="lwjgl.src.generated" location="${lwjgl.src}/generated" />
|
|
||||||
<property name="lwjgl.maven" location="maven" />
|
<property name="lwjgl.maven" location="maven" />
|
||||||
<property name="lwjgl.dstMaven" location="${lwjgl.temp}/maven" />
|
<property name="lwjgl.dstMaven" location="${lwjgl.target.staging}/maven" />
|
||||||
<property name="lwjgl.src.java" location="${lwjgl.src}/java" />
|
<property name="lwjgl.src.java" location="${lwjgl.src}/java" />
|
||||||
<property name="jinput.version" value="2.0.5" />
|
<property name="jinput.version" value="2.0.5" />
|
||||||
|
|
||||||
<fileset id="lwjgl-sources.manual.fileset" dir="${lwjgl.src.java}">
|
<fileset id="lwjgl-sources.manual.fileset" dir="${lwjgl.src.java}">
|
||||||
<patternset refid="lwjgl.package.pattern" />
|
<patternset refid="lwjgl.package.pattern" />
|
||||||
<patternset refid="lwjgl.package.dependencies.pattern"/>
|
<patternset refid="lwjgl.package.dependencies.pattern"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
|
|
||||||
<fileset id="lwjgl-sources.generated.fileset" dir="${lwjgl.src.generated}">
|
<fileset id="lwjgl-sources.generated.fileset" dir="${lwjgl.target.gen.java}">
|
||||||
<include name="**/*" />
|
<include name="**/*" />
|
||||||
</fileset>
|
</fileset>
|
||||||
<fileset id="lwjgl_util_applet-sources.fileset" dir="${lwjgl.src.java}">
|
|
||||||
<patternset refid="lwjgl_util_applet.package.pattern" />
|
|
||||||
</fileset>
|
|
||||||
|
|
||||||
<fileset id="lwjgl_util-sources.fileset" dir="${lwjgl.src.java}">
|
<fileset id="lwjgl_util-sources.fileset" dir="${lwjgl.src.java}">
|
||||||
<patternset refid="lwjgl_util.package.pattern" />
|
<patternset refid="lwjgl_util.package.pattern" />
|
||||||
|
@ -104,11 +99,10 @@
|
||||||
|
|
||||||
<target name="-copylwjgljars">
|
<target name="-copylwjgljars">
|
||||||
<copy todir="${lwjgl.dstMaven}">
|
<copy todir="${lwjgl.dstMaven}">
|
||||||
<fileset dir="${lwjgl.temp}/jar/">
|
<fileset dir="${lwjgl.target.staging}/jar/">
|
||||||
<patternset>
|
<patternset>
|
||||||
<include name="lwjgl.jar" />
|
<include name="lwjgl.jar" />
|
||||||
<include name="lwjgl_util.jar" />
|
<include name="lwjgl_util.jar" />
|
||||||
<include name="lwjgl_util_applet.jar" />
|
|
||||||
</patternset>
|
</patternset>
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
|
@ -121,11 +115,7 @@
|
||||||
<fileset refid="lwjgl-sources.manual.fileset" />
|
<fileset refid="lwjgl-sources.manual.fileset" />
|
||||||
<fileset refid="lwjgl-sources.generated.fileset" />
|
<fileset refid="lwjgl-sources.generated.fileset" />
|
||||||
</jar>
|
</jar>
|
||||||
|
|
||||||
<jar destfile="${lwjgl.dstMaven}/lwjgl_util_applet-sources.jar" taskname="lwjgl_util_applet-sources.jar">
|
|
||||||
<fileset refid="lwjgl_util_applet-sources.fileset" />
|
|
||||||
</jar>
|
|
||||||
|
|
||||||
<jar destfile="${lwjgl.dstMaven}/lwjgl_util-sources.jar" taskname="lwjgl_util-sources.jar">
|
<jar destfile="${lwjgl.dstMaven}/lwjgl_util-sources.jar" taskname="lwjgl_util-sources.jar">
|
||||||
<fileset refid="lwjgl_util-sources.fileset" />
|
<fileset refid="lwjgl_util-sources.fileset" />
|
||||||
</jar>
|
</jar>
|
||||||
|
@ -153,18 +143,8 @@
|
||||||
<fileset dir="${lwjgl.dstMaven}/lwjgl_util-javadoc" />
|
<fileset dir="${lwjgl.dstMaven}/lwjgl_util-javadoc" />
|
||||||
</jar>
|
</jar>
|
||||||
|
|
||||||
<javadoc destdir="${lwjgl.dstMaven}/lwjgl_util_applet-javadoc" classpath="${lwjgl.lib}/jinput.jar:${lwjgl.lib}/lwjgl.jar" author="true" version="true" use="true" source="1.8" windowtitle="LWJGL UTIL API" useexternalfile="true">
|
|
||||||
<fileset refid="lwjgl_util_applet-sources.fileset"/>
|
|
||||||
<doctitle><![CDATA[<h1>Lightweight Java Game Toolkit</h1>]]></doctitle>
|
|
||||||
<bottom><![CDATA[<i>Copyright © 2002-2010 lwjgl.org. All Rights Reserved.</i>]]></bottom>
|
|
||||||
</javadoc>
|
|
||||||
<jar destfile="${lwjgl.dstMaven}/lwjgl_util_applet-javadoc.jar" taskname="lwjgl_util_applet-javadoc.jar">
|
|
||||||
<fileset dir="${lwjgl.dstMaven}/lwjgl_util_applet-javadoc" />
|
|
||||||
</jar>
|
|
||||||
|
|
||||||
<delete dir="${lwjgl.dstMaven}/lwjgl-javadoc" quiet="true" failonerror="false" taskname="cleaning maven javadoc temps lwjgl" />
|
<delete dir="${lwjgl.dstMaven}/lwjgl-javadoc" quiet="true" failonerror="false" taskname="cleaning maven javadoc temps lwjgl" />
|
||||||
<delete dir="${lwjgl.dstMaven}/lwjgl_util-javadoc" quiet="true" failonerror="false" taskname="cleaning maven javadoc temps lwjgl_util" />
|
<delete dir="${lwjgl.dstMaven}/lwjgl_util-javadoc" quiet="true" failonerror="false" taskname="cleaning maven javadoc temps lwjgl_util" />
|
||||||
<delete dir="${lwjgl.dstMaven}/lwjgl_util_applet-javadoc" quiet="true" failonerror="false" taskname="cleaning maven javadoc temps lwjgl_util_applet" />
|
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="-createmavennativejars">
|
<target name="-createmavennativejars">
|
||||||
|
@ -206,6 +186,6 @@
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="-copymaventdist">
|
<target name="-copymaventdist">
|
||||||
<zip destfile="${lwjgl.dist}/lwjgl-maven-${lwjgl.version}.zip" basedir="${lwjgl.temp}" includes="maven/**" />
|
<zip destfile="${lwjgl.target.bundle}/lwjgl-maven-${lwjgl.version}.zip" basedir="${lwjgl.target.staging}" includes="maven/**" />
|
||||||
</target>
|
</target>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -1,181 +0,0 @@
|
||||||
<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">
|
|
||||||
<input message="Please type the password for the keystore" addproperty="sign.pwd"/>
|
|
||||||
|
|
||||||
<antcall target="-webstart_demo">
|
|
||||||
<param name="keystore" value="signing/lwjgl.jks"/>
|
|
||||||
<param name="alias" value="lwjgl"/>
|
|
||||||
<param name="password" value="${sign.pwd}"/>
|
|
||||||
</antcall>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- Create webstart demo and extension from release files -->
|
|
||||||
<target name="-webstart_demo" description="Using released files, creates the necessary files used for jnlp demos">
|
|
||||||
|
|
||||||
<!-- delete existing temp -->
|
|
||||||
<delete dir="${lwjgl.temp}"/>
|
|
||||||
|
|
||||||
<!-- unzip release to temp dir -->
|
|
||||||
<unzip src="${lwjgl.dist}/lwjgl-${lwjgl.version}.zip" dest="${lwjgl.temp}/webstart/temp" overwrite="true"/>
|
|
||||||
|
|
||||||
<!-- DEMO SECTION -->
|
|
||||||
<move file="${lwjgl.temp}/webstart/temp/lwjgl-${lwjgl.version}/jar/lwjgl_test.jar" tofile="${lwjgl.temp}/webstart/lwjgl_test.jar"/>
|
|
||||||
<jar destfile="${lwjgl.temp}/webstart/lwjgl_test.jar" update="true">
|
|
||||||
<manifest>
|
|
||||||
<attribute name="Sealed" value="true"/>
|
|
||||||
</manifest>
|
|
||||||
</jar>
|
|
||||||
<jar destfile="${lwjgl.temp}/webstart/media.jar" basedir="${lwjgl.res}">
|
|
||||||
<manifest>
|
|
||||||
<attribute name="Sealed" value="true"/>
|
|
||||||
</manifest>
|
|
||||||
</jar>
|
|
||||||
|
|
||||||
<!-- EXTENSION SECTION -->
|
|
||||||
<move todir="${lwjgl.temp}/webstart/${lwjgl.version}/" flatten="true">
|
|
||||||
<fileset dir="${lwjgl.temp}/webstart/temp">
|
|
||||||
<include name="**/jinput.jar"/>
|
|
||||||
<include name="**/lwjgl*.jar"/>
|
|
||||||
<exclude name="**/lwjgl_util_applet.jar"/>
|
|
||||||
<exclude name="**/lwjgl-debug.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</move>
|
|
||||||
|
|
||||||
<jar destfile="${lwjgl.temp}/webstart/${lwjgl.version}/lwjgl.jar" update="true">
|
|
||||||
<manifest>
|
|
||||||
<attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/>
|
|
||||||
<attribute name="Specification-Version" value="${lwjgl.version}"/>
|
|
||||||
<attribute name="Specification-Vendor" value="lwjgl.org"/>
|
|
||||||
<attribute name="Implementation-Title" value="LWJGL ${lwjgl.version}"/>
|
|
||||||
<attribute name="Implementation-Version" value="${lwjgl.version}"/>
|
|
||||||
<attribute name="Implementation-Vendor" value="lwjgl.org"/>
|
|
||||||
<attribute name="Implementation-Vendor-Id" value="org.lwjgl"/>
|
|
||||||
<attribute name="Extension-Name" value="org.lwjgl"/>
|
|
||||||
<attribute name="Sealed" value="true"/>
|
|
||||||
<attribute name="Trusted-Library" value="true"/>
|
|
||||||
</manifest>
|
|
||||||
</jar>
|
|
||||||
|
|
||||||
<jar destfile="${lwjgl.temp}/webstart/${lwjgl.version}/jinput.jar" update="true">
|
|
||||||
<manifest>
|
|
||||||
<attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/>
|
|
||||||
<attribute name="Specification-Version" value="${lwjgl.version}"/>
|
|
||||||
<attribute name="Specification-Vendor" value="lwjgl.org"/>
|
|
||||||
<attribute name="Implementation-Title" value="LWJGL ${lwjgl.version}"/>
|
|
||||||
<attribute name="Implementation-Version" value="${lwjgl.version}"/>
|
|
||||||
<attribute name="Implementation-Vendor" value="lwjgl.org"/>
|
|
||||||
<attribute name="Implementation-Vendor-Id" value="org.lwjgl"/>
|
|
||||||
<attribute name="Extension-Name" value="org.lwjgl"/>
|
|
||||||
<attribute name="Sealed" value="true"/>
|
|
||||||
<attribute name="Trusted-Library" value="true"/>
|
|
||||||
</manifest>
|
|
||||||
</jar>
|
|
||||||
|
|
||||||
<jar destfile="${lwjgl.temp}/webstart/${lwjgl.version}/lwjgl_util.jar" update="true">
|
|
||||||
<manifest>
|
|
||||||
<attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/>
|
|
||||||
<attribute name="Specification-Version" value="${lwjgl.version}"/>
|
|
||||||
<attribute name="Specification-Vendor" value="lwjgl.org"/>
|
|
||||||
<attribute name="Implementation-Title" value="LWJGL ${lwjgl.version}"/>
|
|
||||||
<attribute name="Implementation-Version" value="${lwjgl.version}"/>
|
|
||||||
<attribute name="Implementation-Vendor" value="lwjgl.org"/>
|
|
||||||
<attribute name="Implementation-Vendor-Id" value="org.lwjgl"/>
|
|
||||||
<attribute name="Extension-Name" value="org.lwjgl"/>
|
|
||||||
<attribute name="Sealed" value="true"/>
|
|
||||||
<attribute name="Trusted-Library" value="true"/>
|
|
||||||
</manifest>
|
|
||||||
</jar>
|
|
||||||
|
|
||||||
<!-- create native jars -->
|
|
||||||
<jar destfile="${lwjgl.temp}/webstart/${lwjgl.version}/native_windows.jar" basedir="${lwjgl.temp}/webstart/temp/lwjgl-${lwjgl.version}/native/windows">
|
|
||||||
<manifest>
|
|
||||||
<attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/>
|
|
||||||
<attribute name="Specification-Version" value="${lwjgl.version}"/>
|
|
||||||
<attribute name="Specification-Vendor" value="lwjgl.org"/>
|
|
||||||
<attribute name="Implementation-Title" value="LWJGL ${lwjgl.version}"/>
|
|
||||||
<attribute name="Implementation-Version" value="${lwjgl.version}"/>
|
|
||||||
<attribute name="Implementation-Vendor" value="lwjgl.org"/>
|
|
||||||
<attribute name="Implementation-Vendor-Id" value="org.lwjgl"/>
|
|
||||||
<attribute name="Extension-Name" value="org.lwjgl"/>
|
|
||||||
<attribute name="Sealed" value="true"/>
|
|
||||||
<attribute name="Trusted-Library" value="true"/>
|
|
||||||
</manifest>
|
|
||||||
</jar>
|
|
||||||
|
|
||||||
<jar destfile="${lwjgl.temp}/webstart/${lwjgl.version}/native_linux.jar" basedir="${lwjgl.temp}/webstart/temp/lwjgl-${lwjgl.version}/native/linux">
|
|
||||||
<manifest>
|
|
||||||
<attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/>
|
|
||||||
<attribute name="Specification-Version" value="${lwjgl.version}"/>
|
|
||||||
<attribute name="Specification-Vendor" value="lwjgl.org"/>
|
|
||||||
<attribute name="Implementation-Title" value="LWJGL ${lwjgl.version}"/>
|
|
||||||
<attribute name="Implementation-Version" value="${lwjgl.version}"/>
|
|
||||||
<attribute name="Implementation-Vendor" value="lwjgl.org"/>
|
|
||||||
<attribute name="Implementation-Vendor-Id" value="org.lwjgl"/>
|
|
||||||
<attribute name="Extension-Name" value="org.lwjgl"/>
|
|
||||||
<attribute name="Sealed" value="true"/>
|
|
||||||
<attribute name="Trusted-Library" value="true"/>
|
|
||||||
</manifest>
|
|
||||||
</jar>
|
|
||||||
|
|
||||||
<jar destfile="${lwjgl.temp}/webstart/${lwjgl.version}/native_macosx.jar" basedir="${lwjgl.temp}/webstart/temp/lwjgl-${lwjgl.version}/native/macosx">
|
|
||||||
<manifest>
|
|
||||||
<attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/>
|
|
||||||
<attribute name="Specification-Version" value="${lwjgl.version}"/>
|
|
||||||
<attribute name="Specification-Vendor" value="lwjgl.org"/>
|
|
||||||
<attribute name="Implementation-Title" value="LWJGL ${lwjgl.version}"/>
|
|
||||||
<attribute name="Implementation-Version" value="${lwjgl.version}"/>
|
|
||||||
<attribute name="Implementation-Vendor" value="lwjgl.org"/>
|
|
||||||
<attribute name="Implementation-Vendor-Id" value="org.lwjgl"/>
|
|
||||||
<attribute name="Extension-Name" value="org.lwjgl"/>
|
|
||||||
<attribute name="Sealed" value="true"/>
|
|
||||||
<attribute name="Trusted-Library" value="true"/>
|
|
||||||
</manifest>
|
|
||||||
</jar>
|
|
||||||
|
|
||||||
<jar destfile="${lwjgl.temp}/webstart/${lwjgl.version}/native_solaris.jar" basedir="${lwjgl.temp}/webstart/temp/lwjgl-${lwjgl.version}/native/solaris">
|
|
||||||
<manifest>
|
|
||||||
<attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/>
|
|
||||||
<attribute name="Specification-Version" value="${lwjgl.version}"/>
|
|
||||||
<attribute name="Specification-Vendor" value="lwjgl.org"/>
|
|
||||||
<attribute name="Implementation-Title" value="LWJGL ${lwjgl.version}"/>
|
|
||||||
<attribute name="Implementation-Version" value="${lwjgl.version}"/>
|
|
||||||
<attribute name="Implementation-Vendor" value="lwjgl.org"/>
|
|
||||||
<attribute name="Implementation-Vendor-Id" value="org.lwjgl"/>
|
|
||||||
<attribute name="Extension-Name" value="org.lwjgl"/>
|
|
||||||
<attribute name="Sealed" value="true"/>
|
|
||||||
<attribute name="Trusted-Library" value="true"/>
|
|
||||||
</manifest>
|
|
||||||
</jar>
|
|
||||||
|
|
||||||
<!-- sign 'em -->
|
|
||||||
<signjar jar="${lwjgl.temp}/webstart/${lwjgl.version}/lwjgl.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
|
|
||||||
<signjar jar="${lwjgl.temp}/webstart/${lwjgl.version}/lwjgl_util.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
|
|
||||||
<signjar jar="${lwjgl.temp}/webstart/${lwjgl.version}/jinput.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
|
|
||||||
<signjar jar="${lwjgl.temp}/webstart/${lwjgl.version}/native_solaris.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
|
|
||||||
<signjar jar="${lwjgl.temp}/webstart/${lwjgl.version}/native_linux.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
|
|
||||||
<signjar jar="${lwjgl.temp}/webstart/${lwjgl.version}/native_macosx.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
|
|
||||||
<signjar jar="${lwjgl.temp}/webstart/${lwjgl.version}/native_windows.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
|
|
||||||
|
|
||||||
<!-- copy over extension jnlp file -->
|
|
||||||
<copy todir="${lwjgl.temp}/webstart/${lwjgl.version}">
|
|
||||||
<fileset dir="${lwjgl.web}/webstart">
|
|
||||||
<include name="extension.jnlp"/>
|
|
||||||
</fileset>
|
|
||||||
<filterset>
|
|
||||||
<filter token="LWJGL_VERSION" value="${lwjgl.version}"/>
|
|
||||||
</filterset>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<!-- nuke extracted dir -->
|
|
||||||
<delete dir="${lwjgl.temp}/webstart/temp"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
</project>
|
|
|
@ -76,9 +76,9 @@
|
||||||
<mapper type="glob" from="*.c" to="*.o"/>
|
<mapper type="glob" from="*.c" to="*.o"/>
|
||||||
<fileset dir="${native}/common" includes="*.c"/>
|
<fileset dir="${native}/common" includes="*.c"/>
|
||||||
<fileset dir="${native}/common/opengl" includes="*.c"/>
|
<fileset dir="${native}/common/opengl" includes="*.c"/>
|
||||||
<fileset dir="${native}/generated/openal" includes="*.c"/>
|
<fileset dir="${lwjgl.target.gen.native}/openal" includes="*.c"/>
|
||||||
<fileset dir="${native}/generated/opencl" includes="*.c"/>
|
<fileset dir="${lwjgl.target.gen.native}/opencl" includes="*.c"/>
|
||||||
<fileset dir="${native}/generated/opengl" includes="*.c"/>
|
<fileset dir="${lwjgl.target.gen.native}/opengl" includes="*.c"/>
|
||||||
<fileset dir="${native}/linux" includes="*.c"/>
|
<fileset dir="${native}/linux" includes="*.c"/>
|
||||||
<fileset dir="${native}/linux/opengl" includes="*.c"/>
|
<fileset dir="${native}/linux/opengl" includes="*.c"/>
|
||||||
</apply>
|
</apply>
|
||||||
|
@ -108,9 +108,9 @@
|
||||||
<mapper type="glob" from="*.c" to="*.o"/>
|
<mapper type="glob" from="*.c" to="*.o"/>
|
||||||
<fileset dir="${native}/common" includes="*.c"/>
|
<fileset dir="${native}/common" includes="*.c"/>
|
||||||
<fileset dir="${native}/common/opengl" includes="*.c"/>
|
<fileset dir="${native}/common/opengl" includes="*.c"/>
|
||||||
<fileset dir="${native}/generated/openal" includes="*.c"/>
|
<fileset dir="${lwjgl.target.gen.native}/openal" includes="*.c"/>
|
||||||
<fileset dir="${native}/generated/opencl" includes="*.c"/>
|
<fileset dir="${lwjgl.target.gen.native}/opencl" includes="*.c"/>
|
||||||
<fileset dir="${native}/generated/opengl" includes="*.c"/>
|
<fileset dir="${lwjgl.target.gen.native}/opengl" includes="*.c"/>
|
||||||
<fileset dir="${native}/linux" includes="*.c"/>
|
<fileset dir="${native}/linux" includes="*.c"/>
|
||||||
<fileset dir="${native}/linux/opengl" includes="*.c"/>
|
<fileset dir="${native}/linux/opengl" includes="*.c"/>
|
||||||
</apply>
|
</apply>
|
||||||
|
|
|
@ -77,9 +77,9 @@
|
||||||
<mapper type="glob" from="*.c" to="*.o"/>
|
<mapper type="glob" from="*.c" to="*.o"/>
|
||||||
<fileset dir="${native}/common" includes="*.c"/>
|
<fileset dir="${native}/common" includes="*.c"/>
|
||||||
<fileset dir="${native}/common/opengles" includes="*.c"/>
|
<fileset dir="${native}/common/opengles" includes="*.c"/>
|
||||||
<fileset dir="${native}/generated/openal" includes="*.c"/>
|
<fileset dir="${lwjgl.target.gen.native}/openal" includes="*.c"/>
|
||||||
<fileset dir="${native}/generated/opencl" includes="*.c"/>
|
<fileset dir="${lwjgl.target.gen.native}/opencl" includes="*.c"/>
|
||||||
<fileset dir="${native}/generated/opengles" includes="*.c"/>
|
<fileset dir="${lwjgl.target.gen.native}/opengles" includes="*.c"/>
|
||||||
<fileset dir="${native}/linux" includes="*.c"/>
|
<fileset dir="${native}/linux" includes="*.c"/>
|
||||||
<fileset dir="${native}/linux/opengles" includes="*.c"/>
|
<fileset dir="${native}/linux/opengles" includes="*.c"/>
|
||||||
</apply>
|
</apply>
|
||||||
|
@ -109,9 +109,9 @@
|
||||||
<mapper type="glob" from="*.c" to="*.o"/>
|
<mapper type="glob" from="*.c" to="*.o"/>
|
||||||
<fileset dir="${native}/common" includes="*.c"/>
|
<fileset dir="${native}/common" includes="*.c"/>
|
||||||
<fileset dir="${native}/common/opengles" includes="*.c"/>
|
<fileset dir="${native}/common/opengles" includes="*.c"/>
|
||||||
<fileset dir="${native}/generated/openal" includes="*.c"/>
|
<fileset dir="${lwjgl.target.gen.native}/openal" includes="*.c"/>
|
||||||
<fileset dir="${native}/generated/opencl" includes="*.c"/>
|
<fileset dir="${lwjgl.target.gen.native}/opencl" includes="*.c"/>
|
||||||
<fileset dir="${native}/generated/opengles" includes="*.c"/>
|
<fileset dir="${lwjgl.target.gen.native}/opengles" includes="*.c"/>
|
||||||
<fileset dir="${native}/linux" includes="*.c"/>
|
<fileset dir="${native}/linux" includes="*.c"/>
|
||||||
<fileset dir="${native}/linux/opengles" includes="*.c"/>
|
<fileset dir="${native}/linux/opengles" includes="*.c"/>
|
||||||
</apply>
|
</apply>
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
<project name="OS X Native code" basedir="../../bin/lwjgl" default="nativelibrary">
|
<project name="OS X Native code" default="nativelibrary" basedir="/dev/null">
|
||||||
<property name="native" location="../../src/native"/>
|
|
||||||
|
|
||||||
<target name="init">
|
<target name="init">
|
||||||
<mkdir dir="x86_64"/>
|
|
||||||
<property environment="env" />
|
<property environment="env" />
|
||||||
<!-- Ask Xcode for correct path to XCode tools -->
|
<!-- Ask Xcode for correct path to XCode tools -->
|
||||||
<!-- Will fail if XCode Command Line Tools are not installed on 10.7+ (Lion) -->
|
<!-- Will fail if XCode Command Line Tools are not installed on 10.7+ (Lion) -->
|
||||||
|
@ -96,27 +93,19 @@
|
||||||
</condition>
|
</condition>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="clean">
|
<target name="compile" depends="init">
|
||||||
<delete failonerror="false">
|
<mkdir dir="${dstdir}" taskname="initializing ${dstdir} folder"/>
|
||||||
<fileset dir="i386"/>
|
|
||||||
<fileset dir="x86_64"/>
|
|
||||||
<fileset dir="." includes="liblwjgl.dylib"/>
|
|
||||||
<fileset dir="." includes="lwjgl.symbols"/>
|
|
||||||
</delete>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="compile" depends="init">
|
|
||||||
<apply dir="${dstdir}" executable="${compiler}" os="Mac OS X" skipemptyfilesets="true" failonerror="true" dest="${dstdir}">
|
<apply dir="${dstdir}" executable="${compiler}" os="Mac OS X" skipemptyfilesets="true" failonerror="true" dest="${dstdir}">
|
||||||
<arg line="${cflags} -ObjC -O3 -Wall -Wunused -c -fPIC -I${javavmroot}/${jvm_headers_path_md} -I${javavmroot}/${jvm_headers_path} -I${native}/common -I${native}/common/opengl -I${native}/macosx"/>
|
<arg line="${cflags} -ObjC -O3 -Wall -Wunused -c -fPIC -I${javavmroot}/${jvm_headers_path_md} -I${javavmroot}/${jvm_headers_path} -I${lwjgl.src.native}/common -I${lwjgl.src.native}/common/opengl -I${lwjgl.src.native}/macosx"/>
|
||||||
<!-- Map from *.m and *.c to .o -->
|
<!-- Map from *.m and *.c to .o -->
|
||||||
<mapper type="regexp" from="^(.*)\.(c|m)" to="\1.o"/>
|
<mapper type="regexp" from="^(.*)\.(c|m)" to="\1.o"/>
|
||||||
<fileset dir="${native}/macosx" includes="*.m"/>
|
<fileset dir="${lwjgl.src.native}/macosx" includes="*.m"/>
|
||||||
<fileset dir="${native}/macosx" includes="*.c"/>
|
<fileset dir="${lwjgl.src.native}/macosx" includes="*.c"/>
|
||||||
<fileset dir="${native}/common" includes="*.c"/>
|
<fileset dir="${lwjgl.src.native}/common" includes="*.c"/>
|
||||||
<fileset dir="${native}/common/opengl" includes="*.c"/>
|
<fileset dir="${lwjgl.src.native}/common/opengl" includes="*.c"/>
|
||||||
<fileset dir="${native}/generated/openal" includes="*.c"/>
|
<fileset dir="${lwjgl.target.gen.native}/openal" includes="*.c"/>
|
||||||
<fileset dir="${native}/generated/opencl" includes="*.c"/>
|
<fileset dir="${lwjgl.target.gen.native}/opencl" includes="*.c"/>
|
||||||
<fileset dir="${native}/generated/opengl" includes="*.c"/>
|
<fileset dir="${lwjgl.target.gen.native}/opengl" includes="*.c"/>
|
||||||
</apply>
|
</apply>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
@ -127,13 +116,13 @@
|
||||||
<condition property="jdk_lib" value="${java.home}/../Libraries">
|
<condition property="jdk_lib" value="${java.home}/../Libraries">
|
||||||
<not><isset property="jdk_lib"/></not>
|
<not><isset property="jdk_lib"/></not>
|
||||||
</condition>
|
</condition>
|
||||||
|
|
||||||
<apply dir="${objdir}" parallel="true" executable="${compiler}" os="Mac OS X" failonerror="true" skipemptyfilesets="true">
|
<apply dir="${objdir}" parallel="true" executable="${compiler}" os="Mac OS X" failonerror="true" skipemptyfilesets="false">
|
||||||
<arg line="${linkerflags} -exported_symbols_list ../lwjgl.symbols -dynamiclib -o ${libname} -framework Foundation -weak_framework AppKit -framework Carbon -framework OpenGL -framework QuartzCore -L${jdk_lib} -ljawt -L${sdkroot}/usr/lib"/>
|
<arg line="${linkerflags} -exported_symbols_list lwjgl.symbols -dynamiclib -o ${lwjgl.target.bundle}/${libname} -framework Foundation -weak_framework AppKit -framework Carbon -framework OpenGL -framework QuartzCore -L${jdk_lib} -ljawt -L${sdkroot}/usr/lib"/>
|
||||||
<fileset dir="${objdir}" includes="*.o"/>
|
<fileset dir="${objdir}" includes="*.o"/>
|
||||||
</apply>
|
</apply>
|
||||||
<echo message="Linked library"/>
|
<echo message="Linked library"/>
|
||||||
<apply dir="${objdir}" executable="strip" os="Mac OS X" failonerror="true">
|
<apply dir="${lwjgl.target.bundle}" executable="strip" os="Mac OS X" failonerror="true" skipemptyfilesets="false">
|
||||||
<arg line="-S -X"/>
|
<arg line="-S -X"/>
|
||||||
<fileset file="${libname}"/>
|
<fileset file="${libname}"/>
|
||||||
</apply>
|
</apply>
|
||||||
|
@ -156,66 +145,65 @@
|
||||||
<target name="-build" depends="-build_universal,-build_x86_x64"/>
|
<target name="-build" depends="-build_universal,-build_x86_x64"/>
|
||||||
|
|
||||||
<target name="-build_universal" unless="build_x86_64">
|
<target name="-build_universal" unless="build_x86_64">
|
||||||
<mkdir dir="i386"/>
|
|
||||||
|
|
||||||
<property name="universal_sdkroot" location="${sdkroot}"/>
|
|
||||||
<property name="x86_64_sdkroot" location="${sdkroot}"/>
|
|
||||||
<property name="universal_flags" value="-isysroot ${universal_sdkroot}"/>
|
|
||||||
<antcall target="compile">
|
<antcall target="compile">
|
||||||
<param name="dstdir" location="i386"/>
|
<param name="dstdir" location="${lwjgl.target.gen.obj}/i386"/>
|
||||||
<param name="sdkroot" location="${universal_sdkroot}"/>
|
<param name="sdkroot" location="${sdkroot}"/>
|
||||||
<param name="cflags" value="${universal_flags} -arch i386 -mmacosx-version-min=${macos_link_ver}"/>
|
<param name="cflags" value="-isysroot ${sdkroot} -arch i386 -mmacosx-version-min=${macos_link_ver}"/>
|
||||||
</antcall>
|
</antcall>
|
||||||
<antcall target="compile">
|
<antcall target="compile">
|
||||||
<param name="dstdir" location="x86_64"/>
|
<param name="dstdir" location="${lwjgl.target.gen.obj}/x86_64"/>
|
||||||
<param name="sdkroot" location="${universal_sdkroot}"/>
|
<param name="sdkroot" location="${sdkroot}"/>
|
||||||
<param name="cflags" value="-isysroot ${x86_64_sdkroot} -arch x86_64 -mmacosx-version-min=${macos_link_ver}"/>
|
<param name="cflags" value="-isysroot ${sdkroot} -arch x86_64 -mmacosx-version-min=${macos_link_ver}"/>
|
||||||
</antcall>
|
</antcall>
|
||||||
<exec vmlauncher="true" executable="sh" output="lwjgl.symbols" failonerror="true">
|
<exec vmlauncher="true" executable="sh" output="${lwjgl.target.gen.obj}/i386/lwjgl.symbols" failonerror="true" logError="true">
|
||||||
<arg path="../../platform_build/macosx_ant/build-symbol-list"/>
|
<arg path="platform_build/macosx_ant/build-symbol-list"/>
|
||||||
<arg path="i386"/>
|
<arg path="${lwjgl.target.gen.obj}/i386"/>
|
||||||
|
</exec>
|
||||||
|
<exec vmlauncher="true" executable="sh" output="${lwjgl.target.gen.obj}/x86_64/lwjgl.symbols" failonerror="true" logError="true">
|
||||||
|
<arg path="platform_build/macosx_ant/build-symbol-list"/>
|
||||||
|
<arg path="${lwjgl.target.gen.obj}/x86_64"/>
|
||||||
</exec>
|
</exec>
|
||||||
<antcall target="link">
|
<antcall target="link">
|
||||||
<param name="objdir" location="i386"/>
|
<param name="objdir" location="${lwjgl.target.gen.obj}/i386"/>
|
||||||
<param name="libname" value="liblwjgl-i386.dylib"/>
|
<param name="libname" value="liblwjgl-i386.dylib"/>
|
||||||
<param name="linkerflags" value="${universal_flags} -arch i386 -mmacosx-version-min=${macos_link_ver}"/>
|
<param name="linkerflags" value="-isysroot ${sdkroot} -arch i386 -mmacosx-version-min=${macos_link_ver}"/>
|
||||||
</antcall>
|
</antcall>
|
||||||
<antcall target="link">
|
<antcall target="link">
|
||||||
<param name="objdir" location="x86_64"/>
|
<param name="objdir" location="${lwjgl.target.gen.obj}/x86_64"/>
|
||||||
<param name="libname" value="liblwjgl-i86_64.dylib"/>
|
<param name="libname" value="liblwjgl-x86_64.dylib"/>
|
||||||
<param name="linkerflags" value="-isysroot ${x86_64_sdkroot} -arch x86_64 -mmacosx-version-min=${macos_link_ver}"/>
|
<param name="linkerflags" value="-isysroot ${sdkroot} -arch x86_64 -mmacosx-version-min=${macos_link_ver}"/>
|
||||||
</antcall>
|
</antcall>
|
||||||
<apply dir="." parallel="true" executable="lipo" os="Mac OS X" failonerror="true" skipemptyfilesets="true">
|
<apply dir="${lwjgl.target.bundle}" parallel="true" executable="lipo" os="Mac OS X" failonerror="true" skipemptyfilesets="false">
|
||||||
<arg value="-create"/>
|
<arg value="-create"/>
|
||||||
<srcfile/>
|
<srcfile/>
|
||||||
<arg value="-output"/>
|
<arg value="-output"/>
|
||||||
<arg path="liblwjgl.dylib"/>
|
<arg path="liblwjgl.dylib"/>
|
||||||
<fileset file="i386/liblwjgl-i386.dylib"/>
|
<fileset file="liblwjgl-i386.dylib"/>
|
||||||
<fileset file="x86_64/liblwjgl-i86_64.dylib"/>
|
<fileset file="liblwjgl-x86_64.dylib"/>
|
||||||
</apply>
|
</apply>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="-build_x86_x64" if="build_x86_64">
|
<target name="-build_x86_x64" if="build_x86_64">
|
||||||
<antcall target="compile">
|
<antcall target="compile">
|
||||||
<param name="dstdir" location="x86_64"/>
|
<param name="dstdir" location="${lwjgl.target.gen.obj}/x86_64"/>
|
||||||
<param name="sdkroot" location="${sdkroot}"/>
|
<param name="sdkroot" location="${sdkroot}"/>
|
||||||
<param name="cflags" value="-isysroot ${sdkroot} -arch x86_64 -mmacosx-version-min=${macos_link_ver}"/>
|
<param name="cflags" value="-isysroot ${sdkroot} -arch x86_64 -mmacosx-version-min=${macos_link_ver}"/>
|
||||||
</antcall>
|
</antcall>
|
||||||
<exec vmlauncher="true" executable="sh" output="lwjgl.symbols" failonerror="true">
|
<exec vmlauncher="true" executable="sh" output="${lwjgl.target.gen.obj}/x86_64/lwjgl.symbols" failonerror="true" logError="true">
|
||||||
<arg path="../../platform_build/macosx_ant/build-symbol-list"/>
|
<arg path="platform_build/macosx_ant/build-symbol-list"/>
|
||||||
<arg path="x86_64"/>
|
<arg path="${lwjgl.target.gen.obj}/x86_64"/>
|
||||||
</exec>
|
</exec>
|
||||||
<antcall target="link">
|
<antcall target="link">
|
||||||
<param name="objdir" location="x86_64"/>
|
<param name="objdir" location="${lwjgl.target.gen.obj}/x86_64"/>
|
||||||
<param name="libname" value="liblwjgl-i86_64.dylib"/>
|
<param name="libname" value="liblwjgl-x86_64.dylib"/>
|
||||||
<param name="linkerflags" value="-isysroot ${sdkroot} -arch x86_64 -mmacosx-version-min=${macos_link_ver}"/>
|
<param name="linkerflags" value="-isysroot ${sdkroot} -arch x86_64 -mmacosx-version-min=${macos_link_ver}"/>
|
||||||
</antcall>
|
</antcall>
|
||||||
<apply dir="." parallel="true" executable="lipo" os="Mac OS X" failonerror="true" skipemptyfilesets="true">
|
<apply parallel="true" executable="lipo" os="Mac OS X" failonerror="true" skipemptyfilesets="false">
|
||||||
<arg value="-create"/>
|
<arg value="-create"/>
|
||||||
<srcfile/>
|
<srcfile/>
|
||||||
<arg value="-output"/>
|
<arg value="-output"/>
|
||||||
<arg path="liblwjgl.dylib"/>
|
<arg path="${lwjgl.target.bundle}/liblwjgl.dylib"/>
|
||||||
<fileset file="x86_64/liblwjgl-i86_64.dylib"/>
|
<fileset file="${lwjgl.target.bundle}/liblwjgl-x86_64.dylib"/>
|
||||||
</apply>
|
</apply>
|
||||||
</target>
|
</target>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -22,9 +22,9 @@
|
||||||
<srcfile/>
|
<srcfile/>
|
||||||
<fileset dir="${native}/windows" includes="*.c"/>
|
<fileset dir="${native}/windows" includes="*.c"/>
|
||||||
<fileset dir="${native}/common" includes="*.c"/>
|
<fileset dir="${native}/common" includes="*.c"/>
|
||||||
<fileset dir="${native}/generated/openal" includes="*.c"/>
|
<fileset dir="${lwjgl.target.gen.native}/openal" includes="*.c"/>
|
||||||
<fileset dir="${native}/generated/opencl" includes="*.c"/>
|
<fileset dir="${lwjgl.target.gen.native}/opencl" includes="*.c"/>
|
||||||
<fileset dir="${native}/generated/opengl" includes="*.c"/>
|
<fileset dir="${lwjgl.target.gen.native}/opengl" includes="*.c"/>
|
||||||
<mapper type="glob" from="*.c" to="*.o"/>
|
<mapper type="glob" from="*.c" to="*.o"/>
|
||||||
</apply>
|
</apply>
|
||||||
</target>
|
</target>
|
||||||
|
|
|
@ -18,9 +18,9 @@
|
||||||
<srcfile/>
|
<srcfile/>
|
||||||
<fileset dir="${native}/common" includes="*.c"/>
|
<fileset dir="${native}/common" includes="*.c"/>
|
||||||
<fileset dir="${native}/common/opengl" includes="*.c"/>
|
<fileset dir="${native}/common/opengl" includes="*.c"/>
|
||||||
<fileset dir="${native}/generated/openal" includes="*.c"/>
|
<fileset dir="${lwjgl.target.gen.native}/openal" includes="*.c"/>
|
||||||
<fileset dir="${native}/generated/opencl" includes="*.c"/>
|
<fileset dir="${lwjgl.target.gen.native}/opencl" includes="*.c"/>
|
||||||
<fileset dir="${native}/generated/opengl" includes="*.c"/>
|
<fileset dir="${lwjgl.target.gen.native}/opengl" includes="*.c"/>
|
||||||
<fileset dir="${native}/windows" includes="*.c"/>
|
<fileset dir="${native}/windows" includes="*.c"/>
|
||||||
<fileset dir="${native}/windows/opengl" includes="*.c"/>
|
<fileset dir="${native}/windows/opengl" includes="*.c"/>
|
||||||
<mapper type="glob" from="*.c" to="*.obj"/>
|
<mapper type="glob" from="*.c" to="*.obj"/>
|
||||||
|
|
|
@ -18,9 +18,9 @@
|
||||||
<srcfile/>
|
<srcfile/>
|
||||||
<fileset dir="${native}/common" includes="*.c"/>
|
<fileset dir="${native}/common" includes="*.c"/>
|
||||||
<fileset dir="${native}/common/opengles" includes="*.c"/>
|
<fileset dir="${native}/common/opengles" includes="*.c"/>
|
||||||
<fileset dir="${native}/generated/openal" includes="*.c"/>
|
<fileset dir="${lwjgl.target.gen.native}/openal" includes="*.c"/>
|
||||||
<fileset dir="${native}/generated/opencl" includes="*.c"/>
|
<fileset dir="${lwjgl.target.gen.native}/opencl" includes="*.c"/>
|
||||||
<fileset dir="${native}/generated/opengles" includes="*.c"/>
|
<fileset dir="${lwjgl.target.gen.native}/opengles" includes="*.c"/>
|
||||||
<fileset dir="${native}/windows" includes="*.c"/>
|
<fileset dir="${native}/windows" includes="*.c"/>
|
||||||
<fileset dir="${native}/windows/opengles" includes="*.c"/>
|
<fileset dir="${native}/windows/opengles" includes="*.c"/>
|
||||||
<mapper type="glob" from="*.c" to="*.obj"/>
|
<mapper type="glob" from="*.c" to="*.obj"/>
|
||||||
|
|
BIN
res/ILtest.bmp
Before Width: | Height: | Size: 102 B |
BIN
res/ILtest.gif
Before Width: | Height: | Size: 808 B |
BIN
res/ILtest.jpg
Before Width: | Height: | Size: 816 B |
BIN
res/ILtest.tga
Before Width: | Height: | Size: 66 B |
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 7.3 KiB |
BIN
res/ball.png
Before Width: | Height: | Size: 4.7 KiB |
BIN
res/ball_sm.png
Before Width: | Height: | Size: 1.8 KiB |
BIN
res/center.wav
BIN
res/ding.wav
BIN
res/left.wav
|
@ -1,198 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
|
|
||||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
|
|
||||||
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
|
|
||||||
<!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
|
|
||||||
]>
|
|
||||||
<svg version="1.1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="543.281" height="196.23" viewBox="0 0 543.281 196.23"
|
|
||||||
overflow="visible" enable-background="new 0 0 543.281 196.23" xml:space="preserve">
|
|
||||||
<g id="Layer_6">
|
|
||||||
</g>
|
|
||||||
<g id="Layer_2">
|
|
||||||
<path display="none" opacity="0.61" fill="#DE923A" d="M536.093,118.816c-17.196,51.267-59.783,83.217-95.122,71.367
|
|
||||||
c-35.338-11.853-50.048-63.028-32.853-114.288c17.195-51.269,59.782-83.217,95.118-71.362
|
|
||||||
C538.579,16.382,553.287,67.556,536.093,118.816z"/>
|
|
||||||
<path fill="#FFFFFF" d="M161.34,109.049c-16.054,47.862-55.868,77.672-88.928,66.585S25.565,116.751,41.617,68.897
|
|
||||||
C57.671,21.033,97.485-8.775,130.542,2.316C163.605,13.4,177.392,61.194,161.34,109.049z"/>
|
|
||||||
<path fill="#0A90CB" d="M157.985,107.256c-15.051,44.873-52.326,72.838-83.257,62.466C43.797,159.349,30.923,114.556,45.973,69.69
|
|
||||||
C61.024,24.816,98.298-3.148,129.227,7.229C160.161,17.599,173.034,62.391,157.985,107.256z"/>
|
|
||||||
<path fill="#FFFFFF" d="M180.458,94.522l-48-11.5c-2.02-0.532-5.155,0.337-6.955,1.197l10.151-37.832
|
|
||||||
c0.936-3.473,0.061-7.84-1.75-10.831c-1.811-2.991-7.549-10.722-9.737-13.622s-3.939-3.61-6.528-3.738l-36.7-2.094
|
|
||||||
c-4.949-0.335-10.023,3.617-11.332,8.826L59.458,65.647L27.873,58.02c-3.792-1.016-7.688,1.436-8.702,5.473L8.962,104.105
|
|
||||||
c-1.016,4.038,1.007,8.071,4.622,9.792l142.5,76.584c4.75,2.5,9.169,1.462,10.667-4.501l19.305-77.485
|
|
||||||
C187.554,102.535,185.318,95.803,180.458,94.522z"/>
|
|
||||||
<g>
|
|
||||||
<path d="M103.521,133.708c-1.006,4.003-4.428,6.12-7.644,4.728l-32.025-13.862c-3.216-1.393-5.109-5.359-4.229-8.861l8.855-35.227
|
|
||||||
c0.88-3.501,4.303-5.621,7.646-4.732l33.288,8.838c3.342,0.888,5.236,4.853,4.229,8.854L103.521,133.708z"/>
|
|
||||||
<g>
|
|
||||||
<path d="M163.445,159.116c-1.16,4.615-5.048,7.144-8.683,5.648l-35.622-16.062c-3.635-1.495-5.744-6.04-4.71-10.156
|
|
||||||
l10.566-42.111c1.034-4.113,4.922-6.645,8.685-5.653l37.468,9.87c3.762,0.99,5.873,5.535,4.713,10.149L163.445,159.116z"/>
|
|
||||||
<path d="M50.911,111.844c-0.853,3.394-3.563,5.166-6.052,3.96L19.9,104.265c-2.49-1.208-3.918-4.532-3.19-7.427l7.481-29.591
|
|
||||||
c0.728-2.894,3.438-4.67,6.054-3.967l26.056,7.002c2.616,0.702,4.045,4.024,3.192,7.418L50.911,111.844z"/>
|
|
||||||
<path d="M108.224,68.855c-0.968,3.849-4.276,6.375-7.39,5.639L69.829,67.17c-3.113-0.736-4.955-4.045-4.113-7.393L74.181,26.1
|
|
||||||
c0.842-3.348,4.151-5.875,7.391-5.644l32.269,2.3c3.24,0.23,5.082,3.538,4.116,7.386L108.224,68.855z"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<line display="none" fill="#0092D2" x1="0" y1="108.564" x2="194.333" y2="196.23"/>
|
|
||||||
<line display="none" fill="none" x1="214" y1="119.23" x2="21.667" y2="68.563"/>
|
|
||||||
</g>
|
|
||||||
<g id="Layer_4">
|
|
||||||
<polygon points="227.728,31.353 243.953,31.353 216.963,112.878 244.745,112.878 241.184,122.614 197.334,122.614 "/>
|
|
||||||
<polygon points="255.668,31.432 250.207,122.614 265.404,122.614 280.838,98.157 282.342,122.614 299.281,122.614 340.123,31.432
|
|
||||||
322.79,31.59 294.373,95.188 293.186,76.706 278.226,76.904 267.185,94.357 270.984,31.432 "/>
|
|
||||||
<path fill="#0B0B0B" d="M323.62,88.421h16.978c0,0-4.097,12.703-5.462,17.096c-1.365,4.394,1.028,7.599,3.72,7.599
|
|
||||||
c2.692,0,6.253-1.107,8.786-7.599c2.533-6.49,24.458-74.165,24.458-74.165l18.006,0.08c0,0-21.938,66.379-24.773,74.243
|
|
||||||
c-5.225,14.484-13.852,17.889-30.117,17.889c-12.822,0-20.026-10.058-16.621-20.223C321.166,95.664,323.62,88.421,323.62,88.421z"
|
|
||||||
/>
|
|
||||||
<path fill="#0B0B0B" d="M444.126,64.358c0,0,2.643-7.251,4.274-13.455c2.612-9.934-0.95-20.263-19.313-20.263
|
|
||||||
c-20.658,0-32.452,11.833-42.9,45.116c-11.267,35.894-2.968,47.57,11.16,47.57c8.074,0,11.636-2.612,11.636-2.612l-0.554,2.059
|
|
||||||
h16.463l13.772-41.951h-24.299l-3.603,9.418l7.639-0.157c0,0-1.543,6.016-2.73,9.419s-4.314,13.297-12.704,13.297
|
|
||||||
c-7.123,0-4.749-17.255,1.267-36.845c8.331-27.134,14.996-35.262,21.964-35.262c6.49,0,5.818,4.907,4.631,9.023
|
|
||||||
c-1.617,5.603-4.749,14.563-4.749,14.563L444.126,64.358z"/>
|
|
||||||
<polygon fill="#0B0B0B" points="483.069,31.432 465.498,31.59 435.459,122.733 487.343,122.614 490.667,112.878 457.662,112.878
|
|
||||||
"/>
|
|
||||||
</g>
|
|
||||||
<g id="Layer_3">
|
|
||||||
<g>
|
|
||||||
<path d="M192.785,136.61h3.132l-3.727,11.92h5.634l-0.859,2.74h-8.767L192.785,136.61z"/>
|
|
||||||
<path d="M198.663,151.27l3.33-10.637h3.111l-3.308,10.637H198.663z M204.099,139.242c-0.914,0-1.508-0.652-1.388-1.632
|
|
||||||
c0.139-1.131,1.125-1.892,2.147-1.892c0.979,0,1.597,0.631,1.475,1.631c-0.147,1.196-1.146,1.893-2.212,1.893H204.099z"/>
|
|
||||||
<path d="M204.942,152.75c0.544,0.348,1.798,0.587,2.712,0.587c1.566,0,2.805-0.696,3.523-2.828l0.286-0.913h-0.043
|
|
||||||
c-0.96,1.088-1.979,1.588-3.24,1.588c-2.11,0-3.183-1.719-2.948-3.807c0.408-3.502,3.359-6.982,7.992-6.982
|
|
||||||
c1.501,0,2.771,0.283,3.847,0.74l-2.687,8.766c-0.61,1.957-1.433,3.697-2.82,4.72c-1.265,0.914-2.845,1.196-4.259,1.196
|
|
||||||
c-1.436,0-2.708-0.261-3.397-0.674L204.942,152.75z M213.45,142.983c-0.226-0.108-0.672-0.196-1.107-0.196
|
|
||||||
c-1.893,0-3.5,2.11-3.746,4.111c-0.134,1.088,0.249,1.871,1.206,1.871c1.022,0,2.187-1.153,2.754-2.937L213.45,142.983z"/>
|
|
||||||
<path d="M216.565,151.27l4.833-15.443h3.132l-1.955,6.178h0.043c1.012-0.979,2.199-1.61,3.591-1.61
|
|
||||||
c1.653,0,2.547,1.045,2.323,2.872c-0.062,0.5-0.25,1.326-0.431,1.914l-1.901,6.09h-3.132l1.825-5.829
|
|
||||||
c0.138-0.413,0.237-0.87,0.291-1.306c0.088-0.718-0.133-1.218-0.917-1.218c-1.109,0-2.384,1.349-3.038,3.48l-1.534,4.872H216.565z
|
|
||||||
"/>
|
|
||||||
<path d="M236.475,137.762l-0.896,2.871h2.284l-0.772,2.393h-2.262l-1.159,3.59c-0.141,0.435-0.294,0.979-0.34,1.348
|
|
||||||
c-0.064,0.522,0.108,0.893,0.804,0.893c0.261,0,0.587,0,0.854-0.044l-0.65,2.458c-0.432,0.152-1.226,0.239-1.878,0.239
|
|
||||||
c-1.893,0-2.667-0.957-2.501-2.306c0.069-0.565,0.207-1.152,0.479-1.958l1.323-4.22h-1.349l0.729-2.393h1.37l0.638-2.001
|
|
||||||
L236.475,137.762z"/>
|
|
||||||
<path d="M241.952,140.633l-0.534,4.524c-0.125,1.196-0.292,2.197-0.501,3.372h0.044c0.508-1.132,1.118-2.197,1.684-3.263
|
|
||||||
l2.679-4.634h2.545l-0.289,4.481c-0.09,1.262-0.172,2.283-0.376,3.415h0.065c0.493-1.175,0.99-2.219,1.578-3.459l2.373-4.438
|
|
||||||
h3.154l-6.484,10.637h-2.937l0.149-3.697c0.049-1.109,0.175-2.132,0.33-3.394h-0.065c-0.75,1.501-1.085,2.284-1.66,3.241
|
|
||||||
l-2.278,3.85h-2.937l0.306-10.637H241.952z"/>
|
|
||||||
<path d="M261.516,150.661c-1.317,0.631-2.889,0.849-4.063,0.849c-3.045,0-4.4-1.719-4.059-4.503
|
|
||||||
c0.398-3.24,3.162-6.612,7.012-6.612c2.154,0,3.549,1.219,3.306,3.198c-0.332,2.696-3.084,3.676-7.334,3.566
|
|
||||||
c-0.038,0.305,0.013,0.783,0.193,1.088c0.346,0.544,1.029,0.826,1.943,0.826c1.153,0,2.164-0.261,3.063-0.674L261.516,150.661z
|
|
||||||
M260.777,143.57c0.064-0.521-0.326-0.892-1.043-0.892c-1.458,0-2.434,1.218-2.771,2.197c2.434,0.021,3.692-0.305,3.812-1.283
|
|
||||||
L260.777,143.57z"/>
|
|
||||||
<path d="M263.442,151.27l3.329-10.637h3.111l-3.308,10.637H263.442z M268.879,139.242c-0.914,0-1.508-0.652-1.388-1.632
|
|
||||||
c0.139-1.131,1.124-1.892,2.146-1.892c0.979,0,1.598,0.631,1.475,1.631c-0.147,1.196-1.146,1.893-2.212,1.893H268.879z"/>
|
|
||||||
<path d="M269.721,152.75c0.545,0.348,1.799,0.587,2.712,0.587c1.566,0,2.805-0.696,3.523-2.828l0.286-0.913H276.2
|
|
||||||
c-0.96,1.088-1.979,1.588-3.241,1.588c-2.11,0-3.182-1.719-2.948-3.807c0.409-3.502,3.359-6.982,7.993-6.982
|
|
||||||
c1.501,0,2.771,0.283,3.846,0.74l-2.686,8.766c-0.61,1.957-1.434,3.697-2.82,4.72c-1.266,0.914-2.845,1.196-4.259,1.196
|
|
||||||
c-1.436,0-2.709-0.261-3.397-0.674L269.721,152.75z M278.23,142.983c-0.226-0.108-0.672-0.196-1.107-0.196
|
|
||||||
c-1.892,0-3.5,2.11-3.746,4.111c-0.133,1.088,0.249,1.871,1.206,1.871c1.022,0,2.187-1.153,2.754-2.937L278.23,142.983z"/>
|
|
||||||
<path d="M281.345,151.27l4.833-15.443h3.133l-1.955,6.178h0.043c1.013-0.979,2.199-1.61,3.592-1.61
|
|
||||||
c1.653,0,2.547,1.045,2.323,2.872c-0.062,0.5-0.25,1.326-0.432,1.914l-1.9,6.09h-3.133l1.825-5.829
|
|
||||||
c0.138-0.413,0.237-0.87,0.291-1.306c0.088-0.718-0.133-1.218-0.916-1.218c-1.109,0-2.385,1.349-3.038,3.48l-1.533,4.872H281.345z
|
|
||||||
"/>
|
|
||||||
<path d="M301.254,137.762l-0.896,2.871h2.284l-0.772,2.393h-2.262l-1.159,3.59c-0.141,0.435-0.294,0.979-0.34,1.348
|
|
||||||
c-0.063,0.522,0.108,0.893,0.805,0.893c0.261,0,0.587,0,0.854-0.044l-0.65,2.458c-0.432,0.152-1.226,0.239-1.878,0.239
|
|
||||||
c-1.893,0-2.667-0.957-2.501-2.306c0.069-0.565,0.206-1.152,0.479-1.958l1.323-4.22h-1.349l0.729-2.393h1.37l0.638-2.001
|
|
||||||
L301.254,137.762z"/>
|
|
||||||
<path d="M312.664,136.61h3.133l-3.038,9.679c-1.175,3.72-2.946,5.221-6.275,5.221c-0.913,0-1.917-0.152-2.371-0.348l0.938-2.676
|
|
||||||
c0.438,0.152,1.012,0.261,1.708,0.261c1.37,0,2.323-0.674,3.004-2.849L312.664,136.61z"/>
|
|
||||||
<path d="M320.891,151.27c0.097-0.609,0.253-1.349,0.39-2.11h-0.044c-1.217,1.763-2.659,2.35-3.899,2.35
|
|
||||||
c-1.914,0-3.037-1.479-2.765-3.697c0.44-3.589,3.304-7.418,8.524-7.418c1.283,0,2.603,0.239,3.438,0.522l-1.75,5.568
|
|
||||||
c-0.43,1.37-0.903,3.458-1.023,4.785H320.891z M322.773,142.852c-0.233-0.043-0.489-0.087-0.815-0.087
|
|
||||||
c-2.023,0-3.807,2.479-4.05,4.459c-0.129,1.044,0.196,1.762,1.066,1.762c0.936,0,2.263-1.065,3.063-3.676L322.773,142.852z"/>
|
|
||||||
<path d="M331.268,140.633l-0.071,4.655c-0.052,1.305-0.042,2.109-0.072,2.893h0.064c0.377-0.761,0.802-1.565,1.55-2.871
|
|
||||||
l2.706-4.677h3.502l-7.224,10.637h-3.197l-0.478-10.637H331.268z"/>
|
|
||||||
<path d="M343.84,151.27c0.097-0.609,0.253-1.349,0.39-2.11h-0.044c-1.217,1.763-2.659,2.35-3.899,2.35
|
|
||||||
c-1.914,0-3.038-1.479-2.766-3.697c0.441-3.589,3.305-7.418,8.525-7.418c1.283,0,2.603,0.239,3.438,0.522l-1.749,5.568
|
|
||||||
c-0.43,1.37-0.904,3.458-1.023,4.785H343.84z M345.722,142.852c-0.233-0.043-0.489-0.087-0.815-0.087
|
|
||||||
c-2.023,0-3.807,2.479-4.05,4.459c-0.129,1.044,0.196,1.762,1.066,1.762c0.936,0,2.263-1.065,3.063-3.676L345.722,142.852z"/>
|
|
||||||
<path d="M365.175,150.596c-1.155,0.369-2.995,0.826-4.844,0.826c-2.001,0-3.612-0.522-4.675-1.609
|
|
||||||
c-1.05-1.022-1.523-2.654-1.294-4.524c0.337-2.741,1.737-5.111,3.804-6.699c1.821-1.37,4.199-2.132,6.744-2.132
|
|
||||||
c1.893,0,3.261,0.37,3.792,0.652l-1.262,2.654c-0.615-0.305-1.73-0.609-3.036-0.609c-1.457,0-2.791,0.413-3.863,1.175
|
|
||||||
c-1.407,1-2.469,2.74-2.715,4.741c-0.302,2.458,1.004,3.698,3.31,3.698c0.739,0,1.253-0.109,1.642-0.262l0.967-3.088h-2.284
|
|
||||||
l0.808-2.502h5.329L365.175,150.596z"/>
|
|
||||||
<path d="M374.62,151.27c0.097-0.609,0.253-1.349,0.39-2.11h-0.043c-1.217,1.763-2.66,2.35-3.899,2.35
|
|
||||||
c-1.915,0-3.038-1.479-2.766-3.697c0.44-3.589,3.304-7.418,8.524-7.418c1.283,0,2.603,0.239,3.438,0.522l-1.75,5.568
|
|
||||||
c-0.43,1.37-0.903,3.458-1.022,4.785H374.62z M376.502,142.852c-0.234-0.043-0.49-0.087-0.816-0.087
|
|
||||||
c-2.022,0-3.807,2.479-4.05,4.459c-0.128,1.044,0.197,1.762,1.067,1.762c0.936,0,2.263-1.065,3.062-3.676L376.502,142.852z"/>
|
|
||||||
<path d="M379.645,151.27l2.208-7.178c0.427-1.349,0.721-2.502,0.969-3.459h2.697l-0.409,1.74h0.043
|
|
||||||
c1.147-1.37,2.506-1.979,3.876-1.979c1.697,0,2.303,1.088,2.275,2.023c1.125-1.37,2.532-2.023,3.925-2.023
|
|
||||||
c1.631,0,2.457,1.066,2.235,2.872c-0.053,0.435-0.244,1.283-0.398,1.826l-1.911,6.178h-3.046l1.779-5.808
|
|
||||||
c0.138-0.413,0.26-0.87,0.311-1.283c0.091-0.739-0.172-1.262-0.89-1.262c-1.044,0-2.26,1.393-2.938,3.546l-1.481,4.807h-3.024
|
|
||||||
l1.828-5.851c0.116-0.414,0.232-0.827,0.277-1.196c0.091-0.74-0.079-1.306-0.84-1.306c-1.066,0-2.357,1.479-2.983,3.567
|
|
||||||
l-1.479,4.785H379.645z"/>
|
|
||||||
<path d="M406.693,150.661c-1.317,0.631-2.889,0.849-4.063,0.849c-3.045,0-4.4-1.719-4.059-4.503
|
|
||||||
c0.398-3.24,3.162-6.612,7.012-6.612c2.154,0,3.549,1.219,3.306,3.198c-0.331,2.696-3.083,3.676-7.334,3.566
|
|
||||||
c-0.037,0.305,0.013,0.783,0.193,1.088c0.346,0.544,1.029,0.826,1.943,0.826c1.152,0,2.163-0.261,3.063-0.674L406.693,150.661z
|
|
||||||
M405.955,143.57c0.063-0.521-0.326-0.892-1.044-0.892c-1.457,0-2.434,1.218-2.771,2.197c2.434,0.021,3.692-0.305,3.813-1.283
|
|
||||||
L405.955,143.57z"/>
|
|
||||||
<path d="M417.337,136.61h3.133l-3.727,11.92h5.634l-0.858,2.74h-8.767L417.337,136.61z"/>
|
|
||||||
<path d="M423.215,151.27l3.329-10.637h3.111l-3.308,10.637H423.215z M428.652,139.242c-0.914,0-1.508-0.652-1.388-1.632
|
|
||||||
c0.139-1.131,1.124-1.892,2.146-1.892c0.979,0,1.598,0.631,1.475,1.631c-0.146,1.196-1.146,1.893-2.212,1.893H428.652z"/>
|
|
||||||
<path d="M436.924,135.827l-2.01,6.091h0.043c0.898-0.936,2.167-1.523,3.473-1.523c2.219,0,2.995,1.827,2.763,3.72
|
|
||||||
c-0.423,3.437-3.171,7.396-7.957,7.396c-2.523,0-3.651-1.088-3.419-2.979c0.08-0.653,0.27-1.306,0.478-1.937l3.476-10.767H436.924
|
|
||||||
z M433.38,146.79c-0.107,0.348-0.221,0.739-0.253,1.174c-0.071,0.762,0.313,1.175,1.053,1.175c1.827,0,3.42-2.522,3.647-4.372
|
|
||||||
c0.128-1.044-0.211-1.827-1.168-1.827c-1.131,0-2.38,1.132-2.977,2.98L433.38,146.79z"/>
|
|
||||||
<path d="M441.183,151.27l1.996-6.329c0.48-1.61,0.852-3.394,1.072-4.308h2.698c-0.132,0.718-0.285,1.436-0.466,2.197h0.087
|
|
||||||
c0.916-1.436,2.213-2.437,3.671-2.437c0.218,0,0.41,0.022,0.585,0.022l-0.986,3.066c-0.128-0.021-0.302-0.021-0.476-0.021
|
|
||||||
c-1.979,0-3.153,1.762-3.801,3.85l-1.227,3.959H441.183z"/>
|
|
||||||
<path d="M456.084,151.27c0.097-0.609,0.253-1.349,0.39-2.11h-0.043c-1.218,1.763-2.66,2.35-3.9,2.35
|
|
||||||
c-1.914,0-3.037-1.479-2.765-3.697c0.44-3.589,3.304-7.418,8.524-7.418c1.283,0,2.603,0.239,3.438,0.522l-1.75,5.568
|
|
||||||
c-0.43,1.37-0.903,3.458-1.023,4.785H456.084z M457.966,142.852c-0.233-0.043-0.489-0.087-0.815-0.087
|
|
||||||
c-2.023,0-3.807,2.479-4.05,4.459c-0.128,1.044,0.196,1.762,1.066,1.762c0.936,0,2.264-1.065,3.063-3.676L457.966,142.852z"/>
|
|
||||||
<path d="M461.087,151.27l1.995-6.329c0.48-1.61,0.853-3.394,1.073-4.308h2.697c-0.132,0.718-0.285,1.436-0.466,2.197h0.087
|
|
||||||
c0.916-1.436,2.214-2.437,3.672-2.437c0.217,0,0.41,0.022,0.584,0.022l-0.985,3.066c-0.128-0.021-0.302-0.021-0.476-0.021
|
|
||||||
c-1.98,0-3.153,1.762-3.802,3.85l-1.226,3.959H461.087z"/>
|
|
||||||
<path d="M474.815,140.633l0.083,4.634c0.017,1.109,0.031,1.87,0.035,2.545h0.044c0.319-0.653,0.645-1.349,1.242-2.502l2.511-4.677
|
|
||||||
h3.307l-4.744,7.635c-1.762,2.828-3.261,4.764-4.838,6.091c-1.385,1.175-2.928,1.696-3.637,1.805l-0.368-2.675
|
|
||||||
c0.52-0.152,1.247-0.413,1.91-0.849c0.779-0.5,1.466-1.131,1.967-1.849c0.106-0.152,0.122-0.283,0.105-0.5l-0.902-9.658H474.815z"
|
|
||||||
/>
|
|
||||||
</g>
|
|
||||||
<g display="none">
|
|
||||||
<path display="inline" d="M261.5,171.218l11.574-34.969h14.483c2.508,0,4.354,0.29,5.537,0.871
|
|
||||||
c1.183,0.581,2.099,1.575,2.746,2.982s0.863,2.986,0.648,4.735c-0.178,1.447-0.65,2.92-1.418,4.414
|
|
||||||
c-0.768,1.496-1.656,2.729-2.667,3.699c-1.011,0.97-2.004,1.701-2.979,2.194s-2,0.859-3.069,1.098
|
|
||||||
c-2.29,0.524-4.57,0.787-6.843,0.787h-8.687l-4.696,14.188H261.5z M272.139,153.062h7.648c2.968,0,5.186-0.321,6.653-0.966
|
|
||||||
c1.468-0.644,2.702-1.626,3.701-2.947c0.999-1.32,1.59-2.721,1.771-4.201c0.141-1.145,0.035-2.08-0.317-2.805
|
|
||||||
c-0.354-0.724-0.911-1.257-1.673-1.6c-0.763-0.342-2.287-0.513-4.574-0.513h-8.896L272.139,153.062z"/>
|
|
||||||
<path display="inline" d="M295.298,161.598c0.607-4.943,2.554-9.037,5.84-12.28c2.711-2.671,5.999-4.006,9.865-4.006
|
|
||||||
c3.03,0,5.354,0.954,6.975,2.862c1.62,1.907,2.23,4.482,1.833,7.725c-0.357,2.91-1.273,5.616-2.749,8.12s-3.372,4.424-5.689,5.759
|
|
||||||
c-2.318,1.336-4.669,2.003-7.052,2.003c-1.957,0-3.685-0.421-5.183-1.264s-2.575-2.035-3.229-3.577
|
|
||||||
C295.253,165.398,295.05,163.618,295.298,161.598z M299.632,161.168c-0.293,2.383,0.053,4.19,1.037,5.422s2.352,1.847,4.103,1.847
|
|
||||||
c0.915,0,1.845-0.187,2.789-0.56s1.85-0.941,2.717-1.705c0.866-0.762,1.632-1.632,2.295-2.609
|
|
||||||
c0.664-0.977,1.231-2.029,1.701-3.158c0.682-1.572,1.112-3.082,1.29-4.527c0.28-2.288-0.073-4.063-1.062-5.326
|
|
||||||
c-0.988-1.264-2.35-1.896-4.084-1.896c-1.341,0-2.603,0.321-3.785,0.966c-1.184,0.643-2.297,1.584-3.339,2.824
|
|
||||||
c-1.044,1.238-1.875,2.681-2.495,4.325S299.791,159.881,299.632,161.168z"/>
|
|
||||||
<path display="inline" d="M325.079,171.218l0.487-25.344h4.125l-0.293,11.395l-0.315,6.391c-0.04,0.478-0.108,1.435-0.207,2.871
|
|
||||||
c0.68-1.612,1.239-2.853,1.68-3.718s1.123-2.101,2.048-3.706l7.588-13.232h4.656l-0.74,12.681c-0.115,1.925-0.349,4.489-0.7,7.694
|
|
||||||
c1.066-2.124,2.718-5.082,4.953-8.872l6.815-11.503h4.313l-15.44,25.344h-4.438l0.9-14.858c0.043-0.922,0.209-2.719,0.498-5.392
|
|
||||||
c-0.865,1.694-1.855,3.528-2.971,5.505l-8.459,14.745H325.079z"/>
|
|
||||||
<path display="inline" d="M374.843,162.625l4.112,0.438c-0.855,2.075-2.475,4.047-4.858,5.915
|
|
||||||
c-2.385,1.869-5.069,2.804-8.053,2.804c-1.863,0-3.52-0.434-4.968-1.3c-1.449-0.865-2.479-2.126-3.088-3.779
|
|
||||||
c-0.61-1.653-0.785-3.537-0.526-5.651c0.34-2.767,1.305-5.448,2.895-8.048c1.591-2.6,3.474-4.531,5.65-5.795
|
|
||||||
c2.176-1.264,4.44-1.896,6.793-1.896c3,0,5.28,0.938,6.842,2.815c1.563,1.876,2.145,4.436,1.746,7.68
|
|
||||||
c-0.152,1.241-0.42,2.514-0.801,3.817h-18.512c-0.123,0.493-0.209,0.938-0.258,1.335c-0.291,2.366,0.027,4.173,0.955,5.42
|
|
||||||
s2.173,1.87,3.735,1.87c1.467,0,2.97-0.482,4.509-1.448C372.555,165.836,373.832,164.444,374.843,162.625z M363.165,156.343
|
|
||||||
h14.103c0.07-0.446,0.118-0.767,0.142-0.958c0.267-2.171-0.065-3.836-0.996-4.993s-2.24-1.736-3.928-1.736
|
|
||||||
c-1.83,0-3.576,0.639-5.239,1.916C365.582,151.849,364.221,153.773,363.165,156.343z"/>
|
|
||||||
<path display="inline" d="M382.333,171.218l8.362-25.344h3.814l-1.712,5.185c1.541-1.955,2.987-3.402,4.342-4.34
|
|
||||||
c1.354-0.938,2.677-1.407,3.971-1.407c0.853,0,1.863,0.313,3.033,0.938l-2.242,4c-0.676-0.542-1.455-0.813-2.338-0.813
|
|
||||||
c-1.499,0-3.144,0.845-4.934,2.532c-1.789,1.688-3.407,4.721-4.853,9.098l-3.374,10.151H382.333z"/>
|
|
||||||
<path display="inline" d="M417.95,162.625l4.111,0.438c-0.854,2.075-2.475,4.047-4.858,5.915
|
|
||||||
c-2.385,1.869-5.069,2.804-8.053,2.804c-1.863,0-3.52-0.434-4.968-1.3c-1.448-0.865-2.478-2.126-3.088-3.779
|
|
||||||
s-0.785-3.537-0.525-5.651c0.34-2.767,1.304-5.448,2.895-8.048c1.59-2.6,3.474-4.531,5.649-5.795s4.44-1.896,6.794-1.896
|
|
||||||
c2.999,0,5.28,0.938,6.842,2.815c1.562,1.876,2.144,4.436,1.745,7.68c-0.152,1.241-0.419,2.514-0.801,3.817h-18.512
|
|
||||||
c-0.123,0.493-0.209,0.938-0.258,1.335c-0.29,2.366,0.027,4.173,0.956,5.42c0.928,1.247,2.173,1.87,3.734,1.87
|
|
||||||
c1.468,0,2.971-0.482,4.509-1.448C415.661,165.836,416.937,164.444,417.95,162.625z M406.27,156.343h14.104
|
|
||||||
c0.07-0.446,0.117-0.767,0.141-0.958c0.267-2.171-0.065-3.836-0.996-4.993s-2.24-1.736-3.928-1.736
|
|
||||||
c-1.83,0-3.576,0.639-5.239,1.916C408.687,151.849,407.327,153.773,406.27,156.343z"/>
|
|
||||||
<path display="inline" d="M442.803,167.545c-2.794,2.824-5.524,4.235-8.192,4.235c-2.384,0-4.261-0.886-5.629-2.659
|
|
||||||
c-1.369-1.771-1.847-4.344-1.433-7.714c0.379-3.084,1.352-5.901,2.92-8.453s3.374-4.463,5.417-5.735
|
|
||||||
c2.042-1.271,4.011-1.907,5.905-1.907c3.126,0,5.299,1.521,6.521,4.563l4.514-13.625h4.25l-11.544,34.969h-3.938L442.803,167.545z
|
|
||||||
M431.899,160.594c-0.217,1.763-0.213,3.152,0.01,4.168c0.224,1.018,0.713,1.863,1.468,2.537c0.755,0.676,1.718,1.013,2.889,1.013
|
|
||||||
c1.944,0,3.832-1.016,5.663-3.047c2.45-2.697,3.919-6.029,4.406-9.997c0.246-2.004-0.083-3.57-0.988-4.699
|
|
||||||
s-2.148-1.694-3.729-1.694c-1.028,0-1.993,0.23-2.896,0.69c-0.902,0.461-1.837,1.243-2.803,2.347
|
|
||||||
c-0.966,1.104-1.838,2.505-2.615,4.204C432.525,157.815,432.057,159.308,431.899,160.594z"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 18 KiB |
|
@ -1,141 +0,0 @@
|
||||||
/* XPM */
|
|
||||||
static char * lwjgl_logo_2a_xpm[] = {
|
|
||||||
"16 16 122 2",
|
|
||||||
" c #000000",
|
|
||||||
". c #010101",
|
|
||||||
"+ c #020202",
|
|
||||||
"@ c #030303",
|
|
||||||
"# c #0A0A0A",
|
|
||||||
"$ c #0C0C0C",
|
|
||||||
"% c #0E0E0E",
|
|
||||||
"& c #171717",
|
|
||||||
"* c #1B1B1B",
|
|
||||||
"= c #1D1D1D",
|
|
||||||
"- c #1F1F1F",
|
|
||||||
"; c #222222",
|
|
||||||
"> c #232323",
|
|
||||||
", c #2B2B2B",
|
|
||||||
"' c #2D2D2D",
|
|
||||||
") c #333333",
|
|
||||||
"! c #3D3D3D",
|
|
||||||
"~ c #404040",
|
|
||||||
"{ c #434343",
|
|
||||||
"] c #4A4A4A",
|
|
||||||
"^ c #4F4F4F",
|
|
||||||
"/ c #525252",
|
|
||||||
"( c #565656",
|
|
||||||
"_ c #585858",
|
|
||||||
": c #595959",
|
|
||||||
"< c #5C5C5C",
|
|
||||||
"[ c #5E5E5E",
|
|
||||||
"} c #5F5F5F",
|
|
||||||
"| c #666666",
|
|
||||||
"1 c #686868",
|
|
||||||
"2 c #6C6C6C",
|
|
||||||
"3 c #6D6D6D",
|
|
||||||
"4 c #397CB5",
|
|
||||||
"5 c #3A7DB5",
|
|
||||||
"6 c #3D7FB6",
|
|
||||||
"7 c #3E80B6",
|
|
||||||
"8 c #747474",
|
|
||||||
"9 c #787878",
|
|
||||||
"0 c #4886BA",
|
|
||||||
"a c #4C89BC",
|
|
||||||
"b c #4D89BC",
|
|
||||||
"c c #508BBD",
|
|
||||||
"d c #508CBD",
|
|
||||||
"e c #76828D",
|
|
||||||
"f c #548EBF",
|
|
||||||
"g c #5690C0",
|
|
||||||
"h c #848484",
|
|
||||||
"i c #5B92C1",
|
|
||||||
"j c #7D8D9B",
|
|
||||||
"k c #6096C3",
|
|
||||||
"l c #8C8C8C",
|
|
||||||
"m c #8D8F91",
|
|
||||||
"n c #669AC5",
|
|
||||||
"o c #919191",
|
|
||||||
"p c #6D9EC8",
|
|
||||||
"q c #8499AA",
|
|
||||||
"r c #959595",
|
|
||||||
"s c #71A1CA",
|
|
||||||
"t c #74A4CB",
|
|
||||||
"u c #9B9B9B",
|
|
||||||
"v c #77A5CC",
|
|
||||||
"w c #9C9EA0",
|
|
||||||
"x c #7CA8CE",
|
|
||||||
"y c #7EA9CE",
|
|
||||||
"z c #A1A1A1",
|
|
||||||
"A c #81ABCE",
|
|
||||||
"B c #82ACD0",
|
|
||||||
"C c #84ADD0",
|
|
||||||
"D c #A5A5A5",
|
|
||||||
"E c #A6A6A7",
|
|
||||||
"F c #86AFD2",
|
|
||||||
"G c #87B0D2",
|
|
||||||
"H c #A8A8A8",
|
|
||||||
"I c #8CB3D4",
|
|
||||||
"J c #8DB4D4",
|
|
||||||
"K c #91B6D5",
|
|
||||||
"L c #94B7D5",
|
|
||||||
"M c #97BAD8",
|
|
||||||
"N c #9EBFDA",
|
|
||||||
"O c #A2C1DC",
|
|
||||||
"P c #BCBCBC",
|
|
||||||
"Q c #BDBDBD",
|
|
||||||
"R c #BFBFBF",
|
|
||||||
"S c #C0C0C0",
|
|
||||||
"T c #B0C5D6",
|
|
||||||
"U c #C6C6C6",
|
|
||||||
"V c #CCCCCC",
|
|
||||||
"W c #CFCFCF",
|
|
||||||
"X c #D0D0D0",
|
|
||||||
"Y c #C2D7E8",
|
|
||||||
"Z c #D3D3D3",
|
|
||||||
"` c #C4D8E9",
|
|
||||||
" . c #D4D4D4",
|
|
||||||
".. c #C6D9E9",
|
|
||||||
"+. c #D6D6D6",
|
|
||||||
"@. c #D0E0ED",
|
|
||||||
"#. c #DADEE1",
|
|
||||||
"$. c #D2E1EE",
|
|
||||||
"%. c #DFDFDF",
|
|
||||||
"&. c #E4E4E4",
|
|
||||||
"*. c #DAE7F1",
|
|
||||||
"=. c #E5E5E5",
|
|
||||||
"-. c #E6E6E6",
|
|
||||||
";. c #E0EAF3",
|
|
||||||
">. c #E2ECF4",
|
|
||||||
",. c #E4EDF5",
|
|
||||||
"'. c #E7EFF6",
|
|
||||||
"). c #EEEEEE",
|
|
||||||
"!. c #E8F0F6",
|
|
||||||
"~. c #EFEFEF",
|
|
||||||
"{. c #EBF2F8",
|
|
||||||
"]. c #EDF3F8",
|
|
||||||
"^. c #F2F2F2",
|
|
||||||
"/. c #F5F5F5",
|
|
||||||
"(. c #F6F6F6",
|
|
||||||
"_. c #F4F8FB",
|
|
||||||
":. c #FBFBFB",
|
|
||||||
"<. c #FAFCFD",
|
|
||||||
"[. c #FCFDFE",
|
|
||||||
"}. c #FEFEFE",
|
|
||||||
"|. c #FEFFFF",
|
|
||||||
"1. c #FFFFFF",
|
|
||||||
"1.1.1.1.1.1.|.Y t c f F '.1.1.1.",
|
|
||||||
"1.1.1.1.1./.m e j q L 5 0 *.1.1.",
|
|
||||||
"1.1.1.1._.w &.C 5 i [.1.",
|
|
||||||
"1.1.1.1.K } ; 1.!.4 5 ` 1.",
|
|
||||||
"1.1.1...A = | 1.@.5 5 J 1.",
|
|
||||||
"^.D %.O T # H 1.M 5 5 s 1.",
|
|
||||||
"z . > V X D h < ~.1.k 5 5 p 1.",
|
|
||||||
"[ W - @ , 2 U <.N v a x 1.",
|
|
||||||
"* & +.. / =.! 1 E #.1.",
|
|
||||||
"8 % : r o u + { ",
|
|
||||||
"1.).l R ( Z _ ) ",
|
|
||||||
"1.1.[.1.S ~ + * :.& 9 ",
|
|
||||||
"1.1.$.y ;.1. .3 h Z Q ",
|
|
||||||
"1.1.}.n 6 B ,.1.1.=.' $ (.",
|
|
||||||
"1.1.1.>.b 5 7 G '.1.}.P ^ @ ] 1.",
|
|
||||||
"1.1.1.1.{.I g d v ].1.1.1.%.-.1."};
|
|
|
@ -1,275 +0,0 @@
|
||||||
/* XPM */
|
|
||||||
static char * lwjgl_32x32_xpm[] = {
|
|
||||||
"32 32 240 2",
|
|
||||||
" c #FFFFFF",
|
|
||||||
". c #FAFCFD",
|
|
||||||
"+ c #CBDDEC",
|
|
||||||
"@ c #93B7D6",
|
|
||||||
"# c #6FA0C9",
|
|
||||||
"$ c #5C93C2",
|
|
||||||
"% c #6096C3",
|
|
||||||
"& c #7AA7CD",
|
|
||||||
"* c #ACC8E0",
|
|
||||||
"= c #EDF3F8",
|
|
||||||
"- c #FCFDFE",
|
|
||||||
"; c #B5CEE3",
|
|
||||||
"> c #5A92C1",
|
|
||||||
", c #3A7DB5",
|
|
||||||
"' c #4585B9",
|
|
||||||
") c #A1C1DC",
|
|
||||||
"! c #FCFCFC",
|
|
||||||
"~ c #E2EAF1",
|
|
||||||
"{ c #B8CFE3",
|
|
||||||
"] c #AEC9E0",
|
|
||||||
"^ c #A3C2DC",
|
|
||||||
"/ c #98BAD8",
|
|
||||||
"( c #8CB3D3",
|
|
||||||
"_ c #81ACCF",
|
|
||||||
": c #6E9FC8",
|
|
||||||
"< c #3D7FB6",
|
|
||||||
"[ c #72A2CA",
|
|
||||||
"} c #F5F8FB",
|
|
||||||
"| c #D8D8D8",
|
|
||||||
"1 c #313131",
|
|
||||||
"2 c #242424",
|
|
||||||
"3 c #404040",
|
|
||||||
"4 c #525252",
|
|
||||||
"5 c #656565",
|
|
||||||
"6 c #747474",
|
|
||||||
"7 c #8F8F8F",
|
|
||||||
"8 c #F7F8F8",
|
|
||||||
"9 c #ACC8DF",
|
|
||||||
"0 c #3B7DB5",
|
|
||||||
"a c #79A7CD",
|
|
||||||
"b c #FEFEFE",
|
|
||||||
"c c #686868",
|
|
||||||
"d c #000000",
|
|
||||||
"e c #B6B6B6",
|
|
||||||
"f c #86AED1",
|
|
||||||
"g c #AECAE1",
|
|
||||||
"h c #D3E2EE",
|
|
||||||
"i c #E1EAF2",
|
|
||||||
"j c #282828",
|
|
||||||
"k c #020202",
|
|
||||||
"l c #DEDEDE",
|
|
||||||
"m c #5B92C1",
|
|
||||||
"n c #4886BA",
|
|
||||||
"o c #F4F8FB",
|
|
||||||
"p c #ECF3F8",
|
|
||||||
"q c #6499C5",
|
|
||||||
"r c #D7D9DB",
|
|
||||||
"s c #050505",
|
|
||||||
"t c #C0D5E7",
|
|
||||||
"u c #397CB5",
|
|
||||||
"v c #ABC8E0",
|
|
||||||
"w c #FEFFFF",
|
|
||||||
"x c #78A6CC",
|
|
||||||
"y c #7BA7CD",
|
|
||||||
"z c #9E9E9E",
|
|
||||||
"A c #E2ECF4",
|
|
||||||
"B c #377BB4",
|
|
||||||
"C c #669AC5",
|
|
||||||
"D c #C3D7E8",
|
|
||||||
"E c #397DB5",
|
|
||||||
"F c #B2CCE1",
|
|
||||||
"G c #585858",
|
|
||||||
"H c #A9A9A9",
|
|
||||||
"I c #BCD2E5",
|
|
||||||
"J c #4081B7",
|
|
||||||
"K c #EEF4F9",
|
|
||||||
"L c #DDE5ED",
|
|
||||||
"M c #1C1C1C",
|
|
||||||
"N c #070707",
|
|
||||||
"O c #E7E7E7",
|
|
||||||
"P c #85AED1",
|
|
||||||
"Q c #CCDEEC",
|
|
||||||
"R c #BAD2E5",
|
|
||||||
"S c #5790BF",
|
|
||||||
"T c #D0D1D1",
|
|
||||||
"U c #030303",
|
|
||||||
"V c #333333",
|
|
||||||
"W c #FDFDFD",
|
|
||||||
"X c #FBFCFD",
|
|
||||||
"Y c #508BBD",
|
|
||||||
"Z c #B1CCE2",
|
|
||||||
"` c #CACACA",
|
|
||||||
" . c #373737",
|
|
||||||
".. c #616161",
|
|
||||||
"+. c #A2A2A2",
|
|
||||||
"@. c #DDDDDD",
|
|
||||||
"#. c #E4ECF3",
|
|
||||||
"$. c #B1CBE1",
|
|
||||||
"%. c #B4CDE2",
|
|
||||||
"&. c #E6E6E6",
|
|
||||||
"*. c #232323",
|
|
||||||
"=. c #727272",
|
|
||||||
"-. c #D8E5F0",
|
|
||||||
";. c #A0C0DB",
|
|
||||||
">. c #666666",
|
|
||||||
",. c #060606",
|
|
||||||
"'. c #272727",
|
|
||||||
"). c #D4D4D4",
|
|
||||||
"!. c #F6F6F6",
|
|
||||||
"~. c #D0D0D0",
|
|
||||||
"{. c #979797",
|
|
||||||
"]. c #5E5E5E",
|
|
||||||
"^. c #040404",
|
|
||||||
"/. c #C0C0C0",
|
|
||||||
"(. c #A2C1DB",
|
|
||||||
"_. c #9EBFDA",
|
|
||||||
":. c #FBFBFB",
|
|
||||||
"<. c #252525",
|
|
||||||
"[. c #5C5C5C",
|
|
||||||
"}. c #EAEAEA",
|
|
||||||
"|. c #B5B5B5",
|
|
||||||
"1. c #E9E9E9",
|
|
||||||
"2. c #B2B2B2",
|
|
||||||
"3. c #BDBDBD",
|
|
||||||
"4. c #6B9DC7",
|
|
||||||
"5. c #DBDBDB",
|
|
||||||
"6. c #838383",
|
|
||||||
"7. c #5F5F5F",
|
|
||||||
"8. c #0B0B0B",
|
|
||||||
"9. c #767676",
|
|
||||||
"0. c #B7B7B7",
|
|
||||||
"a. c #F0F0F0",
|
|
||||||
"b. c #F0F5F9",
|
|
||||||
"c. c #4B88BB",
|
|
||||||
"d. c #B2CCE2",
|
|
||||||
"e. c #9A9A9A",
|
|
||||||
"f. c #C5C5C5",
|
|
||||||
"g. c #F7F7F7",
|
|
||||||
"h. c #1D1D1D",
|
|
||||||
"i. c #3C3C3C",
|
|
||||||
"j. c #DFDFDF",
|
|
||||||
"k. c #F3F7FA",
|
|
||||||
"l. c #CCDDEB",
|
|
||||||
"m. c #9EBEDA",
|
|
||||||
"n. c #72A1C9",
|
|
||||||
"o. c #4C89BB",
|
|
||||||
"p. c #C9DCEB",
|
|
||||||
"q. c #565656",
|
|
||||||
"r. c #0F0F0F",
|
|
||||||
"s. c #F9F9F9",
|
|
||||||
"t. c #D1D1D1",
|
|
||||||
"u. c #8E8E8E",
|
|
||||||
"v. c #848484",
|
|
||||||
"w. c #707070",
|
|
||||||
"x. c #B0B0B0",
|
|
||||||
"y. c #F9FBFC",
|
|
||||||
"z. c #DCE8F2",
|
|
||||||
"A. c #F6F9FC",
|
|
||||||
"B. c #151515",
|
|
||||||
"C. c #4E4E4E",
|
|
||||||
"D. c #919191",
|
|
||||||
"E. c #BBBBBB",
|
|
||||||
"F. c #2F2F2F",
|
|
||||||
"G. c #393939",
|
|
||||||
"H. c #909090",
|
|
||||||
"I. c #4D4D4D",
|
|
||||||
"J. c #101010",
|
|
||||||
"K. c #5A5A5A",
|
|
||||||
"L. c #090909",
|
|
||||||
"M. c #323232",
|
|
||||||
"N. c #B1B1B1",
|
|
||||||
"O. c #A1A1A1",
|
|
||||||
"P. c #353535",
|
|
||||||
"Q. c #F5F5F5",
|
|
||||||
"R. c #131313",
|
|
||||||
"S. c #454545",
|
|
||||||
"T. c #F8F8F8",
|
|
||||||
"U. c #2B2B2B",
|
|
||||||
"V. c #BEBEBE",
|
|
||||||
"W. c #505050",
|
|
||||||
"X. c #C2C2C2",
|
|
||||||
"Y. c #868686",
|
|
||||||
"Z. c #D2D2D2",
|
|
||||||
"`. c #010101",
|
|
||||||
" + c #434343",
|
|
||||||
".+ c #DCDCDC",
|
|
||||||
"++ c #E0E0E0",
|
|
||||||
"@+ c #959595",
|
|
||||||
"#+ c #C8C8C8",
|
|
||||||
"$+ c #888888",
|
|
||||||
"%+ c #292929",
|
|
||||||
"&+ c #181818",
|
|
||||||
"*+ c #4A4A4A",
|
|
||||||
"=+ c #CFCFCF",
|
|
||||||
"-+ c #F1F6FA",
|
|
||||||
";+ c #4B4B4B",
|
|
||||||
">+ c #86AFD1",
|
|
||||||
",+ c #90B5D5",
|
|
||||||
"'+ c #EAF1F7",
|
|
||||||
")+ c #787878",
|
|
||||||
"!+ c #1B1B1B",
|
|
||||||
"~+ c #969696",
|
|
||||||
"{+ c #C6C6C6",
|
|
||||||
"]+ c #C3D8E9",
|
|
||||||
"^+ c #4383B8",
|
|
||||||
"/+ c #94B8D6",
|
|
||||||
"(+ c #F4F4F4",
|
|
||||||
"_+ c #A7A7A7",
|
|
||||||
":+ c #858585",
|
|
||||||
"<+ c #9D9D9D",
|
|
||||||
"[+ c #FAFBFD",
|
|
||||||
"}+ c #5D94C2",
|
|
||||||
"|+ c #4685B9",
|
|
||||||
"1+ c #98BBD8",
|
|
||||||
"2+ c #EFF4F9",
|
|
||||||
"3+ c #9B9B9B",
|
|
||||||
"4+ c #C5D9E9",
|
|
||||||
"5+ c #3B7EB6",
|
|
||||||
"6+ c #F2F6FA",
|
|
||||||
"7+ c #2C2C2C",
|
|
||||||
"8+ c #8FB5D5",
|
|
||||||
"9+ c #4A87BB",
|
|
||||||
"0+ c #FAFAFA",
|
|
||||||
"a+ c #6E6E6E",
|
|
||||||
"b+ c #85AFD1",
|
|
||||||
"c+ c #4D89BC",
|
|
||||||
"d+ c #A8C5DE",
|
|
||||||
"e+ c #0E0E0E",
|
|
||||||
"f+ c #B8B8B8",
|
|
||||||
"g+ c #FEFEFF",
|
|
||||||
"h+ c #B1CBE2",
|
|
||||||
"i+ c #4C89BC",
|
|
||||||
"j+ c #BFD4E7",
|
|
||||||
"k+ c #ECECEC",
|
|
||||||
"l+ c #939393",
|
|
||||||
"m+ c #81ACD0",
|
|
||||||
"n+ c #6599C5",
|
|
||||||
"o+ c #6197C4",
|
|
||||||
"p+ c #6C9EC8",
|
|
||||||
"q+ c #F7FAFC",
|
|
||||||
" . + @ # $ % & * = ",
|
|
||||||
" - ; > , , , , , , , ' ) - ",
|
|
||||||
" ! ~ { ] ^ / ( _ : < , , , [ } ",
|
|
||||||
" | 1 2 1 3 4 5 6 7 8 9 0 , , , a - ",
|
|
||||||
" b c d d d d d d d d e b f , , , , g ",
|
|
||||||
" h i j d d d d d d d k l } m , , , n o ",
|
|
||||||
" p q r s d d d d d d d 2 b t u , , , v ",
|
|
||||||
" w x y z d d d d d d d d 5 A B , , , C ",
|
|
||||||
" D E F G d d d d d d d d H I , , , , J K ",
|
|
||||||
" . > < L M d d d d d d d N O P , , , , E Q ",
|
|
||||||
" b R , S T U d d d d d d d V W X Y , , , , E Z ",
|
|
||||||
" ` ...+.@.#.$.%.&.*.d d d d d d d =. -., , , , , , ;. ",
|
|
||||||
" >.d d d ,.'.>.). !.~.{.].'.^.d U /. (., , , , , , _. ",
|
|
||||||
":.<.d d d d d d [. }.7 |.1.W O 2.3.b 4., , , , , , ) ",
|
|
||||||
"5.U d d d d d d 6. 7.d d 8. .9.0.a. b.c.< u , , , , d. ",
|
|
||||||
"e.d d d d d d d f.g.h.d d d d d d N i.j. X - k.l.m.n.o., p. ",
|
|
||||||
"q.d d d d d d r.s.t.U d d d d d d d d u. s.v.w.x.}. y.z.A. ",
|
|
||||||
"B.d d d d d d C. D.d d d d d d d d d E. z d d d ^.F.w.x.&.b ",
|
|
||||||
"G.d d d d d d H. I.d d d d d d d d J.a. K.d d d d d d d L.M.N.",
|
|
||||||
"!.O.P.k d d k t.Q.R.d d d d d d d d S.b T.h.d d d d d d d d d U.",
|
|
||||||
" ! V.W.s <.s.X.d d d d d d d d d Y. Z.`.d d d d d d d d d +",
|
|
||||||
" b .+++ @+d d d d d d d d `.#+ u.d d d d d d d d d d $+",
|
|
||||||
" j.%+d d d d d d d &+Q. *+d d d d d d d d d d =+",
|
|
||||||
" -+ s.|.;+,.d d d d 4 T.J.d d d d d d d d d M T.",
|
|
||||||
" >+,+'+ 5.)+!+d d ~+ {+d d d d d d d d d d K. ",
|
|
||||||
" ]+, ^+/+= (+_+:+(+ Y.d d d d d d d d d d <+ ",
|
|
||||||
" [+}+, , |+1+2+ 3+d d d d d d d d d s @. ",
|
|
||||||
" 4+5+, , , n m.6+ :.u.<.`.d d d d d d 7+! ",
|
|
||||||
" 8+, , , , , 9+^ k. 0+x.S.^.d d d d a+ ",
|
|
||||||
" - b+, , , , , , c+d+A. b Z.c e+d `.f+ ",
|
|
||||||
" g+h+i+E , , , , , c+j+ k+l+3+W ",
|
|
||||||
" k.; m+n+o+p+8+4+q+ "};
|
|
BIN
res/phero.mp3
BIN
res/phero2.ogg
|
@ -1,11 +0,0 @@
|
||||||
The following files are included in the resource archive:
|
|
||||||
Footsteps.wav - from openal.org cvs
|
|
||||||
ding.wav - from openal.org cvs
|
|
||||||
left.wav - sampled by matzon
|
|
||||||
right.wav - sampled by matzon
|
|
||||||
center.wav - sampled by matzon
|
|
||||||
|
|
||||||
optional:
|
|
||||||
Missing_you.mod - Missing You, by Doh (Nicolas Desessart, http://doh.av7.net)
|
|
||||||
phero.mp3 - snipped from unreleased Phero track
|
|
||||||
phero2.ogg - snipped from unreleased Phero track
|
|
BIN
res/right.wav
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 935 B |
Before Width: | Height: | Size: 3.8 KiB |
|
@ -1,104 +0,0 @@
|
||||||
package org.lwjgl.examples.spaceinvaders;
|
|
||||||
|
|
||||||
|
|
||||||
import java.applet.Applet;
|
|
||||||
import java.awt.BorderLayout;
|
|
||||||
import java.awt.Canvas;
|
|
||||||
import org.lwjgl.LWJGLException;
|
|
||||||
import org.lwjgl.opengl.Display;
|
|
||||||
|
|
||||||
public class GameApplet extends Applet {
|
|
||||||
|
|
||||||
/** The Canvas where the LWJGL Display is added */
|
|
||||||
Canvas display_parent;
|
|
||||||
|
|
||||||
/** Thread which runs the main game loop */
|
|
||||||
Thread gameThread;
|
|
||||||
|
|
||||||
/** The Game instance */
|
|
||||||
Game game;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Once the Canvas is created its add notify method will call this method to
|
|
||||||
* start the LWJGL Display and game loop in another thread.
|
|
||||||
*/
|
|
||||||
public void startLWJGL() {
|
|
||||||
gameThread = new Thread() {
|
|
||||||
public void run() {
|
|
||||||
|
|
||||||
try {
|
|
||||||
Display.setParent(display_parent);
|
|
||||||
|
|
||||||
} catch (LWJGLException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
// start game
|
|
||||||
game = new Game(false);
|
|
||||||
game.execute();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
gameThread.start();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Tell game loop to stop running, after which the LWJGL Display will be destoryed.
|
|
||||||
* The main thread will wait for the Display.destroy() to complete
|
|
||||||
*/
|
|
||||||
private void stopLWJGL() {
|
|
||||||
Game.gameRunning = false;
|
|
||||||
try {
|
|
||||||
gameThread.join();
|
|
||||||
} catch (InterruptedException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void start() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void stop() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Applet Destroy method will remove the canvas, before canvas is destroyed it will notify
|
|
||||||
* stopLWJGL() to stop main game loop and to destroy the Display
|
|
||||||
*/
|
|
||||||
public void destroy() {
|
|
||||||
remove(display_parent);
|
|
||||||
super.destroy();
|
|
||||||
System.out.println("Clear up");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* initialise applet by adding a canvas to it, this canvas will start the LWJGL Display and game loop
|
|
||||||
* in another thread. It will also stop the game loop and destroy the display on canvas removal when
|
|
||||||
* applet is destroyed.
|
|
||||||
*/
|
|
||||||
public void init() {
|
|
||||||
setLayout(new BorderLayout());
|
|
||||||
try {
|
|
||||||
display_parent = new Canvas() {
|
|
||||||
public void addNotify() {
|
|
||||||
super.addNotify();
|
|
||||||
startLWJGL();
|
|
||||||
}
|
|
||||||
public void removeNotify() {
|
|
||||||
stopLWJGL();
|
|
||||||
super.removeNotify();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
display_parent.setSize(getWidth(),getHeight());
|
|
||||||
add(display_parent);
|
|
||||||
display_parent.setFocusable(true);
|
|
||||||
display_parent.requestFocus();
|
|
||||||
display_parent.setIgnoreRepaint(true);
|
|
||||||
setVisible(true);
|
|
||||||
} catch (Exception e) {
|
|
||||||
System.err.println(e);
|
|
||||||
throw new RuntimeException("Unable to create display");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -33,7 +33,6 @@ package org.lwjgl.opengl;
|
||||||
|
|
||||||
import java.awt.Canvas;
|
import java.awt.Canvas;
|
||||||
import java.awt.Component;
|
import java.awt.Component;
|
||||||
import java.applet.Applet;
|
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.security.AccessController;
|
import java.security.AccessController;
|
||||||
import java.security.PrivilegedActionException;
|
import java.security.PrivilegedActionException;
|
||||||
|
|
|
@ -56,7 +56,7 @@ public class NativeTest {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
// try to "load" awt - work around for headless issue on linux
|
// try to "load" awt - work around for headless issue on linux
|
||||||
Toolkit.getDefaultToolkit();
|
Toolkit.getDefaultToolkit();
|
||||||
new NativeTest().invokeSys();
|
new NativeTest().invokeSys();
|
||||||
System.out.println("OK");
|
System.out.println("OK");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,72 +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.test.applet;
|
|
||||||
|
|
||||||
import java.applet.Applet;
|
|
||||||
import java.awt.BorderLayout;
|
|
||||||
import java.awt.Canvas;
|
|
||||||
|
|
||||||
public class AppletLoaderTest extends Applet {
|
|
||||||
|
|
||||||
Test test;
|
|
||||||
|
|
||||||
public void destroy() {
|
|
||||||
super.destroy();
|
|
||||||
System.out.println("*** 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();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,52 +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.test.applet;
|
|
||||||
|
|
||||||
import java.awt.Canvas;
|
|
||||||
|
|
||||||
import org.lwjgl.LWJGLException;
|
|
||||||
import org.lwjgl.input.Controllers;
|
|
||||||
|
|
||||||
public class ControllersTest extends Canvas implements Test {
|
|
||||||
public void start() {
|
|
||||||
try {
|
|
||||||
Controllers.create();
|
|
||||||
} catch (LWJGLException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
System.out.println("Controllers.getControllerCount() = " + Controllers.getControllerCount());
|
|
||||||
}
|
|
||||||
|
|
||||||
public void stop() {
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,405 +0,0 @@
|
||||||
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.LWJGLUtil;
|
|
||||||
import org.lwjgl.Sys;
|
|
||||||
import org.lwjgl.opengl.Display;
|
|
||||||
import org.lwjgl.input.Keyboard;
|
|
||||||
import org.lwjgl.input.Mouse;
|
|
||||||
import org.lwjgl.opengl.GLContext;
|
|
||||||
|
|
||||||
import static org.lwjgl.opengl.ARBTransposeMatrix.*;
|
|
||||||
import static org.lwjgl.opengl.GL11.*;
|
|
||||||
|
|
||||||
public class GearsApplet extends Applet {
|
|
||||||
|
|
||||||
/** The Canvas where the LWJGL Display is added */
|
|
||||||
Canvas display_parent;
|
|
||||||
|
|
||||||
/** Thread which runs the main game loop */
|
|
||||||
Thread gameThread;
|
|
||||||
|
|
||||||
/** is the game loop running */
|
|
||||||
boolean running;
|
|
||||||
|
|
||||||
/** variables used to rotate the view */
|
|
||||||
private float view_rotx = 20.0f;
|
|
||||||
private float view_roty = 30.0f;
|
|
||||||
private float view_rotz;
|
|
||||||
|
|
||||||
private int gear1;
|
|
||||||
private int gear2;
|
|
||||||
private int gear3;
|
|
||||||
private float angle;
|
|
||||||
|
|
||||||
boolean keyDown;
|
|
||||||
|
|
||||||
private int prevMouseX, prevMouseY;
|
|
||||||
private boolean mouseButtonDown;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Once the Canvas is created its add notify method will call this method to
|
|
||||||
* start the LWJGL Display and game loop in another thread.
|
|
||||||
*/
|
|
||||||
public void startLWJGL() {
|
|
||||||
gameThread = new Thread() {
|
|
||||||
public void run() {
|
|
||||||
running = true;
|
|
||||||
try {
|
|
||||||
Display.setParent(display_parent);
|
|
||||||
//Display.setVSyncEnabled(true);
|
|
||||||
Display.create();
|
|
||||||
initGL();
|
|
||||||
} catch (LWJGLException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
gameLoop();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
gameThread.start();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Tell game loop to stop running, after which the LWJGL Display will be destoryed.
|
|
||||||
* The main thread will wait for the Display.destroy() to complete
|
|
||||||
*/
|
|
||||||
private void stopLWJGL() {
|
|
||||||
running = false;
|
|
||||||
try {
|
|
||||||
gameThread.join();
|
|
||||||
} catch (InterruptedException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void start() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void stop() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Applet Destroy method will remove the canvas, before canvas is destroyed it will notify
|
|
||||||
* stopLWJGL() to stop main game loop and to destroy the Display
|
|
||||||
*/
|
|
||||||
public void destroy() {
|
|
||||||
remove(display_parent);
|
|
||||||
super.destroy();
|
|
||||||
System.out.println("Clear up");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* initialise applet by adding a canvas to it, this canvas will start the LWJGL Display and game loop
|
|
||||||
* in another thread. It will also stop the game loop and destroy the display on canvas removal when
|
|
||||||
* applet is destroyed.
|
|
||||||
*/
|
|
||||||
public void init() {
|
|
||||||
setLayout(new BorderLayout());
|
|
||||||
try {
|
|
||||||
display_parent = new Canvas() {
|
|
||||||
public void addNotify() {
|
|
||||||
super.addNotify();
|
|
||||||
startLWJGL();
|
|
||||||
}
|
|
||||||
public void removeNotify() {
|
|
||||||
stopLWJGL();
|
|
||||||
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 " + timeUsed / 1000f + " seconds = "
|
|
||||||
+ (fps / (timeUsed / 1000f)));
|
|
||||||
fps = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Mouse.isButtonDown(0)) {
|
|
||||||
if (!mouseButtonDown) {
|
|
||||||
prevMouseX = Mouse.getX();
|
|
||||||
prevMouseY= Mouse.getY();
|
|
||||||
}
|
|
||||||
mouseButtonDown = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
mouseButtonDown = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mouseButtonDown) {
|
|
||||||
int x = Mouse.getX();
|
|
||||||
int y = Mouse.getY();
|
|
||||||
|
|
||||||
float thetaY = 360.0f * ( (float)(x-prevMouseX)/(float)display_parent.getWidth());
|
|
||||||
float thetaX = 360.0f * ( (float)(prevMouseY-y)/(float)display_parent.getHeight());
|
|
||||||
|
|
||||||
prevMouseX = x;
|
|
||||||
prevMouseY = y;
|
|
||||||
|
|
||||||
view_rotx += thetaX;
|
|
||||||
view_roty += thetaY;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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() {
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
|
||||||
|
|
||||||
glPushMatrix();
|
|
||||||
|
|
||||||
glRotatef(view_rotx, 1.0f, 0.0f, 0.0f);
|
|
||||||
glRotatef(view_roty, 0.0f, 1.0f, 0.0f);
|
|
||||||
glRotatef(view_rotz, 0.0f, 0.0f, 1.0f);
|
|
||||||
|
|
||||||
glPushMatrix();
|
|
||||||
glTranslatef(-3.0f, -2.0f, 0.0f);
|
|
||||||
glRotatef(angle, 0.0f, 0.0f, 1.0f);
|
|
||||||
glCallList(gear1);
|
|
||||||
glPopMatrix();
|
|
||||||
|
|
||||||
glPushMatrix();
|
|
||||||
glTranslatef(3.1f, -2.0f, 0.0f);
|
|
||||||
glRotatef(-2.0f * angle - 9.0f, 0.0f, 0.0f, 1.0f);
|
|
||||||
glCallList(gear2);
|
|
||||||
glPopMatrix();
|
|
||||||
|
|
||||||
glPushMatrix();
|
|
||||||
glTranslatef(-3.1f, 4.2f, 0.0f);
|
|
||||||
glRotatef(-2.0f * angle - 25.0f, 0.0f, 0.0f, 1.0f);
|
|
||||||
glCallList(gear3);
|
|
||||||
glPopMatrix();
|
|
||||||
|
|
||||||
glPopMatrix();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void initGL() {
|
|
||||||
try {
|
|
||||||
// setup ogl
|
|
||||||
FloatBuffer pos = BufferUtils.createFloatBuffer(4).put(new float[] { 5.0f, 5.0f, 10.0f, 0.0f});
|
|
||||||
FloatBuffer red = BufferUtils.createFloatBuffer(4).put(new float[] { 0.8f, 0.1f, 0.0f, 1.0f});
|
|
||||||
FloatBuffer green = BufferUtils.createFloatBuffer(4).put(new float[] { 0.0f, 0.8f, 0.2f, 1.0f});
|
|
||||||
FloatBuffer blue = BufferUtils.createFloatBuffer(4).put(new float[] { 0.2f, 0.2f, 1.0f, 1.0f});
|
|
||||||
|
|
||||||
pos.flip();
|
|
||||||
red.flip();
|
|
||||||
green.flip();
|
|
||||||
blue.flip();
|
|
||||||
|
|
||||||
glLight(GL_LIGHT0, GL_POSITION, pos);
|
|
||||||
glEnable(GL_CULL_FACE);
|
|
||||||
glEnable(GL_LIGHTING);
|
|
||||||
glEnable(GL_LIGHT0);
|
|
||||||
glEnable(GL_DEPTH_TEST);
|
|
||||||
|
|
||||||
/* make the gears */
|
|
||||||
gear1 = glGenLists(1);
|
|
||||||
glNewList(gear1, GL_COMPILE);
|
|
||||||
glMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red);
|
|
||||||
gear(1.0f, 4.0f, 1.0f, 20, 0.7f);
|
|
||||||
glEndList();
|
|
||||||
|
|
||||||
gear2 = glGenLists(1);
|
|
||||||
glNewList(gear2, GL_COMPILE);
|
|
||||||
glMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green);
|
|
||||||
gear(0.5f, 2.0f, 2.0f, 10, 0.7f);
|
|
||||||
glEndList();
|
|
||||||
|
|
||||||
gear3 = glGenLists(1);
|
|
||||||
glNewList(gear3, GL_COMPILE);
|
|
||||||
glMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue);
|
|
||||||
gear(1.3f, 2.0f, 0.5f, 10, 0.7f);
|
|
||||||
glEndList();
|
|
||||||
glEnable(GL_NORMALIZE);
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
|
||||||
|
|
||||||
System.err.println("LWJGL: " + Sys.getVersion() + " / " + LWJGLUtil.getPlatformName());
|
|
||||||
System.err.println("GL_VENDOR: " + glGetString(GL_VENDOR));
|
|
||||||
System.err.println("GL_RENDERER: " + glGetString(GL_RENDERER));
|
|
||||||
System.err.println("GL_VERSION: " + glGetString(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
|
|
||||||
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();
|
|
||||||
glLoadTransposeMatrixARB(identityTranspose);
|
|
||||||
}
|
|
||||||
float h = (float) display_parent.getHeight() / (float) display_parent.getWidth();
|
|
||||||
glFrustum(-1.0f, 1.0f, -h, h, 5.0f, 60.0f);
|
|
||||||
glMatrixMode(GL_MODELVIEW);
|
|
||||||
glLoadIdentity();
|
|
||||||
glTranslatef(0.0f, 0.0f, -40.0f);
|
|
||||||
} catch (Exception e) {
|
|
||||||
System.err.println(e);
|
|
||||||
running = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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;
|
|
||||||
glShadeModel(GL_FLAT);
|
|
||||||
glNormal3f(0.0f, 0.0f, 1.0f);
|
|
||||||
/* draw front face */
|
|
||||||
glBegin(GL_QUAD_STRIP);
|
|
||||||
for (i = 0; i <= teeth; i++) {
|
|
||||||
angle = i * 2.0f * (float) Math.PI / teeth;
|
|
||||||
glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), width * 0.5f);
|
|
||||||
glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), width * 0.5f);
|
|
||||||
if (i < teeth) {
|
|
||||||
glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), width * 0.5f);
|
|
||||||
glVertex3f(r1 * (float) Math.cos(angle + 3.0f * da), r1 * (float) Math.sin(angle + 3.0f * da),
|
|
||||||
width * 0.5f);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
glEnd();
|
|
||||||
|
|
||||||
/* draw front sides of teeth */
|
|
||||||
glBegin(GL_QUADS);
|
|
||||||
for (i = 0; i < teeth; i++) {
|
|
||||||
angle = i * 2.0f * (float) Math.PI / teeth;
|
|
||||||
glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), width * 0.5f);
|
|
||||||
glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), width * 0.5f);
|
|
||||||
glVertex3f(r2 * (float) Math.cos(angle + 2.0f * da), r2 * (float) Math.sin(angle + 2.0f * da), width * 0.5f);
|
|
||||||
glVertex3f(r1 * (float) Math.cos(angle + 3.0f * da), r1 * (float) Math.sin(angle + 3.0f * da), width * 0.5f);
|
|
||||||
}
|
|
||||||
glEnd();
|
|
||||||
|
|
||||||
/* draw back face */
|
|
||||||
glBegin(GL_QUAD_STRIP);
|
|
||||||
for (i = 0; i <= teeth; i++) {
|
|
||||||
angle = i * 2.0f * (float) Math.PI / teeth;
|
|
||||||
glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), -width * 0.5f);
|
|
||||||
glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), -width * 0.5f);
|
|
||||||
glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), -width * 0.5f);
|
|
||||||
glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), -width * 0.5f);
|
|
||||||
}
|
|
||||||
glEnd();
|
|
||||||
|
|
||||||
/* draw back sides of teeth */
|
|
||||||
glBegin(GL_QUADS);
|
|
||||||
for (i = 0; i < teeth; i++) {
|
|
||||||
angle = i * 2.0f * (float) Math.PI / teeth;
|
|
||||||
glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), -width * 0.5f);
|
|
||||||
glVertex3f(r2 * (float) Math.cos(angle + 2 * da), r2 * (float) Math.sin(angle + 2 * da), -width * 0.5f);
|
|
||||||
glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), -width * 0.5f);
|
|
||||||
glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), -width * 0.5f);
|
|
||||||
}
|
|
||||||
glEnd();
|
|
||||||
|
|
||||||
/* draw outward faces of teeth */
|
|
||||||
glBegin(GL_QUAD_STRIP);
|
|
||||||
for (i = 0; i < teeth; i++) {
|
|
||||||
angle = i * 2.0f * (float) Math.PI / teeth;
|
|
||||||
glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), width * 0.5f);
|
|
||||||
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;
|
|
||||||
glNormal3f(v, -u, 0.0f);
|
|
||||||
glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), width * 0.5f);
|
|
||||||
glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), -width * 0.5f);
|
|
||||||
glNormal3f((float) Math.cos(angle), (float) Math.sin(angle), 0.0f);
|
|
||||||
glVertex3f(r2 * (float) Math.cos(angle + 2 * da), r2 * (float) Math.sin(angle + 2 * da), width * 0.5f);
|
|
||||||
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);
|
|
||||||
glNormal3f(v, -u, 0.0f);
|
|
||||||
glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), width * 0.5f);
|
|
||||||
glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), -width * 0.5f);
|
|
||||||
glNormal3f((float) Math.cos(angle), (float) Math.sin(angle), 0.0f);
|
|
||||||
}
|
|
||||||
glVertex3f(r1 * (float) Math.cos(0), r1 * (float) Math.sin(0), width * 0.5f);
|
|
||||||
glVertex3f(r1 * (float) Math.cos(0), r1 * (float) Math.sin(0), -width * 0.5f);
|
|
||||||
glEnd();
|
|
||||||
|
|
||||||
glShadeModel(GL_SMOOTH);
|
|
||||||
/* draw inside radius cylinder */
|
|
||||||
glBegin(GL_QUAD_STRIP);
|
|
||||||
for (i = 0; i <= teeth; i++) {
|
|
||||||
angle = i * 2.0f * (float) Math.PI / teeth;
|
|
||||||
glNormal3f(-(float) Math.cos(angle), -(float) Math.sin(angle), 0.0f);
|
|
||||||
glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), -width * 0.5f);
|
|
||||||
glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), width * 0.5f);
|
|
||||||
}
|
|
||||||
glEnd();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,183 +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.test.applet;
|
|
||||||
|
|
||||||
import java.nio.IntBuffer;
|
|
||||||
|
|
||||||
import org.lwjgl.BufferUtils;
|
|
||||||
import org.lwjgl.LWJGLException;
|
|
||||||
import org.lwjgl.openal.AL;
|
|
||||||
import org.lwjgl.openal.AL10;
|
|
||||||
import org.lwjgl.opengl.AWTGLCanvas;
|
|
||||||
import org.lwjgl.opengl.Display;
|
|
||||||
import org.lwjgl.util.WaveData;
|
|
||||||
|
|
||||||
import static org.lwjgl.opengl.GL11.*;
|
|
||||||
|
|
||||||
public class OpenAL extends AWTGLCanvas implements Test {
|
|
||||||
|
|
||||||
float angle;
|
|
||||||
|
|
||||||
// create 1 buffer and 1 source
|
|
||||||
IntBuffer buffers = BufferUtils.createIntBuffer(1);
|
|
||||||
IntBuffer sources = BufferUtils.createIntBuffer(1);
|
|
||||||
|
|
||||||
public OpenAL() throws LWJGLException {
|
|
||||||
|
|
||||||
try {
|
|
||||||
AL.create();
|
|
||||||
} catch (Exception e) {
|
|
||||||
System.out.println("Unable to create OpenAL.\nPlease make sure that OpenAL is available on this system. Exception: " + e);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Thread t = new Thread() {
|
|
||||||
|
|
||||||
public void run() {
|
|
||||||
while (true) {
|
|
||||||
if (isVisible())
|
|
||||||
repaint();
|
|
||||||
Display.sync(60);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
t.setDaemon(true);
|
|
||||||
t.start();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void playOpenAL() {
|
|
||||||
int lastError;
|
|
||||||
|
|
||||||
// al generate buffers and sources
|
|
||||||
buffers.position(0).limit(1);
|
|
||||||
AL10.alGenBuffers(buffers);
|
|
||||||
if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) {
|
|
||||||
exit(lastError);
|
|
||||||
}
|
|
||||||
|
|
||||||
sources.position(0).limit(1);
|
|
||||||
AL10.alGenSources(sources);
|
|
||||||
if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) {
|
|
||||||
exit(lastError);
|
|
||||||
}
|
|
||||||
|
|
||||||
// load wave data from buffer
|
|
||||||
WaveData wavefile = WaveData.create(getClass().getClassLoader().getResourceAsStream("Footsteps.wav"));
|
|
||||||
|
|
||||||
//copy to buffers
|
|
||||||
AL10.alBufferData(buffers.get(0), wavefile.format, wavefile.data, wavefile.samplerate);
|
|
||||||
|
|
||||||
//unload file again
|
|
||||||
wavefile.dispose();
|
|
||||||
|
|
||||||
if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) {
|
|
||||||
exit(lastError);
|
|
||||||
}
|
|
||||||
|
|
||||||
//set up source input
|
|
||||||
AL10.alSourcei(sources.get(0), AL10.AL_BUFFER, buffers.get(0));
|
|
||||||
if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) {
|
|
||||||
exit(lastError);
|
|
||||||
}
|
|
||||||
|
|
||||||
//lets loop the sound
|
|
||||||
AL10.alSourcei(sources.get(0), AL10.AL_LOOPING, AL10.AL_TRUE);
|
|
||||||
if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) {
|
|
||||||
exit(lastError);
|
|
||||||
}
|
|
||||||
|
|
||||||
//play source 0
|
|
||||||
AL10.alSourcePlay(sources.get(0));
|
|
||||||
if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) {
|
|
||||||
exit(lastError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void exit(int error) {
|
|
||||||
System.out.println("OpenAL Error: " + AL10.alGetString(error));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void paintGL() {
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
|
||||||
glMatrixMode(GL_PROJECTION_MATRIX);
|
|
||||||
glLoadIdentity();
|
|
||||||
glOrtho(0, 640, 0, 480, 1, -1);
|
|
||||||
glMatrixMode(GL_MODELVIEW_MATRIX);
|
|
||||||
|
|
||||||
glPushMatrix();
|
|
||||||
glTranslatef(320, 240, 0.0f);
|
|
||||||
glRotatef(angle, 0, 0, 1.0f);
|
|
||||||
glBegin(GL_QUADS);
|
|
||||||
glVertex2i(-50, -50);
|
|
||||||
glVertex2i(50, -50);
|
|
||||||
glVertex2i(50, 50);
|
|
||||||
glVertex2i(-50, 50);
|
|
||||||
glEnd();
|
|
||||||
glPopMatrix();
|
|
||||||
|
|
||||||
angle += 1;
|
|
||||||
|
|
||||||
try {
|
|
||||||
swapBuffers();
|
|
||||||
} catch (Exception e) {/*OK*/
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void start() {
|
|
||||||
playOpenAL();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void stop() {
|
|
||||||
int lastError;
|
|
||||||
|
|
||||||
//stop source 0
|
|
||||||
AL10.alSourceStop(sources.get(0));
|
|
||||||
if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) {
|
|
||||||
exit(lastError);
|
|
||||||
}
|
|
||||||
|
|
||||||
//delete buffers and sources
|
|
||||||
sources.position(0).limit(1);
|
|
||||||
AL10.alDeleteSources(sources);
|
|
||||||
if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) {
|
|
||||||
exit(lastError);
|
|
||||||
}
|
|
||||||
|
|
||||||
buffers.position(0).limit(1);
|
|
||||||
AL10.alDeleteBuffers(buffers);
|
|
||||||
if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) {
|
|
||||||
exit(lastError);
|
|
||||||
}
|
|
||||||
|
|
||||||
AL.destroy();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,129 +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.test.applet;
|
|
||||||
|
|
||||||
import org.lwjgl.LWJGLException;
|
|
||||||
import org.lwjgl.input.Keyboard;
|
|
||||||
import org.lwjgl.input.Mouse;
|
|
||||||
import org.lwjgl.opengl.AWTGLCanvas;
|
|
||||||
|
|
||||||
import static org.lwjgl.opengl.GL11.*;
|
|
||||||
|
|
||||||
public class OpenGL extends AWTGLCanvas implements Test {
|
|
||||||
|
|
||||||
float angle;
|
|
||||||
float x;
|
|
||||||
float y;
|
|
||||||
|
|
||||||
public OpenGL() throws LWJGLException {
|
|
||||||
}
|
|
||||||
|
|
||||||
public void initGL() {
|
|
||||||
glMatrixMode(GL_PROJECTION_MATRIX);
|
|
||||||
glLoadIdentity();
|
|
||||||
glOrtho(0, 640, 0, 480, 1, -1);
|
|
||||||
x = 320;
|
|
||||||
y = 240;
|
|
||||||
glMatrixMode(GL_MODELVIEW_MATRIX);
|
|
||||||
setVSyncEnabled(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void paintGL() {
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
|
||||||
|
|
||||||
glPushMatrix();
|
|
||||||
glTranslatef(x, y, 0.0f);
|
|
||||||
glRotatef(angle, 0, 0, 1.0f);
|
|
||||||
glBegin(GL_QUADS);
|
|
||||||
glVertex2i(-50, -50);
|
|
||||||
glVertex2i(50, -50);
|
|
||||||
glVertex2i(50, 50);
|
|
||||||
glVertex2i(-50, 50);
|
|
||||||
glEnd();
|
|
||||||
glPopMatrix();
|
|
||||||
|
|
||||||
angle += 1;
|
|
||||||
|
|
||||||
if (Mouse.isCreated()) {
|
|
||||||
Mouse.poll();
|
|
||||||
while (Mouse.next()) {
|
|
||||||
x += Mouse.getEventDX();
|
|
||||||
y += Mouse.getEventDY();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (Keyboard.isCreated()) {
|
|
||||||
Keyboard.poll();
|
|
||||||
}
|
|
||||||
while (Keyboard.isCreated() && Keyboard.next()) {
|
|
||||||
if (Keyboard.getEventKey() != Keyboard.KEY_NONE) {
|
|
||||||
String key_name = Keyboard.getKeyName(Keyboard.getEventKey());
|
|
||||||
if (Keyboard.getEventKeyState()) {
|
|
||||||
switch (Keyboard.getEventKey()) {
|
|
||||||
case Keyboard.KEY_G:
|
|
||||||
Mouse.setGrabbed(!Mouse.isGrabbed());
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
System.out.println("Pressed: " + key_name);
|
|
||||||
} else
|
|
||||||
System.out.println("Released: " + key_name);
|
|
||||||
}
|
|
||||||
if (Keyboard.getEventCharacter() != Keyboard.CHAR_NONE)
|
|
||||||
System.out.println("Typed: " + Keyboard.getEventCharacter());
|
|
||||||
}
|
|
||||||
if (Keyboard.isCreated()) {
|
|
||||||
if (Keyboard.isKeyDown(Keyboard.KEY_UP))
|
|
||||||
y += 5;
|
|
||||||
else if (Keyboard.isKeyDown(Keyboard.KEY_DOWN))
|
|
||||||
y -= 5;
|
|
||||||
if (Keyboard.isKeyDown(Keyboard.KEY_LEFT))
|
|
||||||
x -= 5;
|
|
||||||
else if (Keyboard.isKeyDown(Keyboard.KEY_RIGHT))
|
|
||||||
x += 5;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
swapBuffers();
|
|
||||||
if (isVisible()) {
|
|
||||||
Thread.yield(); // Helps input responsiveness on linux
|
|
||||||
repaint();
|
|
||||||
}
|
|
||||||
} catch (Exception e) {/*OK*/
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void start() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public void stop() {
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,92 +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.test.applet;
|
|
||||||
|
|
||||||
import org.lwjgl.LWJGLException;
|
|
||||||
import org.lwjgl.opengl.AWTGLCanvas;
|
|
||||||
|
|
||||||
import static org.lwjgl.opengl.GL11.*;
|
|
||||||
|
|
||||||
public class Speed extends AWTGLCanvas implements Test {
|
|
||||||
|
|
||||||
private float angle;
|
|
||||||
private long startTime = System.currentTimeMillis() + 5000;
|
|
||||||
private long fps;
|
|
||||||
|
|
||||||
public Speed() throws LWJGLException {
|
|
||||||
}
|
|
||||||
|
|
||||||
public void paintGL() {
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
|
||||||
glMatrixMode(GL_PROJECTION_MATRIX);
|
|
||||||
glLoadIdentity();
|
|
||||||
glOrtho(0, 640, 0, 480, 1, -1);
|
|
||||||
glMatrixMode(GL_MODELVIEW_MATRIX);
|
|
||||||
|
|
||||||
glPushMatrix();
|
|
||||||
glTranslatef(320, 240, 0.0f);
|
|
||||||
glRotatef(angle, 0, 0, 1.0f);
|
|
||||||
glBegin(GL_QUADS);
|
|
||||||
glVertex2i(-50, -50);
|
|
||||||
glVertex2i(50, -50);
|
|
||||||
glVertex2i(50, 50);
|
|
||||||
glVertex2i(-50, 50);
|
|
||||||
glEnd();
|
|
||||||
glPopMatrix();
|
|
||||||
|
|
||||||
angle += 1;
|
|
||||||
|
|
||||||
try {
|
|
||||||
swapBuffers();
|
|
||||||
if (isVisible()) {
|
|
||||||
Thread.yield(); // Helps input responsiveness on linux
|
|
||||||
repaint();
|
|
||||||
}
|
|
||||||
} catch (Exception e) {/*OK*/
|
|
||||||
}
|
|
||||||
if (startTime > System.currentTimeMillis()) {
|
|
||||||
fps++;
|
|
||||||
} else {
|
|
||||||
long timeUsed = 5000 + (startTime - System.currentTimeMillis());
|
|
||||||
startTime = System.currentTimeMillis() + 5000;
|
|
||||||
System.out.println(fps + " frames in " + timeUsed / 1000f + " seconds = "
|
|
||||||
+ (fps / (timeUsed / 1000f)));
|
|
||||||
fps = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void start() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public void stop() {
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,38 +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.test.applet;
|
|
||||||
|
|
||||||
|
|
||||||
public interface Test {
|
|
||||||
void start();
|
|
||||||
void stop();
|
|
||||||
}
|
|
|
@ -238,7 +238,6 @@ public class GeneratorVisitor extends ElementKindVisitor6<Void, Void> {
|
||||||
}
|
}
|
||||||
JavaMethodsGenerator.generateMethodsJava(env, type_map, java_writer, d, generate_error_checks, context_specific);
|
JavaMethodsGenerator.generateMethodsJava(env, type_map, java_writer, d, generate_error_checks, context_specific);
|
||||||
java_writer.println("}");
|
java_writer.println("}");
|
||||||
java_writer.close();
|
|
||||||
String qualified_interface_name = Utils.getQualifiedClassName(d);
|
String qualified_interface_name = Utils.getQualifiedClassName(d);
|
||||||
env.getMessager().printMessage(Diagnostic.Kind.NOTE, "Generated class " + qualified_interface_name);
|
env.getMessager().printMessage(Diagnostic.Kind.NOTE, "Generated class " + qualified_interface_name);
|
||||||
}
|
}
|
||||||
|
@ -249,58 +248,50 @@ public class GeneratorVisitor extends ElementKindVisitor6<Void, Void> {
|
||||||
}
|
}
|
||||||
String qualified_interface_name = Utils.getQualifiedClassName(d);
|
String qualified_interface_name = Utils.getQualifiedClassName(d);
|
||||||
String qualified_native_name = Utils.getNativeQualifiedName(qualified_interface_name) + ".c";
|
String qualified_native_name = Utils.getNativeQualifiedName(qualified_interface_name) + ".c";
|
||||||
PrintWriter native_writer = new PrintWriter(env.getFiler().createResource(StandardLocation.CLASS_OUTPUT, "", qualified_native_name).openWriter());
|
try (PrintWriter native_writer = new PrintWriter(env.getFiler().createResource(StandardLocation.CLASS_OUTPUT, "", qualified_native_name).openWriter())) {
|
||||||
native_writer.println("/* MACHINE GENERATED FILE, DO NOT EDIT */");
|
native_writer.println("/* MACHINE GENERATED FILE, DO NOT EDIT */");
|
||||||
native_writer.println();
|
native_writer.println();
|
||||||
native_writer.println("#include <jni.h>");
|
native_writer.println("#include <jni.h>");
|
||||||
type_map.printNativeIncludes(native_writer);
|
type_map.printNativeIncludes(native_writer);
|
||||||
native_writer.println();
|
native_writer.println();
|
||||||
TypedefsGenerator.generateNativeTypedefs(type_map, native_writer, Utils.getMethods(d));
|
TypedefsGenerator.generateNativeTypedefs(type_map, native_writer, Utils.getMethods(d));
|
||||||
native_writer.println();
|
native_writer.println();
|
||||||
if ( !context_specific ) {
|
if ( !context_specific ) {
|
||||||
generateMethodsNativePointers(native_writer, Utils.getMethods(d));
|
generateMethodsNativePointers(native_writer, Utils.getMethods(d));
|
||||||
native_writer.println();
|
native_writer.println();
|
||||||
|
}
|
||||||
|
NativeMethodStubsGenerator.generateNativeMethodStubs(env, type_map, native_writer, d, generate_error_checks, context_specific);
|
||||||
|
if ( !context_specific ) {
|
||||||
|
native_writer.print("JNIEXPORT void JNICALL " + Utils.getQualifiedNativeMethodName(qualified_interface_name, Utils.STUB_INITIALIZER_NAME));
|
||||||
|
native_writer.println("(JNIEnv *env, jclass clazz) {");
|
||||||
|
native_writer.println("\tJavaMethodAndExtFunction functions[] = {");
|
||||||
|
RegisterStubsGenerator.generateMethodsNativeStubBind(native_writer, d, generate_error_checks, context_specific);
|
||||||
|
native_writer.println("\t};");
|
||||||
|
native_writer.println("\tint num_functions = NUMFUNCTIONS(functions);");
|
||||||
|
native_writer.print("\t");
|
||||||
|
native_writer.print(type_map.getRegisterNativesFunctionName());
|
||||||
|
native_writer.println("(env, clazz, num_functions, functions);");
|
||||||
|
native_writer.println("}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
NativeMethodStubsGenerator.generateNativeMethodStubs(env, type_map, native_writer, d, generate_error_checks, context_specific);
|
|
||||||
if ( !context_specific ) {
|
|
||||||
native_writer.print("JNIEXPORT void JNICALL " + Utils.getQualifiedNativeMethodName(qualified_interface_name, Utils.STUB_INITIALIZER_NAME));
|
|
||||||
native_writer.println("(JNIEnv *env, jclass clazz) {");
|
|
||||||
native_writer.println("\tJavaMethodAndExtFunction functions[] = {");
|
|
||||||
RegisterStubsGenerator.generateMethodsNativeStubBind(native_writer, d, generate_error_checks, context_specific);
|
|
||||||
native_writer.println("\t};");
|
|
||||||
native_writer.println("\tint num_functions = NUMFUNCTIONS(functions);");
|
|
||||||
native_writer.print("\t");
|
|
||||||
native_writer.print(type_map.getRegisterNativesFunctionName());
|
|
||||||
native_writer.println("(env, clazz, num_functions, functions);");
|
|
||||||
native_writer.println("}");
|
|
||||||
}
|
|
||||||
native_writer.close();
|
|
||||||
env.getMessager().printMessage(Kind.NOTE, "Generated C source " + qualified_interface_name);
|
env.getMessager().printMessage(Kind.NOTE, "Generated C source " + qualified_interface_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Void visitTypeAsInterface(TypeElement e, Void p) {
|
public Void visitTypeAsInterface(TypeElement e, Void p) {
|
||||||
final File input = new File("src/templates/" + e.getQualifiedName().toString().replace('.', '/') + ".java");
|
final File input = new File("src/templates/" + e.getQualifiedName().toString().replace('.', '/') + ".java");
|
||||||
final File outputJava = new File("src/generated/" + env.getElementUtils().getPackageOf(e).getQualifiedName().toString().replace('.', '/'), Utils.getSimpleClassName(e) + ".java");
|
final Collection<? extends ExecutableElement> methods = Utils.getMethods(e);
|
||||||
|
if ( methods.isEmpty() && Utils.getFields(e).isEmpty() ) {
|
||||||
|
return DEFAULT_VALUE;
|
||||||
|
}
|
||||||
|
|
||||||
PrintWriter java_writer = null;
|
//env.getMessager().printMessage(Kind.NOTE, "methods count : " + Utils.getMethods(e).size() + " fields count : " + Utils.getFields(e).size(), e);
|
||||||
try {
|
for ( final ExecutableElement method : methods ) {
|
||||||
final Collection<? extends ExecutableElement> methods = Utils.getMethods(e);
|
validateMethod(method);
|
||||||
if ( methods.isEmpty() && Utils.getFields(e).isEmpty() ) {
|
}
|
||||||
return DEFAULT_VALUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Skip this class if the output exists and the input has not been modified.
|
// TODO: Back-port LWJGL 3's generation file handling (generate in-memory and avoid touching files if nothing has changed)
|
||||||
if ( outputJava.exists() && Math.max(input.lastModified(), generatorLM) < outputJava.lastModified() )
|
try (PrintWriter java_writer = new PrintWriter(env.getFiler().createSourceFile(Utils.getQualifiedClassName(e), env.getElementUtils().getPackageOf(e)).openWriter())) {
|
||||||
return DEFAULT_VALUE;
|
|
||||||
|
|
||||||
//env.getMessager().printMessage(Kind.NOTE, "methods count : " + Utils.getMethods(e).size() + " fields count : " + Utils.getFields(e).size(), e);
|
|
||||||
for ( final ExecutableElement method : methods ) {
|
|
||||||
validateMethod(method);
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: Back-port LWJGL 3's generation file handling (generate in-memory and avoid touching files if nothing has changed)
|
|
||||||
java_writer = new PrintWriter(env.getFiler().createSourceFile(Utils.getQualifiedClassName(e), env.getElementUtils().getPackageOf(e)).openWriter());
|
|
||||||
generateJavaSource(e, java_writer);
|
generateJavaSource(e, java_writer);
|
||||||
|
|
||||||
if ( methods.size() > 0 ) {
|
if ( methods.size() > 0 ) {
|
||||||
|
@ -324,10 +315,6 @@ public class GeneratorVisitor extends ElementKindVisitor6<Void, Void> {
|
||||||
}
|
}
|
||||||
return DEFAULT_VALUE;
|
return DEFAULT_VALUE;
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
// If anything goes wrong mid-gen, delete output to allow regen next time we run.
|
|
||||||
if ( java_writer != null ) java_writer.close();
|
|
||||||
if ( outputJava.exists() ) outputJava.delete();
|
|
||||||
|
|
||||||
throw new RuntimeException(ex);
|
throw new RuntimeException(ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|