You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(134) |
Sep
(52) |
Oct
(13) |
Nov
(342) |
Dec
(163) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(44) |
Feb
(62) |
Mar
(158) |
Apr
(38) |
May
(70) |
Jun
(58) |
Jul
(104) |
Aug
(207) |
Sep
(83) |
Oct
(122) |
Nov
(23) |
Dec
(49) |
| 2004 |
Jan
(119) |
Feb
(132) |
Mar
(192) |
Apr
(140) |
May
(77) |
Jun
(74) |
Jul
(201) |
Aug
(63) |
Sep
(102) |
Oct
(70) |
Nov
(173) |
Dec
(78) |
| 2005 |
Jan
(174) |
Feb
(197) |
Mar
(105) |
Apr
(59) |
May
(77) |
Jun
(43) |
Jul
(21) |
Aug
(18) |
Sep
(47) |
Oct
(37) |
Nov
(74) |
Dec
(50) |
| 2006 |
Jan
(44) |
Feb
(19) |
Mar
(32) |
Apr
(24) |
May
(31) |
Jun
(55) |
Jul
(138) |
Aug
(28) |
Sep
(12) |
Oct
(41) |
Nov
(58) |
Dec
(24) |
| 2007 |
Jan
(28) |
Feb
(14) |
Mar
(10) |
Apr
(68) |
May
(30) |
Jun
(26) |
Jul
(18) |
Aug
(63) |
Sep
(19) |
Oct
(29) |
Nov
(20) |
Dec
(10) |
| 2008 |
Jan
(38) |
Feb
(7) |
Mar
(37) |
Apr
(120) |
May
(41) |
Jun
(36) |
Jul
(39) |
Aug
(24) |
Sep
(28) |
Oct
(30) |
Nov
(36) |
Dec
(75) |
| 2009 |
Jan
(46) |
Feb
(22) |
Mar
(50) |
Apr
(70) |
May
(134) |
Jun
(105) |
Jul
(75) |
Aug
(34) |
Sep
(38) |
Oct
(34) |
Nov
(19) |
Dec
(20) |
| 2010 |
Jan
(11) |
Feb
(20) |
Mar
(65) |
Apr
(83) |
May
(104) |
Jun
(73) |
Jul
(78) |
Aug
(57) |
Sep
(43) |
Oct
(35) |
Nov
(9) |
Dec
(4) |
| 2011 |
Jan
(21) |
Feb
(11) |
Mar
(18) |
Apr
(10) |
May
(18) |
Jun
(15) |
Jul
(48) |
Aug
(25) |
Sep
(17) |
Oct
(45) |
Nov
(15) |
Dec
(12) |
| 2012 |
Jan
(21) |
Feb
(9) |
Mar
(12) |
Apr
(9) |
May
(9) |
Jun
(5) |
Jul
(1) |
Aug
(10) |
Sep
(12) |
Oct
(1) |
Nov
(28) |
Dec
(5) |
| 2013 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2016 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <ka...@us...> - 2011-09-26 20:04:06
|
Revision: 3641
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3641&view=rev
Author: kappa1
Date: 2011-09-26 20:03:59 +0000 (Mon, 26 Sep 2011)
Log Message:
-----------
limit scope of fix for Display.setParent when running in xembedded mode.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2011-09-25 21:57:49 UTC (rev 3640)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2011-09-26 20:03:59 UTC (rev 3641)
@@ -299,7 +299,7 @@
private static native void synchronize(long display, boolean synchronize);
private static int globalErrorHandler(long display, long event_ptr, long error_display, long serial, long error_code, long request_code, long minor_code) throws LWJGLException {
- if (xembedded) return 0; // ignore X errors in xembeded mode to fix browser issues like dragging or switching tabs
+ if (xembedded && request_code == 42) return 0; // ignore X error in xembeded mode to fix a browser issue when dragging or switching tabs
if (display == getDisplay()) {
String error_msg = getErrorText(display, error_code);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2011-09-25 21:57:55
|
Revision: 3640
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3640&view=rev
Author: kappa1
Date: 2011-09-25 21:57:49 +0000 (Sun, 25 Sep 2011)
Log Message:
-----------
Fix issues with LWJGL Applets when dragging or switching browser tabs
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2011-09-20 19:46:33 UTC (rev 3639)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2011-09-25 21:57:49 UTC (rev 3640)
@@ -142,7 +142,7 @@
private Canvas parent;
private long parent_window;
- private boolean xembedded;
+ private static boolean xembedded;
private long parent_proxy_focus_window;
private boolean parent_focused;
private long last_window_focus = 0;
@@ -299,6 +299,8 @@
private static native void synchronize(long display, boolean synchronize);
private static int globalErrorHandler(long display, long event_ptr, long error_display, long serial, long error_code, long request_code, long minor_code) throws LWJGLException {
+ if (xembedded) return 0; // ignore X errors in xembeded mode to fix browser issues like dragging or switching tabs
+
if (display == getDisplay()) {
String error_msg = getErrorText(display, error_code);
throw new LWJGLException("X Error - disp: 0x" + Long.toHexString(error_display) + " serial: " + serial + " error: " + error_msg + " request_code: " + request_code + " minor_code: " + minor_code);
@@ -924,12 +926,6 @@
if (xembedded) {
long current_focus_window = 0;
- try {
- current_focus_window = nGetInputFocus(getDisplay());
- } catch (LWJGLException e) {
- return; // fail silently as it can fail whilst splitting browser tabs
- }
-
if (last_window_focus != current_focus_window || parent_focused != focused) {
if (isParentWindowActive(current_focus_window)) {
if (parent_focused) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2011-09-20 19:46:39
|
Revision: 3639
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3639&view=rev
Author: kappa1
Date: 2011-09-20 19:46:33 +0000 (Tue, 20 Sep 2011)
Log Message:
-----------
fix for keyboard input not working on linux when an input method is set (like ibus).
Modified Paths:
--------------
trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxKeyboard.c
Modified: trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxKeyboard.c
===================================================================
--- trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxKeyboard.c 2011-09-15 17:22:43 UTC (rev 3638)
+++ trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxKeyboard.c 2011-09-20 19:46:33 UTC (rev 3639)
@@ -84,6 +84,7 @@
JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_openIM(JNIEnv *env, jclass unused, jlong display_ptr) {
Display *disp = (Display *)(intptr_t)display_ptr;
+ XSetLocaleModifiers ("@im=none");
XIM xim = XOpenIM(disp, NULL, NULL, NULL);
return (intptr_t)xim;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2011-09-15 17:22:49
|
Revision: 3638
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3638&view=rev
Author: spasi
Date: 2011-09-15 17:22:43 +0000 (Thu, 15 Sep 2011)
Log Message:
-----------
Fix for GL32 support on MacOSX 10.7+.
Modified Paths:
--------------
trunk/LWJGL/src/native/macosx/context.m
Modified: trunk/LWJGL/src/native/macosx/context.m
===================================================================
--- trunk/LWJGL/src/native/macosx/context.m 2011-09-08 21:35:54 UTC (rev 3637)
+++ trunk/LWJGL/src/native/macosx/context.m 2011-09-15 17:22:43 UTC (rev 3638)
@@ -128,11 +128,12 @@
if (gl32) {
putAttrib(&attribs, 99); // NSOpenGLPFAOpenGLProfile
putAttrib(&attribs, 0x3200); // NSOpenGLProfileVersion3_2Core
+ } else {
+ if (support_window)
+ putAttrib(&attribs, NSOpenGLPFAWindow);
+ if (support_pbuffer)
+ putAttrib(&attribs, NSOpenGLPFAPixelBuffer);
}
- if (support_window)
- putAttrib(&attribs, NSOpenGLPFAWindow);
- if (support_pbuffer)
- putAttrib(&attribs, NSOpenGLPFAPixelBuffer);
if (stereo)
putAttrib(&attribs, NSOpenGLPFAStereo);
if (floating_point)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-09-08 21:36:01
|
Revision: 3637
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3637&view=rev
Author: matzon
Date: 2011-09-08 21:35:54 +0000 (Thu, 08 Sep 2011)
Log Message:
-----------
applied maven patch by ruben01
Modified Paths:
--------------
trunk/LWJGL/maven/build.xml
trunk/LWJGL/maven/lwjgl.pom
trunk/LWJGL/platform_build/build-maven.xml
Removed Paths:
-------------
trunk/LWJGL/maven/jinput-platform.pom
trunk/LWJGL/maven/jinput.pom
Modified: trunk/LWJGL/maven/build.xml
===================================================================
--- trunk/LWJGL/maven/build.xml 2011-09-07 21:28:01 UTC (rev 3636)
+++ trunk/LWJGL/maven/build.xml 2011-09-08 21:35:54 UTC (rev 3637)
@@ -4,198 +4,240 @@
<property name="mavenrepoId" value="tmprepoid" />
<target name="install">
- <antcall target="execute">
+ <antcall target="execute-install">
<param name="mvncommand" value="org.apache.maven.plugins:maven-install-plugin:2.3.1:install-file"/>
</antcall>
</target>
+
<target name="deploy">
<antcall target="execute">
- <param name="mvncommand" value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file"/>
+ <param name="mvncommand" value="org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy-file"/>
</antcall>
</target>
+ <target name="deploy-gpg">
+ <antcall target="execute">
+ <param name="mvncommand" value="org.apache.maven.plugins:maven-gpg-plugin:1.4:sign-and-deploy-file"/>
+ </antcall>
+ </target>
+
+
+
<target name="execute">
+
+ <!-- parent.pom -->
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl-parent.pom" />
+ <arg value="-Dfile=lwjgl-parent.pom" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+ <!-- lwjgl.jar -->
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl.pom" />
+ <arg value="-Dfile=lwjgl.jar" />
+ <arg value="-Dtypes=jar,jar" />
+ <arg value="-Dclassifiers=sources,javadoc" />
+ <arg value="-Dfiles=lwjgl-sources.jar,lwjgl-javadoc.jar" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+
+ <!-- lwjgl natives -->
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl-platform.pom" />
+ <arg value="-Dfile=lwjgl-platform-natives-windows.jar" />
+ <arg value="-Dclassifier=natives-windows" />
+ <arg value="-Dtypes=jar,jar" />
+ <arg value="-Dclassifiers=natives-linux,natives-osx" />
+ <arg value="-Dfiles=lwjgl-platform-natives-linux.jar,lwjgl-platform-natives-osx.jar" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+
+ <!-- lwjgl_util.jar -->
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl_util.pom" />
+ <arg value="-Dfile=lwjgl_util.jar" />
+ <arg value="-Dtypes=jar,jar" />
+ <arg value="-Dclassifiers=sources,javadoc" />
+ <arg value="-Dfiles=lwjgl_util-sources.jar,lwjgl_util-javadoc.jar" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+ <!-- lwjgl_util_applet.jar -->
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl_util_applet.pom" />
+ <arg value="-Dfile=lwjgl_util_applet.jar" />
+ <arg value="-Dtypes=jar,jar" />
+ <arg value="-Dclassifiers=sources,javadoc" />
+ <arg value="-Dfiles=lwjgl_util_applet-sources.jar,lwjgl_util_applet-javadoc.jar" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+ </target>
+
+
+ <target name="execute-install">
+
+ <!-- parent.pom -->
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl-parent.pom" />
+ <arg value="-Dfile=lwjgl-parent.pom" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+ <!-- lwjgl.jar -->
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl.pom" />
+ <arg value="-Dfile=lwjgl.jar" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl.pom" />
+ <arg value="-Dfile=lwjgl-sources.jar" />
+ <arg value="-Dclassifier=sources" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl.pom" />
+ <arg value="-Dfile=lwjgl-javadoc.jar" />
+ <arg value="-Dclassifier=javadoc" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+ <!-- lwjgl natives -->
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl-platform.pom" />
+ <arg value="-Dfile=lwjgl-platform-natives-windows.jar" />
+ <arg value="-Dclassifier=natives-windows" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl-platform.pom" />
+ <arg value="-Dfile=lwjgl-platform-natives-linux.jar" />
+ <arg value="-Dclassifier=natives-linux" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl-platform.pom" />
+ <arg value="-Dfile=lwjgl-platform-natives-osx.jar" />
+ <arg value="-Dclassifier=natives-osx" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+ <!-- lwjgl_util.jar -->
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl_util.pom" />
+ <arg value="-Dfile=lwjgl_util.jar" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl_util.pom" />
+ <arg value="-Dfile=lwjgl_util-sources.jar" />
+ <arg value="-Dclassifier=sources" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl_util.pom" />
+ <arg value="-Dfile=lwjgl_util-javadoc.jar" />
+ <arg value="-Dclassifier=javadoc" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+ <!-- lwjgl_util_applet.jar -->
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl_util_applet.pom" />
+ <arg value="-Dfile=lwjgl_util_applet.jar" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl_util_applet.pom" />
+ <arg value="-Dfile=lwjgl_util_applet-sources.jar" />
+ <arg value="-Dclassifier=sources" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+
+ <artifact:mvn>
+ <arg value="${mvncommand}" />
+ <arg value="-Durl=${mavenrepo}" />
+ <arg value="-DrepositoryId=${mavenrepoId}" />
+ <arg value="-DpomFile=lwjgl_util_applet.pom" />
+ <arg value="-Dfile=lwjgl_util_applet-javadoc.jar" />
+ <arg value="-Dclassifier=javadoc" />
+ <arg value="-Plwjglgpg" />
+ </artifact:mvn>
+ </target>
- <!-- parent.pom -->
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=lwjgl-parent.pom" />
- <arg value="-Dfile=lwjgl-parent.pom" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- <!-- lwjgl.jar -->
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=lwjgl.pom" />
- <arg value="-Dfile=lwjgl.jar" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=lwjgl.pom" />
- <arg value="-Dfile=lwjgl-sources.jar" />
- <arg value="-Dclassifier=sources" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=lwjgl.pom" />
- <arg value="-Dfile=lwjgl-javadoc.jar" />
- <arg value="-Dclassifier=javadoc" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- <!-- lwjgl natives -->
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=lwjgl-platform.pom" />
- <arg value="-Dfile=lwjgl-platform-natives-win.jar" />
- <arg value="-Dclassifier=natives-win" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=lwjgl-platform.pom" />
- <arg value="-Dfile=lwjgl-platform-natives-linux.jar" />
- <arg value="-Dclassifier=natives-linux" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=lwjgl-platform.pom" />
- <arg value="-Dfile=lwjgl-platform-natives-mac.jar" />
- <arg value="-Dclassifier=natives-mac" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- <!-- lwjgl_util.jar -->
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=lwjgl_util.pom" />
- <arg value="-Dfile=lwjgl_util.jar" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=lwjgl_util.pom" />
- <arg value="-Dfile=lwjgl_util-sources.jar" />
- <arg value="-Dclassifier=sources" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=lwjgl_util.pom" />
- <arg value="-Dfile=lwjgl_util-javadoc.jar" />
- <arg value="-Dclassifier=javadoc" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- <!-- lwjgl_util_applet.jar -->
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=lwjgl_util_applet.pom" />
- <arg value="-Dfile=lwjgl_util_applet.jar" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=lwjgl_util.pom" />
- <arg value="-Dfile=lwjgl_util_applet-sources.jar" />
- <arg value="-Dclassifier=sources" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=lwjgl_util.pom" />
- <arg value="-Dfile=lwjgl_util_applet-javadoc.jar" />
- <arg value="-Dclassifier=javadoc" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- <!-- jinput.jar -->
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=jinput.pom" />
- <arg value="-Dfile=jinput.jar" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- <!-- jinput natives -->
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=jinput-platform.pom" />
- <arg value="-Dfile=jinput-platform-natives-win.jar" />
- <arg value="-Dclassifier=natives-win" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=jinput-platform.pom" />
- <arg value="-Dfile=jinput-platform-natives-linux.jar" />
- <arg value="-Dclassifier=natives-linux" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- <artifact:mvn>
- <arg value="${mvncommand}" />
- <arg value="-Durl=${mavenrepo}" />
- <arg value="-DrepositoryId=${mavenrepoId}" />
- <arg value="-DpomFile=jinput-platform.pom" />
- <arg value="-Dfile=jinput-platform-natives-mac.jar" />
- <arg value="-Dclassifier=natives-mac" />
- <arg value="-Plwjglgpg" />
- </artifact:mvn>
-
- </target>
-</project>
\ No newline at end of file
+
+</project>
Deleted: trunk/LWJGL/maven/jinput-platform.pom
===================================================================
--- trunk/LWJGL/maven/jinput-platform.pom 2011-09-07 21:28:01 UTC (rev 3636)
+++ trunk/LWJGL/maven/jinput-platform.pom 2011-09-08 21:35:54 UTC (rev 3637)
@@ -1,32 +0,0 @@
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.lwjgl.lwjgl</groupId>
- <artifactId>parent</artifactId>
- <version>@VERSION@</version>
- </parent>
- <groupId>org.lwjgl.lwjgl</groupId>
- <artifactId>jinput-platform</artifactId>
- <packaging>jar</packaging>
- <name>JInput - Java Game Controller API</name>
- <version>@VERSION@</version>
- <description>JInput - Java Game Controller API</description>
- <url>http://java.net/projects/jinput</url>
- <licenses>
- <license>
- <name>BSD</name>
- <url>http://www.opensource.org/licenses/bsd-license.php</url>
- <distribution>repo</distribution>
- </license>
- </licenses>
- <developers>
- <developer>
- <id>Members</id>
- <url>http://java.net/projects/jinput/members</url>
- </developer>
- </developers>
- <scm>
- <url>http://java.net/projects/jinput/sources/svn/show</url>
- <connection>https://svn.java.net/svn/jinput~svn </connection>
- </scm>
-</project>
Deleted: trunk/LWJGL/maven/jinput.pom
===================================================================
--- trunk/LWJGL/maven/jinput.pom 2011-09-07 21:28:01 UTC (rev 3636)
+++ trunk/LWJGL/maven/jinput.pom 2011-09-08 21:35:54 UTC (rev 3637)
@@ -1,52 +0,0 @@
-<project>
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.lwjgl.lwjgl</groupId>
- <artifactId>parent</artifactId>
- <version>@VERSION@</version>
- </parent>
- <groupId>org.lwjgl.lwjgl</groupId>
- <artifactId>jinput</artifactId>
- <packaging>jar</packaging>
- <name>JInput - Java Game Controller API</name>
- <version>@VERSION@</version>
- <description>JInput - Java Game Controller API</description>
- <url>http://java.net/projects/jinput</url>
- <licenses>
- <license>
- <name>BSD</name>
- <url>http://www.opensource.org/licenses/bsd-license.php</url>
- <distribution>repo</distribution>
- </license>
- </licenses>
- <developers>
- <developer>
- <id>Members</id>
- <url>http://java.net/projects/jinput/members</url>
- </developer>
- </developers>
- <scm>
- <url>http://java.net/projects/jinput/sources/svn/show</url>
- <connection>https://svn.java.net/svn/jinput~svn </connection>
- </scm>
- <dependencies>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>jinput-platform</artifactId>
- <version>${project.version}</version>
- <classifier>natives-win</classifier>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>jinput-platform</artifactId>
- <version>${project.version}</version>
- <classifier>natives-linux</classifier>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>jinput-platform</artifactId>
- <version>${project.version}</version>
- <classifier>natives-mac</classifier>
- </dependency>
- </dependencies>
-</project>
Modified: trunk/LWJGL/maven/lwjgl.pom
===================================================================
--- trunk/LWJGL/maven/lwjgl.pom 2011-09-07 21:28:01 UTC (rev 3636)
+++ trunk/LWJGL/maven/lwjgl.pom 2011-09-08 21:35:54 UTC (rev 3637)
@@ -22,7 +22,7 @@
<groupId>${project.groupId}</groupId>
<artifactId>lwjgl-platform</artifactId>
<version>${project.version}</version>
- <classifier>natives-win</classifier>
+ <classifier>natives-windows</classifier>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
@@ -34,12 +34,12 @@
<groupId>${project.groupId}</groupId>
<artifactId>lwjgl-platform</artifactId>
<version>${project.version}</version>
- <classifier>natives-mac</classifier>
+ <classifier>natives-osx</classifier>
</dependency>
<dependency>
- <groupId>${project.groupId}</groupId>
+ <groupId>net.java.jinput</groupId>
<artifactId>jinput</artifactId>
- <version>${project.version}</version>
+ <version>@JINPUTVERSION@</version>
</dependency>
</dependencies>
</project>
Modified: trunk/LWJGL/platform_build/build-maven.xml
===================================================================
--- trunk/LWJGL/platform_build/build-maven.xml 2011-09-07 21:28:01 UTC (rev 3636)
+++ trunk/LWJGL/platform_build/build-maven.xml 2011-09-08 21:35:54 UTC (rev 3637)
@@ -4,6 +4,7 @@
<property name="lwjgl.maven" location="maven" />
<property name="lwjgl.dstMaven" location="${lwjgl.temp}/maven" />
<property name="lwjgl.src.java" location="${lwjgl.src}/java" />
+ <property name="jinput.version" value="2.0.5" />
<fileset id="lwjgl-sources.manual.fileset" dir="${lwjgl.src.java}">
<patternset refid="lwjgl.package.pattern" />
@@ -36,6 +37,32 @@
]]>
</script>
</target>
+
+ <target name="-checkjinputversion">
+ <script language="javascript" classpath="${lwjgl.lib}/jinput.jar">
+ <![CDATA[
+ importPackage(java.lang);
+ var version = net.java.games.input.Version.getVersion()
+ project.setNewProperty("jinputversion",version);
+ var declaredJinputVersion = project.getProperty("jinput.version");
+ System.out.println("JINPUT Version: " + version + " - DeclaredVersion: " + declaredJinputVersion);
+
+ if(declaredJinputVersion.equals(version)){
+ System.out.println("JINPUT Version Matches");
+ project.setNewProperty("jinputversionmatches", true);
+ } else {
+ System.out.println("JINPUT Version don't match");
+ }
+ ]]>
+ </script>
+ <condition property="failjinputcheck">
+ <and>
+ <not><isset property="jinputversionmatches" /></not>
+ <not><isset property="overridejinput" /></not>
+ </and>
+ </condition>
+ <fail if="failjinputcheck" message="Jinput version in project is different from the declared jinput version for maven add -Doverridejinput=true as a command line option to avoid this check" />
+ </target>
<target name="maven-full">
<antcall target="clean-java" />
@@ -47,7 +74,7 @@
<antcall target="maven"/>
</target>
- <target name="maven" depends="-fixmavenversion"> <!-- Added as dependency because using antcall creates a new project scope -->
+ <target name="maven" depends="-fixmavenversion, -checkjinputversion"> <!-- Added as dependency because using antcall creates a new project scope -->
<delete dir="${lwjgl.dstMaven}" quiet="true" failonerror="false" taskname="cleaning maven dist" />
<mkdir dir="${lwjgl.dstMaven}" taskname="initialiazing temp maven folder" />
<antcall target="-copylwjgljars" />
@@ -56,9 +83,14 @@
<antcall target="-createmavennativejars" />
<antcall target="-copymavenpoms"/>
<antcall target="-copymavendeploybuild"/>
- <antcall target="-addjinput"/>
<antcall target="-copymaventdist"/>
</target>
+
+
+
+
+
+
<target name="-copylwjgljars">
@@ -127,7 +159,7 @@
</target>
<target name="-createmavennativejars">
- <jar destfile="${lwjgl.dstMaven}/lwjgl-platform-natives-win.jar" taskname="lwjgl-platform-natives-win.jar">
+ <jar destfile="${lwjgl.dstMaven}/lwjgl-platform-natives-windows.jar" taskname="lwjgl-platform-natives-windows.jar">
<fileset dir="${lwjgl.lib}/windows">
<patternset refid="lwjgl-windows-lwjgl.fileset"/>
</fileset>
@@ -137,7 +169,7 @@
<patternset refid="lwjgl-linux-lwjgl.fileset"/>
</fileset>
</jar>
- <jar destfile="${lwjgl.dstMaven}/lwjgl-platform-natives-mac.jar" taskname="lwjgl-platform-natives-mac.jar">
+ <jar destfile="${lwjgl.dstMaven}/lwjgl-platform-natives-osx.jar" taskname="lwjgl-platform-natives-osx.jar">
<fileset dir="${lwjgl.lib}/macosx">
<patternset refid="lwjgl-macosx-lwjgl.fileset"/>
</fileset>
@@ -151,6 +183,7 @@
</fileset>
<filterset>
<filter token="VERSION" value="${lwjgl-maven-version}"/>
+ <filter token="JINPUTVERSION" value="${jinput.version}"/>
</filterset>
</copy>
</target>
@@ -163,43 +196,6 @@
</copy>
</target>
- <!-- JINPUT -->
- <target name="-addjinput">
- <antcall target="-copyjinputjar" />
- <antcall target="-createmavennativejinputjars" />
- </target>
-
- <target name="-copyjinputjar">
- <copy todir="${lwjgl.dstMaven}">
- <fileset dir="${lwjgl.lib}">
- <patternset>
- <include name="jinput.jar" />
- </patternset>
- </fileset>
- </copy>
- </target>
-
-
- <target name="-createmavennativejinputjars">
- <jar destfile="${lwjgl.dstMaven}/jinput-platform-natives-win.jar" taskname="jinput-platform-natives-win.jar">
- <fileset dir="${lwjgl.lib}/windows">
- <patternset refid="lwjgl-windows-jinput.fileset"/>
- </fileset>
- </jar>
- <jar destfile="${lwjgl.dstMaven}/jinput-platform-natives-linux.jar" taskname="jinput-platform-natives-linux.jar">
- <fileset dir="${lwjgl.lib}/linux">
- <patternset refid="lwjgl-linux-jinput.fileset"/>
- </fileset>
- </jar>
- <jar destfile="${lwjgl.dstMaven}/jinput-platform-natives-mac.jar" taskname="jinput-platform-natives-mac.jar">
- <fileset dir="${lwjgl.lib}/macosx">
- <patternset refid="lwjgl-macosx-jinput.fileset"/>
- </fileset>
- </jar>
- </target>
-
- <!-- END JINPUT -->
-
<target name="-copymaventdist">
<zip destfile="${lwjgl.dist}/lwjgl-maven-${lwjgl.version}.zip" basedir="${lwjgl.temp}" includes="maven/**" />
</target>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2011-09-07 21:28:07
|
Revision: 3636
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3636&view=rev
Author: kappa1
Date: 2011-09-07 21:28:01 +0000 (Wed, 07 Sep 2011)
Log Message:
-----------
bump mac native version
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java
Modified: trunk/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java 2011-09-07 18:28:19 UTC (rev 3635)
+++ trunk/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java 2011-09-07 21:28:01 UTC (rev 3636)
@@ -42,7 +42,7 @@
* $Id$
*/
final class MacOSXSysImplementation extends J2SESysImplementation {
- private static final int JNI_VERSION = 19;
+ private static final int JNI_VERSION = 20;
static {
// Make sure AWT is properly initialized. This avoids hangs on Mac OS X 10.3
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2011-09-07 18:28:25
|
Revision: 3635
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3635&view=rev
Author: kappa1
Date: 2011-09-07 18:28:19 +0000 (Wed, 07 Sep 2011)
Log Message:
-----------
Minor tweak to appletloader as an attempt to get nightly build server to build natives again.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
Modified: trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-09-05 08:44:48 UTC (rev 3634)
+++ trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-09-07 18:28:19 UTC (rev 3635)
@@ -899,10 +899,8 @@
}
});
- } catch (AccessControlException ace) {
- certificateRefused = true;
- fatalErrorOccured(ace.getMessage(), ace);
} catch (Exception e) {
+ certificateRefused = e instanceof AccessControlException;
fatalErrorOccured("This occurred while '" + getDescriptionForState() + "'", e);
} finally {
loaderThread = null;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2011-09-05 08:44:54
|
Revision: 3634
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3634&view=rev
Author: spasi
Date: 2011-09-05 08:44:48 +0000 (Mon, 05 Sep 2011)
Log Message:
-----------
Added null check on ContextAttribs.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXPeerInfo.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXPeerInfo.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXPeerInfo.java 2011-09-03 19:08:27 UTC (rev 3633)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXPeerInfo.java 2011-09-05 08:44:48 UTC (rev 3634)
@@ -48,7 +48,7 @@
if (pixel_format.isFloatingPoint() && !LWJGLUtil.isMacOSXEqualsOrBetterThan(10, 4))
throw new LWJGLException("Floating point pixel format requested, but it requires MacOS X 10.4 or newer");
- boolean gl32 = attribs.getMajorVersion() == 3 && attribs.getMinorVersion() == 2 && attribs.isProfileCore();
+ boolean gl32 = attribs != null && attribs.getMajorVersion() == 3 && attribs.getMinorVersion() == 2 && attribs.isProfileCore();
if ( gl32 && !LWJGLUtil.isMacOSXEqualsOrBetterThan(10, 7) )
throw new LWJGLException("OpenGL 3.2 requested, but it requires MacOS X 10.7 or newer");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2011-09-03 19:08:33
|
Revision: 3633
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3633&view=rev
Author: spasi
Date: 2011-09-03 19:08:27 +0000 (Sat, 03 Sep 2011)
Log Message:
-----------
Added missing DrawableLWJGL method.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/AWTGLCanvas.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/AWTGLCanvas.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/AWTGLCanvas.java 2011-09-03 18:52:45 UTC (rev 3632)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/AWTGLCanvas.java 2011-09-03 19:08:27 UTC (rev 3633)
@@ -107,6 +107,10 @@
}
}
+ public void setPixelFormat(final PixelFormatLWJGL pf) throws LWJGLException {
+ throw new UnsupportedOperationException();
+ }
+
public void setPixelFormat(final PixelFormatLWJGL pf, final ContextAttribs attribs) throws LWJGLException {
throw new UnsupportedOperationException();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2011-09-03 18:52:53
|
Revision: 3632
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3632&view=rev
Author: spasi
Date: 2011-09-03 18:52:45 +0000 (Sat, 03 Sep 2011)
Log Message:
-----------
Added support for OpenGL 3.2 on MacOS X 10.7+.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/AWTCanvasImplementation.java
trunk/LWJGL/src/java/org/lwjgl/opengl/AWTGLCanvas.java
trunk/LWJGL/src/java/org/lwjgl/opengl/ContextAttribs.java
trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java
trunk/LWJGL/src/java/org/lwjgl/opengl/DisplayImplementation.java
trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableGL.java
trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableLWJGL.java
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxCanvasImplementation.java
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxContextAttribs.java
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXAWTGLCanvasPeerInfo.java
trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXCanvasImplementation.java
trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXCanvasPeerInfo.java
trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXContextImplementation.java
trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java
trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplayPeerInfo.java
trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXPbufferPeerInfo.java
trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXPeerInfo.java
trunk/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java
trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsCanvasImplementation.java
trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsContextAttribs.java
trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java
trunk/LWJGL/src/native/macosx/context.h
trunk/LWJGL/src/native/macosx/context.m
trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXContextImplementation.m
trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXPeerInfo.m
Removed Paths:
-------------
trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXContextAttribs.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/AWTCanvasImplementation.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/AWTCanvasImplementation.java 2011-09-03 18:41:22 UTC (rev 3631)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/AWTCanvasImplementation.java 2011-09-03 18:52:45 UTC (rev 3632)
@@ -47,7 +47,7 @@
/**
* Return an opaque handle to the canvas peer information required to create a context from it.
*/
- PeerInfo createPeerInfo(Canvas component, PixelFormat pixel_format) throws LWJGLException;
+ PeerInfo createPeerInfo(Canvas component, PixelFormat pixel_format, ContextAttribs attribs) throws LWJGLException;
/**
* Find a proper GraphicsConfiguration from the given GraphicsDevice and PixelFormat.
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/AWTGLCanvas.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/AWTGLCanvas.java 2011-09-03 18:41:22 UTC (rev 3631)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/AWTGLCanvas.java 2011-09-03 18:52:45 UTC (rev 3632)
@@ -107,7 +107,7 @@
}
}
- public void setPixelFormat(final PixelFormatLWJGL pf) throws LWJGLException {
+ public void setPixelFormat(final PixelFormatLWJGL pf, final ContextAttribs attribs) throws LWJGLException {
throw new UnsupportedOperationException();
}
@@ -311,7 +311,7 @@
return;
try {
if ( peer_info == null ) {
- this.peer_info = implementation.createPeerInfo(this, pixel_format);
+ this.peer_info = implementation.createPeerInfo(this, pixel_format, attribs);
}
peer_info.lockAndGetHandle();
try {
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/ContextAttribs.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/ContextAttribs.java 2011-09-03 18:41:22 UTC (rev 3631)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/ContextAttribs.java 2011-09-03 18:52:45 UTC (rev 3632)
@@ -51,6 +51,10 @@
* If the forwardCompatible
* attribute is used, LWJGL will not load the deprecated functionality (as defined in the OpenGL 3.0 specification). This
* means that developers can start working on cleaning up their applications without an OpenGL 3.0 complaint driver.
+ * <p/>
+ * This extension is not supported on MacOS X. However, in order to enable the GL 3.2 context on MacOS X 10.7 or newer, an
+ * instance of this class must be passed to LWJGL. The only valid configuration is <code>new ContextAttribs(3, 2).withProfileCore()</code>,
+ * anything else will be ignored.
*
* @author spasi <sp...@us...>
*/
@@ -243,14 +247,15 @@
return new LinuxContextAttribs();
case LWJGLUtil.PLATFORM_WINDOWS:
return new WindowsContextAttribs();
- case LWJGLUtil.PLATFORM_MACOSX:
- return new MacOSXContextAttribs();
default:
throw new IllegalStateException("Unsupported platform");
}
}
IntBuffer getAttribList() {
+ if ( LWJGLUtil.getPlatform() == LWJGLUtil.PLATFORM_MACOSX )
+ return null;
+
ContextAttribsImplementation implementation = getImplementation();
int attribCount = 0;
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2011-09-03 18:41:22 UTC (rev 3631)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2011-09-03 18:52:45 UTC (rev 3632)
@@ -93,10 +93,10 @@
* unlike GL, where it is typically at the bottom of the display.
*/
private static int y = -1;
-
+
/** the width of the Display window */
private static int width = 0;
-
+
/** the height of the Display window */
private static int height = 0;
@@ -115,9 +115,9 @@
private static boolean window_created;
private static boolean parent_resized;
-
+
private static boolean window_resized;
-
+
private static boolean window_resizable;
/** Initial Background Color of Display */
@@ -305,7 +305,7 @@
DisplayMode mode = getEffectiveMode();
display_impl.createWindow(drawable, mode, tmp_parent, getWindowX(), getWindowY());
window_created = true;
-
+
width = Display.getDisplayMode().getWidth();
height = Display.getDisplayMode().getHeight();
@@ -674,9 +674,9 @@
throw new RuntimeException(e);
}
}
-
+
window_resized = !isFullscreen() && parent == null && display_impl.wasResized();
-
+
if ( window_resized ) {
width = display_impl.getWidth();
height = display_impl.getHeight();
@@ -894,7 +894,7 @@
Display.drawable = drawable;
try {
- drawable.setPixelFormat(pixel_format);
+ drawable.setPixelFormat(pixel_format, attribs);
try {
createWindow();
try {
@@ -1008,6 +1008,11 @@
switchDisplayMode();
final DrawableGLES drawable = new DrawableGLES() {
+
+ public void setPixelFormat(final PixelFormatLWJGL pf, final ContextAttribs attribs) throws LWJGLException {
+ throw new UnsupportedOperationException();
+ }
+
public void destroy() {
synchronized ( GlobalLock.lock ) {
if ( !isCreated() )
@@ -1269,11 +1274,11 @@
}
}
}
-
+
/**
* Enable or disable the Display window to be resized.
*
- * @param set true to make the Display window resizable;
+ * @param resizable set to true to make the Display window resizable;
* false to disable resizing on the Display window.
*/
public static void setResizable(boolean resizable) {
@@ -1282,65 +1287,65 @@
display_impl.setResizable(resizable);
}
}
-
+
/**
* @return true if the Display window is resizable.
*/
public static boolean isResizable() {
return window_resizable;
}
-
+
/**
* @return true if the Display window has been resized.
* This value will be updated after a call to Display.update().
- *
+ *
* This will return false if running in fullscreen or with Display.setParent(Canvas parent)
*/
public static boolean wasResized() {
return window_resized;
}
-
+
/**
* @return this method will return the width of the Display window.
- *
+ *
* If running in fullscreen mode it will return the width of the current set DisplayMode.
* If running Display.setParent(Canvas parent) is being used, the width of the parent
* will be returned.
- *
+ *
* This value will be updated after a call to Display.update().
*/
public static int getWidth() {
-
+
if (Display.isFullscreen()) {
return Display.getDisplayMode().getWidth();
}
-
+
if (parent != null) {
return parent.getWidth();
}
-
+
return width;
}
-
+
/**
* @return this method will return the height of the Display window.
- *
+ *
* If running in fullscreen mode it will return the height of the current set DisplayMode.
* If running Display.setParent(Canvas parent) is being used, the height of the parent
* will be returned.
- *
+ *
* This value will be updated after a call to Display.update().
*/
public static int getHeight() {
-
+
if (Display.isFullscreen()) {
return Display.getDisplayMode().getHeight();
- }
-
+ }
+
if (parent != null) {
return parent.getHeight();
}
-
+
return height;
}
}
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/DisplayImplementation.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/DisplayImplementation.java 2011-09-03 18:41:22 UTC (rev 3631)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/DisplayImplementation.java 2011-09-03 18:52:45 UTC (rev 3632)
@@ -108,7 +108,7 @@
* Create the native PeerInfo.
* @throws LWJGLException
*/
- PeerInfo createPeerInfo(PixelFormat pixel_format) throws LWJGLException;
+ PeerInfo createPeerInfo(PixelFormat pixel_format, ContextAttribs attribs) throws LWJGLException;
// void destroyPeerInfo();
@@ -136,7 +136,7 @@
/**
* Method to create a Pbuffer
*/
- PeerInfo createPbuffer(int width, int height, PixelFormat pixel_format,
+ PeerInfo createPbuffer(int width, int height, PixelFormat pixel_format, ContextAttribs attribs,
IntBuffer pixelFormatCaps,
IntBuffer pBufferAttribs) throws LWJGLException;
@@ -159,25 +159,25 @@
* @return number of icons used.
*/
int setIcon(ByteBuffer[] icons);
-
+
/**
* Enable or disable the Display window to be resized.
*
- * @param set true to make the Display window resizable;
+ * @param resizable set to true to make the Display window resizable;
* false to disable resizing on the Display window.
*/
void setResizable(boolean resizable);
-
+
/**
* @return true if the Display window has been resized since this method was last called.
*/
boolean wasResized();
-
+
/**
* @return this method will return a the width of the Display window.
*/
int getWidth();
-
+
/**
* @return this method will return a the height of the Display window.
*/
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableGL.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableGL.java 2011-09-03 18:41:22 UTC (rev 3631)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableGL.java 2011-09-03 18:52:45 UTC (rev 3632)
@@ -53,8 +53,12 @@
}
public void setPixelFormat(final PixelFormatLWJGL pf) throws LWJGLException {
+ throw new UnsupportedOperationException();
+ }
+
+ public void setPixelFormat(final PixelFormatLWJGL pf, final ContextAttribs attribs) throws LWJGLException {
this.pixel_format = (PixelFormat)pf;
- this.peer_info = Display.getImplementation().createPeerInfo(pixel_format);
+ this.peer_info = Display.getImplementation().createPeerInfo(pixel_format, attribs);
}
public PixelFormatLWJGL getPixelFormat() {
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableLWJGL.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableLWJGL.java 2011-09-03 18:41:22 UTC (rev 3631)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableLWJGL.java 2011-09-03 18:52:45 UTC (rev 3632)
@@ -42,6 +42,8 @@
void setPixelFormat(PixelFormatLWJGL pf) throws LWJGLException;
+ void setPixelFormat(PixelFormatLWJGL pf, ContextAttribs attribs) throws LWJGLException;
+
PixelFormatLWJGL getPixelFormat();
/**
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxCanvasImplementation.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxCanvasImplementation.java 2011-09-03 18:41:22 UTC (rev 3631)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxCanvasImplementation.java 2011-09-03 18:52:45 UTC (rev 3632)
@@ -76,7 +76,7 @@
}
}
- public PeerInfo createPeerInfo(Canvas component, PixelFormat pixel_format) throws LWJGLException {
+ public PeerInfo createPeerInfo(Canvas component, PixelFormat pixel_format, ContextAttribs attribs) throws LWJGLException {
return new LinuxAWTGLCanvasPeerInfo(component);
}
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxContextAttribs.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxContextAttribs.java 2011-09-03 18:41:22 UTC (rev 3631)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxContextAttribs.java 2011-09-03 18:52:45 UTC (rev 3632)
@@ -33,8 +33,6 @@
/**
* An implementation of ContextAttribs using GLX_create_context.
- * <p/><p/>
- * ---- WIP - GLX_create_context has not been defined yet ----
*
* @author spasi <sp...@us...>
*/
@@ -42,14 +40,13 @@
private static final int GLX_CONTEXT_MAJOR_VERSION_ARB = 0x2091;
private static final int GLX_CONTEXT_MINOR_VERSION_ARB = 0x2092;
- private static final int GLX_CONTEXT_LAYER_PLANE_ARB = 0x2093;
- private static final int GLX_CONTEXT_FLAGS_ARB = 0x2094;
- private static final int GLX_CONTEXT_PROFILE_MASK_ARB = 0x9126;
+ private static final int GLX_CONTEXT_FLAGS_ARB = 0x2094;
+ private static final int GLX_CONTEXT_PROFILE_MASK_ARB = 0x9126;
- private static final int GLX_CONTEXT_DEBUG_BIT_ARB = 0x0001;
+ private static final int GLX_CONTEXT_DEBUG_BIT_ARB = 0x0001;
private static final int GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB = 0x0002;
- private static final int GLX_CONTEXT_CORE_PROFILE_BIT_ARB = 0x00000001;
+ private static final int GLX_CONTEXT_CORE_PROFILE_BIT_ARB = 0x00000001;
private static final int GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB = 0x00000002;
LinuxContextAttribs() {
@@ -64,7 +61,7 @@
}
public int getLayerPlaneAttrib() {
- return GLX_CONTEXT_LAYER_PLANE_ARB;
+ throw new UnsupportedOperationException();
}
public int getFlagsAttrib() {
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2011-09-03 18:41:22 UTC (rev 3631)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2011-09-03 18:52:45 UTC (rev 3632)
@@ -516,7 +516,7 @@
private static long getHandle(Canvas parent) throws LWJGLException {
AWTCanvasImplementation awt_impl = AWTGLCanvas.createImplementation();
- LinuxPeerInfo parent_peer_info = (LinuxPeerInfo)awt_impl.createPeerInfo(parent, null);
+ LinuxPeerInfo parent_peer_info = (LinuxPeerInfo)awt_impl.createPeerInfo(parent, null, null);
ByteBuffer parent_peer_info_handle = parent_peer_info.lockAndGetHandle();
try {
return parent_peer_info.getDrawable();
@@ -757,7 +757,7 @@
return result;
}
- public PeerInfo createPeerInfo(PixelFormat pixel_format) throws LWJGLException {
+ public PeerInfo createPeerInfo(PixelFormat pixel_format, ContextAttribs attribs) throws LWJGLException {
peer_info = new LinuxDisplayPeerInfo(pixel_format);
return peer_info;
}
@@ -1243,7 +1243,7 @@
return false;
}
- public PeerInfo createPbuffer(int width, int height, PixelFormat pixel_format,
+ public PeerInfo createPbuffer(int width, int height, PixelFormat pixel_format, ContextAttribs attribs,
IntBuffer pixelFormatCaps,
IntBuffer pBufferAttribs) throws LWJGLException {
return new LinuxPbufferPeerInfo(width, height, pixel_format);
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXAWTGLCanvasPeerInfo.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXAWTGLCanvasPeerInfo.java 2011-09-03 18:41:22 UTC (rev 3631)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXAWTGLCanvasPeerInfo.java 2011-09-03 18:52:45 UTC (rev 3632)
@@ -44,8 +44,8 @@
final class MacOSXAWTGLCanvasPeerInfo extends MacOSXCanvasPeerInfo {
private final Canvas component;
- MacOSXAWTGLCanvasPeerInfo(Canvas component, PixelFormat pixel_format, boolean support_pbuffer) throws LWJGLException {
- super(pixel_format, support_pbuffer);
+ MacOSXAWTGLCanvasPeerInfo(Canvas component, PixelFormat pixel_format, ContextAttribs attribs, boolean support_pbuffer) throws LWJGLException {
+ super(pixel_format, attribs, support_pbuffer);
this.component = component;
}
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXCanvasImplementation.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXCanvasImplementation.java 2011-09-03 18:41:22 UTC (rev 3631)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXCanvasImplementation.java 2011-09-03 18:52:45 UTC (rev 3632)
@@ -44,11 +44,11 @@
* $Id$
*/
final class MacOSXCanvasImplementation implements AWTCanvasImplementation {
- public PeerInfo createPeerInfo(Canvas component, PixelFormat pixel_format) throws LWJGLException {
+ public PeerInfo createPeerInfo(Canvas component, PixelFormat pixel_format, ContextAttribs attribs) throws LWJGLException {
try {
- return new MacOSXAWTGLCanvasPeerInfo(component, pixel_format, true);
+ return new MacOSXAWTGLCanvasPeerInfo(component, pixel_format, attribs, true);
} catch (LWJGLException e) {
- return new MacOSXAWTGLCanvasPeerInfo(component, pixel_format, false);
+ return new MacOSXAWTGLCanvasPeerInfo(component, pixel_format, attribs, false);
}
}
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXCanvasPeerInfo.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXCanvasPeerInfo.java 2011-09-03 18:41:22 UTC (rev 3631)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXCanvasPeerInfo.java 2011-09-03 18:52:45 UTC (rev 3632)
@@ -45,8 +45,8 @@
abstract class MacOSXCanvasPeerInfo extends MacOSXPeerInfo {
private final AWTSurfaceLock awt_surface = new AWTSurfaceLock();
- protected MacOSXCanvasPeerInfo(PixelFormat pixel_format, boolean support_pbuffer) throws LWJGLException {
- super(pixel_format, true, true, support_pbuffer, true);
+ protected MacOSXCanvasPeerInfo(PixelFormat pixel_format, ContextAttribs attribs, boolean support_pbuffer) throws LWJGLException {
+ super(pixel_format, attribs, true, true, support_pbuffer, true);
}
protected void initHandle(Canvas component) throws LWJGLException {
Deleted: trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXContextAttribs.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXContextAttribs.java 2011-09-03 18:41:22 UTC (rev 3631)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXContextAttribs.java 2011-09-03 18:52:45 UTC (rev 3632)
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2002-2008 LWJGL Project
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'LWJGL' nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.lwjgl.opengl;
-
-/**
- * An implementation of ContextAttribs for MacOS X.
- * <p/><p/>
- * ---- WIP - No XGL_create_context has been defined for MacOS X yet ----
- *
- * @author spasi <sp...@us...>
- */
-final class MacOSXContextAttribs implements ContextAttribsImplementation {
-
- private static final int XGL_CONTEXT_MAJOR_VERSION_ARB = 0x2091;
- private static final int XGL_CONTEXT_MINOR_VERSION_ARB = 0x2092;
- private static final int XGL_CONTEXT_LAYER_PLANE_ARB = 0x2093;
- private static final int XGL_CONTEXT_FLAGS_ARB = 0x2094;
- private static final int XGL_CONTEXT_PROFILE_MASK_ARB = 0x9126;
-
- private static final int XGL_CONTEXT_DEBUG_BIT_ARB = 0x0001;
- private static final int XGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB = 0x0002;
-
- private static final int XGL_CONTEXT_CORE_PROFILE_BIT_ARB = 0x00000001;
- private static final int XGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB = 0x00000002;
-
- MacOSXContextAttribs() {
- }
-
- public int getMajorVersionAttrib() {
- return XGL_CONTEXT_MAJOR_VERSION_ARB;
- }
-
- public int getMinorVersionAttrib() {
- return XGL_CONTEXT_MINOR_VERSION_ARB;
- }
-
- public int getLayerPlaneAttrib() {
- return XGL_CONTEXT_LAYER_PLANE_ARB;
- }
-
- public int getFlagsAttrib() {
- return XGL_CONTEXT_FLAGS_ARB;
- }
-
- public int getDebugBit() {
- return XGL_CONTEXT_DEBUG_BIT_ARB;
- }
-
- public int getForwardCompatibleBit() {
- return XGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB;
- }
-
- public int getProfileMaskAttrib() {
- return XGL_CONTEXT_PROFILE_MASK_ARB;
- }
-
- public int getProfileCoreBit() {
- return XGL_CONTEXT_CORE_PROFILE_BIT_ARB;
- }
-
- public int getProfileCompatibilityBit() {
- return XGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB;
- }
-
-}
\ No newline at end of file
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXContextImplementation.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXContextImplementation.java 2011-09-03 18:41:22 UTC (rev 3631)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXContextImplementation.java 2011-09-03 18:52:45 UTC (rev 3632)
@@ -46,13 +46,13 @@
public ByteBuffer create(PeerInfo peer_info, IntBuffer attribs, ByteBuffer shared_context_handle) throws LWJGLException {
ByteBuffer peer_handle = peer_info.lockAndGetHandle();
try {
- return nCreate(peer_handle, attribs, shared_context_handle);
+ return nCreate(peer_handle, shared_context_handle);
} finally {
peer_info.unlock();
}
}
- private static native ByteBuffer nCreate(ByteBuffer peer_handle, IntBuffer attribs, ByteBuffer shared_context_handle) throws LWJGLException;
+ private static native ByteBuffer nCreate(ByteBuffer peer_handle, ByteBuffer shared_context_handle) throws LWJGLException;
public void swapBuffers() throws LWJGLException {
ContextGL current_context = ContextGL.getCurrentContext();
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java 2011-09-03 18:41:22 UTC (rev 3631)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java 2011-09-03 18:52:45 UTC (rev 3632)
@@ -240,11 +240,11 @@
return frame != null && frame.getCanvas().syncIsDirty();
}
- public PeerInfo createPeerInfo(PixelFormat pixel_format) throws LWJGLException {
+ public PeerInfo createPeerInfo(PixelFormat pixel_format, ContextAttribs attribs) throws LWJGLException {
try {
- return new MacOSXDisplayPeerInfo(pixel_format, true);
+ return new MacOSXDisplayPeerInfo(pixel_format, attribs, true);
} catch (LWJGLException e) {
- return new MacOSXDisplayPeerInfo(pixel_format, false);
+ return new MacOSXDisplayPeerInfo(pixel_format, attribs, false);
}
}
@@ -434,10 +434,10 @@
return false;
}
- public PeerInfo createPbuffer(int width, int height, PixelFormat pixel_format,
+ public PeerInfo createPbuffer(int width, int height, PixelFormat pixel_format, ContextAttribs attribs,
IntBuffer pixelFormatCaps,
IntBuffer pBufferAttribs) throws LWJGLException {
- return new MacOSXPbufferPeerInfo(width, height, pixel_format);
+ return new MacOSXPbufferPeerInfo(width, height, pixel_format, attribs);
}
public void setPbufferAttrib(PeerInfo handle, int attrib, int value) {
@@ -507,13 +507,13 @@
public boolean isInsideWindow() {
return true;
}
-
+
public void setResizable(boolean resizable) {
frame.setResizable(resizable);
}
-
+
public boolean wasResized() {
return canvas_listener.wasResized();
}
-
+
}
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplayPeerInfo.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplayPeerInfo.java 2011-09-03 18:41:22 UTC (rev 3631)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplayPeerInfo.java 2011-09-03 18:52:45 UTC (rev 3632)
@@ -44,8 +44,8 @@
final class MacOSXDisplayPeerInfo extends MacOSXCanvasPeerInfo {
private boolean locked;
- MacOSXDisplayPeerInfo(PixelFormat pixel_format, boolean support_pbuffer) throws LWJGLException {
- super(pixel_format, support_pbuffer);
+ MacOSXDisplayPeerInfo(PixelFormat pixel_format, ContextAttribs attribs, boolean support_pbuffer) throws LWJGLException {
+ super(pixel_format, attribs, support_pbuffer);
}
protected void doLockAndInitHandle() throws LWJGLException {
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXPbufferPeerInfo.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXPbufferPeerInfo.java 2011-09-03 18:41:22 UTC (rev 3631)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXPbufferPeerInfo.java 2011-09-03 18:52:45 UTC (rev 3632)
@@ -42,8 +42,8 @@
* $Id$
*/
final class MacOSXPbufferPeerInfo extends MacOSXPeerInfo {
- MacOSXPbufferPeerInfo(int width, int height, PixelFormat pixel_format) throws LWJGLException {
- super(pixel_format, false, false, true, false);
+ MacOSXPbufferPeerInfo(int width, int height, PixelFormat pixel_format, ContextAttribs attribs) throws LWJGLException {
+ super(pixel_format, attribs, false, false, true, false);
nCreate(getHandle(), width, height);
}
private static native void nCreate(ByteBuffer handle, int width, int height) throws LWJGLException;
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXPeerInfo.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXPeerInfo.java 2011-09-03 18:41:22 UTC (rev 3631)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXPeerInfo.java 2011-09-03 18:52:45 UTC (rev 3632)
@@ -43,18 +43,23 @@
* $Id$
*/
abstract class MacOSXPeerInfo extends PeerInfo {
- MacOSXPeerInfo(PixelFormat pixel_format, boolean use_display_bpp, boolean support_window, boolean support_pbuffer, boolean double_buffered) throws LWJGLException {
+ MacOSXPeerInfo(PixelFormat pixel_format, ContextAttribs attribs, boolean use_display_bpp, boolean support_window, boolean support_pbuffer, boolean double_buffered) throws LWJGLException {
super(createHandle());
if (pixel_format.isFloatingPoint() && !LWJGLUtil.isMacOSXEqualsOrBetterThan(10, 4))
- throw new LWJGLException("Floating point pixel format requested, but is not supported");
- choosePixelFormat(pixel_format, use_display_bpp, support_window, support_pbuffer, double_buffered);
+ throw new LWJGLException("Floating point pixel format requested, but it requires MacOS X 10.4 or newer");
+
+ boolean gl32 = attribs.getMajorVersion() == 3 && attribs.getMinorVersion() == 2 && attribs.isProfileCore();
+ if ( gl32 && !LWJGLUtil.isMacOSXEqualsOrBetterThan(10, 7) )
+ throw new LWJGLException("OpenGL 3.2 requested, but it requires MacOS X 10.7 or newer");
+
+ choosePixelFormat(pixel_format, gl32, use_display_bpp, support_window, support_pbuffer, double_buffered);
}
private static native ByteBuffer createHandle();
- private void choosePixelFormat(PixelFormat pixel_format, boolean use_display_bpp, boolean support_window, boolean support_pbuffer, boolean double_buffered) throws LWJGLException {
- nChoosePixelFormat(getHandle(), pixel_format, use_display_bpp, support_window, support_pbuffer, double_buffered);
+ private void choosePixelFormat(PixelFormat pixel_format, boolean gl32, boolean use_display_bpp, boolean support_window, boolean support_pbuffer, boolean double_buffered) throws LWJGLException {
+ nChoosePixelFormat(getHandle(), pixel_format, gl32, use_display_bpp, support_window, support_pbuffer, double_buffered);
}
- private static native void nChoosePixelFormat(ByteBuffer peer_info_handle, PixelFormat pixel_format, boolean use_display_bpp, boolean support_window, boolean support_pbuffer, boolean double_buffered) throws LWJGLException;
+ private static native void nChoosePixelFormat(ByteBuffer peer_info_handle, PixelFormat pixel_format, boolean gl32, boolean use_display_bpp, boolean support_window, boolean support_pbuffer, boolean double_buffered) throws LWJGLException;
public void destroy() {
nDestroy(getHandle());
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java 2011-09-03 18:41:22 UTC (rev 3631)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java 2011-09-03 18:52:45 UTC (rev 3632)
@@ -216,7 +216,7 @@
throw new NullPointerException("Pixel format must be non-null");
this.width = width;
this.height = height;
- this.peer_info = createPbuffer(width, height, pixel_format, renderTexture);
+ this.peer_info = createPbuffer(width, height, pixel_format, attribs, renderTexture);
Context shared_context = null;
if ( shared_drawable == null )
shared_drawable = Display.getDrawable(); // May be null
@@ -225,15 +225,15 @@
this.context = new ContextGL(peer_info, attribs, (ContextGL)shared_context);
}
- private static PeerInfo createPbuffer(int width, int height, PixelFormat pixel_format, RenderTexture renderTexture) throws LWJGLException {
+ private static PeerInfo createPbuffer(int width, int height, PixelFormat pixel_format, ContextAttribs attribs, RenderTexture renderTexture) throws LWJGLException {
if ( renderTexture == null ) {
// Though null is a perfectly valid argument, Matrox Parhelia drivers expect
// a 0 terminated list, or else they crash. Supplying NULL or 0, should
// cause the drivers to use default settings
IntBuffer defaultAttribs = BufferUtils.createIntBuffer(1);
- return Display.getImplementation().createPbuffer(width, height, pixel_format, null, defaultAttribs);
+ return Display.getImplementation().createPbuffer(width, height, pixel_format, attribs, null, defaultAttribs);
} else
- return Display.getImplementation().createPbuffer(width, height, pixel_format,
+ return Display.getImplementation().createPbuffer(width, height, pixel_format, attribs,
renderTexture.pixelFormatCaps,
renderTexture.pBufferAttribs);
}
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsCanvasImplementation.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsCanvasImplementation.java 2011-09-03 18:41:22 UTC (rev 3631)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsCanvasImplementation.java 2011-09-03 18:52:45 UTC (rev 3632)
@@ -66,7 +66,7 @@
});
}
- public PeerInfo createPeerInfo(Canvas component, PixelFormat pixel_format) throws LWJGLException {
+ public PeerInfo createPeerInfo(Canvas component, PixelFormat pixel_format, ContextAttribs attribs) throws LWJGLException {
return new WindowsAWTGLCanvasPeerInfo(component, pixel_format);
}
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsContextAttribs.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsContextAttribs.java 2011-09-03 18:41:22 UTC (rev 3631)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsContextAttribs.java 2011-09-03 18:52:45 UTC (rev 3632)
@@ -40,14 +40,14 @@
private static final int WGL_CONTEXT_MAJOR_VERSION_ARB = 0x2091;
private static final int WGL_CONTEXT_MINOR_VERSION_ARB = 0x2092;
- private static final int WGL_CONTEXT_LAYER_PLANE_ARB = 0x2093;
- private static final int WGL_CONTEXT_FLAGS_ARB = 0x2094;
- private static final int WGL_CONTEXT_PROFILE_MASK_ARB = 0x9126;
+ private static final int WGL_CONTEXT_LAYER_PLANE_ARB = 0x2093;
+ private static final int WGL_CONTEXT_FLAGS_ARB = 0x2094;
+ private static final int WGL_CONTEXT_PROFILE_MASK_ARB = 0x9126;
- private static final int WGL_CONTEXT_DEBUG_BIT_ARB = 0x0001;
+ private static final int WGL_CONTEXT_DEBUG_BIT_ARB = 0x0001;
private static final int WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB = 0x0002;
- private static final int WGL_CONTEXT_CORE_PROFILE_BIT_ARB = 0x00000001;
+ private static final int WGL_CONTEXT_CORE_PROFILE_BIT_ARB = 0x00000001;
private static final int WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB = 0x00000002;
WindowsContextAttribs() {
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java 2011-09-03 18:41:22 UTC (rev 3631)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java 2011-09-03 18:52:45 UTC (rev 3632)
@@ -247,7 +247,7 @@
private static long getHwnd(Canvas parent) throws LWJGLException {
AWTCanvasImplementation awt_impl = AWTGLCanvas.createImplementation();
- WindowsPeerInfo parent_peer_info = (WindowsPeerInfo)awt_impl.createPeerInfo(parent, null);
+ WindowsPeerInfo parent_peer_info = (WindowsPeerInfo)awt_impl.createPeerInfo(parent, null, null);
ByteBuffer parent_peer_info_handle = parent_peer_info.lockAndGetHandle();
try {
return parent_peer_info.getHwnd();
@@ -463,7 +463,7 @@
return saved;
}
- public PeerInfo createPeerInfo(PixelFormat pixel_format) throws LWJGLException {
+ public PeerInfo createPeerInfo(PixelFormat pixel_format, ContextAttribs attribs) throws LWJGLException {
peer_info = new WindowsDisplayPeerInfo(false);
return peer_info;
}
@@ -657,7 +657,7 @@
return ((WindowsPbufferPeerInfo)handle).isBufferLost();
}
- public PeerInfo createPbuffer(int width, int height, PixelFormat pixel_format,
+ public PeerInfo createPbuffer(int width, int height, PixelFormat pixel_format, ContextAttribs attribs,
IntBuffer pixelFormatCaps,
IntBuffer pBufferAttribs) throws LWJGLException {
return new WindowsPbufferPeerInfo(width, height, pixel_format, pixelFormatCaps, pBufferAttribs);
Modified: trunk/LWJGL/src/native/macosx/context.h
===================================================================
--- trunk/LWJGL/src/native/macosx/context.h 2011-09-03 18:41:22 UTC (rev 3631)
+++ trunk/LWJGL/src/native/macosx/context.h 2011-09-03 18:52:45 UTC (rev 3632)
@@ -1,31 +1,31 @@
-/*
+/*
* Copyright (c) 2002-2008 LWJGL Project
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
+ * modification, are permitted provided that the following conditions are
* met:
- *
- * * Redistributions of source code must retain the above copyright
+ *
+ * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
- * * Neither the name of 'LWJGL' nor the names of
- * its contributors may be used to endorse or promote products derived
+ * * Neither the name of 'LWJGL' nor the names of
+ * its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * 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
+ * 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.
*/
@@ -57,5 +57,5 @@
};
} MacOSXPeerInfo;
-NSOpenGLPixelFormat *choosePixelFormat(JNIEnv *env, jobject pixel_format, bool use_display_bpp, bool support_window, bool support_pbuffer, bool double_buffered);
+NSOpenGLPixelFormat *choosePixelFormat(JNIEnv *env, jobject pixel_format, bool gl32, bool use_display_bpp, bool support_window, bool support_pbuffer, bool double_buffered);
#endif
Modified: trunk/LWJGL/src/native/macosx/context.m
===================================================================
--- trunk/LWJGL/src/native/macosx/context.m 2011-09-03 18:41:22 UTC (rev 3631)
+++ trunk/LWJGL/src/native/macosx/context.m 2011-09-03 18:52:45 UTC (rev 3632)
@@ -1,31 +1,31 @@
-/*
+/*
* Copyright (c) 2002-2008 LWJGL Project
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
+ * modification, are permitted provided that the following conditions are
* met:
- *
- * * Redistributions of source code must retain the above copyright
+ *
+ * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
- * * Neither the name of 'LWJGL' nor the names of
- * its contributors may be used to endorse or promote products derived
+ * * Neither the name of 'LWJGL' nor the names of
+ * its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * 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
+ * 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.
*/
@@ -51,12 +51,12 @@
return address;
}
-static CFBundleRef loadFramework(JNIEnv *env) {
+static CFBundleRef loadFramework(JNIEnv *env) {
CFStringRef framework_path = CFSTR("/System/Library/Frameworks/OpenGL.framework");
if (framework_path == NULL) {
printfDebugJava(env, "Failed to allocate string");
return NULL;
- }
+ }
CFURLRef url = CFURLCreateWithFileSystemPath(NULL, framework_path, kCFURLPOSIXPathStyle, TRUE);
if (url == NULL) {
printfDebugJava(env, "Failed to allocate URL");
@@ -87,14 +87,14 @@
}
}
-NSOpenGLPixelFormat *choosePixelFormat(JNIEnv *env, jobject pixel_format, bool use_display_bpp, bool support_window, bool support_pbuffer, bool double_buffered) {
+NSOpenGLPixelFormat *choosePixelFormat(JNIEnv *env, jobject pixel_format, bool gl32, bool use_display_bpp, bool support_window, bool support_pbuffer, bool double_buffered) {
int bpp;
jclass cls_pixel_format = (*env)->GetObjectClass(env, pixel_format);
if (use_display_bpp)
bpp = CGDisplayBitsPerPixel(kCGDirectMainDisplay);
else
bpp = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "bpp", "I"));
-
+
int alpha = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "alpha", "I"));
int depth = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "depth", "I"));
int stencil = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "stencil", "I"));
@@ -125,6 +125,10 @@
putAttrib(&attribs, NSOpenGLPFASampleBuffers); putAttrib(&attribs, samples > 0 ? 1 : 0);
putAttrib(&attribs, NSOpenGLPFASamples); putAttrib(&attribs, samples);
putAttrib(&attribs, NSOpenGLPFAAuxBuffers); putAttrib(&attribs, num_aux_buffers);
+ if (gl32) {
+ putAttrib(&attribs, 99); // NSOpenGLPFAOpenGLProfile
+ putAttrib(&attribs, 0x3200); // NSOpenGLProfileVersion3_2Core
+ }
if (support_window)
putAttrib(&attribs, NSOpenGLPFAWindow);
if (support_pbuffer)
Modified: trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXContextImplementation.m
===================================================================
--- trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXContextImplementation.m 2011-09-03 18:41:22 UTC (rev 3631)
+++ trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXContextImplementation.m 2011-09-03 18:52:45 UTC (rev 3632)
@@ -1,31 +1,31 @@
-/*
+/*
* Copyright (c) 2002-2008 LWJGL Project
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
+ * modification, are permitted provided that the following conditions are
* met:
- *
- * * Redistributions of source code must retain the above copyright
+ *
+ * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
- * * Neither the name of 'LWJGL' nor the names of
- * its contributors may be used to endorse or promote products derived
+ * * Neither the name of 'LWJGL' nor the names of
+ * its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * 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
+ * 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.
*/
@@ -49,7 +49,7 @@
} MacOSXContext;
JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nCreate
- (JNIEnv *env, jclass clazz, jobject peer_info_handle, jobject attribs, jobject shared_context_handle) {
+ (JNIEnv *env, jclass clazz, jobject peer_info_handle, jobject shared_context_handle) {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
MacOSXPeerInfo *peer_info;
MacOSXContext *shared_context_info;
@@ -75,7 +75,7 @@
context_info->context = context;
context_info->peer_info = peer_info;
[pool release];
- return context_handle;
+ return context_handle;
}
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nSwapBuffers
Modified: trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXPeerInfo.m
===================================================================
--- trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXPeerInfo.m 2011-09-03 18:41:22 UTC (rev 3631)
+++ trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXPeerInfo.m 2011-09-03 18:52:45 UTC (rev 3632)
@@ -1,31 +1,31 @@
-/*
+/*
* Copyright (c) 2002-2008 LWJGL Project
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
+ * modification, are permitted provided that the following conditions are
* met:
- *
- * * Redistributions of source code must retain the above copyright
+ *
+ * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
- * * Neither the name of 'LWJGL' nor the names of
- * its contributors may be used to endorse or promote products derived
+ * * Neither the name of 'LWJGL' nor the names of
+ * its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * 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
+ * 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.
*/
@@ -52,10 +52,10 @@
}
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXPeerInfo_nChoosePixelFormat
- (JNIEnv *env, jclass clazz, jobject peer_info_handle, jobject pixel_format, jboolean use_display_bpp, jboolean support_window, jboolean support_pbuffer, jboolean double_buffered) {
+ (JNIEnv *env, jclass clazz, jobject peer_info_handle, jobject pixel_format, jboolean gl32, jboolean use_display_bpp, jboolean support_window, jboolean support_pbuffer, jboolean double_buffered) {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
MacOSXPeerInfo *peer_info = (MacOSXPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle);
- NSOpenGLPixelFormat *macosx_pixel_format = choosePixelFormat(env, pixel_format, use_display_bpp, support_window, support_pbuffer, double_buffered);
+ NSOpenGLPixelFormat *macosx_pixel_format = choosePixelFormat(env, pixel_format, gl32, use_display_bpp, support_window, support_pbuffer, double_buffered);
if (pixel_format == nil) {
throwException(env, "Could not find pixel format");
return;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2011-09-03 18:41:28
|
Revision: 3631
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3631&view=rev
Author: kappa1
Date: 2011-09-03 18:41:22 +0000 (Sat, 03 Sep 2011)
Log Message:
-----------
update applet html files to include al_min_jre tag
Modified Paths:
--------------
trunk/LWJGL/applet/advance/appletloader.html
trunk/LWJGL/applet/basic/basicapplet.html
Modified: trunk/LWJGL/applet/advance/appletloader.html
===================================================================
--- trunk/LWJGL/applet/advance/appletloader.html 2011-09-03 14:47:11 UTC (rev 3630)
+++ trunk/LWJGL/applet/advance/appletloader.html 2011-09-03 18:41:22 UTC (rev 3631)
@@ -38,6 +38,9 @@
<!-- Version of Applet (case insensitive String), applet files not redownloaded if same version already in cache -->
<!-- <param name="al_version" value="0.1"> -->
+ <!-- Specify the minimum JRE version required by your applet, defaults to "1.5" -->
+ <!-- <param name="al_min_jre" value="1.6"> -->
+
<!-- background color to paint with, defaults to white -->
<!-- <param name="boxbgcolor" value="#000000"> -->
Modified: trunk/LWJGL/applet/basic/basicapplet.html
===================================================================
--- trunk/LWJGL/applet/basic/basicapplet.html 2011-09-03 14:47:11 UTC (rev 3630)
+++ trunk/LWJGL/applet/basic/basicapplet.html 2011-09-03 18:41:22 UTC (rev 3631)
@@ -38,6 +38,9 @@
<!-- Version of Applet (case insensitive String), applet files not redownloaded if same version already in cache -->
<!-- <param name="al_version" value="0.1"> -->
+ <!-- Specify the minimum JRE version required by your applet, defaults to "1.5" -->
+ <!-- <param name="al_min_jre" value="1.6"> -->
+
<!-- background color to paint with, defaults to white -->
<!-- <param name="boxbgcolor" value="#000000"> -->
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2011-09-03 14:47:17
|
Revision: 3630
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3630&view=rev
Author: kappa1
Date: 2011-09-03 14:47:11 +0000 (Sat, 03 Sep 2011)
Log Message:
-----------
update credits
Modified Paths:
--------------
trunk/LWJGL/doc/CREDITS
trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m
trunk/LWJGL/www/credits.php
Modified: trunk/LWJGL/doc/CREDITS
===================================================================
--- trunk/LWJGL/doc/CREDITS 2011-09-03 11:04:04 UTC (rev 3629)
+++ trunk/LWJGL/doc/CREDITS 2011-09-03 14:47:11 UTC (rev 3630)
@@ -12,12 +12,13 @@
- Jos Hirth <jh...@ka...>
- Kevin Glass <ke...@co...>
- Atsuya Takagi
- - kappaOne
+ - kappaOne <one...@gm...>
- Simon Felix
- Ryan McNally
- Ciardhubh <ciardhubh[at]ciardhubh.de>
- Jens von Pilgrim
- Ruben Garat
+ - Pelle Johnsen <pel...@gm...>
additional credits goes to:
- Joseph I. Valenzuela [OpenAL stuff]
Modified: trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-09-03 11:04:04 UTC (rev 3629)
+++ trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-09-03 14:47:11 UTC (rev 3630)
@@ -151,7 +151,7 @@
* <li>Matthias Mann</li>
* <li>Mickelukas</li>
* <li>NateS</li>
- * <li>pjohnsen</li>
+ * <li>Pelle Johnsen</li>
* <li>Riven</li>
* <li>Ruben01</li>
* <li>Shannon Smith</li>
Modified: trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m
===================================================================
--- trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m 2011-09-03 11:04:04 UTC (rev 3629)
+++ trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m 2011-09-03 14:47:11 UTC (rev 3630)
@@ -34,6 +34,7 @@
* $Id$
*
* @author elias_naur <eli...@us...>
+ * @author Pelle Johnsen
* @version $Revision$
*/
Modified: trunk/LWJGL/www/credits.php
===================================================================
--- trunk/LWJGL/www/credits.php 2011-09-03 11:04:04 UTC (rev 3629)
+++ trunk/LWJGL/www/credits.php 2011-09-03 14:47:11 UTC (rev 3630)
@@ -22,6 +22,7 @@
<li>Simon Felix</li>
<li>Ryan McNally</li>
<li>Ciardhubh</li>
+ <li>Pelle Johnsen</li>
</ul>
<p>
<b>Additional credits goes to</b>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2011-09-03 11:04:11
|
Revision: 3629
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3629&view=rev
Author: spasi
Date: 2011-09-03 11:04:04 +0000 (Sat, 03 Sep 2011)
Log Message:
-----------
Attempt (2) to fix MacOS build.
Modified Paths:
--------------
trunk/LWJGL/platform_build/macosx_ant/build.xml
Modified: trunk/LWJGL/platform_build/macosx_ant/build.xml
===================================================================
--- trunk/LWJGL/platform_build/macosx_ant/build.xml 2011-09-03 10:58:20 UTC (rev 3628)
+++ trunk/LWJGL/platform_build/macosx_ant/build.xml 2011-09-03 11:04:04 UTC (rev 3629)
@@ -27,7 +27,9 @@
<fileset dir="${native}/macosx" includes="*.c"/>
<fileset dir="${native}/common" includes="*.c"/>
<fileset dir="${native}/common/opengl" includes="*.c"/>
- <fileset dir="${native}/generated" includes="*.c"/>
+ <fileset dir="${native}/generated/openal" includes="*.c"/>
+ <fileset dir="${native}/generated/opencl" includes="*.c"/>
+ <fileset dir="${native}/generated/opengl" includes="*.c"/>
</apply>
</target>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2011-09-03 10:58:27
|
Revision: 3628
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3628&view=rev
Author: spasi
Date: 2011-09-03 10:58:20 +0000 (Sat, 03 Sep 2011)
Log Message:
-----------
Attempt to fix MacOS build.
Modified Paths:
--------------
trunk/LWJGL/platform_build/macosx_ant/build.xml
Modified: trunk/LWJGL/platform_build/macosx_ant/build.xml
===================================================================
--- trunk/LWJGL/platform_build/macosx_ant/build.xml 2011-08-31 21:06:46 UTC (rev 3627)
+++ trunk/LWJGL/platform_build/macosx_ant/build.xml 2011-09-03 10:58:20 UTC (rev 3628)
@@ -7,7 +7,7 @@
<mkdir dir="i386"/>
<mkdir dir="x86_64"/>
</target>
-
+
<target name="clean">
<delete failonerror="false">
<fileset dir="i386"/>
@@ -20,16 +20,17 @@
<target name="compile">
<apply dir="${dstdir}" executable="${compiler}" os="Mac OS X" skipemptyfilesets="true" failonerror="true" dest="${dstdir}">
- <arg line="${cflags} -ObjC -O2 -Wall -Wunused -c -fPIC -I/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers -I${native}/common -I${native}/macosx -I/System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNativeFoundation.framework/Versions/A/Headers"/>
+ <arg line="${cflags} -ObjC -O2 -Wall -Wunused -c -fPIC -I/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers -I${native}/common -I${native}/common/opengl -I${native}/macosx -I/System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNativeFoundation.framework/Versions/A/Headers"/>
<!-- Map from *.m and *.c to .o -->
<mapper type="regexp" from="^(.*)\.(c|m)" to="\1.o"/>
<fileset dir="${native}/macosx" includes="*.m"/>
<fileset dir="${native}/macosx" includes="*.c"/>
<fileset dir="${native}/common" includes="*.c"/>
+ <fileset dir="${native}/common/opengl" includes="*.c"/>
<fileset dir="${native}/generated" includes="*.c"/>
</apply>
</target>
-
+
<target name="link">
<apply dir="${objdir}" parallel="true" executable="${linker}" os="Mac OS X" failonerror="true" skipemptyfilesets="true">
<arg line="${linkerflags} -exported_symbols_list ../lwjgl.symbols -dynamiclib -o ${libname} -framework Foundation -framework AppKit -framework JavaVM -framework Carbon -framework OpenGL -framework JavaNativeFoundation -F/System/Library/Frameworks/JavaVM.framework/Frameworks"/>
@@ -40,7 +41,7 @@
<fileset dir="." file="${libname}"/>
</apply>
</target>
-
+
<target name="nativelibrary" depends="init">
<property name="universal_sdkroot" location="/Developer/SDKs/MacOSX10.6.sdk"/>
<property name="ppc_sdkroot" location="/Developer/SDKs/MacOSX10.6.sdk"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2011-08-31 21:06:53
|
Revision: 3627
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3627&view=rev
Author: kappa1
Date: 2011-08-31 21:06:46 +0000 (Wed, 31 Aug 2011)
Log Message:
-----------
mac, attempt a quickfix in order to temporarily bypass nightly server restrictions so that mac natives can build.
Modified Paths:
--------------
trunk/LWJGL/src/native/common/org_lwjgl_opengl_AWTSurfaceLock.c
trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m
Modified: trunk/LWJGL/src/native/common/org_lwjgl_opengl_AWTSurfaceLock.c
===================================================================
--- trunk/LWJGL/src/native/common/org_lwjgl_opengl_AWTSurfaceLock.c 2011-08-29 21:31:23 UTC (rev 3626)
+++ trunk/LWJGL/src/native/common/org_lwjgl_opengl_AWTSurfaceLock.c 2011-08-31 21:06:46 UTC (rev 3627)
@@ -60,7 +60,7 @@
#ifdef __MACH__
if (display_parent) {
//first try CALAYER
- awt.version = JAWT_VERSION_1_4 | JAWT_MACOSX_USE_CALAYER;
+ awt.version = JAWT_VERSION_1_4 | 0x80000000;//JAWT_MACOSX_USE_CALAYER;
result = JAWT_GetAWT(env, &awt);
}
#endif
Modified: trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m
===================================================================
--- trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m 2011-08-29 21:31:23 UTC (rev 3626)
+++ trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m 2011-08-31 21:06:46 UTC (rev 3627)
@@ -68,7 +68,7 @@
JAWT_MacOSXDrawingSurfaceInfo *macosx_dsi = (JAWT_MacOSXDrawingSurfaceInfo *)surface->dsi->platformInfo;
// check for CALayer support
- if(surface->awt.version & JAWT_MACOSX_USE_CALAYER) {
+ if(surface->awt.version & 0x80000000) { //JAWT_MACOSX_USE_CALAYER) {
jint width = surface->dsi->bounds.width;
jint height = surface->dsi->bounds.height;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2011-08-29 21:31:30
|
Revision: 3626
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3626&view=rev
Author: kappa1
Date: 2011-08-29 21:31:23 +0000 (Mon, 29 Aug 2011)
Log Message:
-----------
Linux Display - create native Display window at the correct position on linux.
Modified Paths:
--------------
trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c
trunk/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c
Modified: trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c
===================================================================
--- trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c 2011-08-29 13:34:17 UTC (rev 3625)
+++ trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c 2011-08-29 21:31:23 UTC (rev 3626)
@@ -334,15 +334,17 @@
// Use Motif decoration hint property and hope the window manager respects them
setDecorations(disp, win, 0);
}
- XSizeHints * size_hints = XAllocSizeHints();
- size_hints->flags = PMinSize | PMaxSize;
- size_hints->min_width = width;
- size_hints->max_width = width;
- size_hints->min_height = height;
- size_hints->max_height = height;
- XSetWMNormalHints(disp, win, size_hints);
+ XSizeHints * window_hints = XAllocSizeHints();
+ window_hints->flags = PPosition | PMinSize | PMaxSize;
+ window_hints->x = x;
+ window_hints->y = y;
+ window_hints->min_width = width;
+ window_hints->max_width = width;
+ window_hints->min_height = height;
+ window_hints->max_height = height;
+ XSetWMNormalHints(disp, win, window_hints);
updateWindowHints(env, disp, win);
- XFree(size_hints);
+ XFree(window_hints);
#define NUM_ATOMS 1
Atom protocol_atoms[NUM_ATOMS] = {XInternAtom(disp, "WM_DELETE_WINDOW", False)/*, XInternAtom(disp, "WM_TAKE_FOCUS", False)*/};
XSetWMProtocols(disp, win, protocol_atoms, NUM_ATOMS);
Modified: trunk/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c
===================================================================
--- trunk/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c 2011-08-29 13:34:17 UTC (rev 3625)
+++ trunk/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c 2011-08-29 21:31:23 UTC (rev 3626)
@@ -328,15 +328,17 @@
// Use Motif decoration hint property and hope the window manager respects them
setDecorations(disp, win, 0);
}
- XSizeHints * size_hints = XAllocSizeHints();
- size_hints->flags = PMinSize | PMaxSize;
- size_hints->min_width = width;
- size_hints->max_width = width;
- size_hints->min_height = height;
- size_hints->max_height = height;
- XSetWMNormalHints(disp, win, size_hints);
+ XSizeHints * window_hints = XAllocSizeHints();
+ window_hints->flags = PPosition | PMinSize | PMaxSize;
+ window_hints->x = x;
+ window_hints->y = y;
+ window_hints->min_width = width;
+ window_hints->max_width = width;
+ window_hints->min_height = height;
+ window_hints->max_height = height;
+ XSetWMNormalHints(disp, win, window_hints);
updateWindowHints(env, disp, win);
- XFree(size_hints);
+ XFree(window_hints);
#define NUM_ATOMS 1
Atom protocol_atoms[NUM_ATOMS] = {XInternAtom(disp, "WM_DELETE_WINDOW", False)/*, XInternAtom(disp, "WM_TAKE_FOCUS", False)*/};
XSetWMProtocols(disp, win, protocol_atoms, NUM_ATOMS);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2011-08-29 13:34:24
|
Revision: 3625
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3625&view=rev
Author: kappa1
Date: 2011-08-29 13:34:17 +0000 (Mon, 29 Aug 2011)
Log Message:
-----------
apply patch to enable applets on OS X using the java plugin2, credits to pjohnson for creating patch.
Modified Paths:
--------------
trunk/LWJGL/platform_build/macosx_ant/build.xml
trunk/LWJGL/src/java/org/lwjgl/opengl/AWTSurfaceLock.java
trunk/LWJGL/src/native/common/org_lwjgl_opengl_AWTSurfaceLock.c
trunk/LWJGL/src/native/macosx/context.h
trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m
trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXContextImplementation.m
Modified: trunk/LWJGL/platform_build/macosx_ant/build.xml
===================================================================
--- trunk/LWJGL/platform_build/macosx_ant/build.xml 2011-08-29 00:54:54 UTC (rev 3624)
+++ trunk/LWJGL/platform_build/macosx_ant/build.xml 2011-08-29 13:34:17 UTC (rev 3625)
@@ -7,7 +7,7 @@
<mkdir dir="i386"/>
<mkdir dir="x86_64"/>
</target>
-
+
<target name="clean">
<delete failonerror="false">
<fileset dir="i386"/>
@@ -20,22 +20,19 @@
<target name="compile">
<apply dir="${dstdir}" executable="${compiler}" os="Mac OS X" skipemptyfilesets="true" failonerror="true" dest="${dstdir}">
- <arg line="${cflags} -ObjC -O2 -Wall -Wunused -c -fPIC -I${sdkroot}/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers -I${sdkroot}/System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNativeFoundation.framework/Headers -I${native}/common -I${native}/common/opengl -I${native}/macosx"/>
+ <arg line="${cflags} -ObjC -O2 -Wall -Wunused -c -fPIC -I/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers -I${native}/common -I${native}/macosx -I/System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNativeFoundation.framework/Versions/A/Headers"/>
<!-- Map from *.m and *.c to .o -->
<mapper type="regexp" from="^(.*)\.(c|m)" to="\1.o"/>
<fileset dir="${native}/macosx" includes="*.m"/>
<fileset dir="${native}/macosx" includes="*.c"/>
<fileset dir="${native}/common" includes="*.c"/>
- <fileset dir="${native}/common/opengl" includes="*.c"/>
- <fileset dir="${native}/generated/openal" includes="*.c"/>
- <fileset dir="${native}/generated/opencl" includes="*.c"/>
- <fileset dir="${native}/generated/opengl" includes="*.c"/>
+ <fileset dir="${native}/generated" includes="*.c"/>
</apply>
</target>
-
+
<target name="link">
<apply dir="${objdir}" parallel="true" executable="${linker}" os="Mac OS X" failonerror="true" skipemptyfilesets="true">
- <arg line="${linkerflags} -exported_symbols_list ../lwjgl.symbols -dynamiclib -o ${libname} -framework Foundation -framework AppKit -framework JavaVM -framework Carbon -framework OpenGL"/>
+ <arg line="${linkerflags} -exported_symbols_list ../lwjgl.symbols -dynamiclib -o ${libname} -framework Foundation -framework AppKit -framework JavaVM -framework Carbon -framework OpenGL -framework JavaNativeFoundation -F/System/Library/Frameworks/JavaVM.framework/Frameworks"/>
<fileset dir="${objdir}" includes="*.o"/>
</apply>
<apply dir="${objdir}" executable="strip" os="Mac OS X" failonerror="true">
@@ -43,7 +40,7 @@
<fileset dir="." file="${libname}"/>
</apply>
</target>
-
+
<target name="nativelibrary" depends="init">
<property name="universal_sdkroot" location="/Developer/SDKs/MacOSX10.6.sdk"/>
<property name="ppc_sdkroot" location="/Developer/SDKs/MacOSX10.6.sdk"/>
@@ -52,19 +49,19 @@
<property name="ppc_flags" value="-isysroot ${ppc_sdkroot}"/>
<antcall target="compile">
<param name="dstdir" location="ppc"/>
- <param name="compiler" value="gcc-4.0"/>
+ <param name="compiler" value="gcc-4.2"/>
<param name="sdkroot" location="${ppc_sdkroot}"/>
<param name="cflags" value="${universal_flags} -arch ppc -mmacosx-version-min=10.3"/>
</antcall>
<antcall target="compile">
<param name="dstdir" location="i386"/>
- <param name="compiler" value="gcc-4.0"/>
+ <param name="compiler" value="gcc-4.2"/>
<param name="sdkroot" location="${universal_sdkroot}"/>
<param name="cflags" value="${universal_flags} -arch i386 -mmacosx-version-min=10.4"/>
</antcall>
<antcall target="compile">
<param name="dstdir" location="x86_64"/>
- <param name="compiler" value="gcc-4.0"/>
+ <param name="compiler" value="gcc-4.2"/>
<param name="sdkroot" location="${universal_sdkroot}"/>
<param name="cflags" value="-isysroot ${x86_64_sdkroot} -arch x86_64 -mmacosx-version-min=10.5"/>
</antcall>
@@ -75,19 +72,19 @@
<antcall target="link">
<param name="objdir" location="ppc"/>
<param name="libname" value="liblwjgl-ppc.jnilib"/>
- <param name="linker" value="gcc-4.0"/>
+ <param name="linker" value="gcc-4.2"/>
<param name="linkerflags" value="${universal_flags} -arch ppc -mmacosx-version-min=10.3"/>
</antcall>
<antcall target="link">
<param name="objdir" location="i386"/>
<param name="libname" value="liblwjgl-i386.jnilib"/>
- <param name="linker" value="gcc-4.0"/>
+ <param name="linker" value="gcc-4.2"/>
<param name="linkerflags" value="${universal_flags} -arch i386 -mmacosx-version-min=10.4"/>
</antcall>
<antcall target="link">
<param name="objdir" location="x86_64"/>
<param name="libname" value="liblwjgl-i86_64.jnilib"/>
- <param name="linker" value="gcc-4.0"/>
+ <param name="linker" value="gcc-4.2"/>
<param name="linkerflags" value="-isysroot ${x86_64_sdkroot} -arch x86_64 -mmacosx-version-min=10.5"/>
</antcall>
<apply dir="." parallel="true" executable="lipo" os="Mac OS X" failonerror="true" skipemptyfilesets="true" >
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/AWTSurfaceLock.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/AWTSurfaceLock.java 2011-08-29 00:54:54 UTC (rev 3624)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/AWTSurfaceLock.java 2011-08-29 13:34:17 UTC (rev 3625)
@@ -78,14 +78,15 @@
// We need to elevate privileges because of an AWT bug. Please see
// http://192.18.37.44/forums/index.php?topic=10572 for a discussion.
// It is only needed on first call, so we avoid it on all subsequent calls
- // due to performance.
+ // due to performance..
+ final Canvas parent = component instanceof AWTGLCanvas ? component : Display.getParent();
if (firstLockSucceeded)
- return lockAndInitHandle(lock_buffer, component);
+ return lockAndInitHandle(lock_buffer, component, parent);
else
try {
firstLockSucceeded = AccessController.doPrivileged(new PrivilegedExceptionAction<Boolean>() {
public Boolean run() throws LWJGLException {
- return lockAndInitHandle(lock_buffer, component);
+ return lockAndInitHandle(lock_buffer, component, parent);
}
});
return firstLockSucceeded;
@@ -94,7 +95,7 @@
}
}
- private static native boolean lockAndInitHandle(ByteBuffer lock_buffer, Canvas component) throws LWJGLException;
+ private static native boolean lockAndInitHandle(ByteBuffer lock_buffer, Canvas component, Canvas display_parent) throws LWJGLException;
void unlock() throws LWJGLException {
nUnlock(lock_buffer);
Modified: trunk/LWJGL/src/native/common/org_lwjgl_opengl_AWTSurfaceLock.c
===================================================================
--- trunk/LWJGL/src/native/common/org_lwjgl_opengl_AWTSurfaceLock.c 2011-08-29 00:54:54 UTC (rev 3624)
+++ trunk/LWJGL/src/native/common/org_lwjgl_opengl_AWTSurfaceLock.c 2011-08-29 13:34:17 UTC (rev 3625)
@@ -49,15 +49,29 @@
}
JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_AWTSurfaceLock_lockAndInitHandle
- (JNIEnv *env, jclass clazz, jobject lock_buffer_handle, jobject canvas) {
+ (JNIEnv *env, jclass clazz, jobject lock_buffer_handle, jobject canvas, jobject display_parent) {
JAWT awt;
JAWT_DrawingSurface* ds;
JAWT_DrawingSurfaceInfo *dsi;
AWTSurfaceLock *awt_lock = (AWTSurfaceLock *)(*env)->GetDirectBufferAddress(env, lock_buffer_handle);
- awt.version = JAWT_VERSION_1_4;
- if (JAWT_GetAWT(env, &awt) == JNI_FALSE) {
- throwException(env, "Could not get the JAWT interface");
- return JNI_FALSE;
+
+ jboolean result = JNI_FALSE;
+
+ #ifdef __MACH__
+ if (display_parent) {
+ //first try CALAYER
+ awt.version = JAWT_VERSION_1_4 | JAWT_MACOSX_USE_CALAYER;
+ result = JAWT_GetAWT(env, &awt);
+ }
+ #endif
+
+ if (result == JNI_FALSE) {
+ // now try without CALAYER
+ awt.version = JAWT_VERSION_1_4;
+ if (JAWT_GetAWT(env, &awt) == JNI_FALSE) {
+ throwException(env, "Could not get the JAWT interface");
+ return JNI_FALSE;
+ }
}
ds = awt.GetDrawingSurface(env, canvas);
Modified: trunk/LWJGL/src/native/macosx/context.h
===================================================================
--- trunk/LWJGL/src/native/macosx/context.h 2011-08-29 00:54:54 UTC (rev 3624)
+++ trunk/LWJGL/src/native/macosx/context.h 2011-08-29 13:34:17 UTC (rev 3625)
@@ -50,6 +50,7 @@
typedef struct {
NSOpenGLPixelFormat *pixel_format;
bool window;
+ bool canDrawGL;
union {
NSView *nsview;
NSOpenGLPixelBuffer *pbuffer;
Modified: trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m
===================================================================
--- trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m 2011-08-29 00:54:54 UTC (rev 3624)
+++ trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m 2011-08-29 13:34:17 UTC (rev 3625)
@@ -37,6 +37,9 @@
* @version $Revision$
*/
+#import <Cocoa/Cocoa.h>
+#import <JavaNativeFoundation.h>
+
#include <jni.h>
#include <jawt_md.h>
#include "awt_tools.h"
@@ -44,13 +47,147 @@
#include "context.h"
#include "common_tools.h"
+// forward declaration
+@interface PBufferGLLayer : NSOpenGLLayer {
+ MacOSXPeerInfo *peer_info;
+ GLuint textureID;
+ BOOL canDraw;
+}
+
+@property (nonatomic) MacOSXPeerInfo *peer_info;
+@property (nonatomic) GLuint textureID;
+@end
+
+
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXCanvasPeerInfo_nInitHandle
- (JNIEnv *env, jclass clazz, jobject lock_buffer_handle, jobject peer_info_handle) {
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+(JNIEnv *env, jclass clazz, jobject lock_buffer_handle, jobject peer_info_handle) {
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
MacOSXPeerInfo *peer_info = (MacOSXPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle);
AWTSurfaceLock *surface = (AWTSurfaceLock *)(*env)->GetDirectBufferAddress(env, lock_buffer_handle);
JAWT_MacOSXDrawingSurfaceInfo *macosx_dsi = (JAWT_MacOSXDrawingSurfaceInfo *)surface->dsi->platformInfo;
- peer_info->nsview = macosx_dsi->cocoaViewRef;
- peer_info->window = true;
+
+ // check for CALayer support
+ if(surface->awt.version & JAWT_MACOSX_USE_CALAYER) {
+ jint width = surface->dsi->bounds.width;
+ jint height = surface->dsi->bounds.height;
+
+ if(peer_info->pbuffer == NULL ||
+ width != [peer_info->pbuffer pixelsWide] || height != [peer_info->pbuffer pixelsHigh]) {
+ if(peer_info->pbuffer != NULL) {
+ [peer_info->pbuffer release];
+ }
+
+ // make pbuffer
+ NSOpenGLPixelBuffer *pbuffer = nil;
+ NSLog(@"Make pbuffer: %d x %d", width, height);
+ pbuffer = [[NSOpenGLPixelBuffer alloc] initWithTextureTarget:GL_TEXTURE_RECTANGLE_EXT
+ textureInternalFormat:GL_RGBA
+ textureMaxMipMapLevel:0
+ pixelsWide:width
+ pixelsHigh:height];
+
+ peer_info->pbuffer = pbuffer;
+ peer_info->window = false;
+ peer_info->canDrawGL = true;
+ }
+
+ if (macosx_dsi != NULL) {
+ [JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){
+ // attach the "root layer" to the AWT Canvas surface layers
+ id <JAWT_SurfaceLayers> surfaceLayers = (id <JAWT_SurfaceLayers>)macosx_dsi;//dsi->platformInfo;
+ if(surfaceLayers.layer == NULL) {
+ PBufferGLLayer *caGLLayer = [[PBufferGLLayer new] autorelease];
+ caGLLayer.peer_info = peer_info;
+ caGLLayer.asynchronous = YES;
+ caGLLayer.needsDisplayOnBoundsChange = YES;
+ caGLLayer.opaque = YES;
+ surfaceLayers.layer = caGLLayer;
+ }
+ }];
+ }
+ } else {
+ peer_info->nsview = macosx_dsi->cocoaViewRef;
+ peer_info->window = true;
+ }
+
[pool release];
}
+
+// rotates a red square when asked to draw
+@implementation PBufferGLLayer
+
+@synthesize peer_info;
+@synthesize textureID;
+
+// override to draw custom GL content
+-(void)drawInCGLContext:(CGLContextObj)glContext
+ pixelFormat:(CGLPixelFormatObj)pixelFormat
+ forLayerTime:(CFTimeInterval)timeInterval
+ displayTime:(const CVTimeStamp *)timeStamp {
+
+ if(!peer_info || !peer_info->pbuffer) {
+ return;
+ }
+
+ peer_info->canDrawGL = false;
+
+ NSOpenGLPixelBuffer *pbuffer = self.peer_info->pbuffer;
+
+ // set the current context
+ CGLSetCurrentContext(glContext);
+
+ GLsizei width = [pbuffer pixelsWide];
+ GLsizei height = [pbuffer pixelsHigh];
+
+ if(textureID == 0) {
+ glGenTextures(1, &textureID);
+ }
+ glBindTexture(GL_TEXTURE_RECTANGLE_EXT, self.textureID);
+ CGLTexImagePBuffer(glContext,[pbuffer CGLPBufferObj], GL_FRONT);
+
+ glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+
+ glEnable(GL_TEXTURE_RECTANGLE_EXT);
+
+ static GLfloat verts[] = {
+ -1.0, -1.0,
+ -1.0, 1.0,
+ 1.0, 1.0,
+ 1.0, -1.0
+ };
+
+ GLfloat tex[] = {
+ 0.0, 0.0,
+ 0.0, height,
+ width, height,
+ width, 0.0
+ };
+
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+ glVertexPointer(2, GL_FLOAT, 0, verts);
+ glTexCoordPointer(2, GL_FLOAT, 0, tex);
+
+ glDrawArrays(GL_QUADS, 0, 4);
+
+ glDisableClientState(GL_VERTEX_ARRAY);
+ glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+
+ glDisable(GL_TEXTURE_RECTANGLE_EXT);
+
+ // call super to finalize the drawing - by default all it does is call glFlush()
+ [super drawInCGLContext:glContext pixelFormat:pixelFormat forLayerTime:timeInterval displayTime:timeStamp];
+}
+
+-(BOOL)canDrawInCGLContext:(CGLContextObj)glContext
+ pixelFormat:(CGLPixelFormatObj)pixelFormat
+ forLayerTime:(CFTimeInterval)timeInterval
+ displayTime:(const CVTimeStamp *)timeStamp {
+ return peer_info->canDrawGL ? YES : NO;
+}
+
+@end
\ No newline at end of file
Modified: trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXContextImplementation.m
===================================================================
--- trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXContextImplementation.m 2011-08-29 00:54:54 UTC (rev 3624)
+++ trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXContextImplementation.m 2011-08-29 13:34:17 UTC (rev 3625)
@@ -45,6 +45,7 @@
typedef struct {
NSOpenGLContext *context;
+ MacOSXPeerInfo *peer_info;
} MacOSXContext;
JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nCreate
@@ -72,6 +73,7 @@
}
context_info = (MacOSXContext *)(*env)->GetDirectBufferAddress(env, context_handle);
context_info->context = context;
+ context_info->peer_info = peer_info;
[pool release];
return context_handle;
}
@@ -79,8 +81,9 @@
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nSwapBuffers
(JNIEnv *env, jclass clazz, jobject context_handle) {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- MacOSXContext *peer_info = (MacOSXContext *)(*env)->GetDirectBufferAddress(env, context_handle);
- [peer_info->context flushBuffer];
+ MacOSXContext *context_info = (MacOSXContext *)(*env)->GetDirectBufferAddress(env, context_handle);
+ [context_info->context flushBuffer];
+ context_info->peer_info->canDrawGL = true;
[pool release];
}
@@ -90,6 +93,7 @@
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
MacOSXContext *context_info = (MacOSXContext *)(*env)->GetDirectBufferAddress(env, context_handle);
[context_info->context update];
+ context_info->peer_info->canDrawGL = true;
[pool release];
}
@@ -118,6 +122,7 @@
} else {
[context_info->context setPixelBuffer:peer_info->pbuffer cubeMapFace:0 mipMapLevel:0 currentVirtualScreen:0];
}
+ peer_info->canDrawGL = true;
[pool release];
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2011-08-29 00:55:01
|
Revision: 3624
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3624&view=rev
Author: kappa1
Date: 2011-08-29 00:54:54 +0000 (Mon, 29 Aug 2011)
Log Message:
-----------
AppletLoader: somehow removed patch 3559 with last appletloader patch, readded removed code.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
Modified: trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-08-29 00:40:28 UTC (rev 3623)
+++ trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-08-29 00:54:54 UTC (rev 3624)
@@ -146,6 +146,7 @@
* <li>Bobjob</li>
* <li>Dashiva</li>
* <li>Dr_evil</li>
+ * <li>Elias Naur</li>
* <li>Kevin Glass</li>
* <li>Matthias Mann</li>
* <li>Mickelukas</li>
@@ -837,14 +838,12 @@
// if specified applet version already available don't download anything
boolean versionAvailable = false;
- // version of applet
+ // version string of applet
String version = getParameter("al_version");
- float latestVersion = 0;
// if applet version specifed, compare with version in the cache
if (version != null) {
- latestVersion = Float.parseFloat(version);
- versionAvailable = compareVersion(versionFile, latestVersion);
+ versionAvailable = compareVersion(versionFile, version.toLowerCase());
}
// if jars not available or need updating download them
@@ -867,7 +866,7 @@
// save version information once jars downloaded successfully
if (version != null) {
percentage = 90;
- writeObjectFile(versionFile, latestVersion);
+ writeObjectFile(versionFile, version.toLowerCase());
}
// save file names with last modified info once downloaded successfully
@@ -959,21 +958,23 @@
/**
* This method will return true if the version stored in the file
- * matches the supplied float version.
+ * matches the supplied String version.
*
* @param versionFile - location to file containing version information
- * @param version - float version that needs to be compared
+ * @param version - String version that needs to be compared
* @return returns true if the version in file matches specified version
*/
- protected boolean compareVersion(File versionFile, float version) {
+ protected boolean compareVersion(File versionFile, String version) {
// if version file exists
if (versionFile.exists()) {
+ String s = readStringFile(versionFile);
+
// compare to version with file
- if (version == readFloatFile(versionFile)) {
+ if (s != null && s.equals(version)) {
percentage = 90; // not need to download cache files again
if(debugMode) {
- System.out.println("Loading Cached Applet Version " + version);
+ System.out.println("Loading Cached Applet Version: " + version);
}
debug_sleep(2000);
@@ -1056,22 +1057,21 @@
}
/**
- * read float from File
+ * read String object from File
*
* @param file to be read
- * @return the float stored in the file or 0 if it fails
+ * @return the String stored in the file or null if it fails
*/
- protected float readFloatFile(File file) {
+ protected String readStringFile(File file) {
try {
- Float version = (Float)readObjectFile(file);
- return version.floatValue();
+ return (String)readObjectFile(file);
} catch (Exception e) {
// failed to read version file
e.printStackTrace();
}
- // return 0 if failed to read file
- return 0;
+ // return null if failed to read file
+ return null;
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2011-08-29 00:40:37
|
Revision: 3623
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3623&view=rev
Author: kappa1
Date: 2011-08-29 00:40:28 +0000 (Mon, 29 Aug 2011)
Log Message:
-----------
AppletLoader: implement al_min_jre parameter, various small refactoring, update comments and javadoc.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
Modified: trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-08-27 22:21:13 UTC (rev 3622)
+++ trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-08-29 00:40:28 UTC (rev 3623)
@@ -98,7 +98,7 @@
* The following applet parameters are required:
* <ul>
* <li>al_main - [String] Full package and class the applet to instantiate and display when loaded.</li>
- * <li>al_jars - [String] Comma seperated list of jars to download.</li>
+ * <li>al_jars - [String] Comma separated list of jars to download.</li>
* <p>
* <li>al_windows - [String] Jar containing native files for windows.</li>
* <li>al_linux - [String] Jar containing native files for linux.</li>
@@ -110,19 +110,21 @@
* <p>
* Additionally the following parameters can be supplied to tweak the behaviour of the AppletLoader.
* <ul>
+ * <li>al_cache - [boolean] Whether to use cache system. <i>Default: true</i>.</li>
* <li>al_version - [int or float] Version of deployment. If this is specified, the jars will be cached and
* reused if the version matches. If version doesn't match all of the files are reloaded.</li>
- * <li>al_cache - [boolean] Whether to use cache system. <i>Default: true</i>.</li>
+ *
* <li>al_debug - [boolean] Whether to enable debug mode. <i>Default: false</i>.</li>
- * <li>al_prepend_host - [boolean] Whether to limit caching to this domain, disable if your applet is hosted on multple domains and needs to share the cache. <i>Default: true</i>.</li>
+ * <li>al_min_jre - [String] Specify the minimum jre version that the applet requires, should be in format like 1.6.0_24 or a subset like 1.6 <i>Default: 1.5</i>.</li>
+ * <li>al_prepend_host - [boolean] Whether to limit caching to this domain, disable if your applet is hosted on multiple domains and needs to share the cache. <i>Default: true</i>.</li>
* <p>
* <li>al_windows64 - [String] If specified it will be used instead of al_windows on 64bit windows systems.</li>
- * <li>al_windows32 - [String] If specifed it will be used instead of al_windows on 32bit windows systems.</li>
- * <li>al_linux64 - [String] If specifed it will be used instead of al_linux on 64bit linux systems.</li>
- * <li>al_linux32 - [String] If specifed it will be used instead of al_linux on 32bit linux systems.</li>
- * <li>al_mac32 - [String] If specifed it will be used instead of al_mac on 64bit mac systems.</li>
- * <li>al_mac64 - [String] If specifed it will be used instead of al_mac on 32bit mac systems.</li>
- * <li>al_macppc - [String] If specifed it will be used instead of al_mac on PPC mac systems.</li>
+ * <li>al_windows32 - [String] If specified it will be used instead of al_windows on 32bit windows systems.</li>
+ * <li>al_linux64 - [String] If specified it will be used instead of al_linux on 64bit linux systems.</li>
+ * <li>al_linux32 - [String] If specified it will be used instead of al_linux on 32bit linux systems.</li>
+ * <li>al_mac32 - [String] If specified it will be used instead of al_mac on 64bit mac systems.</li>
+ * <li>al_mac64 - [String] If specified it will be used instead of al_mac on 32bit mac systems.</li>
+ * <li>al_macppc - [String] If specified it will be used instead of al_mac on PPC mac systems.</li>
* <p>
* <li>boxbgcolor - [String] any String AWT color ("red", "blue", etc), RGB (0-255) or hex formated color (#RRGGBB) to use as background. <i>Default: #ffffff</i>.</li>
* <li>boxfgcolor - [String] any String AWT color ("red", "blue", etc), RGB (0-255) or hex formated color (#RRGGBB) to use as foreground. <i>Default: #000000</i>.</li>
@@ -144,7 +146,6 @@
* <li>Bobjob</li>
* <li>Dashiva</li>
* <li>Dr_evil</li>
- * <li>Elias Naur</li>
* <li>Kevin Glass</li>
* <li>Matthias Mann</li>
* <li>Mickelukas</li>
@@ -160,36 +161,39 @@
/** initializing */
public static final int STATE_INIT = 1;
+
+ /** checking version of jre */
+ public static final int STATE_CHECK_JRE_VERSION = 2;
/** determining which packages that are required */
- public static final int STATE_DETERMINING_PACKAGES = 2;
+ public static final int STATE_DETERMINING_PACKAGES = 3;
/** checking for already downloaded files */
- public static final int STATE_CHECKING_CACHE = 3;
+ public static final int STATE_CHECKING_CACHE = 4;
/** downloading packages */
- public static final int STATE_DOWNLOADING = 4;
+ public static final int STATE_DOWNLOADING = 5;
/** extracting packages */
- public static final int STATE_EXTRACTING_PACKAGES = 5;
+ public static final int STATE_EXTRACTING_PACKAGES = 6;
/** validating packages */
- public static final int STATE_VALIDATING_PACKAGES = 6;
+ public static final int STATE_VALIDATING_PACKAGES = 7;
/** updating the classpath */
- public static final int STATE_UPDATING_CLASSPATH = 7;
+ public static final int STATE_UPDATING_CLASSPATH = 8;
/** switching to real applet */
- public static final int STATE_SWITCHING_APPLET = 8;
+ public static final int STATE_SWITCHING_APPLET = 9;
/** initializing real applet */
- public static final int STATE_INITIALIZE_REAL_APPLET = 9;
+ public static final int STATE_INITIALIZE_REAL_APPLET = 10;
/** stating real applet */
- public static final int STATE_START_REAL_APPLET = 10;
+ public static final int STATE_START_REAL_APPLET = 11;
/** done */
- public static final int STATE_DONE = 11;
+ public static final int STATE_DONE = 12;
/** used to calculate length of progress bar */
protected int percentage;
@@ -239,9 +243,6 @@
/** applet to load after all downloads are complete */
protected Applet lwjglApplet;
- /** whether a fatal error occured */
- protected boolean fatalError;
-
/** whether we're running in debug mode */
protected boolean debugMode;
@@ -280,19 +281,33 @@
/** messages to be passed via liveconnect in headless mode */
protected String[] headlessMessage;
+
+ /** whether a fatal error occurred */
+ protected boolean fatalError;
+
+ /** whether a certificate refused error occurred */
+ protected boolean certificateRefused;
+
+ /** whether the minimum required JRE version is not found */
+ protected boolean minimumJreNotFound;
/** generic error message to display on error */
protected String[] genericErrorMessage = { "An error occured while loading the applet.",
"Please contact support to resolve this issue.",
"<placeholder for error message>"};
- /** whether a certificate refused error occured */
- protected boolean certificateRefused;
-
- /** error message to display if user refuses to accept certicate*/
+ /** error message to display if user refuses to accept certificate*/
protected String[] certificateRefusedMessage = { "Permissions for Applet Refused.",
"Please accept the permissions dialog to allow",
"the applet to continue the loading process."};
+
+ /** error message to display if minimum JRE version is not met */
+ protected String[] minimumJREMessage = { "Your version of Java is out of date.",
+ "Visit java.com to get the latest version.",
+ "Java <al_min_jre> or greater is required."};
+
+ /** fatal error message to display */
+ protected String[] errorMessage;
/** have natives been loaded by another instance of this applet */
protected static boolean natives_loaded;
@@ -439,6 +454,7 @@
* This method will return the current progress of the AppletLoader
* as a value from 0-100. In the case of a fatal error it will
* return -1. If the certificate is refused it will return -2.
+ * If the minimum jre requirement is not met will return -3.
*
* When method returns 100 the AppletLoader will sleep until the
* method is called again. When called again it will switch to the
@@ -447,8 +463,10 @@
*/
public int getStatus() {
if (fatalError) {
+ headlessMessage = errorMessage;
+
if (certificateRefused) return -2;
- headlessMessage = (certificateRefused) ? certificateRefusedMessage : genericErrorMessage;
+ if (minimumJreNotFound) return -3;
return -1;
}
@@ -497,6 +515,9 @@
cleanUp(); // clean up resources
return;
}
+
+ // no drawing in headless mode
+ if (headless) return;
// create offscreen if missing
if (offscreen == null) {
@@ -529,12 +550,9 @@
og.fillRect(0, 0, offscreen.getWidth(null), offscreen.getHeight(null));
og.setColor(fgColor);
- String message = getDescriptionForState();
-
+
// if we had a failure of some sort, notify the user
if (fatalError) {
- String[] errorMessage = (certificateRefused) ? certificateRefusedMessage : genericErrorMessage;
-
for(int i=0; i<errorMessage.length; i++) {
if(errorMessage[i] != null) {
int messageX = (offscreen.getWidth(null) - fm.stringWidth(errorMessage[i])) / 2;
@@ -543,7 +561,7 @@
og.drawString(errorMessage[i], messageX, messageY + i*fm.getHeight());
}
}
- } else if (!headless) {
+ } else {
og.setColor(fgColor);
painting = true;
@@ -558,6 +576,8 @@
}
// draw message
+ String message = getDescriptionForState();
+
int messageX = (offscreen.getWidth(null) - fm.stringWidth(message)) / 2;
int messageY = y + 20;
@@ -572,7 +592,7 @@
og.drawString(subtaskMessage, messageX, messageY+20);
}
- // draw loading bar, clipping it depending on percentage done
+ // draw loading progress bar, clipping it depending on percentage done
if (progressbar != null) {
int barSize = (progressbar.getWidth(null) * percentage) / 100;
og.clipRect(x-progressbar.getWidth(null)/2, 0, barSize, offscreen.getHeight(null));
@@ -636,6 +656,8 @@
switch (state) {
case STATE_INIT:
return "Initializing loader";
+ case STATE_CHECK_JRE_VERSION:
+ return "Checking version";
case STATE_DETERMINING_PACKAGES:
return "Determining packages to load";
case STATE_CHECKING_CACHE:
@@ -772,24 +794,30 @@
}
/**
- * 8 steps
+ * 9 steps
*
- * 1) check applet cache and decide whether to download jars
- * 2) download the jars
- * 3) extract native files
- * 4) validate jars for any corruption
- * 5) save applet cache information
- * 6) add jars to class path
- * 7) set any lwjgl properties
- * 8) switch to loaded applet
+ * 1) check jre version meets minimum requirements
+ * 2) check applet cache and decide which jars to download
+ * 3) download the jars
+ * 4) extract native files
+ * 5) validate jars for any corruption
+ * 6) save applet cache information
+ * 7) add jars to class path
+ * 8) set any lwjgl properties
+ * 9) switch to loaded applet
*/
public void run() {
- setState(STATE_CHECKING_CACHE);
+ percentage = 5;
- percentage = 5;
-
try {
debug_sleep(2000);
+
+ // check JRE version meets minimum requirements
+ if (!isMinJREVersionAvailable()) {
+ minimumJreNotFound = true;
+ fatalErrorOccured("Java " + getStringParameter("al_min_jre", "1.5") + " or greater is required.", null);
+ return;
+ }
// parse the urls for the jars into the url list
loadJarURLs();
@@ -809,12 +837,14 @@
// if specified applet version already available don't download anything
boolean versionAvailable = false;
- // version string of applet
+ // version of applet
String version = getParameter("al_version");
-
+ float latestVersion = 0;
+
// if applet version specifed, compare with version in the cache
if (version != null) {
- versionAvailable = compareVersion(versionFile, version.toLowerCase());
+ latestVersion = Float.parseFloat(version);
+ versionAvailable = compareVersion(versionFile, latestVersion);
}
// if jars not available or need updating download them
@@ -837,7 +867,7 @@
// save version information once jars downloaded successfully
if (version != null) {
percentage = 90;
- writeObjectFile(versionFile, version.toLowerCase());
+ writeObjectFile(versionFile, latestVersion);
}
// save file names with last modified info once downloaded successfully
@@ -871,8 +901,8 @@
});
} catch (AccessControlException ace) {
+ certificateRefused = true;
fatalErrorOccured(ace.getMessage(), ace);
- certificateRefused = true;
} catch (Exception e) {
fatalErrorOccured("This occurred while '" + getDescriptionForState() + "'", e);
} finally {
@@ -881,24 +911,69 @@
}
/**
+ * When this method is supplied with a JRE version it will compare it to the
+ * current JRE version.
+ *
+ * minimum requried JRE version is set using al_min_jre parameter, if not
+ * this is not set then the value will default to version 1.5
+ *
+ * The minimumVersion should follow a structure such as x.x.x_x
+ * Example values would include 1.6.0_10 or a subset like 1.6.0 or 1.6
+ *
+ * @return returns true if the available version is greater or equal to the
+ * minimum version required
+ *
+ * @throws Exception a NumberFormatException is thrown if the string is not valid
+ */
+ public boolean isMinJREVersionAvailable() throws Exception {
+ setState(STATE_CHECK_JRE_VERSION);
+
+ String minimumVersion = getStringParameter("al_min_jre", "1.5");
+ String javaVersion = System.getProperty("java.version");
+
+ // split version string into a string arrays
+ String[] jvmVersionData = javaVersion.split("[_\\.]");
+ String[] minVersionData = minimumVersion.split("[_\\.]");
+
+ int maxLength = Math.max(jvmVersionData.length, minVersionData.length);
+
+ // convert string arrays into int arrays
+ int[] jvmVersion = new int[maxLength];
+ int[] minVersion = new int[maxLength];
+
+ for (int i = 0; i < jvmVersionData.length; i++) {
+ jvmVersion[i] = Integer.parseInt(jvmVersionData[i]);
+ }
+
+ for (int i = 0; i < minVersionData.length; i++) {
+ minVersion[i] = Integer.parseInt(minVersionData[i]);
+ }
+
+ // compare versions
+ for (int i = 0; i < maxLength; i++) {
+ if (jvmVersion[i] < minVersion[i]) return false; // minVersion is greater then jvmVersion
+ }
+
+ return true;
+ }
+
+ /**
* This method will return true if the version stored in the file
- * matches the supplied String version.
+ * matches the supplied float version.
*
* @param versionFile - location to file containing version information
- * @param version - String version that needs to be compared
+ * @param version - float version that needs to be compared
* @return returns true if the version in file matches specified version
*/
- protected boolean compareVersion(File versionFile, String version) {
+ protected boolean compareVersion(File versionFile, float version) {
// if version file exists
if (versionFile.exists()) {
- String s = readStringFile(versionFile);
-
// compare to version with file
- if (s != null && s.equals(version)) {
+ if (version == readFloatFile(versionFile)) {
percentage = 90; // not need to download cache files again
if(debugMode) {
- System.out.println("Loading Cached Applet Version: " + version);
+ System.out.println("Loading Cached Applet Version " + version);
}
debug_sleep(2000);
@@ -981,21 +1056,22 @@
}
/**
- * read String object from File
+ * read float from File
*
* @param file to be read
- * @return the String stored in the file or null if it fails
+ * @return the float stored in the file or 0 if it fails
*/
- protected String readStringFile(File file) {
+ protected float readFloatFile(File file) {
try {
- return (String)readObjectFile(file);
+ Float version = (Float)readObjectFile(file);
+ return version.floatValue();
} catch (Exception e) {
// failed to read version file
e.printStackTrace();
}
- // return null if failed to read file
- return null;
+ // return 0 if failed to read file
+ return 0;
}
/**
@@ -1226,7 +1302,8 @@
* @throws Exception - if fails to get infomation
*/
protected void getJarInfo(File dir) throws Exception {
-
+ setState(STATE_CHECKING_CACHE);
+
filesLastModified = new HashMap<String, Long>();
// store file sizes and mark which files not to download
@@ -1285,7 +1362,6 @@
* @throws Exception if download fails
*/
protected void downloadJars(String path) throws Exception {
-
setState(STATE_DOWNLOADING);
URLConnection urlconnection;
@@ -1980,13 +2056,25 @@
}
/**
- * Sets the state of the loaded and prints some debug information
+ * Sets the error message and print debug information
*
* @param error Error message to print
*/
protected void fatalErrorOccured(String error, Exception e) {
fatalError = true;
- genericErrorMessage[genericErrorMessage.length-1] = error;
+
+ if (minimumJreNotFound) {
+ errorMessage = minimumJREMessage;
+ errorMessage[errorMessage.length-1] = error;
+ }
+ else if (certificateRefused) {
+ errorMessage = certificateRefusedMessage;
+ }
+ else {
+ errorMessage = genericErrorMessage;
+ errorMessage[errorMessage.length-1] = error;
+ }
+
System.out.println(error);
if(e != null) {
System.out.println(e.getMessage());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2011-08-27 22:21:20
|
Revision: 3622
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3622&view=rev
Author: kappa1
Date: 2011-08-27 22:21:13 +0000 (Sat, 27 Aug 2011)
Log Message:
-----------
Mac Ant build.xml - bump minimum requirements for compiling lwjgl on OS X to prepare for new plugin2 patch. OS X SDK 10.6 and Java 6 update 4 (1.6.0_24) are now the minimum requirements to compile LWJGL on OS X however OS X 10.3+ is still the targeted for compatibility.
Modified Paths:
--------------
trunk/LWJGL/platform_build/macosx_ant/build.xml
Modified: trunk/LWJGL/platform_build/macosx_ant/build.xml
===================================================================
--- trunk/LWJGL/platform_build/macosx_ant/build.xml 2011-08-24 23:18:56 UTC (rev 3621)
+++ trunk/LWJGL/platform_build/macosx_ant/build.xml 2011-08-27 22:21:13 UTC (rev 3622)
@@ -20,7 +20,7 @@
<target name="compile">
<apply dir="${dstdir}" executable="${compiler}" os="Mac OS X" skipemptyfilesets="true" failonerror="true" dest="${dstdir}">
- <arg line="${cflags} -ObjC -O2 -Wall -Wunused -c -fPIC -I${sdkroot}/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers -I${native}/common -I${native}/common/opengl -I${native}/macosx"/>
+ <arg line="${cflags} -ObjC -O2 -Wall -Wunused -c -fPIC -I${sdkroot}/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers -I${sdkroot}/System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaNativeFoundation.framework/Headers -I${native}/common -I${native}/common/opengl -I${native}/macosx"/>
<!-- Map from *.m and *.c to .o -->
<mapper type="regexp" from="^(.*)\.(c|m)" to="\1.o"/>
<fileset dir="${native}/macosx" includes="*.m"/>
@@ -35,7 +35,7 @@
<target name="link">
<apply dir="${objdir}" parallel="true" executable="${linker}" os="Mac OS X" failonerror="true" skipemptyfilesets="true">
- <arg line="${linkerflags} -exported_symbols_list ../lwjgl.symbols -dynamiclib -o ${libname} -framework Foundation -framework AppKit -framework JavaVM -framework Carbon"/>
+ <arg line="${linkerflags} -exported_symbols_list ../lwjgl.symbols -dynamiclib -o ${libname} -framework Foundation -framework AppKit -framework JavaVM -framework Carbon -framework OpenGL"/>
<fileset dir="${objdir}" includes="*.o"/>
</apply>
<apply dir="${objdir}" executable="strip" os="Mac OS X" failonerror="true">
@@ -45,9 +45,9 @@
</target>
<target name="nativelibrary" depends="init">
- <property name="universal_sdkroot" location="/Developer/SDKs/MacOSX10.4u.sdk"/>
- <property name="ppc_sdkroot" location="/Developer/SDKs/MacOSX10.4u.sdk"/>
- <property name="x86_64_sdkroot" location="/Developer/SDKs/MacOSX10.5.sdk"/>
+ <property name="universal_sdkroot" location="/Developer/SDKs/MacOSX10.6.sdk"/>
+ <property name="ppc_sdkroot" location="/Developer/SDKs/MacOSX10.6.sdk"/>
+ <property name="x86_64_sdkroot" location="/Developer/SDKs/MacOSX10.6.sdk"/>
<property name="universal_flags" value="-isysroot ${universal_sdkroot}"/>
<property name="ppc_flags" value="-isysroot ${ppc_sdkroot}"/>
<antcall target="compile">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2011-08-24 23:19:03
|
Revision: 3621
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3621&view=rev
Author: spasi
Date: 2011-08-24 23:18:56 +0000 (Wed, 24 Aug 2011)
Log Message:
-----------
Fixed Pbuffer init when Display has not been created.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java
trunk/LWJGL/src/java/org/lwjgl/opengl/PixelFormat.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java 2011-08-20 16:38:45 UTC (rev 3620)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java 2011-08-24 23:18:56 UTC (rev 3621)
@@ -217,11 +217,11 @@
this.width = width;
this.height = height;
this.peer_info = createPbuffer(width, height, pixel_format, renderTexture);
- Context shared_context;
+ Context shared_context = null;
+ if ( shared_drawable == null )
+ shared_drawable = Display.getDrawable(); // May be null
if (shared_drawable != null)
shared_context = ((DrawableLWJGL)shared_drawable).getContext();
- else
- shared_context = ((DrawableLWJGL)Display.getDrawable()).getContext(); // May be null
this.context = new ContextGL(peer_info, attribs, (ContextGL)shared_context);
}
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/PixelFormat.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/PixelFormat.java 2011-08-20 16:38:45 UTC (rev 3620)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/PixelFormat.java 2011-08-24 23:18:56 UTC (rev 3621)
@@ -38,7 +38,7 @@
* <p/>
* Instants of this class are immutable. An example of the expected way to set
* the PixelFormat property values is the following:
- * <code>PixelFormat pf = new PixelFormat().withDepth(24).withSamples(4).withSRGB(true);</code>
+ * <code>PixelFormat pf = new PixelFormat().withDepthBits(24).withSamples(4).withSRGB(true);</code>
* <p/>
* WARNING: Some pixel formats are known to cause troubles on certain buggy drivers.
* Example: Under Windows, specifying samples != 0 will enable the ARB
@@ -47,7 +47,6 @@
* @author eli...@so...
* @version $Revision$
*/
-
public final class PixelFormat implements PixelFormatLWJGL {
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2011-08-20 16:38:52
|
Revision: 3620
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3620&view=rev
Author: spasi
Date: 2011-08-20 16:38:45 +0000 (Sat, 20 Aug 2011)
Log Message:
-----------
Text encoding improvements.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/MemoryUtil.java
trunk/LWJGL/src/java/org/lwjgl/WindowsSysImplementation.java
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java
trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c
trunk/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c
Modified: trunk/LWJGL/src/java/org/lwjgl/MemoryUtil.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/MemoryUtil.java 2011-08-20 11:56:46 UTC (rev 3619)
+++ trunk/LWJGL/src/java/org/lwjgl/MemoryUtil.java 2011-08-20 16:38:45 UTC (rev 3620)
@@ -33,26 +33,28 @@
import java.lang.reflect.Field;
import java.nio.*;
+import java.nio.charset.CharacterCodingException;
import java.nio.charset.Charset;
import java.nio.charset.CharsetEncoder;
+import java.nio.charset.CoderResult;
/**
* [INTERNAL USE ONLY]
* <p/>
- * This class provides utility methods for passing buffer addresses to JNI API calls.
+ * This class provides utility methods for passing buffers to JNI API calls.
*
* @author Spasi
*/
public final class MemoryUtil {
- private static final CharsetEncoder textEncoder;
+ private static final Charset ascii;
+ private static final Charset utf8;
+ private static final Charset utf16;
static {
- CharsetEncoder encoder = Charset.defaultCharset().newEncoder();
- if ( 1.0f < encoder.maxBytesPerChar() )
- encoder = Charset.forName("ISO-8859-1").newEncoder();
-
- textEncoder = encoder;
+ ascii = Charset.forName("ISO-8859-1");
+ utf8 = Charset.forName("UTF-8");
+ utf16 = Charset.forName("UTF-16LE");
}
private static final Accessor memUtil;
@@ -190,63 +192,128 @@
// --- [ String utilities ] ---
/**
- * Returns the specified text as a null-terminated CharBuffer.
+ * Returns a ByteBuffer containing the specified text ASCII encoded and null-terminated.
+ * If text is null, null is returned.
*
* @param text the text to encode
*
- * @return the encoded text
+ * @return the encoded text or null
+ *
+ * @see String#getBytes()
*/
- public static CharBuffer encodeUTF16(final CharSequence text) {
- CharBuffer buffer = BufferUtils.createCharBuffer(text.length() + 1);
- buffer.append(text).append('\0');
- buffer.flip();
- return buffer;
+ public static ByteBuffer encodeASCII(final CharSequence text) {
+ return encode(text, ascii);
}
/**
- * Returns the specified text array as a CharBuffer. The CharBuffer is packed
- * and each text is null-terminated.
+ * Returns a ByteBuffer containing the specified text UTF-8 encoded and null-terminated.
+ * If text is null, null is returned.
*
- * @param text the text array to encode
+ * @param text the text to encode
*
- * @return the encoded text
+ * @return the encoded text or null
+ *
+ * @see String#getBytes()
*/
- public static CharBuffer encodeUTF16(final CharSequence... text) {
- int len = 0;
- for ( CharSequence cs : text )
- len += cs.length();
-
- final CharBuffer buffer = BufferUtils.createCharBuffer(len + text.length);
- for ( CharSequence cs : text )
- buffer.append(cs).append('\0');
-
- buffer.flip();
- return buffer;
+ public static ByteBuffer encodeUTF8(final CharSequence text) {
+ return encode(text, utf8);
}
/**
- * Encodes and null-terminated the specified text and returns a ByteBuffer.
+ * Returns a ByteBuffer containing the specified text UTF-16LE encoded and null-terminated.
* If text is null, null is returned.
*
* @param text the text to encode
*
- * @return the encoded text or null
+ * @return the encoded text
+ */
+ public static ByteBuffer encodeUTF16(final CharSequence text) {
+ return encode(text, utf16);
+ }
+
+ /**
+ * Wraps the specified text in a null-terminated CharBuffer and encodes it using the specified Charset.
*
- * @see String#getBytes()
+ * @param text the text to encode
+ * @param charset the charset to use for encoding
+ *
+ * @return the encoded text
*/
- public static ByteBuffer encodeASCII(final CharSequence text) {
+ private static ByteBuffer encode(final CharSequence text, final Charset charset) {
if ( text == null )
return null;
- final ByteBuffer buffer = BufferUtils.createByteBuffer(text.length() + 1);
+ return encode(CharBuffer.wrap(new CharSequenceNT(text)), charset);
+ }
- textEncoder.encode(CharBuffer.wrap(text), buffer, true);
- buffer.put((byte)0);
- buffer.flip();
+ /**
+ * A {@link CharsetEncoder#encode(java.nio.CharBuffer)} implementation that uses {@link BufferUtils#createByteBuffer(int)}
+ * instead of {@link ByteBuffer#allocate(int)}.
+ *
+ * @see CharsetEncoder#encode(java.nio.CharBuffer)
+ */
+ private static ByteBuffer encode(final CharBuffer in, final Charset charset) {
+ final CharsetEncoder encoder = charset.newEncoder(); // encoders are not thread-safe, create a new one on every call
- return buffer;
+ int n = (int)(in.remaining() * encoder.averageBytesPerChar());
+ ByteBuffer out = BufferUtils.createByteBuffer(n);
+
+ if ( n == 0 && in.remaining() == 0 )
+ return out;
+
+ encoder.reset();
+ while ( true ) {
+ CoderResult cr = in.hasRemaining() ? encoder.encode(in, out, true) : CoderResult.UNDERFLOW;
+ if ( cr.isUnderflow() )
+ cr = encoder.flush(out);
+
+ if ( cr.isUnderflow() )
+ break;
+
+ if ( cr.isOverflow() ) {
+ n = 2 * n + 1; // Ensure progress; n might be 0!
+ ByteBuffer o = BufferUtils.createByteBuffer(n);
+ out.flip();
+ o.put(out);
+ out = o;
+ continue;
+ }
+
+ try {
+ cr.throwException();
+ } catch (CharacterCodingException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ out.flip();
+ return out;
}
+ /** A null-terminated CharSequence. */
+ private static class CharSequenceNT implements CharSequence {
+
+ final CharSequence source;
+
+ CharSequenceNT(CharSequence source) {
+ this.source = source;
+ }
+
+ public int length() {
+ return source.length() + 1;
+
+ }
+
+ public char charAt(final int index) {
+ return index == source.length() ? '\0' : source.charAt(index);
+
+ }
+
+ public CharSequence subSequence(final int start, final int end) {
+ return new CharSequenceNT(source.subSequence(start, Math.min(end, source.length())));
+ }
+
+ }
+
interface Accessor {
long getAddress(Buffer buffer);
@@ -307,4 +374,4 @@
throw new NoSuchFieldException(fieldName + " does not exist in " + type.getSimpleName() + " or any of its superclasses.");
}
-}
\ No newline at end of file
+}
Modified: trunk/LWJGL/src/java/org/lwjgl/WindowsSysImplementation.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/WindowsSysImplementation.java 2011-08-20 11:56:46 UTC (rev 3619)
+++ trunk/LWJGL/src/java/org/lwjgl/WindowsSysImplementation.java 2011-08-20 16:38:45 UTC (rev 3620)
@@ -31,7 +31,7 @@
*/
package org.lwjgl;
-import java.nio.CharBuffer;
+import java.nio.ByteBuffer;
import java.security.PrivilegedExceptionAction;
import java.security.PrivilegedActionException;
import java.security.AccessController;
@@ -99,10 +99,9 @@
LWJGLUtil.log(String.format("*** Alert *** %s\n%s\n", title, message));
- // Pack both strings in the same buffer
- final CharBuffer buffer = MemoryUtil.encodeUTF16(title, message);
- final long address = MemoryUtil.getAddress0(buffer);
- nAlert(getHwnd(), address, address + (title.length() + 1) * 2);
+ final ByteBuffer titleText = MemoryUtil.encodeUTF16(title);
+ final ByteBuffer messageText = MemoryUtil.encodeUTF16(message);
+ nAlert(getHwnd(), MemoryUtil.getAddress(titleText), MemoryUtil.getAddress(messageText));
}
private static native void nAlert(long parent_hwnd, long title, long message);
private static native void initCommonControls();
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2011-08-20 11:56:46 UTC (rev 3619)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2011-08-20 16:38:45 UTC (rev 3620)
@@ -53,6 +53,7 @@
import org.lwjgl.BufferUtils;
import org.lwjgl.LWJGLException;
import org.lwjgl.LWJGLUtil;
+import org.lwjgl.MemoryUtil;
import org.lwjgl.opengl.XRandR.Screen;
import org.lwjgl.opengles.EGL;
@@ -138,7 +139,7 @@
private long current_cursor;
private long blank_cursor;
private boolean mouseInside = true;
-
+
private Canvas parent;
private long parent_window;
private boolean xembedded;
@@ -148,7 +149,7 @@
private LinuxKeyboard keyboard;
private LinuxMouse mouse;
-
+
private final FocusListener focus_listener = new FocusListener() {
public void focusGained(FocusEvent e) {
synchronized (GlobalLock.lock) {
@@ -499,7 +500,7 @@
private static native void reparentWindow(long display, long window, long parent, int x, int y);
private static native long nGetInputFocus(long display) throws LWJGLException;
private static native void nSetInputFocus(long display, long window, long time);
-
+
private static boolean isAncestorXEmbedded(long window) throws LWJGLException {
long xembed_atom = internAtom("_XEMBED_INFO", true);
if (xembed_atom != None) {
@@ -728,12 +729,13 @@
public void setTitle(String title) {
lockAWT();
try {
- nSetTitle(getDisplay(), getWindow(), title);
+ final ByteBuffer titleText = MemoryUtil.encodeUTF8(title);
+ nSetTitle(getDisplay(), getWindow(), MemoryUtil.getAddress(titleText), titleText.remaining() - 1);
} finally {
unlockAWT();
}
}
- private static native void nSetTitle(long display, long window, String title);
+ private static native void nSetTitle(long display, long window, long title, int len);
public boolean isCloseRequested() {
boolean result = close_requested;
@@ -915,19 +917,19 @@
unlockAWT();
}
}
-
+
private void checkInput() {
if (parent == null) return;
-
+
if (xembedded) {
long current_focus_window = 0;
-
+
try {
current_focus_window = nGetInputFocus(getDisplay());
} catch (LWJGLException e) {
return; // fail silently as it can fail whilst splitting browser tabs
}
-
+
if (last_window_focus != current_focus_window || parent_focused != focused) {
if (isParentWindowActive(current_focus_window)) {
if (parent_focused) {
@@ -963,49 +965,49 @@
}
}
}
-
+
/**
* This method will check if the parent window is active when running
- * in xembed mode. Every xembed embedder window has a focus proxy
- * window that recieves all the input. This method will test whether
- * the provided window handle is the focus proxy, if so it will get its
+ * in xembed mode. Every xembed embedder window has a focus proxy
+ * window that recieves all the input. This method will test whether
+ * the provided window handle is the focus proxy, if so it will get its
* parent window and then test whether this is an ancestor to our
* current_window. If so then parent window is active.
- *
+ *
* @param window - the window handle to test
*/
private boolean isParentWindowActive(long window) {
try {
// parent window already active as window is current_window
if (window == current_window) return true;
-
+
// xembed focus proxy will have no children
if (getChildCount(getDisplay(), window) != 0) return false;
-
+
// get parent, will be xembed embedder window and ancestor of current_window
long parent_window = getParentWindow(getDisplay(), window);
-
+
// parent must not be None
if (parent_window == None) return false;
-
+
// scroll current_window's ancestors to find parent_window
long w = current_window;
-
+
while (w != None) {
w = getParentWindow(getDisplay(), w);
if (w == parent_window) {
parent_proxy_focus_window = window; // save focus proxy window
return true;
}
- }
+ }
} catch (LWJGLException e) {
LWJGLUtil.log("Failed to detect if parent window is active: " + e.getMessage());
return true; // on failure assume still active
}
-
+
return false; // failed to find an active parent window
}
-
+
private void setFocused(boolean got_focus, int focus_detail) {
if (focused == got_focus || focus_detail == NotifyDetailNone || focus_detail == NotifyPointer || focus_detail == NotifyPointerRoot || parent != null)
return;
@@ -1356,11 +1358,11 @@
public boolean isInsideWindow() {
return mouseInside;
}
-
+
public void setResizable(boolean resizable) {
-
+
}
-
+
public boolean wasResized() {
return false;
}
@@ -1552,4 +1554,4 @@
}
}
-}
\ No newline at end of file
+}
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java 2011-08-20 11:56:46 UTC (rev 3619)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java 2011-08-20 16:38:45 UTC (rev 3620)
@@ -438,7 +438,7 @@
private static native DisplayMode getCurrentDisplayMode() throws LWJGLException;
public void setTitle(String title) {
- CharBuffer buffer = MemoryUtil.encodeUTF16(title);
+ ByteBuffer buffer = MemoryUtil.encodeUTF16(title);
nSetTitle(hwnd, MemoryUtil.getAddress0(buffer));
}
private static native void nSetTitle(long hwnd, long title);
Modified: trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c
===================================================================
--- trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c 2011-08-20 11:56:46 UTC (rev 3619)
+++ trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c 2011-08-20 16:38:45 UTC (rev 3620)
@@ -1,31 +1,31 @@
-/*
+/*
* Copyright (c) 2002-2008 LWJGL Project
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
+ * modification, are permitted provided that the following conditions are
* met:
- *
- * * Redistributions of source code must retain the above copyright
+ *
+ * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
- * * Neither the name of 'LWJGL' nor the names of
- * its contributors may be used to endorse or promote products derived
+ * * Neither the name of 'LWJGL' nor the names of
+ * its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * 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
+ * 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.
*/
@@ -72,8 +72,8 @@
static Colormap cmap;
static int current_depth;
-static Pixmap current_icon_pixmap;
-static Pixmap current_icon_mask_pixmap;
+static Pixmap current_icon_pixmap;
+static Pixmap current_icon_mask_pixmap;
static Visual *current_visual;
@@ -94,7 +94,7 @@
jmethodID handler_method = (*env)->GetStaticMethodID(env, org_lwjgl_LinuxDisplay_class, "globalErrorHandler", "(JJJJJJJ)I");
if (handler_method == NULL)
return 0;
- return (*env)->CallStaticIntMethod(env, org_lwjgl_LinuxDisplay_class, handler_method, (jlong)(intptr_t)disp, (jlong)(intptr_t)error,
+ return (*env)->CallStaticIntMethod(env, org_lwjgl_LinuxDisplay_class, handler_method, (jlong)(intptr_t)disp, (jlong)(intptr_t)error,
(jlong)(intptr_t)error->display, (jlong)error->serial, (jlong)error->error_code, (jlong)error->request_code, (jlong)error->minor_code);
} else
return 0;
@@ -170,15 +170,16 @@
return window_mode == org_lwjgl_opengl_LinuxDisplay_FULLSCREEN_LEGACY;
}
-static void setWindowTitle(Display *disp, Window window, const char *title) {
- XStoreName(disp, window, title);
+static void setWindowTitle(Display *disp, Window window, jlong title, jint len) {
+ // ASCII fallback if XChangeProperty fails.
+ XStoreName(disp, window, (const char *)(intptr_t)title);
- // tell WM to use Unicode
+ // Set the UTF-8 encoded title
XChangeProperty(disp, window,
XInternAtom(disp, "_NET_WM_NAME", False),
XInternAtom(disp, "UTF8_STRING", False),
- 8, PropModeReplace, (unsigned char *) title,
- strlen(title));
+ 8, PropModeReplace, (const char *)(intptr_t)title,
+ len);
}
JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_openDisplay(JNIEnv *env, jclass clazz) {
@@ -202,13 +203,11 @@
Display *disp = (Display *)(intptr_t)display;
initPeerInfo(env, peer_info_handle, disp, screen, pixel_format, true, GLX_WINDOW_BIT, true, false);
}
-
-JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetTitle(JNIEnv * env, jclass clazz, jlong display, jlong window_ptr, jstring title_obj) {
+
+JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetTitle(JNIEnv * env, jclass clazz, jlong display, jlong window_ptr, jlong title, jint len) {
Display *disp = (Display *)(intptr_t)display;
Window window = (Window)window_ptr;
- char * title = GetStringNativeChars(env, title_obj);
- setWindowTitle(disp, window, title);
- free(title);
+ setWindowTitle(disp, window, title, len);
}
static void freeIconPixmap(Display *disp) {
@@ -285,7 +284,7 @@
throwException(env, "XAllocWMHints failed");
return;
}
-
+
win_hints->flags = InputHint;
win_hints->input = True;
if (current_icon_pixmap != 0) {
@@ -321,10 +320,10 @@
attribs.override_redirect = True;
}
win = XCreateWindow(disp, parent, x, y, width, height, 0, vis_info->depth, InputOutput, vis_info->visual, attribmask, &attribs);
-
+
current_depth = vis_info->depth;
current_visual = vis_info->visual;
-
+
XFree(vis_info);
if (!checkXError(env, disp)) {
XFreeColormap(disp, cmap);
@@ -511,7 +510,7 @@
throwException(env, "XCreateImage failed");
return None;
}
-
+
GC gc = XCreateGC(disp, pixmap, 0, NULL);
XPutImage(disp, pixmap, gc, image, 0, 0, 0, 0, width, height);
XFreeGC(disp, gc);
@@ -530,7 +529,7 @@
freeIconPixmap(disp);
return;
}
-
+
updateWindowHints(env, disp, window);
}
Modified: trunk/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c
===================================================================
--- trunk/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c 2011-08-20 11:56:46 UTC (rev 3619)
+++ trunk/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c 2011-08-20 16:38:45 UTC (rev 3620)
@@ -167,15 +167,16 @@
return window_mode == org_lwjgl_opengl_LinuxDisplay_FULLSCREEN_LEGACY;
}
-static void setWindowTitle(Display *disp, Window window, const char *title) {
- XStoreName(disp, window, title);
+static void setWindowTitle(Display *disp, Window window, jlong title, jint len) {
+ // ASCII fallback if XChangeProperty fails.
+ XStoreName(disp, window, (const char *)(intptr_t)title);
- // tell WM to use Unicode
+ // Set the UTF-8 encoded title
XChangeProperty(disp, window,
XInternAtom(disp, "_NET_WM_NAME", False),
XInternAtom(disp, "UTF8_STRING", False),
- 8, PropModeReplace, (unsigned char *) title,
- strlen(title));
+ 8, PropModeReplace, (const char *)(intptr_t)title,
+ len);
}
JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_openDisplay(JNIEnv *env, jclass clazz) {
@@ -197,12 +198,10 @@
//initPeerInfo(env, peer_info_handle, disp, screen);
}
-JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetTitle(JNIEnv * env, jclass clazz, jlong display, jlong window_ptr, jstring title_obj) {
+JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetTitle(JNIEnv * env, jclass clazz, jlong display, jlong window_ptr, jlong title, jint len) {
Display *disp = (Display *)(intptr_t)display;
Window window = (Window)window_ptr;
- char * title = GetStringNativeChars(env, title_obj);
- setWindowTitle(disp, window, title);
- free(title);
+ setWindowTitle(disp, window, title, len);
}
static void freeIconPixmap(Display *disp) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2011-08-20 11:56:53
|
Revision: 3619
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3619&view=rev
Author: kappa1
Date: 2011-08-20 11:56:46 +0000 (Sat, 20 Aug 2011)
Log Message:
-----------
Add Unicode support to the native Window title on Linux
Modified Paths:
--------------
trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c
trunk/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c
Modified: trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c
===================================================================
--- trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c 2011-08-18 23:17:17 UTC (rev 3618)
+++ trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c 2011-08-20 11:56:46 UTC (rev 3619)
@@ -172,6 +172,13 @@
static void setWindowTitle(Display *disp, Window window, const char *title) {
XStoreName(disp, window, title);
+
+ // tell WM to use Unicode
+ XChangeProperty(disp, window,
+ XInternAtom(disp, "_NET_WM_NAME", False),
+ XInternAtom(disp, "UTF8_STRING", False),
+ 8, PropModeReplace, (unsigned char *) title,
+ strlen(title));
}
JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_openDisplay(JNIEnv *env, jclass clazz) {
Modified: trunk/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c
===================================================================
--- trunk/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c 2011-08-18 23:17:17 UTC (rev 3618)
+++ trunk/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c 2011-08-20 11:56:46 UTC (rev 3619)
@@ -169,6 +169,13 @@
static void setWindowTitle(Display *disp, Window window, const char *title) {
XStoreName(disp, window, title);
+
+ // tell WM to use Unicode
+ XChangeProperty(disp, window,
+ XInternAtom(disp, "_NET_WM_NAME", False),
+ XInternAtom(disp, "UTF8_STRING", False),
+ 8, PropModeReplace, (unsigned char *) title,
+ strlen(title));
}
JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_openDisplay(JNIEnv *env, jclass clazz) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2011-08-18 23:17:23
|
Revision: 3618
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3618&view=rev
Author: spasi
Date: 2011-08-18 23:17:17 +0000 (Thu, 18 Aug 2011)
Log Message:
-----------
Added glRotated.
Modified Paths:
--------------
trunk/LWJGL/src/templates/org/lwjgl/opengl/GL11.java
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL11.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL11.java 2011-08-18 17:13:05 UTC (rev 3617)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL11.java 2011-08-18 23:17:17 UTC (rev 3618)
@@ -1351,6 +1351,9 @@
void glRotatef(float angle, float x, float y, float z);
@DeprecatedGL
+ void glRotated(double angle, double x, double y, double z);
+
+ @DeprecatedGL
int glRenderMode(@GLenum int mode);
@DeprecatedGL
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2011-08-18 17:13:12
|
Revision: 3617
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3617&view=rev
Author: spasi
Date: 2011-08-18 17:13:05 +0000 (Thu, 18 Aug 2011)
Log Message:
-----------
Fixed GLX extension detection.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/util/generator/RegisterStubsGenerator.java
trunk/LWJGL/src/native/linux/opengl/extgl_glx.c
Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/RegisterStubsGenerator.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/generator/RegisterStubsGenerator.java 2011-08-16 22:17:32 UTC (rev 3616)
+++ trunk/LWJGL/src/java/org/lwjgl/util/generator/RegisterStubsGenerator.java 2011-08-18 17:13:05 UTC (rev 3617)
@@ -41,8 +41,6 @@
* $Id$
*/
-import org.lwjgl.opencl.CLMem;
-
import com.sun.mirror.declaration.*;
import com.sun.mirror.type.*;
Modified: trunk/LWJGL/src/native/linux/opengl/extgl_glx.c
===================================================================
--- trunk/LWJGL/src/native/linux/opengl/extgl_glx.c 2011-08-16 22:17:32 UTC (rev 3616)
+++ trunk/LWJGL/src/native/linux/opengl/extgl_glx.c 2011-08-18 17:13:05 UTC (rev 3617)
@@ -97,9 +97,8 @@
static GLXExtensions symbols_flags;
/** returns true if the extention is available */
-static bool GLXQueryExtension(Display *disp, int screen, const char *name) {
- const GLubyte *exts = (const GLubyte *)lwjgl_glXQueryExtensionsString(disp, screen);
- return extgl_QueryExtension(exts, name);
+static bool GLXQueryExtension(const GLubyte *serverExts, const GLubyte *clientExts, const char *name) {
+ return extgl_QueryExtension(clientExts, name) || extgl_QueryExtension(serverExts, name);
}
static void extgl_InitGLX13() {
@@ -184,17 +183,20 @@
}
static void extgl_InitGLXSupportedExtensions(Display *disp, int screen, GLXExtensions *extension_flags) {
-/* extension_flags.GLX_EXT_visual_info = GLXQueryExtension(disp, screen, "GLX_EXT_visual_info");
- extension_flags.GLX_EXT_visual_rating = GLXQueryExtension(disp, screen, "GLX_EXT_visual_rating");*/
- extension_flags->GLX_SGI_swap_control = symbols_flags.GLX_SGI_swap_control && GLXQueryExtension(disp, screen, "GLX_SGI_swap_control");
- extension_flags->GLX_ARB_multisample = GLXQueryExtension(disp, screen, "GLX_ARB_multisample");
- extension_flags->GLX_ARB_fbconfig_float = GLXQueryExtension(disp, screen, "GLX_ARB_fbconfig_float");
- extension_flags->GLX_EXT_fbconfig_packed_float = GLXQueryExtension(disp, screen, "GLX_EXT_fbconfig_packed_float");
- extension_flags->GLX_ARB_framebuffer_sRGB = GLXQueryExtension(disp, screen, "GLX_ARB_framebuffer_sRGB") || GLXQueryExtension(disp, screen, "GLX_EXT_framebuffer_sRGB");
- extension_flags->GLX_ARB_create_context = GLXQueryExtension(disp, screen, "GLX_ARB_create_context");
- extension_flags->GLX_NV_multisample_coverage = GLXQueryExtension(disp, screen, "GLX_NV_multisample_coverage");
- extension_flags->GLX_NV_present_video = GLXQueryExtension(disp, screen, "GLX_NV_present_video");
- extension_flags->GLX_NV_video_capture = GLXQueryExtension(disp, screen, "GLX_NV_video_capture");
+ const GLubyte *serverExts = (const GLubyte *)lwjgl_glXQueryServerString(disp, screen, GLX_EXTENSIONS);
+ const GLubyte *clientExts = (const GLubyte *)lwjgl_glXGetClientString(disp, GLX_EXTENSIONS);
+
+/* extension_flags.GLX_EXT_visual_info = GLXQueryExtension(serverExts, clientExts, "GLX_EXT_visual_info");
+ extension_flags.GLX_EXT_visual_rating = GLXQueryExtension(serverExts, clientExts, "GLX_EXT_visual_rating");*/
+ extension_flags->GLX_SGI_swap_control = symbols_flags.GLX_SGI_swap_control && GLXQueryExtension(serverExts, clientExts, "GLX_SGI_swap_control");
+ extension_flags->GLX_ARB_multisample = GLXQueryExtension(serverExts, clientExts, "GLX_ARB_multisample");
+ extension_flags->GLX_ARB_fbconfig_float = GLXQueryExtension(serverExts, clientExts, "GLX_ARB_fbconfig_float");
+ extension_flags->GLX_EXT_fbconfig_packed_float = GLXQueryExtension(serverExts, clientExts, "GLX_EXT_fbconfig_packed_float");
+ extension_flags->GLX_ARB_framebuffer_sRGB = GLXQueryExtension(serverExts, clientExts, "GLX_ARB_framebuffer_sRGB") || GLXQueryExtension(serverExts, clientExts, "GLX_EXT_framebuffer_sRGB");
+ extension_flags->GLX_ARB_create_context = GLXQueryExtension(serverExts, clientExts, "GLX_ARB_create_context");
+ extension_flags->GLX_NV_multisample_coverage = GLXQueryExtension(serverExts, clientExts, "GLX_NV_multisample_coverage");
+ extension_flags->GLX_NV_present_video = GLXQueryExtension(serverExts, clientExts, "GLX_NV_present_video");
+ extension_flags->GLX_NV_video_capture = GLXQueryExtension(serverExts, clientExts, "GLX_NV_video_capture");
}
bool extgl_Open(JNIEnv *env) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|