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
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
1
|
2
|
3
(5) |
4
|
|
5
(1) |
6
(16) |
7
(3) |
8
(3) |
9
(4) |
10
(13) |
11
(5) |
|
12
(1) |
13
(1) |
14
|
15
(7) |
16
(4) |
17
(1) |
18
(1) |
|
19
(3) |
20
|
21
(1) |
22
(16) |
23
|
24
(2) |
25
|
|
26
(1) |
27
(4) |
28
(6) |
29
(3) |
30
(1) |
|
|
|
From: Elias N. <eli...@us...> - 2004-09-15 17:45:07
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27855/src/native/common Modified Files: org_lwjgl_opengl_Display.h Log Message: Added setLocation support for linux Index: org_lwjgl_opengl_Display.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_Display.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- org_lwjgl_opengl_Display.h 9 Aug 2004 11:55:48 -0000 1.4 +++ org_lwjgl_opengl_Display.h 15 Sep 2004 17:44:38 -0000 1.5 @@ -11,6 +11,8 @@ /* Inaccessible static: initial_mode */ /* Inaccessible static: timeNow */ /* Inaccessible static: timeThen */ +/* Inaccessible static: x */ +/* Inaccessible static: y */ /* Inaccessible static: title */ /* Inaccessible static: fullscreen */ /* Inaccessible static: vsync */ @@ -27,10 +29,10 @@ /* * Class: org_lwjgl_opengl_Display * Method: nCreateWindow - * Signature: (Lorg/lwjgl/opengl/DisplayMode;Z)V + * Signature: (Lorg/lwjgl/opengl/DisplayMode;ZII)V */ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Display_nCreateWindow - (JNIEnv *, jclass, jobject, jboolean); + (JNIEnv *, jclass, jobject, jboolean, jint, jint); /* * Class: org_lwjgl_opengl_Display @@ -184,6 +186,14 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Display_nSetVSyncEnabled (JNIEnv *, jclass, jboolean); +/* + * Class: org_lwjgl_opengl_Display + * Method: nReshape + * Signature: (IIII)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Display_nReshape + (JNIEnv *, jclass, jint, jint, jint, jint); + #ifdef __cplusplus } #endif |
|
From: Elias N. <eli...@us...> - 2004-09-15 17:45:07
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27855/src/native/linux Modified Files: org_lwjgl_opengl_Display.c Log Message: Added setLocation support for linux Index: org_lwjgl_opengl_Display.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_opengl_Display.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- org_lwjgl_opengl_Display.c 10 Sep 2004 14:09:33 -0000 1.2 +++ org_lwjgl_opengl_Display.c 15 Sep 2004 17:44:39 -0000 1.3 @@ -343,7 +343,11 @@ return supported; } -static bool createWindow(JNIEnv* env, int width, int height) { +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Display_nReshape(JNIEnv *env, jclass clazz, jint x, jint y, jint width, jint height) { + XMoveWindow(getDisplay(), getCurrentWindow(), x, y); +} + +static bool createWindow(JNIEnv* env, int x, int y, int width, int height) { bool undecorated = getBooleanProperty(env, "org.lwjgl.opengl.Window.undecorated"); dirty = true; focused = true; @@ -370,7 +374,7 @@ attribmask |= CWOverrideRedirect; attribs.override_redirect = True; } - win = XCreateWindow(getDisplay(), root_win, 0, 0, width, height, 0, vis_info->depth, InputOutput, vis_info->visual, attribmask, &attribs); + win = XCreateWindow(getDisplay(), root_win, x, y, width, height, 0, vis_info->depth, InputOutput, vis_info->visual, attribmask, &attribs); if (!checkXError(env)) { XFreeColormap(getDisplay(), cmap); return false; @@ -706,7 +710,7 @@ decDisplay(); } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Display_nCreateWindow(JNIEnv *env, jclass clazz, jobject mode, jboolean fullscreen) { +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Display_nCreateWindow(JNIEnv *env, jclass clazz, jobject mode, jboolean fullscreen, int x, int y) { bool current_fullscreen = fullscreen == JNI_TRUE; if (current_fullscreen) { if (getCurrentDisplayModeExtension() == XRANDR && isNetWMFullscreenSupported()) @@ -720,7 +724,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); - bool window_created = createWindow(env, width, height); + bool window_created = createWindow(env, x, y, width, height); if (!window_created) { return; } |
|
From: Brian M. <ma...@us...> - 2004-09-15 17:07:23
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18511/native/win32 Modified Files: Window.h display.cpp org_lwjgl_opengl_Display.cpp org_lwjgl_opengl_Pbuffer.cpp Log Message: support for setLocation Index: display.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/display.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- display.cpp 22 Jul 2004 07:38:56 -0000 1.3 +++ display.cpp 15 Sep 2004 17:07:06 -0000 1.4 @@ -53,6 +53,8 @@ WORD* originalGamma = new WORD[256 * 3]; // Original gamma settings WORD* currentGamma = new WORD[256 * 3]; // Current gamma settings DEVMODE devmode; // Now we'll remember this value for the future +extern HWND display_hwnd = NULL; // Handle to the window +extern RECT clientSize; char * driver = getDriver(); jobjectArray getAvailableDisplayModes(JNIEnv *env) @@ -213,7 +215,7 @@ devmode.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT | DM_DISPLAYFLAGS; if (freq != 0) devmode.dmFields |= DM_DISPLAYFREQUENCY; - LONG cdsret = ChangeDisplaySettings(&devmode, CDS_FULLSCREEN); + LONG cdsret = ChangeDisplaySettings(&devmode, CDS_FULLSCREEN); if (cdsret != DISP_CHANGE_SUCCESSFUL) { // Failed: so let's check to see if it's a wierd dual screen display @@ -227,7 +229,6 @@ return; } } - modeSet = true; } Index: org_lwjgl_opengl_Display.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_Display.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- org_lwjgl_opengl_Display.cpp 9 Aug 2004 16:08:51 -0000 1.23 +++ org_lwjgl_opengl_Display.cpp 15 Sep 2004 17:07:06 -0000 1.24 @@ -47,17 +47,18 @@ #include "display.h" #include "org_lwjgl_opengl_Display.h" -static bool oneShotInitialised = false; // Registers the LWJGL window class +static bool oneShotInitialised = false; // Registers the LWJGL window class -static HWND display_hwnd = NULL; // Handle to the window -static HDC display_hdc = NULL; // Device context -static HGLRC display_hglrc = NULL; // OpenGL context -static bool isFullScreen = false; // Whether we're fullscreen or not -static bool isMinimized = false; // Whether we're minimized or not +static HWND display_hwnd = NULL; // Handle to the window +static HDC display_hdc = NULL; // Device context +static HGLRC display_hglrc = NULL; // OpenGL context +static bool isFullScreen = false; // Whether we're fullscreen or not +static bool isMinimized = false; // Whether we're minimized or not static bool isFocused = false; // whether we're focused or not static bool isDirty = false; // Whether we're dirty or not -static bool isUndecorated = false; // Whether we're undecorated or not -extern HINSTANCE dll_handle; // Handle to the LWJGL dll +static bool isUndecorated = false; // Whether we're undecorated or not +extern HINSTANCE dll_handle; // Handle to the LWJGL dll +RECT clientSize; // client size rect used when creating and positioning window static bool closerequested; static int pixel_format_index; @@ -346,6 +347,17 @@ { isDirty = true; } + /*case WM_MOVE: { + // get fields of display + jclass cls_display = env->FindClass("org/lwjgl/opengl/Display"); + jfieldID fid_x = env->GetStaticFieldID(cls_display, "x", "I"); + jfieldID fid_y = env->GetStaticFieldID(cls_display, "y", "I"); + + // set fields + env->SetStaticIntField(cls_display, fid_x, (int)(short) LOWORD(lParam)); + env->SetStaticIntField(cls_display, fid_y, (int)(short) HIWORD(lParam)); + + }*/ } // default action @@ -414,7 +426,7 @@ * * Returns true for success, or false for failure */ -HWND createWindow(int width, int height, bool fullscreen, bool undecorated) +HWND createWindow(int x, int y, int width, int height, bool fullscreen, bool undecorated) { int exstyle, windowflags; @@ -436,7 +448,6 @@ // If we're not a fullscreen window, adjust the height to account for the // height of the title bar (unless undecorated) - RECT clientSize; clientSize.bottom = height; clientSize.left = 0; clientSize.right = width; @@ -455,7 +466,7 @@ WINDOWCLASSNAME, "", windowflags, - 0, 0, clientSize.right - clientSize.left, clientSize.bottom - clientSize.top, + x, y, clientSize.right - clientSize.left, clientSize.bottom - clientSize.top, NULL, NULL, dll_handle, @@ -574,7 +585,7 @@ return getAvailableDisplayModes(env); } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Display_nCreateWindow(JNIEnv *env, jclass clazz, jobject mode, jboolean fullscreen) { +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Display_nCreateWindow(JNIEnv *env, jclass clazz, jobject mode, jboolean fullscreen, jint x, jint y) { closerequested = false; isMinimized = false; isFocused = true; @@ -587,7 +598,7 @@ int width = env->GetIntField(mode, fid_width); int height = env->GetIntField(mode, fid_height); - display_hwnd = createWindow(width, height, isFullScreen, isUndecorated); + display_hwnd = createWindow(x, y, width, height, isFullScreen, isUndecorated); if (display_hwnd == NULL) { throwException(env, "Failed to create the window."); return; @@ -656,7 +667,7 @@ if (pixel_format_index == -1) return false; } - HWND arb_hwnd = createWindow(1, 1, false, false); + HWND arb_hwnd = createWindow(0, 0, 1, 1, false, false); if (arb_hwnd == NULL) return false; HDC arb_hdc = GetDC(arb_hwnd); @@ -672,7 +683,7 @@ } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Display_createContext(JNIEnv *env, jclass clazz, jobject pixel_format) { - HWND dummy_hwnd = createWindow(1, 1, false, false); + HWND dummy_hwnd = createWindow(0, 0, 1, 1, false, false); if (dummy_hwnd == NULL) { throwException(env, "Failed to create the window."); return; @@ -729,3 +740,38 @@ display_hglrc = NULL; } } + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Display_nReshape(JNIEnv *env, jclass clazz, jint x, jint y, jint width, jint height) { + if (isFullScreen) { + return; + } + + int exstyle, windowflags; + + if (isFullScreen) { + exstyle = WS_EX_APPWINDOW | WS_EX_TOPMOST; + windowflags = WS_POPUP; + } else if (getBooleanProperty(env, "org.lwjgl.opengl.Window.undecorated")) { + exstyle = WS_EX_APPWINDOW; + windowflags = WS_POPUP; + } else { + exstyle = WS_EX_APPWINDOW; + windowflags = WS_OVERLAPPED | WS_BORDER | WS_CAPTION | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_MINIMIZEBOX | WS_SYSMENU; + } + + // If we're not a fullscreen window, adjust the height to account for the + // height of the title bar: + clientSize.bottom = height; + clientSize.left = 0; + clientSize.right = width; + clientSize.top = 0; + + AdjustWindowRectEx( + &clientSize, // client-rectangle structure + windowflags, // window styles + FALSE, // menu-present option + exstyle // extended window style + ); + + SetWindowPos(display_hwnd, HWND_TOP, x, y, clientSize.right - clientSize.left, clientSize.bottom - clientSize.top, SWP_NOZORDER); +} Index: Window.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/Window.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- Window.h 2 Aug 2004 14:47:52 -0000 1.17 +++ Window.h 15 Sep 2004 17:07:06 -0000 1.18 @@ -56,26 +56,26 @@ extern bool isMinimized; // Whether we're minimized or not extern bool isFocused; // Whether we're focused or not extern bool isDirty; // Whether we're dirty or not - #endif /* _PRIVATE_WINDOW_H_ */ - - WINDOW_H_API HWND getCurrentHWND(); + #endif /* _PRIVATE_WINDOW_H_ */ - WINDOW_H_API HGLRC getCurrentContext(); - - WINDOW_H_API bool applyPixelFormat(HDC hdc, int iPixelFormat); - - WINDOW_H_API void closeWindow(HWND hwnd, HDC hdc); - - /* - * Find a suitable pixel format - */ - WINDOW_H_API int findPixelFormat(JNIEnv *env, HDC hdc, jobject pixel_format); - - /* - * Find a suitable pixel format using the WGL_ARB_pixel_format extension + WINDOW_H_API HWND getCurrentHWND(); + + WINDOW_H_API HGLRC getCurrentContext(); + + WINDOW_H_API bool applyPixelFormat(HDC hdc, int iPixelFormat); + + WINDOW_H_API void closeWindow(HWND hwnd, HDC hdc); + + /* + * Find a suitable pixel format */ - WINDOW_H_API int findPixelFormatARB(JNIEnv *env, HDC hdc, jobject pixel_format, jobject pixelFormatCaps, bool use_hdc_bpp, bool window, bool pbuffer, bool double_buffer); - + WINDOW_H_API int findPixelFormat(JNIEnv *env, HDC hdc, jobject pixel_format); + + /* + * Find a suitable pixel format using the WGL_ARB_pixel_format extension + */ + WINDOW_H_API int findPixelFormatARB(JNIEnv *env, HDC hdc, jobject pixel_format, jobject pixelFormatCaps, bool use_hdc_bpp, bool window, bool pbuffer, bool double_buffer); + /* * Create a window with the specified title, position, size, and * fullscreen attribute. The window will have DirectInput associated @@ -83,7 +83,7 @@ * * Returns true for success, or false for failure */ - WINDOW_H_API HWND createWindow(int width, int height, bool fullscreen, bool undecorated); + WINDOW_H_API HWND createWindow(int x, int y, int width, int height, bool fullscreen, bool undecorated); /* Index: org_lwjgl_opengl_Pbuffer.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_Pbuffer.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- org_lwjgl_opengl_Pbuffer.cpp 2 Aug 2004 14:47:52 -0000 1.20 +++ org_lwjgl_opengl_Pbuffer.cpp 15 Sep 2004 17:07:06 -0000 1.21 @@ -79,7 +79,7 @@ } static HPBUFFERARB createPbuffer(JNIEnv *env, int width, int height, jobject pixel_format, jobject pixelFormatCaps, const int *pBufferAttribs_ptr) { - HWND dummy_hwnd = createWindow(1, 1, false, false); + HWND dummy_hwnd = createWindow(0, 0, 1, 1, false, false); if (dummy_hwnd == NULL) { throwException(env, "Could not create dummy window"); return NULL; |
|
From: Brian M. <ma...@us...> - 2004-09-15 17:07:23
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18511/java/org/lwjgl/test Modified Files: WindowCreationTest.java Log Message: support for setLocation Index: WindowCreationTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/WindowCreationTest.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- WindowCreationTest.java 22 Jul 2004 15:10:55 -0000 1.22 +++ WindowCreationTest.java 15 Sep 2004 17:07:05 -0000 1.23 @@ -31,8 +31,10 @@ */ package org.lwjgl.test; +import org.lwjgl.LWJGLException; import org.lwjgl.opengl.Display; import org.lwjgl.opengl.DisplayMode; +import org.lwjgl.opengl.GL11; import org.lwjgl.input.Keyboard; /** @@ -52,6 +54,12 @@ // get avaialble modes, and print out DisplayMode[] modes = Display.getAvailableDisplayModes(); System.out.println("Found " + modes.length + " display modes"); + + int x = 100, y = 100; + boolean fullscreen = false; + + System.out.println("Moving to 100, 100"); + Display.setLocation(x, y); // Create the actual window try { @@ -65,9 +73,10 @@ System.out.println("Window created"); System.out.println(Display.getDisplayMode().getHeight() + ", " + Display.getDisplayMode().getWidth() + ", " + Display.getTitle()); - + // wait for user to close window - while(!Display.isCloseRequested()) { + while(!Display.isCloseRequested()) { + GL11.glClear(GL11.GL_COLOR_BUFFER_BIT); Display.update(); try { Thread.sleep(100); @@ -78,6 +87,31 @@ if(Keyboard.isKeyDown(Keyboard.KEY_ESCAPE)) { break; } + + if(Keyboard.isKeyDown(Keyboard.KEY_LEFT)) { + Display.setLocation(x -= 10, y); + } + + if(Keyboard.isKeyDown(Keyboard.KEY_RIGHT)) { + Display.setLocation(x += 10, y); + } + + if(Keyboard.isKeyDown(Keyboard.KEY_UP)) { + Display.setLocation(x, y -= 10); + } + + if(Keyboard.isKeyDown(Keyboard.KEY_DOWN)) { + Display.setLocation(x, y += 10); + } + + if(Keyboard.isKeyDown(Keyboard.KEY_F)) { + try { + Display.setFullscreen(fullscreen = !fullscreen); + } catch (LWJGLException lwjgle) { + lwjgle.printStackTrace(); + } + } + } // nuke window and get out |
|
From: Brian M. <ma...@us...> - 2004-09-15 17:07:23
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18511/java/org/lwjgl/opengl Modified Files: Display.java Log Message: support for setLocation Index: Display.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Display.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- Display.java 20 Aug 2004 06:22:54 -0000 1.22 +++ Display.java 15 Sep 2004 17:07:04 -0000 1.23 @@ -75,14 +75,14 @@ /** Timer for sync() */ private static long timeNow, timeThen; -// /** X coordinate of the window */ -// private static int x; + /** X coordinate of the window */ + private static int x; /** * Y coordinate of the window. Y in window coordinates is from the top of the display down, * unlike GL, where it is typically at the bottom of the display. */ -// private static int y; + private static int y; /** Title of the window (never null) */ private static String title = "Game"; @@ -177,13 +177,15 @@ * A native context must exist, and it will be attached to the window. */ private static void createWindow() throws LWJGLException { - nCreateWindow(current_mode, fullscreen); + x = Math.max(0, Math.min(initial_mode.getWidth() - current_mode.getWidth(), x)); + y = Math.max(0, Math.min(initial_mode.getHeight() - current_mode.getHeight(), y)); + nCreateWindow(current_mode, fullscreen, (fullscreen) ? 0 : x, (fullscreen) ? 0 : y); nSetTitle(title); initControls(); nSetVSyncEnabled(vsync); } - private static native void nCreateWindow(DisplayMode mode, boolean fullscreen) throws LWJGLException; + private static native void nCreateWindow(DisplayMode mode, boolean fullscreen, int x, int y) throws LWJGLException; private static void destroyWindow() { // Automatically destroy keyboard, mouse, and controller @@ -329,21 +331,17 @@ /** * @return the X coordinate of the window (always 0 for fullscreen) */ -/* public static int getX() { - if (!isCreated()) - throw new IllegalStateException("Cannot get X on uncreated window"); - return x; - } -*/ + /*public static int getX() { + return (fullscreen) ? 0 : x; + }*/ + /** * @return the Y coordinate of the window (always 0 for fullscreen) */ -/* public static int getY() { - if (!isCreated()) - throw new IllegalStateException("Cannot get Y on uncreated window"); - return y; - } -*/ + /*public static int getY() { + return (fullscreen) ? 0 : y; + }*/ + /** * @return the title of the window @@ -370,10 +368,11 @@ return; destroyWindow(); try { - if (fullscreen) + if (fullscreen) { switchDisplayMode(); - else + } else { resetDisplayMode(); + } createWindow(); } catch (LWJGLException e) { destroyContext(); @@ -697,30 +696,28 @@ private static native void nSetVSyncEnabled(boolean sync); -// /** -// * Set the window's location. This is a no-op on fullscreen windows. -// * The window is clamped to remain entirely on the screen. If you attempt -// * to position the window such that it would extend off the screen, the window -// * is simply placed as close to the edge as possible. -// * @param x, y The new window location -// */ -// public static void setLocation(int x, int y) { -// if (!isCreated()) -// throw new IllegalStateException("Cannot move uncreated window"); -// if (fullscreen) { -// return; -// } -// Display.x = Math.max(0, Math.min(Display.getWidth() - Display.width, x)); -// Display.y = Math.max(0, Math.min(Display.getHeight() - Display.height, y)); -// nReshape(Display.x, Display.y, Display.width, Display.height); -// } -// -// -// /** -// * Native method to reshape the window -// * @param x, y The new window location -// * @param width, height The new window dimensions -// */ -// private static native void nReshape(int x, int y, int width, int height); + /** + * Set the window's location. This is a no-op on fullscreen windows. + * The window is clamped to remain entirely on the screen. If you attempt + * to position the window such that it would extend off the screen, the window + * is simply placed as close to the edge as possible. + * @param x, y The new window location + */ + public static void setLocation(int x, int y) { + if (fullscreen) { + return; + } + + // offset if already created + if(isCreated()) { + x = Math.max(0, Math.min(initial_mode.getWidth() - current_mode.getWidth(), x)); + y = Math.max(0, Math.min(initial_mode.getHeight() - current_mode.getHeight(), y)); + nReshape(x, y, current_mode.getWidth(), current_mode.getHeight()); + } + // cache position + Display.x = x; + Display.y = y; + } + private static native void nReshape(int x, int y, int width, int height); } |
|
From: Brian M. <ma...@us...> - 2004-09-15 17:04:44
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17950 Modified Files: org_lwjgl_openal_eax_EAXBufferProperties.c org_lwjgl_openal_eax_EAXListenerProperties.c Log Message: updated to c code Index: org_lwjgl_openal_eax_EAXListenerProperties.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_eax_EAXListenerProperties.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_openal_eax_EAXListenerProperties.c 10 Sep 2004 08:13:48 -0000 1.1 +++ org_lwjgl_openal_eax_EAXListenerProperties.c 15 Sep 2004 17:04:26 -0000 1.2 @@ -61,62 +61,62 @@ jfieldID field; //get class/fields - listener_class = env->FindClass("org/lwjgl/openal/eax/EAXListenerProperties"); + listener_class = (*env)->FindClass(env, "org/lwjgl/openal/eax/EAXListenerProperties"); //set environmentDiffusion_offset - field = env->GetStaticFieldID(listener_class, "room_offset", "I"); - env->SetStaticIntField(listener_class, field, offsetof(EAXLISTENERPROPERTIES, lRoom)); + field = (*env)->GetStaticFieldID(env, listener_class, "room_offset", "I"); + (*env)->SetStaticIntField(env, listener_class, field, offsetof(EAXLISTENERPROPERTIES, lRoom)); //set environmentDiffusion_offset - field = env->GetStaticFieldID(listener_class, "roomHF_offset", "I"); - env->SetStaticIntField(listener_class, field, offsetof(EAXLISTENERPROPERTIES, lRoomHF)); + field = (*env)->GetStaticFieldID(env, listener_class, "roomHF_offset", "I"); + (*env)->SetStaticIntField(env, listener_class, field, offsetof(EAXLISTENERPROPERTIES, lRoomHF)); //set environmentDiffusion_offset - field = env->GetStaticFieldID(listener_class, "roomRolloffFactor_offset", "I"); - env->SetStaticIntField(listener_class, field, offsetof(EAXLISTENERPROPERTIES, flRoomRolloffFactor)); + field = (*env)->GetStaticFieldID(env, listener_class, "roomRolloffFactor_offset", "I"); + (*env)->SetStaticIntField(env, listener_class, field, offsetof(EAXLISTENERPROPERTIES, flRoomRolloffFactor)); //set environmentDiffusion_offset - field = env->GetStaticFieldID(listener_class, "decayTime_offset", "I"); - env->SetStaticIntField(listener_class, field, offsetof(EAXLISTENERPROPERTIES, flDecayTime)); + field = (*env)->GetStaticFieldID(env, listener_class, "decayTime_offset", "I"); + (*env)->SetStaticIntField(env, listener_class, field, offsetof(EAXLISTENERPROPERTIES, flDecayTime)); //set environmentDiffusion_offset - field = env->GetStaticFieldID(listener_class, "decayHFRatio_offset", "I"); - env->SetStaticIntField(listener_class, field, offsetof(EAXLISTENERPROPERTIES, flDecayHFRatio)); + field = (*env)->GetStaticFieldID(env, listener_class, "decayHFRatio_offset", "I"); + (*env)->SetStaticIntField(env, listener_class, field, offsetof(EAXLISTENERPROPERTIES, flDecayHFRatio)); //set environmentDiffusion_offset - field = env->GetStaticFieldID(listener_class, "reflections_offset", "I"); - env->SetStaticIntField(listener_class, field, offsetof(EAXLISTENERPROPERTIES, lReflections)); + field = (*env)->GetStaticFieldID(env, listener_class, "reflections_offset", "I"); + (*env)->SetStaticIntField(env, listener_class, field, offsetof(EAXLISTENERPROPERTIES, lReflections)); //set environmentDiffusion_offset - field = env->GetStaticFieldID(listener_class, "reflectionsDelay_offset", "I"); - env->SetStaticIntField(listener_class, field, offsetof(EAXLISTENERPROPERTIES, flReflectionsDelay)); + field = (*env)->GetStaticFieldID(env, listener_class, "reflectionsDelay_offset", "I"); + (*env)->SetStaticIntField(env, listener_class, field, offsetof(EAXLISTENERPROPERTIES, flReflectionsDelay)); //set environmentDiffusion_offset - field = env->GetStaticFieldID(listener_class, "reverb_offset", "I"); - env->SetStaticIntField(listener_class, field, offsetof(EAXLISTENERPROPERTIES, lReverb)); + field = (*env)->GetStaticFieldID(env, listener_class, "reverb_offset", "I"); + (*env)->SetStaticIntField(env, listener_class, field, offsetof(EAXLISTENERPROPERTIES, lReverb)); //set environmentDiffusion_offset - field = env->GetStaticFieldID(listener_class, "reverbDelay_offset", "I"); - env->SetStaticIntField(listener_class, field, offsetof(EAXLISTENERPROPERTIES, flReverbDelay)); + field = (*env)->GetStaticFieldID(env, listener_class, "reverbDelay_offset", "I"); + (*env)->SetStaticIntField(env, listener_class, field, offsetof(EAXLISTENERPROPERTIES, flReverbDelay)); //set environmentDiffusion_offset - field = env->GetStaticFieldID(listener_class, "environment_offset", "I"); - env->SetStaticIntField(listener_class, field, offsetof(EAXLISTENERPROPERTIES, dwEnvironment)); + field = (*env)->GetStaticFieldID(env, listener_class, "environment_offset", "I"); + (*env)->SetStaticIntField(env, listener_class, field, offsetof(EAXLISTENERPROPERTIES, dwEnvironment)); //set environmentDiffusion_offset - field = env->GetStaticFieldID(listener_class, "environmentSize_offset", "I"); - env->SetStaticIntField(listener_class, field, offsetof(EAXLISTENERPROPERTIES, flEnvironmentSize)); + field = (*env)->GetStaticFieldID(env, listener_class, "environmentSize_offset", "I"); + (*env)->SetStaticIntField(env, listener_class, field, offsetof(EAXLISTENERPROPERTIES, flEnvironmentSize)); //set environmentDiffusion_offset - field = env->GetStaticFieldID(listener_class, "environmentDiffusion_offset", "I"); - env->SetStaticIntField(listener_class, field, offsetof(EAXLISTENERPROPERTIES, flEnvironmentDiffusion)); + field = (*env)->GetStaticFieldID(env, listener_class, "environmentDiffusion_offset", "I"); + (*env)->SetStaticIntField(env, listener_class, field, offsetof(EAXLISTENERPROPERTIES, flEnvironmentDiffusion)); //set environmentDiffusion_offset - field = env->GetStaticFieldID(listener_class, "airAbsorptionHF_offset", "I"); - env->SetStaticIntField(listener_class, field, offsetof(EAXLISTENERPROPERTIES, flAirAbsorptionHF)); + field = (*env)->GetStaticFieldID(env, listener_class, "airAbsorptionHF_offset", "I"); + (*env)->SetStaticIntField(env, listener_class, field, offsetof(EAXLISTENERPROPERTIES, flAirAbsorptionHF)); //set environmentDiffusion_offset - field = env->GetStaticFieldID(listener_class, "flags_offset", "I"); - env->SetStaticIntField(listener_class, field, offsetof(EAXLISTENERPROPERTIES, dwFlags)); + field = (*env)->GetStaticFieldID(env, listener_class, "flags_offset", "I"); + (*env)->SetStaticIntField(env, listener_class, field, offsetof(EAXLISTENERPROPERTIES, dwFlags)); #endif } Index: org_lwjgl_openal_eax_EAXBufferProperties.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_eax_EAXBufferProperties.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_openal_eax_EAXBufferProperties.c 10 Sep 2004 08:13:48 -0000 1.1 +++ org_lwjgl_openal_eax_EAXBufferProperties.c 15 Sep 2004 17:04:26 -0000 1.2 @@ -60,58 +60,58 @@ jfieldID field; //get class/fields - listener_class = env->FindClass("org/lwjgl/openal/eax/EAXBufferProperties"); + listener_class = (*env)->FindClass(env, "org/lwjgl/openal/eax/EAXBufferProperties"); //set environmentDiffusion_offset - field = env->GetStaticFieldID(listener_class, "direct_offset", "I"); - env->SetStaticIntField(listener_class, field, offsetof(EAXBUFFERPROPERTIES, lDirect)); + field = (*env)->GetStaticFieldID(env, listener_class, "direct_offset", "I"); + (*env)->SetStaticIntField(env, listener_class, field, offsetof(EAXBUFFERPROPERTIES, lDirect)); //set environmentDiffusion_offset - field = env->GetStaticFieldID(listener_class, "directHF_offset", "I"); - env->SetStaticIntField(listener_class, field, offsetof(EAXBUFFERPROPERTIES, lDirectHF)); + field = (*env)->GetStaticFieldID(env, listener_class, "directHF_offset", "I"); + (*env)->SetStaticIntField(env, listener_class, field, offsetof(EAXBUFFERPROPERTIES, lDirectHF)); //set environmentDiffusion_offset - field = env->GetStaticFieldID(listener_class, "room_offset", "I"); - env->SetStaticIntField(listener_class, field, offsetof(EAXBUFFERPROPERTIES, lRoom)); + field = (*env)->GetStaticFieldID(env, listener_class, "room_offset", "I"); + (*env)->SetStaticIntField(env, listener_class, field, offsetof(EAXBUFFERPROPERTIES, lRoom)); //set environmentDiffusion_offset - field = env->GetStaticFieldID(listener_class, "roomHF_offset", "I"); - env->SetStaticIntField(listener_class, field, offsetof(EAXBUFFERPROPERTIES, lRoomHF)); + field = (*env)->GetStaticFieldID(env, listener_class, "roomHF_offset", "I"); + (*env)->SetStaticIntField(env, listener_class, field, offsetof(EAXBUFFERPROPERTIES, lRoomHF)); //set environmentDiffusion_offset - field = env->GetStaticFieldID(listener_class, "roomRolloffFactor_offset", "I"); - env->SetStaticIntField(listener_class, field, offsetof(EAXBUFFERPROPERTIES, flRoomRolloffFactor)); + field = (*env)->GetStaticFieldID(env, listener_class, "roomRolloffFactor_offset", "I"); + (*env)->SetStaticIntField(env, listener_class, field, offsetof(EAXBUFFERPROPERTIES, flRoomRolloffFactor)); //set environmentDiffusion_offset - field = env->GetStaticFieldID(listener_class, "obstruction_offset", "I"); - env->SetStaticIntField(listener_class, field, offsetof(EAXBUFFERPROPERTIES, lObstruction)); + field = (*env)->GetStaticFieldID(env, listener_class, "obstruction_offset", "I"); + (*env)->SetStaticIntField(env, listener_class, field, offsetof(EAXBUFFERPROPERTIES, lObstruction)); //set environmentDiffusion_offset - field = env->GetStaticFieldID(listener_class, "obstructionLFRatio_offset", "I"); - env->SetStaticIntField(listener_class, field, offsetof(EAXBUFFERPROPERTIES, flObstructionLFRatio)); + field = (*env)->GetStaticFieldID(env, listener_class, "obstructionLFRatio_offset", "I"); + (*env)->SetStaticIntField(env, listener_class, field, offsetof(EAXBUFFERPROPERTIES, flObstructionLFRatio)); //set environmentDiffusion_offset - field = env->GetStaticFieldID(listener_class, "occlusion_offset", "I"); - env->SetStaticIntField(listener_class, field, offsetof(EAXBUFFERPROPERTIES, lOcclusion)); + field = (*env)->GetStaticFieldID(env, listener_class, "occlusion_offset", "I"); + (*env)->SetStaticIntField(env, listener_class, field, offsetof(EAXBUFFERPROPERTIES, lOcclusion)); //set environmentDiffusion_offset - field = env->GetStaticFieldID(listener_class, "occlusionLFRatio_offset", "I"); - env->SetStaticIntField(listener_class, field, offsetof(EAXBUFFERPROPERTIES, flOcclusionLFRatio)); + field = (*env)->GetStaticFieldID(env, listener_class, "occlusionLFRatio_offset", "I"); + (*env)->SetStaticIntField(env, listener_class, field, offsetof(EAXBUFFERPROPERTIES, flOcclusionLFRatio)); //set environmentDiffusion_offset - field = env->GetStaticFieldID(listener_class, "occlusionRoomRatio_offset", "I"); - env->SetStaticIntField(listener_class, field, offsetof(EAXBUFFERPROPERTIES, flOcclusionRoomRatio)); + field = (*env)->GetStaticFieldID(env, listener_class, "occlusionRoomRatio_offset", "I"); + (*env)->SetStaticIntField(env, listener_class, field, offsetof(EAXBUFFERPROPERTIES, flOcclusionRoomRatio)); //set environmentDiffusion_offset - field = env->GetStaticFieldID(listener_class, "outsideVolumeHF_offset", "I"); - env->SetStaticIntField(listener_class, field, offsetof(EAXBUFFERPROPERTIES, lOutsideVolumeHF)); + field = (*env)->GetStaticFieldID(env, listener_class, "outsideVolumeHF_offset", "I"); + (*env)->SetStaticIntField(env, listener_class, field, offsetof(EAXBUFFERPROPERTIES, lOutsideVolumeHF)); //set environmentDiffusion_offset - field = env->GetStaticFieldID(listener_class, "airAbsorptionFactor_offset", "I"); - env->SetStaticIntField(listener_class, field, offsetof(EAXBUFFERPROPERTIES, flAirAbsorptionFactor)); + field = (*env)->GetStaticFieldID(env, listener_class, "airAbsorptionFactor_offset", "I"); + (*env)->SetStaticIntField(env, listener_class, field, offsetof(EAXBUFFERPROPERTIES, flAirAbsorptionFactor)); //set environmentDiffusion_offset - field = env->GetStaticFieldID(listener_class, "flags_offset", "I"); - env->SetStaticIntField(listener_class, field, offsetof(EAXBUFFERPROPERTIES, dwFlags)); + field = (*env)->GetStaticFieldID(env, listener_class, "flags_offset", "I"); + (*env)->SetStaticIntField(env, listener_class, field, offsetof(EAXBUFFERPROPERTIES, dwFlags)); #endif } |
|
From: Brian M. <ma...@us...> - 2004-09-15 16:07:52
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5066 Modified Files: GLImpl.java Log Message: fix imports Index: GLImpl.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/util/GLImpl.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- GLImpl.java 9 Sep 2004 23:50:11 -0000 1.4 +++ GLImpl.java 15 Sep 2004 16:07:42 -0000 1.5 @@ -31,9 +31,12 @@ */ package org.lwjgl.util; -import org.lwjgl.opengl.GL20; - -import java.nio.*; +import java.nio.Buffer; +import java.nio.ByteBuffer; +import java.nio.DoubleBuffer; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; +import java.nio.ShortBuffer; /** * $Id$ |