diff --git a/eclipse-update/org.lwjgl.build/.classpath b/eclipse-update/org.lwjgl.build/.classpath
new file mode 100644
index 00000000..3c128ebc
--- /dev/null
+++ b/eclipse-update/org.lwjgl.build/.classpath
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/eclipse-update/org.lwjgl.build/.project b/eclipse-update/org.lwjgl.build/.project
new file mode 100644
index 00000000..7689f7f9
--- /dev/null
+++ b/eclipse-update/org.lwjgl.build/.project
@@ -0,0 +1,28 @@
+
+
+ org.lwjgl.build
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.pde.ManifestBuilder
+
+
+
+
+ org.eclipse.pde.SchemaBuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+ org.eclipse.pde.PluginNature
+
+
diff --git a/eclipse-update/org.lwjgl.build/META-INF/MANIFEST.MF b/eclipse-update/org.lwjgl.build/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..57d2b654
--- /dev/null
+++ b/eclipse-update/org.lwjgl.build/META-INF/MANIFEST.MF
@@ -0,0 +1,13 @@
+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.8.1"
+Bundle-Vendor: Lightweight Java Game Library Project
diff --git a/eclipse-update/org.lwjgl.build/READ.ME b/eclipse-update/org.lwjgl.build/READ.ME
new file mode 100644
index 00000000..dd82b913
--- /dev/null
+++ b/eclipse-update/org.lwjgl.build/READ.ME
@@ -0,0 +1,88 @@
+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 org.lwjgl.build/build.
+Here is how to build the update site:
+
+1) Create a new folder in org.lwjgl.build/lwjgl-archives , use the version
+ number as folder name. E.g., for version 2.6 create a folder "2.6",
+ for version 2.6.1 "2.6.1" and so on.
+2) Copy the lwjgl, lwjgl-docs and lwjgl-source zips into that folder. E.g.,
+ for version 2.6, this folder must contain the following files:
+ org.lwjgl.build/lwjgl-archives
+ + 2.6
+ - lwjgl-2.6.zip
+ - lwjgl-docs-2.6.zip
+ - lwjgl-source-2.6.zip
+3) In order to run the build script, change to folder org.lwjgl.build and run
+ ant with a parameter indicating the appropriate LWJGL version, e.g.
+ ant -Dversion=2.6 dist
+
+You will find the updatesite in
+ org.lwjgl.build/build/plugins/org.lwjgl.updatesite
+
+You may note that the jars are all signed. I have added a temporary keystore
+with a dummy alias. In order to use your key, simply edit the properties
+(line 11-14) in the build script. If you do not want to store the password in
+the build script, simply define it via "-Dstorepass=****" in the command line.
+
+Some additional remarks:
+- The version number is automatically "normalized" to Eclipse standards,
+ that is 2.6 will become 2.6.0. You do not have to rename the initial archives,
+ you can use 2.6. Or 2.6.1 ;-)
+- 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!
\ No newline at end of file
diff --git a/eclipse-update/org.lwjgl.build/build.properties b/eclipse-update/org.lwjgl.build/build.properties
new file mode 100644
index 00000000..cc29de28
--- /dev/null
+++ b/eclipse-update/org.lwjgl.build/build.properties
@@ -0,0 +1,3 @@
+source.. = src/java/
+bin.includes = META-INF/,\
+ .
diff --git a/eclipse-update/org.lwjgl.build/build.xml b/eclipse-update/org.lwjgl.build/build.xml
new file mode 100644
index 00000000..0cd8275b
--- /dev/null
+++ b/eclipse-update/org.lwjgl.build/build.xml
@@ -0,0 +1,444 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Building plugins for version ${version}, normalized version ${normversion}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: LWJGL Lightweight Java Game Library
+Bundle-SymbolicName: org.lwjgl
+Bundle-Version: ${normversion}
+Bundle-Vendor: ${bundle.vendor}
+Bundle-Activator: org.lwjgl.eclipse.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime
+Bundle-ActivationPolicy: lazy
+Export-Package: org.lwjgl.eclipse,${NL} ${bundle.export-package}
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ClassPath: .,${NL} ${bundle.classpath.jars}
+
+
+
+
+ Manifest-Version: 1.0
+Bundle-Vendor: ${bundle.vendor}
+Bundle-Version: ${normversion}
+Bundle-SymbolicName: org.lwjgl.doc;singleton:=true
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.help;bundle-version="3.2.0"
+Eclipse-LazyStart: true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: LWJGL Sources
+Bundle-Vendor: ${bundle.vendor}
+Bundle-Version: ${normversion}
+Bundle-SymbolicName: org.lwjgl.source;singleton:=true
+Bundle-Localization: plugin
+
+
+
+ Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: LWJGL Test and Info View
+Bundle-Vendor: ${bundle.vendor}
+Bundle-Version: ${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
+
+
+
+
+
+ Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: LWJGL Tools Plug-in
+Bundle-SymbolicName: org.lwjgl.tools;singleton:=true
+Bundle-Version: ${normversion}
+Bundle-Vendor: ${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="${normversion}",
+ org.eclipse.jdt.launching;bundle-version="3.4.0"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Call this build with version number and target dist, e.g.
+ ant -Dversion=1.1.2 dist
+
+
+
\ No newline at end of file
diff --git a/eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/NormalizeVersion.java b/eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/NormalizeVersion.java
new file mode 100644
index 00000000..0a5ae00f
--- /dev/null
+++ b/eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/NormalizeVersion.java
@@ -0,0 +1,173 @@
+/*******************************************************************************
+ * 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 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 {
+
+
+ /**
+ * name of the property to set
+ */
+ protected String property;
+
+ protected String version;
+
+ /**
+ * @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");
+ }
+ }
+
+ /**
+ * 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");
+ }
+ }
+ return n.toString();
+ }
+
+}
diff --git a/eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/PackageList.java b/eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/PackageList.java
new file mode 100644
index 00000000..2c9770f1
--- /dev/null
+++ b/eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/PackageList.java
@@ -0,0 +1,270 @@
+/*******************************************************************************
+ * 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 packagelist = new TreeMap();
+
+ /**
+ * {@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 patternsets = new Vector();
+
+ /**
+ * 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 includePatterns = new HashSet();
+ Set excludePatterns = new HashSet();
+ 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 iter = includePatterns.iterator(); !included
+ && iter.hasNext();) {
+ String pattern = iter.next();
+ included = SelectorUtils.matchPath(pattern, name);
+ }
+
+ for (Iterator 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;
+ }
+
+}
diff --git a/eclipse-update/org.lwjgl.build/test/buildtest/build.xml b/eclipse-update/org.lwjgl.build/test/buildtest/build.xml
new file mode 100644
index 00000000..0e52dfce
--- /dev/null
+++ b/eclipse-update/org.lwjgl.build/test/buildtest/build.xml
@@ -0,0 +1,36 @@
+
+
+
+
+ description
+
+
+
+
+
+
+
+
+
+
+
+
+ ${norm}
+
+
+
+
+
+
+
diff --git a/eclipse-update/org.lwjgl.build/test/java/org/lwjgl/ant/NormalizeVersionTest.java b/eclipse-update/org.lwjgl.build/test/java/org/lwjgl/ant/NormalizeVersionTest.java
new file mode 100644
index 00000000..e87aa41e
--- /dev/null
+++ b/eclipse-update/org.lwjgl.build/test/java/org/lwjgl/ant/NormalizeVersionTest.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * 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();
+ }
+
+
+
+}
diff --git a/eclipse-update/org.lwjgl.build/teststore b/eclipse-update/org.lwjgl.build/teststore
new file mode 100644
index 00000000..49c899fe
Binary files /dev/null and b/eclipse-update/org.lwjgl.build/teststore differ
diff --git a/eclipse-update/org.lwjgl.doc/.project b/eclipse-update/org.lwjgl.doc/.project
new file mode 100644
index 00000000..7a8a4ccb
--- /dev/null
+++ b/eclipse-update/org.lwjgl.doc/.project
@@ -0,0 +1,22 @@
+
+
+ org.lwjgl.doc
+
+
+
+
+
+ org.eclipse.pde.ManifestBuilder
+
+
+
+
+ org.eclipse.pde.SchemaBuilder
+
+
+
+
+
+ org.eclipse.pde.PluginNature
+
+
diff --git a/eclipse-update/org.lwjgl.doc/META-INF/MANIFEST.MF b/eclipse-update/org.lwjgl.doc/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..19ff43ff
--- /dev/null
+++ b/eclipse-update/org.lwjgl.doc/META-INF/MANIFEST.MF
@@ -0,0 +1,6 @@
+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
diff --git a/eclipse-update/org.lwjgl.doc/about.html b/eclipse-update/org.lwjgl.doc/about.html
new file mode 100644
index 00000000..d204f100
--- /dev/null
+++ b/eclipse-update/org.lwjgl.doc/about.html
@@ -0,0 +1,55 @@
+
+
+
+About
+
+
+
+
+About This Content
+The Lightweight Java Game Library (LWJGL) is a solution aimed
+directly at professional and amateur Java programmers alike to enable commercial quality games to be written in Java.
+LWJGL provides developers access to high performance crossplatform
+libraries such as OpenGL (Open Graphics Library) and OpenAL (Open Audio Library)
+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.
+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 Java
+platform. 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.
+LWJGL is available under a BSD
+license, which means it's open source and freely available at no charge.
+Please visit us on the Freenode IRC Network: #LWJGL. Do idle
+if there is no one to answer any of your questions, we are on different
+timezones.
+
+
+
+Plug-Ins
+The following plug-ins are provided:
+
+- org.lwjgl
+ - Platform independent jars and native libraries for Windows, Linux and Mac OS X
+- org.lwjgl.doc
+ - Documentation (JavaDoc)
+- org.lwjgl.source
+ - Source files
+- org.lwjgl.tools
+ - Developer tools
+- org.lwjgl.info
+ - LWJGL test and info view
+
+
+
+
+
+
diff --git a/eclipse-update/org.lwjgl.doc/build.properties b/eclipse-update/org.lwjgl.doc/build.properties
new file mode 100644
index 00000000..3c05d072
--- /dev/null
+++ b/eclipse-update/org.lwjgl.doc/build.properties
@@ -0,0 +1,4 @@
+bin.includes = plugin.xml,\
+ META-INF/,\
+ html/,\
+ *.xml
diff --git a/eclipse-update/org.lwjgl.doc/html/fig/addLib_1.png b/eclipse-update/org.lwjgl.doc/html/fig/addLib_1.png
new file mode 100644
index 00000000..4dd43a7c
Binary files /dev/null and b/eclipse-update/org.lwjgl.doc/html/fig/addLib_1.png differ
diff --git a/eclipse-update/org.lwjgl.doc/html/fig/addLib_2.png b/eclipse-update/org.lwjgl.doc/html/fig/addLib_2.png
new file mode 100644
index 00000000..02d1b7fa
Binary files /dev/null and b/eclipse-update/org.lwjgl.doc/html/fig/addLib_2.png differ
diff --git a/eclipse-update/org.lwjgl.doc/html/fig/addLib_3.png b/eclipse-update/org.lwjgl.doc/html/fig/addLib_3.png
new file mode 100644
index 00000000..01de559e
Binary files /dev/null and b/eclipse-update/org.lwjgl.doc/html/fig/addLib_3.png differ
diff --git a/eclipse-update/org.lwjgl.doc/html/fig/addLib_4.png b/eclipse-update/org.lwjgl.doc/html/fig/addLib_4.png
new file mode 100644
index 00000000..a79e512c
Binary files /dev/null and b/eclipse-update/org.lwjgl.doc/html/fig/addLib_4.png differ
diff --git a/eclipse-update/org.lwjgl.doc/html/fig/logo.png b/eclipse-update/org.lwjgl.doc/html/fig/logo.png
new file mode 100644
index 00000000..dbe2c75a
Binary files /dev/null and b/eclipse-update/org.lwjgl.doc/html/fig/logo.png differ
diff --git a/eclipse-update/org.lwjgl.doc/html/fig/lwjgl_logo.png b/eclipse-update/org.lwjgl.doc/html/fig/lwjgl_logo.png
new file mode 100644
index 00000000..e4d806ae
Binary files /dev/null and b/eclipse-update/org.lwjgl.doc/html/fig/lwjgl_logo.png differ
diff --git a/eclipse-update/org.lwjgl.doc/html/fig/mesh.png b/eclipse-update/org.lwjgl.doc/html/fig/mesh.png
new file mode 100644
index 00000000..120babdf
Binary files /dev/null and b/eclipse-update/org.lwjgl.doc/html/fig/mesh.png differ
diff --git a/eclipse-update/org.lwjgl.doc/html/fig/openView_1.png b/eclipse-update/org.lwjgl.doc/html/fig/openView_1.png
new file mode 100644
index 00000000..fa729ae5
Binary files /dev/null and b/eclipse-update/org.lwjgl.doc/html/fig/openView_1.png differ
diff --git a/eclipse-update/org.lwjgl.doc/html/fig/openView_2.png b/eclipse-update/org.lwjgl.doc/html/fig/openView_2.png
new file mode 100644
index 00000000..d2f3b107
Binary files /dev/null and b/eclipse-update/org.lwjgl.doc/html/fig/openView_2.png differ
diff --git a/eclipse-update/org.lwjgl.doc/html/fig/openView_Info.png b/eclipse-update/org.lwjgl.doc/html/fig/openView_Info.png
new file mode 100644
index 00000000..158876a5
Binary files /dev/null and b/eclipse-update/org.lwjgl.doc/html/fig/openView_Info.png differ
diff --git a/eclipse-update/org.lwjgl.doc/html/fig/openView_Test.png b/eclipse-update/org.lwjgl.doc/html/fig/openView_Test.png
new file mode 100644
index 00000000..1ff61e9b
Binary files /dev/null and b/eclipse-update/org.lwjgl.doc/html/fig/openView_Test.png differ
diff --git a/eclipse-update/org.lwjgl.doc/html/overview.html b/eclipse-update/org.lwjgl.doc/html/overview.html
new file mode 100644
index 00000000..d966549f
--- /dev/null
+++ b/eclipse-update/org.lwjgl.doc/html/overview.html
@@ -0,0 +1,66 @@
+
+
+
+
+
+ LWJGL Eclipse Plugins
+
+
+
+
+
+Table of Contents
+
+
+Plugin documentation
+
+
+
+
+API
+
+
+
+
+External resources
+
+
+
+About LWJGL
+The Lightweight Java Game Library (LWJGL) is a solution aimed
+directly at professional and amateur Java programmers alike to enable commercial quality games to be written in Java.
+LWJGL provides developers access to high performance crossplatform
+libraries such as OpenGL (Open Graphics Library) and OpenAL (Open Audio Library)
+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.
+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 Java
+platform. 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.
+LWJGL is available under a BSD
+license, which means it's open source and freely available at no charge.
+Please visit us on the Freenode IRC Network: #LWJGL. Do idle
+if there is no one to answer any of your questions, we are on different
+timezones.
+
+
+
\ No newline at end of file
diff --git a/eclipse-update/org.lwjgl.doc/html/plugins.html b/eclipse-update/org.lwjgl.doc/html/plugins.html
new file mode 100644
index 00000000..4e5e6a23
--- /dev/null
+++ b/eclipse-update/org.lwjgl.doc/html/plugins.html
@@ -0,0 +1,60 @@
+
+
+
+
+
+ LWJGL Eclipse Plugins
+
+
+
+
+Overview
+The following plug-ins are provided:
+
+- org.lwjgl
+ - Platform independent jars and native libraries for Windows, Linux, Solaris and Mac OS X
+- org.lwjgl.doc
+ - Documentation, containing API documentation (Javadoc) and additional material such as this document your currently reading.
+- org.lwjgl.source
+ - Source files of LWJGL Java components
+- org.lwjgl.info
+ - Two Eclipse views, one for testing LWJGL and one printing out OpenGL specific information
+- org.lwjgl.tools
+ - Plugin for Java developers, providing a LWJGL library for the Java Build Path settings
+
+
+All plugins are briefly described in the following.
+
+LWJGL library: org.lwjgl
+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.
+
+LWJGL documentation and sources
+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.
+
+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.
+
+LWJGL for Java developers
+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.
+Read more about how to set up the library here.
+
+Information and test view
+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.
+Read more about how to open the views here.
+
+
\ No newline at end of file
diff --git a/eclipse-update/org.lwjgl.doc/html/tools.html b/eclipse-update/org.lwjgl.doc/html/tools.html
new file mode 100644
index 00000000..14f51c2d
--- /dev/null
+++ b/eclipse-update/org.lwjgl.doc/html/tools.html
@@ -0,0 +1,72 @@
+
+
+
+
+
+ LWJGL Tools
+
+
+
+LWJGL Tools
+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.
+
+You will also need the org.lwjgl plugin. JavaDoc and source code are
+retrieved from the org.lwjgl.doc and org.lwjgl.source plugins.
+
+Configure the LWJGL library
+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.
+
+
+
+
+
Fig. 1: Project properties
+
+
+Select "Add Library..." on the right hand side. This will open a new dialog window as shown in Figure 2.
+
+
+
+
+
Fig. 2: Add library
+
+
+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.
+
+
+
+
+
Fig. 3: Library info
+
+
+You have no successfully configured the LWJGL library, as shown in Figure 4. Press "OK" to finish the set up.
+
+
+
+
+
Fig. 4: Configured library
+
+
+
+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.
+
+
+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.
+
+
+
\ No newline at end of file
diff --git a/eclipse-update/org.lwjgl.doc/html/views.html b/eclipse-update/org.lwjgl.doc/html/views.html
new file mode 100644
index 00000000..b7eb579b
--- /dev/null
+++ b/eclipse-update/org.lwjgl.doc/html/views.html
@@ -0,0 +1,72 @@
+
+
+
+
+
+ LWJGL Eclipse Views
+
+
+
+LWJGL Eclipse Views
+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.
+
+
+Open the views
+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.
+
+
+
+
+
Fig. 1: Show View / Others...
+
+
+Under "Other", you will find two LWJGL views: "LWJGL Information View" and "LWJGL Test View" (see Figure 2).
+
+
+
+
+
Fig. 2: LWJGL views
+
+
+Select "LWJGL Information View" in order to open a simple text view, as shown in Figure 3.
+
+
+
+
+
Fig. 3: LWJGL Information View
+
+
+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.
+
+
+In order to test whether LWJGL and OpenGL works on your system, open the test view. The view should look similar to Figure 4.
+
+
+
+
+
Fig. 4: LWJGL Test View
+
+The OpenGL code of this torso actually stems from an Eclipse SWT snippet:
+snippet 195.
+
+
+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!
+
+
+
+
\ No newline at end of file
diff --git a/eclipse-update/org.lwjgl.doc/lwjgl_logo.png b/eclipse-update/org.lwjgl.doc/lwjgl_logo.png
new file mode 100644
index 00000000..e4d806ae
Binary files /dev/null and b/eclipse-update/org.lwjgl.doc/lwjgl_logo.png differ
diff --git a/eclipse-update/org.lwjgl.doc/plugin.xml b/eclipse-update/org.lwjgl.doc/plugin.xml
new file mode 100644
index 00000000..2b5a7f98
--- /dev/null
+++ b/eclipse-update/org.lwjgl.doc/plugin.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/eclipse-update/org.lwjgl.doc/toc.xml b/eclipse-update/org.lwjgl.doc/toc.xml
new file mode 100644
index 00000000..b34f353c
--- /dev/null
+++ b/eclipse-update/org.lwjgl.doc/toc.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/eclipse-update/org.lwjgl.feature.sdk/.project b/eclipse-update/org.lwjgl.feature.sdk/.project
new file mode 100644
index 00000000..149316ad
--- /dev/null
+++ b/eclipse-update/org.lwjgl.feature.sdk/.project
@@ -0,0 +1,17 @@
+
+
+ org.lwjgl.feature.sdk
+
+
+
+
+
+ org.eclipse.pde.FeatureBuilder
+
+
+
+
+
+ org.eclipse.pde.FeatureNature
+
+
diff --git a/eclipse-update/org.lwjgl.feature.sdk/build.properties b/eclipse-update/org.lwjgl.feature.sdk/build.properties
new file mode 100644
index 00000000..64f93a9f
--- /dev/null
+++ b/eclipse-update/org.lwjgl.feature.sdk/build.properties
@@ -0,0 +1 @@
+bin.includes = feature.xml
diff --git a/eclipse-update/org.lwjgl.feature.sdk/feature.xml b/eclipse-update/org.lwjgl.feature.sdk/feature.xml
new file mode 100644
index 00000000..f700042f
--- /dev/null
+++ b/eclipse-update/org.lwjgl.feature.sdk/feature.xml
@@ -0,0 +1,95 @@
+
+
+
+
+ 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
+
+
+
+ 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 (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.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/eclipse-update/org.lwjgl.feature.sdk/feature.xml.template b/eclipse-update/org.lwjgl.feature.sdk/feature.xml.template
new file mode 100644
index 00000000..aa67ebd3
--- /dev/null
+++ b/eclipse-update/org.lwjgl.feature.sdk/feature.xml.template
@@ -0,0 +1,95 @@
+
+
+
+
+ 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)
+
+
+
+ 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 (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.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/eclipse-update/org.lwjgl.feature/.project b/eclipse-update/org.lwjgl.feature/.project
new file mode 100644
index 00000000..8a573344
--- /dev/null
+++ b/eclipse-update/org.lwjgl.feature/.project
@@ -0,0 +1,17 @@
+
+
+ org.lwjgl.feature
+
+
+
+
+
+ org.eclipse.pde.FeatureBuilder
+
+
+
+
+
+ org.eclipse.pde.FeatureNature
+
+
diff --git a/eclipse-update/org.lwjgl.feature/build.properties b/eclipse-update/org.lwjgl.feature/build.properties
new file mode 100644
index 00000000..b6f6a064
--- /dev/null
+++ b/eclipse-update/org.lwjgl.feature/build.properties
@@ -0,0 +1,2 @@
+bin.includes = feature.xml,\
+ lwjgl_logo.png
diff --git a/eclipse-update/org.lwjgl.feature/feature.xml b/eclipse-update/org.lwjgl.feature/feature.xml
new file mode 100644
index 00000000..aa48c263
--- /dev/null
+++ b/eclipse-update/org.lwjgl.feature/feature.xml
@@ -0,0 +1,93 @@
+
+
+
+
+ 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
+
+
+
+ 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 (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.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/eclipse-update/org.lwjgl.feature/feature.xml.template b/eclipse-update/org.lwjgl.feature/feature.xml.template
new file mode 100644
index 00000000..a533cddd
--- /dev/null
+++ b/eclipse-update/org.lwjgl.feature/feature.xml.template
@@ -0,0 +1,72 @@
+
+
+
+
+ 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.
+
+
+
+ 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 (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.
+
+
+
+
+
+
+
+
+
+
diff --git a/eclipse-update/org.lwjgl.feature/lwjgl_logo.png b/eclipse-update/org.lwjgl.feature/lwjgl_logo.png
new file mode 100644
index 00000000..e4d806ae
Binary files /dev/null and b/eclipse-update/org.lwjgl.feature/lwjgl_logo.png differ
diff --git a/eclipse-update/org.lwjgl.info/.classpath b/eclipse-update/org.lwjgl.info/.classpath
new file mode 100755
index 00000000..1ffb089d
--- /dev/null
+++ b/eclipse-update/org.lwjgl.info/.classpath
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/eclipse-update/org.lwjgl.info/.project b/eclipse-update/org.lwjgl.info/.project
new file mode 100755
index 00000000..3acba453
--- /dev/null
+++ b/eclipse-update/org.lwjgl.info/.project
@@ -0,0 +1,28 @@
+
+
+ org.lwjgl.info
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.pde.ManifestBuilder
+
+
+
+
+ org.eclipse.pde.SchemaBuilder
+
+
+
+
+
+ org.eclipse.pde.PluginNature
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/eclipse-update/org.lwjgl.info/.settings/org.eclipse.jdt.core.prefs b/eclipse-update/org.lwjgl.info/.settings/org.eclipse.jdt.core.prefs
new file mode 100755
index 00000000..565eda3c
--- /dev/null
+++ b/eclipse-update/org.lwjgl.info/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#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
diff --git a/eclipse-update/org.lwjgl.info/META-INF/MANIFEST.MF b/eclipse-update/org.lwjgl.info/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..c7bfb2f7
--- /dev/null
+++ b/eclipse-update/org.lwjgl.info/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+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
diff --git a/eclipse-update/org.lwjgl.info/about.html b/eclipse-update/org.lwjgl.info/about.html
new file mode 100755
index 00000000..3d880e51
--- /dev/null
+++ b/eclipse-update/org.lwjgl.info/about.html
@@ -0,0 +1,60 @@
+
+
+
+About
+
+
+
+
+About This Content
+The Lightweight Java Game Library (LWJGL) is a solution aimed
+directly at professional and amateur Java programmers alike to enable commercial quality games to be written in Java.
+LWJGL provides developers access to high performance crossplatform
+libraries such as OpenGL (Open Graphics Library) and OpenAL (Open Audio Library)
+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.
+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 Java
+platform. 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.
+LWJGL is available under a BSD
+license, which means it's open source and freely available at no charge.
+Please visit us on the Freenode IRC Network: #LWJGL. Do idle
+if there is no one to answer any of your questions, we are on different
+timezones.
+
+Plugin assembly
+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
+
+Third party code
+
+IBM
+The LWJGL Textview contains code copyright under the Eclipse Public License (EPL):
+
+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
+ http://www.eclipse.org/legal/epl-v10.html
+
+The source of this code can be found at:
+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
+
+
+SGI
+
+LWJGL contains code copyright by SGI. This code is copyright under the SGI FreeB v1.1, see http://oss.sgi.com/projects/FreeB/. Note that this license can be updated to version 2.0.
+
+
+
+
+
diff --git a/eclipse-update/org.lwjgl.info/build.properties b/eclipse-update/org.lwjgl.info/build.properties
new file mode 100755
index 00000000..6d465dae
--- /dev/null
+++ b/eclipse-update/org.lwjgl.info/build.properties
@@ -0,0 +1,9 @@
+source.. = src/java/
+output.. = build/classes/
+bin.includes = META-INF/,\
+ .,\
+ icons/,\
+ lwjgl_logo.png,\
+ plugin.xml,\
+ about.html
+src.includes = src/
diff --git a/eclipse-update/org.lwjgl.info/icons/lwjgl_logo_16.gif b/eclipse-update/org.lwjgl.info/icons/lwjgl_logo_16.gif
new file mode 100755
index 00000000..a0252157
Binary files /dev/null and b/eclipse-update/org.lwjgl.info/icons/lwjgl_logo_16.gif differ
diff --git a/eclipse-update/org.lwjgl.info/lwjgl_logo.png b/eclipse-update/org.lwjgl.info/lwjgl_logo.png
new file mode 100755
index 00000000..e4d806ae
Binary files /dev/null and b/eclipse-update/org.lwjgl.info/lwjgl_logo.png differ
diff --git a/eclipse-update/org.lwjgl.info/plugin.xml b/eclipse-update/org.lwjgl.info/plugin.xml
new file mode 100755
index 00000000..71b7fd05
--- /dev/null
+++ b/eclipse-update/org.lwjgl.info/plugin.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/eclipse-update/org.lwjgl.info/src/java/org/lwjgl/info/FpsStatusLineItem.java b/eclipse-update/org.lwjgl.info/src/java/org/lwjgl/info/FpsStatusLineItem.java
new file mode 100755
index 00000000..132fd8a5
--- /dev/null
+++ b/eclipse-update/org.lwjgl.info/src/java/org/lwjgl/info/FpsStatusLineItem.java
@@ -0,0 +1,186 @@
+/*******************************************************************************
+ * 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");
+ }
+ }
+}
diff --git a/eclipse-update/org.lwjgl.info/src/java/org/lwjgl/info/LWJGLInfoView.java b/eclipse-update/org.lwjgl.info/src/java/org/lwjgl/info/LWJGLInfoView.java
new file mode 100644
index 00000000..e5b4eb85
--- /dev/null
+++ b/eclipse-update/org.lwjgl.info/src/java/org/lwjgl/info/LWJGLInfoView.java
@@ -0,0 +1,609 @@
+/*******************************************************************************
+ * 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.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 );
+
+ 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";
+ }
+
+ /**
+ * @return
+ */
+ public static String gatherInformation() {
+ StringBuffer strb = new StringBuffer();
+
+ try {
+ Display.setFullscreen(false);
+ Display.create();
+ } catch (LWJGLException ex) {
+ warnNL(strb, "Error initializing OpenGL display: " + ex.getMessage());
+ }
+
+ 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 capInfos = new TreeMap();
+ 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 capInfos) {
+ String currentGroup = "*NOGROUP*";
+ Set groupInfosSupported = new TreeSet();
+ Set groupInfosNA = new TreeSet();
+ 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 groupInfosSupported, Set 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 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) {
+ String s = gatherInformation();
+ System.out.println(s);
+ }
+
+ /**
+ * {@inheritDoc}
+ * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
+ */
+ @Override
+ public void setFocus() {
+ // TODO implement method LWJGLInfoView.setFocus
+
+ }
+
+}
diff --git a/eclipse-update/org.lwjgl.info/src/java/org/lwjgl/info/LWJGLTestView.java b/eclipse-update/org.lwjgl.info/src/java/org/lwjgl/info/LWJGLTestView.java
new file mode 100755
index 00000000..baa99790
--- /dev/null
+++ b/eclipse-update/org.lwjgl.info/src/java/org/lwjgl/info/LWJGLTestView.java
@@ -0,0 +1,203 @@
+/*******************************************************************************
+ * 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
+ * snippet 195.
+ *
+ * @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);
+
+ }
+ }
+ };
+ }
+
+}
diff --git a/eclipse-update/org.lwjgl.source/.project b/eclipse-update/org.lwjgl.source/.project
new file mode 100644
index 00000000..c2d3bf7c
--- /dev/null
+++ b/eclipse-update/org.lwjgl.source/.project
@@ -0,0 +1,11 @@
+
+
+ org.lwjgl.source
+
+
+
+
+
+
+
+
diff --git a/eclipse-update/org.lwjgl.source/META-INF/MANIFEST.MF b/eclipse-update/org.lwjgl.source/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..cd90e9e5
--- /dev/null
+++ b/eclipse-update/org.lwjgl.source/META-INF/MANIFEST.MF
@@ -0,0 +1,7 @@
+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
diff --git a/eclipse-update/org.lwjgl.source/about.html b/eclipse-update/org.lwjgl.source/about.html
new file mode 100644
index 00000000..d204f100
--- /dev/null
+++ b/eclipse-update/org.lwjgl.source/about.html
@@ -0,0 +1,55 @@
+
+
+
+About
+
+
+
+
+About This Content
+The Lightweight Java Game Library (LWJGL) is a solution aimed
+directly at professional and amateur Java programmers alike to enable commercial quality games to be written in Java.
+LWJGL provides developers access to high performance crossplatform
+libraries such as OpenGL (Open Graphics Library) and OpenAL (Open Audio Library)
+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.
+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 Java
+platform. 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.
+LWJGL is available under a BSD
+license, which means it's open source and freely available at no charge.
+Please visit us on the Freenode IRC Network: #LWJGL. Do idle
+if there is no one to answer any of your questions, we are on different
+timezones.
+
+
+
+Plug-Ins
+The following plug-ins are provided:
+
+- org.lwjgl
+ - Platform independent jars and native libraries for Windows, Linux and Mac OS X
+- org.lwjgl.doc
+ - Documentation (JavaDoc)
+- org.lwjgl.source
+ - Source files
+- org.lwjgl.tools
+ - Developer tools
+- org.lwjgl.info
+ - LWJGL test and info view
+
+
+
+
+
+
diff --git a/eclipse-update/org.lwjgl.source/build.properties b/eclipse-update/org.lwjgl.source/build.properties
new file mode 100644
index 00000000..edb9a818
--- /dev/null
+++ b/eclipse-update/org.lwjgl.source/build.properties
@@ -0,0 +1,10 @@
+bin.includes = META-INF/,\
+ about.html,\
+ lwjgl_logo.png,\
+ plugin.xml,\
+ src/
+src.includes = src/,\
+ lwjgl_logo.png,\
+ about.html,\
+ plugin.xml,\
+ META-INF/
diff --git a/eclipse-update/org.lwjgl.source/lwjgl_logo.png b/eclipse-update/org.lwjgl.source/lwjgl_logo.png
new file mode 100644
index 00000000..e4d806ae
Binary files /dev/null and b/eclipse-update/org.lwjgl.source/lwjgl_logo.png differ
diff --git a/eclipse-update/org.lwjgl.source/plugin.xml b/eclipse-update/org.lwjgl.source/plugin.xml
new file mode 100644
index 00000000..bd34b669
--- /dev/null
+++ b/eclipse-update/org.lwjgl.source/plugin.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/eclipse-update/org.lwjgl.tools/.classpath b/eclipse-update/org.lwjgl.tools/.classpath
new file mode 100644
index 00000000..1ffb089d
--- /dev/null
+++ b/eclipse-update/org.lwjgl.tools/.classpath
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/eclipse-update/org.lwjgl.tools/.project b/eclipse-update/org.lwjgl.tools/.project
new file mode 100644
index 00000000..423f5000
--- /dev/null
+++ b/eclipse-update/org.lwjgl.tools/.project
@@ -0,0 +1,28 @@
+
+
+ org.lwjgl.tools
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.pde.ManifestBuilder
+
+
+
+
+ org.eclipse.pde.SchemaBuilder
+
+
+
+
+
+ org.eclipse.pde.PluginNature
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/eclipse-update/org.lwjgl.tools/.settings/org.eclipse.jdt.core.prefs b/eclipse-update/org.lwjgl.tools/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000..739259f1
--- /dev/null
+++ b/eclipse-update/org.lwjgl.tools/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#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
diff --git a/eclipse-update/org.lwjgl.tools/META-INF/MANIFEST.MF b/eclipse-update/org.lwjgl.tools/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..dab64a84
--- /dev/null
+++ b/eclipse-update/org.lwjgl.tools/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+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
diff --git a/eclipse-update/org.lwjgl.tools/about.html b/eclipse-update/org.lwjgl.tools/about.html
new file mode 100644
index 00000000..fc8c5f66
--- /dev/null
+++ b/eclipse-update/org.lwjgl.tools/about.html
@@ -0,0 +1,33 @@
+
+
+
+
+About
+
+
+About This Content
+
+November, 2010
+License
+
+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 http://www.eclipse.org/legal/epl-v10.html.
+For purposes of the EPL, "Program" will mean the Content.
+
+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 http://www.eclipse.org.
+
+Third party code
+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.
+
+
+
\ No newline at end of file
diff --git a/eclipse-update/org.lwjgl.tools/build.properties b/eclipse-update/org.lwjgl.tools/build.properties
new file mode 100644
index 00000000..42e9c6e1
--- /dev/null
+++ b/eclipse-update/org.lwjgl.tools/build.properties
@@ -0,0 +1,6 @@
+source.. = src/java/
+output.. = build/classes/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ about.html
diff --git a/eclipse-update/org.lwjgl.tools/plugin.xml b/eclipse-update/org.lwjgl.tools/plugin.xml
new file mode 100644
index 00000000..e62e401c
--- /dev/null
+++ b/eclipse-update/org.lwjgl.tools/plugin.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/eclipse-update/org.lwjgl.tools/src/java/org/lwjgl/tools/Activator.java b/eclipse-update/org.lwjgl.tools/src/java/org/lwjgl/tools/Activator.java
new file mode 100644
index 00000000..7d9993af
--- /dev/null
+++ b/eclipse-update/org.lwjgl.tools/src/java/org/lwjgl/tools/Activator.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * 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;
+ }
+
+}
diff --git a/eclipse-update/org.lwjgl.tools/src/java/org/lwjgl/tools/BuildPathSupport.java b/eclipse-update/org.lwjgl.tools/src/java/org/lwjgl/tools/BuildPathSupport.java
new file mode 100644
index 00000000..e7021350
--- /dev/null
+++ b/eclipse-update/org.lwjgl.tools/src/java/org/lwjgl/tools/BuildPathSupport.java
@@ -0,0 +1,269 @@
+/*******************************************************************************
+ * 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;
+ }
+}
diff --git a/eclipse-update/org.lwjgl.tools/src/java/org/lwjgl/tools/LWJGLClasspathContainerInitializer.java b/eclipse-update/org.lwjgl.tools/src/java/org/lwjgl/tools/LWJGLClasspathContainerInitializer.java
new file mode 100644
index 00000000..5e95d689
--- /dev/null
+++ b/eclipse-update/org.lwjgl.tools/src/java/org/lwjgl/tools/LWJGLClasspathContainerInitializer.java
@@ -0,0 +1,233 @@
+/*******************************************************************************
+ * 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 affectedProjects = new ArrayList();
+
+ 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;
+ }
+
+}
diff --git a/eclipse-update/org.lwjgl.tools/src/java/org/lwjgl/tools/LWJGLClasspathContainerPage.java b/eclipse-update/org.lwjgl.tools/src/java/org/lwjgl/tools/LWJGLClasspathContainerPage.java
new file mode 100644
index 00000000..76c850c6
--- /dev/null
+++ b/eclipse-update/org.lwjgl.tools/src/java/org/lwjgl/tools/LWJGLClasspathContainerPage.java
@@ -0,0 +1,279 @@
+/*******************************************************************************
+ * 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 setLines = new TreeSet();
+ 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 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());
+
+ }
+ }
+
+}
diff --git a/eclipse-update/org.lwjgl.updatesite/.project b/eclipse-update/org.lwjgl.updatesite/.project
new file mode 100644
index 00000000..62f4a96e
--- /dev/null
+++ b/eclipse-update/org.lwjgl.updatesite/.project
@@ -0,0 +1,17 @@
+
+
+ org.lwjgl.updatesite
+
+
+
+
+
+ org.eclipse.pde.UpdateSiteBuilder
+
+
+
+
+
+ org.eclipse.pde.UpdateSiteNature
+
+
diff --git a/eclipse-update/org.lwjgl.updatesite/about.html b/eclipse-update/org.lwjgl.updatesite/about.html
new file mode 100644
index 00000000..3d880e51
--- /dev/null
+++ b/eclipse-update/org.lwjgl.updatesite/about.html
@@ -0,0 +1,60 @@
+
+
+
+About
+
+
+
+
+About This Content
+The Lightweight Java Game Library (LWJGL) is a solution aimed
+directly at professional and amateur Java programmers alike to enable commercial quality games to be written in Java.
+LWJGL provides developers access to high performance crossplatform
+libraries such as OpenGL (Open Graphics Library) and OpenAL (Open Audio Library)
+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.
+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 Java
+platform. 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.
+LWJGL is available under a BSD
+license, which means it's open source and freely available at no charge.
+Please visit us on the Freenode IRC Network: #LWJGL. Do idle
+if there is no one to answer any of your questions, we are on different
+timezones.
+
+Plugin assembly
+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
+
+Third party code
+
+IBM
+The LWJGL Textview contains code copyright under the Eclipse Public License (EPL):
+
+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
+ http://www.eclipse.org/legal/epl-v10.html
+
+The source of this code can be found at:
+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
+
+
+SGI
+
+LWJGL contains code copyright by SGI. This code is copyright under the SGI FreeB v1.1, see http://oss.sgi.com/projects/FreeB/. Note that this license can be updated to version 2.0.
+
+
+
+
+
diff --git a/eclipse-update/org.lwjgl.updatesite/index.html b/eclipse-update/org.lwjgl.updatesite/index.html
new file mode 100644
index 00000000..6f89f6e7
--- /dev/null
+++ b/eclipse-update/org.lwjgl.updatesite/index.html
@@ -0,0 +1,60 @@
+
+
+org.lwjgl.updatesite
+
+
+
+
+
+
+
+
+
diff --git a/eclipse-update/org.lwjgl.updatesite/site.xml b/eclipse-update/org.lwjgl.updatesite/site.xml
new file mode 100644
index 00000000..ba0306cc
--- /dev/null
+++ b/eclipse-update/org.lwjgl.updatesite/site.xml
@@ -0,0 +1,17 @@
+
+
+
+ Update site for LWJGL and related features and plugins.
+
+
+
+
+
+
+
+
+
+ Java 3D libraries such as LWJGL.
+
+
+
diff --git a/eclipse-update/org.lwjgl.updatesite/site.xml.template b/eclipse-update/org.lwjgl.updatesite/site.xml.template
new file mode 100644
index 00000000..597adecb
--- /dev/null
+++ b/eclipse-update/org.lwjgl.updatesite/site.xml.template
@@ -0,0 +1,17 @@
+
+
+
+ Update site for LWJGL and related features and plugins.
+
+
+
+
+
+
+
+
+
+ Java 3D libraries such as LWJGL.
+
+
+
diff --git a/eclipse-update/org.lwjgl.updatesite/web/site.css b/eclipse-update/org.lwjgl.updatesite/web/site.css
new file mode 100644
index 00000000..62c6f9ff
--- /dev/null
+++ b/eclipse-update/org.lwjgl.updatesite/web/site.css
@@ -0,0 +1,12 @@
+
diff --git a/eclipse-update/org.lwjgl.updatesite/web/site.xsl b/eclipse-update/org.lwjgl.updatesite/web/site.xsl
new file mode 100644
index 00000000..bdb7ce81
--- /dev/null
+++ b/eclipse-update/org.lwjgl.updatesite/web/site.xsl
@@ -0,0 +1,214 @@
+
+
+
+
+
+
+
+ org.lwjgl.updatesite
+
+
+
+ org.lwjgl.updatesite
+
+
+
+
+
+
+
+
+
+
+
+
+
+ dark-row
+
+
+ light-row
+
+
+
+
+
+
+
+
+ ( - )
+
+
+
+ -
+
+
+
+ |
+
+
+
+ | Operating Systems: |
+ |
+
+
+
+ | Windows Systems: |
+ |
+
+
+
+ | Languages: |
+ |
+
+
+
+ | Architecture: |
+ |
+
+
+
+ |
+
+
+
|
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ dark-row
+
+
+ light-row
+
+
+
+
+
+
+
+
+ ( - )
+
+
+
+ -
+
+
+
+ |
+
+
+
+ | Operating Systems: |
+ |
+
+
+
+ | Windows Systems: |
+ |
+
+
+
+ | Languages: |
+ |
+
+
+
+ | Architecture: |
+ |
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+ dark-row
+
+
+ light-row
+
+
+
+
+
+
+
+
+ ( - )
+
+
+
+ -
+
+
+
+ |
+
+
+
+ | Operating Systems: |
+ |
+
+
+
+ | Windows Systems: |
+ |
+
+
+
+ | Languages: |
+ |
+
+
+
+ | Architecture: |
+ |
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
diff --git a/eclipse-update/org.lwjgl/.classpath b/eclipse-update/org.lwjgl/.classpath
new file mode 100644
index 00000000..b31fe69b
--- /dev/null
+++ b/eclipse-update/org.lwjgl/.classpath
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/eclipse-update/org.lwjgl/.project b/eclipse-update/org.lwjgl/.project
new file mode 100644
index 00000000..3ddc24b6
--- /dev/null
+++ b/eclipse-update/org.lwjgl/.project
@@ -0,0 +1,28 @@
+
+
+ org.lwjgl
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.pde.ManifestBuilder
+
+
+
+
+ org.eclipse.pde.SchemaBuilder
+
+
+
+
+
+ org.eclipse.pde.PluginNature
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/eclipse-update/org.lwjgl/.settings/org.eclipse.jdt.core.prefs b/eclipse-update/org.lwjgl/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000..311cf837
--- /dev/null
+++ b/eclipse-update/org.lwjgl/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#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
diff --git a/eclipse-update/org.lwjgl/AppleJavaExtensions.jar b/eclipse-update/org.lwjgl/AppleJavaExtensions.jar
new file mode 100644
index 00000000..160d62b6
Binary files /dev/null and b/eclipse-update/org.lwjgl/AppleJavaExtensions.jar differ
diff --git a/eclipse-update/org.lwjgl/META-INF/MANIFEST.MF b/eclipse-update/org.lwjgl/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..982ee914
--- /dev/null
+++ b/eclipse-update/org.lwjgl/META-INF/MANIFEST.MF
@@ -0,0 +1,38 @@
+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
diff --git a/eclipse-update/org.lwjgl/build.properties b/eclipse-update/org.lwjgl/build.properties
new file mode 100644
index 00000000..fa12c573
--- /dev/null
+++ b/eclipse-update/org.lwjgl/build.properties
@@ -0,0 +1,11 @@
+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/
diff --git a/eclipse-update/org.lwjgl/jinput.jar b/eclipse-update/org.lwjgl/jinput.jar
new file mode 100644
index 00000000..7c2b6b06
Binary files /dev/null and b/eclipse-update/org.lwjgl/jinput.jar differ
diff --git a/eclipse-update/org.lwjgl/lwjgl.jar b/eclipse-update/org.lwjgl/lwjgl.jar
new file mode 100644
index 00000000..46a7092f
Binary files /dev/null and b/eclipse-update/org.lwjgl/lwjgl.jar differ
diff --git a/eclipse-update/org.lwjgl/lwjgl_test.jar b/eclipse-update/org.lwjgl/lwjgl_test.jar
new file mode 100644
index 00000000..b9d83ce3
Binary files /dev/null and b/eclipse-update/org.lwjgl/lwjgl_test.jar differ
diff --git a/eclipse-update/org.lwjgl/lwjgl_util.jar b/eclipse-update/org.lwjgl/lwjgl_util.jar
new file mode 100644
index 00000000..6e7c7586
Binary files /dev/null and b/eclipse-update/org.lwjgl/lwjgl_util.jar differ
diff --git a/eclipse-update/org.lwjgl/lwjgl_util_applet.jar b/eclipse-update/org.lwjgl/lwjgl_util_applet.jar
new file mode 100644
index 00000000..1eee7f97
Binary files /dev/null and b/eclipse-update/org.lwjgl/lwjgl_util_applet.jar differ
diff --git a/eclipse-update/org.lwjgl/lzma.jar b/eclipse-update/org.lwjgl/lzma.jar
new file mode 100644
index 00000000..a2572d37
Binary files /dev/null and b/eclipse-update/org.lwjgl/lzma.jar differ
diff --git a/eclipse-update/org.lwjgl/native/linux/libjinput-linux.so b/eclipse-update/org.lwjgl/native/linux/libjinput-linux.so
new file mode 100644
index 00000000..3cdc4397
Binary files /dev/null and b/eclipse-update/org.lwjgl/native/linux/libjinput-linux.so differ
diff --git a/eclipse-update/org.lwjgl/native/linux/libjinput-linux64.so b/eclipse-update/org.lwjgl/native/linux/libjinput-linux64.so
new file mode 100644
index 00000000..de1ee5f3
Binary files /dev/null and b/eclipse-update/org.lwjgl/native/linux/libjinput-linux64.so differ
diff --git a/eclipse-update/org.lwjgl/native/linux/liblwjgl.so b/eclipse-update/org.lwjgl/native/linux/liblwjgl.so
new file mode 100644
index 00000000..011a17f4
Binary files /dev/null and b/eclipse-update/org.lwjgl/native/linux/liblwjgl.so differ
diff --git a/eclipse-update/org.lwjgl/native/linux/liblwjgl64.so b/eclipse-update/org.lwjgl/native/linux/liblwjgl64.so
new file mode 100644
index 00000000..2f02f6ea
Binary files /dev/null and b/eclipse-update/org.lwjgl/native/linux/liblwjgl64.so differ
diff --git a/eclipse-update/org.lwjgl/native/linux/libopenal.so b/eclipse-update/org.lwjgl/native/linux/libopenal.so
new file mode 100644
index 00000000..8ddc5fed
Binary files /dev/null and b/eclipse-update/org.lwjgl/native/linux/libopenal.so differ
diff --git a/eclipse-update/org.lwjgl/native/linux/libopenal64.so b/eclipse-update/org.lwjgl/native/linux/libopenal64.so
new file mode 100644
index 00000000..9d74310b
Binary files /dev/null and b/eclipse-update/org.lwjgl/native/linux/libopenal64.so differ
diff --git a/eclipse-update/org.lwjgl/native/macosx/libjinput-osx.jnilib b/eclipse-update/org.lwjgl/native/macosx/libjinput-osx.jnilib
new file mode 100644
index 00000000..59a3eab5
Binary files /dev/null and b/eclipse-update/org.lwjgl/native/macosx/libjinput-osx.jnilib differ
diff --git a/eclipse-update/org.lwjgl/native/macosx/liblwjgl.jnilib b/eclipse-update/org.lwjgl/native/macosx/liblwjgl.jnilib
new file mode 100644
index 00000000..484c849d
Binary files /dev/null and b/eclipse-update/org.lwjgl/native/macosx/liblwjgl.jnilib differ
diff --git a/eclipse-update/org.lwjgl/native/macosx/openal.dylib b/eclipse-update/org.lwjgl/native/macosx/openal.dylib
new file mode 100644
index 00000000..cb8e4584
Binary files /dev/null and b/eclipse-update/org.lwjgl/native/macosx/openal.dylib differ
diff --git a/eclipse-update/org.lwjgl/native/solaris/liblwjgl.so b/eclipse-update/org.lwjgl/native/solaris/liblwjgl.so
new file mode 100644
index 00000000..abbd345c
Binary files /dev/null and b/eclipse-update/org.lwjgl/native/solaris/liblwjgl.so differ
diff --git a/eclipse-update/org.lwjgl/native/solaris/liblwjgl64.so b/eclipse-update/org.lwjgl/native/solaris/liblwjgl64.so
new file mode 100644
index 00000000..237933ae
Binary files /dev/null and b/eclipse-update/org.lwjgl/native/solaris/liblwjgl64.so differ
diff --git a/eclipse-update/org.lwjgl/native/solaris/libopenal.so b/eclipse-update/org.lwjgl/native/solaris/libopenal.so
new file mode 100644
index 00000000..71efee2a
Binary files /dev/null and b/eclipse-update/org.lwjgl/native/solaris/libopenal.so differ
diff --git a/eclipse-update/org.lwjgl/native/solaris/libopenal64.so b/eclipse-update/org.lwjgl/native/solaris/libopenal64.so
new file mode 100644
index 00000000..d211b09b
Binary files /dev/null and b/eclipse-update/org.lwjgl/native/solaris/libopenal64.so differ
diff --git a/eclipse-update/org.lwjgl/native/windows/OpenAL32.dll b/eclipse-update/org.lwjgl/native/windows/OpenAL32.dll
new file mode 100644
index 00000000..42d88769
Binary files /dev/null and b/eclipse-update/org.lwjgl/native/windows/OpenAL32.dll differ
diff --git a/eclipse-update/org.lwjgl/native/windows/OpenAL64.dll b/eclipse-update/org.lwjgl/native/windows/OpenAL64.dll
new file mode 100644
index 00000000..dda83c57
Binary files /dev/null and b/eclipse-update/org.lwjgl/native/windows/OpenAL64.dll differ
diff --git a/eclipse-update/org.lwjgl/native/windows/jinput-dx8.dll b/eclipse-update/org.lwjgl/native/windows/jinput-dx8.dll
new file mode 100644
index 00000000..e65ccd92
Binary files /dev/null and b/eclipse-update/org.lwjgl/native/windows/jinput-dx8.dll differ
diff --git a/eclipse-update/org.lwjgl/native/windows/jinput-dx8_64.dll b/eclipse-update/org.lwjgl/native/windows/jinput-dx8_64.dll
new file mode 100644
index 00000000..67305896
Binary files /dev/null and b/eclipse-update/org.lwjgl/native/windows/jinput-dx8_64.dll differ
diff --git a/eclipse-update/org.lwjgl/native/windows/jinput-raw.dll b/eclipse-update/org.lwjgl/native/windows/jinput-raw.dll
new file mode 100644
index 00000000..e0f98495
Binary files /dev/null and b/eclipse-update/org.lwjgl/native/windows/jinput-raw.dll differ
diff --git a/eclipse-update/org.lwjgl/native/windows/jinput-raw_64.dll b/eclipse-update/org.lwjgl/native/windows/jinput-raw_64.dll
new file mode 100644
index 00000000..3d2b3ada
Binary files /dev/null and b/eclipse-update/org.lwjgl/native/windows/jinput-raw_64.dll differ
diff --git a/eclipse-update/org.lwjgl/native/windows/lwjgl.dll b/eclipse-update/org.lwjgl/native/windows/lwjgl.dll
new file mode 100644
index 00000000..d0dfbd57
Binary files /dev/null and b/eclipse-update/org.lwjgl/native/windows/lwjgl.dll differ
diff --git a/eclipse-update/org.lwjgl/native/windows/lwjgl64.dll b/eclipse-update/org.lwjgl/native/windows/lwjgl64.dll
new file mode 100644
index 00000000..413fe831
Binary files /dev/null and b/eclipse-update/org.lwjgl/native/windows/lwjgl64.dll differ
diff --git a/eclipse-update/org.lwjgl/src/java/org/lwjgl/Activator.java b/eclipse-update/org.lwjgl/src/java/org/lwjgl/Activator.java
new file mode 100644
index 00000000..8da72e93
--- /dev/null
+++ b/eclipse-update/org.lwjgl/src/java/org/lwjgl/Activator.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * 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;
+ }
+
+}
diff --git a/eclipse-update/org.lwjgl/src/java/org/lwjgl/LibraryPathUtil.java b/eclipse-update/org.lwjgl/src/java/org/lwjgl/LibraryPathUtil.java
new file mode 100644
index 00000000..893f7fc6
--- /dev/null
+++ b/eclipse-update/org.lwjgl/src/java/org/lwjgl/LibraryPathUtil.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * 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;
+ }
+
+}
diff --git a/eclipse-update/org.lwjgl/src/java/org/lwjgl/OSNotSupportedException.java b/eclipse-update/org.lwjgl/src/java/org/lwjgl/OSNotSupportedException.java
new file mode 100644
index 00000000..551dd25e
--- /dev/null
+++ b/eclipse-update/org.lwjgl/src/java/org/lwjgl/OSNotSupportedException.java
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * 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();
+ }
+
+
+}