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-10-12 20:18:02
|
Revision: 3666
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3666&view=rev
Author: kappa1
Date: 2011-10-12 20:17:56 +0000 (Wed, 12 Oct 2011)
Log Message:
-----------
bump mac native version due to recent changes to them
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-10-12 19:49:45 UTC (rev 3665)
+++ trunk/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java 2011-10-12 20:17:56 UTC (rev 3666)
@@ -42,7 +42,7 @@
* $Id$
*/
final class MacOSXSysImplementation extends J2SESysImplementation {
- private static final int JNI_VERSION = 20;
+ private static final int JNI_VERSION = 21;
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: <ma...@us...> - 2011-10-12 19:49:52
|
Revision: 3665
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3665&view=rev
Author: matzon
Date: 2011-10-12 19:49:45 +0000 (Wed, 12 Oct 2011)
Log Message:
-----------
Updated test to be compatible with r3664
Revision Links:
--------------
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3664&view=rev
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/test/opengles/MappedIndexedVBOTest.java
Modified: trunk/LWJGL/src/java/org/lwjgl/test/opengles/MappedIndexedVBOTest.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/test/opengles/MappedIndexedVBOTest.java 2011-10-12 18:54:40 UTC (rev 3664)
+++ trunk/LWJGL/src/java/org/lwjgl/test/opengles/MappedIndexedVBOTest.java 2011-10-12 19:49:45 UTC (rev 3665)
@@ -45,10 +45,10 @@
import org.lwjgl.Sys;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
-import org.lwjgl.opengl.ContextType;
import org.lwjgl.opengl.Display;
import org.lwjgl.opengl.DisplayMode;
import org.lwjgl.opengles.GLContext;
+import org.lwjgl.opengles.PixelFormat;
import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
@@ -86,7 +86,7 @@
static {
try {
- Display.create(ContextType.GLES);
+ Display.create(new PixelFormat());
System.out.println("Created OpenGL.");
if ( !GLContext.getCapabilities().GL_OES_mapbuffer ) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2011-10-12 18:54:47
|
Revision: 3664
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3664&view=rev
Author: spasi
Date: 2011-10-12 18:54:40 +0000 (Wed, 12 Oct 2011)
Log Message:
-----------
Removed org.lwjgl.opengles.PixelFormat dependency from Display.
Modified Paths:
--------------
trunk/LWJGL/platform_build/build-definitions.xml
trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java
Removed Paths:
-------------
trunk/LWJGL/src/java/org/lwjgl/opengl/ContextType.java
Modified: trunk/LWJGL/platform_build/build-definitions.xml
===================================================================
--- trunk/LWJGL/platform_build/build-definitions.xml 2011-10-12 18:05:32 UTC (rev 3663)
+++ trunk/LWJGL/platform_build/build-definitions.xml 2011-10-12 18:54:40 UTC (rev 3664)
@@ -38,7 +38,6 @@
<fileset id="lwjgl.fileset.dependencies" dir="${lwjgl.bin}">
<patternset id="lwjgl.package.dependencies.pattern">
<include name="org/lwjgl/opengles/ContextAttribs*.*"/>
- <include name="org/lwjgl/opengles/PixelFormat*.*"/>
</patternset>
</fileset>
Deleted: trunk/LWJGL/src/java/org/lwjgl/opengl/ContextType.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/ContextType.java 2011-10-12 18:05:32 UTC (rev 3663)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/ContextType.java 2011-10-12 18:54:40 UTC (rev 3664)
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2002-2011 LWJGL Project
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * * Neither the name of 'LWJGL' nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.lwjgl.opengl;
-
-/**
- * This enum can be used in the default Display.create method to specify
- * the context type that will be created.
- *
- * @author Spasi
- */
-public enum ContextType {
-
- GL,
- GLES,
-
-}
\ No newline at end of file
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2011-10-12 18:05:32 UTC (rev 3663)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2011-10-12 18:54:40 UTC (rev 3664)
@@ -750,32 +750,6 @@
}
/**
- * Create the Display with the specified context type. If isFullscreen() is true or if windowed
- * context are not supported on the platform, the display mode will be switched to the mode returned by
- * getDisplayMode(), and a fullscreen context will be created. If isFullscreen() is false, a windowed context
- * will be created with the dimensions given in the mode returned by getDisplayMode(). If a context can't be
- * created with the given parameters, a LWJGLException will be thrown.
- * <p/>
- * <p>The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates.
- *
- * @param type the context type to create
- *
- * @throws LWJGLException
- */
- public static void create(ContextType type) throws LWJGLException {
- synchronized ( GlobalLock.lock ) {
- switch ( type ) {
- case GL:
- create(new PixelFormat());
- break;
- case GLES:
- create(new org.lwjgl.opengles.PixelFormat());
- break;
- }
- }
- }
-
- /**
* Create the OpenGL context. If isFullscreen() is true or if windowed
* context are not supported on the platform, the display mode will be switched to the mode returned by
* getDisplayMode(), and a fullscreen context will be created. If isFullscreen() is false, a windowed context
@@ -787,7 +761,7 @@
* @throws LWJGLException
*/
public static void create() throws LWJGLException {
- create(ContextType.GL);
+ create(new PixelFormat());
}
/**
@@ -805,7 +779,7 @@
*/
public static void create(PixelFormat pixel_format) throws LWJGLException {
synchronized ( GlobalLock.lock ) {
- create(pixel_format, null, null);
+ create(pixel_format, null, (ContextAttribs)null);
}
}
@@ -825,7 +799,7 @@
*/
public static void create(PixelFormat pixel_format, Drawable shared_drawable) throws LWJGLException {
synchronized ( GlobalLock.lock ) {
- create(pixel_format, shared_drawable, null);
+ create(pixel_format, shared_drawable, (ContextAttribs)null);
}
}
@@ -930,19 +904,19 @@
* <p/>
* <p>The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates.
*
- * @param pixel_format Describes the minimum specifications the context must fulfill.
+ * @param pixel_format Describes the minimum specifications the context must fulfill. Must be an instance of org.lwjgl.opengles.PixelFormat.
*
* @throws LWJGLException
*/
- public static void create(org.lwjgl.opengles.PixelFormat pixel_format) throws LWJGLException {
+ public static void create(PixelFormatLWJGL pixel_format) throws LWJGLException {
synchronized ( GlobalLock.lock ) {
create(pixel_format, null, null);
}
}
/**
- * Create the OpenGL context with the given minimum parameters. If isFullscreen() is true or if windowed
+ * Create the OpenGL ES context with the given minimum parameters. If isFullscreen() is true or if windowed
* context are not supported on the platform, the display mode will be switched to the mode returned by
* getDisplayMode(), and a fullscreen context will be created. If isFullscreen() is false, a windowed context
* will be created with the dimensions given in the mode returned by getDisplayMode(). If a context can't be
@@ -950,19 +924,19 @@
* <p/>
* <p>The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates.
*
- * @param pixel_format Describes the minimum specifications the context must fulfill.
+ * @param pixel_format Describes the minimum specifications the context must fulfill. Must be an instance of org.lwjgl.opengles.PixelFormat.
* @param shared_drawable The Drawable to share context with. (optional, may be null)
*
* @throws LWJGLException
*/
- public static void create(org.lwjgl.opengles.PixelFormat pixel_format, Drawable shared_drawable) throws LWJGLException {
+ public static void create(PixelFormatLWJGL pixel_format, Drawable shared_drawable) throws LWJGLException {
synchronized ( GlobalLock.lock ) {
create(pixel_format, shared_drawable, null);
}
}
/**
- * Create the OpenGL context with the given minimum parameters. If isFullscreen() is true or if windowed
+ * Create the OpenGL ES context with the given minimum parameters. If isFullscreen() is true or if windowed
* context are not supported on the platform, the display mode will be switched to the mode returned by
* getDisplayMode(), and a fullscreen context will be created. If isFullscreen() is false, a windowed context
* will be created with the dimensions given in the mode returned by getDisplayMode(). If a context can't be
@@ -970,12 +944,12 @@
* <p/>
* <p>The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates.
*
- * @param pixel_format Describes the minimum specifications the context must fulfill.
+ * @param pixel_format Describes the minimum specifications the context must fulfill. Must be an instance of org.lwjgl.opengles.PixelFormat.
* @param attribs The ContextAttribs to use when creating the context. (optional, may be null)
*
* @throws LWJGLException
*/
- public static void create(org.lwjgl.opengles.PixelFormat pixel_format, org.lwjgl.opengles.ContextAttribs attribs) throws LWJGLException {
+ public static void create(PixelFormatLWJGL pixel_format, org.lwjgl.opengles.ContextAttribs attribs) throws LWJGLException {
synchronized ( GlobalLock.lock ) {
create(pixel_format, null, attribs);
}
@@ -990,13 +964,13 @@
* <p/>
* <p>The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates.
*
- * @param pixel_format Describes the minimum specifications the context must fulfill.
+ * @param pixel_format Describes the minimum specifications the context must fulfill. Must be an instance of org.lwjgl.opengles.PixelFormat.
* @param shared_drawable The Drawable to share context with. (optional, may be null)
* @param attribs The ContextAttribs to use when creating the context. (optional, may be null)
*
* @throws LWJGLException
*/
- public static void create(org.lwjgl.opengles.PixelFormat pixel_format, Drawable shared_drawable, org.lwjgl.opengles.ContextAttribs attribs) throws LWJGLException {
+ public static void create(PixelFormatLWJGL pixel_format, Drawable shared_drawable, org.lwjgl.opengles.ContextAttribs attribs) throws LWJGLException {
synchronized ( GlobalLock.lock ) {
if ( isCreated() )
throw new IllegalStateException("Only one LWJGL context may be instantiated at any one time.");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2011-10-12 18:05:38
|
Revision: 3663
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3663&view=rev
Author: spasi
Date: 2011-10-12 18:05:32 +0000 (Wed, 12 Oct 2011)
Log Message:
-----------
Added support for NV_platform_binary.
Added Paths:
-----------
trunk/LWJGL/src/templates/org/lwjgl/opengles/NV_platform_binary.java
Added: trunk/LWJGL/src/templates/org/lwjgl/opengles/NV_platform_binary.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengles/NV_platform_binary.java (rev 0)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengles/NV_platform_binary.java 2011-10-12 18:05:32 UTC (rev 3663)
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2002-2011 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.opengles;
+
+public interface NV_platform_binary {
+
+ /** Accepted by the <binaryformat> parameter of ShaderBinary: */
+ int GL_NVIDIA_PLATFORM_BINARY_NV = 0x890B;
+
+}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2011-10-12 17:58:11
|
Revision: 3662
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3662&view=rev
Author: spasi
Date: 2011-10-12 17:58:04 +0000 (Wed, 12 Oct 2011)
Log Message:
-----------
Added @Optional support for AL and GLES.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/util/generator/RegisterStubsGenerator.java
trunk/LWJGL/src/native/common/common_tools.c
trunk/LWJGL/src/native/common/common_tools.h
trunk/LWJGL/src/native/common/opengles/org_lwjgl_opengles_EGLKHRFenceSync.c
trunk/LWJGL/src/native/common/opengles/org_lwjgl_opengles_EGLKHRReusableSync.c
trunk/LWJGL/src/native/common/opengles/org_lwjgl_opengles_EGLNVSync.c
trunk/LWJGL/src/native/common/org_lwjgl_openal_ALC10.c
trunk/LWJGL/src/native/common/org_lwjgl_openal_ALC11.c
Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/RegisterStubsGenerator.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/generator/RegisterStubsGenerator.java 2011-10-11 22:39:32 UTC (rev 3661)
+++ trunk/LWJGL/src/java/org/lwjgl/util/generator/RegisterStubsGenerator.java 2011-10-12 17:58:04 UTC (rev 3662)
@@ -125,7 +125,7 @@
final Alternate alt_annotation = method.getAnnotation(Alternate.class);
final String methodName = alt_annotation == null ? method.getSimpleName() : alt_annotation.value();
String opengl_handle_name = methodName.replaceFirst("gl", platform.getPrefix());
- writer.print(", \"" + opengl_handle_name + "\", (void *)&" + methodName + "}");
+ writer.print(", \"" + opengl_handle_name + "\", (void *)&" + methodName + ", " + (method.getAnnotation(Optional.class) == null ? "false" : "true") + "}");
if (has_more)
writer.println(",");
}
Modified: trunk/LWJGL/src/native/common/common_tools.c
===================================================================
--- trunk/LWJGL/src/native/common/common_tools.c 2011-10-11 22:39:32 UTC (rev 3661)
+++ trunk/LWJGL/src/native/common/common_tools.c 2011-10-12 17:58:04 UTC (rev 3662)
@@ -297,7 +297,7 @@
void *ext_func_pointer;
void **ext_function_pointer_pointer;
JNINativeMethod *method;
- int i;
+ int i, num_natives = 0;
if (clazz == NULL) {
throwException(env, "Null class");
return;
@@ -308,6 +308,9 @@
if (function->ext_function_name != NULL) {
ext_func_pointer = gpa(function->ext_function_name);
if (ext_func_pointer == NULL) {
+ if ( function->optional )
+ continue;
+
free(methods);
throwException(env, "Missing driver symbols");
return;
@@ -315,12 +318,14 @@
ext_function_pointer_pointer = function->ext_function_pointer;
*ext_function_pointer_pointer = ext_func_pointer;
}
- method = methods + i;
+ method = methods + num_natives;
method->name = function->method_name;
method->signature = function->signature;
method->fnPtr = function->method_pointer;
+
+ num_natives++;
}
- (*env)->RegisterNatives(env, clazz, methods, num_functions);
+ (*env)->RegisterNatives(env, clazz, methods, num_natives);
free(methods);
}
Modified: trunk/LWJGL/src/native/common/common_tools.h
===================================================================
--- trunk/LWJGL/src/native/common/common_tools.h 2011-10-11 22:39:32 UTC (rev 3661)
+++ trunk/LWJGL/src/native/common/common_tools.h 2011-10-12 17:58:04 UTC (rev 3662)
@@ -109,6 +109,7 @@
char *ext_function_name;
void **ext_function_pointer;
+ bool optional;
} JavaMethodAndExtFunction;
typedef struct {
Modified: trunk/LWJGL/src/native/common/opengles/org_lwjgl_opengles_EGLKHRFenceSync.c
===================================================================
--- trunk/LWJGL/src/native/common/opengles/org_lwjgl_opengles_EGLKHRFenceSync.c 2011-10-11 22:39:32 UTC (rev 3661)
+++ trunk/LWJGL/src/native/common/opengles/org_lwjgl_opengles_EGLKHRFenceSync.c 2011-10-12 17:58:04 UTC (rev 3662)
@@ -71,10 +71,10 @@
JNIEXPORT void JNICALL Java_org_lwjgl_opengles_EGLKHRFenceSync_initNativeStubs(JNIEnv *env, jclass clazz) {
JavaMethodAndExtFunction functions[] = {
- {"neglCreateSyncKHR", "(JIJ)J", (void *)&Java_org_lwjgl_opengles_EGLKHRFenceSync_neglCreateSyncKHR, "eglCreateSyncKHR", (void *)&eglCreateSyncKHR},
- {"neglDestroySyncKHR", "(JJ)Z", (void *)&Java_org_lwjgl_opengles_EGLKHRFenceSync_neglDestroySyncKHR, "eglDestroySyncKHR", (void *)&eglDestroySyncKHR},
- {"neglClientWaitSyncKHR", "(JJIJ)I", (void *)&Java_org_lwjgl_opengles_EGLKHRFenceSync_neglClientWaitSyncKHR, "eglClientWaitSyncKHR", (void *)&eglClientWaitSyncKHR},
- {"neglGetSyncAttribKHR", "(JJIJ)Z", (void *)&Java_org_lwjgl_opengles_EGLKHRFenceSync_neglGetSyncAttribKHR, "eglGetSyncAttribKHR", (void *)&eglGetSyncAttribKHR}
+ {"neglCreateSyncKHR", "(JIJ)J", (void *)&Java_org_lwjgl_opengles_EGLKHRFenceSync_neglCreateSyncKHR, "eglCreateSyncKHR", (void *)&eglCreateSyncKHR, false},
+ {"neglDestroySyncKHR", "(JJ)Z", (void *)&Java_org_lwjgl_opengles_EGLKHRFenceSync_neglDestroySyncKHR, "eglDestroySyncKHR", (void *)&eglDestroySyncKHR, false},
+ {"neglClientWaitSyncKHR", "(JJIJ)I", (void *)&Java_org_lwjgl_opengles_EGLKHRFenceSync_neglClientWaitSyncKHR, "eglClientWaitSyncKHR", (void *)&eglClientWaitSyncKHR, false},
+ {"neglGetSyncAttribKHR", "(JJIJ)Z", (void *)&Java_org_lwjgl_opengles_EGLKHRFenceSync_neglGetSyncAttribKHR, "eglGetSyncAttribKHR", (void *)&eglGetSyncAttribKHR, false}
};
int num_functions = NUMFUNCTIONS(functions);
extgl_InitializeClass(env, clazz, num_functions, functions);
Modified: trunk/LWJGL/src/native/common/opengles/org_lwjgl_opengles_EGLKHRReusableSync.c
===================================================================
--- trunk/LWJGL/src/native/common/opengles/org_lwjgl_opengles_EGLKHRReusableSync.c 2011-10-11 22:39:32 UTC (rev 3661)
+++ trunk/LWJGL/src/native/common/opengles/org_lwjgl_opengles_EGLKHRReusableSync.c 2011-10-12 17:58:04 UTC (rev 3662)
@@ -45,7 +45,7 @@
JNIEXPORT void JNICALL Java_org_lwjgl_opengles_EGLKHRReusableSync_initNativeStubs(JNIEnv *env, jclass clazz) {
JavaMethodAndExtFunction functions[] = {
- {"neglSignalSyncKHR", "(JJI)Z", (void *)&Java_org_lwjgl_opengles_EGLKHRReusableSync_neglSignalSyncKHR, "eglSignalSyncKHR", (void *)&eglSignalSyncKHR}
+ {"neglSignalSyncKHR", "(JJI)Z", (void *)&Java_org_lwjgl_opengles_EGLKHRReusableSync_neglSignalSyncKHR, "eglSignalSyncKHR", (void *)&eglSignalSyncKHR, false}
};
int num_functions = NUMFUNCTIONS(functions);
extgl_InitializeClass(env, clazz, num_functions, functions);
Modified: trunk/LWJGL/src/native/common/opengles/org_lwjgl_opengles_EGLNVSync.c
===================================================================
--- trunk/LWJGL/src/native/common/opengles/org_lwjgl_opengles_EGLNVSync.c 2011-10-11 22:39:32 UTC (rev 3661)
+++ trunk/LWJGL/src/native/common/opengles/org_lwjgl_opengles_EGLNVSync.c 2011-10-12 17:58:04 UTC (rev 3662)
@@ -82,12 +82,12 @@
JNIEXPORT void JNICALL Java_org_lwjgl_opengles_EGLNVSync_initNativeStubs(JNIEnv *env, jclass clazz) {
JavaMethodAndExtFunction functions[] = {
- {"neglCreateFenceSyncNV", "(JIJ)J", (void *)&Java_org_lwjgl_opengles_EGLNVSync_neglCreateFenceSyncNV, "eglCreateFenceSyncNV", (void *)&eglCreateFenceSyncNV},
- {"neglDestroySyncNV", "(J)Z", (void *)&Java_org_lwjgl_opengles_EGLNVSync_neglDestroySyncNV, "eglDestroySyncNV", (void *)&eglDestroySyncNV},
- {"neglFenceNV", "(J)Z", (void *)&Java_org_lwjgl_opengles_EGLNVSync_neglFenceNV, "eglFenceNV", (void *)&eglFenceNV},
- {"neglClientWaitSyncNV", "(JIJ)I", (void *)&Java_org_lwjgl_opengles_EGLNVSync_neglClientWaitSyncNV, "eglClientWaitSyncNV", (void *)&eglClientWaitSyncNV},
- {"neglSignalSyncNV", "(JI)Z", (void *)&Java_org_lwjgl_opengles_EGLNVSync_neglSignalSyncNV, "eglSignalSyncNV", (void *)&eglSignalSyncNV},
- {"neglGetSyncAttribNV", "(JIJ)Z", (void *)&Java_org_lwjgl_opengles_EGLNVSync_neglGetSyncAttribNV, "eglGetSyncAttribNV", (void *)&eglGetSyncAttribNV}
+ {"neglCreateFenceSyncNV", "(JIJ)J", (void *)&Java_org_lwjgl_opengles_EGLNVSync_neglCreateFenceSyncNV, "eglCreateFenceSyncNV", (void *)&eglCreateFenceSyncNV, false},
+ {"neglDestroySyncNV", "(J)Z", (void *)&Java_org_lwjgl_opengles_EGLNVSync_neglDestroySyncNV, "eglDestroySyncNV", (void *)&eglDestroySyncNV, false},
+ {"neglFenceNV", "(J)Z", (void *)&Java_org_lwjgl_opengles_EGLNVSync_neglFenceNV, "eglFenceNV", (void *)&eglFenceNV, false},
+ {"neglClientWaitSyncNV", "(JIJ)I", (void *)&Java_org_lwjgl_opengles_EGLNVSync_neglClientWaitSyncNV, "eglClientWaitSyncNV", (void *)&eglClientWaitSyncNV, false},
+ {"neglSignalSyncNV", "(JI)Z", (void *)&Java_org_lwjgl_opengles_EGLNVSync_neglSignalSyncNV, "eglSignalSyncNV", (void *)&eglSignalSyncNV, false},
+ {"neglGetSyncAttribNV", "(JIJ)Z", (void *)&Java_org_lwjgl_opengles_EGLNVSync_neglGetSyncAttribNV, "eglGetSyncAttribNV", (void *)&eglGetSyncAttribNV, false}
};
int num_functions = NUMFUNCTIONS(functions);
extgl_InitializeClass(env, clazz, num_functions, functions);
Modified: trunk/LWJGL/src/native/common/org_lwjgl_openal_ALC10.c
===================================================================
--- trunk/LWJGL/src/native/common/org_lwjgl_openal_ALC10.c 2011-10-11 22:39:32 UTC (rev 3661)
+++ trunk/LWJGL/src/native/common/org_lwjgl_openal_ALC10.c 2011-10-12 17:58:04 UTC (rev 3662)
@@ -263,20 +263,20 @@
#endif
JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALC10_initNativeStubs(JNIEnv *env, jclass clazz) {
JavaMethodAndExtFunction functions[] = {
- {"nalcGetString", "(JI)Ljava/lang/String;", (void*)&Java_org_lwjgl_openal_ALC10_nalcGetString, "alcGetString", (void*)&alcGetString},
- {"nalcGetIntegerv", "(JIIJ)V", (void*)&Java_org_lwjgl_openal_ALC10_nalcGetIntegerv, "alcGetIntegerv", (void*)&alcGetIntegerv},
- {"nalcOpenDevice", "(J)J", (void*)&Java_org_lwjgl_openal_ALC10_nalcOpenDevice, "alcOpenDevice", (void*)&alcOpenDevice},
- {"nalcCloseDevice", "(J)Z", (void*)&Java_org_lwjgl_openal_ALC10_nalcCloseDevice, "alcCloseDevice", (void*)&alcCloseDevice},
- {"nalcCreateContext", "(JJ)J", (void*)&Java_org_lwjgl_openal_ALC10_nalcCreateContext, "alcCreateContext", (void*)&alcCreateContext},
- {"nalcMakeContextCurrent", "(J)I", (void*)&Java_org_lwjgl_openal_ALC10_nalcMakeContextCurrent, "alcMakeContextCurrent", (void*)&alcMakeContextCurrent},
- {"nalcProcessContext", "(J)V", (void*)&Java_org_lwjgl_openal_ALC10_nalcProcessContext, "alcProcessContext", (void*)&alcProcessContext},
- {"nalcGetCurrentContext", "()J", (void*)&Java_org_lwjgl_openal_ALC10_nalcGetCurrentContext, "alcGetCurrentContext", (void*)&alcGetCurrentContext},
- {"nalcGetContextsDevice", "(J)J", (void*)&Java_org_lwjgl_openal_ALC10_nalcGetContextsDevice, "alcGetContextsDevice", (void*)&alcGetContextsDevice},
- {"nalcSuspendContext", "(J)V", (void*)&Java_org_lwjgl_openal_ALC10_nalcSuspendContext, "alcSuspendContext", (void*)&alcSuspendContext},
- {"nalcDestroyContext", "(J)V", (void*)&Java_org_lwjgl_openal_ALC10_nalcDestroyContext, "alcDestroyContext", (void*)&alcDestroyContext},
- {"nalcGetError", "(J)I", (void*)&Java_org_lwjgl_openal_ALC10_nalcGetError, "alcGetError", (void*)&alcGetError},
- {"nalcIsExtensionPresent", "(JJ)Z", (void*)&Java_org_lwjgl_openal_ALC10_nalcIsExtensionPresent, "alcIsExtensionPresent", (void*)&alcIsExtensionPresent},
- {"nalcGetEnumValue", "(JJ)I", (void*)&Java_org_lwjgl_openal_ALC10_nalcGetEnumValue, "alcGetEnumValue", (void*)&alcGetEnumValue}
+ {"nalcGetString", "(JI)Ljava/lang/String;", (void*)&Java_org_lwjgl_openal_ALC10_nalcGetString, "alcGetString", (void*)&alcGetString, false},
+ {"nalcGetIntegerv", "(JIIJ)V", (void*)&Java_org_lwjgl_openal_ALC10_nalcGetIntegerv, "alcGetIntegerv", (void*)&alcGetIntegerv, false},
+ {"nalcOpenDevice", "(J)J", (void*)&Java_org_lwjgl_openal_ALC10_nalcOpenDevice, "alcOpenDevice", (void*)&alcOpenDevice, false},
+ {"nalcCloseDevice", "(J)Z", (void*)&Java_org_lwjgl_openal_ALC10_nalcCloseDevice, "alcCloseDevice", (void*)&alcCloseDevice, false},
+ {"nalcCreateContext", "(JJ)J", (void*)&Java_org_lwjgl_openal_ALC10_nalcCreateContext, "alcCreateContext", (void*)&alcCreateContext, false},
+ {"nalcMakeContextCurrent", "(J)I", (void*)&Java_org_lwjgl_openal_ALC10_nalcMakeContextCurrent, "alcMakeContextCurrent", (void*)&alcMakeContextCurrent, false},
+ {"nalcProcessContext", "(J)V", (void*)&Java_org_lwjgl_openal_ALC10_nalcProcessContext, "alcProcessContext", (void*)&alcProcessContext, false},
+ {"nalcGetCurrentContext", "()J", (void*)&Java_org_lwjgl_openal_ALC10_nalcGetCurrentContext, "alcGetCurrentContext", (void*)&alcGetCurrentContext, false},
+ {"nalcGetContextsDevice", "(J)J", (void*)&Java_org_lwjgl_openal_ALC10_nalcGetContextsDevice, "alcGetContextsDevice", (void*)&alcGetContextsDevice, false},
+ {"nalcSuspendContext", "(J)V", (void*)&Java_org_lwjgl_openal_ALC10_nalcSuspendContext, "alcSuspendContext", (void*)&alcSuspendContext, false},
+ {"nalcDestroyContext", "(J)V", (void*)&Java_org_lwjgl_openal_ALC10_nalcDestroyContext, "alcDestroyContext", (void*)&alcDestroyContext, false},
+ {"nalcGetError", "(J)I", (void*)&Java_org_lwjgl_openal_ALC10_nalcGetError, "alcGetError", (void*)&alcGetError, false},
+ {"nalcIsExtensionPresent", "(JJ)Z", (void*)&Java_org_lwjgl_openal_ALC10_nalcIsExtensionPresent, "alcIsExtensionPresent", (void*)&alcIsExtensionPresent, false},
+ {"nalcGetEnumValue", "(JJ)I", (void*)&Java_org_lwjgl_openal_ALC10_nalcGetEnumValue, "alcGetEnumValue", (void*)&alcGetEnumValue, false}
};
int num_functions = NUMFUNCTIONS(functions);
extal_InitializeClass(env, clazz, num_functions, functions);
Modified: trunk/LWJGL/src/native/common/org_lwjgl_openal_ALC11.c
===================================================================
--- trunk/LWJGL/src/native/common/org_lwjgl_openal_ALC11.c 2011-10-11 22:39:32 UTC (rev 3661)
+++ trunk/LWJGL/src/native/common/org_lwjgl_openal_ALC11.c 2011-10-12 17:58:04 UTC (rev 3662)
@@ -111,11 +111,11 @@
#endif
JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALC11_initNativeStubs(JNIEnv *env, jclass clazz) {
JavaMethodAndExtFunction functions[] = {
- {"nalcCaptureOpenDevice", "(JIII)J", (void*)&Java_org_lwjgl_openal_ALC11_nalcCaptureOpenDevice, "alcCaptureOpenDevice", (void*)&alcCaptureOpenDevice},
- {"nalcCaptureCloseDevice", "(J)Z", (void*)&Java_org_lwjgl_openal_ALC11_nalcCaptureCloseDevice, "alcCaptureCloseDevice", (void*)&alcCaptureCloseDevice},
- {"nalcCaptureStart", "(J)V", (void*)&Java_org_lwjgl_openal_ALC11_nalcCaptureStart, "alcCaptureStart", (void*)&alcCaptureStart},
- {"nalcCaptureStop", "(J)V", (void*)&Java_org_lwjgl_openal_ALC11_nalcCaptureStop, "alcCaptureStop", (void*)&alcCaptureStop},
- {"nalcCaptureSamples", "(JJI)V", (void*)&Java_org_lwjgl_openal_ALC11_nalcCaptureSamples, "alcCaptureSamples", (void*)&alcCaptureSamples}
+ {"nalcCaptureOpenDevice", "(JIII)J", (void*)&Java_org_lwjgl_openal_ALC11_nalcCaptureOpenDevice, "alcCaptureOpenDevice", (void*)&alcCaptureOpenDevice, false},
+ {"nalcCaptureCloseDevice", "(J)Z", (void*)&Java_org_lwjgl_openal_ALC11_nalcCaptureCloseDevice, "alcCaptureCloseDevice", (void*)&alcCaptureCloseDevice, false},
+ {"nalcCaptureStart", "(J)V", (void*)&Java_org_lwjgl_openal_ALC11_nalcCaptureStart, "alcCaptureStart", (void*)&alcCaptureStart, false},
+ {"nalcCaptureStop", "(J)V", (void*)&Java_org_lwjgl_openal_ALC11_nalcCaptureStop, "alcCaptureStop", (void*)&alcCaptureStop, false},
+ {"nalcCaptureSamples", "(JJI)V", (void*)&Java_org_lwjgl_openal_ALC11_nalcCaptureSamples, "alcCaptureSamples", (void*)&alcCaptureSamples, false}
};
int num_functions = NUMFUNCTIONS(functions);
extal_InitializeClass(env, clazz, num_functions, functions);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2011-10-11 22:39:38
|
Revision: 3661
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3661&view=rev
Author: kappa1
Date: 2011-10-11 22:39:32 +0000 (Tue, 11 Oct 2011)
Log Message:
-----------
minor tweak to the order in which CALayer support is detected.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/AWTSurfaceLock.java
trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXCanvasPeerInfo.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/AWTSurfaceLock.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/AWTSurfaceLock.java 2011-10-11 22:30:55 UTC (rev 3660)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/AWTSurfaceLock.java 2011-10-11 22:39:32 UTC (rev 3661)
@@ -80,8 +80,8 @@
// It is only needed on first call, so we avoid it on all subsequent calls
// due to performance..
- // Allow the use of a Core Animation Layer only when using Display.setParent() or AWTGLCanvas and when not in fullscreen
- final boolean allowCALayer = (Display.getParent() != null || component instanceof AWTGLCanvas) && !Display.isFullscreen();
+ // Allow the use of a Core Animation Layer only when using non fullscreen Display.setParent() or AWTGLCanvas
+ final boolean allowCALayer = (Display.getParent() != null && !Display.isFullscreen()) || component instanceof AWTGLCanvas;
if (firstLockSucceeded)
return lockAndInitHandle(lock_buffer, component, allowCALayer);
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXCanvasPeerInfo.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXCanvasPeerInfo.java 2011-10-11 22:30:55 UTC (rev 3660)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXCanvasPeerInfo.java 2011-10-11 22:39:32 UTC (rev 3661)
@@ -50,8 +50,8 @@
}
protected void initHandle(Canvas component) throws LWJGLException {
- // Allow the use of a Core Animation Layer only when using Display.setParent() or AWTGLCanvas and when not in fullscreen
- final boolean allowCALayer = (Display.getParent() != null || component instanceof AWTGLCanvas) && !Display.isFullscreen();
+ // Allow the use of a Core Animation Layer only when using non fullscreen Display.setParent() or AWTGLCanvas
+ final boolean allowCALayer = (Display.getParent() != null && !Display.isFullscreen()) || component instanceof AWTGLCanvas;
nInitHandle(awt_surface.lockAndGetHandle(component), getHandle(), allowCALayer);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2011-10-11 22:31:02
|
Revision: 3660
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3660&view=rev
Author: kappa1
Date: 2011-10-11 22:30:55 +0000 (Tue, 11 Oct 2011)
Log Message:
-----------
Limit the use to CALayer only to when using Display.setParent(), an AWTGLCanvas in non fullscreen mode.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/AWTSurfaceLock.java
trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXCanvasPeerInfo.java
trunk/LWJGL/src/native/common/org_lwjgl_opengl_AWTSurfaceLock.c
trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/AWTSurfaceLock.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/AWTSurfaceLock.java 2011-10-11 21:51:45 UTC (rev 3659)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/AWTSurfaceLock.java 2011-10-11 22:30:55 UTC (rev 3660)
@@ -79,14 +79,17 @@
// 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..
- final Canvas parent = component instanceof AWTGLCanvas ? component : Display.getParent();
+
+ // Allow the use of a Core Animation Layer only when using Display.setParent() or AWTGLCanvas and when not in fullscreen
+ final boolean allowCALayer = (Display.getParent() != null || component instanceof AWTGLCanvas) && !Display.isFullscreen();
+
if (firstLockSucceeded)
- return lockAndInitHandle(lock_buffer, component, parent);
+ return lockAndInitHandle(lock_buffer, component, allowCALayer);
else
try {
firstLockSucceeded = AccessController.doPrivileged(new PrivilegedExceptionAction<Boolean>() {
public Boolean run() throws LWJGLException {
- return lockAndInitHandle(lock_buffer, component, parent);
+ return lockAndInitHandle(lock_buffer, component, allowCALayer);
}
});
return firstLockSucceeded;
@@ -95,7 +98,7 @@
}
}
- private static native boolean lockAndInitHandle(ByteBuffer lock_buffer, Canvas component, Canvas display_parent) throws LWJGLException;
+ private static native boolean lockAndInitHandle(ByteBuffer lock_buffer, Canvas component, boolean allowCALayer) throws LWJGLException;
void unlock() throws LWJGLException {
nUnlock(lock_buffer);
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXCanvasPeerInfo.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXCanvasPeerInfo.java 2011-10-11 21:51:45 UTC (rev 3659)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXCanvasPeerInfo.java 2011-10-11 22:30:55 UTC (rev 3660)
@@ -50,9 +50,12 @@
}
protected void initHandle(Canvas component) throws LWJGLException {
- nInitHandle(awt_surface.lockAndGetHandle(component), getHandle());
+ // Allow the use of a Core Animation Layer only when using Display.setParent() or AWTGLCanvas and when not in fullscreen
+ final boolean allowCALayer = (Display.getParent() != null || component instanceof AWTGLCanvas) && !Display.isFullscreen();
+
+ nInitHandle(awt_surface.lockAndGetHandle(component), getHandle(), allowCALayer);
}
- private static native void nInitHandle(ByteBuffer surface_buffer, ByteBuffer peer_info_handle) throws LWJGLException;
+ private static native void nInitHandle(ByteBuffer surface_buffer, ByteBuffer peer_info_handle, boolean allowCALayer) throws LWJGLException;
protected void doUnlock() throws LWJGLException {
awt_surface.unlock();
Modified: trunk/LWJGL/src/native/common/org_lwjgl_opengl_AWTSurfaceLock.c
===================================================================
--- trunk/LWJGL/src/native/common/org_lwjgl_opengl_AWTSurfaceLock.c 2011-10-11 21:51:45 UTC (rev 3659)
+++ trunk/LWJGL/src/native/common/org_lwjgl_opengl_AWTSurfaceLock.c 2011-10-11 22:30:55 UTC (rev 3660)
@@ -49,7 +49,7 @@
}
JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_AWTSurfaceLock_lockAndInitHandle
- (JNIEnv *env, jclass clazz, jobject lock_buffer_handle, jobject canvas, jobject display_parent) {
+ (JNIEnv *env, jclass clazz, jobject lock_buffer_handle, jobject canvas, jboolean allowCALayer) {
JAWT awt;
JAWT_DrawingSurface* ds;
JAWT_DrawingSurfaceInfo *dsi;
@@ -58,7 +58,7 @@
jboolean result = JNI_FALSE;
#ifdef __MACH__
- if (display_parent) {
+ if (allowCALayer) {
//first try CALAYER
awt.version = JAWT_VERSION_1_4 | 0x80000000;//JAWT_MACOSX_USE_CALAYER;
result = JAWT_GetAWT(env, &awt);
Modified: trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m
===================================================================
--- trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m 2011-10-11 21:51:45 UTC (rev 3659)
+++ trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m 2011-10-11 22:30:55 UTC (rev 3660)
@@ -65,56 +65,60 @@
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXCanvasPeerInfo_nInitHandle
-(JNIEnv *env, jclass clazz, jobject lock_buffer_handle, jobject peer_info_handle) {
+(JNIEnv *env, jclass clazz, jobject lock_buffer_handle, jobject peer_info_handle, jboolean allowCALayer) {
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;
- // check for CALayer support
- if(surface->awt.version & 0x80000000) { //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];
- }
+ if (allowCALayer) {
+ // check for CALayer support
+ if(surface->awt.version & 0x80000000) { //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];
+ // 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;
- }
+ 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;
- }
+ 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;
+ }
+ }];
+ }
+
+ [pool release];
+ return;
+ }
+ }
+
+ peer_info->nsview = macosx_dsi->cocoaViewRef;
+ peer_info->window = true;
[pool release];
}
@@ -122,9 +126,6 @@
// 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
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2011-10-11 21:51:51
|
Revision: 3659
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3659&view=rev
Author: kappa1
Date: 2011-10-11 21:51:45 +0000 (Tue, 11 Oct 2011)
Log Message:
-----------
Remove the use of Properties from Objective C code to allow binary compatibility on OS X < 10.5
Modified Paths:
--------------
trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m
Modified: trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m
===================================================================
--- trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m 2011-10-11 19:24:55 UTC (rev 3658)
+++ trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m 2011-10-11 21:51:45 UTC (rev 3659)
@@ -55,8 +55,12 @@
BOOL canDraw;
}
-@property (nonatomic) MacOSXPeerInfo *peer_info;
-@property (nonatomic) GLuint textureID;
+- (MacOSXPeerInfo*) peer_info;
+- (GLuint) textureID;
+
+- (void) setPeer_info: (MacOSXPeerInfo*)input;
+- (void) setTextureID: (GLuint)input;
+
@end
@@ -118,8 +122,8 @@
// rotates a red square when asked to draw
@implementation PBufferGLLayer
-@synthesize peer_info;
-@synthesize textureID;
+//@synthesize peer_info;
+//@synthesize textureID;
// override to draw custom GL content
-(void)drawInCGLContext:(CGLContextObj)glContext
@@ -191,4 +195,20 @@
return peer_info->canDrawGL ? YES : NO;
}
+- (MacOSXPeerInfo*) peer_info {
+ return peer_info;
+}
+
+- (GLuint) textureID {
+ return textureID;
+}
+
+- (void) setPeer_info: (MacOSXPeerInfo*)input {
+ peer_info = input;
+}
+
+- (void) setTextureID: (GLuint)input {
+ textureID = input;
+}
+
@end
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-10-11 19:25:01
|
Revision: 3658
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3658&view=rev
Author: matzon
Date: 2011-10-11 19:24:55 +0000 (Tue, 11 Oct 2011)
Log Message:
-----------
undoing r3539 to fix issue with fullscreen
Revision Links:
--------------
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3539&view=rev
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2011-10-11 17:39:37 UTC (rev 3657)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2011-10-11 19:24:55 UTC (rev 3658)
@@ -259,7 +259,7 @@
}
private static DisplayMode getEffectiveMode() {
- return !isFullscreen() && parent != null ? (current_mode = new DisplayMode(parent.getWidth(), parent.getHeight())) : current_mode;
+ return !isFullscreen() && parent != null ? new DisplayMode(parent.getWidth(), parent.getHeight()) : current_mode;
}
private static int getWindowX() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-10-11 17:39:43
|
Revision: 3657
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3657&view=rev
Author: matzon
Date: 2011-10-11 17:39:37 +0000 (Tue, 11 Oct 2011)
Log Message:
-----------
bumping version to 2.8.1
Modified Paths:
--------------
trunk/LWJGL/platform_build/build-definitions.xml
trunk/LWJGL/src/java/org/lwjgl/Sys.java
Modified: trunk/LWJGL/platform_build/build-definitions.xml
===================================================================
--- trunk/LWJGL/platform_build/build-definitions.xml 2011-10-11 16:06:23 UTC (rev 3656)
+++ trunk/LWJGL/platform_build/build-definitions.xml 2011-10-11 17:39:37 UTC (rev 3657)
@@ -12,7 +12,7 @@
<property name="lwjgl.docs" location="doc" />
<property name="lwjgl.temp" location="temp" />
<property name="lwjgl.res" location="res" />
- <property name="lwjgl.version" value="2.8.0" />
+ <property name="lwjgl.version" value="2.8.1" />
<property name="lwjgl.web" location="www" />
<property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/AMD*.java,org/lwjgl/opengl/APPLE*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/NVX*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java,org/lwjgl/opengl/GREMEDY*.java"/>
Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2011-10-11 16:06:23 UTC (rev 3656)
+++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2011-10-11 17:39:37 UTC (rev 3657)
@@ -54,7 +54,7 @@
private static final String JNI_LIBRARY_NAME = "lwjgl";
/** Current version of library */
- private static final String VERSION = "2.8.0";
+ private static final String VERSION = "2.8.1";
private static final String POSTFIX64BIT = "64";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2011-10-11 16:06:30
|
Revision: 3656
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3656&view=rev
Author: spasi
Date: 2011-10-11 16:06:23 +0000 (Tue, 11 Oct 2011)
Log Message:
-----------
Fixed build to include missing OpenGL ES classes on which Display depends.
Excluded desktop OpenGL extensions from the OpenGL ES build.
Modified Paths:
--------------
trunk/LWJGL/build.xml
trunk/LWJGL/platform_build/build-definitions.xml
trunk/LWJGL/platform_build/build-maven.xml
Modified: trunk/LWJGL/build.xml
===================================================================
--- trunk/LWJGL/build.xml 2011-10-10 10:18:03 UTC (rev 3655)
+++ trunk/LWJGL/build.xml 2011-10-11 16:06:23 UTC (rev 3656)
@@ -132,6 +132,7 @@
<!-- Create lwjgl.jar -->
<jar destfile="${lwjgl.temp}/jar/lwjgl-debug.jar" taskname="lwjgl-debug.jar">
<fileset refid="lwjgl.fileset" />
+ <fileset refid="lwjgl.fileset.dependencies"/>
<manifest>
<attribute name="Sealed" value="true"/>
</manifest>
@@ -143,12 +144,7 @@
<!-- Create lwjgl.jar -->
<jar destfile="${lwjgl.temp}/jar/lwjgl.jar" taskname="lwjgl.jar">
<fileset refid="lwjgl.fileset" />
- <fileset dir="${lwjgl.bin}"> <!-- Display has a dependency on these -->
- <patternset>
- <include name="org/lwjgl/opengles/ContextAttribs.*"/>
- <include name="org/lwjgl/opengles/PixelFormat.*"/>
- </patternset>
- </fileset>
+ <fileset refid="lwjgl.fileset.dependencies"/>
<manifest>
<attribute name="Sealed" value="true"/>
</manifest>
@@ -177,9 +173,40 @@
<!-- Packages the java files for the ES build -->
<target name="-createjars_es">
+ <!-- ================================================================== -->
+ <!-- Generate a list of the OpenGL extension classes -->
+ <!-- ================================================================== -->
+ <fileset id="opengl-template-fileset" dir="${lwjgl.src}/generated" includes="${opengl-template-pattern}"/>
+ <property name="opengl-template-files" refid="opengl-template-fileset"/>
+
+ <tempfile property="temp.file"/>
+ <echo file="${temp.file}" message="${opengl-template-files}" taskname=""/>
+
+ <loadfile srcfile="${temp.file}" property="opengl-template-classes">
+ <filterchain>
+ <tokenfilter delimoutput=",">
+ <stringtokenizer delims=";"/>
+ <replaceregex pattern="org\${file.separator}lwjgl\${file.separator}opengl\${file.separator}(.+)[.]java"
+ replace="org/lwjgl/opengl/\1.class"/>
+ </tokenfilter>
+ </filterchain>
+ </loadfile>
+
+ <delete file="${temp.file}" />
+
<!-- Create lwjgl.jar -->
<jar destfile="${lwjgl.temp}/jar/lwjgl.jar" taskname="lwjgl.jar">
- <fileset refid="lwjgl_es.fileset"/>
+ <!-- Files to include in the lwjgl.jar file, for the ES build -->
+ <fileset dir="${lwjgl.bin}" excludes="${opengl-template-classes}">
+ <patternset id="lwjgl_es.package.pattern">
+ <include name="org/**/*"/>
+ <exclude name="org/lwjgl/d3d/**"/>
+ <exclude name="org/lwjgl/test/**"/>
+ <exclude name="org/lwjgl/util/**"/>
+ <exclude name="org/lwjgl/examples/**"/>
+ </patternset>
+ </fileset>
+
<manifest>
<attribute name="Sealed" value="true"/>
</manifest>
Modified: trunk/LWJGL/platform_build/build-definitions.xml
===================================================================
--- trunk/LWJGL/platform_build/build-definitions.xml 2011-10-10 10:18:03 UTC (rev 3655)
+++ trunk/LWJGL/platform_build/build-definitions.xml 2011-10-11 16:06:23 UTC (rev 3656)
@@ -35,15 +35,10 @@
<exclude name="org/lwjgl/examples/**" />
</patternset>
</fileset>
-
- <!-- Files to include in the lwjgl.jar file, for the ES build -->
- <fileset id="lwjgl_es.fileset" dir="${lwjgl.bin}">
- <patternset id="lwjgl_es.package.pattern">
- <include name="org/**/*"/>
- <exclude name="org/lwjgl/d3d/**"/>
- <exclude name="org/lwjgl/test/**"/>
- <exclude name="org/lwjgl/util/**"/>
- <exclude name="org/lwjgl/examples/**"/>
+ <fileset id="lwjgl.fileset.dependencies" dir="${lwjgl.bin}">
+ <patternset id="lwjgl.package.dependencies.pattern">
+ <include name="org/lwjgl/opengles/ContextAttribs*.*"/>
+ <include name="org/lwjgl/opengles/PixelFormat*.*"/>
</patternset>
</fileset>
Modified: trunk/LWJGL/platform_build/build-maven.xml
===================================================================
--- trunk/LWJGL/platform_build/build-maven.xml 2011-10-10 10:18:03 UTC (rev 3655)
+++ trunk/LWJGL/platform_build/build-maven.xml 2011-10-11 16:06:23 UTC (rev 3656)
@@ -8,6 +8,7 @@
<fileset id="lwjgl-sources.manual.fileset" dir="${lwjgl.src.java}">
<patternset refid="lwjgl.package.pattern" />
+ <patternset refid="lwjgl.package.dependencies.pattern"/>
</fileset>
<fileset id="lwjgl-sources.generated.fileset" dir="${lwjgl.src.generated}">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-10-10 10:18:09
|
Revision: 3655
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3655&view=rev
Author: matzon
Date: 2011-10-10 10:18:03 +0000 (Mon, 10 Oct 2011)
Log Message:
-----------
Tagging 2.8.0
Added Paths:
-----------
tags/lwjgl2.8.0/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2011-10-08 20:33:49
|
Revision: 3654
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3654&view=rev
Author: kappa1
Date: 2011-10-08 20:33:43 +0000 (Sat, 08 Oct 2011)
Log Message:
-----------
AppletLoader: add missing JavaDoc for al_lookup_threads, clean up natives if validation on them fails.
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-10-08 18:33:44 UTC (rev 3653)
+++ trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-10-08 20:33:43 UTC (rev 3654)
@@ -125,6 +125,7 @@
* <li>al_debug - [boolean] Whether to enable debug mode. <i>Default: false</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>
+ * <li>al_lookup_threads - [int] Specify the number of concurrent threads to use to get file information before downloading. <i>Default: 1</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 specified it will be used instead of al_windows on 32bit windows systems.</li>
@@ -1814,6 +1815,7 @@
// validate the certificate for the native file being extracted
if (!certificatesMatch(certificate, entry.getCertificates())) {
+ f.delete(); // delete extracted native as its certificates doesn't match
throw new Exception("The certificate(s) in " + nativeJar + " do not match the AppletLoader!");
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2011-10-08 18:33:51
|
Revision: 3653
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3653&view=rev
Author: kappa1
Date: 2011-10-08 18:33:44 +0000 (Sat, 08 Oct 2011)
Log Message:
-----------
AppletLoader: apply arielsan's concurrent HTTP requests patch
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-10-06 23:05:06 UTC (rev 3652)
+++ trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-10-08 18:33:44 UTC (rev 3653)
@@ -74,8 +74,14 @@
import java.security.cert.Certificate;
import java.util.Enumeration;
import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.Queue;
import java.util.StringTokenizer;
import java.util.Vector;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.jar.JarOutputStream;
@@ -199,7 +205,7 @@
public static final int STATE_DONE = 12;
/** used to calculate length of progress bar */
- protected int percentage;
+ protected volatile int percentage;
/** current size of download in bytes */
protected int currentSizeDownload;
@@ -285,6 +291,9 @@
/** messages to be passed via liveconnect in headless mode */
protected String[] headlessMessage;
+ /** threads to use when fetching information of files to be downloaded */
+ protected int concurrentLookupThreads;
+
/** whether a fatal error occurred */
protected boolean fatalError;
@@ -311,7 +320,7 @@
/** fatal error message to display */
protected String[] errorMessage;
-
+
/** have natives been loaded by another instance of this applet */
protected static boolean natives_loaded;
@@ -329,7 +338,7 @@
return;
}
}
-
+
// whether to use cache system
cacheEnabled = getBooleanParameter("al_cache", true);
@@ -342,6 +351,9 @@
// whether to run in headless mode
headless = getBooleanParameter("al_headless", false);
+ // obtain the number of concurrent lookup threads to use
+ concurrentLookupThreads = getIntParameter("al_lookup_threads", 1); // defaults to 1
+
// get colors of applet
bgColor = getColor("boxbgcolor", Color.white);
setBackground(bgColor);
@@ -1327,8 +1339,6 @@
// store file sizes and mark which files not to download
fileSizes = new int[urlList.length];
- URLConnection urlconnection;
-
File timestampsFile = new File(dir, "timestamps");
// if timestamps file exists, load it
@@ -1337,39 +1347,76 @@
}
// calculate total size of jars to download
- for (int i = 0; i < urlList.length; i++) {
- urlconnection = urlList[i].openConnection();
- urlconnection.setDefaultUseCaches(false);
- if (urlconnection instanceof HttpURLConnection) {
- ((HttpURLConnection) urlconnection).setRequestMethod("HEAD");
- }
+
+ ExecutorService executorService = Executors.newFixedThreadPool(concurrentLookupThreads);
+ Queue<Future> requests = new LinkedList<Future>();
+
+ // create unique object to sync code in requests
+ final Object sync = new Integer(1);
+
+ for (int j = 0; j < urlList.length; j++) {
+ final int i = j;
+
+ Future request = executorService.submit(new Runnable() {
+
+ public void run() {
+
+ try {
+
+ URLConnection urlconnection = urlList[i].openConnection();
+ urlconnection.setDefaultUseCaches(false);
+ if (urlconnection instanceof HttpURLConnection) {
+ ((HttpURLConnection) urlconnection).setRequestMethod("HEAD");
+ }
+
+ fileSizes[i] = urlconnection.getContentLength();
- fileSizes[i] = urlconnection.getContentLength();
+ long lastModified = urlconnection.getLastModified();
+ String fileName = getFileName(urlList[i]);
- long lastModified = urlconnection.getLastModified();
- String fileName = getFileName(urlList[i]);
+ if (cacheEnabled && lastModified != 0 && filesLastModified.containsKey(fileName)) {
+ long savedLastModified = filesLastModified.get(fileName);
+ // if lastModifed time is the same, don't redownload
+ if (savedLastModified == lastModified) {
+ fileSizes[i] = -2; // mark it to not redownload
+ }
+ }
+
+ if (fileSizes[i] >= 0) {
+ synchronized (sync) {
+ totalSizeDownload += fileSizes[i];
+ }
+ }
- if (cacheEnabled && lastModified != 0 &&
- filesLastModified.containsKey(fileName)) {
- long savedLastModified = filesLastModified.get(fileName);
-
- // if lastModifed time is the same, don't redownload
- if (savedLastModified == lastModified) {
- fileSizes[i] = -2; // mark it to not redownload
- }
+ // put key and value in the hashmap
+ filesLastModified.put(fileName, lastModified);
+
+ } catch (Exception e) {
+ throw new RuntimeException("Failed to fetch information for " + urlList[i], e);
+ }
+ }});
+
+ requests.add(request);
+ }
+
+ while (!requests.isEmpty()) {
+ Iterator<Future> iterator = requests.iterator();
+ while (iterator.hasNext()) {
+ Future request = iterator.next();
+ if (request.isDone()) {
+ request.get(); // will throw an exception if request thrown an exception.
+ iterator.remove();
+
+ // update progress bar
+ percentage = 5 + (int) (10 * (urlList.length - requests.size()) / (float) urlList.length);
+ }
}
-
- if (fileSizes[i] >= 0) {
- totalSizeDownload += fileSizes[i];
- }
-
- // put key and value in the hashmap
- filesLastModified.put(fileName, lastModified);
-
- // update progress bar
- percentage = 5 + (int)(10 * i/(float)urlList.length);
+
+ Thread.sleep(10);
}
+
+ executorService.shutdown();
}
/**
@@ -2087,11 +2134,25 @@
*/
protected boolean getBooleanParameter(String name, boolean defaultValue) {
String parameter = getParameter(name);
- if(parameter != null) {
+ if (parameter != null) {
return Boolean.parseBoolean(parameter);
}
return defaultValue;
}
+
+ /**
+ * Retrieves the int value for the applet
+ * @param name Name of parameter
+ * @param defaultValue default value to return if no such parameter
+ * @return value of parameter or defaultValue
+ */
+ protected int getIntParameter(String name, int defaultValue) {
+ String parameter = getParameter(name);
+ if (parameter != null) {
+ return Integer.parseInt(parameter);
+ }
+ return defaultValue;
+ }
/**
* Sets the error message and print debug information
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2011-10-06 23:05:12
|
Revision: 3652
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3652&view=rev
Author: kappa1
Date: 2011-10-06 23:05:06 +0000 (Thu, 06 Oct 2011)
Log Message:
-----------
AppletLoader: apply fix/workaround for the double security dialogs issue on OS X
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-10-06 21:11:46 UTC (rev 3651)
+++ trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-10-06 23:05:06 UTC (rev 3652)
@@ -65,8 +65,10 @@
import java.net.URLConnection;
import java.security.AccessControlException;
import java.security.AccessController;
+import java.security.AllPermission;
import java.security.CodeSource;
import java.security.PermissionCollection;
+import java.security.Permissions;
import java.security.PrivilegedExceptionAction;
import java.security.SecureClassLoader;
import java.security.cert.Certificate;
@@ -1155,13 +1157,31 @@
file = file.replace("!", "%21");
urls[i] = new URL(file);
}
-
+
+ // get AppletLoader certificates
+ final Certificate[] certs = getCurrentCertificates();
+
+ // detect if we are running on a mac and save result as boolean
+ String osName = System.getProperty("os.name");
+ final boolean isMacOS = (osName.startsWith("Mac") || osName.startsWith("Darwin"));
+
// add downloaded jars to the classpath with required permissions
classLoader = new URLClassLoader(urls) {
protected PermissionCollection getPermissions (CodeSource codesource) {
PermissionCollection perms = null;
try {
+
+ // if mac, apply workaround for the multiple security dialog issue
+ if (isMacOS) {
+ // if certificates match the AppletLoader certificates then don't use SecureClassLoader to get further permissions
+ if (certificatesMatch(certs, codesource.getCertificates())) {
+ perms = new Permissions();
+ perms.add(new AllPermission());
+ return perms;
+ }
+ }
+
// getPermissions from original classloader is important as it checks for signed jars and shows any security dialogs needed
Method method = SecureClassLoader.class.getDeclaredMethod("getPermissions", new Class[] { CodeSource.class });
method.setAccessible(true);
@@ -1666,18 +1686,8 @@
nativeFolder.mkdir();
}
- // get the current certificate to compare against native files
- Certificate[] certificate = AppletLoader.class.getProtectionDomain().getCodeSource().getCertificates();
-
- // workaround for bug where cached applet loader does not have certificates!?
- if (certificate == null) {
- URL location = AppletLoader.class.getProtectionDomain().getCodeSource().getLocation();
-
- // manually load the certificate
- JarURLConnection jurl = (JarURLConnection) (new URL("jar:" + location.toString() + "!/org/lwjgl/util/applet/AppletLoader.class").openConnection());
- jurl.setDefaultUseCaches(true);
- certificate = jurl.getCertificates();
- }
+ // get the current AppletLoader certificates to compare against certificates of the native files
+ Certificate[] certificate = getCurrentCertificates();
for (int i = urlList.length - nativeJarCount; i < urlList.length; i++) {
@@ -1755,8 +1765,10 @@
in.close();
out.close();
- // validate if the certificate for native file
- validateCertificateChain(certificate, entry.getCertificates());
+ // validate the certificate for the native file being extracted
+ if (!certificatesMatch(certificate, entry.getCertificates())) {
+ throw new Exception("The certificate(s) in " + nativeJar + " do not match the AppletLoader!");
+ }
}
subtaskMessage = "";
@@ -1770,26 +1782,54 @@
}
/**
- * Validates the certificate chain for a single file
+ * Compare two certificate chains to see if they match
*
- * @param ownCerts Chain of certificates to check against
- * @param native_certs Chain of certificates to check
+ * @param cert1 first chain of certificates
+ * @param cert2 second chain of certificates
+ *
+ * @return true if the certificate chains are the same
*/
- protected static void validateCertificateChain(Certificate[] ownCerts, Certificate[] native_certs) throws Exception {
- if (native_certs == null)
- throw new Exception("Unable to validate certificate chain. Native entry did not have a certificate chain at all");
-
- if (ownCerts.length != native_certs.length)
- throw new Exception("Unable to validate certificate chain. Chain differs in length [" + ownCerts.length + " vs " + native_certs.length + "]");
-
- for (int i = 0; i < ownCerts.length; i++) {
- if (!ownCerts[i].equals(native_certs[i])) {
- throw new Exception("Certificate mismatch: " + ownCerts[i] + " != " + native_certs[i]);
+ protected static boolean certificatesMatch(Certificate[] certs1, Certificate[] certs2) throws Exception {
+ if (certs1 == null || certs2 == null) {
+ return false;
+ }
+
+ if (certs1.length != certs2.length) {
+ return false;
+ }
+
+ for (int i = 0; i < certs1.length; i++) {
+ if (!certs1[i].equals(certs2[i])) {
+ return false;
}
}
+
+ return true;
}
/**
+ * Returns the current certificate chain of the AppletLoader
+ *
+ * @return - certificate chain of AppletLoader
+ */
+ protected static Certificate[] getCurrentCertificates() throws Exception {
+ // get the current certificate to compare against native files
+ Certificate[] certificate = AppletLoader.class.getProtectionDomain().getCodeSource().getCertificates();
+
+ // workaround for bug where cached applet loader does not have certificates!?
+ if (certificate == null) {
+ URL location = AppletLoader.class.getProtectionDomain().getCodeSource().getLocation();
+
+ // manually load the certificate
+ JarURLConnection jurl = (JarURLConnection) (new URL("jar:" + location.toString() + "!/org/lwjgl/util/applet/AppletLoader.class").openConnection());
+ jurl.setDefaultUseCaches(true);
+ certificate = jurl.getCertificates();
+ }
+
+ return certificate;
+ }
+
+ /**
* Check and validate jars which will be loaded into the classloader to make
* sure that they are not corrupt. This ensures corrupt files are never marked
* as successful downloadeds by the cache system.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2011-10-06 21:11:53
|
Revision: 3651
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3651&view=rev
Author: kappa1
Date: 2011-10-06 21:11:46 +0000 (Thu, 06 Oct 2011)
Log Message:
-----------
update credits
Modified Paths:
--------------
trunk/LWJGL/doc/CREDITS
trunk/LWJGL/www/credits.php
Modified: trunk/LWJGL/doc/CREDITS
===================================================================
--- trunk/LWJGL/doc/CREDITS 2011-10-06 20:16:37 UTC (rev 3650)
+++ trunk/LWJGL/doc/CREDITS 2011-10-06 21:11:46 UTC (rev 3651)
@@ -3,7 +3,7 @@
- Brian Matzon <br...@ma...>
- Elias Naur <eli...@gm...>
- Ioannis Tsakpinis <sp...@us...>
- - Niels J\xF8rgensen <nj...@ni...>
+ - Niels J�rgensen <nj...@ni...>
- Tristan Campbell <tr...@ha...>
- Gregory Pierce <gre...@ya...>
- Luke Holden <lh...@us...>
@@ -19,6 +19,7 @@
- Jens von Pilgrim
- Ruben Garat
- Pelle Johnsen <pel...@gm...>
+ - Jae Kwon
additional credits goes to:
- Joseph I. Valenzuela [OpenAL stuff]
Modified: trunk/LWJGL/www/credits.php
===================================================================
--- trunk/LWJGL/www/credits.php 2011-10-06 20:16:37 UTC (rev 3650)
+++ trunk/LWJGL/www/credits.php 2011-10-06 21:11:46 UTC (rev 3651)
@@ -23,6 +23,7 @@
<li>Ryan McNally</li>
<li>Ciardhubh</li>
<li>Pelle Johnsen</li>
+ <li>Jae Kwon</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: <ka...@us...> - 2011-10-06 20:16:43
|
Revision: 3650
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3650&view=rev
Author: kappa1
Date: 2011-10-06 20:16:37 +0000 (Thu, 06 Oct 2011)
Log Message:
-----------
apply CL/GL interop patch for mac, thx to jaekwon for patch.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/ContextGL.java
trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXContextImplementation.java
trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXContextImplementation.m
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/ContextGL.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/ContextGL.java 2011-10-05 19:19:00 UTC (rev 3649)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/ContextGL.java 2011-10-06 20:16:37 UTC (rev 3650)
@@ -36,6 +36,7 @@
import org.lwjgl.PointerBuffer;
import org.lwjgl.Sys;
import org.lwjgl.opencl.KHRGLSharing;
+import org.lwjgl.opencl.APPLEGLSharing;
import java.nio.ByteBuffer;
import java.nio.IntBuffer;
@@ -275,8 +276,16 @@
properties.put(KHRGLSharing.CL_GL_CONTEXT_KHR).put(implLinux.getGLXContext(handle));
properties.put(KHRGLSharing.CL_GLX_DISPLAY_KHR).put(implLinux.getDisplay(peer_handle));
break;
+ case LWJGLUtil.PLATFORM_MACOSX:
+ if (LWJGLUtil.isMacOSXEqualsOrBetterThan(10, 6)) { // only supported on OS X 10.6+
+ // http://oscarbg.blogspot.com/2009/10/about-opencl-opengl-interop.html
+ final MacOSXContextImplementation implMacOSX = (MacOSXContextImplementation)implementation;
+ final long CGLShareGroup = implMacOSX.getCGLShareGroup(handle);
+ properties.put(APPLEGLSharing.CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE).put(CGLShareGroup);
+ break;
+ }
default:
- throw new UnsupportedOperationException("CL/GL context sharing is not supposed on this platform.");
+ throw new UnsupportedOperationException("CL/GL context sharing is not supported on this platform.");
}
} finally {
peer_info.unlock();
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXContextImplementation.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXContextImplementation.java 2011-10-05 19:19:00 UTC (rev 3649)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXContextImplementation.java 2011-10-06 20:16:37 UTC (rev 3650)
@@ -63,6 +63,8 @@
}
}
+ native long getCGLShareGroup(ByteBuffer context_handle);
+
private static native void nSwapBuffers(ByteBuffer context_handle) throws LWJGLException;
public void update(ByteBuffer context_handle) {
Modified: trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXContextImplementation.m
===================================================================
--- trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXContextImplementation.m 2011-10-05 19:19:00 UTC (rev 3649)
+++ trunk/LWJGL/src/native/macosx/org_lwjgl_opengl_MacOSXContextImplementation.m 2011-10-06 20:16:37 UTC (rev 3650)
@@ -38,6 +38,9 @@
*/
#import <jni.h>
+#import <OpenGL/CGLCurrent.h>
+#import <OpenGL/CGLTypes.h>
+#import <OpenGL/CGLDevice.h>
#import <Cocoa/Cocoa.h>
#import "org_lwjgl_opengl_MacOSXContextImplementation.h"
#import "context.h"
@@ -78,6 +81,16 @@
return context_handle;
}
+JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_getCGLShareGroup
+ (JNIEnv *env, jclass clazz, jobject context_handle) {
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ MacOSXContext *context_info = (MacOSXContext *)(*env)->GetDirectBufferAddress(env, context_handle);
+ CGLContextObj cgl_context = [context_info->context CGLContextObj];
+ CGLShareGroupObj share_group = CGLGetShareGroup(cgl_context);
+ [pool release];
+ return share_group;
+}
+
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nSwapBuffers
(JNIEnv *env, jclass clazz, jobject context_handle) {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-10-05 19:19:06
|
Revision: 3649
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3649&view=rev
Author: matzon
Date: 2011-10-05 19:19:00 +0000 (Wed, 05 Oct 2011)
Log Message:
-----------
applying ruben01s latest maven patch
Modified Paths:
--------------
trunk/LWJGL/platform_build/build-maven.xml
Modified: trunk/LWJGL/platform_build/build-maven.xml
===================================================================
--- trunk/LWJGL/platform_build/build-maven.xml 2011-10-04 22:08:23 UTC (rev 3648)
+++ trunk/LWJGL/platform_build/build-maven.xml 2011-10-05 19:19:00 UTC (rev 3649)
@@ -34,7 +34,7 @@
}
if(!mavenVersion.match(/^.*-SNAPSHOT$/)){
var forceSnapshot = project.getProperty("snapshot")
- if(forceSnapshot!="false"){
+ if(forceSnapshot!=null && forceSnapshot!="false"){
System.out.println("Forcing Maven Version to Snapshot");
mavenVersion = mavenVersion + "-SNAPSHOT";
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-10-04 22:08:29
|
Revision: 3648
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3648&view=rev
Author: matzon
Date: 2011-10-04 22:08:23 +0000 (Tue, 04 Oct 2011)
Log Message:
-----------
lets include openal and opencl when building lwjgl on 64-bit linux
Modified Paths:
--------------
trunk/LWJGL/platform_build/linux_ant/build.xml
trunk/LWJGL/platform_build/linux_ant/build_es.xml
Modified: trunk/LWJGL/platform_build/linux_ant/build.xml
===================================================================
--- trunk/LWJGL/platform_build/linux_ant/build.xml 2011-10-03 20:17:30 UTC (rev 3647)
+++ trunk/LWJGL/platform_build/linux_ant/build.xml 2011-10-04 22:08:23 UTC (rev 3648)
@@ -111,6 +111,8 @@
<mapper type="glob" from="*.c" to="*.o"/>
<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}/linux" includes="*.c"/>
<fileset dir="${native}/linux/opengl" includes="*.c"/>
Modified: trunk/LWJGL/platform_build/linux_ant/build_es.xml
===================================================================
--- trunk/LWJGL/platform_build/linux_ant/build_es.xml 2011-10-03 20:17:30 UTC (rev 3647)
+++ trunk/LWJGL/platform_build/linux_ant/build_es.xml 2011-10-04 22:08:23 UTC (rev 3648)
@@ -111,6 +111,8 @@
<mapper type="glob" from="*.c" to="*.o"/>
<fileset dir="${native}/common" includes="*.c"/>
<fileset dir="${native}/common/opengles" includes="*.c"/>
+ <fileset dir="${native}/generated/openal" includes="*.c"/>
+ <fileset dir="${native}/generated/opencl" includes="*.c"/>
<fileset dir="${native}/generated/opengles" includes="*.c"/>
<fileset dir="${native}/linux" includes="*.c"/>
<fileset dir="${native}/linux/opengles" includes="*.c"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-10-03 20:17:36
|
Revision: 3647
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3647&view=rev
Author: matzon
Date: 2011-10-03 20:17:30 +0000 (Mon, 03 Oct 2011)
Log Message:
-----------
applying ruben01s latest maven patch
Modified Paths:
--------------
trunk/LWJGL/platform_build/build-maven.xml
Modified: trunk/LWJGL/platform_build/build-maven.xml
===================================================================
--- trunk/LWJGL/platform_build/build-maven.xml 2011-10-03 20:04:49 UTC (rev 3646)
+++ trunk/LWJGL/platform_build/build-maven.xml 2011-10-03 20:17:30 UTC (rev 3647)
@@ -32,6 +32,14 @@
System.out.println("Fixing LWJGL Maven version (Maven version should be x.y.z)");
mavenVersion = originalVersion + ".0";
}
+ if(!mavenVersion.match(/^.*-SNAPSHOT$/)){
+ var forceSnapshot = project.getProperty("snapshot")
+ if(forceSnapshot!="false"){
+ System.out.println("Forcing Maven Version to Snapshot");
+ mavenVersion = mavenVersion + "-SNAPSHOT";
+ }
+ }
+
project.setNewProperty("lwjgl-maven-version",mavenVersion);
System.out.println("LWJGL Maven Version: " + project.getProperty("lwjgl-maven-version"));
]]>
@@ -60,9 +68,9 @@
<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>
+ </condition>
+ <fail if="failjinputcheck" message="Jinput version in project (${jinputversion}) is different from the declared jinput version for maven (${jinput.version}) add -Doverridejinput=true as a command line option to avoid this check" />
+ </target>
<target name="maven-full">
<antcall target="clean-java" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-10-03 20:04:56
|
Revision: 3646
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3646&view=rev
Author: matzon
Date: 2011-10-03 20:04:49 +0000 (Mon, 03 Oct 2011)
Log Message:
-----------
Updating with openal-soft from trunk (1.13+)
Modified Paths:
--------------
trunk/LWJGL/libs/linux/libopenal.so
trunk/LWJGL/libs/linux/libopenal64.so
trunk/LWJGL/libs/solaris/libopenal.so
trunk/LWJGL/libs/solaris/libopenal64.so
trunk/LWJGL/libs/windows/OpenAL32.dll
trunk/LWJGL/libs/windows/OpenAL64.dll
Modified: trunk/LWJGL/libs/linux/libopenal.so
===================================================================
(Binary files differ)
Modified: trunk/LWJGL/libs/linux/libopenal64.so
===================================================================
(Binary files differ)
Modified: trunk/LWJGL/libs/solaris/libopenal.so
===================================================================
(Binary files differ)
Modified: trunk/LWJGL/libs/solaris/libopenal64.so
===================================================================
(Binary files differ)
Modified: trunk/LWJGL/libs/windows/OpenAL32.dll
===================================================================
(Binary files differ)
Modified: trunk/LWJGL/libs/windows/OpenAL64.dll
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2011-10-02 20:41:40
|
Revision: 3645
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3645&view=rev
Author: kappa1
Date: 2011-10-02 20:41:33 +0000 (Sun, 02 Oct 2011)
Log Message:
-----------
Implement Resizing API for Linux.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.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/opengl/LinuxDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2011-09-30 11:28:53 UTC (rev 3644)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2011-10-02 20:41:33 UTC (rev 3645)
@@ -141,7 +141,12 @@
private long current_cursor;
private long blank_cursor;
private boolean mouseInside = true;
-
+ private boolean resizable;
+ private boolean resized;
+
+ private int window_width;
+ private int window_height;
+
private Canvas parent;
private long parent_window;
private static boolean xembedded;
@@ -461,7 +466,11 @@
boolean undecorated = Display.getPrivilegedBoolean("org.lwjgl.opengl.Window.undecorated") || (current_window_mode != WINDOWED && Display.getPrivilegedBoolean("org.lwjgl.opengl.Window.undecorated_fs"));
this.parent = parent;
parent_window = parent != null ? getHandle(parent) : getRootWindow(getDisplay(), getDefaultScreen());
- current_window = nCreateWindow(getDisplay(), getDefaultScreen(), handle, mode, current_window_mode, x, y, undecorated, parent_window);
+ resizable = Display.isResizable();
+ resized = false;
+ window_width = mode.getWidth();
+ window_height = mode.getHeight();
+ current_window = nCreateWindow(getDisplay(), getDefaultScreen(), handle, mode, current_window_mode, x, y, undecorated, parent_window, resizable);
mapRaised(getDisplay(), current_window);
xembedded = parent != null && isAncestorXEmbedded(parent_window);
blank_cursor = createBlankCursor();
@@ -495,7 +504,7 @@
unlockAWT();
}
}
- private static native long nCreateWindow(long display, int screen, ByteBuffer peer_info_handle, DisplayMode mode, int window_mode, int x, int y, boolean undecorated, long parent_handle) throws LWJGLException;
+ private static native long nCreateWindow(long display, int screen, ByteBuffer peer_info_handle, DisplayMode mode, int window_mode, int x, int y, boolean undecorated, long parent_handle, boolean resizable) throws LWJGLException;
private static native long getRootWindow(long display, int screen);
private static native boolean hasProperty(long display, long window, long property);
private static native long getParentWindow(long display, long window) throws LWJGLException;
@@ -504,6 +513,9 @@
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 native void nSetWindowSize(long display, long window, int width, int height, boolean resizable);
+ private static native int nGetWidth(long display, long window);
+ private static native int nGetHeight(long display, long window);
private static boolean isAncestorXEmbedded(long window) throws LWJGLException {
long xembed_atom = internAtom("_XEMBED_INFO", true);
@@ -823,6 +835,16 @@
break;
case LinuxEvent.Expose:
dirty = true;
+
+ int width = nGetWidth(getDisplay(), getWindow());
+ int height = nGetHeight(getDisplay(), getWindow());
+
+ if (window_width != width || window_height != height) {
+ resized = true;
+ window_width = width;
+ window_height = height;
+ }
+
break;
case LinuxEvent.EnterNotify:
mouseInside = true;
@@ -1346,11 +1368,11 @@
private static native void nSetWindowIcon(long display, long window, ByteBuffer icon_rgb, int icon_rgb_size, ByteBuffer icon_mask, int icon_mask_size, int width, int height);
public int getWidth() {
- return Display.getDisplayMode().getWidth();
+ return window_width;
}
public int getHeight() {
- return Display.getDisplayMode().getHeight();
+ return window_height;
}
public boolean isInsideWindow() {
@@ -1358,10 +1380,20 @@
}
public void setResizable(boolean resizable) {
-
+ if (this.resizable == resizable) {
+ return;
+ }
+
+ this.resizable = resizable;
+ nSetWindowSize(getDisplay(), getWindow(), window_width, window_height, resizable);
}
public boolean wasResized() {
+ if (resized) {
+ resized = false;
+ return true;
+ }
+
return false;
}
Modified: trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c
===================================================================
--- trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c 2011-09-30 11:28:53 UTC (rev 3644)
+++ trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c 2011-10-02 20:41:33 UTC (rev 3645)
@@ -278,6 +278,26 @@
return RootWindow(disp, screen);
}
+JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetWidth(JNIEnv *env, jclass unused, jlong display_ptr, jlong window_ptr) {
+ Display *disp = (Display *)(intptr_t)display_ptr;
+ Window win = (Window)window_ptr;
+ XWindowAttributes win_attribs;
+
+ XGetWindowAttributes(disp, win, &win_attribs);
+
+ return win_attribs.width;
+}
+
+JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetHeight(JNIEnv *env, jclass unused, jlong display_ptr, jlong window_ptr) {
+ Display *disp = (Display *)(intptr_t)display_ptr;
+ Window win = (Window)window_ptr;
+ XWindowAttributes win_attribs;
+
+ XGetWindowAttributes(disp, win, &win_attribs);
+
+ return win_attribs.height;
+}
+
static void updateWindowHints(JNIEnv *env, Display *disp, Window window) {
XWMHints* win_hints = XAllocWMHints();
if (win_hints == NULL) {
@@ -301,7 +321,28 @@
XFlush(disp);
}
-static Window createWindow(JNIEnv* env, Display *disp, int screen, jint window_mode, X11PeerInfo *peer_info, int x, int y, int width, int height, jboolean undecorated, long parent_handle) {
+static void updateWindowBounds(Display *disp, Window win, int x, int y, int width, int height, jboolean position, jboolean resizable) {
+ XSizeHints *window_hints = XAllocSizeHints();
+
+ if (position) {
+ window_hints->flags |= PPosition;
+ window_hints->x = x;
+ window_hints->y = y;
+ }
+
+ if (!resizable) {
+ window_hints->flags |= PMinSize | PMaxSize;
+ 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);
+ XFree(window_hints);
+}
+
+static Window createWindow(JNIEnv* env, Display *disp, int screen, jint window_mode, X11PeerInfo *peer_info, int x, int y, int width, int height, jboolean undecorated, long parent_handle, jboolean resizable) {
Window parent = (Window)parent_handle;
Window win;
XSetWindowAttributes attribs;
@@ -334,17 +375,10 @@
// Use Motif decoration hint property and hope the window manager respects them
setDecorations(disp, win, 0);
}
- 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);
+
+ updateWindowBounds(disp, win, x, y, width, height, JNI_TRUE, resizable);
updateWindowHints(env, disp, win);
- 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);
@@ -437,7 +471,7 @@
XSetInputFocus(disp, window, RevertToParent, time);
}
-JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nCreateWindow(JNIEnv *env, jclass clazz, jlong display, jint screen, jobject peer_info_handle, jobject mode, jint window_mode, jint x, jint y, jboolean undecorated, jlong parent_handle) {
+JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nCreateWindow(JNIEnv *env, jclass clazz, jlong display, jint screen, jobject peer_info_handle, jobject mode, jint window_mode, jint x, jint y, jboolean undecorated, jlong parent_handle, jboolean resizable) {
Display *disp = (Display *)(intptr_t)display;
X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle);
GLXFBConfig *fb_config = NULL;
@@ -451,7 +485,7 @@
jfieldID fid_height = (*env)->GetFieldID(env, cls_displayMode, "height", "I");
int width = (*env)->GetIntField(env, mode, fid_width);
int height = (*env)->GetIntField(env, mode, fid_height);
- Window win = createWindow(env, disp, screen, window_mode, peer_info, x, y, width, height, undecorated, parent_handle);
+ Window win = createWindow(env, disp, screen, window_mode, peer_info, x, y, width, height, undecorated, parent_handle, resizable);
if ((*env)->ExceptionOccurred(env)) {
return 0;
}
@@ -466,6 +500,12 @@
return win;
}
+JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetWindowSize(JNIEnv *env, jclass clazz, jlong display, jlong window_ptr, jint width, jint height, jboolean resizable) {
+ Display *disp = (Display *)(intptr_t)display;
+ Window win = (Window)window_ptr;
+ updateWindowBounds(disp, win, 0, 0, width, height, JNI_FALSE, resizable);
+}
+
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nDestroyWindow(JNIEnv *env, jclass clazz, jlong display, jlong window_ptr) {
Display *disp = (Display *)(intptr_t)display;
Window window = (Window)window_ptr;
Modified: trunk/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c
===================================================================
--- trunk/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c 2011-09-30 11:28:53 UTC (rev 3644)
+++ trunk/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c 2011-10-02 20:41:33 UTC (rev 3645)
@@ -268,6 +268,26 @@
return RootWindow(disp, screen);
}
+JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetWidth(JNIEnv *env, jclass unused, jlong display_ptr, jlong window_ptr) {
+ Display *disp = (Display *)(intptr_t)display_ptr;
+ Window win = (Window)window_ptr;
+ XWindowAttributes win_attribs;
+
+ XGetWindowAttributes(disp, win, &win_attribs);
+
+ return win_attribs.width;
+}
+
+JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetHeight(JNIEnv *env, jclass unused, jlong display_ptr, jlong window_ptr) {
+ Display *disp = (Display *)(intptr_t)display_ptr;
+ Window win = (Window)window_ptr;
+ XWindowAttributes win_attribs;
+
+ XGetWindowAttributes(disp, win, &win_attribs);
+
+ return win_attribs.height;
+}
+
static void updateWindowHints(JNIEnv *env, Display *disp, Window window) {
XWMHints* win_hints = XAllocWMHints();
if (win_hints == NULL) {
@@ -291,7 +311,28 @@
XFlush(disp);
}
-static Window createWindow(JNIEnv* env, Display *disp, int screen, jint window_mode, X11PeerInfo *peer_info, int x, int y, int width, int height, jboolean undecorated, long parent_handle) {
+static void updateWindowBounds(Display *disp, Window win, int x, int y, int width, int height, jboolean position, jboolean resizable) {
+ XSizeHints *window_hints = XAllocSizeHints();
+
+ if (position) {
+ window_hints->flags |= PPosition;
+ window_hints->x = x;
+ window_hints->y = y;
+ }
+
+ if (!resizable) {
+ window_hints->flags |= PMinSize | PMaxSize;
+ 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);
+ XFree(window_hints);
+}
+
+static Window createWindow(JNIEnv* env, Display *disp, int screen, jint window_mode, X11PeerInfo *peer_info, int x, int y, int width, int height, jboolean undecorated, long parent_handle, jboolean resizable) {
Window parent = (Window)parent_handle;
Window win;
XSetWindowAttributes attribs;
@@ -328,17 +369,10 @@
// Use Motif decoration hint property and hope the window manager respects them
setDecorations(disp, win, 0);
}
- 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);
+
+ updateWindowBounds(disp, win, x, y, width, height, JNI_TRUE, resizable);
updateWindowHints(env, disp, win);
- 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);
@@ -431,7 +465,7 @@
XSetInputFocus(disp, window, RevertToParent, time);
}
-JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nCreateWindow(JNIEnv *env, jclass clazz, jlong display, jint screen, jobject peer_info_handle, jobject mode, jint window_mode, jint x, jint y, jboolean undecorated, jlong parent_handle) {
+JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nCreateWindow(JNIEnv *env, jclass clazz, jlong display, jint screen, jobject peer_info_handle, jobject mode, jint window_mode, jint x, jint y, jboolean undecorated, jlong parent_handle, jboolean resizable) {
Display *disp = (Display *)(intptr_t)display;
X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle);
@@ -443,7 +477,7 @@
int width = (*env)->GetIntField(env, mode, fid_width);
int height = (*env)->GetIntField(env, mode, fid_height);
- Window win = createWindow(env, disp, screen, window_mode, peer_info, x, y, width, height, undecorated, parent_handle);
+ Window win = createWindow(env, disp, screen, window_mode, peer_info, x, y, width, height, undecorated, parent_handle, resizable);
if ((*env)->ExceptionOccurred(env))
return 0;
@@ -454,6 +488,12 @@
return win;
}
+JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetWindowSize(JNIEnv *env, jclass clazz, jlong display, jlong window_ptr, jint width, jint height, jboolean resizable) {
+ Display *disp = (Display *)(intptr_t)display;
+ Window win = (Window)window_ptr;
+ updateWindowBounds(disp, win, 0, 0, width, height, JNI_FALSE, resizable);
+}
+
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nDestroyWindow(JNIEnv *env, jclass clazz, jlong display, jlong window_ptr) {
Display *disp = (Display *)(intptr_t)display;
Window window = (Window)window_ptr;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2011-09-30 11:28:59
|
Revision: 3644
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3644&view=rev
Author: spasi
Date: 2011-09-30 11:28:53 +0000 (Fri, 30 Sep 2011)
Log Message:
-----------
Removed GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT.
Modified Paths:
--------------
trunk/LWJGL/src/templates/org/lwjgl/opengl/GL32.java
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL32.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL32.java 2011-09-29 08:36:36 UTC (rev 3643)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL32.java 2011-09-30 11:28:53 UTC (rev 3644)
@@ -244,7 +244,6 @@
/** Returned by CheckFramebufferStatusEXT: */
int GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS = 0x8DA8;
- int GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT = 0x8DA9;
/**
* Accepted by the <pname> parameter of GetFramebufferAttachment-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2011-09-29 08:36:42
|
Revision: 3643
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3643&view=rev
Author: spasi
Date: 2011-09-29 08:36:36 +0000 (Thu, 29 Sep 2011)
Log Message:
-----------
Added support for INTEL_immediate_execution.
Modified Paths:
--------------
trunk/LWJGL/platform_build/build-definitions.xml
Added Paths:
-----------
trunk/LWJGL/src/templates/org/lwjgl/opencl/INTEL_immediate_execution.java
Modified: trunk/LWJGL/platform_build/build-definitions.xml
===================================================================
--- trunk/LWJGL/platform_build/build-definitions.xml 2011-09-27 22:38:32 UTC (rev 3642)
+++ trunk/LWJGL/platform_build/build-definitions.xml 2011-09-29 08:36:36 UTC (rev 3643)
@@ -17,7 +17,7 @@
<property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/AMD*.java,org/lwjgl/opengl/APPLE*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/NVX*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java,org/lwjgl/opengl/GREMEDY*.java"/>
<property name="opengles-template-pattern" value="org/lwjgl/opengles/GLES*.java,org/lwjgl/opengles/ARB*.java,org/lwjgl/opengles/EXT*.java,org/lwjgl/opengles/AMD*.java,org/lwjgl/opengles/ANGLE*.java,org/lwjgl/opengles/APPLE*.java,org/lwjgl/opengles/ARM*.java,org/lwjgl/opengles/DMP*.java,org/lwjgl/opengles/IMG*.java,org/lwjgl/opengles/NV*.java,org/lwjgl/opengles/OES*.java,org/lwjgl/opengles/QCOM*.java,org/lwjgl/opengles/VIV*.java"/>
- <property name="opencl-template-pattern-extensions" value="org/lwjgl/opencl/KHR*.java,org/lwjgl/opencl/EXT*.java,org/lwjgl/opencl/APPLE*.java,org/lwjgl/opencl/AMD*.java,org/lwjgl/opencl/NV*.java"/>
+ <property name="opencl-template-pattern-extensions" value="org/lwjgl/opencl/KHR*.java,org/lwjgl/opencl/EXT*.java,org/lwjgl/opencl/APPLE*.java,org/lwjgl/opencl/AMD*.java,org/lwjgl/opencl/INTEL*.java,org/lwjgl/opencl/NV*.java"/>
<property name="opencl-template-pattern" value="org/lwjgl/opencl/CL*.java,${opencl-template-pattern-extensions}"/>
<!-- ================================================================== -->
Added: trunk/LWJGL/src/templates/org/lwjgl/opencl/INTEL_immediate_execution.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opencl/INTEL_immediate_execution.java (rev 0)
+++ trunk/LWJGL/src/templates/org/lwjgl/opencl/INTEL_immediate_execution.java 2011-09-29 08:36:36 UTC (rev 3643)
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2002-2010 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.opencl;
+
+import org.lwjgl.util.generator.opencl.CLDeviceExtension;
+
+@CLDeviceExtension
+public interface INTEL_immediate_execution {
+
+ // TODO: Update when spec is released publicly.
+
+ /** cl_command_queue_properties - bitfield */
+ int CL_QUEUE_IMMEDIATE_EXECUTION_ENABLE_INTEL = (1 << 2);
+
+ /** cl_device_exec_capabilities - bitfield */
+ int CL_EXEC_IMMEDIATE_EXECUTION_INTEL = (1 << 2);
+
+}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2011-09-27 22:38:39
|
Revision: 3642
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3642&view=rev
Author: kappa1
Date: 2011-09-27 22:38:32 +0000 (Tue, 27 Sep 2011)
Log Message:
-----------
LinuxDisplay use proper constant name (X_SetInputFocus) for xembedded fix
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-26 20:03:59 UTC (rev 3641)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2011-09-27 22:38:32 UTC (rev 3642)
@@ -85,6 +85,8 @@
private static final int SetModeInsert = 0;
private static final int SaveSetRoot = 1;
private static final int SaveSetUnmap = 1;
+
+ private static final int X_SetInputFocus = 42;
/** Window mode enum */
private static final int FULLSCREEN_LEGACY = 1;
@@ -299,7 +301,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 && request_code == 42) return 0; // ignore X error in xembeded mode to fix a browser issue when dragging or switching tabs
+ if (xembedded && request_code == X_SetInputFocus) 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.
|