|
From: <sp...@us...> - 2011-10-14 10:43:55
|
Revision: 3672
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3672&view=rev
Author: spasi
Date: 2011-10-14 10:43:45 +0000 (Fri, 14 Oct 2011)
Log Message:
-----------
Updated GLES FullScreenWindowedTest to destroy/create Display on mode change.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableGLES.java
trunk/LWJGL/src/java/org/lwjgl/opengles/EGLDisplay.java
trunk/LWJGL/src/java/org/lwjgl/test/opengles/FullScreenWindowedTest.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableGLES.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableGLES.java 2011-10-13 22:05:17 UTC (rev 3671)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableGLES.java 2011-10-14 10:43:45 UTC (rev 3672)
@@ -101,7 +101,7 @@
throw new LWJGLException("No EGLConfigs found for the specified PixelFormat.");
final EGLConfig eglConfig = pf.getBestMatch(configs);
- final EGLSurface eglSurface = eglDisplay.createWindowSurface(eglConfig, (int)window, null);
+ final EGLSurface eglSurface = eglDisplay.createWindowSurface(eglConfig, window, null);
pf.setSurfaceAttribs(eglSurface);
this.eglDisplay = eglDisplay;
Modified: trunk/LWJGL/src/java/org/lwjgl/opengles/EGLDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengles/EGLDisplay.java 2011-10-13 22:05:17 UTC (rev 3671)
+++ trunk/LWJGL/src/java/org/lwjgl/opengles/EGLDisplay.java 2011-10-14 10:43:45 UTC (rev 3672)
@@ -172,7 +172,7 @@
*
* @return the EGL surface
*/
- public EGLSurface createWindowSurface(EGLConfig config, int window, IntBuffer attrib_list) throws LWJGLException {
+ public EGLSurface createWindowSurface(EGLConfig config, long window, IntBuffer attrib_list) throws LWJGLException {
checkInitialized();
if ( config.getDisplay() != this )
Modified: trunk/LWJGL/src/java/org/lwjgl/test/opengles/FullScreenWindowedTest.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/test/opengles/FullScreenWindowedTest.java 2011-10-13 22:05:17 UTC (rev 3671)
+++ trunk/LWJGL/src/java/org/lwjgl/test/opengles/FullScreenWindowedTest.java 2011-10-14 10:43:45 UTC (rev 3672)
@@ -82,7 +82,6 @@
initialize();
mainLoop();
cleanup();
- Display.destroy();
}
private void switchMode() throws LWJGLException {
@@ -99,18 +98,22 @@
try {
//find displaymode
switchMode();
- // start of in windowed mode
- Display.create(new PixelFormat());
- glInit();
+
quadPosition = new Vector2f(100f, 100f);
quadVelocity = new Vector2f(1.0f, 1.0f);
- renderer = new QuadRenderer();
+ reinit();
} catch (Exception e) {
e.printStackTrace();
}
}
+ private void reinit() throws LWJGLException {
+ Display.create(new PixelFormat());
+ glInit();
+ renderer = new QuadRenderer();
+ }
+
/** Runs the main loop of the "test" */
private void mainLoop() {
while ( !Keyboard.isKeyDown(Keyboard.KEY_ESCAPE) && !Display.isCloseRequested() ) {
@@ -185,8 +188,7 @@
switchMode();
- glInit();
- renderer = new QuadRenderer();
+ reinit();
} catch (Exception e) {
e.printStackTrace();
}
@@ -199,8 +201,7 @@
mode = new DisplayMode(800, 480);
Display.setDisplayModeAndFullscreen(mode);
- glInit();
- renderer = new QuadRenderer();
+ reinit();
} catch (Exception e) {
e.printStackTrace();
}
@@ -254,6 +255,8 @@
int_buffer.put(1, indices_buffer_id);
glDeleteBuffers(int_buffer);
+
+ Display.destroy();
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-01-11 20:47:08
|
Revision: 3722
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3722&view=rev
Author: matzon
Date: 2012-01-11 20:46:57 +0000 (Wed, 11 Jan 2012)
Log Message:
-----------
adding WS_MAXIMIZEBOX patch for windows and bumping native version
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/WindowsSysImplementation.java
trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java
Modified: trunk/LWJGL/src/java/org/lwjgl/WindowsSysImplementation.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/WindowsSysImplementation.java 2012-01-06 11:52:48 UTC (rev 3721)
+++ trunk/LWJGL/src/java/org/lwjgl/WindowsSysImplementation.java 2012-01-11 20:46:57 UTC (rev 3722)
@@ -46,7 +46,7 @@
* $Id$
*/
final class WindowsSysImplementation extends DefaultSysImplementation {
- private static final int JNI_VERSION = 23;
+ private static final int JNI_VERSION = 24;
static {
Sys.initialize();
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java 2012-01-06 11:52:48 UTC (rev 3721)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java 2012-01-11 20:46:57 UTC (rev 3722)
@@ -143,6 +143,7 @@
private static final int GWL_EXSTYLE = -20;
private static final int WS_THICKFRAME = 0x00040000;
+ private static final int WS_MAXIMIZEBOX = 0x00010000;
private static final int HTCLIENT = 0x01;
@@ -858,6 +859,8 @@
switch ((int)wParam) {
case SIZE_RESTORED:
case SIZE_MAXIMIZED:
+ resized = true;
+ updateWidthAndHeight();
setMinimized(false);
break;
case SIZE_MINIMIZED:
@@ -1011,9 +1014,9 @@
// update frame style
if(resizable) {
- setWindowLongPtr(hwnd, GWL_STYLE, style |= WS_THICKFRAME);
+ setWindowLongPtr(hwnd, GWL_STYLE, style |= (WS_THICKFRAME | WS_MAXIMIZEBOX));
} else {
- setWindowLongPtr(hwnd, GWL_STYLE, style &= ~WS_THICKFRAME);
+ setWindowLongPtr(hwnd, GWL_STYLE, style &= ~(WS_THICKFRAME | WS_MAXIMIZEBOX));
}
// from the existing client rect, determine the new window rect
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2012-01-16 22:18:37
|
Revision: 3725
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3725&view=rev
Author: kappa1
Date: 2012-01-16 22:18:31 +0000 (Mon, 16 Jan 2012)
Log Message:
-----------
Add extra checks so CALayer's only run on OS X 10.6+, Bump OS X native version
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java
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/MacOSXSysImplementation.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java 2012-01-13 00:53:43 UTC (rev 3724)
+++ trunk/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java 2012-01-16 22:18:31 UTC (rev 3725)
@@ -42,7 +42,7 @@
* $Id$
*/
final class MacOSXSysImplementation extends J2SESysImplementation {
- private static final int JNI_VERSION = 22;
+ private static final int JNI_VERSION = 23;
static {
// Make sure AWT is properly initialized. This avoids hangs on Mac OS X 10.3
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/AWTSurfaceLock.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/AWTSurfaceLock.java 2012-01-13 00:53:43 UTC (rev 3724)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/AWTSurfaceLock.java 2012-01-16 22:18:31 UTC (rev 3725)
@@ -83,7 +83,7 @@
// due to performance..
// 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) && isApplet(component);
+ final boolean allowCALayer = ((Display.getParent() != null && !Display.isFullscreen()) || component instanceof AWTGLCanvas) && isApplet(component) && LWJGLUtil.isMacOSXEqualsOrBetterThan(10, 6);
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 2012-01-13 00:53:43 UTC (rev 3724)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXCanvasPeerInfo.java 2012-01-16 22:18:31 UTC (rev 3725)
@@ -35,6 +35,7 @@
import java.nio.ByteBuffer;
import org.lwjgl.LWJGLException;
+import org.lwjgl.LWJGLUtil;
/**
*
@@ -51,7 +52,7 @@
protected void initHandle(Canvas component) throws LWJGLException {
// 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) && awt_surface.isApplet(component);
+ final boolean allowCALayer = ((Display.getParent() != null && !Display.isFullscreen()) || component instanceof AWTGLCanvas) && awt_surface.isApplet(component) && LWJGLUtil.isMacOSXEqualsOrBetterThan(10, 6);
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...> - 2012-04-10 13:23:15
|
Revision: 3760
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3760&view=rev
Author: kappa1
Date: 2012-04-10 13:23:08 +0000 (Tue, 10 Apr 2012)
Log Message:
-----------
Update ControllerAdapter in util package to reflect new changes in the Controller interface class (should fix broken build)
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/input/Controller.java
trunk/LWJGL/src/java/org/lwjgl/input/JInputController.java
trunk/LWJGL/src/java/org/lwjgl/util/input/ControllerAdapter.java
Modified: trunk/LWJGL/src/java/org/lwjgl/input/Controller.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/input/Controller.java 2012-04-10 11:44:50 UTC (rev 3759)
+++ trunk/LWJGL/src/java/org/lwjgl/input/Controller.java 2012-04-10 13:23:08 UTC (rev 3760)
@@ -279,12 +279,12 @@
*
* @param index The rumbler index
*/
- String getRumblerName(final int index);
+ String getRumblerName(int index);
/** Sets the vibration strength of the specified rumbler
*
* @param index The index of the rumbler
* @param strength The strength to vibrate at
*/
- void setRumblerStrength(final int index, final float strength);
+ void setRumblerStrength(int index, float strength);
}
Modified: trunk/LWJGL/src/java/org/lwjgl/input/JInputController.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/input/JInputController.java 2012-04-10 11:44:50 UTC (rev 3759)
+++ trunk/LWJGL/src/java/org/lwjgl/input/JInputController.java 2012-04-10 13:23:08 UTC (rev 3760)
@@ -89,7 +89,7 @@
* @param index The index this controller has been assigned to
* @param target The target JInput controller this class is wrapping
*/
- JInputController(final int index, net.java.games.input.Controller target) {
+ JInputController(int index, net.java.games.input.Controller target) {
this.target = target;
this.index = index;
@@ -515,11 +515,11 @@
return rumblers.length;
}
- public String getRumblerName(final int index) {
+ public String getRumblerName(int index) {
return rumblers[index].getAxisName();
}
- public void setRumblerStrength(final int index, final float strength) {
+ public void setRumblerStrength(int index, float strength) {
rumblers[index].rumble(strength);
}
Modified: trunk/LWJGL/src/java/org/lwjgl/util/input/ControllerAdapter.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/input/ControllerAdapter.java 2012-04-10 11:44:50 UTC (rev 3759)
+++ trunk/LWJGL/src/java/org/lwjgl/util/input/ControllerAdapter.java 2012-04-10 13:23:08 UTC (rev 3760)
@@ -326,4 +326,15 @@
*/
public void setRZAxisDeadZone(float zone) {
}
+
+ public int getRumblerCount() {
+ return 0;
+ }
+
+ public String getRumblerName(int index) {
+ return "rumber n/a";
+ }
+
+ public void setRumblerStrength(int index, float strength) {
+ }
}
\ 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...> - 2012-08-23 14:21:05
|
Revision: 3791
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3791&view=rev
Author: spasi
Date: 2012-08-23 14:20:58 +0000 (Thu, 23 Aug 2012)
Log Message:
-----------
Let repeat events pass the same-state filter.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsKeyboard.java
trunk/LWJGL/src/java/org/lwjgl/test/input/KeyboardTest.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsKeyboard.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsKeyboard.java 2012-08-23 12:38:45 UTC (rev 3790)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsKeyboard.java 2012-08-23 14:20:58 UTC (rev 3791)
@@ -155,7 +155,7 @@
}
public void handleKey(int virt_key, int scan_code, boolean extended, byte event_state, long millis, boolean repeat) {
- if ( isKeyPressed(event_state) == isKeyPressed(virt_key_down_buffer[virt_key]) )
+ if ( !repeat && isKeyPressed(event_state) == isKeyPressed(virt_key_down_buffer[virt_key]) )
return;
virt_key = translateExtended(virt_key, scan_code, event_state, extended);
Modified: trunk/LWJGL/src/java/org/lwjgl/test/input/KeyboardTest.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/test/input/KeyboardTest.java 2012-08-23 12:38:45 UTC (rev 3790)
+++ trunk/LWJGL/src/java/org/lwjgl/test/input/KeyboardTest.java 2012-08-23 14:20:58 UTC (rev 3791)
@@ -202,10 +202,7 @@
render();
- try {
- Thread.sleep(0);
- } catch (Exception e) {
- }
+ Display.sync(60);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2012-12-12 17:20:39
|
Revision: 3834
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3834&view=rev
Author: spasi
Date: 2012-12-12 17:20:24 +0000 (Wed, 12 Dec 2012)
Log Message:
-----------
Fixed put on external ByteBuffer. Generate @Deprecated annotation for deprecated methods.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/PointerBuffer.java
trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java
Modified: trunk/LWJGL/src/java/org/lwjgl/PointerBuffer.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/PointerBuffer.java 2012-12-02 16:53:25 UTC (rev 3833)
+++ trunk/LWJGL/src/java/org/lwjgl/PointerBuffer.java 2012-12-12 17:20:24 UTC (rev 3834)
@@ -550,9 +550,9 @@
*/
public static void put(final ByteBuffer target, int index, long l) {
if ( is64Bit )
- target.putLong(index * 8, l);
+ target.putLong(index, l);
else
- target.putInt(index * 4, (int)l);
+ target.putInt(index, (int)l);
}
// -- Bulk get operations --
Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java 2012-12-02 16:53:25 UTC (rev 3833)
+++ trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java 2012-12-12 17:20:24 UTC (rev 3834)
@@ -234,6 +234,8 @@
private static void printMethodWithMultiType(AnnotationProcessorEnvironment env, TypeMap type_map, PrintWriter writer, InterfaceDeclaration interface_decl, MethodDeclaration method, Map<ParameterDeclaration, TypeInfo> typeinfos_instance, Mode mode, boolean generate_error_checks, boolean context_specific) {
Utils.printDocComment(writer, method);
+ if ( method.getAnnotation(Deprecated.class) != null )
+ writer.println("\t@Deprecated");
if ( interface_decl.getAnnotation(Private.class) == null && method.getAnnotation(Private.class) == null )
writer.print("\tpublic static ");
else
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|